@agenticprimitives/ontology 1.0.0-alpha.22 → 1.0.0-alpha.23

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 (74) hide show
  1. package/README.md +11 -0
  2. package/cbox/card-projection-shapes.shacl.ttl +216 -0
  3. package/cbox/controlled-vocabularies.ttl +172 -4
  4. package/cbox/naming-registry-shapes.shacl.ttl +272 -0
  5. package/cbox/org-team-shapes.shacl.ttl +184 -0
  6. package/cbox/registry-vocabulary.ttl +86 -0
  7. package/cbox/run-provenance-shapes.shacl.ttl +172 -0
  8. package/context.jsonld +7 -1
  9. package/dist/arg-types.d.ts +60 -0
  10. package/dist/arg-types.d.ts.map +1 -0
  11. package/dist/arg-types.js +143 -0
  12. package/dist/arg-types.js.map +1 -0
  13. package/dist/artifacts.d.ts +4 -2
  14. package/dist/artifacts.d.ts.map +1 -1
  15. package/dist/artifacts.js +22 -0
  16. package/dist/artifacts.js.map +1 -1
  17. package/dist/contact-fields.d.ts +28 -0
  18. package/dist/contact-fields.d.ts.map +1 -0
  19. package/dist/contact-fields.js +38 -0
  20. package/dist/contact-fields.js.map +1 -0
  21. package/dist/decisions.d.ts +69 -0
  22. package/dist/decisions.d.ts.map +1 -0
  23. package/dist/decisions.js +98 -0
  24. package/dist/decisions.js.map +1 -0
  25. package/dist/household.d.ts +19 -0
  26. package/dist/household.d.ts.map +1 -0
  27. package/dist/household.js +41 -0
  28. package/dist/household.js.map +1 -0
  29. package/dist/index.d.ts +230 -0
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +275 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/party-roles.d.ts +106 -0
  34. package/dist/party-roles.d.ts.map +1 -0
  35. package/dist/party-roles.js +305 -0
  36. package/dist/party-roles.js.map +1 -0
  37. package/dist/plan-shapes.d.ts +18 -0
  38. package/dist/plan-shapes.d.ts.map +1 -0
  39. package/dist/plan-shapes.js +38 -0
  40. package/dist/plan-shapes.js.map +1 -0
  41. package/dist/relations.d.ts +44 -0
  42. package/dist/relations.d.ts.map +1 -0
  43. package/dist/relations.js +104 -0
  44. package/dist/relations.js.map +1 -0
  45. package/dist/run-provenance-context.d.ts +211 -0
  46. package/dist/run-provenance-context.d.ts.map +1 -0
  47. package/dist/run-provenance-context.js +219 -0
  48. package/dist/run-provenance-context.js.map +1 -0
  49. package/dist/vault-records.d.ts +74 -0
  50. package/dist/vault-records.d.ts.map +1 -0
  51. package/dist/vault-records.js +330 -0
  52. package/dist/vault-records.js.map +1 -0
  53. package/mappings/agent-discovery-standards.ttl +24 -3
  54. package/mappings/collaboration-crosswalk-organization.ttl +22 -0
  55. package/mappings/collaboration-crosswalk-skills.ttl +5 -0
  56. package/package.json +4 -2
  57. package/run-provenance.jsonld +106 -0
  58. package/tbox/actor-context.ttl +11 -0
  59. package/tbox/agent-resolution.ttl +6 -6
  60. package/tbox/card-projection.ttl +350 -0
  61. package/tbox/contact.ttl +61 -0
  62. package/tbox/context.ttl +114 -0
  63. package/tbox/coordination.ttl +17 -0
  64. package/tbox/core.ttl +232 -12
  65. package/tbox/execution.ttl +168 -0
  66. package/tbox/household.ttl +142 -0
  67. package/tbox/interaction.ttl +13 -0
  68. package/tbox/naming.ttl +114 -0
  69. package/tbox/org.ttl +188 -4
  70. package/tbox/profile.ttl +7 -0
  71. package/tbox/prov-imports.ttl +65 -0
  72. package/tbox/registry.ttl +159 -4
  73. package/tbox/skills.ttl +62 -0
  74. package/tbox/values.ttl +81 -0
