Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions changes/chore-cli-core-0691.md
Original file line number Diff line number Diff line change
@@ -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).
2 changes: 1 addition & 1 deletion contracts/upgrade.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<cli> 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 `<cli> upgrade` for each\n",
"kind": "json",
"json": {
"items": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/answer-output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const record = (value: unknown): value is Record<string, unknown> =>
const only = (value: Record<string, unknown>, 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 => {
Expand Down
14 changes: 12 additions & 2 deletions src/meeting-people.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
})
Expand All @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion src/program-bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
environmentOf,
isBody,
itemAnswer,
meetingAnswerBody,
pagingOf,
runBudgetOf,
snakeKeys,
Expand Down Expand Up @@ -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,
Expand Down
Loading