From c08240fba713b2e020076abd55fc2062a50ee54e Mon Sep 17 00:00:00 2001 From: luvs01 Date: Sun, 30 Aug 2026 14:40:52 +0900 Subject: [PATCH] fix(cli): correct logs follow capability contract --- skills/ocx/references/01_management_surface.md | 2 +- src/cli/capabilities.ts | 2 +- tests/cli-capabilities.test.ts | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/skills/ocx/references/01_management_surface.md b/skills/ocx/references/01_management_surface.md index 3a5a2ad989..8332711f59 100644 --- a/skills/ocx/references/01_management_surface.md +++ b/skills/ocx/references/01_management_surface.md @@ -124,7 +124,7 @@ Recent request log rows, filterable by provider, model, conversation, and status | `--conversation` | string | Restrict to one conversation id (`--conversationId` is accepted too). | | `--status` | string | An exact code (429) or a class (5xx). | | `--limit` | number | Row cap; defaults to 200. | -| `--follow` | boolean | Stream new rows as JSONL; implies --jsonl. | +| `--follow` | boolean | Poll for new rows; add --jsonl to emit JSONL. | | `--json` | boolean | Emit the server payload as JSON. | | `--jsonl` | boolean | Emit one row per line. | diff --git a/src/cli/capabilities.ts b/src/cli/capabilities.ts index 76b85e0690..7a8ecc1c96 100644 --- a/src/cli/capabilities.ts +++ b/src/cli/capabilities.ts @@ -236,7 +236,7 @@ export const CAPABILITIES: readonly Capability[] = [ { name: "--conversation", value: "string", summary: "Restrict to one conversation id (`--conversationId` is accepted too)." }, { name: "--status", value: "string", summary: "An exact code (429) or a class (5xx)." }, { name: "--limit", value: "number", summary: "Row cap; defaults to 200." }, - { name: "--follow", value: "boolean", summary: "Stream new rows as JSONL; implies --jsonl." }, + { name: "--follow", value: "boolean", summary: "Poll for new rows; add --jsonl to emit JSONL." }, { name: "--json", value: "boolean", summary: "Emit the server payload as JSON." }, { name: "--jsonl", value: "boolean", summary: "Emit one row per line." }, ], diff --git a/tests/cli-capabilities.test.ts b/tests/cli-capabilities.test.ts index dac18e19ba..64a3153910 100644 --- a/tests/cli-capabilities.test.ts +++ b/tests/cli-capabilities.test.ts @@ -145,6 +145,12 @@ describe("ocx capabilities output", () => { expect(cap?.routes).toEqual([]); }); + test("logs follow does not claim to imply JSONL output", () => { + const logs = CAPABILITIES.find(c => c.command.length === 1 && c.command[0] === "logs"); + const follow = logs?.flags.find(flag => flag.name === "--follow"); + expect(follow?.summary).toBe("Poll for new rows; add --jsonl to emit JSONL."); + }); + test("--route without a path is usage, not a full table dump", async () => { const cap = captureStdout(); let code: number;