@merittdev/horus 0.8.14 → 0.8.15
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.cjs +15 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -65880,8 +65880,8 @@ init_cjs_shims();
|
|
|
65880
65880
|
|
|
65881
65881
|
// ../../packages/core/src/version.ts
|
|
65882
65882
|
init_cjs_shims();
|
|
65883
|
-
var HORUS_VERSION = true ? "0.8.
|
|
65884
|
-
var PINNED_SOURCE_VERSION = "1.5.
|
|
65883
|
+
var HORUS_VERSION = true ? "0.8.15" : "dev";
|
|
65884
|
+
var PINNED_SOURCE_VERSION = "1.5.3";
|
|
65885
65885
|
|
|
65886
65886
|
// ../../packages/core/src/evidence.ts
|
|
65887
65887
|
init_cjs_shims();
|
|
@@ -92672,7 +92672,14 @@ async function investigate(input, deps) {
|
|
|
92672
92672
|
}
|
|
92673
92673
|
}
|
|
92674
92674
|
const changedFilePaths = recentChanges && recentChanges.changedFiles.length > 0 ? new Set(recentChanges.changedFiles) : void 0;
|
|
92675
|
-
const
|
|
92675
|
+
const scopePrefix = input.scope ? input.scope.replace(/^\.?\/+/, "").replace(/\/+$/, "") : void 0;
|
|
92676
|
+
const inScope = (s5) => {
|
|
92677
|
+
if (!scopePrefix) return true;
|
|
92678
|
+
const fp = (s5.filePath ?? "").replace(/^\.?\/+/, "");
|
|
92679
|
+
return fp === scopePrefix || fp.startsWith(scopePrefix + "/");
|
|
92680
|
+
};
|
|
92681
|
+
const seedSearchLimit = scopePrefix ? 25 : 5;
|
|
92682
|
+
const rawSeeds = code ? (await code.searchSymbols(hint, seedSearchLimit)).filter(inScope).slice(0, 5) : [];
|
|
92676
92683
|
const hintTokens = [...new Set(tokenize(hint))];
|
|
92677
92684
|
const hintHasCode = /\b(?=[A-Z0-9_]*[0-9_])[A-Z][A-Z0-9_]{3,}\b/.test(hint);
|
|
92678
92685
|
const ranked = rankSeeds(rawSeeds, hintTokens, changedFilePaths, hintHasCode);
|
|
@@ -92681,7 +92688,7 @@ async function investigate(input, deps) {
|
|
|
92681
92688
|
if (top && code && isTypeLikeName(top.name)) {
|
|
92682
92689
|
const base2 = executableBaseName(top.name);
|
|
92683
92690
|
if (base2) {
|
|
92684
|
-
const altTop = rankSeeds(await code.searchSymbols(base2,
|
|
92691
|
+
const altTop = rankSeeds((await code.searchSymbols(base2, seedSearchLimit)).filter(inScope), hintTokens, void 0, hintHasCode).find(
|
|
92685
92692
|
(r) => !isTypeLikeName(r.symbol.name)
|
|
92686
92693
|
)?.symbol;
|
|
92687
92694
|
if (altTop && altTop.id !== top.id) {
|
|
@@ -110555,6 +110562,7 @@ async function runOneInvestigation(input, ctx, opts = {}) {
|
|
|
110555
110562
|
{
|
|
110556
110563
|
hint: input.hint,
|
|
110557
110564
|
repo: renv.project,
|
|
110565
|
+
...input.scope !== void 0 ? { scope: input.scope } : {},
|
|
110558
110566
|
...input.since !== void 0 ? { since: input.since } : {},
|
|
110559
110567
|
...input.logsSince !== void 0 ? { logsSince: input.logsSince } : {},
|
|
110560
110568
|
...(input.service ?? ctx.service) !== void 0 ? { service: input.service ?? ctx.service } : {}
|
|
@@ -110754,6 +110762,7 @@ async function runInvestigate(hint, opts) {
|
|
|
110754
110762
|
const report = await runOneInvestigation(
|
|
110755
110763
|
{
|
|
110756
110764
|
hint,
|
|
110765
|
+
...opts.scope !== void 0 ? { scope: opts.scope } : {},
|
|
110757
110766
|
...opts.since !== void 0 ? { since: opts.since } : {},
|
|
110758
110767
|
...opts.logsSince !== void 0 ? { logsSince: opts.logsSince } : {}
|
|
110759
110768
|
},
|
|
@@ -116608,7 +116617,7 @@ Examples:
|
|
|
116608
116617
|
});
|
|
116609
116618
|
}
|
|
116610
116619
|
);
|
|
116611
|
-
program2.command("investigate <hint>").description("Run a deterministic investigation for an incident hint").option("-c, --config <path>", "path to horus.config.ts").option("--name <name>", "registered project name (resolves via the registry)").option("--project <name>", "project name to scope to").option("--env <name>", "environment name (e.g. production)").option("--repo <name>", "repository/project to scope to (alias for --project)").option("--since <ref>", "git ref/range for change-impact (e.g. HEAD~5)").option("--logs-since <dur>", "runtime-log window as a duration (e.g. 30d, 24h); independent of --since").option("--timeout <sec>", "overall investigation deadline in seconds (default 120)").option(
|
|
116620
|
+
program2.command("investigate <hint>").description("Run a deterministic investigation for an incident hint").option("-c, --config <path>", "path to horus.config.ts").option("--name <name>", "registered project name (resolves via the registry)").option("--project <name>", "project name to scope to").option("--env <name>", "environment name (e.g. production)").option("--repo <name>", "repository/project to scope to (alias for --project)").option("--scope <path>", "resolve the seed only from symbols under this path (e.g. packages/core) \u2014 useful in monorepos").option("--since <ref>", "git ref/range for change-impact (e.g. HEAD~5)").option("--logs-since <dur>", "runtime-log window as a duration (e.g. 30d, 24h); independent of --since").option("--timeout <sec>", "overall investigation deadline in seconds (default 120)").option(
|
|
116612
116621
|
"--service <name>",
|
|
116613
116622
|
"service name to scope runtime logs, e.g. leadcall-api-prod"
|
|
116614
116623
|
).option("--json", "output JSON (alias for --format json)").option("--format <fmt>", "output format: text | markdown | json", "text").option("--ai", "enrich report with AI narrative (requires ANTHROPIC_API_KEY; falls back to deterministic on failure)").option("--ai-model <model>", "AI model for --ai (default: claude-opus-4-8)").action(
|
|
@@ -116619,6 +116628,7 @@ Examples:
|
|
|
116619
116628
|
project: opts.project,
|
|
116620
116629
|
env: opts.env,
|
|
116621
116630
|
repo: opts.repo,
|
|
116631
|
+
scope: opts.scope,
|
|
116622
116632
|
since: opts.since,
|
|
116623
116633
|
logsSince: opts.logsSince,
|
|
116624
116634
|
timeout: opts.timeout,
|