@skill-map/cli 0.9.0 → 0.11.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.
@@ -827,7 +827,71 @@ interface IProviderKind {
827
827
  * disables the Provider with status `invalid-manifest`.
828
828
  */
829
829
  defaultRefreshAction: string;
830
+ /**
831
+ * Presentation metadata the UI consumes to render nodes of this kind
832
+ * (palette swatches, list tags, graph nodes, filter chips). Required
833
+ * so the UI never has to invent visuals for a Provider-declared kind.
834
+ * Mirrors `extensions/provider.schema.json#/properties/kinds/.../ui`.
835
+ */
836
+ ui: IProviderKindUi;
830
837
  }
838
+ /**
839
+ * Presentation contract for one Provider kind. The Provider declares
840
+ * intent (label + base color, optional dark variant + emoji + icon);
841
+ * the UI derives `bg`/`fg` tints per theme via a deterministic helper
842
+ * and reads the registry from the `kindRegistry` field embedded in REST
843
+ * envelopes. Single source of truth for what a kind looks like — the
844
+ * UI never hardcodes presentation for a built-in kind.
845
+ */
846
+ interface IProviderKindUi {
847
+ /**
848
+ * Plural human-readable label for groups of this kind (e.g. `'Skills'`,
849
+ * `'Agents'`, `'Cursor Rules'`). Used in filter dropdowns, palette
850
+ * tooltips, and any list grouping.
851
+ */
852
+ label: string;
853
+ /**
854
+ * Base hex color (`#RRGGBB`) for the light theme. The UI derives `bg`
855
+ * and `fg` tints from this value at runtime via a deterministic
856
+ * helper. Declaring one base value (instead of three) keeps the
857
+ * manifest small and centralises accessibility-driven contrast in the
858
+ * UI.
859
+ */
860
+ color: string;
861
+ /**
862
+ * Optional dark-theme variant of `color`. When absent, the UI falls
863
+ * back to `color`. Declared explicitly because a luminosity flip
864
+ * rarely matches the brand intent for kinds that should stand out in
865
+ * dark mode.
866
+ */
867
+ colorDark?: string;
868
+ /**
869
+ * Optional decorative emoji used as a fallback when `icon` is absent
870
+ * or fails to render. Length-bound so the UI can lay it out
871
+ * predictably alongside text.
872
+ */
873
+ emoji?: string;
874
+ /**
875
+ * Optional discriminated icon descriptor. The UI prefers `icon` over
876
+ * `emoji`; when both are absent, the UI falls back to the first
877
+ * letter of `label` colored with `color`.
878
+ */
879
+ icon?: IProviderKindIcon;
880
+ }
881
+ /**
882
+ * Discriminated icon contract. `pi` references a PrimeIcons identifier
883
+ * (e.g. `'pi-cog'`); `svg` carries raw SVG path data the UI wraps in a
884
+ * `<svg viewBox="0 0 24 24"><path d="…"/></svg>` element tinted with
885
+ * `currentColor`. The discriminator (`kind`) keeps the UI dispatch
886
+ * exhaustive without string-sniffing the payload.
887
+ */
888
+ type IProviderKindIcon = {
889
+ kind: 'pi';
890
+ id: string;
891
+ } | {
892
+ kind: 'svg';
893
+ path: string;
894
+ };
831
895
  interface IProvider extends IExtensionBase {
832
896
  kind: 'provider';
833
897
  /**
@@ -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.9.0",
105
+ version: "0.11.0",
106
106
  description: "skill-map reference implementation \u2014 kernel + CLI + adapters.",
107
107
  license: "MIT",
108
108
  type: "module",
@@ -149,6 +149,7 @@ var package_default = {
149
149
  scripts: {
150
150
  build: "tsup",
151
151
  dev: "tsup --watch",
152
+ "dev:serve": "node ../scripts/dev-serve.js",
152
153
  typecheck: "tsc --noEmit",
153
154
  lint: "eslint .",
154
155
  "lint:fix": "eslint . --fix",
@@ -159,17 +160,20 @@ var package_default = {
159
160
  clean: "rm -rf dist coverage"
160
161
  },
161
162
  dependencies: {
163
+ "@hono/node-server": "2.0.1",
162
164
  "@skill-map/spec": "*",
163
165
  ajv: "8.18.0",
164
166
  "ajv-formats": "3.0.1",
165
167
  chokidar: "5.0.0",
166
168
  clipanion: "4.0.0-rc.4",
169
+ hono: "4.12.16",
167
170
  ignore: "7.0.5",
168
171
  "js-tiktoken": "1.0.21",
169
172
  "js-yaml": "4.1.1",
170
173
  kysely: "0.28.16",
171
174
  semver: "7.7.4",
172
- typanion: "3.14.0"
175
+ typanion: "3.14.0",
176
+ ws: "8.20.0"
173
177
  },
174
178
  devDependencies: {
175
179
  "@eslint/js": "10.0.1",
@@ -177,6 +181,7 @@ var package_default = {
177
181
  "@types/js-yaml": "4.0.9",
178
182
  "@types/node": "24.12.2",
179
183
  "@types/semver": "7.7.1",
184
+ "@types/ws": "8.18.1",
180
185
  c8: "11.0.0",
181
186
  eslint: "10.2.1",
182
187
  "eslint-plugin-import-x": "4.16.2",
@@ -246,9 +251,15 @@ import { existsSync, readFileSync, readdirSync } from "fs";
246
251
  import { isAbsolute, join, relative, resolve } from "path";
247
252
  import { pathToFileURL } from "url";
248
253
  import { Ajv2020 } from "ajv/dist/2020.js";
249
- import addFormatsModule from "ajv-formats";
250
254
  import semver from "semver";
251
255
 
256
+ // kernel/util/ajv-interop.ts
257
+ import addFormatsModule from "ajv-formats";
258
+ var addFormats = addFormatsModule.default ?? addFormatsModule;
259
+ function applyAjvFormats(ajv) {
260
+ addFormats(ajv);
261
+ }
262
+
252
263
  // kernel/i18n/plugin-store.texts.ts
253
264
  var PLUGIN_STORE_TEXTS = {
254
265
  kvValidationFailed: "plugin '{{pluginId}}' ctx.store.set('{{key}}', value): value violates declared schema ({{schemaPath}}) \u2014 {{errors}}",
@@ -339,7 +350,6 @@ var HOOK_TRIGGERS = Object.freeze([
339
350
  ]);
340
351
 
341
352
  // kernel/adapters/plugin-loader.ts
342
- var addFormats = addFormatsModule.default ?? addFormatsModule;
343
353
  var KNOWN_KINDS = /* @__PURE__ */ new Set(["provider", "extractor", "rule", "action", "formatter", "hook"]);
344
354
  var KNOWN_KINDS_LIST = [...KNOWN_KINDS].join(" / ");
345
355
  var HOOKABLE_TRIGGERS_LIST = HOOK_TRIGGERS.join(", ");
@@ -356,8 +366,6 @@ import { readFileSync as readFileSync2 } from "fs";
356
366
  import { dirname, resolve as resolve2 } from "path";
357
367
  import { createRequire as createRequire2 } from "module";
358
368
  import { Ajv2020 as Ajv20202 } from "ajv/dist/2020.js";
359
- import addFormatsModule2 from "ajv-formats";
360
- var addFormats2 = addFormatsModule2.default ?? addFormatsModule2;
361
369
  function buildProviderFrontmatterValidator(providers) {
362
370
  const specRoot = resolveSpecRoot();
363
371
  const ajv = new Ajv20202({
@@ -365,7 +373,7 @@ function buildProviderFrontmatterValidator(providers) {
365
373
  allErrors: true,
366
374
  allowUnionTypes: true
367
375
  });
368
- addFormats2(ajv);
376
+ applyAjvFormats(ajv);
369
377
  const baseFile = resolve2(specRoot, "schemas/frontmatter/base.schema.json");
370
378
  const baseSchema = JSON.parse(readFileSync2(baseFile, "utf8"));
371
379
  ajv.addSchema(baseSchema);