@agenticprimitives/ontology 1.0.0-alpha.4 → 1.0.0-alpha.40

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 (183) hide show
  1. package/README.md +59 -21
  2. package/cbox/agent-facet-shapes.shacl.ttl +130 -0
  3. package/cbox/capability-catalog-shapes.shacl.ttl +284 -0
  4. package/cbox/card-projection-shapes.shacl.ttl +216 -0
  5. package/cbox/consultation-shapes.shacl.ttl +85 -0
  6. package/cbox/content-vocabulary.ttl +52 -0
  7. package/cbox/controlled-vocabularies.ttl +224 -4
  8. package/cbox/discovery-graph-shapes.shacl.ttl +284 -0
  9. package/cbox/familyoffice-shapes.shacl.ttl +92 -0
  10. package/cbox/familyoffice-vocabulary.ttl +48 -0
  11. package/cbox/geo-vocabulary.ttl +36 -0
  12. package/cbox/guidance-vocabulary.ttl +22 -0
  13. package/cbox/interaction-shapes.shacl.ttl +218 -0
  14. package/cbox/interaction-vocabulary.ttl +159 -0
  15. package/cbox/judgment-shapes.shacl.ttl +83 -0
  16. package/cbox/naming-registry-shapes.shacl.ttl +272 -0
  17. package/cbox/org-team-shapes.shacl.ttl +184 -0
  18. package/cbox/privacy-credential-shapes.shacl.ttl +187 -0
  19. package/cbox/profile-facet-vocabulary.ttl +50 -0
  20. package/cbox/registry-vocabulary.ttl +86 -0
  21. package/cbox/run-measures-shapes.shacl.ttl +59 -0
  22. package/cbox/run-provenance-shapes.shacl.ttl +264 -0
  23. package/cbox/scope-vocabulary.ttl +112 -0
  24. package/cbox/skill-grounding-vocabulary.ttl +18 -0
  25. package/cbox/skill-vocabulary.ttl +50 -0
  26. package/context.jsonld +37 -1
  27. package/dist/arg-types.d.ts +60 -0
  28. package/dist/arg-types.d.ts.map +1 -0
  29. package/dist/arg-types.js +143 -0
  30. package/dist/arg-types.js.map +1 -0
  31. package/dist/artifacts.d.ts +9 -2
  32. package/dist/artifacts.d.ts.map +1 -1
  33. package/dist/artifacts.js +153 -2
  34. package/dist/artifacts.js.map +1 -1
  35. package/dist/contact-fields.d.ts +28 -0
  36. package/dist/contact-fields.d.ts.map +1 -0
  37. package/dist/contact-fields.js +38 -0
  38. package/dist/contact-fields.js.map +1 -0
  39. package/dist/decisions.d.ts +69 -0
  40. package/dist/decisions.d.ts.map +1 -0
  41. package/dist/decisions.js +98 -0
  42. package/dist/decisions.js.map +1 -0
  43. package/dist/evaluation-context.d.ts +134 -0
  44. package/dist/evaluation-context.d.ts.map +1 -0
  45. package/dist/evaluation-context.js +136 -0
  46. package/dist/evaluation-context.js.map +1 -0
  47. package/dist/governance.d.ts +84 -0
  48. package/dist/governance.d.ts.map +1 -0
  49. package/dist/governance.js +88 -0
  50. package/dist/governance.js.map +1 -0
  51. package/dist/grounded-vocabulary.d.ts +29 -0
  52. package/dist/grounded-vocabulary.d.ts.map +1 -0
  53. package/dist/grounded-vocabulary.js +110 -0
  54. package/dist/grounded-vocabulary.js.map +1 -0
  55. package/dist/household.d.ts +19 -0
  56. package/dist/household.d.ts.map +1 -0
  57. package/dist/household.js +41 -0
  58. package/dist/household.js.map +1 -0
  59. package/dist/index.d.ts +1091 -3
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +1323 -5
  62. package/dist/index.js.map +1 -1
  63. package/dist/outcomes.d.ts +47 -0
  64. package/dist/outcomes.d.ts.map +1 -0
  65. package/dist/outcomes.js +40 -0
  66. package/dist/outcomes.js.map +1 -0
  67. package/dist/participant-vocabulary.d.ts +57 -0
  68. package/dist/participant-vocabulary.d.ts.map +1 -0
  69. package/dist/participant-vocabulary.js +66 -0
  70. package/dist/participant-vocabulary.js.map +1 -0
  71. package/dist/party-roles.d.ts +115 -0
  72. package/dist/party-roles.d.ts.map +1 -0
  73. package/dist/party-roles.js +343 -0
  74. package/dist/party-roles.js.map +1 -0
  75. package/dist/payload-classes.d.ts +22 -0
  76. package/dist/payload-classes.d.ts.map +1 -0
  77. package/dist/payload-classes.js +30 -0
  78. package/dist/payload-classes.js.map +1 -0
  79. package/dist/plan-shapes.d.ts +18 -0
  80. package/dist/plan-shapes.d.ts.map +1 -0
  81. package/dist/plan-shapes.js +38 -0
  82. package/dist/plan-shapes.js.map +1 -0
  83. package/dist/principles.generated.d.ts +11 -0
  84. package/dist/principles.generated.d.ts.map +1 -0
  85. package/dist/principles.generated.js +293 -0
  86. package/dist/principles.generated.js.map +1 -0
  87. package/dist/published-works.d.ts +13 -0
  88. package/dist/published-works.d.ts.map +1 -0
  89. package/dist/published-works.js +18 -0
  90. package/dist/published-works.js.map +1 -0
  91. package/dist/relations.d.ts +44 -0
  92. package/dist/relations.d.ts.map +1 -0
  93. package/dist/relations.js +104 -0
  94. package/dist/relations.js.map +1 -0
  95. package/dist/run-measures-context.d.ts +74 -0
  96. package/dist/run-measures-context.d.ts.map +1 -0
  97. package/dist/run-measures-context.js +77 -0
  98. package/dist/run-measures-context.js.map +1 -0
  99. package/dist/run-provenance-context.d.ts +315 -0
  100. package/dist/run-provenance-context.d.ts.map +1 -0
  101. package/dist/run-provenance-context.js +323 -0
  102. package/dist/run-provenance-context.js.map +1 -0
  103. package/dist/transitions.d.ts +42 -0
  104. package/dist/transitions.d.ts.map +1 -0
  105. package/dist/transitions.js +100 -0
  106. package/dist/transitions.js.map +1 -0
  107. package/dist/vault-records.d.ts +74 -0
  108. package/dist/vault-records.d.ts.map +1 -0
  109. package/dist/vault-records.js +777 -0
  110. package/dist/vault-records.js.map +1 -0
  111. package/dist/versions.generated.d.ts +262 -0
  112. package/dist/versions.generated.d.ts.map +1 -0
  113. package/dist/versions.generated.js +318 -0
  114. package/dist/versions.generated.js.map +1 -0
  115. package/evaluation.jsonld +133 -0
  116. package/mappings/actor-context-standards.ttl +89 -0
  117. package/mappings/agent-discovery-standards.ttl +127 -0
  118. package/mappings/collaboration-crosswalk-actors.ttl +30 -0
  119. package/mappings/collaboration-crosswalk-authority.ttl +31 -0
  120. package/mappings/collaboration-crosswalk-guidance.ttl +29 -0
  121. package/mappings/collaboration-crosswalk-intent.ttl +29 -0
  122. package/mappings/collaboration-crosswalk-messaging.ttl +37 -0
  123. package/mappings/collaboration-crosswalk-organization.ttl +66 -0
  124. package/mappings/collaboration-crosswalk-protocols.ttl +49 -0
  125. package/mappings/collaboration-crosswalk-skills.ttl +50 -0
  126. package/mappings/collaboration-profile.ttl +82 -0
  127. package/mappings/commerce-engagement-crosswalk.ttl +83 -0
  128. package/mappings/spine-standards.ttl +83 -0
  129. package/package.json +31 -9
  130. package/run-measures.jsonld +34 -0
  131. package/run-provenance.jsonld +314 -0
  132. package/tbox/actor-context.ttl +145 -0
  133. package/tbox/agent-resolution.ttl +308 -0
  134. package/tbox/agreement.ttl +77 -0
  135. package/tbox/attestation.ttl +156 -0
  136. package/tbox/card-projection.ttl +350 -0
  137. package/tbox/constraints.ttl +150 -0
  138. package/tbox/contact.ttl +61 -0
  139. package/tbox/content.ttl +76 -0
  140. package/tbox/context.ttl +508 -0
  141. package/tbox/coordination.ttl +263 -0
  142. package/tbox/core.ttl +325 -7
  143. package/tbox/dcat-imports.ttl +19 -0
  144. package/tbox/discovery.ttl +273 -0
  145. package/tbox/dqv-imports.ttl +29 -0
  146. package/tbox/earl-imports.ttl +32 -0
  147. package/tbox/engagement.ttl +349 -0
  148. package/tbox/entitlement.ttl +41 -0
  149. package/tbox/estate.ttl +78 -0
  150. package/tbox/evaluation.ttl +330 -0
  151. package/tbox/execution.ttl +720 -0
  152. package/tbox/familyoffice.ttl +87 -0
  153. package/tbox/fulfillment.ttl +140 -0
  154. package/tbox/geo.ttl +28 -0
  155. package/tbox/governance.ttl +67 -0
  156. package/tbox/guidance.ttl +40 -0
  157. package/tbox/household.ttl +142 -0
  158. package/tbox/identity.ttl +133 -6
  159. package/tbox/inference.ttl +177 -0
  160. package/tbox/intents.ttl +241 -0
  161. package/tbox/interaction.ttl +297 -0
  162. package/tbox/messaging.ttl +244 -0
  163. package/tbox/naming.ttl +114 -0
  164. package/tbox/org.ttl +410 -0
  165. package/tbox/payload.ttl +94 -0
  166. package/tbox/payment.ttl +124 -0
  167. package/tbox/plan.ttl +169 -0
  168. package/tbox/principles.ttl +212 -0
  169. package/tbox/privacy-credential.ttl +436 -0
  170. package/tbox/profile.ttl +107 -0
  171. package/tbox/prov-imports.ttl +73 -0
  172. package/tbox/registry.ttl +382 -0
  173. package/tbox/resolution.ttl +108 -0
  174. package/tbox/scope.ttl +59 -0
  175. package/tbox/security-exposure.ttl +102 -0
  176. package/tbox/situation.ttl +56 -0
  177. package/tbox/skills.ttl +316 -0
  178. package/tbox/skos-imports.ttl +54 -0
  179. package/tbox/transition.ttl +63 -0
  180. package/tbox/trust.ttl +210 -0
  181. package/tbox/values.ttl +81 -0
  182. package/tbox/verification-receipt.ttl +134 -0
  183. package/versions.adoption.json +173 -0
