@neurcode-ai/cli 0.20.5 โ 0.20.6
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/commands/brain.d.ts.map +1 -1
- package/dist/commands/brain.js +39 -16
- package/dist/commands/brain.js.map +1 -1
- package/dist/commands/integrations.d.ts +8 -0
- package/dist/commands/integrations.d.ts.map +1 -0
- package/dist/commands/integrations.js +126 -0
- package/dist/commands/integrations.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/runtime-build.json +5 -5
- package/dist/utils/brain-scale-status.d.ts +90 -0
- package/dist/utils/brain-scale-status.d.ts.map +1 -0
- package/dist/utils/brain-scale-status.js +178 -0
- package/dist/utils/brain-scale-status.js.map +1 -0
- package/dist/utils/integrations-doctor.d.ts +20 -0
- package/dist/utils/integrations-doctor.d.ts.map +1 -0
- package/dist/utils/integrations-doctor.js +510 -0
- package/dist/utils/integrations-doctor.js.map +1 -0
- package/dist/utils/repo-graph-impact.d.ts.map +1 -1
- package/dist/utils/repo-graph-impact.js +11 -7
- package/dist/utils/repo-graph-impact.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brain.d.ts","sourceRoot":"","sources":["../../src/commands/brain.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"brain.d.ts","sourceRoot":"","sources":["../../src/commands/brain.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwhBpC,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmuEnD"}
|
package/dist/commands/brain.js
CHANGED
|
@@ -51,6 +51,7 @@ const brain_cache_1 = require("../utils/brain-cache");
|
|
|
51
51
|
const local_repo_brain_1 = require("../utils/local-repo-brain");
|
|
52
52
|
const repo_brain_impact_1 = require("../utils/repo-brain-impact");
|
|
53
53
|
const repo_graph_impact_1 = require("../utils/repo-graph-impact");
|
|
54
|
+
const brain_scale_status_1 = require("../utils/brain-scale-status");
|
|
54
55
|
const config_1 = require("../config");
|
|
55
56
|
const project_root_1 = require("../utils/project-root");
|
|
56
57
|
const state_1 = require("../utils/state");
|
|
@@ -643,6 +644,7 @@ function brainCommand(program) {
|
|
|
643
644
|
const metadata = (0, brain_1.readRepositoryGraphMetadata)(scope.cwd);
|
|
644
645
|
const graphMeta = (0, repo_graph_impact_1.readGraphMetadataOnly)(scope.cwd);
|
|
645
646
|
const freshness = graph ? await (0, brain_1.repositoryGraphStatus)(scope.cwd) : null;
|
|
647
|
+
const scaleStatus = (0, brain_scale_status_1.buildBrainScaleStatus)(scope.cwd, { liveFreshness: freshness });
|
|
646
648
|
const storeMode = process.env.NEURCODE_GRAPH_STORE?.trim() || 'portable (default)';
|
|
647
649
|
const portableBackend = graphMeta.backend === 'portable';
|
|
648
650
|
const languages = graph?.coverage.languages ?? [];
|
|
@@ -661,6 +663,9 @@ function brainCommand(program) {
|
|
|
661
663
|
};
|
|
662
664
|
const payload = {
|
|
663
665
|
repoRoot: scope.cwd,
|
|
666
|
+
// Unified honest scale status (Scale V4 / D3a): the single source of
|
|
667
|
+
// truth for store backend, coverage authority, caps, and timings.
|
|
668
|
+
scaleStatus,
|
|
664
669
|
brainState: graph ? (freshness?.state ?? 'unknown') : 'not_indexed',
|
|
665
670
|
storage: {
|
|
666
671
|
mode: storeMode,
|
|
@@ -683,17 +688,10 @@ function brainCommand(program) {
|
|
|
683
688
|
filesAnalyzed: item.filesAnalyzed,
|
|
684
689
|
parserId: item.parserId,
|
|
685
690
|
})),
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
? 'deterministic_structural'
|
|
691
|
-
: 'regex_degraded_or_unavailable',
|
|
692
|
-
references: 'not_evaluated',
|
|
693
|
-
calls: 'not_evaluated',
|
|
694
|
-
},
|
|
695
|
-
other: 'path_owner_policy_only',
|
|
696
|
-
},
|
|
691
|
+
// Iteration 7: honest, builder-derived per-language coverage matrix
|
|
692
|
+
// (supported/partial/advisory/not_evaluated) replaces the prior
|
|
693
|
+
// hardcoded capabilityMatrix stub. Single source: scaleStatus.languageMatrix.
|
|
694
|
+
languageMatrix: scaleStatus.languageMatrix,
|
|
697
695
|
caps: caps ? {
|
|
698
696
|
maxFiles: caps.maxFiles,
|
|
699
697
|
maxNodes: caps.maxNodes,
|
|
@@ -724,13 +722,35 @@ function brainCommand(program) {
|
|
|
724
722
|
else {
|
|
725
723
|
console.log(chalk.dim(`SQLite backend โ queryable segmented store`));
|
|
726
724
|
}
|
|
727
|
-
(
|
|
728
|
-
|
|
729
|
-
|
|
725
|
+
if (scaleStatus.storage.acceleratedFallbackToPortable) {
|
|
726
|
+
console.log(chalk.red(`โ Accelerated store requested but native probe failed `
|
|
727
|
+
+ `(${scaleStatus.storage.backendReasonCode ?? 'native_unavailable'}) โ running on portable JSON. `
|
|
728
|
+
+ `Re-index after enabling native SQLite.`));
|
|
729
|
+
}
|
|
730
|
+
if (scaleStatus.coverage.impactAuthority && scaleStatus.coverage.impactAuthority !== 'authoritative') {
|
|
731
|
+
console.log(chalk.yellow(`Coverage authority: ${scaleStatus.coverage.impactAuthority} `
|
|
732
|
+
+ `(coverageComplete=${scaleStatus.coverage.coverageComplete}, `
|
|
733
|
+
+ `omittedFiles=${scaleStatus.coverage.omittedFiles ?? 0})`));
|
|
730
734
|
}
|
|
731
|
-
if (
|
|
732
|
-
console.log(chalk.
|
|
735
|
+
if (scaleStatus.caps.fileCapReached || scaleStatus.caps.nodeCapReached || scaleStatus.caps.edgeCapReached) {
|
|
736
|
+
console.log(chalk.yellow(`Caps hit โ files=${scaleStatus.caps.fileCapReached} `
|
|
737
|
+
+ `nodes=${scaleStatus.caps.nodeCapReached} edges=${scaleStatus.caps.edgeCapReached}`));
|
|
738
|
+
}
|
|
739
|
+
(0, messages_1.printSection)('Language coverage', '๐');
|
|
740
|
+
if (!graph) {
|
|
741
|
+
console.log(chalk.dim('Not indexed โ tiers are capability defaults; run neurcode brain repo-index for observed coverage.'));
|
|
742
|
+
}
|
|
743
|
+
for (const row of scaleStatus.languageMatrix.languages) {
|
|
744
|
+
const d = row.dimensions;
|
|
745
|
+
const where = row.observed ? `${row.filesAnalyzed} files` : 'not present';
|
|
746
|
+
console.log(chalk.dim(`- ${row.language} [${row.parserDepth}, ${where}]: `
|
|
747
|
+
+ `parse=${d.parsing.tier} imports=${d.imports.tier} symbols=${d.symbols.tier} `
|
|
748
|
+
+ `test=${d.testImpact.tier} owner=${d.ownership.tier}`));
|
|
749
|
+
if (row.observed && row.limitations.length > 0) {
|
|
750
|
+
console.log(chalk.dim(` โณ ${row.limitations[0]}`));
|
|
751
|
+
}
|
|
733
752
|
}
|
|
753
|
+
console.log(chalk.dim('Tiers: supported=deterministic ยท partial=bounded ยท advisory=heuristic ยท not_evaluated=no parser'));
|
|
734
754
|
(0, messages_1.printSection)('Enforcement posture', '๐ก๏ธ');
|
|
735
755
|
console.log(chalk.dim('Cursor/Codex: cooperative MCP checks (not hard pre-write deny)'));
|
|
736
756
|
console.log(chalk.dim('Claude/Copilot: hard deny when host hooks are installed'));
|
|
@@ -927,9 +947,12 @@ function brainCommand(program) {
|
|
|
927
947
|
try {
|
|
928
948
|
const freshness = await (0, brain_1.repositoryGraphStatus)(scope.cwd);
|
|
929
949
|
const metadata = (0, brain_1.readRepositoryGraphMetadata)(scope.cwd);
|
|
950
|
+
const scaleStatus = (0, brain_scale_status_1.buildBrainScaleStatus)(scope.cwd, { liveFreshness: freshness });
|
|
930
951
|
const payload = {
|
|
931
952
|
ok: freshness.state !== 'corrupt',
|
|
932
953
|
repoRoot: scope.cwd,
|
|
954
|
+
// Unified honest scale status (Scale V4 / D3a) โ same builder as readiness.
|
|
955
|
+
scaleStatus,
|
|
933
956
|
graphPath: metadata?.storageFormat === 'atomic_json'
|
|
934
957
|
? (0, brain_1.legacyRepositoryGraphPath)(scope.cwd)
|
|
935
958
|
: (0, brain_1.repositoryGraphPath)(scope.cwd),
|