@plurnk/plurnk-contracts 6.0.1 → 7.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.
Files changed (97) hide show
  1. package/.env.defaults +5 -5
  2. package/README.md +4 -4
  3. package/SPEC.md +158 -2054
  4. package/dist/schema/{AguiDiscovery.json → AcpDiscovery.json} +4 -4
  5. package/dist/schema/ApplicationOperationEvent.json +2 -2
  6. package/dist/schema/CapabilityDescriptor.json +3 -3
  7. package/dist/schema/CapabilityPolicy.json +5 -1
  8. package/dist/schema/CapabilitySelector.json +3 -3
  9. package/dist/schema/ClientInteractionProjection.json +2 -2
  10. package/dist/schema/ClientInteractionRequest.json +26 -10
  11. package/dist/schema/ClientInteractionResolution.json +14 -6
  12. package/dist/schema/FunctionalityDefinitionState.json +3 -3
  13. package/dist/schema/FunctionalityDiscoverQuery.json +2 -1
  14. package/dist/schema/FunctionalityMutationResult.json +1 -1
  15. package/dist/schema/MatcherBody.json +2 -2
  16. package/dist/schema/McpServerDefinition.json +35 -9
  17. package/dist/schema/ModelCatalogPage.json +1 -1
  18. package/dist/schema/ModelRoute.json +2 -2
  19. package/dist/schema/Notice.json +1 -1
  20. package/dist/schema/PlurnkStatement.json +8 -8
  21. package/dist/schema/ProposalDisposition.json +1 -1
  22. package/dist/schema/ProposalPolicy.json +1 -1
  23. package/dist/schema/ProposalProjection.json +57 -6
  24. package/dist/schema/ResourceSelection.json +1 -1
  25. package/dist/schema/RollbackReport.json +1 -1
  26. package/dist/schema/{WorkerOwner.json → SessionOwner.json} +2 -2
  27. package/dist/schema/SkillDefinition.json +8 -7
  28. package/dist/src/Application.d.ts +97 -66
  29. package/dist/src/Application.d.ts.map +1 -1
  30. package/dist/src/Application.js +198 -1
  31. package/dist/src/Application.js.map +1 -1
  32. package/dist/src/ApplicationNotifications.d.ts +52 -0
  33. package/dist/src/ApplicationNotifications.d.ts.map +1 -0
  34. package/dist/src/ApplicationNotifications.js +2 -0
  35. package/dist/src/ApplicationNotifications.js.map +1 -0
  36. package/dist/src/ApplicationPort.d.ts +84 -75
  37. package/dist/src/ApplicationPort.d.ts.map +1 -1
  38. package/dist/src/ApplicationStream.d.ts +4 -4
  39. package/dist/src/ApplicationStream.d.ts.map +1 -1
  40. package/dist/src/CapabilityAdmission.d.ts +2 -0
  41. package/dist/src/CapabilityAdmission.d.ts.map +1 -1
  42. package/dist/src/CapabilityAdmission.js +14 -2
  43. package/dist/src/CapabilityAdmission.js.map +1 -1
  44. package/dist/src/Excerpt.js +1 -1
  45. package/dist/src/Excerpt.js.map +1 -1
  46. package/dist/src/Functionality.d.ts +3 -6
  47. package/dist/src/Functionality.d.ts.map +1 -1
  48. package/dist/src/HttpOrigin.d.ts +3 -3
  49. package/dist/src/HttpOrigin.js +1 -1
  50. package/dist/src/JsonDocument.js +1 -1
  51. package/dist/src/JsonDocument.js.map +1 -1
  52. package/dist/src/JsonResult.js +1 -1
  53. package/dist/src/JsonResult.js.map +1 -1
  54. package/dist/src/LogRow.d.ts +31 -0
  55. package/dist/src/LogRow.d.ts.map +1 -0
  56. package/dist/src/LogRow.js +46 -0
  57. package/dist/src/LogRow.js.map +1 -0
  58. package/dist/src/LoopLifecycle.d.ts +1 -1
  59. package/dist/src/LoopLifecycle.d.ts.map +1 -1
  60. package/dist/src/LoopLifecycle.js +2 -2
  61. package/dist/src/LoopLifecycle.js.map +1 -1
  62. package/dist/src/MessageResource.d.ts +4 -4
  63. package/dist/src/MessageResource.d.ts.map +1 -1
  64. package/dist/src/PathSyntax.js +2 -2
  65. package/dist/src/PathSyntax.js.map +1 -1
  66. package/dist/src/PlurnkParseError.js +1 -1
  67. package/dist/src/PlurnkParseError.js.map +1 -1
  68. package/dist/src/Problems.js +1 -1
  69. package/dist/src/Problems.js.map +1 -1
  70. package/dist/src/TurnDisposition.js +1 -1
  71. package/dist/src/TurnDisposition.js.map +1 -1
  72. package/dist/src/Validator.d.ts +5 -108
  73. package/dist/src/Validator.d.ts.map +1 -1
  74. package/dist/src/Validator.js +97 -518
  75. package/dist/src/Validator.js.map +1 -1
  76. package/dist/src/guards.js +1 -1
  77. package/dist/src/guards.js.map +1 -1
  78. package/dist/src/index.d.ts +6 -5
  79. package/dist/src/index.d.ts.map +1 -1
  80. package/dist/src/index.js +7 -5
  81. package/dist/src/index.js.map +1 -1
  82. package/dist/src/types.d.ts +1 -1
  83. package/dist/src/types.d.ts.map +1 -1
  84. package/dist/src/types.generated.d.ts +91 -187
  85. package/dist/src/types.generated.d.ts.map +1 -1
  86. package/dist/src/types.js +7 -7
  87. package/dist/src/types.js.map +1 -1
  88. package/package.json +5 -9
  89. package/plurnk.md +16 -16
  90. package/dist/conformance/agui-v1.json +0 -716
  91. package/dist/schema/A2aAgentDefinition.json +0 -76
  92. package/dist/schema/AguiClientConformance.json +0 -74
  93. package/dist/schema/AguiConformanceKit.json +0 -111
  94. package/dist/src/AguiConformance.d.ts +0 -11
  95. package/dist/src/AguiConformance.d.ts.map +0 -1
  96. package/dist/src/AguiConformance.js +0 -16
  97. package/dist/src/AguiConformance.js.map +0 -1
