@plurnk/plurnk-contracts 8.0.0 → 10.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 +1 -19
  2. package/README.md +5 -6
  3. package/SPEC.md +100 -65
  4. package/dist/schema/DaemonNotificationEnvelope.json +602 -0
  5. package/dist/schema/FunctionalityCandidate.json +4 -0
  6. package/dist/schema/FunctionalityDiscoverQuery.json +12 -0
  7. package/dist/schema/FunctionalityDiscoverResult.json +10 -0
  8. package/dist/schema/FunctionalityListQuery.json +33 -0
  9. package/dist/schema/FunctionalityListResult.json +16 -1
  10. package/dist/schema/McpServerDefinition.json +1 -1
  11. package/dist/schema/ModelCatalogPage.json +9 -0
  12. package/dist/schema/PlurnkStatement.json +42 -2
  13. package/dist/schema/ProposalProjection.json +0 -4
  14. package/dist/schema/ProviderAccounting.json +3 -3
  15. package/dist/schema/ProviderCost.json +1 -1
  16. package/dist/schema/ProviderRequestAccounting.json +3 -3
  17. package/dist/schema/ProviderUsage.json +1 -1
  18. package/dist/src/ActorIdentity.d.ts +26 -0
  19. package/dist/src/ActorIdentity.d.ts.map +1 -0
  20. package/dist/src/ActorIdentity.js +179 -0
  21. package/dist/src/ActorIdentity.js.map +1 -0
  22. package/dist/src/Application.d.ts +58 -125
  23. package/dist/src/Application.d.ts.map +1 -1
  24. package/dist/src/Application.js +372 -80
  25. package/dist/src/Application.js.map +1 -1
  26. package/dist/src/ApplicationNotifications.d.ts +77 -24
  27. package/dist/src/ApplicationNotifications.d.ts.map +1 -1
  28. package/dist/src/ApplicationNotifications.js +45 -9
  29. package/dist/src/ApplicationNotifications.js.map +1 -1
  30. package/dist/src/ApplicationPort.d.ts +53 -13
  31. package/dist/src/ApplicationPort.d.ts.map +1 -1
  32. package/dist/src/ApplicationPort.js +1 -1
  33. package/dist/src/ApplicationPort.js.map +1 -1
  34. package/dist/src/ApplicationStream.d.ts +2 -2
  35. package/dist/src/ApplicationStream.d.ts.map +1 -1
  36. package/dist/src/ApplicationStream.js.map +1 -1
  37. package/dist/src/CollectionCommand.d.ts +33 -0
  38. package/dist/src/CollectionCommand.d.ts.map +1 -0
  39. package/dist/src/CollectionCommand.js +277 -0
  40. package/dist/src/CollectionCommand.js.map +1 -0
  41. package/dist/src/Functionality.d.ts +7 -2
  42. package/dist/src/Functionality.d.ts.map +1 -1
  43. package/dist/src/Functionality.js.map +1 -1
  44. package/dist/src/HttpOrigin.d.ts +79 -10
  45. package/dist/src/HttpOrigin.d.ts.map +1 -1
  46. package/dist/src/HttpOrigin.js +286 -44
  47. package/dist/src/HttpOrigin.js.map +1 -1
  48. package/dist/src/HttpPort.d.ts +35 -0
  49. package/dist/src/HttpPort.d.ts.map +1 -0
  50. package/dist/src/HttpPort.js +106 -0
  51. package/dist/src/HttpPort.js.map +1 -0
  52. package/dist/src/InteractiveCommands.d.ts +96 -0
  53. package/dist/src/InteractiveCommands.d.ts.map +1 -0
  54. package/dist/src/InteractiveCommands.js +409 -0
  55. package/dist/src/InteractiveCommands.js.map +1 -0
  56. package/dist/src/LogRow.d.ts +1 -1
  57. package/dist/src/LogRow.js +1 -1
  58. package/dist/src/LogRow.js.map +1 -1
  59. package/dist/src/McpWireTool.d.ts +27 -0
  60. package/dist/src/McpWireTool.d.ts.map +1 -0
  61. package/dist/src/McpWireTool.js +30 -0
  62. package/dist/src/McpWireTool.js.map +1 -0
  63. package/dist/src/OAuthClient.d.ts +64 -0
  64. package/dist/src/OAuthClient.d.ts.map +1 -0
  65. package/dist/src/OAuthClient.js +226 -0
  66. package/dist/src/OAuthClient.js.map +1 -0
  67. package/dist/src/ScheduleCommand.d.ts +60 -0
  68. package/dist/src/ScheduleCommand.d.ts.map +1 -0
  69. package/dist/src/ScheduleCommand.js +677 -0
  70. package/dist/src/ScheduleCommand.js.map +1 -0
  71. package/dist/src/SessionProjection.d.ts +91 -0
  72. package/dist/src/SessionProjection.d.ts.map +1 -0
  73. package/dist/src/SessionProjection.js +223 -0
  74. package/dist/src/SessionProjection.js.map +1 -0
  75. package/dist/src/Validator.d.ts +4 -3
  76. package/dist/src/Validator.d.ts.map +1 -1
  77. package/dist/src/Validator.js +27 -17
  78. package/dist/src/Validator.js.map +1 -1
  79. package/dist/src/index.d.ts +11 -5
  80. package/dist/src/index.d.ts.map +1 -1
  81. package/dist/src/index.js +9 -4
  82. package/dist/src/index.js.map +1 -1
  83. package/dist/src/types.generated.d.ts +814 -566
  84. package/dist/src/types.generated.d.ts.map +1 -1
  85. package/dist/src/types.generated.js.map +1 -1
  86. package/dist/src/types.js +1 -1
  87. package/dist/src/types.js.map +1 -1
  88. package/package.json +3 -2
  89. package/dist/schema/ApplicationOperationEvent.json +0 -27
  90. package/dist/schema/CapabilityDescriptor.json +0 -28
  91. package/dist/schema/CapabilityPolicy.json +0 -22
  92. package/dist/schema/CapabilityProjection.json +0 -14
  93. package/dist/schema/CapabilitySelector.json +0 -29
  94. package/dist/src/CapabilityAdmission.d.ts +0 -11
  95. package/dist/src/CapabilityAdmission.d.ts.map +0 -1
  96. package/dist/src/CapabilityAdmission.js +0 -108
  97. package/dist/src/CapabilityAdmission.js.map +0 -1
