@plurnk/plurnk-contracts 3.3.0 → 4.0.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.
@@ -65,16 +65,24 @@
65
65
  "type": "STATE_SNAPSHOT",
66
66
  "snapshot": {
67
67
  "plurnk": {
68
+ "workspace": {
69
+ "id": 1,
70
+ "name": "fixture",
71
+ "projectRoot": null,
72
+ "projectLabel": null,
73
+ "preparation": [],
74
+ "activity": null
75
+ },
68
76
  "status": {
69
77
  "lifecycle": "idle",
70
78
  "model": null,
71
79
  "loopId": null,
72
80
  "packetCount": 0,
73
81
  "waitUntil": null,
74
- "preparation": [],
75
- "activity": null,
82
+ "claimedAt": null,
83
+ "terminatedAt": null,
76
84
  "children": 0,
77
- "descendants": { "requests": 0, "usage": null, "knownUsage": null, "costUsd": null, "knownCostUsd": null }
85
+ "spend": { "requests": 0, "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "knownUsage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0", "knownCostUsd": "0" }
78
86
  }
79
87
  },
80
88
  "budget": {}
@@ -83,7 +91,7 @@
83
91
  {
84
92
  "type": "STATE_DELTA",
85
93
  "delta": [
86
- { "op": "replace", "path": "/plurnk/status/preparation", "value": [
94
+ { "op": "replace", "path": "/plurnk/workspace/preparation", "value": [
87
95
  { "family": "mcp", "alias": "search", "phase": "preparing", "since": "2026-09-29T00:00:00.000Z" }
88
96
  ] }
89
97
  ]
@@ -91,58 +99,61 @@
91
99
  {
92
100
  "type": "STATE_DELTA",
93
101
  "delta": [
94
- { "op": "replace", "path": "/plurnk/status/preparation", "value": [] },
102
+ { "op": "replace", "path": "/plurnk/workspace/preparation", "value": [] },
95
103
  { "op": "replace", "path": "/plurnk/status/lifecycle", "value": "running" },
96
104
  { "op": "replace", "path": "/plurnk/status/loopId", "value": 1 },
97
105
  { "op": "replace", "path": "/plurnk/status/packetCount", "value": 1 }
98
106
  ]
99
107
  },
100
108
  {
101
- "type": "CUSTOM",
102
- "name": "plurnk.row",
103
- "value": {
104
- "id": 1,
105
- "worker_id": 7,
106
- "origin": "model",
107
- "op": "NOTE",
108
- "coordinate": "1.1.1",
109
- "tx": { "body": "Work." }
110
- }
109
+ "type": "TOOL_CALL_START",
110
+ "toolCallId": "1/1/1",
111
+ "toolCallName": "NOTE",
112
+ "metadata": { "plurnk": { "id": 1, "coordinate": "1/1/1", "worker": 7, "origin": "model", "op": "NOTE", "source": null, "address": null, "signal": null, "status": 200, "attrs": {} } }
113
+ },
114
+ { "type": "TOOL_CALL_ARGS", "toolCallId": "1/1/1", "delta": "{\"aside\":null,\"target\":null,\"metadata\":null,\"lineMarker\":null,\"body\":\"Work.\"}" },
115
+ { "type": "TOOL_CALL_END", "toolCallId": "1/1/1" },
116
+ {
117
+ "type": "TOOL_CALL_RESULT",
118
+ "toolCallId": "1/1/1",
119
+ "messageId": "1/1/1/result",
120
+ "content": "{\"status\":200,\"resource\":\"note://fixture/1/1/1\"}",
121
+ "metadata": { "plurnk": { "id": 1, "coordinate": "1/1/1", "worker": 7, "origin": "model", "op": "NOTE", "source": null, "address": null, "signal": null, "status": 200, "attrs": {} } }
111
122
  },
112
123
  {
113
124
  "type": "STATE_DELTA",
114
125
  "delta": [
115
126
  { "op": "replace", "path": "/plurnk/status/lifecycle", "value": "completed" },
116
- { "op": "replace", "path": "/plurnk/status/loopId", "value": 1 },
117
- { "op": "replace", "path": "/plurnk/status/activity", "value": null }
127
+ { "op": "replace", "path": "/plurnk/status/loopId", "value": 1 }
118
128
  ]
119
129
  },
120
- {
121
- "type": "CUSTOM",
122
- "name": "plurnk.terminated",
123
- "value": {
124
- "workspaceId": 1,
125
- "workerId": 7,
126
- "loopId": 1,
127
- "result": { "status": 200 },
128
- "hitMaxTurns": false,
129
- "turnIds": [1],
130
- "attributions": [],
131
- "usage": {
132
- "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
133
- "curationWeight": null,
134
- "curationBudget": null,
135
- "contextTokens": null,
136
- "contextCapacity": null,
137
- "meta": {}
138
- }
139
- }
140
- },
141
130
  {
142
131
  "type": "RUN_FINISHED",
143
132
  "threadId": "fixture",
144
133
  "runId": "run",
145
- "outcome": { "type": "success" }
134
+ "outcome": { "type": "success" },
135
+ "result": { "status": 200 },
136
+ "metadata": {
137
+ "plurnk": {
138
+ "terminal": {
139
+ "workspaceId": 1,
140
+ "workerId": 7,
141
+ "loopId": 1,
142
+ "result": { "status": 200 },
143
+ "hitMaxTurns": false,
144
+ "turnIds": [1],
145
+ "attributions": [],
146
+ "usage": {
147
+ "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
148
+ "curationWeight": null,
149
+ "curationBudget": null,
150
+ "contextTokens": null,
151
+ "contextCapacity": null,
152
+ "meta": {}
153
+ }
154
+ }
155
+ }
156
+ }
146
157
  }
147
158
  ],
148
159
  "expect": {
@@ -156,19 +167,15 @@
156
167
  "events": [
157
168
  { "type": "RUN_STARTED", "threadId": "fixture", "runId": "action" },
158
169
  {
159
- "type": "CUSTOM",
160
- "name": "plurnk.action.result",
161
- "value": {
170
+ "type": "RUN_FINISHED",
171
+ "threadId": "fixture",
172
+ "runId": "action",
173
+ "outcome": { "type": "success" },
174
+ "result": {
162
175
  "kind": "workspace.list",
163
176
  "ok": true,
164
177
  "result": { "workspaces": [] }
165
178
  }
166
- },
167
- {
168
- "type": "RUN_FINISHED",
169
- "threadId": "fixture",
170
- "runId": "action",
171
- "outcome": { "type": "success" }
172
179
  }
173
180
  ],
174
181
  "expect": {
@@ -180,10 +187,28 @@
180
187
  {
181
188
  "name": "action-problem",
182
189
  "events": [
190
+ { "type": "RUN_STARTED", "threadId": "fixture", "runId": "action-problem" },
183
191
  {
184
- "type": "CUSTOM",
185
- "name": "plurnk.action.result",
186
- "value": {
192
+ "type": "STATE_SNAPSHOT",
193
+ "snapshot": {
194
+ "plurnk": {
195
+ "workspace": {
196
+ "id": 1,
197
+ "name": "fixture",
198
+ "projectRoot": null,
199
+ "projectLabel": null,
200
+ "preparation": [],
201
+ "activity": null
202
+ }
203
+ }
204
+ }
205
+ },
206
+ {
207
+ "type": "RUN_FINISHED",
208
+ "threadId": "fixture",
209
+ "runId": "action-problem",
210
+ "outcome": { "type": "success" },
211
+ "result": {
187
212
  "kind": "workspace.rename",
188
213
  "ok": false,
189
214
  "problem": {
@@ -193,12 +218,6 @@
193
218
  "detail": "The workspace name is already in use."
194
219
  }
195
220
  }
196
- },
197
- {
198
- "type": "RUN_FINISHED",
199
- "threadId": "fixture",
200
- "runId": "action-problem",
201
- "outcome": { "type": "success" }
202
221
  }
203
222
  ],
204
223
  "expect": {
@@ -211,9 +230,11 @@
211
230
  "name": "loop-injection",
212
231
  "events": [
213
232
  {
214
- "type": "CUSTOM",
215
- "name": "plurnk.action.result",
216
- "value": {
233
+ "type": "RUN_FINISHED",
234
+ "threadId": "fixture",
235
+ "runId": "inject",
236
+ "outcome": { "type": "success" },
237
+ "result": {
217
238
  "kind": "loop.inject",
218
239
  "ok": true,
219
240
  "result": {
@@ -223,12 +244,6 @@
223
244
  "turnSeq": 2
224
245
  }
225
246
  }
226
- },
227
- {
228
- "type": "RUN_FINISHED",
229
- "threadId": "fixture",
230
- "runId": "inject",
231
- "outcome": { "type": "success" }
232
247
  }
233
248
  ],
234
249
  "expect": {
@@ -243,15 +258,30 @@
243
258
  "events": [
244
259
  {
245
260
  "type": "TOOL_CALL_START",
246
- "toolCallId": "prop:42",
247
- "toolCallName": "request_approval"
261
+ "toolCallId": "1/2/3",
262
+ "toolCallName": "sh",
263
+ "metadata": {
264
+ "plurnk": {
265
+ "id": 42,
266
+ "coordinate": "1/2/3",
267
+ "worker": 7,
268
+ "origin": "model",
269
+ "op": "sh",
270
+ "source": null,
271
+ "address": null,
272
+ "signal": null,
273
+ "status": 202,
274
+ "attrs": { "runtime": "sh", "body": "printf ok" },
275
+ "state": "proposed"
276
+ }
277
+ }
248
278
  },
249
279
  {
250
280
  "type": "TOOL_CALL_ARGS",
251
- "toolCallId": "prop:42",
252
- "delta": "{\"op\":\"EDIT\",\"target\":{\"scheme\":\"file\",\"pathname\":\"example.txt\"},\"body\":\"change\",\"attrs\":{},\"flags\":{}}"
281
+ "toolCallId": "1/2/3",
282
+ "delta": "{\"runtime\":\"sh\",\"aside\":null,\"target\":null,\"metadata\":null,\"lineMarker\":null,\"body\":\"printf ok\"}"
253
283
  },
254
- { "type": "TOOL_CALL_END", "toolCallId": "prop:42" },
284
+ { "type": "TOOL_CALL_END", "toolCallId": "1/2/3" },
255
285
  {
256
286
  "type": "RUN_FINISHED",
257
287
  "threadId": "fixture",
@@ -260,9 +290,91 @@
260
290
  "type": "interrupt",
261
291
  "interrupts": [
262
292
  {
263
- "id": "prop:42",
293
+ "id": "6f1c0a52-0b7e-4a39-9d55-2f0c7a1e9b13",
294
+ "reason": "tool_call",
295
+ "message": "Review the requested action.",
296
+ "toolCallId": "1/2/3",
297
+ "responseSchema": {
298
+ "type": "object",
299
+ "properties": {
300
+ "decision": { "type": "string", "enum": ["accept", "reject", "cancel"] },
301
+ "body": { "type": "string" },
302
+ "outcome": { "type": "string" }
303
+ },
304
+ "required": ["decision"]
305
+ },
306
+ "metadata": {
307
+ "plurnk": {
308
+ "proposal": {
309
+ "logEntryId": 42,
310
+ "workerId": 7,
311
+ "worker": "main",
312
+ "loopId": 3,
313
+ "turnId": 5,
314
+ "coordinate": "1/2/3",
315
+ "op": "sh",
316
+ "target": { "scheme": "sh", "authority": null, "pathname": "" },
317
+ "body": "printf ok",
318
+ "attrs": { "runtime": "sh", "body": "printf ok" },
319
+ "owner": "agui://anonymous/threads/fixture",
320
+ "disposition": { "decision": "review" }
321
+ }
322
+ }
323
+ }
324
+ }
325
+ ]
326
+ }
327
+ }
328
+ ],
329
+ "expect": {
330
+ "completion": "interrupt",
331
+ "families": ["loop/proposal"],
332
+ "interrupt": "proposal"
333
+ }
334
+ },
335
+ {
336
+ "name": "proposal-interrupt-without-call",
337
+ "events": [
338
+ {
339
+ "type": "RUN_FINISHED",
340
+ "threadId": "fixture",
341
+ "runId": "proposal-without-call",
342
+ "outcome": {
343
+ "type": "interrupt",
344
+ "interrupts": [
345
+ {
346
+ "id": "0d4e7b18-93a2-4c61-8f0e-5b2a9c7d1e46",
264
347
  "reason": "tool_call",
265
- "toolCallId": "prop:42"
348
+ "message": "Review the requested action.",
349
+ "responseSchema": {
350
+ "type": "object",
351
+ "properties": {
352
+ "decision": { "type": "string", "enum": ["accept", "reject", "cancel"] },
353
+ "body": { "type": "string" },
354
+ "outcome": { "type": "string" }
355
+ },
356
+ "required": ["decision"]
357
+ },
358
+ "expiresAt": "2026-10-16T12:00:00.000Z",
359
+ "metadata": {
360
+ "plurnk": {
361
+ "proposal": {
362
+ "logEntryId": 43,
363
+ "workerId": 9,
364
+ "worker": "background",
365
+ "loopId": 4,
366
+ "turnId": 6,
367
+ "coordinate": "1/1/2",
368
+ "op": "EDIT",
369
+ "target": { "scheme": "file", "authority": null, "pathname": "notes.md" },
370
+ "body": "--- notes.md\n+++ notes.md\n@@ -1 +1 @@\n-before\n+after",
371
+ "attrs": {},
372
+ "owner": "agui://anonymous/threads/fixture",
373
+ "disposition": { "decision": "review" },
374
+ "expiresAt": "2026-10-16T12:00:00.000Z"
375
+ }
376
+ }
377
+ }
266
378
  }
267
379
  ]
268
380
  }
@@ -346,32 +458,33 @@
346
458
  "type": "REASONING_END",
347
459
  "messageId": "model-call-11/reasoning"
348
460
  },
349
- {
350
- "type": "CUSTOM",
351
- "name": "plurnk.terminated",
352
- "value": {
353
- "workspaceId": 1,
354
- "workerId": 7,
355
- "loopId": 1,
356
- "result": { "status": 200 },
357
- "hitMaxTurns": false,
358
- "turnIds": [1],
359
- "attributions": [],
360
- "usage": {
361
- "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
362
- "curationWeight": null,
363
- "curationBudget": null,
364
- "contextTokens": null,
365
- "contextCapacity": null,
366
- "meta": {}
367
- }
368
- }
369
- },
370
461
  {
371
462
  "type": "RUN_FINISHED",
372
463
  "threadId": "fixture",
373
464
  "runId": "reasoning",
374
- "outcome": { "type": "success" }
465
+ "outcome": { "type": "success" },
466
+ "result": { "status": 200 },
467
+ "metadata": {
468
+ "plurnk": {
469
+ "terminal": {
470
+ "workspaceId": 1,
471
+ "workerId": 7,
472
+ "loopId": 1,
473
+ "result": { "status": 200 },
474
+ "hitMaxTurns": false,
475
+ "turnIds": [1],
476
+ "attributions": [],
477
+ "usage": {
478
+ "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
479
+ "curationWeight": null,
480
+ "curationBudget": null,
481
+ "contextTokens": null,
482
+ "contextCapacity": null,
483
+ "meta": {}
484
+ }
485
+ }
486
+ }
487
+ }
375
488
  }
376
489
  ],
377
490
  "expect": {
@@ -390,32 +503,33 @@
390
503
  "value": { "coordinate": "worker-1-1", "text": "Thinking out loud.", "tokens": 9 }
391
504
  },
392
505
  { "type": "STEP_FINISHED", "stepName": "turn-1" },
393
- {
394
- "type": "CUSTOM",
395
- "name": "plurnk.terminated",
396
- "value": {
397
- "workspaceId": 1,
398
- "workerId": 7,
399
- "loopId": 1,
400
- "result": { "status": 200 },
401
- "hitMaxTurns": false,
402
- "turnIds": [1],
403
- "attributions": [],
404
- "usage": {
405
- "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
406
- "curationWeight": null,
407
- "curationBudget": null,
408
- "contextTokens": null,
409
- "contextCapacity": null,
410
- "meta": {}
411
- }
412
- }
413
- },
414
506
  {
415
507
  "type": "RUN_FINISHED",
416
508
  "threadId": "fixture",
417
509
  "runId": "outside",
418
- "outcome": { "type": "success" }
510
+ "outcome": { "type": "success" },
511
+ "result": { "status": 200 },
512
+ "metadata": {
513
+ "plurnk": {
514
+ "terminal": {
515
+ "workspaceId": 1,
516
+ "workerId": 7,
517
+ "loopId": 1,
518
+ "result": { "status": 200 },
519
+ "hitMaxTurns": false,
520
+ "turnIds": [1],
521
+ "attributions": [],
522
+ "usage": {
523
+ "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
524
+ "curationWeight": null,
525
+ "curationBudget": null,
526
+ "contextTokens": null,
527
+ "contextCapacity": null,
528
+ "meta": {}
529
+ }
530
+ }
531
+ }
532
+ }
419
533
  }
420
534
  ],
421
535
  "expect": {
@@ -459,32 +573,33 @@
459
573
  "wakeAction": "no-loop"
460
574
  }
461
575
  },
462
- {
463
- "type": "CUSTOM",
464
- "name": "plurnk.terminated",
465
- "value": {
466
- "workspaceId": 1,
467
- "workerId": 7,
468
- "loopId": 1,
469
- "result": { "status": 200 },
470
- "hitMaxTurns": false,
471
- "turnIds": [1],
472
- "attributions": [],
473
- "usage": {
474
- "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
475
- "curationWeight": null,
476
- "curationBudget": null,
477
- "contextTokens": null,
478
- "contextCapacity": null,
479
- "meta": {}
480
- }
481
- }
482
- },
483
576
  {
484
577
  "type": "RUN_FINISHED",
485
578
  "threadId": "fixture",
486
579
  "runId": "stream",
487
- "outcome": { "type": "success" }
580
+ "outcome": { "type": "success" },
581
+ "result": { "status": 200 },
582
+ "metadata": {
583
+ "plurnk": {
584
+ "terminal": {
585
+ "workspaceId": 1,
586
+ "workerId": 7,
587
+ "loopId": 1,
588
+ "result": { "status": 200 },
589
+ "hitMaxTurns": false,
590
+ "turnIds": [1],
591
+ "attributions": [],
592
+ "usage": {
593
+ "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
594
+ "curationWeight": null,
595
+ "curationBudget": null,
596
+ "contextTokens": null,
597
+ "contextCapacity": null,
598
+ "meta": {}
599
+ }
600
+ }
601
+ }
602
+ }
488
603
  }
489
604
  ],
490
605
  "expect": {
@@ -496,20 +611,20 @@
496
611
  {
497
612
  "name": "problem-run",
498
613
  "events": [
499
- {
500
- "type": "CUSTOM",
501
- "name": "plurnk.problem",
502
- "value": {
503
- "type": "https://problems.plurnk.xyz/fixture/conflict",
504
- "title": "Fixture conflict",
505
- "status": 409,
506
- "detail": "The fixture deliberately conflicts."
507
- }
508
- },
509
614
  {
510
615
  "type": "RUN_ERROR",
511
616
  "message": "The fixture deliberately conflicts.",
512
- "code": "https://problems.plurnk.xyz/fixture/conflict"
617
+ "code": "https://problems.plurnk.xyz/fixture/conflict",
618
+ "metadata": {
619
+ "plurnk": {
620
+ "problem": {
621
+ "type": "https://problems.plurnk.xyz/fixture/conflict",
622
+ "title": "Fixture conflict",
623
+ "status": 409,
624
+ "detail": "The fixture deliberately conflicts."
625
+ }
626
+ }
627
+ }
513
628
  }
514
629
  ],
515
630
  "expect": {
@@ -521,40 +636,40 @@
521
636
  {
522
637
  "name": "cancelled-run",
523
638
  "events": [
524
- {
525
- "type": "CUSTOM",
526
- "name": "plurnk.terminated",
527
- "value": {
528
- "workspaceId": 1,
529
- "workerId": 7,
530
- "loopId": 1,
531
- "result": {
532
- "status": 499,
533
- "problem": {
534
- "type": "https://problems.plurnk.xyz/lifecycle/cancel/loop-cancelled",
535
- "title": "Loop cancelled",
536
- "status": 499,
537
- "detail": "The loop was cancelled."
538
- }
539
- },
540
- "hitMaxTurns": false,
541
- "turnIds": [1],
542
- "attributions": [],
543
- "usage": {
544
- "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
545
- "curationWeight": null,
546
- "curationBudget": null,
547
- "contextTokens": null,
548
- "contextCapacity": null,
549
- "meta": {}
550
- }
551
- }
552
- },
553
639
  {
554
640
  "type": "RUN_FINISHED",
555
641
  "threadId": "fixture",
556
642
  "runId": "cancel",
557
- "outcome": { "type": "success" }
643
+ "outcome": { "type": "cancelled" },
644
+ "metadata": {
645
+ "plurnk": {
646
+ "terminal": {
647
+ "workspaceId": 1,
648
+ "workerId": 7,
649
+ "loopId": 1,
650
+ "result": {
651
+ "status": 499,
652
+ "problem": {
653
+ "type": "https://problems.plurnk.xyz/lifecycle/cancel/loop-cancelled",
654
+ "title": "Loop cancelled",
655
+ "status": 499,
656
+ "detail": "The loop was cancelled."
657
+ }
658
+ },
659
+ "hitMaxTurns": false,
660
+ "turnIds": [1],
661
+ "attributions": [],
662
+ "usage": {
663
+ "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
664
+ "curationWeight": null,
665
+ "curationBudget": null,
666
+ "contextTokens": null,
667
+ "contextCapacity": null,
668
+ "meta": {}
669
+ }
670
+ }
671
+ }
672
+ }
558
673
  }
559
674
  ],
560
675
  "expect": {
@@ -567,9 +682,19 @@
567
682
  "name": "dead-stream",
568
683
  "events": [
569
684
  {
570
- "type": "CUSTOM",
571
- "name": "plurnk.row",
572
- "value": { "id": 1, "worker_id": 7, "origin": "model", "op": "NOTE", "tx": { "body": null } }
685
+ "type": "TOOL_CALL_START",
686
+ "toolCallId": "1/1/1",
687
+ "toolCallName": "NOTE",
688
+ "metadata": { "plurnk": { "id": 1, "coordinate": "1/1/1", "worker": 7, "origin": "model", "op": "NOTE", "source": null, "address": null, "signal": null, "status": 200, "attrs": {} } }
689
+ },
690
+ { "type": "TOOL_CALL_ARGS", "toolCallId": "1/1/1", "delta": "{\"aside\":null,\"target\":null,\"metadata\":null,\"lineMarker\":null,\"body\":null}" },
691
+ { "type": "TOOL_CALL_END", "toolCallId": "1/1/1" },
692
+ {
693
+ "type": "TOOL_CALL_RESULT",
694
+ "toolCallId": "1/1/1",
695
+ "messageId": "1/1/1/result",
696
+ "content": "{\"status\":200,\"resource\":\"note://fixture/1/1/1\"}",
697
+ "metadata": { "plurnk": { "id": 1, "coordinate": "1/1/1", "worker": 7, "origin": "model", "op": "NOTE", "source": null, "address": null, "signal": null, "status": 200, "attrs": {} } }
573
698
  }
574
699
  ],
575
700
  "expect": {