@@ -1,716 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "transport": [
4
- {
5
- "name": "comments-crlf-split-multiline",
6
- "chunks": [
7
- ": heartbeat\r\nid: ignored\r\ndata: {\"type\":\"CUSTOM\",\r\ndata: \"name\":\"plurnk.notice\",\"value\":{\"source\":\"engine\",\"kind\":\"fixture\",\"level\":\"info\"}}\r",
8
- "\n\r\n"
9
- ],
10
- "eof": false,
11
- "expect": {
12
- "events": [
13
- {
14
- "type": "CUSTOM",
15
- "name": "plurnk.notice",
16
- "value": { "source": "engine", "kind": "fixture", "level": "info" }
17
- }
18
- ]
19
- }
20
- },
21
- {
22
- "name": "split-frame-and-eof-dispatch",
23
- "chunks": [
24
- "data: {\"type\":\"RUN_STARTED\",\"threadId\":\"fixture\",\"runId\":\"run",
25
- "\"}\n\ndata: {\"type\":\"RUN_FINISHED\",\"threadId\":\"fixture\",\"runId\":\"run\",\"outcome\":{\"type\":\"success\"}}"
26
- ],
27
- "eof": true,
28
- "expect": {
29
- "events": [
30
- { "type": "RUN_STARTED", "threadId": "fixture", "runId": "run" },
31
- {
32
- "type": "RUN_FINISHED",
33
- "threadId": "fixture",
34
- "runId": "run",
35
- "outcome": { "type": "success" }
36
- }
37
- ]
38
- }
39
- },
40
- {
41
- "name": "malformed-json",
42
- "chunks": ["data: not-json\n\n"],
43
- "eof": false,
44
- "expect": { "error": "invalid-json" }
45
- },
46
- {
47
- "name": "cr-only-lines",
48
- "chunks": [
49
- ": comment\rdata: {\"type\":\"RUN_STARTED\",\"threadId\":\"fixture\",\"runId\":\"cr\"}\r\r: tail\n"
50
- ],
51
- "eof": false,
52
- "expect": {
53
- "events": [
54
- { "type": "RUN_STARTED", "threadId": "fixture", "runId": "cr" }
55
- ]
56
- }
57
- }
58
- ],
59
- "lifecycles": [
60
- {
61
- "name": "ordinary-run",
62
- "events": [
63
- { "type": "RUN_STARTED", "threadId": "fixture", "runId": "run" },
64
- {
65
- "type": "STATE_SNAPSHOT",
66
- "snapshot": {
67
- "plurnk": {
68
- "workspace": {
69
- "id": 1,
70
- "name": "fixture",
71
- "projectRoot": null,
72
- "projectLabel": null,
73
- "preparation": [],
74
- "activity": null
75
- },
76
- "status": {
77
- "lifecycle": "idle",
78
- "model": null,
79
- "loopId": null,
80
- "loopSeq": null,
81
- "packetCount": 0,
82
- "waitUntil": null,
83
- "claimedAt": null,
84
- "terminatedAt": null,
85
- "descendants": [],
86
- "inbox": [],
87
- "streams": [],
88
- "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" }
89
- }
90
- },
91
- "budget": {}
92
- }
93
- },
94
- {
95
- "type": "STATE_DELTA",
96
- "delta": [
97
- { "op": "replace", "path": "/plurnk/workspace/preparation", "value": [
98
- { "family": "mcp", "alias": "search", "phase": "preparing", "since": "2026-09-29T00:00:00.000Z" }
99
- ] }
100
- ]
101
- },
102
- {
103
- "type": "STATE_DELTA",
104
- "delta": [
105
- { "op": "replace", "path": "/plurnk/workspace/preparation", "value": [] },
106
- { "op": "replace", "path": "/plurnk/status/lifecycle", "value": "running" },
107
- { "op": "replace", "path": "/plurnk/status/loopId", "value": 1 },
108
- { "op": "replace", "path": "/plurnk/status/loopSeq", "value": 1 },
109
- { "op": "replace", "path": "/plurnk/status/packetCount", "value": 1 }
110
- ]
111
- },
112
- {
113
- "type": "TOOL_CALL_START",
114
- "toolCallId": "1/1/1",
115
- "toolCallName": "NOTE",
116
- "metadata": { "plurnk": { "id": 1, "coordinate": "1/1/1", "worker": 7, "origin": "model", "op": "NOTE", "source": null, "address": null, "signal": null, "status": 200, "attrs": {} } }
117
- },
118
- { "type": "TOOL_CALL_ARGS", "toolCallId": "1/1/1", "delta": "{\"aside\":null,\"target\":null,\"metadata\":null,\"lineMarker\":null,\"body\":\"Work.\"}" },
119
- { "type": "TOOL_CALL_END", "toolCallId": "1/1/1" },
120
- {
121
- "type": "TOOL_CALL_RESULT",
122
- "toolCallId": "1/1/1",
123
- "messageId": "1/1/1/result",
124
- "content": "{\"status\":200,\"resource\":\"note://fixture/1/1/1\"}"
125
- },
126
- {
127
- "type": "STATE_DELTA",
128
- "delta": [
129
- { "op": "replace", "path": "/plurnk/status/lifecycle", "value": "completed" },
130
- { "op": "replace", "path": "/plurnk/status/loopId", "value": 1 },
131
- { "op": "replace", "path": "/plurnk/status/loopSeq", "value": 1 }
132
- ]
133
- },
134
- {
135
- "type": "RUN_FINISHED",
136
- "threadId": "fixture",
137
- "runId": "run",
138
- "outcome": { "type": "success" },
139
- "result": { "status": 200 },
140
- "metadata": {
141
- "plurnk": {
142
- "terminal": {
143
- "workspaceId": 1,
144
- "workerId": 7,
145
- "loopId": 1,
146
- "loopSeq": 1,
147
- "result": { "status": 200 },
148
- "hitMaxTurns": false,
149
- "turnIds": [1],
150
- "attributions": [],
151
- "usage": {
152
- "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
153
- "curationWeight": null,
154
- "curationBudget": null,
155
- "contextTokens": null,
156
- "contextCapacity": null,
157
- "meta": {}
158
- }
159
- }
160
- }
161
- }
162
- }
163
- ],
164
- "expect": {
165
- "completion": "success",
166
- "families": ["log/entry", "loop/packet", "loop/terminated", "workspace/preparation"],
167
- "status": 200
168
- }
169
- },
170
- {
171
- "name": "action-success",
172
- "events": [
173
- { "type": "RUN_STARTED", "threadId": "fixture", "runId": "action" },
174
- {
175
- "type": "RUN_FINISHED",
176
- "threadId": "fixture",
177
- "runId": "action",
178
- "outcome": { "type": "success" },
179
- "result": {
180
- "kind": "workspace.list",
181
- "ok": true,
182
- "result": { "workspaces": [] }
183
- }
184
- }
185
- ],
186
- "expect": {
187
- "completion": "success",
188
- "families": [],
189
- "action": { "kind": "workspace.list", "ok": true }
190
- }
191
- },
192
- {
193
- "name": "action-problem",
194
- "events": [
195
- { "type": "RUN_STARTED", "threadId": "fixture", "runId": "action-problem" },
196
- {
197
- "type": "STATE_SNAPSHOT",
198
- "snapshot": {
199
- "plurnk": {
200
- "workspace": {
201
- "id": 1,
202
- "name": "fixture",
203
- "projectRoot": null,
204
- "projectLabel": null,
205
- "preparation": [],
206
- "activity": null
207
- }
208
- }
209
- }
210
- },
211
- {
212
- "type": "RUN_FINISHED",
213
- "threadId": "fixture",
214
- "runId": "action-problem",
215
- "outcome": { "type": "success" },
216
- "result": {
217
- "kind": "workspace.rename",
218
- "ok": false,
219
- "problem": {
220
- "type": "https://problems.plurnk.xyz/daemon/workspace/name-conflict",
221
- "title": "Name conflict",
222
- "status": 409,
223
- "detail": "The workspace name is already in use."
224
- }
225
- }
226
- }
227
- ],
228
- "expect": {
229
- "completion": "success",
230
- "families": [],
231
- "action": { "kind": "workspace.rename", "ok": false, "status": 409 }
232
- }
233
- },
234
- {
235
- "name": "loop-injection",
236
- "events": [
237
- {
238
- "type": "RUN_FINISHED",
239
- "threadId": "fixture",
240
- "runId": "inject",
241
- "outcome": { "type": "success" },
242
- "result": {
243
- "kind": "loop.inject",
244
- "ok": true,
245
- "result": {
246
- "status": 100,
247
- "action": "injected_next_turn",
248
- "loopId": 9,
249
- "turnSeq": 2
250
- }
251
- }
252
- }
253
- ],
254
- "expect": {
255
- "completion": "success",
256
- "families": [],
257
- "status": 100,
258
- "action": { "kind": "loop.inject", "ok": true, "status": 100 }
259
- }
260
- },
261
- {
262
- "name": "proposal-interrupt",
263
- "events": [
264
- {
265
- "type": "TOOL_CALL_START",
266
- "toolCallId": "1/2/3",
267
- "toolCallName": "sh",
268
- "metadata": {
269
- "plurnk": {
270
- "id": 42,
271
- "coordinate": "1/2/3",
272
- "worker": 7,
273
- "origin": "model",
274
- "op": "sh",
275
- "source": null,
276
- "address": null,
277
- "signal": null,
278
- "status": 202,
279
- "attrs": { "runtime": "sh" },
280
- "state": "proposed"
281
- }
282
- }
283
- },
284
- {
285
- "type": "TOOL_CALL_ARGS",
286
- "toolCallId": "1/2/3",
287
- "delta": "{\"runtime\":\"sh\",\"aside\":null,\"target\":null,\"metadata\":null,\"lineMarker\":null,\"body\":\"printf ok\"}"
288
- },
289
- { "type": "TOOL_CALL_END", "toolCallId": "1/2/3" },
290
- {
291
- "type": "RUN_FINISHED",
292
- "threadId": "fixture",
293
- "runId": "proposal",
294
- "outcome": {
295
- "type": "interrupt",
296
- "interrupts": [
297
- {
298
- "id": "6f1c0a52-0b7e-4a39-9d55-2f0c7a1e9b13",
299
- "reason": "tool_call",
300
- "message": "Review the requested action.",
301
- "toolCallId": "1/2/3",
302
- "responseSchema": {
303
- "type": "object",
304
- "properties": {
305
- "decision": { "type": "string", "enum": ["accept", "reject", "cancel"] },
306
- "body": { "type": "string" },
307
- "outcome": { "type": "string" }
308
- },
309
- "required": ["decision"]
310
- },
311
- "metadata": {
312
- "plurnk": {
313
- "proposal": {
314
- "logEntryId": 42,
315
- "workerId": 7,
316
- "worker": "main",
317
- "loopId": 3,
318
- "turnId": 5,
319
- "coordinate": "1/2/3",
320
- "op": "sh",
321
- "target": { "scheme": "sh", "authority": null, "pathname": "" },
322
- "body": "printf ok",
323
- "attrs": { "runtime": "sh" },
324
- "owner": "agui://operator/threads/fixture",
325
- "disposition": { "decision": "review" }
326
- }
327
- }
328
- }
329
- }
330
- ]
331
- }
332
- }
333
- ],
334
- "expect": {
335
- "completion": "interrupt",
336
- "families": ["loop/proposal"],
337
- "interrupt": "proposal"
338
- }
339
- },
340
- {
341
- "name": "proposal-interrupt-without-call",
342
- "events": [
343
- {
344
- "type": "RUN_FINISHED",
345
- "threadId": "fixture",
346
- "runId": "proposal-without-call",
347
- "outcome": {
348
- "type": "interrupt",
349
- "interrupts": [
350
- {
351
- "id": "0d4e7b18-93a2-4c61-8f0e-5b2a9c7d1e46",
352
- "reason": "tool_call",
353
- "message": "Review the requested action.",
354
- "responseSchema": {
355
- "type": "object",
356
- "properties": {
357
- "decision": { "type": "string", "enum": ["accept", "reject", "cancel"] },
358
- "body": { "type": "string" },
359
- "outcome": { "type": "string" }
360
- },
361
- "required": ["decision"]
362
- },
363
- "expiresAt": "2026-10-16T12:00:00.000Z",
364
- "metadata": {
365
- "plurnk": {
366
- "proposal": {
367
- "logEntryId": 43,
368
- "workerId": 9,
369
- "worker": "background",
370
- "loopId": 4,
371
- "turnId": 6,
372
- "coordinate": "1/1/2",
373
- "op": "EDIT",
374
- "target": { "scheme": "file", "authority": null, "pathname": "notes.md" },
375
- "body": "--- notes.md\n+++ notes.md\n@@ -1 +1 @@\n-before\n+after",
376
- "attrs": {},
377
- "owner": "agui://operator/threads/fixture",
378
- "disposition": { "decision": "review" },
379
- "expiresAt": "2026-10-16T12:00:00.000Z"
380
- }
381
- }
382
- }
383
- }
384
- ]
385
- }
386
- }
387
- ],
388
- "expect": {
389
- "completion": "interrupt",
390
- "families": ["loop/proposal"],
391
- "interrupt": "proposal"
392
- }
393
- },
394
- {
395
- "name": "interaction-interrupt",
396
- "events": [
397
- {
398
- "type": "TOOL_CALL_START",
399
- "toolCallId": "int:43",
400
- "toolCallName": "request_user_input"
401
- },
402
- {
403
- "type": "TOOL_CALL_ARGS",
404
- "toolCallId": "int:43",
405
- "delta": "{\"question\":\"Proceed?\"}"
406
- },
407
- { "type": "TOOL_CALL_END", "toolCallId": "int:43" },
408
- {
409
- "type": "RUN_FINISHED",
410
- "threadId": "fixture",
411
- "runId": "interaction",
412
- "outcome": {
413
- "type": "interrupt",
414
- "interrupts": [
415
- {
416
- "id": "int:43",
417
- "reason": "tool_call",
418
- "toolCallId": "int:43",
419
- "message": "Answer the question.",
420
- "responseSchema": {
421
- "type": "object",
422
- "required": ["answer"],
423
- "properties": { "answer": { "type": "string" } }
424
- }
425
- }
426
- ]
427
- }
428
- }
429
- ],
430
- "expect": {
431
- "completion": "interrupt",
432
- "families": ["loop/interaction"],
433
- "interrupt": "interaction"
434
- }
435
- },
436
- {
437
- "name": "reasoning-stream",
438
- "events": [
439
- {
440
- "type": "REASONING_START",
441
- "messageId": "model-call-11/request-1/reasoning"
442
- },
443
- {
444
- "type": "REASONING_MESSAGE_START",
445
- "messageId": "model-call-11/request-1/reasoning",
446
- "role": "reasoning",
447
- "metadata": { "plurnk": { "coordinate": "1/2" } }
448
- },
449
- {
450
- "type": "REASONING_MESSAGE_CONTENT",
451
- "messageId": "model-call-11/request-1/reasoning",
452
- "delta": "checked "
453
- },
454
- {
455
- "type": "REASONING_MESSAGE_CONTENT",
456
- "messageId": "model-call-11/request-1/reasoning",
457
- "delta": "the evidence"
458
- },
459
- {
460
- "type": "REASONING_MESSAGE_END",
461
- "messageId": "model-call-11/request-1/reasoning"
462
- },
463
- {
464
- "type": "REASONING_END",
465
- "messageId": "model-call-11/request-1/reasoning"
466
- },
467
- {
468
- "type": "RUN_FINISHED",
469
- "threadId": "fixture",
470
- "runId": "reasoning",
471
- "outcome": { "type": "success" },
472
- "result": { "status": 200 },
473
- "metadata": {
474
- "plurnk": {
475
- "terminal": {
476
- "workspaceId": 1,
477
- "workerId": 7,
478
- "loopId": 1,
479
- "loopSeq": 1,
480
- "result": { "status": 200 },
481
- "hitMaxTurns": false,
482
- "turnIds": [1],
483
- "attributions": [],
484
- "usage": {
485
- "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
486
- "curationWeight": null,
487
- "curationBudget": null,
488
- "contextTokens": null,
489
- "contextCapacity": null,
490
- "meta": {}
491
- }
492
- }
493
- }
494
- }
495
- }
496
- ],
497
- "expect": {
498
- "completion": "success",
499
- "families": ["reasoning/event", "loop/terminated"],
500
- "status": 200
501
- }
502
- },
503
- {
504
- "name": "outside-text",
505
- "events": [
506
- { "type": "STEP_STARTED", "stepName": "turn-1" },
507
- {
508
- "type": "CUSTOM",
509
- "name": "plurnk.outside",
510
- "value": { "coordinate": "worker-1-1", "text": "Thinking out loud.", "tokens": 9 }
511
- },
512
- { "type": "STEP_FINISHED", "stepName": "turn-1" },
513
- {
514
- "type": "RUN_FINISHED",
515
- "threadId": "fixture",
516
- "runId": "outside",
517
- "outcome": { "type": "success" },
518
- "result": { "status": 200 },
519
- "metadata": {
520
- "plurnk": {
521
- "terminal": {
522
- "workspaceId": 1,
523
- "workerId": 7,
524
- "loopId": 1,
525
- "loopSeq": 1,
526
- "result": { "status": 200 },
527
- "hitMaxTurns": false,
528
- "turnIds": [1],
529
- "attributions": [],
530
- "usage": {
531
- "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
532
- "curationWeight": null,
533
- "curationBudget": null,
534
- "contextTokens": null,
535
- "contextCapacity": null,
536
- "meta": {}
537
- }
538
- }
539
- }
540
- }
541
- }
542
- ],
543
- "expect": {
544
- "completion": "success",
545
- "families": ["outside/event", "loop/terminated"],
546
- "status": 200
547
- }
548
- },
549
- {
550
- "name": "notice-and-stream",
551
- "events": [
552
- {
553
- "type": "CUSTOM",
554
- "name": "plurnk.notice",
555
- "value": { "source": "engine", "kind": "fixture", "level": "info" }
556
- },
557
- {
558
- "type": "CUSTOM",
559
- "name": "plurnk.stream",
560
- "value": {
561
- "entryId": 8,
562
- "workerId": 7,
563
- "target": "sh:///1/1/8",
564
- "scheme": "sh",
565
- "channel": "stdout",
566
- "state": "active",
567
- "contentLength": 4
568
- }
569
- },
570
- {
571
- "type": "CUSTOM",
572
- "name": "plurnk.stream",
573
- "value": {
574
- "entryId": 8,
575
- "workerId": 7,
576
- "target": "sh:///1/1/8",
577
- "subscriptionId": 3,
578
- "scheme": "sh",
579
- "result": { "status": 200 },
580
- "summary": "completed",
581
- "wakeAction": "no-loop"
582
- }
583
- },
584
- {
585
- "type": "RUN_FINISHED",
586
- "threadId": "fixture",
587
- "runId": "stream",
588
- "outcome": { "type": "success" },
589
- "result": { "status": 200 },
590
- "metadata": {
591
- "plurnk": {
592
- "terminal": {
593
- "workspaceId": 1,
594
- "workerId": 7,
595
- "loopId": 1,
596
- "loopSeq": 1,
597
- "result": { "status": 200 },
598
- "hitMaxTurns": false,
599
- "turnIds": [1],
600
- "attributions": [],
601
- "usage": {
602
- "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
603
- "curationWeight": null,
604
- "curationBudget": null,
605
- "contextTokens": null,
606
- "contextCapacity": null,
607
- "meta": {}
608
- }
609
- }
610
- }
611
- }
612
- }
613
- ],
614
- "expect": {
615
- "completion": "success",
616
- "families": ["notice/event", "stream/event", "stream/concluded", "loop/terminated"],
617
- "status": 200
618
- }
619
- },
620
- {
621
- "name": "problem-run",
622
- "events": [
623
- {
624
- "type": "RUN_ERROR",
625
- "message": "The fixture deliberately conflicts.",
626
- "code": "https://problems.plurnk.xyz/fixture/conflict",
627
- "metadata": {
628
- "plurnk": {
629
- "problem": {
630
- "type": "https://problems.plurnk.xyz/fixture/conflict",
631
- "title": "Fixture conflict",
632
- "status": 409,
633
- "detail": "The fixture deliberately conflicts."
634
- }
635
- }
636
- }
637
- }
638
- ],
639
- "expect": {
640
- "completion": "error",
641
- "families": ["problem/event"],
642
- "status": 409
643
- }
644
- },
645
- {
646
- "name": "cancelled-run",
647
- "events": [
648
- {
649
- "type": "RUN_FINISHED",
650
- "threadId": "fixture",
651
- "runId": "cancel",
652
- "outcome": { "type": "cancelled" },
653
- "metadata": {
654
- "plurnk": {
655
- "terminal": {
656
- "workspaceId": 1,
657
- "workerId": 7,
658
- "loopId": 1,
659
- "loopSeq": 1,
660
- "result": {
661
- "status": 499,
662
- "problem": {
663
- "type": "https://problems.plurnk.xyz/lifecycle/cancel/loop-cancelled",
664
- "title": "Loop cancelled",
665
- "status": 499,
666
- "detail": "The loop was cancelled."
667
- }
668
- },
669
- "hitMaxTurns": false,
670
- "turnIds": [1],
671
- "attributions": [],
672
- "usage": {
673
- "accounting": { "requests": [], "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0, "inputTokenDetails": { "noCacheTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "outputTokenDetails": { "textTokens": 0, "reasoningTokens": 0 } }, "costUsd": "0" },
674
- "curationWeight": null,
675
- "curationBudget": null,
676
- "contextTokens": null,
677
- "contextCapacity": null,
678
- "meta": {}
679
- }
680
- }
681
- }
682
- }
683
- }
684
- ],
685
- "expect": {
686
- "completion": "success",
687
- "families": ["loop/terminated"],
688
- "status": 499
689
- }
690
- },
691
- {
692
- "name": "dead-stream",
693
- "events": [
694
- {
695
- "type": "TOOL_CALL_START",
696
- "toolCallId": "1/1/1",
697
- "toolCallName": "NOTE",
698
- "metadata": { "plurnk": { "id": 1, "coordinate": "1/1/1", "worker": 7, "origin": "model", "op": "NOTE", "source": null, "address": null, "signal": null, "status": 200, "attrs": {} } }
699
- },
700
- { "type": "TOOL_CALL_ARGS", "toolCallId": "1/1/1", "delta": "{\"aside\":null,\"target\":null,\"metadata\":null,\"lineMarker\":null,\"body\":null}" },
701
- { "type": "TOOL_CALL_END", "toolCallId": "1/1/1" },
702
- {
703
- "type": "TOOL_CALL_RESULT",
704
- "toolCallId": "1/1/1",
705
- "messageId": "1/1/1/result",
706
- "content": "{\"status\":200,\"resource\":\"note://fixture/1/1/1\"}"
707
- }
708
- ],
709
- "expect": {
710
- "completion": "dead-stream",
711
- "families": ["log/entry"],
712
- "status": 502
713
- }
714
- }
715
- ]
716
- }