@merittdev/horus 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/dist/index.cjs +64 -11
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -57239,7 +57239,7 @@ init_cjs_shims();
57239
57239
 
57240
57240
  // ../../packages/core/src/version.ts
57241
57241
  init_cjs_shims();
57242
- var HORUS_VERSION = true ? "0.3.0" : "dev";
57242
+ var HORUS_VERSION = true ? "0.3.1" : "dev";
57243
57243
  var PINNED_SOURCE_VERSION = "1.1.1";
57244
57244
 
57245
57245
  // ../../packages/core/src/evidence.ts
@@ -94194,7 +94194,8 @@ async function runFeedbackPrompt(investigationId, horusSeconds) {
94194
94194
  investigationId,
94195
94195
  resolved: parseResolved(a1),
94196
94196
  manualEstimateMinutes: parseManualEstimate(a2),
94197
- horusSeconds
94197
+ horusSeconds,
94198
+ source: "prompt"
94198
94199
  });
94199
94200
  console.log(import_picocolors8.default.dim(" Thanks \u2014 recorded."));
94200
94201
  return true;
@@ -98330,6 +98331,27 @@ horus ask <id> "what evidence contradicts the likely root cause?"
98330
98331
  horus score <id>
98331
98332
  \`\`\`
98332
98333
 
98334
+ ## Report whether Horus helped (close the loop)
98335
+
98336
+ Once you have **acted on an investigation and know the outcome** \u2014 you verified
98337
+ whether Horus pointed at the real cause \u2014 record it. This is how Horus measures and
98338
+ improves its own accuracy, and without it the impact signal is blind to agent-driven
98339
+ runs (most of them).
98340
+
98341
+ \`\`\`bash
98342
+ horus feedback <id> --resolved yes # Horus pointed at the real cause
98343
+ horus feedback <id> --resolved partly # useful lead, but not the whole cause
98344
+ horus feedback <id> --resolved no # Horus missed the cause
98345
+ \`\`\`
98346
+
98347
+ It is non-interactive and safe to run unattended. Report **once** per investigation,
98348
+ **after** you confirm the outcome \u2014 never before, and never guess. If you can estimate
98349
+ how long the same debugging would have taken you manually, add it:
98350
+
98351
+ \`\`\`bash
98352
+ horus feedback <id> --resolved yes --manual-estimate-min 120
98353
+ \`\`\`
98354
+
98333
98355
  ## Runtime evidence
98334
98356
 
98335
98357
  Use runtime commands when the question depends on live or recent runtime behavior:
@@ -99541,14 +99563,37 @@ function installCommandTelemetry(program2) {
99541
99563
  // ../../packages/cli/src/commands/feedback.ts
99542
99564
  init_cjs_shims();
99543
99565
  var import_picocolors46 = __toESM(require_picocolors(), 1);
99544
- async function runFeedback(investigationId) {
99545
- if (!process.stdin.isTTY) {
99546
- console.error(import_picocolors46.default.yellow("horus feedback needs an interactive terminal."));
99547
- return 1;
99548
- }
99566
+ async function runFeedback(investigationId, opts = {}) {
99549
99567
  const id = investigationId?.trim();
99550
99568
  if (!id) {
99551
- console.error(import_picocolors46.default.red("Usage: horus feedback <investigationId>"));
99569
+ console.error(import_picocolors46.default.red("Usage: horus feedback <investigationId> [--resolved yes|partly|no]"));
99570
+ return 1;
99571
+ }
99572
+ if (opts.resolved !== void 0) {
99573
+ const resolved = parseResolved(opts.resolved);
99574
+ if (resolved === null) {
99575
+ console.error(import_picocolors46.default.red(`Invalid --resolved "${opts.resolved}". Use: yes | partly | no.`));
99576
+ return 1;
99577
+ }
99578
+ let manualEstimateMinutes = null;
99579
+ if (opts.manualEstimateMin !== void 0) {
99580
+ const n = Number.parseInt(opts.manualEstimateMin, 10);
99581
+ if (!Number.isFinite(n) || n < 0) {
99582
+ console.error(import_picocolors46.default.red(`Invalid --manual-estimate-min "${opts.manualEstimateMin}" (expect a non-negative integer).`));
99583
+ return 1;
99584
+ }
99585
+ manualEstimateMinutes = n;
99586
+ }
99587
+ submitFeedback({ investigationId: id, resolved, manualEstimateMinutes, horusSeconds: null, source: "flag" });
99588
+ console.log(import_picocolors46.default.dim(`Feedback recorded (${resolved}) \u2014 thanks, this helps improve Horus.`));
99589
+ return 0;
99590
+ }
99591
+ if (!process.stdin.isTTY) {
99592
+ console.error(
99593
+ import_picocolors46.default.yellow(
99594
+ "horus feedback needs an interactive terminal \u2014 or pass --resolved yes|partly|no for non-interactive (agent) use."
99595
+ )
99596
+ );
99552
99597
  return 1;
99553
99598
  }
99554
99599
  await runFeedbackPrompt(id, null);
@@ -99976,9 +100021,17 @@ Examples:
99976
100021
  horus cloud sync --dry-run # preview what would upload
99977
100022
  horus cloud sync # confirm, then upload
99978
100023
  horus cloud sync --yes # upload without prompting`);
99979
- program2.command("feedback [investigationId]").description("Leave quick impact feedback on an investigation (helps improve Horus)").action(async (investigationId) => {
99980
- process.exitCode = await runFeedback(investigationId);
99981
- });
100024
+ program2.command("feedback [investigationId]").description("Leave quick impact feedback on an investigation (helps improve Horus)").option(
100025
+ "--resolved <verdict>",
100026
+ "did Horus point at the cause? yes | partly | no \u2014 non-interactive, for agents/scripts"
100027
+ ).option(
100028
+ "--manual-estimate-min <minutes>",
100029
+ "estimated minutes this would have taken manually (optional, pair with --resolved)"
100030
+ ).action(
100031
+ async (investigationId, opts) => {
100032
+ process.exitCode = await runFeedback(investigationId, opts);
100033
+ }
100034
+ );
99982
100035
  const telemetry = program2.command("telemetry").description("Manage anonymous usage telemetry that helps improve Horus");
99983
100036
  telemetry.command("status").description("Show the effective telemetry decision, saved preferences, and install ID").action(async () => {
99984
100037
  process.exitCode = await runTelemetryStatus();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merittdev/horus",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Local-first, source-aware production-incident investigation engine",
5
5
  "type": "module",
6
6
  "bin": {