@skill-map/cli 0.38.0 → 0.40.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-master/references/tour-authoring.md +0 -4
- package/dist/cli/tutorial/sm-tutorial/SKILL.md +279 -26
- package/dist/cli.js +1779 -1512
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +30 -14
- package/dist/index.js.map +1 -1
- package/dist/kernel/index.d.ts +57 -47
- package/dist/kernel/index.js +30 -14
- package/dist/kernel/index.js.map +1 -1
- package/dist/ui/{chunk-AAR3Y55J.js → chunk-2W6BCESO.js} +30 -29
- package/dist/ui/{chunk-NTM2J2WO.js → chunk-3FPS5OIY.js} +1 -1
- package/dist/ui/chunk-4KQGLZV2.js +123 -0
- package/dist/ui/chunk-ASCTZSBZ.js +107 -0
- package/dist/ui/chunk-GSTYLDCL.js +135 -0
- package/dist/ui/chunk-MHEKCBIR.js +317 -0
- package/dist/ui/chunk-PFA2CVPN.js +61 -0
- package/dist/ui/chunk-PURF7B6R.js +411 -0
- package/dist/ui/chunk-UFCOGNZX.js +1 -0
- package/dist/ui/chunk-WQ42JTZB.js +90 -0
- package/dist/ui/chunk-XEWWXGNE.js +1 -0
- package/dist/ui/chunk-YXFKPYK3.js +965 -0
- package/dist/ui/index.html +1 -1
- package/dist/ui/main-WLCA4YLM.js +3 -0
- package/package.json +2 -2
- package/dist/ui/chunk-47MG5XH2.js +0 -317
- package/dist/ui/chunk-4CDTW64C.js +0 -500
- package/dist/ui/chunk-4XEJUDPL.js +0 -123
- package/dist/ui/chunk-5AZ5S6JB.js +0 -1
- package/dist/ui/chunk-G5CKBDBB.js +0 -107
- package/dist/ui/chunk-KKOZFBXQ.js +0 -135
- package/dist/ui/chunk-O5N7UH37.js +0 -965
- package/dist/ui/chunk-QZM2G474.js +0 -61
- package/dist/ui/chunk-Z4LANJFK.js +0 -1
- package/dist/ui/main-EO5QNLE4.js +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Confidence, DuplicateExtensionError, EXTENSION_KINDS, ExecutionFailureReason, ExecutionKind, ExecutionRecord, ExecutionRunner, ExecutionStatus, ExportQueryError, ExtensionKind, FilesystemPort, HOOK_TRIGGERS, HistoryStats, HistoryStatsErrorRates, HistoryStatsExecutionsPerPeriod, HistoryStatsPerActionRate, HistoryStatsTokensPerAction, HistoryStatsTopNode, HistoryStatsTotals, IAction, IActionContext, IActionPrecondition, IActionResult, IAnalyzer, IAnalyzerContext, IAnnotationContribution, ICreateFsWatcherOptions, IDedicatedStorePersist, IDedicatedStoreWrapper, IDiscoveredPlugin, IEnrichmentRecord, IExportQuery, IExportSubset, IExtension, IExtensionBase, IExternalRef, IExtractor, IExtractorCallbacks, IExtractorContext, IExtractorRunRecord, IFormatter, IFormatterContext, IFsWatcher, IHook, IHookContext, IHookDispatcher, IIssueRow, IKvStorePersist, IKvStoreWrapper, ILoadedExtension, INodeBundle, INodeChange, INodeCounts, INodeFilter, IPersistOptions, IPersistedEnrichment, IPluginManifest, IPluginStorageSchema, IProvider, IRawNode, IRegisteredAnnotationKey, IRegisteredViewContribution, IRunOptions, IRunResult, IScanDelta, ITransactionalStorage, IViewContribution, IWalkOptions, IWatchBatch, IWatchEvent, InMemoryProgressEmitter, Issue, IssueFix, KV_SCHEMA_KEY, Kernel, LOG_LEVELS, Link, LinkKind, LinkLocation, LinkOccurrence, LinkTrigger, LogRecord, LoggerPort, Node, NodeKind, NodeStat, PluginLoaderPort, ProgressEmitterPort, ProgressEvent, Registry, RenameOp, RunScanOptions, RunnerPort, ScanResult, ScanScannedBy, ScanStats, Severity, SilentLogger, Stability, StoragePort, TActionWrite, TExecutionMode,
|
|
1
|
+
export { Confidence, DuplicateExtensionError, EXTENSION_KINDS, ExecutionFailureReason, ExecutionKind, ExecutionRecord, ExecutionRunner, ExecutionStatus, ExportQueryError, ExtensionKind, FilesystemPort, HOOK_TRIGGERS, HistoryStats, HistoryStatsErrorRates, HistoryStatsExecutionsPerPeriod, HistoryStatsPerActionRate, HistoryStatsTokensPerAction, HistoryStatsTopNode, HistoryStatsTotals, IAction, IActionContext, IActionPrecondition, IActionResult, IAnalyzer, IAnalyzerContext, IAnnotationContribution, ICreateFsWatcherOptions, IDedicatedStorePersist, IDedicatedStoreWrapper, IDiscoveredPlugin, IEnrichmentRecord, IExportQuery, IExportSubset, IExtension, IExtensionBase, IExternalRef, IExtractor, IExtractorCallbacks, IExtractorContext, IExtractorRunRecord, IFormatter, IFormatterContext, IFsWatcher, IHook, IHookContext, IHookDispatcher, IIssueRow, IKvStorePersist, IKvStoreWrapper, ILoadedExtension, INodeBundle, INodeChange, INodeCounts, INodeFilter, IPersistOptions, IPersistedEnrichment, IPluginManifest, IPluginStorageSchema, IProvider, IRawNode, IRegisteredAnnotationKey, IRegisteredViewContribution, IRunOptions, IRunResult, IScanDelta, ITransactionalStorage, IViewContribution, IWalkOptions, IWatchBatch, IWatchEvent, InMemoryProgressEmitter, Issue, IssueFix, KV_SCHEMA_KEY, Kernel, LOG_LEVELS, Link, LinkKind, LinkLocation, LinkOccurrence, LinkTrigger, LogRecord, LoggerPort, Node, NodeKind, NodeStat, PluginLoaderPort, ProgressEmitterPort, ProgressEvent, Registry, RenameOp, RunScanOptions, RunnerPort, ScanResult, ScanScannedBy, ScanStats, Severity, SilentLogger, Stability, StoragePort, TActionWrite, TExecutionMode, THookFilter, THookTrigger, TInputTypeName, TLogLevel, TLogMethodLevel, TNodeChangeReason, TPluginLoadStatus, TPluginStorage, TPluginStore, TProgressListener, TSettingDeclaration, TSettingValue, TSeverity, TSlotName, TWatchEventKind, 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 } from './kernel/index.js';
|
package/dist/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.40.0",
|
|
105
105
|
description: "skill-map reference implementation \u2014 kernel + CLI + adapters.",
|
|
106
106
|
license: "MIT",
|
|
107
107
|
type: "module",
|
|
@@ -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
|
|
1429
|
+
const targetKey = link.resolvedTarget ?? link.target;
|
|
1430
|
+
const target = byPath2.get(targetKey);
|
|
1430
1431
|
if (target) target.linksInCount += 1;
|
|
1431
1432
|
}
|
|
1432
1433
|
}
|
|
@@ -1460,8 +1461,8 @@ function isExternalUrlLink(link) {
|
|
|
1460
1461
|
}
|
|
1461
1462
|
|
|
1462
1463
|
// kernel/orchestrator/analyzers.ts
|
|
1463
|
-
async function runAnalyzers(analyzers, nodes, internalLinks, orphanSidecars, sidecarRoots, annotationContributions, viewContributions, orphanJobFiles, referenceablePaths, cwd, registeredActionIds, emitter, hookDispatcher, reservedNodePaths, signals) {
|
|
1464
|
-
const issues = [];
|
|
1464
|
+
async function runAnalyzers(analyzers, nodes, internalLinks, orphanSidecars, sidecarRoots, annotationContributions, viewContributions, orphanJobFiles, referenceablePaths, cwd, registeredActionIds, emitter, hookDispatcher, reservedNodePaths, signals, seedIssues = []) {
|
|
1465
|
+
const issues = [...seedIssues];
|
|
1465
1466
|
const contributions = [];
|
|
1466
1467
|
const validators = loadSchemaValidators();
|
|
1467
1468
|
void registeredActionIds;
|
|
@@ -1469,7 +1470,8 @@ async function runAnalyzers(analyzers, nodes, internalLinks, orphanSidecars, sid
|
|
|
1469
1470
|
relativePath: o.relativePath,
|
|
1470
1471
|
expectedMdPath: o.expectedMdPath
|
|
1471
1472
|
}));
|
|
1472
|
-
|
|
1473
|
+
const scheduled = orderAnalyzersByPhase(analyzers);
|
|
1474
|
+
for (const analyzer of scheduled) {
|
|
1473
1475
|
const qualifiedId = qualifiedExtensionId(analyzer.pluginId, analyzer.id);
|
|
1474
1476
|
const declaredContributions = readDeclaredContributions(analyzer);
|
|
1475
1477
|
const emitContribution = (nodePath, contributionId, payload) => {
|
|
@@ -1522,6 +1524,11 @@ async function runAnalyzers(analyzers, nodes, internalLinks, orphanSidecars, sid
|
|
|
1522
1524
|
annotationContributions,
|
|
1523
1525
|
viewContributions,
|
|
1524
1526
|
orphanJobFiles,
|
|
1527
|
+
// `issues` is the live accumulator, mutated by `issues.push(...)`
|
|
1528
|
+
// below as each analyzer's emission lands. Late-phase analyzers
|
|
1529
|
+
// (`core/issue-counter`) read it to compute cross-analyzer
|
|
1530
|
+
// aggregates. Treat as read-only on the analyzer side.
|
|
1531
|
+
accumulatedIssues: issues,
|
|
1525
1532
|
...referenceablePaths ? { referenceablePaths } : {},
|
|
1526
1533
|
...cwd ? { cwd } : {},
|
|
1527
1534
|
...reservedNodePaths ? { reservedNodePaths } : {},
|
|
@@ -1538,6 +1545,12 @@ async function runAnalyzers(analyzers, nodes, internalLinks, orphanSidecars, sid
|
|
|
1538
1545
|
}
|
|
1539
1546
|
return { issues, contributions };
|
|
1540
1547
|
}
|
|
1548
|
+
function orderAnalyzersByPhase(analyzers) {
|
|
1549
|
+
return analyzers.slice().sort((a, b) => phaseRank(a) - phaseRank(b));
|
|
1550
|
+
}
|
|
1551
|
+
function phaseRank(a) {
|
|
1552
|
+
return a.phase === "aggregate" ? 1 : 0;
|
|
1553
|
+
}
|
|
1541
1554
|
function validateIssue(analyzer, issue, emitter) {
|
|
1542
1555
|
const severity = issue.severity;
|
|
1543
1556
|
if (severity !== "error" && severity !== "warn" && severity !== "info") {
|
|
@@ -1834,10 +1847,9 @@ function resolveByName(link, indexes, ctx) {
|
|
|
1834
1847
|
const winner = candidates.find((c) => allowedKinds.includes(c.kind));
|
|
1835
1848
|
return winner ? winner.path : "none";
|
|
1836
1849
|
}
|
|
1837
|
-
function lookupAllowedKinds(link,
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
return ctx.providerResolution.get(sourceNode.provider)?.[link.kind];
|
|
1850
|
+
function lookupAllowedKinds(link, _indexes, ctx) {
|
|
1851
|
+
if (ctx.activeProvider === null) return void 0;
|
|
1852
|
+
return ctx.providerResolution.get(ctx.activeProvider)?.[link.kind];
|
|
1841
1853
|
}
|
|
1842
1854
|
function stripTriggerSigil(normalized) {
|
|
1843
1855
|
if (!normalized) return null;
|
|
@@ -3155,7 +3167,7 @@ async function runScanInternal(_kernel, options) {
|
|
|
3155
3167
|
else walked.internalLinks.push(link);
|
|
3156
3168
|
}
|
|
3157
3169
|
walked.signals = resolved.resolvedSignals;
|
|
3158
|
-
const postWalkCtx = buildPostWalkTransformCtx(exts.providers, walked.nodes);
|
|
3170
|
+
const postWalkCtx = buildPostWalkTransformCtx(exts.providers, walked.nodes, activeProviderId);
|
|
3159
3171
|
walked.internalLinks = applyPostWalkTransforms(walked.internalLinks, walked.nodes, postWalkCtx);
|
|
3160
3172
|
recomputeLinkCounts(walked.nodes, walked.internalLinks);
|
|
3161
3173
|
recomputeExternalRefsCount(walked.nodes, walked.externalLinks, walked.cachedPaths);
|
|
@@ -3178,11 +3190,15 @@ async function runScanInternal(_kernel, options) {
|
|
|
3178
3190
|
emitter,
|
|
3179
3191
|
hookDispatcher,
|
|
3180
3192
|
postWalkCtx.reservedNodePaths,
|
|
3181
|
-
walked.signals
|
|
3193
|
+
walked.signals,
|
|
3194
|
+
// Seed the accumulator with orchestrator-emitted frontmatter
|
|
3195
|
+
// issues so the aggregate phase (`core/issue-counter`) counts
|
|
3196
|
+
// them on the per-node chip. The seeds are echoed back on
|
|
3197
|
+
// `analyzerResult.issues`, no explicit push is needed below.
|
|
3198
|
+
walked.frontmatterIssues
|
|
3182
3199
|
);
|
|
3183
3200
|
mergeAnalyzerEmissions(walked, analyzerResult, exts.analyzers);
|
|
3184
3201
|
const issues = analyzerResult.issues;
|
|
3185
|
-
for (const issue of walked.frontmatterIssues) issues.push(issue);
|
|
3186
3202
|
const silenced = options.ignoreFilter ? (path) => options.ignoreFilter.ignores(path) : void 0;
|
|
3187
3203
|
const renameOps = prior ? detectRenamesAndOrphans(prior, walked.nodes, issues, silenced) : [];
|
|
3188
3204
|
const stats = buildScanStats(walked, issues, start);
|
|
@@ -3191,14 +3207,14 @@ async function runScanInternal(_kernel, options) {
|
|
|
3191
3207
|
await hookDispatcher.dispatch("scan.completed", scanCompletedEvent);
|
|
3192
3208
|
return buildScanReturn(walked, issues, renameOps, stats, options, setup);
|
|
3193
3209
|
}
|
|
3194
|
-
function buildPostWalkTransformCtx(providers, nodes) {
|
|
3210
|
+
function buildPostWalkTransformCtx(providers, nodes, activeProvider) {
|
|
3195
3211
|
const { kindRegistry, providerResolution, reservedNamesByProviderKind } = buildProviderIndexes(providers);
|
|
3196
3212
|
const reservedNodePaths = buildReservedNodePaths(
|
|
3197
3213
|
nodes,
|
|
3198
3214
|
kindRegistry,
|
|
3199
3215
|
reservedNamesByProviderKind
|
|
3200
3216
|
);
|
|
3201
|
-
return { kindRegistry, providerResolution, reservedNodePaths };
|
|
3217
|
+
return { kindRegistry, providerResolution, activeProvider, reservedNodePaths };
|
|
3202
3218
|
}
|
|
3203
3219
|
function buildProviderIndexes(providers) {
|
|
3204
3220
|
const kindRegistry = /* @__PURE__ */ new Map();
|