@agenticprimitives/capability-claims 0.0.0-alpha.19 → 0.0.0-alpha.20

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 CHANGED
@@ -15,6 +15,22 @@ Capability **claim** credentials (`SkillClaimCredential`) and on-chain `SkillDef
15
15
  | Agent Skill package | SKILL.md procedural playbook |
16
16
  | MCP tool | Executable operation |
17
17
 
18
+ ## Card curation (spec 347 §5)
19
+
20
+ Pure helpers that take vault claims to a public A2A card without ever widening disclosure:
21
+
22
+ ```ts
23
+ import { selectPublicSkillClaims, buildA2ASkillCandidates, mapSkillClaimToTaxonomy } from '@agenticprimitives/capability-claims';
24
+
25
+ const { selected, omitted } = selectPublicSkillClaims(claims, { policyId: 'card-1', maxSkills: 12 });
26
+ const { candidates, diagnostics } = buildA2ASkillCandidates(selected, definitions); // id = the stable CURIE
27
+ const { mapping, status } = mapSkillClaimToTaxonomy('adv:asset-allocation', mappings, { taxonomy: 'oasf', taxonomyVersion: '1.1.0' });
28
+ ```
29
+
30
+ - Only `public` / `public-coarse` claims are ever selected; a policy naming a private visibility discloses nothing. Every omission is reported with a reason.
31
+ - A candidate's `id` is the capability's stable id (the CURIE `computeSkillId` hashes); proficiency, evidence commitments and nonces never leave the claim.
32
+ - `SkillTaxonomyMappingV1.relation` (`exact | close | broad | narrow`) is a SKOS mapping relation (`skosRelationFor`). A mapping asserted for another taxonomy version is `review-required`, never silently reused; `broad`/`narrow` without evidence yields an `evidenceNeeded` diagnostic.
33
+
18
34
  ## Import
19
35
 
20
36
  ```ts
