@skill-map/cli 0.43.0 → 0.45.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 (46) 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 +263 -369
  6. package/dist/cli.js +945 -256
  7. package/dist/cli.js.map +1 -1
  8. package/dist/index.js +21 -15
  9. package/dist/index.js.map +1 -1
  10. package/dist/kernel/index.d.ts +43 -6
  11. package/dist/kernel/index.js +21 -15
  12. package/dist/kernel/index.js.map +1 -1
  13. package/dist/ui/chunk-27WQPOXP.js +1 -0
  14. package/dist/ui/{chunk-DZBSELHN.js → chunk-43S72FTV.js} +1 -1
  15. package/dist/ui/chunk-555ST76V.js +1 -0
  16. package/dist/ui/{chunk-JPYAASHN.js → chunk-5AD5ZV4I.js} +3 -3
  17. package/dist/ui/{chunk-CFJBTDAA.js → chunk-5ITZXW3A.js} +1 -1
  18. package/dist/ui/chunk-A7PRWMQD.js +1021 -0
  19. package/dist/ui/chunk-CBI77N5U.js +123 -0
  20. package/dist/ui/chunk-F7I6KMHX.js +1 -0
  21. package/dist/ui/{chunk-77J7XU3Y.js → chunk-I5AX4U2N.js} +28 -28
  22. package/dist/ui/chunk-IUZRAD7S.js +1 -0
  23. package/dist/ui/{chunk-XOHD5XWA.js → chunk-IYM26L3O.js} +1 -1
  24. package/dist/ui/{chunk-SBCO7ZSP.js → chunk-LGFABCIA.js} +1 -1
  25. package/dist/ui/{chunk-IUDL3NDH.js → chunk-MFLFIA7C.js} +1 -1
  26. package/dist/ui/chunk-MS6B7344.js +315 -0
  27. package/dist/ui/chunk-P3SNMV4X.js +2 -0
  28. package/dist/ui/chunk-PZQHB7GS.js +4 -0
  29. package/dist/ui/chunk-QDUSFOBE.js +1 -0
  30. package/dist/ui/{chunk-YCR3XCIW.js → chunk-QNTAOR2L.js} +5 -5
  31. package/dist/ui/{chunk-CR3AANNX.js → chunk-S4S5ZMXJ.js} +1 -1
  32. package/dist/ui/{chunk-5WJRN3LD.js → chunk-T3IVIRRJ.js} +1 -1
  33. package/dist/ui/{chunk-HP375T2O.js → chunk-VGPYYAVI.js} +1 -1
  34. package/dist/ui/chunk-X227ITGS.js +499 -0
  35. package/dist/ui/index.html +1 -1
  36. package/dist/ui/main-ERCTR2PR.js +3 -0
  37. package/package.json +10 -9
  38. package/dist/ui/chunk-2IF446BS.js +0 -1
  39. package/dist/ui/chunk-DIKPNZUZ.js +0 -315
  40. package/dist/ui/chunk-KGCJINI6.js +0 -1
  41. package/dist/ui/chunk-PPE3P2JD.js +0 -1
  42. package/dist/ui/chunk-UOCACZLI.js +0 -123
  43. package/dist/ui/chunk-YL6SWAFJ.js +0 -1024
  44. package/dist/ui/main-VHFB7Q2D.js +0 -3
  45. /package/dist/ui/{chunk-C2YUQODZ.js → chunk-4SG4352Z.js} +0 -0
  46. /package/dist/ui/{chunk-VB56BUGO.js → chunk-WCABR6TI.js} +0 -0
@@ -2026,6 +2026,31 @@ interface IProviderDetect {
2026
2026
  */
2027
2027
  markers: string[];
2028
2028
  }
2029
+ /**
2030
+ * Authoring targets for verbs that MATERIALISE files into this
2031
+ * Provider's on-disk territory (today only `sm tutorial`). The WRITE
2032
+ * counterpart to `detect` (which READS markers to suggest a lens) and
2033
+ * `classify` (which READS paths during a scan). Mirrors
2034
+ * `spec/schemas/extensions/provider.schema.json#/properties/scaffold`.
2035
+ */
2036
+ interface IProviderScaffold {
2037
+ /**
2038
+ * Directory (relative to the scope root) under which a materialising
2039
+ * verb writes a skill folder, e.g. `.claude/skills` for Claude,
2040
+ * `.agents/skills` for the open standard. The verb appends
2041
+ * `/<skillName>/SKILL.md`. Relative, no leading slash, no `..`
2042
+ * traversal; the consuming verb joins it onto the cwd.
2043
+ */
2044
+ skillDir: string;
2045
+ /**
2046
+ * Display-only hints naming the agents that consume this scaffold
2047
+ * territory, rendered in parentheses next to the Provider label in the
2048
+ * `sm tutorial` destination prompt (e.g. `.agents/skills` is read by
2049
+ * Antigravity and OpenAI Codex). Purely presentational: NOT matched by
2050
+ * `--for` (only registered Provider ids are) and has no runtime effect.
2051
+ */
2052
+ aka?: readonly string[];
2053
+ }
2029
2054
  interface IProvider extends IExtensionBase {
2030
2055
  /** Discriminant injected by the loader from the folder structure. */
2031
2056
  kind: 'provider';
@@ -2049,6 +2074,16 @@ interface IProvider extends IExtensionBase {
2049
2074
  * auto-suggested (it can still be selected manually).
2050
2075
  */
2051
2076
  detect?: IProviderDetect;
2077
+ /**
2078
+ * Optional authoring targets for materialising verbs (`sm tutorial`).
2079
+ * When present, the Provider is offered as a destination for newly
2080
+ * generated content (a skill folder dropped under `scaffold.skillDir`).
2081
+ * Absent means a materialising verb never offers this Provider, e.g.
2082
+ * `openai` until Codex skills land, `antigravity` (skills live under
2083
+ * the open-standard `agent-skills` territory), `core/markdown` (owns
2084
+ * no authoring convention).
2085
+ */
2086
+ scaffold?: IProviderScaffold;
2052
2087
  /**
2053
2088
  * Catalog of node kinds this Provider emits. Populated by the loader
2054
2089
  * from the `<plugin>/kinds/<kindName>/` directory layout: each subfolder
@@ -2560,12 +2595,14 @@ interface IAnalyzerContext {
2560
2595
  */
2561
2596
  referenceablePaths?: ReadonlySet<string>;
2562
2597
  /**
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
2598
+ * Paths of nodes whose normalised identifier(s) intersect a
2599
+ * `reservedNames[kind]` catalog under self scope (the node's own
2600
+ * Provider, e.g. `.claude/commands/help.md` shadowed by Claude's
2601
+ * built-in `/help`) or lens scope (the active lens lending its catalog
2602
+ * to the universal `agent-skills` skill nodes it consumes, e.g.
2603
+ * `.agents/skills/goal/SKILL.md` shadowed by Antigravity's `/goal`).
2604
+ * The set is computed once per scan by the orchestrator (mirroring the
2605
+ * same set threaded to the post-walk confidence-lift transform), so
2569
2606
  * analyzers consume it without re-deriving every node's
2570
2607
  * identifiers. The single consumer today is `core/name-reserved`,
2571
2608
  * which projects one warn issue per entry; future analyzers MAY
@@ -101,7 +101,7 @@ 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.43.0",
104
+ version: "0.45.0",
105
105
  description: "skill-map reference implementation \u2014 kernel + CLI + adapters.",
106
106
  license: "MIT",
107
107
  type: "module",
@@ -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",
@@ -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();