@hivelore/cli 0.37.0 → 0.38.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/{chunk-VLRQ4MRO.js → chunk-UOMGIXZN.js} +313 -184
- package/dist/chunk-UOMGIXZN.js.map +1 -0
- package/dist/index.js +13 -35
- package/dist/index.js.map +1 -1
- package/dist/{server-J6TDFG2C.js → server-HG2K3WOQ.js} +8 -4
- package/package.json +4 -4
- package/dist/chunk-VLRQ4MRO.js.map +0 -1
- /package/dist/{server-J6TDFG2C.js.map → server-HG2K3WOQ.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
antiPatternsCheck,
|
|
4
4
|
codeMapTool,
|
|
5
5
|
codeSearch,
|
|
6
|
+
detectTestFrameworkForPaths,
|
|
6
7
|
getBriefing,
|
|
7
8
|
getRecap,
|
|
8
9
|
memRelevantTo,
|
|
@@ -10,7 +11,7 @@ import {
|
|
|
10
11
|
preCommitCheck,
|
|
11
12
|
readPresumedCorrectTargets,
|
|
12
13
|
runHaiveMcpStdio
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UOMGIXZN.js";
|
|
14
15
|
import {
|
|
15
16
|
registerMemoryPending
|
|
16
17
|
} from "./chunk-OYJKHD22.js";
|
|
@@ -3755,7 +3756,7 @@ ${SEED_FOOTER(stack)}` });
|
|
|
3755
3756
|
|
|
3756
3757
|
// src/commands/init.ts
|
|
3757
3758
|
var execFileAsync = promisify2(execFile2);
|
|
3758
|
-
var HAIVE_GITHUB_ACTION_REF = `v${"0.
|
|
3759
|
+
var HAIVE_GITHUB_ACTION_REF = `v${"0.38.0"}`;
|
|
3759
3760
|
var PROJECT_CONTEXT_TEMPLATE = `# Project context
|
|
3760
3761
|
|
|
3761
3762
|
> Generated by \`hivelore init\`. Run \`hivelore init --bootstrap\` to auto-fill from your codebase,
|
|
@@ -8960,7 +8961,7 @@ function registerDoctor(program2) {
|
|
|
8960
8961
|
fix: "Edit .ai/haive.config.json: set autoSessionEnd: true (or re-run `hivelore init` without --manual)."
|
|
8961
8962
|
});
|
|
8962
8963
|
}
|
|
8963
|
-
findings.push(...await collectInstallFindings(root, "0.
|
|
8964
|
+
findings.push(...await collectInstallFindings(root, "0.38.0"));
|
|
8964
8965
|
findings.push(...await collectToolchainFindings(root));
|
|
8965
8966
|
try {
|
|
8966
8967
|
const legacyRaw = execSync("haive-mcp --version", {
|
|
@@ -8968,7 +8969,7 @@ function registerDoctor(program2) {
|
|
|
8968
8969
|
timeout: 3e3,
|
|
8969
8970
|
stdio: ["ignore", "pipe", "ignore"]
|
|
8970
8971
|
}).trim();
|
|
8971
|
-
const cliVersion = "0.
|
|
8972
|
+
const cliVersion = "0.38.0";
|
|
8972
8973
|
if (legacyRaw && legacyRaw !== cliVersion) {
|
|
8973
8974
|
findings.push({
|
|
8974
8975
|
severity: "warn",
|
|
@@ -10671,7 +10672,7 @@ async function buildEnforcementReport(dir, stage, sessionId) {
|
|
|
10671
10672
|
findings: [{ severity: "info", code: "enforcement-off", message: "Hivelore enforcement is disabled." }]
|
|
10672
10673
|
});
|
|
10673
10674
|
}
|
|
10674
|
-
findings.push(...await inspectIntegrationVersions(root, "0.
|
|
10675
|
+
findings.push(...await inspectIntegrationVersions(root, "0.38.0"));
|
|
10675
10676
|
if (config.enforcement?.requireBriefingFirst !== false && stage !== "ci") {
|
|
10676
10677
|
const hasBriefing = await hasRecentBriefingMarker(paths, sessionId);
|
|
10677
10678
|
findings.push(hasBriefing ? { severity: "ok", code: "briefing-loaded", message: "A recent Hivelore briefing marker exists." } : {
|
|
@@ -12160,6 +12161,7 @@ import {
|
|
|
12160
12161
|
loadConfig as loadConfig13,
|
|
12161
12162
|
loadSensorLedger as loadSensorLedger4,
|
|
12162
12163
|
loadMemoriesFromDir as loadMemoriesFromDir15,
|
|
12164
|
+
normalizeFramework,
|
|
12163
12165
|
parseLessonFields,
|
|
12164
12166
|
recordPreventionHits as recordPreventionHits2,
|
|
12165
12167
|
resolveHaivePaths as resolveHaivePaths36,
|
|
@@ -12409,7 +12411,7 @@ function registerSensors(program2) {
|
|
|
12409
12411
|
return;
|
|
12410
12412
|
}
|
|
12411
12413
|
const root2 = findProjectRoot39(opts.dir);
|
|
12412
|
-
const { proposeSensor } = await import("./server-
|
|
12414
|
+
const { proposeSensor } = await import("./server-HG2K3WOQ.js");
|
|
12413
12415
|
const out = await proposeSensor(
|
|
12414
12416
|
{
|
|
12415
12417
|
memory_id: id,
|
|
@@ -12510,14 +12512,15 @@ function registerSensors(program2) {
|
|
|
12510
12512
|
process.exitCode = 1;
|
|
12511
12513
|
return;
|
|
12512
12514
|
}
|
|
12513
|
-
const
|
|
12515
|
+
const fm = found.memory.frontmatter;
|
|
12516
|
+
const detected = await detectTestFrameworkForPaths(root, fm.anchor.paths ?? []);
|
|
12517
|
+
const framework = opts.framework ? normalizeFramework(opts.framework) : detected.framework;
|
|
12514
12518
|
if (!framework) {
|
|
12515
12519
|
ui.error(`Unknown --framework "${opts.framework}". Use one of: ${TEST_FRAMEWORKS.join(", ")}.`);
|
|
12516
12520
|
process.exitCode = 1;
|
|
12517
12521
|
return;
|
|
12518
12522
|
}
|
|
12519
12523
|
const fields = parseLessonFields(found.memory.body);
|
|
12520
|
-
const fm = found.memory.frontmatter;
|
|
12521
12524
|
const scaffold = scaffoldPostIncidentTest(
|
|
12522
12525
|
{
|
|
12523
12526
|
memoryId: id,
|
|
@@ -12527,7 +12530,7 @@ function registerSensors(program2) {
|
|
|
12527
12530
|
incident: fm.sensor?.incident,
|
|
12528
12531
|
paths: fm.anchor.paths
|
|
12529
12532
|
},
|
|
12530
|
-
{ framework, outPath: opts.out }
|
|
12533
|
+
{ framework, outPath: opts.out, baseDir: detected.baseDir }
|
|
12531
12534
|
);
|
|
12532
12535
|
if (opts.stdout) {
|
|
12533
12536
|
console.log(scaffold.content);
|
|
@@ -12637,31 +12640,6 @@ function renderGrepScript(rows) {
|
|
|
12637
12640
|
function shellQuote(value) {
|
|
12638
12641
|
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
12639
12642
|
}
|
|
12640
|
-
function normalizeFramework(input) {
|
|
12641
|
-
const v = input.trim().toLowerCase();
|
|
12642
|
-
if (v === "vitest") return "vitest";
|
|
12643
|
-
if (v === "jest") return "jest";
|
|
12644
|
-
if (v === "pytest" || v === "py" || v === "python") return "pytest";
|
|
12645
|
-
if (v === "go" || v === "gotest" || v === "go-test") return "gotest";
|
|
12646
|
-
return null;
|
|
12647
|
-
}
|
|
12648
|
-
async function detectTestFramework(root) {
|
|
12649
|
-
try {
|
|
12650
|
-
const pkgPath = path41.join(root, "package.json");
|
|
12651
|
-
if (existsSync43(pkgPath)) {
|
|
12652
|
-
const pkg = JSON.parse(await readFile20(pkgPath, "utf8"));
|
|
12653
|
-
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
12654
|
-
if (deps.vitest) return "vitest";
|
|
12655
|
-
if (deps.jest || deps["ts-jest"]) return "jest";
|
|
12656
|
-
}
|
|
12657
|
-
} catch {
|
|
12658
|
-
}
|
|
12659
|
-
if (existsSync43(path41.join(root, "go.mod"))) return "gotest";
|
|
12660
|
-
for (const signal of ["pyproject.toml", "setup.py", "pytest.ini", "requirements.txt", "tox.ini"]) {
|
|
12661
|
-
if (existsSync43(path41.join(root, signal))) return "pytest";
|
|
12662
|
-
}
|
|
12663
|
-
return "vitest";
|
|
12664
|
-
}
|
|
12665
12643
|
|
|
12666
12644
|
// src/commands/ingest.ts
|
|
12667
12645
|
import { existsSync as existsSync44 } from "fs";
|
|
@@ -13323,7 +13301,7 @@ function registerBridges(program2) {
|
|
|
13323
13301
|
|
|
13324
13302
|
// src/index.ts
|
|
13325
13303
|
var program = new Command48();
|
|
13326
|
-
program.name("hivelore").description("Hivelore - the deterministic policy gate for agent-written code (rules live as repo-native team memory)").version("0.
|
|
13304
|
+
program.name("hivelore").description("Hivelore - the deterministic policy gate for agent-written code (rules live as repo-native team memory)").version("0.38.0").option("--advanced", "show maintenance and experimental commands in help").showSuggestionAfterError(true);
|
|
13327
13305
|
registerInit(program);
|
|
13328
13306
|
registerResolveProject(program);
|
|
13329
13307
|
registerEnforce(program);
|