@@ -0,0 +1,330 @@
1
+ // WHAT A VAULT RECORD KEY MEANS — spec 356 W1.
2
+ //
3
+ // A person's Home lists their organization's vault faithfully and uselessly:
4
+ //
5
+ // coordination.endeavor:end_05b57d9e-… · updated 2026-09-04 03:38:02 show
6
+ // org.invite:agent:0x8c5cddca… · updated 2026-09-04 00:16:11 show
7
+ //
8
+ // Every one of those keys IS something the T-box already has a class for — an Endeavor, an invitation, a
9
+ // roster. Nothing said which was which, so the only reader that could interpret a vault was a person who
10
+ // already knew the codebase, and every new question about vault data meant a new hand-written tool with
11
+ // its own gate (spec 356 §0).
12
+ //
13
+ // This is the missing sentence, and it is DATA bound BY IRI (spec 355 §1) rather than a switch statement:
14
+ // the class must exist in the T-box or `check:ontology-bindings` fails the build. The code may not invent
15
+ // domain vocabulary.
16
+ //
17
+ // WHAT THIS IS NOT: it is not permission. Knowing that `directory.data` holds a roster says nothing about
18
+ // who may read it — the delegation decides that, per subject, per record (spec 277, ADR-0041). A binding
19
+ // narrows what a question CAN MEAN; it never widens what an asker may see.
20
+ // Namespaces inlined rather than imported from ./index — index re-exports this file, so reading NS back
21
+ // would hit it in TDZ (the same cycle `party-roles.ts` and `grounded-vocabulary.ts` document).
22
+ import { CONTACT_PROFILE_PROPERTIES } from './contact-fields.js';
23
+ const APORG = 'https://agenticprimitives.dev/ns/org#';
24
+ const APCOORD = 'https://agenticprimitives.dev/ns/coordination#';
25
+ const APFUL = 'https://agenticprimitives.dev/ns/fulfillment#';
26
+ const APMSG = 'https://agenticprimitives.dev/ns/messaging#';
27
+ const APAR = 'https://agenticprimitives.dev/ns/agent-resolution#';
28
+ const APS = 'https://agenticprimitives.dev/ns/skill#';
29
+ const APROF = 'https://agenticprimitives.dev/ns/profile#';
30
+ const AP = 'https://agenticprimitives.dev/ns/core#';
31
+ const APCTX = 'https://agenticprimitives.dev/ns/context#';
32
+ const APIX = 'https://agenticprimitives.dev/ns/interaction#';
33
+ const APHH = 'https://agenticprimitives.dev/ns/household#';
34
+ const APCON = 'https://agenticprimitives.dev/ns/contact#';
35
+ const APEXEC = 'https://agenticprimitives.dev/ns/execution#';
36
+ const APACTOR = 'https://agenticprimitives.dev/ns/actor#';
37
+ const APVR = 'https://agenticprimitives.dev/ns/verification-receipt#';
38
+ const PROV = 'http://www.w3.org/ns/prov#';
39
+ const PPLAN = 'http://purl.org/net/p-plan#';
40
+ const EPPLAN = 'https://w3id.org/ep-plan#';
41
+ /**
42
+ * The record kinds this substrate stores, each bound to what it IS.
43
+ *
44
+ * Deliberately not exhaustive over every key a vault may hold: an unbound key is UNCLASSIFIED, which is an
45
+ * honest state and the one that keeps this table from becoming a place to invent meanings. A question over
46
+ * an unbound kind is refused by name (spec 356 §2.3), never answered from a guess.
47
+ */
48
+ export const VAULT_RECORD_BINDINGS = [
49
+ // ── Coordination (spec 332/334) ───────────────────────────────────────────────────────────────
50
+ // The events stream is matched BEFORE the endeavor itself: `coordination.endeavor:events:<id>` also
51
+ // starts with `coordination.endeavor:`, and the first match wins.
52
+ // An endeavor's event log: a projection OVER an Endeavor, not a class of its own. The T-box declares no
53
+ // EndeavorEvent, and inventing one so a binding compiles is the exact drift this gate exists to stop —
54
+ // it was here until the check started reading record bindings. You ask about endeavors; the log is how
55
+ // one of them got where it is.
56
+ { match: { prefix: 'coordination.endeavor:events:' }, class: `${APCOORD}Endeavor`, label: 'endeavor history', plural: 'endeavor history', ownedBy: 'either', role: 'index' },
57
+ { match: { prefix: 'coordination.endeavor:' }, class: `${APCOORD}Endeavor`, label: 'endeavor', plural: 'endeavors', ownedBy: 'either' },
58
+ { match: { exact: 'coordination.requests' }, class: `${APCOORD}EndeavorRequest`, label: 'request for work', plural: 'requests for work', ownedBy: 'either' },
59
+ // ── The parties' own evidence of a transfer (spec 360) ────────────────────────────────────────
60
+ // A payment's StepReceipt is AUTHORITY evidence and lives in the audit sink. This is the different
61
+ // artifact the two PARTIES hold: what Alice can point at to say she paid, and what tells Bob he was
62
+ // paid, to which treasury, in what amount. Keyed by the transaction, because that is the one identifier
63
+ // both sides can check against the chain rather than take on trust.
64
+ { match: { prefix: 'payment.receipt:' }, class: `${APIX}PaymentReceipt`, label: 'payment receipt', plural: 'payment receipts', ownedBy: 'either',
65
+ properties: {
66
+ payer: `${APIX}receiptPayer`,
67
+ payee: `${APIX}receiptPayee`,
68
+ asset: `${APIX}receiptAsset`,
69
+ amount: `${APIX}receiptAmount`,
70
+ txHash: `${APIX}receiptTx`,
71
+ },
72
+ },
73
+ // ── Organization membership (spec 324, ADR-0025) ──────────────────────────────────────────────
74
+ // The ROSTER an organization keeps of its own members. This is the record `organization.membership.list`
75
+ // reads today through its own hand-written invoker — W4 retires that in favour of this binding.
76
+ { match: { exact: 'directory.data' }, class: `${APORG}DirectoryListing`, label: 'member listing', plural: 'member listings', ownedBy: 'organization' },
77
+ { match: { prefix: 'org.invite:agent:' }, class: `${APORG}MembershipInvitation`, label: 'membership invitation', plural: 'membership invitations', ownedBy: 'organization' },
78
+ { match: { exact: 'org.applications' }, class: `${APORG}MembershipApplication`, label: 'membership application', plural: 'membership applications', ownedBy: 'organization' },
79
+ // THE MEMBERSHIP ITSELF — spec 325's shape, in the organization's own vault. Distinct from the
80
+ // invitation, which the T-box files under "Enrollment instruments (NOT membership)": an invitation is
81
+ // how somebody came to be admitted, and satisfying one creates nothing. The membership is the record
82
+ // that they ARE admitted, carrying the role assignment and the delegation that materialises it.
83
+ //
84
+ // Keyed `org.membership:member:<address>` — inside the `vault:org.membership:*` scope the DO grant
85
+ // already carries, and clear of `org.membership:local-names`, which is a name map and not a member.
86
+ {
87
+ match: { prefix: 'org.membership:member:' }, class: `${APORG}OrganizationMembership`,
88
+ label: 'member', plural: 'members', ownedBy: 'organization',
89
+ // Spec 325's shape, field for field — this is what "readable by the ontology" looks like in practice.
90
+ properties: {
91
+ memberAgent: `${APORG}memberAgent`,
92
+ organizationAgent: `${APORG}organizationAgent`,
93
+ roleAssignment: `${APORG}hasRoleAssignment`,
94
+ 'roleAssignment.assignedRole': `${APORG}assignedRole`,
95
+ 'roleAssignment.materializedByDelegation': `${APORG}materializedByDelegation`,
96
+ },
97
+ },
98
+ // THE PERSON'S OWN CONTACT RECORD (spec 371 §2.2) — the private one of the three records that answer to
99
+ // "profile". Its fields are the ONE list in `contact-fields.ts`; the map here is derived from it, so an
100
+ // Ask that can change a name can change a street address, and the record's write allow-list agrees.
101
+ {
102
+ match: { exact: 'impact-profile' }, class: `${APCON}ContactProfile`,
103
+ label: 'contact profile', plural: 'contact profiles', ownedBy: 'person',
104
+ properties: { ...CONTACT_PROFILE_PROPERTIES, 'contact.location.precision': `${APCON}locationPrecision` },
105
+ },
106
+ // A PERSON's own record of who they are connected to — private, a vault credential and never an
107
+ // on-chain edge (ADR-0025). This is what answers "what organizations am I associated with".
108
+ {
109
+ // WHO THEY LIVE WITH, as they record it (spec 363 W4). PRIVATE TIER by construction: it is not on
110
+ // chain, not derivable from chain state, and may never reach the discovery KB (ADR-0040). One record
111
+ // per person holding their own household — not a shared roster, because two people's records can
112
+ // disagree and the honest model says whose you are reading.
113
+ match: { exact: 'household.data' }, class: `${APHH}Household`,
114
+ label: 'household', plural: 'household', ownedBy: 'person',
115
+ properties: {
116
+ 'members[].agent': `${APHH}householdMember`,
117
+ 'members[].role': `${APHH}householdRole`,
118
+ 'members[].kin': `${APHH}kinRelation`,
119
+ },
120
+ },
121
+ { match: { exact: 'relationships.data' }, class: `${APORG}OrganizationMembership`, label: 'organization you belong to', plural: 'organizations you belong to', ownedBy: 'person',
122
+ // The map is KEYED by the organization — the thing a reader most often gets wrong here.
123
+ properties: {
124
+ 'orgs{}': `${APORG}organizationAgent`,
125
+ 'orgs{}.orgName': `${APORG}localLabel`,
126
+ 'orgs{}.delegations[]': `${APORG}materializedByDelegation`,
127
+ },
128
+ },
129
+ // ── Content (spec 347 / the field artifacts) ──────────────────────────────────────────────────
130
+ { match: { prefix: 'content.artifact.' }, class: `${APFUL}Artifact`, label: 'artifact', plural: 'artifacts', ownedBy: 'either',
131
+ properties: {
132
+ 'kind': `${APFUL}artifactKind`,
133
+ 'commitment': `${APFUL}bodyHash`,
134
+ },
135
+ },
136
+ // ── Conversation (spec 313/316) ───────────────────────────────────────────────────────────────
137
+ // A message BODY is the content of one message; a topic is the conversation it sits in.
138
+ { match: { prefix: 'message.body:' }, class: `${APFUL}Message`, label: 'message', plural: 'messages', ownedBy: 'either' },
139
+ { match: { prefix: 'conversation.topic:' }, class: `${APMSG}DiscussionTopic`, label: 'discussion', plural: 'discussions', ownedBy: 'either' },
140
+ // ── Resolution (spec 338) ─────────────────────────────────────────────────────────────────────
141
+ { match: { exact: 'resolution.grants' }, class: `${APAR}PrivateResolutionGrant`, label: 'way to reach someone', plural: 'ways to reach people', ownedBy: 'either',
142
+ // The held record names WHOSE agent it opens; the address itself comes from the resolver, per use.
143
+ properties: {
144
+ 'grants[].owner': `${APAR}permitsDiscoveryOf`,
145
+ },
146
+ },
147
+ { match: { exact: 'resolution.requests' }, class: `${APAR}AgentConnectionInvitation`, label: 'request for a way to reach an agent', plural: 'requests for a way to reach an agent', ownedBy: 'either' },
148
+ // ── What an agent IS and CAN DO ───────────────────────────────────────────────────────────────
149
+ { match: { exact: 'capabilities.data' }, class: `${APS}CapabilityCatalog`, label: 'capability', plural: 'capabilities', ownedBy: 'either',
150
+ // The record is the catalogue; each ENTRY is a claim, so its fields map to SkillClaim's properties.
151
+ properties: {
152
+ '[].relation': `${APS}claimRelation`,
153
+ '[].label': `${APS}semanticType`,
154
+ },
155
+ },
156
+ { match: { exact: 'skills.data' }, class: `${APS}SkillClaim`, label: 'skill claim', plural: 'skill claims', ownedBy: 'either',
157
+ properties: {
158
+ '[].definitionId': `${APS}definitionId`,
159
+ '[].subject': `${APS}claimSubject`,
160
+ '[].issuer': `${APS}claimIssuer`,
161
+ '[].relation': `${APS}claimRelation`,
162
+ },
163
+ },
164
+ { match: { exact: 'impact-profile' }, class: `${APROF}AgentProfile`, label: 'profile', plural: 'profile', ownedBy: 'either',
165
+ // Observed records carry only `contact`, which the T-box has no property for — see the coverage ledger.
166
+ properties: {
167
+ 'displayName': `${APROF}displayName`,
168
+ 'description': `${APROF}description`,
169
+ },
170
+ },
171
+ // An index over the artifacts, not a thing beside them.
172
+ { match: { exact: 'content.catalog' }, class: `${APFUL}Artifact`, label: 'content index', plural: 'content index', ownedBy: 'either', role: 'index' },
173
+ // ── The card studio (spec 347) ────────────────────────────────────────────────────────────────
174
+ { match: { prefix: 'agent-cards:' }, class: `${AP}A2AAgentCard`, label: 'agent card', plural: 'agent cards', ownedBy: 'either' },
175
+ // ── The playbook an agent runs under (spec 354) ───────────────────────────────────────────────
176
+ {
177
+ match: { exact: 'archetype.assignment' }, class: `${APS}ArchetypeAssignment`,
178
+ label: 'playbook', plural: 'playbook', ownedBy: 'either',
179
+ properties: {
180
+ archetypeId: `${APS}assignedArchetype`,
181
+ definitionDigest: `${APS}definitionDigest`,
182
+ },
183
+ },
184
+ // ── Run provenance (spec 381) — the durable half of a run's record, in the ACTING agent's vault ──
185
+ // One activity per step: what ran, under which authority, what receipt it left (by digest). Never the
186
+ // arguments, results or words — those are the task object's rebuildable copy (ADR-0055).
187
+ // Spec 389 — the record IS the graph: a JSON-LD document whose top-level node is the run's
188
+ // ep-plan:ExecutionTraceBundle and whose `graph` holds the run, its steps, what they used and what they
189
+ // generated. The field names are the context's terms (`run-provenance.jsonld`), so every field below is
190
+ // the same IRI the context maps it to — bound twice on purpose, checked once by the build.
191
+ {
192
+ match: { prefix: 'run.provenance:' }, class: `${EPPLAN}ExecutionTraceBundle`,
193
+ label: 'run provenance', plural: 'run provenances', ownedBy: 'either',
194
+ properties: {
195
+ wasAttributedTo: `${PROV}wasAttributedTo`,
196
+ wasInformedBy: `${PROV}wasInformedBy`,
197
+ hasTraceElement: `${EPPLAN}hasTraceElement`,
198
+ 'graph[].startedAtTime': `${PROV}startedAtTime`,
199
+ 'graph[].endedAtTime': `${PROV}endedAtTime`,
200
+ 'graph[].endedAt': `${APEXEC}endedAt`,
201
+ 'graph[].wasAssociatedWith': `${PROV}wasAssociatedWith`,
202
+ 'graph[].actedOnBehalfOf': `${PROV}actedOnBehalfOf`,
203
+ 'graph[].used': `${PROV}used`,
204
+ 'graph[].usedDelegation': `${APVR}usedDelegation`,
205
+ 'graph[].generated': `${PROV}generated`,
206
+ 'graph[].wasGeneratedBy': `${PROV}wasGeneratedBy`,
207
+ 'graph[].wasInformedBy': `${PROV}wasInformedBy`,
208
+ 'graph[].wasAttributedTo': `${PROV}wasAttributedTo`,
209
+ 'graph[].correspondsToStep': `${PPLAN}correspondsToStep`,
210
+ 'graph[].isStepOfPlan': `${PPLAN}isStepOfPlan`,
211
+ 'graph[].isPrecededBy': `${PPLAN}isPrecededBy`,
212
+ 'graph[].hasStep': `${APEXEC}hasStep`,
213
+ 'graph[].runRef': `${APEXEC}runRef`,
214
+ 'graph[].intentDigest': `${APEXEC}intentDigest`,
215
+ 'graph[].completionState': `${APEXEC}completionState`,
216
+ 'graph[].receiptDigest': `${APEXEC}receiptDigest`,
217
+ 'graph[].usedPlanContentHash': `${APEXEC}usedPlanContentHash`,
218
+ 'graph[].realizesCapability': `${APEXEC}realizesCapability`,
219
+ 'graph[].authorityDecision': `${APEXEC}authorityDecision`,
220
+ 'graph[].afterApproval': `${APEXEC}afterApproval`,
221
+ 'graph[].chainDigest': `${APEXEC}chainDigest`,
222
+ 'graph[].accountabilityRoot': `${APEXEC}accountabilityRoot`,
223
+ 'graph[].actorContext': `${APEXEC}actorContext`,
224
+ 'graph[].delegatedToAgent': `${APEXEC}delegatedToAgent`,
225
+ 'graph[].errorClass': `${APEXEC}errorClass`,
226
+ 'graph[].traceId': `${APEXEC}traceId`,
227
+ 'graph[].spanId': `${APEXEC}spanId`,
228
+ 'graph[].effectProduces': `${APEXEC}effectProduces`,
229
+ 'graph[].effectSucceeded': `${APEXEC}effectSucceeded`,
230
+ 'graph[].decisionPoint': `${APEXEC}decisionPoint`,
231
+ 'graph[].decisionRule': `${APEXEC}decisionRule`,
232
+ 'graph[].artifactBytes': `${APEXEC}artifactBytes`,
233
+ 'graph[].artifactDigest': `${APEXEC}artifactDigest`,
234
+ 'graph[].actingAgent': `${APACTOR}actingAgent`,
235
+ 'graph[].originatingAgent': `${APACTOR}originatingAgent`,
236
+ 'graph[].rootPrincipal': `${APACTOR}rootPrincipal`,
237
+ 'graph[].qualifiedAssociation[].hadPlan': `${PROV}hadPlan`,
238
+ 'graph[].qualifiedAssociation[].hadRole': `${PROV}hadRole`,
239
+ 'graph[].qualifiedAssociation[].agent': `${PROV}agent`,
240
+ },
241
+ },
242
+ // ── Run artifacts (spec 391) — a step's raw result, too large for the run's record, in the ACTING agent's vault ──
243
+ // The body a resume or a person fetches under the agent's grant; the receipt's outputDigest commits to it.
244
+ {
245
+ match: { prefix: 'run.artifact:' }, class: `${APEXEC}RunArtifact`,
246
+ label: 'run artifact', plural: 'run artifacts', ownedBy: 'either',
247
+ properties: {
248
+ digest: `${APEXEC}artifactDigest`,
249
+ bytes: `${APEXEC}artifactBytes`,
250
+ },
251
+ },
252
+ // ── Conversation memory (spec 370 P7) — what the agent RESOLVED for the owner lately, in their vault ──
253
+ {
254
+ match: { exact: 'conversation.recent' }, class: `${APCTX}ConversationMemory`,
255
+ label: 'recent conversation', plural: 'recent conversations', ownedBy: 'person',
256
+ properties: {
257
+ 'turns[].at': `${APCTX}recalledAt`,
258
+ 'turns[].parties[].agent': `${APCTX}recalledParty`,
259
+ 'turns[].parties[].raw': `${APCTX}recalledWords`,
260
+ },
261
+ },
262
+ // ── Learned memory (spec 358 W5) — what the owner TOLD the agent, in their own vault ────────────
263
+ {
264
+ match: { prefix: 'preference:' }, class: `${APCTX}LearnedPreference`,
265
+ label: 'thing you told me', plural: 'things you told me', ownedBy: 'person',
266
+ properties: {
267
+ subject: `${APCTX}preferenceSubject`,
268
+ trigger: `${APCTX}preferenceTrigger`,
269
+ learnedAt: `${APCTX}learnedAt`,
270
+ },
271
+ },
272
+ // ── Confirmation memory (spec 385; bound here by spec 394) — which "David" the owner chose, per scope ──
273
+ {
274
+ match: { exact: 'confirmation.preferences' }, class: `${APCTX}ConfirmationMemory`,
275
+ label: 'remembered choice', plural: 'remembered choices', ownedBy: 'person',
276
+ properties: {
277
+ 'entries[].agent': `${APCTX}confirmedParty`,
278
+ 'entries[].word': `${APCTX}confirmedWords`,
279
+ 'entries[].capability': `${APCTX}confirmedFor`,
280
+ },
281
+ },
282
+ // ── Standing instructions (spec 394) — the owner's declared defaults, per room ──────────────────
283
+ {
284
+ match: { exact: 'standing.instructions' }, class: `${APCTX}StandingInstruction`,
285
+ label: 'standing instruction', plural: 'standing instructions', ownedBy: 'person',
286
+ properties: {
287
+ 'entries[].capability': `${APCTX}instructionCapability`,
288
+ 'entries[].arg': `${APCTX}instructionArgument`,
289
+ 'entries[].value': `${APCTX}instructionValue`,
290
+ 'entries[].context': `${APCTX}instructionContext`,
291
+ 'entries[].at': `${APCTX}declaredAt`,
292
+ },
293
+ },
294
+ // ── PROJECTIONS, not things (role: 'index') ───────────────────────────────────────────────────
295
+ // Listed so that "not askable" is a DECISION on the record rather than an absence in this table. A
296
+ // question answered from an index is a question answered from a cache.
297
+ { match: { exact: 'conversation.index' }, class: `${APMSG}Conversation`, label: 'conversation index', plural: 'conversation index', ownedBy: 'either', role: 'index' },
298
+ { match: { exact: 'coordination.index' }, class: `${APCOORD}Endeavor`, label: 'endeavor index', plural: 'endeavor index', ownedBy: 'either', role: 'index' },
299
+ { match: { exact: 'inbox.data' }, class: `${APMSG}Conversation`, label: 'inbox', plural: 'inbox', ownedBy: 'either', role: 'index' },
300
+ { match: { exact: 'org.membership:local-names' }, class: `${APORG}OrganizationMembership`, label: 'local name map', plural: 'local name map', ownedBy: 'organization', role: 'index' },
301
+ ];
302
+ /** What this record key IS, or `undefined` when nothing binds it. Longest match first, so a family and the
303
+ * narrower family inside it (`…endeavor:` and `…endeavor:events:`) cannot be confused for one another. */
304
+ export function bindingForRecordType(recordType) {
305
+ const key = recordType.trim();
306
+ const exact = VAULT_RECORD_BINDINGS.find((b) => b.match.exact === key);
307
+ if (exact)
308
+ return exact;
309
+ return [...VAULT_RECORD_BINDINGS]
310
+ .filter((b) => b.match.prefix && key.startsWith(b.match.prefix))
311
+ .sort((a, b) => (b.match.prefix.length - a.match.prefix.length))[0];
312
+ }
313
+ /** The kinds a question may be ASKED about — label → class. The askable set is this, never the model's. */
314
+ export function askableRecordKinds() {
315
+ const seen = new Set();
316
+ const out = [];
317
+ for (const b of VAULT_RECORD_BINDINGS) {
318
+ // An index is not a thing to ask about — see `VaultRecordRole`.
319
+ if ((b.role ?? 'entity') !== 'entity' || seen.has(b.class))
320
+ continue;
321
+ seen.add(b.class);
322
+ out.push({ label: b.label, plural: b.plural, class: b.class });
323
+ }
324
+ return out;
325
+ }
326
+ /** Every record type bound to this class — what a query over a kind must actually read. */
327
+ export function recordTypesForClass(classIri) {
328
+ return VAULT_RECORD_BINDINGS.filter((b) => b.class === classIri);
329
+ }
330
+ //# sourceMappingURL=vault-records.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-records.js","sourceRoot":"","sources":["../src/vault-records.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,EAAE;AACF,6EAA6E;AAC7E,EAAE;AACF,8EAA8E;AAC9E,+EAA+E;AAC/E,EAAE;AACF,yGAAyG;AACzG,yGAAyG;AACzG,wGAAwG;AACxG,8BAA8B;AAC9B,EAAE;AACF,0GAA0G;AAC1G,0GAA0G;AAC1G,qBAAqB;AACrB,EAAE;AACF,0GAA0G;AAC1G,yGAAyG;AACzG,2EAA2E;AAE3E,wGAAwG;AACxG,+FAA+F;AAC/F,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,MAAM,KAAK,GAAG,uCAAuC,CAAC;AACtD,MAAM,OAAO,GAAG,gDAAgD,CAAC;AACjE,MAAM,KAAK,GAAG,+CAA+C,CAAC;AAC9D,MAAM,KAAK,GAAG,6CAA6C,CAAC;AAC5D,MAAM,IAAI,GAAG,oDAAoD,CAAC;AAClE,MAAM,GAAG,GAAG,yCAAyC,CAAC;AACtD,MAAM,KAAK,GAAG,2CAA2C,CAAC;AAC1D,MAAM,EAAE,GAAG,wCAAwC,CAAC;AACpD,MAAM,KAAK,GAAG,2CAA2C,CAAC;AAC1D,MAAM,IAAI,GAAG,+CAA+C,CAAC;AAC7D,MAAM,IAAI,GAAG,6CAA6C,CAAC;AAC3D,MAAM,KAAK,GAAG,2CAA2C,CAAC;AAC1D,MAAM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CAAC;AACnE,CAAC"}
@@ -18,6 +18,8 @@
18
18
  @prefix hcs14: <https://hol.org/standards/hcs-14#> .
