@skill-map/cli 0.42.0 → 0.44.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/tutorial/sm-master/SKILL.md +7 -9
- package/dist/cli/tutorial/sm-master/references/fixture-templates.md +1 -1
- package/dist/cli/tutorial/sm-master/references/tour-plugins.md +10 -9
- package/dist/cli/tutorial/sm-master/references/tour-settings.md +4 -4
- package/dist/cli/tutorial/sm-tutorial/SKILL.md +216 -299
- package/dist/cli.js +1015 -376
- package/dist/cli.js.map +1 -1
- package/dist/index.js +24 -18
- package/dist/index.js.map +1 -1
- package/dist/kernel/index.d.ts +24 -30
- package/dist/kernel/index.js +24 -18
- package/dist/kernel/index.js.map +1 -1
- package/dist/migrations/001_initial.sql +6 -11
- package/dist/ui/chunk-27WQPOXP.js +1 -0
- package/dist/ui/{chunk-DZBSELHN.js → chunk-43S72FTV.js} +1 -1
- package/dist/ui/chunk-555ST76V.js +1 -0
- package/dist/ui/{chunk-JPYAASHN.js → chunk-5AD5ZV4I.js} +3 -3
- package/dist/ui/{chunk-CFJBTDAA.js → chunk-5ITZXW3A.js} +1 -1
- package/dist/ui/chunk-A7PRWMQD.js +1021 -0
- package/dist/ui/chunk-DL5EA245.js +123 -0
- package/dist/ui/chunk-F7I6KMHX.js +1 -0
- package/dist/ui/{chunk-5GD2GBPS.js → chunk-I5AX4U2N.js} +28 -28
- package/dist/ui/chunk-IUZRAD7S.js +1 -0
- package/dist/ui/{chunk-XOHD5XWA.js → chunk-IYM26L3O.js} +1 -1
- package/dist/ui/{chunk-SBCO7ZSP.js → chunk-LGFABCIA.js} +1 -1
- package/dist/ui/{chunk-IUDL3NDH.js → chunk-MFLFIA7C.js} +1 -1
- package/dist/ui/chunk-MS6B7344.js +315 -0
- package/dist/ui/chunk-P3SNMV4X.js +2 -0
- package/dist/ui/chunk-PZQHB7GS.js +4 -0
- package/dist/ui/chunk-QDUSFOBE.js +1 -0
- package/dist/ui/{chunk-HEJCH7BA.js → chunk-QNTAOR2L.js} +5 -5
- package/dist/ui/{chunk-CR3AANNX.js → chunk-S4S5ZMXJ.js} +1 -1
- package/dist/ui/{chunk-5WJRN3LD.js → chunk-T3IVIRRJ.js} +1 -1
- package/dist/ui/{chunk-HP375T2O.js → chunk-VGPYYAVI.js} +1 -1
- package/dist/ui/chunk-X227ITGS.js +499 -0
- package/dist/ui/index.html +1 -1
- package/dist/ui/main-O3CWFYKV.js +3 -0
- package/migrations/001_initial.sql +6 -11
- package/package.json +11 -10
- package/dist/ui/chunk-HFPA56IM.js +0 -1
- package/dist/ui/chunk-HHPSCDLM.js +0 -315
- package/dist/ui/chunk-HWP3HM55.js +0 -123
- package/dist/ui/chunk-PZ6Q5AOT.js +0 -1
- package/dist/ui/chunk-XJL4DZ4M.js +0 -1
- package/dist/ui/chunk-YL6SWAFJ.js +0 -1024
- package/dist/ui/main-7VYTTJP7.js +0 -3
- /package/dist/ui/{chunk-C2YUQODZ.js → chunk-4SG4352Z.js} +0 -0
- /package/dist/ui/{chunk-VB56BUGO.js → chunk-WCABR6TI.js} +0 -0
package/dist/kernel/index.d.ts
CHANGED
|
@@ -2560,12 +2560,14 @@ interface IAnalyzerContext {
|
|
|
2560
2560
|
*/
|
|
2561
2561
|
referenceablePaths?: ReadonlySet<string>;
|
|
2562
2562
|
/**
|
|
2563
|
-
* Paths of nodes whose normalised identifier(s) intersect
|
|
2564
|
-
*
|
|
2565
|
-
* `.claude/commands/help.md`
|
|
2566
|
-
*
|
|
2567
|
-
*
|
|
2568
|
-
*
|
|
2563
|
+
* Paths of nodes whose normalised identifier(s) intersect a
|
|
2564
|
+
* `reservedNames[kind]` catalog under self scope (the node's own
|
|
2565
|
+
* Provider, e.g. `.claude/commands/help.md` shadowed by Claude's
|
|
2566
|
+
* built-in `/help`) or lens scope (the active lens lending its catalog
|
|
2567
|
+
* to the universal `agent-skills` skill nodes it consumes, e.g.
|
|
2568
|
+
* `.agents/skills/goal/SKILL.md` shadowed by Antigravity's `/goal`).
|
|
2569
|
+
* The set is computed once per scan by the orchestrator (mirroring the
|
|
2570
|
+
* same set threaded to the post-walk confidence-lift transform), so
|
|
2569
2571
|
* analyzers consume it without re-deriving every node's
|
|
2570
2572
|
* identifiers. The single consumer today is `core/name-reserved`,
|
|
2571
2573
|
* which projects one warn issue per entry; future analyzers MAY
|
|
@@ -3783,34 +3785,28 @@ declare function applyExportQuery(scan: {
|
|
|
3783
3785
|
}, query: IExportQuery): IExportSubset;
|
|
3784
3786
|
|
|
3785
3787
|
/**
|
|
3786
|
-
* `scan_node_tags` adapter, tags ·
|
|
3788
|
+
* `scan_node_tags` adapter, tags · single-source persistence layer.
|
|
3787
3789
|
*
|
|
3788
|
-
* One row per `(node_path, tag
|
|
3789
|
-
*
|
|
3790
|
-
* `sidecar.annotations.tags` (with `source='user'`). The same tag
|
|
3791
|
-
* string MAY appear under both sources for the same node, the PK
|
|
3792
|
-
* accepts the pair; search returns the node once via DISTINCT, the
|
|
3793
|
-
* UI renders both chips with their attribution.
|
|
3790
|
+
* One row per `(node_path, tag)` pair. Projected at persist time from
|
|
3791
|
+
* the node's `sidecar.annotations.tags` (the only tag source).
|
|
3794
3792
|
*
|
|
3795
3793
|
* Belongs to the `scan_*` family, replaced wholesale per scan.
|
|
3796
3794
|
* Cached nodes' tag rows are projected from the cached
|
|
3797
|
-
* `node.
|
|
3798
|
-
*
|
|
3799
|
-
*
|
|
3800
|
-
*
|
|
3795
|
+
* `node.sidecar.annotations.tags` (already in memory at persist time),
|
|
3796
|
+
* so the rebuild is cheap regardless of cache hit / miss. See
|
|
3797
|
+
* `spec/db-schema.md` § scan_node_tags for the normative shape and
|
|
3798
|
+
* replace-all semantics.
|
|
3801
3799
|
*/
|
|
3802
3800
|
|
|
3803
3801
|
/**
|
|
3804
3802
|
* In-memory tag record buffered during scan and flushed to
|
|
3805
3803
|
* `scan_node_tags` by `persistScanResult`. One entry per
|
|
3806
|
-
* `(node_path, tag
|
|
3807
|
-
* (`
|
|
3808
|
-
* (`source: 'user'`).
|
|
3804
|
+
* `(node_path, tag)` pair projected from a node's sidecar annotations
|
|
3805
|
+
* tags (`sidecar.annotations.tags`).
|
|
3809
3806
|
*/
|
|
3810
3807
|
interface ITagRecord {
|
|
3811
3808
|
nodePath: string;
|
|
3812
3809
|
tag: string;
|
|
3813
|
-
source: 'author' | 'user';
|
|
3814
3810
|
}
|
|
3815
3811
|
|
|
3816
3812
|
/**
|
|
@@ -3993,25 +3989,23 @@ interface StoragePort {
|
|
|
3993
3989
|
/**
|
|
3994
3990
|
* Read-only access to `scan_node_tags`. Writes happen exclusively
|
|
3995
3991
|
* via `scans.persist({...})` (the persistence layer projects from
|
|
3996
|
-
* `node.
|
|
3992
|
+
* `node.sidecar.annotations.tags`, the only tag source); this
|
|
3997
3993
|
* namespace is read-only.
|
|
3998
3994
|
*/
|
|
3999
3995
|
tags: {
|
|
4000
|
-
/** Every tag row for a single node
|
|
3996
|
+
/** Every tag row for a single node, ordered by tag name. */
|
|
4001
3997
|
listForNode(nodePath: string): Promise<ITagRecord[]>;
|
|
4002
3998
|
/**
|
|
4003
3999
|
* Bulk variant for the BFF nodes-list route. Returns rows for every
|
|
4004
|
-
* path in `paths`, sorted `
|
|
4005
|
-
*
|
|
4000
|
+
* path in `paths`, sorted `tag` ASC. Empty `paths` returns `[]`
|
|
4001
|
+
* without a query.
|
|
4006
4002
|
*/
|
|
4007
4003
|
listForPaths(paths: readonly string[]): Promise<ITagRecord[]>;
|
|
4008
4004
|
/**
|
|
4009
|
-
* Find every node carrying `tag
|
|
4010
|
-
*
|
|
4011
|
-
* --tag-source author|user`); absent matches the union (default
|
|
4012
|
-
* `sm list --tag`).
|
|
4005
|
+
* Find every node carrying `tag` in its `.sm` sidecar
|
|
4006
|
+
* (`annotations.tags`). Drives `sm list --tag <name>`.
|
|
4013
4007
|
*/
|
|
4014
|
-
findNodes(tag: string
|
|
4008
|
+
findNodes(tag: string): Promise<string[]>;
|
|
4015
4009
|
};
|
|
4016
4010
|
issues: {
|
|
4017
4011
|
/** Every issue from the latest scan, in insertion order. */
|
package/dist/kernel/index.js
CHANGED
|
@@ -101,11 +101,11 @@ import cl100k_base from "js-tiktoken/ranks/cl100k_base";
|
|
|
101
101
|
// package.json
|
|
102
102
|
var package_default = {
|
|
103
103
|
name: "@skill-map/cli",
|
|
104
|
-
version: "0.
|
|
104
|
+
version: "0.44.0",
|
|
105
105
|
description: "skill-map reference implementation \u2014 kernel + CLI + adapters.",
|
|
106
106
|
license: "MIT",
|
|
107
107
|
type: "module",
|
|
108
|
-
homepage: "https://skill-map.
|
|
108
|
+
homepage: "https://skill-map.ai",
|
|
109
109
|
repository: {
|
|
110
110
|
type: "git",
|
|
111
111
|
url: "git+https://github.com/crystian/skill-map.git",
|
|
@@ -152,25 +152,25 @@ var package_default = {
|
|
|
152
152
|
typecheck: "tsc --noEmit",
|
|
153
153
|
lint: "eslint .",
|
|
154
154
|
"lint:fix": "eslint . --fix",
|
|
155
|
-
reference: "node scripts/build-reference.js",
|
|
156
|
-
"reference:check": "node scripts/build-reference.js --check",
|
|
157
155
|
"build-built-ins": "node ../scripts/generate-built-ins.js",
|
|
158
156
|
"built-ins:check": "node ../scripts/generate-built-ins.js --check",
|
|
159
157
|
prebuild: "pnpm build-built-ins",
|
|
160
158
|
validate: "pnpm validate:compile && pnpm validate:test",
|
|
161
|
-
"validate:compile": "pnpm typecheck && pnpm lint && pnpm build && pnpm
|
|
159
|
+
"validate:compile": "pnpm typecheck && pnpm lint && pnpm build && pnpm built-ins:check",
|
|
162
160
|
"validate:test": "pnpm test:ci",
|
|
163
161
|
pretest: "tsup",
|
|
164
162
|
"pretest:coverage": "tsup",
|
|
165
163
|
"pretest:coverage:html": "tsup",
|
|
166
|
-
test: "tsc --noEmit && node --import tsx --test --test-reporter=
|
|
167
|
-
"test:ci": "node --import tsx --test '__tests__/**/*.spec.ts' 'kernel/**/__tests__/**/*.spec.ts' 'cli/**/__tests__/**/*.spec.ts' 'server/**/__tests__/**/*.spec.ts' 'plugins/**/__tests__/**/*.spec.ts' 'core/**/__tests__/**/*.spec.ts' 'conformance/**/__tests__/**/*.spec.ts'",
|
|
168
|
-
"test:
|
|
169
|
-
"test:coverage
|
|
164
|
+
test: "tsc --noEmit && SKILL_MAP_TELEMETRY=0 node --import tsx --test --test-reporter=./scripts/test-reporter.js --test-reporter-destination=stdout '__tests__/**/*.spec.ts' 'kernel/**/__tests__/**/*.spec.ts' 'cli/**/__tests__/**/*.spec.ts' 'server/**/__tests__/**/*.spec.ts' 'plugins/**/__tests__/**/*.spec.ts' 'core/**/__tests__/**/*.spec.ts' 'conformance/**/__tests__/**/*.spec.ts'",
|
|
165
|
+
"test:ci": "FORCE_COLOR=1 SKILL_MAP_TELEMETRY=0 node --import tsx --test --test-reporter=./scripts/test-reporter.js --test-reporter-destination=stdout '__tests__/**/*.spec.ts' 'kernel/**/__tests__/**/*.spec.ts' 'cli/**/__tests__/**/*.spec.ts' 'server/**/__tests__/**/*.spec.ts' 'plugins/**/__tests__/**/*.spec.ts' 'core/**/__tests__/**/*.spec.ts' 'conformance/**/__tests__/**/*.spec.ts'",
|
|
166
|
+
"test:spec": "SKILL_MAP_TELEMETRY=0 node --import tsx --test --test-reporter=spec '__tests__/**/*.spec.ts' 'kernel/**/__tests__/**/*.spec.ts' 'cli/**/__tests__/**/*.spec.ts' 'server/**/__tests__/**/*.spec.ts' 'plugins/**/__tests__/**/*.spec.ts' 'core/**/__tests__/**/*.spec.ts' 'conformance/**/__tests__/**/*.spec.ts'",
|
|
167
|
+
"test:coverage": "tsc --noEmit && SKILL_MAP_TELEMETRY=0 SKILL_MAP_SKIP_BENCHMARK=1 node --experimental-default-config-file --import tsx --test --experimental-test-coverage '__tests__/**/*.spec.ts' 'kernel/**/__tests__/**/*.spec.ts' 'cli/**/__tests__/**/*.spec.ts' 'server/**/__tests__/**/*.spec.ts' 'plugins/**/__tests__/**/*.spec.ts' 'core/**/__tests__/**/*.spec.ts' 'conformance/**/__tests__/**/*.spec.ts'",
|
|
168
|
+
"test:coverage:html": "tsc --noEmit && SKILL_MAP_TELEMETRY=0 SKILL_MAP_SKIP_BENCHMARK=1 c8 node --import tsx --test '__tests__/**/*.spec.ts' 'kernel/**/__tests__/**/*.spec.ts' 'cli/**/__tests__/**/*.spec.ts' 'server/**/__tests__/**/*.spec.ts' 'plugins/**/__tests__/**/*.spec.ts' 'core/**/__tests__/**/*.spec.ts' 'conformance/**/__tests__/**/*.spec.ts'",
|
|
170
169
|
clean: "rm -rf dist coverage"
|
|
171
170
|
},
|
|
172
171
|
dependencies: {
|
|
173
172
|
"@hono/node-server": "2.0.1",
|
|
173
|
+
"@sentry/node": "10.55.0",
|
|
174
174
|
"@skill-map/spec": "workspace:*",
|
|
175
175
|
ajv: "8.18.0",
|
|
176
176
|
"ajv-formats": "3.0.1",
|
|
@@ -181,6 +181,7 @@ var package_default = {
|
|
|
181
181
|
"js-tiktoken": "1.0.21",
|
|
182
182
|
"js-yaml": "4.1.1",
|
|
183
183
|
kysely: "0.28.17",
|
|
184
|
+
"posthog-node": "5.35.6",
|
|
184
185
|
semver: "7.7.4",
|
|
185
186
|
"smol-toml": "1.6.1",
|
|
186
187
|
typanion: "3.14.0",
|
|
@@ -454,10 +455,10 @@ function buildSchemaValidators() {
|
|
|
454
455
|
hook: "extension-hook"
|
|
455
456
|
};
|
|
456
457
|
const pluginManifestValidator = ajv.compile({
|
|
457
|
-
$ref: "https://skill-map.
|
|
458
|
+
$ref: "https://skill-map.ai/spec/v0/plugins-registry.schema.json#/$defs/PluginManifest"
|
|
458
459
|
});
|
|
459
460
|
const contributionValidators = /* @__PURE__ */ new Map();
|
|
460
|
-
const VIEW_SLOTS_ID = "https://skill-map.
|
|
461
|
+
const VIEW_SLOTS_ID = "https://skill-map.ai/spec/v0/view-slots.schema.json";
|
|
461
462
|
function getContributionValidator(slot) {
|
|
462
463
|
if (!KNOWN_SLOT_NAMES.has(slot)) return null;
|
|
463
464
|
const existing = contributionValidators.get(slot);
|
|
@@ -3220,7 +3221,8 @@ function buildPostWalkTransformCtx(providers, nodes, activeProvider) {
|
|
|
3220
3221
|
const reservedNodePaths = buildReservedNodePaths(
|
|
3221
3222
|
nodes,
|
|
3222
3223
|
kindRegistry,
|
|
3223
|
-
reservedNamesByProviderKind
|
|
3224
|
+
reservedNamesByProviderKind,
|
|
3225
|
+
activeProvider
|
|
3224
3226
|
);
|
|
3225
3227
|
return { kindRegistry, providerResolution, activeProvider, reservedNodePaths };
|
|
3226
3228
|
}
|
|
@@ -3251,19 +3253,23 @@ function indexReservedNames(provider, out) {
|
|
|
3251
3253
|
}
|
|
3252
3254
|
}
|
|
3253
3255
|
}
|
|
3254
|
-
function buildReservedNodePaths(nodes, kindRegistry, reservedNamesByProviderKind) {
|
|
3256
|
+
function buildReservedNodePaths(nodes, kindRegistry, reservedNamesByProviderKind, activeProvider) {
|
|
3255
3257
|
const out = /* @__PURE__ */ new Set();
|
|
3256
3258
|
for (const node of nodes) {
|
|
3257
|
-
const
|
|
3258
|
-
const
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3259
|
+
const selfKey = `${node.provider}/${node.kind}`;
|
|
3260
|
+
const selfReserved = reservedNamesByProviderKind.get(selfKey);
|
|
3261
|
+
const lensReserved = activeProvider && activeProvider !== node.provider ? reservedNamesByProviderKind.get(`${activeProvider}/${node.kind}`) : void 0;
|
|
3262
|
+
if (!hasEntries(selfReserved) && !hasEntries(lensReserved)) continue;
|
|
3263
|
+
const ids = deriveNodeIdentifiers(node, kindRegistry.get(selfKey));
|
|
3264
|
+
if (ids.some((id) => selfReserved?.has(id) === true || lensReserved?.has(id) === true)) {
|
|
3262
3265
|
out.add(node.path);
|
|
3263
3266
|
}
|
|
3264
3267
|
}
|
|
3265
3268
|
return out;
|
|
3266
3269
|
}
|
|
3270
|
+
function hasEntries(set) {
|
|
3271
|
+
return set !== void 0 && set.size > 0;
|
|
3272
|
+
}
|
|
3267
3273
|
function buildScanSetup(options) {
|
|
3268
3274
|
const start = Date.now();
|
|
3269
3275
|
const emitter = options.emitter ?? new InMemoryProgressEmitter();
|