@skill-map/cli 0.39.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 +732 -549
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +28 -13
- package/dist/index.js.map +1 -1
- package/dist/kernel/index.d.ts +44 -34
- package/dist/kernel/index.js +28 -13
- package/dist/kernel/index.js.map +1 -1
- package/dist/ui/{chunk-VZIYRREA.js → chunk-2W6BCESO.js} +30 -29
- package/dist/ui/{chunk-NHI5UPNK.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-AALYQ3RG.js +0 -965
- package/dist/ui/chunk-JECPBFFX.js +0 -135
- package/dist/ui/chunk-LGLLRAJ6.js +0 -61
- package/dist/ui/chunk-PVVKVGJ6.js +0 -500
- package/dist/ui/chunk-SKA7ZFUX.js +0 -1
- package/dist/ui/chunk-VDMXHCXR.js +0 -1
- package/dist/ui/chunk-XRDZZC5F.js +0 -123
- package/dist/ui/chunk-YPO2DTMO.js +0 -317
- package/dist/ui/chunk-ZYIKNMFV.js +0 -107
- package/dist/ui/main-TYWMNAII.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",
|
|
@@ -1461,8 +1461,8 @@ function isExternalUrlLink(link) {
|
|
|
1461
1461
|
}
|
|
1462
1462
|
|
|
1463
1463
|
// kernel/orchestrator/analyzers.ts
|
|
1464
|
-
async function runAnalyzers(analyzers, nodes, internalLinks, orphanSidecars, sidecarRoots, annotationContributions, viewContributions, orphanJobFiles, referenceablePaths, cwd, registeredActionIds, emitter, hookDispatcher, reservedNodePaths, signals) {
|
|
1465
|
-
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];
|
|
1466
1466
|
const contributions = [];
|
|
1467
1467
|
const validators = loadSchemaValidators();
|
|
1468
1468
|
void registeredActionIds;
|
|
@@ -1470,7 +1470,8 @@ async function runAnalyzers(analyzers, nodes, internalLinks, orphanSidecars, sid
|
|
|
1470
1470
|
relativePath: o.relativePath,
|
|
1471
1471
|
expectedMdPath: o.expectedMdPath
|
|
1472
1472
|
}));
|
|
1473
|
-
|
|
1473
|
+
const scheduled = orderAnalyzersByPhase(analyzers);
|
|
1474
|
+
for (const analyzer of scheduled) {
|
|
1474
1475
|
const qualifiedId = qualifiedExtensionId(analyzer.pluginId, analyzer.id);
|
|
1475
1476
|
const declaredContributions = readDeclaredContributions(analyzer);
|
|
1476
1477
|
const emitContribution = (nodePath, contributionId, payload) => {
|
|
@@ -1523,6 +1524,11 @@ async function runAnalyzers(analyzers, nodes, internalLinks, orphanSidecars, sid
|
|
|
1523
1524
|
annotationContributions,
|
|
1524
1525
|
viewContributions,
|
|
1525
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,
|
|
1526
1532
|
...referenceablePaths ? { referenceablePaths } : {},
|
|
1527
1533
|
...cwd ? { cwd } : {},
|
|
1528
1534
|
...reservedNodePaths ? { reservedNodePaths } : {},
|
|
@@ -1539,6 +1545,12 @@ async function runAnalyzers(analyzers, nodes, internalLinks, orphanSidecars, sid
|
|
|
1539
1545
|
}
|
|
1540
1546
|
return { issues, contributions };
|
|
1541
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
|
+
}
|
|
1542
1554
|
function validateIssue(analyzer, issue, emitter) {
|
|
1543
1555
|
const severity = issue.severity;
|
|
1544
1556
|
if (severity !== "error" && severity !== "warn" && severity !== "info") {
|
|
@@ -1835,10 +1847,9 @@ function resolveByName(link, indexes, ctx) {
|
|
|
1835
1847
|
const winner = candidates.find((c) => allowedKinds.includes(c.kind));
|
|
1836
1848
|
return winner ? winner.path : "none";
|
|
1837
1849
|
}
|
|
1838
|
-
function lookupAllowedKinds(link,
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
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];
|
|
1842
1853
|
}
|
|
1843
1854
|
function stripTriggerSigil(normalized) {
|
|
1844
1855
|
if (!normalized) return null;
|
|
@@ -3156,7 +3167,7 @@ async function runScanInternal(_kernel, options) {
|
|
|
3156
3167
|
else walked.internalLinks.push(link);
|
|
3157
3168
|
}
|
|
3158
3169
|
walked.signals = resolved.resolvedSignals;
|
|
3159
|
-
const postWalkCtx = buildPostWalkTransformCtx(exts.providers, walked.nodes);
|
|
3170
|
+
const postWalkCtx = buildPostWalkTransformCtx(exts.providers, walked.nodes, activeProviderId);
|
|
3160
3171
|
walked.internalLinks = applyPostWalkTransforms(walked.internalLinks, walked.nodes, postWalkCtx);
|
|
3161
3172
|
recomputeLinkCounts(walked.nodes, walked.internalLinks);
|
|
3162
3173
|
recomputeExternalRefsCount(walked.nodes, walked.externalLinks, walked.cachedPaths);
|
|
@@ -3179,11 +3190,15 @@ async function runScanInternal(_kernel, options) {
|
|
|
3179
3190
|
emitter,
|
|
3180
3191
|
hookDispatcher,
|
|
3181
3192
|
postWalkCtx.reservedNodePaths,
|
|
3182
|
-
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
|
|
3183
3199
|
);
|
|
3184
3200
|
mergeAnalyzerEmissions(walked, analyzerResult, exts.analyzers);
|
|
3185
3201
|
const issues = analyzerResult.issues;
|
|
3186
|
-
for (const issue of walked.frontmatterIssues) issues.push(issue);
|
|
3187
3202
|
const silenced = options.ignoreFilter ? (path) => options.ignoreFilter.ignores(path) : void 0;
|
|
3188
3203
|
const renameOps = prior ? detectRenamesAndOrphans(prior, walked.nodes, issues, silenced) : [];
|
|
3189
3204
|
const stats = buildScanStats(walked, issues, start);
|
|
@@ -3192,14 +3207,14 @@ async function runScanInternal(_kernel, options) {
|
|
|
3192
3207
|
await hookDispatcher.dispatch("scan.completed", scanCompletedEvent);
|
|
3193
3208
|
return buildScanReturn(walked, issues, renameOps, stats, options, setup);
|
|
3194
3209
|
}
|
|
3195
|
-
function buildPostWalkTransformCtx(providers, nodes) {
|
|
3210
|
+
function buildPostWalkTransformCtx(providers, nodes, activeProvider) {
|
|
3196
3211
|
const { kindRegistry, providerResolution, reservedNamesByProviderKind } = buildProviderIndexes(providers);
|
|
3197
3212
|
const reservedNodePaths = buildReservedNodePaths(
|
|
3198
3213
|
nodes,
|
|
3199
3214
|
kindRegistry,
|
|
3200
3215
|
reservedNamesByProviderKind
|
|
3201
3216
|
);
|
|
3202
|
-
return { kindRegistry, providerResolution, reservedNodePaths };
|
|
3217
|
+
return { kindRegistry, providerResolution, activeProvider, reservedNodePaths };
|
|
3203
3218
|
}
|
|
3204
3219
|
function buildProviderIndexes(providers) {
|
|
3205
3220
|
const kindRegistry = /* @__PURE__ */ new Map();
|