SDK v1.13.0
Highlights
Breaking change heads-up: xaffinity list export --filter without a scope flag now exits 2. Add --all, --max-results N, or --first-page-only to pick the scope explicitly. The previous silent page-1-only result was the root cause of the "Fusion Mantle" false-duplicate incident.
Also new: entity-scoped --company-id/--person-id flags on list export for cheap, unambiguous duplicate checks; every JSON response now exposes meta.truncated and meta.truncationReason so automated callers can't miss an incomplete answer.
Breaking Changes
- CLI:
list export --filternow errors (exit code 2,usage_error) without one of--all,--max-results, or--first-page-only. Previous versions silently returned first-page-only results.- Migration: Add the intended scope flag. For "filter all list entries" →
--all; for "filter the first N" →--max-results N; for "filter what fits on page 1" →--first-page-only. On very large lists prefer--saved-view(server-side) or the new--company-id/--person-id(entity-scoped).
- Migration: Add the intended scope flag. For "filter all list entries" →
What's New
- CLI:
list export --company-id ID/--person-id ID(both repeatable) for entity-scoped exports that map to the V2/companies/{id}/list-entries//persons/{id}/list-entriesendpoints. Primary use case: dedup-check beforelist add-entry— emits"Not on this list: company_ids=[...]"warning when a requested ID is absent. Currently scoped to company and person lists; opportunity-list support tracked separately. - CLI:
list export --first-page-onlyexplicit opt-in for first-page-only results (required alongside--filterif--all/--max-resultsare not set). - CLI/SDK:
meta.truncated(bool) andmeta.truncationReason(string) on allCommandResultenvelopes. Both keys are stripped from the JSON output whenNone. Known values fortruncationReason:firstPageOnly. - SDK:
_entry_to_filter_dictnow includeslistEntryId,entityId,entityName,entityType— filtering on the row-level keys the CLI outputs no longer silently matches zero rows.
Bug Fixes
- Agents redirecting stderr to
/dev/nullno longer silently lose the truncation signal — it's in the JSON envelope atmeta.truncated. list export --filter 'entityName =~ "..."'(and other row-level keys:entityId,entityType,listEntryId) no longer silently returns zero rows. These keys were previously absent from the filter dict.
Plugin / MCP updates (shipped alongside)
xaffinity-cliplugin: 1.7.0 → 1.8.0 — "Common pitfalls (READ THIS FIRST)" section added to thexaffinity-cli-usageskill covering--jsonvs NDJSON, stderr suppression, filter-scope requirement, dedup via--company-id, andmeta.truncated.xaffinity-mcpserver: 1.21.0 → 1.22.0 — minimum CLI bumped to 1.13.0 (mcp/COMPATIBILITY); data-model guide gains a "Duplicate checks" section with the--company-idworkflow. Seemcp/CHANGELOG.mdfor details.
Quick Install
SDK only:
pip install affinity-sdkSDK + CLI:
pipx install "affinity-sdk[cli]"MCP Server for Claude Desktop (easiest - MCPB bundle):
- Install CLI:
pipx install "affinity-sdk[cli]" - (Optional) Pre-configure API key:
xaffinity config setup-key- If skipped, Claude Desktop will prompt for your API key during install
- Install xaffinity MCP in Claude Desktop (download and double-click)
Other MCP clients (Cursor, Windsurf, VS Code, etc.) require manual configuration - see MCP docs.