@yanlinglabs/winter-conformance 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +128 -0
  3. package/dist/bun-required.d.ts +54 -0
  4. package/dist/goldens.d.ts +11 -0
  5. package/dist/index-v0zvhx0z.js +1576 -0
  6. package/dist/index-z5gwvsfh.js +49 -0
  7. package/dist/index.d.ts +5 -0
  8. package/dist/index.js +49 -0
  9. package/dist/official/capture.d.ts +1 -0
  10. package/dist/official/fetch.d.ts +40 -0
  11. package/dist/official/index.d.ts +3 -0
  12. package/dist/official/index.js +27 -0
  13. package/dist/trace.d.ts +9 -0
  14. package/dist/trace.js +8 -0
  15. package/goldens/advertised-set-round.trace.json +81 -0
  16. package/goldens/background-task-round.trace.json +210 -0
  17. package/goldens/bash-background-round.trace.json +148 -0
  18. package/goldens/canusetool-approved-round.trace.json +119 -0
  19. package/goldens/compaction-auto-round.trace.json +219 -0
  20. package/goldens/compaction-manual-round.trace.json +232 -0
  21. package/goldens/denied-tool-round.trace.json +141 -0
  22. package/goldens/hook-denied-round.trace.json +169 -0
  23. package/goldens/hooked-tool-round.trace.json +147 -0
  24. package/goldens/interrupt.trace.json +129 -0
  25. package/goldens/mcp-tool-round.trace.json +131 -0
  26. package/goldens/messaging-facet-round.trace.json +278 -0
  27. package/goldens/mode-switch-mid-session.trace.json +200 -0
  28. package/goldens/multi-turn.trace.json +110 -0
  29. package/goldens/p6-anthropic-fake.trace.json +147 -0
  30. package/goldens/p6-gemini-fake.trace.json +132 -0
  31. package/goldens/p6-openai-chat-fake.trace.json +133 -0
  32. package/goldens/p6-openai-responses-fake.trace.json +145 -0
  33. package/goldens/p6-resolution-failure.trace.json +68 -0
  34. package/goldens/plain-query.trace.json +82 -0
  35. package/goldens/resume.trace.json +162 -0
  36. package/goldens/sendmessage-child-round.trace.json +158 -0
  37. package/goldens/skill-invocation-round.trace.json +123 -0
  38. package/goldens/structured-exhaustion-round.trace.json +182 -0
  39. package/goldens/structured-output-round.trace.json +106 -0
  40. package/goldens/subagent-permission-round.trace.json +174 -0
  41. package/goldens/subagent-spawn-round.trace.json +120 -0
  42. package/goldens/tool-round.trace.json +119 -0
  43. package/goldens/toolsearch-select-round.trace.json +185 -0
  44. package/package.json +50 -0
