Skip to content

SDK v1.7.2

Choose a tag to compare

@github-actions github-actions released this 04 Mar 06:12
· 98 commits to main since this release

Highlights

The xaffinity CLI plugin's SessionStart hook no longer runs pip install on every container start. Installation is deferred to first actual use via a self-installing wrapper, cutting session startup from ~30s to <1s in ephemeral environments like Cowork. Skill descriptions now display correctly in the Claude Code UI. Also documents two Affinity API limitations discovered via support: interaction entity association and enriched field constraints.

Documentation

  • Data model: documented interaction entity association limitation and enriched field constraints (Current Organization, Current Job Title)

CLI Plugin 1.6.0

Added

  • Lazy install: SessionStart hook now drops a lightweight self-installing wrapper instead of running pip install unconditionally. The wrapper defers installation to first actual xaffinity use, with mkdir-based locking for concurrent safety, a marker file for install failure detection, and a 45s wait timeout for concurrent invocations.
  • PreToolUse hook: Install-failure detection via $HOME/.xaffinity-install-status marker — blocks commands with a clear error when pip install failed, instead of cryptic failures.
  • PreToolUse hook: Lazy session cache start — xaffinity session start is triggered on first xaffinity command instead of at session start, with CLAUDE_ENV_FILE persistence.

Changed

  • SessionStart timeout reduced from 60s to 10s (hook is now lightweight)
  • PreToolUse Bash timeout increased from 10s to 60s (accommodates pip install via wrapper on first use)
  • SessionStart status message updated to "Preparing Affinity CLI environment..."

Fixed

  • Skill YAML frontmatter: replaced multi-line > scalar with single-line description (Claude Code couldn't parse folded scalars, showing > instead of the description)
  • Skill: updated session cache documentation to reflect lazy initialization

Documentation

  • Skill: documented that interactions cannot be associated with companies/opportunities via API (UI's "Also add to" feature has no API equivalent)
  • Skill: documented that "Current Organization" is read-only via API and "Current Job Title" requires a separate field update after person creation

SDK Plugin 1.5.5

Fixed

  • Skill YAML frontmatter: replaced multi-line > scalar with single-line description (same parsing fix as CLI plugin)

Quick Install

SDK only:

pip install affinity-sdk

SDK + CLI:

pipx install "affinity-sdk[cli]"

MCP Server for Claude Desktop (easiest - MCPB bundle):

  1. Install CLI: pipx install "affinity-sdk[cli]"
  2. (Optional) Pre-configure API key: xaffinity config setup-key
    • If skipped, Claude Desktop will prompt for your API key during install
  3. Install xaffinity MCP in Claude Desktop (download and double-click)

Other MCP clients (Cursor, Windsurf, VS Code, etc.) require manual configuration - see MCP docs.

Full documentation | MCP Server docs