@skill-map/cli 0.37.0 → 0.38.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.
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * Extension registry, six kinds, first-class, loaded through a single API.
3
3
  *
4
- * The `Extension` shape is aligned with `spec/schemas/extensions/base.schema.json`.
4
+ * The `IExtension` shape is aligned with `spec/schemas/extensions/base.schema.json`.
5
5
  * Kind-specific manifests (provider / extractor / analyzer / action / formatter /
6
6
  * hook) extend this base structurally; the registry stores the base view
7
7
  * and each kind's code carries its own fuller type where needed.
8
8
  *
9
9
  * **Spec § A.6, qualified ids.** Every extension is keyed in the registry
10
10
  * by `<pluginId>/<id>` (e.g. `core/annotations`, `core/slash`,
11
- * `my-plugin/my-extractor`). `Extension.id` carries the **short** id as authored;
12
- * `Extension.pluginId` carries the namespace; the registry composes the
11
+ * `my-plugin/my-extractor`). `IExtension.id` carries the **short** id as authored;
12
+ * `IExtension.pluginId` carries the namespace; the registry composes the
13
13
  * qualifier internally and exposes lookup APIs that operate on either form
14
14
  * (qualified for direct lookup, kind-scoped listing for enumeration).
15
15
  *
@@ -19,7 +19,7 @@
19
19
  */
20
20
  type ExtensionKind = 'provider' | 'extractor' | 'analyzer' | 'action' | 'formatter' | 'hook';
21
21
  declare const EXTENSION_KINDS: readonly ExtensionKind[];
