@skyf0xx/hedgehog 5.4.0 → 5.4.1
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/bin/cli.mjs
CHANGED
|
@@ -45,7 +45,11 @@ import { graphStatus, formatStatus } from '../src/db/status.mjs';
|
|
|
45
45
|
import { boundaryState, formatBoundary, formatPosition, formatHandoff } from '../src/db/boundary.mjs';
|
|
46
46
|
import { commitGateStatus, formatCommitGate } from '../src/db/gate.mjs';
|
|
47
47
|
import { detectDrift, recompileTasks, formatRecompile } from '../src/db/drift.mjs';
|
|
48
|
-
import {
|
|
48
|
+
import {
|
|
49
|
+
coreMissingRequirements,
|
|
50
|
+
missingBinaries,
|
|
51
|
+
formatMissingRequirements,
|
|
52
|
+
} from '../src/db/requires.mjs';
|
|
49
53
|
import { whyPath, formatWhy } from '../src/db/why.mjs';
|
|
50
54
|
import { addFriction, listFriction } from '../src/db/friction.mjs';
|
|
51
55
|
import { addDebt, listDebt } from '../src/db/debt.mjs';
|
|
@@ -609,7 +613,7 @@ function ensureGitRepo() {
|
|
|
609
613
|
|
|
610
614
|
// `core` is the fetched core — `{ manifest, root, version }` — or null on
|
|
611
615
|
// a deferred install, where planner picks one later.
|
|
612
|
-
async function init({ force, core, host = DEFAULT_HOST, hostOnly = false }) {
|
|
616
|
+
async function init({ force, core, host = DEFAULT_HOST, hostOnly = false, globalInstall = null }) {
|
|
613
617
|
ensureGitRepo();
|
|
614
618
|
|
|
615
619
|
// Resolve the full list of writes up front so we can detect conflicts
|
|
@@ -673,6 +677,26 @@ async function init({ force, core, host = DEFAULT_HOST, hostOnly = false }) {
|
|
|
673
677
|
`${written} created${overwritten ? `, ${overwritten} overwritten` : ''}`,
|
|
674
678
|
)}\n`,
|
|
675
679
|
);
|
|
680
|
+
|
|
681
|
+
// Same declared-binary check `status` runs, moved up to install time for
|
|
682
|
+
// a core that ships a workspace (root core.yaml lands with it — see
|
|
683
|
+
// resolveCorePath). Catching "this core needs terraform" here means the
|
|
684
|
+
// agent following "Next steps" sees it before ever running a verify
|
|
685
|
+
// command, rather than discovering it as an exit 127 mid-build.
|
|
686
|
+
const installedCorePath = await resolveCorePath();
|
|
687
|
+
if (installedCorePath) {
|
|
688
|
+
try {
|
|
689
|
+
const installedCoreDef = await loadCore(installedCorePath);
|
|
690
|
+
const missing = coreMissingRequirements(installedCoreDef);
|
|
691
|
+
const lines = formatMissingRequirements(missing);
|
|
692
|
+
if (lines.length) console.log(lines.join('\n') + '\n');
|
|
693
|
+
} catch {
|
|
694
|
+
// Unparseable this early is surfaced by the next `hedgehog status`
|
|
695
|
+
// instead — init has already written every file successfully, so
|
|
696
|
+
// failing the run over a report-only check would be the wrong call.
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
|
|
676
700
|
console.log('Next steps:');
|
|
677
701
|
// This install itself just fetched globalInstall.latest to run, so the
|
|
678
702
|
// global binary is already ahead of the version this run scaffolded
|
package/package.json
CHANGED