orkestrator 2.36.0 → 2.36.2-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/client.js +339 -23
- package/dist/main.js +10532 -4435
- package/package.json +3 -3
- package/resources/acp-bridge/dist/index.js +634 -429
- package/resources/claude-bridge/dist/index.js +548 -147
- package/resources/codex-bridge/dist/index.js +1919 -1260
- package/resources/cursor-bridge/dist/index.js +587 -42
- package/resources/cursor-bridge/runtime/install.json +1 -1
- package/resources/pi-bridge/dist/index.js +738 -103
- package/resources/pi-bridge/runtime/install.json +1 -1
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
// ../protocol/src/log-vocabulary/define.ts
|
|
2
|
+
var ESSENTIAL_ERROR_FIELDS = {
|
|
3
|
+
"error.name": "label",
|
|
4
|
+
"error.code": "label",
|
|
5
|
+
"error.errno": "number",
|
|
6
|
+
"error.syscall": "label",
|
|
7
|
+
"error.exitCode": "number",
|
|
8
|
+
"error.signal": "label",
|
|
9
|
+
"error.outputOmitted": "boolean",
|
|
10
|
+
"error.errorCount": "number"
|
|
11
|
+
};
|
|
2
12
|
var THROTTLE_LOG_EVENTS = {
|
|
3
13
|
"throttle.suppressed": "Repeats of the throttled `site` were counted over a window, not written.",
|
|
4
14
|
"throttle.recovered": "The throttled `site` succeeded again, so its fault has cleared.",
|
|
@@ -48,7 +58,11 @@ var BACKEND_LOG_AREAS = defineLogAreas({
|
|
|
48
58
|
backend: {
|
|
49
59
|
description: "The backend process: startup, background notices and shutdown.",
|
|
50
60
|
events: {
|
|
51
|
-
starting:
|
|
61
|
+
starting: {
|
|
62
|
+
description: "The backend process is starting.",
|
|
63
|
+
essential: true,
|
|
64
|
+
fields: { version: "label" }
|
|
65
|
+
},
|
|
52
66
|
"ssh-socket.resolved": "An SSH agent socket was found.",
|
|
53
67
|
"ssh-socket.missing": "No usable SSH agent socket was found.",
|
|
54
68
|
"standalone-updater.mismatch": "--standalone-updater does not match --data-dir, so self-update is off.",
|
|
@@ -63,8 +77,16 @@ var BACKEND_LOG_AREAS = defineLogAreas({
|
|
|
63
77
|
"notice.failed": "A background notice after a turn or prompt failed; `step` says which.",
|
|
64
78
|
"artifacts.live-unavailable": "Live interactive artifacts are unavailable.",
|
|
65
79
|
"shutdown.step-failed": "One part of shutdown failed and the rest went on; `step` says which.",
|
|
66
|
-
"shutdown.signal-received":
|
|
67
|
-
|
|
80
|
+
"shutdown.signal-received": {
|
|
81
|
+
description: "A signal started shutdown, which tells a clean quit from the backend being killed.",
|
|
82
|
+
essential: true,
|
|
83
|
+
fields: { signal: "label" }
|
|
84
|
+
},
|
|
85
|
+
"shutdown.finished": {
|
|
86
|
+
description: "Shutdown finished, and the process exits with `code`.",
|
|
87
|
+
essential: true,
|
|
88
|
+
fields: { code: "number" }
|
|
89
|
+
},
|
|
68
90
|
"port-policy.second-backend": "Another backend serves the default data directory, so this one avoids its ports.",
|
|
69
91
|
"port-policy.serve-on-free-port": "--tailscale-serve is on a free gateway port; pass --port with --strict-gateway-port to keep one."
|
|
70
92
|
}
|
|
@@ -107,7 +129,10 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
107
129
|
"evidence.record-failed": "Change evidence could not be recorded; the read loop carries on.",
|
|
108
130
|
"evidence.shell-record-failed": "A shell observation could not be recorded.",
|
|
109
131
|
"evidence.turn-record-failed": "Turn change evidence could not be recorded.",
|
|
132
|
+
"agent.exited": "An ACP agent process exited, with its `code` and `signal`, always at `warn`. `requested` is true when the bridge closed it normally, false for an unrequested or fault-driven exit.",
|
|
133
|
+
"http.route-failed": "An HTTP route answered 500; its error message is not logged because it can hold content.",
|
|
110
134
|
"server.listening": "The HTTP server is listening.",
|
|
135
|
+
"session.policy-widening-refused": "A request tried to widen a live session's execution policy and was refused; widened names the axes.",
|
|
111
136
|
"state.composer-reset": "A saved composer state was malformed and was reset.",
|
|
112
137
|
"state.discarded": "Saved bridge state could not be used and was discarded.",
|
|
113
138
|
"state.persist-failed": "Saving bridge state failed; a later write retries.",
|
|
@@ -161,7 +186,7 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
161
186
|
"session.created": "A session was created or recovered.",
|
|
162
187
|
"session.delete-failed": "Deleting a session failed.",
|
|
163
188
|
"session.fork-failed": "Forking a session failed.",
|
|
164
|
-
"session.policy-widening-refused": "A
|
|
189
|
+
"session.policy-widening-refused": "A request tried to widen a live session's execution policy and was refused; widened names the axes.",
|
|
165
190
|
"session.rename-failed": "Renaming a session failed.",
|
|
166
191
|
"session.resolve-failed": "A session could not be found or loaded for a request; action names the request.",
|
|
167
192
|
"session.rewind-failed": "Rewinding session files failed.",
|
|
@@ -195,6 +220,7 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
195
220
|
"app-server.exited": "app-server exited unexpectedly; the code and signal say how.",
|
|
196
221
|
"app-server.invariant-violation": "app-server asked for something its configuration forbids.",
|
|
197
222
|
"app-server.protocol-violation": "app-server wrote a line that is not valid protocol; it was ignored.",
|
|
223
|
+
"app-server.overflow-restart-failed": "Replacing the child after a notification queue overflow failed; the next request tries again.",
|
|
198
224
|
"app-server.recording": "Notification recording is on; recordings hold content.",
|
|
199
225
|
"app-server.stale-reaped": "A stale app-server left by an earlier bridge was stopped.",
|
|
200
226
|
"app-server.stderr": "Metadata of an app-server stderr line, never its content.",
|
|
@@ -225,6 +251,7 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
225
251
|
"ordered-events.publish-failed": "Publishing an ordered event failed; clients are told to rehydrate.",
|
|
226
252
|
"ordered-events.reconcile-failed": "Reconciling ordered events failed.",
|
|
227
253
|
"parent.gone": "The backend that launched this bridge has gone; stopping turns and shutting down.",
|
|
254
|
+
"queue.overflow": "The notification queue passed a bound and dropped its backlog.",
|
|
228
255
|
"queue.task-failed": "A task on a per-thread queue failed.",
|
|
229
256
|
"raw-log.write-failed": "Appending to the raw Codex log failed.",
|
|
230
257
|
"recorder.notice": "The notification recorder needs attention: it is on, or was asked for without its confirmation.",
|
|
@@ -238,6 +265,7 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
238
265
|
"server-request.flush-timeout": "An answer to a server request did not flush in time.",
|
|
239
266
|
"server-request.handoff-failed": "Handing a server request to the router threw.",
|
|
240
267
|
"session.config-apply-failed": "Applying session configuration failed; the route answers unavailable.",
|
|
268
|
+
"session.policy-widening-refused": "A request tried to widen a live session's execution policy and was refused; widened names the axes.",
|
|
241
269
|
"sse.closed": "An event stream was closed by the bridge; the client reconnects and replays.",
|
|
242
270
|
"sse.keepalive-failed": "An event stream keepalive failed.",
|
|
243
271
|
"sse.observer-failed": "An event stream observer failed; it reconnects.",
|
|
@@ -266,19 +294,39 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
266
294
|
events: {
|
|
267
295
|
"agent.archive-failed": "Archiving or unarchiving an agent failed.",
|
|
268
296
|
"http.route-failed": "An HTTP route failed unexpectedly; its error is not logged because it can hold content.",
|
|
297
|
+
"session.policy-widening-refused": "A request tried to widen a live session's execution policy and was refused; widened names the axes.",
|
|
269
298
|
"startup.closes-failed": "Finishing closes a previous process left behind failed at startup.",
|
|
270
299
|
"startup.closes-incomplete": "Some closes a previous process left behind did not finish at startup; a retried close finishes them.",
|
|
271
300
|
"state.publication-failing": "Saving bridge state is failing; new prompts and steers are refused until it recovers.",
|
|
272
301
|
"state.publication-recovered": "Saving bridge state recovered.",
|
|
273
|
-
"state.transcripts-shortened": "The state file reached its limit, so some sessions were saved with a shortened transcript copy."
|
|
302
|
+
"state.transcripts-shortened": "The state file reached its limit, so some sessions were saved with a shortened transcript copy.",
|
|
303
|
+
"session.resume-fell-back": {
|
|
304
|
+
description: "A saved conversation could not be resumed, so a new one started; its error message is not logged because it can hold content.",
|
|
305
|
+
essential: true,
|
|
306
|
+
fields: ESSENTIAL_ERROR_FIELDS
|
|
307
|
+
},
|
|
308
|
+
"turn.failed": "A turn failed; its error message is not logged because it can hold content. A cancelled turn is not a failure.",
|
|
309
|
+
"turn.recovery-failed": "A run recovered after a bridge restart ended in failure, or could not be followed. A cancelled run is not a failure.",
|
|
310
|
+
"turn.send-failed": "Sending a prompt to Cursor failed, so whether its run started is unknown; its error message is not logged because it can hold content.",
|
|
311
|
+
"turn.timed-out": "A turn outlived its time budget, so its run was asked to cancel; `turn.failed` follows if it never stops."
|
|
274
312
|
}
|
|
275
313
|
},
|
|
276
314
|
"bridge.pi": {
|
|
277
315
|
description: "The Pi bridge: its routes, sessions and saved state.",
|
|
278
316
|
events: {
|
|
279
317
|
"http.route-failed": "An HTTP route failed unexpectedly; its error is not logged because it can hold content.",
|
|
318
|
+
"session.policy-widening-refused": "A request tried to widen a live session's execution policy and was refused; widened names the axes.",
|
|
319
|
+
"session-list.failed": "Reading the resumable sessions failed, so none were offered; its error message is not logged because it can hold content.",
|
|
280
320
|
"state.over-budget": "The state file stayed over budget after shedding transcripts, so the write was skipped.",
|
|
281
|
-
"state.transcripts-shed": "The state file was over budget, so some sessions were saved without their transcript."
|
|
321
|
+
"state.transcripts-shed": "The state file was over budget, so some sessions were saved without their transcript.",
|
|
322
|
+
"session.resume-fell-back": {
|
|
323
|
+
description: "A saved conversation could not be reopened, so a new one started; its error message is not logged because it can hold content.",
|
|
324
|
+
essential: true,
|
|
325
|
+
fields: ESSENTIAL_ERROR_FIELDS
|
|
326
|
+
},
|
|
327
|
+
"turn.failed": "A turn failed; its error message is not logged because it can hold content. A cancelled turn is not a failure.",
|
|
328
|
+
"turn.refused": "Pi refused a prompt before starting a run, so nothing ran; its error message is not logged because it can hold content.",
|
|
329
|
+
"turn.startup-timed-out": "Pi did not start a turn within its startup deadline, so the prompt was abandoned."
|
|
282
330
|
}
|
|
283
331
|
}
|
|
284
332
|
});
|
|
@@ -289,14 +337,31 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
289
337
|
description: "The Electron main process: startup, windows, quit and the Local backend's life.",
|
|
290
338
|
events: {
|
|
291
339
|
"backend.docker-context-seed-failed": "An agent-test profile fell back to the default Docker context.",
|
|
292
|
-
"backend.exited":
|
|
293
|
-
|
|
340
|
+
"backend.exited": {
|
|
341
|
+
description: "The Local backend exited unexpectedly; Local work is unavailable. `error.exitCode` and `error.signal` say how.",
|
|
342
|
+
essential: true,
|
|
343
|
+
fields: ESSENTIAL_ERROR_FIELDS
|
|
344
|
+
},
|
|
345
|
+
"backend.exited-recovering": {
|
|
346
|
+
description: "The Local backend exited just after a remote update; relaunching unattended. `error.exitCode` and `error.signal` say how.",
|
|
347
|
+
essential: true,
|
|
348
|
+
fields: ESSENTIAL_ERROR_FIELDS
|
|
349
|
+
},
|
|
294
350
|
"backend.keychain-link-remove-failed": "An agent-test profile kept a legacy link to the host keychain.",
|
|
295
|
-
"backend.start-failed":
|
|
351
|
+
"backend.start-failed": {
|
|
352
|
+
description: "The Local backend did not start; continuing with remote machines.",
|
|
353
|
+
essential: true,
|
|
354
|
+
fields: ESSENTIAL_ERROR_FIELDS
|
|
355
|
+
},
|
|
296
356
|
"clipboard.write-failed": "Writing text to the system clipboard failed.",
|
|
297
357
|
"dev-mode.ignored-packaged": "A packaged app was launched with ELECTRON_DEV=1 and ignored it; it loads its bundled renderer.",
|
|
298
358
|
"instance.already-running": "Another instance holds this data directory; this one will quit.",
|
|
299
|
-
"main-thread.stalled":
|
|
359
|
+
"main-thread.stalled": {
|
|
360
|
+
description: "A timer fired late, so windows, IPC and the stdout reader waited.",
|
|
361
|
+
essential: true,
|
|
362
|
+
minLevel: "error",
|
|
363
|
+
fields: { lagMs: "number", intervalMs: "number" }
|
|
364
|
+
},
|
|
300
365
|
"quit.stopping-backend": "The app is quitting and has asked the Local backend to stop.",
|
|
301
366
|
"relaunch.schedule-failed": "The AppImage relaunch waiter failed; using Electron's relauncher.",
|
|
302
367
|
"relaunch.service-register-failed": "The AppImage relaunch service was refused; using a detached waiter.",
|
|
@@ -307,7 +372,11 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
307
372
|
"saved-machines.attach-failed": "Saved machines were not imported into the command node yet.",
|
|
308
373
|
"saved-machines.attached": "Saved machines were imported into the local command node.",
|
|
309
374
|
"startup.failed": "The application failed to start.",
|
|
310
|
-
"uncaught-exception":
|
|
375
|
+
"uncaught-exception": {
|
|
376
|
+
description: "The main process hit an uncaught exception.",
|
|
377
|
+
essential: true,
|
|
378
|
+
fields: ESSENTIAL_ERROR_FIELDS
|
|
379
|
+
},
|
|
311
380
|
"uncaught-exception.dialog-failed": "The uncaught exception sheet could not be shown.",
|
|
312
381
|
"window.create-failed": "A menu-driven new window could not be created.",
|
|
313
382
|
"window.recreate-failed": "The main window could not be recreated on activation.",
|
|
@@ -330,6 +399,12 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
330
399
|
"unhandled-rejection": "An unhandled rejection occurred while the renderer was starting."
|
|
331
400
|
}
|
|
332
401
|
},
|
|
402
|
+
"desktop.permissions": {
|
|
403
|
+
description: "Permission requests refused on the renderer and workspace realm sessions.",
|
|
404
|
+
events: {
|
|
405
|
+
denied: "A renderer asked for a permission the policy does not grant."
|
|
406
|
+
}
|
|
407
|
+
},
|
|
333
408
|
"desktop.dialog": {
|
|
334
409
|
description: "Native dialogs, whose modal loops hold the main thread while they are open.",
|
|
335
410
|
events: {
|
|
@@ -448,6 +523,8 @@ var GATEWAY_LOG_AREAS = defineLogAreas({
|
|
|
448
523
|
"loopback.unavailable": "The loopback client listener could not start.",
|
|
449
524
|
"auth-token.stored": "The gateway token's file was written. The path only, never the token.",
|
|
450
525
|
"auth-token.persist-failed": "The gateway token could not be saved.",
|
|
526
|
+
"auth-guess.throttled": "A listener saw enough different wrong tokens that it now pauses new ones. Never the values.",
|
|
527
|
+
"host.refused": "A request named a host this gateway does not answer to. Logged once per name, up to a limit.",
|
|
451
528
|
"port.fallback": "The preferred port was taken, so a nearby one is used.",
|
|
452
529
|
"port.fallback-distant": "The preferred port and those nearby were taken, so another is used.",
|
|
453
530
|
"request.failed": "A gateway request failed. Throttled: repeats are counted, not written.",
|
|
@@ -491,6 +568,22 @@ var LOCAL_SERVER_LOG_AREAS = defineLogAreas({
|
|
|
491
568
|
"bridge-runtime.installed": "A bridge runtime finished installing.",
|
|
492
569
|
"opencode.database-lost-retrying": "OpenCode lost its shared database at startup, so it is retried.",
|
|
493
570
|
"server.stopping": "A local server is being stopped, for the fixed `reason` given.",
|
|
571
|
+
"bridge.started": {
|
|
572
|
+
description: "A local bridge process was spawned; `key` names its kind and environment.",
|
|
573
|
+
essential: true,
|
|
574
|
+
fields: { key: "label", pid: "number" }
|
|
575
|
+
},
|
|
576
|
+
"bridge.exited": {
|
|
577
|
+
description: "A local bridge process exited, with its `code` and `signal`. `warn` when nothing asked it to, whatever the code; `info` when the backend stopped it, which `server.stopping` explains.",
|
|
578
|
+
essential: true,
|
|
579
|
+
fields: {
|
|
580
|
+
key: "label",
|
|
581
|
+
pid: "number",
|
|
582
|
+
code: "number",
|
|
583
|
+
signal: "label",
|
|
584
|
+
requested: "boolean"
|
|
585
|
+
}
|
|
586
|
+
},
|
|
494
587
|
"reaper.tmux-list-failed": "Orphaned claude-tmux sessions could not be listed.",
|
|
495
588
|
"reaper.tmux-kill-failed": "An orphaned tmux session could not be killed.",
|
|
496
589
|
"reaper.tmux-reaped": "Orphaned claude-tmux sessions of a deleted environment were killed.",
|
|
@@ -524,13 +617,29 @@ var LOGGING_LOG_AREAS = defineLogAreas({
|
|
|
524
617
|
"capture.started": "Saving logs to disk began for this process.",
|
|
525
618
|
"capture.stopped": "Saving logs to disk stopped for this process.",
|
|
526
619
|
"config.invalid": "A logging environment variable held a value that was ignored.",
|
|
527
|
-
"entries.dropped":
|
|
620
|
+
"entries.dropped": {
|
|
621
|
+
description: "Entries were dropped and counted, for the fixed `reason` given: the queue was full, a write failed or, in the essential log, one event was repeating too fast.",
|
|
622
|
+
essential: true,
|
|
623
|
+
fields: { entries: "number", bytes: "number", reason: "label" }
|
|
624
|
+
},
|
|
625
|
+
"essential.started": {
|
|
626
|
+
description: "This process began writing the essential log. One with no `essential.stopped` before it means the last writer died.",
|
|
627
|
+
essential: true,
|
|
628
|
+
fields: { owner: "label" }
|
|
629
|
+
},
|
|
630
|
+
"essential.stopped": {
|
|
631
|
+
description: "This process stopped writing the essential log, in an orderly exit.",
|
|
632
|
+
essential: true,
|
|
633
|
+
fields: { owner: "label" }
|
|
634
|
+
},
|
|
635
|
+
"essential.write-failed": "Writing the essential log failed. Its entries are counted, and a marker reports them at the next write that works.",
|
|
528
636
|
"policy.changed": "The logging settings changed: saving, retention and levels, with no content.",
|
|
529
637
|
"policy.bridge-predates-route": "A running bridge has no logging settings route; it applies them at its next start.",
|
|
530
638
|
"policy.push-failed": "A running bridge did not take the logging settings after retries; its next start resends them.",
|
|
531
639
|
"prune.failed": "Removing expired log files failed; the next sweep retries.",
|
|
532
640
|
"write.failed": "Appending to the log file failed.",
|
|
533
|
-
"unknown-area": "Code outside the type checker asked for an area that is not listed."
|
|
641
|
+
"unknown-area": "Code outside the type checker asked for an area that is not listed.",
|
|
642
|
+
...THROTTLE_LOG_EVENTS
|
|
534
643
|
}
|
|
535
644
|
}
|
|
536
645
|
});
|
|
@@ -655,7 +764,28 @@ var RUNTIME_LOG_AREAS = defineLogAreas({
|
|
|
655
764
|
"event-loop": {
|
|
656
765
|
description: "This process's event loop. A stall of 10 seconds or more is written at error, so no level hides it.",
|
|
657
766
|
events: {
|
|
658
|
-
stalled:
|
|
767
|
+
stalled: {
|
|
768
|
+
description: "A timer fired late, so every request in that window waited.",
|
|
769
|
+
essential: true,
|
|
770
|
+
minLevel: "error",
|
|
771
|
+
fields: { lagMs: "number", intervalMs: "number" }
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
process: {
|
|
776
|
+
description: "Failures of a whole process that nothing in it handled.",
|
|
777
|
+
events: {
|
|
778
|
+
"rejection.unhandled": {
|
|
779
|
+
description: "A promise rejection reached the fatal rejection guard, which keeps the process running.",
|
|
780
|
+
essential: true,
|
|
781
|
+
fields: { kind: "label", ...ESSENTIAL_ERROR_FIELDS }
|
|
782
|
+
},
|
|
783
|
+
"uncaught-exception": {
|
|
784
|
+
description: "An exception reached the top of the backend, which is about to die with it. `origin` says whether it was thrown or a rejected top-level await.",
|
|
785
|
+
essential: true,
|
|
786
|
+
fields: { origin: "label", ...ESSENTIAL_ERROR_FIELDS }
|
|
787
|
+
},
|
|
788
|
+
...THROTTLE_LOG_EVENTS
|
|
659
789
|
}
|
|
660
790
|
}
|
|
661
791
|
});
|
|
@@ -893,21 +1023,43 @@ var STORAGE_LOG_AREAS = defineLogAreas({
|
|
|
893
1023
|
description: "The SQLite-backed stores, their snapshots and imports from older formats.",
|
|
894
1024
|
events: {
|
|
895
1025
|
"usage.environment-label-failed": "Usage labels could not be retained for a removed environment; deletion continues.",
|
|
896
|
-
"
|
|
1026
|
+
"migration.failed": {
|
|
1027
|
+
description: "The database could not be brought to this build's schema, so it did not open; `step` says whether the safety copy or the migration itself failed.",
|
|
1028
|
+
essential: true,
|
|
1029
|
+
fields: {
|
|
1030
|
+
fromVersion: "number",
|
|
1031
|
+
toVersion: "number",
|
|
1032
|
+
step: "label",
|
|
1033
|
+
...ESSENTIAL_ERROR_FIELDS
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
"snapshot.integrity-failed": {
|
|
1037
|
+
description: "A database snapshot failed its integrity check and was discarded.",
|
|
1038
|
+
essential: true,
|
|
1039
|
+
fields: {}
|
|
1040
|
+
},
|
|
897
1041
|
"snapshot.skipped-low-disk": "The hourly database snapshot was skipped because the disk lacks room; `retryAt` says when it tries again.",
|
|
898
|
-
"snapshot.failed":
|
|
1042
|
+
"snapshot.failed": {
|
|
1043
|
+
description: "The hourly database snapshot failed; `retryAt` says when it tries again, if known.",
|
|
1044
|
+
essential: true,
|
|
1045
|
+
fields: { retryAt: "label", ...ESSENTIAL_ERROR_FIELDS }
|
|
1046
|
+
},
|
|
899
1047
|
"listener.attention-failed": "An environment attention listener threw; the committed mutation stands.",
|
|
900
1048
|
"listener.change-failed": "A resource change listener threw; the committed mutation stands.",
|
|
901
1049
|
"kanban.image-cleanup-failed": "An orphaned Kanban image could not be removed after its retries; it is safe to remove later.",
|
|
902
1050
|
"nodes.entries-dropped": "Unreadable node registry entries were ignored.",
|
|
903
1051
|
"preview-identity.reminted": "The data directory moved or was copied, so previews get a new backend identity.",
|
|
1052
|
+
"preview-settings.invalid": "Invalid preview settings disabled transport and relay.",
|
|
904
1053
|
"machine-profile.invalid": "The stored machine profile was invalid and the default was restored.",
|
|
905
1054
|
"permission-rules.cleanup-failed": "A deleted project's permission rules could not be removed.",
|
|
906
1055
|
"retired.turn-cleanup-pending": "Cleanup of a retired Looped Review turn did not finish and stays pending.",
|
|
907
1056
|
"handoffs.prune-failed": "Pruning agent handoffs that nothing references failed; a later prune retries.",
|
|
908
1057
|
"desktop-connections.malformed": "Stored desktop connection settings were malformed, so the local connection is used.",
|
|
909
1058
|
"legacy-json.moved": "JSON store files written after the SQLite migration were archived, not imported.",
|
|
910
|
-
"legacy-json.archive-failed": "Imported JSON store files could not be archived."
|
|
1059
|
+
"legacy-json.archive-failed": "Imported JSON store files could not be archived.",
|
|
1060
|
+
"lease.heartbeat-failed": "A held lease's heartbeat failed, which shortens the lease; the next one retries.",
|
|
1061
|
+
"scrub.checkpoint-failed": "Deleted content could not be scrubbed from the WAL because the truncating checkpoint failed or was blocked; the next checkpoint retries.",
|
|
1062
|
+
...THROTTLE_LOG_EVENTS
|
|
911
1063
|
}
|
|
912
1064
|
}
|
|
913
1065
|
});
|
|
@@ -933,6 +1085,7 @@ var BUILD_PIPELINE_LOG_AREAS = defineLogAreas({
|
|
|
933
1085
|
"usage.read-failed": "Reading a stage session's token usage failed.",
|
|
934
1086
|
"checkpoint.deferred": "A stage transcript checkpoint could not be written yet; the provider's history stands.",
|
|
935
1087
|
"checkpoint.not-committed": "A stage transcript checkpoint was reverted in the commit that should have kept it.",
|
|
1088
|
+
"worker-mail.claim-failed": "Mail queued for a worker could not be claimed at its turn end; it stays queued.",
|
|
936
1089
|
"legacy-transcript.deferred": "Moving a legacy inline transcript failed; the inline body stays readable."
|
|
937
1090
|
}
|
|
938
1091
|
}
|
|
@@ -1002,6 +1155,10 @@ var COORDINATOR_LOG_AREAS = defineLogAreas({
|
|
|
1002
1155
|
"wake.resolve-report-failed": "A finished Resolve tab could not be reported.",
|
|
1003
1156
|
"wake.waiting-report-failed": "A waiting worker could not be reported.",
|
|
1004
1157
|
"wake.worker-outcomes-failed": "Coordinator-owned workers' merges and deletions could not be checked; the next sweep retries.",
|
|
1158
|
+
"pr-watch.added": "A pull request a coordinator conversation showed joined the project's watch; `source` says how.",
|
|
1159
|
+
"pr-watch.observe-failed": "A watched pull request could not be observed; the next sweep retries.",
|
|
1160
|
+
"pr-watch.read-failed": "GitHub could not be read for a watched pull request; `code` is the error category.",
|
|
1161
|
+
"pr-watch.removed": "A watched pull request stopped being watched without a reading; `reason` is `deleted` (GitHub confirmed it is gone) or `unreadable` (not found for the give-up period).",
|
|
1005
1162
|
"store.malformed": "The coordinator store was malformed and is treated as empty.",
|
|
1006
1163
|
"store.unsupported-version": "The coordinator store has an unsupported version and is treated as empty.",
|
|
1007
1164
|
"store.invalid-workspace": "An invalid coordinator workspace record was ignored.",
|
|
@@ -1010,8 +1167,10 @@ var COORDINATOR_LOG_AREAS = defineLogAreas({
|
|
|
1010
1167
|
"remote-worker.settle-failed": "A remote worker could not be settled.",
|
|
1011
1168
|
"checkout.merge-followed": "After an environment's PR merged, the project checkout was fast-forwarded, or `outcome` says why not.",
|
|
1012
1169
|
"checkout.merge-follow-failed": "Fast-forwarding the project checkout failed, after an environment's PR merged or before mail woke the main coordinator.",
|
|
1013
|
-
"checkout.mail-follow": "Before mail woke the main coordinator, the project checkout was fast-forwarded, or `outcome` says why not (`timed-out`, `failed`).",
|
|
1014
|
-
"checkout.mail-follow-failed": "Before mail woke the main coordinator, checking whether to fast-forward the project checkout failed; the mail was delivered anyway."
|
|
1170
|
+
"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`).",
|
|
1171
|
+
"checkout.mail-follow-failed": "Before mail woke the main coordinator, checking whether to fast-forward the project checkout failed; the mail was delivered anyway.",
|
|
1172
|
+
"checkout.message-check": "Before a typed message to the main coordinator, the backend answered whether to fast-forward the project checkout: `outcome` (`offer`, `fast-forwarded`, `turn-running`, `not-behind`, `blocked`, `no-status`), `fetch` (`fetched`, `failed`, `timed-out`, `skipped`) and `durationMs`.",
|
|
1173
|
+
"checkout.message-check-failed": "Before a typed message to the main coordinator, fast-forwarding to the upstream commit already fetched failed after a slow or failed fetch; the message was sent anyway."
|
|
1015
1174
|
}
|
|
1016
1175
|
}
|
|
1017
1176
|
});
|
|
@@ -1114,7 +1273,27 @@ var DOCKER_LOG_AREAS = defineLogAreas({
|
|
|
1114
1273
|
"recovery.clear-terminals-failed": "Terminal sessions could not be cleared after a recovery restore.",
|
|
1115
1274
|
"github-ranges.seed-not-copied": "The GitHub ranges seed could not be copied into a container, so its firewall fetches them.",
|
|
1116
1275
|
"availability.probe-failed": "Docker is not available; written when the diagnostic changes. Fixed-shape metadata only: messages can hold daemon endpoints.",
|
|
1117
|
-
"start.port-collision-retrying": "An automatic host port collided on start, so it is retried once with fresh ports."
|
|
1276
|
+
"start.port-collision-retrying": "An automatic host port collided on start, so it is retried once with fresh ports.",
|
|
1277
|
+
"writer-lease.lost": {
|
|
1278
|
+
description: "This backend lost the registry writer lease, for the fixed `reason` given. Schedules stop and container changes are refused until it restarts.",
|
|
1279
|
+
essential: true,
|
|
1280
|
+
fields: { reason: "label" }
|
|
1281
|
+
},
|
|
1282
|
+
"writer-lease.regained": {
|
|
1283
|
+
description: "This backend took the registry writer lease over from a holder that stopped refreshing it (it crashed, was killed or stalled), `staleForMs` after its last refresh. The counterpart of that holder's `writer-lease.lost` with reason `reclaimed`; a lease left by a clean shutdown is acquired silently.",
|
|
1284
|
+
essential: true,
|
|
1285
|
+
fields: { staleForMs: "number" }
|
|
1286
|
+
},
|
|
1287
|
+
"writer-lease.not-acquired": {
|
|
1288
|
+
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.",
|
|
1289
|
+
essential: true,
|
|
1290
|
+
fields: { reason: "label" }
|
|
1291
|
+
},
|
|
1292
|
+
"bridge.launched": {
|
|
1293
|
+
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.",
|
|
1294
|
+
essential: true,
|
|
1295
|
+
fields: { provider: "label", containerPort: "number" }
|
|
1296
|
+
}
|
|
1118
1297
|
}
|
|
1119
1298
|
},
|
|
1120
1299
|
"docker.reachability": {
|
|
@@ -2000,6 +2179,146 @@ function logErrorKind(error) {
|
|
|
2000
2179
|
return matching(read(error, "name"), NAME_PATTERN) ?? "Error";
|
|
2001
2180
|
}
|
|
2002
2181
|
|
|
2182
|
+
// ../protocol/src/log-essential-labels.ts
|
|
2183
|
+
var ERROR_NAMES = new Set([
|
|
2184
|
+
"Error",
|
|
2185
|
+
"TypeError",
|
|
2186
|
+
"RangeError",
|
|
2187
|
+
"ReferenceError",
|
|
2188
|
+
"SyntaxError",
|
|
2189
|
+
"URIError",
|
|
2190
|
+
"EvalError",
|
|
2191
|
+
"AggregateError",
|
|
2192
|
+
"AbortError",
|
|
2193
|
+
"TimeoutError",
|
|
2194
|
+
"SystemError"
|
|
2195
|
+
]);
|
|
2196
|
+
var ERROR_CODES = new Set([
|
|
2197
|
+
"EACCES",
|
|
2198
|
+
"EADDRINUSE",
|
|
2199
|
+
"EADDRNOTAVAIL",
|
|
2200
|
+
"EAGAIN",
|
|
2201
|
+
"EBADF",
|
|
2202
|
+
"EBUSY",
|
|
2203
|
+
"ECANCELED",
|
|
2204
|
+
"ECONNABORTED",
|
|
2205
|
+
"ECONNREFUSED",
|
|
2206
|
+
"ECONNRESET",
|
|
2207
|
+
"EEXIST",
|
|
2208
|
+
"EHOSTUNREACH",
|
|
2209
|
+
"EINTR",
|
|
2210
|
+
"EINVAL",
|
|
2211
|
+
"EIO",
|
|
2212
|
+
"EISDIR",
|
|
2213
|
+
"EMFILE",
|
|
2214
|
+
"ENETUNREACH",
|
|
2215
|
+
"ENFILE",
|
|
2216
|
+
"ENOENT",
|
|
2217
|
+
"ENOMEM",
|
|
2218
|
+
"ENOSPC",
|
|
2219
|
+
"ENOSYS",
|
|
2220
|
+
"ENOTDIR",
|
|
2221
|
+
"ENOTEMPTY",
|
|
2222
|
+
"ENOTFOUND",
|
|
2223
|
+
"EPERM",
|
|
2224
|
+
"EPIPE",
|
|
2225
|
+
"EROFS",
|
|
2226
|
+
"ETIMEDOUT",
|
|
2227
|
+
"EXDEV",
|
|
2228
|
+
"SQLITE_BUSY",
|
|
2229
|
+
"SQLITE_CORRUPT",
|
|
2230
|
+
"SQLITE_FULL",
|
|
2231
|
+
"SQLITE_IOERR",
|
|
2232
|
+
"SQLITE_NOTADB",
|
|
2233
|
+
"SQLITE_READONLY",
|
|
2234
|
+
"ERR_CANCELED",
|
|
2235
|
+
"ERR_STREAM_DESTROYED"
|
|
2236
|
+
]);
|
|
2237
|
+
var SYSCALLS = new Set([
|
|
2238
|
+
"open",
|
|
2239
|
+
"read",
|
|
2240
|
+
"write",
|
|
2241
|
+
"stat",
|
|
2242
|
+
"lstat",
|
|
2243
|
+
"mkdir",
|
|
2244
|
+
"rmdir",
|
|
2245
|
+
"readdir",
|
|
2246
|
+
"rename",
|
|
2247
|
+
"unlink",
|
|
2248
|
+
"fsync",
|
|
2249
|
+
"fdatasync",
|
|
2250
|
+
"close",
|
|
2251
|
+
"access",
|
|
2252
|
+
"chmod",
|
|
2253
|
+
"copyfile",
|
|
2254
|
+
"connect",
|
|
2255
|
+
"listen",
|
|
2256
|
+
"bind",
|
|
2257
|
+
"spawn",
|
|
2258
|
+
"kill",
|
|
2259
|
+
"getaddrinfo"
|
|
2260
|
+
]);
|
|
2261
|
+
var SIGNALS = new Set([
|
|
2262
|
+
"SIGABRT",
|
|
2263
|
+
"SIGALRM",
|
|
2264
|
+
"SIGBUS",
|
|
2265
|
+
"SIGCHLD",
|
|
2266
|
+
"SIGCONT",
|
|
2267
|
+
"SIGFPE",
|
|
2268
|
+
"SIGHUP",
|
|
2269
|
+
"SIGILL",
|
|
2270
|
+
"SIGINT",
|
|
2271
|
+
"SIGKILL",
|
|
2272
|
+
"SIGPIPE",
|
|
2273
|
+
"SIGQUIT",
|
|
2274
|
+
"SIGSEGV",
|
|
2275
|
+
"SIGSTOP",
|
|
2276
|
+
"SIGTERM",
|
|
2277
|
+
"SIGTRAP",
|
|
2278
|
+
"SIGTSTP",
|
|
2279
|
+
"SIGTTIN",
|
|
2280
|
+
"SIGTTOU",
|
|
2281
|
+
"SIGUSR1",
|
|
2282
|
+
"SIGUSR2",
|
|
2283
|
+
"SIGWINCH",
|
|
2284
|
+
"SIGXCPU",
|
|
2285
|
+
"SIGXFSZ"
|
|
2286
|
+
]);
|
|
2287
|
+
var PROVIDERS = new Set(["claude", "codex", "opencode", "cursor", "grok", "acp", "pi"]);
|
|
2288
|
+
var UUID = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
|
|
2289
|
+
var SOURCE = new RegExp(`^(?:claude|codex|opencode|cursor|grok|acp|pi):${UUID}$`, "i");
|
|
2290
|
+
|
|
2291
|
+
// ../protocol/src/log-essential.ts
|
|
2292
|
+
var vocabulary = LOG_VOCABULARY;
|
|
2293
|
+
var UNDECLARED_ERROR_LABELS = new Set([
|
|
2294
|
+
"site",
|
|
2295
|
+
"kind",
|
|
2296
|
+
"step",
|
|
2297
|
+
"reason",
|
|
2298
|
+
"signal",
|
|
2299
|
+
"code"
|
|
2300
|
+
]);
|
|
2301
|
+
function eventSpec(area, event) {
|
|
2302
|
+
const spec = Object.hasOwn(vocabulary, area) ? vocabulary[area] : undefined;
|
|
2303
|
+
if (!spec || !Object.hasOwn(spec.events, event))
|
|
2304
|
+
return null;
|
|
2305
|
+
const definition = spec.events[event];
|
|
2306
|
+
return typeof definition === "object" && definition.essential ? definition : null;
|
|
2307
|
+
}
|
|
2308
|
+
function declaredEssential(area, event, level) {
|
|
2309
|
+
const spec = eventSpec(area, event);
|
|
2310
|
+
return spec && (spec.minLevel !== "error" || level === "error") ? spec : null;
|
|
2311
|
+
}
|
|
2312
|
+
function hasEssentialEvents(area) {
|
|
2313
|
+
const spec = Object.hasOwn(vocabulary, area) ? vocabulary[area] : undefined;
|
|
2314
|
+
return spec !== undefined && Object.values(spec.events).some((event) => typeof event === "object" && event.essential);
|
|
2315
|
+
}
|
|
2316
|
+
function isEssentialEntry(area, event, level) {
|
|
2317
|
+
if (area === "logging" && event === "essential.write-failed")
|
|
2318
|
+
return false;
|
|
2319
|
+
return level === "error" || declaredEssential(area, event, level) !== null;
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2003
2322
|
// ../protocol/src/logger.ts
|
|
2004
2323
|
var LOG_LEVELS = ["error", "warn", "info", "debug", "trace"];
|
|
2005
2324
|
var MAX_FIELD_CHARS = 2048;
|
|
@@ -2044,7 +2363,9 @@ var DEFAULT_CONFIG = {
|
|
|
2044
2363
|
level: "info",
|
|
2045
2364
|
areaLevels: {},
|
|
2046
2365
|
format: "text",
|
|
2047
|
-
sink: consoleSink
|
|
2366
|
+
sink: consoleSink,
|
|
2367
|
+
essentialSink: null,
|
|
2368
|
+
relayEssential: false
|
|
2048
2369
|
};
|
|
2049
2370
|
var config = DEFAULT_CONFIG;
|
|
2050
2371
|
var generation = 0;
|
|
@@ -2155,17 +2476,38 @@ function renderText(record) {
|
|
|
2155
2476
|
function renderJson(record) {
|
|
2156
2477
|
return escapeLogLine(JSON.stringify(record));
|
|
2157
2478
|
}
|
|
2479
|
+
function offerEssential(record) {
|
|
2480
|
+
if (!config.essentialSink || !isEssentialEntry(record.area, record.event, record.level))
|
|
2481
|
+
return;
|
|
2482
|
+
try {
|
|
2483
|
+
config.essentialSink(record);
|
|
2484
|
+
} catch {}
|
|
2485
|
+
}
|
|
2158
2486
|
function deliver(record) {
|
|
2487
|
+
let delivered = true;
|
|
2159
2488
|
try {
|
|
2160
2489
|
config.sink({
|
|
2161
2490
|
method: OUTPUT_METHOD[record.level],
|
|
2162
2491
|
line: config.format === "json" ? renderJson(record) : renderText(record),
|
|
2163
2492
|
record
|
|
2164
2493
|
});
|
|
2165
|
-
return true;
|
|
2166
2494
|
} catch {
|
|
2167
|
-
|
|
2495
|
+
delivered = false;
|
|
2168
2496
|
}
|
|
2497
|
+
offerEssential(record);
|
|
2498
|
+
return delivered;
|
|
2499
|
+
}
|
|
2500
|
+
function deliverEssentialOnly(record) {
|
|
2501
|
+
if (config.essentialSink) {
|
|
2502
|
+
offerEssential(record);
|
|
2503
|
+
return;
|
|
2504
|
+
}
|
|
2505
|
+
if (!config.relayEssential)
|
|
2506
|
+
return;
|
|
2507
|
+
const marked = { ...record, essentialOnly: true };
|
|
2508
|
+
try {
|
|
2509
|
+
config.sink({ method: OUTPUT_METHOD[record.level], line: renderJson(marked), record: marked });
|
|
2510
|
+
} catch {}
|
|
2169
2511
|
}
|
|
2170
2512
|
function buildRecord(level, area, event, fields) {
|
|
2171
2513
|
const clean = fields ? sanitizeFields(fields, areaSpec(area)?.maxStringChars ?? MAX_FIELD_CHARS) : undefined;
|
|
@@ -2330,12 +2672,17 @@ function deliverEvent(level, area, event, fields) {
|
|
|
2330
2672
|
return deliver(buildRecord(level, area, event, fields));
|
|
2331
2673
|
}
|
|
2332
2674
|
function tryWriteLog(level, area, event, fields) {
|
|
2333
|
-
if (LEVEL_RANK[level] > thresholdRank(area))
|
|
2675
|
+
if (LEVEL_RANK[level] > thresholdRank(area)) {
|
|
2676
|
+
if (isEssentialEntry(area, event, level)) {
|
|
2677
|
+
deliverEssentialOnly(buildRecord(level, area, event, resolveFields(fields)));
|
|
2678
|
+
}
|
|
2334
2679
|
return false;
|
|
2680
|
+
}
|
|
2335
2681
|
return deliverEvent(level, area, event, resolveFields(fields));
|
|
2336
2682
|
}
|
|
2337
2683
|
function createLogger(area) {
|
|
2338
2684
|
const spec = areaSpec(area);
|
|
2685
|
+
const mayHoldEssential = hasEssentialEvents(area);
|
|
2339
2686
|
let seenGeneration = -1;
|
|
2340
2687
|
let rank = 0;
|
|
2341
2688
|
const enabled = (level) => {
|
|
@@ -2348,9 +2695,16 @@ function createLogger(area) {
|
|
|
2348
2695
|
const writeResolved = (level, event, resolved) => {
|
|
2349
2696
|
deliverEvent(level, area, event, resolved);
|
|
2350
2697
|
};
|
|
2698
|
+
const writeFiltered = (level, event, fields) => {
|
|
2699
|
+
if (!mayHoldEssential || !isEssentialEntry(area, event, level))
|
|
2700
|
+
return;
|
|
2701
|
+
deliverEssentialOnly(buildRecord(level, area, event, resolveFields(fields)));
|
|
2702
|
+
};
|
|
2351
2703
|
const write = (level, event, fields) => {
|
|
2352
|
-
if (!enabled(level))
|
|
2704
|
+
if (!enabled(level)) {
|
|
2705
|
+
writeFiltered(level, event, fields);
|
|
2353
2706
|
return;
|
|
2707
|
+
}
|
|
2354
2708
|
writeResolved(level, event, resolveFields(fields));
|
|
2355
2709
|
};
|
|
2356
2710
|
return {
|
|
@@ -2361,8 +2715,10 @@ function createLogger(area) {
|
|
|
2361
2715
|
trace: (event, fields) => write("trace", event, fields),
|
|
2362
2716
|
throttled: (level, event, options) => {
|
|
2363
2717
|
syncThrottleLevels();
|
|
2364
|
-
if (!enabled(level))
|
|
2718
|
+
if (!enabled(level)) {
|
|
2719
|
+
writeFiltered(level, event, options.fields);
|
|
2365
2720
|
return;
|
|
2721
|
+
}
|
|
2366
2722
|
if (!spec || !Object.hasOwn(spec.events, event) || event.startsWith("throttle.") || !Object.hasOwn(spec.events, "throttle.recovered")) {
|
|
2367
2723
|
deliver(buildRecord(level, spec ? area : "logging", spec ? "invalid-event" : "unknown-area", undefined));
|
|
2368
2724
|
return;
|
|
@@ -2486,7 +2842,8 @@ function configureLoggerFromEnvironment(env, options = {}) {
|
|
|
2486
2842
|
configureLogger({
|
|
2487
2843
|
...levels.level ? { level: levels.level } : {},
|
|
2488
2844
|
areaLevels: levels.areaLevels,
|
|
2489
|
-
format
|
|
2845
|
+
format,
|
|
2846
|
+
relayEssential: options.relayToSupervisor === true
|
|
2490
2847
|
});
|
|
2491
2848
|
const log = createLogger("logging");
|
|
2492
2849
|
if (levels.invalid.length > 0) {
|
|
@@ -4883,7 +5240,7 @@ var PERMISSION_RULE_PROVIDERS = [
|
|
|
4883
5240
|
"grok",
|
|
4884
5241
|
"pi"
|
|
4885
5242
|
];
|
|
4886
|
-
var
|
|
5243
|
+
var PROVIDERS2 = new Set(PERMISSION_RULE_PROVIDERS);
|
|
4887
5244
|
var KINDS = new Set(PERMISSION_RULE_KINDS);
|
|
4888
5245
|
var SCOPES = new Set(PERMISSION_RULE_SCOPES);
|
|
4889
5246
|
var UNQUOTED_REFUSED = new Set([
|
|
@@ -5155,7 +5512,7 @@ var AGENT_INTERACTION_AUTHORIZATION_KINDS = [
|
|
|
5155
5512
|
];
|
|
5156
5513
|
var INPUT_KINDS = new Set(AGENT_INTERACTION_INPUT_KINDS);
|
|
5157
5514
|
var AUTHORIZATION_KINDS = new Set(AGENT_INTERACTION_AUTHORIZATION_KINDS);
|
|
5158
|
-
var
|
|
5515
|
+
var PROVIDERS3 = new Set(AGENT_INTERACTION_PROVIDERS);
|
|
5159
5516
|
var KINDS2 = new Set(AGENT_INTERACTION_KINDS);
|
|
5160
5517
|
var ORIGINS = new Set(AGENT_INTERACTION_ORIGINS);
|
|
5161
5518
|
var STATES = new Set(AGENT_INTERACTION_STATES);
|
|
@@ -6918,45 +7275,6 @@ function nextTurnGeneration() {
|
|
|
6918
7275
|
turnGenerationCounter += 1;
|
|
6919
7276
|
return turnGenerationCounter;
|
|
6920
7277
|
}
|
|
6921
|
-
// ../../bridges/claude-bridge/src/services/image-attachment-data.ts
|
|
6922
|
-
var SUPPORTED_IMAGE_MEDIA_TYPES = new Set([
|
|
6923
|
-
"image/jpeg",
|
|
6924
|
-
"image/png",
|
|
6925
|
-
"image/gif",
|
|
6926
|
-
"image/webp"
|
|
6927
|
-
]);
|
|
6928
|
-
var MAX_IMAGE_ATTACHMENT_BYTES = 8 * 1024 * 1024;
|
|
6929
|
-
function decodedBase64ByteLength(value) {
|
|
6930
|
-
const padding = value.endsWith("==") ? 2 : value.endsWith("=") ? 1 : 0;
|
|
6931
|
-
return value.length / 4 * 3 - padding;
|
|
6932
|
-
}
|
|
6933
|
-
function parseBase64ImageData(value) {
|
|
6934
|
-
let data = value;
|
|
6935
|
-
let mediaType;
|
|
6936
|
-
if (value.startsWith("data:")) {
|
|
6937
|
-
const match = /^data:([^;,]+);base64,([\s\S]+)$/.exec(value);
|
|
6938
|
-
if (!match || !SUPPORTED_IMAGE_MEDIA_TYPES.has(match[1])) {
|
|
6939
|
-
return null;
|
|
6940
|
-
}
|
|
6941
|
-
mediaType = match[1];
|
|
6942
|
-
data = match[2];
|
|
6943
|
-
}
|
|
6944
|
-
const normalized = data.replace(/\s+/g, "");
|
|
6945
|
-
if (normalized.length === 0 || normalized.length % 4 !== 0 || !/^[A-Za-z0-9+/]+={0,2}$/.test(normalized) || decodedBase64ByteLength(normalized) > MAX_IMAGE_ATTACHMENT_BYTES) {
|
|
6946
|
-
return null;
|
|
6947
|
-
}
|
|
6948
|
-
return { data: normalized, mediaType };
|
|
6949
|
-
}
|
|
6950
|
-
// ../../bridges/claude-bridge/src/services/session-manager-runtime.ts
|
|
6951
|
-
import { createHash as createHash6 } from "node:crypto";
|
|
6952
|
-
|
|
6953
|
-
// ../../bridges/claude-bridge/src/services/runtime-env.ts
|
|
6954
|
-
import { execFile as execFile2 } from "node:child_process";
|
|
6955
|
-
import { mkdtemp, readFile as readFile2 } from "node:fs/promises";
|
|
6956
|
-
import { tmpdir } from "node:os";
|
|
6957
|
-
import path from "node:path";
|
|
6958
|
-
import { promisify } from "node:util";
|
|
6959
|
-
|
|
6960
7278
|
// ../protocol/src/native-agent-goal.ts
|
|
6961
7279
|
var NATIVE_AGENT_GOAL_LIMITS = Object.freeze({
|
|
6962
7280
|
objectiveMaxChars: 4000,
|
|
@@ -7455,7 +7773,135 @@ var OPTIONAL_PROJECTION_FIELD_SET = new Set([
|
|
|
7455
7773
|
"slashCommandCatalogue"
|
|
7456
7774
|
]);
|
|
7457
7775
|
|
|
7776
|
+
// ../protocol/src/execution-policy-narrowing.ts
|
|
7777
|
+
var APPROVALS_STRICTNESS = {
|
|
7778
|
+
"auto-approve": 0,
|
|
7779
|
+
ask: 1,
|
|
7780
|
+
deny: 2
|
|
7781
|
+
};
|
|
7782
|
+
var SANDBOX_STRICTNESS = {
|
|
7783
|
+
none: 0,
|
|
7784
|
+
container: 1,
|
|
7785
|
+
provider: 2
|
|
7786
|
+
};
|
|
7787
|
+
function networkStrictness(value) {
|
|
7788
|
+
return value === "restricted" ? 1 : 0;
|
|
7789
|
+
}
|
|
7790
|
+
function isSubset(candidate, of) {
|
|
7791
|
+
const allowed = new Set(of);
|
|
7792
|
+
return candidate.every((item) => allowed.has(item));
|
|
7793
|
+
}
|
|
7794
|
+
function rawCapabilityDenials(policy) {
|
|
7795
|
+
return [
|
|
7796
|
+
...policy.capabilityPolicy?.deny ?? [],
|
|
7797
|
+
...policy.capabilityPolicy?.extendedDeny ?? []
|
|
7798
|
+
];
|
|
7799
|
+
}
|
|
7800
|
+
function executionPolicyWidenings(current, next) {
|
|
7801
|
+
if (!current)
|
|
7802
|
+
return [];
|
|
7803
|
+
const widened = [];
|
|
7804
|
+
if (next.id !== current.id)
|
|
7805
|
+
widened.push("id");
|
|
7806
|
+
if (APPROVALS_STRICTNESS[next.approvals] < APPROVALS_STRICTNESS[current.approvals]) {
|
|
7807
|
+
widened.push("approvals");
|
|
7808
|
+
}
|
|
7809
|
+
if (SANDBOX_STRICTNESS[next.sandbox] < SANDBOX_STRICTNESS[current.sandbox]) {
|
|
7810
|
+
widened.push("sandbox");
|
|
7811
|
+
}
|
|
7812
|
+
if (next.projectResources && !current.projectResources)
|
|
7813
|
+
widened.push("projectResources");
|
|
7814
|
+
if (networkStrictness(next.networkAccess) < networkStrictness(current.networkAccess)) {
|
|
7815
|
+
widened.push("networkAccess");
|
|
7816
|
+
}
|
|
7817
|
+
if (networkStrictness(next.containerNetworkAccess) < networkStrictness(current.containerNetworkAccess)) {
|
|
7818
|
+
widened.push("containerNetworkAccess");
|
|
7819
|
+
}
|
|
7820
|
+
const currentAllow = current.toolPolicy?.allow;
|
|
7821
|
+
const nextAllow = next.toolPolicy?.allow;
|
|
7822
|
+
const allowNarrows = currentAllow === undefined ? nextAllow === undefined || nextAllow.length === 0 : nextAllow !== undefined && isSubset(nextAllow, currentAllow);
|
|
7823
|
+
if (!allowNarrows)
|
|
7824
|
+
widened.push("toolPolicy.allow");
|
|
7825
|
+
if (!isSubset(current.toolPolicy?.deny ?? [], next.toolPolicy?.deny ?? [])) {
|
|
7826
|
+
widened.push("toolPolicy.deny");
|
|
7827
|
+
}
|
|
7828
|
+
if (!isSubset(rawCapabilityDenials(current), rawCapabilityDenials(next))) {
|
|
7829
|
+
widened.push("capabilityPolicy.deny");
|
|
7830
|
+
}
|
|
7831
|
+
if (!isSubset(next.capabilityPolicy?.allow ?? [], current.capabilityPolicy?.allow ?? [])) {
|
|
7832
|
+
widened.push("capabilityPolicy.allow");
|
|
7833
|
+
}
|
|
7834
|
+
const currentServers = nativeAgentUserMcpGrant(current);
|
|
7835
|
+
const nextServers = nativeAgentUserMcpGrant(next);
|
|
7836
|
+
if (currentServers !== undefined && (nextServers === undefined || !isSubset(nextServers, currentServers))) {
|
|
7837
|
+
widened.push("capabilityPolicy.userMcpServers");
|
|
7838
|
+
}
|
|
7839
|
+
return widened;
|
|
7840
|
+
}
|
|
7841
|
+
var POLICY_WIDENING_REFUSED_CODE = "policy-widening-refused";
|
|
7842
|
+
function policyWideningRefusal(widened) {
|
|
7843
|
+
return {
|
|
7844
|
+
error: "Execution policy can only be narrowed on a live session; a wider policy applies after the agent bridge restarts.",
|
|
7845
|
+
code: POLICY_WIDENING_REFUSED_CODE,
|
|
7846
|
+
widened
|
|
7847
|
+
};
|
|
7848
|
+
}
|
|
7849
|
+
|
|
7850
|
+
class PolicyWideningRefusedError extends Error {
|
|
7851
|
+
widened;
|
|
7852
|
+
constructor(widened) {
|
|
7853
|
+
super(policyWideningRefusal(widened).error);
|
|
7854
|
+
this.widened = widened;
|
|
7855
|
+
this.name = "PolicyWideningRefusedError";
|
|
7856
|
+
}
|
|
7857
|
+
refusal() {
|
|
7858
|
+
return policyWideningRefusal(this.widened);
|
|
7859
|
+
}
|
|
7860
|
+
}
|
|
7861
|
+
function assertExecutionPolicyNotWidened(current, next) {
|
|
7862
|
+
const widened = executionPolicyWidenings(current, next);
|
|
7863
|
+
if (widened.length > 0)
|
|
7864
|
+
throw new PolicyWideningRefusedError(widened);
|
|
7865
|
+
}
|
|
7866
|
+
|
|
7867
|
+
// ../../bridges/claude-bridge/src/services/image-attachment-data.ts
|
|
7868
|
+
var SUPPORTED_IMAGE_MEDIA_TYPES = new Set([
|
|
7869
|
+
"image/jpeg",
|
|
7870
|
+
"image/png",
|
|
7871
|
+
"image/gif",
|
|
7872
|
+
"image/webp"
|
|
7873
|
+
]);
|
|
7874
|
+
var MAX_IMAGE_ATTACHMENT_BYTES = 8 * 1024 * 1024;
|
|
7875
|
+
function decodedBase64ByteLength(value) {
|
|
7876
|
+
const padding = value.endsWith("==") ? 2 : value.endsWith("=") ? 1 : 0;
|
|
7877
|
+
return value.length / 4 * 3 - padding;
|
|
7878
|
+
}
|
|
7879
|
+
function parseBase64ImageData(value) {
|
|
7880
|
+
let data = value;
|
|
7881
|
+
let mediaType;
|
|
7882
|
+
if (value.startsWith("data:")) {
|
|
7883
|
+
const match = /^data:([^;,]+);base64,([\s\S]+)$/.exec(value);
|
|
7884
|
+
if (!match || !SUPPORTED_IMAGE_MEDIA_TYPES.has(match[1])) {
|
|
7885
|
+
return null;
|
|
7886
|
+
}
|
|
7887
|
+
mediaType = match[1];
|
|
7888
|
+
data = match[2];
|
|
7889
|
+
}
|
|
7890
|
+
const normalized = data.replace(/\s+/g, "");
|
|
7891
|
+
if (normalized.length === 0 || normalized.length % 4 !== 0 || !/^[A-Za-z0-9+/]+={0,2}$/.test(normalized) || decodedBase64ByteLength(normalized) > MAX_IMAGE_ATTACHMENT_BYTES) {
|
|
7892
|
+
return null;
|
|
7893
|
+
}
|
|
7894
|
+
return { data: normalized, mediaType };
|
|
7895
|
+
}
|
|
7896
|
+
// ../../bridges/claude-bridge/src/services/session-manager-runtime.ts
|
|
7897
|
+
import { createHash as createHash6 } from "node:crypto";
|
|
7898
|
+
|
|
7458
7899
|
// ../../bridges/claude-bridge/src/services/runtime-env.ts
|
|
7900
|
+
import { execFile as execFile2 } from "node:child_process";
|
|
7901
|
+
import { mkdtemp, readFile as readFile2 } from "node:fs/promises";
|
|
7902
|
+
import { tmpdir } from "node:os";
|
|
7903
|
+
import path from "node:path";
|
|
7904
|
+
import { promisify } from "node:util";
|
|
7459
7905
|
var GITHUB_CREDENTIAL_FILE_ENV = "ORKESTRATOR_GITHUB_CREDENTIAL_FILE";
|
|
7460
7906
|
var GITHUB_MCP_TOKEN_ENV = "GITHUB_PERSONAL_ACCESS_TOKEN";
|
|
7461
7907
|
var execFileAsync = promisify(execFile2);
|
|
@@ -7659,6 +8105,7 @@ var COORDINATOR_CONTROL_TOOL_NAMES = Object.freeze([
|
|
|
7659
8105
|
"request_project_on_node",
|
|
7660
8106
|
"request_root_changes",
|
|
7661
8107
|
"resolve_conflicts",
|
|
8108
|
+
"restart_build_pipeline_step",
|
|
7662
8109
|
"resume_build_pipeline",
|
|
7663
8110
|
"resume_schedule",
|
|
7664
8111
|
"run_worker_command",
|
|
@@ -15023,7 +15470,10 @@ async function createOrRecoverSession(title, clientSessionKey, policy) {
|
|
|
15023
15470
|
if (stableId) {
|
|
15024
15471
|
const existing = sessions.get(stableId) ?? await ensurePersistedSession(stableId);
|
|
15025
15472
|
if (existing) {
|
|
15026
|
-
|
|
15473
|
+
if (policy) {
|
|
15474
|
+
assertExecutionPolicyNotWidened(existing.executionPolicy, policy);
|
|
15475
|
+
existing.executionPolicy = policy;
|
|
15476
|
+
}
|
|
15027
15477
|
return existing;
|
|
15028
15478
|
}
|
|
15029
15479
|
journal = await stableIdDispatchJournal(stableId);
|
|
@@ -16370,6 +16820,8 @@ import { join as join11 } from "node:path";
|
|
|
16370
16820
|
var AGENT_MAIL_MAX_BODY_BYTES = 32 * 1024;
|
|
16371
16821
|
var AGENT_MAIL_MAX_STORE_BYTES = 32 * 1024 * 1024;
|
|
16372
16822
|
var AGENT_MAIL_DEFAULT_RETENTION_DAYS = 14;
|
|
16823
|
+
var AGENT_MAIL_MAX_ATTACHMENT_BYTES = 8 * 1024 * 1024;
|
|
16824
|
+
var AGENT_MAIL_MAX_TOTAL_ATTACHMENT_BYTES = 32 * 1024 * 1024;
|
|
16373
16825
|
var AGENT_MAIL_DEFAULT_AUTONOMOUS_WAKE_BUDGET = 16;
|
|
16374
16826
|
var AGENT_MAIL_DEFAULT_HOURLY_WAKE_LIMIT = 40;
|
|
16375
16827
|
var AGENT_MAIL_TOOL_NAMES = Object.freeze([
|
|
@@ -16403,6 +16855,9 @@ function agentMailCapabilities(tabType, agent, locked = true) {
|
|
|
16403
16855
|
}
|
|
16404
16856
|
if (tabType === "claude-tmux")
|
|
16405
16857
|
return { canPull: true, canSend: true, canInject: true };
|
|
16858
|
+
if (tabType === "pipeline-worker") {
|
|
16859
|
+
return agent ? { canPull: true, canSend: true, canInject: true } : { canPull: false, canSend: false, canInject: false };
|
|
16860
|
+
}
|
|
16406
16861
|
if (["claude", "codex", "opencode"].includes(tabType)) {
|
|
16407
16862
|
return { canPull: true, canSend: true, canInject: false };
|
|
16408
16863
|
}
|
|
@@ -17085,7 +17540,7 @@ var SOURCES = new Set([
|
|
|
17085
17540
|
var EXECUTION_KINDS = new Set(NATIVE_AGENT_COMMAND_EXECUTION_KINDS);
|
|
17086
17541
|
var ORIGINS2 = new Set(NATIVE_AGENT_COMMAND_ORIGINS);
|
|
17087
17542
|
var UNAVAILABLE_REASONS = new Set(NATIVE_AGENT_COMMAND_UNAVAILABLE_REASONS);
|
|
17088
|
-
var
|
|
17543
|
+
var ERROR_CODES2 = new Set(NATIVE_AGENT_COMMAND_CATALOGUE_ERROR_CODES);
|
|
17089
17544
|
var encoder = new TextEncoder;
|
|
17090
17545
|
function utf8ByteLength(value) {
|
|
17091
17546
|
if (/^[\x00-\x7f]*$/.test(value))
|
|
@@ -22314,72 +22769,6 @@ function boundTranscriptResponse(messages, maximumBytes, options = {}) {
|
|
|
22314
22769
|
};
|
|
22315
22770
|
}
|
|
22316
22771
|
|
|
22317
|
-
// ../../bridges/claude-bridge/src/services/execution-policy-narrowing.ts
|
|
22318
|
-
var APPROVALS_STRICTNESS = {
|
|
22319
|
-
"auto-approve": 0,
|
|
22320
|
-
ask: 1,
|
|
22321
|
-
deny: 2
|
|
22322
|
-
};
|
|
22323
|
-
var SANDBOX_STRICTNESS = {
|
|
22324
|
-
none: 0,
|
|
22325
|
-
container: 1,
|
|
22326
|
-
provider: 2
|
|
22327
|
-
};
|
|
22328
|
-
function networkStrictness(value) {
|
|
22329
|
-
return value === "restricted" ? 1 : 0;
|
|
22330
|
-
}
|
|
22331
|
-
function isSubset(candidate, of) {
|
|
22332
|
-
const allowed = new Set(of);
|
|
22333
|
-
return candidate.every((item) => allowed.has(item));
|
|
22334
|
-
}
|
|
22335
|
-
function rawCapabilityDenials(policy) {
|
|
22336
|
-
return [
|
|
22337
|
-
...policy.capabilityPolicy?.deny ?? [],
|
|
22338
|
-
...policy.capabilityPolicy?.extendedDeny ?? []
|
|
22339
|
-
];
|
|
22340
|
-
}
|
|
22341
|
-
function executionPolicyWidenings(current, next) {
|
|
22342
|
-
if (!current)
|
|
22343
|
-
return [];
|
|
22344
|
-
const widened = [];
|
|
22345
|
-
if (next.id !== current.id)
|
|
22346
|
-
widened.push("id");
|
|
22347
|
-
if (APPROVALS_STRICTNESS[next.approvals] < APPROVALS_STRICTNESS[current.approvals]) {
|
|
22348
|
-
widened.push("approvals");
|
|
22349
|
-
}
|
|
22350
|
-
if (SANDBOX_STRICTNESS[next.sandbox] < SANDBOX_STRICTNESS[current.sandbox]) {
|
|
22351
|
-
widened.push("sandbox");
|
|
22352
|
-
}
|
|
22353
|
-
if (next.projectResources && !current.projectResources)
|
|
22354
|
-
widened.push("projectResources");
|
|
22355
|
-
if (networkStrictness(next.networkAccess) < networkStrictness(current.networkAccess)) {
|
|
22356
|
-
widened.push("networkAccess");
|
|
22357
|
-
}
|
|
22358
|
-
if (networkStrictness(next.containerNetworkAccess) < networkStrictness(current.containerNetworkAccess)) {
|
|
22359
|
-
widened.push("containerNetworkAccess");
|
|
22360
|
-
}
|
|
22361
|
-
const currentAllow = current.toolPolicy?.allow;
|
|
22362
|
-
const nextAllow = next.toolPolicy?.allow;
|
|
22363
|
-
const allowNarrows = currentAllow === undefined ? nextAllow === undefined || nextAllow.length === 0 : nextAllow !== undefined && isSubset(nextAllow, currentAllow);
|
|
22364
|
-
if (!allowNarrows)
|
|
22365
|
-
widened.push("toolPolicy.allow");
|
|
22366
|
-
if (!isSubset(current.toolPolicy?.deny ?? [], next.toolPolicy?.deny ?? [])) {
|
|
22367
|
-
widened.push("toolPolicy.deny");
|
|
22368
|
-
}
|
|
22369
|
-
if (!isSubset(rawCapabilityDenials(current), rawCapabilityDenials(next))) {
|
|
22370
|
-
widened.push("capabilityPolicy.deny");
|
|
22371
|
-
}
|
|
22372
|
-
if (!isSubset(next.capabilityPolicy?.allow ?? [], current.capabilityPolicy?.allow ?? [])) {
|
|
22373
|
-
widened.push("capabilityPolicy.allow");
|
|
22374
|
-
}
|
|
22375
|
-
const currentServers = nativeAgentUserMcpGrant(current);
|
|
22376
|
-
const nextServers = nativeAgentUserMcpGrant(next);
|
|
22377
|
-
if (currentServers !== undefined && (nextServers === undefined || !isSubset(nextServers, currentServers))) {
|
|
22378
|
-
widened.push("capabilityPolicy.userMcpServers");
|
|
22379
|
-
}
|
|
22380
|
-
return widened;
|
|
22381
|
-
}
|
|
22382
|
-
|
|
22383
22772
|
// ../../bridges/claude-bridge/src/routes/session-close.ts
|
|
22384
22773
|
function registerSessionCloseRoute(app) {
|
|
22385
22774
|
app.post("/:id/close", async (c) => {
|
|
@@ -23260,6 +23649,10 @@ session.post("/create", async (c) => {
|
|
|
23260
23649
|
};
|
|
23261
23650
|
return c.json(response, 201);
|
|
23262
23651
|
} catch (error) {
|
|
23652
|
+
if (error instanceof PolicyWideningRefusedError) {
|
|
23653
|
+
log21.warn("session.policy-widening-refused", { widened: error.widened.join(",") });
|
|
23654
|
+
return c.json(error.refusal(), 403);
|
|
23655
|
+
}
|
|
23263
23656
|
log21.error("session.create-failed", { error: formatLogError(error) });
|
|
23264
23657
|
return c.json({ error: error instanceof Error ? error.message : "Failed to create session" }, 500);
|
|
23265
23658
|
}
|
|
@@ -23413,11 +23806,7 @@ session.post("/:id/config", async (c) => {
|
|
|
23413
23806
|
sessionId: sessionData.id,
|
|
23414
23807
|
widened: widened.join(",")
|
|
23415
23808
|
});
|
|
23416
|
-
return c.json(
|
|
23417
|
-
error: "Execution policy can only be narrowed on a live session; a wider policy applies after the agent bridge restarts.",
|
|
23418
|
-
code: "policy-widening-refused",
|
|
23419
|
-
widened
|
|
23420
|
-
}, 403);
|
|
23809
|
+
return c.json(policyWideningRefusal(widened), 403);
|
|
23421
23810
|
}
|
|
23422
23811
|
};
|
|
23423
23812
|
const refusal = refusePolicyWidening();
|
|
@@ -24876,6 +25265,9 @@ function installFatalRejectionGuard(options) {
|
|
|
24876
25265
|
try {
|
|
24877
25266
|
warn(`${options.label} Unhandled promise rejection (continuing): ${describe(reason)}`);
|
|
24878
25267
|
} catch {}
|
|
25268
|
+
try {
|
|
25269
|
+
options.onRejection?.(reason);
|
|
25270
|
+
} catch {}
|
|
24879
25271
|
};
|
|
24880
25272
|
target.on("unhandledRejection", handler);
|
|
24881
25273
|
return () => {
|
|
@@ -24883,6 +25275,15 @@ function installFatalRejectionGuard(options) {
|
|
|
24883
25275
|
};
|
|
24884
25276
|
}
|
|
24885
25277
|
|
|
25278
|
+
// ../protocol/src/node/process-failure-log.ts
|
|
25279
|
+
var log25 = createLogger("process");
|
|
25280
|
+
function logUnhandledRejection(reason) {
|
|
25281
|
+
log25.throttled("error", "rejection.unhandled", {
|
|
25282
|
+
error: reason,
|
|
25283
|
+
fields: () => ({ error: formatLogError(reason, { message: false }) })
|
|
25284
|
+
});
|
|
25285
|
+
}
|
|
25286
|
+
|
|
24886
25287
|
// ../../node_modules/.bun/@hono+node-server@2.1.5+c539cad7f494f5c9/node_modules/@hono/node-server/dist/constants-BLSFu_RU.mjs
|
|
24887
25288
|
var X_ALREADY_SENT = "x-hono-already-sent";
|
|
24888
25289
|
|
|
@@ -26368,11 +26769,11 @@ var serve = (options, listeningListener) => {
|
|
|
26368
26769
|
};
|
|
26369
26770
|
|
|
26370
26771
|
// ../../bridges/claude-bridge/src/index.ts
|
|
26371
|
-
var
|
|
26772
|
+
var log26 = createLogger("bridge.claude");
|
|
26372
26773
|
configureBridgeLogger();
|
|
26373
26774
|
var app = new Hono2;
|
|
26374
26775
|
app.onError((error, c) => {
|
|
26375
|
-
|
|
26776
|
+
log26.error("http.request-failed", {
|
|
26376
26777
|
method: c.req.method,
|
|
26377
26778
|
path: c.req.path,
|
|
26378
26779
|
error: formatLogError(error)
|
|
@@ -26495,13 +26896,13 @@ app.get("/", (c) => {
|
|
|
26495
26896
|
}
|
|
26496
26897
|
});
|
|
26497
26898
|
});
|
|
26498
|
-
installFatalRejectionGuard({ label: "[claude-bridge]" });
|
|
26899
|
+
installFatalRejectionGuard({ label: "[claude-bridge]", onRejection: logUnhandledRejection });
|
|
26499
26900
|
var parentPid = parseParentPid(process.env[PARENT_PID_ENV]);
|
|
26500
26901
|
if (parentPid !== null) {
|
|
26501
26902
|
startParentWatchdog({
|
|
26502
26903
|
parentPid,
|
|
26503
26904
|
onParentExit: () => {
|
|
26504
|
-
|
|
26905
|
+
log26.warn("parent.gone", { parentPid });
|
|
26505
26906
|
process.exit(0);
|
|
26506
26907
|
}
|
|
26507
26908
|
});
|
|
@@ -26512,13 +26913,13 @@ function startBridgeServer(env = process.env, start = serve) {
|
|
|
26512
26913
|
}
|
|
26513
26914
|
const port = parseInt(env.PORT || "4097", 10);
|
|
26514
26915
|
const hostname = env.HOSTNAME || "0.0.0.0";
|
|
26515
|
-
|
|
26916
|
+
log26.debug("server.starting", { hostname, port });
|
|
26516
26917
|
const server = start({
|
|
26517
26918
|
fetch: app.fetch,
|
|
26518
26919
|
port,
|
|
26519
26920
|
hostname
|
|
26520
26921
|
});
|
|
26521
|
-
|
|
26922
|
+
log26.info("server.listening", { hostname, port });
|
|
26522
26923
|
return server;
|
|
26523
26924
|
}
|
|
26524
26925
|
var __testing = {
|