@hiveai/cli 0.10.4 → 0.10.5
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/README.md +1 -0
- package/dist/index.js +46 -6
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -177,6 +177,7 @@ Operate executable regex sensors stored on `gotcha`/`attempt` memories.
|
|
|
177
177
|
haive sensors list
|
|
178
178
|
haive sensors check # scans git diff --cached
|
|
179
179
|
haive sensors check --diff-file diff.patch --json
|
|
180
|
+
haive sensors promote <memory-id> --yes
|
|
180
181
|
haive sensors export --format grep
|
|
181
182
|
```
|
|
182
183
|
|
package/dist/index.js
CHANGED
|
@@ -7442,7 +7442,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
|
|
|
7442
7442
|
};
|
|
7443
7443
|
}
|
|
7444
7444
|
var SERVER_NAME = "haive";
|
|
7445
|
-
var SERVER_VERSION = "0.10.
|
|
7445
|
+
var SERVER_VERSION = "0.10.5";
|
|
7446
7446
|
function jsonResult(data) {
|
|
7447
7447
|
return {
|
|
7448
7448
|
content: [
|
|
@@ -12538,14 +12538,14 @@ function registerDoctor(program2) {
|
|
|
12538
12538
|
fix: "Edit .ai/haive.config.json: set autoSessionEnd: true (or re-run `haive init` without --manual)."
|
|
12539
12539
|
});
|
|
12540
12540
|
}
|
|
12541
|
-
findings.push(...await collectInstallFindings(root, "0.10.
|
|
12541
|
+
findings.push(...await collectInstallFindings(root, "0.10.5"));
|
|
12542
12542
|
try {
|
|
12543
12543
|
const legacyRaw = execSync3("haive-mcp --version", {
|
|
12544
12544
|
encoding: "utf8",
|
|
12545
12545
|
timeout: 3e3,
|
|
12546
12546
|
stdio: ["ignore", "pipe", "ignore"]
|
|
12547
12547
|
}).trim();
|
|
12548
|
-
const cliVersion = "0.10.
|
|
12548
|
+
const cliVersion = "0.10.5";
|
|
12549
12549
|
if (legacyRaw && legacyRaw !== cliVersion) {
|
|
12550
12550
|
findings.push({
|
|
12551
12551
|
severity: "warn",
|
|
@@ -13843,7 +13843,7 @@ async function buildEnforcementReport(dir, stage, sessionId) {
|
|
|
13843
13843
|
findings: [{ severity: "info", code: "enforcement-off", message: "hAIve enforcement is disabled." }]
|
|
13844
13844
|
});
|
|
13845
13845
|
}
|
|
13846
|
-
findings.push(...await inspectIntegrationVersions(root, "0.10.
|
|
13846
|
+
findings.push(...await inspectIntegrationVersions(root, "0.10.5"));
|
|
13847
13847
|
if (config.enforcement?.requireBriefingFirst !== false && stage !== "ci") {
|
|
13848
13848
|
const hasBriefing = await hasRecentBriefingMarker(paths, sessionId);
|
|
13849
13849
|
findings.push(hasBriefing ? { severity: "ok", code: "briefing-loaded", message: "A recent hAIve briefing marker exists." } : {
|
|
@@ -14466,7 +14466,8 @@ import {
|
|
|
14466
14466
|
loadMemoriesFromDir as loadMemoriesFromDir37,
|
|
14467
14467
|
resolveHaivePaths as resolveHaivePaths46,
|
|
14468
14468
|
runSensors as runSensors2,
|
|
14469
|
-
sensorTargetsFromDiff as sensorTargetsFromDiff2
|
|
14469
|
+
sensorTargetsFromDiff as sensorTargetsFromDiff2,
|
|
14470
|
+
serializeMemory as serializeMemory26
|
|
14470
14471
|
} from "@hiveai/core";
|
|
14471
14472
|
var exec2 = promisify2(execFile2);
|
|
14472
14473
|
function registerSensors(program2) {
|
|
@@ -14523,6 +14524,45 @@ function registerSensors(program2) {
|
|
|
14523
14524
|
}
|
|
14524
14525
|
if (hits.some((hit) => hit.severity === "block")) process.exitCode = 1;
|
|
14525
14526
|
});
|
|
14527
|
+
sensors.command("promote").description("Promote or demote an existing memory sensor severity").argument("<memory-id>", "memory id carrying the sensor").option("--severity <severity>", "block | warn", "block").option("--yes", "confirm promotion to block severity", false).option("-d, --dir <dir>", "project root").action(async (id, opts) => {
|
|
14528
|
+
const severity = opts.severity ?? "block";
|
|
14529
|
+
if (severity !== "block" && severity !== "warn") {
|
|
14530
|
+
ui.error("--severity must be block or warn");
|
|
14531
|
+
process.exitCode = 1;
|
|
14532
|
+
return;
|
|
14533
|
+
}
|
|
14534
|
+
if (severity === "block" && !opts.yes) {
|
|
14535
|
+
ui.error("Promoting a sensor to block makes the gate hard-fail. Re-run with --yes to confirm.");
|
|
14536
|
+
process.exitCode = 1;
|
|
14537
|
+
return;
|
|
14538
|
+
}
|
|
14539
|
+
const root = findProjectRoot50(opts.dir);
|
|
14540
|
+
const paths = resolveHaivePaths46(root);
|
|
14541
|
+
const loaded = existsSync69(paths.memoriesDir) ? await loadMemoriesFromDir37(paths.memoriesDir) : [];
|
|
14542
|
+
const found = loaded.find(({ memory: memory2 }) => memory2.frontmatter.id === id);
|
|
14543
|
+
if (!found) {
|
|
14544
|
+
ui.error(`No memory found with id ${id}`);
|
|
14545
|
+
process.exitCode = 1;
|
|
14546
|
+
return;
|
|
14547
|
+
}
|
|
14548
|
+
const sensor = found.memory.frontmatter.sensor;
|
|
14549
|
+
if (!sensor) {
|
|
14550
|
+
ui.error(`Memory ${id} does not carry a sensor.`);
|
|
14551
|
+
process.exitCode = 1;
|
|
14552
|
+
return;
|
|
14553
|
+
}
|
|
14554
|
+
const next = {
|
|
14555
|
+
frontmatter: {
|
|
14556
|
+
...found.memory.frontmatter,
|
|
14557
|
+
sensor: { ...sensor, severity }
|
|
14558
|
+
},
|
|
14559
|
+
body: found.memory.body
|
|
14560
|
+
};
|
|
14561
|
+
await writeFile34(found.filePath, serializeMemory26(next), "utf8");
|
|
14562
|
+
ui.success(`Updated ${id}: sensor severity=${severity}`);
|
|
14563
|
+
if (sensor.pattern) ui.info(`pattern=${JSON.stringify(sensor.pattern)}`);
|
|
14564
|
+
ui.info(`message=${sensor.message}`);
|
|
14565
|
+
});
|
|
14526
14566
|
sensors.command("export").description("Export regex sensors into .ai/generated for external toolchains").option("--format <format>", "grep | eslint", "grep").option("--out-dir <dir>", "output directory", ".ai/generated").option("-d, --dir <dir>", "project root").action(async (opts) => {
|
|
14527
14567
|
const format = opts.format ?? "grep";
|
|
14528
14568
|
if (format !== "grep" && format !== "eslint") {
|
|
@@ -14603,7 +14643,7 @@ function shellQuote(value) {
|
|
|
14603
14643
|
|
|
14604
14644
|
// src/index.ts
|
|
14605
14645
|
var program = new Command53();
|
|
14606
|
-
program.name("haive").description("hAIve - repo-native memory and context policy for coding-agent harnesses").version("0.10.
|
|
14646
|
+
program.name("haive").description("hAIve - repo-native memory and context policy for coding-agent harnesses").version("0.10.5").option("--advanced", "show maintenance and experimental commands in help");
|
|
14607
14647
|
registerInit(program);
|
|
14608
14648
|
registerWelcome(program);
|
|
14609
14649
|
registerResolveProject(program);
|