@hiveai/cli 0.25.0 → 0.26.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/index.js +16 -8
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -3410,7 +3410,7 @@ ${SEED_FOOTER(stack)}` });
|
|
|
3410
3410
|
|
|
3411
3411
|
// src/commands/init.ts
|
|
3412
3412
|
var execFileAsync = promisify2(execFile2);
|
|
3413
|
-
var HAIVE_GITHUB_ACTION_REF = `v${"0.
|
|
3413
|
+
var HAIVE_GITHUB_ACTION_REF = `v${"0.26.0"}`;
|
|
3414
3414
|
var PROJECT_CONTEXT_TEMPLATE = `# Project context
|
|
3415
3415
|
|
|
3416
3416
|
> Generated by \`haive init\`. Run \`haive init --bootstrap\` to auto-fill from your codebase,
|
|
@@ -5849,6 +5849,7 @@ var IngestFindingsInputSchema = {
|
|
|
5849
5849
|
scope: z16.enum(["personal", "team", "module"]).default("team").describe("Visibility scope for the created memories"),
|
|
5850
5850
|
module: z16.string().optional().describe("Module name (required when scope=module)"),
|
|
5851
5851
|
min_severity: z16.enum(["info", "minor", "major", "critical", "blocker"]).optional().describe("Ignore findings below this severity"),
|
|
5852
|
+
include_stylistic: z16.boolean().optional().describe("Also ingest auto-fixable stylistic rules (semi/quotes/prefer-const\u2026); off by default as low-value noise"),
|
|
5852
5853
|
limit: z16.number().int().positive().optional().describe("Cap the number of memories created"),
|
|
5853
5854
|
author: z16.string().optional().describe("Author handle or email"),
|
|
5854
5855
|
dry_run: z16.boolean().default(false).describe("When true, return the drafts that WOULD be created without writing them")
|
|
@@ -5874,6 +5875,7 @@ async function ingestFindings(input, ctx) {
|
|
|
5874
5875
|
module: input.module,
|
|
5875
5876
|
author: input.author,
|
|
5876
5877
|
...input.min_severity ? { minSeverity: input.min_severity } : {},
|
|
5878
|
+
...input.include_stylistic ? { includeStylistic: true } : {},
|
|
5877
5879
|
...input.limit ? { limit: input.limit } : {}
|
|
5878
5880
|
});
|
|
5879
5881
|
const existing = existsSync16(ctx.paths.memoriesDir) ? await loadMemoriesFromDir13(ctx.paths.memoriesDir) : [];
|
|
@@ -8696,7 +8698,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
|
|
|
8696
8698
|
};
|
|
8697
8699
|
}
|
|
8698
8700
|
var SERVER_NAME = "haive";
|
|
8699
|
-
var SERVER_VERSION = "0.
|
|
8701
|
+
var SERVER_VERSION = "0.26.0";
|
|
8700
8702
|
function jsonResult(data) {
|
|
8701
8703
|
return {
|
|
8702
8704
|
content: [
|
|
@@ -14473,7 +14475,7 @@ function registerDoctor(program2) {
|
|
|
14473
14475
|
fix: "Edit .ai/haive.config.json: set autoSessionEnd: true (or re-run `haive init` without --manual)."
|
|
14474
14476
|
});
|
|
14475
14477
|
}
|
|
14476
|
-
findings.push(...await collectInstallFindings(root, "0.
|
|
14478
|
+
findings.push(...await collectInstallFindings(root, "0.26.0"));
|
|
14477
14479
|
findings.push(...await collectToolchainFindings(root));
|
|
14478
14480
|
try {
|
|
14479
14481
|
const legacyRaw = execSync3("haive-mcp --version", {
|
|
@@ -14481,7 +14483,7 @@ function registerDoctor(program2) {
|
|
|
14481
14483
|
timeout: 3e3,
|
|
14482
14484
|
stdio: ["ignore", "pipe", "ignore"]
|
|
14483
14485
|
}).trim();
|
|
14484
|
-
const cliVersion = "0.
|
|
14486
|
+
const cliVersion = "0.26.0";
|
|
14485
14487
|
if (legacyRaw && legacyRaw !== cliVersion) {
|
|
14486
14488
|
findings.push({
|
|
14487
14489
|
severity: "warn",
|
|
@@ -16185,7 +16187,7 @@ async function buildEnforcementReport(dir, stage, sessionId) {
|
|
|
16185
16187
|
findings: [{ severity: "info", code: "enforcement-off", message: "hAIve enforcement is disabled." }]
|
|
16186
16188
|
});
|
|
16187
16189
|
}
|
|
16188
|
-
findings.push(...await inspectIntegrationVersions(root, "0.
|
|
16190
|
+
findings.push(...await inspectIntegrationVersions(root, "0.26.0"));
|
|
16189
16191
|
if (config.enforcement?.requireBriefingFirst !== false && stage !== "ci") {
|
|
16190
16192
|
const hasBriefing = await hasRecentBriefingMarker2(paths, sessionId);
|
|
16191
16193
|
findings.push(hasBriefing ? { severity: "ok", code: "briefing-loaded", message: "A recent hAIve briefing marker exists." } : {
|
|
@@ -17554,7 +17556,7 @@ var SEVERITIES = ["info", "minor", "major", "critical", "blocker"];
|
|
|
17554
17556
|
function registerIngest(program2) {
|
|
17555
17557
|
program2.command("ingest").description(
|
|
17556
17558
|
"Ingest scanner findings (SonarQube / SARIF) as proposed, anchored memories with sensors.\n\n Closes the review\u2194memory loop: a real defect a scanner found becomes a `gotcha`/`convention`\n memory anchored to the file, pre-filled with a conservative `warn` sensor, so the next agent\n is steered away from it. Drafts are status=proposed; a human validates/promotes them.\n\n `sonar-api` fetches issues live over plain HTTPS from any SonarQube/SonarCloud instance \u2014\n no MCP or special setup required, just a URL + token you provide (or SONAR_HOST_URL /\n SONAR_TOKEN env). If you don't use it, file-based ingest works exactly the same.\n\n Example:\n haive ingest --from eslint eslint-report.json --min-severity major\n haive ingest --from npm-audit audit.json --scope team\n haive ingest --from sarif report.sarif --dry-run\n haive ingest --from sonar sonar-issues.json --scope team --min-severity major\n haive ingest --from sonar-api --sonar-component my_project --min-severity major\n\n Generate the input reports:\n eslint -f json -o eslint-report.json . # --from eslint\n npm audit --json > audit.json # --from npm-audit\n"
|
|
17557
|
-
).argument("[file]", "path to the findings report JSON (required for --from sarif|sonar|eslint|npm-audit)").requiredOption("--from <format>", "report format: sarif | sonar | sonar-api | eslint | npm-audit").option("--dry-run", "show what would be created without writing", false).option("--scope <scope>", "memory scope: personal | team | module", "team").option("--module <name>", "module name (required when scope=module)").option("--type <type>", "memory type: gotcha | convention", "gotcha").option("--min-severity <severity>", "ignore findings below this severity (info|minor|major|critical|blocker)").option("--limit <n>", "cap the number of memories created").option("--author <author>", "author email or handle").option("--json", "emit JSON", false).option("--sonar-url <url>", "SonarQube base URL for --from sonar-api (or env SONAR_HOST_URL)").option("--sonar-token <token>", "SonarQube token for --from sonar-api (or env SONAR_TOKEN)").option("--sonar-component <key>", "SonarQube project/component key for --from sonar-api").option("--sonar-branch <branch>", "optional SonarQube branch for --from sonar-api").option("-d, --dir <dir>", "project root").action(async (file, opts) => {
|
|
17559
|
+
).argument("[file]", "path to the findings report JSON (required for --from sarif|sonar|eslint|npm-audit)").requiredOption("--from <format>", "report format: sarif | sonar | sonar-api | eslint | npm-audit").option("--dry-run", "show what would be created without writing", false).option("--scope <scope>", "memory scope: personal | team | module", "team").option("--module <name>", "module name (required when scope=module)").option("--type <type>", "memory type: gotcha | convention", "gotcha").option("--min-severity <severity>", "ignore findings below this severity (info|minor|major|critical|blocker)").option("--include-stylistic", "also ingest auto-fixable stylistic rules (semi/quotes/prefer-const\u2026); off by default as low-value noise", false).option("--limit <n>", "cap the number of memories created").option("--author <author>", "author email or handle").option("--json", "emit JSON", false).option("--sonar-url <url>", "SonarQube base URL for --from sonar-api (or env SONAR_HOST_URL)").option("--sonar-token <token>", "SonarQube token for --from sonar-api (or env SONAR_TOKEN)").option("--sonar-component <key>", "SonarQube project/component key for --from sonar-api").option("--sonar-branch <branch>", "optional SonarQube branch for --from sonar-api").option("-d, --dir <dir>", "project root").action(async (file, opts) => {
|
|
17558
17560
|
const format = opts.from;
|
|
17559
17561
|
const VALID_FORMATS = ["sarif", "sonar", "sonar-api", "eslint", "npm-audit"];
|
|
17560
17562
|
if (!format || !VALID_FORMATS.includes(format)) {
|
|
@@ -17610,14 +17612,17 @@ function registerIngest(program2) {
|
|
|
17610
17612
|
}
|
|
17611
17613
|
}
|
|
17612
17614
|
let drafts;
|
|
17615
|
+
let findingsCount = 0;
|
|
17613
17616
|
try {
|
|
17614
17617
|
const findings = parseFindings2(parseFormat, raw, { cwd: root });
|
|
17618
|
+
findingsCount = findings.length;
|
|
17615
17619
|
drafts = draftsFromFindings2(findings, {
|
|
17616
17620
|
type: opts.type ?? "gotcha",
|
|
17617
17621
|
scope: opts.scope ?? "team",
|
|
17618
17622
|
module: opts.module,
|
|
17619
17623
|
author: opts.author,
|
|
17620
17624
|
...opts.minSeverity ? { minSeverity: opts.minSeverity } : {},
|
|
17625
|
+
...opts.includeStylistic ? { includeStylistic: true } : {},
|
|
17621
17626
|
...opts.limit ? { limit: Math.max(0, Number.parseInt(opts.limit, 10) || 0) } : {}
|
|
17622
17627
|
});
|
|
17623
17628
|
} catch (err) {
|
|
@@ -17640,7 +17645,9 @@ function registerIngest(program2) {
|
|
|
17640
17645
|
JSON.stringify(
|
|
17641
17646
|
{
|
|
17642
17647
|
format,
|
|
17648
|
+
findings: findingsCount,
|
|
17643
17649
|
parsed: drafts.length,
|
|
17650
|
+
filtered_low_value: Math.max(0, findingsCount - drafts.length),
|
|
17644
17651
|
new: fresh.length,
|
|
17645
17652
|
skipped_existing: skipped,
|
|
17646
17653
|
dry_run: Boolean(opts.dryRun),
|
|
@@ -17659,9 +17666,10 @@ function registerIngest(program2) {
|
|
|
17659
17666
|
);
|
|
17660
17667
|
return;
|
|
17661
17668
|
}
|
|
17669
|
+
const filteredLowValue = Math.max(0, findingsCount - drafts.length);
|
|
17662
17670
|
console.log(
|
|
17663
17671
|
ui.bold(
|
|
17664
|
-
`hAIve ingest (${format}) \u2014 ${
|
|
17672
|
+
`hAIve ingest (${format}) \u2014 ${findingsCount} finding(s), ${fresh.length} new` + (filteredLowValue > 0 ? `, ${filteredLowValue} low-value/stylistic filtered` : "") + (skipped > 0 ? `, ${skipped} already ingested` : "")
|
|
17665
17673
|
)
|
|
17666
17674
|
);
|
|
17667
17675
|
if (fresh.length === 0) {
|
|
@@ -18344,7 +18352,7 @@ function registerBridges(program2) {
|
|
|
18344
18352
|
|
|
18345
18353
|
// src/index.ts
|
|
18346
18354
|
var program = new Command64();
|
|
18347
|
-
program.name("haive").description("hAIve - repo-native memory and context policy for coding-agent harnesses").version("0.
|
|
18355
|
+
program.name("haive").description("hAIve - repo-native memory and context policy for coding-agent harnesses").version("0.26.0").option("--advanced", "show maintenance and experimental commands in help");
|
|
18348
18356
|
registerInit(program);
|
|
18349
18357
|
registerWelcome(program);
|
|
18350
18358
|
registerResolveProject(program);
|