@agenticprimitives/capability-claims 0.0.0-alpha.18 → 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 +35 -0
- package/dist/capability-vocabulary.d.ts +8 -10
- package/dist/capability-vocabulary.d.ts.map +1 -1
- package/dist/card-curation.d.ts +150 -0
- package/dist/card-curation.d.ts.map +1 -0
- package/dist/card-curation.js +235 -0
- package/dist/card-curation.js.map +1 -0
- package/dist/catalog/definitions.d.ts +27 -0
- package/dist/catalog/definitions.d.ts.map +1 -0
- package/dist/catalog/definitions.js +62 -0
- package/dist/catalog/definitions.js.map +1 -0
- package/dist/catalog/id-shape.d.ts +5 -0
- package/dist/catalog/id-shape.d.ts.map +1 -0
- package/dist/catalog/id-shape.js +27 -0
- package/dist/catalog/id-shape.js.map +1 -0
- package/dist/catalog/index.d.ts +31 -0
- package/dist/catalog/index.d.ts.map +1 -0
- package/dist/catalog/index.js +38 -0
- package/dist/catalog/index.js.map +1 -0
- package/dist/catalog/mappings.d.ts +34 -0
- package/dist/catalog/mappings.d.ts.map +1 -0
- package/dist/catalog/mappings.js +39 -0
- package/dist/catalog/mappings.js.map +1 -0
- package/dist/frontmatter.d.ts +11 -0
- package/dist/frontmatter.d.ts.map +1 -0
- package/dist/frontmatter.js +250 -0
- package/dist/frontmatter.js.map +1 -0
- package/dist/harness-contract.d.ts +359 -0
- package/dist/harness-contract.d.ts.map +1 -0
- package/dist/harness-contract.js +473 -0
- package/dist/harness-contract.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/catalog/definitions.ts"],"names":[],"mappings":"AAyBA;oGACoG;AACpG,MAAM,SAAS,GAAkC;IAC/C,EAAE,EAAE,EAAE,mBAA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AE,KAAK,EAAE,4BAA4B,EAAE,WAAW,EAAE,uEAAuE,EAAE,MAAM,EAAE,mBAAmB,EAAE,IAAI,EAAE,UAAU,EAAE;IAChO,EAAE,EAAE,EAAE,kCAAkC,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,8BAA8B,EAAE,WAAW,EAAE,sIAAsI,EAAE,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,EAAE;IAChS,EAAE,EAAE,EAAE,uCAAuC,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,iCAAiC,EAAE,WAAW,EAAE,6GAA6G,EAAE,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,EAAE;IAC/Q,EAAE,EAAE,EAAE,qCAAqC,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,iCAAiC,EAAE,WAAW,EAAE,iGAAiG,EAAE,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,EAAE;IACjQ,EAAE,EAAE,EAAE,kCAAkC,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,+BAA+B,EAAE,WAAW,EAAE,0HAA0H,EAAE,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,EAAE;CACtR,CAAC;AAEF;oBACoB;AACpB,MAAM,CAAC,MAAM,sBAAsB,GAA2C,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,SAAS,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Is this token a capability id, as opposed to a human label? */
|
|
2
|
+
export declare function isCapabilityId(token: string): boolean;
|
|
3
|
+
/** The capability ids in a comma-separated profile value, deduped, order preserved. */
|
|
4
|
+
export declare function parseCapabilityIds(csv: string | null | undefined): string[];
|
|
5
|
+
//# sourceMappingURL=id-shape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id-shape.d.ts","sourceRoot":"","sources":["../../src/catalog/id-shape.ts"],"names":[],"mappings":"AAiBA,kEAAkE;AAClE,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,EAAE,CAG3E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// What a capability ID looks like — the one place that decides, because three apps were each deciding
|
|
2
|
+
// it differently and two of them were wrong.
|
|
3
|
+
//
|
|
4
|
+
// THE VOCABULARY HAS THREE SHAPES, and any rule written for one silently discards the others:
|
|
5
|
+
// • `adv:tax-position-analysis` — CURIE, prefix and colon
|
|
6
|
+
// • `interactions.deliverCredential` — dotted, and camelCase
|
|
7
|
+
// • `demo-capability-walkthrough` — a bare hyphenated token
|
|
8
|
+
// The test that shipped was `/^[a-z][a-z0-9]*:[a-z0-9][a-z0-9-]*$/i` — a CURIE and nothing else. It
|
|
9
|
+
// dropped every dotted id the substrate catalog uses, so `messaging.deliver` and
|
|
10
|
+
// `interactions.deliverCredential` never became declarations and no agent could be discovered by them.
|
|
11
|
+
//
|
|
12
|
+
// WHITESPACE IS THE DISCRIMINATOR, not case and not punctuation. The value being tested comes from a
|
|
13
|
+
// comma-separated profile string that historically held human LABELS (`atl:skills` = "Grant Writing,
|
|
14
|
+
// Legal Review"), and a label is the thing with a space in it. A single-word label that slips through
|
|
15
|
+
// is inert rather than harmful: matching is exact, no catalog defines it, so nothing can ever match it
|
|
16
|
+
// — the same leniency the projector already documents for ids with no definition.
|
|
17
|
+
/** Is this token a capability id, as opposed to a human label? */
|
|
18
|
+
export function isCapabilityId(token) {
|
|
19
|
+
return /^[A-Za-z0-9][A-Za-z0-9._:-]*$/.test(token.trim());
|
|
20
|
+
}
|
|
21
|
+
/** The capability ids in a comma-separated profile value, deduped, order preserved. */
|
|
22
|
+
export function parseCapabilityIds(csv) {
|
|
23
|
+
if (!csv)
|
|
24
|
+
return [];
|
|
25
|
+
return [...new Set(csv.split(',').map((s) => s.trim()).filter(isCapabilityId))];
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=id-shape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id-shape.js","sourceRoot":"","sources":["../../src/catalog/id-shape.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,6CAA6C;AAC7C,EAAE;AACF,8FAA8F;AAC9F,iEAAiE;AACjE,+DAA+D;AAC/D,iEAAiE;AACjE,oGAAoG;AACpG,iFAAiF;AACjF,uGAAuG;AACvG,EAAE;AACF,qGAAqG;AACrG,qGAAqG;AACrG,sGAAsG;AACtG,uGAAuG;AACvG,kFAAkF;AAElF,kEAAkE;AAClE,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,OAAO,+BAA+B,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;AAC5D,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,kBAAkB,CAAC,GAA8B;IAC/D,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { isCapabilityId, parseCapabilityIds } from './id-shape.js';
|
|
2
|
+
/**
|
|
3
|
+
* The seeded capability catalog (ADR-0051) — read-only this wave.
|
|
4
|
+
*
|
|
5
|
+
* The editor offers these; an agent SELECTS one rather than typing a label that gets slugged into an id.
|
|
6
|
+
* That is the whole point: two agents describing the same ability used to produce two different ids, and
|
|
7
|
+
* a matcher could not tell they meant the same thing.
|
|
8
|
+
*/
|
|
9
|
+
import { CAPABILITY_DEFINITIONS, type CatalogCapabilityDefinition } from './definitions.js';
|
|
10
|
+
import { CAPABILITY_TAXONOMY_MAPPINGS } from './mappings.js';
|
|
11
|
+
import type { SkillTaxonomyMappingV1 } from '../card-curation.js';
|
|
12
|
+
export type { CatalogCapabilityDefinition };
|
|
13
|
+
export { CAPABILITY_DEFINITIONS, CAPABILITY_TAXONOMY_MAPPINGS };
|
|
14
|
+
export { OASF_VERSION, HCS26_VERSION } from './mappings.js';
|
|
15
|
+
/** Every definition, optionally narrowed. `query` matches id, title and description, case-insensitively. */
|
|
16
|
+
export declare function listCapabilityDefinitions(opts?: {
|
|
17
|
+
domain?: string;
|
|
18
|
+
kind?: 'substrate' | 'advisory';
|
|
19
|
+
query?: string;
|
|
20
|
+
}): CatalogCapabilityDefinition[];
|
|
21
|
+
/** One definition, or `null`. Null is an ANSWER — an id absent from the catalog is exactly what the
|
|
22
|
+
* editor must refuse and the explorer must report, never something to paper over (ADR-0013). */
|
|
23
|
+
export declare function getCapabilityDefinition(id: string): CatalogCapabilityDefinition | null;
|
|
24
|
+
/** Crosswalks for one id. An EMPTY array means "no mapping at this taxonomy version", which is a real
|
|
25
|
+
* answer and is what the explorer shows — not a gap to be filled with a plausible guess. */
|
|
26
|
+
export declare function mappingsFor(id: string): SkillTaxonomyMappingV1[];
|
|
27
|
+
/** The domains present, in catalog order — the explorer's filter list. */
|
|
28
|
+
export declare function capabilityDomains(): string[];
|
|
29
|
+
/** Is this id one the catalog defines? The editor gates on this: an agent may not invent an id. */
|
|
30
|
+
export declare function isKnownCapabilityId(id: string): boolean;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/catalog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnE;;;;;;GAMG;AACH,OAAO,EAAE,sBAAsB,EAAE,KAAK,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,YAAY,EAAE,2BAA2B,EAAE,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE5D,4GAA4G;AAC5G,wBAAgB,yBAAyB,CAAC,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,2BAA2B,EAAE,CAMxJ;AAED;iGACiG;AACjG,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,2BAA2B,GAAG,IAAI,CAEtF;AAED;6FAC6F;AAC7F,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,sBAAsB,EAAE,CAEhE;AAED,0EAA0E;AAC1E,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAE5C;AAED,mGAAmG;AACnG,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEvD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export { isCapabilityId, parseCapabilityIds } from './id-shape.js';
|
|
2
|
+
/**
|
|
3
|
+
* The seeded capability catalog (ADR-0051) — read-only this wave.
|
|
4
|
+
*
|
|
5
|
+
* The editor offers these; an agent SELECTS one rather than typing a label that gets slugged into an id.
|
|
6
|
+
* That is the whole point: two agents describing the same ability used to produce two different ids, and
|
|
7
|
+
* a matcher could not tell they meant the same thing.
|
|
8
|
+
*/
|
|
9
|
+
import { CAPABILITY_DEFINITIONS } from './definitions.js';
|
|
10
|
+
import { CAPABILITY_TAXONOMY_MAPPINGS } from './mappings.js';
|
|
11
|
+
export { CAPABILITY_DEFINITIONS, CAPABILITY_TAXONOMY_MAPPINGS };
|
|
12
|
+
export { OASF_VERSION, HCS26_VERSION } from './mappings.js';
|
|
13
|
+
/** Every definition, optionally narrowed. `query` matches id, title and description, case-insensitively. */
|
|
14
|
+
export function listCapabilityDefinitions(opts = {}) {
|
|
15
|
+
const q = opts.query?.trim().toLowerCase();
|
|
16
|
+
return CAPABILITY_DEFINITIONS.filter((d) => (!opts.domain || d.domain === opts.domain)
|
|
17
|
+
&& (!opts.kind || d.kind === opts.kind)
|
|
18
|
+
&& (!q || d.id.toLowerCase().includes(q) || d.title.toLowerCase().includes(q) || d.description.toLowerCase().includes(q)));
|
|
19
|
+
}
|
|
20
|
+
/** One definition, or `null`. Null is an ANSWER — an id absent from the catalog is exactly what the
|
|
21
|
+
* editor must refuse and the explorer must report, never something to paper over (ADR-0013). */
|
|
22
|
+
export function getCapabilityDefinition(id) {
|
|
23
|
+
return CAPABILITY_DEFINITIONS.find((d) => d.id === id) ?? null;
|
|
24
|
+
}
|
|
25
|
+
/** Crosswalks for one id. An EMPTY array means "no mapping at this taxonomy version", which is a real
|
|
26
|
+
* answer and is what the explorer shows — not a gap to be filled with a plausible guess. */
|
|
27
|
+
export function mappingsFor(id) {
|
|
28
|
+
return CAPABILITY_TAXONOMY_MAPPINGS.filter((m) => m.apSkillId === id);
|
|
29
|
+
}
|
|
30
|
+
/** The domains present, in catalog order — the explorer's filter list. */
|
|
31
|
+
export function capabilityDomains() {
|
|
32
|
+
return [...new Set(CAPABILITY_DEFINITIONS.map((d) => d.domain))];
|
|
33
|
+
}
|
|
34
|
+
/** Is this id one the catalog defines? The editor gates on this: an agent may not invent an id. */
|
|
35
|
+
export function isKnownCapabilityId(id) {
|
|
36
|
+
return getCapabilityDefinition(id) !== null;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot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C,EAAU;IACpC,OAAO,4BAA4B,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC,CAAC;AACxE,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,iBAAiB;IAC/B,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACnE,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,mBAAmB,CAAC,EAAU;IAC5C,OAAO,uBAAuB,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curated crosswalks from AP capability ids into external taxonomies (ADR-0051).
|
|
3
|
+
*
|
|
4
|
+
* WHAT IS DELIBERATELY ABSENT MATTERS MORE THAN WHAT IS HERE. A mapping asserts that an outside
|
|
5
|
+
* taxonomy has a class meaning this, and asserting that falsely is worse than saying nothing: a
|
|
6
|
+
* consumer that trusts an `exact` match will route work on it. So:
|
|
7
|
+
*
|
|
8
|
+
* • No OASF or HCS-26 class id appears here unless it can be cited. Where a plausible target exists
|
|
9
|
+
* but the class id cannot be verified against a published schema, the row is OMITTED — the explorer
|
|
10
|
+
* shows "no mapping at this taxonomy version", which is true, rather than a guess that reads as
|
|
11
|
+
* authority.
|
|
12
|
+
* • `broad` and `narrow` require evidence (the existing validator enforces it), because a hierarchy
|
|
13
|
+
* claim asserts something about the OTHER taxonomy's structure.
|
|
14
|
+
* • A subset is mapped on purpose. 45 × 2 rows of invented ids would look thorough and be worthless.
|
|
15
|
+
*
|
|
16
|
+
* `hcs26` is the HCS skill/capability taxon. `hcs14` is UAID — an agent IDENTIFIER standard — and a
|
|
17
|
+
* capability does not map to one.
|
|
18
|
+
*/
|
|
19
|
+
import type { SkillTaxonomyMappingV1 } from '../card-curation.js';
|
|
20
|
+
/** OASF taxonomy version these rows were curated against. */
|
|
21
|
+
export declare const OASF_VERSION = "1.1.0";
|
|
22
|
+
/** HCS-26 is a draft; the version string says so rather than implying a frozen release. */
|
|
23
|
+
export declare const HCS26_VERSION = "draft";
|
|
24
|
+
/**
|
|
25
|
+
* Substrate capabilities only. These are the ones whose meaning this repo defines, so a crosswalk can be
|
|
26
|
+
* asserted honestly — and each is `close`, not `exact`: the outside class covers a broader family than
|
|
27
|
+
* our id names, and `exact` would claim the two are interchangeable.
|
|
28
|
+
*
|
|
29
|
+
* The advisory catalog is UNMAPPED. Those 45 are professional-service outcomes; the OASF classes that
|
|
30
|
+
* might cover them could not be cited against a published schema at the pinned version, and inventing
|
|
31
|
+
* them to fill a column is exactly what this file refuses to do.
|
|
32
|
+
*/
|
|
33
|
+
export declare const CAPABILITY_TAXONOMY_MAPPINGS: readonly SkillTaxonomyMappingV1[];
|
|
34
|
+
//# sourceMappingURL=mappings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappings.d.ts","sourceRoot":"","sources":["../../src/catalog/mappings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAMlE,6DAA6D;AAC7D,eAAO,MAAM,YAAY,UAAU,CAAC;AACpC,2FAA2F;AAC3F,eAAO,MAAM,aAAa,UAAU,CAAC;AAErC;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,EAAE,SAAS,sBAAsB,EAqB5C,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** The catalog steward asserting these rows. A mapping is an assertion and carries who made it. */
|
|
2
|
+
const STEWARD = 'eip155:0:0x0000000000000000000000000000000000000000';
|
|
3
|
+
const ASSERTED_AT = '2026-09-01T00:00:00Z';
|
|
4
|
+
/** OASF taxonomy version these rows were curated against. */
|
|
5
|
+
export const OASF_VERSION = '1.1.0';
|
|
6
|
+
/** HCS-26 is a draft; the version string says so rather than implying a frozen release. */
|
|
7
|
+
export const HCS26_VERSION = 'draft';
|
|
8
|
+
/**
|
|
9
|
+
* Substrate capabilities only. These are the ones whose meaning this repo defines, so a crosswalk can be
|
|
10
|
+
* asserted honestly — and each is `close`, not `exact`: the outside class covers a broader family than
|
|
11
|
+
* our id names, and `exact` would claim the two are interchangeable.
|
|
12
|
+
*
|
|
13
|
+
* The advisory catalog is UNMAPPED. Those 45 are professional-service outcomes; the OASF classes that
|
|
14
|
+
* might cover them could not be cited against a published schema at the pinned version, and inventing
|
|
15
|
+
* them to fill a column is exactly what this file refuses to do.
|
|
16
|
+
*/
|
|
17
|
+
export const CAPABILITY_TAXONOMY_MAPPINGS = Object.freeze([
|
|
18
|
+
{
|
|
19
|
+
apSkillId: 'messaging.deliver',
|
|
20
|
+
taxonomy: 'oasf',
|
|
21
|
+
taxonomyVersion: OASF_VERSION,
|
|
22
|
+
targetClassId: 'oasf:messaging',
|
|
23
|
+
relation: 'close',
|
|
24
|
+
assertedBy: STEWARD,
|
|
25
|
+
assertedAt: ASSERTED_AT,
|
|
26
|
+
evidence: [{ kind: 'fetched-document', ref: 'https://schema.oasf.agntcy.org/skills' }],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
apSkillId: 'interactions.respond',
|
|
30
|
+
taxonomy: 'oasf',
|
|
31
|
+
taxonomyVersion: OASF_VERSION,
|
|
32
|
+
targetClassId: 'oasf:messaging',
|
|
33
|
+
relation: 'close',
|
|
34
|
+
assertedBy: STEWARD,
|
|
35
|
+
assertedAt: ASSERTED_AT,
|
|
36
|
+
evidence: [{ kind: 'fetched-document', ref: 'https://schema.oasf.agntcy.org/skills' }],
|
|
37
|
+
},
|
|
38
|
+
]);
|
|
39
|
+
//# sourceMappingURL=mappings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappings.js","sourceRoot":"","sources":["../../src/catalog/mappings.ts"],"names":[],"mappings":"AAoBA,mGAAmG;AACnG,MAAM,OAAO,GAAG,qDAA6F,CAAC;AAC9G,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAE3C,6DAA6D;AAC7D,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC;AACpC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC;AAErC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAsC,MAAM,CAAC,MAAM,CAAC;IAC3F;QACE,SAAS,EAAE,mBAAmB;QAC9B,QAAQ,EAAE,MAAM;QAChB,eAAe,EAAE,YAAY;QAC7B,aAAa,EAAE,gBAAgB;QAC/B,QAAQ,EAAE,OAAO;QACjB,UAAU,EAAE,OAAO;QACnB,UAAU,EAAE,WAAW;QACvB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,uCAAuC,EAAE,CAAC;KACvF;IACD;QACE,SAAS,EAAE,sBAAsB;QACjC,QAAQ,EAAE,MAAM;QAChB,eAAe,EAAE,YAAY;QAC7B,aAAa,EAAE,gBAAgB;QAC/B,QAAQ,EAAE,OAAO;QACjB,UAAU,EAAE,OAAO;QACnB,UAAU,EAAE,WAAW;QACvB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,uCAAuC,EAAE,CAAC;KACvF;CAC0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class FrontmatterError extends Error {
|
|
2
|
+
readonly line?: number | undefined;
|
|
3
|
+
constructor(message: string, line?: number | undefined);
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The `---`-delimited frontmatter of a SKILL.md, as an object. `null` when the document has no
|
|
7
|
+
* frontmatter block at all (which is a different answer from an empty one). Throws `FrontmatterError`
|
|
8
|
+
* on syntax this parser does not support — never a partial parse.
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseSkillFrontmatter(text: string): Record<string, unknown> | null;
|
|
11
|
+
//# sourceMappingURL=frontmatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../src/frontmatter.ts"],"names":[],"mappings":"AAsBA,qBAAa,gBAAiB,SAAQ,KAAK;IACZ,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM;gBAAvC,OAAO,EAAE,MAAM,EAAW,IAAI,CAAC,EAAE,MAAM,YAAA;CAIpD;AAqJD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAgBlF"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
// SKILL.md FRONTMATTER → an object. Spec 354 / 360.
|
|
2
|
+
//
|
|
3
|
+
// WHY THIS EXISTS RATHER THAN A YAML DEPENDENCY. This has to run in three places — a build gate, a
|
|
4
|
+
// Cloudflare Worker that serves compiled definitions, and the `~/skills` compiler — so it must be
|
|
5
|
+
// portable and dependency-free, and it sits in a publishable Ring-0 package where a runtime YAML parser
|
|
6
|
+
// would be a real cost carried by every consumer.
|
|
7
|
+
//
|
|
8
|
+
// WHY NOT THE 12-LINE VERSION IT REPLACES. `scripts/check-agent-skills.ts` matched `^key: value` at
|
|
9
|
+
// column zero and skipped everything indented. Frontmatter that is genuinely nested — `authority:` with
|
|
10
|
+
// its requirement, `effects:` with a list of maps — came back as strings where maps belong, so the gate
|
|
11
|
+
// reported a well-formed contract as malformed and had been red since the Treasury archetype landed. A
|
|
12
|
+
// parser that silently mis-reads structure is worse than one that refuses it.
|
|
13
|
+
//
|
|
14
|
+
// THE DISCIPLINE: this handles the subset SKILL.md frontmatter actually uses and THROWS on anything
|
|
15
|
+
// else. It never guesses. An unsupported construct is a loud `FrontmatterError` naming the line, because
|
|
16
|
+
// a frontmatter that parsed "sort of" is how a playbook comes to promise something nobody executes.
|
|
17
|
+
//
|
|
18
|
+
// Supported: block maps, nested block maps, block sequences (of scalars and of maps), flow maps
|
|
19
|
+
// `{a: b}`, flow sequences `[a, b]`, single/double-quoted scalars, `true`/`false`/`null`, numbers,
|
|
20
|
+
// comments. NOT supported (and refused): anchors/aliases, tags, multi-line scalars (`|`, `>`), multiple
|
|
21
|
+
// documents, complex keys.
|
|
22
|
+
export class FrontmatterError extends Error {
|
|
23
|
+
line;
|
|
24
|
+
constructor(message, line) {
|
|
25
|
+
super(line === undefined ? message : `line ${line}: ${message}`);
|
|
26
|
+
this.line = line;
|
|
27
|
+
this.name = 'FrontmatterError';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/** Strip a trailing `# comment`, honouring quotes so a `#` inside a string survives. */
|
|
31
|
+
function stripComment(s) {
|
|
32
|
+
let quote = null;
|
|
33
|
+
for (let i = 0; i < s.length; i++) {
|
|
34
|
+
const c = s[i];
|
|
35
|
+
if (quote) {
|
|
36
|
+
if (c === quote)
|
|
37
|
+
quote = null;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if (c === '"' || c === "'") {
|
|
41
|
+
quote = c;
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (c === '#' && (i === 0 || /\s/.test(s[i - 1])))
|
|
45
|
+
return s.slice(0, i);
|
|
46
|
+
}
|
|
47
|
+
return s;
|
|
48
|
+
}
|
|
49
|
+
/** A bare/quoted scalar → string | number | boolean | null. */
|
|
50
|
+
function scalar(raw, line) {
|
|
51
|
+
const v = raw.trim();
|
|
52
|
+
if (v === '')
|
|
53
|
+
return '';
|
|
54
|
+
if ((v.startsWith("'") && v.endsWith("'") && v.length > 1) || (v.startsWith('"') && v.endsWith('"') && v.length > 1)) {
|
|
55
|
+
return v.slice(1, -1);
|
|
56
|
+
}
|
|
57
|
+
if (v === 'true')
|
|
58
|
+
return true;
|
|
59
|
+
if (v === 'false')
|
|
60
|
+
return false;
|
|
61
|
+
if (v === 'null' || v === '~')
|
|
62
|
+
return null;
|
|
63
|
+
if (/^-?\d+$/.test(v))
|
|
64
|
+
return Number(v);
|
|
65
|
+
if (/^-?\d*\.\d+$/.test(v))
|
|
66
|
+
return Number(v);
|
|
67
|
+
// Refuse what we cannot represent rather than pass it through as a string that looks fine.
|
|
68
|
+
if (v.startsWith('&') || v.startsWith('*') || v.startsWith('!')) {
|
|
69
|
+
throw new FrontmatterError(`anchors, aliases and tags are not supported in skill frontmatter ("${v}")`, line);
|
|
70
|
+
}
|
|
71
|
+
if (v === '|' || v === '>' || v.startsWith('|') || v.startsWith('>')) {
|
|
72
|
+
throw new FrontmatterError('multi-line scalars (| and >) are not supported in skill frontmatter', line);
|
|
73
|
+
}
|
|
74
|
+
return v;
|
|
75
|
+
}
|
|
76
|
+
/** Split a flow body on top-level commas (respecting nesting and quotes). */
|
|
77
|
+
function splitFlow(body, line) {
|
|
78
|
+
const parts = [];
|
|
79
|
+
let depth = 0;
|
|
80
|
+
let quote = null;
|
|
81
|
+
let cur = '';
|
|
82
|
+
for (const c of body) {
|
|
83
|
+
if (quote) {
|
|
84
|
+
cur += c;
|
|
85
|
+
if (c === quote)
|
|
86
|
+
quote = null;
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if (c === '"' || c === "'") {
|
|
90
|
+
quote = c;
|
|
91
|
+
cur += c;
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
if (c === '{' || c === '[') {
|
|
95
|
+
depth++;
|
|
96
|
+
cur += c;
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
if (c === '}' || c === ']') {
|
|
100
|
+
depth--;
|
|
101
|
+
cur += c;
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
if (c === ',' && depth === 0) {
|
|
105
|
+
parts.push(cur);
|
|
106
|
+
cur = '';
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
cur += c;
|
|
110
|
+
}
|
|
111
|
+
if (quote)
|
|
112
|
+
throw new FrontmatterError('unterminated quote', line);
|
|
113
|
+
if (depth !== 0)
|
|
114
|
+
throw new FrontmatterError('unbalanced { } or [ ] in flow value', line);
|
|
115
|
+
if (cur.trim() !== '')
|
|
116
|
+
parts.push(cur);
|
|
117
|
+
return parts;
|
|
118
|
+
}
|
|
119
|
+
/** A flow value: `{a: b, c: [d]}`, `[a, b]`, or a scalar. */
|
|
120
|
+
function flowValue(raw, line) {
|
|
121
|
+
const v = raw.trim();
|
|
122
|
+
if (v.startsWith('{')) {
|
|
123
|
+
if (!v.endsWith('}'))
|
|
124
|
+
throw new FrontmatterError('flow map is not closed on its line', line);
|
|
125
|
+
const out = {};
|
|
126
|
+
for (const part of splitFlow(v.slice(1, -1), line)) {
|
|
127
|
+
const i = part.indexOf(':');
|
|
128
|
+
if (i < 0)
|
|
129
|
+
throw new FrontmatterError(`flow map entry "${part.trim()}" has no ":"`, line);
|
|
130
|
+
out[part.slice(0, i).trim().replace(/^['"]|['"]$/g, '')] = flowValue(part.slice(i + 1), line);
|
|
131
|
+
}
|
|
132
|
+
return out;
|
|
133
|
+
}
|
|
134
|
+
if (v.startsWith('[')) {
|
|
135
|
+
if (!v.endsWith(']'))
|
|
136
|
+
throw new FrontmatterError('flow sequence is not closed on its line', line);
|
|
137
|
+
return splitFlow(v.slice(1, -1), line).map((p) => flowValue(p, line));
|
|
138
|
+
}
|
|
139
|
+
return scalar(v, line);
|
|
140
|
+
}
|
|
141
|
+
/** Parse a block at `indent`, consuming from `rows[i]`. Returns the value and the next index. */
|
|
142
|
+
function parseBlock(rows, start, indent) {
|
|
143
|
+
if (start >= rows.length)
|
|
144
|
+
return { value: null, next: start };
|
|
145
|
+
// A sequence: every row at this indent begins `- `.
|
|
146
|
+
if (rows[start].text.startsWith('- ') || rows[start].text === '-') {
|
|
147
|
+
const items = [];
|
|
148
|
+
let i = start;
|
|
149
|
+
while (i < rows.length && rows[i].indent === indent && (rows[i].text.startsWith('- ') || rows[i].text === '-')) {
|
|
150
|
+
const row = rows[i];
|
|
151
|
+
const inline = row.text === '-' ? '' : row.text.slice(2).trim();
|
|
152
|
+
// `- key: value` opens a map whose remaining keys are indented further on following rows.
|
|
153
|
+
const looksLikeMapEntry = inline !== '' && /^[^\s:{}[\]]+\s*:/.test(inline) && !inline.startsWith('{');
|
|
154
|
+
if (looksLikeMapEntry) {
|
|
155
|
+
const childIndent = row.indent + 2;
|
|
156
|
+
const synthetic = [{ indent: childIndent, text: inline, line: row.line }];
|
|
157
|
+
let j = i + 1;
|
|
158
|
+
while (j < rows.length && rows[j].indent >= childIndent) {
|
|
159
|
+
synthetic.push(rows[j]);
|
|
160
|
+
j++;
|
|
161
|
+
}
|
|
162
|
+
const { value } = parseBlock(synthetic, 0, childIndent);
|
|
163
|
+
items.push(value);
|
|
164
|
+
i = j;
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
if (inline === '') {
|
|
168
|
+
// A bare `-` with the item's content indented beneath it.
|
|
169
|
+
let j = i + 1;
|
|
170
|
+
const child = [];
|
|
171
|
+
while (j < rows.length && rows[j].indent > row.indent) {
|
|
172
|
+
child.push(rows[j]);
|
|
173
|
+
j++;
|
|
174
|
+
}
|
|
175
|
+
if (child.length === 0)
|
|
176
|
+
throw new FrontmatterError('a sequence entry is empty', row.line);
|
|
177
|
+
const { value } = parseBlock(child, 0, child[0].indent);
|
|
178
|
+
items.push(value);
|
|
179
|
+
i = j;
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
items.push(flowValue(inline, row.line));
|
|
183
|
+
i++;
|
|
184
|
+
}
|
|
185
|
+
return { value: items, next: i };
|
|
186
|
+
}
|
|
187
|
+
// Otherwise a map.
|
|
188
|
+
const out = {};
|
|
189
|
+
let i = start;
|
|
190
|
+
while (i < rows.length && rows[i].indent === indent) {
|
|
191
|
+
const row = rows[i];
|
|
192
|
+
if (row.text.startsWith('- '))
|
|
193
|
+
break; // a sequence at this level ends the map
|
|
194
|
+
const c = row.text.indexOf(':');
|
|
195
|
+
if (c < 0)
|
|
196
|
+
throw new FrontmatterError(`"${row.text}" is not a "key: value" entry`, row.line);
|
|
197
|
+
const key = row.text.slice(0, c).trim();
|
|
198
|
+
if (key === '')
|
|
199
|
+
throw new FrontmatterError('empty key', row.line);
|
|
200
|
+
const rest = row.text.slice(c + 1).trim();
|
|
201
|
+
if (rest !== '') {
|
|
202
|
+
out[key] = flowValue(rest, row.line);
|
|
203
|
+
i++;
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
// Value is the indented block that follows (or a sequence at the SAME indent, which YAML allows).
|
|
207
|
+
let j = i + 1;
|
|
208
|
+
const child = [];
|
|
209
|
+
while (j < rows.length && (rows[j].indent > indent || (rows[j].indent === indent && (rows[j].text.startsWith('- ') || rows[j].text === '-')))) {
|
|
210
|
+
child.push(rows[j]);
|
|
211
|
+
j++;
|
|
212
|
+
}
|
|
213
|
+
if (child.length === 0) {
|
|
214
|
+
out[key] = null;
|
|
215
|
+
i = j;
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
const { value } = parseBlock(child, 0, child[0].indent);
|
|
219
|
+
out[key] = value;
|
|
220
|
+
i = j;
|
|
221
|
+
}
|
|
222
|
+
return { value: out, next: i };
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* The `---`-delimited frontmatter of a SKILL.md, as an object. `null` when the document has no
|
|
226
|
+
* frontmatter block at all (which is a different answer from an empty one). Throws `FrontmatterError`
|
|
227
|
+
* on syntax this parser does not support — never a partial parse.
|
|
228
|
+
*/
|
|
229
|
+
export function parseSkillFrontmatter(text) {
|
|
230
|
+
const m = text.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
231
|
+
if (!m)
|
|
232
|
+
return null;
|
|
233
|
+
const rows = [];
|
|
234
|
+
m[1].split(/\r?\n/).forEach((raw, idx) => {
|
|
235
|
+
const noComment = stripComment(raw);
|
|
236
|
+
if (noComment.trim() === '')
|
|
237
|
+
return;
|
|
238
|
+
if (/^\t/.test(noComment))
|
|
239
|
+
throw new FrontmatterError('tabs are not valid YAML indentation', idx + 1);
|
|
240
|
+
rows.push({ indent: noComment.length - noComment.trimStart().length, text: noComment.trim(), line: idx + 1 });
|
|
241
|
+
});
|
|
242
|
+
if (rows.length === 0)
|
|
243
|
+
return {};
|
|
244
|
+
const { value } = parseBlock(rows, 0, rows[0].indent);
|
|
245
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) {
|
|
246
|
+
throw new FrontmatterError('frontmatter must be a map of keys');
|
|
247
|
+
}
|
|
248
|
+
return value;
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=frontmatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.js","sourceRoot":"","sources":["../src/frontmatter.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,EAAE;AACF,mGAAmG;AACnG,kGAAkG;AAClG,wGAAwG;AACxG,kDAAkD;AAClD,EAAE;AACF,oGAAoG;AACpG,wGAAwG;AACxG,wGAAwG;AACxG,uGAAuG;AACvG,8EAA8E;AAC9E,EAAE;AACF,oGAAoG;AACpG,yGAAyG;AACzG,oGAAoG;AACpG,EAAE;AACF,gGAAgG;AAChG,mGAAmG;AACnG,wGAAwG;AACxG,2BAA2B;AAE3B,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACH;IAAtC,YAAY,OAAe,EAAW,IAAa;QACjD,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC;QAD7B,SAAI,GAAJ,IAAI,CAAS;QAEjD,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAED,wFAAwF;AACxF,SAAS,YAAY,CAAC,CAAS;IAC7B,IAAI,KAAK,GAAqB,IAAI,CAAC;IACnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MA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