diff --git a/changes/chore-cli-core-0691.md b/changes/chore-cli-core-0691.md new file mode 100644 index 0000000..7a64211 --- /dev/null +++ b/changes/chore-cli-core-0691.md @@ -0,0 +1,8 @@ +### Changed — may break callers + +- **`meetings people` puts its next step at the top of the answer.** `next` (the `page.next` step with the cursor), + `missing` and `meta` were inside `item`, where an agent that reads the answer's own `next` did not find them. The + shared meetings commands now answer through cli-core's `meetingAnswerBody`. +- **Built on cli-core 0.691.0** (was 0.687.0); cli-base stays 0.109.0. The store moves to schema 69: other WireCat + CLIs that use it need a version that speaks it. See the + [cli-core changelog](https://github.com/WireCatLabs/cli-core/blob/main/CHANGELOG.md). diff --git a/contracts/upgrade.json b/contracts/upgrade.json index b2fc19f..4d589e2 100644 --- a/contracts/upgrade.json +++ b/contracts/upgrade.json @@ -121,7 +121,7 @@ "args": ["contract", "meetings", "list", "--json"], "exit": 0, "stream": "stdout", - "diagnostic": "the store moved to schema 68; every other WireCat CLI that uses it needs a version that speaks it \u2014 run ` upgrade` for each\n", + "diagnostic": "the store moved to schema 69; every other WireCat CLI that uses it needs a version that speaks it \u2014 run ` upgrade` for each\n", "kind": "json", "json": { "items": [ diff --git a/package.json b/package.json index e6f282e..3f6c7cc 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ }, "dependencies": { "@wirecat/cli-base": "0.109.0", - "@wirecat/cli-core": "0.687.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 89967b0..c92ea92 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,8 +16,8 @@ importers: specifier: 0.109.0 version: 0.109.0(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) '@wirecat/cli-core': - specifier: 0.687.0 - version: 0.687.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) + 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) commander: specifier: 15.0.0 version: 15.0.0 @@ -1189,8 +1189,8 @@ packages: '@wirecat/cli-core-sqlite@1.1.0': resolution: {integrity: sha512-GpGlh/dAIX/nblBYCdT6DfWSLFxav9mxxeELQAfEuw+QZdT9unKxbi5xa02s/s4JS1P7n0PQx2sCABj4FlMRNw==} - '@wirecat/cli-core@0.687.0': - resolution: {integrity: sha512-Sd9pAHRuDZTZmN+965xrcO5CQvI2+s6FfkTgJMvgN2Y1VNUA6URHkxvBUeFGzp/dGeEBs5775Dd4QC9k2+nq5A==} + '@wirecat/cli-core@0.691.0': + resolution: {integrity: sha512-jtqqj/6uqlpwbphlMIW7f5ysrmEugVAP1YipQ0lQX7MWxF8gDW6EkPTaEr445x2KGJRjGeJUY6BbY6pBz6Fvbg==} engines: {node: ^22.16.0 || >=24} hasBin: true peerDependencies: @@ -3212,7 +3212,7 @@ snapshots: '@wirecat/cli-core-sqlite@1.1.0': {} - '@wirecat/cli-core@0.687.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@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)': dependencies: '@anthropic-ai/sdk': 1.3.0(zod@4.6.7) '@bomb.sh/tab': 0.0.22(commander@15.0.0) diff --git a/src/answer-output.ts b/src/answer-output.ts index 79c5f44..264a227 100644 --- a/src/answer-output.ts +++ b/src/answer-output.ts @@ -15,7 +15,7 @@ const record = (value: unknown): value is Record => const only = (value: Record, keys: string[]) => Object.keys(value).every((key) => keys.includes(key)) /** - * cli-core's meeting commands and MCP tools return envelopes as plain objects, `listed()` lists or bare reports, + * cli-core's MCP tools and store reports return envelopes as plain objects, `listed()` lists or bare reports, * not `itemOf`/`listOf` bodies; zoom's own commands build bodies and never come through here. */ export const bodyOf = (value: unknown): Body => { diff --git a/src/meeting-people.test.ts b/src/meeting-people.test.ts index 6db1938..14e39d6 100644 --- a/src/meeting-people.test.ts +++ b/src/meeting-people.test.ts @@ -96,7 +96,7 @@ it("preserves empty participant scan pages and continuation budgets through CLI page: { limit: 1, has_more: true, next_cursor: expect.any(String) }, coverage: { scanned: 1, truncated_by: "scan_limit", archive_completeness: "unknown" }, }) - expect(first.next[0]).toMatchObject({ + expect(JSON.parse(f.output.join("")).next[0]).toMatchObject({ step: "page.next", args: { query: "алиса", limit: 1, scan_limit: 1, max_read_bytes: 100, cursor: first.page.next_cursor }, }) @@ -110,11 +110,21 @@ it("preserves empty participant scan pages and continuation budgets through CLI const last = readAnswer(f.output.join("")) expect(last.items).toMatchObject([{ display_name: "АЛИСА ПРИМЕР" }]) expect(last.page).toEqual({ mode: "cursor", limit: 1, has_more: false }) - expect(last).not.toHaveProperty("next") + expect(JSON.parse(f.output.join(""))).not.toHaveProperty("next") expect(f.close).toHaveBeenCalledTimes(3) expect(f.network).not.toHaveBeenCalled() }) +it("puts the people page's next step at the top of the answer, where an agent looks for it", async () => { + const f = await fixture() + const args = ["--offline", "meetings", "people", "алиса", "--limit", "1", "--scan-limit", "1", "--json"] + expect(await run(args, f.deps)).toBe(0) + const packet = JSON.parse(f.output.join("")) + readAnswer(f.output.join("")) + expect(packet.next[0]).toMatchObject({ step: "page.next", args: { cursor: packet.item.page.next_cursor } }) + expect(packet.item).not.toHaveProperty("next") +}) + it("keeps the bounded participant report in JSONL data with a final end record", async () => { const f = await fixture() expect(await run(["meetings", "people", "алиса", "--limit", "1", "--scan-limit", "1", "--jsonl"], f.deps)).toBe(0) diff --git a/src/program-bindings.ts b/src/program-bindings.ts index c126f77..50f9d8f 100644 --- a/src/program-bindings.ts +++ b/src/program-bindings.ts @@ -13,6 +13,7 @@ import { environmentOf, isBody, itemAnswer, + meetingAnswerBody, pagingOf, runBudgetOf, snakeKeys, @@ -311,7 +312,7 @@ export const bindZoomProgram = (program: Command, given: ProgramDeps, lifecycle: () => profileAccountKey(profile()), ), askFirst: (command) => askBeforeWrite(command, { profile: named, config: getConfig, confirm: ask() }), - write: (value) => output(bodyOf(value)), + write: (value, _format, command) => output(meetingAnswerBody(command, value)), // inCommandRun would open a second run beside zm's own commandRuns, so a sync would be kept twice. inRun: (_command, body) => body(), budgetOf: runBudgetOf,