@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.
Files changed (48) hide show
  1. package/dist/cli/tutorial/sm-master/SKILL.md +7 -9
  2. package/dist/cli/tutorial/sm-master/references/fixture-templates.md +1 -1
  3. package/dist/cli/tutorial/sm-master/references/tour-plugins.md +10 -9
  4. package/dist/cli/tutorial/sm-master/references/tour-settings.md +4 -4
  5. package/dist/cli/tutorial/sm-tutorial/SKILL.md +216 -299
  6. package/dist/cli.js +1015 -376
  7. package/dist/cli.js.map +1 -1
  8. package/dist/index.js +24 -18
  9. package/dist/index.js.map +1 -1
  10. package/dist/kernel/index.d.ts +24 -30
  11. package/dist/kernel/index.js +24 -18
  12. package/dist/kernel/index.js.map +1 -1
  13. package/dist/migrations/001_initial.sql +6 -11
  14. package/dist/ui/chunk-27WQPOXP.js +1 -0
  15. package/dist/ui/{chunk-DZBSELHN.js → chunk-43S72FTV.js} +1 -1
  16. package/dist/ui/chunk-555ST76V.js +1 -0
  17. package/dist/ui/{chunk-JPYAASHN.js → chunk-5AD5ZV4I.js} +3 -3
  18. package/dist/ui/{chunk-CFJBTDAA.js → chunk-5ITZXW3A.js} +1 -1
  19. package/dist/ui/chunk-A7PRWMQD.js +1021 -0
  20. package/dist/ui/chunk-DL5EA245.js +123 -0
  21. package/dist/ui/chunk-F7I6KMHX.js +1 -0
  22. package/dist/ui/{chunk-5GD2GBPS.js → chunk-I5AX4U2N.js} +28 -28
  23. package/dist/ui/chunk-IUZRAD7S.js +1 -0
  24. package/dist/ui/{chunk-XOHD5XWA.js → chunk-IYM26L3O.js} +1 -1
  25. package/dist/ui/{chunk-SBCO7ZSP.js → chunk-LGFABCIA.js} +1 -1
  26. package/dist/ui/{chunk-IUDL3NDH.js → chunk-MFLFIA7C.js} +1 -1
  27. package/dist/ui/chunk-MS6B7344.js +315 -0
  28. package/dist/ui/chunk-P3SNMV4X.js +2 -0
  29. package/dist/ui/chunk-PZQHB7GS.js +4 -0
  30. package/dist/ui/chunk-QDUSFOBE.js +1 -0
  31. package/dist/ui/{chunk-HEJCH7BA.js → chunk-QNTAOR2L.js} +5 -5
  32. package/dist/ui/{chunk-CR3AANNX.js → chunk-S4S5ZMXJ.js} +1 -1
  33. package/dist/ui/{chunk-5WJRN3LD.js → chunk-T3IVIRRJ.js} +1 -1
  34. package/dist/ui/{chunk-HP375T2O.js → chunk-VGPYYAVI.js} +1 -1
  35. package/dist/ui/chunk-X227ITGS.js +499 -0
  36. package/dist/ui/index.html +1 -1
  37. package/dist/ui/main-O3CWFYKV.js +3 -0
  38. package/migrations/001_initial.sql +6 -11
  39. package/package.json +11 -10
  40. package/dist/ui/chunk-HFPA56IM.js +0 -1
  41. package/dist/ui/chunk-HHPSCDLM.js +0 -315
  42. package/dist/ui/chunk-HWP3HM55.js +0 -123
  43. package/dist/ui/chunk-PZ6Q5AOT.js +0 -1
  44. package/dist/ui/chunk-XJL4DZ4M.js +0 -1
  45. package/dist/ui/chunk-YL6SWAFJ.js +0 -1024
  46. package/dist/ui/main-7VYTTJP7.js +0 -3
  47. /package/dist/ui/{chunk-C2YUQODZ.js → chunk-4SG4352Z.js} +0 -0
  48. /package/dist/ui/{chunk-VB56BUGO.js → chunk-WCABR6TI.js} +0 -0
@@ -2560,12 +2560,14 @@ interface IAnalyzerContext {
2560
2560
  */
2561
2561
  referenceablePaths?: ReadonlySet<string>;
2562
2562
  /**
2563
- * Paths of nodes whose normalised identifier(s) intersect their
2564
- * Provider's `reservedNames[kind]` catalog (e.g. a user-authored
2565
- * `.claude/commands/help.md` whose name normalises to `help`,
2566
- * shadowed by Claude's built-in `/help` command). The set is
2567
- * computed once per scan by the orchestrator (mirroring the same
2568
- * set threaded to the post-walk confidence-lift transform), so
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 · dual-source persistence layer.
3788
+ * `scan_node_tags` adapter, tags · single-source persistence layer.
3787
3789
  *
3788
- * One row per `(node_path, tag, source)` triple. Projected at persist
3789
- * time from BOTH `frontmatter.tags` (with `source='author'`) and
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.frontmatter.tags` / `node.sidecar.annotations.tags` (both
3798
- * already in memory at persist time), so the rebuild is cheap
3799
- * regardless of cache hit / miss. See `spec/db-schema.md`
3800
- * § scan_node_tags for the normative shape and replace-all semantics.
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, source)` projected from a node's frontmatter tags
3807
- * (`source: 'author'`) or sidecar annotations tags
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.frontmatter.tags` and `node.sidecar.annotations.tags`); this
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. Author entries first, then user. */
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 `nodePath` ASC, then `source` ASC, then
4005
- * `tag` ASC. Empty `paths` returns `[]` without a query.
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`. Optional `source` narrows to one
4010
- * side of the dual surface (matches `sm list --tag <name>
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, source?: 'author' | 'user'): Promise<string[]>;
4008
+ findNodes(tag: string): Promise<string[]>;
4015
4009
  };
4016
4010
  issues: {
4017
4011
  /** Every issue from the latest scan, in insertion order. */
@@ -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.42.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.dev",
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 reference:check && pnpm built-ins:check",
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=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: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:coverage": "tsc --noEmit && 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'",
169
- "test:coverage:html": "tsc --noEmit && 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'",
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.dev/spec/v0/plugins-registry.schema.json#/$defs/PluginManifest"
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.dev/spec/v0/view-slots.schema.json";
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 key = `${node.provider}/${node.kind}`;
3258
- const reservedSet = reservedNamesByProviderKind.get(key);
3259
- if (!reservedSet || reservedSet.size === 0) continue;
3260
- const ids = deriveNodeIdentifiers(node, kindRegistry.get(key));
3261
- if (ids.some((id) => reservedSet.has(id))) {
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();