@ixo/topic-protocol 0.8.0 → 1.0.0-rc.2

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 (60) hide show
  1. package/README.md +6 -1
  2. package/dist/schemas/decision-to-pay-template-v2.schema.json +301 -0
  3. package/dist/schemas/payable-obligation-v2.schema.json +319 -0
  4. package/dist/schemas/payment-terms-v2.schema.json +238 -0
  5. package/dist/schemas/topic-contract-body.schema.json +57 -0
  6. package/dist/schemas/topic-contract-state.schema.json +22 -329
  7. package/dist/schemas/topic-operation.schema.json +2 -2
  8. package/dist/schemas/topic-recipe.schema.json +19 -0
  9. package/dist/schemas/topic-root.schema.json +21 -1
  10. package/dist/schemas/topic-shape.schema.json +80 -0
  11. package/dist/src/contracts/schemas.d.ts +4448 -2534
  12. package/dist/src/contracts/schemas.js +12 -0
  13. package/dist/src/contracts/schemas.js.map +1 -1
  14. package/dist/src/contracts/topic-contract.d.ts +44 -5
  15. package/dist/src/contracts/topic-contract.js +3 -1
  16. package/dist/src/contracts/topic-contract.js.map +1 -1
  17. package/dist/src/errors.d.ts +1 -1
  18. package/dist/src/errors.js.map +1 -1
  19. package/dist/src/index.d.ts +10 -2
  20. package/dist/src/index.js +9 -1
  21. package/dist/src/index.js.map +1 -1
  22. package/dist/src/projector/payload.d.ts +34 -0
  23. package/dist/src/projector/payload.js +93 -2
  24. package/dist/src/projector/payload.js.map +1 -1
  25. package/dist/src/projector/state.js +54 -0
  26. package/dist/src/projector/state.js.map +1 -1
  27. package/dist/src/projector/types.d.ts +52 -2
  28. package/dist/src/projector/types.js.map +1 -1
  29. package/dist/src/shapes/canonical.d.ts +2 -0
  30. package/dist/src/shapes/canonical.js +20 -0
  31. package/dist/src/shapes/canonical.js.map +1 -0
  32. package/dist/src/shapes/claims.d.ts +12 -0
  33. package/dist/src/shapes/claims.js +20 -0
  34. package/dist/src/shapes/claims.js.map +1 -0
  35. package/dist/src/shapes/now.d.ts +2 -0
  36. package/dist/src/shapes/now.js +61 -0
  37. package/dist/src/shapes/now.js.map +1 -0
  38. package/dist/src/shapes/progress.d.ts +3 -0
  39. package/dist/src/shapes/progress.js +490 -0
  40. package/dist/src/shapes/progress.js.map +1 -0
  41. package/dist/src/shapes/recipes.d.ts +5 -0
  42. package/dist/src/shapes/recipes.js +386 -0
  43. package/dist/src/shapes/recipes.js.map +1 -0
  44. package/dist/src/shapes/resolver.d.ts +14 -0
  45. package/dist/src/shapes/resolver.js +121 -0
  46. package/dist/src/shapes/resolver.js.map +1 -0
  47. package/dist/src/shapes/state.d.ts +105 -0
  48. package/dist/src/shapes/state.js +3 -0
  49. package/dist/src/shapes/state.js.map +1 -0
  50. package/dist/src/shapes/types.d.ts +392 -0
  51. package/dist/src/shapes/types.js +44 -0
  52. package/dist/src/shapes/types.js.map +1 -0
  53. package/package.json +3 -1
  54. package/recipes/README.md +12 -0
  55. package/recipes/agent-delivery.json +740 -0
  56. package/recipes/registry.json +41 -0
  57. package/recipes/research-brief.json +578 -0
  58. package/recipes/verified-work-payment.json +801 -0
  59. package/templates/decision-to-pay/README.md +27 -19
  60. package/templates/decision-to-pay/verified-work-payment.v0.2.template.json +319 -0
