Repository navigation
feat(crm): a manifest source reads Attio's deal stages, typed own fields and a live people list - #3114
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
attio-cli, the CLI built from
wirecat.config.ts, synced people and companies that nothing read: no deals, nopeople 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:customread nothing.list, sopeople listandorganizations listcould not mount.What
stages.each: ".": the call answers stages; they group bystages.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? }withTYPED_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.searchwith"{query}": a livelist, words throughsearch, none throughlist, paged by offset withwalk. A condition it cannot send is refused (query.unsupported-field). A cursor-paged search is refused at parse time.hooks.extend(base, { call }).crmManifestFakeandcrmManifestProblemsknow 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
crmSourceContractfails 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 anddocs:checkclean.src/crm/manifest/typed-values.test.ts:crmManifestContractover a trimmed Attio API, plus flat stages, grouping, the outcome hook, typed values, live list paging and refusals.people list,organizations list(in progress in attio-cli).🤖 Generated with Claude Code