@skill-map/cli 0.37.0 → 0.39.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
- * 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
10
+ * by `<pluginId>/<id>` (e.g. `core/annotations`, `core/slash-command`,
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,
@@ -490,7 +490,7 @@ interface IExtensionBase {
490
490
  * This alias survives because:
491
491
  * - claude-specific code legitimately wants to switch on the four
492
492
  * hard-coded values (filter widgets, kind-aware UI cards, the
493
- * `validate-all` built-in rule that maps each kind to its
493
+ * `schema-violation` built-in rule that maps each kind to its
494
494
  * frontmatter schema);
495
495
  * - sorting helpers want a stable `KIND_ORDER` for the canonical
496
496
  * catalog;
@@ -560,7 +560,7 @@ interface LinkLocation {
560
560
  * target), or when the same extractor walks an extractor-internal
561
561
  * dedup boundary. Today the merged edge's `trigger` / `location`
562
562
  * mirror the FIRST occurrence; the array carries every site so the
563
- * `core/redundant-target-reference` analyzer can flag multi-form
563
+ * `core/reference-redundant` analyzer can flag multi-form
564
564
  * references and rename operations can find every author surface.
565
565
  */
566
566
  interface LinkOccurrence {
@@ -722,7 +722,7 @@ interface Link {
722
722
  * same `(source, target, kind, normalizedTrigger)` key. Empty / absent
723
723
  * for legacy emits or for synthetic links (frontmatter-driven
724
724
  * references, sidecar annotations) that have no body position. The
725
- * `core/redundant-target-reference` analyzer walks this array to
725
+ * `core/reference-redundant` analyzer walks this array to
726
726
  * detect multi-form references to the same target from one body.
727
727
  */
728
728
  occurrences?: LinkOccurrence[];
@@ -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
  }
@@ -2147,7 +2156,7 @@ interface IProvider extends IExtensionBase {
2147
2156
  *
2148
2157
  * Two consumers share the catalog:
2149
2158
  *
2150
- * 1. The `core/reserved-name` analyzer scans every user node and
2159
+ * 1. The `core/name-reserved` analyzer scans every user node and
2151
2160
  * emits a `warn` issue when the node's normalised identifiers
2152
2161
  * (per `IProviderKind.identifiers`) intersect the reserved list
2153
2162
  * for its provider + kind. The user file is silently shadowed
@@ -2424,7 +2433,7 @@ interface IAnalyzerContext {
2424
2433
  * Step 9.6.6, raw parsed sidecar root keyed by `node.path`. Populated
2425
2434
  * by the orchestrator alongside the public `Node.sidecar` overlay so
2426
2435
  * analyzers that inspect plugin namespaces (e.g. the built-in
2427
- * `core/unknown-field` Analyzer) can walk the full tree without
2436
+ * `core/annotation-field-unknown` Analyzer) can walk the full tree without
2428
2437
  * re-reading the file from disk. Absent (or `undefined` per node)
2429
2438
  * when no sidecar accompanies the node, or when the sidecar failed
2430
2439
  * to parse. Treat as read-only.
@@ -2454,7 +2463,7 @@ interface IAnalyzerContext {
2454
2463
  /**
2455
2464
  * Absolute paths of `*.md` files under the project's
2456
2465
  * `.skill-map/jobs/` that no `state_jobs.filePath` references, the
2457
- * built-in `core/job-orphan-file` analyzer projects each as a `warn`
2466
+ * built-in `core/job-file-orphan` analyzer projects each as a `warn`
2458
2467
  * issue. Pre-computed by the driving adapter (CLI / BFF) inside its
2459
2468
  * already-open storage transaction (mirrors the `orphanSidecars`
2460
2469
  * pattern: detection lives outside the analyzer, the analyzer only
@@ -2469,7 +2478,7 @@ interface IAnalyzerContext {
2469
2478
  * adapter walks each configured path before the scan and collects
2470
2479
  * every existing file's absolute path here. Files in this set are
2471
2480
  * NOT indexed as graph nodes, the only consumer is
2472
- * `core/broken-ref`, which suppresses its `warn` issue when a
2481
+ * `core/reference-broken`, which suppresses its `warn` issue when a
2473
2482
  * path-style link target falls into the set. Absent / empty when
2474
2483
  * the operator left `scan.referencePaths` empty or when the
2475
2484
  * adapter does not maintain the side index. Treat as read-only.
@@ -2483,7 +2492,7 @@ interface IAnalyzerContext {
2483
2492
  * computed once per scan by the orchestrator (mirroring the same
2484
2493
  * set threaded to the post-walk confidence-lift transform), so
2485
2494
  * analyzers consume it without re-deriving every node's
2486
- * identifiers. The single consumer today is `core/reserved-name`,
2495
+ * identifiers. The single consumer today is `core/name-reserved`,
2487
2496
  * which projects one warn issue per entry; future analyzers MAY
2488
2497
  * read the set for cross-rule cohesion (e.g. an action that
2489
2498
  * suggests rename targets). Absent for legacy callers (older
@@ -2494,7 +2503,7 @@ interface IAnalyzerContext {
2494
2503
  * Absolute path of the scan's project root (cwd of the invocation).
2495
2504
  * Threaded into the analyzer pass so an analyzer that needs to
2496
2505
  * resolve a relative `link.target` to an absolute filesystem path
2497
- * (today only `core/broken-ref`, when consulting
2506
+ * (today only `core/reference-broken`, when consulting
2498
2507
  * `referenceablePaths`) does not have to derive it from
2499
2508
  * `nodes[0].path` heuristics. Absent for legacy callers (older
2500
2509
  * `runScan` sites that never wired the field through). Always an
@@ -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[];
@@ -3144,7 +3153,7 @@ interface RunScanOptions {
3144
3153
  /**
3145
3154
  * Step 9.6.6, runtime catalog of plugin-contributed annotation keys
3146
3155
  * (the same shape `kernel.getRegisteredAnnotationKeys()` returns).
3147
- * Threaded into the rule pass so `core/unknown-field` can
3156
+ * Threaded into the rule pass so `core/annotation-field-unknown` can
3148
3157
  * legitimise registered plugin namespaces / root keys without
3149
3158
  * re-walking the manifests. Absent → empty catalog (every plugin
3150
3159
  * key is treated as unknown). Built-in catalog from
@@ -3257,12 +3266,12 @@ 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
3264
3273
  * `state_jobs.filePath`). Threaded into the rule pass so the
3265
- * built-in `core/job-orphan-file` rule can project each as a `warn`
3274
+ * built-in `core/job-file-orphan` rule can project each as a `warn`
3266
3275
  * issue without the kernel reaching for the storage port or doing
3267
3276
  * its own FS walk. The driving adapter (CLI, BFF) computes this
3268
3277
  * inside its already-open storage transaction via
@@ -3277,7 +3286,7 @@ interface RunScanOptions {
3277
3286
  * Side set of absolute file paths the operator opted into for
3278
3287
  * link-validation purposes via `scan.referencePaths`. Threaded
3279
3288
  * through to `IAnalyzerContext.referenceablePaths` so the built-in
3280
- * `core/broken-ref` rule can suppress its `warn` for path-style
3289
+ * `core/reference-broken` rule can suppress its `warn` for path-style
3281
3290
  * links whose target lands in the set. Files are NOT walked by
3282
3291
  * the kernel, the driving adapter populates the set before
3283
3292
  * calling `runScan`. Absent / empty when the operator left
@@ -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.39.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";
@@ -1426,7 +1426,8 @@ function recomputeLinkCounts(nodes, links) {
1426
1426
  for (const link of links) {
1427
1427
  const source = byPath2.get(link.source);
1428
1428
  if (source) source.linksOutCount += 1;
1429
- const target = byPath2.get(link.target);
1429
+ const targetKey = link.resolvedTarget ?? link.target;
1430
+ const target = byPath2.get(targetKey);
1430
1431
  if (target) target.linksInCount += 1;
1431
1432
  }
1432
1433
  }
@@ -2205,7 +2206,7 @@ function detectRenamesAndOrphans(prior, current, issues, silenced) {
2205
2206
 
2206
2207
  // kernel/scan/walk-content.ts
2207
2208
  import { readFile, readdir, lstat } from "fs/promises";
2208
- import { join as join7, relative as relative2, sep } from "path";
2209
+ import { join as join7, relative as relative2, sep as sep2 } from "path";
2209
2210
 
2210
2211
  // kernel/scan/ignore.ts
2211
2212
  import { existsSync as existsSync6, readFileSync as readFileSync7 } from "fs";
@@ -2362,7 +2363,7 @@ async function* walkContent(roots, options) {
2362
2363
  const extensions = options.extensions;
2363
2364
  for (const root of roots) {
2364
2365
  for await (const file of walkRoot(root, root, filter, extensions)) {
2365
- const relPath = relative2(root, file).split(sep).join("/");
2366
+ const relPath = relative2(root, file).split(sep2).join("/");
2366
2367
  let raw;
2367
2368
  try {
2368
2369
  raw = await readFile(file, "utf8");
@@ -2394,7 +2395,7 @@ async function* walkRoot(root, current, filter, extensions) {
2394
2395
  for (const entry of entries) {
2395
2396
  const name = entry.name;
2396
2397
  const full = join7(current, name);
2397
- const rel = relative2(root, full).split(sep).join("/");
2398
+ const rel = relative2(root, full).split(sep2).join("/");
2398
2399
  if (filter.ignores(rel)) continue;
2399
2400
  if (entry.isSymbolicLink()) continue;
2400
2401
  if (entry.isDirectory()) {
@@ -2550,7 +2551,7 @@ function computeDriftStatus(args) {
2550
2551
 
2551
2552
  // kernel/sidecar/discover-orphans.ts
2552
2553
  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";
2554
+ import { join as join8, relative as relative3, sep as sep3 } from "path";
2554
2555
  function discoverOrphanSidecars(roots, shouldSkip) {
2555
2556
  const out = [];
2556
2557
  for (const root of roots) {
@@ -2567,7 +2568,7 @@ function walk(root, current, shouldSkip, out) {
2567
2568
  }
2568
2569
  for (const entry of entries) {
2569
2570
  const full = join8(current, entry.name);
2570
- const rel = relative3(root, full).split(sep2).join("/");
2571
+ const rel = relative3(root, full).split(sep3).join("/");
2571
2572
  if (shouldSkip(rel)) continue;
2572
2573
  if (entry.isSymbolicLink()) continue;
2573
2574
  if (entry.isDirectory()) {
@@ -3340,7 +3341,7 @@ function resolveActiveProviderOption(optionValue, roots) {
3340
3341
  }
3341
3342
 
3342
3343
  // kernel/scan/watcher.ts
3343
- import { resolve as resolve12, relative as relative4, sep as sep3 } from "path";
3344
+ import { resolve as resolve12, relative as relative4, sep as sep4 } from "path";
3344
3345
  import chokidar from "chokidar";
3345
3346
  function createChokidarWatcher(opts) {
3346
3347
  const absRoots = opts.roots.map((r) => resolve12(opts.cwd, r));
@@ -3438,8 +3439,8 @@ function relativePathFromRoots2(absolute, absRoots) {
3438
3439
  for (const root of absRoots) {
3439
3440
  const rel = relative4(root, absolute);
3440
3441
  if (rel === "" || rel === ".") return "";
3441
- if (!rel.startsWith("..") && !rel.startsWith(`..${sep3}`)) {
3442
- return rel.split(sep3).join("/");
3442
+ if (!rel.startsWith("..") && !rel.startsWith(`..${sep4}`)) {
3443
+ return rel.split(sep4).join("/");
3443
3444
  }
3444
3445
  }
3445
3446
  return null;