19
19
  @prefix hcs26: <https://hol.org/standards/hcs-26#> .
20
20
  @prefix oasf: <https://schema.oasf.outshift.com/#> .
21
+ @prefix ard: <https://agenticresourcediscovery.org/ns#> .
22
+ @prefix acp: <https://agentclientprotocol.com/registry/v1#> .
21
23
  @prefix ae: <https://github.com/agentictrustlabs/agent-explorer/tree/main/apps/ontology/ontology#> .
22
24
  @prefix dul: <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#> .
23
25
  @prefix prov: <http://www.w3.org/ns/prov#> .
@@ -38,8 +40,10 @@ ap:Agent rdfs:seeAlso ae:core ;
38
40
 
39
41
  # ─── PROV-O agent taxonomy ────────────────────────────────────────────
40
42
  # Declare the PROV-O agent classes + hierarchy (so the KB shows prov:Agent → Person/Organization/
41
- # SoftwareAgent), and GROUND the AP agent kinds onto them: ap:Agent ⊑ prov:Agent; PersonAgent ⊑ prov:Person;
42
- # OrganizationAgent ⊑ prov:Organization; ServiceAgent ⊑ prov:SoftwareAgent (PROV-O's software/application agent).
43
+ # SoftwareAgent). The root alignment itself now lives IN tbox/core.ttl (spec 346 §11; ADR-0061):
44
+ # PersonAgent ⊑ prov:Person; OrganizationAgent ⊑ prov:Organization; ApplicationAgent ⊑ prov:SoftwareAgent
45
+ # (the root the wire value 'service' names), with ServiceAgent ⊑ ApplicationAgent. The axioms below are
46
+ # restated so a KB that loads only the mappings still shows the grounding; they add nothing core does not.
43
47
  prov:Agent a owl:Class ; rdfs:label "Agent" .
