@hivelore/cli 0.52.0 → 0.52.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/dist/{chunk-IICT42WP.js → chunk-WQWNIGVL.js} +3 -3
- package/dist/index.js +40 -21
- package/dist/index.js.map +1 -1
- package/dist/{server-UAD33QQZ.js → server-AXRCHDHW.js} +2 -2
- package/package.json +4 -4
- /package/dist/{chunk-IICT42WP.js.map → chunk-WQWNIGVL.js.map} +0 -0
- /package/dist/{server-UAD33QQZ.js.map → server-AXRCHDHW.js.map} +0 -0
|
@@ -3257,7 +3257,7 @@ function oneLine(value) {
|
|
|
3257
3257
|
return value.replace(/\s+/g, " ").replace(/"/g, '\\"').trim().slice(0, 120);
|
|
3258
3258
|
}
|
|
3259
3259
|
function serverVersion() {
|
|
3260
|
-
return true ? "0.52.
|
|
3260
|
+
return true ? "0.52.1" : "dev";
|
|
3261
3261
|
}
|
|
3262
3262
|
var CodeMapInputSchema = {
|
|
3263
3263
|
file: z21.string().optional().describe("Filter to files whose path contains this substring"),
|
|
@@ -4620,7 +4620,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
|
|
|
4620
4620
|
};
|
|
4621
4621
|
}
|
|
4622
4622
|
var SERVER_NAME = "hivelore";
|
|
4623
|
-
var SERVER_VERSION = "0.52.
|
|
4623
|
+
var SERVER_VERSION = "0.52.1";
|
|
4624
4624
|
function jsonResult(data) {
|
|
4625
4625
|
return {
|
|
4626
4626
|
content: [
|
|
@@ -5613,4 +5613,4 @@ export {
|
|
|
5613
5613
|
runHaiveMcpStdio,
|
|
5614
5614
|
writeMcpRuntimeMarker
|
|
5615
5615
|
};
|
|
5616
|
-
//# sourceMappingURL=chunk-
|
|
5616
|
+
//# sourceMappingURL=chunk-WQWNIGVL.js.map
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
readPresumedCorrectTargets,
|
|
14
14
|
runAstSensorOnContent,
|
|
15
15
|
runHaiveMcpStdio
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WQWNIGVL.js";
|
|
17
17
|
import {
|
|
18
18
|
registerMemoryPending
|
|
19
19
|
} from "./chunk-OYJKHD22.js";
|
|
@@ -3762,7 +3762,7 @@ ${SEED_FOOTER(stack)}` });
|
|
|
3762
3762
|
|
|
3763
3763
|
// src/commands/init.ts
|
|
3764
3764
|
var execFileAsync = promisify2(execFile2);
|
|
3765
|
-
var HAIVE_GITHUB_ACTION_REF = `v${"0.52.
|
|
3765
|
+
var HAIVE_GITHUB_ACTION_REF = `v${"0.52.1"}`;
|
|
3766
3766
|
var PROJECT_CONTEXT_TEMPLATE = `# Project context
|
|
3767
3767
|
|
|
3768
3768
|
> Generated by \`hivelore init\`. Run \`hivelore init --bootstrap\` to auto-fill from your codebase,
|
|
@@ -9158,7 +9158,7 @@ function registerDoctor(program2) {
|
|
|
9158
9158
|
}
|
|
9159
9159
|
const astSensorCount = sensorMemories.filter((m) => m.memory.frontmatter.sensor?.kind === "ast").length;
|
|
9160
9160
|
if (astSensorCount > 0) {
|
|
9161
|
-
const { astEngineAvailable: astEngineAvailable2 } = await import("./server-
|
|
9161
|
+
const { astEngineAvailable: astEngineAvailable2 } = await import("./server-AXRCHDHW.js");
|
|
9162
9162
|
if (!await astEngineAvailable2()) {
|
|
9163
9163
|
findings.push({
|
|
9164
9164
|
severity: "warn",
|
|
@@ -9329,8 +9329,8 @@ function registerDoctor(program2) {
|
|
|
9329
9329
|
fix: "Edit .ai/hivelore.config.json: set autoSessionEnd: true (or re-run `hivelore init` without --manual)."
|
|
9330
9330
|
});
|
|
9331
9331
|
}
|
|
9332
|
-
findings.push(...await collectInstallFindings(root, "0.52.
|
|
9333
|
-
findings.push(...await collectMcpRuntimeFindings(paths, "0.52.
|
|
9332
|
+
findings.push(...await collectInstallFindings(root, "0.52.1"));
|
|
9333
|
+
findings.push(...await collectMcpRuntimeFindings(paths, "0.52.1"));
|
|
9334
9334
|
findings.push(...await collectToolchainFindings(root));
|
|
9335
9335
|
try {
|
|
9336
9336
|
const legacyRaw = execSync("haive-mcp --version", {
|
|
@@ -9338,7 +9338,7 @@ function registerDoctor(program2) {
|
|
|
9338
9338
|
timeout: 3e3,
|
|
9339
9339
|
stdio: ["ignore", "pipe", "ignore"]
|
|
9340
9340
|
}).trim();
|
|
9341
|
-
const cliVersion = "0.52.
|
|
9341
|
+
const cliVersion = "0.52.1";
|
|
9342
9342
|
if (legacyRaw && legacyRaw !== cliVersion) {
|
|
9343
9343
|
findings.push({
|
|
9344
9344
|
severity: "warn",
|
|
@@ -10431,6 +10431,35 @@ function evaluation(base, command) {
|
|
|
10431
10431
|
var execFileAsync2 = promisify5(execFile5);
|
|
10432
10432
|
var MAX_STDIN_BYTES2 = 256 * 1024;
|
|
10433
10433
|
var ENFORCE_HOOK_MARKER = "# Hivelore enforcement hook";
|
|
10434
|
+
function stripHiveloreHookBlock(content) {
|
|
10435
|
+
const markerRe = /^\s*#\s*(?:hivelore|h[aA]ive)\b.*\bhook\b/i;
|
|
10436
|
+
const invocationRe = /^\s*_?(?:hivelore|haive)\b.*\|\|/i;
|
|
10437
|
+
const shebangRe = /^\s*#!.*\bsh\b/;
|
|
10438
|
+
const out = [];
|
|
10439
|
+
let inBlock = false;
|
|
10440
|
+
for (const line of content.split("\n")) {
|
|
10441
|
+
if (inBlock) {
|
|
10442
|
+
if (invocationRe.test(line)) inBlock = false;
|
|
10443
|
+
continue;
|
|
10444
|
+
}
|
|
10445
|
+
if (markerRe.test(line)) {
|
|
10446
|
+
inBlock = true;
|
|
10447
|
+
continue;
|
|
10448
|
+
}
|
|
10449
|
+
if (shebangRe.test(line)) continue;
|
|
10450
|
+
out.push(line);
|
|
10451
|
+
}
|
|
10452
|
+
return out.join("\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
10453
|
+
}
|
|
10454
|
+
function buildHookFileContent(current, ownBody) {
|
|
10455
|
+
const foreign = stripHiveloreHookBlock(current);
|
|
10456
|
+
if (!foreign) return ownBody;
|
|
10457
|
+
const ownWithoutShebang = ownBody.replace(/^\s*#!.*\n/, "");
|
|
10458
|
+
return `#!/bin/sh
|
|
10459
|
+
${foreign}
|
|
10460
|
+
|
|
10461
|
+
${ownWithoutShebang}`;
|
|
10462
|
+
}
|
|
10434
10463
|
function registerEnforce(program2) {
|
|
10435
10464
|
program2.command("install-hooks [target]", { hidden: true }).option("-d, --dir <dir>", "project root").option("--force", "(ignored \u2014 Hivelore-owned hooks are always refreshed, foreign hooks appended)").option("--scope <scope>", "claude: 'user' (~/.claude) or 'project' (.claude/)", "user").option("--uninstall", "claude: remove previously installed hooks").option("--settings <path>", "claude: explicit settings.json path").action(async (target, opts) => {
|
|
10436
10465
|
const t = (target ?? "git").toLowerCase();
|
|
@@ -11154,7 +11183,7 @@ async function buildEnforcementReport(dir, stage, sessionId) {
|
|
|
11154
11183
|
findings: [{ severity: "info", code: "enforcement-off", message: "Hivelore enforcement is disabled." }]
|
|
11155
11184
|
});
|
|
11156
11185
|
}
|
|
11157
|
-
findings.push(...await inspectIntegrationVersions(root, "0.52.
|
|
11186
|
+
findings.push(...await inspectIntegrationVersions(root, "0.52.1"));
|
|
11158
11187
|
if (config.enforcement?.requireBriefingFirst !== false && stage !== "ci") {
|
|
11159
11188
|
const hasBriefing = await hasRecentBriefingMarker(paths, sessionId);
|
|
11160
11189
|
findings.push(hasBriefing ? { severity: "ok", code: "briefing-loaded", message: "A recent Hivelore briefing marker exists." } : {
|
|
@@ -12333,18 +12362,8 @@ _hivelore sync --quiet --since ORIG_HEAD || true
|
|
|
12333
12362
|
];
|
|
12334
12363
|
for (const hook of hooks) {
|
|
12335
12364
|
const file = path40.join(hooksDir, hook.name);
|
|
12336
|
-
|
|
12337
|
-
|
|
12338
|
-
if (current.includes(ENFORCE_HOOK_MARKER)) {
|
|
12339
|
-
await writeFile25(file, hook.body, "utf8");
|
|
12340
|
-
} else {
|
|
12341
|
-
await writeFile25(file, `${current.trimEnd()}
|
|
12342
|
-
|
|
12343
|
-
${hook.body}`, "utf8");
|
|
12344
|
-
}
|
|
12345
|
-
} else {
|
|
12346
|
-
await writeFile25(file, hook.body, "utf8");
|
|
12347
|
-
}
|
|
12365
|
+
const current = existsSync42(file) ? await readFile18(file, "utf8").catch(() => "") : "";
|
|
12366
|
+
await writeFile25(file, buildHookFileContent(current, hook.body), "utf8");
|
|
12348
12367
|
await chmod(file, 493);
|
|
12349
12368
|
}
|
|
12350
12369
|
ui.success("Installed git hooks: pre-commit, pre-push, commit-msg (blocking) + post-merge, post-rewrite (sync)");
|
|
@@ -13186,7 +13205,7 @@ function registerSensors(program2) {
|
|
|
13186
13205
|
}
|
|
13187
13206
|
}
|
|
13188
13207
|
const root2 = findProjectRoot39(opts.dir);
|
|
13189
|
-
const { proposeSensor } = await import("./server-
|
|
13208
|
+
const { proposeSensor } = await import("./server-AXRCHDHW.js");
|
|
13190
13209
|
const out = await proposeSensor(
|
|
13191
13210
|
{
|
|
13192
13211
|
memory_id: id,
|
|
@@ -14256,7 +14275,7 @@ function registerBridges(program2) {
|
|
|
14256
14275
|
|
|
14257
14276
|
// src/index.ts
|
|
14258
14277
|
var program = new Command48();
|
|
14259
|
-
program.name("hivelore").description("Hivelore - the deterministic policy gate for agent-written code (rules live as repo-native team memory)").version("0.52.
|
|
14278
|
+
program.name("hivelore").description("Hivelore - the deterministic policy gate for agent-written code (rules live as repo-native team memory)").version("0.52.1").option("--advanced", "show maintenance and experimental commands in help").showSuggestionAfterError(true);
|
|
14260
14279
|
registerInit(program);
|
|
14261
14280
|
registerResolveProject(program);
|
|
14262
14281
|
registerEnforce(program);
|