@@ -0,0 +1,602 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.plurnk.xyz/v0/DaemonNotificationEnvelope.json",
4
+ "title": "DaemonNotificationEnvelope",
5
+ "description": "Canonical discrete DaemonNotification envelope streamed over GET /notifications and delivered to ApplicationPort.subscribeToEvents.",
6
+ "oneOf": [
7
+ {
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
11
+ "properties": {
12
+ "id": { "type": "integer", "minimum": 1 },
13
+ "event": { "const": "workspace/created" },
14
+ "timestamp": { "type": "number" },
15
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
16
+ "sessionId": { "type": "null" },
17
+ "data": { "$ref": "#/$defs/WorkspaceCreated" }
18
+ }
19
+ },
20
+ {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
24
+ "properties": {
25
+ "id": { "type": "integer", "minimum": 1 },
26
+ "event": { "const": "workspace/renamed" },
27
+ "timestamp": { "type": "number" },
28
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
29
+ "sessionId": { "type": "null" },
30
+ "data": { "$ref": "#/$defs/WorkspaceRenamed" }
31
+ }
32
+ },
33
+ {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
37
+ "properties": {
38
+ "id": { "type": "integer", "minimum": 1 },
39
+ "event": { "const": "workspace/archived" },
40
+ "timestamp": { "type": "number" },
41
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
42
+ "sessionId": { "type": "null" },
43
+ "data": { "$ref": "#/$defs/WorkspaceArchived" }
44
+ }
45
+ },
46
+ {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
50
+ "properties": {
51
+ "id": { "type": "integer", "minimum": 1 },
52
+ "event": { "const": "functionality/changed" },
53
+ "timestamp": { "type": "number" },
54
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
55
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
56
+ "data": { "$ref": "#/$defs/FunctionalityChanged" }
57
+ }
58
+ },
59
+ {
60
+ "type": "object",
61
+ "additionalProperties": false,
62
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
63
+ "properties": {
64
+ "id": { "type": "integer", "minimum": 1 },
65
+ "event": { "const": "session/created" },
66
+ "timestamp": { "type": "number" },
67
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
68
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
69
+ "data": { "$ref": "#/$defs/SessionCreated" }
70
+ }
71
+ },
72
+ {
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
76
+ "properties": {
77
+ "id": { "type": "integer", "minimum": 1 },
78
+ "event": { "const": "session/archived" },
79
+ "timestamp": { "type": "number" },
80
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
81
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
82
+ "data": { "$ref": "#/$defs/SessionArchived" }
83
+ }
84
+ },
85
+ {
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
89
+ "properties": {
90
+ "id": { "type": "integer", "minimum": 1 },
91
+ "event": { "const": "session/deleted" },
92
+ "timestamp": { "type": "number" },
93
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
94
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
95
+ "data": { "$ref": "#/$defs/SessionDeleted" }
96
+ }
97
+ },
98
+ {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
102
+ "properties": {
103
+ "id": { "type": "integer", "minimum": 1 },
104
+ "event": { "const": "session/titled" },
105
+ "timestamp": { "type": "number" },
106
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
107
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
108
+ "data": { "$ref": "#/$defs/SessionTitled" }
109
+ }
110
+ },
111
+ {
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
115
+ "properties": {
116
+ "id": { "type": "integer", "minimum": 1 },
117
+ "event": { "const": "session/policy" },
118
+ "timestamp": { "type": "number" },
119
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
120
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
121
+ "data": { "$ref": "#/$defs/SessionPolicy" }
122
+ }
123
+ },
124
+ {
125
+ "type": "object",
126
+ "additionalProperties": false,
127
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
128
+ "properties": {
129
+ "id": { "type": "integer", "minimum": 1 },
130
+ "event": { "const": "loop/started" },
131
+ "timestamp": { "type": "number" },
132
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
133
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
134
+ "data": { "$ref": "#/$defs/LoopStarted" }
135
+ }
136
+ },
137
+ {
138
+ "type": "object",
139
+ "additionalProperties": false,
140
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
141
+ "properties": {
142
+ "id": { "type": "integer", "minimum": 1 },
143
+ "event": { "const": "loop/parked" },
144
+ "timestamp": { "type": "number" },
145
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
146
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
147
+ "data": { "$ref": "#/$defs/LoopParked" }
148
+ }
149
+ },
150
+ {
151
+ "type": "object",
152
+ "additionalProperties": false,
153
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
154
+ "properties": {
155
+ "id": { "type": "integer", "minimum": 1 },
156
+ "event": { "const": "loop/proposal" },
157
+ "timestamp": { "type": "number" },
158
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
159
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
160
+ "data": { "$ref": "https://schemas.plurnk.xyz/v0/ProposalProjection.json" }
161
+ }
162
+ },
163
+ {
164
+ "type": "object",
165
+ "additionalProperties": false,
166
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
167
+ "properties": {
168
+ "id": { "type": "integer", "minimum": 1 },
169
+ "event": { "const": "loop/interaction" },
170
+ "timestamp": { "type": "number" },
171
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
172
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
173
+ "data": { "$ref": "https://schemas.plurnk.xyz/v0/ClientInteractionProjection.json" }
174
+ }
175
+ },
176
+ {
177
+ "type": "object",
178
+ "additionalProperties": false,
179
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
180
+ "properties": {
181
+ "id": { "type": "integer", "minimum": 1 },
182
+ "event": { "const": "loop/gate-settled" },
183
+ "timestamp": { "type": "number" },
184
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
185
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
186
+ "data": { "$ref": "#/$defs/LoopGateSettled" }
187
+ }
188
+ },
189
+ {
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
193
+ "properties": {
194
+ "id": { "type": "integer", "minimum": 1 },
195
+ "event": { "const": "loop/terminated" },
196
+ "timestamp": { "type": "number" },
197
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
198
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
199
+ "data": { "$ref": "#/$defs/Terminated" }
200
+ }
201
+ },
202
+ {
203
+ "type": "object",
204
+ "additionalProperties": false,
205
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
206
+ "properties": {
207
+ "id": { "type": "integer", "minimum": 1 },
208
+ "event": { "const": "log/entry" },
209
+ "timestamp": { "type": "number" },
210
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
211
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
212
+ "data": { "$ref": "#/$defs/LogEntry" }
213
+ }
214
+ },
215
+ {
216
+ "type": "object",
217
+ "additionalProperties": false,
218
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
219
+ "properties": {
220
+ "id": { "type": "integer", "minimum": 1 },
221
+ "event": { "const": "stream/concluded" },
222
+ "timestamp": { "type": "number" },
223
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
224
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
225
+ "data": { "$ref": "#/$defs/StreamConcluded" }
226
+ }
227
+ },
228
+ {
229
+ "type": "object",
230
+ "additionalProperties": false,
231
+ "required": ["id", "event", "timestamp", "workspaceId", "sessionId", "data"],
232
+ "properties": {
233
+ "id": { "type": "integer", "minimum": 1 },
234
+ "event": { "const": "notice/event" },
235
+ "timestamp": { "type": "number" },
236
+ "workspaceId": { "type": ["integer", "null"], "minimum": 1 },
237
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
238
+ "data": { "$ref": "#/$defs/NoticeEvent" }
239
+ }
240
+ }
241
+ ],
242
+ "$defs": {
243
+ "WorkspaceCreated": {
244
+ "type": "object",
245
+ "additionalProperties": false,
246
+ "required": ["id", "name", "projectRoot", "projectLabel"],
247
+ "properties": {
248
+ "id": { "type": "integer", "minimum": 1 },
249
+ "name": { "type": "string", "minLength": 1 },
250
+ "projectRoot": { "type": ["string", "null"] },
251
+ "projectLabel": { "type": ["string", "null"] }
252
+ }
253
+ },
254
+ "WorkspaceRenamed": {
255
+ "type": "object",
256
+ "additionalProperties": false,
257
+ "required": ["id", "name"],
258
+ "properties": {
259
+ "id": { "type": "integer", "minimum": 1 },
260
+ "name": { "type": "string", "minLength": 1 }
261
+ }
262
+ },
263
+ "WorkspaceArchived": {
264
+ "type": "object",
265
+ "additionalProperties": false,
266
+ "required": ["id", "archivedAt"],
267
+ "properties": {
268
+ "id": { "type": "integer", "minimum": 1 },
269
+ "archivedAt": { "type": ["string", "null"] }
270
+ }
271
+ },
272
+ "FunctionalityChanged": {
273
+ "type": "object",
274
+ "additionalProperties": false,
275
+ "required": ["workspaceId", "sessionId", "family"],
276
+ "properties": {
277
+ "workspaceId": { "type": "integer", "minimum": 1 },
278
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
279
+ "family": { "type": "string", "minLength": 1 }
280
+ }
281
+ },
282
+ "SessionCreated": {
283
+ "type": "object",
284
+ "additionalProperties": false,
285
+ "required": [
286
+ "id",
287
+ "workspaceId",
288
+ "workspaceName",
289
+ "projectRoot",
290
+ "projectLabel",
291
+ "name",
292
+ "parentSessionId",
293
+ "origin",
294
+ "kind",
295
+ "lifecycle"
296
+ ],
297
+ "properties": {
298
+ "id": { "type": "integer", "minimum": 1 },
299
+ "workspaceId": { "type": "integer", "minimum": 1 },
300
+ "workspaceName": { "type": "string", "minLength": 1 },
301
+ "projectRoot": { "type": ["string", "null"] },
302
+ "projectLabel": { "type": ["string", "null"] },
303
+ "name": { "type": "string", "minLength": 1 },
304
+ "parentSessionId": { "type": ["integer", "null"], "minimum": 1 },
305
+ "origin": { "enum": ["model", "_plurnk"] },
306
+ "kind": { "enum": ["root", "fork", "work"] },
307
+ "lifecycle": { "enum": ["idle", "queued", "running", "parked", "completed", "cancelled", "failed"] },
308
+ "persona": { "type": ["string", "null"], "minLength": 1 }
309
+ }
310
+ },
311
+ "SessionArchived": {
312
+ "type": "object",
313
+ "additionalProperties": false,
314
+ "required": ["id", "archivedAt", "sessionIds"],
315
+ "properties": {
316
+ "id": { "type": "integer", "minimum": 1 },
317
+ "archivedAt": { "type": ["string", "null"] },
318
+ "sessionIds": {
319
+ "type": "array",
320
+ "items": { "type": "integer", "minimum": 1 }
321
+ }
322
+ }
323
+ },
324
+ "SessionDeleted": {
325
+ "type": "object",
326
+ "additionalProperties": false,
327
+ "required": ["id", "sessionIds"],
328
+ "properties": {
329
+ "id": { "type": "integer", "minimum": 1 },
330
+ "sessionIds": {
331
+ "type": "array",
332
+ "items": { "type": "integer", "minimum": 1 }
333
+ }
334
+ }
335
+ },
336
+ "SessionTitled": {
337
+ "type": "object",
338
+ "additionalProperties": false,
339
+ "required": ["id", "title"],
340
+ "properties": {
341
+ "id": { "type": "integer", "minimum": 1 },
342
+ "title": { "type": "string", "minLength": 1 }
343
+ }
344
+ },
345
+ "SessionPolicy": {
346
+ "type": "object",
347
+ "additionalProperties": false,
348
+ "required": ["sessionId", "model", "childModel"],
349
+ "properties": {
350
+ "sessionId": { "type": "integer", "minimum": 1 },
351
+ "model": {
352
+ "oneOf": [
353
+ { "$ref": "https://schemas.plurnk.xyz/v0/ModelRoute.json" },
354
+ { "type": "null" }
355
+ ]
356
+ },
357
+ "childModel": {
358
+ "oneOf": [
359
+ { "$ref": "https://schemas.plurnk.xyz/v0/ModelRoute.json" },
360
+ { "type": "null" }
361
+ ]
362
+ },
363
+ "persona": { "type": ["string", "null"], "minLength": 1 }
364
+ }
365
+ },
366
+ "LoopStarted": {
367
+ "type": "object",
368
+ "additionalProperties": false,
369
+ "required": ["sessionId", "loopId", "loopSeq"],
370
+ "properties": {
371
+ "sessionId": { "type": "integer", "minimum": 1 },
372
+ "loopId": { "type": "integer", "minimum": 1 },
373
+ "loopSeq": { "type": "integer", "minimum": 1 }
374
+ }
375
+ },
376
+ "LoopParked": {
377
+ "type": "object",
378
+ "additionalProperties": false,
379
+ "required": ["sessionId", "loopId", "loopSeq", "status"],
380
+ "properties": {
381
+ "sessionId": { "type": "integer", "minimum": 1 },
382
+ "loopId": { "type": "integer", "minimum": 1 },
383
+ "loopSeq": { "type": "integer", "minimum": 1 },
384
+ "status": { "const": 202 }
385
+ }
386
+ },
387
+ "LoopGateSettled": {
388
+ "oneOf": [
389
+ {
390
+ "type": "object",
391
+ "additionalProperties": false,
392
+ "required": ["kind", "sessionId", "loopId", "logEntryId", "decision", "outcome"],
393
+ "properties": {
394
+ "kind": { "const": "proposal" },
395
+ "sessionId": { "type": "integer", "minimum": 1 },
396
+ "loopId": { "type": "integer", "minimum": 1 },
397
+ "logEntryId": { "type": "integer", "minimum": 1 },
398
+ "decision": { "enum": ["accept", "reject", "cancel"] },
399
+ "outcome": { "type": "string", "minLength": 1 }
400
+ }
401
+ },
402
+ {
403
+ "type": "object",
404
+ "additionalProperties": false,
405
+ "required": ["kind", "sessionId", "loopId", "interactionId", "action"],
406
+ "properties": {
407
+ "kind": { "const": "interaction" },
408
+ "sessionId": { "type": "integer", "minimum": 1 },
409
+ "loopId": { "type": "integer", "minimum": 1 },
410
+ "interactionId": { "type": "integer", "minimum": 1 },
411
+ "action": { "enum": ["accept", "decline", "cancel"] }
412
+ }
413
+ }
414
+ ]
415
+ },
416
+ "Terminated": {
417
+ "type": "object",
418
+ "additionalProperties": false,
419
+ "required": [
420
+ "sessionId",
421
+ "loopId",
422
+ "loopSeq",
423
+ "result",
424
+ "hitMaxTurns",
425
+ "turnIds",
426
+ "attributions",
427
+ "terminatedAt",
428
+ "usage"
429
+ ],
430
+ "properties": {
431
+ "sessionId": { "type": "integer", "minimum": 1 },
432
+ "loopId": { "type": "integer", "minimum": 1 },
433
+ "loopSeq": { "type": "integer", "minimum": 1 },
434
+ "result": { "$ref": "https://schemas.plurnk.xyz/v0/OperationResult.json" },
435
+ "hitMaxTurns": { "type": "boolean" },
436
+ "turnIds": {
437
+ "type": "array",
438
+ "items": { "type": "integer", "minimum": 1 }
439
+ },
440
+ "attributions": {
441
+ "type": "array",
442
+ "items": { "type": "string" }
443
+ },
444
+ "terminatedAt": { "type": "number" },
445
+ "usage": {
446
+ "type": "object",
447
+ "additionalProperties": false,
448
+ "required": [
449
+ "accounting",
450
+ "curationWeight",
451
+ "curationBudget",
452
+ "contextTokens",
453
+ "contextCapacity",
454
+ "meta"
455
+ ],
456
+ "properties": {
457
+ "accounting": { "$ref": "https://schemas.plurnk.xyz/v0/ProviderAccounting.json" },
458
+ "curationWeight": { "type": ["number", "null"] },
459
+ "curationBudget": { "type": ["number", "null"] },
460
+ "contextTokens": { "type": ["number", "null"] },
461
+ "contextCapacity": { "type": ["number", "null"] },
462
+ "meta": {
463
+ "type": "object",
464
+ "additionalProperties": {}
465
+ }
466
+ }
467
+ }
468
+ }
469
+ },
470
+ "LogEntry": {
471
+ "type": "object",
472
+ "additionalProperties": false,
473
+ "required": ["entry"],
474
+ "properties": {
475
+ "entry": {
476
+ "type": "object",
477
+ "additionalProperties": false,
478
+ "required": [
479
+ "id",
480
+ "sessionId",
481
+ "sessionName",
482
+ "loopId",
483
+ "loopSeq",
484
+ "turnId",
485
+ "turnSeq",
486
+ "sequence",
487
+ "at",
488
+ "origin",
489
+ "source",
490
+ "op",
491
+ "scheme",
492
+ "username",
493
+ "password",
494
+ "hostname",
495
+ "port",
496
+ "pathname",
497
+ "query",
498
+ "fragment",
499
+ "signal",
500
+ "lineMarker",
501
+ "tx",
502
+ "mimetypeTx",
503
+ "rx",
504
+ "mimetypeRx",
505
+ "statusRx",
506
+ "weight",
507
+ "attrs",
508
+ "state"
509
+ ],
510
+ "properties": {
511
+ "id": { "type": "integer", "minimum": 1 },
512
+ "sessionId": { "type": "integer", "minimum": 1 },
513
+ "sessionName": { "type": "string", "minLength": 1 },
514
+ "loopId": { "type": "integer", "minimum": 1 },
515
+ "loopSeq": { "type": "integer", "minimum": 1 },
516
+ "turnId": { "type": "integer", "minimum": 1 },
517
+ "turnSeq": { "type": "integer", "minimum": 1 },
518
+ "sequence": { "type": "integer", "minimum": 1 },
519
+ "at": { "type": "string", "minLength": 1 },
520
+ "origin": { "type": "string", "minLength": 1 },
521
+ "source": { "type": ["string", "null"] },
522
+ "op": { "type": ["string", "null"] },
523
+ "scheme": { "type": ["string", "null"] },
524
+ "username": { "type": ["string", "null"] },
525
+ "password": { "type": ["string", "null"] },
526
+ "hostname": { "type": ["string", "null"] },
527
+ "port": { "type": ["integer", "null"] },
528
+ "pathname": { "type": ["string", "null"] },
529
+ "query": { "type": ["string", "null"] },
530
+ "fragment": { "type": ["string", "null"] },
531
+ "signal": {},
532
+ "lineMarker": {},
533
+ "tx": {},
534
+ "mimetypeTx": { "type": "string" },
535
+ "rx": {},
536
+ "mimetypeRx": { "type": "string" },
537
+ "statusRx": { "type": "integer" },
538
+ "weight": { "type": "number" },
539
+ "attrs": {},
540
+ "state": { "enum": ["proposed", "resolved", "failed", "cancelled"] },
541
+ "reasoning": { "type": "string" },
542
+ "reasoningModelCallId": { "type": "integer" },
543
+ "reasoningRequestSequence": { "type": "integer" },
544
+ "invocation": { "type": "string" },
545
+ "answering": { "type": "string" },
546
+ "repliedToSources": {
547
+ "type": "array",
548
+ "items": { "type": "string" }
549
+ }
550
+ }
551
+ }
552
+ }
553
+ },
554
+ "StreamConcluded": {
555
+ "type": "object",
556
+ "additionalProperties": false,
557
+ "required": [
558
+ "sessionId",
559
+ "entryId",
560
+ "target",
561
+ "subscriptionId",
562
+ "result",
563
+ "scheme",
564
+ "summary",
565
+ "wakeAction"
566
+ ],
567
+ "properties": {
568
+ "sessionId": { "type": "integer", "minimum": 1 },
569
+ "entryId": { "type": "integer", "minimum": 1 },
570
+ "target": { "type": "string", "minLength": 1 },
571
+ "subscriptionId": { "type": "integer", "minimum": 1 },
572
+ "result": { "$ref": "https://schemas.plurnk.xyz/v0/OperationResult.json" },
573
+ "scheme": { "type": "string", "minLength": 1 },
574
+ "summary": { "type": "string" },
575
+ "wakeAction": { "type": "string", "minLength": 1 },
576
+ "loopSeq": { "type": "integer", "minimum": 1 },
577
+ "turnSeq": { "type": "integer", "minimum": 1 },
578
+ "sequence": { "type": "integer", "minimum": 1 }
579
+ }
580
+ },
581
+ "NoticeEvent": {
582
+ "type": "object",
583
+ "additionalProperties": false,
584
+ "required": ["sessionId", "loopId", "notice"],
585
+ "properties": {
586
+ "sessionId": { "type": ["integer", "null"], "minimum": 1 },
587
+ "loopId": { "type": "integer", "minimum": 0 },
588
+ "notice": { "$ref": "https://schemas.plurnk.xyz/v0/Notice.json" }
589
+ }
590
+ },
591
+ "NotificationsResync": {
592
+ "type": "object",
593
+ "additionalProperties": false,
594
+ "required": ["reason", "epoch", "latestId"],
595
+ "properties": {
596
+ "reason": { "enum": ["restarted", "evicted", "malformed"] },
597
+ "epoch": { "type": "string", "minLength": 1 },
598
+ "latestId": { "type": "integer", "minimum": 0 }
599
+ }
600
+ }
601
+ }
602
+ }
@@ -15,6 +15,10 @@
15
15
  "summary": {
16
16
  "type": "string"
17
17
  },