44
48
  prov:Person a owl:Class ; rdfs:subClassOf prov:Agent ; rdfs:label "Person" .
45
49
  prov:Organization a owl:Class ; rdfs:subClassOf prov:Agent ; rdfs:label "Organization" .
@@ -48,7 +52,8 @@ prov:SoftwareAgent a owl:Class ; rdfs:subClassOf prov:Agent ; rdfs:label "Softwa
48
52
  ap:Agent rdfs:subClassOf prov:Agent .
49
53
  ap:PersonAgent rdfs:subClassOf prov:Person .
50
54
  ap:OrganizationAgent rdfs:subClassOf prov:Organization .
51
- ap:ServiceAgent rdfs:subClassOf prov:SoftwareAgent .
55
+ ap:ApplicationAgent rdfs:subClassOf prov:SoftwareAgent .
56
+ ap:ServiceAgent rdfs:subClassOf ap:ApplicationAgent .
52
57
 
53
58
  apreg:RegistryEntry rdfs:seeAlso ae:discovery, ae:erc8004, ae:hol ;
54
59
  skos:closeMatch erc8004:IdentityRegistry ;
@@ -104,3 +109,19 @@ apdisc:EvidencePath rdfs:subClassOf prov:Entity, dul:InformationObject .
104
109
  apreg:RegistryEntryBindingProof rdfs:subClassOf prov:Entity, dul:InformationObject .
