@adecore/agents 0.31.9 → 0.31.11
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/chat/acp-backend.d.ts +1 -0
- package/dist/chat/acp-backend.js +7 -3
- package/dist/chat/acp-protocol.d.ts +10 -2
- package/dist/chat/acp-protocol.js +81 -18
- package/dist/chat/chat-session.js +11 -0
- package/dist/chat/fixtures/copilot-1.0.101-denied.json +1050 -0
- package/dist/chat/fixtures/copilot-1.0.101-turn.json +1 -0
- package/dist/chat/fixtures/grok-1.0.62-denied.json +630 -0
- package/dist/chat/fixtures/grok-1.0.62-usage.json +475 -0
- package/dist/providers/acp-agent-state.js +14 -1
- package/dist/providers/catalog.js +2 -1
- package/dist/testing/fake-acp-capture.d.ts +2 -1
- package/dist/testing/fake-acp-capture.js +29 -9
- package/package.json +3 -3
- package/src/chat/acp-backend.ts +10 -3
- package/src/chat/acp-protocol.ts +90 -21
- package/src/chat/chat-session.ts +11 -0
- package/src/chat/fixtures/copilot-1.0.101-denied.json +1050 -0
- package/src/chat/fixtures/copilot-1.0.101-turn.json +1 -0
- package/src/chat/fixtures/grok-1.0.62-denied.json +630 -0
- package/src/chat/fixtures/grok-1.0.62-usage.json +475 -0
- package/src/providers/acp-agent-state.ts +15 -1
- package/src/providers/catalog.ts +2 -1
- package/src/testing/fake-acp-capture.ts +34 -11
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"version": "GitHub Copilot CLI 1.0.101, `copilot --acp --stdio`",
|
|
3
3
|
"source": "Recorded from the real CLI on 2026-10-21: initialize, session/new and one session/prompt for \"Reply with the single word ok.\". The command list is cut to a few entries and the session id replaced; every other field is as the CLI sent it.",
|
|
4
4
|
"sessionId": "copilot-session-1",
|
|
5
|
+
"titleFromPrompt": true,
|
|
5
6
|
"initialize": {
|
|
6
7
|
"protocolVersion": 1,
|
|
7
8
|
"agentCapabilities": {
|
|
@@ -0,0 +1,630 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "Grok 1.0.62, `grok --no-auto-update agent stdio`",
|
|
3
|
+
"source": "Recorded from the real CLI on 2026-10-21 in an empty folder: initialize, session/new and one session/prompt asking for probe.txt, whose permission request was answered with reject-once. Only session/update frames are kept (the CLI also sends notifications of its own under _x.ai); the command list is cut, the _meta of initialize and session/new left out, the session id and the folder replaced. Every other field is as the CLI sent it.",
|
|
4
|
+
"sessionId": "grok-session-1",
|
|
5
|
+
"initialize": {
|
|
6
|
+
"protocolVersion": 1,
|
|
7
|
+
"agentCapabilities": {
|
|
8
|
+
"loadSession": true,
|
|
9
|
+
"promptCapabilities": {
|
|
10
|
+
"image": false,
|
|
11
|
+
"audio": false,
|
|
12
|
+
"embeddedContext": true
|
|
13
|
+
},
|
|
14
|
+
"mcpCapabilities": {
|
|
15
|
+
"http": true,
|
|
16
|
+
"sse": true
|
|
17
|
+
},
|
|
18
|
+
"sessionCapabilities": {
|
|
19
|
+
"list": {},
|
|
20
|
+
"resume": {},
|
|
21
|
+
"close": {}
|
|
22
|
+
},
|
|
23
|
+
"auth": {},
|
|
24
|
+
"_meta": {
|
|
25
|
+
"x.ai/fs_notify": true,
|
|
26
|
+
"x.ai/hooks": {
|
|
27
|
+
"blockingEvents": [
|
|
28
|
+
"pre_tool_use",
|
|
29
|
+
"stop",
|
|
30
|
+
"subagent_stop"
|
|
31
|
+
],
|
|
32
|
+
"decisions": [
|
|
33
|
+
"deny",
|
|
34
|
+
"block"
|
|
35
|
+
],
|
|
36
|
+
"stopSignals": [
|
|
37
|
+
"continue",
|
|
38
|
+
"stopReason",
|
|
39
|
+
"additionalContext"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"x.ai/capabilities": {
|
|
43
|
+
"toolOverrides": {
|
|
44
|
+
"x_keyword_search": true,
|
|
45
|
+
"x_semantic_search": true,
|
|
46
|
+
"x_user_search": false,
|
|
47
|
+
"x_thread_fetch": false
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"authMethods": [
|
|
53
|
+
{
|
|
54
|
+
"id": "cached_token",
|
|
55
|
+
"name": "cached_token",
|
|
56
|
+
"description": "Cached token from ~/.grok/auth.json"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "grok.com",
|
|
60
|
+
"name": "Grok",
|
|
61
|
+
"description": "Sign in with Grok"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"sessionNew": {
|
|
66
|
+
"sessionId": "grok-session-1",
|
|
67
|
+
"models": {
|
|
68
|
+
"currentModelId": "grok-4.7",
|
|
69
|
+
"availableModels": [
|
|
70
|
+
{
|
|
71
|
+
"modelId": "grok-4.7",
|
|
72
|
+
"name": "Grok 4.7",
|
|
73
|
+
"description": "SpaceXAI's latest frontier model",
|
|
74
|
+
"_meta": {
|
|
75
|
+
"totalContextTokens": 256000,
|
|
76
|
+
"agentType": "grok-build-plan",
|
|
77
|
+
"supportsReasoningEffort": true,
|
|
78
|
+
"reasoningEffort": "high",
|
|
79
|
+
"reasoningEfforts": [
|
|
80
|
+
{
|
|
81
|
+
"id": "xhigh",
|
|
82
|
+
"value": "xhigh",
|
|
83
|
+
"label": "Extra High",
|
|
84
|
+
"description": "Maximum reasoning for the hardest tasks.",
|
|
85
|
+
"default": false
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "high",
|
|
89
|
+
"value": "high",
|
|
90
|
+
"label": "High",
|
|
91
|
+
"description": "Thorough reasoning and quality. Recommended.",
|
|
92
|
+
"default": true
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "medium",
|
|
96
|
+
"value": "medium",
|
|
97
|
+
"label": "Medium",
|
|
98
|
+
"description": "Strong quality with a faster turnaround.",
|
|
99
|
+
"default": false
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "low",
|
|
103
|
+
"value": "low",
|
|
104
|
+
"label": "Low",
|
|
105
|
+
"description": "Fastest responses. Best for simple tasks.",
|
|
106
|
+
"default": false
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"contextWindows": [
|
|
110
|
+
256000,
|
|
111
|
+
500000
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"modelId": "grok-4.7-build-fast",
|
|
117
|
+
"name": "Grok 4.7 Fast",
|
|
118
|
+
"description": "Fast variant. 2x the price.",
|
|
119
|
+
"_meta": {
|
|
120
|
+
"totalContextTokens": 256000,
|
|
121
|
+
"agentType": "grok-build-plan",
|
|
122
|
+
"supportsReasoningEffort": true,
|
|
123
|
+
"reasoningEffort": "high",
|
|
124
|
+
"reasoningEfforts": [
|
|
125
|
+
{
|
|
126
|
+
"id": "xhigh",
|
|
127
|
+
"value": "xhigh",
|
|
128
|
+
"label": "Extra High",
|
|
129
|
+
"description": "Maximum reasoning for the hardest tasks.",
|
|
130
|
+
"default": false
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"id": "high",
|
|
134
|
+
"value": "high",
|
|
135
|
+
"label": "High",
|
|
136
|
+
"description": "Thorough reasoning and quality. Recommended.",
|
|
137
|
+
"default": true
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"id": "medium",
|
|
141
|
+
"value": "medium",
|
|
142
|
+
"label": "Medium",
|
|
143
|
+
"description": "Strong quality with a faster turnaround.",
|
|
144
|
+
"default": false
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "low",
|
|
148
|
+
"value": "low",
|
|
149
|
+
"label": "Low",
|
|
150
|
+
"description": "Fastest responses. Best for simple tasks.",
|
|
151
|
+
"default": false
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"contextWindows": [
|
|
155
|
+
256000,
|
|
156
|
+
500000
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"modelId": "grok-4.6",
|
|
162
|
+
"name": "Grok 4.6",
|
|
163
|
+
"_meta": {
|
|
164
|
+
"totalContextTokens": 256000,
|
|
165
|
+
"agentType": "grok-build-plan",
|
|
166
|
+
"supportsReasoningEffort": true,
|
|
167
|
+
"reasoningEffort": "high",
|
|
168
|
+
"reasoningEfforts": [
|
|
169
|
+
{
|
|
170
|
+
"id": "xhigh",
|
|
171
|
+
"value": "xhigh",
|
|
172
|
+
"label": "Extra High",
|
|
173
|
+
"description": "Highest effort and reasoning level",
|
|
174
|
+
"default": false
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"id": "high",
|
|
178
|
+
"value": "high",
|
|
179
|
+
"label": "High",
|
|
180
|
+
"description": "Higher implementation quality with extensive reasoning",
|
|
181
|
+
"default": true
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "medium",
|
|
185
|
+
"value": "medium",
|
|
186
|
+
"label": "Medium",
|
|
187
|
+
"description": "Balanced effort with standard implementation and testing",
|
|
188
|
+
"default": false
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"id": "low",
|
|
192
|
+
"value": "low",
|
|
193
|
+
"label": "Low",
|
|
194
|
+
"description": "Quick, fast implementations",
|
|
195
|
+
"default": false
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"contextWindows": [
|
|
199
|
+
256000,
|
|
200
|
+
500000
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"modelId": "grok-4.5",
|
|
206
|
+
"name": "Grok 4.5",
|
|
207
|
+
"_meta": {
|
|
208
|
+
"totalContextTokens": 256000,
|
|
209
|
+
"agentType": "grok-build-plan",
|
|
210
|
+
"supportsReasoningEffort": true,
|
|
211
|
+
"reasoningEffort": "high",
|
|
212
|
+
"reasoningEfforts": [
|
|
213
|
+
{
|
|
214
|
+
"id": "high",
|
|
215
|
+
"value": "high",
|
|
216
|
+
"label": "High",
|
|
217
|
+
"description": "Highest implementation quality with extensive reasoning",
|
|
218
|
+
"default": true
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"id": "medium",
|
|
222
|
+
"value": "medium",
|
|
223
|
+
"label": "Medium",
|
|
224
|
+
"description": "Balanced effort with standard implementation and testing",
|
|
225
|
+
"default": false
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"id": "low",
|
|
229
|
+
"value": "low",
|
|
230
|
+
"label": "Low",
|
|
231
|
+
"description": "Quick, fast implementations",
|
|
232
|
+
"default": false
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
"contextWindows": [
|
|
236
|
+
256000,
|
|
237
|
+
500000
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
"configOptions": [
|
|
244
|
+
{
|
|
245
|
+
"id": "model",
|
|
246
|
+
"name": "Model",
|
|
247
|
+
"category": "model",
|
|
248
|
+
"type": "select",
|
|
249
|
+
"currentValue": "grok-4.7",
|
|
250
|
+
"options": [
|
|
251
|
+
{
|
|
252
|
+
"value": "grok-4.7",
|
|
253
|
+
"name": "Grok 4.7"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"value": "grok-4.7-build-fast",
|
|
257
|
+
"name": "Grok 4.7 Fast"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"value": "grok-4.6",
|
|
261
|
+
"name": "Grok 4.6"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"value": "grok-4.5",
|
|
265
|
+
"name": "Grok 4.5"
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"id": "reasoning_effort",
|
|
271
|
+
"name": "Reasoning Effort",
|
|
272
|
+
"category": "thought_level",
|
|
273
|
+
"type": "select",
|
|
274
|
+
"currentValue": "high",
|
|
275
|
+
"options": [
|
|
276
|
+
{
|
|
277
|
+
"value": "xhigh",
|
|
278
|
+
"name": "Extra High",
|
|
279
|
+
"description": "Maximum reasoning for the hardest tasks."
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"value": "high",
|
|
283
|
+
"name": "High",
|
|
284
|
+
"description": "Thorough reasoning and quality. Recommended."
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"value": "medium",
|
|
288
|
+
"name": "Medium",
|
|
289
|
+
"description": "Strong quality with a faster turnaround."
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"value": "low",
|
|
293
|
+
"name": "Low",
|
|
294
|
+
"description": "Fastest responses. Best for simple tasks."
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
"commands": [
|
|
301
|
+
{
|
|
302
|
+
"name": "compact",
|
|
303
|
+
"description": "Compress conversation history to save context window",
|
|
304
|
+
"input": null
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "always-approve",
|
|
308
|
+
"description": "Toggle always-approve mode (skip all permission prompts)",
|
|
309
|
+
"input": {
|
|
310
|
+
"hint": "on|off"
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"name": "context",
|
|
315
|
+
"description": "Show context window usage and session stats",
|
|
316
|
+
"input": null
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"setConfigOption": {
|
|
320
|
+
"configOptions": [
|
|
321
|
+
{
|
|
322
|
+
"id": "model",
|
|
323
|
+
"name": "Model",
|
|
324
|
+
"category": "model",
|
|
325
|
+
"type": "select",
|
|
326
|
+
"currentValue": "grok-4.7",
|
|
327
|
+
"options": [
|
|
328
|
+
{
|
|
329
|
+
"value": "grok-4.7",
|
|
330
|
+
"name": "Grok 4.7"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"value": "grok-4.7-build-fast",
|
|
334
|
+
"name": "Grok 4.7 Fast"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"value": "grok-4.6",
|
|
338
|
+
"name": "Grok 4.6"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"value": "grok-4.5",
|
|
342
|
+
"name": "Grok 4.5"
|
|
343
|
+
}
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"id": "reasoning_effort",
|
|
348
|
+
"name": "Reasoning Effort",
|
|
349
|
+
"category": "thought_level",
|
|
350
|
+
"type": "select",
|
|
351
|
+
"currentValue": "high",
|
|
352
|
+
"options": [
|
|
353
|
+
{
|
|
354
|
+
"value": "xhigh",
|
|
355
|
+
"name": "Extra High",
|
|
356
|
+
"description": "Maximum reasoning for the hardest tasks."
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"value": "high",
|
|
360
|
+
"name": "High",
|
|
361
|
+
"description": "Thorough reasoning and quality. Recommended."
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"value": "medium",
|
|
365
|
+
"name": "Medium",
|
|
366
|
+
"description": "Strong quality with a faster turnaround."
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"value": "low",
|
|
370
|
+
"name": "Low",
|
|
371
|
+
"description": "Fastest responses. Best for simple tasks."
|
|
372
|
+
}
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
},
|
|
377
|
+
"promptUpdates": [
|
|
378
|
+
{
|
|
379
|
+
"sessionUpdate": "agent_thought_chunk",
|
|
380
|
+
"content": {
|
|
381
|
+
"type": "text",
|
|
382
|
+
"text": "I will create probe.txt."
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"sessionUpdate": "agent_thought_chunk",
|
|
387
|
+
"content": {
|
|
388
|
+
"type": "text",
|
|
389
|
+
"text": "\n\nI will write the word"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"sessionUpdate": "agent_thought_chunk",
|
|
394
|
+
"content": {
|
|
395
|
+
"type": "text",
|
|
396
|
+
"text": " \"hi\" to probe.txt in"
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"sessionUpdate": "agent_thought_chunk",
|
|
401
|
+
"content": {
|
|
402
|
+
"type": "text",
|
|
403
|
+
"text": " the current folder."
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"sessionUpdate": "agent_message_chunk",
|
|
408
|
+
"content": {
|
|
409
|
+
"type": "text",
|
|
410
|
+
"text": "Ik"
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"sessionUpdate": "agent_message_chunk",
|
|
415
|
+
"content": {
|
|
416
|
+
"type": "text",
|
|
417
|
+
"text": " maak"
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"sessionUpdate": "agent_message_chunk",
|
|
422
|
+
"content": {
|
|
423
|
+
"type": "text",
|
|
424
|
+
"text": " `"
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"sessionUpdate": "agent_message_chunk",
|
|
429
|
+
"content": {
|
|
430
|
+
"type": "text",
|
|
431
|
+
"text": "probe"
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"sessionUpdate": "agent_message_chunk",
|
|
436
|
+
"content": {
|
|
437
|
+
"type": "text",
|
|
438
|
+
"text": ".txt"
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"sessionUpdate": "agent_message_chunk",
|
|
443
|
+
"content": {
|
|
444
|
+
"type": "text",
|
|
445
|
+
"text": "`"
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"sessionUpdate": "agent_message_chunk",
|
|
450
|
+
"content": {
|
|
451
|
+
"type": "text",
|
|
452
|
+
"text": " aan"
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"sessionUpdate": "agent_message_chunk",
|
|
457
|
+
"content": {
|
|
458
|
+
"type": "text",
|
|
459
|
+
"text": "."
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"sessionUpdate": "tool_call",
|
|
464
|
+
"toolCallId": "call-02be341c-3155-4b9b-b400-9607396f108a-0",
|
|
465
|
+
"title": "write",
|
|
466
|
+
"rawInput": {
|
|
467
|
+
"file_path": "/work/probe.txt",
|
|
468
|
+
"content": "hi"
|
|
469
|
+
},
|
|
470
|
+
"_meta": {
|
|
471
|
+
"x.ai/tool": {
|
|
472
|
+
"version": 1,
|
|
473
|
+
"name": "write",
|
|
474
|
+
"kind": "write",
|
|
475
|
+
"namespace": "grok_build",
|
|
476
|
+
"label": "Write",
|
|
477
|
+
"read_only": false
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"sessionUpdate": "tool_call_update",
|
|
483
|
+
"toolCallId": "call-02be341c-3155-4b9b-b400-9607396f108a-0",
|
|
484
|
+
"kind": "edit",
|
|
485
|
+
"title": "Write `/work/probe.txt`",
|
|
486
|
+
"content": [
|
|
487
|
+
{
|
|
488
|
+
"type": "diff",
|
|
489
|
+
"path": "/work/probe.txt",
|
|
490
|
+
"oldText": "",
|
|
491
|
+
"newText": "hi"
|
|
492
|
+
}
|
|
493
|
+
],
|
|
494
|
+
"locations": [
|
|
495
|
+
{
|
|
496
|
+
"path": "/work/probe.txt"
|
|
497
|
+
}
|
|
498
|
+
],
|
|
499
|
+
"rawInput": {
|
|
500
|
+
"variant": "Write",
|
|
501
|
+
"file_path": "/work/probe.txt",
|
|
502
|
+
"content": "hi"
|
|
503
|
+
},
|
|
504
|
+
"_meta": {
|
|
505
|
+
"x.ai/tool": {
|
|
506
|
+
"version": 1,
|
|
507
|
+
"name": "write",
|
|
508
|
+
"kind": "write",
|
|
509
|
+
"namespace": "grok_build",
|
|
510
|
+
"label": "Write",
|
|
511
|
+
"read_only": false,
|
|
512
|
+
"input": {
|
|
513
|
+
"path": "/work/probe.txt"
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"permission": {
|
|
520
|
+
"sessionId": "grok-session-1",
|
|
521
|
+
"toolCall": {
|
|
522
|
+
"toolCallId": "call-02be341c-3155-4b9b-b400-9607396f108a-0",
|
|
523
|
+
"kind": "edit",
|
|
524
|
+
"title": "Write `/work/probe.txt`",
|
|
525
|
+
"rawInput": {
|
|
526
|
+
"variant": "Write",
|
|
527
|
+
"file_path": "/work/probe.txt",
|
|
528
|
+
"content": "hi"
|
|
529
|
+
},
|
|
530
|
+
"_meta": {
|
|
531
|
+
"x.ai/tool": {
|
|
532
|
+
"version": 1,
|
|
533
|
+
"name": "write",
|
|
534
|
+
"kind": "write",
|
|
535
|
+
"namespace": "grok_build",
|
|
536
|
+
"label": "Write",
|
|
537
|
+
"read_only": false,
|
|
538
|
+
"input": {
|
|
539
|
+
"path": "/work/probe.txt"
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
"x.ai/requestingSessionId": "grok-session-1"
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
"options": [
|
|
546
|
+
{
|
|
547
|
+
"optionId": "allow-edits-session",
|
|
548
|
+
"name": "Yes, allow all edits during this session",
|
|
549
|
+
"kind": "allow_always"
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
"optionId": "allow-once",
|
|
553
|
+
"name": "Yes",
|
|
554
|
+
"kind": "allow_once"
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"optionId": "reject-once",
|
|
558
|
+
"name": "No, and tell Grok what to do differently",
|
|
559
|
+
"kind": "reject_once"
|
|
560
|
+
}
|
|
561
|
+
]
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"sessionUpdate": "tool_call_update",
|
|
566
|
+
"toolCallId": "call-02be341c-3155-4b9b-b400-9607396f108a-0",
|
|
567
|
+
"status": "failed",
|
|
568
|
+
"content": [
|
|
569
|
+
{
|
|
570
|
+
"type": "content",
|
|
571
|
+
"content": {
|
|
572
|
+
"type": "text",
|
|
573
|
+
"text": "User rejected the execution for tool `write`"
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
],
|
|
577
|
+
"_meta": {
|
|
578
|
+
"toolNotRun": "rejected"
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"sessionUpdate": "session_info_update",
|
|
583
|
+
"title": "Create probe.txt containing word hi"
|
|
584
|
+
}
|
|
585
|
+
],
|
|
586
|
+
"promptResponse": {
|
|
587
|
+
"stopReason": "cancelled",
|
|
588
|
+
"_meta": {
|
|
589
|
+
"sessionId": "grok-session-1",
|
|
590
|
+
"requestId": "e745fdc1-1bc8-44e2-b381-abf76cd8d09b",
|
|
591
|
+
"promptId": "e745fdc1-1bc8-44e2-b381-abf76cd8d09b",
|
|
592
|
+
"totalTokens": 22195,
|
|
593
|
+
"modelId": "grok-4.7",
|
|
594
|
+
"inputTokens": 21826,
|
|
595
|
+
"outputTokens": 362,
|
|
596
|
+
"cachedReadTokens": 2176,
|
|
597
|
+
"reasoningTokens": 325,
|
|
598
|
+
"usage": {
|
|
599
|
+
"inputTokens": 21826,
|
|
600
|
+
"outputTokens": 362,
|
|
601
|
+
"totalTokens": 22188,
|
|
602
|
+
"cachedReadTokens": 2176,
|
|
603
|
+
"cacheCreationTokens": 0,
|
|
604
|
+
"reasoningTokens": 325,
|
|
605
|
+
"modelCalls": 1,
|
|
606
|
+
"apiDurationMs": 7626,
|
|
607
|
+
"costUsdTicks": 425600000,
|
|
608
|
+
"modelUsage": {
|
|
609
|
+
"grok-4.7-build": {
|
|
610
|
+
"inputTokens": 21826,
|
|
611
|
+
"outputTokens": 362,
|
|
612
|
+
"totalTokens": 22188,
|
|
613
|
+
"cachedReadTokens": 2176,
|
|
614
|
+
"cacheCreationTokens": 0,
|
|
615
|
+
"reasoningTokens": 325,
|
|
616
|
+
"modelCalls": 1,
|
|
617
|
+
"apiDurationMs": 7626,
|
|
618
|
+
"costUsdTicks": 425600000
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
"numTurns": 1
|
|
622
|
+
},
|
|
623
|
+
"cancellationCategory": "PermissionRejected",
|
|
624
|
+
"cancellationContext": {
|
|
625
|
+
"tool_name": "write",
|
|
626
|
+
"reason": "User rejected the execution"
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|