18
+ "detail": {
19
+ "description": "Optional family-owned structured presentation facts (for example a members preview's match counts and sample paths). Never credentials, never authority.",
20
+ "type": "object"
21
+ },
18
22
  "definition": {
19
23
  "description": "The exact family definition, conforming to the family's definition schema.",
20
24
  "type": "object"
@@ -12,6 +12,18 @@
12
12
  "configuration": {
13
13
  "description": "Caller-supplied configuration material the family interprets as candidates (a client's own PLURNK_SCHEDULE_* environment, a local directory list). It contributes candidates with client-configuration provenance; it never becomes durable authority.",
14
14
  "type": "object"
15
+ },
16
+ "cursor": {
17
+ "description": "Opaque continuation cursor returned by a previous discover page.",
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "maxLength": 512
21
+ },
22
+ "limit": {
23
+ "description": "Maximum number of candidates or preview items to return on one page.",
24
+ "type": "integer",
25
+ "minimum": 1,
26
+ "maximum": 100
15
27
  }
16
28
  }
17
29
  }
@@ -10,6 +10,16 @@
10
10
  "candidates": {
11
11
  "type": "array",
12
12
  "items": { "$ref": "https://schemas.plurnk.xyz/v0/FunctionalityCandidate.json" }
13
+ },
14
+ "total": {
15
+ "type": "integer",
16
+ "minimum": 0,
17
+ "maximum": 9007199254740991
18
+ },
19
+ "nextCursor": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "maxLength": 512
13
23
  }
14
24
  }
15
25
  }