diff --git a/CHANGELOG.md b/CHANGELOG.md index 4448dce9..06b9bdea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to the claude-plugins project will be documented in this fil The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Entries are listed newest-first; each plugin section is treated as released when merged to `main`. +### vibe-core v1.0.12 + +#### Fixed +- `remoteTrigger` reads an oversized RemoteTrigger reply, such as a routine `list` page, from the stream's structured tool result (ISS-14140). The client runs with `--no-session-persistence`, which leaves no saved file behind the `` placeholder, so `cloud-worker.mjs check` failed with `CLOUD_RESULT_TOO_LARGE`. When the tool result is that placeholder and the same stream event carries `tool_use_result` with an integer `status` and a string `json`, the reply is read as `HTTP ` followed by that JSON. Without it the saved file is still read as before, and a partial save, a `` wrapper or a placeholder whose file cannot be read still throws `CLOUD_RESULT_TOO_LARGE`. An inline result is used as it is. +- `cloud-worker.test.mjs` adds a case built from a real `claude -p --no-session-persistence --output-format stream-json` list capture (the event's keys, the placeholder format, 20 routines with their 24 keys and captured sizes, every value synthetic), and the same placeholder without `tool_use_result` still throws `CLOUD_RESULT_TOO_LARGE`. `toolStream` takes optional extra event fields. + +### vibe v1.1.93 + +#### Changed +- The README version line and the Python and vibe-bench release-pin tests move to 1.1.93, with vibe-core 1.0.12. +- Across all plugin Markdown, including eval prompts and graders, as measured by `plugins/vibe/skills/fleet-orchestrator/scripts/instruction-words.mjs`, vibe is about 0 words longer than in 1.1.90 (origin/main at this update, 14d9016a). + ### vibe-core v1.0.11 #### Added diff --git a/plugins/vibe-core/.claude-plugin/plugin.json b/plugins/vibe-core/.claude-plugin/plugin.json index e526406a..cf087c3f 100644 --- a/plugins/vibe-core/.claude-plugin/plugin.json +++ b/plugins/vibe-core/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "vibe-core", "description": "The hooks behind vibe sessions and the modules they run, released apart from vibe so its hook approval lasts", - "version": "1.0.11", + "version": "1.0.12", "author": {"name": "ClosedLoop", "email": "support@closedloop.ai"} } diff --git a/plugins/vibe-core/.codex-plugin/plugin.json b/plugins/vibe-core/.codex-plugin/plugin.json index 565dc2c0..b7e16df7 100644 --- a/plugins/vibe-core/.codex-plugin/plugin.json +++ b/plugins/vibe-core/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "vibe-core", - "version": "1.0.11", + "version": "1.0.12", "description": "The hooks behind vibe sessions and the modules they run, released apart from vibe so its hook approval lasts", "author": {"name": "ClosedLoop", "email": "support@closedloop.ai"}, "homepage": "https://github.com/closedloop-ai/claude-plugins", diff --git a/plugins/vibe-core/lib/vibe/scripts/cloud-worker.mjs b/plugins/vibe-core/lib/vibe/scripts/cloud-worker.mjs index 3333af78..b7904880 100644 --- a/plugins/vibe-core/lib/vibe/scripts/cloud-worker.mjs +++ b/plugins/vibe-core/lib/vibe/scripts/cloud-worker.mjs @@ -174,14 +174,17 @@ function tooLarge() { return cloudSetupError(CloudSetupError.ResultTooLarge, TOO /** * The tool result's text. A result over the tool's inline limit (100,000 characters) comes back as a * `` placeholder naming the file the harness saved it to (ISS-14140: one routine list page - * is about 272 KB); that file is read. A partial save, a `` wrapper or a file that cannot be - * read is CLOUD_RESULT_TOO_LARGE, never a sign-in problem. + * is about 272 KB). `--no-session-persistence` leaves no saved file, so the structured result the same stream + * event carries (`tool_use_result: { status, json }`, the untruncated reply) is used first; the saved file is + * read only when that is absent. A partial save, a `` wrapper or a file that cannot be read + * is CLOUD_RESULT_TOO_LARGE, never a sign-in problem. */ -function toolResultText(body) { +function toolResultText(body, structured) { const head = body.trimStart(); if (head.startsWith("")) throw tooLarge(); if (!head.startsWith("")) return body; if (/persist limit; only the first/.test(head)) throw tooLarge(); + if (Number.isInteger(structured?.status) && typeof structured.json === "string") return `HTTP ${structured.status}\n${structured.json}`; const file = /Full output saved to: (.+)$/m.exec(head)?.[1]?.trim(); if (!file || !path.isAbsolute(file)) throw tooLarge(); let text; @@ -212,6 +215,7 @@ export function remoteTrigger(action, payload, { run = runCommand, cwd, intent, if (result.status !== 0) throw new Error(`Claude RemoteTrigger ${action} failed: ${firstLine(result.stderr || result.error?.message || result.stdout)}`); let toolId; let toolResult; + let structured; for (const line of result.stdout.split("\n")) { if (!line.trim()) continue; let event; @@ -222,11 +226,14 @@ export function remoteTrigger(action, payload, { run = runCommand, cwd, intent, if (toolId || !isDeepStrictEqual(item.input, sent)) throw new Error(`RemoteTrigger ${action} called an unexpected action`); toolId = item.id; } - if (item?.type === "tool_result" && item.tool_use_id === toolId) toolResult = item.content; + if (item?.type === "tool_result" && item.tool_use_id === toolId) { + toolResult = item.content; + structured = event.tool_use_result; + } } } if (!toolId || !toolResult) throw new Error(`RemoteTrigger ${action} returned no verified tool result`); - const body = toolResultText(typeof toolResult === "string" ? toolResult : Array.isArray(toolResult) ? toolResult.map((item) => item.text ?? "").join("\n") : ""); + const body = toolResultText(typeof toolResult === "string" ? toolResult : Array.isArray(toolResult) ? toolResult.map((item) => item.text ?? "").join("\n") : "", structured); const [statusLine, jsonLine] = body.split("\n"); if (statusLine !== "HTTP 200" || !jsonLine) { const status = Number(/^HTTP (\d{3})\b/.exec(statusLine ?? "")?.[1]); diff --git a/plugins/vibe-core/lib/vibe/scripts/cloud-worker.test.mjs b/plugins/vibe-core/lib/vibe/scripts/cloud-worker.test.mjs index e49e1b53..e233ad49 100644 --- a/plugins/vibe-core/lib/vibe/scripts/cloud-worker.test.mjs +++ b/plugins/vibe-core/lib/vibe/scripts/cloud-worker.test.mjs @@ -719,10 +719,10 @@ test('a RemoteTrigger create is sent only by the routine ledger', () => { assert.deepEqual(found, ['plugins/vibe-core/lib/vibe/scripts/cloud-routines.mjs']); }); -const persisted = (file, size = '272.0KB') => `\nOutput too large (${size}). Full output saved to: ${file}\n\nPreview (first 2KB):\nHTTP 200\n{"data":[\n...\n`; -const toolStream = (action, content) => () => ({ status: 0, stderr: '', stdout: [ +const persisted = (file, size = '272.0KB', preview = 'HTTP 200\n{"data":[') => `\nOutput too large (${size}). Full output saved to: ${file}\n\nPreview (first 2KB):\n${preview}\n...\n`; +const toolStream = (action, content, resultEvent = {}) => () => ({ status: 0, stderr: '', stdout: [ JSON.stringify({ message: { content: [{ type: 'tool_use', name: 'RemoteTrigger', id: 'tool_1', input: { action } }] } }), - JSON.stringify({ message: { content: [{ type: 'tool_result', tool_use_id: 'tool_1', content }] } }), + JSON.stringify({ ...resultEvent, message: { ...resultEvent.message, content: [{ type: 'tool_result', tool_use_id: 'tool_1', content }] } }), ].join('\n') }); test('AC-7 and AC-9 (ISS-14140): a list reply larger than the inline limit is read from the file the harness saved it to', (t) => { @@ -738,6 +738,45 @@ test('AC-7 and AC-9 (ISS-14140): a list reply larger than the inline limit is re assert.equal(remoteTrigger('list', {}, { run: toolStream('list', [{ type: 'text', text: persisted(blocks) }]) }).data[19].id, 'trig_19'); }); +// Item sizes and keys from a real `claude -p --no-session-persistence --output-format stream-json` list capture +// (CLI 2.1.323), with every value replaced by a synthetic one. +const CAPTURED_ITEM_SIZES = [3657, 6199, 6199, 7660, 7987, 7999, 8128, 8128, 8560, 9145, 9214, 9295, 9334, 9334, 9436, 9820, 10555, 10594, 10738, 11998]; +function capturedListItem(index, size) { + const item = (prompt) => ({ + api_token_hint: null, created_at: '2026-11-01T00:00:00Z', created_kind: 'api', created_surface: 'cli', created_via: 'remote_trigger', + creator: { id: 'user_REDACTED' }, cron_expression: null, derived_state: { prompt }, enabled: false, enabled_plugins: [], ended_reason: null, + extra_marketplaces: [], id: `trig_REDACTED_${index}`, + job_config: { ccr: { environment_id: 'env_REDACTED', events: [{ data: { message: { content: prompt } } }] } }, + last_fired_at: null, last_run: null, mcp_connections: [], name: `routine ${index}`, next_run_at: null, persist_session: false, + run_once_at: null, session_request: null, suspension_reason: null, updated_at: '2026-11-01T00:00:00Z', + }); + const base = JSON.stringify(item('')).length; + return item('p'.repeat(Math.max(0, Math.floor((size - base) / 2)))); +} + +test('AC-7 (ISS-14140): the real CLI shape, a persisted-output placeholder whose saved file never exists, reads the list from the event\'s tool_use_result', (t) => { + const dir = fixtureHome(t); + const page = { data: CAPTURED_ITEM_SIZES.map((size, index) => capturedListItem(index, size)), has_more: true, next_cursor: 'cursor_REDACTED' }; + assert.deepEqual(Object.keys(page.data[0]).sort(), ['api_token_hint', 'created_at', 'created_kind', 'created_surface', 'created_via', 'creator', 'cron_expression', 'derived_state', 'enabled', 'enabled_plugins', 'ended_reason', 'extra_marketplaces', 'id', 'job_config', 'last_fired_at', 'last_run', 'mcp_connections', 'name', 'next_run_at', 'persist_session', 'run_once_at', 'session_request', 'suspension_reason', 'updated_at']); + const json = JSON.stringify(page); + assert.ok(json.length > 100_000, 'larger than the RemoteTrigger inline limit of 100,000 characters'); + const saved = path.join(dir, '.claude', 'projects', '-REDACTED', 'session_REDACTED', 'tool-results', 'toolu_REDACTED.txt'); + assert.equal(existsSync(saved), false, '--no-session-persistence leaves no saved file'); + const placeholder = persisted(saved, '166.5KB', `HTTP 200\n${json}`.slice(0, 2048)); + const event = { + type: 'user', message: { role: 'user' }, parent_tool_use_id: null, session_id: 'session_REDACTED', uuid: 'uuid_REDACTED', timestamp: '2026-11-16T00:00:00.000Z', + tool_result_meta: [{ id: 'tool_1', permission_decision: { decision: 'accept', source: 'config', reason_type: 'rule' } }], + tool_use_result: { status: 200, json }, + }; + const listed = remoteTrigger('list', {}, { run: toolStream('list', placeholder, event) }); + assert.deepEqual(listed.data.map((item) => item.id), CAPTURED_ITEM_SIZES.map((_, index) => `trig_REDACTED_${index}`)); + assert.equal(listed.has_more, true); + assert.equal(listed.next_cursor, 'cursor_REDACTED'); + // Without the structured result the same placeholder is the AC-8 case below: CLOUD_RESULT_TOO_LARGE. + const { tool_use_result: _dropped, ...bare } = event; + assert.throws(() => remoteTrigger('list', {}, { run: toolStream('list', placeholder, bare) }), { code: 'CLOUD_RESULT_TOO_LARGE' }); +}); + test('AC-8 and AC-9 (ISS-14140): a persisted-output wrapper that cannot be read is CLOUD_RESULT_TOO_LARGE, never sign-in advice', (t) => { const dir = fixtureHome(t); const partial = path.join(dir, 'partial.txt'); diff --git a/plugins/vibe/.claude-plugin/plugin.json b/plugins/vibe/.claude-plugin/plugin.json index ee76b4ba..70a5a3e5 100644 --- a/plugins/vibe/.claude-plugin/plugin.json +++ b/plugins/vibe/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "vibe", "description": "Vibe sessions, handoff, seed refresh, and ClosedLoop ticket workflows", - "version": "1.1.90", + "version": "1.1.93", "dependencies": ["closedloop-core", "vibe-core"], "author": {"name": "ClosedLoop", "email": "support@closedloop.ai"} } diff --git a/plugins/vibe/.codex-plugin/plugin.json b/plugins/vibe/.codex-plugin/plugin.json index a047f660..6681ebb2 100644 --- a/plugins/vibe/.codex-plugin/plugin.json +++ b/plugins/vibe/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "vibe", - "version": "1.1.90", + "version": "1.1.93", "description": "Vibe sessions, handoff, seed refresh, and ClosedLoop ticket workflows", "author": {"name": "ClosedLoop", "email": "support@closedloop.ai"}, "homepage": "https://github.com/closedloop-ai/claude-plugins", diff --git a/plugins/vibe/README.md b/plugins/vibe/README.md index 5e727bd7..71bc6fa8 100644 --- a/plugins/vibe/README.md +++ b/plugins/vibe/README.md @@ -376,7 +376,7 @@ Run the matching Codex suite from the repository root with ### Runtime files -Version `1.1.90` contains 17 skills and 17 agents, and no hook manifest: its +Version `1.1.93` contains 17 skills and 17 agents, and no hook manifest: its hooks, and every module they run, ship in the `vibe-core` plugin, which vibe declares as a dependency. vibe loads those modules from vibe-core through `shared/vibe-core.mjs`, and the commands among them keep thin wrappers at diff --git a/plugins/vibe/tools/python/test_pr_takeover_skill_contract.py b/plugins/vibe/tools/python/test_pr_takeover_skill_contract.py index 38e770e4..fec39f62 100644 --- a/plugins/vibe/tools/python/test_pr_takeover_skill_contract.py +++ b/plugins/vibe/tools/python/test_pr_takeover_skill_contract.py @@ -24,7 +24,7 @@ def _section(text: str, heading: str) -> str: def test_both_manifests_publish_the_same_new_skill_version() -> None: claude = json.loads((PLUGIN / ".claude-plugin" / "plugin.json").read_text()) codex = json.loads((PLUGIN / ".codex-plugin" / "plugin.json").read_text()) - assert claude["version"] == codex["version"] == "1.1.90" + assert claude["version"] == codex["version"] == "1.1.93" assert codex["skills"] == "./skills/" assert SKILL.read_text().startswith("---\nname: pr-takeover\n") diff --git a/plugins/vibe/tools/python/test_vibe_ws8_load_contract.py b/plugins/vibe/tools/python/test_vibe_ws8_load_contract.py index fbab431b..8488ebf0 100644 --- a/plugins/vibe/tools/python/test_vibe_ws8_load_contract.py +++ b/plugins/vibe/tools/python/test_vibe_ws8_load_contract.py @@ -149,8 +149,8 @@ def test_the_flags_the_skill_uses_exist_in_verify_run_and_the_worker_can_join() def test_current_version_and_prior_release_notes() -> None: for manifest in (".claude-plugin", ".codex-plugin"): - assert json.loads((PLUGIN_ROOT / manifest / "plugin.json").read_text())["version"] == "1.1.90", manifest - assert "Version `1.1.90`" in (PLUGIN_ROOT / "README.md").read_text() + assert json.loads((PLUGIN_ROOT / manifest / "plugin.json").read_text())["version"] == "1.1.93", manifest + assert "Version `1.1.93`" in (PLUGIN_ROOT / "README.md").read_text() changelog = (PLUGIN_ROOT.parents[1] / "CHANGELOG.md").read_text() assert "### vibe v1.1.76" in changelog assert "### vibe v1.1.61" in changelog diff --git a/tools/vibe-bench/src/reply-checker.test.ts b/tools/vibe-bench/src/reply-checker.test.ts index 26af4fe8..ad3e3b50 100644 --- a/tools/vibe-bench/src/reply-checker.test.ts +++ b/tools/vibe-bench/src/reply-checker.test.ts @@ -99,7 +99,7 @@ test("ISS-13760 old subject snapshots use the driver checker revision", (t) => { }); test("ISS-13760 production default records current driver provenance", () => { - const currentVersion = "1.1.90"; + const currentVersion = "1.1.93"; const raw = native(true, vibeRoot, currentVersion); const currentExpected = { ...expected, version: currentVersion }; const nativeCollected = collectClaudeEval(raw, [caseId], currentExpected);