@nk070281sjv/cli 2.3.16 → 2.3.18

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/README.md CHANGED
@@ -83,6 +83,12 @@ as a Ukrainian human-readable copy; translation failure is logged without
83
83
  invalidating the completed English review.
84
84
  If any configured reviewer or pipeline model is missing or any process fails,
85
85
  the round stops instead of continuing with a partial team or fabricated output.
86
+ For normal OpenCode use, run `ocr review run-agents --fresh` without
87
+ `--background`; the command keeps the shell call active, prints progress, and
88
+ returns only when the review is completed or failed.
89
+ If a parent tool regains control while the review is still running, use
90
+ `ocr review wait --session-id <id>` to block until completion instead of
91
+ returning a mid-run summary.
86
92
 
87
93
  ## Commands
88
94
 
@@ -167,6 +173,7 @@ by the dashboard or installed `/ocr-review` command, not typed by hand.
167
173
  ```bash
168
174
  ocr review run-agents --session-id <session-id> --round <n>
169
175
  ocr review run-agents [target] --fresh --requirements <text-or-path> --team <json>
176
+ ocr review wait --session-id <session-id>
170
177
  ```
171
178
 
172
179
  This path owns process spawning and artifact writing. Agents return stdout and
package/dist/index.js CHANGED
@@ -30779,7 +30779,7 @@ ${hint}
30779
30779
  }
30780
30780
 
30781
30781
  // src/lib/version.ts
30782
- var CLI_VERSION = true ? "2.3.16" : createRequire(import.meta.url)("../../package.json").version;
30782
+ var CLI_VERSION = true ? "2.3.18" : createRequire(import.meta.url)("../../package.json").version;
30783
30783
 
30784
30784
  // src/lib/deps.ts
30785
30785
  init_src();
@@ -39038,7 +39038,7 @@ function newSessionId() {
39038
39038
  const date = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
39039
39039
  return `${date}-opencode-process-review-${Date.now()}`;
39040
39040
  }
39041
- var runAgentsSubcommand = new Command("run-agents").description("Run OCR review through OpenCode process agents").argument("[target]", "Target path for fresh dashboard mode", ".").option("--session-id <workflow-session-id>", "Prepared workflow session id").option("--round <n>", "Prepared round number", (value) => Number.parseInt(value, 10)).option("--fresh", "Create a fresh workflow session before running process agents").option("--requirements <text-or-path>", "Inline requirements text or path to a requirements file").option("--team <json>", "JSON ReviewerInstance[] override for this run").option("--foreground", "Run in the current process instead of detaching a background worker").option("--background", "Start the background worker and return; intended for external polling").addOption(new Option("--worker", "Internal detached worker mode").hideHelp()).action(
39041
+ var runAgentsSubcommand = new Command("run-agents").description("Run OCR review through OpenCode process agents").argument("[target]", "Target path for fresh dashboard mode", ".").option("--session-id <workflow-session-id>", "Prepared workflow session id").option("--round <n>", "Prepared round number", (value) => Number.parseInt(value, 10)).option("--fresh", "Create a fresh workflow session before running process agents").option("--requirements <text-or-path>", "Inline requirements text or path to a requirements file").option("--team <json>", "JSON ReviewerInstance[] override for this run").option("--foreground", "Run in the current process instead of detaching a background worker").option("--background", "Detach and return immediately; not for normal OpenCode UI progress").addOption(new Option("--worker", "Internal detached worker mode").hideHelp()).action(
39042
39042
  async (target, options) => {
39043
39043
  const targetDir = process.cwd();
39044
39044
  requireOcrSetup(targetDir);
@@ -39067,7 +39067,7 @@ var runAgentsSubcommand = new Command("run-agents").description("Run OCR review
39067
39067
  throw new Error(
39068
39068
  [
39069
39069
  "run-agents requires either --fresh or --session-id.",
39070
- "Start a new OpenCode process-agent review with: ocr review run-agents --fresh --background",
39070
+ "Start a new OpenCode process-agent review with: ocr review run-agents --fresh",
39071
39071
  "Resume a prepared workflow round with: ocr review run-agents --session-id <id> --round <n>"
39072
39072
  ].join("\n")
39073
39073
  );
@@ -39097,6 +39097,7 @@ var runAgentsSubcommand = new Command("run-agents").description("Run OCR review
39097
39097
  console.log(`Status: ocr review status --session-id ${sessionId}`);
39098
39098
  console.log(`Artifacts: ${sessionDir}`);
39099
39099
  if (options.background) {
39100
+ console.log("Detached mode: this command is returning now. OpenCode UI will not show live progress unless the parent keeps polling status.");
39100
39101
  return;
39101
39102
  }
39102
39103
  console.log("Monitoring background review until it finishes. If OpenCode stops waiting, the background review continues.");
@@ -39183,6 +39184,16 @@ var watchSubcommand = new Command("watch").description("Watch process-agent revi
39183
39184
  renderReviewStatus(session.session_dir, round);
39184
39185
  }, Math.max(1, options.interval) * 1e3);
39185
39186
  });
39187
+ var waitSubcommand = new Command("wait").description("Block until a process-agent review completes or fails").requiredOption("--session-id <workflow-session-id>", "Workflow session id").option("--round <n>", "Round number", (value) => Number.parseInt(value, 10)).action(async (options) => {
39188
+ const targetDir = process.cwd();
39189
+ requireOcrSetup(targetDir);
39190
+ const ocrDir = join28(targetDir, ".ocr");
39191
+ const db = await ensureDatabase(ocrDir);
39192
+ const session = getSession(db, options.sessionId);
39193
+ if (!session) fail3(`Workflow session not found: ${options.sessionId}`);
39194
+ const exitCode = await waitForDetachedRun(session.session_dir, options.round ?? session.current_round);
39195
+ process.exit(exitCode);
39196
+ });
39186
39197
  function spawnDetachedRunAgents(input) {
39187
39198
  const roundDir = join28(input.sessionDir, "rounds", `round-${input.round}`);
39188
39199
  mkdirSync8(join28(roundDir, "process-logs"), { recursive: true });
@@ -39540,6 +39551,7 @@ var reviewCommand = new Command("review").description("Run or resume an OCR revi
39540
39551
  reviewCommand.addCommand(runAgentsSubcommand);
39541
39552
  reviewCommand.addCommand(statusSubcommand2);
39542
39553
  reviewCommand.addCommand(watchSubcommand);
39554
+ reviewCommand.addCommand(waitSubcommand);
39543
39555
 
39544
39556
  // src/commands/update.ts
39545
39557
  import { existsSync as existsSync24 } from "node:fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nk070281sjv/cli",
3
- "version": "2.3.16",
3
+ "version": "2.3.18",
4
4
  "description": "CLI for Open Code Review - Multi-environment setup and progress tracking",
5
5
  "type": "module",
6
6
  "bin": {
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@inquirer/prompts": "^7.2.0",
40
- "@nk070281sjv/agents": "2.3.16",
40
+ "@nk070281sjv/agents": "2.3.18",
41
41
  "chalk": "^5.4.1",
42
42
  "chokidar": "^4.0.3",
43
43
  "commander": "^13.0.0",