105
110
  apreg:RegistryMembershipPolicy rdfs:subClassOf dul:Description .
106
111
  apdisc:TrustPolicy rdfs:subClassOf dul:Description .
112
+
113
+ # ─── Agentic Resource Discovery (ARD v0.91) + ACP registry — spec 347 §8.5, docs/architecture/ard-acp-crosswalk.md ──
114
+ # ARD is an artifact-agnostic discovery ENVELOPE; its terms are close matches to ours, never replacements. The
115
+ # `urn:air:` identifier is a discovery handle (ap:Agent's canonical id stays the Smart Agent address); ARD `score`
116
+ # is relevance only and MUST NOT be read as trust — the same separation apdisc:TrustDetermination already enforces.
117
+ apreg:RegistryEntry skos:closeMatch ard:Entry .
118
+ ap:Agent rdfs:seeAlso ard:identifier .
119
+ approf:displayName skos:closeMatch ard:displayName .
120
+ approf:description skos:closeMatch ard:description .
121
+ aps:CapabilityDefinition rdfs:seeAlso ard:capabilities .
122
+ apdisc:MatchCandidate rdfs:seeAlso ard:score ;
123
+ rdfs:comment "ARD `score` (0–100) is semantic relevance only; apdisc:hasTrustDetermination is the SEPARATE trust signal — never blended into an ARD score." .
124
+ apdisc:TrustDetermination rdfs:seeAlso ard:trustManifest .
125
+ apreg:RegistryEntry rdfs:seeAlso acp:Agent ;
126
+ rdfs:comment "An ACP registry entry is an aggregate projection over admitted entries whose canonical profile declares approf:distribution with acp:true (spec 347 §8.5)." .
127
+ approf:distribution rdfs:seeAlso acp:distribution .
@@ -1,5 +1,6 @@
1
1
  # Collaboration crosswalk — organization + enrollment (spec 325 §4.2).
