@plurnk/plurnk-contracts 7.2.1 → 7.4.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 (66) hide show
  1. package/.env.defaults +8 -7
  2. package/README.md +4 -3
  3. package/SPEC.md +65 -73
  4. package/dist/schema/CapabilityDescriptor.json +3 -3
  5. package/dist/schema/CapabilitySelector.json +3 -3
  6. package/dist/schema/FunctionalityDefinitionState.json +1 -1
  7. package/dist/schema/MatcherBody.json +3 -3
  8. package/dist/schema/McpServerDefinition.json +1 -1
  9. package/dist/schema/Notice.json +1 -1
  10. package/dist/schema/PlurnkStatement.json +77 -86
  11. package/dist/schema/ProposalProjection.json +15 -16
  12. package/dist/schema/ResourceSelection.json +6 -6
  13. package/dist/schema/SendBody.json +1 -1
  14. package/dist/src/Application.d.ts +28 -6
  15. package/dist/src/Application.d.ts.map +1 -1
  16. package/dist/src/Application.js +159 -9
  17. package/dist/src/Application.js.map +1 -1
  18. package/dist/src/ApplicationNotifications.d.ts +135 -2
  19. package/dist/src/ApplicationNotifications.d.ts.map +1 -1
  20. package/dist/src/ApplicationNotifications.js +95 -1
  21. package/dist/src/ApplicationNotifications.js.map +1 -1
  22. package/dist/src/ApplicationPort.d.ts +2 -1
  23. package/dist/src/ApplicationPort.d.ts.map +1 -1
  24. package/dist/src/ApplicationPort.js.map +1 -1
  25. package/dist/src/ApplicationStream.d.ts +1 -3
  26. package/dist/src/ApplicationStream.d.ts.map +1 -1
  27. package/dist/src/ApplicationStream.js.map +1 -1
  28. package/dist/src/CapabilityAdmission.js.map +1 -1
  29. package/dist/src/Excerpt.js.map +1 -1
  30. package/dist/src/Functionality.js.map +1 -1
  31. package/dist/src/HttpOrigin.d.ts +27 -0
  32. package/dist/src/HttpOrigin.d.ts.map +1 -1
  33. package/dist/src/HttpOrigin.js +69 -0
  34. package/dist/src/HttpOrigin.js.map +1 -1
  35. package/dist/src/JsonDocument.js.map +1 -1
  36. package/dist/src/JsonResult.js.map +1 -1
  37. package/dist/src/LogRow.d.ts +1 -1
  38. package/dist/src/LogRow.d.ts.map +1 -1
  39. package/dist/src/LogRow.js +13 -15
  40. package/dist/src/LogRow.js.map +1 -1
  41. package/dist/src/LoopLifecycle.js.map +1 -1
  42. package/dist/src/MessageResource.js.map +1 -1
  43. package/dist/src/PathSyntax.js.map +1 -1
  44. package/dist/src/PlurnkParseError.js.map +1 -1
  45. package/dist/src/Problems.js.map +1 -1
  46. package/dist/src/TurnDisposition.js +1 -1
  47. package/dist/src/TurnDisposition.js.map +1 -1
  48. package/dist/src/Validator.js.map +1 -1
  49. package/dist/src/guards.js.map +1 -1
  50. package/dist/src/index.d.ts +4 -5
  51. package/dist/src/index.d.ts.map +1 -1
  52. package/dist/src/index.js +3 -3
  53. package/dist/src/index.js.map +1 -1
  54. package/dist/src/types.d.ts +1 -2
  55. package/dist/src/types.d.ts.map +1 -1
  56. package/dist/src/types.generated.d.ts +79 -79
  57. package/dist/src/types.generated.d.ts.map +1 -1
  58. package/dist/src/types.generated.js.map +1 -1
  59. package/dist/src/types.js +5 -7
  60. package/dist/src/types.js.map +1 -1
  61. package/package.json +3 -3
  62. package/plurnk.md +4 -165
  63. package/dist/src/TodoItems.d.ts +0 -6
  64. package/dist/src/TodoItems.d.ts.map +0 -1
  65. package/dist/src/TodoItems.js +0 -145
  66. package/dist/src/TodoItems.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schemas.plurnk.xyz/v0/PlurnkStatement.json",
4
4
  "title": "PlurnkStatement",
