@attalabs/vinaya 0.42.2 → 0.43.0

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 (82) hide show
  1. package/dist/checks/bin/check-evidence-fresh.js +8 -5
  2. package/dist/index.js +20 -17
  3. package/dist/lib/pre-push-cache-test-run.js +3 -1
  4. package/dist/programs/archive.js +3 -1
  5. package/dist/programs/check.js +3 -1
  6. package/dist/programs/commit-msg.js +3 -1
  7. package/dist/programs/dev-review-loop.js +9 -6
  8. package/dist/programs/dispatch.js +3 -1
  9. package/dist/programs/log-emit.js +3 -1
  10. package/dist/programs/log-selftest.js +3 -1
  11. package/dist/programs/log-send.js +3 -1
  12. package/dist/programs/pr-report.js +8 -5
  13. package/dist/programs/pr-snapshot.js +3 -1
  14. package/dist/programs/pr-verify-evidence.js +8 -5
  15. package/dist/programs/pr.js +3 -1
  16. package/dist/programs/review-post.js +3 -1
  17. package/dist/programs/review-status.js +3 -1
  18. package/dist/programs/run-engine.js +110594 -0
  19. package/dist/programs/supervised-command.js +67 -0
  20. package/dist/programs/sync.js +3 -1
  21. package/dist/programs/task-brief.js +5 -3
  22. package/dist/programs/task-sweep.js +3 -1
  23. package/dist/programs/task-tools-serve.js +13 -11
  24. package/dist/programs/tokens.js +3 -1
  25. package/dist/programs/waiver.js +3 -1
  26. package/dist/vinaya-strict/checks/registry.ts +1085 -0
  27. package/dist/vinaya-strict/executing/code-reviewer/README.md +3 -0
  28. package/dist/vinaya-strict/executing/code-reviewer/doctrine.md +185 -0
  29. package/dist/vinaya-strict/executing/code-reviewer/evals/README.md +1 -0
  30. package/dist/vinaya-strict/executing/code-reviewer/evals/code-reviewer-cases.json +280 -0
  31. package/dist/vinaya-strict/executing/code-reviewer/grants.yaml +22 -0
  32. package/dist/vinaya-strict/executing/code-reviewer/output.schema.json +93 -0
  33. package/dist/vinaya-strict/executing/code-reviewer/review-result.ts +347 -0
  34. package/dist/vinaya-strict/executing/dev-review.flow.yaml +103 -0
  35. package/dist/vinaya-strict/executing/developer/README.md +3 -0
  36. package/dist/vinaya-strict/executing/developer/developer-doctrine-shape.test.ts +69 -0
  37. package/dist/vinaya-strict/executing/developer/developer-turn-result.ts +286 -0
  38. package/dist/vinaya-strict/executing/developer/doctrine.md +111 -0
  39. package/dist/vinaya-strict/executing/developer/evals/README.md +1 -0
  40. package/dist/vinaya-strict/executing/developer/evals/developer-capability-cases.json +6275 -0
  41. package/dist/vinaya-strict/executing/developer/evals/developer-capability-held-out.json +11526 -0
  42. package/dist/vinaya-strict/executing/developer/evals/developer-capability-suite.test.ts +498 -0
  43. package/dist/vinaya-strict/executing/developer/evals/developer-capability-suite.ts +1407 -0
  44. package/dist/vinaya-strict/executing/developer/grants.yaml +25 -0
  45. package/dist/vinaya-strict/executing/developer/output.schema.json +148 -0
  46. package/dist/vinaya-strict/executing/developer/reference.md +376 -0
  47. package/dist/vinaya-strict/executing/operator/doctrine.md +209 -0
  48. package/dist/vinaya-strict/executing/security-reviewer/README.md +3 -0
  49. package/dist/vinaya-strict/executing/security-reviewer/doctrine.md +171 -0
  50. package/dist/vinaya-strict/executing/security-reviewer/evals/README.md +1 -0
  51. package/dist/vinaya-strict/executing/security-reviewer/evals/security-reviewer-cases.json +141 -0
  52. package/dist/vinaya-strict/executing/security-reviewer/grants.yaml +22 -0
  53. package/dist/vinaya-strict/executing/security-reviewer/output.schema.json +93 -0
  54. package/dist/vinaya-strict/integration/config/vinaya-config-section.ts +1278 -0
  55. package/dist/vinaya-strict/integration/policies/vinaya-policies.ts +52 -0
  56. package/dist/vinaya-strict/integration/process/process-integration.ts +57 -0
  57. package/dist/vinaya-strict/loops/dev-review/v2/dev-review-v2.flow.yaml +136 -0
  58. package/dist/vinaya-strict/process.yaml +43 -0
  59. package/dist/vinaya-strict/retrospecting/archivist/doctrine.md +174 -0
  60. package/dist/vinaya-strict/retrospecting/tranche-archivist/doctrine.md +270 -0
  61. package/dist/vinaya-strict/thinking/architect/doctrine.md +110 -0
  62. package/dist/vinaya-strict/thinking/planner/doctrine.md +105 -0
  63. package/dist/vinaya-strict/thinking/planner/tools/amend-rationale-deps.test.ts +128 -0
  64. package/dist/vinaya-strict/thinking/planner/tools/amend-rationale-deps.ts +169 -0
  65. package/dist/vinaya-strict/thinking/planner/tools/open-issue.test.ts +701 -0
  66. package/dist/vinaya-strict/thinking/planner/tools/open-issue.ts +1035 -0
  67. package/dist/vinaya-strict/thinking/planner/tools/planner-operations.test.ts +359 -0
  68. package/dist/vinaya-strict/thinking/planner/tools/planner-operations.ts +815 -0
  69. package/dist/vinaya-strict/thinking/planner/tools/planner-tools.test.ts +200 -0
  70. package/dist/vinaya-strict/thinking/planner/tools/planner-tools.ts +458 -0
  71. package/package.json +4 -2
  72. package/studio-standalone/apps/vinaya-studio/.next/BUILD_ID +1 -1
  73. package/studio-standalone/apps/vinaya-studio/.next/build-manifest.json +2 -2
  74. package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.html +1 -1
  75. package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.rsc +1 -1
  76. package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  77. package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  78. package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  79. package/studio-standalone/apps/vinaya-studio/.next/server/middleware-build-manifest.js +1 -1
  80. package/studio-standalone/apps/vinaya-studio/.next/server/pages/500.html +1 -1
  81. /package/studio-standalone/apps/vinaya-studio/.next/static/{Q_xjhiWztjosXWbMSJ0Yp → x2q88XfwsihlevulRhIvs}/_buildManifest.js +0 -0
  82. /package/studio-standalone/apps/vinaya-studio/.next/static/{Q_xjhiWztjosXWbMSJ0Yp → x2q88XfwsihlevulRhIvs}/_ssgManifest.js +0 -0
