@merittdev/horus 0.8.10 → 0.8.11

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 +75 -3
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -65880,7 +65880,7 @@ init_cjs_shims();
65880
65880
 
65881
65881
  // ../../packages/core/src/version.ts
65882
65882
  init_cjs_shims();
65883
- var HORUS_VERSION = true ? "0.8.10" : "dev";
65883
+ var HORUS_VERSION = true ? "0.8.11" : "dev";
65884
65884
  var PINNED_SOURCE_VERSION = "1.5.1";
65885
65885
 
65886
65886
  // ../../packages/core/src/evidence.ts
@@ -108557,6 +108557,14 @@ var CloudClient = class {
108557
108557
  `/v1/projects/${projectId}/knowledge-snapshots/latest`
108558
108558
  );
108559
108559
  }
108560
+ /** Push a `horus what-changed` report to the linked cloud project. */
108561
+ createChangeReport(projectId, body2) {
108562
+ return this.request(
108563
+ "POST",
108564
+ `/v1/projects/${projectId}/changes`,
108565
+ body2
108566
+ );
108567
+ }
108560
108568
  };
108561
108569
 
108562
108570
  // ../../packages/cli/src/lib/cloud/auth-store.ts
@@ -110030,6 +110038,7 @@ async function uploadInvestigationToCloud(client, cfg, report) {
110030
110038
  await client.createAgentRun(projectId, investigation.id, {
110031
110039
  repositoryId: cfg.repository?.id,
110032
110040
  status: "completed",
110041
+ agent: "Horus CLI",
110033
110042
  cliVersion: HORUS_VERSION,
110034
110043
  summary: report.summary,
110035
110044
  idempotencyKey: idempotencyKey(report.id, "run")
@@ -111157,12 +111166,74 @@ async function runWhatChanged(service, opts) {
111157
111166
  console.error(import_picocolors14.default.yellow(`[ai] ${result.warning}`));
111158
111167
  }
111159
111168
  }
111169
+ if (opts.push) {
111170
+ await pushChangeReport(r, opts.repo);
111171
+ }
111160
111172
  return 0;
111161
111173
  } catch (err2) {
111162
111174
  console.error(import_picocolors14.default.red(err2.message));
111163
111175
  return 1;
111164
111176
  }
111165
111177
  }
111178
+ async function pushChangeReport(r, repoCwd) {
111179
+ const session = authedClient();
111180
+ if (!session) {
111181
+ console.error(import_picocolors14.default.yellow("[cloud] not logged in \u2014 run `horus login` to push reports."));
111182
+ return;
111183
+ }
111184
+ const cfg = readCloudConfig(repoRootOrCwd(repoCwd));
111185
+ if (!isCloudActive(cfg)) {
111186
+ console.error(import_picocolors14.default.yellow("[cloud] repo not linked \u2014 run `horus cloud link` to push reports."));
111187
+ return;
111188
+ }
111189
+ const projectId = cfg.project?.id;
111190
+ if (!projectId) return;
111191
+ const symName = (s5) => {
111192
+ if (s5 && typeof s5 === "object") {
111193
+ const o5 = s5;
111194
+ return String(o5.name ?? o5.fqn ?? o5.id ?? o5.symbol ?? "");
111195
+ }
111196
+ return String(s5);
111197
+ };
111198
+ const ci = r.changeImpact;
111199
+ const payload = {
111200
+ summary: r.summary,
111201
+ note: r.note,
111202
+ window: r.window,
111203
+ commitCount: r.commitCount,
111204
+ topCommits: r.topCommits.map((c4) => ({
111205
+ hash: c4.shortSha,
111206
+ message: c4.subject,
111207
+ author: c4.author,
111208
+ files: c4.files.length
111209
+ })),
111210
+ changeImpact: ci ? {
111211
+ added: ci.added.map(symName),
111212
+ modified: ci.modified.map((m5) => symName(m5.after)),
111213
+ removed: ci.removed.map(symName)
111214
+ } : null,
111215
+ contributors: r.contributors,
111216
+ queueTopology: r.queueTopology
111217
+ };
111218
+ try {
111219
+ await session.client.createChangeReport(projectId, {
111220
+ service: r.window.service ?? void 0,
111221
+ since: r.window.since ?? void 0,
111222
+ until: r.window.until ?? void 0,
111223
+ summary: r.summary,
111224
+ commitCount: r.commitCount,
111225
+ contributorCount: r.contributors.length,
111226
+ symbolsAdded: ci?.added.length ?? 0,
111227
+ symbolsModified: ci?.modified.length ?? 0,
111228
+ symbolsRemoved: ci?.removed.length ?? 0,
111229
+ queueTopologyTouched: r.queueTopology.touched,
111230
+ payload
111231
+ });
111232
+ console.error(import_picocolors14.default.dim("[cloud] pushed change report."));
111233
+ } catch (err2) {
111234
+ console.error(import_picocolors14.default.yellow(`[cloud] push failed: ${err2.message}`));
111235
+ }
111236
+ }
111166
111237
 
111167
111238
  // ../../packages/cli/src/commands/architecture.ts
111168
111239
  init_cjs_shims();
@@ -116457,7 +116528,7 @@ Examples:
116457
116528
  );
116458
116529
  program2.command("what-changed [service]").description(
116459
116530
  "Concise, evidence-backed summary of what changed for a service in a time window"
116460
- ).option("-c, --config <path>", "path to horus.config.ts").option("--repo <name>", "repository name from config").option("--since <when>", 'git --since (default "7 days ago")').option("--until <when>", "git --until").option("--json", "output JSON").option("--ai", "append AI interpretation of the changes").option("--ai-model <model>", "override the AI model (default: claude-opus-4-8)").action(
116531
+ ).option("-c, --config <path>", "path to horus.config.ts").option("--repo <name>", "repository name from config").option("--since <when>", 'git --since (default "7 days ago")').option("--until <when>", "git --until").option("--json", "output JSON").option("--ai", "append AI interpretation of the changes").option("--ai-model <model>", "override the AI model (default: claude-opus-4-8)").option("--push", "push the report to the linked Horus Cloud project").action(
116461
116532
  async (service, opts) => {
116462
116533
  process.exitCode = await runWhatChanged(service, {
116463
116534
  config: opts.config,
@@ -116466,7 +116537,8 @@ Examples:
116466
116537
  until: opts.until,
116467
116538
  json: opts.json,
116468
116539
  ai: opts.ai,
116469
- aiModel: opts.aiModel
116540
+ aiModel: opts.aiModel,
116541
+ push: opts.push
116470
116542
  });
116471
116543
  }
116472
116544
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merittdev/horus",
3
- "version": "0.8.10",
3
+ "version": "0.8.11",
4
4
  "description": "Local-first, source-aware production-incident investigation engine",
5
5
  "type": "module",
6
6
  "bin": {