2
2
 
3
+ @prefix ap: <https://agenticprimitives.dev/ns/core#> .
3
4
  @prefix aporg: <https://agenticprimitives.dev/ns/org#> .
4
5
  @prefix apsit: <https://agenticprimitives.dev/ns/situation#> .
5
6
  @prefix apdel: <https://agenticprimitives.dev/ns/delegation#> .
@@ -8,6 +9,8 @@
8
9
  @prefix as: <https://www.w3.org/ns/activitystreams#> .
9
10
  @prefix dul: <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#> .
10
11
  @prefix gufo: <https://w3id.org/vocab/gufo#> .
12
+ @prefix foaf: <http://xmlns.com/foaf/0.1/> .
13
+ @prefix at: <https://agentictrustlabs.dev/ns/agentic-trust#> .
11
14
  @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
12
15
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
13
16
 
@@ -42,3 +45,22 @@ aporg:MembershipInvitation skos:closeMatch as:Invite .
42
45
  aporg:MembershipApplication skos:closeMatch as:Join .
43
46
  aporg:EnrollmentDecision skos:closeMatch as:Accept, as:Reject .
44
47
  aporg:MembershipTermination skos:closeMatch as:Leave, as:Remove .
48
+
49
+ # ─── Team affiliation + workspace (spec 344 §4.5) ────────────────────────
50
+ # closeMatch only (ADR-0049). `at:` is the agentic-trust upper ontology's covenant-governed sharing
51
+ # cluster; a seeAlso precedent, never an imported superclass.
52
+ ap:TeamAgent skos:closeMatch org:OrganizationalUnit ;
53
+ rdfs:comment """A unit only under a sole 'chartered' affiliation; jointly-chartered or independent
54
+ teams are org:FormalOrganization like any other.""" .
55
+ ap:AllianceAgent skos:closeMatch org:FormalOrganization ; rdfs:seeAlso org:linkedTo .
56
+ aporg:charteredBy skos:closeMatch org:unitOf , org:subOrganizationOf .
57
+ aporg:engagedWith skos:closeMatch org:linkedTo .
58
+ aporg:TeamAffiliation rdfs:seeAlso dul:Situation , gufo:Relator .
59
+ aporg:WorkingGroup skos:closeMatch foaf:Group .
60
+ aporg:WorkspaceRepresentation rdfs:seeAlso at:DataProjection ;
61
+ rdfs:comment """The at: cluster is the covenant-governed sharing precedent: DataCovenant (terms) →
62
+ DataProjection (the released view) → DataSubscription (the receivers). eng:ProjectionManifest
63
+ is the decision-record refinement.""" .
64
+ aporg:AffiliationProposal skos:closeMatch as:Offer .
65
+ aporg:AffiliationDecision skos:closeMatch as:Accept , as:Reject .
66
+ aporg:AffiliationTermination skos:closeMatch as:Leave , as:Remove .
@@ -43,3 +43,8 @@ aps:IntentCapabilityMatch skos:closeMatch wsmo:Mediator ;
43
43
  aps:IntentSkillMatch rdfs:subClassOf aps:IntentCapabilityMatch ; owl:deprecated true .