@@ -8804,11 +8804,12 @@ function lookup(name) {
8804
8804
  throw new Error(`no program named '${name}' — the program table names: ${[...PROGRAMS.keys()].join(", ")}`);
8805
8805
  return found;
8806
8806
  }
8807
- function programFile(name) {
8807
+ function programFile(name, packageRoot = cliPackageRoot(), fromSource = FROM_SOURCE) {
8808
8808
  const entry = lookup(name);
8809
- const built = join13(cliPackageRoot(), entry.built);
8810
- const source = join13(SOURCE_ROOT, entry.source);
8811
- if (FROM_SOURCE && existsSync11(source))
8809
+ return pickFile(join13(packageRoot, entry.built), join13(SOURCE_ROOT, entry.source), fromSource);
8810
+ }
8811
+ function pickFile(built, source, fromSource) {
8812
+ if (fromSource && existsSync11(source))
8812
8813
  return source;
8813
8814
  return existsSync11(built) ? built : source;
8814
8815
  }
@@ -8869,7 +8870,9 @@ var init_programs = __esm(() => {
8869
8870
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
8870
8871
  words("log", "selftest")
8871
8872
  ]),
8872
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
8873
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
8874
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
8875
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
8873
8876
  ]);
8874
8877
  SOURCE_ROOT = join13(dirname10(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
8875
8878
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
package/dist/index.js CHANGED
@@ -18150,7 +18150,7 @@ var init_commands = __esm(() => {
18150
18150
  }
18151
18151
  ],
18152
18152
  details: [
18153
- "The atta-engine runner starts the workspace Engine script with Bun, streams its output and returns its exit code. A published install without the script prints one notice and falls back to standalone. Engine Log events use the local folder only; logs: false disables all Log destinations for both runners.",
18153
+ "The atta-engine runner starts the Engine runner with Bun, so it needs Bun on the machine, streams its output and returns its exit code. The published package carries the Engine runner as a built program and a checkout starts its source file; a command line without the runner file prints one notice and falls back to standalone. Engine Log events use the local folder only; logs: false disables all Log destinations for both runners.",
18154
18154
  "A run's runner is recorded when it starts and never changes: switching `runner` in config changes only the runner of new runs, and a run recorded on `atta-engine` keeps routing to the Engine for `task status`, `task_resume` and `task_cancel`. A start on a pause another runner holds is refused with a typed reason naming the recorded runner and the requested one, and so is a start on another runner's Engine run that is still in flight with no pause held — halted or stopped short of completed or cancelled.",
18155
18155
  "`--rollback` ends the Engine run first: a held pause through the shared cancel `task_cancel` uses, which needs a Principal ruling newer than the pause as any cancel does; a run halted with no pause held has its started effects fenced; a run that already completed or was cancelled is refused, as is a driver still running with no pause held, which is never signalled; and the standalone run never starts while the Engine driver lives, a cancelled run's driver given a bounded wait to release its lock. Every started and uncertain effect is then reconciled by its identity: one the forge carries is recorded verified, one it does not carry is left for the restarted run to complete, and one the forge read cannot settle refuses the restart. Each rehearsal appends a record — task, recorded runner, action, reconciled effect identities, the restarted run's runner and terminal state — to `backend-rollback-rehearsals.jsonl` in the task's runtime directory, whether it completed, was refused or failed at a later step, and nothing removes it.",
18156
18156
  "`--widen-surface` is the Planner's one command for a widen-surface escalation, and refuses before any write when the held pause is not one (no pause, a pause with a pull request — whose continuation is the ruling on that pull request — or a round whose Developer asked for no `widen_surface`), when a driver is still alive for the task, when the escalation's resolution is already consumed (a replay — the Surface is never widened twice), or when the widened body fails the write gate, whose findings name the field to edit first. The escalation packet's permitted next actions name this command with the globs the Developer asked for, and `task_resume` refuses such an escalation naming it.",
@@ -18930,11 +18930,12 @@ function lookup2(name) {
18930
18930
  throw new Error(`no program named '${name}' — the program table names: ${[...PROGRAMS.keys()].join(", ")}`);
18931
18931
  return found;
18932
18932
  }
18933
- function programFile(name) {
18933
+ function programFile(name, packageRoot = cliPackageRoot(), fromSource = FROM_SOURCE) {
18934
18934
  const entry = lookup2(name);
18935
- const built = join23(cliPackageRoot(), entry.built);
18936
- const source = join23(SOURCE_ROOT, entry.source);
18937
- if (FROM_SOURCE && existsSync17(source))
18935
+ return pickFile(join23(packageRoot, entry.built), join23(SOURCE_ROOT, entry.source), fromSource);
18936
+ }
18937
+ function pickFile(built, source, fromSource) {
18938
+ if (fromSource && existsSync17(source))
18938
18939
  return source;
18939
18940
  return existsSync17(built) ? built : source;
18940
18941
  }
@@ -19011,7 +19012,9 @@ var init_programs = __esm(() => {
19011
19012
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
19012
19013
  words("log", "selftest")
19013
19014
  ]),
19014
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
19015
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
19016
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
19017
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
19015
19018
  ]);
19016
19019
  SOURCE_ROOT = join23(dirname15(fileURLToPath3(import.meta.url)), "..", "..", "..", "..");
19017
19020
  FROM_SOURCE = fileURLToPath3(import.meta.url).endsWith(".ts");
@@ -28349,7 +28352,7 @@ var init_config_reference = __esm(() => {
28349
28352
  type: '"standalone" | "atta-engine" (optional)',
28350
28353
  semantics: [
28351
28354
  "Selects the task runner. The default is `standalone`: an absent key runs the standalone loop, so a published install never changes runner on its own. Any value other than `standalone` or `atta-engine` is refused at config load. `task run --runner <name>` overrides this setting for one invocation, so `standalone` stays selectable by this key and by that flag.",
28352
- "atta-engine starts the workspace Engine script as a Bun subprocess with the resolved task, agent and model. When the Engine runner script is absent — a published install carries none — `task run` prints one fallback notice, `vinaya task run: Engine runner script is unavailable; falling back to standalone.`, and runs standalone. The Engine Log reaches the same configured destination the standalone loop uses, a server included.",
28355
+ "atta-engine starts the Engine runner as a Bun subprocess with the resolved task, agent and model, so it needs Bun on the machine. The published package carries the Engine runner as a built program, `dist/programs/run-engine.js`, beside a copy of the process files it loads under `dist/vinaya-strict`; a checkout of this repository starts the runner’s source file. When the Engine runner file is absent, `task run` prints one fallback notice, `vinaya task run: Engine runner script is unavailable; falling back to standalone.`, and runs standalone. The Engine Log reaches the same configured destination the standalone loop uses, a server included.",
28353
28356
  "Each run records the runner it actually used, and status, resume and cancel follow that record rather than this key. A run with no recorded runner, started before runs recorded one, is a standalone run, whatever this key now names."
28354
28357
  ],
28355
28358
  example: `{ "runner": "atta-engine" }`
@@ -33889,7 +33892,7 @@ var init_pause_resume = __esm(async () => {
33889
33892
  // ../../harness/processes/vinaya-strict/loops/dev-review/run-control/task-run-engine.ts
33890
33893
  import { spawn as spawn5 } from "node:child_process";
33891
33894
  import { existsSync as existsSync39, readFileSync as readFileSync44, renameSync as renameSync8, writeFileSync as writeFileSync24 } from "node:fs";
33892
- import { dirname as dirname24, join as join46, resolve as resolve8 } from "node:path";
33895
+ import { dirname as dirname24, join as join46 } from "node:path";
33893
33896
  function taskRunnerRecordPath(task, root = runtimeDirForThisRepo()) {
33894
33897
  return runPath2(root, task, { area: "task", file: "runner.json" });
33895
33898
  }
@@ -33964,7 +33967,7 @@ function engineContinuationCommand(target) {
33964
33967
  return ["bun", ...engineContinuationArgv(target)].join(" ");
33965
33968
  }
33966
33969
  function engineRunnerScriptPath() {
33967
- return resolve8(cliPackageRoot(), "../..", PROCESS_FOLDER_IN_CHECKOUT, "bin/run-engine.ts");
33970
+ return programFile("run-engine");
33968
33971
  }
33969
33972
  async function runTaskEngine(input, overrides = {}, starting = () => {}) {
33970
33973
  const deps = { ...defaultEngineRunnerDeps, ...overrides };
@@ -33989,7 +33992,7 @@ async function runTaskEngine(input, overrides = {}, starting = () => {}) {
33989
33992
  }
33990
33993
  var ENGINE_FALLBACK_NOTICE = "vinaya task run: Engine runner script is unavailable; falling back to standalone.", defaultEngineRunnerDeps, PROCESS_FOLDER_IN_CHECKOUT = "harness/processes/vinaya-strict";
33991
33994
  var init_task_run_engine = __esm(async () => {
33992
- init_package_root();
33995
+ init_programs();
33993
33996
  init_run_paths();
33994
33997
  await init_pause_resume();
33995
33998
  defaultEngineRunnerDeps = {
@@ -35199,7 +35202,7 @@ var init_premise_reassert_logic = __esm(() => {
35199
35202
  });
35200
35203
 
35201
35204
  // ../../harness/processes/vinaya-strict/loops/dev-review/v2/git-read-memo.ts
35202
- import { resolve as resolve9 } from "node:path";
35205
+ import { resolve as resolve8 } from "node:path";
35203
35206
  function gitSubcommand(args) {
35204
35207
  for (let i = 0;i < args.length; i++) {
35205
35208
  const arg = args[i];
@@ -35214,7 +35217,7 @@ function gitSubcommand(args) {
35214
35217
  return;
35215
35218
  }
35216
35219
  function gitReadKey(cwd, args) {
35217
- return [resolve9(cwd ?? process.cwd()), ...args].join("\x00");
35220
+ return [resolve8(cwd ?? process.cwd()), ...args].join("\x00");
35218
35221
  }
35219
35222
  function gitReadMemoServing() {
35220
35223
  return memoEnabled && state.scopes > 0 && state.turns === 0;
@@ -38820,7 +38823,7 @@ import { tmpdir as tmpdir9 } from "node:os";
38820
38823
  import { rmSync as rmSync14 } from "node:fs";
38821
38824
  import { z as z11 } from "zod";
38822
38825
  import { existsSync as existsSync45 } from "node:fs";
38823
- import { resolve as resolve10 } from "node:path";
38826
+ import { resolve as resolve9 } from "node:path";
38824
38827
  import { spawnSync as spawnSync3 } from "node:child_process";
38825
38828
  import { readFileSync as readFileSync50 } from "node:fs";
38826
38829
  function defaultRepoRoot() {
@@ -39101,12 +39104,12 @@ function defaultClassifyAgainstDefaultTip(worktreePath, head, tip, paths, remote
39101
39104
  function rebaseInProgress(worktreePath) {
39102
39105
  return ["rebase-merge", "rebase-apply"].some((name) => {
39103
39106
  const path = gitOk(worktreePath, ["rev-parse", "--git-path", name]);
39104
- return path !== null && existsSync45(resolve10(worktreePath, path));
39107
+ return path !== null && existsSync45(resolve9(worktreePath, path));
39105
39108
  });
39106
39109
  }
39107
39110
  function mergeInProgress2(worktreePath) {
39108
39111
  const path = gitOk(worktreePath, ["rev-parse", "--git-path", "MERGE_HEAD"]);
39109
- return path !== null && existsSync45(resolve10(worktreePath, path));
39112
+ return path !== null && existsSync45(resolve9(worktreePath, path));
39110
39113
  }
39111
39114
  function defaultMergeDefaultTip(worktreePath, tip, remoteUrl) {
39112
39115
  const refuse = (reason, conflictFiles = []) => ({
@@ -41461,7 +41464,7 @@ var init_task_sweep = __esm(async () => {
41461
41464
  });
41462
41465
 
41463
41466
  // ../../harness/processes/vinaya-strict/loops/dev-review/standalone/dev-review-loop/driver-helpers.ts
41464
- import { resolve as resolve11 } from "node:path";
41467
+ import { resolve as resolve10 } from "node:path";
41465
41468
  import { join as join54 } from "node:path";
41466
41469
  import { readFileSync as readFileSync54 } from "node:fs";
41467
41470
  import { existsSync as existsSync48 } from "node:fs";
@@ -41547,7 +41550,7 @@ async function setStandaloneLogIdentity(env = process.env, cliRoot = packageRoot
41547
41550
  }
41548
41551
  env.VINAYA_RUNNER_ID = "standalone";
41549
41552
  env.VINAYA_RUNNER_VERSION = pkg.version;
41550
- const checkout = resolve11(cliRoot, "../..");
41553
+ const checkout = resolve10(cliRoot, "../..");
41551
41554
  const loaderPath = join54(checkout, "harness", "kernel", "dev-process-socket", "loader", "load-process.ts");
41552
41555
  const processFolder = join54(checkout, PROCESS_FOLDER_IN_CHECKOUT);
41553
41556
  if (!existsSync48(join54(checkout, ".git")) || !existsSync48(loaderPath) || !existsSync48(processFolder))
@@ -6411,7 +6411,9 @@ var PROGRAMS = new Map([
6411
6411
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
6412
6412
  words("log", "selftest")
6413
6413
  ]),
6414
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
6414
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
6415
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
6416
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
6415
6417
  ]);
6416
6418
  var SOURCE_ROOT = join10(dirname9(fileURLToPath3(import.meta.url)), "..", "..", "..", "..");
6417
6419
  var FROM_SOURCE = fileURLToPath3(import.meta.url).endsWith(".ts");
@@ -7542,7 +7542,9 @@ var init_programs = __esm(() => {
7542
7542
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
7543
7543
  words("log", "selftest")
7544
7544
  ]),
7545
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
7545
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
7546
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
7547
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
7546
7548
  ]);
7547
7549
  SOURCE_ROOT = join12(dirname9(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
7548
7550
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
@@ -6976,7 +6976,9 @@ var init_programs = __esm(() => {
6976
6976
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
6977
6977
  words("log", "selftest")
6978
6978
  ]),
6979
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
6979
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
6980
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
6981
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
6980
6982
  ]);
6981
6983
  SOURCE_ROOT = join17(dirname13(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
6982
6984
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
@@ -6856,7 +6856,9 @@ var init_programs = __esm(() => {
6856
6856
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
6857
6857
  words("log", "selftest")
6858
6858
  ]),
6859
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
6859
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
6860
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
6861
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
6860
6862
  ]);
6861
6863
  SOURCE_ROOT = join12(dirname9(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
6862
6864
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
@@ -15538,11 +15538,12 @@ function lookup2(name) {
15538
15538
  throw new Error(`no program named '${name}' — the program table names: ${[...PROGRAMS.keys()].join(", ")}`);
15539
15539
  return found;
15540
15540
  }
15541
- function programFile(name) {
15541
+ function programFile(name, packageRoot = cliPackageRoot(), fromSource = FROM_SOURCE) {
15542
15542
  const entry = lookup2(name);
15543
- const built = join23(cliPackageRoot(), entry.built);
15544
- const source = join23(SOURCE_ROOT, entry.source);
15545
- if (FROM_SOURCE && existsSync19(source))
15543
+ return pickFile(join23(packageRoot, entry.built), join23(SOURCE_ROOT, entry.source), fromSource);
15544
+ }
15545
+ function pickFile(built, source, fromSource) {
15546
+ if (fromSource && existsSync19(source))
15546
15547
  return source;
15547
15548
  return existsSync19(built) ? built : source;
15548
15549
  }
@@ -15616,7 +15617,9 @@ var init_programs = __esm(() => {
15616
15617
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
15617
15618
  words("log", "selftest")
15618
15619
  ]),
15619
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
15620
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
15621
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
15622
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
15620
15623
  ]);
15621
15624
  SOURCE_ROOT = join23(dirname15(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
15622
15625
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
@@ -28469,7 +28472,7 @@ import { readFileSync as readFileSync37 } from "node:fs";
28469
28472
 
28470
28473
  // ../../harness/processes/vinaya-strict/loops/dev-review/run-control/task-run-engine.ts
28471
28474
  import { existsSync as existsSync34, readFileSync as readFileSync36, renameSync as renameSync9, writeFileSync as writeFileSync19 } from "node:fs";
28472
- init_package_root();
28475
+ init_programs();
28473
28476
  init_run_paths();
28474
28477
  function taskRunnerRecordPath(task, root = runtimeDirForThisRepo()) {
28475
28478
  return runPath(root, task, { area: "task", file: "runner.json" });
@@ -11558,7 +11558,9 @@ var init_programs = __esm(() => {
11558
11558
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
11559
11559
  words("log", "selftest")
11560
11560
  ]),
11561
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
11561
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
11562
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
11563
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
11562
11564
  ]);
11563
11565
  SOURCE_ROOT = join17(dirname12(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
11564
11566
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
@@ -6893,7 +6893,9 @@ var init_programs = __esm(() => {
6893
6893
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
6894
6894
  words("log", "selftest")
6895
6895
  ]),
6896
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
6896
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
6897
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
6898
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
6897
6899
  ]);
6898
6900
  SOURCE_ROOT = join12(dirname9(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
6899
6901
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
@@ -6875,7 +6875,9 @@ var init_programs = __esm(() => {
6875
6875
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
6876
6876
  words("log", "selftest")
6877
6877
  ]),
6878
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
6878
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
6879
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
6880
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
6879
6881
  ]);
6880
6882
  SOURCE_ROOT = join12(dirname9(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
6881
6883
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
@@ -6859,7 +6859,9 @@ var init_programs = __esm(() => {
6859
6859
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
6860
6860
  words("log", "selftest")
6861
6861
  ]),
6862
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
6862
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
6863
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
6864
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
6863
6865
  ]);
6864
6866
  SOURCE_ROOT = join12(dirname9(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
6865
6867
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
@@ -6379,11 +6379,12 @@ function lookup(name) {
6379
6379
  throw new Error(`no program named '${name}' — the program table names: ${[...PROGRAMS.keys()].join(", ")}`);
6380
6380
  return found;
6381
6381
  }
6382
- function programFile(name) {
6382
+ function programFile(name, packageRoot = cliPackageRoot(), fromSource = FROM_SOURCE) {
6383
6383
  const entry = lookup(name);
6384
- const built = join12(cliPackageRoot(), entry.built);
6385
- const source = join12(SOURCE_ROOT, entry.source);
6386
- if (FROM_SOURCE && existsSync10(source))
6384
+ return pickFile(join12(packageRoot, entry.built), join12(SOURCE_ROOT, entry.source), fromSource);
6385
+ }
6386
+ function pickFile(built, source, fromSource) {
6387
+ if (fromSource && existsSync10(source))
6387
6388
  return source;
6388
6389
  return existsSync10(built) ? built : source;
6389
6390
  }
@@ -6444,7 +6445,9 @@ var init_programs = __esm(() => {
6444
6445
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
6445
6446
  words("log", "selftest")
6446
6447
  ]),
6447
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
6448
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
6449
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
6450
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
6448
6451
  ]);
6449
6452
  SOURCE_ROOT = join12(dirname10(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
6450
6453
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
@@ -7014,7 +7014,9 @@ var init_programs = __esm(() => {
7014
7014
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
7015
7015
  words("log", "selftest")
7016
7016
  ]),
7017
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
7017
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
7018
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
7019
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
7018
7020
  ]);
7019
7021
  SOURCE_ROOT = join13(dirname9(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
7020
7022
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
@@ -6379,11 +6379,12 @@ function lookup(name) {
6379
6379
  throw new Error(`no program named '${name}' — the program table names: ${[...PROGRAMS.keys()].join(", ")}`);
6380
6380
  return found;
6381
6381
  }
6382
- function programFile(name) {
6382
+ function programFile(name, packageRoot = cliPackageRoot(), fromSource = FROM_SOURCE) {
6383
6383
  const entry = lookup(name);
6384
- const built = join12(cliPackageRoot(), entry.built);
6385
- const source = join12(SOURCE_ROOT, entry.source);
6386
- if (FROM_SOURCE && existsSync10(source))
6384
+ return pickFile(join12(packageRoot, entry.built), join12(SOURCE_ROOT, entry.source), fromSource);
6385
+ }
6386
+ function pickFile(built, source, fromSource) {
6387
+ if (fromSource && existsSync10(source))
6387
6388
  return source;
6388
6389
  return existsSync10(built) ? built : source;
6389
6390
  }
@@ -6444,7 +6445,9 @@ var init_programs = __esm(() => {
6444
6445
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
6445
6446
  words("log", "selftest")
6446
6447
  ]),
6447
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
6448
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
6449
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
6450
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
6448
6451
  ]);
6449
6452
  SOURCE_ROOT = join12(dirname10(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
6450
6453
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
@@ -7791,7 +7791,9 @@ var init_programs = __esm(() => {
7791
7791
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
7792
7792
  words("log", "selftest")
7793
7793
  ]),
7794
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
7794
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
7795
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
7796
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
7795
7797
  ]);
7796
7798
  SOURCE_ROOT = join16(dirname10(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
7797
7799
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
@@ -7621,7 +7621,9 @@ var init_programs = __esm(() => {
7621
7621
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
7622
7622
  words("log", "selftest")
7623
7623
  ]),
7624
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
7624
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
7625
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
7626
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
7625
7627
  ]);
7626
7628
  SOURCE_ROOT = join16(dirname10(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
7627
7629
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
@@ -7029,7 +7029,9 @@ var init_programs = __esm(() => {
7029
7029
  program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
7030
7030
  words("log", "selftest")
7031
7031
  ]),
7032
- program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
7032
+ program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
7033
+ program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
7034
+ program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
7033
7035
  ]);
7034
7036
  SOURCE_ROOT = join13(dirname10(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
7035
7037
  FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");