@@ -0,0 +1,50 @@
1
+ # C-box — skill controlled vocabularies (spec 251). Closed SKOS codelists for the
2
+ # generic skills substrate: skill KINDS (on-chain-bound), skill RELATIONS + VISIBILITY
3
+ # modes (used by the off-chain claim credential SDK).
4
+ #
5
+ # LOCKSTEP (ADR-0009): the on-chain `SkillDefinitionRegistry.KIND_*` constants equal
6
+ # keccak256(<the skillKind concept URI>) declared here. The lockstep gate
7
+ # (packages/ontology test) asserts this equality.
8
+ #
9
+ # NEUTRAL substrate — NO domain/faith vocabulary (spec 251 "People groups are excluded").
10
+ # A skill is a generic capability concept; the agent↔skill ASSOCIATION is an off-chain
11
+ # vault credential, never an on-chain row.
12
+
13
+ @prefix aps: <https://agenticprimitives.dev/ns/skill#> .
14
+ @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
15
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
16
+
17
+ # ─── skillKind — 3 values, ON-CHAIN-BOUND (SkillDefinitionRegistry.KIND_*) ──
18
+ aps:skillKind a skos:ConceptScheme ;
19
+ rdfs:label "skillKind" ;
20
+ rdfs:comment "The on-chain-bound skill-definition kind. keccak256 of each concept URI equals the matching SkillDefinitionRegistry.KIND_* constant (ADR-0009 lockstep)." ;
21
+ skos:hasTopConcept aps:Leaf, aps:Domain, aps:Custom .
22
+ aps:Leaf a skos:Concept ; skos:inScheme aps:skillKind ; skos:prefLabel "leaf" ;
23
+ rdfs:comment "A leaf skill in a controlled taxonomy (e.g. an OASF leaf)." .
24
+ aps:Domain a skos:Concept ; skos:inScheme aps:skillKind ; skos:prefLabel "domain" ;
25
+ rdfs:comment "A domain/grouping concept (a non-leaf category)." .
26
+ aps:Custom a skos:Concept ; skos:inScheme aps:skillKind ; skos:prefLabel "custom" ;
27
+ rdfs:comment "A steward-defined custom skill outside the controlled set." .
28
+
29
+ # ─── skillRelation — used by the OFF-CHAIN claim credential (not on chain) ──
30
+ aps:skillRelation a skos:ConceptScheme ;
31
+ rdfs:label "skillRelation" ;
32
+ rdfs:comment "Relation a claim credential asserts between a subject SA and a skill definition. Lives in the credential body (off chain); not an on-chain row." ;
33
+ skos:hasTopConcept aps:hasSkill, aps:practicesSkill, aps:certifiedIn, aps:endorsesSkill, aps:mentorsIn, aps:canTrainOthersIn .
34
+ aps:hasSkill a skos:Concept ; skos:inScheme aps:skillRelation ; skos:prefLabel "hasSkill" .
35
+ aps:practicesSkill a skos:Concept ; skos:inScheme aps:skillRelation ; skos:prefLabel "practicesSkill" .
36
+ aps:certifiedIn a skos:Concept ; skos:inScheme aps:skillRelation ; skos:prefLabel "certifiedIn" .
37
+ aps:endorsesSkill a skos:Concept ; skos:inScheme aps:skillRelation ; skos:prefLabel "endorsesSkill" .
38
+ aps:mentorsIn a skos:Concept ; skos:inScheme aps:skillRelation ; skos:prefLabel "mentorsIn" .
39
+ aps:canTrainOthersIn a skos:Concept ; skos:inScheme aps:skillRelation ; skos:prefLabel "canTrainOthersIn" .
40
+
41
+ # ─── claimVisibility — shared by skill + geo claim credentials ──────────────
42
+ aps:claimVisibility a skos:ConceptScheme ;
43
+ rdfs:label "claimVisibility" ;
44
+ rdfs:comment "Visibility mode of an off-chain skill/geo claim credential." ;
45
+ skos:hasTopConcept aps:Public, aps:PublicCoarse, aps:PrivateCommitment, aps:PrivateZk, aps:OffchainOnly .
46
+ aps:Public a skos:Concept ; skos:inScheme aps:claimVisibility ; skos:prefLabel "public" .
47
+ aps:PublicCoarse a skos:Concept ; skos:inScheme aps:claimVisibility ; skos:prefLabel "public-coarse" .
48
+ aps:PrivateCommitment a skos:Concept ; skos:inScheme aps:claimVisibility ; skos:prefLabel "private-commitment" .
49
+ aps:PrivateZk a skos:Concept ; skos:inScheme aps:claimVisibility ; skos:prefLabel "private-zk" .
50
+ aps:OffchainOnly a skos:Concept ; skos:inScheme aps:claimVisibility ; skos:prefLabel "offchain-only" .
package/context.jsonld CHANGED
@@ -9,6 +9,36 @@
9
9
  "apnam": "https://agenticprimitives.dev/ns/naming#",