22
- interface Extension {
22
+ interface IExtension {
23
23
  /** Short (unqualified) extension id, injected by the loader from the leaf folder name. */
24
24
  id: string;
25
25
  /** Owning plugin namespace, injected by the loader from the plugin folder name. */
@@ -42,18 +42,18 @@ declare class DuplicateExtensionError extends Error {
42
42
  declare class Registry {
43
43
  #private;
44
44
  constructor();
45
- register(ext: Extension): void;
45
+ register(ext: IExtension): void;
46
46
  /**
47
47
  * Lookup by qualified id (`<pluginId>/<id>`). Returns `undefined` when
48
48
  * no extension of that kind is registered under the qualifier.
49
49
  */
50
- get(kind: ExtensionKind, qualifiedId: string): Extension | undefined;
50
+ get(kind: ExtensionKind, qualifiedId: string): IExtension | undefined;
51
51
  /**
52
52
  * Convenience wrapper that composes the qualified id for the caller.
53
53
  * Equivalent to `get(kind, qualifiedExtensionId(pluginId, id))`.
54
54
  */
55
- find(kind: ExtensionKind, pluginId: string, id: string): Extension | undefined;
56
- all(kind: ExtensionKind): Extension[];
55
+ find(kind: ExtensionKind, pluginId: string, id: string): IExtension | undefined;
56
+ all(kind: ExtensionKind): IExtension[];
57
57
  count(kind: ExtensionKind): number;
58
58
  totalCount(): number;
59
59
  }
@@ -207,7 +207,7 @@ interface IRegisteredViewContribution {
207
207
  }
208
208
  /**
209
209
  * Common fields on every setting declaration. The discriminated union
210
- * `ISettingDeclaration` extends one of these per `type` value.
210
+ * `TSettingDeclaration` extends one of these per `type` value.
211
211
  */
212
212
  interface ISettingCommon {
213
213
  /** Required. Short human-readable label. English-only. */
@@ -297,7 +297,7 @@ interface ISetting_KeyValueList extends ISettingCommon {
297
297
  *
298
298
  * Mirror of `input-types.schema.json#/$defs/ISettingDeclaration`.
299
299
  */
300
- type ISettingDeclaration = ISetting_StringList | ISetting_SingleString | ISetting_BooleanFlag | ISetting_Integer | ISetting_EnumPick | ISetting_EnumMultipick | ISetting_PathGlob | ISetting_Regex | ISetting_Secret | ISetting_KeyValueList;
300
+ type TSettingDeclaration = ISetting_StringList | ISetting_SingleString | ISetting_BooleanFlag | ISetting_Integer | ISetting_EnumPick | ISetting_EnumMultipick | ISetting_PathGlob | ISetting_Regex | ISetting_Secret | ISetting_KeyValueList;
301
301
  /**
302
302
  * Runtime value type for a setting, derived from its declaration. The
303
303
  * kernel exposes settings to extractors as `Record<string, TSettingValue>`
@@ -378,7 +378,7 @@ interface IExtensionBase {
378
378
  * `ctx.settings.<settingId>`. Settings are read once at extension
379
379
  * invocation; changing a setting requires `sm scan` to re-emit.
380
380
  */
381
- settings?: Record<string, ISettingDeclaration>;
381
+ settings?: Record<string, TSettingDeclaration>;
382
382
  /**
383
383
  * Resolved values of the settings declared above, populated by the
384
384
  * orchestrator from project config + user overrides. Runtime-only,
@@ -1302,7 +1302,7 @@ interface IKvStoreWrapper {
1302
1302
  * `write(table, row)`. Plugin authors narrow at the call site based on
1303
1303
  * the storage mode declared in their `plugin.json`.
1304
1304
  */
1305
- type IPluginStore = IKvStoreWrapper | IDedicatedStoreWrapper;
1305
+ type TPluginStore = IKvStoreWrapper | IDedicatedStoreWrapper;
1306
1306
  declare function makeKvStoreWrapper(opts: {
1307
1307
  pluginId: string;
1308
1308
  schema: IPluginStorageSchema | undefined;
@@ -1338,7 +1338,7 @@ declare function makePluginStore(opts: {
1338
1338
  plugin: IDiscoveredPlugin;
1339
1339
  persistKv?: IKvStorePersist;
1340
1340
  persistDedicated?: IDedicatedStorePersist;
1341
- }): IPluginStore | undefined;
1341
+ }): TPluginStore | undefined;
1342
1342
 
1343
1343
  /**
1344
1344
  * Row-level filter for `port.scans.findNodes(...)` (driven by
@@ -1468,6 +1468,14 @@ interface IIssueRow {
1468
1468
  * - `nodePath`, keeps issues whose `nodeIds` JSON array contains the
1469
1469
  * given path (correlated EXISTS over `json_each`). Absent / null
1470
1470
  * skips the filter.
1471
+ * - `nodePaths`, multi-node variant of `nodePath`: keeps issues
1472
+ * whose `nodeIds` JSON array intersects the given set (correlated
1473
+ * EXISTS over `json_each` with an `IN(...)` predicate). Used by
1474
+ * the linked-nodes panel to fetch issues for the focused node +
1475
+ * its neighbours in one round-trip instead of pulling the whole
1476
+ * table. Empty array matches zero rows; absent skips the filter.
1477
+ * Combines with `nodePath` (intersection); when both are set, the
1478
+ * `nodePath` predicate is AND-ed with `nodePaths`.
1471
1479
  *
1472
1480
  * Pagination is mandatory; the route layer fills the defaults via
1473
1481
  * `parsePagination`. `total` in `IIssueListResult` reports the total
@@ -1485,6 +1493,7 @@ interface IIssueListFilter {
1485
1493
  severities?: readonly string[];
1486
1494
  analyzerIds?: readonly string[];
1487
1495
  nodePath?: string | null;
1496
+ nodePaths?: readonly string[];
1488
1497
  offset: number;
1489
1498
  limit: number;
1490
1499
  }
@@ -2992,7 +3001,7 @@ declare function runExtractorsForNode(opts: {
2992
3001
  * don't track plugin storage can omit it; the resulting `ctx.store`
2993
3002
  * stays `undefined` (the existing contract).
2994
3003
  */
2995
- pluginStores?: ReadonlyMap<string, IPluginStore>;
3004
+ pluginStores?: ReadonlyMap<string, TPluginStore>;
2996
3005
  }): Promise<{
2997
3006
  internalLinks: Link[];
2998
3007
  externalLinks: Link[];
@@ -3257,7 +3266,7 @@ interface RunScanOptions {
3257
3266
  * its own persist callback) and lets tests inject a captured-call
3258
3267
  * mock without spinning up a DB.
3259
3268
  */
3260
- pluginStores?: ReadonlyMap<string, IPluginStore>;
3269
+ pluginStores?: ReadonlyMap<string, TPluginStore>;
3261
3270
  /**
3262
3271
  * Pre-computed absolute paths of orphan job MD files (files under
3263
3272
  * `.skill-map/jobs/` whose absolute path appears nowhere in
@@ -4298,4 +4307,4 @@ interface Kernel {
4298
4307
  }
4299
4308
  declare function createKernel(): Kernel;
4300
4309
 
4301
- export { type Confidence, DuplicateExtensionError, EXTENSION_KINDS, type ExecutionFailureReason, type ExecutionKind, type ExecutionRecord, type ExecutionRunner, type ExecutionStatus, ExportQueryError, type Extension, type ExtensionKind, type FilesystemPort, HOOK_TRIGGERS, type HistoryStats, type HistoryStatsErrorRates, type HistoryStatsExecutionsPerPeriod, type HistoryStatsPerActionRate, type HistoryStatsTokensPerAction, type HistoryStatsTopNode, type HistoryStatsTotals, type IAction, type IActionContext, type IActionPrecondition, type IActionResult, type IAnalyzer, type IAnalyzerContext, type IAnnotationContribution, type ICreateFsWatcherOptions, type IDedicatedStorePersist, type IDedicatedStoreWrapper, type IDiscoveredPlugin, type IEnrichmentRecord, type IExportQuery, type IExportSubset, type IExtensionBase, type IExternalRef, type IExtractor, type IExtractorCallbacks, type IExtractorContext, type IExtractorRunRecord, type IFormatter, type IFormatterContext, type IFsWatcher, type IHook, type IHookContext, type IHookDispatcher, type IIssueRow, type IKvStorePersist, type IKvStoreWrapper, type ILoadedExtension, type INodeBundle, type INodeChange, type INodeCounts, type INodeFilter, type IPersistOptions, type IPersistedEnrichment, type IPluginManifest, type IPluginStorageSchema, type IPluginStore, type IProvider, type IRawNode, type IRegisteredAnnotationKey, type IRegisteredViewContribution, type IRunOptions, type IRunResult, type IScanDelta, type ISettingDeclaration, type ITransactionalStorage, type IViewContribution, type IWalkOptions, type IWatchBatch, type IWatchEvent, InMemoryProgressEmitter, type Issue, type IssueFix, KV_SCHEMA_KEY, type Kernel, LOG_LEVELS, type Link, type LinkKind, type LinkLocation, type LinkOccurrence, type LinkTrigger, type LogRecord, type LoggerPort, type Node, type NodeKind, type NodeStat, type PluginLoaderPort, type ProgressEmitterPort, type ProgressEvent, Registry, type RenameOp, type RunScanOptions, type RunnerPort, type ScanResult, type ScanScannedBy, type ScanStats, type Severity, SilentLogger, type Stability, type StoragePort, type TActionWrite, type TExecutionMode, type TGranularity, type THookFilter, type THookTrigger, type TInputTypeName, type TLogLevel, type TLogMethodLevel, type TNodeChangeReason, type TPluginLoadStatus, type TPluginStorage, type TProgressListener, type TSettingValue, type TSeverity, type TSlotName, type TWatchEventKind, type TripleSplit, applyExportQuery, computeScanDelta, configureLogger, createChokidarWatcher, createKernel, detectRenamesAndOrphans, getActiveLogger, isEmptyDelta, isLogLevel, log, logLevelRank, makeDedicatedStoreWrapper, makeEvent, makeHookDispatcher, makeKvStoreWrapper, makePluginStore, mergeNodeWithEnrichments, parseExportQuery, parseLogLevel, qualifiedExtensionId, resetLogger, runExtractorsForNode, runScan, runScanWithRenames };
4310
+ export { type Confidence, DuplicateExtensionError, EXTENSION_KINDS, type ExecutionFailureReason, type ExecutionKind, type ExecutionRecord, type ExecutionRunner, type ExecutionStatus, ExportQueryError, type ExtensionKind, type FilesystemPort, HOOK_TRIGGERS, type HistoryStats, type HistoryStatsErrorRates, type HistoryStatsExecutionsPerPeriod, type HistoryStatsPerActionRate, type HistoryStatsTokensPerAction, type HistoryStatsTopNode, type HistoryStatsTotals, type IAction, type IActionContext, type IActionPrecondition, type IActionResult, type IAnalyzer, type IAnalyzerContext, type IAnnotationContribution, type ICreateFsWatcherOptions, type IDedicatedStorePersist, type IDedicatedStoreWrapper, type IDiscoveredPlugin, type IEnrichmentRecord, type IExportQuery, type IExportSubset, type IExtension, type IExtensionBase, type IExternalRef, type IExtractor, type IExtractorCallbacks, type IExtractorContext, type IExtractorRunRecord, type IFormatter, type IFormatterContext, type IFsWatcher, type IHook, type IHookContext, type IHookDispatcher, type IIssueRow, type IKvStorePersist, type IKvStoreWrapper, type ILoadedExtension, type INodeBundle, type INodeChange, type INodeCounts, type INodeFilter, type IPersistOptions, type IPersistedEnrichment, type IPluginManifest, type IPluginStorageSchema, type IProvider, type IRawNode, type IRegisteredAnnotationKey, type IRegisteredViewContribution, type IRunOptions, type IRunResult, type IScanDelta, type ITransactionalStorage, type IViewContribution, type IWalkOptions, type IWatchBatch, type IWatchEvent, InMemoryProgressEmitter, type Issue, type IssueFix, KV_SCHEMA_KEY, type Kernel, LOG_LEVELS, type Link, type LinkKind, type LinkLocation, type LinkOccurrence, type LinkTrigger, type LogRecord, type LoggerPort, type Node, type NodeKind, type NodeStat, type PluginLoaderPort, type ProgressEmitterPort, type ProgressEvent, Registry, type RenameOp, type RunScanOptions, type RunnerPort, type ScanResult, type ScanScannedBy, type ScanStats, type Severity, SilentLogger, type Stability, type StoragePort, type TActionWrite, type TExecutionMode, type TGranularity, type THookFilter, type THookTrigger, type TInputTypeName, type TLogLevel, type TLogMethodLevel, type TNodeChangeReason, type TPluginLoadStatus, type TPluginStorage, type TPluginStore, type TProgressListener, type TSettingDeclaration, type TSettingValue, type TSeverity, type TSlotName, type TWatchEventKind, type TripleSplit, applyExportQuery, computeScanDelta, configureLogger, createChokidarWatcher, createKernel, detectRenamesAndOrphans, getActiveLogger, isEmptyDelta, isLogLevel, log, logLevelRank, makeDedicatedStoreWrapper, makeEvent, makeHookDispatcher, makeKvStoreWrapper, makePluginStore, mergeNodeWithEnrichments, parseExportQuery, parseLogLevel, qualifiedExtensionId, resetLogger, runExtractorsForNode, runScan, runScanWithRenames };
@@ -43,7 +43,7 @@ var DuplicateExtensionError = class extends Error {
43
43
  }
44
44
  };
45
45
  var Registry = class {
46
- /** kind → qualifiedId → Extension. */
46
+ /** kind → qualifiedId → IExtension. */
47
47
  #byKind;
48
48
  constructor() {
49
49
  this.#byKind = new Map(
@@ -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.37.0",
104
+ version: "0.38.0",
105
105
  description: "skill-map reference implementation \u2014 kernel + CLI + adapters.",
106
106
  license: "MIT",
107
107
  type: "module",
@@ -184,7 +184,7 @@ var package_default = {
184
184
  semver: "7.7.4",
185
185
  "smol-toml": "1.6.1",
186
186
  typanion: "3.14.0",
187
- ws: "8.20.0"
187
+ ws: "8.21.0"
188
188
  },
189
189
  devDependencies: {
190
190
  "@eslint/js": "10.0.1",
@@ -700,7 +700,7 @@ import { join as join6 } from "path";
700
700
 
701
701
  // core/config/helper.ts
702
702
  import { homedir as osHomedir } from "os";
703
- import { isAbsolute as isAbsolute2, join as join5, resolve as resolve6 } from "path";
703
+ import { isAbsolute as isAbsolute2, join as join5, resolve as resolve6, sep } from "path";
704
704
 
705
705
  // kernel/config/loader.ts
706
706
  import { existsSync as existsSync3, readFileSync as readFileSync5 } from "fs";
@@ -2205,7 +2205,7 @@ function detectRenamesAndOrphans(prior, current, issues, silenced) {
2205
2205
 
2206
2206
  // kernel/scan/walk-content.ts
2207
2207
  import { readFile, readdir, lstat } from "fs/promises";
2208
- import { join as join7, relative as relative2, sep } from "path";
2208
+ import { join as join7, relative as relative2, sep as sep2 } from "path";
2209
2209
 
2210
2210
  // kernel/scan/ignore.ts
2211
2211
  import { existsSync as existsSync6, readFileSync as readFileSync7 } from "fs";
@@ -2362,7 +2362,7 @@ async function* walkContent(roots, options) {
2362
2362
  const extensions = options.extensions;
2363
2363
  for (const root of roots) {
2364
2364
  for await (const file of walkRoot(root, root, filter, extensions)) {
2365
- const relPath = relative2(root, file).split(sep).join("/");
2365
+ const relPath = relative2(root, file).split(sep2).join("/");
2366
2366
  let raw;
2367
2367
  try {
2368
2368
  raw = await readFile(file, "utf8");
@@ -2394,7 +2394,7 @@ async function* walkRoot(root, current, filter, extensions) {
2394
2394
  for (const entry of entries) {
2395
2395
  const name = entry.name;
2396
2396
  const full = join7(current, name);
2397
- const rel = relative2(root, full).split(sep).join("/");
2397
+ const rel = relative2(root, full).split(sep2).join("/");
2398
2398
  if (filter.ignores(rel)) continue;
2399
2399
  if (entry.isSymbolicLink()) continue;
2400
2400
  if (entry.isDirectory()) {
@@ -2550,7 +2550,7 @@ function computeDriftStatus(args) {
2550
2550
 
2551
2551
  // kernel/sidecar/discover-orphans.ts
2552
2552
  import { existsSync as existsSync8, readdirSync as readdirSync3, statSync as statSync3 } from "fs";
2553
- import { join as join8, relative as relative3, sep as sep2 } from "path";
2553
+ import { join as join8, relative as relative3, sep as sep3 } from "path";
2554
2554
  function discoverOrphanSidecars(roots, shouldSkip) {
2555
2555
  const out = [];
2556
2556
  for (const root of roots) {
@@ -2567,7 +2567,7 @@ function walk(root, current, shouldSkip, out) {
2567
2567
  }
2568
2568
  for (const entry of entries) {
2569
2569
  const full = join8(current, entry.name);
2570
- const rel = relative3(root, full).split(sep2).join("/");
2570
+ const rel = relative3(root, full).split(sep3).join("/");
2571
2571
  if (shouldSkip(rel)) continue;
2572
2572
  if (entry.isSymbolicLink()) continue;
2573
2573
  if (entry.isDirectory()) {
@@ -3340,7 +3340,7 @@ function resolveActiveProviderOption(optionValue, roots) {
3340
3340
  }
3341
3341
 
3342
3342
  // kernel/scan/watcher.ts
3343
- import { resolve as resolve12, relative as relative4, sep as sep3 } from "path";
3343
+ import { resolve as resolve12, relative as relative4, sep as sep4 } from "path";
3344
3344
  import chokidar from "chokidar";
3345
3345
  function createChokidarWatcher(opts) {
3346
3346
  const absRoots = opts.roots.map((r) => resolve12(opts.cwd, r));
@@ -3438,8 +3438,8 @@ function relativePathFromRoots2(absolute, absRoots) {
3438
3438
  for (const root of absRoots) {
3439
3439
  const rel = relative4(root, absolute);
3440
3440
  if (rel === "" || rel === ".") return "";
3441
- if (!rel.startsWith("..") && !rel.startsWith(`..${sep3}`)) {
3442
- return rel.split(sep3).join("/");
3441
+ if (!rel.startsWith("..") && !rel.startsWith(`..${sep4}`)) {
3442
+ return rel.split(sep4).join("/");
3443
3443
  }
3444
3444
  }
3445
3445
  return null;