44
44
 
45
45
  apint:InvokeSkillIntent rdfs:seeAlso aps:CapabilityDefinition .
46
+
47
+ # ─── Taxonomy mapping (spec 347 §5) — the reified aps:SkillTaxonomyMapping stands for ONE SKOS
48
+ # mapping triple; `relation` names which. AP ids stay canonical; OASF / HCS-14 taxa are targets.
49
+ aps:SkillTaxonomyMapping rdfs:seeAlso skos:exactMatch, skos:closeMatch, skos:broadMatch, skos:narrowMatch ;
50
+ rdfs:comment "SkillTaxonomyMappingV1.relation: exact→skos:exactMatch, close→skos:closeMatch, broad→skos:broadMatch, narrow→skos:narrowMatch. Version-pinned; a taxonomy version change is review-required." .
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticprimitives/ontology",
3
- "version": "1.0.0-alpha.22",
3
+ "version": "1.0.0-alpha.23",
4
4
  "description": "Monorepo-wide formal vocabulary (RDFS/OWL T-box + SHACL/SKOS C-box + A-box fixtures) for agentic primitives. Off-chain source of truth the on-chain ontology (ADR-0009) instantiates. Ships TTL/JSON-LD artifacts + typed IRI constants.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -29,6 +29,7 @@
29
29
  "LICENSE",
30
30
  "dist",
31
31
  "context.jsonld",
32
+ "run-provenance.jsonld",
32
33
  "tbox",
33
34
  "cbox",
34
35
  "abox",
@@ -41,7 +42,8 @@
41
42
  "devDependencies": {
42
43
  "vitest": "^4.1.8",
43
44
  "@zazuko/env-node": "^2.1.1",
44
- "shacl-engine": "^1.1.2"
45
+ "shacl-engine": "^1.1.2",
46
+ "@agenticprimitives/provenance": "0.0.0-alpha.2"
45
47
  },
