@sechroom/cli 2026.7.27 → 2026.7.28

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 +36 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3568,6 +3568,7 @@ function registerWorkPlan(program2) {
3568
3568
  Examples:
3569
3569
  $ sechroom work-plan create mem_XXXX
3570
3570
  $ sechroom work-plan create-from-tasks mem_XXXX --file plan.json
3571
+ $ sechroom work-plan append wlp_XXXX --file append.json
3571
3572
  $ sechroom work-plan get-plan wlp_XXXX
3572
3573
  $ sechroom work-plan execute wlp_XXXX
3573
3574
  $ sechroom work-plan publish-context-pack wlp_XXXX
@@ -3616,6 +3617,28 @@ Examples:
3616
3617
  cmd.optsWithGlobals().json
3617
3618
  );
3618
3619
  });
3620
+ workPlan.command("append <decompositionId>").description(
3621
+ "Append hand-authored task(s) to a running work plan; they land proposed until ratified (POST /decompositions/{id}/append-tasks)"
3622
+ ).requiredOption(
3623
+ "--file <path>",
3624
+ "JSON file containing { tasks, gates? } (the AppendTasksInput shape); use - for stdin"
3625
+ ).action(async (decompositionId, opts, cmd) => {
3626
+ const raw = opts.file === "-" ? await readStdin2() : await readFile(opts.file, "utf8");
3627
+ const body = parseAppendInput(raw, opts.file);
3628
+ const cfg = resolveConfig(cmd.optsWithGlobals());
3629
+ const data = await runApi("Appending tasks to work plan", async () => {
3630
+ const client = await makeClient(cfg);
3631
+ return client.POST("/decompositions/{id}/append-tasks", {
3632
+ params: { path: { id: decompositionId } },
3633
+ body
3634
+ });
3635
+ });
3636
+ emitAction(
3637
+ `appended ${style.bold(String(data.appendedTaskIds.length))} task(s) to ${style.bold(decompositionId)}`,
3638
+ data,
3639
+ cmd.optsWithGlobals().json
3640
+ );
3641
+ });
3619
3642
  workPlan.command("get-plan <decompositionId>").description(
3620
3643
  "Inspect the compiled plan, including each scheduled step's Unix-millisecond wakeAtMs"
3621
3644
  ).action(async (decompositionId, _opts, cmd) => {
@@ -3701,6 +3724,19 @@ Examples:
3701
3724
  );
3702
3725
  });
3703
3726
  }
3727
+ function parseAppendInput(raw, sourceName = "append input") {
3728
+ let value;
3729
+ try {
3730
+ value = JSON.parse(raw);
3731
+ } catch (error) {
3732
+ throw new Error(
3733
+ `${sourceName} is not valid JSON: ${error instanceof Error ? error.message : String(error)}`
3734
+ );
3735
+ }
3736
+ if (!value || typeof value !== "object" || !Array.isArray(value.tasks))
3737
+ throw new Error(`${sourceName} must contain an object with a tasks array`);
3738
+ return value;
3739
+ }
3704
3740
  function parsePlanInput(raw, sourceName = "plan input") {
3705
3741
  let value;
3706
3742
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sechroom/cli",
3
- "version": "2026.7.27",
3
+ "version": "2026.7.28",
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",