Skip to content

feat(crm): a manifest source reads Attio's deal stages, typed own fields and a live people list - #3114

Merged
leemour merged 3 commits into
mainfrom
feat/manifest-attio-deals
Nov 18, 2026
Merged

leemour merged 3 commits into
mainfrom
feat/manifest-attio-deals

Conversation

@leemour

@leemour leemour commented Nov 18, 2026

Copy link
Copy Markdown
Member

Task

attio-cli, the CLI built from wirecat.config.ts, synced people and companies that nothing read: no deals, no people list, no own fields. The owner asked for it to work as bitrix24-cli does: deals in the copy, contacts and companies read live.

Why

Three gaps of the source manifest, decided by the coordinator as A (cli-private source-manifest.md, NEED-2728 and NEED-2729), plus a live list:

  • FIND-2755. Attio answers its deal pipeline as a flat list of stage statuses, and a lost stage has only its title to tell it.
  • FIND-2756. Attio keeps each attribute as a list of typed entries with their history, so custom read nothing.
  • FIND-2766. A manifest source had no live list, so people list and organizations list could not mount.

What

  • stages.each: ".": the call answers stages; they group by stages.pipeline, or are one pipeline. hooks.pipelines.<kind>.outcome(stage, pipeline, found) for what the data cannot say. An outcome path matches a boolean too.
  • custom.typed: { by, current?, paths? } with TYPED_VALUE_PATHS (Attio's types); a multiple field is always a list. fields.keep: { path, is } as data, so a config file (JSON, no functions) can say it.
  • entities.person|organization.search with "{query}": a live list, words through search, none through list, paged by offset with walk. A condition it cannot send is refused (query.unsupported-field). A cursor-paged search is refused at parse time.
  • hooks.extend(base, { call }).
  • crmManifestFake and crmManifestProblems know flat stages and searches.

Watch for: a live list ends only on an empty page, so a short result costs one request more. That follows the rule that a short page is not the last one: a service may cap its pages, and crmSourceContract fails otherwise.

Reviewed by a fresh agent: BUG-1 (cursor-paged search), RISK-2 (fake routing), RISK-3 (flag type) and FIND-1 (multi-select) are fixed in the second commit. RISK-1 (the extra request) is kept on purpose, as above.

Testing

  • vitest run src/crm src/manifest src/cli/service-api: 513 passed; tsc, lint and docs:check clean.
  • New src/crm/manifest/typed-values.test.ts: crmManifestContract over a trimmed Attio API, plus flat stages, grouping, the outcome hook, typed values, live list paging and refusals.
  • attio-cli on this branch's pack: sync of deals with stages and own fields, people list, organizations list (in progress in attio-cli).

🤖 Generated with Claude Code

leemour and others added 2 commits November 18, 2026 14:36
…lds and a live people list

A pipeline call may answer the stages themselves (stages.each ".", grouped by stages.pipeline or one pipeline),
and hooks.pipelines.<kind>.outcome decides what the data cannot say. custom.typed reads the account's own fields
from typed entries with their history; fields.keep takes { path, is } as data. entities.person|organization.search
gives the source a live list for people list and organizations list. extend gets the service's call.

The Attio pilot needs all four to work as bitrix24-cli does: deals in the copy, contacts and companies read live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ield is always a list, the fake routes a search by its words

A search paged by cursor read one service page and sliced it, so people list showed a short page and no more; the
manifest now refuses it. A multi-select with one current entry came back as a value, not a list. The fake counted
page parameters when it chose between a list and a search on the same operation, and wrote a stage's flag only as a
boolean. A short page still does not end a live list: a service may cap its pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alue it writes

Attio's attribute value is text in one branch of its union and a flag in another; the fake sampled the first branch
and wrote a stage's won flag as text, which its strict check then refused. A branch now fits when the path exists and
takes the value, and a flag whose place the walk cannot name stays a flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour merged commit 270d8da into main Nov 18, 2026
43 checks passed
@leemour
leemour deleted the feat/manifest-attio-deals branch November 18, 2026 14:23
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