@vibefield/puppeteer-imposter 0.2.1 → 0.2.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.
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +91 -12
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/prompt-line.d.ts +6 -0
- package/dist/cli/prompt-line.d.ts.map +1 -1
- package/dist/cli/prompt-line.js +2 -0
- package/dist/cli/prompt-line.js.map +1 -1
- package/dist/persona/load.d.ts.map +1 -1
- package/dist/persona/load.js +31 -2
- package/dist/persona/load.js.map +1 -1
- package/dist/persona/types.d.ts +22 -2
- package/dist/persona/types.d.ts.map +1 -1
- package/dist/persona/types.js.map +1 -1
- package/dist/session/channels/jsonrpc.d.ts +10 -1
- package/dist/session/channels/jsonrpc.d.ts.map +1 -1
- package/dist/session/channels/jsonrpc.js +51 -2
- package/dist/session/channels/jsonrpc.js.map +1 -1
- package/dist/session/channels/leader-ipc.d.ts +9 -0
- package/dist/session/channels/leader-ipc.d.ts.map +1 -1
- package/dist/session/channels/leader-ipc.js +59 -6
- package/dist/session/channels/leader-ipc.js.map +1 -1
- package/dist/session/channels/native-store.d.ts +2 -0
- package/dist/session/channels/native-store.d.ts.map +1 -1
- package/dist/session/channels/native-store.js +48 -9
- package/dist/session/channels/native-store.js.map +1 -1
- package/dist/session/serve.d.ts +6 -0
- package/dist/session/serve.d.ts.map +1 -1
- package/dist/session/serve.js.map +1 -1
- package/dist/session/session.d.ts.map +1 -1
- package/dist/session/session.js +63 -28
- package/dist/session/session.js.map +1 -1
- package/dist/session/template.d.ts +3 -0
- package/dist/session/template.d.ts.map +1 -1
- package/dist/session/template.js +6 -1
- package/dist/session/template.js.map +1 -1
- package/package.json +8 -8
- package/personas/claude/ops.json +8 -1
- package/personas/claude/persona.json +18 -0
- package/personas/claude/runflows.json +2 -2
- package/personas/claude/scenarios/api-error-overloaded.json +49 -0
- package/personas/claude/scenarios/compact-lifecycle.json +76 -0
- package/personas/claude/scenarios/incident-investigation.json +90 -29
- package/personas/claude/scenarios/model-switch.json +171 -0
- package/personas/codex/serve.json +5 -0
- package/personas/grok/behavior/approval-turn.json +35 -8
- package/personas/grok/behavior/happy-turn.json +13 -5
- package/personas/grok/ops.json +338 -123
- package/personas/grok/persona.json +10 -2
- package/personas/grok/runflows.json +24 -2
- package/personas/grok/scenarios/agent-team-lifecycle.json +73 -4
- package/personas/grok/scenarios/compact-lifecycle.json +32 -3
- package/personas/grok/scenarios/configured-hooks.json +80 -0
- package/personas/grok/scenarios/remote-ambient.json +51 -0
- package/personas/grok/serve.json +300 -17
package/personas/grok/ops.json
CHANGED
|
@@ -3,84 +3,72 @@
|
|
|
3
3
|
{
|
|
4
4
|
"channel": "jsonrpc",
|
|
5
5
|
"event": "_x.ai/mcp/servers_updated",
|
|
6
|
-
"with": { "
|
|
7
|
-
}
|
|
6
|
+
"with": { "mcpServers": [] }
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"session.start": [
|
|
8
10
|
{
|
|
9
11
|
"channel": "jsonrpc",
|
|
10
|
-
"event": "_x.ai/
|
|
11
|
-
"with": { "
|
|
12
|
+
"event": "_x.ai/session/setup",
|
|
13
|
+
"with": { "method": "session/new", "phase": "auth", "sessionId": null }
|
|
12
14
|
},
|
|
13
15
|
{
|
|
14
16
|
"channel": "jsonrpc",
|
|
15
|
-
"event": "_x.ai/
|
|
16
|
-
"with": { "
|
|
17
|
+
"event": "_x.ai/session/setup",
|
|
18
|
+
"with": { "method": "session/new", "phase": "resolve_workspace", "sessionId": null }
|
|
17
19
|
},
|
|
18
20
|
{
|
|
19
21
|
"channel": "jsonrpc",
|
|
20
|
-
"event": "_x.ai/
|
|
21
|
-
"with": { "
|
|
22
|
+
"event": "_x.ai/session/setup",
|
|
23
|
+
"with": { "method": "session/new", "phase": "folder_trust", "sessionId": null }
|
|
22
24
|
},
|
|
23
25
|
{
|
|
24
26
|
"channel": "jsonrpc",
|
|
25
|
-
"event": "_x.ai/
|
|
26
|
-
"with": { "
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"session.start": [
|
|
30
|
-
{
|
|
31
|
-
"channel": "jsonrpc",
|
|
32
|
-
"event": "session/update",
|
|
33
|
-
"with": {
|
|
34
|
-
"sessionId": "$sessionId",
|
|
35
|
-
"update": { "sessionUpdate": "available_commands_update", "availableCommands": [] }
|
|
36
|
-
}
|
|
27
|
+
"event": "_x.ai/session/setup",
|
|
28
|
+
"with": { "method": "session/new", "phase": "plugin_registry", "sessionId": null }
|
|
37
29
|
},
|
|
38
30
|
{
|
|
39
31
|
"channel": "jsonrpc",
|
|
40
|
-
"event": "_x.ai/
|
|
41
|
-
"with": {
|
|
42
|
-
"sessionId": "$sessionId",
|
|
43
|
-
"update": { "sessionUpdate": "hook_execution", "event_name": "session_start", "runs": [] }
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"channel": "native-log",
|
|
48
|
-
"event": "_x.ai/session/update",
|
|
49
|
-
"with": {
|
|
50
|
-
"sessionId": "$sessionId",
|
|
51
|
-
"update": { "sessionUpdate": "hook_execution", "event_name": "session_start", "runs": [] },
|
|
52
|
-
"_meta": { "agentTimestampMs": "$nowMs" }
|
|
53
|
-
}
|
|
32
|
+
"event": "_x.ai/session/setup",
|
|
33
|
+
"with": { "method": "session/new", "phase": "mcp_merge", "sessionId": null }
|
|
54
34
|
},
|
|
55
35
|
{
|
|
56
36
|
"channel": "native-state",
|
|
57
37
|
"event": "summary.json",
|
|
58
38
|
"with": {
|
|
59
39
|
"info": { "id": "$sessionId", "cwd": "$threadCwd" },
|
|
60
|
-
"
|
|
40
|
+
"agent_id": "$agentId",
|
|
41
|
+
"attempt_id": "$attemptId",
|
|
42
|
+
"session_summary": "$sessionTitle",
|
|
61
43
|
"created_at": "$sessionCreatedAt",
|
|
62
44
|
"updated_at": "$now",
|
|
63
45
|
"num_messages": "$messageCount",
|
|
64
46
|
"num_chat_messages": "$messageCount",
|
|
65
|
-
"
|
|
47
|
+
"current_model_id": "$modelId",
|
|
48
|
+
"next_trace_turn": "$turnCount",
|
|
49
|
+
"chat_format_version": 1,
|
|
50
|
+
"grok_home": "$imposterHome",
|
|
51
|
+
"last_active_at": "$now",
|
|
52
|
+
"generated_title": "$sessionTitle",
|
|
53
|
+
"agent_name": "grok-build-plan",
|
|
54
|
+
"sandbox_profile": "off"
|
|
66
55
|
}
|
|
67
56
|
}
|
|
68
57
|
],
|
|
69
|
-
"session.
|
|
58
|
+
"session.ready": [
|
|
70
59
|
{
|
|
71
60
|
"channel": "jsonrpc",
|
|
72
|
-
"event": "_x.ai/
|
|
73
|
-
"with": {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
61
|
+
"event": "_x.ai/session/setup",
|
|
62
|
+
"with": { "method": "session/new", "phase": "response_ready", "sessionId": "$sessionId" }
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"session.end": [
|
|
78
66
|
{
|
|
79
67
|
"channel": "native-log",
|
|
80
68
|
"event": "_x.ai/session/update",
|
|
81
69
|
"with": {
|
|
82
70
|
"sessionId": "$sessionId",
|
|
83
|
-
"update": { "sessionUpdate": "
|
|
71
|
+
"update": { "sessionUpdate": "background_tasks", "tasks": [] },
|
|
84
72
|
"_meta": { "agentTimestampMs": "$nowMs" }
|
|
85
73
|
}
|
|
86
74
|
}
|
|
@@ -91,34 +79,36 @@
|
|
|
91
79
|
"event": "session/update",
|
|
92
80
|
"with": {
|
|
93
81
|
"sessionId": "$sessionId",
|
|
94
|
-
"update": {
|
|
82
|
+
"update": {
|
|
83
|
+
"sessionUpdate": "user_message_chunk",
|
|
84
|
+
"content": { "type": "text", "text": "$op.text" },
|
|
85
|
+
"_meta": { "modelId": "$modelId", "promptIndex": "$turnIndex" }
|
|
86
|
+
},
|
|
87
|
+
"_meta": { "agentTimestampMs": "$nowMs" }
|
|
95
88
|
}
|
|
96
89
|
},
|
|
97
90
|
{
|
|
98
|
-
"channel": "
|
|
99
|
-
"event": "
|
|
91
|
+
"channel": "native-log",
|
|
92
|
+
"event": "session/update",
|
|
100
93
|
"with": {
|
|
101
94
|
"sessionId": "$sessionId",
|
|
102
95
|
"update": {
|
|
103
|
-
"sessionUpdate": "
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
}
|
|
96
|
+
"sessionUpdate": "user_message_chunk",
|
|
97
|
+
"content": { "type": "text", "text": "$op.text" },
|
|
98
|
+
"_meta": { "modelId": "$modelId", "promptIndex": "$turnIndex" }
|
|
99
|
+
},
|
|
100
|
+
"_meta": { "agentTimestampMs": "$nowMs" }
|
|
108
101
|
}
|
|
109
|
-
}
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"assistant.delta": [
|
|
110
105
|
{
|
|
111
|
-
"channel": "
|
|
112
|
-
"event": "
|
|
106
|
+
"channel": "jsonrpc",
|
|
107
|
+
"event": "session/update",
|
|
113
108
|
"with": {
|
|
114
109
|
"sessionId": "$sessionId",
|
|
115
|
-
"update": {
|
|
116
|
-
|
|
117
|
-
"event_name": "user_prompt_submit",
|
|
118
|
-
"prompt_id": "$uuid:prompt",
|
|
119
|
-
"runs": []
|
|
120
|
-
},
|
|
121
|
-
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs" }
|
|
110
|
+
"update": { "sessionUpdate": "agent_message_chunk", "content": { "type": "text", "text": "$op.text" } },
|
|
111
|
+
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs", "updateType": "AgentMessageChunk" }
|
|
122
112
|
}
|
|
123
113
|
},
|
|
124
114
|
{
|
|
@@ -126,41 +116,71 @@
|
|
|
126
116
|
"event": "session/update",
|
|
127
117
|
"with": {
|
|
128
118
|
"sessionId": "$sessionId",
|
|
129
|
-
"update": { "sessionUpdate": "
|
|
130
|
-
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs" }
|
|
119
|
+
"update": { "sessionUpdate": "agent_message_chunk", "content": { "type": "text", "text": "$op.text" } },
|
|
120
|
+
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs", "updateType": "AgentMessageChunk" }
|
|
131
121
|
}
|
|
132
122
|
}
|
|
133
123
|
],
|
|
134
|
-
"
|
|
124
|
+
"tool.start": [
|
|
135
125
|
{
|
|
136
126
|
"channel": "jsonrpc",
|
|
137
127
|
"event": "session/update",
|
|
138
128
|
"with": {
|
|
139
129
|
"sessionId": "$sessionId",
|
|
140
130
|
"update": {
|
|
141
|
-
"sessionUpdate": "
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
|
|
131
|
+
"sessionUpdate": "tool_call",
|
|
132
|
+
"toolCallId": "$op.toolId",
|
|
133
|
+
"title": "$op.command",
|
|
134
|
+
"rawInput": { "command": "$op.command", "description": "Run the requested command" },
|
|
135
|
+
"_meta": {
|
|
136
|
+
"x.ai/tool": {
|
|
137
|
+
"version": 1,
|
|
138
|
+
"name": "run_terminal_command",
|
|
139
|
+
"kind": "execute",
|
|
140
|
+
"namespace": "grok_build",
|
|
141
|
+
"label": "Run Command",
|
|
142
|
+
"read_only": false
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs", "updateType": "ToolCall" }
|
|
145
147
|
}
|
|
146
148
|
},
|
|
147
149
|
{
|
|
148
|
-
"channel": "
|
|
150
|
+
"channel": "jsonrpc",
|
|
149
151
|
"event": "session/update",
|
|
150
152
|
"with": {
|
|
151
153
|
"sessionId": "$sessionId",
|
|
152
154
|
"update": {
|
|
153
|
-
"sessionUpdate": "
|
|
154
|
-
"
|
|
155
|
-
"
|
|
155
|
+
"sessionUpdate": "tool_call_update",
|
|
156
|
+
"toolCallId": "$op.toolId",
|
|
157
|
+
"kind": "execute",
|
|
158
|
+
"title": "$op.command",
|
|
159
|
+
"content": [],
|
|
160
|
+
"locations": [],
|
|
161
|
+
"rawInput": {
|
|
162
|
+
"variant": "Bash",
|
|
163
|
+
"command": "$op.command",
|
|
164
|
+
"description": "Run the requested command",
|
|
165
|
+
"is_background": false
|
|
166
|
+
},
|
|
167
|
+
"_meta": {
|
|
168
|
+
"x.ai/tool": {
|
|
169
|
+
"version": 1,
|
|
170
|
+
"name": "run_terminal_command",
|
|
171
|
+
"kind": "execute",
|
|
172
|
+
"namespace": "grok_build",
|
|
173
|
+
"label": "Run Command",
|
|
174
|
+
"read_only": false,
|
|
175
|
+
"input": { "command": "$op.command", "description": "Run the requested command" }
|
|
176
|
+
}
|
|
177
|
+
}
|
|
156
178
|
},
|
|
157
|
-
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs" }
|
|
179
|
+
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs", "updateType": "ToolCallUpdate" }
|
|
158
180
|
}
|
|
159
|
-
}
|
|
160
|
-
],
|
|
161
|
-
"tool.start": [
|
|
181
|
+
},
|
|
162
182
|
{
|
|
163
|
-
"channel": "
|
|
183
|
+
"channel": "native-log",
|
|
164
184
|
"event": "session/update",
|
|
165
185
|
"with": {
|
|
166
186
|
"sessionId": "$sessionId",
|
|
@@ -168,10 +188,19 @@
|
|
|
168
188
|
"sessionUpdate": "tool_call",
|
|
169
189
|
"toolCallId": "$op.toolId",
|
|
170
190
|
"title": "$op.command",
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
|
|
174
|
-
|
|
191
|
+
"rawInput": { "command": "$op.command", "description": "Run the requested command" },
|
|
192
|
+
"_meta": {
|
|
193
|
+
"x.ai/tool": {
|
|
194
|
+
"version": 1,
|
|
195
|
+
"name": "run_terminal_command",
|
|
196
|
+
"kind": "execute",
|
|
197
|
+
"namespace": "grok_build",
|
|
198
|
+
"label": "Run Command",
|
|
199
|
+
"read_only": false
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs", "updateType": "ToolCall" }
|
|
175
204
|
}
|
|
176
205
|
},
|
|
177
206
|
{
|
|
@@ -180,18 +209,43 @@
|
|
|
180
209
|
"with": {
|
|
181
210
|
"sessionId": "$sessionId",
|
|
182
211
|
"update": {
|
|
183
|
-
"sessionUpdate": "
|
|
212
|
+
"sessionUpdate": "tool_call_update",
|
|
184
213
|
"toolCallId": "$op.toolId",
|
|
185
|
-
"title": "$op.command",
|
|
186
214
|
"kind": "execute",
|
|
187
|
-
"
|
|
188
|
-
"
|
|
215
|
+
"title": "$op.command",
|
|
216
|
+
"content": [],
|
|
217
|
+
"locations": [],
|
|
218
|
+
"rawInput": {
|
|
219
|
+
"variant": "Bash",
|
|
220
|
+
"command": "$op.command",
|
|
221
|
+
"description": "Run the requested command",
|
|
222
|
+
"is_background": false
|
|
223
|
+
},
|
|
224
|
+
"_meta": {
|
|
225
|
+
"x.ai/tool": {
|
|
226
|
+
"version": 1,
|
|
227
|
+
"name": "run_terminal_command",
|
|
228
|
+
"kind": "execute",
|
|
229
|
+
"namespace": "grok_build",
|
|
230
|
+
"label": "Run Command",
|
|
231
|
+
"read_only": false,
|
|
232
|
+
"input": { "command": "$op.command", "description": "Run the requested command" }
|
|
233
|
+
}
|
|
234
|
+
}
|
|
189
235
|
},
|
|
190
|
-
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs" }
|
|
236
|
+
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs", "updateType": "ToolCallUpdate" }
|
|
191
237
|
}
|
|
192
238
|
}
|
|
193
239
|
],
|
|
194
240
|
"permission.ask": [
|
|
241
|
+
{
|
|
242
|
+
"channel": "jsonrpc",
|
|
243
|
+
"event": "_x.ai/session_notification",
|
|
244
|
+
"with": {
|
|
245
|
+
"sessionId": "$sessionId",
|
|
246
|
+
"update": { "sessionUpdate": "pending_interaction", "tool_call_id": "$op.toolId", "kind": "permission" }
|
|
247
|
+
}
|
|
248
|
+
},
|
|
195
249
|
{
|
|
196
250
|
"channel": "jsonrpc",
|
|
197
251
|
"event": "session/request_permission",
|
|
@@ -200,16 +254,42 @@
|
|
|
200
254
|
"sessionId": "$sessionId",
|
|
201
255
|
"toolCall": {
|
|
202
256
|
"toolCallId": "$op.toolId",
|
|
203
|
-
"title": "$op.command",
|
|
204
257
|
"kind": "execute",
|
|
205
|
-
"
|
|
206
|
-
"rawInput": {
|
|
258
|
+
"title": "$op.command",
|
|
259
|
+
"rawInput": {
|
|
260
|
+
"variant": "Bash",
|
|
261
|
+
"command": "$op.command",
|
|
262
|
+
"description": "Run the requested command",
|
|
263
|
+
"is_background": false
|
|
264
|
+
},
|
|
265
|
+
"_meta": {
|
|
266
|
+
"x.ai/tool": {
|
|
267
|
+
"version": 1,
|
|
268
|
+
"name": "run_terminal_command",
|
|
269
|
+
"kind": "execute",
|
|
270
|
+
"namespace": "grok_build",
|
|
271
|
+
"label": "Run Command",
|
|
272
|
+
"read_only": false,
|
|
273
|
+
"input": { "command": "$op.command", "description": "Run the requested command" }
|
|
274
|
+
},
|
|
275
|
+
"x.ai/requestingSessionId": "$sessionId"
|
|
276
|
+
}
|
|
207
277
|
},
|
|
208
278
|
"options": [
|
|
209
|
-
{ "optionId": "
|
|
210
|
-
{ "optionId": "
|
|
279
|
+
{ "optionId": "always-allow", "name": "Yes, and don't ask again for bash commands", "kind": "allow_always" },
|
|
280
|
+
{ "optionId": "allow-once", "name": "Yes, proceed", "kind": "allow_once" },
|
|
281
|
+
{ "optionId": "reject-once", "name": "No, and tell Grok what to do differently", "kind": "reject_once" },
|
|
282
|
+
{ "optionId": "reject-always", "name": "No, and don't ask again for this command", "kind": "reject_always" }
|
|
211
283
|
]
|
|
212
284
|
}
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"channel": "jsonrpc",
|
|
288
|
+
"event": "_x.ai/session_notification",
|
|
289
|
+
"with": {
|
|
290
|
+
"sessionId": "$sessionId",
|
|
291
|
+
"update": { "sessionUpdate": "interaction_resolved", "tool_call_id": "$op.toolId" }
|
|
292
|
+
}
|
|
213
293
|
}
|
|
214
294
|
],
|
|
215
295
|
"tool.end": [
|
|
@@ -222,8 +302,23 @@
|
|
|
222
302
|
"sessionUpdate": "tool_call_update",
|
|
223
303
|
"toolCallId": "$op.toolId",
|
|
224
304
|
"status": "completed",
|
|
225
|
-
"
|
|
226
|
-
|
|
305
|
+
"content": [{ "type": "content", "content": { "type": "text", "text": "$op.output" } }],
|
|
306
|
+
"rawOutput": {
|
|
307
|
+
"type": "Bash",
|
|
308
|
+
"output": [],
|
|
309
|
+
"output_for_prompt": "$op.output",
|
|
310
|
+
"exit_code": 0,
|
|
311
|
+
"command": "$op.command",
|
|
312
|
+
"truncated": false,
|
|
313
|
+
"signal": null,
|
|
314
|
+
"timed_out": false,
|
|
315
|
+
"description": "Run the requested command",
|
|
316
|
+
"current_dir": "$threadCwd",
|
|
317
|
+
"output_file": "",
|
|
318
|
+
"total_bytes": 0
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs", "updateType": "ToolCallUpdate" }
|
|
227
322
|
}
|
|
228
323
|
},
|
|
229
324
|
{
|
|
@@ -235,9 +330,23 @@
|
|
|
235
330
|
"sessionUpdate": "tool_call_update",
|
|
236
331
|
"toolCallId": "$op.toolId",
|
|
237
332
|
"status": "completed",
|
|
238
|
-
"
|
|
333
|
+
"content": [{ "type": "content", "content": { "type": "text", "text": "$op.output" } }],
|
|
334
|
+
"rawOutput": {
|
|
335
|
+
"type": "Bash",
|
|
336
|
+
"output": [],
|
|
337
|
+
"output_for_prompt": "$op.output",
|
|
338
|
+
"exit_code": 0,
|
|
339
|
+
"command": "$op.command",
|
|
340
|
+
"truncated": false,
|
|
341
|
+
"signal": null,
|
|
342
|
+
"timed_out": false,
|
|
343
|
+
"description": "Run the requested command",
|
|
344
|
+
"current_dir": "$threadCwd",
|
|
345
|
+
"output_file": "",
|
|
346
|
+
"total_bytes": 0
|
|
347
|
+
}
|
|
239
348
|
},
|
|
240
|
-
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs" }
|
|
349
|
+
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs", "updateType": "ToolCallUpdate" }
|
|
241
350
|
}
|
|
242
351
|
}
|
|
243
352
|
],
|
|
@@ -249,19 +358,16 @@
|
|
|
249
358
|
"sessionId": "$sessionId",
|
|
250
359
|
"update": {
|
|
251
360
|
"sessionUpdate": "response_completed",
|
|
252
|
-
"
|
|
253
|
-
|
|
361
|
+
"usage": {
|
|
362
|
+
"input_tokens": 12,
|
|
363
|
+
"output_tokens": 4,
|
|
364
|
+
"cache_read_input_tokens": 0,
|
|
365
|
+
"cache_creation_input_tokens": 0,
|
|
366
|
+
"reasoning_tokens": 0
|
|
367
|
+
}
|
|
254
368
|
}
|
|
255
369
|
}
|
|
256
370
|
},
|
|
257
|
-
{
|
|
258
|
-
"channel": "jsonrpc",
|
|
259
|
-
"event": "_x.ai/session_notification",
|
|
260
|
-
"with": {
|
|
261
|
-
"sessionId": "$sessionId",
|
|
262
|
-
"update": { "sessionUpdate": "hook_execution", "event_name": "stop", "prompt_id": "$uuid:prompt", "runs": [] }
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
371
|
{
|
|
266
372
|
"channel": "jsonrpc",
|
|
267
373
|
"event": "_x.ai/session_notification",
|
|
@@ -271,18 +377,38 @@
|
|
|
271
377
|
"sessionUpdate": "turn_completed",
|
|
272
378
|
"prompt_id": "$uuid:prompt",
|
|
273
379
|
"stop_reason": "end_turn",
|
|
274
|
-
"usage": {
|
|
275
|
-
|
|
380
|
+
"usage": {
|
|
381
|
+
"inputTokens": 12,
|
|
382
|
+
"outputTokens": 4,
|
|
383
|
+
"totalTokens": 16,
|
|
384
|
+
"cachedReadTokens": 0,
|
|
385
|
+
"cacheCreationTokens": 0,
|
|
386
|
+
"reasoningTokens": 0,
|
|
387
|
+
"modelCalls": 1,
|
|
388
|
+
"apiDurationMs": 40,
|
|
389
|
+
"modelUsage": {
|
|
390
|
+
"grok-imposter": {
|
|
391
|
+
"inputTokens": 12,
|
|
392
|
+
"outputTokens": 4,
|
|
393
|
+
"totalTokens": 16,
|
|
394
|
+
"cachedReadTokens": 0,
|
|
395
|
+
"cacheCreationTokens": 0,
|
|
396
|
+
"reasoningTokens": 0,
|
|
397
|
+
"modelCalls": 1,
|
|
398
|
+
"apiDurationMs": 40
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"numTurns": 1
|
|
402
|
+
},
|
|
403
|
+
"elapsed_ms": 60
|
|
404
|
+
},
|
|
405
|
+
"_meta": { "agentTimestampMs": "$nowMs" }
|
|
276
406
|
}
|
|
277
407
|
},
|
|
278
408
|
{
|
|
279
|
-
"channel": "
|
|
280
|
-
"event": "_x.ai/session/
|
|
281
|
-
"with": {
|
|
282
|
-
"sessionId": "$sessionId",
|
|
283
|
-
"update": { "sessionUpdate": "hook_execution", "event_name": "stop", "prompt_id": "$uuid:prompt", "runs": [] },
|
|
284
|
-
"_meta": { "promptId": "$uuid:prompt", "agentTimestampMs": "$nowMs" }
|
|
285
|
-
}
|
|
409
|
+
"channel": "jsonrpc",
|
|
410
|
+
"event": "_x.ai/session/prompt_complete",
|
|
411
|
+
"with": { "sessionId": "$sessionId", "promptId": "$uuid:prompt", "stopReason": "end_turn", "agentResult": null }
|
|
286
412
|
},
|
|
287
413
|
{
|
|
288
414
|
"channel": "native-log",
|
|
@@ -293,9 +419,32 @@
|
|
|
293
419
|
"sessionUpdate": "turn_completed",
|
|
294
420
|
"prompt_id": "$uuid:prompt",
|
|
295
421
|
"stop_reason": "end_turn",
|
|
296
|
-
"usage": {
|
|
422
|
+
"usage": {
|
|
423
|
+
"inputTokens": 12,
|
|
424
|
+
"outputTokens": 4,
|
|
425
|
+
"totalTokens": 16,
|
|
426
|
+
"cachedReadTokens": 0,
|
|
427
|
+
"cacheCreationTokens": 0,
|
|
428
|
+
"reasoningTokens": 0,
|
|
429
|
+
"modelCalls": 1,
|
|
430
|
+
"apiDurationMs": 40,
|
|
431
|
+
"modelUsage": {
|
|
432
|
+
"grok-imposter": {
|
|
433
|
+
"inputTokens": 12,
|
|
434
|
+
"outputTokens": 4,
|
|
435
|
+
"totalTokens": 16,
|
|
436
|
+
"cachedReadTokens": 0,
|
|
437
|
+
"cacheCreationTokens": 0,
|
|
438
|
+
"reasoningTokens": 0,
|
|
439
|
+
"modelCalls": 1,
|
|
440
|
+
"apiDurationMs": 40
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
"numTurns": 1
|
|
444
|
+
},
|
|
445
|
+
"elapsed_ms": 60
|
|
297
446
|
},
|
|
298
|
-
"_meta": { "
|
|
447
|
+
"_meta": { "agentTimestampMs": "$nowMs" }
|
|
299
448
|
}
|
|
300
449
|
},
|
|
301
450
|
{
|
|
@@ -303,12 +452,21 @@
|
|
|
303
452
|
"event": "summary.json",
|
|
304
453
|
"with": {
|
|
305
454
|
"info": { "id": "$sessionId", "cwd": "$threadCwd" },
|
|
306
|
-
"
|
|
455
|
+
"agent_id": "$agentId",
|
|
456
|
+
"attempt_id": "$attemptId",
|
|
457
|
+
"session_summary": "$sessionTitle",
|
|
307
458
|
"created_at": "$sessionCreatedAt",
|
|
308
459
|
"updated_at": "$now",
|
|
309
460
|
"num_messages": "$messageCount",
|
|
310
461
|
"num_chat_messages": "$messageCount",
|
|
311
|
-
"
|
|
462
|
+
"current_model_id": "$modelId",
|
|
463
|
+
"next_trace_turn": "$turnCount",
|
|
464
|
+
"chat_format_version": 1,
|
|
465
|
+
"grok_home": "$imposterHome",
|
|
466
|
+
"last_active_at": "$now",
|
|
467
|
+
"generated_title": "$sessionTitle",
|
|
468
|
+
"agent_name": "grok-build-plan",
|
|
469
|
+
"sandbox_profile": "off"
|
|
312
470
|
}
|
|
313
471
|
}
|
|
314
472
|
],
|
|
@@ -317,13 +475,70 @@
|
|
|
317
475
|
"channel": "native-state",
|
|
318
476
|
"event": "signals.json",
|
|
319
477
|
"with": {
|
|
478
|
+
"turnCount": "$turnCount",
|
|
479
|
+
"userMessageCount": "$turnCount",
|
|
480
|
+
"assistantMessageCount": "$turnCount",
|
|
481
|
+
"errorCount": 0,
|
|
482
|
+
"toolFailureCount": 0,
|
|
483
|
+
"cancellationCount": 0,
|
|
484
|
+
"consecutiveCancellations": 0,
|
|
485
|
+
"regenerationCount": 0,
|
|
486
|
+
"hasReverted": false,
|
|
487
|
+
"compactionCount": "$compactionCount",
|
|
488
|
+
"totalTokensBeforeCompaction": 0,
|
|
489
|
+
"contextWindowUsage": "$contextPercent",
|
|
320
490
|
"contextTokensUsed": "$usedTokens",
|
|
321
491
|
"contextWindowTokens": "$capacityTokens",
|
|
322
|
-
"
|
|
492
|
+
"toolCallCount": "$toolCallCount",
|
|
493
|
+
"toolsUsed": [],
|
|
494
|
+
"modelsUsed": ["$modelId"],
|
|
323
495
|
"primaryModelId": "$modelId",
|
|
324
|
-
"
|
|
325
|
-
"
|
|
326
|
-
"
|
|
496
|
+
"editAndRetryCount": 0,
|
|
497
|
+
"bashBareEchoCount": 0,
|
|
498
|
+
"gitCommitCount": 0,
|
|
499
|
+
"prCreatedCount": 0,
|
|
500
|
+
"prMergedCount": 0,
|
|
501
|
+
"inferenceIdleTimeouts": 0,
|
|
502
|
+
"doomLoopRecoveryAttempts": 0,
|
|
503
|
+
"doomLoopRecoveryAcceptedAfterBudget": 0,
|
|
504
|
+
"doomLoopRecoveryTopTrigger": null,
|
|
505
|
+
"doomLoopRecoveryAbortedChunks": 0,
|
|
506
|
+
"inferenceIdleTimeoutConfiguredSecs": 600,
|
|
507
|
+
"gcsQueueEnqueued": 0,
|
|
508
|
+
"gcsQueueUploaded": 0,
|
|
509
|
+
"gcsQueueFailed": 0,
|
|
510
|
+
"gcsQueueFallbacks": 0,
|
|
511
|
+
"gcsQueueCircuitBreakerTrips": 0,
|
|
512
|
+
"gcsQueuePending": 0,
|
|
513
|
+
"gcsQueuePendingBytes": 0,
|
|
514
|
+
"gcsQueueOrphansCleaned": 0,
|
|
515
|
+
"positiveRatings": 0,
|
|
516
|
+
"negativeRatings": 0,
|
|
517
|
+
"longPausesCount": 0,
|
|
518
|
+
"sessionDurationSeconds": 0,
|
|
519
|
+
"avgTimeToFirstTokenMs": 0,
|
|
520
|
+
"avgResponseTimeMs": 0,
|
|
521
|
+
"minTimeToFirstTokenMs": 0,
|
|
522
|
+
"maxTimeToFirstTokenMs": 0,
|
|
523
|
+
"latencySampleCount": 0,
|
|
524
|
+
"itlP50Ms": 0,
|
|
525
|
+
"itlP99Ms": 0,
|
|
526
|
+
"itlMaxMs": 0,
|
|
527
|
+
"itlMeanMs": 0,
|
|
528
|
+
"totalChunkCount": 0,
|
|
529
|
+
"itlSampleCount": 0,
|
|
530
|
+
"agentLinesAdded": 0,
|
|
531
|
+
"agentLinesRemoved": 0,
|
|
532
|
+
"agentLinesAddedReverted": 0,
|
|
533
|
+
"agentLinesRemovedReverted": 0,
|
|
534
|
+
"humanLinesAdded": 0,
|
|
535
|
+
"humanLinesRemoved": 0,
|
|
536
|
+
"humanLinesAddedReverted": 0,
|
|
537
|
+
"humanLinesRemovedReverted": 0,
|
|
538
|
+
"agentFilesTouched": 0,
|
|
539
|
+
"humanFilesTouched": 0,
|
|
540
|
+
"totalFilesTouched": 0,
|
|
541
|
+
"peakRssBytes": 0
|
|
327
542
|
}
|
|
328
543
|
}
|
|
329
544
|
]
|
|
@@ -6,11 +6,19 @@
|
|
|
6
6
|
},
|
|
7
7
|
"shimNames": ["grok"],
|
|
8
8
|
"envelope": {},
|
|
9
|
-
"bindings": {
|
|
9
|
+
"bindings": {
|
|
10
|
+
"$threadCwd": "$cwd",
|
|
11
|
+
"$sessionCreatedAt": "$now",
|
|
12
|
+
"$agentId": "$uuid:agent-id",
|
|
13
|
+
"$attemptId": "$uuid:attempt-id"
|
|
14
|
+
},
|
|
10
15
|
"nativeStore": {
|
|
11
16
|
"rootEnv": "GROK_HOME",
|
|
12
17
|
"sessionPath": ["sessions", "$encodeURIComponent:$threadCwd", "$sessionId"],
|
|
13
|
-
"updatesFile": "updates.jsonl"
|
|
18
|
+
"updatesFile": "updates.jsonl",
|
|
19
|
+
"recordTimestamp": { "field": "timestamp", "format": "epoch-seconds" },
|
|
20
|
+
"recordEventId": { "metaField": "eventId" },
|
|
21
|
+
"replayMeta": { "isReplay": true }
|
|
14
22
|
},
|
|
15
23
|
"boot": [
|
|
16
24
|
{ "op": "session.initialize" },
|