@agenticprimitives/ontology 1.0.0-alpha.4 → 1.0.0-alpha.5
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/cbox/geo-vocabulary.ttl +36 -0
- package/cbox/skill-vocabulary.ttl +50 -0
- package/context.jsonld +13 -1
- package/dist/artifacts.d.ts +3 -2
- package/dist/artifacts.d.ts.map +1 -1
- package/dist/artifacts.js +24 -2
- package/dist/artifacts.js.map +1 -1
- package/dist/index.d.ts +156 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +176 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/tbox/agreement.ttl +77 -0
- package/tbox/attestation.ttl +135 -0
- package/tbox/constraints.ttl +150 -0
- package/tbox/fulfillment.ttl +140 -0
- package/tbox/geo.ttl +28 -0
- package/tbox/intents.ttl +137 -0
- package/tbox/payment.ttl +124 -0
- package/tbox/resolution.ttl +108 -0
- package/tbox/skills.ttl +30 -0
package/tbox/payment.ttl
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# T-box — payment vocabulary (spine Layer 9b).
|
|
2
|
+
# x402 + AP2 + ERC-4337 paymaster aligned; spec 243.
|
|
3
|
+
# Spec 225 §11.5.
|
|
4
|
+
# Owning runtime SHACL: packages/payments/src/shapes/payment.shacl.ttl.
|
|
5
|
+
|
|
6
|
+
@prefix appay: <https://agenticprimitives.dev/ns/payment#> .
|
|
7
|
+
@prefix apvc: <https://agenticprimitives.dev/ns/credential#> .
|
|
8
|
+
@prefix apint: <https://agenticprimitives.dev/ns/intent#> .
|
|
9
|
+
@prefix apagr: <https://agenticprimitives.dev/ns/agreement#> .
|
|
10
|
+
@prefix ap: <https://agenticprimitives.dev/ns/core#> .
|
|
11
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
12
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
13
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
14
|
+
|
|
15
|
+
appay: a owl:Ontology ;
|
|
16
|
+
rdfs:label "Agentic Primitives — payment ontology" ;
|
|
17
|
+
owl:versionInfo "0.1.0" ;
|
|
18
|
+
rdfs:comment "Layer 9b of the spine. PaymentMandate + ContextBinding + MandateConstraints + Mode discrimination + PaymentReceipt." .
|
|
19
|
+
|
|
20
|
+
# ─── Core classes ─────────────────────────────────────────────────────
|
|
21
|
+
|
|
22
|
+
appay:PaymentMandate a owl:Class ;
|
|
23
|
+
rdfs:label "PaymentMandate" ;
|
|
24
|
+
rdfs:comment "Signed, scoped, context-bound payment authority. Distinct from PermissionGrant (which authorizes ACTIONS) and Agreement (which commits PARTIES). AP2 + x402 + ERC-4337 paymaster aligned." .
|
|
25
|
+
|
|
26
|
+
appay:OpenPaymentMandate a owl:Class ;
|
|
27
|
+
rdfs:subClassOf appay:PaymentMandate ;
|
|
28
|
+
rdfs:label "OpenPaymentMandate" ;
|
|
29
|
+
rdfs:comment "Autonomous-execution-allowed mandate. Refuses final-charge (PMT-10.1); closed mandate required for terminal transactions." .
|
|
30
|
+
|
|
31
|
+
appay:ClosedPaymentMandate a owl:Class ;
|
|
32
|
+
rdfs:subClassOf appay:PaymentMandate ;
|
|
33
|
+
rdfs:label "ClosedPaymentMandate" ;
|
|
34
|
+
rdfs:comment "One-shot mandate frozen to a specific target + amount. PMT-INV-14: maxRedemptions = 1 always." .
|
|
35
|
+
|
|
36
|
+
appay:PaymentReceipt a owl:Class ;
|
|
37
|
+
rdfs:subClassOf apvc:VerifiableCredential ;
|
|
38
|
+
rdfs:label "PaymentReceipt" ;
|
|
39
|
+
rdfs:comment "Immutable VC issued by rail executor on successful redemption. Asserted to AttestationRegistry; PMT-INV-11: no revoke entrypoint." .
|
|
40
|
+
|
|
41
|
+
appay:MandateConstraints a owl:Class ;
|
|
42
|
+
rdfs:label "MandateConstraints" ;
|
|
43
|
+
rdfs:comment "AP2-style aggregate scope: maxAggregateAmount, frequency, categories, geoFence, timeOfDay. Orthogonal to per-redemption amountPolicy." .
|
|
44
|
+
|
|
45
|
+
appay:ContextBinding a owl:Class ;
|
|
46
|
+
rdfs:label "ContextBinding" ;
|
|
47
|
+
rdfs:comment "Hard substrate invariant (PMT-3): payment signatures bind to intentId / taskId / agreementCommitment / artifactHash / resource. PMT-INV-01: at least one MUST be populated." .
|
|
48
|
+
|
|
49
|
+
appay:PaymentRail a owl:Class ;
|
|
50
|
+
rdfs:label "PaymentRail" ;
|
|
51
|
+
rdfs:comment "Rail discriminator: x402 | wallet | sponsored-userop | escrow (W2) | invoice (W2) | confidential-* (W2)." .
|
|
52
|
+
|
|
53
|
+
# ─── Properties ───────────────────────────────────────────────────────
|
|
54
|
+
|
|
55
|
+
appay:payer a owl:ObjectProperty ;
|
|
56
|
+
rdfs:domain appay:PaymentMandate ;
|
|
57
|
+
rdfs:range ap:Agent ;
|
|
58
|
+
rdfs:label "payer" .
|
|
59
|
+
|
|
60
|
+
appay:payee a owl:ObjectProperty ;
|
|
61
|
+
rdfs:domain appay:PaymentMandate ;
|
|
62
|
+
rdfs:range ap:Agent ;
|
|
63
|
+
rdfs:label "payee" .
|
|
64
|
+
|
|
65
|
+
appay:granter a owl:ObjectProperty ;
|
|
66
|
+
rdfs:domain appay:PaymentMandate ;
|
|
67
|
+
rdfs:range ap:Agent ;
|
|
68
|
+
rdfs:label "granter" ;
|
|
69
|
+
rdfs:comment "The SA that signed the mandate (== payer for direct; delegator for delegated)." .
|
|
70
|
+
|
|
71
|
+
appay:rail a owl:DatatypeProperty ;
|
|
72
|
+
rdfs:domain appay:PaymentMandate ;
|
|
73
|
+
rdfs:range xsd:string ;
|
|
74
|
+
rdfs:label "rail" ;
|
|
75
|
+
rdfs:comment "Rail name. PMT-INV-09: x402-rail requires contextBinding.resource populated." .
|
|
76
|
+
|
|
77
|
+
appay:mode a owl:DatatypeProperty ;
|
|
78
|
+
rdfs:domain appay:PaymentMandate ;
|
|
79
|
+
rdfs:range xsd:string ;
|
|
80
|
+
rdfs:label "mode" ;
|
|
81
|
+
rdfs:comment "'open' | 'closed'. AP2-aligned. PMT-10.1: open refuses final-charge." .
|
|
82
|
+
|
|
83
|
+
appay:requiresClosedMandateForFinalCharge a owl:DatatypeProperty ;
|
|
84
|
+
rdfs:domain appay:OpenPaymentMandate ;
|
|
85
|
+
rdfs:range xsd:boolean ;
|
|
86
|
+
rdfs:label "requiresClosedMandateForFinalCharge" ;
|
|
87
|
+
rdfs:comment "Default true. Refuses final-charge unless a closed mandate is presented." .
|
|
88
|
+
|
|
89
|
+
appay:contextBindingIntent a owl:ObjectProperty ;
|
|
90
|
+
rdfs:domain appay:ContextBinding ;
|
|
91
|
+
rdfs:range apint:Intent ;
|
|
92
|
+
rdfs:label "contextBindingIntent" .
|
|
93
|
+
|
|
94
|
+
appay:contextBindingAgreement a owl:ObjectProperty ;
|
|
95
|
+
rdfs:domain appay:ContextBinding ;
|
|
96
|
+
rdfs:range apagr:AgreementCommitment ;
|
|
97
|
+
rdfs:label "contextBindingAgreement" .
|
|
98
|
+
|
|
99
|
+
appay:chain a owl:DatatypeProperty ;
|
|
100
|
+
rdfs:domain appay:PaymentMandate ;
|
|
101
|
+
rdfs:range xsd:integer ;
|
|
102
|
+
rdfs:label "chain" ;
|
|
103
|
+
rdfs:comment "Chain ID. PMT-INV-03: redemption only on this chain." .
|
|
104
|
+
|
|
105
|
+
appay:maxAggregateAmount a owl:DatatypeProperty ;
|
|
106
|
+
rdfs:domain appay:MandateConstraints ;
|
|
107
|
+
rdfs:range xsd:decimal ;
|
|
108
|
+
rdfs:label "maxAggregateAmount" .
|
|
109
|
+
|
|
110
|
+
appay:nonce a owl:DatatypeProperty ;
|
|
111
|
+
rdfs:domain appay:PaymentMandate ;
|
|
112
|
+
rdfs:range xsd:integer ;
|
|
113
|
+
rdfs:label "nonce" .
|
|
114
|
+
|
|
115
|
+
appay:maxRedemptions a owl:DatatypeProperty ;
|
|
116
|
+
rdfs:domain appay:PaymentMandate ;
|
|
117
|
+
rdfs:range xsd:integer ;
|
|
118
|
+
rdfs:label "maxRedemptions" ;
|
|
119
|
+
rdfs:comment "Default 1 (one-shot). For closed mandates: PMT-INV-14 always 1." .
|
|
120
|
+
|
|
121
|
+
appay:expiresAt a owl:DatatypeProperty ;
|
|
122
|
+
rdfs:domain appay:PaymentMandate ;
|
|
123
|
+
rdfs:range xsd:dateTime ;
|
|
124
|
+
rdfs:label "expiresAt" .
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# T-box — resolution + ResolutionReceipt vocabulary (spine Layer 4; skeleton W1).
|
|
2
|
+
# ERC-7683 Resolver pattern; W2 grows the full surface.
|
|
3
|
+
# RR-INV-01..05 enforced by intent-marketplace + intent-resolver runtime SHACL.
|
|
4
|
+
|
|
5
|
+
@prefix apres: <https://agenticprimitives.dev/ns/resolution#> .
|
|
6
|
+
@prefix apint: <https://agenticprimitives.dev/ns/intent#> .
|
|
7
|
+
@prefix apcst: <https://agenticprimitives.dev/ns/constraint#> .
|
|
8
|
+
@prefix ap: <https://agenticprimitives.dev/ns/core#> .
|
|
9
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
10
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
11
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
12
|
+
@prefix prov: <http://www.w3.org/ns/prov#> .
|
|
13
|
+
|
|
14
|
+
apres: a owl:Ontology ;
|
|
15
|
+
rdfs:label "Agentic Primitives — resolution ontology" ;
|
|
16
|
+
owl:versionInfo "0.1.0-skeleton" ;
|
|
17
|
+
rdfs:comment "Layer 4 of the spine. W1 ships skeleton (types + PassThroughResolver); full vocabulary lands W2 when resolver implementations ship." .
|
|
18
|
+
|
|
19
|
+
# ─── Resolver classes ─────────────────────────────────────────────────
|
|
20
|
+
|
|
21
|
+
apres:Resolver a owl:Class ;
|
|
22
|
+
rdfs:subClassOf ap:Agent ;
|
|
23
|
+
rdfs:label "Resolver" ;
|
|
24
|
+
rdfs:comment "An Agent that performs Intent resolution — translates opaque expressed Intent → ResolvedOrder. ERC-7683 Resolver-contract parallel." .
|
|
25
|
+
|
|
26
|
+
apres:ResolvedOrder a owl:Class ;
|
|
27
|
+
rdfs:subClassOf prov:Entity ;
|
|
28
|
+
rdfs:label "ResolvedOrder" ;
|
|
29
|
+
rdfs:comment "Normalized executable form of an Intent. Layer 4 output. Bridges from CSP-shaped Intent to Solver-fillable Order (Layer 5+6)." .
|
|
30
|
+
|
|
31
|
+
apres:ResolutionReceipt a owl:Class ;
|
|
32
|
+
rdfs:subClassOf prov:Entity ;
|
|
33
|
+
rdfs:label "ResolutionReceipt" ;
|
|
34
|
+
rdfs:comment "Provenance + invariant record for a resolution: model + version + prompt hash + tool calls + confidence + policyChecks + requiresUserConfirmation. Authority-gating per RR-INV-01..05. NOT itself an authority object — provenance only." .
|
|
35
|
+
|
|
36
|
+
apres:PolicyCheckResult a owl:Class ;
|
|
37
|
+
rdfs:label "PolicyCheckResult" ;
|
|
38
|
+
rdfs:comment "A single policy check + pass/fail + rationale; recorded in a ResolutionReceipt." .
|
|
39
|
+
|
|
40
|
+
apres:ToolCallTrace a owl:Class ;
|
|
41
|
+
rdfs:label "ToolCallTrace" ;
|
|
42
|
+
rdfs:comment "An MCP tool call invocation captured for resolution provenance (toolName + inputHash + outputHash + durationMs)." .
|
|
43
|
+
|
|
44
|
+
# ─── Properties ───────────────────────────────────────────────────────
|
|
45
|
+
|
|
46
|
+
apres:resolvedFrom a owl:ObjectProperty ;
|
|
47
|
+
rdfs:domain apres:ResolvedOrder ;
|
|
48
|
+
rdfs:range apint:Intent ;
|
|
49
|
+
rdfs:label "resolvedFrom" .
|
|
50
|
+
|
|
51
|
+
apres:canonicalConstraints a owl:ObjectProperty ;
|
|
52
|
+
rdfs:domain apres:ResolvedOrder ;
|
|
53
|
+
rdfs:range apcst:ConstraintSet ;
|
|
54
|
+
rdfs:label "canonicalConstraints" .
|
|
55
|
+
|
|
56
|
+
apres:expandedAssumptions a owl:ObjectProperty ;
|
|
57
|
+
rdfs:domain apres:ResolvedOrder ;
|
|
58
|
+
rdfs:range apcst:AssumptionSet ;
|
|
59
|
+
rdfs:label "expandedAssumptions" .
|
|
60
|
+
|
|
61
|
+
apres:resolverAgent a owl:ObjectProperty ;
|
|
62
|
+
rdfs:domain apres:ResolutionReceipt ;
|
|
63
|
+
rdfs:range apres:Resolver ;
|
|
64
|
+
rdfs:label "resolverAgent" .
|
|
65
|
+
|
|
66
|
+
apres:resolverVersion a owl:DatatypeProperty ;
|
|
67
|
+
rdfs:domain apres:ResolutionReceipt ;
|
|
68
|
+
rdfs:range xsd:string ;
|
|
69
|
+
rdfs:label "resolverVersion" .
|
|
70
|
+
|
|
71
|
+
apres:modelName a owl:DatatypeProperty ;
|
|
72
|
+
rdfs:domain apres:ResolutionReceipt ;
|
|
73
|
+
rdfs:range xsd:string ;
|
|
74
|
+
rdfs:label "modelName" ;
|
|
75
|
+
rdfs:comment "LLM model name when present (e.g. 'claude-opus-4-7', 'gpt-4.1'). Null for PassThrough." .
|
|
76
|
+
|
|
77
|
+
apres:confidence a owl:DatatypeProperty ;
|
|
78
|
+
rdfs:domain apres:ResolutionReceipt ;
|
|
79
|
+
rdfs:range xsd:decimal ;
|
|
80
|
+
rdfs:label "confidence" ;
|
|
81
|
+
rdfs:comment "0..1. Substrate threshold determines requiresUserConfirmation." .
|
|
82
|
+
|
|
83
|
+
apres:requiresUserConfirmation a owl:DatatypeProperty ;
|
|
84
|
+
rdfs:domain apres:ResolutionReceipt ;
|
|
85
|
+
rdfs:range xsd:boolean ;
|
|
86
|
+
rdfs:label "requiresUserConfirmation" ;
|
|
87
|
+
rdfs:comment "Authority gate (RR-INV-01). TRUE blocks downstream layers until user signs the canonical Intent + ConstraintSet bytes." .
|
|
88
|
+
|
|
89
|
+
apres:userConfirmedAt a owl:DatatypeProperty ;
|
|
90
|
+
rdfs:domain apres:ResolutionReceipt ;
|
|
91
|
+
rdfs:range xsd:dateTime ;
|
|
92
|
+
rdfs:label "userConfirmedAt" .
|
|
93
|
+
|
|
94
|
+
apres:policyVersion a owl:DatatypeProperty ;
|
|
95
|
+
rdfs:domain apres:ResolutionReceipt ;
|
|
96
|
+
rdfs:range xsd:string ;
|
|
97
|
+
rdfs:label "policyVersion" ;
|
|
98
|
+
rdfs:comment "Hash of the resolver policy at resolution time. Audit replay." .
|
|
99
|
+
|
|
100
|
+
apres:hasPolicyCheck a owl:ObjectProperty ;
|
|
101
|
+
rdfs:domain apres:ResolutionReceipt ;
|
|
102
|
+
rdfs:range apres:PolicyCheckResult ;
|
|
103
|
+
rdfs:label "hasPolicyCheck" .
|
|
104
|
+
|
|
105
|
+
apres:hasToolCall a owl:ObjectProperty ;
|
|
106
|
+
rdfs:domain apres:ResolutionReceipt ;
|
|
107
|
+
rdfs:range apres:ToolCallTrace ;
|
|
108
|
+
rdfs:label "hasToolCall" .
|
package/tbox/skills.ttl
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# T-box — generic skills substrate (spec 251). Class + property definitions for the
|
|
2
|
+
# definition-vs-claim model. The DEFINITION is a public on-chain anchor
|
|
3
|
+
# (SkillDefinitionRegistry); the CLAIM is an off-chain vault credential pointing to a
|
|
4
|
+
# definition. NEUTRAL substrate — no domain/faith vocabulary.
|
|
5
|
+
|
|
6
|
+
@prefix aps: <https://agenticprimitives.dev/ns/skill#> .
|
|
7
|
+
@prefix ap: <https://agenticprimitives.dev/ns/core#> .
|
|
8
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
9
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
10
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
11
|
+
|
|
12
|
+
aps:Skill a rdfs:Class ;
|
|
13
|
+
rdfs:label "Skill" ;
|
|
14
|
+
rdfs:comment "A versioned, PUBLIC, generic capability definition. Anchored on chain by SkillDefinitionRegistry (id, version, steward, kind, conceptHash, ontologyMerkleRoot, metadataURI, validity)." .
|
|
15
|
+
|
|
16
|
+
aps:SkillClaim a rdfs:Class ;
|
|
17
|
+
rdfs:label "SkillClaim" ;
|
|
18
|
+
rdfs:comment "An OFF-CHAIN verifiable credential asserting a subject Smart Agent's relation to an aps:Skill (pinned definitionId+version). Lives in the subject's private vault; never an on-chain row." .
|
|
19
|
+
|
|
20
|
+
aps:definitionId a rdf:Property ; rdfs:domain aps:SkillClaim ; rdfs:range aps:Skill ;
|
|
21
|
+
rdfs:comment "The on-chain (skillId, version) this claim credential references." .
|
|
22
|
+
aps:hasSkillKind a rdf:Property ; rdfs:domain aps:Skill ;
|
|
23
|
+
rdfs:comment "An aps:skillKind value (C-box codelist; on-chain-bound)." .
|
|
24
|
+
aps:claimSubject a rdf:Property ; rdfs:domain aps:SkillClaim ; rdfs:range ap:CanonicalAgentId ;
|
|
25
|
+
rdfs:comment "The subject Smart Agent (Address) the claim is about." .
|
|
26
|
+
aps:claimIssuer a rdf:Property ; rdfs:domain aps:SkillClaim ; rdfs:range ap:CanonicalAgentId .
|
|
27
|
+
aps:claimRelation a rdf:Property ; rdfs:domain aps:SkillClaim ;
|
|
28
|
+
rdfs:comment "An aps:skillRelation value (C-box codelist)." .
|
|
29
|
+
aps:claimVisibilityMode a rdf:Property ; rdfs:domain aps:SkillClaim ;
|
|
30
|
+
rdfs:comment "An aps:claimVisibility value (C-box codelist)." .
|