@skill-map/cli 0.40.0 → 0.41.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.
- package/dist/cli/tutorial/sm-tutorial/SKILL.md +10 -1
- package/dist/cli.js +275 -53
- package/dist/cli.js.map +1 -1
- package/dist/index.js +22 -5
- package/dist/index.js.map +1 -1
- package/dist/kernel/index.d.ts +30 -0
- package/dist/kernel/index.js +22 -5
- package/dist/kernel/index.js.map +1 -1
- package/dist/migrations/001_initial.sql +8 -0
- package/dist/ui/chunk-5GD2GBPS.js +2190 -0
- package/dist/ui/chunk-5WJRN3LD.js +809 -0
- package/dist/ui/{chunk-3SI3TVER.js → chunk-C2YUQODZ.js} +2 -2
- package/dist/ui/{chunk-NGIFGXW7.js → chunk-CFJBTDAA.js} +1 -1
- package/dist/ui/chunk-DQ45L4EV.js +123 -0
- package/dist/ui/{chunk-3FPS5OIY.js → chunk-HEJCH7BA.js} +1 -1
- package/dist/ui/chunk-HFPA56IM.js +1 -0
- package/dist/ui/chunk-HP375T2O.js +2 -0
- package/dist/ui/{chunk-WQ42JTZB.js → chunk-IUDL3NDH.js} +1 -1
- package/dist/ui/{chunk-ASCTZSBZ.js → chunk-JPYAASHN.js} +1 -1
- package/dist/ui/chunk-JWI3M5RV.js +1 -0
- package/dist/ui/chunk-XJL4DZ4M.js +1 -0
- package/dist/ui/{chunk-GSTYLDCL.js → chunk-XOHD5XWA.js} +1 -1
- package/dist/ui/chunk-YL6SWAFJ.js +1024 -0
- package/dist/ui/chunk-ZVGHYOKP.js +315 -0
- package/dist/ui/index.html +2 -2
- package/dist/ui/main-JCF6OBGZ.js +3 -0
- package/dist/ui/{styles-2WO3KNOY.css → styles-6H4GSOHY.css} +1 -1
- package/migrations/001_initial.sql +8 -0
- package/package.json +2 -2
- package/dist/ui/chunk-2W6BCESO.js +0 -2589
- package/dist/ui/chunk-4KQGLZV2.js +0 -123
- package/dist/ui/chunk-MHEKCBIR.js +0 -317
- package/dist/ui/chunk-PFA2CVPN.js +0 -61
- package/dist/ui/chunk-PURF7B6R.js +0 -411
- package/dist/ui/chunk-UFCOGNZX.js +0 -1
- package/dist/ui/chunk-XEWWXGNE.js +0 -1
- package/dist/ui/chunk-YXFKPYK3.js +0 -965
- package/dist/ui/main-WLCA4YLM.js +0 -3
package/dist/kernel/index.d.ts
CHANGED
|
@@ -1021,6 +1021,20 @@ interface ScanResult {
|
|
|
1021
1021
|
providers: string[];
|
|
1022
1022
|
/** Implementation metadata. Populated by `runScan` for self-describing output. */
|
|
1023
1023
|
scannedBy?: ScanScannedBy;
|
|
1024
|
+
/**
|
|
1025
|
+
* Effective recommended cap on the number of files the walker accepted
|
|
1026
|
+
* during this scan (`scan.maxNodes` from settings, default 256). The UI
|
|
1027
|
+
* raises the "oversized graph" banner when
|
|
1028
|
+
* `stats.filesWalked >= recommendedNodeLimit`. Absent on synthetic fixtures
|
|
1029
|
+
* that bypass the walker.
|
|
1030
|
+
*/
|
|
1031
|
+
recommendedNodeLimit?: number;
|
|
1032
|
+
/**
|
|
1033
|
+
* Override applied via `--max-nodes <N>` on the verb that ran the scan, or
|
|
1034
|
+
* `null` when no override was passed (the value above came from the
|
|
1035
|
+
* setting). Bidirectional: can raise OR lower the recommended limit.
|
|
1036
|
+
*/
|
|
1037
|
+
overrideMaxNodes?: number | null;
|
|
1024
1038
|
nodes: Node[];
|
|
1025
1039
|
links: Link[];
|
|
1026
1040
|
issues: Issue[];
|
|
@@ -3330,6 +3344,22 @@ interface RunScanOptions {
|
|
|
3330
3344
|
* pass `string | null` explicitly, never `undefined`.
|
|
3331
3345
|
*/
|
|
3332
3346
|
activeProvider?: string | null;
|
|
3347
|
+
/**
|
|
3348
|
+
* Recommended cap on the number of nodes the walker classifies
|
|
3349
|
+
* (mirror of `scan.maxNodes` in settings, default 256). Threaded
|
|
3350
|
+
* through to `walkAndExtract` so the cap can fire and so
|
|
3351
|
+
* `ScanResult.recommendedNodeLimit` is populated. Absent → the
|
|
3352
|
+
* orchestrator falls back to 256 (the design default), keeping
|
|
3353
|
+
* out-of-band callers and synthetic fixtures safe.
|
|
3354
|
+
*/
|
|
3355
|
+
recommendedNodeLimit?: number;
|
|
3356
|
+
/**
|
|
3357
|
+
* Per-invocation override of the recommended cap (when `--max-nodes
|
|
3358
|
+
* <N>` was passed). `null` (or absent) means no override; the
|
|
3359
|
+
* recommended limit applies. Bidirectional: any positive integer
|
|
3360
|
+
* replaces the recommended limit for the duration of this scan.
|
|
3361
|
+
*/
|
|
3362
|
+
overrideMaxNodes?: number | null;
|
|
3333
3363
|
}
|
|
3334
3364
|
/**
|
|
3335
3365
|
* Same as `runScan` but also returns the rename heuristic's `RenameOp[]`
|
package/dist/kernel/index.js
CHANGED
|
@@ -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.
|
|
104
|
+
version: "0.41.0",
|
|
105
105
|
description: "skill-map reference implementation \u2014 kernel + CLI + adapters.",
|
|
106
106
|
license: "MIT",
|
|
107
107
|
type: "module",
|
|
@@ -775,6 +775,7 @@ var defaults_default = {
|
|
|
775
775
|
strict: false,
|
|
776
776
|
followSymlinks: false,
|
|
777
777
|
maxFileSizeBytes: 1048576,
|
|
778
|
+
maxNodes: 256,
|
|
778
779
|
watch: {
|
|
779
780
|
debounceMs: 300
|
|
780
781
|
},
|
|
@@ -2855,17 +2856,26 @@ async function walkAndExtract(opts) {
|
|
|
2855
2856
|
const walkOptions = opts.ignoreFilter ? { ignoreFilter: opts.ignoreFilter } : {};
|
|
2856
2857
|
let filesWalked = 0;
|
|
2857
2858
|
let index = 0;
|
|
2859
|
+
const effectiveMaxNodes = opts.overrideMaxNodes ?? opts.recommendedNodeLimit;
|
|
2860
|
+
let capReached = false;
|
|
2858
2861
|
const activeProviders = opts.providers.filter((provider) => {
|
|
2859
2862
|
if (!provider.gatedByActiveLens) return true;
|
|
2860
2863
|
if (opts.activeProvider === null) return true;
|
|
2861
2864
|
return provider.id === opts.activeProvider;
|
|
2862
2865
|
});
|
|
2863
|
-
|
|
2866
|
+
const advance = async (raw, provider) => {
|
|
2867
|
+
const advanced = await processRawNode(raw, provider, wctx, accum, claimedPaths, index + 1);
|
|
2868
|
+
if (advanced) index += 1;
|
|
2869
|
+
};
|
|
2870
|
+
outer: for (const provider of activeProviders) {
|
|
2864
2871
|
for await (const raw of resolveProviderWalk(provider)(opts.roots, walkOptions)) {
|
|
2865
2872
|
filesWalked += 1;
|
|
2866
2873
|
if (claimedPaths.has(raw.path)) continue;
|
|
2867
|
-
|
|
2868
|
-
|
|
2874
|
+
if (accum.nodes.length >= effectiveMaxNodes) {
|
|
2875
|
+
capReached = true;
|
|
2876
|
+
break outer;
|
|
2877
|
+
}
|
|
2878
|
+
await advance(raw, provider);
|
|
2869
2879
|
}
|
|
2870
2880
|
}
|
|
2871
2881
|
const orphanSidecars = discoverOrphanSidecars(opts.roots);
|
|
@@ -2876,6 +2886,9 @@ async function walkAndExtract(opts) {
|
|
|
2876
2886
|
cachedPaths: accum.cachedPaths,
|
|
2877
2887
|
frontmatterIssues: accum.frontmatterIssues,
|
|
2878
2888
|
filesWalked,
|
|
2889
|
+
recommendedNodeLimit: opts.recommendedNodeLimit,
|
|
2890
|
+
overrideMaxNodes: opts.overrideMaxNodes,
|
|
2891
|
+
capReached,
|
|
2879
2892
|
enrichments: [...accum.enrichmentBuffer.values()],
|
|
2880
2893
|
extractorRuns: accum.extractorRuns,
|
|
2881
2894
|
contributions: accum.contributionsBuffer,
|
|
@@ -3154,7 +3167,9 @@ async function runScanInternal(_kernel, options) {
|
|
|
3154
3167
|
priorExtractorRuns: setup.priorExtractorRuns,
|
|
3155
3168
|
providerFrontmatter: setup.providerFrontmatter,
|
|
3156
3169
|
pluginStores: options.pluginStores,
|
|
3157
|
-
activeProvider: activeProviderId
|
|
3170
|
+
activeProvider: activeProviderId,
|
|
3171
|
+
recommendedNodeLimit: options.recommendedNodeLimit ?? 256,
|
|
3172
|
+
overrideMaxNodes: options.overrideMaxNodes ?? null
|
|
3158
3173
|
});
|
|
3159
3174
|
const activeProvider = activeProviderId ? exts.providers.find((p) => p.id === activeProviderId) ?? null : null;
|
|
3160
3175
|
const resolved = resolveSignals({
|
|
@@ -3322,6 +3337,8 @@ function buildScanReturn(walked, issues, renameOps, stats, options, setup) {
|
|
|
3322
3337
|
roots: options.roots,
|
|
3323
3338
|
providers: setup.exts.providers.map((a) => a.id),
|
|
3324
3339
|
scannedBy: SCANNED_BY,
|
|
3340
|
+
recommendedNodeLimit: walked.recommendedNodeLimit,
|
|
3341
|
+
overrideMaxNodes: walked.overrideMaxNodes,
|
|
3325
3342
|
nodes: walked.nodes,
|
|
3326
3343
|
links: walked.internalLinks,
|
|
3327
3344
|
issues,
|