46
48
  "keywords": [
47
49
  "ontology",
@@ -0,0 +1,106 @@
1
+ {
2
+ "@context": {
3
+ "@version": 1.1,
4
+ "@base": "urn:ap:prov:",
5
+ "prov": "http://www.w3.org/ns/prov#",
6
+ "p-plan": "http://purl.org/net/p-plan#",
7
+ "ep-plan": "https://w3id.org/ep-plan#",
8
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
9
+ "ap": "https://agenticprimitives.dev/ns/core#",
10
+ "apexec": "https://agenticprimitives.dev/ns/execution#",
11
+ "apactor": "https://agenticprimitives.dev/ns/actor#",
12
+ "apguide": "https://agenticprimitives.dev/ns/guidance#",
13
+ "apdel": "https://agenticprimitives.dev/ns/delegation#",
14
+ "apvr": "https://agenticprimitives.dev/ns/verification-receipt#",
15
+ "apcoord": "https://agenticprimitives.dev/ns/coordination#",
16
+ "apix": "https://agenticprimitives.dev/ns/interaction#",
17
+
18
+ "id": "@id",
19
+ "type": "@type",
20
+ "graph": "@graph",
21
+
22
+ "startedAtTime": { "@id": "prov:startedAtTime", "@type": "xsd:dateTime" },
23
+ "endedAtTime": { "@id": "prov:endedAtTime", "@type": "xsd:dateTime" },
24
+ "endedAt": { "@id": "apexec:endedAt", "@type": "xsd:dateTime" },
25
+ "wasAssociatedWith": { "@id": "prov:wasAssociatedWith", "@type": "@id" },
26
+ "actedOnBehalfOf": { "@id": "prov:actedOnBehalfOf", "@type": "@id" },
27
+ "wasAttributedTo": { "@id": "prov:wasAttributedTo", "@type": "@id" },
28
+ "used": { "@id": "prov:used", "@type": "@id", "@container": "@set" },
29
+ "usedDelegation": { "@id": "apvr:usedDelegation", "@type": "@id" },
30
+ "generated": { "@id": "prov:generated", "@type": "@id", "@container": "@set" },
31
+ "wasGeneratedBy": { "@id": "prov:wasGeneratedBy", "@type": "@id" },
32
+ "wasInformedBy": { "@id": "prov:wasInformedBy", "@type": "@id", "@container": "@set" },
33
+ "wasDerivedFrom": { "@id": "prov:wasDerivedFrom", "@type": "@id", "@container": "@set" },
34
+ "wasRevisionOf": { "@id": "prov:wasRevisionOf", "@type": "@id" },
35
+ "qualifiedAssociation": { "@id": "prov:qualifiedAssociation", "@container": "@set" },
36
+ "agent": { "@id": "prov:agent", "@type": "@id" },
37
+ "hadPlan": { "@id": "prov:hadPlan", "@type": "@id" },
38
+ "hadRole": { "@id": "prov:hadRole", "@type": "@id" },
39
+ "hasTraceElement": { "@id": "ep-plan:hasTraceElement", "@type": "@id", "@container": "@set" },
40
+ "isStepOfPlan": { "@id": "p-plan:isStepOfPlan", "@type": "@id" },
41
+ "isPrecededBy": { "@id": "p-plan:isPrecededBy", "@type": "@id" },
42
+ "correspondsToStep": { "@id": "p-plan:correspondsToStep", "@type": "@id" },
43
+ "isDecomposedAsPlan": { "@id": "ep-plan:isDecomposedAsPlan", "@type": "@id" },
44
+
45
+ "hasStep": { "@id": "apexec:hasStep", "@type": "@id", "@container": "@set" },
46
+ "runRef": "apexec:runRef",
47
+ "intentDigest": "apexec:intentDigest",
48
+ "completionState": { "@id": "apexec:completionState", "@type": "@vocab" },
49
+ "receiptDigest": "apexec:receiptDigest",
50
+ "usedPlanContentHash": "apexec:usedPlanContentHash",
51
+ "realizesCapability": { "@id": "apexec:realizesCapability", "@type": "@id" },
52
+ "authorityDecision": "apexec:authorityDecision",
53
+ "afterApproval": { "@id": "apexec:afterApproval", "@type": "xsd:boolean" },
54
+ "chainDigest": "apexec:chainDigest",
55
+ "accountabilityRoot": { "@id": "apexec:accountabilityRoot", "@type": "@id" },
56
+ "actorContext": { "@id": "apexec:actorContext", "@type": "@id" },
57
+ "delegatedToAgent": { "@id": "apexec:delegatedToAgent", "@type": "@id" },
58
+ "errorClass": "apexec:errorClass",
59
+ "traceId": "apexec:traceId",
60
+ "spanId": "apexec:spanId",
61
+ "effectProduces": "apexec:effectProduces",
62
+ "effectSucceeded": { "@id": "apexec:effectSucceeded", "@type": "xsd:boolean" },
63
+ "decisionPoint": "apexec:decisionPoint",
64
+ "decisionRule": "apexec:decisionRule",
65
+ "artifactBytes": { "@id": "apexec:artifactBytes", "@type": "xsd:integer" },
66
+ "artifactDigest": "apexec:artifactDigest",
67
+ "actingAgent": { "@id": "apactor:actingAgent", "@type": "@id" },
68
+ "originatingAgent": { "@id": "apactor:originatingAgent", "@type": "@id" },
69
+ "rootPrincipal": { "@id": "apactor:rootPrincipal", "@type": "@id" },
70
+
71
+ "Agent": "ap:Agent",
72
+ "SoftwareAgent": "prov:SoftwareAgent",
73
+ "Person": "prov:Person",
74
+ "Organization": "prov:Organization",
75
+ "AgentRuntime": "apexec:AgentRuntime",
76
+ "Activity": "prov:Activity",
77
+ "Entity": "prov:Entity",
78
+ "Plan": "p-plan:Plan",
79
+ "Step": "p-plan:Step",
80
+ "Bundle": "prov:Bundle",
81
+ "Association": "prov:Association",
82
+ "ExecutionTraceBundle": "ep-plan:ExecutionTraceBundle",
83
+ "FailedActivity": "ep-plan:FailedActivity",
84
+ "ServiceExecution": "apexec:ServiceExecution",
85
+ "SkillExecution": "apexec:SkillExecution",
86
+ "ExecutionPlan": "apexec:ExecutionPlan",
87
+ "AgentSkillPackage": "apguide:AgentSkillPackage",
88
+ "Delegation": "apdel:Delegation",
89
+ "StepReceipt": "apexec:StepReceipt",
90
+ "ChainTransaction": "apexec:ChainTransaction",
91
+ "Effect": "apexec:Effect",
92
+ "DecisionRecord": "apexec:DecisionRecord",
93
+ "RunArtifact": "apexec:RunArtifact",
94
+ "ActorContext": "apactor:ActorContext",
95
+ "CommunicationDelivery": "apix:CommunicationDelivery",
96
+ "IntentInvocation": "apix:IntentInvocation",
97
+ "OrchestratedTask": "apix:OrchestratedTask",
98
+ "CoordinationPlan": "apcoord:CoordinationPlan",
99
+ "PlanStep": "apcoord:PlanStep",
100
+ "Completed": "apexec:Completed",
101
+ "Failed": "apexec:Failed",
102
+ "Refused": "apexec:Refused",
103
+ "Skipped": "apexec:Skipped",
104
+ "Suspended": "apexec:Suspended"
105
+ }
106
+ }
@@ -9,6 +9,7 @@
9
9
  @prefix ap: <https://agenticprimitives.dev/ns/core#> .
10
10
  @prefix apsit: <https://agenticprimitives.dev/ns/situation#> .
11
11
  @prefix apdel: <https://agenticprimitives.dev/ns/delegation#> .
12
+ @prefix aporg: <https://agenticprimitives.dev/ns/org#> .
12
13
  @prefix prov: <http://www.w3.org/ns/prov#> .
13
14
  @prefix owl: <http://www.w3.org/2002/07/owl#> .
14
15
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@@ -132,3 +133,13 @@ apactor:executedByWorkload a owl:ObjectProperty ;
132
133
  rdfs:domain apactor:SubjectRef ; rdfs:range apactor:SubjectRef ;
133
134
  rdfs:label "executedByWorkload" ;
134
135
  rdfs:comment "SubjectBinding relationship: the operation was executed by the object workload on behalf of the subject agent." .
136
+
137
+ # ─── The Activities edge into the workspace plane (spec 344 §4.3) ──────────
138
+
139
+ apactor:withinWorkspace a owl:ObjectProperty ;
140
+ rdfs:domain apactor:ActorContext ; rdfs:range aporg:Workspace ;
141
+ rdfs:label "withinWorkspace" ;
142
+ rdfs:comment """The workspace this hop was performed within, when one applies. Joins the portable
143
+ authority chain (actingAgent / rootPrincipal / AuthorityChainEnvelope) to the coordination
144
+ plane — the review's WorkspaceContext realized ON spec 326, not beside it. Makes the
145
+ workspace an audit context: filtering acts by workspace becomes a query.""" .