Skip to content

feat: Attio deals with stages and own fields, people and companies read live, docs on bitrix24's model - #1

Merged
leemour merged 13 commits into
mainfrom
feat/attio-source
Nov 18, 2026
Merged

leemour merged 13 commits into
mainfrom
feat/attio-source

Conversation

@leemour

@leemour leemour commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Task

attio-cli, built from wirecat.config.ts, must work as bitrix24-cli does: deals and their pipeline in the local copy, contacts and companies read live, the workspace's own fields. Its README and docs must be at least as good as bitrix24-cli's.

Why

The first slice synced people and companies that no command could read, and deals was always empty: the config path had no flat deal stages, no typed own fields and no live list. cli-core 0.700.0 (cli-core #3114) adds them.

What

  • Deals: sync with Attio's one pipeline Deals. Stages are the stage attribute's statuses, archived ones too. Won is the stage Attio celebrates, lost a stage titled "Lost" (src/hooks.ts, 7 lines). Owner, amount, currency, company, people and own attributes are in provider_metadata.
  • People and companies: people and organizations list and show read Attio live, words searching names and emails, newest first.
  • Sorting: every records query sorts by created_at, so offset pages neither skip nor repeat a record.
  • Allowed hosts: only api.attio.com.
  • README and docs: rewritten on bitrix24-cli's page set. Each page says first what the reader gets, then "On this page", then the steps, with cross-links. Includes installation with Desktop and the token steps, mcp, permissions and roadmap. The agent skill and the changelog fragment match.
  • Dependencies: cli-core 0.700.0, cli-base 0.118.0.

Watch for:

  • A workspace with Deals switched off. Attio's records query answers 404 there, which fails the whole sync. The docs tell the user to switch Deals on. A cli-core change to treat that as a gap is planned after the live check.
  • The live list help. It shows field:value filters that the live list refuses. The fix belongs in cli-core (UX-230).

Reviewed by a fresh agent. Fixed: newest-first sorting, archived stages, the current-values guard, the extra host, tests for amount, currency, created time, the company map and the search body, and the docs claim about options. Left for cli-core: the 404 on disabled Deals, the live list help, and people show <name> when Attio refuses a non-UUID id.

Testing

  • cli-dev ready: every row verified except the live check, which runs next. Contracts are partially: crmWriteContract is excepted because the CLI is read-only.
  • audit:commands: 0 new findings that block.
  • Unit tests: src/attio-map.test.ts (person, deal, company, pipeline outcomes, the live search body) and src/crm-contracts.test.ts (crmSourceContract, and sync through the CLI: 3 companies, 6 people and 3 deals stored).

🤖 Generated with Claude Code

Conformance

  • Live check: 0.0.0 9fb9e9b4c7b130c230ec470b6997eb98ae980cab 2026-11-18 scripts/live.sh v2:bcecdc6c78f330e20db1ae5121dea074362ec207c91002b2fef2ae12d9252e37

leemour and others added 10 commits November 17, 2026 23:17
- scripts/live.sh reads the sync answer under item and requires saved rows of both kinds
- src/attio-map.test.ts maps a hand-written Attio person: current values win over replaced ones
- users list and show are mounted live; a suspended member is not active
- the changelog entries move to changes/feat-attio-source.md
- the template's SAMPLE notes and the sample's permission key are gone; docs/security.md names app.attio.com

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… ends its lists

The API's fake answers every page of an offset list with a sample row, and cli-core ends offset paging only on an
empty page, so the sync read 382 pages until its budget and the test hit its 15 s timeout. The sign-in check still
goes to the API's fake; the source's reads go to crmManifestFake. The test now also checks that the sync completes
and saves rows of both kinds (FIND-2765, fixed in the template seed by the coordinator's PR).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…patches and command names

cli-base 0.117.0 reads Attio's description as published (prefixItems, an allOf of value unions, property counts)
and names a PUT on a collection -upsert, so the four spec patches and the three -assert names are gone. cli-core
0.698.0 lets the manifest fake answer Attio's typed values and clears a cleared value from the store; with both,
the 17 failing tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…orts the source fake's refusals

The review found the test passed with rows reported saved but not kept: it now reads store status and expects 3
organizations and 3 people. The manifest fake joins the shared list, so a refusal shows even when an earlier
check fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ad live, as in bitrix24-cli

The synced people and companies were unreadable and the deal commands were always empty. Deals now sync with
Attio's one deal pipeline (stages from the stage attribute's statuses: won where Attio celebrates, lost by the
title), owner, amount, company, people and the workspace's own attributes. people and organizations list and show
read Attio live, words through its records query filter. The hook that dropped replaced values is gone: Attio's
records query answers only the current ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every page now opens with what the reader gets, then "On this page", then
the steps, with links between pages.

- README follows the WC-DOC-7 order: gains, an invented conversation, why,
  quick start with WireCat Desktop and the CLI, agents and MCP, what it can
  do, limits.
- installation: WireCat Desktop, the npm install, making an Attio access
  token with its three read scopes, sign-in, check, sign-out.
- usage: sync, deals and Attio's stages (won = celebrated, lost = "Lost…"),
  the pipeline, changes, live people and companies (words only), own
  attributes, search, the api group.
- New mcp, permissions and roadmap pages. The api group's writes are
  allow and deletes ask by default, so mcp and permissions show how to
  lock them with permissions.api readonly or read-only token scopes.
- configuration, troubleshooting and security rewritten for Attio's token,
  scopes, rate limits and what the copy holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…read live

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… own fields and a live people list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rent values kept, only Attio's API host

- list and search sort by created_at, newest first: help and docs said so, and offset pages over an unordered list
  can skip or repeat a record.
- the deal pipeline lists archived stages too: a deal may still stand in one.
- typed values keep only current entries, a guard should Attio send history.
- app.attio.com is no longer an allowed host: nothing calls it, and every allowed host gets the token.
- tests check amount, currency, created time, first name, the company map and the live search body.
- docs: Deals must be switched on in Attio; options of select attributes are not listed yet; the docs link is the
  readme until wirecat.dev has a page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ists, as totals only

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

socket-security Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​wirecat/​cli-base@​0.114.0 ⏵ 0.118.098 +1100100 +196 +170
Updated@​wirecat/​cli-core@​0.695.0 ⏵ 0.700.097100100 +19670

View full report

leemour and others added 3 commits November 18, 2026 16:26
…oor; app.attio.com declared again

- session, api and crm commands take the template 0.31.0 seeds: manifestVerify, hostsFetch, openAppStore and the
  generated LIVE, which here also names people and companies, whose entities have a search.
- refuseOffline is cli-core's; branches no test could take both ways are gone.
- tests: sync without a sign-in reaches nothing, api show calls nothing.
- the update check's statePath and enabled run only for a terminal in pretty output: excluded from coverage, with why.
- app.attio.com is back in the hosts: Attio's API description names it (OAuth), and lint:commands requires it. A
  request carries the token only to its own host, api.attio.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CI's test matrix found 205 commands and options no test ran. An api test now sends every operation with every
option the spec offers and its body from a file, and --all to the end of each paged list. A CRM test runs every option
of the deals, pipelines, stages, people, organizations, users, fields, changes and search commands on a synced fake
workspace. session list, api list and a sign-in kept in a file are run too. The store maintenance commands mounted by
addCrmCommands are listed with cli-core's tests as the reason, as in hubspot-cli.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour merged commit 566a4c4 into main Nov 18, 2026
16 checks passed
@leemour
leemour deleted the feat/attio-source branch November 18, 2026 18:23
@leemour leemour mentioned this pull request Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant