@sechroom/cli 2026.7.11 → 2026.7.12

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.js +30 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2566,6 +2566,9 @@ function registerClose(program2) {
2566
2566
  ).option(
2567
2567
  "--no-status-flip",
2568
2568
  "Skip the status flip on a BARE task. (Managed runs never flip here \u2014 the run engine reflects the verdict onto the task on resume.)"
2569
+ ).option(
2570
+ "--to-version <n>",
2571
+ "Pin the Reference edge at this task version \u2014 the DISPATCHED version the executor worked against (D-continuity-2). Default: the task's current version (status flips are metadata edits that don't bump the version, so current == dispatched in the normal case; pass this when the task's content changed between dispatch and close)."
2569
2572
  ).option("--source <source>", "Source / lane stamp", "cli").addHelpText(
2570
2573
  "after",
2571
2574
  `
@@ -2599,6 +2602,7 @@ Examples:
2599
2602
  );
2600
2603
  const client = await makeClient(cfg);
2601
2604
  let matchTags;
2605
+ let dispatchedVersion;
2602
2606
  if (opts.decomposition) {
2603
2607
  const run = await runApi(
2604
2608
  "Reading run contract",
@@ -2616,6 +2620,8 @@ Examples:
2616
2620
  `run ${opts.decomposition} is awaiting task ${run.awaitingTaskId}, not ${opts.task} \u2014 refusing to mis-key the resume.`
2617
2621
  );
2618
2622
  matchTags = await_.matchTags;
2623
+ if (typeof await_.dispatchedTaskVersion === "number")
2624
+ dispatchedVersion = await_.dispatchedTaskVersion;
2619
2625
  } else {
2620
2626
  matchTags = [`wlp-task:${opts.task}`];
2621
2627
  }
@@ -2642,11 +2648,34 @@ Examples:
2642
2648
  }
2643
2649
  })
2644
2650
  );
2651
+ let toVersion;
2652
+ if (opts.toVersion !== void 0) {
2653
+ toVersion = Number(opts.toVersion);
2654
+ if (!Number.isInteger(toVersion) || toVersion < 1)
2655
+ fail(
2656
+ `--to-version must be an integer >= 1 \u2014 got '${opts.toVersion}'`
2657
+ );
2658
+ } else if (dispatchedVersion !== void 0) {
2659
+ toVersion = dispatchedVersion;
2660
+ } else {
2661
+ const task = await runApi(
2662
+ "Reading task version",
2663
+ async () => client.GET("/memories/{memoryId}", {
2664
+ params: { path: { memoryId: opts.task } }
2665
+ })
2666
+ );
2667
+ const v = task?.item?.currentVersion ?? task?.currentVersion;
2668
+ if (typeof v !== "number" || v < 1)
2669
+ fail(
2670
+ `could not read task ${opts.task} version to pin the Reference edge \u2014 pass --to-version <n>`
2671
+ );
2672
+ toVersion = v;
2673
+ }
2645
2674
  const edge = await runApi(
2646
2675
  "Wiring Reference edge",
2647
2676
  async () => client.POST("/memories/{memoryId}/relationships", {
2648
2677
  params: { path: { memoryId: closeout.id } },
2649
- body: { toMemoryId: opts.task, type: "Reference" }
2678
+ body: { toMemoryId: opts.task, type: "Reference", toVersion }
2650
2679
  })
2651
2680
  );
2652
2681
  let taskStatus;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sechroom/cli",
3
- "version": "2026.7.11",
3
+ "version": "2026.7.12",
4
4
  "description": "Sechroom CLI — a thin, generated client over the Sechroom HTTP API. An agent/human surface alongside MCP.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",