From bd104ca3d0f97ed7325d7d1beb2f278857af6bfe Mon Sep 17 00:00:00 2001 From: leemour Date: Tue, 24 Nov 2026 03:07:59 +0100 Subject: [PATCH 1/6] feat(core): build on cli-core 1.0 and cli-base 1.0 - Codegen types (ManifestOperation, SchemaNode, identifier) come from @wirecat/cli-base/codegen/runtime, cli-base 1.0's stable entry; the generator writes that import too (coreImport). Regenerating also adds the Responses map cli-base's generator writes since 0.109. - Drop the wcat-bin-name lint override: cli-base 0.127 no longer warns on a short bin beside wcat-gcal, and cli-dev lint fails on a stale override. - sync --allow-deletions (from cli-core 1.0): a test that a full list coming back empty is held, and the flag lets it through. The fake Google Calendar can now empty its calendars. - Regenerated docs/commands.md and contracts/wirecat.json. - Changelog fragment changes/release-1.0.md. Co-Authored-By: Claude Opus 5.5 --- changes/release-1.0.md | 28 +++ contracts/wirecat.json | 42 +++- docs/commands.md | 9 +- lint/overrides.json | 7 - scripts/generate.ts | 9 +- src/api-contract.ts | 2 +- src/calendar.test.ts | 13 ++ src/generated/definitions.ts | 2 +- src/generated/manifest.ts | 352 ++++++++++++++++++++++++++++++++- src/generated/meet/manifest.ts | 98 ++++++++- src/generated/meet/types.ts | 14 ++ src/generated/types.ts | 37 ++++ src/schema.ts | 2 +- src/testing/google-calendar.ts | 7 +- 14 files changed, 600 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..de55f34 --- /dev/null +++ b/changes/release-1.0.md @@ -0,0 +1,28 @@ +### Added + +- **`gcal sync --allow-deletions `** lets a held round mark up to that many events deleted. A full + round is now held when it would mark most of a calendar deleted: an empty list, or more than half of ten or more + stored events. The round still ends, and `held` says why. `--rescan` lists everything again but does not lift the + hold. The flag is the owner's: an MCP server does not offer it. + +### Changed — may break callers + +- **gcal runs on cli-core 1.0 and cli-base 1.0** (cli-core 1.0.0, was 0.691.0; cli-base 1.0.0-rc.0, was 0.109.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 + +- **A calendar round no longer stalls on a series deleted between its listing and its slots call**, and an ICS feed + event that stops parsing is no longer marked deleted: the feed still holds it. + +### 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 (`gcal events import `, `gcal events export --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 cafac65..e75d5eb 100644 --- a/contracts/wirecat.json +++ b/contracts/wirecat.json @@ -1282,7 +1282,7 @@ "schedule", "command" ], - "summary": "run gcal on a timer — reads save what they read, so this is how a…", + "summary": "run gcal on a timer — reads save what they read, so this is how the…", "effects": { "remote": "none", "local": "write" @@ -1695,6 +1695,44 @@ "app": "gcal-cli", "env": "GCAL" }, - "settings": null + "settings": null, + "accountRemove": { + "signOut": [ + "{profile}", + "session", + "end", + "--record", + "--json" + ], + "remove": { + "minVersion": "0.0.0", + "keepData": [ + "{profile}", + "account", + "remove", + "--keep-data", + "--record", + "--json" + ], + "deleteData": [ + "{profile}", + "account", + "remove", + "--delete-data", + "--record", + "--json" + ], + "dryRun": "--dry-run", + "confirm": "--yes" + }, + "removes": [ + "signIn" + ], + "keeps": [ + "settings", + "data", + "listed" + ] + } } } diff --git a/docs/commands.md b/docs/commands.md index 3a9fc09..c54ee3f 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -268,6 +268,7 @@ gcal sync [options] | Option | What it does | |---|---| | `--rescan` | list every synced calendar's window again, 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 provider in this run; as many as fit the deadline if not given. | | `--embed` | also index new events for meaning search, with a model already downloaded. | @@ -592,7 +593,7 @@ gcal search all [options] | `--exact` | bare words and quotes match their exact form only, as exact:word does. | | `--timezone ` | the IANA timezone for calendar date boundaries. | -**Returns:** hit — kind, ref, provider, account, title, timestamp, excerpt, url, and 18 more; every field: gcal commands info search all +**Returns:** hit — kind, ref, provider, account, title, timestamp, excerpt, url, and 19 more; every field: gcal commands info search all **Example:** `gcal personal search all roadmap`, `gcal personal search all "quarterly review" --source telegram,gcal --json` @@ -2274,7 +2275,7 @@ run a gcal command or an agent later or on a timer (systemd, launchd, Task Sched ### `gcal schedule command` -run gcal on a timer — reads save what they read, so this is how a chat's history fills the store +run gcal on a timer — reads save what they read, so this is how the store stays current **Changes something on this computer only.** @@ -2285,7 +2286,7 @@ gcal schedule command [options] | Argument | | What it is | |---|---|---| | `name` | required | lowercase letters, digits and dashes. | -| `args` | required | the gcal command after its name, e.g. -- messages list --limit 50. | +| `args` | required | the gcal command after its name, e.g. -- doctor. | | Option | What it does | |---|---| @@ -2311,7 +2312,7 @@ gcal schedule agent [options] |---|---|---| | `name` | required | lowercase letters, digits and dashes. | | `harness` | required | the agent to start. One of: `claude`, `codex`, `gemini`, `cursor`, `opencode`, `openclaw`, `hermes`, `grok`, `kimi`. | -| `prompt` | required | what to do, e.g. "summarize what came in during the last day: gcal personal search messages 'date>1d' --newest --limit 20". | +| `prompt` | required | what to do, e.g. "say what needs attention in this installation: gcal doctor". | | Option | What it does | |---|---| diff --git a/lint/overrides.json b/lint/overrides.json index 3cf8e7e..6ba9aa1 100644 --- a/lint/overrides.json +++ b/lint/overrides.json @@ -1,11 +1,4 @@ [ - { - "rule": "wcat-bin-name", - "target": "package.json \"bin\" gcal", - "reason": "Keeps the short gcal command beside wcat-gcal, as mail does: dropping it would break every script and agent setup that types gcal. Owner decision of 2026-11-02 (docs/dev/DESIGN.md, Command names).", - "owner": "@WireCatLabs", - "review_after": "2027-02-01" - }, { "rule": "undeclared-host", "target": "developers.google.com", diff --git a/scripts/generate.ts b/scripts/generate.ts index 564692b..1e21551 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 webhook = "needs a public HTTPS address to receive Google's notifications, which a local CLI does not have" const { calendar, meet } = readDiscovery(`${root}/spec/google`) @@ -109,8 +112,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 Calendar API coverage", @@ -143,7 +146,7 @@ artifacts.push( [ typesGenerator({ path: "src/generated/meet/types.ts" }), valibotGenerator({ path: "src/generated/meet/schemas.ts", typesImport: "./types.js" }), - manifestGenerator({ path: "src/generated/meet/manifest.ts" }), + manifestGenerator({ path: "src/generated/meet/manifest.ts", coreImport: RUNTIME }), ], { banner }, ), diff --git a/src/api-contract.ts b/src/api-contract.ts index b8ad45a..0e35111 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 type * as v from "valibot" import { operations } from "./generated/manifest.js" diff --git a/src/calendar.test.ts b/src/calendar.test.ts index efb26b6..fb45ffd 100644 --- a/src/calendar.test.ts +++ b/src/calendar.test.ts @@ -346,6 +346,19 @@ describe("calendar commands over Google", () => { expect(lists(google.requests).every(({ query }) => !query.has("syncToken") && query.has("timeMin"))).toBe(true) }) + it("a full list that comes back empty is held, and --allow-deletions lets it through", async () => { + const { json, google } = harness() + await json("personal", "sync") + const stored = (await json("personal", "events", "list", "--limit", "1000")).items.length + expect(stored).toBeGreaterThan(0) + google.emptyCalendars() + const held = await json("personal", "sync", "--rescan") + expect(JSON.stringify(held.item)).toMatch(/sync --allow-deletions \d+/) + expect((await json("personal", "events", "list", "--limit", "1000")).items).toHaveLength(stored) + await json("personal", "sync", "--rescan", "--allow-deletions", "1000") + expect((await json("personal", "events", "list", "--limit", "1000")).items).toHaveLength(0) + }) + it("search finds a synced event by its words", async () => { const { json } = harness() await json("personal", "sync") diff --git a/src/generated/definitions.ts b/src/generated/definitions.ts index 8e3fc4d..d885629 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> = { CalendarLabelProperties: { diff --git a/src/generated/manifest.ts b/src/generated/manifest.ts index c869501..64426a6 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 } from "@wirecat/cli-base/codegen" +import type { ManifestOperation, SecurityScheme } from "@wirecat/cli-base/codegen/runtime" export const operations: readonly ManifestOperation[] = [ { @@ -17,6 +17,11 @@ export const operations: readonly ManifestOperation[] = [ summary: "Deletes an access control rule.", description: "Deletes an access control rule.", tags: ["calendar"], + security: [ + { + oauth2: ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.acls"], + }, + ], parameters: [ { name: "alt", @@ -107,6 +112,16 @@ export const operations: readonly ManifestOperation[] = [ summary: "Returns an access control rule.", description: "Returns an access control rule.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.acls", + "https://www.googleapis.com/auth/calendar.acls.readonly", + "https://www.googleapis.com/auth/calendar.readonly", + ], + }, + ], parameters: [ { name: "alt", @@ -201,6 +216,11 @@ export const operations: readonly ManifestOperation[] = [ summary: "Creates an access control rule.", description: "Creates an access control rule.", tags: ["calendar"], + security: [ + { + oauth2: ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.acls"], + }, + ], parameters: [ { name: "alt", @@ -301,6 +321,15 @@ export const operations: readonly ManifestOperation[] = [ summary: "Returns the rules in the access control list for the calendar.", description: "Returns the rules in the access control list for the calendar.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.acls", + "https://www.googleapis.com/auth/calendar.acls.readonly", + ], + }, + ], parameters: [ { name: "alt", @@ -433,6 +462,11 @@ export const operations: readonly ManifestOperation[] = [ summary: "Updates an access control rule. This method supports patch semantics.", description: "Updates an access control rule. This method supports patch semantics.", tags: ["calendar"], + security: [ + { + oauth2: ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.acls"], + }, + ], parameters: [ { name: "alt", @@ -544,6 +578,11 @@ export const operations: readonly ManifestOperation[] = [ summary: "Updates an access control rule.", description: "Updates an access control rule.", tags: ["calendar"], + security: [ + { + oauth2: ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.acls"], + }, + ], parameters: [ { name: "alt", @@ -655,6 +694,15 @@ export const operations: readonly ManifestOperation[] = [ summary: "Removes a calendar from the user's calendar list.", description: "Removes a calendar from the user's calendar list.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.calendarlist", + ], + }, + ], parameters: [ { name: "alt", @@ -735,6 +783,17 @@ export const operations: readonly ManifestOperation[] = [ summary: "Returns a calendar from the user's calendar list.", description: "Returns a calendar from the user's calendar list.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.calendarlist", + "https://www.googleapis.com/auth/calendar.calendarlist.readonly", + "https://www.googleapis.com/auth/calendar.readonly", + ], + }, + ], parameters: [ { name: "alt", @@ -819,6 +878,11 @@ export const operations: readonly ManifestOperation[] = [ summary: "Inserts an existing calendar into the user's calendar list.", description: "Inserts an existing calendar into the user's calendar list.", tags: ["calendar"], + security: [ + { + oauth2: ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.calendarlist"], + }, + ], parameters: [ { name: "alt", @@ -908,6 +972,16 @@ export const operations: readonly ManifestOperation[] = [ summary: "Returns the calendars on the user's calendar list.", description: "Returns the calendars on the user's calendar list.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.calendarlist", + "https://www.googleapis.com/auth/calendar.calendarlist.readonly", + "https://www.googleapis.com/auth/calendar.readonly", + ], + }, + ], parameters: [ { name: "alt", @@ -1062,6 +1136,15 @@ export const operations: readonly ManifestOperation[] = [ summary: "Updates an existing calendar on the user's calendar list. This method supports patch semantics.", description: "Updates an existing calendar on the user's calendar list. This method supports patch semantics.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.calendarlist", + ], + }, + ], parameters: [ { name: "alt", @@ -1163,6 +1246,15 @@ export const operations: readonly ManifestOperation[] = [ summary: "Updates an existing calendar on the user's calendar list.", description: "Updates an existing calendar on the user's calendar list.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.calendarlist", + ], + }, + ], parameters: [ { name: "alt", @@ -1266,6 +1358,11 @@ export const operations: readonly ManifestOperation[] = [ description: "Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account.", tags: ["calendar"], + security: [ + { + oauth2: ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.calendars"], + }, + ], parameters: [ { name: "alt", @@ -1346,6 +1443,15 @@ export const operations: readonly ManifestOperation[] = [ summary: "Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars.", description: "Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.calendars", + ], + }, + ], parameters: [ { name: "alt", @@ -1426,6 +1532,17 @@ export const operations: readonly ManifestOperation[] = [ summary: "Returns metadata for a calendar.", description: "Returns metadata for a calendar.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.calendars", + "https://www.googleapis.com/auth/calendar.calendars.readonly", + "https://www.googleapis.com/auth/calendar.readonly", + ], + }, + ], parameters: [ { name: "alt", @@ -1511,6 +1628,15 @@ export const operations: readonly ManifestOperation[] = [ description: "Creates a secondary calendar.\nThe authenticated user for the request is made the data owner of the new calendar.\n\nNote: We recommend to authenticate as the intended data owner of the calendar. You can use domain-wide delegation of authority to allow applications to act on behalf of a specific user. Don't use a service account for authentication. If you use a service account for authentication, the service account is the data owner, which can lead to unexpected behavior. For example, if a service account is the data owner, data ownership cannot be transferred.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.calendars", + ], + }, + ], parameters: [ { name: "alt", @@ -1588,6 +1714,15 @@ export const operations: readonly ManifestOperation[] = [ summary: "Updates metadata for a calendar. This method supports patch semantics.", description: "Updates metadata for a calendar. This method supports patch semantics.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.calendars", + ], + }, + ], parameters: [ { name: "alt", @@ -1679,6 +1814,11 @@ export const operations: readonly ManifestOperation[] = [ description: "Transfers a secondary calendar between users within a Google Workspace organization. Requires user authentication with Manage Calendars administrator privilege, and one of the following authorization scopes: \n- https://www.googleapis.com/auth/calendar \n- https://www.googleapis.com/auth/calendar.calendars In the request, set useAdminAccess to true. The secondary calendar must be active to be transferred. Transferring disabled or deleted calendars isn't supported.", tags: ["calendar"], + security: [ + { + oauth2: ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.calendars"], + }, + ], parameters: [ { name: "alt", @@ -1779,6 +1919,15 @@ export const operations: readonly ManifestOperation[] = [ summary: "Updates metadata for a calendar.", description: "Updates metadata for a calendar.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.calendars", + ], + }, + ], parameters: [ { name: "alt", @@ -1868,6 +2017,21 @@ export const operations: readonly ManifestOperation[] = [ summary: "Returns the color definitions for calendars and events.", description: "Returns the color definitions for calendars and events.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.calendarlist", + "https://www.googleapis.com/auth/calendar.calendarlist.readonly", + "https://www.googleapis.com/auth/calendar.events.freebusy", + "https://www.googleapis.com/auth/calendar.events.owned", + "https://www.googleapis.com/auth/calendar.events.owned.readonly", + "https://www.googleapis.com/auth/calendar.events.public.readonly", + "https://www.googleapis.com/auth/calendar.readonly", + ], + }, + ], parameters: [ { name: "alt", @@ -1940,6 +2104,16 @@ export const operations: readonly ManifestOperation[] = [ summary: "Deletes an event.", description: "Deletes an event.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.owned", + ], + }, + ], parameters: [ { name: "alt", @@ -2055,6 +2229,21 @@ export const operations: readonly ManifestOperation[] = [ description: "Returns an event based on its Google Calendar ID. To retrieve an event using its iCalendar ID, call the events.list method using the iCalUID parameter.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.freebusy", + "https://www.googleapis.com/auth/calendar.events.owned", + "https://www.googleapis.com/auth/calendar.events.owned.readonly", + "https://www.googleapis.com/auth/calendar.events.public.readonly", + "https://www.googleapis.com/auth/calendar.events.readonly", + "https://www.googleapis.com/auth/calendar.readonly", + ], + }, + ], parameters: [ { name: "alt", @@ -2187,6 +2376,16 @@ export const operations: readonly ManifestOperation[] = [ description: "Imports an event. This operation is used to add a private copy of an existing event to a calendar. Only events with an eventType of default may be imported.\nDeprecated behavior: If a non-default event is imported, its type will be changed to default and any event-type-specific properties it may have will be dropped.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.owned", + ], + }, + ], parameters: [ { name: "alt", @@ -2318,6 +2517,16 @@ export const operations: readonly ManifestOperation[] = [ summary: "Creates an event.", description: "Creates an event.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.owned", + ], + }, + ], parameters: [ { name: "alt", @@ -2488,6 +2697,21 @@ export const operations: readonly ManifestOperation[] = [ summary: "Returns instances of the specified recurring event.", description: "Returns instances of the specified recurring event.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.freebusy", + "https://www.googleapis.com/auth/calendar.events.owned", + "https://www.googleapis.com/auth/calendar.events.owned.readonly", + "https://www.googleapis.com/auth/calendar.events.public.readonly", + "https://www.googleapis.com/auth/calendar.events.readonly", + "https://www.googleapis.com/auth/calendar.readonly", + ], + }, + ], parameters: [ { name: "alt", @@ -2688,6 +2912,21 @@ export const operations: readonly ManifestOperation[] = [ summary: "Returns events on the specified calendar.", description: "Returns events on the specified calendar.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.freebusy", + "https://www.googleapis.com/auth/calendar.events.owned", + "https://www.googleapis.com/auth/calendar.events.owned.readonly", + "https://www.googleapis.com/auth/calendar.events.public.readonly", + "https://www.googleapis.com/auth/calendar.events.readonly", + "https://www.googleapis.com/auth/calendar.readonly", + ], + }, + ], parameters: [ { name: "alt", @@ -2998,6 +3237,15 @@ export const operations: readonly ManifestOperation[] = [ description: "Moves an event to another calendar, i.e. changes an event's organizer. Note that only default events can be moved; birthday, focusTime, fromGmail, outOfOffice and workingLocation events cannot be moved.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.owned", + ], + }, + ], parameters: [ { name: "alt", @@ -3123,6 +3371,16 @@ export const operations: readonly ManifestOperation[] = [ summary: "Updates an event. This method supports patch semantics.", description: "Updates an event. This method supports patch semantics.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.owned", + ], + }, + ], parameters: [ { name: "alt", @@ -3315,6 +3573,16 @@ export const operations: readonly ManifestOperation[] = [ summary: "Creates an event based on a simple text string.", description: "Creates an event based on a simple text string.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.owned", + ], + }, + ], parameters: [ { name: "alt", @@ -3432,6 +3700,16 @@ export const operations: readonly ManifestOperation[] = [ summary: "Updates an event.", description: "Updates an event.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.app.created", + "https://www.googleapis.com/auth/calendar.events", + "https://www.googleapis.com/auth/calendar.events.owned", + ], + }, + ], parameters: [ { name: "alt", @@ -3624,6 +3902,16 @@ export const operations: readonly ManifestOperation[] = [ summary: "Returns free/busy information for a set of calendars.", description: "Returns free/busy information for a set of calendars.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.events.freebusy", + "https://www.googleapis.com/auth/calendar.freebusy", + "https://www.googleapis.com/auth/calendar.readonly", + ], + }, + ], parameters: [ { name: "alt", @@ -3701,6 +3989,16 @@ export const operations: readonly ManifestOperation[] = [ summary: "Returns a single user setting.", description: "Returns a single user setting.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.readonly", + "https://www.googleapis.com/auth/calendar.settings", + "https://www.googleapis.com/auth/calendar.settings.readonly", + ], + }, + ], parameters: [ { name: "alt", @@ -3783,6 +4081,16 @@ export const operations: readonly ManifestOperation[] = [ summary: "Returns all user settings for the authenticated user.", description: "Returns all user settings for the authenticated user.", tags: ["calendar"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/calendar", + "https://www.googleapis.com/auth/calendar.readonly", + "https://www.googleapis.com/auth/calendar.settings", + "https://www.googleapis.com/auth/calendar.settings.readonly", + ], + }, + ], parameters: [ { name: "alt", @@ -3880,3 +4188,45 @@ export const operations: readonly ManifestOperation[] = [ }, }, ] + +export const securitySchemes: Readonly> = { + oauth2: { + type: "oauth2", + flows: { + authorizationCode: { + scopes: { + "https://www.googleapis.com/auth/calendar.calendars": + "See and change the properties of Google calendars you have access to, and create secondary calendars", + "https://www.googleapis.com/auth/calendar.acls.readonly": + "See the sharing permissions of Google calendars you own", + "https://www.googleapis.com/auth/calendar.settings": "View and edit your Calendar settings", + "https://www.googleapis.com/auth/calendar.settings.readonly": "View your Calendar settings", + "https://www.googleapis.com/auth/calendar.events.owned.readonly": + "See the events on Google calendars you own", + "https://www.googleapis.com/auth/calendar.calendars.readonly": + "See the title, description, default time zone, and other properties of Google calendars you have access to", + "https://www.googleapis.com/auth/calendar.calendarlist": + "See, add, and remove Google calendars you’re subscribed to", + "https://www.googleapis.com/auth/calendar.readonly": + "See and download any calendar you can access using your Google Calendar", + "https://www.googleapis.com/auth/calendar.app.created": + "Make secondary Google calendars, and see, create, change, and delete events on them", + "https://www.googleapis.com/auth/calendar.acls": + "See and change the sharing permissions of Google calendars you own", + "https://www.googleapis.com/auth/calendar.calendarlist.readonly": + "See the list of Google calendars you’re subscribed to", + "https://www.googleapis.com/auth/calendar.events.owned": + "See, create, change, and delete events on Google calendars you own", + "https://www.googleapis.com/auth/calendar.events.public.readonly": "See the events on public calendars", + "https://www.googleapis.com/auth/calendar.events": "View and edit events on all your calendars", + "https://www.googleapis.com/auth/calendar.freebusy": "View your availability in your calendars", + "https://www.googleapis.com/auth/calendar.events.readonly": "View events on all your calendars", + "https://www.googleapis.com/auth/calendar.events.freebusy": + "See the availability on Google calendars you have access to", + "https://www.googleapis.com/auth/calendar": + "See, edit, share, and permanently delete all the calendars you can access using Google Calendar", + }, + }, + }, + }, +} diff --git a/src/generated/meet/manifest.ts b/src/generated/meet/manifest.ts index ec8bbb5..4917af7 100644 --- a/src/generated/meet/manifest.ts +++ b/src/generated/meet/manifest.ts @@ -2,7 +2,7 @@ // Source: spec/google/meet.json, verified by provenance.json // Run: pnpm generate -import type { ManifestOperation } from "@wirecat/cli-base/codegen" +import type { ManifestOperation, SecurityScheme } from "@wirecat/cli-base/codegen/runtime" export const operations: readonly ManifestOperation[] = [ { @@ -19,6 +19,14 @@ export const operations: readonly ManifestOperation[] = [ description: "Gets a conference record by conference ID. For more information, see [Work with conferences](https://developers.google.com/workspace/meet/api/guides/conferences).", tags: ["meet"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/meetings.space.created", + "https://www.googleapis.com/auth/meetings.space.readonly", + ], + }, + ], parameters: [ { name: "$.xgafv", @@ -116,6 +124,14 @@ export const operations: readonly ManifestOperation[] = [ description: "Lists the conference records. By default, ordered by start time and in descending order. For more information, see [Work with conferences](https://developers.google.com/workspace/meet/api/guides/conferences).", tags: ["meet"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/meetings.space.created", + "https://www.googleapis.com/auth/meetings.space.readonly", + ], + }, + ], parameters: [ { name: "$.xgafv", @@ -238,6 +254,14 @@ export const operations: readonly ManifestOperation[] = [ description: "Lists the participants in a conference record. By default, ordered by join time and in descending order. This API supports `fields` as standard parameters like every other API. However, when the `fields` request parameter is omitted, this API defaults to `'participants/*, next_page_token'`. For more information, see [Work with participants](https://developers.google.com/workspace/meet/api/guides/participants).", tags: ["meet"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/meetings.space.created", + "https://www.googleapis.com/auth/meetings.space.readonly", + ], + }, + ], parameters: [ { name: "$.xgafv", @@ -370,6 +394,14 @@ export const operations: readonly ManifestOperation[] = [ description: "Lists the recording resources from the conference record. By default, ordered by start time and in ascending order. For more information, see [Work with artifacts](https://developers.google.com/workspace/meet/api/guides/artifacts).", tags: ["meet"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/meetings.space.created", + "https://www.googleapis.com/auth/meetings.space.readonly", + ], + }, + ], parameters: [ { name: "$.xgafv", @@ -490,6 +522,14 @@ export const operations: readonly ManifestOperation[] = [ description: "Lists the set of smart notes from the conference record. By default, ordered by start time and in ascending order. For more information, see [Work with artifacts](https://developers.google.com/workspace/meet/api/guides/artifacts).", tags: ["meet"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/meetings.space.created", + "https://www.googleapis.com/auth/meetings.space.readonly", + ], + }, + ], parameters: [ { name: "$.xgafv", @@ -610,6 +650,14 @@ export const operations: readonly ManifestOperation[] = [ description: "Lists the structured transcript entries per transcript. By default, ordered by start time and in ascending order. For more information, see [Work with artifacts](https://developers.google.com/workspace/meet/api/guides/artifacts). Note: The transcript entries returned by the Google Meet API might not match the transcription found in the Google Docs transcript file. This can occur when 1) we have interleaved speakers within milliseconds, or 2) the Google Docs transcript file is modified after generation.", tags: ["meet"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/meetings.space.created", + "https://www.googleapis.com/auth/meetings.space.readonly", + ], + }, + ], parameters: [ { name: "$.xgafv", @@ -740,6 +788,14 @@ export const operations: readonly ManifestOperation[] = [ description: "Lists the set of transcripts from the conference record. By default, ordered by start time and in ascending order. For more information, see [Work with artifacts](https://developers.google.com/workspace/meet/api/guides/artifacts).", tags: ["meet"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/meetings.space.created", + "https://www.googleapis.com/auth/meetings.space.readonly", + ], + }, + ], parameters: [ { name: "$.xgafv", @@ -860,6 +916,11 @@ export const operations: readonly ManifestOperation[] = [ description: "Creates a space. For more information, see [Manage meeting spaces](https://developers.google.com/workspace/meet/api/guides/manage-meeting-spaces).", tags: ["meet"], + security: [ + { + oauth2: ["https://www.googleapis.com/auth/meetings.space.created"], + }, + ], parameters: [ { name: "$.xgafv", @@ -952,6 +1013,15 @@ export const operations: readonly ManifestOperation[] = [ description: "Gets details about a meeting space. For more information, see [Manage meeting spaces](https://developers.google.com/workspace/meet/api/guides/manage-meeting-spaces). For an example, see [Get a meeting space](https://developers.google.com/workspace/meet/api/guides/meeting-spaces#get-meeting-space).", tags: ["meet"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/meetings.space.created", + "https://www.googleapis.com/auth/meetings.space.readonly", + "https://www.googleapis.com/auth/meetings.space.settings", + ], + }, + ], parameters: [ { name: "$.xgafv", @@ -1049,6 +1119,14 @@ export const operations: readonly ManifestOperation[] = [ description: "Updates details about a meeting space. For more information, see [Manage meeting spaces](https://developers.google.com/workspace/meet/api/guides/manage-meeting-spaces).", tags: ["meet"], + security: [ + { + oauth2: [ + "https://www.googleapis.com/auth/meetings.space.created", + "https://www.googleapis.com/auth/meetings.space.settings", + ], + }, + ], parameters: [ { name: "$.xgafv", @@ -1150,3 +1228,21 @@ export const operations: readonly ManifestOperation[] = [ }, }, ] + +export const securitySchemes: Readonly> = { + oauth2: { + type: "oauth2", + flows: { + authorizationCode: { + scopes: { + "https://www.googleapis.com/auth/meetings.space.created": + "Create, edit, and see information about your Google Meet conferences created by the app.", + "https://www.googleapis.com/auth/meetings.space.readonly": + "Read information about any of your Google Meet conferences", + "https://www.googleapis.com/auth/meetings.space.settings": + "Edit, and see settings for all of your Google Meet calls.", + }, + }, + }, + }, +} diff --git a/src/generated/meet/types.ts b/src/generated/meet/types.ts index acee8ef..e98ea3e 100644 --- a/src/generated/meet/types.ts +++ b/src/generated/meet/types.ts @@ -339,3 +339,17 @@ export type MeetUpdateMemberRequest = { /** Optional. Field mask used to specify the fields to be updated in the member. If update_mask isn't provided(not set, set with empty paths, or only has "" as paths), it defaults to update all fields provided with values in the request. Using "*" as update_mask will update all fields, including deleting fields not set in the request. In case of BatchUpdate, it must be absent or the same as the update_mask in BatchUpdateMembersRequest when UpdateMemberRequest is built as a child request of BatchUpdateMembersRequest. */ updateMask?: string } + +/** What each operation answers, by its id. */ +export interface Responses { + "meet.conferenceRecords.get": MeetConferenceRecord + "meet.conferenceRecords.list": MeetListConferenceRecordsResponse + "meet.conferenceRecords.participants.list": MeetListParticipantsResponse + "meet.conferenceRecords.recordings.list": MeetListRecordingsResponse + "meet.conferenceRecords.smartNotes.list": MeetListSmartNotesResponse + "meet.conferenceRecords.transcripts.entries.list": MeetListTranscriptEntriesResponse + "meet.conferenceRecords.transcripts.list": MeetListTranscriptsResponse + "meet.spaces.create": MeetSpace + "meet.spaces.get": MeetSpace + "meet.spaces.patch": MeetSpace +} diff --git a/src/generated/types.ts b/src/generated/types.ts index 186dc05..a605187 100644 --- a/src/generated/types.ts +++ b/src/generated/types.ts @@ -617,3 +617,40 @@ export type CalendarEventDateTime = { /** The date, in the format "yyyy-mm-dd", if this is an all-day event. */ date?: string } + +/** What each operation answers, by its id. */ +export interface Responses { + "calendar.acl.delete": unknown + "calendar.acl.get": CalendarAclRule + "calendar.acl.insert": CalendarAclRule + "calendar.acl.list": CalendarAcl + "calendar.acl.patch": CalendarAclRule + "calendar.acl.update": CalendarAclRule + "calendar.calendarList.delete": unknown + "calendar.calendarList.get": CalendarCalendarListEntry + "calendar.calendarList.insert": CalendarCalendarListEntry + "calendar.calendarList.list": CalendarCalendarList + "calendar.calendarList.patch": CalendarCalendarListEntry + "calendar.calendarList.update": CalendarCalendarListEntry + "calendar.calendars.clear": unknown + "calendar.calendars.delete": unknown + "calendar.calendars.get": CalendarCalendar + "calendar.calendars.insert": CalendarCalendar + "calendar.calendars.patch": CalendarCalendar + "calendar.calendars.transferOwnership": unknown + "calendar.calendars.update": CalendarCalendar + "calendar.colors.get": CalendarColors + "calendar.events.delete": unknown + "calendar.events.get": CalendarEvent + "calendar.events.import": CalendarEvent + "calendar.events.insert": CalendarEvent + "calendar.events.instances": CalendarEvents + "calendar.events.list": CalendarEvents + "calendar.events.move": CalendarEvent + "calendar.events.patch": CalendarEvent + "calendar.events.quickAdd": CalendarEvent + "calendar.events.update": CalendarEvent + "calendar.freebusy.query": CalendarFreeBusyResponse + "calendar.settings.get": CalendarSetting + "calendar.settings.list": CalendarSettings +} 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) => { diff --git a/src/testing/google-calendar.ts b/src/testing/google-calendar.ts index f99eff9..cb93046 100644 --- a/src/testing/google-calendar.ts +++ b/src/testing/google-calendar.ts @@ -250,6 +250,7 @@ const INVALID_ERROR = { export const fakeGoogleCalendar = (extra: Record[] = []) => { const requests: FakeRequest[] = [] + let emptied = false const fetch = async (input: string | URL | Request, init: RequestInit = {}): Promise => { const url = new URL(String(input)) const path = decodeURIComponent(url.pathname.slice(PREFIX.length)) @@ -282,6 +283,7 @@ export const fakeGoogleCalendar = (extra: Record[] = []) => { if (token) return json({ kind: "calendar#events", items: [], nextSyncToken: token }) if (!query.has("timeMin") || !query.has("timeMax")) return json({ error: { code: 400, message: "the fake expects a window" } }, 400) + if (emptied) return json({ kind: "calendar#events", items: [], nextSyncToken: "sync-fixture-emptied" }) const page = query.get("pageToken") if (page !== null && page !== "events-page-2") return json(INVALID_ERROR, 400) return json(page === "events-page-2" ? { ...FULL_2, items: [...FULL_2.items, ...extra] } : FULL_1) @@ -294,5 +296,8 @@ export const fakeGoogleCalendar = (extra: Record[] = []) => { }) return json({ error: { code: 404, message: "Not Found" } }, 404) } - return { fetch, requests } + const emptyCalendars = () => { + emptied = true + } + return { fetch, requests, emptyCalendars } } From 6fed5e51dfa123ab692faab826cf61604ca69e19 Mon Sep 17 00:00:00 2001 From: leemour Date: Tue, 24 Nov 2026 04:40:51 +0100 Subject: [PATCH 2/6] test(sync): a deletion --allow-deletions lets through leaves the events cancelled The calendar store keeps a removed event and marks it cancelled, so the test checks the status of each event rather than an empty list. The test matrix now lists sync --allow-deletions as tested. Co-Authored-By: Claude Opus 5.5 --- docs/dev/test-matrix.md | 3 ++- src/calendar.test.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/dev/test-matrix.md b/docs/dev/test-matrix.md index f41004d..2d11f32 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. -**270 ✅ · 365 ⛔ · 0 ❌** — 115 commands, 520 options. +**271 ✅ · 365 ⛔ · 0 ❌** — 115 commands, 521 options. | Command | Option | | Note | |---|---|---|---| @@ -38,6 +38,7 @@ Measured from the test run (`coverage/argv.jsonl`), not searched for — see | `calendars busy` | `--hours` | ✅ | | | `sync` | | ✅ | | | `sync` | `--rescan` | ✅ | | +| `sync` | `--allow-deletions` | ✅ | | | `sync` | `--max-pages` | ✅ | | | `sync` | `--embed` | ✅ | | | `store status` | | ✅ | | diff --git a/src/calendar.test.ts b/src/calendar.test.ts index fb45ffd..964a77a 100644 --- a/src/calendar.test.ts +++ b/src/calendar.test.ts @@ -356,7 +356,8 @@ describe("calendar commands over Google", () => { expect(JSON.stringify(held.item)).toMatch(/sync --allow-deletions \d+/) expect((await json("personal", "events", "list", "--limit", "1000")).items).toHaveLength(stored) await json("personal", "sync", "--rescan", "--allow-deletions", "1000") - expect((await json("personal", "events", "list", "--limit", "1000")).items).toHaveLength(0) + const after = (await json("personal", "events", "list", "--limit", "1000")).items + expect(after.map(({ status }: { status: string }) => status)).toEqual(Array(stored).fill("cancelled")) }) it("search finds a synced event by its words", async () => { From 1c8fa3b05e276cb952e20fa2ff9cb47abaf2aaeb Mon Sep 17 00:00:00 2001 From: leemour Date: Tue, 24 Nov 2026 04:40:57 +0100 Subject: [PATCH 3/6] build(deps): move to cli-base 1.0.0-rc.0 cli-base 1.0.0-rc.0 is on npm under the next tag. cli-core stays on 0.691.0 in package.json until cli-core 1.0 is published: the code on this branch needs 1.0, so the branch builds only once that bump lands. Checked against the cli-core 1.0 tarball (33d5d69f0): typecheck, lint, build, docs:check and test:matrix:check pass; 466 of 467 tests pass. The one failure gives meetings sync a 7 s budget and runs out of time on a loaded machine (load about 30 on 24 cores); it passes on its own. Co-Authored-By: Claude Opus 5.5 --- package.json | 2 +- pnpm-lock.yaml | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 6bf45ef..6e986cf 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "docs:spell": "cspell lint --config cspell.json --no-progress --no-summary README.md SECURITY.md CHANGELOG.md AGENTS.md CLAUDE.md 'docs/*.md' 'skills/**/*.md'" }, "dependencies": { - "@wirecat/cli-base": "0.109.0", + "@wirecat/cli-base": "1.0.0-rc.0", "@wirecat/cli-core": "0.691.0", "commander": "15.0.0", "valibot": "1.5.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fffa80d..a99519c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,11 +13,11 @@ importers: .: dependencies: '@wirecat/cli-base': - specifier: 0.109.0 - version: 0.109.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) + specifier: 1.0.0-rc.0 + version: 1.0.0-rc.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) '@wirecat/cli-core': specifier: 0.691.0 - version: 0.691.0(@wirecat/cli-base@0.109.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) + version: 0.691.0(@wirecat/cli-base@1.0.0-rc.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 @@ -1158,16 +1158,16 @@ packages: '@wasm-audio-decoders/opus-ml@0.0.3': resolution: {integrity: sha512-SEeTmk0eb3q5etJA/NHCRWW6BivTx9tqvNTmG0kg2ynuATEQRUZnwQE6Ibvl1BBvqIGHqI57+qyJMWmJBwb5XQ==} - '@wirecat/cli-base@0.109.0': - resolution: {integrity: sha512-WXj/FvkAU3Cjwly8KIkCtFSSPL6VEk/DGBrxr/Sulilwb5VgcpwhlA9BUnI1rL/QdRQDbMEYLgMLCgUtJvGVRg==} - engines: {node: '>=22'} + '@wirecat/cli-base@1.0.0-rc.0': + resolution: {integrity: sha512-vRfE2U3c3mUJGkyaaUQngxscRLCbKyL2/TiBj3Hy4hvA8rwkIgsr2jecRhB7z+0iUH8EkoEhChVaOvYD6H4xbA==} + 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 @@ -3173,12 +3173,13 @@ snapshots: dependencies: '@wasm-audio-decoders/common': 9.0.7 - '@wirecat/cli-base@0.109.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5)': + '@wirecat/cli-base@1.0.0-rc.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 cross-spawn: 7.0.6 valibot: 1.5.0(typescript@7.0.2) + yaml: 2.9.1 optionalDependencies: '@napi-rs/keyring': 2.1.2 commander: 15.0.0 @@ -3193,7 +3194,7 @@ snapshots: '@wirecat/cli-core-sqlite@1.1.0': {} - '@wirecat/cli-core@0.691.0(@wirecat/cli-base@0.109.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@0.691.0(@wirecat/cli-base@1.0.0-rc.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) @@ -3203,7 +3204,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.109.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) + '@wirecat/cli-base': 1.0.0-rc.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 57648bc1ab7742aaa94439ee4c3ea6d79d1b4a13 Mon Sep 17 00:00:00 2001 From: leemour Date: Tue, 24 Nov 2026 05:27:46 +0100 Subject: [PATCH 4/6] test(sync): a held full list cancels no event The held step compared only the number of events, so a guard that marked them cancelled at once would still pass. Co-Authored-By: Claude Opus 5.5 --- src/calendar.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calendar.test.ts b/src/calendar.test.ts index 964a77a..f6bbd70 100644 --- a/src/calendar.test.ts +++ b/src/calendar.test.ts @@ -354,7 +354,9 @@ describe("calendar commands over Google", () => { google.emptyCalendars() const held = await json("personal", "sync", "--rescan") expect(JSON.stringify(held.item)).toMatch(/sync --allow-deletions \d+/) - expect((await json("personal", "events", "list", "--limit", "1000")).items).toHaveLength(stored) + const kept = (await json("personal", "events", "list", "--limit", "1000")).items + expect(kept.filter(({ status }: { status: string }) => status === "cancelled")).toEqual([]) + expect(kept).toHaveLength(stored) await json("personal", "sync", "--rescan", "--allow-deletions", "1000") const after = (await json("personal", "events", "list", "--limit", "1000")).items expect(after.map(({ status }: { status: string }) => status)).toEqual(Array(stored).fill("cancelled")) From 8c8fc5c8a3bfbf2117ee1d2c451145fcc28e10bd Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 25 Nov 2026 04:37:05 +0100 Subject: [PATCH 5/6] 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.691.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 +- package.json | 4 +- pnpm-lock.yaml | 310 +++++++++++++++++++++++++++++++++++++++-- scripts/generate.ts | 9 +- 4 files changed, 303 insertions(+), 22 deletions(-) diff --git a/changes/release-1.0.md b/changes/release-1.0.md index de55f34..238c524 100644 --- a/changes/release-1.0.md +++ b/changes/release-1.0.md @@ -7,7 +7,7 @@ ### Changed — may break callers -- **gcal runs on cli-core 1.0 and cli-base 1.0** (cli-core 1.0.0, was 0.691.0; cli-base 1.0.0-rc.0, was 0.109.0). +- **gcal runs on cli-core 1.0 and cli-base 1.0** (cli-core 1.0.0, was 0.691.0; cli-base 1.0.0-rc.1, was 0.109.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 6e986cf..64b34ce 100644 --- a/package.json +++ b/package.json @@ -62,8 +62,8 @@ "docs:spell": "cspell lint --config cspell.json --no-progress --no-summary README.md SECURITY.md CHANGELOG.md AGENTS.md CLAUDE.md 'docs/*.md' 'skills/**/*.md'" }, "dependencies": { - "@wirecat/cli-base": "1.0.0-rc.0", - "@wirecat/cli-core": "0.691.0", + "@wirecat/cli-base": "1.0.0-rc.1", + "@wirecat/cli-core": "1.0.0-rc.0", "commander": "15.0.0", "valibot": "1.5.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a99519c..28e763b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,11 +13,11 @@ importers: .: dependencies: '@wirecat/cli-base': - specifier: 1.0.0-rc.0 - version: 1.0.0-rc.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) + specifier: 1.0.0-rc.1 + version: 1.0.0-rc.1(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) '@wirecat/cli-core': - specifier: 0.691.0 - version: 0.691.0(@wirecat/cli-base@1.0.0-rc.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-rc.0 + version: 1.0.0-rc.0(@wirecat/cli-base@1.0.0-rc.1(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 @@ -972,6 +972,9 @@ packages: '@types/estree@1.0.9': resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + '@types/hast@3.0.5': + resolution: {integrity: sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==} + '@types/katex@0.16.8': resolution: {integrity: sha512-trgaNyfU+Xh2Tc+ABIb44a5AYUpicB3uwirOioeOkNPPbmgRNtcWyDeeFRzjPZENO9Vq8gvVqfhaaXWLlevVwg==} @@ -1110,6 +1113,9 @@ packages: cpu: [x64] os: [win32] + '@ungap/structured-clone@1.4.0': + resolution: {integrity: sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==} + '@valibot/to-json-schema@1.8.0': resolution: {integrity: sha512-a0M+uwCuQZEPAo65NYkFSJ14O5c213KoSZmPdoCfuFvUhfULi4T2Z6Tpjv6lTVMW9RoLm74RpRAjNEa43KcN+g==} peerDependencies: @@ -1158,8 +1164,8 @@ packages: '@wasm-audio-decoders/opus-ml@0.0.3': resolution: {integrity: sha512-SEeTmk0eb3q5etJA/NHCRWW6BivTx9tqvNTmG0kg2ynuATEQRUZnwQE6Ibvl1BBvqIGHqI57+qyJMWmJBwb5XQ==} - '@wirecat/cli-base@1.0.0-rc.0': - resolution: {integrity: sha512-vRfE2U3c3mUJGkyaaUQngxscRLCbKyL2/TiBj3Hy4hvA8rwkIgsr2jecRhB7z+0iUH8EkoEhChVaOvYD6H4xbA==} + '@wirecat/cli-base@1.0.0-rc.1': + resolution: {integrity: sha512-dNnlDaLK6luTzx2039s4hYVmzBBszmwlK6p2knC3yPTPDVFmN1c1G83ixma4VFLhSmx7rpFYsLaqK77BZHnyww==} engines: {node: ^22.16.0 || >=24} hasBin: true peerDependencies: @@ -1186,14 +1192,14 @@ packages: '@wirecat/cli-core-sqlite@1.1.0': resolution: {integrity: sha512-GpGlh/dAIX/nblBYCdT6DfWSLFxav9mxxeELQAfEuw+QZdT9unKxbi5xa02s/s4JS1P7n0PQx2sCABj4FlMRNw==} - '@wirecat/cli-core@0.691.0': - resolution: {integrity: sha512-jtqqj/6uqlpwbphlMIW7f5ysrmEugVAP1YipQ0lQX7MWxF8gDW6EkPTaEr445x2KGJRjGeJUY6BbY6pBz6Fvbg==} + '@wirecat/cli-core@1.0.0-rc.0': + resolution: {integrity: sha512-pSt7/knZ5u3YW9U3G/0VSR/O/fYqDsBLZzn1QNCgqvGXxmQhA2ILfMF4nDxqOTVDnDMk0gatk2tiFE9bKv5Z9w==} engines: {node: ^22.16.0 || >=24} hasBin: true peerDependencies: '@napi-rs/canvas': '>=0.1.69 <2' - '@wirecat/cli-base': '>=0.108.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 @@ -1284,6 +1290,9 @@ packages: resolution: {integrity: sha512-/Ce6KNm3vIbWdMlNna6RVIZ/ICQxnJxCicet5LBKK9ZffBkqzDw0xh9EiKSljdRtiIQ1S1z4YgcscUUGzNCWrA==} engines: {node: '>=22'} + character-entities-html4@2.1.0: + resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} + character-entities-legacy@3.0.0: resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} @@ -1303,6 +1312,12 @@ packages: codec-parser@2.5.0: resolution: {integrity: sha512-Ru9t80fV8B0ZiixQl8xhMTLru+dzuis/KQld32/x5T/+3LwZb0/YvQdSKytX9JqCnRdiupvAvyYJINKrXieziQ==} + collapse-white-space@2.1.0: + resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} + + comma-separated-tokens@2.0.3: + resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} + commander@10.0.1: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} @@ -1467,6 +1482,10 @@ packages: resolution: {integrity: sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA==} engines: {node: '>=20.19.0'} + entities@9.0.0: + resolution: {integrity: sha512-oJFNDJg3kTPwAD1cNn2+WmUq4wFoo09npc3Ydf1D7ED4smRiWrsKnaLxykrTWgyGEcusc87P5dxlAleol9kpkg==} + engines: {node: '>=20.19.0'} + env-paths@4.0.0: resolution: {integrity: sha512-pxP8eL2SwwaTRi/KHYwLYXinDs7gL3jxFcBYmEdYfZmZXbaVDvdppd0XBU8qVz03rDfKZMXg1omHCbsJjZrMsw==} engines: {node: '>=20'} @@ -1564,9 +1583,54 @@ packages: resolution: {integrity: sha512-c8B/VNLmxRcmqqenRA9t+9IyOjf9+V6lTxPaUJLqOCONdQkWZ0ETYgX0qbtJqPsgCNusT9MZ5Jeidw8Eb9tn2g==} engines: {node: '>=20'} + hast-util-embedded@3.0.0: + resolution: {integrity: sha512-naH8sld4Pe2ep03qqULEtvYr7EjrLK2QHY8KJR6RJkTUjPGObe1vnx585uzem2hGra+s1q08DZZpfgDVYRbaXA==} + + hast-util-from-html@2.1.0: + resolution: {integrity: sha512-873p9AuH93gBnATbH8rU3YvjTKxyrIeWd/M9tiLMzn3G82Os0xhQurctfnbYUSrDXoyjbJGpJ2qmTpefMw7ZaQ==} + + hast-util-from-parse5@8.0.4: + resolution: {integrity: sha512-Yq7XlXor0Cpb71sI2E0zpv8QxQ5a6rfhDEETk4bcgrFX2SvJAY2PHocWwFtL6U9qyfiyByW3wZ6sZEfP2kW81g==} + + hast-util-has-property@3.0.0: + resolution: {integrity: sha512-MNilsvEKLFpV604hwfhVStK0usFY/QmM5zX16bo7EjnAEGofr5YyI37kzopBlZJkHD4t887i+q/C8/tr5Q94cA==} + + hast-util-is-body-ok-link@3.0.1: + resolution: {integrity: sha512-0qpnzOBLztXHbHQenVB8uNuxTnm/QBFUOmdOSsEn7GnBtyY07+ENTWVFBAnXd/zEgd9/SUG3lRY7hSIBWRgGpQ==} + + hast-util-is-element@3.0.0: + resolution: {integrity: sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==} + + hast-util-minify-whitespace@1.0.1: + resolution: {integrity: sha512-L96fPOVpnclQE0xzdWb/D12VT5FabA7SnZOUMtL1DbXmYiHJMXZvFkIZfiMmTCNJHUeO2K9UYNXoVyfz+QHuOw==} + + hast-util-parse-selector@4.0.0: + resolution: {integrity: sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==} + + hast-util-phrasing@3.0.1: + resolution: {integrity: sha512-6h60VfI3uBQUxHqTyMymMZnEbNl1XmEGtOxxKYL7stY2o601COo62AWAYBQR9lZbYXYSBoxag8UpPRXK+9fqSQ==} + + hast-util-to-html@9.0.6: + resolution: {integrity: sha512-1SZUxCN3TtJAE7e2BQN2MBHsoZ1gnmi9GoCP5Di59CSWptIezSAW09yDZyVbanb78V9eCwrKqdQsjtfVTxYHWA==} + + hast-util-to-mdast@10.1.3: + resolution: {integrity: sha512-8Qc3IBGvw+tvOCi606vYSvizX89hxW22GEuXnqSGq0m3cXotDaNo6LUEIuCjIL+kmrCaMeBTtu+aiJ71HoyE7Q==} + + hast-util-to-text@4.0.5: + resolution: {integrity: sha512-zQdBtSMatDIbQeO3FuKwl6O+FAol/HtTa8lT4HYd1+w+t+yYqcySxpj9k7+VBNnXBuHiD/ctVUJgyEgIZB2a9Q==} + + hast-util-whitespace@3.0.0: + resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} + + hastscript@9.0.3: + resolution: {integrity: sha512-1ALZXSmCGmW3h8AMz4R4+QKSKFi7sNgXLVwmwB8FYVtl1CwQ3WDkSAEY/d5tp1g/vbQgq2s1WlHgfO3jbw1TsA==} + html-escaper@3.0.3: resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==} + html-void-elements@3.0.0: + resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} + htmlparser2@10.1.0: resolution: {integrity: sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==} @@ -1894,6 +1958,9 @@ packages: mdast-util-phrasing@4.1.0: resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} + mdast-util-to-hast@13.2.2: + resolution: {integrity: sha512-l2pnmOuqs+SGLVpTVXnRLQu5v1AzvDe181404fbXzzqObVxrAnnVxapAP27pUwzLBL/ABIkgUhGlPVU7QSvIFg==} + mdast-util-to-markdown@2.2.0: resolution: {integrity: sha512-2Jn/ADrHFFyyniBMi0bncTbJqU78K3/TEYvzvwrWWzD9MYPUa/Gm4r3nOeKFQg/PDM5BsbDYdc8ackW4NTY6NA==} @@ -2041,6 +2108,9 @@ packages: parse-entities@4.0.2: resolution: {integrity: sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==} + parse5@8.1.1: + resolution: {integrity: sha512-EcR/6WDcU7b2N3vQSxKALCk9lXGtUMQxXio008OEMBE0kavu/7JLfBEeFPzi43nMqVDSbEn3QCK+BMCc9zO//w==} + path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -2074,6 +2144,9 @@ packages: process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + property-information@7.2.0: + resolution: {integrity: sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==} + psl@1.15.0: resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==} @@ -2098,6 +2171,9 @@ packages: readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + rehype-minify-whitespace@6.0.2: + resolution: {integrity: sha512-Zk0pyQ06A3Lyxhe9vGtOtzz3Z0+qZ5+7icZ/PL/2x1SHPbKao5oB/g/rlc6BCTajqBb33JcOe71Ye1oFsuYbnw==} + resolve-from@5.0.0: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} @@ -2163,6 +2239,9 @@ packages: resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} engines: {node: '>=0.10.0'} + space-separated-tokens@2.0.2: + resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} + sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} @@ -2183,6 +2262,9 @@ packages: string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + stringify-entities@4.0.5: + resolution: {integrity: sha512-jNuI2fNNw5ecxrWmgm90R3iH0Kc/94AQwoQWoSUYphWzvmUA2pjFG34H56Z7Z3FkvH3FpYwwewKAa97oQnPFhw==} + strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -2223,6 +2305,12 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + trim-lines@3.0.1: + resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + + trim-trailing-lines@2.1.0: + resolution: {integrity: sha512-5UR5Biq4VlVOtzqkm2AZlgvSlDJtME46uV0br0gENbwN4l5+mMKT4b9gJKqWtuL2zAIqajGJGuvbCbcAJUZqBg==} + ts-algebra@2.0.0: resolution: {integrity: sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==} @@ -2257,6 +2345,9 @@ packages: unist-util-is@6.0.1: resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==} + unist-util-position@5.0.0: + resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} + unist-util-stringify-position@4.0.0: resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} @@ -2286,6 +2377,15 @@ packages: typescript: optional: true + vfile-location@5.0.4: + resolution: {integrity: sha512-vEvxatYZCIpNvzGk2UD+u4I/sZkSKoOsdRCbkOIsN73QpJbriJ1qvvBAL1PeI0y55Leoqf7pORbaSPpG/smmOg==} + + vfile-message@4.0.4: + resolution: {integrity: sha512-66ycRswIkNmHH9PHku7ADtv5RVwgIrOcuv3J8Svz6h4qgGRrKVa+9/neuKyJZUXyOpYwLTvS+whZ4R2urHHgQg==} + + vfile@6.0.3: + resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + vite@8.3.5: resolution: {integrity: sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2376,6 +2476,9 @@ packages: vscode-uri@3.2.0: resolution: {integrity: sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg==} + web-namespaces@2.0.1: + resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -3045,6 +3148,10 @@ snapshots: '@types/estree@1.0.9': {} + '@types/hast@3.0.5': + dependencies: + '@types/unist': 3.0.3 + '@types/katex@0.16.8': {} '@types/mdast@4.0.4': @@ -3121,6 +3228,8 @@ snapshots: '@typescript/typescript-win32-x64@7.0.2': optional: true + '@ungap/structured-clone@1.4.0': {} + '@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@7.0.2))': dependencies: valibot: 1.5.0(typescript@7.0.2) @@ -3173,7 +3282,7 @@ snapshots: dependencies: '@wasm-audio-decoders/common': 9.0.7 - '@wirecat/cli-base@1.0.0-rc.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5)': + '@wirecat/cli-base@1.0.0-rc.1(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 @@ -3194,7 +3303,7 @@ snapshots: '@wirecat/cli-core-sqlite@1.1.0': {} - '@wirecat/cli-core@0.691.0(@wirecat/cli-base@1.0.0-rc.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-rc.0(@wirecat/cli-base@1.0.0-rc.1(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) @@ -3204,7 +3313,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': 1.0.0-rc.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) + '@wirecat/cli-base': 1.0.0-rc.1(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 @@ -3217,6 +3326,9 @@ snapshots: disposable-email-domains-js: 1.26.0 echarts: 6.1.0 fflate: 0.8.3 + hast-util-from-html: 2.1.0 + hast-util-to-html: 9.0.6 + hast-util-to-mdast: 10.1.3 iconv-lite: 0.7.3 image-size: 2.0.4 linkedom: 0.18.14 @@ -3225,6 +3337,8 @@ snapshots: mammoth: 1.13.0 mdast-util-from-markdown: 2.1.0 mdast-util-gfm: 3.1.0 + mdast-util-to-hast: 13.2.2 + mdast-util-to-markdown: 2.2.0 micromark-extension-gfm: 3.0.0 mpg123-decoder: 1.0.3 ogg-opus-decoder: 1.7.5 @@ -3301,6 +3415,8 @@ snapshots: chalk@6.0.1: {} + character-entities-html4@2.1.0: {} + character-entities-legacy@3.0.0: {} character-entities@2.0.2: {} @@ -3317,6 +3433,10 @@ snapshots: codec-parser@2.5.0: {} + collapse-white-space@2.1.0: {} + + comma-separated-tokens@2.0.3: {} + commander@10.0.1: {} commander@12.1.0: {} @@ -3525,6 +3645,8 @@ snapshots: entities@8.1.0: {} + entities@9.0.0: {} + env-paths@4.0.0: dependencies: is-safe-filename: 0.1.1 @@ -3633,8 +3755,115 @@ snapshots: slash: 5.1.0 unicorn-magic: 0.4.1 + hast-util-embedded@3.0.0: + dependencies: + '@types/hast': 3.0.5 + hast-util-is-element: 3.0.0 + + hast-util-from-html@2.1.0: + dependencies: + '@types/hast': 3.0.5 + devlop: 1.1.0 + hast-util-from-parse5: 8.0.4 + parse5: 8.1.1 + vfile: 6.0.3 + vfile-message: 4.0.4 + + hast-util-from-parse5@8.0.4: + dependencies: + '@types/hast': 3.0.5 + '@types/unist': 3.0.3 + devlop: 1.1.0 + hastscript: 9.0.3 + property-information: 7.2.0 + vfile: 6.0.3 + vfile-location: 5.0.4 + web-namespaces: 2.0.1 + + hast-util-has-property@3.0.0: + dependencies: + '@types/hast': 3.0.5 + + hast-util-is-body-ok-link@3.0.1: + dependencies: + '@types/hast': 3.0.5 + + hast-util-is-element@3.0.0: + dependencies: + '@types/hast': 3.0.5 + + hast-util-minify-whitespace@1.0.1: + dependencies: + '@types/hast': 3.0.5 + hast-util-embedded: 3.0.0 + hast-util-is-element: 3.0.0 + hast-util-whitespace: 3.0.0 + unist-util-is: 6.0.1 + + hast-util-parse-selector@4.0.0: + dependencies: + '@types/hast': 3.0.5 + + hast-util-phrasing@3.0.1: + dependencies: + '@types/hast': 3.0.5 + hast-util-embedded: 3.0.0 + hast-util-has-property: 3.0.0 + hast-util-is-body-ok-link: 3.0.1 + hast-util-is-element: 3.0.0 + + hast-util-to-html@9.0.6: + dependencies: + '@types/hast': 3.0.5 + '@types/unist': 3.0.3 + ccount: 2.0.1 + comma-separated-tokens: 2.0.3 + hast-util-whitespace: 3.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.2 + property-information: 7.2.0 + space-separated-tokens: 2.0.2 + stringify-entities: 4.0.5 + zwitch: 2.0.4 + + hast-util-to-mdast@10.1.3: + dependencies: + '@types/hast': 3.0.5 + '@types/mdast': 4.0.4 + '@ungap/structured-clone': 1.4.0 + collapse-white-space: 2.1.0 + hast-util-phrasing: 3.0.1 + hast-util-to-html: 9.0.6 + hast-util-to-text: 4.0.5 + hast-util-whitespace: 3.0.0 + mdast-util-phrasing: 4.1.0 + mdast-util-to-hast: 13.2.2 + mdast-util-to-string: 4.0.0 + rehype-minify-whitespace: 6.0.2 + trim-trailing-lines: 2.1.0 + unist-util-position: 5.0.0 + unist-util-visit: 5.2.0 + + hast-util-to-text@4.0.5: + dependencies: + '@types/hast': 3.0.5 + + hast-util-whitespace@3.0.0: + dependencies: + '@types/hast': 3.0.5 + + hastscript@9.0.3: + dependencies: + '@types/hast': 3.0.5 + comma-separated-tokens: 2.0.3 + hast-util-parse-selector: 4.0.0 + property-information: 7.2.0 + space-separated-tokens: 2.0.2 + html-escaper@3.0.3: {} + html-void-elements@3.0.0: {} + htmlparser2@10.1.0: dependencies: domelementtype: 2.3.0 @@ -3998,6 +4227,18 @@ snapshots: '@types/mdast': 4.0.4 unist-util-is: 6.0.1 + mdast-util-to-hast@13.2.2: + dependencies: + '@types/hast': 3.0.5 + '@types/mdast': 4.0.4 + '@ungap/structured-clone': 1.4.0 + devlop: 1.1.0 + micromark-util-sanitize-uri: 2.0.1 + trim-lines: 3.0.1 + unist-util-position: 5.0.0 + unist-util-visit: 5.2.0 + vfile: 6.0.3 + mdast-util-to-markdown@2.2.0: dependencies: '@types/mdast': 4.0.4 @@ -4283,6 +4524,10 @@ snapshots: is-decimal: 2.0.1 is-hexadecimal: 2.0.1 + parse5@8.1.1: + dependencies: + entities: 9.0.0 + path-key@3.1.1: {} pend@1.2.0: {} @@ -4305,6 +4550,8 @@ snapshots: process-nextick-args@2.0.1: {} + property-information@7.2.0: {} + psl@1.15.0: dependencies: punycode: 2.3.1 @@ -4329,6 +4576,11 @@ snapshots: string_decoder: 1.1.1 util-deprecate: 1.0.2 + rehype-minify-whitespace@6.0.2: + dependencies: + '@types/hast': 3.0.5 + hast-util-minify-whitespace: 1.0.1 + resolve-from@5.0.0: {} reusify@1.1.0: {} @@ -4396,6 +4648,8 @@ snapshots: source-map-js@1.2.2: {} + space-separated-tokens@2.0.2: {} + sprintf-js@1.0.3: {} standardwebhooks@1.1.1: @@ -4420,6 +4674,11 @@ snapshots: dependencies: safe-buffer: 5.1.2 + stringify-entities@4.0.5: + dependencies: + character-entities-html4: 2.1.0 + character-entities-legacy: 3.0.0 + strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -4452,6 +4711,10 @@ snapshots: dependencies: is-number: 7.0.0 + trim-lines@3.0.1: {} + + trim-trailing-lines@2.1.0: {} + ts-algebra@2.0.0: {} tslib@2.3.0: {} @@ -4498,6 +4761,10 @@ snapshots: dependencies: '@types/unist': 3.0.3 + unist-util-position@5.0.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-stringify-position@4.0.0: dependencies: '@types/unist': 3.0.3 @@ -4521,6 +4788,21 @@ snapshots: optionalDependencies: typescript: 7.0.2 + vfile-location@5.0.4: + dependencies: + '@types/unist': 3.0.3 + vfile: 6.0.3 + + vfile-message@4.0.4: + dependencies: + '@types/unist': 3.0.3 + unist-util-stringify-position: 4.0.0 + + vfile@6.0.3: + dependencies: + '@types/unist': 3.0.3 + vfile-message: 4.0.4 + vite@8.3.5(@types/node@22.20.5)(esbuild@0.28.2)(yaml@2.9.1): dependencies: lightningcss: 1.33.0 @@ -4561,6 +4843,8 @@ snapshots: vscode-uri@3.2.0: {} + web-namespaces@2.0.1: {} + which@2.0.2: dependencies: isexe: 2.0.0 diff --git a/scripts/generate.ts b/scripts/generate.ts index 1e21551..564692b 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 webhook = "needs a public HTTPS address to receive Google's notifications, which a local CLI does not have" const { calendar, meet } = readDiscovery(`${root}/spec/google`) @@ -112,8 +109,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 Calendar API coverage", @@ -146,7 +143,7 @@ artifacts.push( [ typesGenerator({ path: "src/generated/meet/types.ts" }), valibotGenerator({ path: "src/generated/meet/schemas.ts", typesImport: "./types.js" }), - manifestGenerator({ path: "src/generated/meet/manifest.ts", coreImport: RUNTIME }), + manifestGenerator({ path: "src/generated/meet/manifest.ts" }), ], { banner }, ), From bb36b66daac6b949c6aaeee2203276a5497a9beb Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 25 Nov 2026 04:49:59 +0100 Subject: [PATCH 6/6] test(contracts): help lists cli-core 1.0's WireCat tools; drop a stale lint baseline entry CI on release/1.0 failed two checks after the move to the published cli-core 1.0.0-rc.0: - contracts:check: `gcal --help` now lists amo, attio, ydisk, wordpress and linear under "Works with", from cli-core's own tool list. help.snap is updated to match. - ci:quick (lint:commands): the `meetings people` entry in lint/baseline/unknown-verb.json no longer matches a violation, and a stale entry fails the lint. The skipped CI steps were run locally: contracts:upgrade passes with the runner's per-process limit raised (under this machine's load the seed step exceeds the 5 s default), security:no-leak, version:check, lint:commands and docs:check pass. Co-Authored-By: Claude Opus 5.5 --- contracts/help.snap | 5 +++++ lint/baseline/unknown-verb.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/contracts/help.snap b/contracts/help.snap index 1201d38..1486ece 100644 --- a/contracts/help.snap +++ b/contracts/help.snap @@ -21,8 +21,13 @@ Works with: memo context one person across messengers, mail, notes and meetings mail IMAP mail in the same local store: search your mailbox offline, next to your other WireCat data b24 Bitrix24 CRM: deals, leads and pipelines, searchable with your other WireCat data + amo amoCRM and Kommo: deals, contacts and companies, searchable with your other WireCat data + attio Attio CRM: deals, people and companies, searchable with your other WireCat data pbx Asterisk PBX calls and recordings, searchable with your other WireCat data notion Notion pages and databases as local text, searchable with your other WireCat data + ydisk Yandex Disk folders as local text, searchable with your other WireCat data + wordpress WordPress posts and pages, searchable with your other WireCat data + linear Linear issues and projects, searchable with your other WireCat data Start here: gcal personal session start (any profile name works) Next: gcal commands every command, by section diff --git a/lint/baseline/unknown-verb.json b/lint/baseline/unknown-verb.json index b2b5a5b..fe51488 100644 --- a/lint/baseline/unknown-verb.json +++ b/lint/baseline/unknown-verb.json @@ -1 +1 @@ -["meetings people"] +[]