@ixo/topic-protocol 0.7.0 → 1.0.0-rc.1
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.
- package/README.md +9 -2
- package/dist/schemas/action-receipt.schema.json +105 -11
- package/dist/schemas/decision-to-pay-template-v2.schema.json +301 -0
- package/dist/schemas/decision-to-pay-template.schema.json +346 -0
- package/dist/schemas/payable-obligation-v2.schema.json +319 -0
- package/dist/schemas/payable-obligation.schema.json +312 -0
- package/dist/schemas/payment-terms-v2.schema.json +238 -0
- package/dist/schemas/payment-terms.schema.json +287 -0
- package/dist/schemas/topic-action-request.schema.json +30 -0
- package/dist/schemas/topic-contract-body.schema.json +66 -0
- package/dist/schemas/topic-contract-state.schema.json +70 -276
- package/dist/schemas/topic-flow-binding.schema.json +28 -0
- package/dist/schemas/topic-kind-profile.schema.json +32 -2
- package/dist/schemas/topic-operation.schema.json +2 -2
- package/dist/schemas/topic-recipe.schema.json +19 -0
- package/dist/schemas/topic-root.schema.json +17 -1
- package/dist/schemas/topic-shape.schema.json +79 -0
- package/dist/src/action-runtime/types.d.ts +101 -0
- package/dist/src/action-runtime/types.js +12 -0
- package/dist/src/action-runtime/types.js.map +1 -0
- package/dist/src/contracts/schemas.d.ts +4706 -966
- package/dist/src/contracts/schemas.js +22 -0
- package/dist/src/contracts/schemas.js.map +1 -1
- package/dist/src/contracts/topic-contract.d.ts +38 -6
- package/dist/src/contracts/topic-contract.js +3 -1
- package/dist/src/contracts/topic-contract.js.map +1 -1
- package/dist/src/contracts/topic-kind-profile.d.ts +29 -0
- package/dist/src/contracts/topic-kind-profile.js +31 -0
- package/dist/src/contracts/topic-kind-profile.js.map +1 -1
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/errors.js.map +1 -1
- package/dist/src/index.d.ts +12 -3
- package/dist/src/index.js +11 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/projector/payload.d.ts +18 -0
- package/dist/src/projector/payload.js +57 -1
- package/dist/src/projector/payload.js.map +1 -1
- package/dist/src/projector/state.js +144 -0
- package/dist/src/projector/state.js.map +1 -1
- package/dist/src/projector/types.d.ts +22 -4
- package/dist/src/projector/types.js.map +1 -1
- package/dist/src/shapes/canonical.d.ts +2 -0
- package/dist/src/shapes/canonical.js +20 -0
- package/dist/src/shapes/canonical.js.map +1 -0
- package/dist/src/shapes/claims.d.ts +12 -0
- package/dist/src/shapes/claims.js +20 -0
- package/dist/src/shapes/claims.js.map +1 -0
- package/dist/src/shapes/now.d.ts +2 -0
- package/dist/src/shapes/now.js +42 -0
- package/dist/src/shapes/now.js.map +1 -0
- package/dist/src/shapes/progress.d.ts +3 -0
- package/dist/src/shapes/progress.js +176 -0
- package/dist/src/shapes/progress.js.map +1 -0
- package/dist/src/shapes/recipes.d.ts +5 -0
- package/dist/src/shapes/recipes.js +337 -0
- package/dist/src/shapes/recipes.js.map +1 -0
- package/dist/src/shapes/resolver.d.ts +14 -0
- package/dist/src/shapes/resolver.js +111 -0
- package/dist/src/shapes/resolver.js.map +1 -0
- package/dist/src/shapes/state.d.ts +53 -0
- package/dist/src/shapes/state.js +2 -0
- package/dist/src/shapes/state.js.map +1 -0
- package/dist/src/shapes/types.d.ts +241 -0
- package/dist/src/shapes/types.js +42 -0
- package/dist/src/shapes/types.js.map +1 -0
- package/package.json +6 -2
- package/recipes/README.md +12 -0
- package/recipes/agent-delivery.json +607 -0
- package/recipes/registry.json +41 -0
- package/recipes/research-brief.json +460 -0
- package/recipes/verified-work-payment.json +663 -0
- package/templates/decision-to-pay/README.md +67 -0
- package/templates/decision-to-pay/milestone-payment-release.template.json +195 -0
- package/templates/decision-to-pay/outcome-payment-claim.template.json +198 -0
- package/templates/decision-to-pay/payment-on-delivery.template.json +198 -0
- package/templates/decision-to-pay/verified-work-payment.template.json +283 -0
- package/templates/decision-to-pay/verified-work-payment.v0.2.template.json +319 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Decision-to-Pay Topic template pack
|
|
2
|
+
|
|
3
|
+
This directory publishes versioned, machine-readable Topic Templates for
|
|
4
|
+
consequential payment decisions:
|
|
5
|
+
|
|
6
|
+
1. [Verified Work Payment v0.1](verified-work-payment.template.json) — the original generic contract extension, retained unchanged for compatibility.
|
|
7
|
+
2. [Verified Work Payment v0.2](verified-work-payment.v0.2.template.json) — the Claims-native candidate that binds a Deed, Job Topic, scoped AuthZ, intent escrow, claim, signed evaluation receipt, payment and canonical dispute.
|
|
8
|
+
3. [Payment on Delivery](payment-on-delivery.template.json)
|
|
9
|
+
4. [Milestone Payment Release](milestone-payment-release.template.json)
|
|
10
|
+
5. [Outcome Payment Claim](outcome-payment-claim.template.json)
|
|
11
|
+
|
|
12
|
+
The v1 manifests extend the Topic kinds, recipes, and external-work contracts
|
|
13
|
+
in `@ixo/topic-protocol` 0.7.0. Verified Work Payment v0.2 targets Topic
|
|
14
|
+
Protocol 0.8.0 and the canonical IXO Claims and Evaluation Engine interfaces.
|
|
15
|
+
Every compatibility block pins its reviewed baseline and required extensions.
|
|
16
|
+
|
|
17
|
+
## Shared contracts
|
|
18
|
+
|
|
19
|
+
- [`decision-to-pay-template.schema.json`](../../schemas/decision-to-pay-template.schema.json)
|
|
20
|
+
validates each template manifest.
|
|
21
|
+
- [`payment-terms.schema.json`](../../schemas/payment-terms.schema.json) defines
|
|
22
|
+
immutable commercial and control terms for one payable unit.
|
|
23
|
+
- [`payable-obligation.schema.json`](../../schemas/payable-obligation.schema.json)
|
|
24
|
+
defines a payment-case envelope with separate delivery, evaluation, approval,
|
|
25
|
+
claim, and settlement projections.
|
|
26
|
+
- Matching synthetic reference vectors live in [`examples/`](../../examples).
|
|
27
|
+
|
|
28
|
+
## Trust boundary
|
|
29
|
+
|
|
30
|
+
These artifacts do not grant a capability, verify a signature, establish
|
|
31
|
+
eligibility, approve a claim, or move money. For v1, Topic Protocol operations
|
|
32
|
+
and referenced records are the projected authorities. For Verified Work
|
|
33
|
+
Payment v0.2, the Deed owns the work package and the IXO Claims module owns
|
|
34
|
+
intent, escrow, claim, evaluation, payment, deposits, disputes, and
|
|
35
|
+
adjudication. A conforming runtime must verify DIDs, delegated capabilities,
|
|
36
|
+
signatures, revocation, replay protection, funding, evidence and rubric digests
|
|
37
|
+
before offering a chain transaction.
|
|
38
|
+
|
|
39
|
+
Neither Payable Obligation version is an alternative settlement authority.
|
|
40
|
+
|
|
41
|
+
## Draft and privacy rules
|
|
42
|
+
|
|
43
|
+
- A Topic may begin as an honest Draft with only a title and Kind.
|
|
44
|
+
- Missing intent, owner, outcome, authority, evidence, amount, or deadline must
|
|
45
|
+
remain visibly missing until supplied or accepted.
|
|
46
|
+
- A template names required capabilities but never grants them.
|
|
47
|
+
- Confidential evidence stays in an appropriately scoped encrypted room or a
|
|
48
|
+
UCAN-protected VFS resource. Topic membership does not grant VFS byte access.
|
|
49
|
+
- The example fixtures set `notRealEvidence: true`; zero digests and example
|
|
50
|
+
identifiers must never be treated as verified evidence.
|
|
51
|
+
|
|
52
|
+
## Compatibility notes
|
|
53
|
+
|
|
54
|
+
The Job Card profile and external-work contracts support the strongest path for
|
|
55
|
+
Verified Work Payment. Physical delivery still needs a delivery-order resource
|
|
56
|
+
or profile. The milestone template uses one child Topic per payable milestone,
|
|
57
|
+
so corrections do not become new milestones. Outcome Payment Claim assumes a
|
|
58
|
+
Delivery Packet for the underlying intervention; claims without external work
|
|
59
|
+
need a future generalised obligation handoff.
|
|
60
|
+
|
|
61
|
+
The v2 Verified Work Payment contract deliberately uses separate schemas:
|
|
62
|
+
|
|
63
|
+
- [`decision-to-pay-template-v2.schema.json`](../../schemas/decision-to-pay-template-v2.schema.json) fixes the authority model: Deed for the work package, Job Topic for the binder/thread, Claims for execution, Evaluation Engine for the signed determination, and Portal for orchestration.
|
|
64
|
+
- [`payment-terms-v2.schema.json`](../../schemas/payment-terms-v2.schema.json) maps immutable accepted terms to Claim Collection, AuthZ, evaluation and dispute configuration.
|
|
65
|
+
- [`payable-obligation-v2.schema.json`](../../schemas/payable-obligation-v2.schema.json) is a read-only projection of chain and receipt evidence; it cannot approve or settle.
|
|
66
|
+
|
|
67
|
+
The v1 schemas and all other templates remain available and retain their original semantics.
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schemas/decision-to-pay-template.schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"id": "urn:ixo:decision-to-pay:template:milestone-payment-release",
|
|
5
|
+
"templateVersion": "0.1.0",
|
|
6
|
+
"label": "Milestone Payment Release",
|
|
7
|
+
"description": "Create one governed child Topic for each payable milestone so its terms, handoff, evaluation, claim, settlement, corrections, and disputes remain independently auditable.",
|
|
8
|
+
"maturity": "draft",
|
|
9
|
+
"compatibility": {
|
|
10
|
+
"protocolPackage": "@ixo/topic-protocol",
|
|
11
|
+
"protocolVersion": "0.7.0",
|
|
12
|
+
"sourceCommit": "40d1ce5160757553cd57f670b5b1708a5c0d0ea3",
|
|
13
|
+
"implementationStatus": "draft_contract_extension",
|
|
14
|
+
"requiredExtensions": [
|
|
15
|
+
"org.ixo.payment-terms/v1",
|
|
16
|
+
"org.ixo.payable-obligation/v1",
|
|
17
|
+
"ixo.payment capability policy/v1",
|
|
18
|
+
"payment-rail adapter"
|
|
19
|
+
],
|
|
20
|
+
"constraints": [
|
|
21
|
+
"One child Topic represents one payable milestone; Delivery Packet sequence numbers represent corrections and not additional milestones.",
|
|
22
|
+
"Parent project completion, child milestone acceptance, and payment settlement remain separate statuses."
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"topic": {
|
|
26
|
+
"primaryRole": "payable_milestone",
|
|
27
|
+
"kindRef": {"source": "standard", "kind": "task"},
|
|
28
|
+
"recipe": "project",
|
|
29
|
+
"workingMode": "client",
|
|
30
|
+
"temporalMode": "finite",
|
|
31
|
+
"acceptance": {
|
|
32
|
+
"requiredTopicContractPaths": [
|
|
33
|
+
"/intent/text",
|
|
34
|
+
"/outcome/statement/text",
|
|
35
|
+
"/outcome/successCriteria",
|
|
36
|
+
"/ownerId",
|
|
37
|
+
"/completion/definition",
|
|
38
|
+
"/completion/acceptanceAuthorityIds"
|
|
39
|
+
],
|
|
40
|
+
"allowHonestDraft": true
|
|
41
|
+
},
|
|
42
|
+
"lifecyclePolicy": {
|
|
43
|
+
"separateTopicContractOutcomeAxes": true,
|
|
44
|
+
"waitingRule": "A milestone Topic may wait on dependencies, delivery correction, evaluation, approval, claim, or settlement without changing the parent project outcome.",
|
|
45
|
+
"resolveRule": "Resolve the milestone under its own accepted closure rule; never infer parent project completion from one paid child."
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"topology": {
|
|
49
|
+
"requiresParentTopic": true,
|
|
50
|
+
"parentBaseKind": "task",
|
|
51
|
+
"relation": "branches_from",
|
|
52
|
+
"onePayableUnitPerTopic": true
|
|
53
|
+
},
|
|
54
|
+
"actors": [
|
|
55
|
+
{"role": "payer", "label": "Project client or payer", "required": true, "identity": "did", "capabilities": ["ixo.payment/accept-terms"]},
|
|
56
|
+
{"role": "milestone_owner", "label": "Milestone owner and claimant", "required": true, "identity": "did", "capabilities": ["topic/write", "ixo.payment/submit-delivery", "ixo.payment/record-claim"]},
|
|
57
|
+
{"role": "milestone_acceptor", "label": "Milestone acceptance authority", "required": true, "identity": "did", "capabilities": ["ixo.payment/accept-delivery"]},
|
|
58
|
+
{"role": "evaluator", "label": "Milestone evaluator", "required": true, "identity": "did", "capabilities": ["ixo.payment/evaluate"]},
|
|
59
|
+
{"role": "payment_approver", "label": "Payment approval authority", "required": true, "identity": "did", "capabilities": ["ixo.payment/approve"]},
|
|
60
|
+
{"role": "settlement_controller", "label": "Settlement controller", "required": true, "identity": "did", "capabilities": ["ixo.payment/record-settlement"]}
|
|
61
|
+
],
|
|
62
|
+
"resources": [
|
|
63
|
+
{"role": "parent_topic", "type": "ixo.topic", "required": true, "binding": "external_reference", "authority": "topic_contract", "availability": "topic_protocol_0.7", "confidentiality": "room_encrypted", "notes": "Linked by an append-only Topic relation; the parent does not own this child's payment state."},
|
|
64
|
+
{"role": "payment_terms", "type": "org.ixo.payment-terms", "required": true, "binding": "typed_context", "authority": "bound_resource", "availability": "contract_pack", "schemaRef": "https://topic-protocol.ixo.world/schemas/payment-terms.schema.json", "confidentiality": "vfs_ucan"},
|
|
65
|
+
{"role": "payable_obligation", "type": "org.ixo.payable-obligation", "required": true, "binding": "typed_context", "authority": "bound_resource", "availability": "contract_pack", "schemaRef": "https://topic-protocol.ixo.world/schemas/payable-obligation.schema.json", "confidentiality": "room_encrypted"},
|
|
66
|
+
{"role": "external_work", "type": "ixo.external-work-binding", "required": true, "binding": "protocol_record", "authority": "external_system", "availability": "topic_protocol_0.7", "schemaRef": "https://topic-protocol.ixo.world/schemas/external-work-binding.schema.json", "confidentiality": "room_encrypted"},
|
|
67
|
+
{"role": "milestone_evidence", "type": "ixo.vfs", "required": true, "binding": "vfs_attachment", "authority": "bound_resource", "availability": "topic_protocol_0.7", "schemaRef": "https://topic-protocol.ixo.world/schemas/topic-file-attachment.schema.json", "confidentiality": "vfs_ucan"}
|
|
68
|
+
],
|
|
69
|
+
"protocolContracts": [
|
|
70
|
+
{"name": "topic-contract-state", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/topic-contract-state.schema.json", "required": true},
|
|
71
|
+
{"name": "external-work-binding", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/external-work-binding.schema.json", "required": true},
|
|
72
|
+
{"name": "delivery-packet", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/delivery-packet.schema.json", "required": true},
|
|
73
|
+
{"name": "delivery-decision", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/delivery-decision.schema.json", "required": true},
|
|
74
|
+
{"name": "evaluation-assertion", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/evaluation-assertion.schema.json", "required": true},
|
|
75
|
+
{"name": "approval-decision", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/approval-decision.schema.json", "required": true},
|
|
76
|
+
{"name": "claim-record", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/claim-record.schema.json", "required": true},
|
|
77
|
+
{"name": "settlement-receipt", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/settlement-receipt.schema.json", "required": true},
|
|
78
|
+
{"name": "payment-terms", "source": "contract_pack", "schemaRef": "https://topic-protocol.ixo.world/schemas/payment-terms.schema.json", "required": true},
|
|
79
|
+
{"name": "payable-obligation", "source": "contract_pack", "schemaRef": "https://topic-protocol.ixo.world/schemas/payable-obligation.schema.json", "required": true}
|
|
80
|
+
],
|
|
81
|
+
"operations": [
|
|
82
|
+
"branch",
|
|
83
|
+
"propose-contract",
|
|
84
|
+
"update-contract",
|
|
85
|
+
"accept-contract",
|
|
86
|
+
"supersede-contract",
|
|
87
|
+
"bind-external-work",
|
|
88
|
+
"sync-external-work",
|
|
89
|
+
"submit-delivery",
|
|
90
|
+
"record-delivery-decision",
|
|
91
|
+
"record-evaluation",
|
|
92
|
+
"record-approval",
|
|
93
|
+
"record-claim",
|
|
94
|
+
"record-settlement",
|
|
95
|
+
"change-status",
|
|
96
|
+
"resolve-conflict"
|
|
97
|
+
],
|
|
98
|
+
"gates": [
|
|
99
|
+
{
|
|
100
|
+
"id": "milestone-terms-accepted",
|
|
101
|
+
"stage": "terms",
|
|
102
|
+
"description": "The child Topic must pin one milestone, one amount rule, dependencies, evidence, acceptance authority, and payment timing.",
|
|
103
|
+
"all": [
|
|
104
|
+
{"contract": "topic-contract-state", "path": "/contracts/effective/body/status", "operator": "equals", "value": "accepted"},
|
|
105
|
+
{"contract": "payment-terms", "path": "/calculation/model", "operator": "equals", "value": "milestone"},
|
|
106
|
+
{"contract": "payment-terms", "path": "/status", "operator": "equals", "value": "accepted"}
|
|
107
|
+
],
|
|
108
|
+
"onFailure": "block"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "milestone-delivery-submitted",
|
|
112
|
+
"stage": "delivery",
|
|
113
|
+
"description": "The Delivery Packet must bind only this milestone's accepted contract, work snapshot, deliverables, and evidence.",
|
|
114
|
+
"all": [
|
|
115
|
+
{"contract": "delivery-packet", "path": "/status", "operator": "equals", "value": "submitted"},
|
|
116
|
+
{"contract": "delivery-packet", "path": "/contract/digest", "operator": "digest_matches", "value": "effective_child_contract"},
|
|
117
|
+
{"contract": "delivery-packet", "path": "/paymentTerms/digest", "operator": "digest_matches", "value": "accepted_milestone_terms"}
|
|
118
|
+
],
|
|
119
|
+
"onFailure": "return_for_changes"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"id": "milestone-accepted",
|
|
123
|
+
"stage": "delivery",
|
|
124
|
+
"description": "The authorised acceptance decision must accept the current packet under the child's completion criteria.",
|
|
125
|
+
"all": [
|
|
126
|
+
{"contract": "delivery-decision", "path": "/decision", "operator": "equals", "value": "accepted"},
|
|
127
|
+
{"contract": "delivery-decision", "path": "/deliveryPacketDigest", "operator": "digest_matches", "value": "current_delivery_packet"}
|
|
128
|
+
],
|
|
129
|
+
"onFailure": "return_for_changes"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"id": "milestone-evaluation-supported",
|
|
133
|
+
"stage": "evaluation",
|
|
134
|
+
"description": "Every required success criterion must be supported by the approved milestone rubric.",
|
|
135
|
+
"all": [
|
|
136
|
+
{"contract": "evaluation-assertion", "path": "/outcome", "operator": "all_equal", "value": "supported"},
|
|
137
|
+
{"contract": "evaluation-assertion", "path": "/rubric/governanceStatus", "operator": "all_equal", "value": "approved"}
|
|
138
|
+
],
|
|
139
|
+
"onFailure": "human_review"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "milestone-payment-approved",
|
|
143
|
+
"stage": "approval",
|
|
144
|
+
"description": "Approval must reference the exact child packet and supported evaluation set.",
|
|
145
|
+
"all": [
|
|
146
|
+
{"contract": "approval-decision", "path": "/decision", "operator": "equals", "value": "approved"},
|
|
147
|
+
{"contract": "approval-decision", "path": "/evaluationIds", "operator": "all_equal", "value": "settlement_evaluation_ids"}
|
|
148
|
+
],
|
|
149
|
+
"onFailure": "block"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"id": "milestone-claim-approved",
|
|
153
|
+
"stage": "claim",
|
|
154
|
+
"description": "The claim must be approved for this milestone's exact amount, asset, and recipient.",
|
|
155
|
+
"all": [
|
|
156
|
+
{"contract": "claim-record", "path": "/status", "operator": "equals", "value": "approved"},
|
|
157
|
+
{"contract": "claim-record", "path": "/requested", "operator": "digest_matches", "value": "payable_obligation_requested"}
|
|
158
|
+
],
|
|
159
|
+
"onFailure": "block"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": "milestone-settlement-clear",
|
|
163
|
+
"stage": "settlement",
|
|
164
|
+
"description": "Dependencies, disputes, funding, identity, and replay checks must pass for this child Topic only.",
|
|
165
|
+
"all": [
|
|
166
|
+
{"contract": "operator-verification", "path": "/dependencies", "operator": "equals", "value": "satisfied"},
|
|
167
|
+
{"contract": "operator-verification", "path": "/disputeHold", "operator": "equals", "value": false},
|
|
168
|
+
{"contract": "operator-verification", "path": "/funding", "operator": "equals", "value": "passed"},
|
|
169
|
+
{"contract": "operator-verification", "path": "/idempotencyKey", "operator": "exists"}
|
|
170
|
+
],
|
|
171
|
+
"onFailure": "block"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"settlement": {
|
|
175
|
+
"movesFunds": false,
|
|
176
|
+
"requiresExternalAdapter": true,
|
|
177
|
+
"failClosed": true,
|
|
178
|
+
"requiredAxes": ["delivery", "evaluation", "approval", "claim", "settlement"],
|
|
179
|
+
"exactMatchFields": ["topicId", "deliveryPacketId", "deliveryPacketDigest", "evaluationIds", "approvalId", "claimId", "amount", "asset", "recipient"],
|
|
180
|
+
"terminalState": "confirmed"
|
|
181
|
+
},
|
|
182
|
+
"privacy": {
|
|
183
|
+
"topicIsConfidentialityBoundary": false,
|
|
184
|
+
"topicCapabilityGrantsVfsAccess": false,
|
|
185
|
+
"sensitiveResourceStorage": "encrypted_room_or_ucan_vfs",
|
|
186
|
+
"minimumRoomVisibleFields": ["milestone label", "milestone phase", "target date"]
|
|
187
|
+
},
|
|
188
|
+
"acceptanceCriteria": [
|
|
189
|
+
{"id": "one-payable-unit", "statement": "Each child Topic contains exactly one payable milestone and one Payment Terms resource."},
|
|
190
|
+
{"id": "correction-not-milestone", "statement": "A corrected handoff supersedes the prior Delivery Packet and never creates a second payable milestone."},
|
|
191
|
+
{"id": "parent-child-separation", "statement": "Parent project, child milestone, claim, and settlement states remain independently visible."},
|
|
192
|
+
{"id": "dependency-gate", "statement": "Unmet accepted dependencies block payment without fabricating milestone failure."},
|
|
193
|
+
{"id": "exact-amount", "statement": "The claim and settlement must exactly match the accepted milestone amount, asset, and recipient."}
|
|
194
|
+
]
|
|
195
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schemas/decision-to-pay-template.schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"id": "urn:ixo:decision-to-pay:template:outcome-payment-claim",
|
|
5
|
+
"templateVersion": "0.1.0",
|
|
6
|
+
"label": "Outcome Payment Claim",
|
|
7
|
+
"description": "Adjudicate a payment claim against a pinned outcome contract, approved methodology, immutable intervention handoff, admissible evidence, and authorised evaluation and approval records.",
|
|
8
|
+
"maturity": "draft",
|
|
9
|
+
"compatibility": {
|
|
10
|
+
"protocolPackage": "@ixo/topic-protocol",
|
|
11
|
+
"protocolVersion": "0.7.0",
|
|
12
|
+
"sourceCommit": "40d1ce5160757553cd57f670b5b1708a5c0d0ea3",
|
|
13
|
+
"implementationStatus": "draft_contract_extension",
|
|
14
|
+
"requiredExtensions": [
|
|
15
|
+
"org.ixo.payment-terms/v1",
|
|
16
|
+
"org.ixo.payable-obligation/v1",
|
|
17
|
+
"ixo.payment capability policy/v1",
|
|
18
|
+
"outcome contract or deed resource",
|
|
19
|
+
"evaluation runtime and oracle adapter",
|
|
20
|
+
"claims authority adapter",
|
|
21
|
+
"payment-rail adapter"
|
|
22
|
+
],
|
|
23
|
+
"constraints": [
|
|
24
|
+
"The template assumes an immutable Delivery Packet for the intervention or service that produced the claimed result.",
|
|
25
|
+
"Outcome claims without external work require a future generalized obligation handoff and cannot bypass the current settlement gate.",
|
|
26
|
+
"A supported evaluation is evidence for approval and is never itself payment authority."
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"topic": {
|
|
30
|
+
"primaryRole": "payment_claim",
|
|
31
|
+
"kindRef": {"source": "standard", "kind": "claims"},
|
|
32
|
+
"recipe": "claims",
|
|
33
|
+
"workingMode": "client",
|
|
34
|
+
"temporalMode": "finite",
|
|
35
|
+
"acceptance": {
|
|
36
|
+
"requiredTopicContractPaths": [
|
|
37
|
+
"/intent/text",
|
|
38
|
+
"/outcome/statement/text",
|
|
39
|
+
"/completion/definition",
|
|
40
|
+
"/completion/acceptanceAuthorityIds",
|
|
41
|
+
"/attachments/0"
|
|
42
|
+
],
|
|
43
|
+
"allowHonestDraft": true
|
|
44
|
+
},
|
|
45
|
+
"lifecyclePolicy": {
|
|
46
|
+
"separateTopicContractOutcomeAxes": true,
|
|
47
|
+
"waitingRule": "The Claims Topic may wait on admissible evidence, evaluator availability, manual review, dispute resolution, claim authority, funding, or payment finality.",
|
|
48
|
+
"resolveRule": "Resolve only under the accepted claim-closure rule; a supported outcome, approved claim, and confirmed settlement remain separate facts."
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"actors": [
|
|
52
|
+
{"role": "payer", "label": "Outcome payer or funder", "required": true, "identity": "did", "capabilities": ["ixo.payment/accept-terms"]},
|
|
53
|
+
{"role": "claimant", "label": "Outcome provider and claimant", "required": true, "identity": "did", "capabilities": ["ixo.payment/record-claim"]},
|
|
54
|
+
{"role": "evaluator", "label": "Independent evaluator or oracle", "required": true, "identity": "did", "capabilities": ["ixo.payment/evaluate"], "constraints": ["Must bind the exact approved rubric, evidence digests, trace digests, delivery packet, and capability."]},
|
|
55
|
+
{"role": "approval_authority", "label": "Outcome payment approval authority", "required": true, "identity": "did", "capabilities": ["ixo.payment/approve"]},
|
|
56
|
+
{"role": "claims_authority", "label": "External claims authority", "required": true, "identity": "did", "capabilities": ["ixo.payment/record-claim"]},
|
|
57
|
+
{"role": "settlement_controller", "label": "Settlement controller", "required": true, "identity": "did", "capabilities": ["ixo.payment/record-settlement"]},
|
|
58
|
+
{"role": "beneficiary_representative", "label": "Beneficiary or affected-party representative", "required": false, "identity": "did", "capabilities": ["topic/read"]}
|
|
59
|
+
],
|
|
60
|
+
"resources": [
|
|
61
|
+
{"role": "outcome_contract", "type": "ixo.outcome-contract", "required": true, "binding": "vfs_attachment", "authority": "bound_resource", "availability": "external", "confidentiality": "vfs_ucan", "notes": "Must pin the result definition, population or asset scope, baseline, measurement window, methodology, pricing rule, dispute rights, and authority."},
|
|
62
|
+
{"role": "claim_collection", "type": "ixo.claim-collection", "required": true, "binding": "vfs_attachment", "authority": "external_system", "availability": "external", "confidentiality": "vfs_ucan"},
|
|
63
|
+
{"role": "payment_terms", "type": "org.ixo.payment-terms", "required": true, "binding": "typed_context", "authority": "bound_resource", "availability": "contract_pack", "schemaRef": "https://topic-protocol.ixo.world/schemas/payment-terms.schema.json", "confidentiality": "vfs_ucan"},
|
|
64
|
+
{"role": "payable_obligation", "type": "org.ixo.payable-obligation", "required": true, "binding": "typed_context", "authority": "bound_resource", "availability": "contract_pack", "schemaRef": "https://topic-protocol.ixo.world/schemas/payable-obligation.schema.json", "confidentiality": "room_encrypted"},
|
|
65
|
+
{"role": "intervention_delivery", "type": "ixo.delivery-packet", "required": true, "binding": "protocol_record", "authority": "protocol_record", "availability": "topic_protocol_0.7", "schemaRef": "https://topic-protocol.ixo.world/schemas/delivery-packet.schema.json", "confidentiality": "room_encrypted"},
|
|
66
|
+
{"role": "outcome_evidence", "type": "ixo.vfs", "required": true, "binding": "vfs_attachment", "authority": "bound_resource", "availability": "topic_protocol_0.7", "schemaRef": "https://topic-protocol.ixo.world/schemas/topic-file-attachment.schema.json", "confidentiality": "vfs_ucan"},
|
|
67
|
+
{"role": "approved_rubric", "type": "ixo.evaluation-rubric", "required": true, "binding": "external_reference", "authority": "bound_resource", "availability": "external", "confidentiality": "vfs_ucan"}
|
|
68
|
+
],
|
|
69
|
+
"protocolContracts": [
|
|
70
|
+
{"name": "topic-contract-state", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/topic-contract-state.schema.json", "required": true},
|
|
71
|
+
{"name": "delivery-packet", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/delivery-packet.schema.json", "required": true},
|
|
72
|
+
{"name": "delivery-decision", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/delivery-decision.schema.json", "required": true},
|
|
73
|
+
{"name": "evaluation-assertion", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/evaluation-assertion.schema.json", "required": true},
|
|
74
|
+
{"name": "approval-decision", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/approval-decision.schema.json", "required": true},
|
|
75
|
+
{"name": "claim-record", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/claim-record.schema.json", "required": true},
|
|
76
|
+
{"name": "settlement-receipt", "source": "topic_protocol", "schemaRef": "https://topic-protocol.ixo.world/schemas/settlement-receipt.schema.json", "required": true},
|
|
77
|
+
{"name": "payment-terms", "source": "contract_pack", "schemaRef": "https://topic-protocol.ixo.world/schemas/payment-terms.schema.json", "required": true},
|
|
78
|
+
{"name": "payable-obligation", "source": "contract_pack", "schemaRef": "https://topic-protocol.ixo.world/schemas/payable-obligation.schema.json", "required": true}
|
|
79
|
+
],
|
|
80
|
+
"operations": [
|
|
81
|
+
"propose-contract",
|
|
82
|
+
"update-contract",
|
|
83
|
+
"accept-contract",
|
|
84
|
+
"supersede-contract",
|
|
85
|
+
"submit-delivery",
|
|
86
|
+
"record-delivery-decision",
|
|
87
|
+
"record-evaluation",
|
|
88
|
+
"record-approval",
|
|
89
|
+
"record-claim",
|
|
90
|
+
"record-settlement",
|
|
91
|
+
"record-decision",
|
|
92
|
+
"change-status",
|
|
93
|
+
"resolve-conflict"
|
|
94
|
+
],
|
|
95
|
+
"gates": [
|
|
96
|
+
{
|
|
97
|
+
"id": "outcome-terms-accepted",
|
|
98
|
+
"stage": "terms",
|
|
99
|
+
"description": "The claim must pin an accepted outcome contract, methodology, pricing rule, claim collection, payment terms, and authority model.",
|
|
100
|
+
"all": [
|
|
101
|
+
{"contract": "topic-contract-state", "path": "/contracts/effective/body/status", "operator": "equals", "value": "accepted"},
|
|
102
|
+
{"contract": "payment-terms", "path": "/status", "operator": "equals", "value": "accepted"},
|
|
103
|
+
{"contract": "payment-terms", "path": "/calculation/model", "operator": "equals", "value": "outcome"}
|
|
104
|
+
],
|
|
105
|
+
"onFailure": "block"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "intervention-handoff-accepted",
|
|
109
|
+
"stage": "delivery",
|
|
110
|
+
"description": "The claimed result must bind an accepted immutable intervention or service handoff.",
|
|
111
|
+
"all": [
|
|
112
|
+
{"contract": "delivery-packet", "path": "/status", "operator": "equals", "value": "submitted"},
|
|
113
|
+
{"contract": "delivery-decision", "path": "/decision", "operator": "equals", "value": "accepted"},
|
|
114
|
+
{"contract": "delivery-decision", "path": "/deliveryPacketDigest", "operator": "digest_matches", "value": "claim_delivery_packet"}
|
|
115
|
+
],
|
|
116
|
+
"onFailure": "block"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"id": "outcome-evidence-admissible",
|
|
120
|
+
"stage": "evaluation",
|
|
121
|
+
"description": "Evidence provenance, methodology version, measurement window, population or asset scope, and evaluator authority must pass before determination.",
|
|
122
|
+
"all": [
|
|
123
|
+
{"contract": "evaluation-assertion", "path": "/rubric/governanceStatus", "operator": "all_equal", "value": "approved"},
|
|
124
|
+
{"contract": "evaluation-assertion", "path": "/evidenceDigests", "operator": "min_count", "value": 1},
|
|
125
|
+
{"contract": "operator-verification", "path": "/evidenceAdmissibility", "operator": "equals", "value": "passed"},
|
|
126
|
+
{"contract": "operator-verification", "path": "/evaluatorCapability", "operator": "equals", "value": "valid"}
|
|
127
|
+
],
|
|
128
|
+
"onFailure": "human_review"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "outcome-supported",
|
|
132
|
+
"stage": "evaluation",
|
|
133
|
+
"description": "Every settlement-referenced evaluation must support the exact claim; non-terminal or contested outcomes cannot pay.",
|
|
134
|
+
"all": [
|
|
135
|
+
{"contract": "evaluation-assertion", "path": "/outcome", "operator": "all_equal", "value": "supported"},
|
|
136
|
+
{"contract": "evaluation-assertion", "path": "/deliveryPacketDigest", "operator": "all_equal", "value": "claim_delivery_packet_digest"}
|
|
137
|
+
],
|
|
138
|
+
"onFailure": "human_review"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"id": "outcome-payment-approved",
|
|
142
|
+
"stage": "approval",
|
|
143
|
+
"description": "Approval must apply the pinned policy to the exact packet and evaluation set.",
|
|
144
|
+
"all": [
|
|
145
|
+
{"contract": "approval-decision", "path": "/decision", "operator": "equals", "value": "approved"},
|
|
146
|
+
{"contract": "approval-decision", "path": "/evaluationIds", "operator": "all_equal", "value": "settlement_evaluation_ids"}
|
|
147
|
+
],
|
|
148
|
+
"onFailure": "block"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "outcome-claim-approved",
|
|
152
|
+
"stage": "claim",
|
|
153
|
+
"description": "The external claims authority must approve the current claim for the calculated amount, asset, and recipient.",
|
|
154
|
+
"all": [
|
|
155
|
+
{"contract": "claim-record", "path": "/status", "operator": "equals", "value": "approved"},
|
|
156
|
+
{"contract": "claim-record", "path": "/requested", "operator": "digest_matches", "value": "payable_obligation_requested"},
|
|
157
|
+
{"contract": "claim-record", "path": "/evaluationIds", "operator": "all_equal", "value": "approval_evaluation_ids"}
|
|
158
|
+
],
|
|
159
|
+
"onFailure": "block"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": "outcome-settlement-clear",
|
|
163
|
+
"stage": "settlement",
|
|
164
|
+
"description": "Identity, eligibility, funding, dispute, trusted-time, revocation, and replay checks must pass before the receipt is admitted.",
|
|
165
|
+
"all": [
|
|
166
|
+
{"contract": "operator-verification", "path": "/identity", "operator": "equals", "value": "passed"},
|
|
167
|
+
{"contract": "operator-verification", "path": "/eligibility", "operator": "equals", "value": "passed"},
|
|
168
|
+
{"contract": "operator-verification", "path": "/funding", "operator": "equals", "value": "passed"},
|
|
169
|
+
{"contract": "operator-verification", "path": "/disputeHold", "operator": "equals", "value": false},
|
|
170
|
+
{"contract": "operator-verification", "path": "/revocation", "operator": "equals", "value": "clear"},
|
|
171
|
+
{"contract": "operator-verification", "path": "/idempotencyKey", "operator": "exists"}
|
|
172
|
+
],
|
|
173
|
+
"onFailure": "block"
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"settlement": {
|
|
177
|
+
"movesFunds": false,
|
|
178
|
+
"requiresExternalAdapter": true,
|
|
179
|
+
"failClosed": true,
|
|
180
|
+
"requiredAxes": ["delivery", "evaluation", "approval", "claim", "settlement"],
|
|
181
|
+
"exactMatchFields": ["topicId", "deliveryPacketId", "deliveryPacketDigest", "evaluationIds", "approvalId", "claimId", "amount", "asset", "recipient"],
|
|
182
|
+
"terminalState": "confirmed"
|
|
183
|
+
},
|
|
184
|
+
"privacy": {
|
|
185
|
+
"topicIsConfidentialityBoundary": false,
|
|
186
|
+
"topicCapabilityGrantsVfsAccess": false,
|
|
187
|
+
"sensitiveResourceStorage": "encrypted_room_or_ucan_vfs",
|
|
188
|
+
"minimumRoomVisibleFields": ["claim reference", "claim status", "evaluation status", "settlement status"]
|
|
189
|
+
},
|
|
190
|
+
"acceptanceCriteria": [
|
|
191
|
+
{"id": "honest-draft", "statement": "A Claims Draft may begin without fabricating outcome, methodology, evidence, amount, claimant, or authority."},
|
|
192
|
+
{"id": "methodology-pinned", "statement": "The evaluation references an approved immutable rubric and exact evidence and trace digests."},
|
|
193
|
+
{"id": "non-terminal-blocked", "statement": "Refuted, insufficient-evidence, human-review, disputed, or superseded evaluations cannot support settlement."},
|
|
194
|
+
{"id": "approval-is-separate", "statement": "A supported evaluation cannot directly approve a claim or move funds."},
|
|
195
|
+
{"id": "claim-state-retained", "statement": "Claim updates retain packet, evaluation, approval, claimant, requested amount, asset, recipient, source, and replay key."},
|
|
196
|
+
{"id": "operator-gates", "statement": "Funding, identity, eligibility, revocation, disputes, trusted time, idempotency, and finality are verified by deployed adapters before settlement confirmation."}
|
|
197
|
+
]
|
|
198
|
+
}
|