@vibefield/puppeteer-imposter 0.0.0-stage → 0.2.0

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 (250) hide show
  1. package/LICENSE +21 -0
  2. package/bin/ai.mjs +17 -0
  3. package/dist/cli/argv.d.ts +40 -0
  4. package/dist/cli/argv.d.ts.map +1 -0
  5. package/dist/cli/argv.js +62 -0
  6. package/dist/cli/argv.js.map +1 -0
  7. package/dist/cli/http-persona.d.ts +15 -0
  8. package/dist/cli/http-persona.d.ts.map +1 -0
  9. package/dist/cli/http-persona.js +216 -0
  10. package/dist/cli/http-persona.js.map +1 -0
  11. package/dist/cli/main.d.ts +11 -0
  12. package/dist/cli/main.d.ts.map +1 -0
  13. package/dist/cli/main.js +671 -0
  14. package/dist/cli/main.js.map +1 -0
  15. package/dist/cli/prompt-line.d.ts +27 -0
  16. package/dist/cli/prompt-line.d.ts.map +1 -0
  17. package/dist/cli/prompt-line.js +93 -0
  18. package/dist/cli/prompt-line.js.map +1 -0
  19. package/dist/control/client.d.ts +51 -0
  20. package/dist/control/client.d.ts.map +1 -0
  21. package/dist/control/client.js +206 -0
  22. package/dist/control/client.js.map +1 -0
  23. package/dist/control/index.d.ts +10 -0
  24. package/dist/control/index.d.ts.map +1 -0
  25. package/dist/control/index.js +10 -0
  26. package/dist/control/index.js.map +1 -0
  27. package/dist/control/peer.d.ts +42 -0
  28. package/dist/control/peer.d.ts.map +1 -0
  29. package/dist/control/peer.js +174 -0
  30. package/dist/control/peer.js.map +1 -0
  31. package/dist/control/protocol.d.ts +207 -0
  32. package/dist/control/protocol.d.ts.map +1 -0
  33. package/dist/control/protocol.js +535 -0
  34. package/dist/control/protocol.js.map +1 -0
  35. package/dist/index.d.ts +36 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +36 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/persona/launch.d.ts +7 -0
  40. package/dist/persona/launch.d.ts.map +1 -0
  41. package/dist/persona/launch.js +26 -0
  42. package/dist/persona/launch.js.map +1 -0
  43. package/dist/persona/load.d.ts +28 -0
  44. package/dist/persona/load.d.ts.map +1 -0
  45. package/dist/persona/load.js +705 -0
  46. package/dist/persona/load.js.map +1 -0
  47. package/dist/persona/session-id.d.ts +4 -0
  48. package/dist/persona/session-id.d.ts.map +1 -0
  49. package/dist/persona/session-id.js +12 -0
  50. package/dist/persona/session-id.js.map +1 -0
  51. package/dist/persona/types.d.ts +265 -0
  52. package/dist/persona/types.d.ts.map +1 -0
  53. package/dist/persona/types.js +38 -0
  54. package/dist/persona/types.js.map +1 -0
  55. package/dist/session/channels/hook.d.ts +31 -0
  56. package/dist/session/channels/hook.d.ts.map +1 -0
  57. package/dist/session/channels/hook.js +114 -0
  58. package/dist/session/channels/hook.js.map +1 -0
  59. package/dist/session/channels/http-sse.d.ts +67 -0
  60. package/dist/session/channels/http-sse.d.ts.map +1 -0
  61. package/dist/session/channels/http-sse.js +212 -0
  62. package/dist/session/channels/http-sse.js.map +1 -0
  63. package/dist/session/channels/jsonrpc.d.ts +56 -0
  64. package/dist/session/channels/jsonrpc.d.ts.map +1 -0
  65. package/dist/session/channels/jsonrpc.js +196 -0
  66. package/dist/session/channels/jsonrpc.js.map +1 -0
  67. package/dist/session/channels/leader-ipc.d.ts +27 -0
  68. package/dist/session/channels/leader-ipc.d.ts.map +1 -0
  69. package/dist/session/channels/leader-ipc.js +314 -0
  70. package/dist/session/channels/leader-ipc.js.map +1 -0
  71. package/dist/session/channels/native-store.d.ts +31 -0
  72. package/dist/session/channels/native-store.d.ts.map +1 -0
  73. package/dist/session/channels/native-store.js +275 -0
  74. package/dist/session/channels/native-store.js.map +1 -0
  75. package/dist/session/channels/statusline.d.ts +20 -0
  76. package/dist/session/channels/statusline.d.ts.map +1 -0
  77. package/dist/session/channels/statusline.js +48 -0
  78. package/dist/session/channels/statusline.js.map +1 -0
  79. package/dist/session/channels/terminal.d.ts +27 -0
  80. package/dist/session/channels/terminal.d.ts.map +1 -0
  81. package/dist/session/channels/terminal.js +108 -0
  82. package/dist/session/channels/terminal.js.map +1 -0
  83. package/dist/session/channels/transcript.d.ts +16 -0
  84. package/dist/session/channels/transcript.d.ts.map +1 -0
  85. package/dist/session/channels/transcript.js +24 -0
  86. package/dist/session/channels/transcript.js.map +1 -0
  87. package/dist/session/channels/ws-unix.d.ts +57 -0
  88. package/dist/session/channels/ws-unix.d.ts.map +1 -0
  89. package/dist/session/channels/ws-unix.js +396 -0
  90. package/dist/session/channels/ws-unix.js.map +1 -0
  91. package/dist/session/http-session-server.d.ts +31 -0
  92. package/dist/session/http-session-server.d.ts.map +1 -0
  93. package/dist/session/http-session-server.js +508 -0
  94. package/dist/session/http-session-server.js.map +1 -0
  95. package/dist/session/scenario-driver.d.ts +105 -0
  96. package/dist/session/scenario-driver.d.ts.map +1 -0
  97. package/dist/session/scenario-driver.js +211 -0
  98. package/dist/session/scenario-driver.js.map +1 -0
  99. package/dist/session/scenario.d.ts +119 -0
  100. package/dist/session/scenario.d.ts.map +1 -0
  101. package/dist/session/scenario.js +299 -0
  102. package/dist/session/scenario.js.map +1 -0
  103. package/dist/session/serve.d.ts +124 -0
  104. package/dist/session/serve.d.ts.map +1 -0
  105. package/dist/session/serve.js +136 -0
  106. package/dist/session/serve.js.map +1 -0
  107. package/dist/session/session.d.ts +125 -0
  108. package/dist/session/session.d.ts.map +1 -0
  109. package/dist/session/session.js +781 -0
  110. package/dist/session/session.js.map +1 -0
  111. package/dist/session/template.d.ts +35 -0
  112. package/dist/session/template.d.ts.map +1 -0
  113. package/dist/session/template.js +133 -0
  114. package/dist/session/template.js.map +1 -0
  115. package/dist/session/timeline.d.ts +81 -0
  116. package/dist/session/timeline.d.ts.map +1 -0
  117. package/dist/session/timeline.js +155 -0
  118. package/dist/session/timeline.js.map +1 -0
  119. package/dist/tui/app.d.ts +30 -0
  120. package/dist/tui/app.d.ts.map +1 -0
  121. package/dist/tui/app.js +72 -0
  122. package/dist/tui/app.js.map +1 -0
  123. package/dist/tui/mount.d.ts +37 -0
  124. package/dist/tui/mount.d.ts.map +1 -0
  125. package/dist/tui/mount.js +88 -0
  126. package/dist/tui/mount.js.map +1 -0
  127. package/dist/tui/store.d.ts +38 -0
  128. package/dist/tui/store.d.ts.map +1 -0
  129. package/dist/tui/store.js +56 -0
  130. package/dist/tui/store.js.map +1 -0
  131. package/dist/tui/theme.d.ts +40 -0
  132. package/dist/tui/theme.d.ts.map +1 -0
  133. package/dist/tui/theme.js +54 -0
  134. package/dist/tui/theme.js.map +1 -0
  135. package/package.json +67 -3
  136. package/personas/antigravity/behavior/happy-turn.json +9 -0
  137. package/personas/antigravity/ops.json +14 -0
  138. package/personas/antigravity/persona.json +15 -0
  139. package/personas/antigravity/runflows.json +6 -0
  140. package/personas/antigravity/scenarios/happy-turn.json +25 -0
  141. package/personas/claude/behavior/happy-turn.json +19 -0
  142. package/personas/claude/ops.json +128 -0
  143. package/personas/claude/persona.json +29 -0
  144. package/personas/claude/runflows.json +45 -0
  145. package/personas/claude/scenarios/channel-disconnect.json +19 -0
  146. package/personas/claude/scenarios/crash-mid-turn.json +42 -0
  147. package/personas/claude/scenarios/cross-layer-implementation.json +488 -0
  148. package/personas/claude/scenarios/deep-research.json +494 -0
  149. package/personas/claude/scenarios/duplicate-out-of-order.json +57 -0
  150. package/personas/claude/scenarios/flood.json +11 -0
  151. package/personas/claude/scenarios/happy-turn.json +57 -0
  152. package/personas/claude/scenarios/incident-investigation.json +465 -0
  153. package/personas/claude/scenarios/late-after-exit.json +27 -0
  154. package/personas/claude/scenarios/permission-allow.json +55 -0
  155. package/personas/claude/scenarios/permission-deny.json +71 -0
  156. package/personas/claude/scenarios/token-usage-refresh.json +33 -0
  157. package/personas/claude/scenarios/unknown-event.json +14 -0
  158. package/personas/codex/behavior/approval-turn.json +15 -0
  159. package/personas/codex/behavior/happy-turn.json +10 -0
  160. package/personas/codex/ops.json +159 -0
  161. package/personas/codex/persona.json +36 -0
  162. package/personas/codex/runflows.json +45 -0
  163. package/personas/codex/scenarios/channel-disconnect.json +31 -0
  164. package/personas/codex/scenarios/crash-mid-turn.json +30 -0
  165. package/personas/codex/scenarios/cross-layer-implementation.json +725 -0
  166. package/personas/codex/scenarios/deep-research.json +684 -0
  167. package/personas/codex/scenarios/duplicate-out-of-order.json +87 -0
  168. package/personas/codex/scenarios/flood.json +22 -0
  169. package/personas/codex/scenarios/happy-turn.json +81 -0
  170. package/personas/codex/scenarios/incident-investigation.json +695 -0
  171. package/personas/codex/scenarios/late-after-exit.json +59 -0
  172. package/personas/codex/scenarios/permission-allow.json +110 -0
  173. package/personas/codex/scenarios/permission-deny.json +83 -0
  174. package/personas/codex/scenarios/token-usage-refresh.json +49 -0
  175. package/personas/codex/scenarios/unknown-event.json +17 -0
  176. package/personas/codex/serve.json +124 -0
  177. package/personas/copilot/behavior/happy-turn.json +9 -0
  178. package/personas/copilot/ops.json +28 -0
  179. package/personas/copilot/persona.json +17 -0
  180. package/personas/copilot/runflows.json +6 -0
  181. package/personas/copilot/scenarios/happy-turn.json +50 -0
  182. package/personas/grok/behavior/approval-turn.json +16 -0
  183. package/personas/grok/behavior/happy-turn.json +13 -0
  184. package/personas/grok/ops.json +330 -0
  185. package/personas/grok/persona.json +24 -0
  186. package/personas/grok/runflows.json +25 -0
  187. package/personas/grok/scenarios/agent-team-lifecycle.json +74 -0
  188. package/personas/grok/scenarios/compact-lifecycle.json +61 -0
  189. package/personas/grok/serve.json +57 -0
  190. package/personas/hermes/behavior/approval-turn.json +11 -0
  191. package/personas/hermes/behavior/happy-turn.json +9 -0
  192. package/personas/hermes/ops.json +227 -0
  193. package/personas/hermes/persona.json +15 -0
  194. package/personas/hermes/runflows.json +50 -0
  195. package/personas/hermes/scenarios/happy-turn.json +25 -0
  196. package/personas/hermes/scenarios/late-after-exit.json +21 -0
  197. package/personas/hermes/scenarios/permission-deny.json +54 -0
  198. package/personas/hermes/scenarios/unknown-event.json +14 -0
  199. package/personas/hermes/serve.json +54 -0
  200. package/personas/kimi/behavior/happy-turn.json +9 -0
  201. package/personas/kimi/ops.json +357 -0
  202. package/personas/kimi/persona.json +23 -0
  203. package/personas/kimi/runflows.json +84 -0
  204. package/personas/kimi/scenarios/compaction-lifecycle.json +20 -0
  205. package/personas/kimi/scenarios/duplicate-out-of-order.json +60 -0
  206. package/personas/kimi/scenarios/happy-turn.json +66 -0
  207. package/personas/kimi/scenarios/late-after-end.json +28 -0
  208. package/personas/kimi/scenarios/tool-failure.json +43 -0
  209. package/personas/kimi/scenarios/tool-success.json +57 -0
  210. package/personas/kimi/scenarios/unknown-record.json +15 -0
  211. package/personas/opencode/README.md +32 -0
  212. package/personas/opencode/behavior/happy-turn.json +9 -0
  213. package/personas/opencode/behavior/permission-turn.json +18 -0
  214. package/personas/opencode/http-serve.json +72 -0
  215. package/personas/opencode/ops.json +250 -0
  216. package/personas/opencode/persona.json +22 -0
  217. package/personas/opencode/runflows.json +45 -0
  218. package/personas/opencode/scenarios/duplicate-event.json +27 -0
  219. package/personas/opencode/scenarios/failure.json +30 -0
  220. package/personas/opencode/scenarios/happy-turn.json +86 -0
  221. package/personas/opencode/scenarios/late-event.json +29 -0
  222. package/personas/opencode/scenarios/out-of-order.json +42 -0
  223. package/personas/opencode/scenarios/permission-allow.json +31 -0
  224. package/personas/opencode/scenarios/permission-deny.json +31 -0
  225. package/personas/opencode/scenarios/question-reject.json +37 -0
  226. package/personas/opencode/scenarios/question-reply.json +38 -0
  227. package/personas/opencode/scenarios/reconnect.json +22 -0
  228. package/personas/opencode/scenarios/resume.json +30 -0
  229. package/personas/opencode/scenarios/unknown-event.json +15 -0
  230. package/personas/pi/behavior/happy-turn.json +9 -0
  231. package/personas/pi/ops.json +19 -0
  232. package/personas/pi/persona.json +16 -0
  233. package/personas/pi/runflows.json +6 -0
  234. package/personas/pi/scenarios/happy-turn.json +52 -0
  235. package/personas/synthetic/behavior/happy-turn.json +12 -0
  236. package/personas/synthetic/groundtruth.html +164 -0
  237. package/personas/synthetic/groundtruth.json +380 -0
  238. package/personas/synthetic/model/behavior.json +27 -0
  239. package/personas/synthetic/model/channels.json +16 -0
  240. package/personas/synthetic/model/detection.json +13 -0
  241. package/personas/synthetic/model/events/agent.action.json +16 -0
  242. package/personas/synthetic/model/events/agent.boot.json +16 -0
  243. package/personas/synthetic/model/events/agent.halt.json +16 -0
  244. package/personas/synthetic/model/events/agent.prompt.json +16 -0
  245. package/personas/synthetic/model/events/agent.reply.json +16 -0
  246. package/personas/synthetic/model/events/agent.settled.json +16 -0
  247. package/personas/synthetic/model/manifest.json +7 -0
  248. package/personas/synthetic/ops.json +18 -0
  249. package/personas/synthetic/persona.json +11 -0
  250. package/README.md +0 -3
