@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.
- package/README.md +59 -21
- package/cbox/agent-facet-shapes.shacl.ttl +130 -0
- package/cbox/capability-catalog-shapes.shacl.ttl +284 -0
- package/cbox/card-projection-shapes.shacl.ttl +216 -0
- package/cbox/consultation-shapes.shacl.ttl +85 -0
- package/cbox/content-vocabulary.ttl +52 -0
- package/cbox/controlled-vocabularies.ttl +224 -4
- package/cbox/discovery-graph-shapes.shacl.ttl +284 -0
- package/cbox/familyoffice-shapes.shacl.ttl +92 -0
- package/cbox/familyoffice-vocabulary.ttl +48 -0
- package/cbox/geo-vocabulary.ttl +36 -0
- package/cbox/guidance-vocabulary.ttl +22 -0
- package/cbox/interaction-shapes.shacl.ttl +218 -0
- package/cbox/interaction-vocabulary.ttl +159 -0
- package/cbox/judgment-shapes.shacl.ttl +83 -0
- package/cbox/naming-registry-shapes.shacl.ttl +272 -0
- package/cbox/org-team-shapes.shacl.ttl +184 -0
- package/cbox/privacy-credential-shapes.shacl.ttl +187 -0
- package/cbox/profile-facet-vocabulary.ttl +50 -0
- package/cbox/registry-vocabulary.ttl +86 -0
- package/cbox/run-measures-shapes.shacl.ttl +59 -0
- package/cbox/run-provenance-shapes.shacl.ttl +264 -0
- package/cbox/scope-vocabulary.ttl +112 -0
- package/cbox/skill-grounding-vocabulary.ttl +18 -0
- package/cbox/skill-vocabulary.ttl +50 -0
- package/context.jsonld +37 -1
- package/dist/arg-types.d.ts +60 -0
- package/dist/arg-types.d.ts.map +1 -0
- package/dist/arg-types.js +143 -0
- package/dist/arg-types.js.map +1 -0
- package/dist/artifacts.d.ts +9 -2
- package/dist/artifacts.d.ts.map +1 -1
- package/dist/artifacts.js +153 -2
- package/dist/artifacts.js.map +1 -1
- package/dist/contact-fields.d.ts +28 -0
- package/dist/contact-fields.d.ts.map +1 -0
- package/dist/contact-fields.js +38 -0
- package/dist/contact-fields.js.map +1 -0
- package/dist/decisions.d.ts +69 -0
- package/dist/decisions.d.ts.map +1 -0
- package/dist/decisions.js +98 -0
- package/dist/decisions.js.map +1 -0
- package/dist/evaluation-context.d.ts +134 -0
- package/dist/evaluation-context.d.ts.map +1 -0
- package/dist/evaluation-context.js +136 -0
- package/dist/evaluation-context.js.map +1 -0
- package/dist/governance.d.ts +84 -0
- package/dist/governance.d.ts.map +1 -0
- package/dist/governance.js +88 -0
- package/dist/governance.js.map +1 -0
- package/dist/grounded-vocabulary.d.ts +29 -0
- package/dist/grounded-vocabulary.d.ts.map +1 -0
- package/dist/grounded-vocabulary.js +110 -0
- package/dist/grounded-vocabulary.js.map +1 -0
- package/dist/household.d.ts +19 -0
- package/dist/household.d.ts.map +1 -0
- package/dist/household.js +41 -0
- package/dist/household.js.map +1 -0
- package/dist/index.d.ts +1091 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1323 -5
- package/dist/index.js.map +1 -1
- package/dist/outcomes.d.ts +47 -0
- package/dist/outcomes.d.ts.map +1 -0
- package/dist/outcomes.js +40 -0
- package/dist/outcomes.js.map +1 -0
- package/dist/participant-vocabulary.d.ts +57 -0
- package/dist/participant-vocabulary.d.ts.map +1 -0
- package/dist/participant-vocabulary.js +66 -0
- package/dist/participant-vocabulary.js.map +1 -0
- package/dist/party-roles.d.ts +115 -0
- package/dist/party-roles.d.ts.map +1 -0
- package/dist/party-roles.js +343 -0
- package/dist/party-roles.js.map +1 -0
- package/dist/payload-classes.d.ts +22 -0
- package/dist/payload-classes.d.ts.map +1 -0
- package/dist/payload-classes.js +30 -0
- package/dist/payload-classes.js.map +1 -0
- package/dist/plan-shapes.d.ts +18 -0
- package/dist/plan-shapes.d.ts.map +1 -0
- package/dist/plan-shapes.js +38 -0
- package/dist/plan-shapes.js.map +1 -0
- package/dist/principles.generated.d.ts +11 -0
- package/dist/principles.generated.d.ts.map +1 -0
- package/dist/principles.generated.js +293 -0
- package/dist/principles.generated.js.map +1 -0
- package/dist/published-works.d.ts +13 -0
- package/dist/published-works.d.ts.map +1 -0
- package/dist/published-works.js +18 -0
- package/dist/published-works.js.map +1 -0
- package/dist/relations.d.ts +44 -0
- package/dist/relations.d.ts.map +1 -0
- package/dist/relations.js +104 -0
- package/dist/relations.js.map +1 -0
- package/dist/run-measures-context.d.ts +74 -0
- package/dist/run-measures-context.d.ts.map +1 -0
- package/dist/run-measures-context.js +77 -0
- package/dist/run-measures-context.js.map +1 -0
- package/dist/run-provenance-context.d.ts +315 -0
- package/dist/run-provenance-context.d.ts.map +1 -0
- package/dist/run-provenance-context.js +323 -0
- package/dist/run-provenance-context.js.map +1 -0
- package/dist/transitions.d.ts +42 -0
- package/dist/transitions.d.ts.map +1 -0
- package/dist/transitions.js +100 -0
- package/dist/transitions.js.map +1 -0
- package/dist/vault-records.d.ts +74 -0
- package/dist/vault-records.d.ts.map +1 -0
- package/dist/vault-records.js +777 -0
- package/dist/vault-records.js.map +1 -0
- package/dist/versions.generated.d.ts +262 -0
- package/dist/versions.generated.d.ts.map +1 -0
- package/dist/versions.generated.js +318 -0
- package/dist/versions.generated.js.map +1 -0
- package/evaluation.jsonld +133 -0
- package/mappings/actor-context-standards.ttl +89 -0
- package/mappings/agent-discovery-standards.ttl +127 -0
- package/mappings/collaboration-crosswalk-actors.ttl +30 -0
- package/mappings/collaboration-crosswalk-authority.ttl +31 -0
- package/mappings/collaboration-crosswalk-guidance.ttl +29 -0
- package/mappings/collaboration-crosswalk-intent.ttl +29 -0
- package/mappings/collaboration-crosswalk-messaging.ttl +37 -0
- package/mappings/collaboration-crosswalk-organization.ttl +66 -0
- package/mappings/collaboration-crosswalk-protocols.ttl +49 -0
- package/mappings/collaboration-crosswalk-skills.ttl +50 -0
- package/mappings/collaboration-profile.ttl +82 -0
- package/mappings/commerce-engagement-crosswalk.ttl +83 -0
- package/mappings/spine-standards.ttl +83 -0
- package/package.json +31 -9
- package/run-measures.jsonld +34 -0
- package/run-provenance.jsonld +314 -0
- package/tbox/actor-context.ttl +145 -0
- package/tbox/agent-resolution.ttl +308 -0
- package/tbox/agreement.ttl +77 -0
- package/tbox/attestation.ttl +156 -0
- package/tbox/card-projection.ttl +350 -0
- package/tbox/constraints.ttl +150 -0
- package/tbox/contact.ttl +61 -0
- package/tbox/content.ttl +76 -0
- package/tbox/context.ttl +508 -0
- package/tbox/coordination.ttl +263 -0
- package/tbox/core.ttl +325 -7
- package/tbox/dcat-imports.ttl +19 -0
- package/tbox/discovery.ttl +273 -0
- package/tbox/dqv-imports.ttl +29 -0
- package/tbox/earl-imports.ttl +32 -0
- package/tbox/engagement.ttl +349 -0
- package/tbox/entitlement.ttl +41 -0
- package/tbox/estate.ttl +78 -0
- package/tbox/evaluation.ttl +330 -0
- package/tbox/execution.ttl +720 -0
- package/tbox/familyoffice.ttl +87 -0
- package/tbox/fulfillment.ttl +140 -0
- package/tbox/geo.ttl +28 -0
- package/tbox/governance.ttl +67 -0
- package/tbox/guidance.ttl +40 -0
- package/tbox/household.ttl +142 -0
- package/tbox/identity.ttl +133 -6
- package/tbox/inference.ttl +177 -0
- package/tbox/intents.ttl +241 -0
- package/tbox/interaction.ttl +297 -0
- package/tbox/messaging.ttl +244 -0
- package/tbox/naming.ttl +114 -0
- package/tbox/org.ttl +410 -0
- package/tbox/payload.ttl +94 -0
- package/tbox/payment.ttl +124 -0
- package/tbox/plan.ttl +169 -0
- package/tbox/principles.ttl +212 -0
- package/tbox/privacy-credential.ttl +436 -0
- package/tbox/profile.ttl +107 -0
- package/tbox/prov-imports.ttl +73 -0
- package/tbox/registry.ttl +382 -0
- package/tbox/resolution.ttl +108 -0
- package/tbox/scope.ttl +59 -0
- package/tbox/security-exposure.ttl +102 -0
- package/tbox/situation.ttl +56 -0
- package/tbox/skills.ttl +316 -0
- package/tbox/skos-imports.ttl +54 -0
- package/tbox/transition.ttl +63 -0
- package/tbox/trust.ttl +210 -0
- package/tbox/values.ttl +81 -0
- package/tbox/verification-receipt.ttl +134 -0
- package/versions.adoption.json +173 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface StandardGrounding {
|
|
2
|
+
/** The recognizable term in that world (e.g. "OAuth cnf", "ERC-4337 account"). */
|
|
3
|
+
term: string;
|
|
4
|
+
/** The owning standard / body (e.g. "RFC 7800", "GDPR Art. 4", "CAIP-10"). */
|
|
5
|
+
standard: string;
|
|
6
|
+
/** Canonical URL for the standard. */
|
|
7
|
+
ref: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GroundedTerm {
|
|
10
|
+
/** Canonical AP name — identical to the TS type/field name AND the ontology `rdfs:label`. */
|
|
11
|
+
term: string;
|
|
12
|
+
/** The ontology IRI (T-box term in `tbox/actor-context.ttl`). */
|
|
13
|
+
iri: string;
|
|
14
|
+
/** Human label for UX surfaces. */
|
|
15
|
+
label: string;
|
|
16
|
+
/** One-line, jargon-free gloss for a non-expert. */
|
|
17
|
+
plainEnglish: string;
|
|
18
|
+
/** What a web2 IAM / security / legal reader already calls this. */
|
|
19
|
+
web2: StandardGrounding;
|
|
20
|
+
/** What a web3 reader already calls this. */
|
|
21
|
+
web3: StandardGrounding;
|
|
22
|
+
/** True for terms that carry context/presentation only — they NEVER authorize (ADR-0010/0020/0052). */
|
|
23
|
+
notAuthority?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/** The actor-context / accountability vocabulary, each term dual-grounded (web2 + web3). Order is narrative. */
|
|
26
|
+
export declare const GROUNDED_VOCABULARY: readonly GroundedTerm[];
|
|
27
|
+
/** Look up a grounded term by its canonical name (the TS/ontology name). */
|
|
28
|
+
export declare function groundedTerm(term: string): GroundedTerm | undefined;
|
|
29
|
+
//# sourceMappingURL=grounded-vocabulary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grounded-vocabulary.d.ts","sourceRoot":"","sources":["../src/grounded-vocabulary.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,iBAAiB;IAChC,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAC3B,6FAA6F;IAC7F,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;IACZ,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,IAAI,EAAE,iBAAiB,CAAC;IACxB,6CAA6C;IAC7C,IAAI,EAAE,iBAAiB,CAAC;IACxB,uGAAuG;IACvG,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAID,gHAAgH;AAChH,eAAO,MAAM,mBAAmB,EAAE,SAAS,YAAY,EA2FtD,CAAC;AAIF,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAEnE"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Grounded vocabulary — spec 326 W1 (ADR-0052). The machine-readable, dual-grounded glossary.
|
|
2
|
+
//
|
|
3
|
+
// WHY THIS EXISTS: explainability lives in the TERMS, carried consistently across ontology, code, and UX — not
|
|
4
|
+
// in a side document. This is the single source those three consumers share: the ontology IRI (`iri`), the code
|
|
5
|
+
// type name (`term`), and the UX label (`label`) are the SAME concept, and each carries the web2 IAM/legal term
|
|
6
|
+
// AND the web3 term a reader already recognizes. A UI renders `label` + a "web2 · web3" tooltip; a doc generates
|
|
7
|
+
// from `plainEnglish`; a type name matches `term`. Pure browser-safe data — no Node builtins.
|
|
8
|
+
// Namespace base inlined (NOT imported from ./index) to avoid a module-eval circular-init cycle — index.ts
|
|
9
|
+
// re-exports this file, so importing NS back would read it in TDZ. Value is identical to `NS.apactor`.
|
|
10
|
+
const APACTOR_NS = 'https://agenticprimitives.dev/ns/actor#';
|
|
11
|
+
const A = (local) => `${APACTOR_NS}${local}`;
|
|
12
|
+
/** The actor-context / accountability vocabulary, each term dual-grounded (web2 + web3). Order is narrative. */
|
|
13
|
+
export const GROUNDED_VOCABULARY = [
|
|
14
|
+
{
|
|
15
|
+
term: 'accountabilityRoot',
|
|
16
|
+
iri: A('AccountabilityRoot'),
|
|
17
|
+
label: 'Accountable party',
|
|
18
|
+
plainEnglish: 'The durable anchor everything serious traces back to — custody, revocation, disputes.',
|
|
19
|
+
web2: { term: 'accountable party / controller', standard: 'GDPR Art. 4', ref: 'https://gdpr-info.eu/art-4-gdpr/' },
|
|
20
|
+
web3: { term: 'ERC-4337 Smart Agent', standard: 'ERC-4337 / CAIP-10', ref: 'https://eips.ethereum.org/EIPS/eip-4337' },
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
term: 'presentationIdentifier',
|
|
24
|
+
iri: A('PresentationIdentifier'),
|
|
25
|
+
label: 'Shown as',
|
|
26
|
+
plainEnglish: 'What one specific counterparty or surface is shown — a name, a pseudonym, or a proof.',
|
|
27
|
+
web2: { term: 'pairwise subject identifier', standard: 'OpenID Connect Core §8', ref: 'https://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes' },
|
|
28
|
+
web3: { term: 'displayed address / registry entry', standard: 'ERC-8004', ref: 'https://eips.ethereum.org/EIPS/eip-8004' },
|
|
29
|
+
notAuthority: true,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
term: 'rootPrincipal',
|
|
33
|
+
iri: A('rootPrincipal'),
|
|
34
|
+
label: 'On behalf of',
|
|
35
|
+
plainEnglish: 'The human or organization ultimately represented — may be shown pseudonymously.',
|
|
36
|
+
web2: { term: 'resource owner / principal', standard: 'OAuth 2.0 (RFC 6749)', ref: 'https://www.rfc-editor.org/rfc/rfc6749#section-1.1' },
|
|
37
|
+
web3: { term: 'controlling Person/Org SA', standard: 'CAIP-10', ref: 'https://chainagnostic.org/CAIPs/caip-10' },
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
term: 'originatingAgent',
|
|
41
|
+
iri: A('originatingAgent'),
|
|
42
|
+
label: 'Started by',
|
|
43
|
+
plainEnglish: 'The agent that kicked off the overall task.',
|
|
44
|
+
web2: { term: 'initiating client', standard: 'OAuth 2.0', ref: 'https://www.rfc-editor.org/rfc/rfc6749' },
|
|
45
|
+
web3: { term: 'originating Smart Agent', standard: 'CAIP-10', ref: 'https://chainagnostic.org/CAIPs/caip-10' },
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
term: 'actingAgent',
|
|
49
|
+
iri: A('actingAgent'),
|
|
50
|
+
label: 'Acting agent',
|
|
51
|
+
plainEnglish: 'The agent performing this particular step — possibly a sub-agent.',
|
|
52
|
+
web2: { term: 'actor (act claim)', standard: 'Token Exchange (RFC 8693)', ref: 'https://www.rfc-editor.org/rfc/rfc8693#section-4.1' },
|
|
53
|
+
web3: { term: 'session-key Smart Agent', standard: 'ERC-4337', ref: 'https://eips.ethereum.org/EIPS/eip-4337' },
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
term: 'agentInstance',
|
|
57
|
+
iri: A('AgentInstance'),
|
|
58
|
+
label: 'Running instance',
|
|
59
|
+
plainEnglish: 'The specific task, session, or container actually running right now.',
|
|
60
|
+
web2: { term: 'workload instance', standard: 'WIMSE / SPIFFE', ref: 'https://spiffe.io/docs/latest/spiffe-about/spiffe-concepts/' },
|
|
61
|
+
web3: { term: 'running session/container', standard: 'spec 326', ref: 'https://eips.ethereum.org/EIPS/eip-4337' },
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
term: 'confirmationKey',
|
|
65
|
+
iri: A('ConfirmationKey'),
|
|
66
|
+
label: 'Proof key',
|
|
67
|
+
plainEnglish: 'A key that proves possession — not who the agent is. It can rotate freely.',
|
|
68
|
+
web2: { term: 'cnf proof-of-possession', standard: 'RFC 7800', ref: 'https://www.rfc-editor.org/rfc/rfc7800' },
|
|
69
|
+
web3: { term: 'session key / passkey signer', standard: 'WebAuthn', ref: 'https://www.w3.org/TR/webauthn-3/' },
|
|
70
|
+
notAuthority: true,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
term: 'SubjectRef',
|
|
74
|
+
iri: A('SubjectRef'),
|
|
75
|
+
label: 'Subject reference',
|
|
76
|
+
plainEnglish: 'A pointer to a party in any trust domain — kept typed so they are never confused.',
|
|
77
|
+
web2: { term: 'subject identifier', standard: 'RFC 9493', ref: 'https://www.rfc-editor.org/rfc/rfc9493' },
|
|
78
|
+
web3: { term: 'CAIP-10 account id', standard: 'CAIP-10', ref: 'https://chainagnostic.org/CAIPs/caip-10' },
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
term: 'SubjectBinding',
|
|
82
|
+
iri: A('SubjectBinding'),
|
|
83
|
+
label: 'Verified link',
|
|
84
|
+
plainEnglish: 'Signed proof that two identifiers refer to the same party — without merging them.',
|
|
85
|
+
web2: { term: 'account linking / VC', standard: 'W3C VC Data Model 2.0', ref: 'https://www.w3.org/TR/vc-data-model-2.0/' },
|
|
86
|
+
web3: { term: 'ERC-1271-verified signed link', standard: 'ERC-1271', ref: 'https://eips.ethereum.org/EIPS/eip-1271' },
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
term: 'delegatedTo',
|
|
90
|
+
iri: A('delegatedTo'),
|
|
91
|
+
label: 'Permission to act',
|
|
92
|
+
plainEnglish: 'Bounded permission to act on someone else’s behalf.',
|
|
93
|
+
web2: { term: 'delegation / power of attorney', standard: 'Token Exchange (RFC 8693)', ref: 'https://www.rfc-editor.org/rfc/rfc8693' },
|
|
94
|
+
web3: { term: 'on-chain Delegation', standard: 'ERC-7710', ref: 'https://eips.ethereum.org/EIPS/eip-7710' },
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
term: 'AuthorityChainEnvelope',
|
|
98
|
+
iri: A('AuthorityChainEnvelope'),
|
|
99
|
+
label: 'Authority chain',
|
|
100
|
+
plainEnglish: 'The portable, ordered record of how permission flowed from the root to this step.',
|
|
101
|
+
web2: { term: 'nested act delegation chain', standard: 'Token Exchange (RFC 8693)', ref: 'https://www.rfc-editor.org/rfc/rfc8693' },
|
|
102
|
+
web3: { term: 'on-chain delegation chain', standard: 'ERC-7710', ref: 'https://eips.ethereum.org/EIPS/eip-7710' },
|
|
103
|
+
},
|
|
104
|
+
];
|
|
105
|
+
const BY_TERM = new Map(GROUNDED_VOCABULARY.map((t) => [t.term, t]));
|
|
106
|
+
/** Look up a grounded term by its canonical name (the TS/ontology name). */
|
|
107
|
+
export function groundedTerm(term) {
|
|
108
|
+
return BY_TERM.get(term);
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=grounded-vocabulary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grounded-vocabulary.js","sourceRoot":"","sources":["../src/grounded-vocabulary.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,EAAE;AACF,+GAA+G;AAC/G,gHAAgH;AAChH,gHAAgH;AAChH,iHAAiH;AACjH,8FAA8F;AAE9F,2GAA2G;AAC3G,uGAAuG;AACvG,MAAM,UAAU,GAAG,yCAAyC,CAAC;AA4B7D,MAAM,CAAC,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,GAAG,UAAU,GAAG,KAAK,EAAE,CAAC;AAE7D,gHAAgH;AAChH,MAAM,CAAC,MAAM,mBAAmB,GAA4B;IAC1D;QACE,IAAI,EAAE,oBAAoB;QAC1B,GAAG,EAAE,CAAC,CAAC,oBAAoB,CAAC;QAC5B,KAAK,EAAE,mBAAmB;QAC1B,YAAY,EAAE,uFAAuF;QACrG,IAAI,EAAE,EAAE,IAAI,EAAE,gCAAgC,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,EAAE,kCAAkC,EAAE;QAClH,IAAI,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,GAAG,EAAE,yCAAyC,EAAE;KACvH;IACD;QACE,IAAI,EAAE,wBAAw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@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** The canonical kin terms (`aphh:*`), by local name. */
|
|
2
|
+
export declare const KIN_TERMS: readonly ["spouse", "child", "parent", "sibling"];
|
|
3
|
+
export type KinTerm = (typeof KIN_TERMS)[number];
|
|
4
|
+
/** The words people say → the term the T-box declares (its `skos:prefLabel` or an `skos:altLabel`). */
|
|
5
|
+
export declare const KIN_WORD_FOR: Readonly<Record<string, KinTerm>>;
|
|
6
|
+
/** The T-box term a said word names, or null — null means "keep their word", never "guess the nearest". */
|
|
7
|
+
export declare function kinTermFor(said: string): KinTerm | null;
|
|
8
|
+
/** The IRI of a kin term, for a record that wants to say which term it means. */
|
|
9
|
+
export declare function kinIri(term: KinTerm): string;
|
|
10
|
+
/** The household roles, in the order a person would read them. Bound to `aphh:HouseholdRole` members. */
|
|
11
|
+
export declare const HOUSEHOLD_ROLES: readonly ["member", "guardian", "dependent"];
|
|
12
|
+
export type HouseholdRole = (typeof HOUSEHOLD_ROLES)[number];
|
|
13
|
+
/**
|
|
14
|
+
* The role a said word names. `member` is the DEFAULT and the ordinary case — an adult with no
|
|
15
|
+
* dependency in either direction — and defaulting to it is safe precisely because the role grants
|
|
16
|
+
* nothing: a guardian's ability to act for a dependent is a delegation, never this word.
|
|
17
|
+
*/
|
|
18
|
+
export declare function householdRoleFor(said: string | undefined): HouseholdRole;
|
|
19
|
+
//# sourceMappingURL=household.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"household.d.ts","sourceRoot":"","sources":["../src/household.ts"],"names":[],"mappings":"AAcA,yDAAyD;AACzD,eAAO,MAAM,SAAS,mDAAoD,CAAC;AAC3E,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,uGAAuG;AACvG,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAK1D,CAAC;AAEF,2GAA2G;AAC3G,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAEvD;AAED,iFAAiF;AACjF,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAE5C;AAED,yGAAyG;AACzG,eAAO,MAAM,eAAe,8CAA+C,CAAC;AAC5E,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,CAGxE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// THE HOUSEHOLD'S OWN VOCABULARY — spec 363 W4.
|
|
2
|
+
//
|
|
3
|
+
// The T-box declares the kin terms and their `skos:altLabel`s (`aphh:child` is also "daughter" and
|
|
4
|
+
// "son"). This is that list, compiled — the same arrangement `party-roles` has with the classes it
|
|
5
|
+
// binds, and for the same reason: a resolver runs inside a request and cannot query a triple store
|
|
6
|
+
// (spec 355 §1), while a second hand-kept synonym table in each caller is how "daughter" ended up
|
|
7
|
+
// recorded as `otherKin` in one place and matched as `child` in another.
|
|
8
|
+
//
|
|
9
|
+
// DELIBERATELY SMALL, and the T-box says why: kinship vocabularies are bottomless, and the only thing a
|
|
10
|
+
// resolver needs from this one is enough to understand "my daughter" when somebody says it. A word not
|
|
11
|
+
// here is kept VERBATIM as the household's own label rather than squeezed into the nearest term.
|
|
12
|
+
const AP_HH_NS = 'https://agenticprimitives.dev/ns/household#';
|
|
13
|
+
/** The canonical kin terms (`aphh:*`), by local name. */
|
|
14
|
+
export const KIN_TERMS = ['spouse', 'child', 'parent', 'sibling'];
|
|
15
|
+
/** The words people say → the term the T-box declares (its `skos:prefLabel` or an `skos:altLabel`). */
|
|
16
|
+
export const KIN_WORD_FOR = {
|
|
17
|
+
spouse: 'spouse', wife: 'spouse', husband: 'spouse', partner: 'spouse',
|
|
18
|
+
child: 'child', daughter: 'child', son: 'child', kid: 'child',
|
|
19
|
+
parent: 'parent', mother: 'parent', father: 'parent', mom: 'parent', mum: 'parent', dad: 'parent',
|
|
20
|
+
sibling: 'sibling', sister: 'sibling', brother: 'sibling',
|
|
21
|
+
};
|
|
22
|
+
/** The T-box term a said word names, or null — null means "keep their word", never "guess the nearest". */
|
|
23
|
+
export function kinTermFor(said) {
|
|
24
|
+
return KIN_WORD_FOR[said.trim().toLowerCase().replace(/^(my|our)\s+/, '')] ?? null;
|
|
25
|
+
}
|
|
26
|
+
/** The IRI of a kin term, for a record that wants to say which term it means. */
|
|
27
|
+
export function kinIri(term) {
|
|
28
|
+
return `${AP_HH_NS}${term}`;
|
|
29
|
+
}
|
|
30
|
+
/** The household roles, in the order a person would read them. Bound to `aphh:HouseholdRole` members. */
|
|
31
|
+
export const HOUSEHOLD_ROLES = ['member', 'guardian', 'dependent'];
|
|
32
|
+
/**
|
|
33
|
+
* The role a said word names. `member` is the DEFAULT and the ordinary case — an adult with no
|
|
34
|
+
* dependency in either direction — and defaulting to it is safe precisely because the role grants
|
|
35
|
+
* nothing: a guardian's ability to act for a dependent is a delegation, never this word.
|
|
36
|
+
*/
|
|
37
|
+
export function householdRoleFor(said) {
|
|
38
|
+
const w = String(said ?? '').trim().toLowerCase();
|
|
39
|
+
return HOUSEHOLD_ROLES.includes(w) ? w : 'member';
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=household.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"household.js","sourceRoot":"","sources":["../src/household.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,EAAE;AACF,mGAAmG;AACnG,mGAAmG;AACnG,mGAAmG;AACnG,kGAAkG;AAClG,yEAAyE;AACzE,EAAE;AACF,wGAAwG;AACxG,uGAAuG;AACvG,iGAAiG;AAEjG,MAAM,QAAQ,GAAG,6CAA6C,CAAC;AAE/D,yDAAyD;AACzD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,QA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