@skill-map/cli 0.16.5 → 0.17.0
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/dist/cli.js +305 -124
- package/dist/cli.js.map +1 -1
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/dist/kernel/index.d.ts +28 -5
- package/dist/kernel/index.js +17 -3
- package/dist/kernel/index.js.map +1 -1
- package/dist/ui/chunk-5ZGVBIPP.js +1031 -0
- package/dist/ui/chunk-BWUDZKB6.js +247 -0
- package/dist/ui/chunk-LUDNWV6G.js +3091 -0
- package/dist/ui/chunk-WMWULWZX.js +237 -0
- package/dist/ui/index.html +2 -2
- package/dist/ui/main-7LR4JN4M.js +1 -0
- package/dist/ui/skill-map-mark-dark.svg +8 -0
- package/dist/ui/skill-map-mark-light.svg +8 -0
- package/dist/ui/{styles-TCK5JUQE.css → styles-CBPFNGXA.css} +1 -1
- package/package.json +6 -3
- package/dist/ui/chunk-7PFTODKS.js +0 -1031
- package/dist/ui/chunk-A4RBO3TD.js +0 -38
- package/dist/ui/chunk-KPEISNOV.js +0 -819
- package/dist/ui/chunk-NKC42FI7.js +0 -210
- package/dist/ui/chunk-S5C4U3I3.js +0 -2403
- package/dist/ui/chunk-TG6IWVEC.js +0 -54
- package/dist/ui/chunk-TGJQE3TH.js +0 -54
- package/dist/ui/chunk-UGEECDPV.js +0 -1
- package/dist/ui/main-XSGTD7FQ.js +0 -1
package/dist/kernel/index.d.ts
CHANGED
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
* prefix.
|
|
58
58
|
*/
|
|
59
59
|
/**
|
|
60
|
-
* The
|
|
61
|
-
* `agent`, `command`, `
|
|
60
|
+
* The four node kinds the **built-in Claude Provider** declares — `skill`,
|
|
61
|
+
* `agent`, `command`, `note`. **NOT** the kernel-wide kind type.
|
|
62
62
|
*
|
|
63
63
|
* `Node.kind` is `string`. An external Provider (Cursor, Obsidian, …)
|
|
64
64
|
* MAY classify into its own kinds (e.g. `'cursorRule'`, `'daily'`); the
|
|
@@ -67,19 +67,25 @@
|
|
|
67
67
|
* `node.schema.json#/properties/kind`, the contract is open-by-design
|
|
68
68
|
* (matches `IProvider.kinds` "open by design" docstring).
|
|
69
69
|
*
|
|
70
|
+
* Step 9.5 dropped `hook` from the catalog: `.claude/hooks/*.md` is NOT
|
|
71
|
+
* an Anthropic-defined node type — hooks live in `settings.json` or as
|
|
72
|
+
* sub-objects of agent / skill frontmatter (see
|
|
73
|
+
* https://code.claude.com/docs/en/hooks.md). Files at the old path now
|
|
74
|
+
* classify as `note` via the Provider's fallback.
|
|
75
|
+
*
|
|
70
76
|
* This alias survives because:
|
|
71
|
-
* - claude-specific code legitimately wants to switch on the
|
|
77
|
+
* - claude-specific code legitimately wants to switch on the four
|
|
72
78
|
* hard-coded values (filter widgets, kind-aware UI cards, the
|
|
73
79
|
* `validate-all` built-in rule that maps each kind to its
|
|
74
80
|
* frontmatter schema);
|
|
75
81
|
* - sorting helpers want a stable `KIND_ORDER` for the canonical
|
|
76
82
|
* catalog;
|
|
77
|
-
* - tests expect to enumerate the
|
|
83
|
+
* - tests expect to enumerate the four kinds when seeding fixtures.
|
|
78
84
|
*
|
|
79
85
|
* For "any kind a Provider could declare", use plain `string`. Only use
|
|
80
86
|
* `NodeKind` when the code is intentionally claude-catalog-specific.
|
|
81
87
|
*/
|
|
82
|
-
type NodeKind = 'skill' | 'agent' | 'command' | '
|
|
88
|
+
type NodeKind = 'skill' | 'agent' | 'command' | 'note';
|
|
83
89
|
type LinkKind = 'invokes' | 'references' | 'mentions' | 'supersedes';
|
|
84
90
|
type Confidence = 'high' | 'medium' | 'low';
|
|
85
91
|
type Severity = 'error' | 'warn' | 'info';
|
|
@@ -919,6 +925,23 @@ interface IProvider extends IExtensionBase {
|
|
|
919
925
|
* column all accept any non-empty string an enabled Provider returns.
|
|
920
926
|
*/
|
|
921
927
|
kinds: Record<string, IProviderKind>;
|
|
928
|
+
/**
|
|
929
|
+
* Optional auxiliary JSON Schemas this Provider's per-kind schemas
|
|
930
|
+
* `$ref` by `$id`. Registered with AJV via `addSchema` BEFORE the
|
|
931
|
+
* per-kind schemas compile, so cross-file `$ref` resolution succeeds.
|
|
932
|
+
*
|
|
933
|
+
* Use case: when several kinds share a common base (e.g. Anthropic's
|
|
934
|
+
* merged skill / command frontmatter — both extend a shared
|
|
935
|
+
* `skill-base.schema.json`), the Provider declares the base here so
|
|
936
|
+
* `skill.schema.json` and `command.schema.json` can `$ref` it without
|
|
937
|
+
* duplicating fields.
|
|
938
|
+
*
|
|
939
|
+
* Runtime-only — does NOT appear in the spec's `provider.schema.json`
|
|
940
|
+
* manifest. Manifest-validated schemas remain the per-kind ones in
|
|
941
|
+
* `kinds[<kind>].schema`; auxiliary schemas are an implementation
|
|
942
|
+
* concern of how the runtime composes those.
|
|
943
|
+
*/
|
|
944
|
+
schemas?: unknown[];
|
|
922
945
|
/**
|
|
923
946
|
* Walk the given roots and yield every node the Provider recognises.
|
|
924
947
|
* Non-matching files are silently skipped. Unreadable files produce
|
package/dist/kernel/index.js
CHANGED
|
@@ -102,7 +102,7 @@ import yaml from "js-yaml";
|
|
|
102
102
|
// package.json
|
|
103
103
|
var package_default = {
|
|
104
104
|
name: "@skill-map/cli",
|
|
105
|
-
version: "0.
|
|
105
|
+
version: "0.17.0",
|
|
106
106
|
description: "skill-map reference implementation \u2014 kernel + CLI + adapters.",
|
|
107
107
|
license: "MIT",
|
|
108
108
|
type: "module",
|
|
@@ -149,10 +149,13 @@ var package_default = {
|
|
|
149
149
|
scripts: {
|
|
150
150
|
build: "tsup",
|
|
151
151
|
dev: "tsup --watch",
|
|
152
|
-
"dev:serve": "node
|
|
152
|
+
"dev:serve": "node scripts/dev-serve.js",
|
|
153
153
|
typecheck: "tsc --noEmit",
|
|
154
154
|
lint: "eslint .",
|
|
155
155
|
"lint:fix": "eslint . --fix",
|
|
156
|
+
reference: "node scripts/build-reference.js",
|
|
157
|
+
"reference:check": "node scripts/build-reference.js --check",
|
|
158
|
+
validate: "npm run typecheck && npm run lint && npm run build && npm run test:ci && npm run reference:check",
|
|
156
159
|
pretest: "tsup",
|
|
157
160
|
"pretest:ci": "tsup",
|
|
158
161
|
"pretest:coverage": "tsup",
|
|
@@ -165,7 +168,7 @@ var package_default = {
|
|
|
165
168
|
},
|
|
166
169
|
dependencies: {
|
|
167
170
|
"@hono/node-server": "2.0.1",
|
|
168
|
-
"@skill-map/spec": "0.
|
|
171
|
+
"@skill-map/spec": "0.17.0",
|
|
169
172
|
ajv: "8.18.0",
|
|
170
173
|
"ajv-formats": "3.0.1",
|
|
171
174
|
chokidar: "5.0.0",
|
|
@@ -381,6 +384,7 @@ function buildProviderFrontmatterValidator(providers) {
|
|
|
381
384
|
const baseFile = resolve2(specRoot, "schemas/frontmatter/base.schema.json");
|
|
382
385
|
const baseSchema = JSON.parse(readFileSync2(baseFile, "utf8"));
|
|
383
386
|
ajv.addSchema(baseSchema);
|
|
387
|
+
registerProviderAuxiliarySchemas(ajv, providers);
|
|
384
388
|
const compiled = /* @__PURE__ */ new Map();
|
|
385
389
|
for (const provider of providers) {
|
|
386
390
|
for (const [kind, entry] of Object.entries(provider.kinds)) {
|
|
@@ -405,6 +409,16 @@ function formatError(err) {
|
|
|
405
409
|
const path = err.instancePath || "(root)";
|
|
406
410
|
return `${path} ${err.message ?? err.keyword}`;
|
|
407
411
|
}
|
|
412
|
+
function registerProviderAuxiliarySchemas(ajv, providers) {
|
|
413
|
+
for (const provider of providers) {
|
|
414
|
+
if (!provider.schemas) continue;
|
|
415
|
+
for (const aux of provider.schemas) {
|
|
416
|
+
const auxJson = aux;
|
|
417
|
+
if (typeof auxJson.$id === "string" && ajv.getSchema(auxJson.$id)) continue;
|
|
418
|
+
ajv.addSchema(aux);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
408
422
|
function resolveSpecRoot() {
|
|
409
423
|
const require2 = createRequire2(import.meta.url);
|
|
410
424
|
try {
|