orkestrator 2.38.2-beta → 2.39.0-beta
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 +11 -6
- package/bin/orkestrator-launcher.js +21 -1
- package/dist/client.js +102 -21
- package/dist/main.js +64062 -60968
- package/package.json +3 -3
- package/resources/acp-bridge/dist/index.js +77 -11
- package/resources/claude-bridge/dist/index.js +326 -45
- package/resources/codex-bridge/dist/index.js +238 -26
- package/resources/cursor-bridge/dist/index.js +71 -10
- package/resources/cursor-bridge/runtime/install.json +1 -1
- package/resources/pi-bridge/dist/index.js +319 -21
- package/resources/pi-bridge/runtime/install.json +1 -1
package/README.md
CHANGED
|
@@ -208,17 +208,22 @@ derives that list from the built artifacts, so adding a dependency the bundles d
|
|
|
208
208
|
not resolve — or bumping one in `apps/backend` or `bridges/` without mirroring it
|
|
209
209
|
here — fails the suite.
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
Releases publish this package through the "Publish npm package" GitHub
|
|
212
|
+
workflow, which `mise run release:publish` starts (see
|
|
213
|
+
[releasing.md](../../docs/development/releasing.md#publishing-the-npm-package-from-github)).
|
|
214
|
+
From a workstation, as the fallback:
|
|
212
215
|
|
|
213
216
|
```bash
|
|
214
217
|
mise run publish:cli
|
|
215
218
|
```
|
|
216
219
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
Either way, a smoke test runs first: `smoke:cli` locally, and in the workflow
|
|
221
|
+
`smoke-packed.ts --tarball` on the tarball it is about to publish. It packs the
|
|
222
|
+
tarball (unless given one), installs it into a scratch project, checks the
|
|
223
|
+
unbundled dependencies resolve from the installed layout, runs client
|
|
224
|
+
help/version/errors with no backend, starts the backend, drives a fixture
|
|
225
|
+
project/environment lifecycle through the installed client, confirms only one
|
|
226
|
+
backend ran, and stops it. It needs network access, which is why it is
|
|
222
227
|
a publish gate rather than part of `mise run test`.
|
|
223
228
|
|
|
224
229
|
The npm dist-tag follows the version's update channel: `2.23.0` publishes as
|
|
@@ -36,6 +36,7 @@ import path from "node:path";
|
|
|
36
36
|
|
|
37
37
|
const MAX_BOOT_ATTEMPTS = 2;
|
|
38
38
|
const READY_TIMEOUT_MS = Number(process.env.ORKESTRATOR_LAUNCHER_READY_TIMEOUT_MS ?? 120_000);
|
|
39
|
+
const READY_POLL_MS = shorterInterval("ORKESTRATOR_LAUNCHER_READY_POLL_MS", 500);
|
|
39
40
|
const RETRY_DELAY_MS = Number(process.env.ORKESTRATOR_LAUNCHER_RETRY_DELAY_MS ?? 2_000);
|
|
40
41
|
const CRASH_DELAY_MS = Number(process.env.ORKESTRATOR_LAUNCHER_CRASH_DELAY_MS ?? 5_000);
|
|
41
42
|
const STOP_TIMEOUT_MS = Number(process.env.ORKESTRATOR_LAUNCHER_STOP_TIMEOUT_MS ?? 10_000);
|
|
@@ -60,6 +61,25 @@ function log(message) {
|
|
|
60
61
|
console.error(`[launcher] ${new Date().toISOString()} ${message}`);
|
|
61
62
|
}
|
|
62
63
|
|
|
64
|
+
/**
|
|
65
|
+
* A test-only override that can only shorten `fallback`: a positive integer
|
|
66
|
+
* no larger than it. Anything else (empty, not a number, zero, negative,
|
|
67
|
+
* fractional or longer) keeps `fallback` and says so, rather than letting a
|
|
68
|
+
* typo poll every millisecond or stretch the cadence.
|
|
69
|
+
*/
|
|
70
|
+
function shorterInterval(name, fallback) {
|
|
71
|
+
const raw = process.env[name];
|
|
72
|
+
if (raw === undefined) return fallback;
|
|
73
|
+
const value = Number(raw);
|
|
74
|
+
if (raw.trim() !== "" && Number.isSafeInteger(value) && value > 0 && value <= fallback) {
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
log(
|
|
78
|
+
`ignoring ${name}=${JSON.stringify(raw.slice(0, 32))}: it must be a positive integer of at most ${fallback}; using ${fallback} ms`,
|
|
79
|
+
);
|
|
80
|
+
return fallback;
|
|
81
|
+
}
|
|
82
|
+
|
|
63
83
|
function readJson(file) {
|
|
64
84
|
try {
|
|
65
85
|
return JSON.parse(readFileSync(file, "utf8"));
|
|
@@ -146,7 +166,7 @@ async function waitForReady(pid, version, exited) {
|
|
|
146
166
|
while (Date.now() < deadline && !exited()) {
|
|
147
167
|
const instance = readJson(layout.instance);
|
|
148
168
|
if (instance && instance.pid === pid && instance.appVersion === version) return true;
|
|
149
|
-
await sleep(
|
|
169
|
+
await sleep(READY_POLL_MS);
|
|
150
170
|
}
|
|
151
171
|
return false;
|
|
152
172
|
}
|
package/dist/client.js
CHANGED
|
@@ -263,13 +263,27 @@ var init_bridge = __esm(() => {
|
|
|
263
263
|
"plugins.read-failed": "Listing plugins failed; the route answered 500.",
|
|
264
264
|
"prompt.accepted": "The route accepted a prompt and answered 202.",
|
|
265
265
|
"prompt.failed": "A prompt turn failed; the session reports the error.",
|
|
266
|
-
"prompt.processing-
|
|
266
|
+
"prompt.processing-provider-refused": "A prompt accepted by the route ended on a provider refusal; the turn already logged prompt.provider-refused.",
|
|
267
|
+
"prompt.processing-failed": "A prompt accepted by the route failed while processing, before the turn could report it.",
|
|
268
|
+
"prompt.processing-reported": "A prompt accepted by the route failed; the turn already logged prompt.failed.",
|
|
267
269
|
"prompt.processing-usage-limited": "A prompt accepted by the route ended on a usage limit; the turn already logged prompt.usage-limited.",
|
|
270
|
+
"prompt.provider-refused": "A prompt turn ended because Claude refused it on the account's or the service's state; `reason` is the SDK's API error code and the session reports the error.",
|
|
268
271
|
"prompt.received": "A prompt reached the bridge; only its length is logged.",
|
|
269
272
|
"prompt.send-failed": "A prompt request failed; the route answered with an error.",
|
|
270
273
|
"prompt.usage-limited": "A prompt turn ended because the account's plan allowance is used up; the session reports the limit.",
|
|
271
274
|
"query.close-failed": "Stopping the Claude query failed while closing a tab; the close stays pending.",
|
|
272
|
-
"query.failed":
|
|
275
|
+
"query.failed": {
|
|
276
|
+
description: "A Claude query ended with an error result the bridge does not know to be the account's or the service's state: `subtype` and `isError` from the result, `reason` the SDK's API error code when the turn ended on one, `apiStatus` its HTTP status, `startupFailure` whether the CLI failed to start.",
|
|
277
|
+
essential: true,
|
|
278
|
+
fields: {
|
|
279
|
+
subtype: "label",
|
|
280
|
+
isError: "boolean",
|
|
281
|
+
reason: "label",
|
|
282
|
+
apiStatus: "number",
|
|
283
|
+
startupFailure: "boolean"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"query.provider-refused": "Claude refused a query on the account's or the service's state (a refused login, an account on hold, an overloaded or failing API); `reason` is the SDK's API error code and the turn reports the provider's words.",
|
|
273
287
|
"query.usage-limited": "Claude refused a query because the account's plan allowance is used up; the turn reports the limit.",
|
|
274
288
|
"question.answer-failed": "The answer-question route failed.",
|
|
275
289
|
"question.answering": "Answering a parked question.",
|
|
@@ -416,6 +430,7 @@ var init_bridge = __esm(() => {
|
|
|
416
430
|
"http.route-failed": "An HTTP route failed unexpectedly; its error is not logged because it can hold content.",
|
|
417
431
|
"session.policy-widening-refused": "A request tried to widen a live session's execution policy and was refused; widened names the axes.",
|
|
418
432
|
"session-list.failed": "Reading the resumable sessions failed, so none were offered; its error message is not logged because it can hold content.",
|
|
433
|
+
"session-list.read-by-pi": "A session file was in a format the header reader does not recognise, so the resumable sessions were read through Pi's own full listing; reason names the part not recognised.",
|
|
419
434
|
"state.over-budget": "The state file stayed over budget after shedding transcripts, so the write was skipped.",
|
|
420
435
|
"state.transcripts-shed": "The state file was over budget, so some sessions were saved without their transcript.",
|
|
421
436
|
"session.resume-fell-back": {
|
|
@@ -549,6 +564,7 @@ var init_desktop = __esm(() => {
|
|
|
549
564
|
"open-failed": "A dialog could not open; it was answered as cancelled.",
|
|
550
565
|
opening: "A native dialog is opening.",
|
|
551
566
|
"preview-beforeunload-ignored": "A browser preview's beforeunload handler was ignored.",
|
|
567
|
+
"quitting-cancelled": "A dialog with no open window to attach to was cancelled because the app is quitting.",
|
|
552
568
|
"renderer-beforeunload-cancelled": "A renderer's beforeunload handler cancelled an unload."
|
|
553
569
|
}
|
|
554
570
|
},
|
|
@@ -603,6 +619,7 @@ var init_environment = __esm(() => {
|
|
|
603
619
|
events: {
|
|
604
620
|
"cleanup.sessions-failed": "Session metadata cleanup failed during environment deletion; deletion continues.",
|
|
605
621
|
"cleanup.branch-kept": "A deleted environment's local branch was kept, as it may hold unmerged work.",
|
|
622
|
+
"project-seed.refused": "A project file the Environment Files setting matched was not copied into a new local worktree: a link, not a regular file, outside the project, too large, behind a link in the worktree, or over the match bounds. Path and reason only, never contents.",
|
|
606
623
|
"rename.failed": "Naming an environment from its pending prompt failed for the first time.",
|
|
607
624
|
"rename.still-failing": "That rename is still failing; written at the 2nd, 4th, 8th... failure.",
|
|
608
625
|
"rename.recovered": "A rename from a pending prompt succeeded after failing.",
|
|
@@ -752,8 +769,9 @@ var init_local_server = __esm(() => {
|
|
|
752
769
|
"reaper.tmux-reaped": "Orphaned claude-tmux sessions of a deleted environment were killed.",
|
|
753
770
|
"reaper.runtime-root-remove-failed": "A claude-tmux runtime root could not be removed; it stays for a retry.",
|
|
754
771
|
"reaper.server-unidentified": "An orphan candidate could not be identified, so its record is kept.",
|
|
772
|
+
"reaper.server-parent-unidentified": "An orphan candidate's live parent could not be read, so it is unknown whether a subreaper adopted it; its record is kept.",
|
|
755
773
|
"reaper.server-refused": "An orphan candidate leads no process group, so it was not reaped.",
|
|
756
|
-
"reaper.server-reaping": "An orphaned server is being stopped.",
|
|
774
|
+
"reaper.server-reaping": "An orphaned server is being stopped; `adoptedBySubreaper` says a Linux subreaper, not PID 1, had adopted it.",
|
|
757
775
|
"reaper.server-kill-failed": "An orphaned server did not exit.",
|
|
758
776
|
...THROTTLE_LOG_EVENTS
|
|
759
777
|
}
|
|
@@ -870,7 +888,6 @@ var init_native_agent = __esm(() => {
|
|
|
870
888
|
"job.pr-refresh-rollback-failed": "Rolling back a pull request refresh for a job failed.",
|
|
871
889
|
"job.resend-queue-failed": "A resend could not be queued for a job.",
|
|
872
890
|
"interaction.requests-dropped": "Interaction requests that could not be mapped were dropped.",
|
|
873
|
-
"interaction.observe-failed": "Observing a session's interactions failed. Error class only.",
|
|
874
891
|
"human-prompt.listener-failed": "A human prompt listener threw; the others still run.",
|
|
875
892
|
"question.attention-record-failed": "Attention for an async question could not be recorded; the transcript stays readable.",
|
|
876
893
|
"activity.reconcile-failed": "Reconciling an environment's activity failed. Error class only.",
|
|
@@ -898,6 +915,7 @@ var init_native_agent = __esm(() => {
|
|
|
898
915
|
"title.strategy-failed": "A session title strategy failed, so the next is tried. Content-free: the error can quote the prompt.",
|
|
899
916
|
"steer.qualification-failed": "A bridge's steer qualification failed or answered non-OK, so steering is not offered. Agent and status code or error class only.",
|
|
900
917
|
"steer.capability-cleared": "A projection cleared `actions.steer` because its bridge did not qualify. Identifiers and turn status only.",
|
|
918
|
+
"queue.turn-not-running": "A projection holds queued prompts while its turn is not `running`; once per change of phase. Identifiers, phase and queue length only.",
|
|
901
919
|
...THROTTLE_LOG_EVENTS
|
|
902
920
|
}
|
|
903
921
|
},
|
|
@@ -944,6 +962,7 @@ var init_native_agent = __esm(() => {
|
|
|
944
962
|
"events.dropped": "The 2.x event stream ended or failed, so reads go to the server until it reconnects. Error class only.",
|
|
945
963
|
"monitor.silent": "The 2.x event stream sent a heartbeat and then went quiet, so it is replaced. `silenceMs` only.",
|
|
946
964
|
"steer.unconfirmed": "A 2.x steer got no definite answer, so its delivery is reconciled from history. Error class only.",
|
|
965
|
+
"steer.withdraw-failed": "A stop could not withdraw the user's steer still in a 2.x inbox, so it stays for the next run (to-do 8100 (retired)). Error class only.",
|
|
947
966
|
"provider.dispose-failed": "Disposing the 2.x provider of a replaced server failed. Error class only.",
|
|
948
967
|
"location.reload-unconfirmed": "After a 2.x location reload, the read that waits for the rebuilt location failed; catalogues are re-read anyway. Error class only.",
|
|
949
968
|
"credential.legacy-reconciled": "A host 2.x database from before OpenCode 1.x was retired was reconciled with auth.json once. Counts of credentials written and removed only.",
|
|
@@ -1348,6 +1367,8 @@ var init_storage = __esm(() => {
|
|
|
1348
1367
|
"listener.attention-failed": "An environment attention listener threw; the committed mutation stands.",
|
|
1349
1368
|
"listener.change-failed": "A resource change listener threw; the committed mutation stands.",
|
|
1350
1369
|
"kanban.image-cleanup-failed": "An orphaned Kanban image could not be removed after its retries; it is safe to remove later.",
|
|
1370
|
+
"kanban.removal-image-cleanup-pending": "A removed project's ticket image files could not all be unlinked; they stay journaled and the removal fails so a retry finishes them.",
|
|
1371
|
+
"kanban.delivery-sidecar-cleanup-failed": "A removed project's deleted-ticket delivery sidecars could not all be removed; the removal fails so a retry finishes them.",
|
|
1351
1372
|
"nodes.entries-dropped": "Unreadable node registry entries were ignored.",
|
|
1352
1373
|
"preview-identity.reminted": "The data directory moved or was copied, so previews get a new backend identity.",
|
|
1353
1374
|
"preview-settings.invalid": "Invalid preview settings disabled transport and relay.",
|
|
@@ -1404,6 +1425,7 @@ var init_build_pipeline = __esm(() => {
|
|
|
1404
1425
|
"sidebar.reconcile-failed": "Sidebar activity for pipelines could not be reconciled.",
|
|
1405
1426
|
"sidebar.update-failed": "The sidebar could not be updated for one pipeline.",
|
|
1406
1427
|
"result.consume-deferred": "Consuming a stage's workflow result failed; it stays staged and is retried.",
|
|
1428
|
+
"review.prompt-reads": "A review fan-out pass built or tried to build reviewer prompts; how many it built, and how often building them read the review instruction and project notes, failed reads included. Counts only.",
|
|
1407
1429
|
"consolidation.consume-deferred": "Consuming a review consolidation result failed; it stays pending and is retried.",
|
|
1408
1430
|
"dispatch.prepare-failed": "Attaching the agent before dispatch failed; the prompt request does the same work and answers authoritatively.",
|
|
1409
1431
|
"interaction.resolved": "A human interaction on a pipeline stage resolved. Metadata only.",
|
|
@@ -1460,6 +1482,8 @@ var init_change_tracking = __esm(() => {
|
|
|
1460
1482
|
"retention.failed": "A retention pass failed partway; what it deleted stands and the next pass goes on.",
|
|
1461
1483
|
"projection.failed": "Projecting a change event onto its environment failed.",
|
|
1462
1484
|
"startup.reconcile-failed": "Reconciling change tracking at startup failed.",
|
|
1485
|
+
"deleted-environments.purge-requested": "The startup reconcile found ledger rows of environments the environment store no longer holds and requested their purge.",
|
|
1486
|
+
"deleted-environments.reconcile-failed": "The startup reconcile of deleted environments could not read the environment store, so it requested no purge.",
|
|
1463
1487
|
"turn-start.capture-failed": "Capturing a turn's start failed, so the turn is untracked.",
|
|
1464
1488
|
"dispatch.record-failed": "Recording a turn's dispatch outcome failed.",
|
|
1465
1489
|
"turn.finalize-failed": "Finalizing a turn failed.",
|
|
@@ -1475,6 +1499,7 @@ var init_change_tracking = __esm(() => {
|
|
|
1475
1499
|
events: {
|
|
1476
1500
|
"baseline.update-failed": "An environment's diff baseline could not be updated.",
|
|
1477
1501
|
"scan.watcher-failed": "An environment's diff watcher failed; its scans fall back to polling.",
|
|
1502
|
+
"scan.watcher-missed-change": "A safety scan found a change an environment's local diff watcher never reported (macOS: often an fseventsd that has stopped delivering), so its scans poll until the watcher delivers events again.",
|
|
1478
1503
|
"scan.failed": "A diff scan failed; the last results stay, marked stale, and the scan is retried.",
|
|
1479
1504
|
"scan.target-missing": "A local environment's worktree folder is missing (deleted, moved or on an unmounted drive); no scan runs, the last results stay, marked stale, and the folder is checked again on the failure backoff.",
|
|
1480
1505
|
"scan.freshness-read-failed": "Reading whether an environment's remote is fresh failed.",
|
|
@@ -1682,7 +1707,7 @@ var init_docker = __esm(() => {
|
|
|
1682
1707
|
"git-mirror.orphans-removed": "Git mirrors of removed projects were removed.",
|
|
1683
1708
|
"git-mirror.clone-used": "A new environment cloned from its project's Git mirror.",
|
|
1684
1709
|
"git-mirror.clone-fallback": "A new environment could not clone from its project's Git mirror and cloned from the remote.",
|
|
1685
|
-
"project-seed.refused": "A project .env
|
|
1710
|
+
"project-seed.refused": "A project file the Environment Files setting matched (by default .env and .env.local), or opencode.json, was not copied into a new container: a link, not a regular file, outside the project, too large, unreadable, an unusable pattern or over the match bounds. Path and reason only, never contents.",
|
|
1686
1711
|
"opencode.warm-incomplete": "OpenCode did not finish loading /workspace in a container.",
|
|
1687
1712
|
"opencode.listener-replaced": "The process on a container's OpenCode port (`provider`: `opencode` or `opencode2`) is not the server the backend launched and recorded, so its password was withheld and the next start replaces it. `stage` is `request` when the re-check after a refused connection or an unexpected answer found it; that connection then sends nothing more.",
|
|
1688
1713
|
"opencode.project-config-too-large": "A checkout's opencode.json or opencode.jsonc was larger than the limit, so a launched OpenCode server does not read it. File name only.",
|
|
@@ -1702,7 +1727,9 @@ var init_docker = __esm(() => {
|
|
|
1702
1727
|
"replacement.copy-helper-remove-failed": "An abandoned rebuild copy step's helper container (`helper`, its name) could not be removed, so the step failed rather than settle while the helper may still mount the new storage.",
|
|
1703
1728
|
"replacement.clear-terminals-failed": "Terminal sessions could not be cleared after a container replacement.",
|
|
1704
1729
|
"recovery.clear-terminals-failed": "Terminal sessions could not be cleared after a recovery restore.",
|
|
1705
|
-
"github-ranges.seed-not-copied": "The GitHub ranges seed could not be copied into a container, so its firewall fetches them.",
|
|
1730
|
+
"github-ranges.seed-not-copied": "The GitHub ranges seed could not be copied into a container created before the seed directory was bound, so its firewall fetches them.",
|
|
1731
|
+
"github-ranges.seed-copied-before-boot": "A container created before the GitHub ranges seed directory was bound was given a fresh copy of the seed before it booted.",
|
|
1732
|
+
"github-ranges.seed-directory-unavailable": "The GitHub ranges seed directory could not be created, so a new restricted container is created without it and its firewall fetches the ranges itself.",
|
|
1706
1733
|
"availability.probe-failed": "Docker is not available; written when the diagnostic changes. Fixed-shape metadata only: messages can hold daemon endpoints.",
|
|
1707
1734
|
"start.port-collision-retrying": "An automatic host port collided on start, so it is retried: with fresh ports (up to ten times), or, when `backendChosen`, on the same backend-chosen port after a pause (up to three times).",
|
|
1708
1735
|
"copy-in.snapshot-busy-retrying": "Docker could not mount a created or stopped container's filesystem to copy files into it (device or resource busy), so the copy is retried after a pause.",
|
|
@@ -1720,9 +1747,15 @@ var init_docker = __esm(() => {
|
|
|
1720
1747
|
essential: true,
|
|
1721
1748
|
fields: { staleForMs: "number" }
|
|
1722
1749
|
},
|
|
1723
|
-
"writer-lease.listener-failed": "The callback told about a lost registry writer lease threw, so the schedules settings learn of the
|
|
1750
|
+
"writer-lease.listener-failed": "The callback told about a lost, or a late-won, registry writer lease threw, so the schedules settings learn of the change only at their next read.",
|
|
1751
|
+
"writer-lease.acquired-late": {
|
|
1752
|
+
description: "A backend that started without the registry writer lease won it later, because its holder stopped refreshing it (most often a crash just before this backend started). Schedules fire and container changes are allowed from now on; the `writer-lease.regained` line before it gives the stale lease's age.",
|
|
1753
|
+
essential: true,
|
|
1754
|
+
fields: {}
|
|
1755
|
+
},
|
|
1756
|
+
"writer-lease.retry-failed": "A backend without the registry writer lease could not try for it again for a reason other than the lease being held (an unreadable data directory, say). It tries again on its next tick.",
|
|
1724
1757
|
"writer-lease.not-acquired": {
|
|
1725
|
-
description: "This backend started without the registry writer lease, for the fixed `reason` given. A second backend on one data directory is normal: it serves reads, runs no schedules and refuses container changes.",
|
|
1758
|
+
description: "This backend started without the registry writer lease, for the fixed `reason` given. A second backend on one data directory is normal: it serves reads, runs no schedules and refuses container changes. A `busy` one keeps trying and writes `writer-lease.acquired-late` if it wins the lease once its holder stops refreshing it.",
|
|
1726
1759
|
essential: true,
|
|
1727
1760
|
fields: { reason: "label" }
|
|
1728
1761
|
},
|
|
@@ -1951,6 +1984,7 @@ var init_feature = __esm(() => {
|
|
|
1951
1984
|
feature: {
|
|
1952
1985
|
description: "Pipeline environments started from a feature, and feature planning.",
|
|
1953
1986
|
events: {
|
|
1987
|
+
"debug-build.launched": "The debug button's pipeline environment was launched. Ids and counts only: no ticket text, transcript or screenshot.",
|
|
1954
1988
|
"naming.fallback": "Automatic naming failed, so a local fallback name is used. Error kind only: the description stays out.",
|
|
1955
1989
|
"planning.legacy-adopt-failed": "Legacy planning conversations could not be adopted.",
|
|
1956
1990
|
"planning.tick-retrying": "A planning tick failed on a transient error; the next tick retries."
|
|
@@ -1973,6 +2007,9 @@ var init_host = __esm(() => {
|
|
|
1973
2007
|
"maintenance.listener-failed": "A host maintenance listener threw; the others still run.",
|
|
1974
2008
|
"suspend.reconcile-failed": "Reconciling due work after a host suspension failed.",
|
|
1975
2009
|
"load.sample-failed": "Sampling machine load failed; the next sample retries.",
|
|
2010
|
+
"load.history-restored": "Machine-load history was restored from its stored document at start (bucket count and the longest window's covered seconds).",
|
|
2011
|
+
"load.history-fresh": "Machine-load history started empty: reason missing (info) or unreadable, malformed, newer-version or too-large (warn); an unusable document is replaced at the next write.",
|
|
2012
|
+
"load.history-save-failed": "Writing machine-load history failed; the next 15-minute period or the shutdown write retries.",
|
|
1976
2013
|
"usage.source-stalled": "A usage source (scope: disk or gpu-sysfs) did not answer in time; its figure is missing from the sample until it does.",
|
|
1977
2014
|
...THROTTLE_LOG_EVENTS
|
|
1978
2015
|
}
|
|
@@ -2236,8 +2273,7 @@ var init_web_environment = __esm(() => {
|
|
|
2236
2273
|
"settings.extensions-load-failed": "The settings dialog could not load extensions.",
|
|
2237
2274
|
"settings.container-reset-failed": "The settings dialog could not reset the container.",
|
|
2238
2275
|
"settings.save-failed": "The settings dialog could not save.",
|
|
2239
|
-
"domains.test-failed": "Testing whether network whitelist domains resolve failed."
|
|
2240
|
-
"network-whitelist.save-failed": "The network whitelist dialog could not save."
|
|
2276
|
+
"domains.test-failed": "Testing whether network whitelist domains resolve failed."
|
|
2241
2277
|
}
|
|
2242
2278
|
},
|
|
2243
2279
|
"web.sidebar": {
|
|
@@ -2680,7 +2716,7 @@ var init_log_vocabulary = __esm(() => {
|
|
|
2680
2716
|
var init_renderer_errors = () => {};
|
|
2681
2717
|
|
|
2682
2718
|
// ../protocol/src/log-essential-labels.ts
|
|
2683
|
-
var ERROR_NAMES, ERROR_CODES, SYSCALLS, SIGNALS, PROVIDERS, BRIDGE_LISTENER_REASONS, UUID = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", SOURCE, STORAGE_DATABASES, STORAGE_OPERATIONS, TRANSACTION_MODES, STORAGE_TABLES;
|
|
2719
|
+
var ERROR_NAMES, ERROR_CODES, SYSCALLS, SIGNALS, PROVIDERS, BRIDGE_LISTENER_REASONS, CLAUDE_RESULT_SUBTYPES, CLAUDE_API_ERRORS, UUID = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", SOURCE, STORAGE_DATABASES, STORAGE_OPERATIONS, TRANSACTION_MODES, STORAGE_TABLES;
|
|
2684
2720
|
var init_log_essential_labels = __esm(() => {
|
|
2685
2721
|
init_log_vocabulary();
|
|
2686
2722
|
init_renderer_errors();
|
|
@@ -2797,6 +2833,28 @@ var init_log_essential_labels = __esm(() => {
|
|
|
2797
2833
|
"no-listener",
|
|
2798
2834
|
"launch-exited"
|
|
2799
2835
|
]);
|
|
2836
|
+
CLAUDE_RESULT_SUBTYPES = new Set([
|
|
2837
|
+
"success",
|
|
2838
|
+
"error_during_execution",
|
|
2839
|
+
"error_max_turns",
|
|
2840
|
+
"error_max_budget_usd",
|
|
2841
|
+
"error_max_structured_output_retries"
|
|
2842
|
+
]);
|
|
2843
|
+
CLAUDE_API_ERRORS = new Set([
|
|
2844
|
+
"authentication_failed",
|
|
2845
|
+
"oauth_org_not_allowed",
|
|
2846
|
+
"account_on_hold",
|
|
2847
|
+
"verification_required",
|
|
2848
|
+
"billing_error",
|
|
2849
|
+
"rate_limit",
|
|
2850
|
+
"overloaded",
|
|
2851
|
+
"invalid_request",
|
|
2852
|
+
"model_not_found",
|
|
2853
|
+
"server_error",
|
|
2854
|
+
"unknown",
|
|
2855
|
+
"max_output_tokens",
|
|
2856
|
+
"cloud_credential_error"
|
|
2857
|
+
]);
|
|
2800
2858
|
SOURCE = new RegExp(`^(?:claude|codex|opencode|cursor|grok|acp|pi):${UUID}$`, "i");
|
|
2801
2859
|
STORAGE_DATABASES = new Set(["main", "ledger", "other"]);
|
|
2802
2860
|
STORAGE_OPERATIONS = new Set([
|
|
@@ -9451,7 +9509,7 @@ async function probeExecutable(executablePath, artifact, timeoutMs, spawnProcess
|
|
|
9451
9509
|
clearTimeout(timeout);
|
|
9452
9510
|
reject(new Error(`${artifact.name} could not execute from the Orkestrator toolchain cache: ${error.message}`));
|
|
9453
9511
|
});
|
|
9454
|
-
child.once("
|
|
9512
|
+
child.once("close", (code, signal) => {
|
|
9455
9513
|
clearTimeout(timeout);
|
|
9456
9514
|
const output = Buffer.concat(chunks).toString("utf8");
|
|
9457
9515
|
if (code !== 0) {
|
|
@@ -11801,7 +11859,7 @@ var PUBLIC_ACTIONS = {
|
|
|
11801
11859
|
effects: [],
|
|
11802
11860
|
observation: "immediate",
|
|
11803
11861
|
milestone: "D",
|
|
11804
|
-
summary: "List scheduled jobs with their next fire time, owner and last outcome."
|
|
11862
|
+
summary: "List scheduled jobs with their next fire time, owner and last outcome, and whether this backend fires them."
|
|
11805
11863
|
},
|
|
11806
11864
|
"schedule.get": {
|
|
11807
11865
|
version: 1,
|
|
@@ -13209,7 +13267,7 @@ import path5 from "path";
|
|
|
13209
13267
|
// ../../apps/backend/package.json
|
|
13210
13268
|
var package_default = {
|
|
13211
13269
|
name: "@orkestrator/backend",
|
|
13212
|
-
version: "2.
|
|
13270
|
+
version: "2.39.0-beta",
|
|
13213
13271
|
private: true,
|
|
13214
13272
|
type: "module",
|
|
13215
13273
|
exports: {
|
|
@@ -14405,6 +14463,9 @@ var WORKFLOW_RESULT_TOOL_NAMES = {
|
|
|
14405
14463
|
"subork-answer": "submit_subork_answer"
|
|
14406
14464
|
};
|
|
14407
14465
|
var WORKFLOW_RESULT_VALIDATION_TOOL_NAME = "validate_workflow_result";
|
|
14466
|
+
var WORKFLOW_RESULT_TOOL_META = Object.freeze({
|
|
14467
|
+
"anthropic/alwaysLoad": true
|
|
14468
|
+
});
|
|
14408
14469
|
var GRAPH_PORT_SUBMIT_PREFIX = "submit_";
|
|
14409
14470
|
var GRAPH_PORT_VALIDATE_PREFIX = "validate_";
|
|
14410
14471
|
var WORKFLOW_RESULT_KIND_TOOLS = new Set(Object.values(WORKFLOW_RESULT_TOOL_NAMES));
|
|
@@ -14986,7 +15047,8 @@ async function submit(context, action, input, options2) {
|
|
|
14986
15047
|
return { session, ...outcome };
|
|
14987
15048
|
}
|
|
14988
15049
|
async function submitForWait(context, action, input, options2, timeoutMs) {
|
|
14989
|
-
const
|
|
15050
|
+
const now = observationClock(context.io).now ?? Date.now;
|
|
15051
|
+
const deadline = now() + timeoutMs;
|
|
14990
15052
|
const session = await context.session();
|
|
14991
15053
|
try {
|
|
14992
15054
|
return {
|
|
@@ -15001,7 +15063,7 @@ async function submitForWait(context, action, input, options2, timeoutMs) {
|
|
|
15001
15063
|
let receipt;
|
|
15002
15064
|
try {
|
|
15003
15065
|
receipt = await observe(async () => {
|
|
15004
|
-
if (
|
|
15066
|
+
if (now() >= deadline)
|
|
15005
15067
|
throw new ObservationStopped("deadline");
|
|
15006
15068
|
try {
|
|
15007
15069
|
const found = await session.readWithReceipt("run.get", {
|
|
@@ -15009,7 +15071,7 @@ async function submitForWait(context, action, input, options2, timeoutMs) {
|
|
|
15009
15071
|
action,
|
|
15010
15072
|
namespace,
|
|
15011
15073
|
submittedInput: input
|
|
15012
|
-
}, Math.max(1, deadline -
|
|
15074
|
+
}, Math.max(1, deadline - now()));
|
|
15013
15075
|
return found.receipt ? { done: true, value: found.receipt } : { done: false };
|
|
15014
15076
|
} catch (lookup) {
|
|
15015
15077
|
if (lookup instanceof CliError && (lookup.code === "not-found" || lookup.code === "connection-failed"))
|
|
@@ -15017,7 +15079,7 @@ async function submitForWait(context, action, input, options2, timeoutMs) {
|
|
|
15017
15079
|
throw lookup;
|
|
15018
15080
|
}
|
|
15019
15081
|
}, {
|
|
15020
|
-
timeoutMs: Math.max(0, deadline -
|
|
15082
|
+
timeoutMs: Math.max(0, deadline - now()),
|
|
15021
15083
|
signal: context.signal,
|
|
15022
15084
|
...observationClock(context.io)
|
|
15023
15085
|
});
|
|
@@ -15039,7 +15101,7 @@ async function submitForWait(context, action, input, options2, timeoutMs) {
|
|
|
15039
15101
|
return {
|
|
15040
15102
|
session,
|
|
15041
15103
|
receipt,
|
|
15042
|
-
deadline,
|
|
15104
|
+
deadline: Date.now() + Math.max(0, deadline - now()),
|
|
15043
15105
|
warnings: [`The ${action} response was lost; found the operation by its request key`]
|
|
15044
15106
|
};
|
|
15045
15107
|
}
|
|
@@ -28766,6 +28828,16 @@ var SCHEDULED_JOB_LIMITS = Object.freeze({
|
|
|
28766
28828
|
selfTimerGrantWindowMs: 2 * 60 * 60000,
|
|
28767
28829
|
userInstructionMaxChars: 500
|
|
28768
28830
|
});
|
|
28831
|
+
function schedulerPausedMessage(reason) {
|
|
28832
|
+
switch (reason) {
|
|
28833
|
+
case "writer-lease-lost":
|
|
28834
|
+
return "Schedules have stopped firing on this backend. It lost control of its data directory, usually to another Orkestrator using the same directory. Close the other one and restart Orkestrator to resume them.";
|
|
28835
|
+
case "another-backend":
|
|
28836
|
+
return "Schedules fire in another Orkestrator that is using this data directory, not in this one. They run while that one is running.";
|
|
28837
|
+
case "newer-data-directory":
|
|
28838
|
+
return "Schedules do not fire on this backend because a newer Orkestrator wrote its data directory. Update Orkestrator to run them here.";
|
|
28839
|
+
}
|
|
28840
|
+
}
|
|
28769
28841
|
function describeScheduleTrigger(trigger, timeZone) {
|
|
28770
28842
|
switch (trigger.kind) {
|
|
28771
28843
|
case "once":
|
|
@@ -29092,11 +29164,16 @@ function simpleMutation(verb, summary) {
|
|
|
29092
29164
|
}
|
|
29093
29165
|
};
|
|
29094
29166
|
}
|
|
29167
|
+
function schedulerNotice(scheduler) {
|
|
29168
|
+
if (!scheduler || scheduler.firing)
|
|
29169
|
+
return;
|
|
29170
|
+
return schedulerPausedMessage(scheduler.reason) ?? "Schedules do not fire on this backend.";
|
|
29171
|
+
}
|
|
29095
29172
|
var scheduleCommands = [
|
|
29096
29173
|
{
|
|
29097
29174
|
path: ["schedule", "list"],
|
|
29098
29175
|
action: "schedule.list",
|
|
29099
|
-
summary: "List scheduled jobs with their next fire, owner and last outcome.",
|
|
29176
|
+
summary: "List scheduled jobs with their next fire, owner and last outcome; warns when this backend does not fire them.",
|
|
29100
29177
|
positionals: [],
|
|
29101
29178
|
options: [
|
|
29102
29179
|
{
|
|
@@ -29120,6 +29197,7 @@ var scheduleCommands = [
|
|
|
29120
29197
|
{ name: "offset", kind: "integer", valueName: "N", description: "Rows to skip." },
|
|
29121
29198
|
{ name: "limit", kind: "integer", valueName: "N", description: "Rows (max 200)." }
|
|
29122
29199
|
],
|
|
29200
|
+
idOutput: "schedule IDs, one per line",
|
|
29123
29201
|
async run(context, parsed) {
|
|
29124
29202
|
const session = await context.session();
|
|
29125
29203
|
const options2 = parsed.options;
|
|
@@ -29130,9 +29208,12 @@ var scheduleCommands = [
|
|
|
29130
29208
|
...options2.offset !== undefined ? { offset: options2.offset } : {},
|
|
29131
29209
|
...options2.limit !== undefined ? { limit: options2.limit } : {}
|
|
29132
29210
|
});
|
|
29211
|
+
const notice = schedulerNotice(page.scheduler);
|
|
29133
29212
|
return {
|
|
29134
29213
|
action: "schedule.list",
|
|
29135
29214
|
result: page,
|
|
29215
|
+
...notice ? { warnings: [notice] } : {},
|
|
29216
|
+
ids: page.schedules.map((job) => job.id),
|
|
29136
29217
|
connection: session.identity,
|
|
29137
29218
|
human: table(["ID", "NAME", "STATE", "NEXT FIRE", "OWNER", "LAST"], page.schedules.map((job) => [
|
|
29138
29219
|
job.id,
|
|
@@ -30392,7 +30473,7 @@ var projectCommands = [
|
|
|
30392
30473
|
path: ["project", "remove"],
|
|
30393
30474
|
action: "project.remove",
|
|
30394
30475
|
summary: "Remove a project registration; --cascade deletes its environments first.",
|
|
30395
|
-
description: "Without --cascade a project that still has environments is refused (exit 8). With --cascade the backend deletes each environment through the normal lifecycle, one by one, reports a result for each, and removes the registration only if all were deleted (otherwise the operation is partial and the project is kept). The checkout on disk and any remote repository are never deleted. --wait observes a cascade until it ends.",
|
|
30476
|
+
description: "Without --cascade a project that still has environments is refused (exit 8). With --cascade the backend deletes each environment through the normal lifecycle, one by one, reports a result for each, and removes the registration only if all were deleted (otherwise the operation is partial and the project is kept). Removing the registration also deletes the project's tickets and their images, project notes and feature plans on that machine. The checkout on disk and any remote repository are never deleted. --wait observes a cascade until it ends.",
|
|
30396
30477
|
positionals: [{ name: "project", required: true }],
|
|
30397
30478
|
options: [
|
|
30398
30479
|
{
|