orkestrator 2.36.6-beta → 2.37.0-alpha
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/THIRD_PARTY_NOTICES.txt +1038 -0
- package/dist/artifact-runtime/chart.umd.min.js +14 -0
- package/dist/artifact-runtime/d3.min.js +2 -0
- package/dist/artifact-runtime/licenses/chart.js@4.5.1/@kurkle/color/LICENSE.md +9 -0
- package/dist/artifact-runtime/licenses/chart.js@4.5.1/LICENSE.md +9 -0
- package/dist/artifact-runtime/licenses/d3@7.9.0/LICENSE +13 -0
- package/dist/artifact-runtime/licenses/dompurify@3.4.17/LICENSE +202 -0
- package/dist/artifact-runtime/licenses/dompurify@3.4.17/LICENSE-MPL +373 -0
- package/dist/artifact-runtime/licenses/mermaid@12.2.0/LICENSE +21 -0
- package/dist/artifact-runtime/licenses/pdfjs-dist-worker@6.4.299/LICENSE +177 -0
- package/dist/artifact-runtime/licenses/pdfjs-dist@6.4.299/LICENSE +177 -0
- package/dist/artifact-runtime/mermaid.min.js +4330 -0
- package/dist/artifact-runtime/pdf.min.mjs +28 -0
- package/dist/artifact-runtime/pdf.worker.min.mjs +28 -0
- package/dist/artifact-runtime/preview-worker.js +2043 -0
- package/dist/artifact-runtime/purify.min.js +7 -0
- package/dist/artifact-runtime/seccomp_profile.json +701 -0
- package/dist/artifact-runtime/worker-context/Dockerfile +41 -0
- package/dist/artifact-runtime/worker-context/THIRD_PARTY_NOTICES.txt +1038 -0
- package/dist/artifact-runtime/worker-context/chart.umd.min.js +14 -0
- package/dist/artifact-runtime/worker-context/d3.min.js +2 -0
- package/dist/artifact-runtime/worker-context/licenses/chart.js@4.5.1/@kurkle/color/LICENSE.md +9 -0
- package/dist/artifact-runtime/worker-context/licenses/chart.js@4.5.1/LICENSE.md +9 -0
- package/dist/artifact-runtime/worker-context/licenses/d3@7.9.0/LICENSE +13 -0
- package/dist/artifact-runtime/worker-context/licenses/dompurify@3.4.17/LICENSE +202 -0
- package/dist/artifact-runtime/worker-context/licenses/dompurify@3.4.17/LICENSE-MPL +373 -0
- package/dist/artifact-runtime/worker-context/licenses/mermaid@12.2.0/LICENSE +21 -0
- package/dist/artifact-runtime/worker-context/licenses/pdfjs-dist-worker@6.4.299/LICENSE +177 -0
- package/dist/artifact-runtime/worker-context/licenses/pdfjs-dist@6.4.299/LICENSE +177 -0
- package/dist/artifact-runtime/worker-context/mermaid.min.js +4330 -0
- package/dist/artifact-runtime/worker-context/package-lock.json +25 -0
- package/dist/artifact-runtime/worker-context/package.json +8 -0
- package/dist/artifact-runtime/worker-context/pdf.min.mjs +28 -0
- package/dist/artifact-runtime/worker-context/pdf.worker.min.mjs +28 -0
- package/dist/artifact-runtime/worker-context/preview-worker.mjs +2042 -0
- package/dist/artifact-runtime/worker-context/purify.min.js +7 -0
- package/dist/artifact-runtime/worker-context/seccomp_profile.json +701 -0
- package/dist/client.js +442 -116
- package/dist/main.js +92413 -58360
- package/package.json +4 -4
- package/resources/acp-bridge/dist/index.js +169 -21
- package/resources/claude-bridge/dist/index.js +2560 -2226
- package/resources/codex-bridge/dist/index.js +222 -16
- package/resources/cursor-bridge/dist/index.js +152 -10
- package/resources/cursor-bridge/runtime/bun.lock +8 -8
- package/resources/cursor-bridge/runtime/install.json +1 -1
- package/resources/cursor-bridge/runtime/package.json +2 -2
- package/resources/cursor-bridge/runtime/patches/@cursor%2Fsdk@1.3.1.patch +19 -0
- package/resources/pi-bridge/dist/index.js +544 -70
- package/resources/pi-bridge/runtime/bun.lock +36 -32
- package/resources/pi-bridge/runtime/install.json +1 -1
- package/resources/pi-bridge/runtime/package.json +3 -3
- package/resources/release-runtime/bun.lock +11 -11
- package/resources/release-runtime/package.json +1 -1
- package/resources/cursor-bridge/runtime/patches/@cursor%2Fsdk@1.2.0.patch +0 -19
|
@@ -413,6 +413,29 @@ var SOURCE_SCOPE_LABELS = Object.freeze({
|
|
|
413
413
|
agent: "an agent definition",
|
|
414
414
|
sdk: "the agent host"
|
|
415
415
|
});
|
|
416
|
+
var TOOL_HINT_KEYS = ["readOnly", "destructive", "idempotent", "openWorld"];
|
|
417
|
+
var TOOL_HINT_KEY_SET = new Set(TOOL_HINT_KEYS);
|
|
418
|
+
var MCP_TOOL_ANNOTATION_KEYS = Object.freeze({
|
|
419
|
+
readOnly: "readOnlyHint",
|
|
420
|
+
destructive: "destructiveHint",
|
|
421
|
+
idempotent: "idempotentHint",
|
|
422
|
+
openWorld: "openWorldHint"
|
|
423
|
+
});
|
|
424
|
+
function toolHintsFrom(value, keyFor) {
|
|
425
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
426
|
+
return;
|
|
427
|
+
const source = value;
|
|
428
|
+
const hints = {};
|
|
429
|
+
for (const key of TOOL_HINT_KEYS) {
|
|
430
|
+
const declared = source[keyFor(key)];
|
|
431
|
+
if (typeof declared === "boolean")
|
|
432
|
+
hints[key] = declared;
|
|
433
|
+
}
|
|
434
|
+
return Object.keys(hints).length > 0 ? hints : undefined;
|
|
435
|
+
}
|
|
436
|
+
function agentInteractionToolHintsFromMcpAnnotations(annotations) {
|
|
437
|
+
return toolHintsFrom(annotations, (key) => MCP_TOOL_ANNOTATION_KEYS[key]);
|
|
438
|
+
}
|
|
416
439
|
var UNATTENDED_POLICY_INSTRUCTION = "This is a non-interactive build session: no user can answer a provider input request. " + "If input is unavailable or declined, choose the safest likely assumption yourself, " + "state that assumption, and continue. Never treat the absence of a person as authorization.";
|
|
417
440
|
var INTERACTIVE_AGENT_INTERACTION_POLICY = Object.freeze({
|
|
418
441
|
version: AGENT_INTERACTION_POLICY_VERSION,
|
|
@@ -489,7 +512,9 @@ var REQUEST_KEYS = new Set([
|
|
|
489
512
|
"updatedAt",
|
|
490
513
|
"expiresAt",
|
|
491
514
|
"hold",
|
|
492
|
-
"source"
|
|
515
|
+
"source",
|
|
516
|
+
"humanRequired",
|
|
517
|
+
"toolHints"
|
|
493
518
|
]);
|
|
494
519
|
var SOURCE_KEYS = new Set(["kind", "name", "scope"]);
|
|
495
520
|
var SOURCE_KINDS = new Set(AGENT_INTERACTION_SOURCE_KINDS);
|
|
@@ -716,6 +741,11 @@ function withheldGitHubCredentialEnvironment(env, options) {
|
|
|
716
741
|
|
|
717
742
|
// ../protocol/src/native-agent-steer-rejection.ts
|
|
718
743
|
var MAX_STEER_JOURNAL_BYTES = 1024 * 1024 * 1024;
|
|
744
|
+
// ../protocol/src/native-agent-cost-source.ts
|
|
745
|
+
var NATIVE_AGENT_COST_SOURCES = Object.freeze([
|
|
746
|
+
"provider",
|
|
747
|
+
"estimate"
|
|
748
|
+
]);
|
|
719
749
|
// ../protocol/src/native-agent.ts
|
|
720
750
|
var DEFAULT_REASONING_ID = "default";
|
|
721
751
|
var FALLBACK_REASONING_ID = "high";
|
|
@@ -1125,6 +1155,7 @@ var BACKEND_LOG_AREAS = defineLogAreas({
|
|
|
1125
1155
|
"startup.deletion-pending": "An interrupted environment deletion stays pending. Its owning step logged the detail.",
|
|
1126
1156
|
"startup.looped-review-pending": "Cleanup of the retired Looped Review stays pending.",
|
|
1127
1157
|
"notice.failed": "A background notice after a turn or prompt failed; `step` says which.",
|
|
1158
|
+
"command.slow": "A registered command took at least 2 s to settle, or its synchronous part held the event loop for at least 250 ms (then at warn): `command`, `durationMs`, `syncMs` and `outcome`. Repeats of one command within a minute are folded into the next line.",
|
|
1128
1159
|
"artifacts.live-unavailable": "Live interactive artifacts are unavailable.",
|
|
1129
1160
|
"previous-run": {
|
|
1130
1161
|
description: "This start read how the previous run ended: `outcome` is `clean` when it reached the end of shutdown and `crashed` when it did not, `ranForMs` its length and `lastSeenAgoMs` the time since its last health row.",
|
|
@@ -1203,6 +1234,7 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
1203
1234
|
"context-usage.read-failed": "The detailed context usage read failed; the route falls back.",
|
|
1204
1235
|
"dispatch.rollback-failed": "Rolling back a prompt dispatch claim failed.",
|
|
1205
1236
|
"event-subscriber.failed": "An event subscriber threw; other subscribers still ran.",
|
|
1237
|
+
"hook.boundary-failed-closed": "A PreToolUse hook that holds a boundary threw, so the tool call was denied.",
|
|
1206
1238
|
"http.request-failed": "An HTTP route threw; it answered 500.",
|
|
1207
1239
|
"mcp.config-ignored": "An MCP server configuration of an unsupported shape was ignored.",
|
|
1208
1240
|
"mcp.read-failed": "Listing MCP servers failed; the route answered 500.",
|
|
@@ -1380,6 +1412,7 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
1380
1412
|
essential: true,
|
|
1381
1413
|
fields: ESSENTIAL_ERROR_FIELDS
|
|
1382
1414
|
},
|
|
1415
|
+
"session.write-lost": "Pi could not write its session file, so a resume may miss part of the conversation; logged once per session, with no error message because it names the path.",
|
|
1383
1416
|
"turn.failed": "A turn failed; its error message is not logged because it can hold content. A cancelled turn is not a failure.",
|
|
1384
1417
|
"turn.refused": "Pi refused a prompt before starting a run, so nothing ran; its error message is not logged because it can hold content.",
|
|
1385
1418
|
"turn.startup-timed-out": "Pi did not start a turn within its startup deadline, so the prompt was abandoned."
|
|
@@ -1387,6 +1420,18 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
1387
1420
|
}
|
|
1388
1421
|
});
|
|
1389
1422
|
|
|
1423
|
+
// ../protocol/src/log-vocabulary/contract.ts
|
|
1424
|
+
var CONTRACT_LOG_AREAS = defineLogAreas({
|
|
1425
|
+
contract: {
|
|
1426
|
+
description: "Versioned command and event contracts: domain ranges a peer's hello advertises, typed backend events.",
|
|
1427
|
+
events: {
|
|
1428
|
+
"hello.domains-malformed": "A peer's hello carried a `domains` field outside its bounds, so the peer is treated as pre-contract. `reason` only, never names or values.",
|
|
1429
|
+
"listen.payload-invalid": "A client dropped a received event whose payload did not decode against its contract definition. `event` (the name, or a family's prefix) only, never payload values.",
|
|
1430
|
+
"event.invalid": "Development only: the backend emitted an event whose payload, key or definition failed its contract check; it was still delivered. `event` (the name, or a family's prefix) and `error` (`payload` or the check that failed), never payload values."
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
});
|
|
1434
|
+
|
|
1390
1435
|
// ../protocol/src/log-vocabulary/desktop.ts
|
|
1391
1436
|
var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
1392
1437
|
desktop: {
|
|
@@ -1418,7 +1463,12 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
1418
1463
|
minLevel: "error",
|
|
1419
1464
|
fields: { lagMs: "number", intervalMs: "number" }
|
|
1420
1465
|
},
|
|
1466
|
+
"process-memory": "Development only: working set per Electron process type, sampled on an interval.",
|
|
1467
|
+
"process-memory.failed": "Development only: one process memory sample could not be read.",
|
|
1421
1468
|
"quit.stopping-backend": "The app is quitting and has asked the Local backend to stop.",
|
|
1469
|
+
"realm-partitions.list-failed": "The partitions directory could not be read, so retired workspace realm storage stays until the next start.",
|
|
1470
|
+
"realm-partitions.remove-failed": "Some retired workspace realm storage directories could not be removed; count says how many.",
|
|
1471
|
+
"realm-partitions.removed": "Retired workspace realm storage was removed at startup; count says how many directories.",
|
|
1422
1472
|
"relaunch.schedule-failed": "The AppImage relaunch waiter failed; using Electron's relauncher.",
|
|
1423
1473
|
"relaunch.service-register-failed": "The AppImage relaunch service was refused; using a detached waiter.",
|
|
1424
1474
|
"renderer.gone-giving-up": "A renderer kept dying, so the window is no longer reloaded.",
|
|
@@ -1456,7 +1506,7 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
1456
1506
|
}
|
|
1457
1507
|
},
|
|
1458
1508
|
"desktop.permissions": {
|
|
1459
|
-
description: "Permission requests refused on the renderer
|
|
1509
|
+
description: "Permission requests refused on the renderer's session.",
|
|
1460
1510
|
events: {
|
|
1461
1511
|
denied: "A renderer asked for a permission the policy does not grant."
|
|
1462
1512
|
}
|
|
@@ -1490,9 +1540,11 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
1490
1540
|
}
|
|
1491
1541
|
},
|
|
1492
1542
|
workspaces: {
|
|
1493
|
-
description: "
|
|
1543
|
+
description: "Node workspaces (node scopes) the desktop holds on other machines.",
|
|
1494
1544
|
events: {
|
|
1495
|
-
"route.moved-direct": "A relayed workspace moved to its direct route."
|
|
1545
|
+
"route.moved-direct": "A relayed workspace moved to its direct route.",
|
|
1546
|
+
"workspace.opened": "The command node issued a node workspace grant; durationMs is the open_node_workspace call.",
|
|
1547
|
+
"workspace.route-probed": "One route of a node workspace was probed; outcome is fixed, durationMs the probe."
|
|
1496
1548
|
}
|
|
1497
1549
|
},
|
|
1498
1550
|
toolchain: {
|
|
@@ -1866,10 +1918,21 @@ var RUNTIME_LOG_AREAS = defineLogAreas({
|
|
|
1866
1918
|
description: "This process's event loop. A stall of 10 seconds or more is written at error, so no level hides it.",
|
|
1867
1919
|
events: {
|
|
1868
1920
|
stalled: {
|
|
1869
|
-
description: "A timer fired late, so every request in that window waited.",
|
|
1921
|
+
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, and `blockingCommand` one whose synchronous part overlapped it.",
|
|
1870
1922
|
essential: true,
|
|
1871
1923
|
minLevel: "error",
|
|
1872
|
-
fields: {
|
|
1924
|
+
fields: {
|
|
1925
|
+
lagMs: "number",
|
|
1926
|
+
intervalMs: "number",
|
|
1927
|
+
storageMs: "number",
|
|
1928
|
+
storageDatabase: "label",
|
|
1929
|
+
storageOp: "label",
|
|
1930
|
+
storageTable: "label",
|
|
1931
|
+
storageLongestMs: "number",
|
|
1932
|
+
storageBusy: "boolean",
|
|
1933
|
+
commandsInFlight: "number",
|
|
1934
|
+
blockingCommandMs: "number"
|
|
1935
|
+
}
|
|
1873
1936
|
}
|
|
1874
1937
|
}
|
|
1875
1938
|
},
|
|
@@ -1901,6 +1964,7 @@ var TERMINAL_LOG_AREAS = defineLogAreas({
|
|
|
1901
1964
|
events: {
|
|
1902
1965
|
"input.undelivered": "A keystroke did not reach a shell: `no-session` or `not-delivered`.",
|
|
1903
1966
|
"orphan.reaped": "A terminal no tab references was closed.",
|
|
1967
|
+
"container-shell.close-failed": "Ending a closed container terminal's in-container shell failed; the next shell start sweeps its record.",
|
|
1904
1968
|
"agent-completion.notify-failed": "A terminal agent's completion could not be reported.",
|
|
1905
1969
|
"activity.record-failed": "Terminal environment activity could not be recorded.",
|
|
1906
1970
|
"pty.exit-listener-failed": "A terminal exit listener threw; the others still run.",
|
|
@@ -2073,6 +2137,7 @@ var UPDATER_LOG_AREAS = defineLogAreas({
|
|
|
2073
2137
|
"check.failed": "An update check failed; the next periodic check retries.",
|
|
2074
2138
|
"download.failed": "Downloading or staging an update failed.",
|
|
2075
2139
|
downloaded: "An update finished downloading.",
|
|
2140
|
+
"release.not-ready": "The newest release has no update files for this platform yet, so the check uses the one before it.",
|
|
2076
2141
|
"library.message": "One line from electron-updater at its own level. Its debug output, which includes the differential download plan, is off by default.",
|
|
2077
2142
|
"remote.check-failed": "A check a remote client requested failed.",
|
|
2078
2143
|
"remote.installing": "Installing an update for a remote client.",
|
|
@@ -2167,6 +2232,24 @@ var STORAGE_LOG_AREAS = defineLogAreas({
|
|
|
2167
2232
|
"scrub.vacuum-failed": "Deleted-content page reclamation failed; the checkpoint is attempted independently.",
|
|
2168
2233
|
"scrub.checkpoint-failed": "Deleted content could not be scrubbed from the WAL yet because the truncating checkpoint failed or a reader held an older snapshot; it is retried without waiting until it succeeds.",
|
|
2169
2234
|
"upkeep.vacuum-failed": "Periodic page reclamation failed; the next upkeep pass retries.",
|
|
2235
|
+
"upkeep.finished": "One periodic upkeep pass ended: `optimizeMs` is how long refreshing planner statistics held the event loop, `released` and `left` the free pages returned and still free, `releaseMs` the release child's run and `stop` why it ended (`done`, `budget`, `busy`, `no-progress`, `slow-step`, `not-incremental`, `no-free-pages`, `failed`).",
|
|
2236
|
+
"operation.slow": {
|
|
2237
|
+
description: "A synchronous SQLite call or transaction held the event loop for at least 250 ms. `database` is `main` or `ledger`, `op` the statement kind or `transaction`, `table` its table (a transaction's slowest statement's), `durationMs` the whole call; a transaction adds `mode`, `beginMs` (waiting for the write lock), `sqlMs` (its statements) and `commitMs`. `busy` means the busy timeout ran out. Repeats of one series within 10 s are folded into the next line.",
|
|
2238
|
+
essential: true,
|
|
2239
|
+
fields: {
|
|
2240
|
+
database: "label",
|
|
2241
|
+
op: "label",
|
|
2242
|
+
table: "label",
|
|
2243
|
+
mode: "label",
|
|
2244
|
+
durationMs: "number",
|
|
2245
|
+
beginMs: "number",
|
|
2246
|
+
sqlMs: "number",
|
|
2247
|
+
commitMs: "number",
|
|
2248
|
+
busy: "boolean",
|
|
2249
|
+
folded: "number",
|
|
2250
|
+
foldedMaxMs: "number"
|
|
2251
|
+
}
|
|
2252
|
+
},
|
|
2170
2253
|
"optimize.failed": "Refreshing the query planner's statistics failed; queries still run and the next check retries.",
|
|
2171
2254
|
"ledger.moved": "The change-tracking ledger was moved out of the main database into its own file; `rows` and `durationMs` say how much and how long.",
|
|
2172
2255
|
"snapshot.top-tables-failed": "The sampled table sizes from a finished snapshot could not be saved; the snapshot stands and the next one retries.",
|
|
@@ -2352,6 +2435,8 @@ var REVIEW_LOG_AREAS = defineLogAreas({
|
|
|
2352
2435
|
"monitor.state-clear-failed": "A pull request's saved state could not be cleared.",
|
|
2353
2436
|
"monitor.task-reconcile-failed": "Updating the Kanban task of a merged or closed (`state`) pull request failed.",
|
|
2354
2437
|
"monitor.task-store-failed": "A pull request could not be recorded on its Kanban task.",
|
|
2438
|
+
"monitor.merged-tickets-closed": "The startup sweep moved Kanban tickets whose pull request had merged to done (`count`).",
|
|
2439
|
+
"monitor.merged-tickets-close-failed": "The startup sweep closing Kanban tickets whose pull request merged failed; the next backend start retries.",
|
|
2355
2440
|
"monitor.emit-failed": "A pull request monitor event could not be emitted to its sink."
|
|
2356
2441
|
}
|
|
2357
2442
|
}
|
|
@@ -2381,6 +2466,7 @@ var AGENT_ACCOUNTS_LOG_AREAS = defineLogAreas({
|
|
|
2381
2466
|
"limit-stop-notice.failed": "A session's usage-limit stop could not be reported.",
|
|
2382
2467
|
"switch-notice.failed": "A notice about an automatic account switch failed; the switch stands. `audience` says whose.",
|
|
2383
2468
|
"auto-switch.check-failed": "An automatic account check failed; the next nudge retries.",
|
|
2469
|
+
"kept-note.failed": "Recording why a limit stop found no account to move to failed; the stop stands.",
|
|
2384
2470
|
"container-sync.failed": "Handing a login or account to a container failed; `step` says which part.",
|
|
2385
2471
|
"last-usage.save-failed": "The last plan usage reading could not be saved; the next save retries.",
|
|
2386
2472
|
"login-cleanup.failed": "A temporary login could not be cleaned up.",
|
|
@@ -2579,12 +2665,16 @@ var NODES_LOG_AREAS = defineLogAreas({
|
|
|
2579
2665
|
"verification.record-failed": "A node verification could not be recorded.",
|
|
2580
2666
|
"profile.record-failed": "A node profile could not be recorded.",
|
|
2581
2667
|
"detach.unconfirmed": "A forgotten node has not confirmed the detach yet.",
|
|
2668
|
+
"grant.scope-disagreement": "Debug only, for one release: the grant allow-list and the old deny-lists disagree on a command.",
|
|
2582
2669
|
"grant.revocation-listener-failed": "A connection could not be told its client grant was removed; the grant is still gone.",
|
|
2583
2670
|
"handover.recovery-pending": "Command handover recovery is still pending.",
|
|
2584
2671
|
"ticket-sync.work-record-failed": "A remote build started but its ticket work location could not be saved.",
|
|
2585
2672
|
"ticket-sync.failed": "A Kanban sync with a node failed; it is retried.",
|
|
2586
2673
|
"ticket-sync.unknown-project": "A node sent ticket changes for a project that no longer exists here.",
|
|
2587
|
-
"ticket-sync.forget-failed": "A detached command node's ticket copies could not be released."
|
|
2674
|
+
"ticket-sync.forget-failed": "A detached command node's ticket copies could not be released.",
|
|
2675
|
+
"fleet-update.requested": "The update policy asked an older leaf to install the command node's version.",
|
|
2676
|
+
"fleet-update.failed": "The update policy could not read or update a leaf; it retries later.",
|
|
2677
|
+
"fleet-update.policy-load-failed": "The stored update policy could not be read; it is off."
|
|
2588
2678
|
}
|
|
2589
2679
|
}
|
|
2590
2680
|
});
|
|
@@ -3033,7 +3123,8 @@ var WEB_SHELL_LOG_AREAS = defineLogAreas({
|
|
|
3033
3123
|
description: "Loading the renderer, after the desktop connection check.",
|
|
3034
3124
|
events: {
|
|
3035
3125
|
"renderer.load-failed": "Importing or mounting the application failed.",
|
|
3036
|
-
"model-catalogue.restore-failed": "The cached model catalogue could not be restored; bundled fallbacks stay in use."
|
|
3126
|
+
"model-catalogue.restore-failed": "The cached model catalogue could not be restored; bundled fallbacks stay in use.",
|
|
3127
|
+
"model-catalogue.seed-failed": "The background model-catalogue seed failed; cached catalogues stay in use."
|
|
3037
3128
|
}
|
|
3038
3129
|
},
|
|
3039
3130
|
"web.window": {
|
|
@@ -3056,6 +3147,18 @@ var WEB_SHELL_LOG_AREAS = defineLogAreas({
|
|
|
3056
3147
|
|
|
3057
3148
|
// ../protocol/src/log-vocabulary/web-sync.ts
|
|
3058
3149
|
var WEB_SYNC_LOG_AREAS = defineLogAreas({
|
|
3150
|
+
"web.node-snapshot": {
|
|
3151
|
+
description: "Bounded local snapshots of each node's light stores, for snapshot-first paint.",
|
|
3152
|
+
events: {
|
|
3153
|
+
"read-failed": "Reading a node's snapshot failed; the node opens without one.",
|
|
3154
|
+
"write-failed": "Writing a node's snapshot failed; the next interval tries again.",
|
|
3155
|
+
refused: "A snapshot broke the content rules or the per-node byte bound; nothing was written.",
|
|
3156
|
+
evicted: "Least recently used snapshots were dropped to keep the total bounds.",
|
|
3157
|
+
"clear-failed": "Dropping one or every snapshot failed.",
|
|
3158
|
+
"command-hydrated": "The window's command scope was filled from its snapshot before its services started.",
|
|
3159
|
+
"command-discarded": "The command node proved another id than its snapshot's; the snapshot's data was taken back."
|
|
3160
|
+
}
|
|
3161
|
+
},
|
|
3059
3162
|
"web.resource-sync": {
|
|
3060
3163
|
description: "Keeping renderer stores current with backend resources.",
|
|
3061
3164
|
events: {
|
|
@@ -3112,6 +3215,15 @@ var WEB_SYNC_LOG_AREAS = defineLogAreas({
|
|
|
3112
3215
|
"event-handler.failed": "A handler for an event relayed from a node failed.",
|
|
3113
3216
|
"environment.start-failed": "Starting an environment opened in a workspace window failed."
|
|
3114
3217
|
}
|
|
3218
|
+
},
|
|
3219
|
+
"web.node-scope": {
|
|
3220
|
+
description: "Per-node renderer scopes: their services, stores and cleanup.",
|
|
3221
|
+
events: {
|
|
3222
|
+
"service.failed": "A scoped service threw; only it stopped and its scope is marked failed.",
|
|
3223
|
+
"finalizer.failed": "A cleanup step of a scope, service or store threw; the rest still ran.",
|
|
3224
|
+
"workspace.render-failed": "A node's workspace in the window's tree failed to render; only it shows an error.",
|
|
3225
|
+
"lifecycle.pressure": "Memory pressure moved hidden node scopes down a tier (heavy data dropped, suspended or disposed); counts only."
|
|
3226
|
+
}
|
|
3115
3227
|
}
|
|
3116
3228
|
});
|
|
3117
3229
|
|
|
@@ -3120,6 +3232,7 @@ var LOG_VOCABULARY = {
|
|
|
3120
3232
|
...AGENT_MAIL_LOG_AREAS,
|
|
3121
3233
|
...BACKEND_LOG_AREAS,
|
|
3122
3234
|
...BRIDGE_LOG_AREAS,
|
|
3235
|
+
...CONTRACT_LOG_AREAS,
|
|
3123
3236
|
...DESKTOP_LOG_AREAS,
|
|
3124
3237
|
...ENVIRONMENT_LOG_AREAS,
|
|
3125
3238
|
...GATEWAY_LOG_AREAS,
|
|
@@ -3455,6 +3568,47 @@ var SIGNALS = new Set([
|
|
|
3455
3568
|
var PROVIDERS3 = new Set(["claude", "codex", "opencode", "cursor", "grok", "acp", "pi"]);
|
|
3456
3569
|
var UUID = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
|
|
3457
3570
|
var SOURCE = new RegExp(`^(?:claude|codex|opencode|cursor|grok|acp|pi):${UUID}$`, "i");
|
|
3571
|
+
var STORAGE_DATABASES = new Set(["main", "ledger", "other"]);
|
|
3572
|
+
var STORAGE_OPERATIONS = new Set([
|
|
3573
|
+
"select",
|
|
3574
|
+
"insert",
|
|
3575
|
+
"update",
|
|
3576
|
+
"delete",
|
|
3577
|
+
"pragma",
|
|
3578
|
+
"schema",
|
|
3579
|
+
"vacuum",
|
|
3580
|
+
"transaction",
|
|
3581
|
+
"other"
|
|
3582
|
+
]);
|
|
3583
|
+
var TRANSACTION_MODES = new Set(["deferred", "immediate", "exclusive"]);
|
|
3584
|
+
var STORAGE_TABLES = new Set([
|
|
3585
|
+
"stores",
|
|
3586
|
+
"store_rows",
|
|
3587
|
+
"storage_meta",
|
|
3588
|
+
"leases",
|
|
3589
|
+
"store_rows_owner",
|
|
3590
|
+
"store_rows_position",
|
|
3591
|
+
"sqlite_master",
|
|
3592
|
+
"sqlite_schema",
|
|
3593
|
+
"dbstat",
|
|
3594
|
+
"analysis_limit",
|
|
3595
|
+
"auto_vacuum",
|
|
3596
|
+
"busy_timeout",
|
|
3597
|
+
"foreign_keys",
|
|
3598
|
+
"freelist_count",
|
|
3599
|
+
"incremental_vacuum",
|
|
3600
|
+
"integrity_check",
|
|
3601
|
+
"journal_mode",
|
|
3602
|
+
"journal_size_limit",
|
|
3603
|
+
"optimize",
|
|
3604
|
+
"page_count",
|
|
3605
|
+
"page_size",
|
|
3606
|
+
"quick_check",
|
|
3607
|
+
"secure_delete",
|
|
3608
|
+
"synchronous",
|
|
3609
|
+
"user_version",
|
|
3610
|
+
"wal_checkpoint"
|
|
3611
|
+
]);
|
|
3458
3612
|
|
|
3459
3613
|
// ../protocol/src/log-essential.ts
|
|
3460
3614
|
var vocabulary = LOG_VOCABULARY;
|
|
@@ -4304,6 +4458,7 @@ import { createHash as createHash3 } from "node:crypto";
|
|
|
4304
4458
|
// ../protocol/src/event-loop-stall-monitor.ts
|
|
4305
4459
|
var log2 = createLogger("event-loop");
|
|
4306
4460
|
var EVENT_LOOP_STALL_ALWAYS_LOG_MS = 1e4;
|
|
4461
|
+
var contextSources = new Set;
|
|
4307
4462
|
|
|
4308
4463
|
// ../protocol/src/node/bridge-diagnostics.ts
|
|
4309
4464
|
var log3 = createLogger("bridge.diagnostics");
|
|
@@ -17603,6 +17758,7 @@ var COORDINATOR_CONTROL_TOOL_NAMES = Object.freeze([
|
|
|
17603
17758
|
"create_pr",
|
|
17604
17759
|
"create_schedule",
|
|
17605
17760
|
"create_ticket",
|
|
17761
|
+
"create_ticket_label",
|
|
17606
17762
|
"custom_fix_multi_review",
|
|
17607
17763
|
"edit_worker_tab",
|
|
17608
17764
|
"fork_worker",
|
|
@@ -17636,6 +17792,7 @@ var COORDINATOR_CONTROL_TOOL_NAMES = Object.freeze([
|
|
|
17636
17792
|
"list_provider_accounts",
|
|
17637
17793
|
"list_schedules",
|
|
17638
17794
|
"list_tabs",
|
|
17795
|
+
"list_ticket_labels",
|
|
17639
17796
|
"list_tickets",
|
|
17640
17797
|
"list_worker_commands",
|
|
17641
17798
|
"list_workflows",
|
|
@@ -17660,6 +17817,7 @@ var COORDINATOR_CONTROL_TOOL_NAMES = Object.freeze([
|
|
|
17660
17817
|
"run_worker_command",
|
|
17661
17818
|
"send_message",
|
|
17662
17819
|
"send_prompt_to_tab",
|
|
17820
|
+
"set_ticket_label",
|
|
17663
17821
|
"set_worker_goal",
|
|
17664
17822
|
"start_build_pipeline",
|
|
17665
17823
|
"start_environment",
|
|
@@ -22276,6 +22434,9 @@ function commandActionsText(value) {
|
|
|
22276
22434
|
return commands.length > 0 ? [...new Set(commands)].join(`
|
|
22277
22435
|
`) : undefined;
|
|
22278
22436
|
}
|
|
22437
|
+
function isHumanCommand(method, params) {
|
|
22438
|
+
return method === "item/commandExecution/requestApproval" && params.kind === "humanCommand";
|
|
22439
|
+
}
|
|
22279
22440
|
function describeApproval(options) {
|
|
22280
22441
|
const params = isRecord10(options.params) ? options.params : {};
|
|
22281
22442
|
const kind = options.method === "item/permissions/requestApproval" ? "permissions" : options.method === "item/fileChange/requestApproval" || options.method === "applyPatchApproval" ? "file-change" : "command";
|
|
@@ -22292,7 +22453,8 @@ function describeApproval(options) {
|
|
|
22292
22453
|
const command = commandText(params.command) ?? commandActionsText(params.commandActions);
|
|
22293
22454
|
const v2Command = options.method === "item/commandExecution/requestApproval" && (params.kind === undefined || params.kind === null || params.kind === "command");
|
|
22294
22455
|
const exactCommand = v2Command && typeof params.command === "string" && params.command.length > 0;
|
|
22295
|
-
const
|
|
22456
|
+
const humanRequired = isHumanCommand(options.method, params);
|
|
22457
|
+
const ruleEligible = !humanRequired && (networkContext !== undefined ? v2Command && (exactCommand || command === undefined) : kind === "command" ? exactCommand : kind === "file-change" ? str2(params.grantRoot) === undefined : false);
|
|
22296
22458
|
const proposal = exactCommand ? proposedPrefix(params.proposedExecpolicyAmendment) : undefined;
|
|
22297
22459
|
const actionable = kind === "command" ? command !== undefined || networkContext !== undefined : kind === "file-change" ? Boolean(changes?.length) : permissions !== undefined && (permissions.network || permissions.fileSystem);
|
|
22298
22460
|
return {
|
|
@@ -22312,17 +22474,19 @@ function describeApproval(options) {
|
|
|
22312
22474
|
...str2(params.reason) ? { reason: str2(params.reason) } : {},
|
|
22313
22475
|
...str2(params.grantRoot) ? { grantRoot: str2(params.grantRoot) } : {},
|
|
22314
22476
|
...networkContext ? { networkHost: networkContext } : {},
|
|
22315
|
-
supportsApproveForSession:
|
|
22477
|
+
supportsApproveForSession: !humanRequired,
|
|
22316
22478
|
actionable,
|
|
22317
22479
|
...ruleEligible ? { ruleEligible: true } : {},
|
|
22318
|
-
...
|
|
22480
|
+
...humanRequired ? { humanRequired: true } : {},
|
|
22481
|
+
...proposal && !humanRequired ? { proposedCommandPrefix: proposal } : {}
|
|
22319
22482
|
};
|
|
22320
22483
|
}
|
|
22321
22484
|
function buildApprovalResponse(method, decision, rawParams) {
|
|
22322
22485
|
switch (method) {
|
|
22323
22486
|
case "item/commandExecution/requestApproval":
|
|
22324
22487
|
case "item/fileChange/requestApproval": {
|
|
22325
|
-
const
|
|
22488
|
+
const oneTimeOnly = isHumanCommand(method, isRecord10(rawParams) ? rawParams : {});
|
|
22489
|
+
const wire = decision === "approve" ? "accept" : decision === "approve-for-session" ? oneTimeOnly ? "accept" : "acceptForSession" : decision === "cancel" ? "cancel" : "decline";
|
|
22326
22490
|
return { result: { decision: wire } };
|
|
22327
22491
|
}
|
|
22328
22492
|
case "execCommandApproval":
|
|
@@ -22486,6 +22650,14 @@ class InteractionDeadline {
|
|
|
22486
22650
|
}
|
|
22487
22651
|
|
|
22488
22652
|
// ../../bridges/codex-bridge/src/app-server/interactions.ts
|
|
22653
|
+
var CODEX_APPROVAL_KIND_KEY = "codex_approval_kind";
|
|
22654
|
+
var CODEX_MCP_TOOL_CALL_APPROVAL = "mcp_tool_call";
|
|
22655
|
+
function mcpToolApprovalHints(meta) {
|
|
22656
|
+
const fields = record(meta);
|
|
22657
|
+
if (fields[CODEX_APPROVAL_KIND_KEY] !== CODEX_MCP_TOOL_CALL_APPROVAL)
|
|
22658
|
+
return;
|
|
22659
|
+
return agentInteractionToolHintsFromMcpAnnotations(fields.tool_annotations);
|
|
22660
|
+
}
|
|
22489
22661
|
function isInteractionAnswerMap(value) {
|
|
22490
22662
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
22491
22663
|
return false;
|
|
@@ -22582,6 +22754,7 @@ function describeInteraction(options) {
|
|
|
22582
22754
|
if (mode !== "form" && mode !== "openai/form" && mode !== "openaiForm" && mode !== "url") {
|
|
22583
22755
|
return null;
|
|
22584
22756
|
}
|
|
22757
|
+
const toolHints = mode === "url" ? undefined : mcpToolApprovalHints(params._meta);
|
|
22585
22758
|
return {
|
|
22586
22759
|
interactionId: options.interactionId,
|
|
22587
22760
|
kind: mode === "url" ? "mcp-url" : "mcp-form",
|
|
@@ -22598,7 +22771,8 @@ function describeInteraction(options) {
|
|
|
22598
22771
|
...mode === "url" ? {
|
|
22599
22772
|
url: text(params.url),
|
|
22600
22773
|
elicitationId: text(params.elicitationId)
|
|
22601
|
-
} : { schema: params.requestedSchema }
|
|
22774
|
+
} : { schema: params.requestedSchema },
|
|
22775
|
+
...toolHints ? { toolHints } : {}
|
|
22602
22776
|
};
|
|
22603
22777
|
}
|
|
22604
22778
|
function buildInteractionResponse(request, answer) {
|
|
@@ -23173,6 +23347,7 @@ var IGNORED_METHODS = new Set([
|
|
|
23173
23347
|
"thread/goal/cleared",
|
|
23174
23348
|
"thread/environment/connected",
|
|
23175
23349
|
"thread/environment/disconnected",
|
|
23350
|
+
"thread/section/changed",
|
|
23176
23351
|
"hook/started",
|
|
23177
23352
|
"hook/completed",
|
|
23178
23353
|
"item/autoApprovalReview/started",
|
|
@@ -24691,7 +24866,7 @@ function coordinatorCapabilityPolicy(mode) {
|
|
|
24691
24866
|
// ../../bridges/codex-bridge/src/codex-config.ts
|
|
24692
24867
|
import { existsSync as existsSync3, readdirSync as readdirSync4, realpathSync, statSync as statSync2 } from "node:fs";
|
|
24693
24868
|
import { homedir as homedir3 } from "node:os";
|
|
24694
|
-
import { isAbsolute as isAbsolute8, join as join18, relative as relative3, sep } from "node:path";
|
|
24869
|
+
import { isAbsolute as isAbsolute8, join as join18, normalize, relative as relative3, sep } from "node:path";
|
|
24695
24870
|
|
|
24696
24871
|
// ../../bridges/codex-bridge/src/shell-exclusions.ts
|
|
24697
24872
|
import { closeSync as closeSync3, openSync as openSync3, readSync as readSync3, fstatSync as fstatSync3 } from "node:fs";
|
|
@@ -25079,7 +25254,26 @@ var CODEX_COORDINATOR_SHELL_EXCLUDE = Object.freeze([
|
|
|
25079
25254
|
"CODEX_BRIDGE_READABLE_RUNTIME_ROOT"
|
|
25080
25255
|
])
|
|
25081
25256
|
]);
|
|
25082
|
-
function
|
|
25257
|
+
function codexCoordinatorTmpDenials(options) {
|
|
25258
|
+
if ((options.platform ?? process.platform) !== "linux")
|
|
25259
|
+
return { tmpdir: true, slashTmp: true };
|
|
25260
|
+
const grants = options.readRoots.filter((root) => isAbsolute8(root));
|
|
25261
|
+
const slashTmp = !grants.some((root) => isLexicallyWithin(root, "/tmp"));
|
|
25262
|
+
const tmpdir = options.tmpdir && isAbsolute8(options.tmpdir) ? options.tmpdir : undefined;
|
|
25263
|
+
if (!tmpdir)
|
|
25264
|
+
return { tmpdir: true, slashTmp };
|
|
25265
|
+
const nested = slashTmp && isLexicallyWithin(tmpdir, "/tmp") && !isLexicallyWithin("/tmp", tmpdir);
|
|
25266
|
+
return {
|
|
25267
|
+
tmpdir: !nested && !grants.some((root) => isLexicallyWithin(root, tmpdir)),
|
|
25268
|
+
slashTmp
|
|
25269
|
+
};
|
|
25270
|
+
}
|
|
25271
|
+
function isLexicallyWithin(path, parent) {
|
|
25272
|
+
const child = normalize(path).replace(/(.)\/+$/, "$1");
|
|
25273
|
+
const root = normalize(parent).replace(/(.)\/+$/, "$1");
|
|
25274
|
+
return child === root || child.startsWith(root === "/" ? "/" : `${root}/`);
|
|
25275
|
+
}
|
|
25276
|
+
function codexAppServerConfigOverrides(env = process.env, platform = process.platform) {
|
|
25083
25277
|
const userExclusions = configuredShellExclusions(env);
|
|
25084
25278
|
const childLimit = resolveCodexMaxConcurrentThreads(env[CODEX_MAX_CONCURRENT_THREADS_ENV]);
|
|
25085
25279
|
const overrides = {
|
|
@@ -25101,8 +25295,20 @@ function codexAppServerConfigOverrides(env = process.env) {
|
|
|
25101
25295
|
if (!permissionProfile || !/^[A-Za-z0-9_-]+$/.test(permissionProfile) || !readableRuntimeRoot || !isAbsolute8(readableRuntimeRoot) || !projectRoot || !isAbsolute8(projectRoot)) {
|
|
25102
25296
|
throw new Error("Coordinator Codex permission profile configuration is invalid");
|
|
25103
25297
|
}
|
|
25298
|
+
const skillReadRoots = codexCoordinatorSkillReadRoots(env);
|
|
25299
|
+
const grantedAttachmentRoot = attachmentRoot && isAbsolute8(attachmentRoot) ? attachmentRoot : undefined;
|
|
25300
|
+
const tmpDenials = codexCoordinatorTmpDenials({
|
|
25301
|
+
tmpdir: env.TMPDIR,
|
|
25302
|
+
readRoots: [
|
|
25303
|
+
projectRoot,
|
|
25304
|
+
readableRuntimeRoot,
|
|
25305
|
+
...grantedAttachmentRoot ? [grantedAttachmentRoot] : [],
|
|
25306
|
+
...skillReadRoots
|
|
25307
|
+
],
|
|
25308
|
+
platform
|
|
25309
|
+
});
|
|
25104
25310
|
overrides.default_permissions = JSON.stringify(permissionProfile);
|
|
25105
|
-
overrides[`permissions.${permissionProfile}.filesystem`] = `{ ":root" = "deny", ":minimal" = "read", ":tmpdir" = "deny", ` + `":slash_tmp" = "deny",
|
|
25311
|
+
overrides[`permissions.${permissionProfile}.filesystem`] = `{ ":root" = "deny", ":minimal" = "read", ` + (tmpDenials.tmpdir ? `":tmpdir" = "deny", ` : "") + (tmpDenials.slashTmp ? `":slash_tmp" = "deny", ` : "") + `${JSON.stringify(readableRuntimeRoot)} = "read", ` + (grantedAttachmentRoot ? `${JSON.stringify(grantedAttachmentRoot)} = "read", ` : "") + skillReadRoots.map((root) => `${JSON.stringify(root)} = "read", `).join("") + `":workspace_roots" = { "." = "read" } }`;
|
|
25106
25312
|
overrides[`permissions.${permissionProfile}.network.enabled`] = "false";
|
|
25107
25313
|
overrides.web_search = JSON.stringify(codexNetworkDeniedSearchMode(codexCoordinatorPolicy(env)));
|
|
25108
25314
|
overrides["features.standalone_web_search"] = "false";
|