10
10
  "aprel": "https://agenticprimitives.dev/ns/relationships#",
11
11
  "aporg": "https://agenticprimitives.dev/ns/org#",
12
+ "approf": "https://agenticprimitives.dev/ns/profile#",
13
+
14
+ "apint": "https://agenticprimitives.dev/ns/intent#",
15
+ "apcst": "https://agenticprimitives.dev/ns/constraint#",
16
+ "apres": "https://agenticprimitives.dev/ns/resolution#",
17
+ "apagr": "https://agenticprimitives.dev/ns/agreement#",
18
+ "appay": "https://agenticprimitives.dev/ns/payment#",
19
+ "apful": "https://agenticprimitives.dev/ns/fulfillment#",
20
+ "apatt": "https://agenticprimitives.dev/ns/attestation#",
21
+ "apvc": "https://agenticprimitives.dev/ns/verifiable-credential#",
22
+
23
+ "aps": "https://agenticprimitives.dev/ns/skill#",
24
+ "apg": "https://agenticprimitives.dev/ns/geo#",
25
+ "apcnt": "https://agenticprimitives.dev/ns/content#",
26
+ "apreg": "https://agenticprimitives.dev/ns/registry#",
27
+ "apdisc": "https://agenticprimitives.dev/ns/discovery#",
28
+ "apsec": "https://agenticprimitives.dev/ns/security-exposure#",
29
+ "aptrust": "https://agenticprimitives.dev/ns/trust#",
30
+ "apvr": "https://agenticprimitives.dev/ns/verification-receipt#",
31
+ "apscope": "https://agenticprimitives.dev/ns/scope#",
32
+ "apmsg": "https://agenticprimitives.dev/ns/messaging#",
33
+ "apsit": "https://agenticprimitives.dev/ns/situation#",
34
+ "apfo": "https://agenticprimitives.dev/ns/familyoffice#",
35
+ "apent": "https://agenticprimitives.dev/ns/entitlement#",
36
+ "apix": "https://agenticprimitives.dev/ns/interaction#",
37
+ "apexec": "https://agenticprimitives.dev/ns/execution#",
38
+ "apactor": "https://agenticprimitives.dev/ns/actor#",
39
+ "apguide": "https://agenticprimitives.dev/ns/guidance#",
40
+ "apcoord": "https://agenticprimitives.dev/ns/coordination#",
41
+ "appc": "https://agenticprimitives.dev/ns/privacy-credential#",
12
42
 
13
43
  "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
14
44
  "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
@@ -16,6 +46,12 @@
16
46
  "xsd": "http://www.w3.org/2001/XMLSchema#",
17
47
  "sh": "http://www.w3.org/ns/shacl#",
18
48
  "skos": "http://www.w3.org/2004/02/skos/core#",
19
- "prov": "http://www.w3.org/ns/prov#"
49
+ "prov": "http://www.w3.org/ns/prov#",
50
+ "p-plan": "http://purl.org/net/p-plan#",
51
+ "ep-plan": "https://w3id.org/ep-plan#",
52
+ "dul": "http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#",
53
+ "vf": "https://w3id.org/valueflows#",
54
+ "ufo-c": "http://purl.org/nemo/ufo-c#",
55
+ "w3cvc": "https://www.w3.org/2018/credentials#"
20
56
  }
21
57
  }
