orkestrator 2.37.3-beta → 2.37.5-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/dist/artifact-runtime/worker-context/Dockerfile +1 -1
- package/dist/artifact-runtime/worker-context/package-lock.json +4 -4
- package/dist/artifact-runtime/worker-context/package.json +1 -1
- package/dist/client.js +397 -24
- package/dist/main.js +112233 -102964
- package/package.json +4 -4
- package/resources/acp-bridge/dist/index.js +218 -123
- package/resources/claude-bridge/dist/index.js +459 -460
- package/resources/codex-bridge/dist/index.js +259 -224
- package/resources/cursor-bridge/dist/index.js +1370 -419
- package/resources/cursor-bridge/runtime/install.json +1 -1
- package/resources/pi-bridge/dist/index.js +374 -162
- package/resources/pi-bridge/runtime/install.json +1 -1
- package/resources/release-runtime/bun.lock +2 -2
- package/resources/release-runtime/package.json +1 -1
|
@@ -432,10 +432,13 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
432
432
|
"prompt.accepted": "The route accepted a prompt and answered 202.",
|
|
433
433
|
"prompt.failed": "A prompt turn failed; the session reports the error.",
|
|
434
434
|
"prompt.processing-failed": "A prompt accepted by the route failed while processing.",
|
|
435
|
+
"prompt.processing-usage-limited": "A prompt accepted by the route ended on a usage limit; the turn already logged prompt.usage-limited.",
|
|
435
436
|
"prompt.received": "A prompt reached the bridge; only its length is logged.",
|
|
436
437
|
"prompt.send-failed": "A prompt request failed; the route answered with an error.",
|
|
438
|
+
"prompt.usage-limited": "A prompt turn ended because the account's plan allowance is used up; the session reports the limit.",
|
|
437
439
|
"query.close-failed": "Stopping the Claude query failed while closing a tab; the close stays pending.",
|
|
438
440
|
"query.failed": "A Claude query ended with an error result.",
|
|
441
|
+
"query.usage-limited": "Claude refused a query because the account's plan allowance is used up; the turn reports the limit.",
|
|
439
442
|
"question.answer-failed": "The answer-question route failed.",
|
|
440
443
|
"question.answering": "Answering a parked question.",
|
|
441
444
|
"question.answers-prepared": "The route prepared a question answer for the session.",
|
|
@@ -634,10 +637,10 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
634
637
|
"dev-mode.ignored-packaged": "A packaged app was launched with ELECTRON_DEV=1 and ignored it; it loads its bundled renderer.",
|
|
635
638
|
"instance.already-running": "Another instance holds this data directory; this one will quit.",
|
|
636
639
|
"main-thread.stalled": {
|
|
637
|
-
description: "A timer fired late, so windows, IPC and the stdout reader waited.",
|
|
640
|
+
description: "A timer fired late, so windows, IPC and the stdout reader waited. `cpuMs` is the CPU time the process used in the window: near `lagMs` the main thread was busy, far below it the thread waited.",
|
|
638
641
|
essential: true,
|
|
639
642
|
minLevel: "error",
|
|
640
|
-
fields: { lagMs: "number", intervalMs: "number" }
|
|
643
|
+
fields: { lagMs: "number", intervalMs: "number", cpuMs: "number" }
|
|
641
644
|
},
|
|
642
645
|
"process-memory": "Development only: working set per Electron process type, sampled on an interval.",
|
|
643
646
|
"process-memory.failed": "Development only: one process memory sample could not be read.",
|
|
@@ -687,12 +690,22 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
687
690
|
denied: "A renderer asked for a permission the policy does not grant."
|
|
688
691
|
}
|
|
689
692
|
},
|
|
693
|
+
"desktop.webrequest": {
|
|
694
|
+
description: "Main-process webRequest listeners on Electron sessions. Listener names only; never a URL, header or error message.",
|
|
695
|
+
events: {
|
|
696
|
+
"listener.failed-closed": "A listener's decision threw or rejected, so it answered with its fail-closed response.",
|
|
697
|
+
"observer.failed": "A listener with no callback (a redirect observer) threw; its fallback ran.",
|
|
698
|
+
"callback.failed": "Electron's webRequest callback threw while a listener answered.",
|
|
699
|
+
...THROTTLE_LOG_EVENTS
|
|
700
|
+
}
|
|
701
|
+
},
|
|
690
702
|
"desktop.dialog": {
|
|
691
703
|
description: "Native dialogs, whose modal loops hold the main thread while they are open.",
|
|
692
704
|
events: {
|
|
693
705
|
"attention-failed": "A dialog could not ask for the user's attention.",
|
|
694
706
|
closed: "A native dialog closed.",
|
|
695
707
|
"hidden-cancelled": "A hidden profile cancelled a dialog without opening native UI.",
|
|
708
|
+
"no-display-cancelled": "A headless Electron with no display cancelled a dialog instead of opening native UI.",
|
|
696
709
|
"open-failed": "A dialog could not open; it was answered as cancelled.",
|
|
697
710
|
opening: "A native dialog is opening.",
|
|
698
711
|
"preview-beforeunload-ignored": "A browser preview's beforeunload handler was ignored.",
|
|
@@ -1048,6 +1061,7 @@ var NATIVE_AGENT_LOG_AREAS = defineLogAreas({
|
|
|
1048
1061
|
"agent-tools.unavailable": "OpenCode agent tools remain unavailable for a session.",
|
|
1049
1062
|
"coordinator-servers.unavailable": "OpenCode coordinator research servers are unavailable.",
|
|
1050
1063
|
"monitor.reconnecting": "The request monitor lost its stream and is reconnecting. Error class only.",
|
|
1064
|
+
"monitor.silent": "The request monitor's stream stopped heartbeating, so it is replaced. `silenceMs` only.",
|
|
1051
1065
|
"worker-limit.reached": "The bounded request workers are full, so the stream restarts and a snapshot reconciles.",
|
|
1052
1066
|
"request.failed": "Handling a request event failed, so the stream restarts. Error class only.",
|
|
1053
1067
|
"credential-plugin.skipped": "A host OpenCode server started without the credential plugin, so its tools inherit its password; `reason` says why.",
|
|
@@ -1070,6 +1084,7 @@ var NATIVE_AGENT_LOG_AREAS = defineLogAreas({
|
|
|
1070
1084
|
"host-server.terminate-failed": "A 2.x server that did not become ready could not be stopped; its process entry is kept for shutdown. Error class only.",
|
|
1071
1085
|
"container-server.launched": "The start script of a container environment's 2.x server was run. Container port only.",
|
|
1072
1086
|
"container-server.ready": "A container environment's 2.x server this backend started answered `/api/info` as 2.x. Environment id only.",
|
|
1087
|
+
"container-server.cleanup-failed": "Cleanup after OpenCode startup failed; step names only, while the original startup error is preserved.",
|
|
1073
1088
|
"container-server.warm-incomplete": "The first workspace request to a container's new 2.x server failed, so its plugins load on the next one. Error class only.",
|
|
1074
1089
|
"resume-list.unavailable": "The 2.x sessions could not be listed for the resume picker, so it shows the 1.x list alone. Error class only.",
|
|
1075
1090
|
"credential.mirrored": "A provider sign-in change was copied into the 2.x database. `outcome` (written, removed, unchanged, skipped) only; never a provider id or value.",
|
|
@@ -1124,12 +1139,13 @@ var RUNTIME_LOG_AREAS = defineLogAreas({
|
|
|
1124
1139
|
description: "This process's event loop. A stall of 10 seconds or more is written at error, so no level hides it.",
|
|
1125
1140
|
events: {
|
|
1126
1141
|
stalled: {
|
|
1127
|
-
description: "A timer fired late, so every request in that window waited. In the backend the line also names what ran: `storageMs` and the `storage*` fields describe the slow SQLite calls in the window (`operation.slow` in `storage`), `commandsInFlight` and `commands` the commands running,
|
|
1142
|
+
description: "A timer fired late, so every request in that window waited. In the backend the line also names what ran: `storageMs` and the `storage*` fields describe the slow SQLite calls in the window (`operation.slow` in `storage`), `commandsInFlight` and `commands` the commands running, `blockingCommand` one whose synchronous part overlapped it, and `jobsInWindow` and `jobs` the recurring jobs that ran around it. `cpuMs` is the CPU time the process used in the window: near `lagMs` its own thread was busy, far below it the thread waited.",
|
|
1128
1143
|
essential: true,
|
|
1129
1144
|
minLevel: "error",
|
|
1130
1145
|
fields: {
|
|
1131
1146
|
lagMs: "number",
|
|
1132
1147
|
intervalMs: "number",
|
|
1148
|
+
cpuMs: "number",
|
|
1133
1149
|
storageMs: "number",
|
|
1134
1150
|
storageDatabase: "label",
|
|
1135
1151
|
storageOp: "label",
|
|
@@ -1137,7 +1153,8 @@ var RUNTIME_LOG_AREAS = defineLogAreas({
|
|
|
1137
1153
|
storageLongestMs: "number",
|
|
1138
1154
|
storageBusy: "boolean",
|
|
1139
1155
|
commandsInFlight: "number",
|
|
1140
|
-
blockingCommandMs: "number"
|
|
1156
|
+
blockingCommandMs: "number",
|
|
1157
|
+
jobsInWindow: "number"
|
|
1141
1158
|
}
|
|
1142
1159
|
}
|
|
1143
1160
|
}
|
|
@@ -1177,6 +1194,8 @@ var TERMINAL_LOG_AREAS = defineLogAreas({
|
|
|
1177
1194
|
"pty.exit-notify-failed": "Notifying a terminal's exit failed.",
|
|
1178
1195
|
"pty.late-exit-listener-failed": "A listener added after a terminal exited threw.",
|
|
1179
1196
|
"setup.pty-reused": "A setup terminal reused its existing PTY.",
|
|
1197
|
+
"setup.pty-retired": "A setup retry ended the terminal the previous run left open, so the new run gets its own.",
|
|
1198
|
+
"setup.pty-retire-failed": "A setup retry could not end the previous run's process tree, so it kept that terminal and started nothing.",
|
|
1180
1199
|
"setup.pty-spawning": "A setup terminal is spawning its PTY. The argument count only, never the arguments.",
|
|
1181
1200
|
"setup.pty-spawned": "A setup terminal's PTY started.",
|
|
1182
1201
|
"setup.pty-exited": "A setup terminal's PTY exited.",
|
|
@@ -1304,6 +1323,7 @@ var TMUX_LOG_AREAS = defineLogAreas({
|
|
|
1304
1323
|
"cleanup.skipped": "Environment tmux cleanup was skipped because tmux could not be reached and nothing required it.",
|
|
1305
1324
|
"cleanup.environments-load-failed": "Environments could not be loaded during tmux cleanup, so it stays incomplete.",
|
|
1306
1325
|
"cleanup.kill-failed": "An environment's tmux sessions could not be killed.",
|
|
1326
|
+
"cleanup.kill-incomplete": "An environment's tmux sessions could not all be shown gone (a session survived, or the socket was unreachable while another tmux process might own it), so cleanup stays incomplete.",
|
|
1307
1327
|
"hooks.uninstall-failed": "Workspace hooks could not be uninstalled.",
|
|
1308
1328
|
"hooks.git-exclude-failed": "The git exclude for Claude's local settings could not be set.",
|
|
1309
1329
|
"naming.prepare-failed": "First-prompt naming could not be prepared; the prompt still goes ahead.",
|
|
@@ -1433,6 +1453,7 @@ var STORAGE_LOG_AREAS = defineLogAreas({
|
|
|
1433
1453
|
"config.restrict-mode-failed": "A config file holding provider secrets could not be set to owner-only; the backend carries on.",
|
|
1434
1454
|
"legacy-json.moved": "JSON store files written after the SQLite migration were archived, not imported.",
|
|
1435
1455
|
"legacy-json.archive-failed": "Imported JSON store files could not be archived.",
|
|
1456
|
+
"native-session-owners.backfill-failed": "Native-session rows could not be given their environment as owner at open; an environment delete then parses those rows instead, and the next open retries.",
|
|
1436
1457
|
"lease.timed-out": "A waiter gave up on a lease; `lease` and `family` name it, `holderAgeMs` is the time since its holder's last heartbeat (null when the holder had just gone), `waitedMs` how long the waiter waited.",
|
|
1437
1458
|
"lease.heartbeat-failed": "A held lease's heartbeat failed, which shortens the lease; the next one retries.",
|
|
1438
1459
|
"scrub.vacuum-failed": "Deleted-content page reclamation failed; the checkpoint is attempted independently.",
|
|
@@ -1482,9 +1503,12 @@ var BUILD_PIPELINE_LOG_AREAS = defineLogAreas({
|
|
|
1482
1503
|
"transcripts.maintenance-failed": "Migrating or sweeping stage transcripts failed; the next start retries.",
|
|
1483
1504
|
"restore.skipped": "A pipeline could not be restored at startup and was skipped.",
|
|
1484
1505
|
"criteria.record-failed": "Acceptance criteria results could not be recorded on the ticket.",
|
|
1506
|
+
"completion-notes.publish-failed": "A finished pipeline's notes tab could not be added to the layout; the run stays complete.",
|
|
1485
1507
|
"workspace.waiting": "A pipeline is waiting for its workspace; written once per reason.",
|
|
1486
1508
|
"rewind.pending": "A pipeline's code rewind has not finished; written once per reason.",
|
|
1487
1509
|
"kanban.status-failed": "A restarted pipeline's Kanban status could not be set; it retries shortly.",
|
|
1510
|
+
"kanban.environment-deleted-read-failed": "The pipelines of an environment being deleted could not be read, so their tickets keep their columns.",
|
|
1511
|
+
"kanban.environment-deleted-update-failed": "The ticket of a pipeline whose environment was deleted could not be moved; the deletion goes on.",
|
|
1488
1512
|
"usage.read-failed": "Reading a stage session's token usage failed.",
|
|
1489
1513
|
"checkpoint.deferred": "A stage transcript checkpoint could not be written yet; the provider's history stands.",
|
|
1490
1514
|
"checkpoint.not-committed": "A stage transcript checkpoint was reverted in the commit that should have kept it.",
|
|
@@ -1523,6 +1547,8 @@ var CHANGE_TRACKING_LOG_AREAS = defineLogAreas({
|
|
|
1523
1547
|
"dispatch.record-failed": "Recording a turn's dispatch outcome failed.",
|
|
1524
1548
|
"turn.finalize-failed": "Finalizing a turn failed.",
|
|
1525
1549
|
"turn.settle-failed": "Settling a late interrupted turn failed.",
|
|
1550
|
+
"turn.end-recovery": "A background retry of a turn end capture that timed out finished: recovered, done (no longer eligible) or exhausted.",
|
|
1551
|
+
"turn.end-recovery-failed": "A background retry of a turn end capture threw; it counts as a failed attempt.",
|
|
1526
1552
|
"evidence.pull-failed": "Pulling change evidence from a bridge failed; a later pull retries.",
|
|
1527
1553
|
"measurement.failed": "Recomputing a tool's measurement failed."
|
|
1528
1554
|
}
|
|
@@ -1533,6 +1559,7 @@ var CHANGE_TRACKING_LOG_AREAS = defineLogAreas({
|
|
|
1533
1559
|
"baseline.update-failed": "An environment's diff baseline could not be updated.",
|
|
1534
1560
|
"scan.watcher-failed": "An environment's diff watcher failed; its scans fall back to polling.",
|
|
1535
1561
|
"scan.failed": "A diff scan failed; the last results stay, marked stale, and the scan is retried.",
|
|
1562
|
+
"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.",
|
|
1536
1563
|
"scan.freshness-read-failed": "Reading whether an environment's remote is fresh failed.",
|
|
1537
1564
|
"scan.listener-failed": "A change-tracking scan listener threw; the scan itself stands.",
|
|
1538
1565
|
"emit.diff-stats-failed": "A diff stats change could not be emitted to its sink.",
|
|
@@ -1591,6 +1618,7 @@ var COORDINATOR_LOG_AREAS = defineLogAreas({
|
|
|
1591
1618
|
"node-release.no-coordinator": "Work closed on a released node belonged to a coordinator that no longer exists, so nobody was told.",
|
|
1592
1619
|
"node-offline.notice-failed": "The notice that a node has been unreachable for a day could not be sent; the next failed read retries.",
|
|
1593
1620
|
"node-offline.check-failed": "Whether a long-unreachable node's coordinators were told could not be checked; the next read retries.",
|
|
1621
|
+
"node-reconnect.notice-failed": "The message that a node a coordinator tried while it was disconnected is back could not be sent; it is not retried, since the coordinator already holds the refusal.",
|
|
1594
1622
|
"checkout.merge-followed": "After an environment's PR merged, the project checkout was fast-forwarded, or `outcome` says why not.",
|
|
1595
1623
|
"checkout.merge-follow-failed": "Fast-forwarding the project checkout failed, after an environment's PR merged or before mail woke the main coordinator.",
|
|
1596
1624
|
"checkout.mail-follow": "Before mail woke the main coordinator, the project checkout was fast-forwarded (`fast-forwarded-fetched` when the fetch was slow or failed and the upstream commit already fetched was merged), or `outcome` says why not (`timed-out`, `failed`).",
|
|
@@ -1643,7 +1671,8 @@ var REVIEW_LOG_AREAS = defineLogAreas({
|
|
|
1643
1671
|
"monitor.task-store-failed": "A pull request could not be recorded on its Kanban task.",
|
|
1644
1672
|
"monitor.merged-tickets-closed": "The startup sweep moved Kanban tickets whose pull request had merged to done (`count`).",
|
|
1645
1673
|
"monitor.merged-tickets-close-failed": "The startup sweep closing Kanban tickets whose pull request merged failed; the next backend start retries.",
|
|
1646
|
-
"monitor.emit-failed": "A pull request monitor event could not be emitted to its sink."
|
|
1674
|
+
"monitor.emit-failed": "A pull request monitor event could not be emitted to its sink.",
|
|
1675
|
+
"branch-cleanup.kept": "A merge or cleanup kept a pull request's head branch because it is not the branch created for the environment (`reason`)."
|
|
1647
1676
|
}
|
|
1648
1677
|
}
|
|
1649
1678
|
});
|
|
@@ -1675,6 +1704,8 @@ var AGENT_ACCOUNTS_LOG_AREAS = defineLogAreas({
|
|
|
1675
1704
|
"kept-note.failed": "Recording why a limit stop found no account to move to failed; the stop stands.",
|
|
1676
1705
|
"container-sync.failed": "Handing a login or account to a container failed; `step` says which part.",
|
|
1677
1706
|
"last-usage.save-failed": "The last plan usage reading could not be saved; the next save retries.",
|
|
1707
|
+
"shared-usage.save-failed": "The shared usage readings could not be saved; they stay in memory and the next reading saves them.",
|
|
1708
|
+
"shared-usage.record-failed": "A fresh usage reading could not be kept for sharing with other machines; the account's own reading stands.",
|
|
1678
1709
|
"login-cleanup.failed": "A temporary login could not be cleaned up.",
|
|
1679
1710
|
"login-renewal.failed": "Renewing an idle account's sign-in to read its usage failed; it is retried after a backoff.",
|
|
1680
1711
|
"login-renewal.not-extended": "Claude Code ran to renew an idle account's sign-in, but its token is still lapsed.",
|
|
@@ -1692,6 +1723,7 @@ var DOCKER_LOG_AREAS = defineLogAreas({
|
|
|
1692
1723
|
"git-mirror.mount-unavailable": "A new container gets no project Git mirror, so its clone goes to the remote.",
|
|
1693
1724
|
"git-mirror.mount-withheld": "A new restricted container gets no project Git mirror because its firewall would not let it reach the project's remote, so it cannot read what the remote serves through the mirror either.",
|
|
1694
1725
|
"git-mirror.refreshed": "A project's Git mirror was built or updated.",
|
|
1726
|
+
"git-mirror.access-changed": "A project's Git mirror was withdrawn because containers are now given a different credential (another access kind, or a token acting as another or an unreadable account), so no reader keeps what it could not fetch itself.",
|
|
1695
1727
|
"git-mirror.seeded": "A project's Git mirror was built from its host checkout and only what the remote added to it.",
|
|
1696
1728
|
"git-mirror.seed-skipped": "A project's host checkout could not seed its Git mirror, so the build downloads everything.",
|
|
1697
1729
|
"git-mirror.refresh-failed": "A project's Git mirror could not be updated. New clones still work, from the mirror as it was or from the remote.",
|
|
@@ -1705,6 +1737,9 @@ var DOCKER_LOG_AREAS = defineLogAreas({
|
|
|
1705
1737
|
"git-mirror.clone-fallback": "A new environment could not clone from its project's Git mirror and cloned from the remote.",
|
|
1706
1738
|
"project-seed.refused": "A project .env, .env.local or opencode.json was not copied into a new container: a link, not a regular file, outside the project, too large or unreadable.",
|
|
1707
1739
|
"opencode.warm-incomplete": "OpenCode did not finish loading /workspace in a container.",
|
|
1740
|
+
"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.",
|
|
1741
|
+
"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.",
|
|
1742
|
+
"opencode.project-config-filtered": "Values were left out of a checkout's OpenCode configuration before a launched server reads it: counts of plugin keys, `{env:}` and `{file:}` references and dropped instructions (including separate instructionGlob and instructionUrl counts), and the names of files that were not a JSONC object. Never values.",
|
|
1708
1743
|
"log-driver.unbounded": "The Docker daemon offers neither the local nor the json-file log driver, so new containers keep its default driver, whose log may be uncapped. Written once per backend.",
|
|
1709
1744
|
"lifecycle-event.reconcile-failed": "Reconciling an environment after a container start or stop event failed; the next status read retries.",
|
|
1710
1745
|
"login-keeper.pass-failed": "A Claude login keeper pass failed; the next interval retries.",
|
|
@@ -1739,6 +1774,17 @@ var DOCKER_LOG_AREAS = defineLogAreas({
|
|
|
1739
1774
|
description: "A bridge process was launched in a container, for the first time there or as a relaunch; `provider` names it. A relaunch keeps the run before it in the previous log.",
|
|
1740
1775
|
essential: true,
|
|
1741
1776
|
fields: { provider: "label", containerPort: "number" }
|
|
1777
|
+
},
|
|
1778
|
+
"bridge.listener-refused": {
|
|
1779
|
+
description: "The socket listening on a container bridge's port is not the one the bridge the backend started opened, so its token is not handed out and the next start replaces it. `reason` is a fixed label: `different-socket`, `several-sockets`, `pending` (a start has not recorded its bridge yet, or failed before it did) or `scan-incomplete`.",
|
|
1780
|
+
essential: true,
|
|
1781
|
+
fields: { provider: "label", reason: "label" }
|
|
1782
|
+
},
|
|
1783
|
+
"bridge.listener-adopted": "A running container bridge had no listener record, because a backend from before the record started it, so the socket on its port was recorded as the bridge's; `provider` names it.",
|
|
1784
|
+
"bridge.listener-unrecorded": {
|
|
1785
|
+
description: "A bridge the backend just launched could not be recorded as its port's listener, for the fixed `reason` given (`no-listener`, `several-sockets`, `launch-exited` or `scan-incomplete`); what listens on the port is stopped and the start fails.",
|
|
1786
|
+
essential: true,
|
|
1787
|
+
fields: { provider: "label", reason: "label" }
|
|
1742
1788
|
}
|
|
1743
1789
|
}
|
|
1744
1790
|
},
|
|
@@ -1793,7 +1839,8 @@ var MCP_LOG_AREAS = defineLogAreas({
|
|
|
1793
1839
|
"listener.port-free": "The Control MCP's fixed port is free again, so it is listening.",
|
|
1794
1840
|
"state-listener.failed": "A Control MCP state listener threw; the others still run.",
|
|
1795
1841
|
"delegation.remote-open-failed": "A delegation could not be opened on another node.",
|
|
1796
|
-
"delegation.open-failed": "A coordinator delegation could not be opened."
|
|
1842
|
+
"delegation.open-failed": "A coordinator delegation could not be opened.",
|
|
1843
|
+
"delegation.turn-origin-unreadable": "A coordinator's last turn origin could not be read, so its delegated prompt is marked as arising from agent mail."
|
|
1797
1844
|
}
|
|
1798
1845
|
},
|
|
1799
1846
|
"mcp-management": {
|
|
@@ -1878,6 +1925,7 @@ var NODES_LOG_AREAS = defineLogAreas({
|
|
|
1878
1925
|
"ticket-sync.failed": "A Kanban sync with a node failed; it is retried.",
|
|
1879
1926
|
"ticket-sync.unknown-project": "A node sent ticket changes for a project that no longer exists here.",
|
|
1880
1927
|
"ticket-sync.forget-failed": "A detached command node's ticket copies could not be released.",
|
|
1928
|
+
"usage-sync.failed": "Sharing usage readings with a node failed; the next reading or reconnect retries.",
|
|
1881
1929
|
"fleet-update.requested": "The update policy asked an older leaf to install the command node's version.",
|
|
1882
1930
|
"fleet-update.failed": "The update policy could not read or update a leaf; it retries later.",
|
|
1883
1931
|
"fleet-update.policy-load-failed": "The stored update policy could not be read; it is off."
|
|
@@ -1969,6 +2017,20 @@ var SCHEDULER_LOG_AREAS = defineLogAreas({
|
|
|
1969
2017
|
}
|
|
1970
2018
|
});
|
|
1971
2019
|
|
|
2020
|
+
// ../protocol/src/log-vocabulary/self-improvement.ts
|
|
2021
|
+
var SELF_IMPROVEMENT_LOG_AREAS = defineLogAreas({
|
|
2022
|
+
"self-improvement": {
|
|
2023
|
+
description: "Self-improvement runs: diagnostics and conversation review turned into tickets. Counts and steps only, never conversation text.",
|
|
2024
|
+
events: {
|
|
2025
|
+
"run.started": "A run started; `trigger` is manual, daily or dry-run.",
|
|
2026
|
+
"run.finished": "A run finished; `created`, `verified`, `fixFailed` and `parts` count its tickets, confirmed fixes, failed fixes and conversation parts read.",
|
|
2027
|
+
"run.failed": "A run stopped before it finished; `reason` is a fixed label.",
|
|
2028
|
+
"review.call-failed": "One conversation review call failed; the run carries on and the part is read again next run.",
|
|
2029
|
+
"daily.check-failed": "The daily run check failed; the next check retries."
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
});
|
|
2033
|
+
|
|
1972
2034
|
// ../protocol/src/log-vocabulary/web-app.ts
|
|
1973
2035
|
var WEB_APP_LOG_AREAS = defineLogAreas({
|
|
1974
2036
|
"web.app": {
|
|
@@ -2236,6 +2298,7 @@ var WEB_KANBAN_LOG_AREAS = defineLogAreas({
|
|
|
2236
2298
|
"task.move-failed": "A task move failed and its status was rolled back.",
|
|
2237
2299
|
"comment.add-failed": "A comment could not be added to a task.",
|
|
2238
2300
|
"comment.delete-failed": "A comment could not be deleted from a task.",
|
|
2301
|
+
"pr.merge-failed": "Merging a ticket's pull request from its Notes tab failed; the error was shown to the user.",
|
|
2239
2302
|
"image.add-failed": "An image could not be added to a task.",
|
|
2240
2303
|
"image.delete-failed": "An image could not be deleted from a task.",
|
|
2241
2304
|
"notes.load-failed": "Project notes could not be loaded; the editor stays disabled.",
|
|
@@ -2304,6 +2367,10 @@ var WEB_SETTINGS_LOG_AREAS = defineLogAreas({
|
|
|
2304
2367
|
"web.settings": {
|
|
2305
2368
|
description: "The settings screens.",
|
|
2306
2369
|
events: {
|
|
2370
|
+
"self-improvement.status-failed": "Settings → Self-improvement could not read the status.",
|
|
2371
|
+
"self-improvement.projects-failed": "Settings → Self-improvement could not list the projects.",
|
|
2372
|
+
"self-improvement.save-failed": "Settings → Self-improvement could not save a setting.",
|
|
2373
|
+
"self-improvement.run-failed": "Settings → Self-improvement could not start a run.",
|
|
2307
2374
|
"config.save-failed": "Global settings could not be saved.",
|
|
2308
2375
|
"config.load-failed": "The settings page could not load the config.",
|
|
2309
2376
|
"config.reload-failed": "Re-reading the workspace config after a save failed.",
|
|
@@ -2473,6 +2540,7 @@ var LOG_VOCABULARY = {
|
|
|
2473
2540
|
...HOST_LOG_AREAS,
|
|
2474
2541
|
...TRANSCRIPT_ARTIFACTS_LOG_AREAS,
|
|
2475
2542
|
...SCHEDULER_LOG_AREAS,
|
|
2543
|
+
...SELF_IMPROVEMENT_LOG_AREAS,
|
|
2476
2544
|
...WEB_APP_LOG_AREAS,
|
|
2477
2545
|
...WEB_BUILD_PIPELINE_LOG_AREAS,
|
|
2478
2546
|
...WEB_CHAT_LOG_AREAS,
|
|
@@ -2594,6 +2662,14 @@ var SIGNALS = new Set([
|
|
|
2594
2662
|
"SIGXFSZ"
|
|
2595
2663
|
]);
|
|
2596
2664
|
var PROVIDERS = new Set(["claude", "codex", "opencode", "cursor", "grok", "acp", "pi"]);
|
|
2665
|
+
var BRIDGE_LISTENER_REASONS = new Set([
|
|
2666
|
+
"different-socket",
|
|
2667
|
+
"several-sockets",
|
|
2668
|
+
"pending",
|
|
2669
|
+
"scan-incomplete",
|
|
2670
|
+
"no-listener",
|
|
2671
|
+
"launch-exited"
|
|
2672
|
+
]);
|
|
2597
2673
|
var UUID = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
|
|
2598
2674
|
var SOURCE = new RegExp(`^(?:claude|codex|opencode|cursor|grok|acp|pi):${UUID}$`, "i");
|
|
2599
2675
|
var STORAGE_DATABASES = new Set(["main", "ledger", "other"]);
|
|
@@ -3203,11 +3279,10 @@ function setLiveBridgeDiagnostics(enabled) {
|
|
|
3203
3279
|
for (const scope of Array.from(liveScopes))
|
|
3204
3280
|
scope.syncActive();
|
|
3205
3281
|
}
|
|
3206
|
-
function bridgeDebugEnabled(
|
|
3282
|
+
function bridgeDebugEnabled(_bridge, env = process.env) {
|
|
3207
3283
|
if (liveDiagnostics !== undefined && env === process.env)
|
|
3208
3284
|
return liveDiagnostics;
|
|
3209
|
-
|
|
3210
|
-
return readBridgeDebugFlag(value);
|
|
3285
|
+
return readBridgeDebugFlag(env.ORKESTRATOR_BRIDGE_DEBUG);
|
|
3211
3286
|
}
|
|
3212
3287
|
function safeDiagnosticMetrics(value) {
|
|
3213
3288
|
const result = {};
|
|
@@ -11628,6 +11703,59 @@ var PROTECTED_SEGMENTS = new Set([
|
|
|
11628
11703
|
".mcp.json"
|
|
11629
11704
|
]);
|
|
11630
11705
|
|
|
11706
|
+
// ../protocol/src/agent-mail.ts
|
|
11707
|
+
var AGENT_MAIL_MAX_BODY_BYTES = 32 * 1024;
|
|
11708
|
+
var AGENT_MAIL_MAX_STORE_BYTES = 32 * 1024 * 1024;
|
|
11709
|
+
var AGENT_MAIL_DEFAULT_RETENTION_DAYS = 14;
|
|
11710
|
+
var AGENT_MAIL_MAX_ATTACHMENT_BYTES = 8 * 1024 * 1024;
|
|
11711
|
+
var AGENT_MAIL_MAX_TOTAL_ATTACHMENT_BYTES = 32 * 1024 * 1024;
|
|
11712
|
+
var AGENT_MAIL_DEFAULT_AUTONOMOUS_WAKE_BUDGET = 16;
|
|
11713
|
+
var AGENT_MAIL_DEFAULT_HOURLY_WAKE_LIMIT = 40;
|
|
11714
|
+
var ORKESTRATOR_MCP_SERVER_NAME = "orkestrator";
|
|
11715
|
+
var AGENT_MAIL_TOOL_NAMES = Object.freeze([
|
|
11716
|
+
"list_mailboxes",
|
|
11717
|
+
"send_message",
|
|
11718
|
+
"check_inbox",
|
|
11719
|
+
"read_message",
|
|
11720
|
+
"ack_message",
|
|
11721
|
+
"reply_message",
|
|
11722
|
+
"get_message_status"
|
|
11723
|
+
]);
|
|
11724
|
+
var DEFAULT_AGENT_MESSAGING_SETTINGS = Object.freeze({
|
|
11725
|
+
enabled: true,
|
|
11726
|
+
allowCrossProject: false,
|
|
11727
|
+
defaultInjectPolicy: "off",
|
|
11728
|
+
wakePeers: false,
|
|
11729
|
+
autonomousWakeBudget: AGENT_MAIL_DEFAULT_AUTONOMOUS_WAKE_BUDGET,
|
|
11730
|
+
hourlyWakeLimit: AGENT_MAIL_DEFAULT_HOURLY_WAKE_LIMIT,
|
|
11731
|
+
coordinatorStatusWakes: "settled",
|
|
11732
|
+
retentionDays: AGENT_MAIL_DEFAULT_RETENTION_DAYS,
|
|
11733
|
+
paused: false
|
|
11734
|
+
});
|
|
11735
|
+
function agentMailCapabilities(tabType, agent, locked = true) {
|
|
11736
|
+
if (tabType === "agent-native") {
|
|
11737
|
+
if (!locked || !agent)
|
|
11738
|
+
return { canPull: false, canSend: false, canInject: false };
|
|
11739
|
+
if (agent === "claude" || agent === "codex" || agent === "opencode" || agent === "pi" || agent === "cursor" || agent === "grok") {
|
|
11740
|
+
return { canPull: true, canSend: true, canInject: true };
|
|
11741
|
+
}
|
|
11742
|
+
return { canPull: false, canSend: false, canInject: false };
|
|
11743
|
+
}
|
|
11744
|
+
if (tabType === "claude-tmux")
|
|
11745
|
+
return { canPull: true, canSend: true, canInject: true };
|
|
11746
|
+
if (tabType === "pipeline-worker") {
|
|
11747
|
+
return agent ? { canPull: true, canSend: true, canInject: true } : { canPull: false, canSend: false, canInject: false };
|
|
11748
|
+
}
|
|
11749
|
+
if (["claude", "codex", "opencode"].includes(tabType)) {
|
|
11750
|
+
return { canPull: true, canSend: true, canInject: false };
|
|
11751
|
+
}
|
|
11752
|
+
if (["cursor", "grok", "pi"].includes(tabType)) {
|
|
11753
|
+
return { canPull: false, canSend: false, canInject: false };
|
|
11754
|
+
}
|
|
11755
|
+
return { canPull: false, canSend: false, canInject: false };
|
|
11756
|
+
}
|
|
11757
|
+
var NATIVE_AGENT_MAIL_CAPABILITIES = Object.freeze(Object.fromEntries(AGENT_PLATFORMS.map((agent) => [agent, agentMailCapabilities("agent-native", agent)])));
|
|
11758
|
+
|
|
11631
11759
|
// ../protocol/src/review-evidence-frames.ts
|
|
11632
11760
|
var COORDINATOR_WORKER_NO_PR_INSTRUCTION = "Do not open a pull request, even if the prompt below asks you to: commit your work and report back. Orkestrator raises the pull request from a PR tab once the work has been reviewed.";
|
|
11633
11761
|
var COORDINATOR_WORKER_VALIDATION_INSTRUCTION = "Run the focused checks your changes need and report them. When the prompt below says review follows, leave the required full test suite, typecheck, lint and build passes to review preparation unless it explicitly asks you to run them. When no review follows or the prompt does not say, follow the repository's validation requirements before handoff. Report any required full validation you did not run; do not assume a later review will run it.";
|
|
@@ -12198,6 +12326,11 @@ var BACKGROUND_CAPABLE_SHELL_TOOL_NAMES = new Set([
|
|
|
12198
12326
|
"run_terminal_cmd",
|
|
12199
12327
|
"execute_command"
|
|
12200
12328
|
]);
|
|
12329
|
+
var NATIVE_AGENT_BRANCH_LIST_LIMITS = Object.freeze({
|
|
12330
|
+
branches: 50,
|
|
12331
|
+
promptChars: 280,
|
|
12332
|
+
entryIdChars: 512
|
|
12333
|
+
});
|
|
12201
12334
|
var NATIVE_AGENT_COMMAND_EXECUTION_KINDS = [
|
|
12202
12335
|
"provider-prompt",
|
|
12203
12336
|
"provider-command",
|
|
@@ -12347,59 +12480,6 @@ function startParentWatchdog(options) {
|
|
|
12347
12480
|
return stop;
|
|
12348
12481
|
}
|
|
12349
12482
|
|
|
12350
|
-
// ../protocol/src/agent-mail.ts
|
|
12351
|
-
var AGENT_MAIL_MAX_BODY_BYTES = 32 * 1024;
|
|
12352
|
-
var AGENT_MAIL_MAX_STORE_BYTES = 32 * 1024 * 1024;
|
|
12353
|
-
var AGENT_MAIL_DEFAULT_RETENTION_DAYS = 14;
|
|
12354
|
-
var AGENT_MAIL_MAX_ATTACHMENT_BYTES = 8 * 1024 * 1024;
|
|
12355
|
-
var AGENT_MAIL_MAX_TOTAL_ATTACHMENT_BYTES = 32 * 1024 * 1024;
|
|
12356
|
-
var AGENT_MAIL_DEFAULT_AUTONOMOUS_WAKE_BUDGET = 16;
|
|
12357
|
-
var AGENT_MAIL_DEFAULT_HOURLY_WAKE_LIMIT = 40;
|
|
12358
|
-
var ORKESTRATOR_MCP_SERVER_NAME = "orkestrator";
|
|
12359
|
-
var AGENT_MAIL_TOOL_NAMES = Object.freeze([
|
|
12360
|
-
"list_mailboxes",
|
|
12361
|
-
"send_message",
|
|
12362
|
-
"check_inbox",
|
|
12363
|
-
"read_message",
|
|
12364
|
-
"ack_message",
|
|
12365
|
-
"reply_message",
|
|
12366
|
-
"get_message_status"
|
|
12367
|
-
]);
|
|
12368
|
-
var DEFAULT_AGENT_MESSAGING_SETTINGS = Object.freeze({
|
|
12369
|
-
enabled: true,
|
|
12370
|
-
allowCrossProject: false,
|
|
12371
|
-
defaultInjectPolicy: "off",
|
|
12372
|
-
wakePeers: false,
|
|
12373
|
-
autonomousWakeBudget: AGENT_MAIL_DEFAULT_AUTONOMOUS_WAKE_BUDGET,
|
|
12374
|
-
hourlyWakeLimit: AGENT_MAIL_DEFAULT_HOURLY_WAKE_LIMIT,
|
|
12375
|
-
coordinatorStatusWakes: "settled",
|
|
12376
|
-
retentionDays: AGENT_MAIL_DEFAULT_RETENTION_DAYS,
|
|
12377
|
-
paused: false
|
|
12378
|
-
});
|
|
12379
|
-
function agentMailCapabilities(tabType, agent, locked = true) {
|
|
12380
|
-
if (tabType === "agent-native") {
|
|
12381
|
-
if (!locked || !agent)
|
|
12382
|
-
return { canPull: false, canSend: false, canInject: false };
|
|
12383
|
-
if (agent === "claude" || agent === "codex" || agent === "opencode" || agent === "pi" || agent === "cursor" || agent === "grok") {
|
|
12384
|
-
return { canPull: true, canSend: true, canInject: true };
|
|
12385
|
-
}
|
|
12386
|
-
return { canPull: false, canSend: false, canInject: false };
|
|
12387
|
-
}
|
|
12388
|
-
if (tabType === "claude-tmux")
|
|
12389
|
-
return { canPull: true, canSend: true, canInject: true };
|
|
12390
|
-
if (tabType === "pipeline-worker") {
|
|
12391
|
-
return agent ? { canPull: true, canSend: true, canInject: true } : { canPull: false, canSend: false, canInject: false };
|
|
12392
|
-
}
|
|
12393
|
-
if (["claude", "codex", "opencode"].includes(tabType)) {
|
|
12394
|
-
return { canPull: true, canSend: true, canInject: false };
|
|
12395
|
-
}
|
|
12396
|
-
if (["cursor", "grok", "pi"].includes(tabType)) {
|
|
12397
|
-
return { canPull: false, canSend: false, canInject: false };
|
|
12398
|
-
}
|
|
12399
|
-
return { canPull: false, canSend: false, canInject: false };
|
|
12400
|
-
}
|
|
12401
|
-
var NATIVE_AGENT_MAIL_CAPABILITIES = Object.freeze(Object.fromEntries(AGENT_PLATFORMS.map((agent) => [agent, agentMailCapabilities("agent-native", agent)])));
|
|
12402
|
-
|
|
12403
12483
|
// ../protocol/src/transcript-artifacts.ts
|
|
12404
12484
|
var ARTIFACT_TOOL_NAMES = Object.freeze([
|
|
12405
12485
|
"create_artifact",
|
|
@@ -19111,7 +19191,7 @@ async function loadPersistedState() {
|
|
|
19111
19191
|
} catch {
|
|
19112
19192
|
throw new Error("ACP persisted state is malformed");
|
|
19113
19193
|
}
|
|
19114
|
-
if (!isObject3(parsed) || parsed.version !==
|
|
19194
|
+
if (!isObject3(parsed) || parsed.version !== 3 || parsed.provider !== provider || !Array.isArray(parsed.sessions)) {
|
|
19115
19195
|
throw new Error("ACP persisted state is incompatible");
|
|
19116
19196
|
}
|
|
19117
19197
|
const restored = [];
|
|
@@ -25020,6 +25100,11 @@ async function forkAcpSession(state, upToMessageId, signal) {
|
|
|
25020
25100
|
}
|
|
25021
25101
|
}
|
|
25022
25102
|
|
|
25103
|
+
// ../protocol/src/terminal-text.ts
|
|
25104
|
+
var MAX_STRING_LENGTH = 8 * 1024;
|
|
25105
|
+
var BUDGET_FLOOR = 4 * 1024;
|
|
25106
|
+
var MAX_MOVE = 4 * 1024;
|
|
25107
|
+
|
|
25023
25108
|
// ../protocol/src/human-prompts.ts
|
|
25024
25109
|
var HUMAN_PROMPT_SCAN_BYTES = 16 * 1024;
|
|
25025
25110
|
var HUMAN_PROMPT_KINDS = new Set([
|
|
@@ -25472,6 +25557,27 @@ async function readWorkspaceImage(filePath, workspaceRoot) {
|
|
|
25472
25557
|
}
|
|
25473
25558
|
}
|
|
25474
25559
|
|
|
25560
|
+
// ../protocol/src/contract/ipc-error.ts
|
|
25561
|
+
var REGISTERED_ERROR_CODES = {
|
|
25562
|
+
"unknown-command": { domain: "text", command: "text" },
|
|
25563
|
+
"unsupported-version": { domain: "text", range: "range", command: "text" },
|
|
25564
|
+
"unsupported-field": { domain: "text", field: "text", command: "text" },
|
|
25565
|
+
"kanban-request-id-conflict": { record: "text" },
|
|
25566
|
+
"native-job-receipt-capacity": { limit: "count" },
|
|
25567
|
+
"native-agent-provider-session-missing": {},
|
|
25568
|
+
"container-lifecycle": { reason: "text" },
|
|
25569
|
+
"mcp-management": { reason: "text" },
|
|
25570
|
+
"pane-layout-revision-conflict": {},
|
|
25571
|
+
"design-revision-conflict": {},
|
|
25572
|
+
"prompt-queue-message-conflict": {},
|
|
25573
|
+
"unknown-node": {},
|
|
25574
|
+
"node-admin-refused": {},
|
|
25575
|
+
"node-scope-closed": {},
|
|
25576
|
+
"node-unavailable": {}
|
|
25577
|
+
};
|
|
25578
|
+
var REGISTERED_ERROR_CODE_LIST = Object.keys(REGISTERED_ERROR_CODES);
|
|
25579
|
+
var MAX_COUNT = 2 ** 31 - 1;
|
|
25580
|
+
|
|
25475
25581
|
// ../protocol/src/mcp-management.ts
|
|
25476
25582
|
var MCP_CONFIG_REPORTING_VERSION = 1;
|
|
25477
25583
|
var MCP_MANAGEMENT_LIMITS = {
|
|
@@ -26048,26 +26154,53 @@ function acpTranscriptSource(state, generation) {
|
|
|
26048
26154
|
};
|
|
26049
26155
|
}
|
|
26050
26156
|
|
|
26157
|
+
// ../protocol/src/node/bounded-wait.ts
|
|
26158
|
+
function boundedWait(work, timeoutMs, options = {}) {
|
|
26159
|
+
return new Promise((resolve, reject) => {
|
|
26160
|
+
let timedOut = false;
|
|
26161
|
+
const timer = setTimeout(() => {
|
|
26162
|
+
timedOut = true;
|
|
26163
|
+
resolve({ settled: false });
|
|
26164
|
+
}, timeoutMs);
|
|
26165
|
+
unrefTimer(timer);
|
|
26166
|
+
Promise.resolve(work).then((value) => {
|
|
26167
|
+
if (!timedOut) {
|
|
26168
|
+
clearTimeout(timer);
|
|
26169
|
+
resolve({ settled: true, value });
|
|
26170
|
+
return;
|
|
26171
|
+
}
|
|
26172
|
+
disposeLate(options.onLate, value);
|
|
26173
|
+
}, (error) => {
|
|
26174
|
+
if (!timedOut) {
|
|
26175
|
+
clearTimeout(timer);
|
|
26176
|
+
reject(error);
|
|
26177
|
+
}
|
|
26178
|
+
});
|
|
26179
|
+
});
|
|
26180
|
+
}
|
|
26181
|
+
function unrefTimer(timer) {
|
|
26182
|
+
const handle = timer;
|
|
26183
|
+
if (typeof handle === "object" && typeof handle.unref === "function")
|
|
26184
|
+
handle.unref();
|
|
26185
|
+
}
|
|
26186
|
+
function disposeLate(onLate, value) {
|
|
26187
|
+
if (!onLate)
|
|
26188
|
+
return;
|
|
26189
|
+
try {
|
|
26190
|
+
const disposal = onLate(value);
|
|
26191
|
+
if (disposal && typeof disposal.then === "function") {
|
|
26192
|
+
Promise.resolve(disposal).catch(() => {
|
|
26193
|
+
return;
|
|
26194
|
+
});
|
|
26195
|
+
}
|
|
26196
|
+
} catch {}
|
|
26197
|
+
}
|
|
26198
|
+
|
|
26051
26199
|
// ../../bridges/acp-bridge/src/acp-session-close.ts
|
|
26052
26200
|
var closesInFlight = new Map;
|
|
26053
26201
|
function exited(process2) {
|
|
26054
26202
|
return process2.child.exitCode !== null || process2.child.signalCode !== null;
|
|
26055
26203
|
}
|
|
26056
|
-
async function within(promise, timeoutMs) {
|
|
26057
|
-
let timer;
|
|
26058
|
-
try {
|
|
26059
|
-
return await Promise.race([
|
|
26060
|
-
promise,
|
|
26061
|
-
new Promise((resolve) => {
|
|
26062
|
-
timer = setTimeout(() => resolve("timeout"), timeoutMs);
|
|
26063
|
-
timer.unref?.();
|
|
26064
|
-
})
|
|
26065
|
-
]);
|
|
26066
|
-
} finally {
|
|
26067
|
-
if (timer)
|
|
26068
|
-
clearTimeout(timer);
|
|
26069
|
-
}
|
|
26070
|
-
}
|
|
26071
26204
|
function denyPendingRequests(state) {
|
|
26072
26205
|
for (const approval of Array.from(state.approvals.values()))
|
|
26073
26206
|
approval.respond();
|
|
@@ -26098,15 +26231,15 @@ async function runClose(state) {
|
|
|
26098
26231
|
}
|
|
26099
26232
|
const children = new Set;
|
|
26100
26233
|
if (state.attaching) {
|
|
26101
|
-
const late = await
|
|
26102
|
-
if (late
|
|
26234
|
+
const late = await boundedWait(state.attaching.then((child) => child, () => null), CLOSE_ATTACH_WAIT_MS);
|
|
26235
|
+
if (!late.settled)
|
|
26103
26236
|
return "pending";
|
|
26104
|
-
if (late)
|
|
26105
|
-
children.add(late);
|
|
26237
|
+
if (late.value)
|
|
26238
|
+
children.add(late.value);
|
|
26106
26239
|
}
|
|
26107
26240
|
const settlement = state.status === "running" ? state.turnSettlement : undefined;
|
|
26108
26241
|
if (settlement)
|
|
26109
|
-
await
|
|
26242
|
+
await boundedWait(settlement, CLOSE_CANCEL_WAIT_MS);
|
|
26110
26243
|
const live = state.child;
|
|
26111
26244
|
if (live?.sessionCloseSupported && !exited(live)) {
|
|
26112
26245
|
await live.request("session/close", { sessionId: state.acpSessionId }, CLOSE_SESSION_WAIT_MS).catch(() => {
|
|
@@ -27058,18 +27191,6 @@ ${structuredPromptInstruction(schema)}` : prompt;
|
|
|
27058
27191
|
error: "Session close did not complete"
|
|
27059
27192
|
});
|
|
27060
27193
|
}
|
|
27061
|
-
if (!action && request.method === "DELETE") {
|
|
27062
|
-
if (state.closing) {
|
|
27063
|
-
return await closeSessionRetaining(state) === "closed" ? json(response, 200, { deleted: true }) : json(response, 503, { error: "Session close did not complete" });
|
|
27064
|
-
}
|
|
27065
|
-
denyPendingRequests(state);
|
|
27066
|
-
await state.child?.close();
|
|
27067
|
-
sessions.delete(state.id);
|
|
27068
|
-
if (state.clientSessionKey)
|
|
27069
|
-
clientSessionKeys.delete(state.clientSessionKey);
|
|
27070
|
-
await persistState();
|
|
27071
|
-
return json(response, 200, { deleted: true });
|
|
27072
|
-
}
|
|
27073
27194
|
return json(response, 405, { error: "Method not allowed" });
|
|
27074
27195
|
}
|
|
27075
27196
|
function authenticated(request) {
|
|
@@ -27083,8 +27204,6 @@ function authenticated(request) {
|
|
|
27083
27204
|
function isTrustedBridgeOrigin(origin) {
|
|
27084
27205
|
if (!origin)
|
|
27085
27206
|
return true;
|
|
27086
|
-
if (origin === "null" || origin === "file://")
|
|
27087
|
-
return true;
|
|
27088
27207
|
try {
|
|
27089
27208
|
const parsed = new URL(origin);
|
|
27090
27209
|
return (parsed.protocol === "http:" || parsed.protocol === "https:") && (parsed.hostname === "127.0.0.1" || parsed.hostname === "localhost" || parsed.hostname === "::1" || parsed.hostname === "[::1]");
|
|
@@ -27092,33 +27211,10 @@ function isTrustedBridgeOrigin(origin) {
|
|
|
27092
27211
|
return false;
|
|
27093
27212
|
}
|
|
27094
27213
|
}
|
|
27095
|
-
function requestPathname(request) {
|
|
27096
|
-
try {
|
|
27097
|
-
return new URL(request.url || "/", `http://${request.headers.host || "localhost"}`).pathname;
|
|
27098
|
-
} catch {
|
|
27099
|
-
return "";
|
|
27100
|
-
}
|
|
27101
|
-
}
|
|
27102
27214
|
function applyOriginPolicy(request, response) {
|
|
27103
|
-
|
|
27104
|
-
if (!isTrustedBridgeOrigin(origin)) {
|
|
27105
|
-
json(response, 403, { error: "Origin is not allowed" });
|
|
27106
|
-
return false;
|
|
27107
|
-
}
|
|
27108
|
-
const unauthenticatedRoute = requestPathname(request) === "/global/health";
|
|
27109
|
-
if (origin)
|
|
27110
|
-
response.setHeader("Vary", "Origin");
|
|
27111
|
-
if (origin && !unauthenticatedRoute) {
|
|
27112
|
-
response.setHeader("Access-Control-Allow-Origin", origin);
|
|
27113
|
-
}
|
|
27114
|
-
if (request.method !== "OPTIONS")
|
|
27215
|
+
if (isTrustedBridgeOrigin(request.headers.origin))
|
|
27115
27216
|
return true;
|
|
27116
|
-
response
|
|
27117
|
-
"Access-Control-Allow-Methods": "GET, POST, DELETE, OPTIONS",
|
|
27118
|
-
"Access-Control-Allow-Headers": `Content-Type, Authorization, ${ACP_TOKEN_HEADER}`,
|
|
27119
|
-
"Access-Control-Allow-Private-Network": "true"
|
|
27120
|
-
});
|
|
27121
|
-
response.end();
|
|
27217
|
+
json(response, 403, { error: "Origin is not allowed" });
|
|
27122
27218
|
return false;
|
|
27123
27219
|
}
|
|
27124
27220
|
function decodePathSegment(segment) {
|
|
@@ -27694,7 +27790,6 @@ export {
|
|
|
27694
27790
|
renderAcpToolSource,
|
|
27695
27791
|
renderDiffHunks,
|
|
27696
27792
|
requestGrokInterjection,
|
|
27697
|
-
requestPathname,
|
|
27698
27793
|
requestPromptWithRetriableProviderRetries,
|
|
27699
27794
|
restoreCursorTodosFromMessages,
|
|
27700
27795
|
restorePersistedPolicy,
|