@@ -0,0 +1,49 @@
1
+ // src/trace.ts
2
+ var VOLATILE = new Set(["session_id", "sessionId", "uuid", "toolUseID", "requestId", "total_cost_usd", "duration_ms", "durationMs", "timestamp"]);
3
+ function normalizeTrace2(entries) {
4
+ return entries.map((e, i) => ({ ...e, sequence: i, payload: strip(e.payload) }));
5
+ }
6
+ function strip(v) {
7
+ if (Array.isArray(v))
8
+ return v.map(strip);
9
+ if (v && typeof v === "object") {
10
+ const out = {};
11
+ for (const [k, val] of Object.entries(v))
12
+ if (!VOLATILE.has(k))
13
+ out[k] = strip(val);
14
+ return out;
15
+ }
16
+ return v;
17
+ }
18
+ function sortKeysDeep(v) {
19
+ if (Array.isArray(v))
20
+ return v.map(sortKeysDeep);
21
+ if (v && typeof v === "object") {
22
+ const out = {};
23
+ for (const k of Object.keys(v).sort())
24
+ out[k] = sortKeysDeep(v[k]);
25
+ return out;
26
+ }
27
+ return v;
28
+ }
29
+ function canonicalStringify(v) {
30
+ return JSON.stringify(sortKeysDeep(v));
31
+ }
32
+ function compareTraces2(a, b) {
33
+ const diffs = [];
34
+ const n = Math.max(a.length, b.length);
35
+ for (let i = 0;i < n; i++) {
36
+ const x = a[i], y = b[i];
37
+ if (!x || !y) {
38
+ diffs.push(`length mismatch at ${i}`);
39
+ continue;
40
+ }
41
+ if (x.kind !== y.kind)
42
+ diffs.push(`kind@${i}: ${x.kind} != ${y.kind}`);
43
+ if (canonicalStringify(x.payload) !== canonicalStringify(y.payload))
44
+ diffs.push(`payload@${i} (${x.kind}) differs`);
45
+ }
46
+ return diffs;
47
+ }
48
+
49
+ export { normalizeTrace2, compareTraces2 };
@@ -0,0 +1,5 @@
1
+ export { compareTraces, normalizeTrace } from "./trace.js";
2
+ export type { ConformanceTraceEntry } from "./trace.js";
3
+ export { goldenPath, listGoldens, loadGolden } from "./goldens.js";
4
+ export { ChecksumMismatchError, OfficialCompatUnavailableError, fetchAndVerifyUpstream, getChecksums, resolveCacheDir, runCapture, verifyDigest, verifySha512Integrity } from "./official/index.js";
5
+ export { BunRequiredError, hasBunRuntime, requireBunRuntime } from "./bun-required.js";
package/dist/index.js ADDED
@@ -0,0 +1,49 @@
1
+ import {
2
+ normalizeTrace2,
3
+ compareTraces2
4
+ } from "./index-z5gwvsfh.js";
5
+ import {
6
+ BunRequiredError2,
7
+ hasBunRuntime2,
8
+ requireBunRuntime2,
9
+ ChecksumMismatchError2,
10
+ OfficialCompatUnavailableError2,
11
+ getChecksums2,
12
+ verifyDigest2,
13
+ verifySha512Integrity2,
14
+ resolveCacheDir2,
15
+ fetchAndVerifyUpstream2,
16
+ runCapture2
17
+ } from "./index-v0zvhx0z.js";
18
+ // src/goldens.ts
19
+ import { readFileSync, readdirSync } from "node:fs";
20
+ import { join } from "node:path";
21
+ import { fileURLToPath } from "node:url";
22
+ var GOLDENS_DIR = fileURLToPath(new URL("../goldens/", import.meta.url));
23
+ function listGoldens() {
24
+ return readdirSync(GOLDENS_DIR).filter((name) => name.endsWith(".trace.json")).sort();
25
+ }
26
+ function goldenPath(name) {
27
+ return join(GOLDENS_DIR, name);
28
+ }
29
+ function loadGolden(name) {
30
+ return JSON.parse(readFileSync(goldenPath(name), "utf8"));
31
+ }
32
+ export {
33
+ BunRequiredError2 as BunRequiredError,
34
+ ChecksumMismatchError2 as ChecksumMismatchError,
35
+ OfficialCompatUnavailableError2 as OfficialCompatUnavailableError,
36
+ compareTraces2 as compareTraces,
37
+ fetchAndVerifyUpstream2 as fetchAndVerifyUpstream,
38
+ getChecksums2 as getChecksums,
39
+ goldenPath,
40
+ hasBunRuntime2 as hasBunRuntime,
41
+ listGoldens,
42
+ loadGolden,
43
+ normalizeTrace2 as normalizeTrace,
44
+ requireBunRuntime2 as requireBunRuntime,
45
+ resolveCacheDir2 as resolveCacheDir,
46
+ runCapture2 as runCapture,
47
+ verifyDigest2 as verifyDigest,
48
+ verifySha512Integrity2 as verifySha512Integrity
49
+ };
@@ -0,0 +1 @@
1
+ export declare function runCapture(): Promise<void>;
@@ -0,0 +1,40 @@
1
+ declare const CHECKSUM_MISMATCH_BRAND: unique symbol;
2
+ declare const OFFICIAL_COMPAT_UNAVAILABLE_BRAND: unique symbol;
3
+ export declare class ChecksumMismatchError extends Error {
4
+ readonly [CHECKSUM_MISMATCH_BRAND] = true;
5
+ static [Symbol.hasInstance]: (candidate: unknown) => boolean;
6
+ constructor(message: string);
7
+ }
8
+ /** Thrown by `getChecksums()` when `compat/anthropic/0.3.250/checksums.json` is absent -- i.e. this module is running from an INSTALLED package rather than a repository checkout. Never a raw ENOENT. */
9
+ export declare class OfficialCompatUnavailableError extends Error {
10
+ readonly [OFFICIAL_COMPAT_UNAVAILABLE_BRAND] = true;
11
+ static [Symbol.hasInstance]: (candidate: unknown) => boolean;
12
+ constructor(message: string);
13
+ }
14
+ interface UpstreamChecksums {
15
+ tarballUrl: string;
16
+ wrapperTarballSha256: string;
17
+ wrapperTarballIntegrity: string;
18
+ }
19
+ /**
20
+ * Lazily reads and memoizes the pinned-upstream checksums. Called ONLY from inside
21
+ * `fetchAndVerifyUpstream()` -- never at module load -- so importing this file (directly or through
22
+ * a barrel) never touches the filesystem. When `compat/` is absent (an installed package, per
23
+ * R-7a-12), throws a typed, worded `OfficialCompatUnavailableError` instead of letting a raw `ENOENT`
24
+ * surface with no explanation of why.
25
+ */
26
+ export declare function getChecksums(): UpstreamChecksums;
27
+ export declare function verifyDigest(bytes: Uint8Array, expected: string): void;
28
+ export declare function verifySha512Integrity(bytes: Uint8Array, expectedIntegrity: string): void;
29
+ export declare function resolveCacheDir(cacheDir?: string): {
30
+ dir: string;
31
+ ownedDir: boolean;
32
+ };
33
+ export declare function fetchAndVerifyUpstream(opts?: {
34
+ cacheDir?: string;
35
+ }): Promise<{
36
+ tarballPath: string;
37
+ sha256: string;
38
+ ownedDir: boolean;
39
+ }>;
40
+ export {};
@@ -0,0 +1,3 @@
1
+ export { ChecksumMismatchError, OfficialCompatUnavailableError, fetchAndVerifyUpstream, getChecksums, resolveCacheDir, verifyDigest, verifySha512Integrity } from "./fetch.js";
2
+ export { runCapture } from "./capture.js";
3
+ export { BunRequiredError, hasBunRuntime, requireBunRuntime } from "../bun-required.js";
@@ -0,0 +1,27 @@
1
+ import {
2
+ BunRequiredError2,
3
+ hasBunRuntime2,
4
+ requireBunRuntime2,
5
+ ChecksumMismatchError2,
6
+ OfficialCompatUnavailableError2,
7
+ getChecksums2,
8
+ verifyDigest2,
9
+ verifySha512Integrity2,
10
+ resolveCacheDir2,
11
+ fetchAndVerifyUpstream2,
12
+ runCapture2
13
+ } from "../index-v0zvhx0z.js";
14
+ import"../index-z5gwvsfh.js";
15
+ export {
16
+ BunRequiredError2 as BunRequiredError,
17
+ ChecksumMismatchError2 as ChecksumMismatchError,
18
+ OfficialCompatUnavailableError2 as OfficialCompatUnavailableError,
19
+ fetchAndVerifyUpstream2 as fetchAndVerifyUpstream,
20
+ getChecksums2 as getChecksums,
21
+ hasBunRuntime2 as hasBunRuntime,
22
+ requireBunRuntime2 as requireBunRuntime,
23
+ resolveCacheDir2 as resolveCacheDir,
24
+ runCapture2 as runCapture,
25
+ verifyDigest2 as verifyDigest,
26
+ verifySha512Integrity2 as verifySha512Integrity
27
+ };
@@ -0,0 +1,9 @@
1
+ export interface ConformanceTraceEntry {
2
+ sequence: number;
3
+ direction: "runtime-to-host" | "host-to-runtime" | "callback" | "process";
4
+ kind: string;
5
+ payload: unknown;
6
+ timestampClass?: "before" | "same-boundary" | "after";
7
+ }
8
+ export declare function normalizeTrace(entries: ConformanceTraceEntry[]): ConformanceTraceEntry[];
9
+ export declare function compareTraces(a: ConformanceTraceEntry[], b: ConformanceTraceEntry[]): string[];
package/dist/trace.js ADDED
@@ -0,0 +1,8 @@
1
+ import {
2
+ normalizeTrace2,
3
+ compareTraces2
4
+ } from "./index-z5gwvsfh.js";
5
+ export {
6
+ compareTraces2 as compareTraces,
7
+ normalizeTrace2 as normalizeTrace
8
+ };
@@ -0,0 +1,81 @@
1
+ [
2
+ {
3
+ "sequence": 0,
4
+ "direction": "runtime-to-host",
5
+ "kind": "system/init",
6
+ "payload": {
7
+ "type": "system",
8
+ "subtype": "init",
9
+ "cwd": "/winter-fixture",
10
+ "model": "winter-test/echo",
11
+ "permissionMode": "default",
12
+ "tools": [
13
+ "Agent",
14
+ "AskUserQuestion",
15
+ "CronCreate",
16
+ "CronDelete",
17
+ "CronList",
18
+ "Edit",
19
+ "EnterPlanMode",
20
+ "EnterWorktree",
21
+ "ExitPlanMode",
22
+ "ExitWorktree",
23
+ "Glob",
24
+ "Grep",
25
+ "ListAgents",
26
+ "Monitor",
27
+ "NotebookEdit",
28
+ "PushNotification",
29
+ "Read",
30
+ "ReadNotifications",
31
+ "ReportFindings",
32
+ "ScheduleWakeup",
33
+ "SendMessage",
34
+ "Skill",
35
+ "TaskCreate",
36
+ "TaskGet",
37
+ "TaskList",
38
+ "TaskOutput",
39
+ "TaskStop",
40
+ "TaskUpdate",
41
+ "Workflow",
42
+ "Write"
43
+ ],
44
+ "apiKeySource": "none",
45
+ "slash_commands": [
46
+ "compact"
47
+ ],
48
+ "output_style": "default",
49
+ "skills": [],
50
+ "plugins": []
51
+ }
52
+ },
53
+ {
54
+ "sequence": 1,
55
+ "direction": "runtime-to-host",
56
+ "kind": "assistant",
57
+ "payload": {
58
+ "type": "assistant",
59
+ "message": {
60
+ "content": [
61
+ {
62
+ "type": "text",
63
+ "text": "echo: <system-reminder>\nAuto-memory (injected by the runtime, not typed by the user):\nAuto-memory for this project lives at /winter-home/projects/-winter-fixture/memory. The directory is created on demand and there are no memory tools: read and write it with the ordinary file tools, exactly like any other directory.\n\n/winter-home/projects/-winter-fixture/memory/MEMORY.md is the INDEX, and only its first 200 lines / 25 KB are loaded into a session. Keep every index entry to one line; the substance belongs in the topic file it points at, which you can read on demand when it turns out to matter.\n\nTo record something worth having in a LATER session -- a standing preference, a correction you were given, a durable constraint of this project -- write it to its own `<slug>.md` in that directory and add a one-line pointer to the index: `- [<slug>](<slug>.md) — <one-line summary>`.\n\nRevise a fact by rewriting its file and its index line, never by adding a near-duplicate under a new name; remove both once it stops being true. An index full of stale near-duplicates is worse than an empty one, because it costs the same and misleads.\n\nDo not record what the repository already records. Code, configuration, documentation and WINTER.md are durable on their own; memory is for what is true about this project or this user and lives nowhere in the tree.\n</system-reminder>\n\nhi"
64
+ }
65
+ ]
66
+ }
67
+ }
68
+ },
69
+ {
70
+ "sequence": 2,
71
+ "direction": "runtime-to-host",
72
+ "kind": "result",
73
+ "payload": {
74
+ "type": "result",
75
+ "subtype": "success",
76
+ "is_error": false,
77
+ "result": "echo: <system-reminder>\nAuto-memory (injected by the runtime, not typed by the user):\nAuto-memory for this project lives at /winter-home/projects/-winter-fixture/memory. The directory is created on demand and there are no memory tools: read and write it with the ordinary file tools, exactly like any other directory.\n\n/winter-home/projects/-winter-fixture/memory/MEMORY.md is the INDEX, and only its first 200 lines / 25 KB are loaded into a session. Keep every index entry to one line; the substance belongs in the topic file it points at, which you can read on demand when it turns out to matter.\n\nTo record something worth having in a LATER session -- a standing preference, a correction you were given, a durable constraint of this project -- write it to its own `<slug>.md` in that directory and add a one-line pointer to the index: `- [<slug>](<slug>.md) — <one-line summary>`.\n\nRevise a fact by rewriting its file and its index line, never by adding a near-duplicate under a new name; remove both once it stops being true. An index full of stale near-duplicates is worse than an empty one, because it costs the same and misleads.\n\nDo not record what the repository already records. Code, configuration, documentation and WINTER.md are durable on their own; memory is for what is true about this project or this user and lives nowhere in the tree.\n</system-reminder>\n\nhi",
78
+ "permission_denials": []
79
+ }
80
+ }
81
+ ]
@@ -0,0 +1,210 @@
1
+ [
2
+ {
3
+ "sequence": 0,
4
+ "direction": "runtime-to-host",
5
+ "kind": "system/init",
6
+ "payload": {
7
+ "type": "system",
8
+ "subtype": "init",
9
+ "cwd": "/winter-fixture",
10
+ "model": "winter-test/echo",
11
+ "permissionMode": "default",
12
+ "tools": [
13
+ "Agent",
14
+ "AskUserQuestion",
15
+ "Bash",
16
+ "CronCreate",
17
+ "CronDelete",
18
+ "CronList",
19
+ "Edit",
20
+ "EnterPlanMode",
21
+ "EnterWorktree",
22
+ "ExitPlanMode",
23
+ "ExitWorktree",
24
+ "Glob",
25
+ "Grep",
26
+ "ListAgents",
27
+ "Monitor",
28
+ "NotebookEdit",
29
+ "PushNotification",
30
+ "Read",
31
+ "ReadNotifications",
32
+ "ReportFindings",
33
+ "ScheduleWakeup",
34
+ "SendMessage",
35
+ "Skill",
36
+ "TaskCreate",
37
+ "TaskGet",
38
+ "TaskList",
39
+ "TaskOutput",
40
+ "TaskStop",
41
+ "TaskUpdate",
42
+ "Workflow",
43
+ "Write"
44
+ ],
45
+ "apiKeySource": "none",
46
+ "slash_commands": [
47
+ "compact"
48
+ ],
49
+ "output_style": "default",
50
+ "skills": [],
51
+ "plugins": []
52
+ }
53
+ },
54
+ {
55
+ "sequence": 1,
56
+ "direction": "runtime-to-host",
57
+ "kind": "assistant",
58
+ "payload": {
59
+ "type": "assistant",
60
+ "message": {
61
+ "content": [
62
+ {
63
+ "type": "tool_use",
64
+ "id": "bgtask-call-1",
65
+ "name": "differential_bgtask_probe",
66
+ "input": {
67
+ "command": "sleep 100 &"
68
+ }
69
+ }
70
+ ]
71
+ }
72
+ }
73
+ },
74
+ {
75
+ "sequence": 2,
76
+ "direction": "runtime-to-host",
77
+ "kind": "system/task_started",
78
+ "payload": {
79
+ "type": "system",
80
+ "subtype": "task_started",
81
+ "task_id": "bgtask-differential-1",
82
+ "tool_use_id": "bgtask-call-1",
83
+ "description": "sleep 100 &",
84
+ "task_type": "local_bash",
85
+ "is_backgrounded": true
86
+ }
87
+ },
88
+ {
89
+ "sequence": 3,
90
+ "direction": "runtime-to-host",
91
+ "kind": "system/background_tasks_changed",
92
+ "payload": {
93
+ "type": "system",
94
+ "subtype": "background_tasks_changed",
95
+ "tasks": [
96
+ {
97
+ "task_id": "bgtask-differential-1",
98
+ "task_type": "local_bash",
99
+ "description": "sleep 100 &",
100
+ "ambient": false
101
+ }
102
+ ]
103
+ }
104
+ },
105
+ {
106
+ "sequence": 4,
107
+ "direction": "runtime-to-host",
108
+ "kind": "system/task_progress",
109
+ "payload": {
110
+ "type": "system",
111
+ "subtype": "task_progress",
112
+ "task_id": "bgtask-differential-1",
113
+ "tool_use_id": "bgtask-call-1",
114
+ "description": "sleep 100 &",
115
+ "usage": {
116
+ "total_tokens": 0,
117
+ "tool_uses": 0
118
+ },
119
+ "last_tool_name": "Bash",
120
+ "summary": "still running"
121
+ }
122
+ },
123
+ {
124
+ "sequence": 5,
125
+ "direction": "runtime-to-host",
126
+ "kind": "system/task_updated",
127
+ "payload": {
128
+ "type": "system",
129
+ "subtype": "task_updated",
130
+ "task_id": "bgtask-differential-1",
131
+ "patch": {
132
+ "status": "completed",
133
+ "end_time": 0
134
+ }
135
+ }
136
+ },
137
+ {
138
+ "sequence": 6,
139
+ "direction": "runtime-to-host",
140
+ "kind": "system/task_notification",
141
+ "payload": {
142
+ "type": "system",
143
+ "subtype": "task_notification",
144
+ "task_id": "bgtask-differential-1",
145
+ "tool_use_id": "bgtask-call-1",
146
+ "status": "completed",
147
+ "output_file": "/winter-fixture/tasks/bgtask-differential-1.output",
148
+ "summary": "background bash task finished",
149
+ "usage": {
150
+ "total_tokens": 0,
151
+ "tool_uses": 0
152
+ }
153
+ }
154
+ },
155
+ {
156
+ "sequence": 7,
157
+ "direction": "runtime-to-host",
158
+ "kind": "system/local_command_output",
159
+ "payload": {
160
+ "type": "system",
161
+ "subtype": "local_command_output",
162
+ "content": "[background] sleep 100 & -> completed"
163
+ }
164
+ },
165
+ {
166
+ "sequence": 8,
167
+ "direction": "runtime-to-host",
168
+ "kind": "user",
169
+ "payload": {
170
+ "type": "user",
171
+ "message": {
172
+ "content": [
173
+ {
174
+ "type": "tool_result",
175
+ "tool_use_id": "bgtask-call-1",
176
+ "content": "backgrounded"
177
+ }
178
+ ]
179
+ }
180
+ }
181
+ },
182
+ {
183
+ "sequence": 9,
184
+ "direction": "runtime-to-host",
185
+ "kind": "assistant",
186
+ "payload": {
187
+ "type": "assistant",
188
+ "message": {
189
+ "content": [
190
+ {
191
+ "type": "text",
192
+ "text": "backgrounded"
193
+ }
194
+ ]
195
+ }
196
+ }
197
+ },
198
+ {
199
+ "sequence": 10,
200
+ "direction": "runtime-to-host",
201
+ "kind": "result",
202
+ "payload": {
203
+ "type": "result",
204
+ "subtype": "success",
205
+ "is_error": false,
206
+ "result": "backgrounded",
207
+ "permission_denials": []
208
+ }
209
+ }
210
+ ]
@@ -0,0 +1,148 @@
1
+ [
2
+ {
3
+ "sequence": 0,
4
+ "direction": "runtime-to-host",
5
+ "kind": "system/init",
6
+ "payload": {
7
+ "type": "system",
8
+ "subtype": "init",
9
+ "cwd": "/winter-fixture",
10
+ "model": "winter-test/echo",
11
+ "permissionMode": "default",
12
+ "tools": [
13
+ "Agent",
14
+ "AskUserQuestion",
15
+ "Bash",
16
+ "CronCreate",
17
+ "CronDelete",
18
+ "CronList",
19
+ "Edit",
20
+ "EnterPlanMode",
21
+ "EnterWorktree",
22
+ "ExitPlanMode",
23
+ "ExitWorktree",
24
+ "Glob",
25
+ "Grep",
26
+ "ListAgents",
27
+ "Monitor",
28
+ "NotebookEdit",
29
+ "PushNotification",
30
+ "Read",
31
+ "ReadNotifications",
32
+ "ReportFindings",
33
+ "ScheduleWakeup",
34
+ "SendMessage",
35
+ "Skill",
36
+ "TaskCreate",
37
+ "TaskGet",
38
+ "TaskList",
39
+ "TaskOutput",
40
+ "TaskStop",
41
+ "TaskUpdate",
42
+ "Workflow",
43
+ "Write"
44
+ ],
45
+ "apiKeySource": "none",
46
+ "slash_commands": [
47
+ "compact"
48
+ ],
49
+ "output_style": "default",
50
+ "skills": [],
51
+ "plugins": []
52
+ }
53
+ },
54
+ {
55
+ "sequence": 1,
56
+ "direction": "runtime-to-host",
57
+ "kind": "assistant",
58
+ "payload": {
59
+ "type": "assistant",
60
+ "message": {
61
+ "content": [
62
+ {
63
+ "type": "tool_use",
64
+ "id": "bash-bg-call-1",
65
+ "name": "Bash",
66
+ "input": {
67
+ "command": "sleep 10",
68
+ "run_in_background": true
69
+ }
70
+ }
71
+ ]
72
+ }
73
+ }
74
+ },
75
+ {
76
+ "sequence": 2,
77
+ "direction": "runtime-to-host",
78
+ "kind": "system/task_started",
79
+ "payload": {
80
+ "type": "system",
81
+ "subtype": "task_started",
82
+ "task_id": "TASKID",
83
+ "description": "sleep 10",
84
+ "is_backgrounded": true
85
+ }
86
+ },
87
+ {
88
+ "sequence": 3,
89
+ "direction": "runtime-to-host",
90
+ "kind": "system/background_tasks_changed",
91
+ "payload": {
92
+ "type": "system",
93
+ "subtype": "background_tasks_changed",
94
+ "tasks": [
95
+ {
96
+ "task_id": "TASKID",
97
+ "task_type": "bash",
98
+ "description": "sleep 10"
99
+ }
100
+ ]
101
+ }
102
+ },
103
+ {
104
+ "sequence": 4,
105
+ "direction": "runtime-to-host",
106
+ "kind": "user",
107
+ "payload": {
108
+ "type": "user",
109
+ "message": {
110
+ "content": [
111
+ {
112
+ "type": "tool_result",
113
+ "tool_use_id": "bash-bg-call-1",
114
+ "content": "background task TASKID started\noutput_file: /winter-fixture-tasks/TASKID.output\n[sandbox: config-disabled]\nRead or grep that file for output as it accumulates; use task_output to peek, task_stop to stop it."
115
+ }
116
+ ]
117
+ }
118
+ }
119
+ },
120
+ {
121
+ "sequence": 5,
122
+ "direction": "runtime-to-host",
123
+ "kind": "assistant",
124
+ "payload": {
125
+ "type": "assistant",
126
+ "message": {
127
+ "content": [
128
+ {
129
+ "type": "text",
130
+ "text": "backgrounded"
131
+ }
132
+ ]
133
+ }
134
+ }
135
+ },
136
+ {
137
+ "sequence": 6,
138
+ "direction": "runtime-to-host",
139
+ "kind": "result",
140
+ "payload": {
141
+ "type": "result",
142
+ "subtype": "success",
143
+ "is_error": false,
144
+ "result": "backgrounded",
145
+ "permission_denials": []
146
+ }
147
+ }
148
+ ]