@@ -0,0 +1,60 @@
1
+ import { type ClassIri } from './party-roles.js';
2
+ export type ValueTypeName = 'Amount' | 'Asset' | 'EmailAddress' | 'DisplayLabel' | 'Flag' | 'AgentKind';
3
+ /** The T-box term each type names. Checked by `check:ontology-bindings` like every other binding. */
4
+ export declare const VALUE_TYPE_TERM: Readonly<Record<ValueTypeName, ClassIri>>;
5
+ export interface ArgTypeBindingV1 {
6
+ /** The capability whose argument this is (ADR-0051 id). */
7
+ capability: string;
8
+ /** The argument name, as the tool declares it. */
9
+ arg: string;
10
+ type: ValueTypeName;
11
+ /** What to call it when asking a person for it. */
12
+ word: string;
13
+ /** A hint that says how to answer, in the person's terms. */
14
+ hint?: string;
15
+ }
16
+ /**
17
+ * Every non-party argument, and what it is.
18
+ *
19
+ * PARTY ARGUMENTS ARE NOT HERE — they are in `PARTY_ROLES`, which answers a different question (which
20
+ * CLASS of agent may fill it, and which relation to follow to get there). One argument, one table.
21
+ */
22
+ export declare const ARG_TYPES: readonly ArgTypeBindingV1[];
23
+ /** The type bound to one capability's argument, or undefined — undefined means "not a value we read", and
24
+ * the argument passes through untouched, which is how every unbound argument behaved before this existed. */
25
+ export declare function argType(capability: string, arg: string): ArgTypeBindingV1 | undefined;
26
+ /** The value bindings of one capability — what a normaliser loops over. */
27
+ export declare function argTypesFor(capability: string): readonly ArgTypeBindingV1[];
28
+ export type ValueRead = {
29
+ ok: true;
30
+ value: string;
31
+ }
32
+ /** `said` is what the person or planner wrote, kept VERBATIM so a question can name it back. */
33
+ | {
34
+ ok: false;
35
+ said: string;
36
+ because: string;
37
+ };
38
+ /**
39
+ * Read one value of a declared type. TOTAL: it never throws and never guesses; an unreadable value comes
40
+ * back with the words that could not be read and a reason a person can act on.
41
+ */
42
+ export declare function readValue(type: ValueTypeName, raw: unknown, opts?: {
43
+ assets?: readonly string[];
44
+ }): ValueRead;
45
+ /**
46
+ * IS THIS FLAG TRUE — the one reader for a yes/no, wherever it is read.
47
+ *
48
+ * `readValue('Flag', …)` canonicalises to the STRING "true"/"false", because every value a reader
49
+ * returns is a string and an argument that changed type on the way through would be worse. Consumers
50
+ * then have to parse it, and one of them compared to the BOOLEAN instead: `remove: true` arrived as
51
+ * `"true"`, the check failed, and asking to remove somebody from a household silently re-added them.
52
+ * One helper, so that comparison is written once.
53
+ */
54
+ export declare function isFlagTrue(v: unknown): boolean;
55
+ /** The kinds an `AgentKind` argument may be, for a surface that offers them rather than a box. */
56
+ export declare function agentKindChoices(): Array<{
57
+ value: string;
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AAG,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAkD7G;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAI9C;AAED,kGAAkG;AAClG,wBAAgB,gBAAgB,IAAI,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAE1E"}
@@ -0,0 +1,143 @@
1
+ // WHAT AN ARGUMENT IS, AND HOW IT IS READ — spec 363 W2.
2
+ //
3
+ // `PARTY_ROLES` says what an argument's PARTY may be. This says what the rest of them ARE, and gives each
4
+ // type exactly ONE reader — so a person's phrasing is understood identically in the normaliser, the
5
+ // invoker and the form, and a refusal always names what it could not read.
6
+ //
7
+ // THE THREE INCIDENTS THIS TABLE EXISTS FOR, all in one week and all the same shape:
8
+ // · `amount: "20"` for "20 USDC" — a planner writing a REPRESENTATION it had no basis to compute.
9
+ // 0.00002 dollars moved, under a mandate every gate approved.
10
+ // · "10 usdc" answered to "how much?" and silently dropped, because one branch wanted bare digits.
11
+ // · `wants ?? 'treasury'` — a kind with no declared value set, defaulting to the only one the code
12
+ // knew, so a team invitation asked somebody for a way to reach their treasury.
13
+ //
14
+ // A READER NEVER GUESSES. It returns the canonical value, or a refusal carrying the words it could not
15
+ // read — which is what lets a question be asked ONCE more with the reason, rather than identically
16
+ // forever.
17
+ import { CLASS_FOR_SUFFIX } from './party-roles.js';
18
+ const AP_VAL_NS = 'https://agenticprimitives.dev/ns/value#';
19
+ const VAL = (local) => `${AP_VAL_NS}${local}`;
20
+ /** The T-box term each type names. Checked by `check:ontology-bindings` like every other binding. */
21
+ export const VALUE_TYPE_TERM = {
22
+ Amount: VAL('Amount'),
23
+ Asset: VAL('Asset'),
24
+ EmailAddress: VAL('EmailAddress'),
25
+ DisplayLabel: VAL('DisplayLabel'),
26
+ Flag: VAL('Flag'),
27
+ AgentKind: VAL('AgentKind'),
28
+ };
29
+ /**
30
+ * Every non-party argument, and what it is.
31
+ *
32
+ * PARTY ARGUMENTS ARE NOT HERE — they are in `PARTY_ROLES`, which answers a different question (which
33
+ * CLASS of agent may fill it, and which relation to follow to get there). One argument, one table.
34
+ */
35
+ export const ARG_TYPES = [
36
+ { capability: 'treasury.payment.execute', arg: 'usdc', type: 'Amount', word: 'how much', hint: 'in whole USDC — "20", "12.50"' },
37
+ { capability: 'treasury.fund', arg: 'usdc', type: 'Amount', word: 'how much', hint: 'in whole USDC — "20", "12.50"' },
38
+ // `asset` IS NOT BOUND, deliberately. On a single-token deployment it is pinned from configuration and
39
+ // nobody — planner or person — may write it, so reading it would mean validating a value no caller
40
+ // supplies and, worse, ASKING about one: "which token?" is a question with exactly one answer that the
41
+ // system already knows. The `Asset` type stays declared for a deployment with a real choice to offer.
42
+ // THE ONE THAT SENT A TREASURY REQUEST TO SOMEBODY BEING INVITED TO A TEAM. A kind, with a declared
43
+ // value set and no default: not said ⇒ asked.
44
+ { capability: 'resolution.invitation.request', arg: 'wants', type: 'AgentKind', word: 'what you need', hint: 'a treasury (to send money), an organization, a team, or another agent of theirs' },
45
+ { capability: 'profile.contact.update', arg: 'email', type: 'EmailAddress', word: 'email', hint: 'in full, like name@example.org' },
46
+ { capability: 'profile.contact.update', arg: 'firstName', type: 'DisplayLabel', word: 'first name' },
47
+ { capability: 'profile.contact.update', arg: 'lastName', type: 'DisplayLabel', word: 'last name' },
48
+ { capability: 'household.member.record', arg: 'label', type: 'DisplayLabel', word: 'what you call them' },
49
+ { capability: 'household.member.record', arg: 'remove', type: 'Flag', word: 'remove them' },
50
+ { capability: 'treasury.primary.declare', arg: 'on', type: 'Flag', word: 'set it' },
51
+ ];
52
+ /** The type bound to one capability's argument, or undefined — undefined means "not a value we read", and
53
+ * the argument passes through untouched, which is how every unbound argument behaved before this existed. */
54
+ export function argType(capability, arg) {
55
+ return ARG_TYPES.find((b) => b.capability === capability && b.arg === arg);
56
+ }
57
+ /** The value bindings of one capability — what a normaliser loops over. */
58
+ export function argTypesFor(capability) {
59
+ return ARG_TYPES.filter((b) => b.capability === capability);
60
+ }
61
+ /** A placeholder is an omission, not a value — the planner's, and never quoted back at a person. */
62
+ const PLACEHOLDER = /^<.*>$|^(unknown|tbd|n\/a|none|null|undefined|todo|xxx+)$/i;
63
+ /** Control characters, by code point: a label is shown to people, and these are not shown to anyone. */
64
+ const CONTROL_CHARS = new RegExp('[\\u0000-\\u001f\\u007f]', 'g');
65
+ /**
66
+ * Read one value of a declared type. TOTAL: it never throws and never guesses; an unreadable value comes
67
+ * back with the words that could not be read and a reason a person can act on.
68
+ */
69
+ export function readValue(type, raw, opts) {
70
+ const said = String(raw ?? '').trim();
71
+ if (!said || PLACEHOLDER.test(said))
72
+ return { ok: false, said: PLACEHOLDER.test(said) ? '' : said, because: 'nothing was given' };
73
+ switch (type) {
74
+ case 'Amount': {
75
+ // A currency word or symbol beside a figure adds no information a single-asset deployment does not
76
+ // already have; a thousands comma is punctuation. "10,50" stays unreadable rather than guessed at —
77
+ // a decimal comma and a thousands comma are the same character and only the person knows which.
78
+ const v = said.toLowerCase()
79
+ .replace(/^[$€£]/, '')
80
+ .replace(/\b(usdc|usd|dollars?|bucks?)\b/g, '')
81
+ .replace(/(\d),(?=\d{3}\b)/g, '$1')
82
+ .replace(/\s+/g, '');
83
+ return /^\d+(\.\d+)?$/.test(v)
84
+ ? { ok: true, value: v }
85
+ : { ok: false, said, because: 'that is not a figure I can read' };
86
+ }
87
+ case 'Asset': {
88
+ if (/^0x[0-9a-fA-F]{40}$/.test(said))
89
+ return { ok: true, value: said.toLowerCase() };
90
+ const known = (opts?.assets ?? []).map((a) => a.toLowerCase());
91
+ const sym = said.toLowerCase();
92
+ // A SYMBOL IS NOT AN ADDRESS. Only what this deployment configures resolves; a remembered address
93
+ // for another chain is well-formed and wrong, which is the failure that started this.
94
+ return known.includes(sym)
95
+ ? { ok: true, value: sym }
96
+ : { ok: false, said, because: 'this deployment does not have a token by that name' };
97
+ }
98
+ case 'EmailAddress':
99
+ return /^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(said)
100
+ ? { ok: true, value: said }
101
+ : { ok: false, said, because: 'that is not an email address' };
102
+ case 'DisplayLabel': {
103
+ const clean = said.replace(CONTROL_CHARS, '').trim().slice(0, 120);
104
+ return clean ? { ok: true, value: clean } : { ok: false, said, because: 'that is not a name I can show' };
105
+ }
106
+ case 'Flag': {
107
+ const v = said.toLowerCase();
108
+ if (['true', 'yes', 'on', '1'].includes(v))
109
+ return { ok: true, value: 'true' };
110
+ if (['false', 'no', 'off', '0'].includes(v))
111
+ return { ok: true, value: 'false' };
112
+ return { ok: false, said, because: 'that is not a yes or a no' };
113
+ }
114
+ case 'AgentKind': {
115
+ const v = said.toLowerCase().replace(/^(a|an|the)\s+/, '').replace(/^their\s+/, '').trim();
116
+ // The vocabulary is the DERIVED AGENT TYPES (ADR-0061) — the same suffixes the naming service mints
117
+ // and `CLASS_FOR_SUFFIX` binds, never a second list that could disagree with them.
118
+ const suffixes = Object.keys(CLASS_FOR_SUFFIX);
119
+ const hit = suffixes.find((sfx) => sfx === v || `${sfx}s` === v || v.endsWith(` ${sfx}`));
120
+ return hit ? { ok: true, value: hit } : { ok: false, said, because: 'that is not a kind of agent I know' };
121
+ }
122
+ }
123
+ }
124
+ /**
125
+ * IS THIS FLAG TRUE — the one reader for a yes/no, wherever it is read.
126
+ *
127
+ * `readValue('Flag', …)` canonicalises to the STRING "true"/"false", because every value a reader
128
+ * returns is a string and an argument that changed type on the way through would be worse. Consumers
129
+ * then have to parse it, and one of them compared to the BOOLEAN instead: `remove: true` arrived as
130
+ * `"true"`, the check failed, and asking to remove somebody from a household silently re-added them.
131
+ * One helper, so that comparison is written once.
132
+ */
133
+ export function isFlagTrue(v) {
134
+ if (v === true)
135
+ return true;
136
+ const read = readValue('Flag', v);
137
+ return read.ok && read.value === 'true';
138
+ }
139
+ /** The kinds an `AgentKind` argument may be, for a surface that offers them rather than a box. */
140
+ export function agentKindChoices() {
141
+ return Object.keys(CLASS_FOR_SUFFIX).map((sfx) => ({ value: sfx, label: sfx }));
142
+ }
143
+ //# sourceMappingURL=arg-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arg-types.js","sourceRoot":"","sources":["../src/arg-types.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,EAAE;AACF,0GAA0G;AAC1G,oGAAoG;AACpG,2EAA2E;AAC3E,EAAE;AACF,qFAAqF;AACrF,oGAAoG;AACpG,kEAAkE;AAClE,qGAAqG;AACrG,qGAAqG;AACrG,mFAAmF;AACnF,EAAE;AACF,uGAAuG;AACvG,mGAAmG;AACnG,WAAW;AACX,OAAO,EAAE,gBAAgB,EAAiB,MAAM,kBAAkB,CAAC;AAEnE,MAAM,SAAS,GAAG,yCAAyC,CAAC;AAC5D,MAAM,GAAG,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,GAAG,SAAS,GAAG,KAAK,EAAE,CAAC;AAI9D,qGAAqG;AACrG,MAAM,CAAC,MAAM,eAAe,GAA8C;IACxE,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC;IACrB,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,YAAY,EAAE,GAAG,CAAC,cAAc,CAAC;IACjC,YAAY,EAAE,GAAG,CAAC,cAAc,CAAC;IACjC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC;IACjB,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC;CAC5B,CAAC;AAcF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAgC;IACpD,EAAE,UAAU,EAAE,0BAA0B,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,+BAA+B,EAAE;IAEhI,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,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IAAI,EAAE,OAAO,EAAE,oCAAoC,EAAE,CAAC;QAC7G,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,CAAU;IACnC,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC5B,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAClC,OAAO,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC;AAC1C,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,gBAAgB;IAC9B,OAAO,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;AAClF,CAAC"}
@@ -5,8 +5,15 @@
5
5
  */
6
6
  export declare const ARTIFACTS: {
7
7
  readonly context: "context.jsonld";
8
- readonly tbox: readonly ["tbox/core.ttl", "tbox/identity.ttl"];
9
- readonly cbox: readonly ["cbox/canonical-agent-id-shape.shacl.ttl", "cbox/controlled-vocabularies.ttl"];
8
+ /** Spec 389 — the JSON-LD context a run's provenance record (`run.provenance:<runRef>`) is written under. */
9
+ readonly runProvenanceContext: "run-provenance.jsonld";
10
+ /** Spec 414 A2 — the JSON-LD context a run's measurements (`run.measures:<runRef>`) are written under. */
11
+ readonly runMeasuresContext: "run-measures.jsonld";
12
+ /** Spec 415 S0/SEL-1 — replay sets (DCAT) and judgments (EARL). */
13
+ readonly evaluationContext: "evaluation.jsonld";
14
+ readonly tbox: readonly ["tbox/core.ttl", "tbox/identity.ttl", "tbox/contact.ttl", "tbox/naming.ttl", "tbox/intents.ttl", "tbox/constraints.ttl", "tbox/resolution.ttl", "tbox/agreement.ttl", "tbox/payment.ttl", "tbox/fulfillment.ttl", "tbox/attestation.ttl", "tbox/skills.ttl", "tbox/geo.ttl", "tbox/content.ttl", "tbox/registry.ttl", "tbox/discovery.ttl", "tbox/trust.ttl", "tbox/security-exposure.ttl", "tbox/agent-resolution.ttl", "tbox/verification-receipt.ttl", "tbox/scope.ttl", "tbox/situation.ttl", "tbox/org.ttl", "tbox/familyoffice.ttl", "tbox/entitlement.ttl", "tbox/interaction.ttl", "tbox/messaging.ttl", "tbox/guidance.ttl", "tbox/actor-context.ttl", "tbox/context.ttl", "tbox/profile.ttl", "tbox/execution.ttl", "tbox/plan.ttl", "tbox/prov-imports.ttl", "tbox/skos-imports.ttl", "tbox/dqv-imports.ttl", "tbox/earl-imports.ttl", "tbox/dcat-imports.ttl", "tbox/evaluation.ttl", "tbox/coordination.ttl", "tbox/engagement.ttl", "tbox/card-projection.ttl", "tbox/estate.ttl", "tbox/privacy-credential.ttl"];
15
+ readonly cbox: readonly ["cbox/canonical-agent-id-shape.shacl.ttl", "cbox/controlled-vocabularies.ttl", "cbox/registry-vocabulary.ttl", "cbox/skill-vocabulary.ttl", "cbox/geo-vocabulary.ttl", "cbox/scope-vocabulary.ttl", "cbox/content-vocabulary.ttl", "cbox/discovery-graph-shapes.shacl.ttl", "cbox/interaction-vocabulary.ttl", "cbox/familyoffice-vocabulary.ttl", "cbox/familyoffice-shapes.shacl.ttl", "cbox/privacy-credential-shapes.shacl.ttl", "cbox/consultation-shapes.shacl.ttl", "cbox/interaction-shapes.shacl.ttl", "cbox/skill-grounding-vocabulary.ttl", "cbox/guidance-vocabulary.ttl", "cbox/profile-facet-vocabulary.ttl", "cbox/agent-facet-shapes.shacl.ttl", "cbox/capability-catalog-shapes.shacl.ttl", "cbox/org-team-shapes.shacl.ttl", "cbox/naming-registry-shapes.shacl.ttl", "cbox/run-provenance-shapes.shacl.ttl", "cbox/run-measures-shapes.shacl.ttl", "cbox/judgment-shapes.shacl.ttl", "cbox/card-projection-shapes.shacl.ttl"];
16
+ readonly mappings: readonly ["mappings/spine-standards.ttl", "mappings/agent-discovery-standards.ttl", "mappings/collaboration-profile.ttl", "mappings/collaboration-crosswalk-actors.ttl", "mappings/collaboration-crosswalk-organization.ttl", "mappings/collaboration-crosswalk-messaging.ttl", "mappings/collaboration-crosswalk-intent.ttl", "mappings/collaboration-crosswalk-skills.ttl", "mappings/collaboration-crosswalk-authority.ttl", "mappings/collaboration-crosswalk-protocols.ttl", "mappings/collaboration-crosswalk-guidance.ttl", "mappings/actor-context-standards.ttl", "mappings/commerce-engagement-crosswalk.ttl"];
10
17
  };
11
18
  /**
12
19
  * Resolve a shipped artifact's relative path (see {@link ARTIFACTS}) to an
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../src/artifacts.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,eAAO,MAAM,SAAS;;;;CAIZ,CAAC;AAEX;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEzD"}
1
+ {"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../src/artifacts.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,eAAO,MAAM,SAAS;;IAEpB,6GAA6G;;IAE7G,0GAA0G;;IAE1G,mEAAmE;;;;;CAqJ3D,CAAC;AAEX;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEzD"}
package/dist/artifacts.js CHANGED
@@ -12,8 +12,159 @@ import { fileURLToPath } from 'node:url';
12
12
  */
13
13
  export const ARTIFACTS = {
14
14
  context: 'context.jsonld',
15
- tbox: ['tbox/core.ttl', 'tbox/identity.ttl'],
16
- cbox: ['cbox/canonical-agent-id-shape.shacl.ttl', 'cbox/controlled-vocabularies.ttl'],
15
+ /** Spec 389 — the JSON-LD context a run's provenance record (`run.provenance:<runRef>`) is written under. */
16
+ runProvenanceContext: 'run-provenance.jsonld',
17
+ /** Spec 414 A2 — the JSON-LD context a run's measurements (`run.measures:<runRef>`) are written under. */
18
+ runMeasuresContext: 'run-measures.jsonld',
19
+ /** Spec 415 S0/SEL-1 — replay sets (DCAT) and judgments (EARL). */
20
+ evaluationContext: 'evaluation.jsonld',
21
+ tbox: [
22
+ // Phase-1 (identity + core)
23
+ 'tbox/core.ttl',
24
+ 'tbox/identity.ttl',
25
+ 'tbox/contact.ttl',
26
+ // Typed agent naming — tld, contextual issuance, contextual reference (spec 346 §3/§11; ADR-0061)
27
+ 'tbox/naming.ttl',
28
+ // Phase-1.5 (v2 coordination substrate spine; spec 225 §11.5)
29
+ 'tbox/intents.ttl',
30
+ 'tbox/constraints.ttl',
31
+ 'tbox/resolution.ttl',
32
+ 'tbox/agreement.ttl',
33
+ 'tbox/payment.ttl',
34
+ 'tbox/fulfillment.ttl',
35
+ 'tbox/attestation.ttl',
36
+ // Generic skills + geo substrate (spec 251)
37
+ 'tbox/skills.ttl',
38
+ 'tbox/geo.ttl',
39
+ // Generic verifiable-content substrate (spec 266)
40
+ 'tbox/content.ttl',
41
+ // Discovery / registry / trust knowledge graph substrate (spec 279)
42
+ 'tbox/registry.ttl',
43
+ 'tbox/discovery.ttl',
44
+ 'tbox/trust.ttl',
45
+ 'tbox/security-exposure.ttl',
46
+ // Agent resolution — private/public service publication + grants (spec 338; ADR-0056).
47
+ // NOTE `apar:` (agent resolution) is distinct from `apres:` (intent resolution, above).
48
+ 'tbox/agent-resolution.ttl',
49
+ // Verification-receipt provenance, PROV-O-grounded (spec 303)
50
+ 'tbox/verification-receipt.ttl',
51
+ // AP-Scope-V1 (spec 308)
52
+ 'tbox/scope.ttl',
53
+ // Unified interaction ontology (spec 324; ADR-0048)
54
+ 'tbox/situation.ttl',
55
+ 'tbox/org.ttl',
56
+ // FamilyOffice domain ontology (New City AI) — the family-office org + member
57
+ // relationships (kinship/guardianship/ownership/trusteeship) as Situations.
58
+ 'tbox/familyoffice.ttl',
59
+ 'tbox/entitlement.ttl',
60
+ 'tbox/interaction.ttl',
61
+ 'tbox/messaging.ttl',
62
+ // Agent guidance layer — IDE SKILL.md / CLAUDE.md (ADR-0050); NOT executable skills
63
+ 'tbox/guidance.ttl',
64
+ // Actor context + portable authority chain (spec 326; ADR-0052)
65
+ 'tbox/actor-context.ttl',
66
+ // Orthogonal context facets + capability-map views (spec 330 W0, unparked by spec 331)
67
+ 'tbox/context.ttl',
68
+ // The public agent profile facet (spec 217/282; facet-registries G2/G3/G4) — approf: was a
69
+ // declared namespace with NO T-box module until spec 331, while the indexer wrote it live.
70
+ 'tbox/profile.ttl',
71
+ // Execution plane (spec 330 §8 W0 subset) — the apexec:/aprole: classes the shipped
72
+ // realization contracts target. Declared so a contract's sh:targetClass names something real
73
+ // instead of validating an empty set by vacuity.
74
+ 'tbox/execution.ttl',
75
+ // P-Plan grounding (spec 332 §4; closes spec-316 W5) — the plan trichotomy
76
+ 'tbox/plan.ttl',
77
+ // PROV-O terms the substrate EMITS, declared so shapes, bindings and A-box rows target something real (spec 389)
78
+ 'tbox/prov-imports.ttl',
79
+ // SKOS terms the T-box/C-box USE, declared so the bindings and standard-anchoring gates see them (spec 414 A0)
80
+ 'tbox/skos-imports.ttl',
81
+ // DQV terms the measurement records EMIT (spec 414 A2)
82
+ 'tbox/dqv-imports.ttl',
83
+ // EARL + DCAT terms the judgment and replay-set records EMIT (spec 415 SEL-1 / S0)
84
+ 'tbox/earl-imports.ttl',
85
+ 'tbox/dcat-imports.ttl',
86
+ // Run measurements on DQV — apeval: (spec 414 §7 / A2)
87
+ 'tbox/evaluation.ttl',
88
+ // Coordination plane (spec 332 core subset; ADR-0054) — Endeavor / shared plan / participation
89
+ 'tbox/coordination.ttl',
90
+ // Intent engagement plane (spec 336 W0 subset) — projections / probes / offers / mandates / receipts
91
+ 'tbox/engagement.ttl',
92
+ // Canonical profile / A2A Agent Card / projection / publication / external identity binding
93
+ // (spec 347 §11; ADR-0062) — a second module of the ap: core namespace.
94
+ 'tbox/card-projection.ttl',
95
+ // Estate projection (spec 410 §4) — what an estate vouches for on neutral ground and the opening it
96
+ // keeps. Declared because the openings became a vault record and a vault record needs a class.
97
+ 'tbox/estate.ttl',
98
+ 'tbox/privacy-credential.ttl',
99
+ ],
100
+ cbox: [
101
+ 'cbox/canonical-agent-id-shape.shacl.ttl',
102
+ 'cbox/controlled-vocabularies.ttl',
103
+ // Registry admission checks / lifecycle event kinds / derived entry status (spec 346 §7)
104
+ 'cbox/registry-vocabulary.ttl',
105
+ // Generic skills + geo codelists — on-chain-bound kinds (lockstep, ADR-0009)
106
+ 'cbox/skill-vocabulary.ttl',
107
+ 'cbox/geo-vocabulary.ttl',
108
+ // AP-Scope-V1 codelists + the reliance profile (spec 308)
109
+ 'cbox/scope-vocabulary.ttl',
110
+ // Verifiable-content codelists + ContentDescriptor shape (spec 266)
111
+ 'cbox/content-vocabulary.ttl',
112
+ // GraphDB A-box ingestion + discovery/trust/admin findings shapes
113
+ 'cbox/discovery-graph-shapes.shacl.ttl',
114
+ // Interaction / organization codelists (spec 324)
115
+ 'cbox/interaction-vocabulary.ttl',
116
+ // FamilyOffice codelists (New City AI) — kinshipKind / roleKind / ownershipKind
117
+ 'cbox/familyoffice-vocabulary.ttl',
118
+ // FamilyOffice relationship-archetype shapes (New City AI) — a NodeShape per apfo relationship,
119
+ // validating role bindings + typed body before a portal vault-first write.
120
+ 'cbox/familyoffice-shapes.shacl.ttl',
121
+ 'cbox/privacy-credential-shapes.shacl.ttl',
122
+ // Routed-consultation artifact shapes (spec 329 §6)
123
+ 'cbox/consultation-shapes.shacl.ttl',
124
+ // Agentic Interaction shapes (spec 340; ADR-0058) — structure, never permission
125
+ 'cbox/interaction-shapes.shacl.ttl',
126
+ // Skill grounding protocols (spec 325)
127
+ 'cbox/skill-grounding-vocabulary.ttl',
128
+ 'cbox/guidance-vocabulary.ttl',
129
+ // Value spaces for the three public profile facets (BCP-47 / GeoFeatureRegistry / open)
130
+ 'cbox/profile-facet-vocabulary.ttl',
131
+ // Profile-facet + trust-fabric shapes (spec 331)
132
+ 'cbox/agent-facet-shapes.shacl.ttl',
133
+ // Capability catalog well-formedness, the anti-pattern axioms, and realization contracts
134
+ 'cbox/capability-catalog-shapes.shacl.ttl',
135
+ // Team affiliation / workspace / representation / responsibility shapes (spec 344 §4.6)
136
+ 'cbox/org-team-shapes.shacl.ttl',
137
+ // Typed names, contextual issuance, workspace agent + registry agents, receipts, lifecycle log
138
+ // (spec 346 §11). Structure, never permission.
139
+ 'cbox/naming-registry-shapes.shacl.ttl',
140
+ // Run provenance validity R1–R6 (spec 389 W2): what makes a run's PROV record evidence
141
+ 'cbox/run-provenance-shapes.shacl.ttl',
142
+ // Spec 414 A2 — M1–M3 over a run's measurements record
143
+ 'cbox/run-measures-shapes.shacl.ttl',
144
+ // Spec 414 §3.4 / 415 SEL-1 — JU1–JU4 over a judgment record (first binding: skill selection)
145
+ 'cbox/judgment-shapes.shacl.ttl',
146
+ // Public card metadata, projection provenance (eight digests), external bindings, the
147
+ // public/private disclosure boundary (spec 347 §11)
148
+ 'cbox/card-projection-shapes.shacl.ttl',
149
+ ],
150
+ mappings: [
151
+ 'mappings/spine-standards.ttl',
152
+ 'mappings/agent-discovery-standards.ttl',
153
+ // Collaboration Profile crosswalks (spec 325; ADR-0049)
154
+ 'mappings/collaboration-profile.ttl',
155
+ 'mappings/collaboration-crosswalk-actors.ttl',
156
+ 'mappings/collaboration-crosswalk-organization.ttl',
157
+ 'mappings/collaboration-crosswalk-messaging.ttl',
158
+ 'mappings/collaboration-crosswalk-intent.ttl',
159
+ 'mappings/collaboration-crosswalk-skills.ttl',
160
+ 'mappings/collaboration-crosswalk-authority.ttl',
161
+ 'mappings/collaboration-crosswalk-protocols.ttl',
162
+ 'mappings/collaboration-crosswalk-guidance.ttl',
163
+ // Actor-context DUAL grounding — web2 (IAM/legal) + web3 (ERC/CAIP) (spec 326; ADR-0052)
164
+ 'mappings/actor-context-standards.ttl',
165
+ // One offer algebra, two arenas — ICM/TIO (TMF921), schema.org, ValueFlows, AP2/UCP/Seaport (spec 337)
166
+ 'mappings/commerce-engagement-crosswalk.ttl',
167
+ ],
17
168
  };
18
169
  /**
19
170
  * Resolve a shipped artifact's relative path (see {@link ARTIFACTS}) to an
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../src/artifacts.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,EAAE;AACF,0EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,yCAAyC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,gBAAgB;IACzB,IAAI,EAAE,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAC5C,IAAI,EAAE,CAAC,yCAAyC,EAAE,kCAAkC,CAAC;CAC7E,CAAC;AAEX;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,YAAoB;IAC/C,OAAO,aAAa,CAAC,IAAI,GAAG,CAAC,MAAM,YAAY,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACvE,CAAC"}
1
+ {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../src/artifacts.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,EAAE;AACF,0EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,yCAAyC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,gBAAgB;IACzB,6GAA6G;IAC7G,oBAAoB,EAAE,uBAAuB;IAC7C,0GAA0G;IAC1G,kBAAkB,EAAE,qBAAqB;IACzC,mEAAmE;IACnE,iBAAiB,EAAE,mBAAmB;IACtC,IAAI,EAAE;QACJ,4BAA4B;QAC5B,eAAe;QACf,mBAAmB;QACnB,kBAAkB;QAClB,kGAAkG;QAClG,iBAAiB;QACjB,8DAA8D;QAC9D,kBAAkB;QAClB,sB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ClD,iCAAiC;QACjC,gFAAgF;QAChF,kCAAkC;QAClC,gGAAgG;QAChG,2EAA2E;QAC3E,oCAAoC;QACpC,0CAA0C;QAC1C,oDAAoD;QACpD,oCAAoC;QACpC,gFAAgF;QAChF,mCAAmC;QACnC,uCAAuC;QACvC,qCAAqC;QACrC,8BAA8B;QAC9B,wFAAwF;QACxF,mCAAmC;QACnC,iDAAiD;QACjD,mCAAmC;QACnC,yFAAyF;QACzF,0CAA0C;QAC1C,wFAAwF;QACxF,gCAAgC;QAChC,+FAA+F;QAC/F,+CAA+C;QAC/C,uCAAuC;QACvC,uFAAuF;QACvF,sCAAsC;QACtC,uDAAuD;QACvD,oCAAoC;QACpC,8FAA8F;QAC9F,gCAAgC;QAChC,sFAAsF;QACtF,oDAAoD;QACpD,uCAAuC;KACxC;IACD,QAAQ,EAAE;QACR,8BAA8B;QAC9B,wCAAwC;QACxC,wDAAwD;QACxD,oCAAoC;QACpC,6CAA6C;QAC7C,mDAAmD;QACnD,gDAAgD;QAChD,6CAA6C;QAC7C,6CAA6C;QAC7C,gDAAgD;QAChD,gDAAgD;QAChD,+CAA+C;QAC/C,yFAAyF;QACzF,sCAAsC;QACtC,uGAAuG;QACvG,4CAA4C;KAC7C;CACO,CAAC;AAEX;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,YAAoB;IAC/C,OAAO,aAAa,CAAC,IAAI,GAAG,CAAC,MAAM,YAAY,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACvE,CAAC"}
@@ -0,0 +1,28 @@
1
+ export interface ContactFieldV1 {
2
+ /** The argument name an Ask, a form or a contract uses. */
3
+ arg: string;
4
+ /** The path inside the record the Home writes (`contact.firstName`, `contact.location.street`). */
5
+ path: string;
6
+ /** The T-box property it means. */
7
+ property: string;
8
+ /** The words for it. */
9
+ label: string;
10
+ /** For the planner and a form: what to put here. */
11
+ hint: string;
12
+ /** Location fields set the record's precision together (see `precisionOf`). */
13
+ location?: boolean;
14
+ }
15
+ export declare const CONTACT_FIELDS: readonly ContactFieldV1[];
16
+ export declare const CONTACT_FIELD_ARGS: readonly string[];
17
+ export declare function contactField(arg: string): ContactFieldV1 | undefined;
18
+ /** The precision an address implies from what is filled — the Home's own rule, stated once. */
19
+ export declare function precisionOf(loc: {
20
+ street?: string;
21
+ line2?: string;
22
+ postalCode?: string;
23
+ locality?: string;
24
+ region?: string;
25
+ }): 'country' | 'region' | 'locality' | 'address';
26
+ /** The record binding's property map, derived — so the binding and the field list cannot drift. */
27
+ export declare const CONTACT_PROFILE_PROPERTIES: Readonly<Record<string, string>>;
28
+ //# sourceMappingURL=contact-fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact-fields.d.ts","sourceRoot":"","sources":["../src/contact-fields.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ,mGAAmG;IACnG,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,EAAE,SAAS,cAAc,EAanD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAAqC,CAAC;AACtF,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAAsD;AAE3H,+FAA+F;AAC/F,wBAAgB,WAAW,CAAC,GAAG,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAK5K;AAED,mGAAmG;AACnG,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAuE,CAAC"}
@@ -0,0 +1,38 @@
1
+ // THE CONTACT PROFILE'S FIELDS, ONCE — spec 371 §2.2 (a record edit is shaped by the record).
2
+ //
3
+ // "Set street address to 2445 Walters Drive, Erie Colorado 80516" was refused with "I can't help with
4
+ // that here" while "change my phone" worked. The Ask's edit tool, the invoker, the DO's write allow-list
5
+ // and the SKILL.md contract each carried their own hand-kept list of fields, and "street" was in none.
6
+ // This is the one list — each argument the Ask may take, where it lives in the record the Home writes
7
+ // (`vault:impact-profile`: `contact.<field>` and `contact.location.<field>`), and the T-box property it
8
+ // means. Every surface derives from it; a field added here is editable everywhere, described the same.
9
+ const APCON = 'https://agenticprimitives.dev/ns/contact#';
10
+ export const CONTACT_FIELDS = [
11
+ { arg: 'firstName', path: 'contact.firstName', property: `${APCON}givenName`, label: 'first name', hint: 'given name' },
12
+ { arg: 'lastName', path: 'contact.lastName', property: `${APCON}familyName`, label: 'last name', hint: 'family name' },
13
+ { arg: 'email', path: 'contact.email', property: `${APCON}email`, label: 'email', hint: 'an email address' },
14
+ { arg: 'phone', path: 'contact.phone', property: `${APCON}telephone`, label: 'phone', hint: 'a telephone number' },
15
+ { arg: 'organizationName', path: 'contact.organizationName', property: `${APCON}organizationName`, label: 'organization', hint: 'the organization they work with' },
16
+ { arg: 'organizationCountry', path: 'contact.organizationCountry', property: `${APCON}organizationCountry`, label: 'organization country', hint: 'where that organization is' },
17
+ { arg: 'street', path: 'contact.location.street', property: `${APCON}streetAddress`, label: 'street address', hint: 'street and number, e.g. "2445 Walters Drive"', location: true },
18
+ { arg: 'line2', path: 'contact.location.line2', property: `${APCON}streetAddressLine2`, label: 'address line 2', hint: 'apartment, suite or unit', location: true },
19
+ { arg: 'city', path: 'contact.location.locality', property: `${APCON}addressLocality`, label: 'city', hint: 'city or town, e.g. "Erie"', location: true },
20
+ { arg: 'region', path: 'contact.location.region', property: `${APCON}addressRegion`, label: 'state or province', hint: 'state or province, e.g. "Colorado"', location: true },
21
+ { arg: 'postalCode', path: 'contact.location.postalCode', property: `${APCON}postalCode`, label: 'postal code', hint: 'postal or ZIP code, e.g. "80516"', location: true },
22
+ { arg: 'country', path: 'contact.location.country', property: `${APCON}addressCountry`, label: 'country', hint: 'the country, e.g. "United States" — required for any finer address', location: true },
23
+ ];
24
+ export const CONTACT_FIELD_ARGS = CONTACT_FIELDS.map((f) => f.arg);
25
+ export function contactField(arg) { return CONTACT_FIELDS.find((f) => f.arg === arg); }
26
+ /** The precision an address implies from what is filled — the Home's own rule, stated once. */
27
+ export function precisionOf(loc) {
28
+ if (loc.street || loc.line2 || loc.postalCode)
29
+ return 'address';
30
+ if (loc.locality)
31
+ return 'locality';
32
+ if (loc.region)
33
+ return 'region';
34
+ return 'country';
35
+ }
36
+ /** The record binding's property map, derived — so the binding and the field list cannot drift. */
37
+ export const CONTACT_PROFILE_PROPERTIES = Object.fromEntries(CONTACT_FIELDS.map((f) => [f.path, f.property]));
38
+ //# sourceMappingURL=contact-fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact-fields.js","sourceRoot":"","sources":["../src/contact-fields.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,EAAE;AACF,sGAAsG;AACtG,yGAAyG;AACzG,uGAAuG;AACvG,sGAAsG;AACtG,wGAAwG;AACxG,uGAAuG;AACvG,MAAM,KAAK,GAAG,2CAA2C,CAAC;AAiB1D,MAAM,CAAC,MAAM,cAAc,GAA8B;IACvD,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,GAAG,KAAK,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE;IACvH,EAAE,GAAG,EAAE,UAAU,EAAE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