From 7130190074de33f6948550c7c7e104ad3ff1ab0c Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 25 Nov 2026 11:47:25 +0100 Subject: [PATCH] feat!: adopt cli-core 1.0 and cli-base 1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit attio moves from the 1.0 release candidates to the final releases: @wirecat/cli-core 1.0.0 and @wirecat/cli-base 1.0.0, pinned exactly. The release/1.0 branch is squashed onto the current main (notes and tasks, the 0.6.0 command reference, the actions bump), so the PR merges cleanly. package.json and the lockfile take main's and then the 1.0.0 pins; the test matrix keeps main's rows plus the two this branch adds (sync --allow-deletions, store migrate --no-backup). The changelog fragment now names 1.0.0 and stays under "Changed — may break callers": the store moves to version 73 and only cli-core 1.0 tools open it. Checked locally: typecheck, lint, generate:check, docs:check, peers check, one-cli-base and the family audit (0 new findings that block). Co-Authored-By: Claude Opus 5.5 --- changes/release-1.0.md | 11 +++++++++++ docs/commands.md | 7 ++++++- docs/dev/test-matrix.md | 4 +++- package.json | 4 ++-- pnpm-lock.yaml | 32 ++++++++++++++++---------------- src/crm-options.test.ts | 1 + src/generated/definitions.ts | 2 +- src/generated/manifest.ts | 7 ++++++- 8 files changed, 46 insertions(+), 22 deletions(-) create mode 100644 changes/release-1.0.md diff --git a/changes/release-1.0.md b/changes/release-1.0.md new file mode 100644 index 0000000..feb7236 --- /dev/null +++ b/changes/release-1.0.md @@ -0,0 +1,11 @@ +### Changed — may break callers + +- **attio is built on cli-core 1.0.0 and cli-base 1.0.0.** After its first run the store is at version 73, and only + tools on cli-core 1.0 open it: upgrade every WireCat CLI on this computer together. The migration keeps a rollback + copy, and refuses to run when it cannot write one (`store migrate --no-backup` migrates anyway). +- **`sync --rescan` no longer lets a sync mark most of a kind deleted.** It only lists everything again. When the + guard holds a pass, `sync --allow-deletions ` lets it mark at most that many records deleted. The flag is + for the owner in a terminal; the MCP server does not offer it. +- **A sync no longer marks records deleted when Attio could not list a whole kind.** The id pass is held until a + full list comes back. +- **An MCP call that names a refused folder answers `permission_error`**, not `validation_error`. diff --git a/docs/commands.md b/docs/commands.md index 156b544..c05d0c1 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -1994,6 +1994,7 @@ attio sync [options] | Option | What it does | |---|---| | `--rescan` | list everything again, every id too, dropping a round in progress. | +| `--allow-deletions ` | let this run mark deleted up to this many of what its full list no longer has, when the guard holds it. | | `--max-pages ` | at most this many requests to the CRM in this run. | | `--embed` | also index new activities and tasks for search all by meaning, with a model already downloaded. | @@ -2066,9 +2067,13 @@ bring the store up to this build's schema, then normalize, index and stem the me **Changes something on this computer only.** ```sh -attio store migrate +attio store migrate [options] ``` +| Option | What it does | +|---|---| +| `--no-backup` | migrate even when no rollback copy can be written; older tools then cannot open the store again. | + **Returns:** store migration — path, exists, from, to, normalized, indexed, terms, stemmed, and 1 more; every field: attio commands info store migrate **Example:** `attio work store migrate` diff --git a/docs/dev/test-matrix.md b/docs/dev/test-matrix.md index 4c5c30d..2b10f6f 100644 --- a/docs/dev/test-matrix.md +++ b/docs/dev/test-matrix.md @@ -7,7 +7,7 @@ ran it · ⛔ not tested offline, with the reason and where it is checked instea Measured from the test run (`coverage/argv.jsonl`), not searched for — see [TESTING.md](TESTING.md) for how, and for the states and failures that cut across commands. -**598 ✅ · 64 ⛔ · 0 ❌** — 189 commands, 473 options. +**599 ✅ · 65 ⛔ · 0 ❌** — 189 commands, 475 options. | Command | Option | | Note | |---|---|---|---| @@ -456,6 +456,7 @@ Measured from the test run (`coverage/argv.jsonl`), not searched for — see | `api self-list` | | ✅ | | | `sync` | | ✅ | | | `sync` | `--rescan` | ✅ | | +| `sync` | `--allow-deletions` | ✅ | | | `sync` | `--max-pages` | ✅ | | | `sync` | `--embed` | ⛔ | cli-core's CRM sync embeds activities; its src/crm/cli/activity-meaning.test.ts drives sync --embed and search all by meaning on a CRM program with the small test model, and a test here would need a model on disk | | `store status` | | ✅ | | @@ -464,6 +465,7 @@ Measured from the test run (`coverage/argv.jsonl`), not searched for — see | `store info` | | ⛔ | cli-core's addStoreMaintenanceCommands, mounted by addCrmCommands; its store and src/crm/cli/store-file tests drive them on a CRM program | | `store check` | | ⛔ | cli-core's addStoreMaintenanceCommands, mounted by addCrmCommands; its store and src/crm/cli/store-file tests drive them on a CRM program | | `store migrate` | | ⛔ | cli-core's addStoreMaintenanceCommands, mounted by addCrmCommands; its store and src/crm/cli/store-file tests drive them on a CRM program | +| `store migrate` | `--no-backup` | ⛔ | cli-core's addStoreMaintenanceCommands, mounted by addCrmCommands; its store and src/crm/cli/store-file tests drive them on a CRM program | | `store rebuild` | | ⛔ | cli-core's addStoreMaintenanceCommands, mounted by addCrmCommands; its store and src/crm/cli/store-file tests drive them on a CRM program | | `store backup` | | ⛔ | cli-core's addStoreMaintenanceCommands, mounted by addCrmCommands; its store and src/crm/cli/store-file tests drive them on a CRM program | | `store backup` | `--encrypt` | ⛔ | cli-core's addStoreMaintenanceCommands, mounted by addCrmCommands; its store and src/crm/cli/store-file tests drive them on a CRM program | diff --git a/package.json b/package.json index 177f050..e3b484c 100644 --- a/package.json +++ b/package.json @@ -61,8 +61,8 @@ "source:check": "node --experimental-strip-types scripts/source-check.ts" }, "dependencies": { - "@wirecat/cli-base": "0.132.0", - "@wirecat/cli-core": "0.753.0", + "@wirecat/cli-base": "1.0.0", + "@wirecat/cli-core": "1.0.0", "commander": "15.0.0", "valibot": "1.5.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4bfcce3..fddd125 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,11 +13,11 @@ importers: .: dependencies: '@wirecat/cli-base': - specifier: 0.132.0 - version: 0.132.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) + specifier: 1.0.0 + version: 1.0.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) '@wirecat/cli-core': - specifier: 0.753.0 - version: 0.753.0(@wirecat/cli-base@0.132.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5))(commander@15.0.0)(typescript@7.0.2)(zod@4.6.7) + specifier: 1.0.0 + version: 1.0.0(@wirecat/cli-base@1.0.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5))(commander@15.0.0)(typescript@7.0.2)(zod@4.6.7) commander: specifier: 15.0.0 version: 15.0.0 @@ -1188,16 +1188,16 @@ packages: '@wasm-audio-decoders/opus-ml@0.0.3': resolution: {integrity: sha512-SEeTmk0eb3q5etJA/NHCRWW6BivTx9tqvNTmG0kg2ynuATEQRUZnwQE6Ibvl1BBvqIGHqI57+qyJMWmJBwb5XQ==} - '@wirecat/cli-base@0.132.0': - resolution: {integrity: sha512-y43hIGVFDUgVFTksTFnlK0KdLuROBDcv0smqme4/WSjkUS3PaGQnuAvu09G2VvW0zmvM2+OHFuQaZEN3Hir8nQ==} - engines: {node: '>=22'} + '@wirecat/cli-base@1.0.0': + resolution: {integrity: sha512-PJ61d6z0CsWOmoWgf7uvlEo3EstpL2DplXiORPIqgmh0bn/ZGMOhRpDqN43Kh7WickaFSmeX74YQigHXkRO6rA==} + engines: {node: ^22.16.0 || >=24} hasBin: true peerDependencies: '@scalar/openapi-upgrader': ^0.4.6 - commander: '>=15' + commander: ^15.0.0 esbuild: ^0.28.0 swagger-converter: ^2.1.0 - vitest: '>=5' + vitest: ^5.0.0 peerDependenciesMeta: '@scalar/openapi-upgrader': optional: true @@ -1216,14 +1216,14 @@ packages: '@wirecat/cli-core-sqlite@1.1.0': resolution: {integrity: sha512-GpGlh/dAIX/nblBYCdT6DfWSLFxav9mxxeELQAfEuw+QZdT9unKxbi5xa02s/s4JS1P7n0PQx2sCABj4FlMRNw==} - '@wirecat/cli-core@0.753.0': - resolution: {integrity: sha512-jW9Sc/eDgRTmFvP+8Mc7+lyqwtuVZwphKkfCGi9H6t6RvBzfQOOIrSVN3lyVD21mChTGtOrRFRoWHQkPfI+UgQ==} + '@wirecat/cli-core@1.0.0': + resolution: {integrity: sha512-0avQTqu3FAFKE0s+8Pz1Up/TMHTYqCdDn37lcZmkH30sMCMrgJwHzoG4Q0fjVzPsB85u+zBVHHhtQjF/eSTpuw==} engines: {node: ^22.16.0 || >=24} hasBin: true peerDependencies: '@napi-rs/canvas': '>=0.1.69 <2' - '@wirecat/cli-base': '>=0.125.0 <1.0.0' - commander: '>=15' + '@wirecat/cli-base': ^1.0.0-0 + commander: ^15.0.0 mysql2: ^3.24.6 pg: ^8.23.1 ssh2: ^1.17.0 @@ -3346,7 +3346,7 @@ snapshots: dependencies: '@wasm-audio-decoders/common': 9.0.7 - '@wirecat/cli-base@0.132.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5)': + '@wirecat/cli-base@1.0.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5)': dependencies: '@valibot/to-json-schema': 1.8.0(valibot@1.5.0(typescript@7.0.2)) cli-table3: 0.6.5 @@ -3367,7 +3367,7 @@ snapshots: '@wirecat/cli-core-sqlite@1.1.0': {} - '@wirecat/cli-core@0.753.0(@wirecat/cli-base@0.132.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5))(commander@15.0.0)(typescript@7.0.2)(zod@4.6.7)': + '@wirecat/cli-core@1.0.0(@wirecat/cli-base@1.0.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5))(commander@15.0.0)(typescript@7.0.2)(zod@4.6.7)': dependencies: '@anthropic-ai/sdk': 1.3.0(zod@4.6.7) '@bomb.sh/tab': 0.0.22(commander@15.0.0) @@ -3377,7 +3377,7 @@ snapshots: '@valibot/to-json-schema': 1.8.0(valibot@1.5.0(typescript@7.0.2)) '@wasm-audio-decoders/flac': 0.2.11 '@wasm-audio-decoders/ogg-vorbis': 0.1.20 - '@wirecat/cli-base': 0.132.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) + '@wirecat/cli-base': 1.0.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) '@wirecat/cli-core-onnx': 1.2.0 '@wirecat/cli-core-sqlite': 1.1.0 '@xmldom/xmldom': 0.9.12 diff --git a/src/crm-options.test.ts b/src/crm-options.test.ts index 5d7eed7..975c13f 100644 --- a/src/crm-options.test.ts +++ b/src/crm-options.test.ts @@ -56,6 +56,7 @@ it("every option of the CRM commands runs against the fake workspace", async () ["changes", "list", "--format", "csv"], ["search", "all", "name", "--only", "crm", "--limit", "5", "--page", "1", "--exact", "--timezone", "UTC"], ["search", "all", "name", "--source", "attio"], + ["sync", "--allow-deletions", "5"], ]) { const answer = await ran(argv) expect(answer.code, `${argv.join(" ")}: ${answer.err}`).toBe(0) diff --git a/src/generated/definitions.ts b/src/generated/definitions.ts index e74a693..5271b59 100644 --- a/src/generated/definitions.ts +++ b/src/generated/definitions.ts @@ -2,7 +2,7 @@ // Source: spec/attio/, checked against provenance.json // Run: pnpm generate -import type { SchemaNode } from "@wirecat/cli-base/codegen" +import type { SchemaNode } from "@wirecat/cli-base/codegen/runtime" export const definitions: Readonly> = { Status: { diff --git a/src/generated/manifest.ts b/src/generated/manifest.ts index a2869be..2123e84 100644 --- a/src/generated/manifest.ts +++ b/src/generated/manifest.ts @@ -2,7 +2,12 @@ // Source: spec/attio/, checked against provenance.json // Run: pnpm generate -import type { ApiServer, ManifestOperation, SecurityRequirement, SecurityScheme } from "@wirecat/cli-base/codegen" +import type { + ApiServer, + ManifestOperation, + SecurityRequirement, + SecurityScheme, +} from "@wirecat/cli-base/codegen/runtime" export const operations: readonly ManifestOperation[] = [ {