From b8cd03f0a3979250b9eadf0b331b02ded11986af Mon Sep 17 00:00:00 2001 From: leemour Date: Tue, 24 Nov 2026 03:07:53 +0100 Subject: [PATCH 1/5] feat(core): build on cli-core 1.0 and cli-base 1.0 - Import CatalogEntry, CatalogInput, CatalogQuery, AddedSource, AddedSourceInput, LinkInput and IMPORTED_DOCUMENT_QUERY from @wirecat/cli-core/store/areas; the store entry no longer re-exports them. - Codegen types (ManifestOperation, SchemaNode, SecurityScheme, identifier) come from @wirecat/cli-base/codegen/runtime, cli-base 1.0's stable entry; the generator writes that import too (coreImport). - Mark the Drive inputs that name no local file with notLocalPaths: the of files, comments, permissions, revisions and activities, the [folder] of catalog tree (cli-core marks only catalog's ), and the command path of commands. Serve passes them as written and the MCP path guard skips them; files upload , --output and --body-file stay checked local paths. - Regenerated docs/commands.md and contracts/wirecat.json for cli-core 1.0's files sheets|documents create. - Changelog fragment changes/release-1.0.md. Co-Authored-By: Claude Opus 5.5 --- changes/release-1.0.md | 23 ++++++++++++++++++++ contracts/wirecat.json | 26 +++++++++++++++++++++++ docs/commands.md | 41 ++++++++++++++++++++++++++++++++++++ scripts/generate.ts | 7 ++++-- src/api-contract.ts | 2 +- src/catalog.ts | 2 +- src/commands/catalog.ts | 4 ++++ src/commands/discovery.ts | 5 ++++- src/commands/remote.ts | 12 ++++++----- src/documents-add.ts | 2 +- src/generated/definitions.ts | 2 +- src/generated/manifest.ts | 2 +- src/knowledge.test.ts | 3 ++- src/knowledge.ts | 3 ++- src/model.ts | 2 +- src/schema.ts | 2 +- 16 files changed, 121 insertions(+), 17 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..69d1812 --- /dev/null +++ b/changes/release-1.0.md @@ -0,0 +1,23 @@ +### Changed — may break callers + +- **drive runs on cli-core 1.0 and cli-base 1.0** (cli-core 1.0.0, was 0.735.0; cli-base 1.0.0-rc.0, was 0.132.0). + cli-core 1.0 moves the message store to version 73 the first time it opens it: an id is never handed out twice, + and a JSON column holds valid JSON. After that, only tools on cli-core 1.0 open the store. Watch for: upgrade every + installed WireCat CLI to its 1.0 release first, and stop `serve`, `mcp` and every sync while the store migrates; + the migration writes a rollback copy first and refuses to run without one. See + [cli-core's changelog](https://github.com/WireCatLabs/cli-core/blob/main/CHANGELOG.md). + +### Fixed + +- **Over MCP, a Drive file or folder is passed as the agent wrote it.** The file id or URL of `drive files get`, + `copy`, `move`, `trash`, `download` and `export`, of `drive comments`, `permissions`, `revisions` and + `activities`, the folder of `drive catalog tree`, and the command path of `drive commands` were made absolute + against the client's folder, as if they named a file on this computer. + +### Security + +- **An MCP call cannot name a credential folder, a WireCat tool's folder or the message store.** Every option and + argument that takes a local file or folder (`drive files upload `, `drive files download --output`, + `--body-file` and the rest) is checked by its real path before the call runs, so neither a link nor `..` gets + past. A refused call answers `permission_error` (`access.denied`) with the option in `param`. A run in a terminal + is unchanged. diff --git a/contracts/wirecat.json b/contracts/wirecat.json index e2bb556..f57d4b3 100644 --- a/contracts/wirecat.json +++ b/contracts/wirecat.json @@ -2198,6 +2198,19 @@ }, "permission": "files.sheets.update" }, + { + "path": [ + "files", + "sheets", + "create" + ], + "summary": "create a new workbook from rows of values and formulas", + "effects": { + "remote": "write", + "local": "write" + }, + "permission": "files.sheets.create" + }, { "path": [ "files", @@ -2224,6 +2237,19 @@ }, "permission": "files.documents.update" }, + { + "path": [ + "files", + "documents", + "create" + ], + "summary": "create a new Word document from paragraphs and tables", + "effects": { + "remote": "write", + "local": "write" + }, + "permission": "files.documents.create" + }, { "path": [ "files", diff --git a/docs/commands.md b/docs/commands.md index 40258ea..a7f4cd0 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -3917,6 +3917,27 @@ drive files sheets update [options] **Example:** `drive personal files sheets update FILE_ID "Sheet1!B2:C2" --values '[[120, "paid"]]' --expected-fingerprint 9f86d081…` +#### `drive files sheets create` + +create a new .xlsx on Google Drive from rows from A1: one sheet, or several given as [{name, rows, header?}]. Numbers and booleans are typed, a text stays text, even one that starts with =. A formula is only {"formula": "SUM(B2:B3)"}, computed when the file opens; {"value": "Total", "bold": true} is a bold cell and header: true makes a sheet's first row bold. A file already there is refused: change it with sheets update + +This command can change Google data or send data to the configured model. + +```sh +drive files sheets create [options] +``` + +| Argument | | What it is | +|---|---|---| +| `path` | required | the new .xlsx file on Google Drive. | + +| Option | What it does | +|---|---| +| `--values ` | the rows as JSON, or [{"name", "rows", "header"?}] for several sheets; a cell is a text, number, boolean, null (empty), {"formula": "…", "bold"?} or {"value": …, "bold"?}. | +| `--name ` | the sheet's name when --values is rows; Sheet1 without it. | + +**Example:** `drive personal files sheets create FILE_ID --values '[["Item", "Cost"], ["Rent", 950]]' --name Budget`, `drive personal files sheets create FILE_ID --values '[{"name": "Budget", "header": true, "rows": [["Item", "Cost"], ["Rent", 950], ["Food", 300], [{"value": "Total", "bold": true}, {"formula": "SUM(B2:B3)"}]]}]'` + ### `drive files documents` the paragraphs of a Word document (.docx) on Google Drive, read and changed in place @@ -3956,6 +3977,26 @@ drive files documents update [options] **Example:** `drive personal files documents update FILE_ID --payload '[{"index": 2, "text": "Revenue grew 12%."}]' --expected-fingerprint 9f86d081…` +#### `drive files documents create` + +create a new .docx on Google Drive with these paragraphs, each in a style: Title, Heading1, Heading2, Heading3, Normal, ListBullet (Normal without one; ListBullet is a bullet list), and tables. A paragraph is bold or italic as a whole, or made of runs that each are; a table is rows of cell texts, its first row bold with header: true. A file already there is refused: change it with documents update + +This command can change Google data or send data to the configured model. + +```sh +drive files documents create [options] +``` + +| Argument | | What it is | +|---|---|---| +| `path` | required | the new .docx file on Google Drive. | + +| Option | What it does | +|---|---| +| `--payload ` | the body as JSON, in order: [{text, style?, bold?, italic?}, {runs: [{text, bold?, italic?}], style?}, {table: [[cell, …], …], header?}]. | + +**Example:** `drive personal files documents create FILE_ID --payload '[{"text": "Report", "style": "Title"}, {"text": "Revenue grew 12%."}]'`, `drive personal files documents create FILE_ID --payload '[{"runs": [{"text": "Revenue "}, {"text": "grew 12%", "bold": true}]}, {"table": [["Item", "Cost"], ["Rent", "950"]], "header": true}]'` + ### `drive files history` list what the writes and syncs of this profile replaced in a file, newest last. Each entry's version is the sha256 of the content it replaced, kept on this computer while available is true; files restore puts it back diff --git a/scripts/generate.ts b/scripts/generate.ts index fa88bde..6bbdfac 100644 --- a/scripts/generate.ts +++ b/scripts/generate.ts @@ -12,6 +12,9 @@ import { writeArtifacts, } from "@wirecat/cli-base/codegen" +// The generated files ship in the CLI: the stable runtime entry keeps a generator change from reaching them. +const RUNTIME = "@wirecat/cli-base/codegen/runtime" + const root = resolve(import.meta.dirname, "..") const { model, metadata } = adaptDiscovery(readDiscovery(`${root}/spec/google`), { sourceRevision: "spec/google/provenance.json", @@ -22,8 +25,8 @@ const artifacts = generate( [ typesGenerator({ path: "src/generated/types.ts" }), valibotGenerator({ path: "src/generated/schemas.ts", typesImport: "./types.js" }), - manifestGenerator({ path: "src/generated/manifest.ts" }), - definitionsGenerator({ path: "src/generated/definitions.ts" }), + manifestGenerator({ path: "src/generated/manifest.ts", coreImport: RUNTIME }), + definitionsGenerator({ path: "src/generated/definitions.ts", coreImport: RUNTIME }), coverageGenerator({ path: "docs/dev/API_COVERAGE.md", title: "Google API coverage", diff --git a/src/api-contract.ts b/src/api-contract.ts index 0487bdc..8ce17e5 100644 --- a/src/api-contract.ts +++ b/src/api-contract.ts @@ -1,5 +1,5 @@ import { CliError } from "@wirecat/cli-base" -import type { ManifestOperation } from "@wirecat/cli-base/codegen" +import type { ManifestOperation } from "@wirecat/cli-base/codegen/runtime" import { apiJson, apiPlainJson, checkApiBody, checkApiParameter, parseApiJson } from "@wirecat/cli-core/cli" import { operations } from "./generated/manifest.js" import { schemas } from "./generated/schemas.js" diff --git a/src/catalog.ts b/src/catalog.ts index 28fd3f8..54c28c8 100644 --- a/src/catalog.ts +++ b/src/catalog.ts @@ -1,4 +1,4 @@ -import type { CatalogEntry, CatalogInput, CatalogQuery } from "@wirecat/cli-core/store" +import type { CatalogEntry, CatalogInput, CatalogQuery } from "@wirecat/cli-core/store/areas" import { type FileMetadata, FOLDER } from "./model.js" export const catalogInput = (file: FileMetadata): CatalogInput => ({ diff --git a/src/commands/catalog.ts b/src/commands/catalog.ts index 1878320..8a1f600 100644 --- a/src/commands/catalog.ts +++ b/src/commands/catalog.ts @@ -1,3 +1,4 @@ +import { notLocalPaths } from "@wirecat/cli-core/cli" import { addDocumentCatalogCommands } from "@wirecat/cli-core/documents/cli" import type { Command } from "commander" import { catalogFiles } from "../catalog.js" @@ -52,4 +53,7 @@ export const installCatalogCommands = (program: Command, helpers: Helpers) => { id: fileId, roots: () => activeProfile(env, selected()).roots, }) + // cli-core marks only catalog's ; `catalog tree [folder]` takes a Drive folder too. + const catalog = program.commands.find((command) => command.name() === "catalog") + if (catalog) notLocalPaths(catalog, "folder") } diff --git a/src/commands/discovery.ts b/src/commands/discovery.ts index 34b3096..41e5c3d 100644 --- a/src/commands/discovery.ts +++ b/src/commands/discovery.ts @@ -5,6 +5,7 @@ import { DISCOVERY_DESCRIPTIONS, environmentOf, NO_EFFECTS, + notLocalPaths, sharedCommandTemplate, } from "@wirecat/cli-core/cli" import type { Command } from "commander" @@ -15,7 +16,9 @@ import type { CommandContext } from "./context.js" const installCommandsCommandDefinition = (program: Command, { print, streams }: CommandContext) => { examples( - annotate(program.command("commands"), { effects: NO_EFFECTS }).description(DISCOVERY_DESCRIPTIONS.commands), + notLocalPaths(annotate(program.command("commands"), { effects: NO_EFFECTS }), "path").description( + DISCOVERY_DESCRIPTIONS.commands, + ), ["drive commands", "drive commands files copy --json"], ) .argument("[path...]", "only this command or group, as words") diff --git a/src/commands/remote.ts b/src/commands/remote.ts index cabaedd..399a363 100644 --- a/src/commands/remote.ts +++ b/src/commands/remote.ts @@ -14,6 +14,7 @@ import { LOCAL_READ, listOf, NO_EFFECTS, + notLocalPaths, queryTerms, readApiBody, snakeKeys, @@ -170,7 +171,7 @@ export const installRemoteCommands = (program: Command, helpers: RemoteCommands) api.addCommand(child) } installSheetsCommands(program, helpers) - const files = annotate(program.command("files"), { effects: GOOGLE_READ }).description( + const files = notLocalPaths(annotate(program.command("files"), { effects: GOOGLE_READ }), "file").description( "read and change files in Google Drive; nothing is imported", ) for (const exporting of [false, true]) { @@ -426,9 +427,10 @@ export const installRemoteCommands = (program: Command, helpers: RemoteCommands) .action(async (id: string, args) => output(itemOf(await call("docs.documents.batchUpdate", { documentId: fileId(id) }, args.body))), ) - const activities = annotate(program.command("activities"), { effects: GOOGLE_READ }).description( - "read who did what with a file in Google Drive", - ) + const activities = notLocalPaths( + annotate(program.command("activities"), { effects: GOOGLE_READ }), + "file", + ).description("read who did what with a file in Google Drive") const activityRow = v.looseObject({ timestamp: v.optional(v.string()) }) const activityQuery = unfilteredQuery("drive_remote_activity", activityRow) bindQuery( @@ -460,7 +462,7 @@ export const installRemoteCommands = (program: Command, helpers: RemoteCommands) }) for (const resource of ["comments", "permissions", "revisions"] as const) { const one = resource.slice(0, -1) - const group = annotate(program.command(resource), { effects: GOOGLE_READ }).description( + const group = notLocalPaths(annotate(program.command(resource), { effects: GOOGLE_READ }), "file").description( `read the ${resource} of a file in Google Drive`, ) if (resource === "comments") { diff --git a/src/documents-add.ts b/src/documents-add.ts index f6ae586..e34a3d4 100644 --- a/src/documents-add.ts +++ b/src/documents-add.ts @@ -1,5 +1,5 @@ import { CliError, isCliError } from "@wirecat/cli-base" -import type { AddedSource, AddedSourceInput } from "@wirecat/cli-core/store" +import type { AddedSource, AddedSourceInput } from "@wirecat/cli-core/store/areas" import { activeProfile, fileId, diff --git a/src/generated/definitions.ts b/src/generated/definitions.ts index 43f37a2..a78f0ec 100644 --- a/src/generated/definitions.ts +++ b/src/generated/definitions.ts @@ -2,7 +2,7 @@ // Source: spec/google/*.json, verified by 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> = { DriveOperation: { diff --git a/src/generated/manifest.ts b/src/generated/manifest.ts index 2b791b7..ed5ee5e 100644 --- a/src/generated/manifest.ts +++ b/src/generated/manifest.ts @@ -2,7 +2,7 @@ // Source: spec/google/*.json, verified by provenance.json // Run: pnpm generate -import type { ManifestOperation, SecurityScheme } from "@wirecat/cli-base/codegen" +import type { ManifestOperation, SecurityScheme } from "@wirecat/cli-base/codegen/runtime" export const operations: readonly ManifestOperation[] = [ { diff --git a/src/knowledge.test.ts b/src/knowledge.test.ts index f1aef8a..94db68a 100644 --- a/src/knowledge.test.ts +++ b/src/knowledge.test.ts @@ -1,6 +1,7 @@ import { listQuery } from "@wirecat/cli-core/cli" import { proposalRegistry } from "@wirecat/cli-core/services" -import { IMPORTED_DOCUMENT_QUERY, openStore } from "@wirecat/cli-core/store" +import { openStore } from "@wirecat/cli-core/store" +import { IMPORTED_DOCUMENT_QUERY } from "@wirecat/cli-core/store/areas" import { describe, expect, it } from "vitest" import { openIndex } from "./store.js" import { content, file, fixture } from "./testing.js" diff --git a/src/knowledge.ts b/src/knowledge.ts index 410b1ff..dce1d21 100644 --- a/src/knowledge.ts +++ b/src/knowledge.ts @@ -4,7 +4,8 @@ import { documentKnowledge as sharedKnowledge, } from "@wirecat/cli-core/documents" import { factItem, memoryItem } from "@wirecat/cli-core/documents/cli" -import type { LinkInput, MessageStore, PersonRecord } from "@wirecat/cli-core/store" +import type { MessageStore, PersonRecord } from "@wirecat/cli-core/store" +import type { LinkInput } from "@wirecat/cli-core/store/areas" import type { FileMetadata, GoogleUser } from "./model.js" export interface DocumentKnowledge extends SharedDocumentKnowledge { context(principal: string, ref: string): Promise diff --git a/src/model.ts b/src/model.ts index 57fe556..16e4c71 100644 --- a/src/model.ts +++ b/src/model.ts @@ -11,7 +11,7 @@ import type { SourceWork, } from "@wirecat/cli-core/documents" import type { DocumentHistoryPort } from "@wirecat/cli-core/documents/cli" -import type { AddedSource, AddedSourceInput } from "@wirecat/cli-core/store" +import type { AddedSource, AddedSourceInput } from "@wirecat/cli-core/store/areas" export type { PictureWriter, TabText } from "@wirecat/cli-core/documents" export const FOLDER = "application/vnd.google-apps.folder" diff --git a/src/schema.ts b/src/schema.ts index 5116a36..76a4dea 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -1,4 +1,4 @@ -import { identifier, type SchemaNode } from "@wirecat/cli-base/codegen" +import { identifier, type SchemaNode } from "@wirecat/cli-base/codegen/runtime" import { operationOf } from "./api-contract.js" import { definitions } from "./generated/definitions.js" export const requestSchema = (method: string) => { From 15bb6ea922c0f3bd420bdd385866dc60acf45339 Mon Sep 17 00:00:00 2001 From: leemour Date: Tue, 24 Nov 2026 04:52:42 +0100 Subject: [PATCH 2/5] fix(files): leave out cli-core 1.0's sheets and documents create cli-core 1.0 mounts files sheets create and files documents create unless the CLI passes creates: false. Google Drive names a file by the id it hands out, so a path the user types cannot name a new file, and these commands could not work here. Regenerated docs/commands.md and contracts/wirecat.json without them. Co-Authored-By: Claude Opus 5.5 --- contracts/wirecat.json | 26 -------------------------- docs/commands.md | 41 ----------------------------------------- src/file-edit.test.ts | 7 +++++++ 3 files changed, 7 insertions(+), 67 deletions(-) diff --git a/contracts/wirecat.json b/contracts/wirecat.json index f57d4b3..e2bb556 100644 --- a/contracts/wirecat.json +++ b/contracts/wirecat.json @@ -2198,19 +2198,6 @@ }, "permission": "files.sheets.update" }, - { - "path": [ - "files", - "sheets", - "create" - ], - "summary": "create a new workbook from rows of values and formulas", - "effects": { - "remote": "write", - "local": "write" - }, - "permission": "files.sheets.create" - }, { "path": [ "files", @@ -2237,19 +2224,6 @@ }, "permission": "files.documents.update" }, - { - "path": [ - "files", - "documents", - "create" - ], - "summary": "create a new Word document from paragraphs and tables", - "effects": { - "remote": "write", - "local": "write" - }, - "permission": "files.documents.create" - }, { "path": [ "files", diff --git a/docs/commands.md b/docs/commands.md index a7f4cd0..40258ea 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -3917,27 +3917,6 @@ drive files sheets update [options] **Example:** `drive personal files sheets update FILE_ID "Sheet1!B2:C2" --values '[[120, "paid"]]' --expected-fingerprint 9f86d081…` -#### `drive files sheets create` - -create a new .xlsx on Google Drive from rows from A1: one sheet, or several given as [{name, rows, header?}]. Numbers and booleans are typed, a text stays text, even one that starts with =. A formula is only {"formula": "SUM(B2:B3)"}, computed when the file opens; {"value": "Total", "bold": true} is a bold cell and header: true makes a sheet's first row bold. A file already there is refused: change it with sheets update - -This command can change Google data or send data to the configured model. - -```sh -drive files sheets create [options] -``` - -| Argument | | What it is | -|---|---|---| -| `path` | required | the new .xlsx file on Google Drive. | - -| Option | What it does | -|---|---| -| `--values ` | the rows as JSON, or [{"name", "rows", "header"?}] for several sheets; a cell is a text, number, boolean, null (empty), {"formula": "…", "bold"?} or {"value": …, "bold"?}. | -| `--name ` | the sheet's name when --values is rows; Sheet1 without it. | - -**Example:** `drive personal files sheets create FILE_ID --values '[["Item", "Cost"], ["Rent", 950]]' --name Budget`, `drive personal files sheets create FILE_ID --values '[{"name": "Budget", "header": true, "rows": [["Item", "Cost"], ["Rent", 950], ["Food", 300], [{"value": "Total", "bold": true}, {"formula": "SUM(B2:B3)"}]]}]'` - ### `drive files documents` the paragraphs of a Word document (.docx) on Google Drive, read and changed in place @@ -3977,26 +3956,6 @@ drive files documents update [options] **Example:** `drive personal files documents update FILE_ID --payload '[{"index": 2, "text": "Revenue grew 12%."}]' --expected-fingerprint 9f86d081…` -#### `drive files documents create` - -create a new .docx on Google Drive with these paragraphs, each in a style: Title, Heading1, Heading2, Heading3, Normal, ListBullet (Normal without one; ListBullet is a bullet list), and tables. A paragraph is bold or italic as a whole, or made of runs that each are; a table is rows of cell texts, its first row bold with header: true. A file already there is refused: change it with documents update - -This command can change Google data or send data to the configured model. - -```sh -drive files documents create [options] -``` - -| Argument | | What it is | -|---|---|---| -| `path` | required | the new .docx file on Google Drive. | - -| Option | What it does | -|---|---| -| `--payload ` | the body as JSON, in order: [{text, style?, bold?, italic?}, {runs: [{text, bold?, italic?}], style?}, {table: [[cell, …], …], header?}]. | - -**Example:** `drive personal files documents create FILE_ID --payload '[{"text": "Report", "style": "Title"}, {"text": "Revenue grew 12%."}]'`, `drive personal files documents create FILE_ID --payload '[{"runs": [{"text": "Revenue "}, {"text": "grew 12%", "bold": true}]}, {"table": [["Item", "Cost"], ["Rent", "950"]], "header": true}]'` - ### `drive files history` list what the writes and syncs of this profile replaced in a file, newest last. Each entry's version is the sha256 of the content it replaced, kept on this computer while available is true; files restore puts it back diff --git a/src/file-edit.test.ts b/src/file-edit.test.ts index 223c2bc..a69ff42 100644 --- a/src/file-edit.test.ts +++ b/src/file-edit.test.ts @@ -362,4 +362,11 @@ describe("the MCP catalogue", () => { "files history": false, }) }) + + it("offers no sheets or documents create: Google Drive names a new file by the id it gives", () => { + const tools = toolsFromCommands(describeProgram(commandTree()), { includeUnavailable: true, exclude: [["mcp"]] }) + const paths = tools.map((tool) => tool.path.join(" ")) + expect(paths).not.toContain("files sheets create") + expect(paths).not.toContain("files documents create") + }) }) From c890aa0d82fe6382c343b64db7f9cca957c997c5 Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 25 Nov 2026 04:35:01 +0100 Subject: [PATCH 3/5] build(deps): move to the published cli-core 1.0.0-rc.0 and cli-base 1.0.0-rc.1 release/1.0 was built against a packed cli-core 1.0 tarball and still named cli-core 0.735.0 and cli-base 1.0.0-rc.0, so its own CI installed the wrong packages. Pin the release candidates now on npm under the `next` tag. cli-base rc.1 makes `@wirecat/cli-base/codegen/runtime` the default `coreImport` of the code generator, so scripts/generate.ts no longer passes it; `pnpm generate:check` reports the generated files unchanged. The changelog fragment names cli-base 1.0.0-rc.1. Co-Authored-By: Claude Opus 5.5 --- changes/release-1.0.md | 2 +- scripts/generate.ts | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/changes/release-1.0.md b/changes/release-1.0.md index 69d1812..4b5f248 100644 --- a/changes/release-1.0.md +++ b/changes/release-1.0.md @@ -1,6 +1,6 @@ ### Changed — may break callers -- **drive runs on cli-core 1.0 and cli-base 1.0** (cli-core 1.0.0, was 0.735.0; cli-base 1.0.0-rc.0, was 0.132.0). +- **drive runs on cli-core 1.0 and cli-base 1.0** (cli-core 1.0.0, was 0.735.0; cli-base 1.0.0-rc.1, was 0.132.0). cli-core 1.0 moves the message store to version 73 the first time it opens it: an id is never handed out twice, and a JSON column holds valid JSON. After that, only tools on cli-core 1.0 open the store. Watch for: upgrade every installed WireCat CLI to its 1.0 release first, and stop `serve`, `mcp` and every sync while the store migrates; diff --git a/scripts/generate.ts b/scripts/generate.ts index 6bbdfac..fa88bde 100644 --- a/scripts/generate.ts +++ b/scripts/generate.ts @@ -12,9 +12,6 @@ import { writeArtifacts, } from "@wirecat/cli-base/codegen" -// The generated files ship in the CLI: the stable runtime entry keeps a generator change from reaching them. -const RUNTIME = "@wirecat/cli-base/codegen/runtime" - const root = resolve(import.meta.dirname, "..") const { model, metadata } = adaptDiscovery(readDiscovery(`${root}/spec/google`), { sourceRevision: "spec/google/provenance.json", @@ -25,8 +22,8 @@ const artifacts = generate( [ typesGenerator({ path: "src/generated/types.ts" }), valibotGenerator({ path: "src/generated/schemas.ts", typesImport: "./types.js" }), - manifestGenerator({ path: "src/generated/manifest.ts", coreImport: RUNTIME }), - definitionsGenerator({ path: "src/generated/definitions.ts", coreImport: RUNTIME }), + manifestGenerator({ path: "src/generated/manifest.ts" }), + definitionsGenerator({ path: "src/generated/definitions.ts" }), coverageGenerator({ path: "docs/dev/API_COVERAGE.md", title: "Google API coverage", From 96c46098d5c516e71379823d1cb6acf7e18b6818 Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 25 Nov 2026 11:46:04 +0100 Subject: [PATCH 4/5] build(deps): move to the final cli-core 1.0.0 and cli-base 1.0.0 Pins @wirecat/cli-core and @wirecat/cli-base to 1.0.0, the final releases that replace 1.0.0-rc.0 and 1.0.0-rc.1. The branch is rebased on main, so the "was" version in the changelog fragment now names main's cli-core 0.750.0, and the fragment names cli-base 1.0.0 instead of the rc. Co-Authored-By: Claude Opus 5.5 --- changes/release-1.0.md | 2 +- package.json | 4 ++-- pnpm-lock.yaml | 32 ++++++++++++++++---------------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/changes/release-1.0.md b/changes/release-1.0.md index 4b5f248..a1d9ff9 100644 --- a/changes/release-1.0.md +++ b/changes/release-1.0.md @@ -1,6 +1,6 @@ ### Changed — may break callers -- **drive runs on cli-core 1.0 and cli-base 1.0** (cli-core 1.0.0, was 0.735.0; cli-base 1.0.0-rc.1, was 0.132.0). +- **drive runs on cli-core 1.0 and cli-base 1.0** (cli-core 1.0.0, was 0.750.0; cli-base 1.0.0, was 0.132.0). cli-core 1.0 moves the message store to version 73 the first time it opens it: an id is never handed out twice, and a JSON column holds valid JSON. After that, only tools on cli-core 1.0 open the store. Watch for: upgrade every installed WireCat CLI to its 1.0 release first, and stop `serve`, `mcp` and every sync while the store migrates; diff --git a/package.json b/package.json index 31ae409..35fd518 100644 --- a/package.json +++ b/package.json @@ -68,8 +68,8 @@ "@googleapis/drive": "27.0.0", "@googleapis/driveactivity": "11.0.1", "@googleapis/sheets": "18.1.1", - "@wirecat/cli-base": "0.132.0", - "@wirecat/cli-core": "0.750.0", + "@wirecat/cli-base": "1.0.0", + "@wirecat/cli-core": "1.0.0", "commander": "15.0.0", "google-auth-library": "11.3.1", "mammoth": "1.13.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 34b97f7..36d1678 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,11 +25,11 @@ importers: specifier: 18.1.1 version: 18.1.1 '@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.750.0 - version: 0.750.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 @@ -1213,16 +1213,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 @@ -1241,14 +1241,14 @@ packages: '@wirecat/cli-core-sqlite@1.1.0': resolution: {integrity: sha512-GpGlh/dAIX/nblBYCdT6DfWSLFxav9mxxeELQAfEuw+QZdT9unKxbi5xa02s/s4JS1P7n0PQx2sCABj4FlMRNw==} - '@wirecat/cli-core@0.750.0': - resolution: {integrity: sha512-9xUOyRg8cAmb64EJ37thM6AbNNy3xbgVRMhCjTjKU9xN0osUWO1euXB8IN+qmgn1W7aQU2tuXP4XcsuJUY2Evw==} + '@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 @@ -3533,7 +3533,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 @@ -3554,7 +3554,7 @@ snapshots: '@wirecat/cli-core-sqlite@1.1.0': {} - '@wirecat/cli-core@0.750.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) @@ -3564,7 +3564,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 From eec88e5d744836f26354174ecf25268951881923 Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 25 Nov 2026 11:56:01 +0100 Subject: [PATCH 5/5] docs(changelog): cli-core 1.0.0 moves the store to version 74, not the rc's 73 The final cli-core 1.0.0 adds sender bots at store version 74; the fragment still named the rc's 73. Co-Authored-By: Claude Opus 5.5 --- changes/release-1.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes/release-1.0.md b/changes/release-1.0.md index a1d9ff9..ab238c0 100644 --- a/changes/release-1.0.md +++ b/changes/release-1.0.md @@ -1,7 +1,7 @@ ### Changed — may break callers - **drive runs on cli-core 1.0 and cli-base 1.0** (cli-core 1.0.0, was 0.750.0; cli-base 1.0.0, was 0.132.0). - cli-core 1.0 moves the message store to version 73 the first time it opens it: an id is never handed out twice, + cli-core 1.0 moves the message store to version 74 the first time it opens it: an id is never handed out twice, and a JSON column holds valid JSON. After that, only tools on cli-core 1.0 open the store. Watch for: upgrade every installed WireCat CLI to its 1.0 release first, and stop `serve`, `mcp` and every sync while the store migrates; the migration writes a rollback copy first and refuses to run without one. See