@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
package/README.md
CHANGED
|
@@ -9,7 +9,10 @@ identity of a discussion.
|
|
|
9
9
|
|
|
10
10
|
## Status
|
|
11
11
|
|
|
12
|
-
**Version:** 0.
|
|
12
|
+
**Version:** 1.0.0-rc.1
|
|
13
|
+
|
|
14
|
+
The normative Topic Shape progression and Portal Now projection are defined in
|
|
15
|
+
[Topic Shape Framework v1](docs/topic-shape-framework.md).
|
|
13
16
|
|
|
14
17
|
**Maturity:** Draft implementation candidate
|
|
15
18
|
**Execution source of truth:** [Linear Topic Protocol project](https://linear.app/ixo-world/project/topic-protocol-4ea58bc7910d)
|
|
@@ -24,6 +27,8 @@ and external action execution require their dedicated conformance evidence.
|
|
|
24
27
|
- [Architecture decisions](docs/adr/README.md)
|
|
25
28
|
- [Why Topics matter](docs/topics-feature-guide.md) — a non-technical feature guide
|
|
26
29
|
- [Extending Topic Kinds](docs/extending-topic-kinds.md) — third-party custom Kind and Kind Profile guide
|
|
30
|
+
- [Decision-to-Pay templates](templates/decision-to-pay/README.md) — governed payment decision contract pack
|
|
31
|
+
- [Topic Outcome Achievement evaluation kit](evaluation-kits/topic-outcome-achievement/README.md) — ledger-ready deterministic outcome evaluation release
|
|
27
32
|
- [Protocol chapters](docs/protocol/README.md)
|
|
28
33
|
- [Machine-readable contracts](contracts/README.md)
|
|
29
34
|
- [Reference implementation](docs/reference-implementation.md)
|
|
@@ -40,7 +45,7 @@ key-value adapter at its integration boundary.
|
|
|
40
45
|
|
|
41
46
|
The package includes:
|
|
42
47
|
|
|
43
|
-
- strict Draft 2020-12 validation for all
|
|
48
|
+
- strict Draft 2020-12 validation for all 32 contracts, including Kind Profiles, Job Cards, payment terms, payable obligations, external work, delivery, evaluation, claims, and settlement receipts;
|
|
44
49
|
- pinned, declarative Kind Profiles with safe standard-Kind fallback;
|
|
45
50
|
- deterministic Topic-index reconciliation, structured search, and personal ranking;
|
|
46
51
|
- deterministic Topic projection from a root and authorised operations;
|
|
@@ -147,6 +152,8 @@ examples/ Valid reference vectors
|
|
|
147
152
|
api/ OpenAPI and MCP contract surfaces
|
|
148
153
|
scripts/ Dependency-free validation and integrity tooling
|
|
149
154
|
checksums/ Reproducible SHA-256 manifest
|
|
155
|
+
templates/ Machine-readable Topic Template packs
|
|
156
|
+
evaluation-kits/ Ledger-ready governed evaluation releases
|
|
150
157
|
src/ TypeScript contract and projection reference library
|
|
151
158
|
test/ TDD contract, behavior, and edge-case tests
|
|
152
159
|
```
|
|
@@ -3,16 +3,110 @@
|
|
|
3
3
|
"$id": "https://topic-protocol.ixo.world/schemas/action-receipt.schema.json",
|
|
4
4
|
"title": "Action receipt",
|
|
5
5
|
"type": "object",
|
|
6
|
-
"required": [
|
|
7
|
-
"properties": {
|
|
8
|
-
|
|
6
|
+
"required": [],
|
|
7
|
+
"properties": {},
|
|
8
|
+
"oneOf": [{ "$ref": "#/$defs/v1" }, { "$ref": "#/$defs/v2" }],
|
|
9
|
+
"$defs": {
|
|
9
10
|
"topicId": { "type": "string", "pattern": "^ixo:topic:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" },
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
"digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
12
|
+
"reference": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"required": ["digest"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"digest": { "$ref": "#/$defs/digest" },
|
|
17
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
18
|
+
"summary": { "type": "object", "maxProperties": 20 }
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": false
|
|
21
|
+
},
|
|
22
|
+
"v1": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"required": ["receiptId", "topicId", "action", "actor", "status", "idempotencyKey", "createdAt"],
|
|
25
|
+
"properties": {
|
|
26
|
+
"receiptId": { "type": "string", "minLength": 1 },
|
|
27
|
+
"topicId": { "$ref": "#/$defs/topicId" },
|
|
28
|
+
"action": { "type": "string", "minLength": 1 },
|
|
29
|
+
"actor": { "type": "string", "minLength": 1 },
|
|
30
|
+
"status": { "enum": ["requested", "confirmed", "succeeded", "failed", "rejected"] },
|
|
31
|
+
"idempotencyKey": { "type": "string", "minLength": 1 },
|
|
32
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
33
|
+
"capability": { "type": "string" }
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": true
|
|
36
|
+
},
|
|
37
|
+
"v2": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"required": ["version", "receiptId", "sequence", "requestId", "topicId", "topicRevision", "action", "runtime", "actorDid", "executorDid", "status", "idempotencyKey", "occurredAt", "authorization", "input", "issuerDid", "signature"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"version": { "const": 2 },
|
|
42
|
+
"receiptId": { "type": "string", "minLength": 1 },
|
|
43
|
+
"sequence": { "type": "integer", "minimum": 1 },
|
|
44
|
+
"requestId": { "type": "string", "minLength": 1 },
|
|
45
|
+
"topicId": { "$ref": "#/$defs/topicId" },
|
|
46
|
+
"topicRevision": { "type": "string", "minLength": 1 },
|
|
47
|
+
"action": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": ["type", "can", "registryVersion", "contractDigest"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"type": { "type": "string", "pattern": "^qi/" },
|
|
52
|
+
"can": { "type": "string", "minLength": 3 },
|
|
53
|
+
"registryVersion": { "type": "string", "minLength": 1 },
|
|
54
|
+
"contractDigest": { "$ref": "#/$defs/digest" }
|
|
55
|
+
},
|
|
56
|
+
"additionalProperties": false
|
|
57
|
+
},
|
|
58
|
+
"runtime": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"required": ["provider", "executionId"],
|
|
61
|
+
"properties": {
|
|
62
|
+
"provider": { "enum": ["qi-flow", "qiforge", "mcp"] },
|
|
63
|
+
"bindingId": { "type": "string", "minLength": 1 },
|
|
64
|
+
"flowUri": { "type": "string", "minLength": 1 },
|
|
65
|
+
"sessionRunId": { "type": "string", "minLength": 1 },
|
|
66
|
+
"nodeId": { "type": "string", "minLength": 1 },
|
|
67
|
+
"executionId": { "type": "string", "minLength": 1 }
|
|
68
|
+
},
|
|
69
|
+
"additionalProperties": false
|
|
70
|
+
},
|
|
71
|
+
"actorDid": { "type": "string", "pattern": "^did:" },
|
|
72
|
+
"executorDid": { "type": "string", "pattern": "^did:" },
|
|
73
|
+
"status": { "enum": ["requested", "awaiting_confirmation", "running", "succeeded", "failed", "rejected", "cancelled", "needs_verification"] },
|
|
74
|
+
"idempotencyKey": { "type": "string", "minLength": 1 },
|
|
75
|
+
"occurredAt": { "type": "string", "format": "date-time" },
|
|
76
|
+
"authorization": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"required": ["capability"],
|
|
79
|
+
"properties": {
|
|
80
|
+
"capability": { "type": "string", "minLength": 1 },
|
|
81
|
+
"invocation": { "type": "string", "minLength": 1 },
|
|
82
|
+
"confirmation": { "type": "string", "minLength": 1 }
|
|
83
|
+
},
|
|
84
|
+
"additionalProperties": false
|
|
85
|
+
},
|
|
86
|
+
"input": { "$ref": "#/$defs/reference" },
|
|
87
|
+
"output": { "$ref": "#/$defs/reference" },
|
|
88
|
+
"proof": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"required": ["kind", "digest"],
|
|
91
|
+
"properties": {
|
|
92
|
+
"kind": { "enum": ["fields", "custom", "host-receipt"] },
|
|
93
|
+
"digest": { "$ref": "#/$defs/digest" },
|
|
94
|
+
"refs": { "type": "array", "uniqueItems": true, "maxItems": 50, "items": { "type": "string", "minLength": 1 } }
|
|
95
|
+
},
|
|
96
|
+
"additionalProperties": false
|
|
97
|
+
},
|
|
98
|
+
"evidenceRefs": { "type": "array", "uniqueItems": true, "maxItems": 100, "items": { "type": "string", "minLength": 1 } },
|
|
99
|
+
"traceRef": { "type": "string", "minLength": 1 },
|
|
100
|
+
"error": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"required": ["message"],
|
|
103
|
+
"properties": { "code": { "type": "string", "maxLength": 80 }, "message": { "type": "string", "maxLength": 2000 } },
|
|
104
|
+
"additionalProperties": false
|
|
105
|
+
},
|
|
106
|
+
"issuerDid": { "type": "string", "pattern": "^did:" },
|
|
107
|
+
"signature": { "type": "string", "minLength": 1 }
|
|
108
|
+
},
|
|
109
|
+
"additionalProperties": false
|
|
110
|
+
}
|
|
111
|
+
}
|
|
18
112
|
}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://topic-protocol.ixo.world/schemas/decision-to-pay-template-v2.schema.json",
|
|
4
|
+
"title": "IXO Decision-to-Pay Topic Template manifest v2",
|
|
5
|
+
"description": "A Claims-native Decision-to-Pay template. The Topic binds and projects the work case; the Deed and IXO Claims module remain authoritative.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"$schema",
|
|
9
|
+
"version",
|
|
10
|
+
"id",
|
|
11
|
+
"templateVersion",
|
|
12
|
+
"label",
|
|
13
|
+
"description",
|
|
14
|
+
"maturity",
|
|
15
|
+
"compatibility",
|
|
16
|
+
"topic",
|
|
17
|
+
"authorities",
|
|
18
|
+
"actors",
|
|
19
|
+
"resources",
|
|
20
|
+
"lifecycle",
|
|
21
|
+
"capabilityPolicy",
|
|
22
|
+
"pilotPolicy",
|
|
23
|
+
"settlement",
|
|
24
|
+
"privacy",
|
|
25
|
+
"acceptanceCriteria"
|
|
26
|
+
],
|
|
27
|
+
"properties": {
|
|
28
|
+
"$schema": { "type": "string", "minLength": 1 },
|
|
29
|
+
"version": { "const": 2 },
|
|
30
|
+
"id": { "type": "string", "pattern": "^urn:ixo:decision-to-pay:template:[a-z0-9-]+$" },
|
|
31
|
+
"templateVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
32
|
+
"label": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
33
|
+
"description": { "type": "string", "minLength": 1, "maxLength": 1000 },
|
|
34
|
+
"maturity": { "enum": ["draft", "incubating", "candidate", "stable"] },
|
|
35
|
+
"compatibility": { "$ref": "#/$defs/compatibility" },
|
|
36
|
+
"topic": { "$ref": "#/$defs/topic" },
|
|
37
|
+
"authorities": { "$ref": "#/$defs/authorities" },
|
|
38
|
+
"actors": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"minItems": 4,
|
|
41
|
+
"items": { "$ref": "#/$defs/actor" }
|
|
42
|
+
},
|
|
43
|
+
"resources": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"minItems": 7,
|
|
46
|
+
"items": { "$ref": "#/$defs/resource" }
|
|
47
|
+
},
|
|
48
|
+
"lifecycle": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"minItems": 10,
|
|
51
|
+
"items": { "$ref": "#/$defs/lifecycleStep" }
|
|
52
|
+
},
|
|
53
|
+
"capabilityPolicy": { "$ref": "#/$defs/capabilityPolicy" },
|
|
54
|
+
"pilotPolicy": { "$ref": "#/$defs/pilotPolicy" },
|
|
55
|
+
"settlement": { "$ref": "#/$defs/settlement" },
|
|
56
|
+
"privacy": { "$ref": "#/$defs/privacy" },
|
|
57
|
+
"acceptanceCriteria": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"minItems": 1,
|
|
60
|
+
"items": { "$ref": "#/$defs/acceptanceCriterion" }
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"$defs": {
|
|
65
|
+
"digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
66
|
+
"jsonPointer": { "type": "string", "pattern": "^/" },
|
|
67
|
+
"compatibility": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"required": ["protocolPackage", "protocolVersion", "sourceCommit", "claimsModule", "sdkVersion", "implementationStatus", "requiredExtensions"],
|
|
70
|
+
"properties": {
|
|
71
|
+
"protocolPackage": { "const": "@ixo/topic-protocol" },
|
|
72
|
+
"protocolVersion": { "const": "0.8.0" },
|
|
73
|
+
"sourceCommit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
|
74
|
+
"claimsModule": { "enum": ["v7", "v8"] },
|
|
75
|
+
"sdkVersion": { "const": "3.0.0" },
|
|
76
|
+
"implementationStatus": { "enum": ["design_ready", "candidate_contract", "implemented"] },
|
|
77
|
+
"requiredExtensions": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"minItems": 2,
|
|
80
|
+
"uniqueItems": true,
|
|
81
|
+
"items": { "type": "string", "minLength": 1 }
|
|
82
|
+
},
|
|
83
|
+
"constraints": { "type": "array", "items": { "type": "string", "minLength": 1 } }
|
|
84
|
+
},
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
},
|
|
87
|
+
"topic": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"required": ["kind", "profile", "domain", "role", "bindingPaths", "lifecyclePolicy"],
|
|
90
|
+
"properties": {
|
|
91
|
+
"kind": { "const": "org.ixo.job-card" },
|
|
92
|
+
"profile": { "const": "https://topic-protocol.ixo.world/profiles/job-card" },
|
|
93
|
+
"domain": { "const": "deed" },
|
|
94
|
+
"role": { "const": "contract_binder_and_message_thread" },
|
|
95
|
+
"bindingPaths": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"required": ["deed", "claimCollection", "manifest", "claimSchema", "rubric"],
|
|
98
|
+
"properties": {
|
|
99
|
+
"deed": { "const": "/bindings/deed" },
|
|
100
|
+
"claimCollection": { "const": "/bindings/claimCollection" },
|
|
101
|
+
"manifest": { "const": "/bindings/verifiedWorkPaymentManifest" },
|
|
102
|
+
"claimSchema": { "const": "/bindings/claimSchema" },
|
|
103
|
+
"rubric": { "const": "/bindings/rubric" }
|
|
104
|
+
},
|
|
105
|
+
"additionalProperties": false
|
|
106
|
+
},
|
|
107
|
+
"lifecyclePolicy": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"required": ["topicIsProjection", "chainStateIsAuthoritative", "resolveRule"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"topicIsProjection": { "const": true },
|
|
112
|
+
"chainStateIsAuthoritative": { "const": true },
|
|
113
|
+
"resolveRule": { "type": "string", "minLength": 1 }
|
|
114
|
+
},
|
|
115
|
+
"additionalProperties": false
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"additionalProperties": false
|
|
119
|
+
},
|
|
120
|
+
"authorities": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"required": ["workPackage", "conversation", "claims", "evaluation", "orchestration"],
|
|
123
|
+
"properties": {
|
|
124
|
+
"workPackage": { "const": "deed" },
|
|
125
|
+
"conversation": { "const": "job_topic" },
|
|
126
|
+
"claims": { "const": "ixo.claims.v1beta1" },
|
|
127
|
+
"evaluation": { "const": "ixo_evaluation_engine" },
|
|
128
|
+
"orchestration": { "const": "ixo_portal" }
|
|
129
|
+
},
|
|
130
|
+
"additionalProperties": false
|
|
131
|
+
},
|
|
132
|
+
"actor": {
|
|
133
|
+
"type": "object",
|
|
134
|
+
"required": ["role", "identity", "capabilities"],
|
|
135
|
+
"properties": {
|
|
136
|
+
"role": { "enum": ["deed_owner", "payer", "service_agent", "evaluation_engine", "human_evaluator", "adjudicator"] },
|
|
137
|
+
"identity": { "const": "did" },
|
|
138
|
+
"required": { "type": "boolean" },
|
|
139
|
+
"capabilities": {
|
|
140
|
+
"type": "array",
|
|
141
|
+
"minItems": 1,
|
|
142
|
+
"uniqueItems": true,
|
|
143
|
+
"items": { "type": "string", "minLength": 1 }
|
|
144
|
+
},
|
|
145
|
+
"constraints": { "type": "array", "items": { "type": "string", "minLength": 1 } }
|
|
146
|
+
},
|
|
147
|
+
"additionalProperties": false
|
|
148
|
+
},
|
|
149
|
+
"resource": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"required": ["role", "type", "required", "authority", "binding", "confidentiality"],
|
|
152
|
+
"properties": {
|
|
153
|
+
"role": { "enum": ["deed", "payment_terms", "payable_obligation", "bid_schema", "claim_schema", "claim_collection", "rubric", "evaluation_receipt", "evidence"] },
|
|
154
|
+
"type": { "type": "string", "minLength": 1 },
|
|
155
|
+
"required": { "type": "boolean" },
|
|
156
|
+
"authority": { "enum": ["deed", "bound_resource", "ixo_claims_module", "evaluation_engine"] },
|
|
157
|
+
"binding": { "enum": ["topic_binding", "deed_linked_resource", "claims_record", "content_addressed_receipt", "vfs_attachment"] },
|
|
158
|
+
"schemaRef": { "type": "string", "format": "uri-reference" },
|
|
159
|
+
"confidentiality": { "enum": ["public", "room_encrypted", "vfs_ucan", "claims_module"] },
|
|
160
|
+
"notes": { "type": "string", "minLength": 1 }
|
|
161
|
+
},
|
|
162
|
+
"additionalProperties": false
|
|
163
|
+
},
|
|
164
|
+
"lifecycleStep": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"required": ["sequence", "id", "authority", "result"],
|
|
167
|
+
"properties": {
|
|
168
|
+
"sequence": { "type": "integer", "minimum": 1, "maximum": 20 },
|
|
169
|
+
"id": { "enum": ["validate-deed", "create-job-topic", "submit-bid", "accept-bid-and-grant", "claim-intent", "submit-claim", "evaluate-evidence", "record-evaluation", "project-payment", "dispute-and-adjudicate"] },
|
|
170
|
+
"authority": { "enum": ["deed", "job_topic", "bids_service", "cosmos_authz", "ixo_claims_module", "evaluation_engine", "ixo_portal"] },
|
|
171
|
+
"messageType": {
|
|
172
|
+
"enum": [
|
|
173
|
+
"/ixo.claims.v1beta1.MsgClaimIntent",
|
|
174
|
+
"/ixo.claims.v1beta1.MsgSubmitClaim",
|
|
175
|
+
"/ixo.claims.v1beta1.MsgEvaluateClaim",
|
|
176
|
+
"/ixo.claims.v1beta1.MsgDisputeClaim",
|
|
177
|
+
"/ixo.claims.v1beta1.MsgAdjudicateDispute",
|
|
178
|
+
"/cosmos.authz.v1beta1.MsgGrant"
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"preconditions": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
182
|
+
"result": { "type": "string", "minLength": 1 }
|
|
183
|
+
},
|
|
184
|
+
"additionalProperties": false
|
|
185
|
+
},
|
|
186
|
+
"capabilityPolicy": {
|
|
187
|
+
"type": "object",
|
|
188
|
+
"required": ["submitClaimAuthorization", "evaluateClaimAuthorization", "engineUcan", "revocationTriggers"],
|
|
189
|
+
"properties": {
|
|
190
|
+
"submitClaimAuthorization": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"required": ["typeUrl", "requiredConstraints", "deriveFromAcceptedBid", "expiryBound"],
|
|
193
|
+
"properties": {
|
|
194
|
+
"typeUrl": { "const": "/ixo.claims.v1beta1.SubmitClaimAuthorization" },
|
|
195
|
+
"requiredConstraints": {
|
|
196
|
+
"type": "array",
|
|
197
|
+
"minItems": 5,
|
|
198
|
+
"uniqueItems": true,
|
|
199
|
+
"items": { "enum": ["collectionId", "agentQuota", "maxAmount", "intentDurationNs", "memberAddress"] }
|
|
200
|
+
},
|
|
201
|
+
"deriveFromAcceptedBid": { "const": true },
|
|
202
|
+
"expiryBound": { "const": "min(job_end,collection_end)" }
|
|
203
|
+
},
|
|
204
|
+
"additionalProperties": false
|
|
205
|
+
},
|
|
206
|
+
"evaluateClaimAuthorization": {
|
|
207
|
+
"type": "object",
|
|
208
|
+
"required": ["typeUrl", "requiredConstraints", "expiryBound"],
|
|
209
|
+
"properties": {
|
|
210
|
+
"typeUrl": { "const": "/ixo.claims.v1beta1.EvaluateClaimAuthorization" },
|
|
211
|
+
"requiredConstraints": {
|
|
212
|
+
"type": "array",
|
|
213
|
+
"minItems": 4,
|
|
214
|
+
"uniqueItems": true,
|
|
215
|
+
"items": { "enum": ["collectionId", "claimIds", "agentQuota", "beforeDate", "maxCustomAmount"] }
|
|
216
|
+
},
|
|
217
|
+
"expiryBound": { "const": "collection_end" }
|
|
218
|
+
},
|
|
219
|
+
"additionalProperties": false
|
|
220
|
+
},
|
|
221
|
+
"engineUcan": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"required": ["abilities", "audienceBound", "resourceBound", "timeBound", "revocable", "environmentBound"],
|
|
224
|
+
"properties": {
|
|
225
|
+
"abilities": {
|
|
226
|
+
"type": "array",
|
|
227
|
+
"minItems": 1,
|
|
228
|
+
"uniqueItems": true,
|
|
229
|
+
"items": { "enum": ["ixo:matrix-claims-bot", "subscriptions/read"] }
|
|
230
|
+
},
|
|
231
|
+
"audienceBound": { "const": true },
|
|
232
|
+
"resourceBound": { "const": true },
|
|
233
|
+
"timeBound": { "const": true },
|
|
234
|
+
"revocable": { "const": true },
|
|
235
|
+
"environmentBound": { "const": true }
|
|
236
|
+
},
|
|
237
|
+
"additionalProperties": false
|
|
238
|
+
},
|
|
239
|
+
"revocationTriggers": {
|
|
240
|
+
"type": "array",
|
|
241
|
+
"minItems": 4,
|
|
242
|
+
"uniqueItems": true,
|
|
243
|
+
"items": { "enum": ["job_cancelled", "job_completed", "job_expired", "bidder_removed", "security_incident"] }
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"additionalProperties": false
|
|
247
|
+
},
|
|
248
|
+
"pilotPolicy": {
|
|
249
|
+
"type": "object",
|
|
250
|
+
"required": ["intentPolicy", "assetType", "payoutTimeoutNs", "mainnetEvaluationMode", "testnetAutomation", "deferredFeatures"],
|
|
251
|
+
"properties": {
|
|
252
|
+
"intentPolicy": { "const": "REQUIRED" },
|
|
253
|
+
"assetType": { "const": "native" },
|
|
254
|
+
"payoutTimeoutNs": { "const": "0" },
|
|
255
|
+
"mainnetEvaluationMode": { "const": "HUMAN_SIGNED" },
|
|
256
|
+
"testnetAutomation": { "const": "CAPPED" },
|
|
257
|
+
"deferredFeatures": {
|
|
258
|
+
"type": "array",
|
|
259
|
+
"minItems": 4,
|
|
260
|
+
"uniqueItems": true,
|
|
261
|
+
"items": { "enum": ["cw20", "cw1155", "team_budgets", "delayed_withdrawal", "mainnet_automation", "other_decision_to_pay_templates"] }
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"additionalProperties": false
|
|
265
|
+
},
|
|
266
|
+
"settlement": {
|
|
267
|
+
"type": "object",
|
|
268
|
+
"required": ["templateMovesFunds", "claimsModuleMovesFunds", "authority", "adapter", "approvalTrigger", "disputeRecourse"],
|
|
269
|
+
"properties": {
|
|
270
|
+
"templateMovesFunds": { "const": false },
|
|
271
|
+
"claimsModuleMovesFunds": { "const": true },
|
|
272
|
+
"authority": { "const": "ixo.claims.v1beta1" },
|
|
273
|
+
"adapter": { "const": "canonical_impactxclient_sdk" },
|
|
274
|
+
"approvalTrigger": { "const": "MsgEvaluateClaim(APPROVED)" },
|
|
275
|
+
"disputeRecourse": { "const": "deposit_slashing_and_adjudication_not_payment_reversal" }
|
|
276
|
+
},
|
|
277
|
+
"additionalProperties": false
|
|
278
|
+
},
|
|
279
|
+
"privacy": {
|
|
280
|
+
"type": "object",
|
|
281
|
+
"required": ["topicIsConfidentialityBoundary", "topicCapabilityGrantsVfsAccess", "sensitiveResourceStorage", "receiptExcludesPii"],
|
|
282
|
+
"properties": {
|
|
283
|
+
"topicIsConfidentialityBoundary": { "const": false },
|
|
284
|
+
"topicCapabilityGrantsVfsAccess": { "const": false },
|
|
285
|
+
"sensitiveResourceStorage": { "const": "encrypted_room_or_ucan_vfs" },
|
|
286
|
+
"receiptExcludesPii": { "const": true }
|
|
287
|
+
},
|
|
288
|
+
"additionalProperties": false
|
|
289
|
+
},
|
|
290
|
+
"acceptanceCriterion": {
|
|
291
|
+
"type": "object",
|
|
292
|
+
"required": ["id", "statement", "verification"],
|
|
293
|
+
"properties": {
|
|
294
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
295
|
+
"statement": { "type": "string", "minLength": 1 },
|
|
296
|
+
"verification": { "type": "string", "minLength": 1 }
|
|
297
|
+
},
|
|
298
|
+
"additionalProperties": false
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|