5
- "description": "The parsed AST union for one protocol statement, discriminated by `op`. Every variant has fixed signal, target, metadata, lineMarker, aside, body, and source-position fields, and the text and log operations add a matcher lifted from the `pattern` option; operation-specific schemas constrain their types. A null field records an omitted tolerated slot and does not satisfy runtime requirements by itself.",
5
+ "description": "The parsed AST union for one protocol statement, discriminated by `op`. Every variant has fixed target, lineMarker, aside, body, and source-position fields, the text and log operations add a matcher lifted from the `pattern` option, HTTP-capable operations add `headers` (and `kill` adds `remote`), and messaging operations add `attachments`; operation-specific schemas constrain their types. A null field records an omitted tolerated slot and does not satisfy runtime requirements by itself.",
6
6
  "oneOf": [
7
7
  {
8
8
  "$ref": "#/$defs/FindStatement"
@@ -48,9 +48,6 @@
48
48
  },
49
49
  {
50
50
  "$ref": "#/$defs/NoteStatement"
51
- },
52
- {
53
- "$ref": "#/$defs/TodoStatement"
54
51
  }
55
52
  ],
56
53
  "$defs": {
@@ -60,8 +57,22 @@
60
57
  "null"
61
58
  ]
62
59
  },
63
- "SchemeMetadataOrNull": {
64
- "description": "Opaque ordered scheme-metadata modifier blocks. Contracts preserve each block's raw inner text; the addressed scheme exclusively owns interpretation and validation.",
60
+ "HeadersOrNull": {
61
+ "description": "Optional HTTP request headers (`{ [name: string]: string }`); null when omitted.",
62
+ "oneOf": [
63
+ {
64
+ "type": "object",
65
+ "additionalProperties": {
66
+ "type": "string"
67
+ }
68
+ },
69
+ {
70
+ "type": "null"
71
+ }
72
+ ]
73
+ },
74
+ "AttachmentsOrNull": {
75
+ "description": "Optional resource addresses attached to a message; null when omitted.",
65
76
  "oneOf": [
66
77
  {
67
78
  "type": "array",
@@ -132,7 +143,7 @@
132
143
  "required": [
133
144
  "op",
134
145
  "aside",
135
- "metadata",
146
+ "headers",
136
147
  "target",
137
148
  "lineMarker",
138
149
  "matcher",
@@ -142,13 +153,13 @@
142
153
  "additionalProperties": false,
143
154
  "properties": {
144
155
  "op": {
145
- "const": "FIND"
156
+ "const": "find"
146
157
  },
147
158
  "aside": {
148
159
  "$ref": "#/$defs/AsideOrNull"
149
160
  },
150
- "metadata": {
151
- "$ref": "#/$defs/SchemeMetadataOrNull"
161
+ "headers": {
162
+ "$ref": "#/$defs/HeadersOrNull"
152
163
  },
153
164
  "target": {
154
165
  "$ref": "#/$defs/PathOrNull"
@@ -158,11 +169,11 @@
158
169
  },
159
170
  "matcher": {
160
171
  "$ref": "#/$defs/MatcherBodyOrNull",
161
- "description": "The selection matcher lifted from the heading ({§parse-recovery}); null when the heading carries none."
172
+ "description": "The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted."
162
173
  },
163
174
  "body": {
164
175
  "type": "null",
165
- "description": "Retrieval bodies normalize to separate NOTE statements; selection belongs to the header ({§op-shapes})."
176
+ "description": "Retrieval bodies normalize to separate `note` statements; selection belongs to the options ({§op-shapes})."
166
177
  },
167
178
  "position": {
168
179
  "$ref": "#/$defs/PositionRef"
@@ -174,7 +185,7 @@
174
185
  "required": [
175
186
  "op",
176
187
  "aside",
177
- "metadata",
188
+ "headers",
178
189
  "target",
179
190
  "lineMarker",
180
191
  "matcher",
@@ -184,13 +195,13 @@
184
195
  "additionalProperties": false,
185
196
  "properties": {
186
197
  "op": {
187
- "const": "READ"
198
+ "const": "read"
188
199
  },
189
200
  "aside": {
190
201
  "$ref": "#/$defs/AsideOrNull"
191
202
  },
192
- "metadata": {
193
- "$ref": "#/$defs/SchemeMetadataOrNull"
203
+ "headers": {
204
+ "$ref": "#/$defs/HeadersOrNull"
194
205
  },
195
206
  "target": {
196
207
  "$ref": "#/$defs/PathOrNull"
@@ -200,7 +211,7 @@
200
211
  },
201
212
  "matcher": {
202
213
  "$ref": "#/$defs/MatcherBodyOrNull",
203
- "description": "The selection matcher lifted from the heading ({§parse-recovery}); null when the heading carries none."
214
+ "description": "The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted."
204
215
  },
205
216
  "body": {
206
217
  "type": "null"
@@ -215,7 +226,7 @@
215
226
  "required": [
216
227
  "op",
217
228
  "aside",
218
- "metadata",
229
+ "headers",
219
230
  "target",
220
231
  "lineMarker",
221
232
  "matcher",
@@ -225,13 +236,13 @@
225
236
  "additionalProperties": false,
226
237
  "properties": {
227
238
  "op": {
228
- "const": "EDIT"
239
+ "const": "edit"
229
240
  },
230
241
  "aside": {
231
242
  "$ref": "#/$defs/AsideOrNull"
232
243
  },
233
- "metadata": {
234
- "$ref": "#/$defs/SchemeMetadataOrNull"
244
+ "headers": {
245
+ "$ref": "#/$defs/HeadersOrNull"
235
246
  },
236
247
  "target": {
237
248
  "$ref": "#/$defs/PathOrNull"
@@ -241,7 +252,7 @@
241
252
  },
242
253
  "matcher": {
243
254
  "$ref": "#/$defs/MatcherBodyOrNull",
244
- "description": "The selection matcher lifted from the heading ({§parse-recovery}); null when the heading carries none."
255
+ "description": "The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted."
245
256
  },
246
257
  "body": {
247
258
  "type": [
@@ -266,7 +277,7 @@
266
277
  "additionalProperties": false,
267
278
  "properties": {
268
279
  "op": {
269
- "const": "COPY"
280
+ "const": "copy"
270
281
  },
271
282
  "aside": {
272
283
  "$ref": "#/$defs/AsideOrNull"
@@ -294,7 +305,7 @@
294
305
  "additionalProperties": false,
295
306
  "properties": {
296
307
  "op": {
297
- "const": "MOVE"
308
+ "const": "move"
298
309
  },
299
310
  "aside": {
300
311
  "$ref": "#/$defs/AsideOrNull"
@@ -315,7 +326,8 @@
315
326
  "required": [
316
327
  "op",
317
328
  "aside",
318
- "metadata",
329
+ "headers",
330
+ "attachments",
319
331
  "target",
320
332
  "lineMarker",
321
333
  "body",
@@ -324,19 +336,22 @@
324
336
  "additionalProperties": false,
325
337
  "properties": {
326
338
  "op": {
327
- "const": "SEND"
339
+ "const": "send"
328
340
  },
329
341
  "aside": {
330
342
  "$ref": "#/$defs/AsideOrNull"
331
343
  },
332
- "metadata": {
333
- "$ref": "#/$defs/SchemeMetadataOrNull"
344
+ "headers": {
345
+ "$ref": "#/$defs/HeadersOrNull"
346
+ },
347
+ "attachments": {
348
+ "$ref": "#/$defs/AttachmentsOrNull"
334
349
  },
335
350
  "target": {
336
351
  "$ref": "#/$defs/PathOrNull"
337
352
  },
338
353
  "lineMarker": {
339
- "$ref": "#/$defs/LineMarkerOrNull"
354
+ "type": "null"
340
355
  },
341
356
  "body": {
342
357
  "$ref": "#/$defs/SendBodyOrNull"
@@ -351,7 +366,7 @@
351
366
  "required": [
352
367
  "op",
353
368
  "aside",
354
- "metadata",
369
+ "attachments",
355
370
  "target",
356
371
  "lineMarker",
357
372
  "body",
@@ -360,13 +375,13 @@
360
375
  "additionalProperties": false,
361
376
  "properties": {
362
377
  "op": {
363
- "const": "DONE"
378
+ "const": "done"
364
379
  },
365
380
  "aside": {
366
381
  "$ref": "#/$defs/AsideOrNull"
367
382
  },
368
- "metadata": {
369
- "$ref": "#/$defs/SchemeMetadataOrNull"
383
+ "attachments": {
384
+ "$ref": "#/$defs/AttachmentsOrNull"
370
385
  },
371
386
  "target": {
372
387
  "$ref": "#/$defs/PathOrNull"
@@ -387,7 +402,7 @@
387
402
  "required": [
388
403
  "op",
389
404
  "aside",
390
- "metadata",
405
+ "attachments",
391
406
  "target",
392
407
  "lineMarker",
393
408
  "body",
@@ -396,13 +411,13 @@
396
411
  "additionalProperties": false,
397
412
  "properties": {
398
413
  "op": {
399
- "const": "FAIL"
414
+ "const": "fail"
400
415
  },
401
416
  "aside": {
402
417
  "$ref": "#/$defs/AsideOrNull"
403
418
  },
404
- "metadata": {
405
- "$ref": "#/$defs/SchemeMetadataOrNull"
419
+ "attachments": {
420
+ "$ref": "#/$defs/AttachmentsOrNull"
406
421
  },
407
422
  "target": {
408
423
  "$ref": "#/$defs/PathOrNull"
@@ -423,7 +438,6 @@
423
438
  "required": [
424
439
  "runtime",
425
440
  "aside",
426
- "metadata",
427
441
  "target",
428
442
  "lineMarker",
429
443
  "body",
@@ -432,7 +446,7 @@
432
446
  "additionalProperties": false,
433
447
  "properties": {
434
448
  "runtime": {
435
- "description": "The runtime tag the fence names, in its registered lowercase spelling. An execution has no operation keyword: the fence name is the runtime, and the log row's op shows it as written.",
449
+ "description": "The runtime tag the call names, in its registered lowercase spelling. An execution has no operation keyword: the call name is the runtime, and the log row's op shows it as written.",
436
450
  "type": "string",
437
451
  "pattern": "^[a-z][a-z0-9+._-]*$",
438
452
  "tsType": "Lowercase<string>"
@@ -445,12 +459,15 @@
445
459
  "aside": {
446
460
  "$ref": "#/$defs/AsideOrNull"
447
461
  },
448
- "metadata": {
449
- "$ref": "#/$defs/SchemeMetadataOrNull"
450
- },
451
462
  "target": {
452
463
  "$ref": "#/$defs/PathOrNull"
453
464
  },
465
+ "cwd": {
466
+ "type": [
467
+ "string",
468
+ "null"
469
+ ]
470
+ },
454
471
  "lineMarker": {
455
472
  "$ref": "#/$defs/LineMarkerOrNull"
456
473
  },
@@ -470,7 +487,6 @@
470
487
  "required": [
471
488
  "op",
472
489
  "aside",
473
- "metadata",
474
490
  "target",
475
491
  "lineMarker",
476
492
  "body",
@@ -479,14 +495,11 @@
479
495
  "additionalProperties": false,
480
496
  "properties": {
481
497
  "op": {
482
- "const": "BARE"
498
+ "const": "bare"
483
499
  },
484
500
  "aside": {
485
501
  "$ref": "#/$defs/AsideOrNull"
486
502
  },
487
- "metadata": {
488
- "$ref": "#/$defs/SchemeMetadataOrNull"
489
- },
490
503
  "target": {
491
504
  "$ref": "#/$defs/PathOrNull"
492
505
  },
@@ -506,7 +519,8 @@
506
519
  "required": [
507
520
  "op",
508
521
  "aside",
509
- "metadata",
522
+ "headers",
523
+ "remote",
510
524
  "target",
511
525
  "lineMarker",
512
526
  "matcher",
@@ -516,13 +530,17 @@
516
530
  "additionalProperties": false,
517
531
  "properties": {
518
532
  "op": {
519
- "const": "KILL"
533
+ "const": "kill"
520
534
  },
521
535
  "aside": {
522
536
  "$ref": "#/$defs/AsideOrNull"
523
537
  },
524
- "metadata": {
525
- "$ref": "#/$defs/SchemeMetadataOrNull"
538
+ "headers": {
539
+ "$ref": "#/$defs/HeadersOrNull"
540
+ },
541
+ "remote": {
542
+ "description": "Optional confirmation for remote HTTP DELETE (`true`); null when omitted.",
543
+ "type": ["boolean", "null"]
526
544
  },
527
545
  "target": {
528
546
  "$ref": "#/$defs/PathOrNull"
@@ -533,11 +551,11 @@
533
551
  },
534
552
  "matcher": {
535
553
  "$ref": "#/$defs/MatcherBodyOrNull",
536
- "description": "The selection matcher lifted from the heading ({§parse-recovery}); null when the heading carries none."
554
+ "description": "The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted."
537
555
  },
538
556
  "body": {
539
557
  "type": ["string", "null"],
540
- "description": "A `log:///` KILL carries its optional distillation, kept as the model's own NOTE row ({§log-kill-scope}). Other KILLs take no body; their matcher rides on the heading line ({§parse-recovery})."
558
+ "description": "A `log:///` `kill` carries its optional distillation, kept as the model's own `note` row ({§log-kill-scope}). Other `kill` statements take no body; their matcher rides on the `pattern` option ({§parse-recovery})."
541
559
  },
542
560
  "position": {
543
561
  "$ref": "#/$defs/PositionRef"
@@ -549,7 +567,6 @@
549
567
  "required": [
550
568
  "op",
551
569
  "aside",
552
- "metadata",
553
570
  "target",
554
571
  "lineMarker",
555
572
  "body",
@@ -558,14 +575,11 @@
558
575
  "additionalProperties": false,
559
576
  "properties": {
560
577
  "op": {
561
- "const": "WORK"
578
+ "const": "work"
562
579
  },
563
580
  "aside": {
564
581
  "$ref": "#/$defs/AsideOrNull"
565
582
  },
566
- "metadata": {
567
- "$ref": "#/$defs/SchemeMetadataOrNull"
568
- },
569
583
  "target": {
570
584
  "$ref": "#/$defs/PathOrNull"
571
585
  },
@@ -585,7 +599,6 @@
585
599
  "required": [
586
600
  "op",
587
601
  "aside",
588
- "metadata",
589
602
  "target",
590
603
  "lineMarker",
591
604
  "body",
@@ -594,14 +607,11 @@
594
607
  "additionalProperties": false,
595
608
  "properties": {
596
609
  "op": {
597
- "const": "FORK"
610
+ "const": "fork"
598
611
  },
599
612
  "aside": {
600
613
  "$ref": "#/$defs/AsideOrNull"
601
614
  },
602
- "metadata": {
603
- "$ref": "#/$defs/SchemeMetadataOrNull"
604
- },
605
615
  "target": {
606
616
  "$ref": "#/$defs/PathOrNull"
607
617
  },
@@ -621,7 +631,6 @@
621
631
  "required": [
622
632
  "op",
623
633
  "aside",
624
- "metadata",
625
634
  "target",
626
635
  "lineMarker",
627
636
  "seconds",
@@ -631,14 +640,11 @@
631
640
  "additionalProperties": false,
632
641
  "properties": {
633
642
  "op": {
634
- "enum": ["WAIT"]
643
+ "enum": ["wait"]
635
644
  },
636
645
  "aside": {
637
646
  "$ref": "#/$defs/AsideOrNull"
638
647
  },
639
- "metadata": {
640
- "type": "null"
641
- },
642
648
  "target": {
643
649
  "$ref": "#/$defs/PathOrNull"
644
650
  },
@@ -646,7 +652,7 @@
646
652
  "type": "null"
647
653
  },
648
654
  "seconds": {
649
- "description": "Optional maximum park duration from [seconds] metadata; zero continues without parking.",
655
+ "description": "Optional maximum park duration from `timeout` option; zero continues without parking.",
650
656
  "type": ["number", "null"],
651
657
  "minimum": 0
652
658
  },
@@ -660,26 +666,11 @@
660
666
  },
661
667
  "NoteStatement": {
662
668
  "type": "object",
663
- "required": ["op", "aside", "metadata", "target", "lineMarker", "body", "position"],
664
- "additionalProperties": false,
665
- "properties": {
666
- "op": { "const": "NOTE" },
667
- "aside": { "$ref": "#/$defs/AsideOrNull" },
668
- "metadata": { "type": "null" },
669
- "target": { "type": "null" },
670
- "lineMarker": { "type": "null" },
671
- "body": { "type": ["string", "null"] },
672
- "position": { "$ref": "#/$defs/PositionRef" }
673
- }
674
- },
675
- "TodoStatement": {
676
- "type": "object",
677
- "required": ["op", "aside", "metadata", "target", "lineMarker", "body", "position"],
669
+ "required": ["op", "aside", "target", "lineMarker", "body", "position"],
678
670
  "additionalProperties": false,
679
671
  "properties": {
680
- "op": { "const": "TODO" },
672
+ "op": { "const": "note" },
681
673
  "aside": { "$ref": "#/$defs/AsideOrNull" },
682
- "metadata": { "type": "null" },
683
674
  "target": { "type": "null" },
684
675
  "lineMarker": { "type": "null" },
685
676
  "body": { "type": ["string", "null"] },
@@ -51,21 +51,20 @@
51
51
  "anyOf": [
52
52
  {
53
53
  "enum": [
54
- "FIND",
55
- "READ",
56
- "EDIT",
57
- "COPY",
58
- "MOVE",
59
- "SEND",
60
- "DONE",
61
- "FAIL",
62
- "BARE",
63
- "WORK",
64
- "FORK",
65
- "KILL",
66
- "NOTE",
67
- "TODO",
68
- "WAIT"
54
+ "find",
55
+ "read",
56
+ "edit",
57
+ "copy",
58
+ "move",
59
+ "send",
60
+ "done",
61
+ "fail",
62
+ "bare",
63
+ "work",
64
+ "fork",
65
+ "kill",
66
+ "note",
67
+ "wait"
69
68
  ]
70
69
  },
71
70
  {
@@ -73,7 +72,7 @@
73
72
  "pattern": "^[a-z][a-z0-9+._-]*$"
74
73
  }
75
74
  ],
76
- "tsType": "\"FIND\" | \"READ\" | \"EDIT\" | \"COPY\" | \"MOVE\" | \"SEND\" | \"DONE\" | \"FAIL\" | \"BARE\" | \"WORK\" | \"FORK\" | \"KILL\" | \"NOTE\" | \"TODO\" | \"WAIT\" | Lowercase<string>"
75
+ "tsType": "\"find\" | \"read\" | \"edit\" | \"copy\" | \"move\" | \"send\" | \"done\" | \"fail\" | \"bare\" | \"work\" | \"fork\" | \"kill\" | \"note\" | \"wait\" | Lowercase<string>"
77
76
  },
78
77
  "target": {
79
78
  "type": "object",
@@ -2,11 +2,11 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schemas.plurnk.xyz/v0/ResourceSelection.json",
4
4
  "title": "ResourceSelection",
5
- "description": "One COPY/MOVE resource operand. A target without a fragment selects the scheme's default channel; a fragment selects a named channel; metadata belongs to the selected scheme endpoint; lineMarker scopes the selected textual content.",
5
+ "description": "One `copy`/`move` resource operand. A target without a fragment selects the scheme's default channel; a fragment selects a named channel; headers belong to an HTTP(S) endpoint; lineMarker scopes the selected textual content.",
6
6
  "type": "object",
7
7
  "required": [
8
8
  "target",
9
- "metadata",
9
+ "headers",
10
10
  "lineMarker",
11
11
  "matcher"
12
12
  ],
@@ -15,12 +15,12 @@
15
15
  "target": {
16
16
  "$ref": "https://schemas.plurnk.xyz/v0/ParsedPath.json"
17
17
  },
18
- "metadata": {
19
- "description": "Opaque ordered scheme-metadata modifier blocks owned by this operand's addressed scheme.",
18
+ "headers": {
19
+ "description": "Optional HTTP request headers owned by this operand's addressed endpoint; null when omitted.",
20
20
  "oneOf": [
21
21
  {
22
- "type": "array",
23
- "items": {
22
+ "type": "object",
23
+ "additionalProperties": {
24
24
  "type": "string"
25
25
  }
26
26
  },
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schemas.plurnk.xyz/v0/SendBody.json",
4
4
  "title": "SendBody",
5
- "description": "Parsed body of a SEND statement. `raw` is the literal body text; `json` is the best-effort `JSON.parse(raw)` result, or null when the body isn't valid JSON.",
5
+ "description": "Parsed body of a `send`, `done`, or `fail` statement. `raw` is the literal body text; `json` is the best-effort `JSON.parse(raw)` result, or null when the body isn't valid JSON.",
6
6
  "type": "object",
7
7
  "required": ["raw", "json"],
8
8
  "additionalProperties": false,
@@ -1,3 +1,4 @@
1
+ import type { DaemonNotification, DaemonNotificationEvent } from "./ApplicationNotifications.ts";
1
2
  import type { LoopLifecycle } from "./LoopLifecycle.ts";
2
3
  import type { LogAddressColumns } from "./LogRow.ts";
3
4
  import type { Effort, JsonSchema, ModelRoute, OperationResult } from "./types.ts";
@@ -213,6 +214,7 @@ export type LogEntryWire = LogAddressColumns & {
213
214
  reasoning_request_sequence?: number;
214
215
  invocation?: string;
215
216
  answering?: string;
217
+ replied_to_sources?: readonly string[];
216
218
  };
217
219
  /** {§methods} A prompt's admission: its acknowledgement, the loop it landed on and how it landed. */
218
220
  export type ApplicationLoopAdmission = OperationResult & {
@@ -252,9 +254,9 @@ export interface ParsedFamilyCommand {
252
254
  readonly actionName: string;
253
255
  readonly params: Record<string, unknown>;
254
256
  }
255
- /** {§acp-action-binding} Parses a family command (`mcp`, `skills`, `members`, `env`, `schedule`) into its action kind and parameters. */
257
+ /** {§acp-action-binding} Parses a family command (`mcp`, `skills`, `personas`, `env`, `schedule`) into its action kind and parameters. */
256
258
  export declare const parseFamilyCommand: (family: string, args: readonly string[]) => ParsedFamilyCommand;
257
- export type ApplicationEventHandler = (workspaceId: number | null, method: string, params: unknown) => void;
259
+ export type ApplicationEventHandler = (workspaceId: number | null, method: DaemonNotificationEvent, params: unknown, notification: DaemonNotification) => void;
258
260
  /**
259
261
  * {§credential-authority} The kind of a credential: an access token is presented as a bearer; a
260
262
  * refresh token is exchanged for new credentials of its family and is never presented; a session
@@ -312,15 +314,26 @@ export interface ModuleClient {
312
314
  readonly scopes: readonly string[];
313
315
  readonly stylesheetPath?: string;
314
316
  }
317
+ /**
318
+ * {§credential-authority} {§auth-oauth-clients} A dynamically registered RFC 7591 public OAuth 2.1
319
+ * client persisted alongside the authority's encrypted grants across daemon restarts.
320
+ */
321
+ export interface PublicOAuthClient {
322
+ readonly id: string;
323
+ readonly scopes: readonly string[];
324
+ readonly redirectUris: readonly string[];
325
+ readonly name: string | null;
326
+ }
315
327
  /**
316
328
  * {§credential-authority} The daemon's one authority over the credentials presented to its listener:
317
- * opaque tokens it issued, live until they expire, are consumed or their family is revoked. Every
318
- * exterior adapter verifies through it; the client protocol is its issuing face.
329
+ * opaque tokens it issued, live until they expire, are consumed, or their family or secret is revoked.
330
+ * Every exterior adapter verifies through it; the client protocol is its issuing face.
319
331
  */
320
332
  export interface CredentialAuthority {
321
333
  /**
322
- * The operator's client secret, `PLURNK_SECRET` when set, else one minted for this boot; null
323
- * when the daemon authenticates nothing (`PLURNK_AUTH=0`) and no credential exists.
334
+ * The operator's client secret, `PLURNK_SECRET` when set, else the durable host secret beside
335
+ * the database (or minted in memory when headless); null when the daemon authenticates nothing
336
+ * (`PLURNK_AUTH=0`) and no credential exists.
324
337
  */
325
338
  readonly operatorSecret: string | null;
326
339
  issue(credential: Omit<CredentialClaims, "expiresAt"> & {
@@ -353,6 +366,15 @@ export interface CredentialAuthority {
353
366
  client(id: string): ModuleClient | null;
354
367
  /** Whether `secret` is the one minted for the module client `id`, compared in constant time. */
355
368
  authenticateClient(id: string, secret: string): boolean;
369
+ /** {§auth-oauth-clients} Persists a dynamically registered RFC 7591 public client across restarts. */
370
+ registerPublicClient?(client: PublicOAuthClient): void;
371
+ /** {§auth-oauth-clients} Dynamically registered RFC 7591 public clients restored at boot. */
372
+ publicClients?(): readonly PublicOAuthClient[];
373
+ /**
374
+ * {§auth-oauth-clients} Retains persisted credentials only for `allowedClientIds` (plus registered
375
+ * module clients), revoking any family whose client was removed from configuration before restart.
376
+ */
377
+ retainClients?(allowedClientIds: ReadonlySet<string>): void;
356
378
  /** Publishes the one issuing face; a second publication is a configuration fault. */
357
379
  publish(face: CredentialFace): void;
358
380
  /** The published face, or null while nothing issues: the daemon authenticates nothing. */