@@ -22,3 +38,22 @@ import { buildSkillClaimCredential, type CapabilityDefinition } from '@agenticpr
22
38
  ```
23
39
 
24
40
  Legacy alias: `@agenticprimitives/agent-skills` re-exports this package.
41
+
42
+ ## Seeded catalog (ADR-0051) — `src/catalog/`
43
+
44
+ The definitions an agent SELECTS from. `listCapabilityDefinitions` · `getCapabilityDefinition` ·
45
+ `mappingsFor` · `isKnownCapabilityId`.
46
+
47
+ **Read-only this wave.** `SkillDefinitionRegistry` can enumerate on-chain definitions and is empty;
48
+ nothing here is minted to it yet, so this module is the source of truth for what may be claimed. When
49
+ definitions are published on chain it becomes a projection of that registry and the ids do not change —
50
+ an id is a CURIE, and its keccak is the on-chain `skillId`.
51
+
52
+ Why a catalog: the editor used to slug free text into an id, so two agents describing one ability
53
+ produced two ids and a matcher could not tell they matched.
54
+
55
+ **Mappings assert something, so they are sparse on purpose.** No OASF or HCS-26 class id appears unless
56
+ it can be cited against a published schema; the 45 advisory rows are unmapped, and the explorer says
57
+ "no mapping at this taxonomy version" rather than showing an invented class that would read as
58
+ authority. `hcs26` is the skill taxon — `hcs14` is UAID, an agent identifier, and a capability does not
59
+ map to one.
@@ -4,6 +4,7 @@
4
4
  * **Capability** is the stable semantic noun. Standards-specific "skill" objects are
5
5
  * named projections — never merge OASF taxon, A2A AgentSkill, SKILL.md package, or MCP tool.
6
6
  */
7
+ import type { AdvertisedCapabilityV1 } from '@agenticprimitives/types';
7
8
  /** Stable Agentic Primitives semantic capability (canonical source of truth). */
8
9
  export interface CapabilityDefinition {
9
10
  id: string;
@@ -17,16 +18,13 @@ export interface OasfSkillTaxonRef {
17
18
  id: number;
18
19
  name: string;
19
20
  }
20
- /** Public A2A Agent Card projection — advertisement, not canonical definition. */
21
- export interface A2aAgentSkillDescriptor {
22
- id: string;
23
- name: string;
24
- description: string;
25
- tags: string[];
26
- examples?: string[];
27
- inputModes?: string[];
28
- outputModes?: string[];
29
- }
21
+ /**
22
+ * @deprecated Use `AdvertisedCapabilityV1` from `@agenticprimitives/types`. Kept as an alias so existing
23
+ * importers keep compiling; the name says "skill", which now means a SKILL.md playbook and nothing else
24
+ * (ADR-0051). What this shape describes is an advertised CAPABILITY — the A2A card calls it `skills[]`
25
+ * on the wire, and translating that is the A2A projector's job, not this type's.
26
+ */
27
+ export type A2aAgentSkillDescriptor = AdvertisedCapabilityV1;
30
28
  /** Installed procedural package following the Agent Skills standard (SKILL.md). */
31
29
  export interface AgentSkillPackageRef {
32
30
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"capability-vocabulary.d.ts","sourceRoot":"","sources":["../src/capability-vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,iFAAiF;AACjF,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,+DAA+D;AAC/D,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,kFAAkF;AAClF,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,mFAAmF;AACnF,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,yEAAyE;AACzE,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wEAAwE;AACxE,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB"}
1
+ {"version":3,"file":"capability-vocabulary.d.ts","sourceRoot":"","sources":["../src/capability-vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,iFAAiF;AACjF,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,+DAA+D;AAC/D,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,sBAAsB,CAAC;AAE7D,mFAAmF;AACnF,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,yEAAyE;AACzE,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wEAAwE;AACxE,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Card curation — capability claims → eligible PUBLIC claims → A2A skill candidates → taxonomy
3
+ * mappings (spec 347 §5; ADR-0062 §4; ADR-0051).
4
+ *
5
+ * The pipeline this module owns is the LEFT half of spec 347 §5:
6
+ *
7
+ * claims (vault, with visibility) ─▶ disclosure policy ─▶ eligible public claims
8
+ * ─▶ A2A skill candidates (A2aAgentSkillDescriptor) ─▶ taxonomy mapping (OASF / HCS-14 …)
9
+ *
10
+ * Everything here is PURE: no I/O, no clock, no network. Two invariants the tests pin:
11
+ *
12
+ * 1. PUBLIC DISCLOSURE ONLY NARROWS. A policy can omit an already-public claim; it can never
13
+ * widen a private one. `allowVisibilities` is typed to the two public values and the runtime
14
+ * intersects with them again, so a policy that names `private-commitment` discloses nothing.
15
+ * Nothing private (proficiency, evidence commitment, nonce, validity) reaches a candidate.
16
+ * 2. AP IDS STAY CANONICAL. An A2A skill candidate's `id` is the capability's STABLE id string
17
+ * (the CURIE whose keccak is the on-chain skillId — tbox/skills.ttl `aps:capabilityId`), never
18
+ * a target taxonomy's identifier. A taxonomy version change makes a mapping review-required;
19
+ * it is never silently reused.
20
+ */
21
+ import type { CanonicalAgentId, EvidenceRefV1, ProjectionDiagnosticV1 } from '@agenticprimitives/types';
22
+ import type { A2aAgentSkillDescriptor, CapabilityDefinition } from './capability-vocabulary.js';
23
+ import { type Hex32, type SkillClaimCredential, type SkillVisibility } from './index.js';
24
+ /** The only visibilities a public card may ever carry. The runtime re-checks against this set. */
25
+ export type PublicSkillVisibility = Extract<SkillVisibility, 'public' | 'public-coarse'>;
26
+ /** Which claims may leave the vault for a public card. Narrows; never widens (spec 347 §5). */
27
+ export interface SkillDisclosurePolicyV1 {
28
+ policyId: string;
29
+ /** Defaults to both public values. A non-public value here is ignored, not honoured. */
30
+ allowVisibilities?: readonly PublicSkillVisibility[];
31
+ /** On-chain skillIds (keccak of the stable id) that MAY be disclosed. Absent = every public claim. */
32
+ allowedDefinitionIds?: readonly Hex32[];
33
+ /** On-chain skillIds that MUST NOT be disclosed. Denial wins over allowance. */
34
+ deniedDefinitionIds?: readonly Hex32[];
35
+ /** Upper bound on selected claims; applied last, in claimId order. */
36
+ maxSkills?: number;
37
+ /** A claim carrying a proficiencyScore without an evidenceCommit is omitted. */
38
+ requireEvidenceForProficiency?: boolean;
39
+ }
40
+ export type SkillOmissionReason = 'visibility' | 'denied' | 'not-allowed' | 'over-max' | 'evidence-missing';
41
+ export interface SkillSelectionResultV1 {
42
+ selected: SkillClaimCredential[];
43
+ omitted: Array<{
44
+ claimId: Hex32;
45
+ reason: SkillOmissionReason;
46
+ }>;
47
+ }
48
+ /**
49
+ * Select the claims a public card may disclose. Deterministic: claims are ordered by `claimId`
50
+ * (case-insensitive) before any rule runs, so `maxSkills` cuts the same claims every time.
51
+ */
52
+ export declare function selectPublicSkillClaims(claims: readonly SkillClaimCredential[], policy: SkillDisclosurePolicyV1): SkillSelectionResultV1;
53
+ /** A capability definition as the curation step needs it: the vocabulary type plus the on-chain kind. */
54
+ export interface CurationCapabilityDefinition extends CapabilityDefinition {
55
+ /** The on-chain SKILL_KIND value (Leaf / Domain / Custom). Absent = no kind tag is emitted. */
56
+ skillKind?: Hex32;
57
+ }
58
+ export interface A2ASkillCandidateOptions {
59
+ tags?: readonly string[];
60
+ examples?: readonly string[];
61
+ inputModes?: readonly string[];
62
+ outputModes?: readonly string[];
63
+ }
64
+ /** Tag prefix carrying the on-chain kind slug (`ap-kind:leaf` …). */
65
+ export declare const AP_KIND_TAG_PREFIX = "ap-kind:";
66
+ /** Every candidate carries this tag so a consumer can tell an AP-curated skill from a hand-authored one. */
67
+ export declare const AP_CAPABILITY_TAG = "ap:capability";
68
+ /** The `ap-kind:` slug for an on-chain SKILL_KIND value, or null when it is not a known kind. */
69
+ export declare function skillKindSlug(skillKind: Hex32): string | null;
70
+ /**
71
+ * Build ONE A2A skill descriptor from a selected claim and its capability definition.
72
+ *
73
+ * `id` is the definition's stable id (the CURIE); the claim's on-chain skillId MUST equal
74
+ * `computeSkillId(definition.id)` or the pairing is wrong and this throws — a candidate advertising
75
+ * one capability under another's id is exactly the drift ADR-0051 forbids. Nothing private from the
76
+ * claim (proficiency, evidence commitment, nonce, validity window) is copied.
77
+ */
78
+ export declare function buildA2ASkillCandidate(claim: SkillClaimCredential, definition: CurationCapabilityDefinition, opts?: A2ASkillCandidateOptions): A2aAgentSkillDescriptor;
79
+ export interface A2ASkillCandidatesResultV1 {
80
+ candidates: A2aAgentSkillDescriptor[];
81
+ /** One `missingDefinition` diagnostic per claim whose definition was not supplied. */
82
+ diagnostics: ProjectionDiagnosticV1[];
83
+ }
84
+ /** Diagnostic code emitted when a selected claim has no matching definition. */
85
+ export declare const DIAG_MISSING_DEFINITION = "missingDefinition";
86
+ /**
87
+ * Build candidates for every selected claim. Definitions are matched by `computeSkillId(def.id)`;
88
+ * a claim with no definition is REPORTED, never silently dropped (a loss report is mandatory —
89
+ * spec 347 §0.5). Candidate order follows `selected` (already claimId-ordered by the selector).
90
+ */
91
+ export declare function buildA2ASkillCandidates(selected: readonly SkillClaimCredential[], definitions: readonly CurationCapabilityDefinition[], opts?: (claim: SkillClaimCredential, definition: CurationCapabilityDefinition) => A2ASkillCandidateOptions): A2ASkillCandidatesResultV1;
92
+ export type TaxonomyRelation = 'exact' | 'close' | 'broad' | 'narrow';
93
+ /**
94
+ * One assertion that an AP capability aligns with a class in an external taxonomy. AP ids stay
95
+ * canonical; the taxonomy is a projection target. `relation` is a SKOS mapping relation
96
+ * (tbox/skills.ttl `aps:taxonomyRelation`). Evidence, never authority.
97
+ */
98
+ export interface SkillTaxonomyMappingV1 {
99
+ /** The stable AP capability id (the CURIE `computeSkillId` hashes) — never the on-chain hash. */
100
+ apSkillId: string;
101
+ /** The taxonomy family. `hcs26` is the SKILL/CAPABILITY taxon — NOT `hcs14`, which is UAID, an agent
102
+ * IDENTIFIER standard. Mapping a capability to a UAID class would be a category error dressed as a
103
+ * crosswalk, so `hcs14` stays only for records already written under it. */
104
+ taxonomy: 'oasf' | 'hcs26' | 'hcs14' | (string & {});
105
+ taxonomyVersion: string;
106
+ targetClassId: string;
107
+ relation: TaxonomyRelation;
108
+ assertedBy: CanonicalAgentId;
109
+ /** ISO-8601 timestamp. */
110
+ assertedAt: string;
111
+ evidence?: EvidenceRefV1[];
112
+ }
113
+ /** The SKOS mapping-relation IRI for a `relation` value. */
114
+ export declare function skosRelationFor(relation: TaxonomyRelation): string;
115
+ /** Diagnostic codes `validateTaxonomyMapping` emits. */
116
+ export declare const TAXONOMY_DIAG: {
117
+ readonly apSkillId: "taxonomyMapping.apSkillId";
118
+ readonly taxonomy: "taxonomyMapping.taxonomy";
119
+ readonly taxonomyVersion: "taxonomyMapping.taxonomyVersion";
120
+ readonly targetClassId: "taxonomyMapping.targetClassId";
121
+ readonly relation: "taxonomyMapping.relation";
122
+ readonly assertedBy: "taxonomyMapping.assertedBy";
123
+ readonly assertedAt: "taxonomyMapping.assertedAt";
124
+ readonly evidenceNeeded: "taxonomyMapping.evidenceNeeded";
125
+ };
126
+ /**
127
+ * Shape-check one mapping. `broad` / `narrow` without evidence is not an error — it is an
128
+ * `evidenceNeeded` diagnostic, because an inexact alignment is a judgement someone must be able to
129
+ * audit. `exact` / `close` may stand on the asserter's signature alone.
130
+ */
131
+ export declare function validateTaxonomyMapping(m: SkillTaxonomyMappingV1): ProjectionDiagnosticV1[];
132
+ export type TaxonomyMappingStatus = 'current' | 'review-required' | 'unmapped';
133
+ export interface TaxonomyMappingLookupV1 {
134
+ mapping: SkillTaxonomyMappingV1 | null;
135
+ /** `review-required` = a mapping exists only for ANOTHER taxonomy version; never reused as current. */
136
+ status: TaxonomyMappingStatus;
137
+ }
138
+ /**
139
+ * Find the mapping for one AP capability into one taxonomy AT one version.
140
+ *
141
+ * A mapping asserted against a different `taxonomyVersion` is returned with `review-required`
142
+ * — it is the best lead a reviewer has, but it is NEVER treated as current (spec 347 §0.6: an
143
+ * upgrade makes projections review-required, never silently rewritten). Deterministic choice among
144
+ * several: exact > close > broad > narrow, then most recent `assertedAt`.
145
+ */
146
+ export declare function mapSkillClaimToTaxonomy(apSkillId: string, mappings: readonly SkillTaxonomyMappingV1[], target: {
147
+ taxonomy: string;
148
+ taxonomyVersion: string;
149
+ }): TaxonomyMappingLookupV1;
150
+ //# sourceMappingURL=card-curation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card-curation.d.ts","sourceRoot":"","sources":["../src/card-curation.ts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6E;IAC7E,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACrD,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;CAC5B;AAUD,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAIlE;AAID,wDAAwD;AACxD,eAAO,MAAM,aAAa;;;;;;;;;CAShB,CAAC;AAEX;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,sBAAsB,GAAG,sBAAsB,EAAE,CAuB3F;AAED,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,iBAAiB,GAAG,UAAU,CAAC;AAE/E,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACvC,uGAAuG;IACvG,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAYD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,SAAS,sBAAsB,EAAE,EAC3C,MAAM,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,GACpD,uBAAuB,CAOzB"}
@@ -0,0 +1,235 @@
1
+ /**
2
+ * Card curation — capability claims → eligible PUBLIC claims → A2A skill candidates → taxonomy
3
+ * mappings (spec 347 §5; ADR-0062 §4; ADR-0051).
4
+ *
5
+ * The pipeline this module owns is the LEFT half of spec 347 §5:
6
+ *
7
+ * claims (vault, with visibility) ─▶ disclosure policy ─▶ eligible public claims
8
+ * ─▶ A2A skill candidates (A2aAgentSkillDescriptor) ─▶ taxonomy mapping (OASF / HCS-14 …)
9
+ *
10
+ * Everything here is PURE: no I/O, no clock, no network. Two invariants the tests pin:
11
+ *
12
+ * 1. PUBLIC DISCLOSURE ONLY NARROWS. A policy can omit an already-public claim; it can never
13
+ * widen a private one. `allowVisibilities` is typed to the two public values and the runtime
14
+ * intersects with them again, so a policy that names `private-commitment` discloses nothing.
15
+ * Nothing private (proficiency, evidence commitment, nonce, validity) reaches a candidate.
16
+ * 2. AP IDS STAY CANONICAL. An A2A skill candidate's `id` is the capability's STABLE id string
17
+ * (the CURIE whose keccak is the on-chain skillId — tbox/skills.ttl `aps:capabilityId`), never
18
+ * a target taxonomy's identifier. A taxonomy version change makes a mapping review-required;
19
+ * it is never silently reused.
20
+ */
21
+ import { computeSkillId, SKILL_KIND } from './index.js';
22
+ const PUBLIC_VISIBILITIES = ['public', 'public-coarse'];
23
+ function lower(h) {
24
+ return h.toLowerCase();
25
+ }
26
+ /**
27
+ * Select the claims a public card may disclose. Deterministic: claims are ordered by `claimId`
28
+ * (case-insensitive) before any rule runs, so `maxSkills` cuts the same claims every time.
29
+ */
30
+ export function selectPublicSkillClaims(claims, policy) {
31
+ const requested = policy.allowVisibilities ?? PUBLIC_VISIBILITIES;
32
+ // Intersect with the public set: a policy cannot widen (invariant 1).
33
+ const allowVis = new Set(requested.filter((v) => PUBLIC_VISIBILITIES.includes(v)));
34
+ const denied = new Set((policy.deniedDefinitionIds ?? []).map(lower));
35
+ const allowed = policy.allowedDefinitionIds ? new Set(policy.allowedDefinitionIds.map(lower)) : null;
36
+ const max = policy.maxSkills;
37
+ if (max !== undefined && (!Number.isInteger(max) || max < 0)) {
38
+ throw new Error('capability-claims: maxSkills must be a non-negative integer');
39
+ }
40
+ const ordered = [...claims].sort((a, b) => lower(a.credentialSubject.claimId) < lower(b.credentialSubject.claimId) ? -1 : 1);
41
+ const selected = [];
42
+ const omitted = [];
43
+ for (const claim of ordered) {
44
+ const s = claim.credentialSubject;
45
+ const skillId = lower(s.definition.skillId);
46
+ let reason = null;
47
+ if (!allowVis.has(s.visibility))
48
+ reason = 'visibility';
49
+ else if (denied.has(skillId))
50
+ reason = 'denied';
51
+ else if (allowed && !allowed.has(skillId))
52
+ reason = 'not-allowed';
53
+ else if (policy.requireEvidenceForProficiency && s.proficiencyScore !== undefined && !s.evidenceCommit)
54
+ reason = 'evidence-missing';
55
+ else if (max !== undefined && selected.length >= max)
56
+ reason = 'over-max';
57
+ if (reason)
58
+ omitted.push({ claimId: s.claimId, reason });
59
+ else
60
+ selected.push(claim);
61
+ }
62
+ return { selected, omitted };
63
+ }
64
+ /** Tag prefix carrying the on-chain kind slug (`ap-kind:leaf` …). */
65
+ export const AP_KIND_TAG_PREFIX = 'ap-kind:';
66
+ /** Every candidate carries this tag so a consumer can tell an AP-curated skill from a hand-authored one. */
67
+ export const AP_CAPABILITY_TAG = 'ap:capability';
68
+ // Built lazily: this module and index.ts import each other, and SKILL_KIND is a const that may not
69
+ // have initialised yet at this module's evaluation time.
70
+ let kindSlugs;
71
+ function kindSlugMap() {
72
+ return (kindSlugs ??= new Map(Object.entries(SKILL_KIND).map(([k, v]) => [lower(v), k.toLowerCase()])));
73
+ }
74
+ /** The `ap-kind:` slug for an on-chain SKILL_KIND value, or null when it is not a known kind. */
75
+ export function skillKindSlug(skillKind) {
76
+ return kindSlugMap().get(lower(skillKind)) ?? null;
77
+ }
78
+ /**
79
+ * Build ONE A2A skill descriptor from a selected claim and its capability definition.
80
+ *
81
+ * `id` is the definition's stable id (the CURIE); the claim's on-chain skillId MUST equal
82
+ * `computeSkillId(definition.id)` or the pairing is wrong and this throws — a candidate advertising
83
+ * one capability under another's id is exactly the drift ADR-0051 forbids. Nothing private from the
84
+ * claim (proficiency, evidence commitment, nonce, validity window) is copied.
85
+ */
86
+ export function buildA2ASkillCandidate(claim, definition, opts = {}) {
87
+ const expected = computeSkillId(definition.id);
88
+ if (lower(expected) !== lower(claim.credentialSubject.definition.skillId)) {
89
+ throw new Error(`capability-claims: definition '${definition.id}' does not match claim skillId ${claim.credentialSubject.definition.skillId}`);
90
+ }
91
+ const tags = [AP_CAPABILITY_TAG];
92
+ if (definition.skillKind) {
93
+ const slug = skillKindSlug(definition.skillKind);
94
+ if (slug)
95
+ tags.push(`${AP_KIND_TAG_PREFIX}${slug}`);
96
+ }
97
+ for (const t of opts.tags ?? [])
98
+ if (!tags.includes(t))
99
+ tags.push(t);
100
+ const out = {
101
+ id: definition.id,
102
+ name: definition.title,
103
+ description: definition.description,
104
+ tags,
105
+ };
106
+ if (opts.examples?.length)
107
+ out.examples = [...opts.examples];
108
+ if (opts.inputModes?.length)
109
+ out.inputModes = [...opts.inputModes];
110
+ if (opts.outputModes?.length)
111
+ out.outputModes = [...opts.outputModes];
112
+ return out;
113
+ }
114
+ /** Diagnostic code emitted when a selected claim has no matching definition. */
115
+ export const DIAG_MISSING_DEFINITION = 'missingDefinition';
116
+ /**
117
+ * Build candidates for every selected claim. Definitions are matched by `computeSkillId(def.id)`;
118
+ * a claim with no definition is REPORTED, never silently dropped (a loss report is mandatory —
119
+ * spec 347 §0.5). Candidate order follows `selected` (already claimId-ordered by the selector).
120
+ */
121
+ export function buildA2ASkillCandidates(selected, definitions, opts) {
122
+ const byId = new Map();
123
+ for (const d of definitions)
124
+ byId.set(lower(computeSkillId(d.id)), d);
125
+ const candidates = [];
126
+ const diagnostics = [];
127
+ for (const claim of selected) {
128
+ const s = claim.credentialSubject;
129
+ const def = byId.get(lower(s.definition.skillId));
130
+ if (!def) {
131
+ diagnostics.push({
132
+ code: DIAG_MISSING_DEFINITION,
133
+ severity: 'warning',
134
+ sourcePointer: `/claims/${s.claimId}`,
135
+ target: 'a2a',
136
+ message: `No capability definition supplied for skillId ${s.definition.skillId}; claim ${s.claimId} omitted from the card.`,
137
+ suggestedFix: { kind: 'manual', description: 'Supply the CapabilityDefinition whose stable id hashes to this skillId.' },
138
+ });
139
+ continue;
140
+ }
141
+ candidates.push(buildA2ASkillCandidate(claim, def, opts?.(claim, def)));
142
+ }
143
+ return { candidates, diagnostics };
144
+ }
145
+ const TAXONOMY_RELATIONS = ['exact', 'close', 'broad', 'narrow'];
146
+ const SKOS = 'http://www.w3.org/2004/02/skos/core#';
147
+ const SKOS_RELATION = {
148
+ exact: `${SKOS}exactMatch`,
149
+ close: `${SKOS}closeMatch`,
150
+ broad: `${SKOS}broadMatch`,
151
+ narrow: `${SKOS}narrowMatch`,
152
+ };
153
+ /** The SKOS mapping-relation IRI for a `relation` value. */
154
+ export function skosRelationFor(relation) {
155
+ const iri = SKOS_RELATION[relation];
156
+ if (!iri)
157
+ throw new Error(`capability-claims: unknown taxonomy relation '${String(relation)}'`);
158
+ return iri;
159
+ }
160
+ const CAIP10_RE = /^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}:[-.%a-zA-Z0-9]{1,128}$/;
161
+ /** Diagnostic codes `validateTaxonomyMapping` emits. */
162
+ export const TAXONOMY_DIAG = {
163
+ apSkillId: 'taxonomyMapping.apSkillId',
164
+ taxonomy: 'taxonomyMapping.taxonomy',
165
+ taxonomyVersion: 'taxonomyMapping.taxonomyVersion',
166
+ targetClassId: 'taxonomyMapping.targetClassId',
167
+ relation: 'taxonomyMapping.relation',
168
+ assertedBy: 'taxonomyMapping.assertedBy',
169
+ assertedAt: 'taxonomyMapping.assertedAt',
170
+ evidenceNeeded: 'taxonomyMapping.evidenceNeeded',
171
+ };
172
+ /**
173
+ * Shape-check one mapping. `broad` / `narrow` without evidence is not an error — it is an
174
+ * `evidenceNeeded` diagnostic, because an inexact alignment is a judgement someone must be able to
175
+ * audit. `exact` / `close` may stand on the asserter's signature alone.
176
+ */
177
+ export function validateTaxonomyMapping(m) {
178
+ const out = [];
179
+ const err = (code, pointer, message) => out.push({ code, severity: 'error', sourcePointer: pointer, message });
180
+ const nonEmpty = (v) => typeof v === 'string' && v.trim().length > 0;
181
+ if (!nonEmpty(m.apSkillId))
182
+ err(TAXONOMY_DIAG.apSkillId, '/apSkillId', 'apSkillId MUST be the stable AP capability id.');
183
+ if (!nonEmpty(m.taxonomy))
184
+ err(TAXONOMY_DIAG.taxonomy, '/taxonomy', 'taxonomy MUST name the target taxonomy family.');
185
+ if (!nonEmpty(m.taxonomyVersion))
186
+ err(TAXONOMY_DIAG.taxonomyVersion, '/taxonomyVersion', 'taxonomyVersion MUST pin the taxonomy version the class id is valid in.');
187
+ if (!nonEmpty(m.targetClassId))
188
+ err(TAXONOMY_DIAG.targetClassId, '/targetClassId', 'targetClassId MUST identify the target class.');
189
+ if (!TAXONOMY_RELATIONS.includes(m.relation))
190
+ err(TAXONOMY_DIAG.relation, '/relation', `relation MUST be one of ${TAXONOMY_RELATIONS.join(' | ')}.`);
191
+ if (!nonEmpty(m.assertedBy) || !CAIP10_RE.test(m.assertedBy))
192
+ err(TAXONOMY_DIAG.assertedBy, '/assertedBy', 'assertedBy MUST be a CAIP-10 CanonicalAgentId.');
193
+ if (!nonEmpty(m.assertedAt) || Number.isNaN(Date.parse(m.assertedAt)))
194
+ err(TAXONOMY_DIAG.assertedAt, '/assertedAt', 'assertedAt MUST be an ISO-8601 timestamp.');
195
+ if ((m.relation === 'broad' || m.relation === 'narrow') && !(m.evidence && m.evidence.length > 0)) {
196
+ out.push({
197
+ code: TAXONOMY_DIAG.evidenceNeeded,
198
+ severity: 'evidenceNeeded',
199
+ sourcePointer: '/evidence',
200
+ target: m.taxonomy,
201
+ message: `A '${m.relation}' alignment to ${m.targetClassId} carries no evidence; an inexact mapping must be auditable.`,
202
+ suggestedFix: { kind: 'manual', description: 'Attach an EvidenceRefV1 (attestation, fetched taxonomy document, or review receipt).' },
203
+ });
204
+ }
205
+ return out;
206
+ }
207
+ const RELATION_RANK = { exact: 0, close: 1, broad: 2, narrow: 3 };
208
+ function preferMapping(a, b) {
209
+ const r = RELATION_RANK[a.relation] - RELATION_RANK[b.relation];
210
+ if (r !== 0)
211
+ return r;
212
+ // Newer assertion first; then target id for a total order.
213
+ if (a.assertedAt !== b.assertedAt)
214
+ return a.assertedAt < b.assertedAt ? 1 : -1;
215
+ return a.targetClassId < b.targetClassId ? -1 : a.targetClassId > b.targetClassId ? 1 : 0;
216
+ }
217
+ /**
218
+ * Find the mapping for one AP capability into one taxonomy AT one version.
219
+ *
220
+ * A mapping asserted against a different `taxonomyVersion` is returned with `review-required`
221
+ * — it is the best lead a reviewer has, but it is NEVER treated as current (spec 347 §0.6: an
222
+ * upgrade makes projections review-required, never silently rewritten). Deterministic choice among
223
+ * several: exact > close > broad > narrow, then most recent `assertedAt`.
224
+ */
225
+ export function mapSkillClaimToTaxonomy(apSkillId, mappings, target) {
226
+ const forSkill = mappings.filter((m) => m.apSkillId === apSkillId && m.taxonomy === target.taxonomy);
227
+ const current = forSkill.filter((m) => m.taxonomyVersion === target.taxonomyVersion).sort(preferMapping);
228
+ if (current.length > 0)
229
+ return { mapping: current[0], status: 'current' };
230
+ const stale = forSkill.sort(preferMapping);
231
+ if (stale.length > 0)
232
+ return { mapping: stale[0], status: 'review-required' };
233
+ return { mapping: null, status: 'unmapped' };
234
+ }
235
+ //# sourceMappingURL=card-curation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card-curation.js","sourceRoot":"","sources":["../src/card-curation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAE,cAAc,EAAE,UAAU,EAA+D,MAAM,YAAY,CAAC;AAMrH,MAAM,mBAAmB,GAAqC,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;AAwB1F,SAAS,KAAK,CAAC,CAAS;IACtB,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;AACzB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAuC,EACvC,MAA+B;IAE/B,MAAM,SAAS,GAAG,MAAM,CAAC,iBAAiB,IAAI,mBAAmB,CAAC;IAClE,sEAAsE;IACtE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAkB,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,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DefinitionRegistry` can enumerate on-chain definitions and is empty; nothing
5
+ * here is minted to it yet, so this module IS the source of truth for what an agent may claim. When
6
+ * definitions are published on chain this becomes a projection of that registry, and the ids do not
7
+ * change: an id is a CURIE, and its keccak is the on-chain `skillId`.
8
+ *
9
+ * WHY A CATALOG AT ALL: the editor used to take free text and slug it into an id, so two agents
10
+ * describing the same ability produced two ids and a matcher could not tell they matched. A definition
11
+ * an agent SELECTS is the same id everywhere by construction.
12
+ *
13
+ * GENERATED FROM `docs/architecture/capability-catalog-advisory.md` §2 — extracted, not transcribed, so
14
+ * the ids and outcome statements are the reviewed ones rather than a retyping of them.
15
+ */
16
+ import type { CapabilityDefinition } from '../capability-vocabulary.js';
17
+ /** A catalog entry: the definition, plus the grouping the explorer lists it under. */
18
+ export interface CatalogCapabilityDefinition extends CapabilityDefinition {
19
+ /** Knowledge domain — presentation only. It groups the explorer; it is not part of the identity. */
20
+ domain: string;
21
+ /** `'substrate'` = an ability this software itself performs; `'advisory'` = a professional service. */
22
+ kind: 'substrate' | 'advisory';
23
+ }
24
+ /** Every definition this deployment offers. Substrate first — an agent is likeliest to claim what it
25
+ * already does. */
26
+ export declare const CAPABILITY_DEFINITIONS: readonly CatalogCapabilityDefinition[];
27
+ //# sourceMappingURL=definitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/catalog/definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAExE,sFAAsF;AACtF,MAAM,WAAW,2BAA4B,SAAQ,oBAAoB;IACvE,oGAAoG;IACpG,MAAM,EAAE,MAAM,CAAC;IACf,uGAAuG;IACvG,IAAI,EAAE,WAAW,GAAG,UAAU,CAAC;CAChC;AA8DD;oBACoB;AACpB,eAAO,MAAM,sBAAsB,EAAE,SAAS,2BAA2B,EAA+C,CAAC"}
@@ -0,0 +1,62 @@
1
+ /** What the RUNTIME performs — the ids faithnet agents already advertise on their live cards, so an
2
+ * agent can select what it is in fact already doing rather than describe it again in free text. */
3
+ const SUBSTRATE = [
4
+ { id: 'messaging.deliver', version: '1', title: 'Deliver a message', description: 'Accept a message addressed to this agent and place it in its owner\'s inbox.', domain: 'Substrate', kind: 'substrate' },
5
+ { id: 'interactions.respond', version: '1', title: 'Respond to an interaction', description: 'Take part in a governed interaction — answer, accept, decline or counter within an exchange.', domain: 'Substrate', kind: 'substrate' },
6
+ { id: 'org.apply', version: '1', title: 'Apply to join', description: 'Receive and process an application to join the organization this agent represents.', domain: 'Substrate', kind: 'substrate' },
7
+ { id: 'interactions.deliverCredential', version: '1', title: 'Deliver a credential', description: 'Accept a verifiable credential issued to this agent and record it in its owner\'s vault.', domain: 'Substrate', kind: 'substrate' },
8
+ ];
9
+ /** The advisory catalog (docs §2) — 45 capabilities across 11 knowledge domains. Not minted; these are
10
+ * what a professional agent would claim, and they exist here so the explorer has something real to
11
+ * show and the editor has something real to offer. */
12
+ const ADVISORY = [
13
+ { id: 'adv:wealth-structuring-review', version: '1', title: 'Wealth Structuring Review', description: 'A family\'s ownership, entity and holding structure is assessed against its stated objectives and a structuring recommendation is issued.', domain: 'Cross-cutting and composite', kind: 'advisory' },
14
+ { id: 'adv:cross-border-position-assessment', version: '1', title: 'Cross-Border Position Assessment', description: 'A position connected to two or more jurisdictions is assessed for conflicts of law, tax and reporting exposure, and a coordinated recommendation is issued.', domain: 'Cross-cutting and composite', kind: 'advisory' },
15
+ { id: 'adv:conflict-of-laws-analysis', version: '1', title: 'Conflict of Laws Analysis', description: 'The law governing a matter with connections to more than one jurisdiction is determined and its recognition and enforcement consequences are stated.', domain: 'Cross-cutting and composite', kind: 'advisory' },
16
+ { id: 'adv:counterparty-risk-analysis', version: '1', title: 'Counterparty Risk Analysis', description: 'The standing, concentration and failure consequences of a bank, custodian, exchange or venue relationship are assessed and a mitigation recommendation issued.', domain: 'Cross-cutting and composite', kind: 'advisory' },
17
+ { id: 'adv:tax-position-analysis', version: '1', title: 'Tax Position Analysis', description: 'A person\'s or entity\'s position under a named tax regime is analysed and the resulting liability, available elections and timing options are stated.', domain: 'Taxation', kind: 'advisory' },
18
+ { id: 'adv:trust-and-entity-taxation', version: '1', title: 'Trust & Entity Taxation', description: 'The tax treatment of a trust, partnership or holding entity and of its beneficiaries or partners is determined.', domain: 'Taxation', kind: 'advisory' },
19
+ { id: 'adv:tax-residency-and-domicile-analysis', version: '1', title: 'Tax Residency & Domicile Analysis', description: 'A person\'s or entity\'s residence and domicile for tax purposes is determined and the evidence required to sustain it is specified.', domain: 'Taxation', kind: 'advisory' },
20
+ { id: 'adv:wealth-and-transfer-tax-analysis', version: '1', title: 'Wealth & Transfer Tax Analysis', description: 'Exposure to net-wealth, gift, inheritance and generation-skipping taxes under a named regime is quantified.', domain: 'Taxation', kind: 'advisory' },
21
+ { id: 'adv:information-reporting-review', version: '1', title: 'Information Reporting Review', description: 'The applicable information-reporting obligations for a holding, entity or relationship are identified and a compliance path is stated.', domain: 'Taxation', kind: 'advisory' },
22
+ { id: 'adv:charitable-tax-planning', version: '1', title: 'Charitable Tax Planning', description: 'The vehicle and sequencing for charitable transfers is determined so that the intended giving is achieved at the intended tax cost.', domain: 'Taxation', kind: 'advisory' },
23
+ { id: 'adv:succession-plan-design', version: '1', title: 'Succession Plan Design', description: 'A plan for the transfer of ownership and control on death or incapacity is designed and documented.', domain: 'Wealth transfer and succession', kind: 'advisory' },
24
+ { id: 'adv:trust-structure-design', version: '1', title: 'Trust Structure Design', description: 'A trust or equivalent fiduciary structure is designed, including its duration, powers, and distribution standards.', domain: 'Wealth transfer and succession', kind: 'advisory' },
25
+ { id: 'adv:testamentary-instrument-review', version: '1', title: 'Testamentary Instrument Review', description: 'Wills and equivalent instruments are drafted or reviewed for validity and effect in each relevant jurisdiction.', domain: 'Wealth transfer and succession', kind: 'advisory' },
26
+ { id: 'adv:forced-heirship-analysis', version: '1', title: 'Forced Heirship & Reserved Share Analysis', description: 'The mandatory-share entitlements of heirs under a civil-law regime are determined and their effect on a proposed plan is stated.', domain: 'Wealth transfer and succession', kind: 'advisory' },
27
+ { id: 'adv:fiduciary-selection-and-succession', version: '1', title: 'Fiduciary Selection & Succession', description: 'Trustees, executors and protectors are selected and appointed, and their own succession is provided for.', domain: 'Wealth transfer and succession', kind: 'advisory' },
28
+ { id: 'adv:asset-titling-and-funding-review', version: '1', title: 'Asset Titling & Funding Review', description: 'Assets are confirmed to be titled into the structures intended to hold them, and gaps are identified for remediation.', domain: 'Wealth transfer and succession', kind: 'advisory' },
29
+ { id: 'adv:investment-policy-design', version: '1', title: 'Investment Policy Design', description: 'An investment policy statement setting objectives, constraints and governance is produced or revised.', domain: 'Investment management', kind: 'advisory' },
30
+ { id: 'adv:portfolio-construction-and-allocation', version: '1', title: 'Portfolio Construction & Allocation', description: 'A target asset allocation and its implementation are determined for a stated mandate.', domain: 'Investment management', kind: 'advisory' },
31
+ { id: 'adv:portfolio-monitoring-and-rebalancing', version: '1', title: 'Portfolio Monitoring & Rebalancing', description: 'A portfolio\'s drift from its policy is measured and a rebalancing action is recommended.', domain: 'Investment management', kind: 'advisory' },
32
+ { id: 'adv:concentrated-position-analysis', version: '1', title: 'Concentrated Position Analysis', description: 'The risk carried by a concentrated holding is quantified and disposition or hedging options are stated.', domain: 'Investment management', kind: 'advisory' },
33
+ { id: 'adv:manager-selection-and-diligence', version: '1', title: 'Manager Selection & Diligence', description: 'An external manager or fund is evaluated and a selection or retention recommendation is issued.', domain: 'Investment management', kind: 'advisory' },
34
+ { id: 'adv:private-fund-diligence', version: '1', title: 'Private Fund Diligence', description: 'A private fund\'s strategy, terms and track record are evaluated and a commitment recommendation is issued.', domain: 'Private markets', kind: 'advisory' },
35
+ { id: 'adv:commitment-pacing-analysis', version: '1', title: 'Commitment Pacing Analysis', description: 'A forward commitment schedule achieving a target private-markets exposure under stated cash-flow constraints is produced.', domain: 'Private markets', kind: 'advisory' },
36
+ { id: 'adv:direct-and-co-investment-underwriting', version: '1', title: 'Direct & Co-Investment Underwriting', description: 'A single direct or co-investment opportunity is underwritten and a decision recommendation is issued.', domain: 'Private markets', kind: 'advisory' },
37
+ { id: 'adv:private-position-liquidity-analysis', version: '1', title: 'Private Position Liquidity Analysis', description: 'Options for realising or restructuring an illiquid private position — secondary sale, continuation vehicle, or hold — are evaluated.', domain: 'Private markets', kind: 'advisory' },
38
+ { id: 'adv:real-asset-underwriting', version: '1', title: 'Real Asset Underwriting', description: 'A real-property, land or infrastructure asset is underwritten across income, operating cost, capital expenditure and exit, and a decision recommendation is issued.', domain: 'Real assets', kind: 'advisory' },
39
+ { id: 'adv:asset-valuation-review', version: '1', title: 'Asset Valuation Review', description: 'A third-party valuation or appraisal is reviewed for method, currency and reasonableness, and a reliance opinion is given.', domain: 'Real assets', kind: 'advisory' },
40
+ { id: 'adv:philanthropic-strategy-design', version: '1', title: 'Philanthropic Strategy Design', description: 'A family\'s giving objectives, themes, horizon and measures of success are articulated as a strategy.', domain: 'Philanthropy', kind: 'advisory' },
41
+ { id: 'adv:philanthropic-vehicle-design', version: '1', title: 'Philanthropic Vehicle Design', description: 'The vehicle for giving — foundation, donor-advised fund, direct, or trust — is selected and its governance designed.', domain: 'Philanthropy', kind: 'advisory' },
42
+ { id: 'adv:grantmaking-diligence', version: '1', title: 'Grantmaking Diligence', description: 'A prospective grantee and grant are diligenced and a funding recommendation is issued.', domain: 'Philanthropy', kind: 'advisory' },
43
+ { id: 'adv:personal-risk-assessment', version: '1', title: 'Personal Risk Assessment', description: 'A family\'s exposures to liability, property, catastrophe, health and personal-security risk are identified and prioritised.', domain: 'Risk and insurance', kind: 'advisory' },
44
+ { id: 'adv:insurance-program-design', version: '1', title: 'Insurance Programme Design', description: 'An insurance programme — limits, layers, retentions and carriers — matching an assessed exposure is designed or reviewed.', domain: 'Risk and insurance', kind: 'advisory' },
45
+ { id: 'adv:life-insurance-liquidity-design', version: '1', title: 'Life Insurance Liquidity Design', description: 'Life cover sized and structured to fund a transfer-tax or buy-out liquidity need is designed.', domain: 'Risk and insurance', kind: 'advisory' },
46
+ { id: 'adv:liquidity-planning', version: '1', title: 'Liquidity Planning', description: 'Forecast cash needs are matched to available sources and a liquidity plan — ladder, reserves, facilities — is produced.', domain: 'Credit and liquidity', kind: 'advisory' },
47
+ { id: 'adv:secured-lending-structuring', version: '1', title: 'Secured Lending Structuring', description: 'A borrowing facility secured on securities, property or other assets is structured and its terms are evaluated.', domain: 'Credit and liquidity', kind: 'advisory' },
48
+ { id: 'adv:covenant-and-margin-risk-analysis', version: '1', title: 'Covenant & Margin Risk Analysis', description: 'The covenant, loan-to-value and margin-call behaviour of an existing facility is stress-tested against stated market scenarios.', domain: 'Credit and liquidity', kind: 'advisory' },
49
+ { id: 'adv:family-governance-design', version: '1', title: 'Family Governance Design', description: 'A family\'s decision rights, forums, policies and escalation paths are designed as a governance system.', domain: 'Family governance', kind: 'advisory' },
50
+ { id: 'adv:family-charter-drafting', version: '1', title: 'Family Charter Drafting', description: 'A family constitution, charter or protocol is drafted and adopted.', domain: 'Family governance', kind: 'advisory' },
51
+ { id: 'adv:family-forum-facilitation', version: '1', title: 'Family Forum Facilitation', description: 'A family council, assembly or owners\' meeting is convened and facilitated to a recorded decision.', domain: 'Family governance', kind: 'advisory' },
52
+ { id: 'adv:next-generation-development', version: '1', title: 'Next-Generation Development', description: 'A programme preparing rising-generation family members for ownership and stewardship is designed and delivered.', domain: 'Family governance', kind: 'advisory' },
53
+ { id: 'adv:family-conflict-resolution', version: '1', title: 'Family Conflict Resolution', description: 'A dispute among family owners is mediated to a documented resolution.', domain: 'Family governance', kind: 'advisory' },
54
+ { id: 'adv:digital-asset-custody-design', version: '1', title: 'Digital Asset Custody Design', description: 'A custody arrangement for digital assets — self, qualified, or hybrid — is designed with its key-management and recovery procedures.', domain: 'Digital assets', kind: 'advisory' },
55
+ { id: 'adv:key-management-and-signing-policy', version: '1', title: 'Key Management & Signing Policy', description: 'Key generation, storage, quorum and signing policy, including multisig and threshold schemes, is specified.', domain: 'Digital assets', kind: 'advisory' },
56
+ { id: 'adv:digital-asset-succession-design', version: '1', title: 'Digital Asset Succession Design', description: 'Access to digital assets on death or incapacity is provided for without weakening live custody.', domain: 'Digital assets', kind: 'advisory' },
57
+ { id: 'adv:onchain-provenance-reporting', version: '1', title: 'On-Chain Provenance Reporting', description: 'Transaction history and source of funds for on-chain holdings are reconstructed and reported to an evidentiary standard.', domain: 'Digital assets', kind: 'advisory' },
58
+ ];
59
+ /** Every definition this deployment offers. Substrate first — an agent is likeliest to claim what it
60
+ * already does. */
61
+ export const CAPABILITY_DEFINITIONS = Object.freeze([...SUBSTRATE, ...ADVISORY]);
62
+ //# sourceMappingURL=definitions.js.map