@@ -0,0 +1,801 @@
1
+ {
2
+ "version": 1,
3
+ "code": "verified-work-payment",
4
+ "id": "https://topic-protocol.ixo.world/recipes/verified-work-payment",
5
+ "recipeVersion": "1.0.0-rc.2",
6
+ "label": "Verified work payment",
7
+ "description": "Bind one entity and claim collection, verify work, decide, execute through Flow, and observe settlement finality.",
8
+ "baseRecipe": "claims",
9
+ "creates": "draft",
10
+ "shape": {
11
+ "version": 1,
12
+ "code": "recipe/verified-work-payment",
13
+ "axes": [
14
+ {
15
+ "code": "contract",
16
+ "phase": "forming",
17
+ "required": true,
18
+ "initialState": "proposed",
19
+ "states": [
20
+ {
21
+ "code": "proposed"
22
+ },
23
+ {
24
+ "code": "effective",
25
+ "terminal": true
26
+ }
27
+ ]
28
+ },
29
+ {
30
+ "code": "work",
31
+ "phase": "working",
32
+ "required": true,
33
+ "initialState": "pending",
34
+ "states": [
35
+ {
36
+ "code": "pending"
37
+ },
38
+ {
39
+ "code": "in-progress"
40
+ },
41
+ {
42
+ "code": "submitted",
43
+ "terminal": true
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "code": "verification",
49
+ "phase": "verifying",
50
+ "required": true,
51
+ "initialState": "pending",
52
+ "states": [
53
+ {
54
+ "code": "pending"
55
+ },
56
+ {
57
+ "code": "verified",
58
+ "terminal": true
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "code": "decision",
64
+ "phase": "deciding",
65
+ "required": true,
66
+ "initialState": "pending",
67
+ "states": [
68
+ {
69
+ "code": "pending"
70
+ },
71
+ {
72
+ "code": "approved",
73
+ "terminal": true
74
+ }
75
+ ]
76
+ },
77
+ {
78
+ "code": "effect",
79
+ "phase": "effecting",
80
+ "required": true,
81
+ "initialState": "pending",
82
+ "states": [
83
+ {
84
+ "code": "pending"
85
+ },
86
+ {
87
+ "code": "requested"
88
+ },
89
+ {
90
+ "code": "confirmed",
91
+ "terminal": true
92
+ }
93
+ ]
94
+ },
95
+ {
96
+ "code": "settlement",
97
+ "phase": "settling",
98
+ "required": true,
99
+ "initialState": "pending",
100
+ "states": [
101
+ {
102
+ "code": "pending"
103
+ },
104
+ {
105
+ "code": "final",
106
+ "terminal": true
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "code": "topic",
112
+ "phase": "complete",
113
+ "required": true,
114
+ "initialState": "open",
115
+ "states": [
116
+ {
117
+ "code": "open"
118
+ },
119
+ {
120
+ "code": "complete",
121
+ "terminal": true
122
+ }
123
+ ]
124
+ }
125
+ ],
126
+ "transitions": [
127
+ {
128
+ "code": "edit-setup",
129
+ "phase": "forming",
130
+ "predecessor": {
131
+ "axis": "contract",
132
+ "state": "proposed"
133
+ },
134
+ "target": {
135
+ "axis": "contract",
136
+ "state": "proposed"
137
+ },
138
+ "command": "topic.edit-setup",
139
+ "requiredAbility": "topic/write",
140
+ "assignedTo": {
141
+ "kind": "role",
142
+ "value": "setup-editor"
143
+ },
144
+ "gates": [],
145
+ "confirmation": "none",
146
+ "consequence": "shared-state",
147
+ "evidence": {
148
+ "kind": "operation",
149
+ "type": "update-contract"
150
+ },
151
+ "presentation": {
152
+ "reasonCode": "setup-needs-input",
153
+ "actionLabelKey": "topic.action.edit-setup.label",
154
+ "bodyKey": "topic.setup.edit.body",
155
+ "purposeKey": "topic.setup.edit.purpose",
156
+ "unlocksKey": "topic.setup.edit.unlocks",
157
+ "priority": 800
158
+ }
159
+ },
160
+ {
161
+ "code": "confirm-setup",
162
+ "phase": "forming",
163
+ "predecessor": {
164
+ "axis": "contract",
165
+ "state": "proposed"
166
+ },
167
+ "target": {
168
+ "axis": "contract",
169
+ "state": "effective"
170
+ },
171
+ "command": "topic.confirm-setup",
172
+ "requiredAbility": "topic/confirm-setup",
173
+ "assignedTo": {
174
+ "kind": "role",
175
+ "value": "setup-confirmer"
176
+ },
177
+ "gates": [],
178
+ "confirmation": "authority",
179
+ "consequence": "shared-state",
180
+ "evidence": {
181
+ "kind": "operation",
182
+ "type": "confirm-setup"
183
+ },
184
+ "presentation": {
185
+ "reasonCode": "setup-awaits-confirmation",
186
+ "actionLabelKey": "topic.action.confirm-setup.label",
187
+ "bodyKey": "topic.setup.confirm.body",
188
+ "purposeKey": "topic.setup.confirm.purpose",
189
+ "unlocksKey": "topic.setup.confirm.unlocks",
190
+ "priority": 700
191
+ }
192
+ },
193
+ {
194
+ "code": "start-work",
195
+ "phase": "working",
196
+ "predecessor": {
197
+ "axis": "work",
198
+ "state": "pending"
199
+ },
200
+ "target": {
201
+ "axis": "work",
202
+ "state": "in-progress"
203
+ },
204
+ "command": "topic.start-work",
205
+ "requiredAbility": "topic/write",
206
+ "assignedTo": {
207
+ "kind": "role",
208
+ "value": "worker"
209
+ },
210
+ "gates": [
211
+ {
212
+ "kind": "axis",
213
+ "axis": "contract",
214
+ "states": [
215
+ "effective"
216
+ ]
217
+ }
218
+ ],
219
+ "confirmation": "none",
220
+ "consequence": "shared-state",
221
+ "evidence": {
222
+ "kind": "operation",
223
+ "type": "change-progress"
224
+ },
225
+ "presentation": {
226
+ "reasonCode": "start-work",
227
+ "actionLabelKey": "topic.action.start-work.label",
228
+ "bodyKey": "topic.action.start-work.prompt",
229
+ "purposeKey": "topic.action.start-work.purpose",
230
+ "unlocksKey": "topic.action.start-work.unlocks",
231
+ "priority": 900
232
+ }
233
+ },
234
+ {
235
+ "code": "raise-dispute",
236
+ "phase": "working",
237
+ "predecessor": {
238
+ "axis": "topic",
239
+ "state": "open"
240
+ },
241
+ "target": {
242
+ "axis": "topic",
243
+ "state": "open"
244
+ },
245
+ "command": "topic.raise-dispute",
246
+ "requiredAbility": "topic/raise-dispute",
247
+ "assignedTo": {
248
+ "kind": "role",
249
+ "value": "participant"
250
+ },
251
+ "gates": [],
252
+ "confirmation": "none",
253
+ "consequence": "shared-state",
254
+ "evidence": {
255
+ "kind": "operation",
256
+ "type": "raise-dispute"
257
+ },
258
+ "presentation": {
259
+ "reasonCode": "dispute-available",
260
+ "actionLabelKey": "topic.action.raise-dispute.label",
261
+ "bodyKey": "topic.action.raise-dispute.prompt",
262
+ "purposeKey": "topic.action.raise-dispute.purpose",
263
+ "unlocksKey": "topic.action.raise-dispute.unlocks",
264
+ "priority": 900
265
+ }
266
+ },
267
+ {
268
+ "code": "resolve-dispute",
269
+ "phase": "working",
270
+ "predecessor": {
271
+ "axis": "topic",
272
+ "state": "open"
273
+ },
274
+ "target": {
275
+ "axis": "topic",
276
+ "state": "open"
277
+ },
278
+ "command": "topic.resolve-dispute",
279
+ "requiredAbility": "topic/resolve-dispute",
280
+ "assignedTo": {
281
+ "kind": "role",
282
+ "value": "dispute-resolver"
283
+ },
284
+ "gates": [
285
+ {
286
+ "kind": "condition",
287
+ "states": [
288
+ "disputed"
289
+ ]
290
+ }
291
+ ],
292
+ "confirmation": "authority",
293
+ "consequence": "shared-state",
294
+ "evidence": {
295
+ "kind": "operation",
296
+ "type": "resolve-dispute"
297
+ },
298
+ "presentation": {
299
+ "reasonCode": "dispute-awaits-resolution",
300
+ "actionLabelKey": "topic.action.resolve-dispute.label",
301
+ "bodyKey": "topic.action.resolve-dispute.prompt",
302
+ "purposeKey": "topic.action.resolve-dispute.purpose",
303
+ "unlocksKey": "topic.action.resolve-dispute.unlocks",
304
+ "priority": 900
305
+ }
306
+ },
307
+ {
308
+ "code": "answer-question",
309
+ "phase": "working",
310
+ "predecessor": {
311
+ "axis": "work",
312
+ "state": "in-progress"
313
+ },
314
+ "target": {
315
+ "axis": "work",
316
+ "state": "in-progress"
317
+ },
318
+ "command": "topic.answer-question",
319
+ "requiredAbility": "topic/write",
320
+ "assignedTo": {
321
+ "kind": "role",
322
+ "value": "worker"
323
+ },
324
+ "gates": [
325
+ {
326
+ "kind": "field",
327
+ "path": "/questions/open",
328
+ "predicate": "present"
329
+ }
330
+ ],
331
+ "confirmation": "none",
332
+ "consequence": "shared-state",
333
+ "evidence": {
334
+ "kind": "operation",
335
+ "type": "answer-question"
336
+ },
337
+ "presentation": {
338
+ "reasonCode": "question-awaits-answer",
339
+ "actionLabelKey": "topic.action.answer-question.label",
340
+ "bodyKey": "topic.action.answer-question.prompt",
341
+ "purposeKey": "topic.action.answer-question.purpose",
342
+ "unlocksKey": "topic.action.answer-question.unlocks",
343
+ "priority": 900
344
+ }
345
+ },
346
+ {
347
+ "code": "change-due-date",
348
+ "phase": "working",
349
+ "predecessor": {
350
+ "axis": "work",
351
+ "state": "in-progress"
352
+ },
353
+ "target": {
354
+ "axis": "work",
355
+ "state": "in-progress"
356
+ },
357
+ "command": "topic.change-due-date",
358
+ "requiredAbility": "topic/write",
359
+ "assignedTo": {
360
+ "kind": "role",
361
+ "value": "worker"
362
+ },
363
+ "gates": [
364
+ {
365
+ "kind": "field",
366
+ "path": "/outcome/target/value",
367
+ "predicate": "present"
368
+ }
369
+ ],
370
+ "confirmation": "none",
371
+ "consequence": "shared-state",
372
+ "evidence": {
373
+ "kind": "operation",
374
+ "type": "change-due-date"
375
+ },
376
+ "presentation": {
377
+ "reasonCode": "due-date-review",
378
+ "actionLabelKey": "topic.action.change-due-date.label",
379
+ "bodyKey": "topic.action.change-due-date.prompt",
380
+ "purposeKey": "topic.action.change-due-date.purpose",
381
+ "unlocksKey": "topic.action.change-due-date.unlocks",
382
+ "priority": 900
383
+ }
384
+ },
385
+ {
386
+ "code": "unblock-topic",
387
+ "phase": "working",
388
+ "predecessor": {
389
+ "axis": "topic",
390
+ "state": "open"
391
+ },
392
+ "target": {
393
+ "axis": "topic",
394
+ "state": "open"
395
+ },
396
+ "command": "topic.unblock",
397
+ "requiredAbility": "topic/unblock",
398
+ "assignedTo": {
399
+ "kind": "role",
400
+ "value": "block-resolver"
401
+ },
402
+ "gates": [
403
+ {
404
+ "kind": "condition",
405
+ "states": [
406
+ "blocked"
407
+ ]
408
+ }
409
+ ],
410
+ "confirmation": "none",
411
+ "consequence": "shared-state",
412
+ "evidence": {
413
+ "kind": "operation",
414
+ "type": "unblock-topic"
415
+ },
416
+ "presentation": {
417
+ "reasonCode": "topic-blocked",
418
+ "actionLabelKey": "topic.action.unblock-topic.label",
419
+ "bodyKey": "topic.action.unblock-topic.prompt",
420
+ "purposeKey": "topic.action.unblock-topic.purpose",
421
+ "unlocksKey": "topic.action.unblock-topic.unlocks",
422
+ "priority": 900
423
+ }
424
+ },
425
+ {
426
+ "code": "submit-work",
427
+ "phase": "working",
428
+ "predecessor": {
429
+ "axis": "work",
430
+ "state": "in-progress"
431
+ },
432
+ "target": {
433
+ "axis": "work",
434
+ "state": "submitted"
435
+ },
436
+ "command": "topic.record-outcome",
437
+ "requiredAbility": "topic/record-outcome",
438
+ "assignedTo": {
439
+ "kind": "role",
440
+ "value": "worker"
441
+ },
442
+ "gates": [],
443
+ "confirmation": "none",
444
+ "consequence": "shared-state",
445
+ "evidence": {
446
+ "kind": "record",
447
+ "type": "ixo.topic.work-submission",
448
+ "finality": "accepted"
449
+ },
450
+ "presentation": {
451
+ "reasonCode": "submit-work",
452
+ "actionLabelKey": "topic.action.submit-work.label",
453
+ "bodyKey": "topic.action.submit-work.prompt",
454
+ "purposeKey": "topic.action.submit-work.purpose",
455
+ "unlocksKey": "topic.action.submit-work.unlocks",
456
+ "priority": 900
457
+ }
458
+ },
459
+ {
460
+ "code": "complete-topic",
461
+ "phase": "complete",
462
+ "predecessor": {
463
+ "axis": "topic",
464
+ "state": "open"
465
+ },
466
+ "target": {
467
+ "axis": "topic",
468
+ "state": "complete"
469
+ },
470
+ "command": "topic.complete",
471
+ "requiredAbility": "topic/confirm-completion",
472
+ "assignedTo": {
473
+ "kind": "role",
474
+ "value": "completion-authority"
475
+ },
476
+ "gates": [
477
+ {
478
+ "kind": "axis",
479
+ "axis": "work",
480
+ "states": [
481
+ "submitted"
482
+ ]
483
+ }
484
+ ],
485
+ "confirmation": "authority",
486
+ "consequence": "shared-state",
487
+ "evidence": {
488
+ "kind": "operation",
489
+ "type": "complete-topic"
490
+ },
491
+ "completesTopic": true,
492
+ "presentation": {
493
+ "reasonCode": "complete-topic",
494
+ "actionLabelKey": "topic.action.complete-topic.label",
495
+ "bodyKey": "topic.action.complete-topic.prompt",
496
+ "purposeKey": "topic.action.complete-topic.purpose",
497
+ "unlocksKey": "topic.action.complete-topic.unlocks",
498
+ "priority": 900
499
+ }
500
+ },
501
+ {
502
+ "code": "record-verification",
503
+ "phase": "verifying",
504
+ "predecessor": {
505
+ "axis": "verification",
506
+ "state": "pending"
507
+ },
508
+ "target": {
509
+ "axis": "verification",
510
+ "state": "verified"
511
+ },
512
+ "command": "topic.record-verification",
513
+ "requiredAbility": "claim/evaluate",
514
+ "assignedTo": {
515
+ "kind": "role",
516
+ "value": "evaluator"
517
+ },
518
+ "gates": [
519
+ {
520
+ "kind": "axis",
521
+ "axis": "work",
522
+ "states": [
523
+ "submitted"
524
+ ]
525
+ }
526
+ ],
527
+ "confirmation": "none",
528
+ "consequence": "shared-state",
529
+ "evidence": {
530
+ "kind": "record",
531
+ "type": "ixo.evaluation",
532
+ "finality": "accepted"
533
+ },
534
+ "handoff": {
535
+ "kind": "flow",
536
+ "binding": "evaluation"
537
+ },
538
+ "presentation": {
539
+ "reasonCode": "verification-required",
540
+ "actionLabelKey": "topic.action.record-verification.label",
541
+ "bodyKey": "topic.action.record-verification.prompt",
542
+ "purposeKey": "topic.action.record-verification.purpose",
543
+ "unlocksKey": "topic.action.record-verification.unlocks",
544
+ "priority": 900
545
+ }
546
+ },
547
+ {
548
+ "code": "record-decision",
549
+ "phase": "deciding",
550
+ "predecessor": {
551
+ "axis": "decision",
552
+ "state": "pending"
553
+ },
554
+ "target": {
555
+ "axis": "decision",
556
+ "state": "approved"
557
+ },
558
+ "command": "topic.record-decision",
559
+ "requiredAbility": "claim/decide",
560
+ "assignedTo": {
561
+ "kind": "role",
562
+ "value": "decision-authority"
563
+ },
564
+ "gates": [
565
+ {
566
+ "kind": "axis",
567
+ "axis": "verification",
568
+ "states": [
569
+ "verified"
570
+ ]
571
+ }
572
+ ],
573
+ "confirmation": "authority",
574
+ "consequence": "shared-state",
575
+ "evidence": {
576
+ "kind": "record",
577
+ "type": "ixo.decision",
578
+ "finality": "accepted"
579
+ },
580
+ "presentation": {
581
+ "reasonCode": "decision-required",
582
+ "actionLabelKey": "topic.action.record-decision.label",
583
+ "bodyKey": "topic.action.record-decision.prompt",
584
+ "purposeKey": "topic.action.record-decision.purpose",
585
+ "unlocksKey": "topic.action.record-decision.unlocks",
586
+ "priority": 900
587
+ }
588
+ },
589
+ {
590
+ "code": "request-action",
591
+ "phase": "effecting",
592
+ "predecessor": {
593
+ "axis": "effect",
594
+ "state": "pending"
595
+ },
596
+ "target": {
597
+ "axis": "effect",
598
+ "state": "requested"
599
+ },
600
+ "command": "topic.request-action",
601
+ "requiredAbility": "topic/request-action",
602
+ "assignedTo": {
603
+ "kind": "role",
604
+ "value": "action-requester"
605
+ },
606
+ "gates": [
607
+ {
608
+ "kind": "axis",
609
+ "axis": "decision",
610
+ "states": [
611
+ "approved"
612
+ ]
613
+ },
614
+ {
615
+ "kind": "binding",
616
+ "type": "flow"
617
+ }
618
+ ],
619
+ "confirmation": "viewer",
620
+ "consequence": "external-effect",
621
+ "evidence": {
622
+ "kind": "operation",
623
+ "type": "request-action"
624
+ },
625
+ "handoff": {
626
+ "kind": "flow",
627
+ "binding": "action"
628
+ },
629
+ "presentation": {
630
+ "reasonCode": "action-request-required",
631
+ "actionLabelKey": "topic.action.request-action.label",
632
+ "bodyKey": "topic.action.request-action.prompt",
633
+ "purposeKey": "topic.action.request-action.purpose",
634
+ "unlocksKey": "topic.action.request-action.unlocks",
635
+ "priority": 900
636
+ }
637
+ },
638
+ {
639
+ "code": "confirm-action",
640
+ "phase": "effecting",
641
+ "predecessor": {
642
+ "axis": "effect",
643
+ "state": "requested"
644
+ },
645
+ "target": {
646
+ "axis": "effect",
647
+ "state": "confirmed"
648
+ },
649
+ "command": "topic.confirm-action",
650
+ "requiredAbility": "topic/record-action",
651
+ "assignedTo": {
652
+ "kind": "role",
653
+ "value": "action-confirmer"
654
+ },
655
+ "gates": [],
656
+ "confirmation": "authority",
657
+ "consequence": "external-effect",
658
+ "evidence": {
659
+ "kind": "receipt",
660
+ "type": "ixo.action-receipt",
661
+ "finality": "final"
662
+ },
663
+ "handoff": {
664
+ "kind": "flow",
665
+ "binding": "action"
666
+ },
667
+ "presentation": {
668
+ "reasonCode": "action-confirmation-required",
669
+ "actionLabelKey": "topic.action.confirm-action.label",
670
+ "bodyKey": "topic.action.confirm-action.prompt",
671
+ "purposeKey": "topic.action.confirm-action.purpose",
672
+ "unlocksKey": "topic.action.confirm-action.unlocks",
673
+ "priority": 900
674
+ }
675
+ },
676
+ {
677
+ "code": "record-settlement",
678
+ "phase": "settling",
679
+ "predecessor": {
680
+ "axis": "settlement",
681
+ "state": "pending"
682
+ },
683
+ "target": {
684
+ "axis": "settlement",
685
+ "state": "final"
686
+ },
687
+ "command": "topic.record-settlement",
688
+ "requiredAbility": "settlement/record",
689
+ "assignedTo": {
690
+ "kind": "role",
691
+ "value": "settlement-controller"
692
+ },
693
+ "gates": [
694
+ {
695
+ "kind": "axis",
696
+ "axis": "effect",
697
+ "states": [
698
+ "confirmed"
699
+ ]
700
+ }
701
+ ],
702
+ "confirmation": "authority",
703
+ "consequence": "settlement",
704
+ "evidence": {
705
+ "kind": "receipt",
706
+ "type": "ixo.settlement-receipt",
707
+ "finality": "final"
708
+ },
709
+ "handoff": {
710
+ "kind": "flow",
711
+ "binding": "settlement"
712
+ },
713
+ "presentation": {
714
+ "reasonCode": "settlement-required",
715
+ "actionLabelKey": "topic.action.record-settlement.label",
716
+ "bodyKey": "topic.action.record-settlement.prompt",
717
+ "purposeKey": "topic.action.record-settlement.purpose",
718
+ "unlocksKey": "topic.action.record-settlement.unlocks",
719
+ "priority": 900
720
+ }
721
+ }
722
+ ],
723
+ "progressRules": [
724
+ {
725
+ "code": "disputed",
726
+ "condition": "disputed",
727
+ "priority": 700,
728
+ "source": {
729
+ "kind": "record",
730
+ "value": "ixo.topic.dispute"
731
+ }
732
+ },
733
+ {
734
+ "code": "failed",
735
+ "condition": "failed",
736
+ "priority": 650,
737
+ "source": {
738
+ "kind": "receipt",
739
+ "value": "failed"
740
+ }
741
+ },
742
+ {
743
+ "code": "blocked",
744
+ "condition": "blocked",
745
+ "priority": 600,
746
+ "source": {
747
+ "kind": "topic",
748
+ "value": "blocked"
749
+ },
750
+ "requiresTarget": true
751
+ },
752
+ {
753
+ "code": "waiting",
754
+ "condition": "waiting",
755
+ "priority": 500,
756
+ "source": {
757
+ "kind": "topic",
758
+ "value": "waiting"
759
+ },
760
+ "requiresTarget": true
761
+ },
762
+ {
763
+ "code": "needs-input",
764
+ "condition": "needs-input",
765
+ "priority": 400,
766
+ "source": {
767
+ "kind": "record",
768
+ "value": "ixo.topic.question"
769
+ }
770
+ },
771
+ {
772
+ "code": "needs-confirmation",
773
+ "condition": "needs-confirmation",
774
+ "priority": 350,
775
+ "source": {
776
+ "kind": "axis",
777
+ "value": "contract"
778
+ },
779
+ "states": [
780
+ "proposed"
781
+ ]
782
+ }
783
+ ],
784
+ "inferredRecordPolicy": {
785
+ "autoAccept": [
786
+ "ixo.topic.fact",
787
+ "ixo.topic.summary",
788
+ "ixo.topic.classification"
789
+ ],
790
+ "neverAutoAccept": [
791
+ "ixo.topic.contract",
792
+ "ixo.topic.outcome",
793
+ "ixo.topic.authority",
794
+ "ixo.topic.action",
795
+ "ixo.claim",
796
+ "ixo.evaluation",
797
+ "ixo.settlement"
798
+ ]
799
+ }
800
+ }
801
+ }