test(ptc): derive migrated replay scripts from sessions
This commit is contained in:
1 parent
790991a6c0
commit
b7a3fba945
48 files changed
+28
-663
No files matched your search
@@ -97,7 +97,7 @@ describe.skipIf(MODE === 'record')('web snapshot: Official native subagent bundl
|
||||
scaffold = await launchWebScaffold({
|
||||
developerTools: true, profile: { packages: [{ dir: PACKAGE }] },
|
||||
extraOverlayPath: [fileURLToPath(new URL('./pin-browse-picker.overlay.yml', import.meta.url)), overlay],
|
||||
replayFixture: FIXTURE, replayOverride: join(DIR, 'replay.override.json'), compareReplaySession: true,
|
||||
replayFixture: FIXTURE, compareReplaySession: true,
|
||||
})
|
||||
expect((await scaffold.ctx.pluginManager.listBundles()).find(bundle => bundle.name === BUNDLE))
|
||||
.toMatchObject({ official: true, availability: 'profile', enabled: false })
|
||||
@@ -179,7 +179,7 @@ describe.skipIf(MODE === 'record')('web snapshot: Official native subagent bundl
|
||||
|
||||
it.skipIf(MODE !== 'replay')('keeps the owned fixture artifacts closed', async () => {
|
||||
await assertFixtureInventory(DIR, [
|
||||
'session.v4.jsonl', 'system-prompt.expected.md', 'tool-schemas.expected.json', 'ui.expected.md', 'workspace.expected', 'replay.override.json',
|
||||
'session.v4.jsonl', 'system-prompt.expected.md', 'tool-schemas.expected.json', 'ui.expected.md', 'workspace.expected',
|
||||
])
|
||||
})
|
||||
})
|
||||
|
||||
@@ -57,7 +57,7 @@ fs.appendFileSync(${JSON.stringify(openLog)}, JSON.stringify({ path, action, con
|
||||
openInAppEnvironment: createLaunchEnvironmentSnapshot([{ source: 'process', values: { SSH_CONNECTION: '10.0.0.2 55000 10.0.0.9 22' } }]),
|
||||
extraOverlayPath: fileURLToPath(new URL('./present.overlay.yml', import.meta.url)),
|
||||
agentPresets: { default: 'ptc' }, compareReplaySession: true,
|
||||
...(MODE === 'record' ? {} : { replayFixture: FIXTURE, replayOverride: fileURLToPath(new URL('../../../snapshots/web/present/replay.override.json', import.meta.url)) }),
|
||||
...(MODE === 'record' ? {} : { replayFixture: FIXTURE }),
|
||||
})
|
||||
// File associations belong to the desktop rather than the recorded Session.
|
||||
const controller = scaffold.ctx.get('sessionController')
|
||||
|
||||
@@ -34,7 +34,7 @@ describe('web e2e: PTC program sandbox escalation', () => {
|
||||
scaffold = await launchWebScaffold({
|
||||
agentPresets: { default: 'ptc' },
|
||||
compareReplaySession: true,
|
||||
...(MODE === 'record' ? {} : { replayFixture: FIXTURE, replayOverride: join(SNAPSHOT_DIR, 'replay.override.json'), paceMs: 15 }),
|
||||
...(MODE === 'record' ? {} : { replayFixture: FIXTURE, paceMs: 15 }),
|
||||
})
|
||||
scaffold.ctx.on('session/event', (_session, event: SessionEvent) => { events.push(event) })
|
||||
browser = await chromium.launch()
|
||||
@@ -90,6 +90,6 @@ describe('web e2e: PTC program sandbox escalation', () => {
|
||||
}, 300_000)
|
||||
|
||||
it.skipIf(MODE === 'record')('keeps the fixture inventory closed', async () => {
|
||||
await assertFixtureInventory(SNAPSHOT_DIR, ['session.v3.jsonl', 'approval.expected.md', 'workspace.expected', 'replay.override.json'])
|
||||
await assertFixtureInventory(SNAPSHOT_DIR, ['session.v3.jsonl', 'approval.expected.md', 'workspace.expected'])
|
||||
})
|
||||
})
|
||||
@@ -37,7 +37,7 @@ describe('web e2e: PTC mode round renders nested sub-calls', () => {
|
||||
scaffold = await launchWebScaffold({
|
||||
agentPresets: { default: 'ptc' },
|
||||
compareReplaySession: true,
|
||||
...(MODE === 'record' ? {} : { replayFixture: FIXTURE, replayOverride: fileURLToPath(new URL('../../../snapshots/web/ptc-round/replay.override.json', import.meta.url)), paceMs: 15 }),
|
||||
...(MODE === 'record' ? {} : { replayFixture: FIXTURE, paceMs: 15 }),
|
||||
})
|
||||
scaffold.ctx.on('session/event', (_session, event: SessionEvent) => { sessionEvents.push(event) })
|
||||
browser = await chromium.launch()
|
||||
|
||||
@@ -30,7 +30,7 @@ describe('web snapshot: standalone string editor through PTC', () => {
|
||||
],
|
||||
profile: { packages: [] },
|
||||
compareReplaySession: true,
|
||||
...(MODE === 'record' ? {} : { replayFixture: FIXTURE, replayOverride: join(DIR, 'replay.override.json') }),
|
||||
...(MODE === 'record' ? {} : { replayFixture: FIXTURE }),
|
||||
})
|
||||
expect(scaffold.ctx.tools.schemas().some(tool => tool.name === 'str_replace_editor')).toBe(true)
|
||||
browser = await chromium.launch()
|
||||
@@ -82,7 +82,7 @@ describe('web snapshot: standalone string editor through PTC', () => {
|
||||
|
||||
it.skipIf(MODE !== 'replay')('keeps the owned fixture artifacts closed', async () => {
|
||||
await assertFixtureInventory(DIR, [
|
||||
'session.v4.jsonl', 'system-prompt.expected.md', 'tool-schemas.expected.json', 'ui.expected.md', 'workspace.expected', 'replay.override.json',
|
||||
'session.v4.jsonl', 'system-prompt.expected.md', 'tool-schemas.expected.json', 'ui.expected.md', 'workspace.expected',
|
||||
])
|
||||
})
|
||||
})
|
||||
@@ -9,8 +9,8 @@
|
||||
en: dd20eb4783680487
|
||||
zh: 990036cd77298507
|
||||
/deepseek-ai-dsh-llm-replay/summary:
|
||||
en: 9db70d252b8e2902
|
||||
zh: 26c3e40a0fef9b53
|
||||
en: 88195729e627da4a
|
||||
zh: bc8ee773635edd83
|
||||
/deepseek-ai-dsh-llm-replay/table-of-contents:
|
||||
en: d152484eb41ac6b4
|
||||
zh: 09388d293f9be9cb
|
||||
@@ -27,8 +27,8 @@
|
||||
en: 7745c49d10a63b0e
|
||||
zh: 937b954c664f1973
|
||||
/deepseek-ai-dsh-llm-replay/use-this-package/failure-modes-and-overrides:
|
||||
en: 319e95521a4a06fe
|
||||
zh: 884c8299028df8a3
|
||||
en: 76dae50158e07ca3
|
||||
zh: ec3b84d9496534b3
|
||||
/deepseek-ai-dsh-llm-replay/use-this-package/what-can-go-wrong:
|
||||
en: 965da31d63ec88fe
|
||||
zh: 8ca1428daae5d583
|
||||
|
||||
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
||||
|
||||
## Summary
|
||||
|
||||
`dsh-llm-replay` lets snapshot tests run the real agent without an API key by replaying model streams from recorded Session JSONL fixtures. Each parent and subagent session receives its recorded script in first-call order, while calls within a session advance independently. A `replay.override.json` sidecar represents pre-chunk failures, cancellation, hangs, and injected retries that durable settlements cannot reconstruct. Use it for deterministic ACP, headless, and Web browser scenarios that need real loop behavior with fixed model output.
|
||||
`dsh-llm-replay` lets snapshot tests run the real agent without an API key by replaying model streams from recorded Session JSONL fixtures. Each parent and subagent session receives its recorded script in first-call order, while calls within a session advance independently. A `replay.override.json` sidecar supplies scenario behavior absent from the selected fixture, including failures, cancellation, hangs, retries, and authored adaptations of retained programs. Use it for deterministic ACP, headless, and Web browser scenarios that need real loop behavior with fixed model output.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@@ -79,6 +79,8 @@ When replay serves `deepseek-official` with `ctx.deepseekLlmApiExtensions`, it p
|
||||
|
||||
Two failure modes are not reconstructable from a durable Assistant settlement alone: a pure throw before any chunk has no exception-bearing stream member, and a cancel/hang requires nontermination rather than a replayed finite prefix. A scenario that needs those supplies an optional sidecar (`<scenario>/replay.override.json`) that either replaces the derived script with a bare `ReplayEntry[]` or augments it with `{ patches: [{ at, entry }] }`, which keeps every derived call and swaps the named 0-based call indexes; `at` equal to the derived length appends the retry attempt after an injected transient throw. A `throw` entry accepts DeepSeek request extensions when it has prefix chunks; a zero-chunk throw defaults to pre-2xx non-acceptance and may set `accepted: true` for a post-2xx failure. A `hang` entry may name `readyFile`, which replay writes before waiting for cancellation so an external driver can cancel deterministically.
|
||||
|
||||
A scenario pinned to a historical or retired-tool recording may use an authored override to adapt its program to current execution instructions while preserving the retained Session. Mark the adapted scenario as `recording: authored`. Ordinary successful scripts derive from their selected Session.
|
||||
|
||||
### What can go wrong
|
||||
|
||||
- **The fixture is not fully consumed** — `assertConsumed()` at teardown turns a scenario that silently drove fewer model calls than recorded into a crisp diagnostic; call it when installing replay directly in a test.
|
||||
|
||||
@@ -9,7 +9,7 @@ kind: "package-reference"
|
||||
|
||||
## 概述
|
||||
|
||||
`dsh-llm-replay` 从已记录的 Session JSONL fixture(测试前置数据)回放模型流,让快照测试无需 API 密钥即可运行真实 agent。每个 parent 与 subagent 会话按首次调用顺序取得各自的已记录脚本,而同一会话内的调用会独立推进。`replay.override.json` 伴随文件表示持久 settlement 无法重建的分片前失败、取消、挂起与注入重试。需要以固定模型输出确定性测试真实 loop 行为时,可在 ACP(Agent Client Protocol)、headless 与 Web 浏览器场景中使用本包。
|
||||
`dsh-llm-replay` 从已记录的 Session JSONL fixture(测试前置数据)回放模型流,让快照测试无需 API 密钥即可运行真实 agent。每个 parent 与 subagent 会话按首次调用顺序取得各自的已记录脚本,而同一会话内的调用会独立推进。`replay.override.json` 伴随文件提供所选 fixture 中缺失的场景行为,包括失败、取消、挂起、重试和对保留程序的人工改写。需要以固定模型输出确定性测试真实 loop 行为时,可在 ACP(Agent Client Protocol)、headless 与 Web 浏览器场景中使用本包。
|
||||
|
||||
## 目录
|
||||
|
||||
@@ -79,6 +79,8 @@ parent agent 委托给进程内 subagent 的场景会为每个 Session 记录一
|
||||
|
||||
有两种失败模式无法仅根据持久 Assistant settlement 重建:任何 chunk 之前的纯 throw 没有携带异常的 stream member,而 cancel/hang 需要的是不终止语义,不能用有限前缀回放。需要这些行为的场景可提供可选伴随文件(`<scenario>/replay.override.json`):它用裸 `ReplayEntry[]` 替换派生脚本,或用 `{ patches: [{ at, entry }] }` 增补——保留所有派生调用,只替换指定的从 0 开始计数的调用索引;当 `at` 等于派生长度时,则在注入瞬态异常后的重试位置追加。有前缀分片的 `throw` 条目会接受 DeepSeek 请求扩展;零分片 throw 默认表示 2xx 前未接受,也可设 `accepted: true` 表示 2xx 后无分片失败。`hang` 条目可以指定 `readyFile`,回放在等待取消前写入它,使外部 driver 可以确定性取消。
|
||||
|
||||
固定在历史录制或已停用工具录制上的场景,可以用 authored override 调整程序以遵循当前执行说明,同时保留原 Session。将调整后的场景标为 `recording: authored`。普通成功脚本直接从所选 Session 派生。
|
||||
|
||||
### 可能出什么问题
|
||||
|
||||
- **fixture 未被完全消费**——在测试中直接安装回放时调用 `assertConsumed()`,它会把场景静默驱动的模型调用少于记录数转换为明确诊断。
|
||||
|
||||
@@ -29,7 +29,7 @@ export interface SnapshotHeaderManifest {
|
||||
promptChanges?: number
|
||||
}
|
||||
|
||||
/** Replay facts that cannot be reconstructed from successful model chunks. */
|
||||
/** Scenario behavior absent from the selected fixture, including retained-program adaptations. */
|
||||
export interface SnapshotReplayManifest {
|
||||
/** A scenario-local `replay.override.json` replaces or patches the recorded model script. */
|
||||
override: true
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The user wants me to write a single run_code program that:\n1. Calls bash tool twice: `echo CODE_ONE` and `echo CODE_TWO`\n2. console.log exactly `captured output`\n3. Return the two outputs joined with a plus sign\n\nLet me write this."}},
|
||||
{"type":"block-end","index":1,"block":{"type":"tool-call","id":"call_00_UiQPVqoELyzBZCY5pm1z7875","name":"run_code","arguments":"{\"code\":\"\\nconst out1 = await tools.bash({command: \\\"echo CODE_ONE\\\", description: \\\"Print CODE_ONE\\\"});\\nconst out2 = await tools.bash({command: \\\"echo CODE_TWO\\\", description: \\\"Print CODE_TWO\\\"});\\nHarness.inspect(\\\"captured output\\\");\\nconst text1 = out1.stdout.text.trim();\\nconst text2 = out2.stdout.text.trim();\\nHarness.inspect(text1 + \\\"+\\\" + text2); return;\\n\",\"description\":\"Run two echo commands and join outputs\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":6152,"outputTokens":214,"cacheReadTokens":0,"reasoningTokens":60}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The program ran successfully. The console.log output \"captured output\" appeared, and the return value is \"CODE_ONE+CODE_TWO\". The user asked me to reply with that joined string only."}},
|
||||
{"type":"block-end","index":1,"block":{"type":"text","text":"CODE_ONE+CODE_TWO"}},
|
||||
{"type":"usage","usage":{"inputTokens":117,"outputTokens":50,"cacheReadTokens":6272,"reasoningTokens":42}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2,8 +2,6 @@ version: 1
|
||||
scenario: ptc-turn
|
||||
profile: sdk
|
||||
composition: ptc
|
||||
recording: live
|
||||
recording: authored
|
||||
header:
|
||||
class: ptc
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,26 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"denied-native","name":"bash","arguments":"{\"command\":\"echo AUTO_DENIED\"}"}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"denied-code","name":"run_code","arguments":"{\"code\":\"try { await tools.bash({command: \\\"echo AUTO_DENIED\\\"}) } catch (error) { Harness.inspect(error.message); return; }\",\"description\":\"Catch one denied inner call\"}"}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"ERROR_DETAILS_OK"}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -8,5 +8,3 @@ header:
|
||||
pin: true
|
||||
changes: 1
|
||||
promptChanges: 1
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,56 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"advanced-inspect-before","name":"cordis_inspect_list","arguments":"{}"}},
|
||||
{"type":"usage","usage":{"inputTokens":3,"outputTokens":3}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"advanced-code","name":"run_code","arguments":"{\"code\":\"const inspected = await tools.cordis_inspect_list({}); Harness.inspect(JSON.stringify(inspected.providers.map(provider => provider.id), null, 2)); return;\",\"description\":\"Discover runtime APIs through PTC\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":3,"outputTokens":3}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"advanced-direct-child","name":"subagent","arguments":"{\"description\":\"Check direct child\",\"prompt\":\"Reply with exactly DIRECT_CHILD_OK and nothing else.\",\"run_in_background\":false}"}},
|
||||
{"type":"usage","usage":{"inputTokens":3,"outputTokens":3}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"advanced-workflow","name":"workflow","arguments":"{\"script\":\"phase('Delegate')\\nconst reply = await agent('Reply with exactly WORKFLOW_CHILD_OK and nothing else.', { label: 'workflow-child' })\\nreturn { reply }\",\"meta\":{\"name\":\"advanced-headless-snapshot\",\"description\":\"exercise one workflow child through the headless agent\"}}"}},
|
||||
{"type":"usage","usage":{"inputTokens":3,"outputTokens":3}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"advanced-inspect-after","name":"cordis_inspect_list","arguments":"{}"}},
|
||||
{"type":"usage","usage":{"inputTokens":3,"outputTokens":3}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"ADVANCED_HEADLESS_OK"}},
|
||||
{"type":"usage","usage":{"inputTokens":3,"outputTokens":3}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -9,5 +9,3 @@ header:
|
||||
changes: 2
|
||||
promptChanges: 2
|
||||
childSystemPrompts: [1, 2]
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,24 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The user wants me to call the run_code tool with a TypeScript program that runs `echo BOTH_OK` via `tools.bash` and returns its output."}},
|
||||
{"type":"block-end","index":1,"block":{"type":"tool-call","id":"call_00_Era4M5eh79bvNOIey5q90401","name":"run_code","arguments":"{\"code\":\"const result = await tools.bash({ command: \\\"echo BOTH_OK\\\", description: \\\"Print BOTH_OK\\\" });\\nHarness.inspect(result.stdout.text); return;\",\"description\":\"Run echo BOTH_OK via tools.bash\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10400,"outputTokens":130,"cacheReadTokens":0,"reasoningTokens":34}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The output is \"BOTH_OK\" (with a trailing newline, but that's fine). The user asked me to reply with that output only."}},
|
||||
{"type":"block-end","index":1,"block":{"type":"text","text":"BOTH_OK"}},
|
||||
{"type":"usage","usage":{"inputTokens":50,"outputTokens":35,"cacheReadTokens":10496,"reasoningTokens":31}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2,10 +2,8 @@ version: 1
|
||||
scenario: both-mode-turn
|
||||
profile: headless
|
||||
composition: ptc-shell
|
||||
recording: live
|
||||
recording: authored
|
||||
header:
|
||||
class: ptc-shell
|
||||
pin: true
|
||||
toolSchemasSource: ptc-turn
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,20 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_00_ET_nCgG71pOO3KB4MYELUyr5350","name":"run_code","arguments":"{\"code\":\"const a = await tools.bash({ command: 'echo CODE_ONE', description: 'Echo CODE_ONE' });\\nconst b = await tools.bash({ command: 'echo CODE_TWO', description: 'Echo CODE_TWO' });\\nconst out1 = a.kind === 'foreground' ? a.stdout.text.trim() : '';\\nconst out2 = b.kind === 'foreground' ? b.stdout.text.trim() : '';\\nHarness.inspect('captured output');\\nHarness.inspect(out1 + '+' + out2); return;\",\"description\":\"Run two bash echoes and join outputs\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":8689,"outputTokens":166,"totalTokens":8855,"cacheReadTokens":0,"reasoningTokens":0}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"CODE_ONE+CODE_TWO"}},
|
||||
{"type":"usage","usage":{"inputTokens":174,"outputTokens":8,"totalTokens":8886,"cacheReadTokens":8704,"reasoningTokens":0}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2,11 +2,9 @@ version: 1
|
||||
scenario: mcp-empty-ptc
|
||||
profile: headless
|
||||
composition: mcp-empty-ptc
|
||||
recording: live
|
||||
recording: authored
|
||||
header:
|
||||
class: mcp-empty-ptc
|
||||
pin: true
|
||||
systemPromptSource: ptc-turn
|
||||
toolSchemasSource: ptc-turn
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,24 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-start","index":1,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"I'll query the catalog server's resources and templates, then read the three memo resources."}},
|
||||
{"type":"block-end","index":1,"block":{"type":"tool-call","id":"call_00_ET_jWtEEO7HWPCVcCNJHI8s6062","name":"run_code","arguments":"{\"code\":\"\\nconst [resources, templates] = await Promise.all([\\n tools.list_mcp_resources({ server: \\\"catalog\\\" }),\\n tools.list_mcp_resource_templates({ server: \\\"catalog\\\" }),\\n]);\\n\\nconst text = await tools.read_mcp_resource({ server: \\\"catalog\\\", uri: \\\"memo://text\\\" });\\nconst binary = await tools.read_mcp_resource({ server: \\\"catalog\\\", uri: \\\"memo://binary\\\" });\\nconst greeting = await tools.read_mcp_resource({ server: \\\"catalog\\\", uri: \\\"memo://greeting/reader\\\" });\\n\\n// Inspect binary contents without exposing blob data.\\nconst contents = (binary as any)?.contents;\\nconst first = Array.isArray(contents) ? contents[0] : undefined;\\nconst binaryAvailable = typeof first?.blob === \\\"string\\\" && first.blob.length > 0;\\n\\nHarness.inspect(JSON.stringify({\\n resources,\\n templates,\\n text,\\n greeting,\\n binarySummary: {\\n uri: first?.uri,\\n mimeType: first?.mimeType,\\n blobIsNonemptyString: binaryAvailable,\\n },\\n binaryAvailable,\\n}, null, 2)); return;\\n\",\"description\":\"List catalog MCP resources and read three memos\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":8736,"outputTokens":314,"totalTokens":9050,"cacheReadTokens":0,"reasoningTokens":0}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The task is done. Report results concisely and reply MCP_RESOURCES_PTC_DONE.\n\nNote: blob data not printed. Return the text and template results."}},
|
||||
{"type":"block-end","index":1,"block":{"type":"text","text":"Catalog server results:\n\n**Resources** (`memo://text`, `memo://binary`):\n- `memo://text` — \"Deterministic text memo.\" (text/plain)\n- `memo://binary` — \"Binary content for programmatic callers.\" (application/octet-stream)\n\n**Resource templates**:\n- `greeting` → `memo://greeting/{name}` — \"A greeting for the named reader.\" (text/plain)\n\n**Reads**:\n- `memo://text`: `MCP resource text with {{braces}} intact.` (braces kept literal)\n- `memo://greeting/reader`: `Hello, reader.`\n- `memo://binary`: blob verified in-program as a nonempty string; `binaryAvailable: true`. Blob data was neither printed nor returned.\n\nMCP_RESOURCES_PTC_DONE"}},
|
||||
{"type":"usage","usage":{"inputTokens":659,"outputTokens":221,"totalTokens":9840,"cacheReadTokens":8960,"reasoningTokens":35}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2,10 +2,8 @@ version: 1
|
||||
scenario: mcp-resources-ptc
|
||||
profile: headless
|
||||
composition: mcp-resources-ptc
|
||||
recording: live
|
||||
recording: authored
|
||||
header:
|
||||
class: mcp-resources-ptc
|
||||
pin: true
|
||||
toolSchemasSource: ptc-turn
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,27 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_office_skill","name":"run_code","arguments":"{\"code\":\"Harness.inspect(await tools.skill({\\\"name\\\":\\\"office\\\"}));\",\"description\":\"Load task instructions\"}"}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_office_2","name":"run_code","arguments":"{\"code\":\"Harness.inspect(await tools.skill({\\\"name\\\":\\\"office-docx\\\"}));\",\"description\":\"Load task instructions\"}"}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"DONE"}},
|
||||
{"type":"usage","usage":{"inputTokens":12,"outputTokens":2,"cacheReadTokens":10}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -11,5 +11,3 @@ header:
|
||||
promptChanges: 1
|
||||
workspace:
|
||||
setup: office-retired-ptc
|
||||
replay:
|
||||
override: true
|
||||
@@ -12,5 +12,6 @@ header:
|
||||
class: office-render-tools-ptc
|
||||
workspace:
|
||||
setup: office-retired-ptc
|
||||
# Adapt the retained retired-tool program to current explicit output.
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,20 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"code-image-call","name":"run_code","arguments":"{\"code\":\"const bytes = [137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,1,0,0,0,1,8,2,0,0,0,144,119,83,222,0,0,0,12,73,68,65,84,120,156,99,248,207,192,0,0,3,1,1,0,201,254,146,239,0,0,0,0,73,69,78,68,174,66,96,130];\\nawait tools.bash({ command: \\\"node -e \\\\\\\"require('node:fs').writeFileSync('red.png',Buffer.from([137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,1,0,0,0,1,8,2,0,0,0,144,119,83,222,0,0,0,12,73,68,65,84,120,156,99,248,207,192,0,0,3,1,1,0,201,254,146,239,0,0,0,0,73,69,78,68,174,66,96,130]));\\\\\\\"\\\", description: \\\"Create a one pixel PNG\\\" });\\nconst image = await tools.read_image({ file_path: \\\"red.png\\\" });\\nHarness.inspect(image.path); return;\",\"description\":\"Create and inspect one image\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":3,"outputTokens":3}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"DONE"}},
|
||||
{"type":"usage","usage":{"inputTokens":3,"outputTokens":3}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -10,5 +10,3 @@ header:
|
||||
platform: posix
|
||||
workspace:
|
||||
final: true
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,47 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"script_declare","name":"run_code","arguments":"{\"code\":\"let counter: number = 1; const alias = { value: counter }; function increment() { return ++counter }; class Box { [await Promise.resolve(\\\"read\\\")]() { return counter } };\",\"description\":\"Declare Script state with computed await\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"script_fresh","name":"run_code","arguments":"{\"code\":\"for (var{answer} of [{answer:42}]) { await 0 }; Harness.inspect(JSON.stringify(({ previous: typeof counter, answer: await(Promise.resolve(answer)) }), null, 2))\",\"description\":\"Verify compact var patterns and fresh Script state\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"script_binding","name":"run_code","arguments":"{\"code\":\"const result = await tools.bash({command:\\\"pwd\\\",description:\\\"Read working directory\\\"}); Harness.inspect(result.stdout.text.trim() === process.cwd())\",\"description\":\"Call a host binding from a fresh Script\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"script_native_syntax","name":"run_code","arguments":"{\"code\":\"let duplicate; let duplicate;\",\"description\":\"Inspect native Script syntax diagnostics\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"Verified Script completion, compact var declarations, native syntax diagnostics, host bindings, and fresh state between calls."}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":2}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -8,5 +8,3 @@ header:
|
||||
pin: true
|
||||
systemPromptSource: ptc-persistent
|
||||
permission: workspace-write
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,74 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"script_declare","name":"run_code","arguments":"{\"code\":\"let counter: number = 1; const alias = { value: counter }; function increment() { return ++counter }; class Box { [await Promise.resolve(\\\"read\\\")]() { return counter } };\",\"description\":\"Declare Script state with computed await\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"script_reuse","name":"run_code","arguments":"{\"code\":\"counter++; Harness.inspect(\\\"retained\\\", new Box().read()); Harness.inspect(JSON.stringify(({ count: increment(), alias: alias.value, answer: await(Promise.resolve(42)) }), null, 2))\",\"description\":\"Reuse retained Script declarations\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"script_binding","name":"run_code","arguments":"{\"code\":\"const cwdResult = await tools.bash({command:\\\"pwd\\\",description:\\\"Read working directory\\\"}); Harness.inspect(JSON.stringify(({ sameDirectory: cwdResult.stdout.text.trim() === process.cwd(), count: counter }), null, 2))\",\"description\":\"Call a host binding from Script\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"script_temporary_exit","name":"run_code","arguments":"{\"code\":\"process.exit(7)\",\"description\":\"End a separate temporary Script process\",\"sandbox_permissions\":\"danger-full-access\",\"justification\":\"Approve a separate temporary process to check that its exit leaves retained variables intact.\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"script_after_temporary","name":"run_code","arguments":"{\"code\":\"Harness.inspect(JSON.stringify(({ count: counter, fromClass: new Box().read() }), null, 2))\",\"description\":\"Verify retained Script state after temporary exit\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"script_exit","name":"run_code","arguments":"{\"code\":\"process.exit(7)\",\"description\":\"End the Script process\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"script_recover","name":"run_code","arguments":"{\"code\":\"Harness.inspect(JSON.stringify(({ previous: typeof counter, recreated: await Promise.resolve(4) }), null, 2))\",\"description\":\"Verify Script state was cleared\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"Verified Script completion, host bindings, and state retention and recovery."}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":2}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -10,5 +10,3 @@ header:
|
||||
permission: workspace-write
|
||||
workspace:
|
||||
setup: cua-script-guidance
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,38 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_keep","name":"run_code","arguments":"{\"code\":\"var kept = 42; Harness.inspect(kept)\",\"description\":\"Retain a value before execution times out\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_timeout","name":"run_code","arguments":"{\"code\":\"Harness.inspect(\\\"output before timeout\\\"); while (true) {}\",\"description\":\"Print partial output before an infinite loop\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_check","name":"run_code","arguments":"{\"code\":\"Harness.inspect(JSON.stringify(({ retained: typeof kept }), null, 2))\",\"description\":\"Check retained variables after execution times out\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"The execution timed out after printing output. The runtime was terminated and retained variables were cleared."}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -8,5 +8,3 @@ header:
|
||||
pin: true
|
||||
systemPromptSource: ptc-persistent
|
||||
permission: workspace-write
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,38 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_keep","name":"run_code","arguments":"{\"code\":\"var kept = 42; Harness.inspect(kept)\",\"description\":\"Retain a value before execution times out\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_timeout","name":"run_code","arguments":"{\"code\":\"Harness.inspect(\\\"output before timeout\\\"); try { await tools.bash({ description: \\\"Wait for cancellation\\\", command: \\\"echo should-not-run\\\" }) } catch { kept++ } finally { kept++ }\",\"description\":\"Print partial output before an asynchronous wait\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_check","name":"run_code","arguments":"{\"code\":\"Harness.inspect(JSON.stringify(({ retained: kept }), null, 2))\",\"description\":\"Check retained variables after execution times out\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"The execution timed out after printing output. The retained value is 44 after catch and finally handled tool cancellation."}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -9,5 +9,3 @@ header:
|
||||
systemPromptSource: ptc-persistent
|
||||
toolSchemasSource: ptc-timeout-fallback
|
||||
permission: workspace-write
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,22 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_limit","name":"run_code","arguments":"{\"code\":\"try { for (let n = 0; n < 3; n++) await tools.bash({ command: \\\"printf 'call\\\\n' >> calls.txt\\\", description: 'Append one completed call' }); } catch (error) { while (true) {} }\",\"description\":\"Verify the call limit terminates a caught loop\"}"}},
|
||||
{"type":"block-start","index":1,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":1,"block":{"type":"tool-call","id":"call_next","name":"run_code","arguments":"{\"code\":\"await tools.bash({ command: \\\"printf 'next\\\\n' >> calls.txt\\\", description: 'Append from a fresh program' }); Harness.inspect('next run succeeded'); return;\",\"description\":\"Verify the next program has fresh allowance\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"The third tool call exceeded the limit of two and terminated the entire program, including its catch loop. Check the program for an infinite loop. The next run_code succeeded with a fresh allowance."}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -7,5 +7,3 @@ header:
|
||||
class: ptc
|
||||
workspace:
|
||||
final: true
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,24 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The user wants me to write a single run_code program that:\n1. Calls bash tool twice: `echo CODE_ONE` and `echo CODE_TWO`\n2. console.log exactly `captured output`\n3. Return the two outputs joined with a plus sign\n\nLet me write this."}},
|
||||
{"type":"block-end","index":1,"block":{"type":"tool-call","id":"call_00_UiQPVqoELyzBZCY5pm1z7875","name":"run_code","arguments":"{\"code\":\"\\nconst out1 = await tools.bash({command: \\\"echo CODE_ONE\\\", description: \\\"Print CODE_ONE\\\"});\\nconst out2 = await tools.bash({command: \\\"echo CODE_TWO\\\", description: \\\"Print CODE_TWO\\\"});\\nHarness.inspect(\\\"captured output\\\");\\nconst text1 = out1.stdout.text.trim();\\nconst text2 = out2.stdout.text.trim();\\nHarness.inspect(text1 + \\\"+\\\" + text2); return;\\n\",\"description\":\"Run two echo commands and join outputs\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":6152,"outputTokens":214,"cacheReadTokens":0,"reasoningTokens":60}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The program ran successfully. The console.log output \"captured output\" appeared, and the return value is \"CODE_ONE+CODE_TWO\". The user asked me to reply with that joined string only."}},
|
||||
{"type":"block-end","index":1,"block":{"type":"text","text":"CODE_ONE+CODE_TWO"}},
|
||||
{"type":"usage","usage":{"inputTokens":117,"outputTokens":50,"cacheReadTokens":6272,"reasoningTokens":42}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2,9 +2,7 @@ version: 1
|
||||
scenario: ptc-turn
|
||||
profile: headless
|
||||
composition: ptc
|
||||
recording: live
|
||||
recording: authored
|
||||
header:
|
||||
class: ptc
|
||||
pin: true
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,30 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"tool-call-delta","index":0,"id":"official-subagent-code","name":"run_code","argumentsDelta":"{\"description\":\"Delegate through the official Claude bundle\",\"code\":\"const result = await tools.subagent_claude_code({ description: \\\"Read the fixture response\\\", prompt: \\\"Reply with OFFICIAL_SUBAGENT_OK exactly.\\\" });\\nif (result.kind !== \\\"activation\\\") throw new Error(\\\"Expected child activation\\\");\\nHarness.inspect(result.name);\"}"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"official-subagent-code","name":"run_code","arguments":"{\"description\":\"Delegate through the official Claude bundle\",\"code\":\"const result = await tools.subagent_claude_code({ description: \\\"Read the fixture response\\\", prompt: \\\"Reply with OFFICIAL_SUBAGENT_OK exactly.\\\" });\\nif (result.kind !== \\\"activation\\\") throw new Error(\\\"Expected child activation\\\");\\nHarness.inspect(result.name);\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":4}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"Waiting for the child result."}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":4}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"DONE"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":4}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -8,5 +8,3 @@ header:
|
||||
pin: true
|
||||
workspace:
|
||||
final: true
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,21 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"tool-call"},
|
||||
{"type":"tool-call-delta","index":0,"id":"optional-string-editor-code","name":"run_code","argumentsDelta":"{\"description\":\"Create a file with the optional editor\",\"code\":\"const path = (await import(\\\"node:path\\\")).join(process.cwd(), \\\"edited.txt\\\");\\nHarness.inspect(await tools.str_replace_editor({ command: \\\"create\\\", path, file_text: \\\"PTC_EDITOR_OK\\\\n\\\" }));\"}"},
|
||||
{"type":"block-end","index":0,"block":{"type":"tool-call","id":"optional-string-editor-code","name":"run_code","arguments":"{\"description\":\"Create a file with the optional editor\",\"code\":\"const path = (await import(\\\"node:path\\\")).join(process.cwd(), \\\"edited.txt\\\");\\nHarness.inspect(await tools.str_replace_editor({ command: \\\"create\\\", path, file_text: \\\"PTC_EDITOR_OK\\\\n\\\" }));\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":4}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"text","text":"DONE"}},
|
||||
{"type":"usage","usage":{"inputTokens":10,"outputTokens":4}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -8,5 +8,3 @@ header:
|
||||
pin: true
|
||||
workspace:
|
||||
final: true
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,25 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The user wants one run_code program that:\n1. Calls present for missing.txt and catches its error without creating that file.\n2. Uses bash to run exactly `printf \"DELIVERED_REPORT\\n\" > report.txt; printf \"DELIVERED_NOTE\\n\" > 说明.txt`.\n3. Calls present for report.txt and 说明.txt.\n4. After present succeeds, deliberately throws the string \"AFTER_PRESENT\" (not an Error object) from that same run_code program.\n5. Does not retry the program or create other files.\n6. Finishes by mentioning report.txt and 说明.txt in inline code, and put PRESENT_DONE in a separate paragraph.\n\nLet me write the program.\n\npresent tool args: { files: [{ path, description? }] }.\n\nSo first: try present for missing.txt — catch error. It should error because the file doesn't exist (present requires existing workspace file).\n\nThen bash run exact command. Note the command uses `;` inside a single string. Run as a single command string: `printf \"DELIVERED_REPORT\\n\" > report.txt; printf \"DELIVERED_NOTE\\n\" > 说明.txt`.\n\nWait — printf interprets the arguments... In bash, `printf \"DELIVERED_REPORT\\n\"` with the format string containing \\n — printf will interpret \\n as newline. Good.\n\nThen present for report.txt and 说明.txt.\n\nThen throw \"AFTER_PRESENT\" string. In TS async function body, `throw \"AFTER_PRESENT\"` works.\n\nLet me write it."}},
|
||||
{"type":"tool-call-delta","index":1,"id":"call_00_GgvYPol45qxGf6GezK3L3590","name":"run_code","argumentsDelta":"{\"code\":\"// Step 1: present for missing.txt — must fail, catch the error, don't create the file\\ntry {\\n await tools.present({ files: [{ path: \\\"missing.txt\\\", description: \\\"must not exist\\\" }] });\\n Harness.inspect(\\\"UNEXPECTED: present succeeded for missing.txt\\\");\\n} catch (err) {\\n Harness.inspect(\\\"Caught present error for missing.txt:\\\", typeof err, String(err).slice(0, 200));\\n}\\n\\n// Step 2: run the exact bash command to create the two report files\\nconst res = await tools.bash({\\n command: 'printf \\\"DELIVERED_REPORT\\\\n\\\" > report.txt; printf \\\"DELIVERED_NOTE\\\\n\\\" > 说明.txt',\\n description: \\\"Write DELIVERED_REPORT and DELIVERED_NOTE to files\\\",\\n});\\nHarness.inspect(\\\"bash exit:\\\", res.exitCode);\\n\\n// Step 3: present for report.txt and 说明.txt (must succeed)\\nconst p2 = await tools.present({\\n files: [\\n { path: \\\"report.txt\\\", description: \\\"delivered report\\\" },\\n { path: \\\"说明.txt\\\", description: \\\"delivered note\\\" },\\n ],\\n});\\nHarness.inspect(\\\"present ok, files:\\\", p2.files.map((f) => f.path).join(\\\", \\\"));\\n\\n// Step 4: deliberately throw a plain string AFTER_PRESENT (not an Error)\\nthrow \\\"AFTER_PRESENT\\\";\",\"description\":\"Present files then deliberately throw AFTER_PRESENT\"}"},
|
||||
{"type":"block-end","index":1,"block":{"type":"tool-call","id":"call_00_GgvYPol45qxGf6GezK3L3590","name":"run_code","arguments":"{\"code\":\"// Step 1: present for missing.txt — must fail, catch the error, don't create the file\\ntry {\\n await tools.present({ files: [{ path: \\\"missing.txt\\\", description: \\\"must not exist\\\" }] });\\n Harness.inspect(\\\"UNEXPECTED: present succeeded for missing.txt\\\");\\n} catch (err) {\\n Harness.inspect(\\\"Caught present error for missing.txt:\\\", typeof err, String(err).slice(0, 200));\\n}\\n\\n// Step 2: run the exact bash command to create the two report files\\nconst res = await tools.bash({\\n command: 'printf \\\"DELIVERED_REPORT\\\\n\\\" > report.txt; printf \\\"DELIVERED_NOTE\\\\n\\\" > 说明.txt',\\n description: \\\"Write DELIVERED_REPORT and DELIVERED_NOTE to files\\\",\\n});\\nHarness.inspect(\\\"bash exit:\\\", res.exitCode);\\n\\n// Step 3: present for report.txt and 说明.txt (must succeed)\\nconst p2 = await tools.present({\\n files: [\\n { path: \\\"report.txt\\\", description: \\\"delivered report\\\" },\\n { path: \\\"说明.txt\\\", description: \\\"delivered note\\\" },\\n ],\\n});\\nHarness.inspect(\\\"present ok, files:\\\", p2.files.map((f) => f.path).join(\\\", \\\"));\\n\\n// Step 4: deliberately throw a plain string AFTER_PRESENT (not an Error)\\nthrow \\\"AFTER_PRESENT\\\";\",\"description\":\"Present files then deliberately throw AFTER_PRESENT\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":981,"outputTokens":695,"totalTokens":9356,"cacheReadTokens":7680,"reasoningTokens":329}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The program ran as intended:\n1. present for missing.txt failed with a ToolCallError, caught and logged — missing.txt was not created.\n2. bash ran exactly the given command, exit 0.\n3. present succeeded for report.txt and 说明.txt.\n4. Then threw the plain string \"AFTER_PRESENT\" (program failed with that exception, as expected — not an Error object).\n\nI did not retry the program or create other files. Now finish mentioning `report.txt` and `说明.txt` in inline code, with PRESENT_DONE in a separate paragraph."}},
|
||||
{"type":"block-end","index":1,"block":{"type":"text","text":"The single program ran exactly as ordered: `present` for `missing.txt` failed and was caught (no file created), bash ran the exact command successfully, then `present` succeeded for `report.txt` and `说明.txt`, after which the program deliberately threw the string `AFTER_PRESENT` — no retries, no extra files.\n\nPRESENT_DONE"}},
|
||||
{"type":"usage","usage":{"inputTokens":94,"outputTokens":198,"totalTokens":9636,"cacheReadTokens":9344,"reasoningTokens":121}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2,10 +2,8 @@ version: 1
|
||||
scenario: present
|
||||
profile: web
|
||||
composition: web-ptc
|
||||
recording: live
|
||||
recording: authored
|
||||
header:
|
||||
class: web-ptc
|
||||
workspace:
|
||||
final: true
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,37 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The user wants me to use run_code with direct Node filesystem access to create approved.txt. First attempt read-only without escalation, catch only EPERM/EACCES/EROFS and return \"EXPECTED_SANDBOX_DENIAL\". Then if denied, retry with workspace-write escalation and justification.\n\nLet me do the first attempt."}},
|
||||
{"type":"tool-call-delta","index":1,"id":"call_00_QymLSBlefCVT2cty9W385328","name":"run_code","argumentsDelta":"{\"code\":\"const fs = await import(\\\"node:fs/promises\\\");\\ntry {\\n await fs.writeFile(\\\"approved.txt\\\", \\\"approved\\\\n\\\");\\n Harness.inspect(\\\"WROTE_OK\\\"); return;\\n} catch (err) {\\n const code = err && err.code;\\n if (code === \\\"EPERM\\\" || code === \\\"EACCES\\\" || code === \\\"EROFS\\\") {\\n Harness.inspect(\\\"EXPECTED_SANDBOX_DENIAL\\\"); return;\\n }\\n throw err;\\n}\",\"description\":\"Attempt approved.txt write under read-only sandbox\",\"timeoutMs\":120000}"},
|
||||
{"type":"block-end","index":1,"block":{"type":"tool-call","id":"call_00_QymLSBlefCVT2cty9W385328","name":"run_code","arguments":"{\"code\":\"const fs = await import(\\\"node:fs/promises\\\");\\ntry {\\n await fs.writeFile(\\\"approved.txt\\\", \\\"approved\\\\n\\\");\\n Harness.inspect(\\\"WROTE_OK\\\"); return;\\n} catch (err) {\\n const code = err && err.code;\\n if (code === \\\"EPERM\\\" || code === \\\"EACCES\\\" || code === \\\"EROFS\\\") {\\n Harness.inspect(\\\"EXPECTED_SANDBOX_DENIAL\\\"); return;\\n }\\n throw err;\\n}\",\"description\":\"Attempt approved.txt write under read-only sandbox\",\"timeoutMs\":120000}"}},
|
||||
{"type":"usage","usage":{"inputTokens":1316,"outputTokens":249,"totalTokens":9117,"cacheReadTokens":7552,"reasoningTokens":72}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The sandbox denied it. Now retry with escalation. Note that run_code supports sandbox_permissions and justification. Let me retry the exact same program with workspace-write."}},
|
||||
{"type":"tool-call-delta","index":1,"id":"call_00_3pIoFojggyHgQeOzCCph3114","name":"run_code","argumentsDelta":"{\"code\":\"const fs = await import(\\\"node:fs/promises\\\");\\ntry {\\n await fs.writeFile(\\\"approved.txt\\\", \\\"approved\\\\n\\\");\\n Harness.inspect(\\\"WROTE_OK\\\"); return;\\n} catch (err) {\\n const code = err && err.code;\\n if (code === \\\"EPERM\\\" || code === \\\"EACCES\\\" || code === \\\"EROFS\\\") {\\n Harness.inspect(\\\"EXPECTED_SANDBOX_DENIAL\\\"); return;\\n }\\n throw err;\\n}\",\"description\":\"Retry approved.txt write with workspace-write escalation\",\"sandbox_permissions\":\"workspace-write\",\"justification\":\"Create the file requested by the user\",\"timeoutMs\":120000}"},
|
||||
{"type":"block-end","index":1,"block":{"type":"tool-call","id":"call_00_3pIoFojggyHgQeOzCCph3114","name":"run_code","arguments":"{\"code\":\"const fs = await import(\\\"node:fs/promises\\\");\\ntry {\\n await fs.writeFile(\\\"approved.txt\\\", \\\"approved\\\\n\\\");\\n Harness.inspect(\\\"WROTE_OK\\\"); return;\\n} catch (err) {\\n const code = err && err.code;\\n if (code === \\\"EPERM\\\" || code === \\\"EACCES\\\" || code === \\\"EROFS\\\") {\\n Harness.inspect(\\\"EXPECTED_SANDBOX_DENIAL\\\"); return;\\n }\\n throw err;\\n}\",\"description\":\"Retry approved.txt write with workspace-write escalation\",\"sandbox_permissions\":\"workspace-write\",\"justification\":\"Create the file requested by the user\",\"timeoutMs\":120000}"}},
|
||||
{"type":"usage","usage":{"inputTokens":179,"outputTokens":260,"totalTokens":9399,"cacheReadTokens":8960,"reasoningTokens":37}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The file was written. Let me verify content? The user said \"After the file is written, reply DONE and stop.\" So reply DONE. Maybe verify quickly—but instructions say reply DONE and stop. I'll do a minimal verification read? The user said stop after. I think just reply DONE. But should I verify? The write returned OK. I'll reply DONE."}},
|
||||
{"type":"block-end","index":1,"block":{"type":"text","text":"DONE"}},
|
||||
{"type":"usage","usage":{"inputTokens":199,"outputTokens":84,"totalTokens":9499,"cacheReadTokens":9216,"reasoningTokens":81}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2,10 +2,8 @@ version: 1
|
||||
scenario: ptc-escalation-approved
|
||||
profile: web
|
||||
composition: web-ptc
|
||||
recording: live
|
||||
recording: authored
|
||||
header:
|
||||
class: web-ptc
|
||||
workspace:
|
||||
final: true
|
||||
replay:
|
||||
override: true
|
||||
@@ -1,25 +0,0 @@
|
||||
[
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"tool-call"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The user wants me to write a single `run_code` program that:\n1. Runs bash to echo \"CODE_ROUND_OK\"\n2. Tries to read a file \"missing.txt\" and catches the error\n3. Returns an object with both outcomes\n4. They also want me to reply \"DONE\" and stop after\n\nLet me write this program."}},
|
||||
{"type":"tool-call-delta","index":1,"id":"call_00_6VNoF1gDSerTBKoCfYSH3765","name":"run_code","argumentsDelta":"{\"description\":\"Run bash echo and catch missing file read\",\"code\":\"\\nconst bashResult = await tools.bash({\\n command: \\\"echo CODE_ROUND_OK\\\",\\n description: \\\"Echo CODE_ROUND_OK\\\"\\n});\\n\\nlet readError = null;\\ntry {\\n await tools.read({ file_path: \\\"missing.txt\\\" });\\n} catch (e) {\\n readError = {\\n toolName: e.toolName,\\n message: e.message\\n };\\n}\\n\\nHarness.inspect({ bash: bashResult.stdout.text.trim(), readError }); return;\\n\"}"},
|
||||
{"type":"block-end","index":1,"block":{"type":"tool-call","id":"call_00_6VNoF1gDSerTBKoCfYSH3765","name":"run_code","arguments":"{\"description\":\"Run bash echo and catch missing file read\",\"code\":\"\\nconst bashResult = await tools.bash({\\n command: \\\"echo CODE_ROUND_OK\\\",\\n description: \\\"Echo CODE_ROUND_OK\\\"\\n});\\n\\nlet readError = null;\\ntry {\\n await tools.read({ file_path: \\\"missing.txt\\\" });\\n} catch (e) {\\n readError = {\\n toolName: e.toolName,\\n message: e.message\\n };\\n}\\n\\nHarness.inspect({ bash: bashResult.stdout.text.trim(), readError }); return;\\n\"}"}},
|
||||
{"type":"usage","usage":{"inputTokens":8082,"outputTokens":235,"cacheReadTokens":384,"reasoningTokens":75}},
|
||||
{"type":"finish","reason":{"kind":"tool-calls"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "chunks",
|
||||
"chunks": [
|
||||
{"type":"block-start","index":0,"blockType":"reasoning"},
|
||||
{"type":"block-start","index":1,"blockType":"text"},
|
||||
{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The program ran successfully. Let me now reply DONE as instructed."}},
|
||||
{"type":"block-end","index":1,"block":{"type":"text","text":"DONE"}},
|
||||
{"type":"usage","usage":{"inputTokens":196,"outputTokens":17,"cacheReadTokens":8576,"reasoningTokens":14}},
|
||||
{"type":"finish","reason":{"kind":"stop"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2,9 +2,7 @@ version: 1
|
||||
scenario: ptc-round
|
||||
profile: web
|
||||
composition: web-ptc
|
||||
recording: live
|
||||
recording: authored
|
||||
header:
|
||||
class: web-ptc
|
||||
pin: true
|
||||
replay:
|
||||
override: true
|
||||
Reference in new issue
Block a user