@@ -0,0 +1,465 @@
1
+ {
2
+ "name": "incident-investigation",
3
+ "notes": "A competing-hypotheses incident investigation using MCP, shell, web, failure recovery, delegation, compaction, and verification.",
4
+ "steps": [
5
+ {
6
+ "at": 0,
7
+ "do": {
8
+ "emit": {
9
+ "event": "UserPromptSubmit",
10
+ "with": {
11
+ "prompt": "$stimulus.text",
12
+ "prompt_id": "$uuid:prompt",
13
+ "session_title": "$sessionTitle",
14
+ "permission_mode": "$permissionMode"
15
+ }
16
+ }
17
+ }
18
+ },
19
+ {
20
+ "at": 100,
21
+ "do": {
22
+ "emit": {
23
+ "event": "MessageDisplay",
24
+ "with": {
25
+ "prompt_id": "$uuid:prompt",
26
+ "turn_id": "$uuid:turn",
27
+ "message_id": "$uuid:triage-message",
28
+ "index": 0,
29
+ "final": true,
30
+ "delta": "I’ll run two competing hypotheses in parallel and reconcile them against logs, metrics, and a direct reproduction."
31
+ }
32
+ }
33
+ }
34
+ },
35
+ {
36
+ "at": 200,
37
+ "do": {
38
+ "emit": {
39
+ "event": "TaskCreated",
40
+ "with": {
41
+ "prompt_id": "$uuid:prompt",
42
+ "task_id": "hypothesis-deploy",
43
+ "task_subject": "Test deploy regression",
44
+ "task_description": "Check whether the last deploy changed request failure rates.",
45
+ "team_name": "incident-team",
46
+ "teammate_name": "deploy-investigator"
47
+ }
48
+ }
49
+ }
50
+ },
51
+ {
52
+ "at": 300,
53
+ "do": {
54
+ "emit": {
55
+ "event": "TaskCreated",
56
+ "with": {
57
+ "prompt_id": "$uuid:prompt",
58
+ "task_id": "hypothesis-dependency",
59
+ "task_subject": "Test dependency failure",
60
+ "task_description": "Check whether an upstream dependency or quota caused the incident.",
61
+ "team_name": "incident-team",
62
+ "teammate_name": "dependency-investigator"
63
+ }
64
+ }
65
+ }
66
+ },
67
+ {
68
+ "at": 400,
69
+ "do": {
70
+ "emit": {
71
+ "event": "SubagentStart",
72
+ "with": { "prompt_id": "$uuid:prompt", "agent_id": "incident-deploy", "agent_type": "debugger" }
73
+ }
74
+ }
75
+ },
76
+ {
77
+ "at": 500,
78
+ "do": {
79
+ "emit": {
80
+ "event": "SubagentStart",
81
+ "with": { "prompt_id": "$uuid:prompt", "agent_id": "incident-dependency", "agent_type": "debugger" }
82
+ }
83
+ }
84
+ },
85
+ {
86
+ "at": 600,
87
+ "do": {
88
+ "emit": {
89
+ "event": "PreToolUse",
90
+ "with": {
91
+ "prompt_id": "$uuid:prompt",
92
+ "agent_id": "incident-deploy",
93
+ "agent_type": "debugger",
94
+ "tool_name": "mcp__observability__query_logs",
95
+ "tool_input": { "service": "api", "since": "30m", "query": "status>=500" },
96
+ "tool_use_id": "$uuid:logs"
97
+ }
98
+ }
99
+ }
100
+ },
101
+ {
102
+ "at": 800,
103
+ "do": {
104
+ "emit": {
105
+ "event": "PostToolUse",
106
+ "with": {
107
+ "prompt_id": "$uuid:prompt",
108
+ "agent_id": "incident-deploy",
109
+ "agent_type": "debugger",
110
+ "tool_name": "mcp__observability__query_logs",
111
+ "tool_input": { "service": "api", "since": "30m", "query": "status>=500" },
112
+ "tool_response": { "matches": 184, "pattern": "timeouts begin two minutes before deploy completion" },
113
+ "tool_use_id": "$uuid:logs",
114
+ "duration_ms": 185
115
+ }
116
+ }
117
+ }
118
+ },
119
+ {
120
+ "at": 900,
121
+ "do": {
122
+ "emit": {
123
+ "event": "PreToolUse",
124
+ "with": {
125
+ "prompt_id": "$uuid:prompt",
126
+ "agent_id": "incident-dependency",
127
+ "agent_type": "debugger",
128
+ "tool_name": "Bash",
129
+ "tool_input": { "command": "./scripts/reproduce-timeout.sh" },
130
+ "tool_use_id": "$uuid:reproduce"
131
+ }
132
+ }
133
+ }
134
+ },
135
+ {
136
+ "at": 1100,
137
+ "do": {
138
+ "emit": {
139
+ "event": "PostToolUseFailure",
140
+ "with": {
141
+ "prompt_id": "$uuid:prompt",
142
+ "agent_id": "incident-dependency",
143
+ "agent_type": "debugger",
144
+ "tool_name": "Bash",
145
+ "tool_input": { "command": "./scripts/reproduce-timeout.sh" },
146
+ "tool_use_id": "$uuid:reproduce",
147
+ "error": "Fixture lacks the production timeout header; reproduction inconclusive.",
148
+ "duration_ms": 180,
149
+ "is_interrupt": false
150
+ }
151
+ }
152
+ }
153
+ },
154
+ {
155
+ "at": 1200,
156
+ "do": {
157
+ "emit": {
158
+ "event": "PreToolUse",
159
+ "with": {
160
+ "prompt_id": "$uuid:prompt",
161
+ "agent_id": "incident-dependency",
162
+ "agent_type": "debugger",
163
+ "tool_name": "WebSearch",
164
+ "tool_input": { "query": "upstream provider status timeout incident" },
165
+ "tool_use_id": "$uuid:status-search"
166
+ }
167
+ }
168
+ }
169
+ },
170
+ {
171
+ "at": 1400,
172
+ "do": {
173
+ "emit": {
174
+ "event": "PostToolUse",
175
+ "with": {
176
+ "prompt_id": "$uuid:prompt",
177
+ "agent_id": "incident-dependency",
178
+ "agent_type": "debugger",
179
+ "tool_name": "WebSearch",
180
+ "tool_input": { "query": "upstream provider status timeout incident" },
181
+ "tool_response": { "results": ["No matching provider incident in the relevant window."] },
182
+ "tool_use_id": "$uuid:status-search",
183
+ "duration_ms": 170
184
+ }
185
+ }
186
+ }
187
+ },
188
+ {
189
+ "at": 1500,
190
+ "do": {
191
+ "emit": {
192
+ "event": "PreToolUse",
193
+ "with": {
194
+ "prompt_id": "$uuid:prompt",
195
+ "tool_name": "mcp__observability__query_metrics",
196
+ "tool_input": { "metric": "api.request.duration", "group_by": "release", "since": "2h" },
197
+ "tool_use_id": "$uuid:metrics"
198
+ }
199
+ }
200
+ }
201
+ },
202
+ {
203
+ "at": 1700,
204
+ "do": {
205
+ "emit": {
206
+ "event": "PostToolUse",
207
+ "with": {
208
+ "prompt_id": "$uuid:prompt",
209
+ "tool_name": "mcp__observability__query_metrics",
210
+ "tool_input": { "metric": "api.request.duration", "group_by": "release", "since": "2h" },
211
+ "tool_response": {
212
+ "series": [
213
+ { "release": "previous", "p99_ms": 480 },
214
+ { "release": "current", "p99_ms": 5100 }
215
+ ]
216
+ },
217
+ "tool_use_id": "$uuid:metrics",
218
+ "duration_ms": 190
219
+ }
220
+ }
221
+ }
222
+ },
223
+ {
224
+ "at": 1800,
225
+ "do": {
226
+ "emit": {
227
+ "event": "PostToolBatch",
228
+ "with": {
229
+ "prompt_id": "$uuid:prompt",
230
+ "tool_calls": [
231
+ {
232
+ "tool_name": "mcp__observability__query_logs",
233
+ "tool_use_id": "$uuid:logs",
234
+ "tool_input": {},
235
+ "tool_response": "log query completed"
236
+ },
237
+ {
238
+ "tool_name": "Bash",
239
+ "tool_use_id": "$uuid:reproduce",
240
+ "tool_input": {},
241
+ "tool_response": "reproduction completed"
242
+ },
243
+ {
244
+ "tool_name": "WebSearch",
245
+ "tool_use_id": "$uuid:status-search",
246
+ "tool_input": {},
247
+ "tool_response": "search completed"
248
+ },
249
+ {
250
+ "tool_name": "mcp__observability__query_metrics",
251
+ "tool_use_id": "$uuid:metrics",
252
+ "tool_input": {},
253
+ "tool_response": "metric query completed"
254
+ }
255
+ ]
256
+ }
257
+ }
258
+ }
259
+ },
260
+ {
261
+ "at": 1900,
262
+ "do": {
263
+ "emit": {
264
+ "event": "TaskCompleted",
265
+ "with": {
266
+ "prompt_id": "$uuid:prompt",
267
+ "task_id": "hypothesis-deploy",
268
+ "task_subject": "Test deploy regression",
269
+ "task_description": "Latency increase is isolated to the current release.",
270
+ "team_name": "incident-team",
271
+ "teammate_name": "deploy-investigator"
272
+ }
273
+ }
274
+ }
275
+ },
276
+ {
277
+ "at": 2000,
278
+ "do": {
279
+ "emit": {
280
+ "event": "SubagentStop",
281
+ "with": {
282
+ "prompt_id": "$uuid:prompt",
283
+ "agent_id": "incident-deploy",
284
+ "agent_type": "debugger",
285
+ "agent_transcript_path": "/tmp/incident-deploy.jsonl",
286
+ "last_assistant_message": "Deploy regression is the leading hypothesis.",
287
+ "stop_hook_active": false,
288
+ "background_tasks": [],
289
+ "session_crons": []
290
+ }
291
+ }
292
+ }
293
+ },
294
+ {
295
+ "at": 2100,
296
+ "do": {
297
+ "emit": {
298
+ "event": "TaskCompleted",
299
+ "with": {
300
+ "prompt_id": "$uuid:prompt",
301
+ "task_id": "hypothesis-dependency",
302
+ "task_subject": "Test dependency failure",
303
+ "task_description": "No upstream incident found; local reproduction needs the production header.",
304
+ "team_name": "incident-team",
305
+ "teammate_name": "dependency-investigator"
306
+ }
307
+ }
308
+ }
309
+ },
310
+ {
311
+ "at": 2200,
312
+ "do": {
313
+ "emit": {
314
+ "event": "SubagentStop",
315
+ "with": {
316
+ "prompt_id": "$uuid:prompt",
317
+ "agent_id": "incident-dependency",
318
+ "agent_type": "debugger",
319
+ "agent_transcript_path": "/tmp/incident-dependency.jsonl",
320
+ "last_assistant_message": "Dependency hypothesis is weak; evidence favors the deploy.",
321
+ "stop_hook_active": false,
322
+ "background_tasks": [],
323
+ "session_crons": []
324
+ }
325
+ }
326
+ }
327
+ },
328
+ {
329
+ "at": 2300,
330
+ "do": {
331
+ "statusline": {
332
+ "with": {
333
+ "session_id": "$sessionId",
334
+ "transcript_path": "$transcriptPath",
335
+ "cwd": "$cwd",
336
+ "model": { "id": "$modelId", "display_name": "$modelId" },
337
+ "workspace": { "current_dir": "$cwd" },
338
+ "context_window": {
339
+ "total_input_tokens": 186000,
340
+ "context_window_size": 200000,
341
+ "used_percentage": 93,
342
+ "current_usage": {
343
+ "input_tokens": 186000,
344
+ "cache_creation_input_tokens": 0,
345
+ "cache_read_input_tokens": 61000
346
+ }
347
+ }
348
+ }
349
+ }
350
+ }
351
+ },
352
+ {
353
+ "at": 2400,
354
+ "do": {
355
+ "emit": {
356
+ "event": "PreCompact",
357
+ "with": { "prompt_id": "$uuid:prompt", "trigger": "auto", "custom_instructions": "" }
358
+ }
359
+ }
360
+ },
361
+ {
362
+ "at": 2500,
363
+ "do": {
364
+ "emit": {
365
+ "event": "PostCompact",
366
+ "with": {
367
+ "prompt_id": "$uuid:prompt",
368
+ "trigger": "auto",
369
+ "compact_summary": "Preserved incident timeline, both hypotheses, failed reproduction details, log/metric evidence, and the rollback verification plan."
370
+ }
371
+ }
372
+ }
373
+ },
374
+ {
375
+ "at": 2600,
376
+ "do": {
377
+ "emit": {
378
+ "event": "PreToolUse",
379
+ "with": {
380
+ "prompt_id": "$uuid:prompt",
381
+ "tool_name": "Bash",
382
+ "tool_input": { "command": "./scripts/compare-release-config.sh previous current" },
383
+ "tool_use_id": "$uuid:verify-config"
384
+ }
385
+ }
386
+ }
387
+ },
388
+ {
389
+ "at": 2800,
390
+ "do": {
391
+ "emit": {
392
+ "event": "PostToolUse",
393
+ "with": {
394
+ "prompt_id": "$uuid:prompt",
395
+ "tool_name": "Bash",
396
+ "tool_input": { "command": "./scripts/compare-release-config.sh previous current" },
397
+ "tool_response": {
398
+ "output": "Current release lowered the upstream timeout from 10s to 1s.",
399
+ "exitCode": 0
400
+ },
401
+ "tool_use_id": "$uuid:verify-config",
402
+ "duration_ms": 175
403
+ }
404
+ }
405
+ }
406
+ },
407
+ {
408
+ "at": 2900,
409
+ "do": {
410
+ "emit": {
411
+ "event": "MessageDisplay",
412
+ "with": {
413
+ "prompt_id": "$uuid:prompt",
414
+ "turn_id": "$uuid:turn",
415
+ "message_id": "$uuid:final-message",
416
+ "index": 0,
417
+ "final": true,
418
+ "delta": "The timeout change in the current release explains the incident; rollback is the lowest-risk immediate mitigation."
419
+ }
420
+ }
421
+ }
422
+ },
423
+ {
424
+ "at": 3000,
425
+ "do": {
426
+ "transcript": {
427
+ "record": {
428
+ "type": "assistant",
429
+ "uuid": "$uuid:assistant",
430
+ "sessionId": "$sessionId",
431
+ "timestamp": "$now",
432
+ "cwd": "$cwd",
433
+ "version": "$vendorVersion",
434
+ "message": {
435
+ "id": "$uuid:message",
436
+ "role": "assistant",
437
+ "model": "$modelId",
438
+ "content": [
439
+ {
440
+ "type": "text",
441
+ "text": "Root cause: the current release reduced the upstream timeout. Roll back now, then restore the intended timeout with a regression test."
442
+ }
443
+ ]
444
+ }
445
+ }
446
+ }
447
+ }
448
+ },
449
+ {
450
+ "at": 3100,
451
+ "do": {
452
+ "emit": {
453
+ "event": "Stop",
454
+ "with": {
455
+ "prompt_id": "$uuid:prompt",
456
+ "last_assistant_message": "Root cause identified; rollback and regression-test actions documented.",
457
+ "stop_hook_active": false,
458
+ "background_tasks": [],
459
+ "session_crons": []
460
+ }
461
+ }
462
+ }
463
+ }
464
+ ]
465
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "late-after-exit",
3
+ "steps": [
4
+ {
5
+ "at": 0,
6
+ "do": {
7
+ "emit": {
8
+ "event": "SessionEnd",
9
+ "with": { "reason": "other", "prompt_id": "$uuid:prompt" }
10
+ }
11
+ }
12
+ },
13
+ {
14
+ "at": 50,
15
+ "do": {
16
+ "emit": {
17
+ "event": "Notification",
18
+ "with": {
19
+ "message": "late notification after SessionEnd",
20
+ "notification_type": "idle_prompt",
21
+ "prompt_id": "$uuid:prompt"
22
+ }
23
+ }
24
+ }
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "permission-allow",
3
+ "steps": [
4
+ {
5
+ "at": 0,
6
+ "do": {
7
+ "emit": {
8
+ "event": "PreToolUse",
9
+ "with": {
10
+ "prompt_id": "$uuid:prompt",
11
+ "tool_name": "Bash",
12
+ "tool_input": { "command": "echo allowed" },
13
+ "tool_use_id": "$uuid:tool",
14
+ "effort": { "level": "xhigh" },
15
+ "permission_mode": "$permissionMode"
16
+ }
17
+ }
18
+ }
19
+ },
20
+ {
21
+ "at": 100,
22
+ "do": {
23
+ "emit": {
24
+ "event": "PermissionRequest",
25
+ "with": {
26
+ "prompt_id": "$uuid:prompt",
27
+ "tool_name": "Bash",
28
+ "tool_input": { "command": "echo allowed" },
29
+ "permission_suggestions": [],
30
+ "effort": { "level": "xhigh" },
31
+ "permission_mode": "$permissionMode"
32
+ }
33
+ }
34
+ }
35
+ },
36
+ {
37
+ "at": 200,
38
+ "do": {
39
+ "emit": {
40
+ "event": "PostToolUse",
41
+ "with": {
42
+ "prompt_id": "$uuid:prompt",
43
+ "tool_name": "Bash",
44
+ "tool_input": { "command": "echo allowed" },
45
+ "tool_response": { "output": "allowed" },
46
+ "tool_use_id": "$uuid:tool",
47
+ "duration_ms": 25,
48
+ "effort": { "level": "xhigh" },
49
+ "permission_mode": "$permissionMode"
50
+ }
51
+ }
52
+ }
53
+ }
54
+ ]
55
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "permission-deny",
3
+ "notes": "Claude represents denial by the absence of PreToolUse/PostToolUse after PermissionRequest.",
4
+ "steps": [
5
+ {
6
+ "at": 0,
7
+ "do": {
8
+ "emit": {
9
+ "event": "PreToolUse",
10
+ "with": {
11
+ "prompt_id": "$uuid:prompt",
12
+ "tool_name": "Bash",
13
+ "tool_input": { "command": "rm protected-file" },
14
+ "tool_use_id": "$uuid:tool",
15
+ "effort": { "level": "xhigh" },
16
+ "permission_mode": "$permissionMode"
17
+ }
18
+ }
19
+ }
20
+ },
21
+ {
22
+ "at": 100,
23
+ "do": {
24
+ "emit": {
25
+ "event": "PermissionRequest",
26
+ "with": {
27
+ "prompt_id": "$uuid:prompt",
28
+ "tool_name": "Bash",
29
+ "tool_input": { "command": "rm protected-file" },
30
+ "permission_suggestions": [],
31
+ "effort": { "level": "xhigh" },
32
+ "permission_mode": "$permissionMode"
33
+ }
34
+ }
35
+ }
36
+ },
37
+ {
38
+ "at": 150,
39
+ "do": {
40
+ "emit": {
41
+ "event": "PermissionDenied",
42
+ "with": {
43
+ "prompt_id": "$uuid:prompt",
44
+ "tool_name": "Bash",
45
+ "tool_input": { "command": "rm protected-file" },
46
+ "tool_use_id": "$uuid:tool",
47
+ "reason": "Blocked by classifier",
48
+ "permission_mode": "auto"
49
+ }
50
+ }
51
+ }
52
+ },
53
+ {
54
+ "at": 200,
55
+ "do": {
56
+ "emit": {
57
+ "event": "Stop",
58
+ "with": {
59
+ "prompt_id": "$uuid:prompt",
60
+ "last_assistant_message": "Permission denied.",
61
+ "stop_hook_active": false,
62
+ "background_tasks": [],
63
+ "session_crons": [],
64
+ "effort": { "level": "xhigh" },
65
+ "permission_mode": "$permissionMode"
66
+ }
67
+ }
68
+ }
69
+ }
70
+ ]
71
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "token-usage-refresh",
3
+ "steps": [
4
+ {
5
+ "at": 0,
6
+ "do": {
7
+ "statusline": {
8
+ "with": {
9
+ "session_id": "$sessionId",
10
+ "transcript_path": "$transcriptPath",
11
+ "cwd": "$cwd",
12
+ "model": { "id": "$modelId", "display_name": "$modelId" },
13
+ "workspace": { "current_dir": "$cwd" },
14
+ "context_window": {
15
+ "total_input_tokens": 12400,
16
+ "context_window_size": "$capacityTokens",
17
+ "used_percentage": 6.2,
18
+ "current_usage": {
19
+ "input_tokens": 12400,
20
+ "cache_creation_input_tokens": 0,
21
+ "cache_read_input_tokens": 0
22
+ }
23
+ },
24
+ "rate_limits": {
25
+ "five_hour": { "used_percentage": 12, "resets_at": "$now" },
26
+ "seven_day": { "used_percentage": 3, "resets_at": "$now" }
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "unknown-event",
3
+ "steps": [
4
+ {
5
+ "at": 0,
6
+ "do": {
7
+ "emit": {
8
+ "event": "FutureHookEvent",
9
+ "with": { "future_field": "retained by the emulator log" }
10
+ }
11
+ }
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "approval-turn",
3
+ "reply": "imposter: command finished",
4
+ "ops": [
5
+ { "op": "turn.start", "with": { "text": "$stimulus.text" } },
6
+ { "op": "permission.ask", "with": { "toolId": "$uuid:item", "command": "curl -s https://example.com" } },
7
+ { "op": "tool.start", "with": { "toolId": "$uuid:item", "command": "curl -s https://example.com" } },
8
+ {
9
+ "op": "tool.end",
10
+ "with": { "toolId": "$uuid:item", "command": "curl -s https://example.com", "output": "<html/>" }
11
+ },
12
+ { "op": "assistant.delta", "with": { "text": "$reply" } },
13
+ { "op": "turn.end" }
14
+ ]
15
+ }