orkestrator 2.35.4-beta → 2.35.5-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +721 -12
- package/dist/main.js +68681 -64086
- package/package.json +3 -3
- package/resources/acp-bridge/dist/index.js +1145 -286
- package/resources/claude-bridge/dist/index.js +1055 -141
- package/resources/codex-bridge/dist/index.js +995 -133
- package/resources/cursor-bridge/dist/index.js +909 -48
- package/resources/cursor-bridge/runtime/install.json +1 -1
- package/resources/pi-bridge/dist/index.js +906 -44
- package/resources/pi-bridge/runtime/install.json +1 -1
|
@@ -13,7 +13,16 @@ var AGENT_MAIL_LOG_AREAS = defineLogAreas({
|
|
|
13
13
|
"agent-mail": {
|
|
14
14
|
description: "Delivering agent mail into waiting agent sessions.",
|
|
15
15
|
events: {
|
|
16
|
-
"delivery.waiting": "The drain passed over a pending message, for a reason it had not yet logged."
|
|
16
|
+
"delivery.waiting": "The drain passed over a pending message, for a reason it had not yet logged.",
|
|
17
|
+
"drain.new-mail-failed": "Draining newly received mail failed; the next sweep delivers it.",
|
|
18
|
+
"presence.sync-failed": "Mailboxes could not be synchronized.",
|
|
19
|
+
"inject.verified": "An injected message's delivery was checked. Ids and decisions only.",
|
|
20
|
+
"inject.dispatched": "Messages were dispatched into a session. Ids and decisions only.",
|
|
21
|
+
"stopped-worker.action-failed": "Nothing could act on mail for a stopped worker.",
|
|
22
|
+
"coordinator.start-failed": "The main coordinator could not be started for a new message.",
|
|
23
|
+
"message.placed": "A message was placed in a mailbox. Ids and decisions only, never subjects or bodies.",
|
|
24
|
+
"budget.hold-notify-failed": "The coordinator could not be told about held worker mail.",
|
|
25
|
+
"budget.reset-failed": "The mail budget could not be reset for a prompted tab."
|
|
17
26
|
}
|
|
18
27
|
}
|
|
19
28
|
});
|
|
@@ -35,6 +44,30 @@ var BACKEND_LOG_AREAS = defineLogAreas({
|
|
|
35
44
|
"job.failed": "One pass of the job named in `scope` failed; its next pass retries.",
|
|
36
45
|
...THROTTLE_LOG_EVENTS
|
|
37
46
|
}
|
|
47
|
+
},
|
|
48
|
+
backend: {
|
|
49
|
+
description: "The backend process: startup, background notices and shutdown.",
|
|
50
|
+
events: {
|
|
51
|
+
starting: "The backend process is starting.",
|
|
52
|
+
"ssh-socket.resolved": "An SSH agent socket was found.",
|
|
53
|
+
"ssh-socket.missing": "No usable SSH agent socket was found.",
|
|
54
|
+
"standalone-updater.mismatch": "--standalone-updater does not match --data-dir, so self-update is off.",
|
|
55
|
+
"instance.publish-failed": "The instance descriptor could not be published.",
|
|
56
|
+
"instance.republish-failed": "The instance descriptor could not be republished; a later pass retries.",
|
|
57
|
+
"parent.exited": "The parent process exited, so local servers are shutting down.",
|
|
58
|
+
"startup.step-failed": "One part of startup failed and the backend carried on; `step` says which.",
|
|
59
|
+
"startup.setup-fence-failed": "An environment's interrupted setup could not be fenced.",
|
|
60
|
+
"startup.setup-adopt-failed": "An environment's pending setup could not be adopted.",
|
|
61
|
+
"startup.deletion-pending": "An interrupted environment deletion stays pending. Its owning step logged the detail.",
|
|
62
|
+
"startup.looped-review-pending": "Cleanup of the retired Looped Review stays pending.",
|
|
63
|
+
"notice.failed": "A background notice after a turn or prompt failed; `step` says which.",
|
|
64
|
+
"artifacts.live-unavailable": "Live interactive artifacts are unavailable.",
|
|
65
|
+
"shutdown.step-failed": "One part of shutdown failed and the rest went on; `step` says which.",
|
|
66
|
+
"shutdown.signal-received": "A signal started shutdown, which tells a clean quit from the backend being killed.",
|
|
67
|
+
"shutdown.finished": "Shutdown finished, and the process exits with `code`.",
|
|
68
|
+
"port-policy.second-backend": "Another backend serves the default data directory, so this one avoids its ports.",
|
|
69
|
+
"port-policy.serve-on-free-port": "--tailscale-serve is on a free gateway port; pass --port with --strict-gateway-port to keep one."
|
|
70
|
+
}
|
|
38
71
|
}
|
|
39
72
|
});
|
|
40
73
|
|
|
@@ -42,11 +75,12 @@ var BACKEND_LOG_AREAS = defineLogAreas({
|
|
|
42
75
|
var MAX_BRIDGE_DIAGNOSTIC_BYTES = 8192;
|
|
43
76
|
var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
44
77
|
"bridge.diagnostics": {
|
|
45
|
-
description: "Metadata snapshots of bridge turns and processes,
|
|
78
|
+
description: "Metadata snapshots of bridge turns and processes: lifecycle, stalls and a keepalive at info, every minute at debug, and each change at trace. docs/architecture/bridge-diagnostics.md reads them.",
|
|
46
79
|
tag: "bridge-diagnostics",
|
|
47
80
|
maxStringChars: MAX_BRIDGE_DIAGNOSTIC_BYTES,
|
|
48
81
|
events: {
|
|
49
|
-
heartbeat: "
|
|
82
|
+
heartbeat: "A periodic snapshot of an open turn or process: every minute at debug; at info only as stall evidence (a stall starting or clearing, a late timer, a change during a silent stall) or the ten-minute keepalive.",
|
|
83
|
+
change: "At trace only: a snapshot written as soon as the phase, the pending tools or a counter past its threshold changes.",
|
|
50
84
|
"send-started": "A turn or process diagnostic scope began.",
|
|
51
85
|
"send-resolved": "The provider accepted a dispatch.",
|
|
52
86
|
"cancel-requested": "Cancellation of a turn was requested.",
|
|
@@ -345,7 +379,7 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
345
379
|
// ../protocol/src/log-vocabulary/environment.ts
|
|
346
380
|
var ENVIRONMENT_LOG_AREAS = defineLogAreas({
|
|
347
381
|
environment: {
|
|
348
|
-
description: "Environment naming,
|
|
382
|
+
description: "Environment naming, setup, status, moves, deletion and cleanup afterwards.",
|
|
349
383
|
events: {
|
|
350
384
|
"cleanup.branch-kept": "A deleted environment's local branch was kept, as it may hold unmerged work.",
|
|
351
385
|
"rename.failed": "Naming an environment from its pending prompt failed for the first time.",
|
|
@@ -354,6 +388,40 @@ var ENVIRONMENT_LOG_AREAS = defineLogAreas({
|
|
|
354
388
|
"setup.attention-not-recorded": "Held setup could not be recorded as needing the user's attention.",
|
|
355
389
|
"setup.coordinator-not-notified": "The worker's coordinator could not be told that its setup is held for approval.",
|
|
356
390
|
"setup.unknown-environment": "The renderer was asked to act on the setup of an environment it does not hold.",
|
|
391
|
+
"cleanup.rearmed": "A deleted environment's stopped cleanup is retried once under a new backend version.",
|
|
392
|
+
"cleanup.exhausted": "A deleted environment's cleanup keeps failing after its attempts; written once per environment.",
|
|
393
|
+
"cleanup.retry-not-admitted": "A cleanup retry was not admitted; the entry stays for the next start.",
|
|
394
|
+
"cleanup.step-failed": "One step of a deleted environment's cleanup failed; a later reconcile retries it.",
|
|
395
|
+
"cleanup.record-failed": "A finished cleanup step could not be recorded, so it may run again.",
|
|
396
|
+
"cleanup.sweep-failed": "A cleanup sweep failed; written once per sweep.",
|
|
397
|
+
"cleanup.reconcile-failed": "A cleanup reconcile pass failed; the next one retries.",
|
|
398
|
+
"orphan-state.remove-failed": "An orphaned environment state directory could not be removed.",
|
|
399
|
+
"orphan-state.removed": "Orphaned environment state directories were removed.",
|
|
400
|
+
"orphan-state.sweep-failed": "Sweeping orphaned environment state failed.",
|
|
401
|
+
"orphan-canvas.removed": "Orphaned design canvases were removed.",
|
|
402
|
+
"orphan-canvas.sweep-failed": "Sweeping orphaned design canvases failed.",
|
|
403
|
+
"orphan-branches.swept": "Orphaned environment branches were deleted, or kept as they may hold unmerged work.",
|
|
404
|
+
"stray-workspace.remove-failed": "A stray workspace directory could not be removed.",
|
|
405
|
+
"stray-workspace.removed": "Stray workspace directories were removed.",
|
|
406
|
+
"stray-workspace.kept": "Unowned workspace directories that hold files were kept; remove them by hand if unneeded.",
|
|
407
|
+
"temp-files.removed": "Abandoned temp files were removed.",
|
|
408
|
+
"status.ownership-probe-failed": "A strict container ownership probe failed, so the stored status is kept.",
|
|
409
|
+
"status.docker-error": "A transient Docker error stopped a status read, so the stored status is kept.",
|
|
410
|
+
"setup.clear-launch-failed": "A pending agent launch could not be cleared after setup failed.",
|
|
411
|
+
"setup.record-failure-failed": "A setup failure before its first attempt could not be recorded.",
|
|
412
|
+
"lifecycle.failed": "Starting, rebuilding or recreating an environment failed; `operation` says which.",
|
|
413
|
+
"tab-teardown.pending": "A tab's teardown failed and stays pending; the reconcile sweep retries.",
|
|
414
|
+
"tab-reconcile.skipped": "Orphaned tab reconciliation was skipped because pane layouts are unreadable.",
|
|
415
|
+
"orphan-session.reaped": "A native session no tab references was torn down.",
|
|
416
|
+
"handoff-sweep.failed": "Sweeping transferred transcripts no tab references failed.",
|
|
417
|
+
"delete.terminals-survived": "Terminal process trees outlived termination, so the deletion stops.",
|
|
418
|
+
"delete.artifacts-left": "Graph run artifact directories were not removed.",
|
|
419
|
+
"delete.worktrees-kept": "Graph runs kept branch worktrees.",
|
|
420
|
+
"delete.step-failed": "One best-effort part of deleting an environment failed; `step` says which, and the rest goes on.",
|
|
421
|
+
"merge-cleanup.resume-failed": "A merge cleanup interrupted by a restart could not be resumed.",
|
|
422
|
+
"move.sessions-not-moved": "A provider's sessions could not follow a moved environment.",
|
|
423
|
+
"move.recovery-failed": "Recovering an interrupted environment move failed.",
|
|
424
|
+
"stop.settle-activity-failed": "Agent activity could not be settled after a runtime stopped.",
|
|
357
425
|
...THROTTLE_LOG_EVENTS
|
|
358
426
|
}
|
|
359
427
|
}
|
|
@@ -362,10 +430,50 @@ var ENVIRONMENT_LOG_AREAS = defineLogAreas({
|
|
|
362
430
|
// ../protocol/src/log-vocabulary/gateway.ts
|
|
363
431
|
var GATEWAY_LOG_AREAS = defineLogAreas({
|
|
364
432
|
gateway: {
|
|
365
|
-
description: "The
|
|
433
|
+
description: "The gateway other devices, browsers and the desktop connect through.",
|
|
366
434
|
events: {
|
|
367
435
|
"remote.start-failed": "The desktop could not start the remote gateway.",
|
|
368
|
-
"remote.stop-failed": "The desktop could not stop the remote gateway cleanly."
|
|
436
|
+
"remote.stop-failed": "The desktop could not stop the remote gateway cleanly.",
|
|
437
|
+
disabled: "The gateway is disabled by its environment variable.",
|
|
438
|
+
"tailscale.no-address": "No Tailscale address was found, so the gateway did not start.",
|
|
439
|
+
"tailscale.no-address-fallback": "No Tailscale address was found, so the gateway binds its fallback address.",
|
|
440
|
+
"control.listening": "The backend control listener is up.",
|
|
441
|
+
"browser.listening": "The browser listener is up.",
|
|
442
|
+
"browser.unavailable": "The browser listener could not start; control remains if started, or loopback is attempted.",
|
|
443
|
+
"browser.unavailable-degraded": "No browser listener was started (`reason=no-tailscale-address`); control remains if started, or loopback is attempted.",
|
|
444
|
+
"loopback.listening": "The loopback client listener is up.",
|
|
445
|
+
"loopback.unavailable": "The loopback client listener could not start.",
|
|
446
|
+
"auth-token.stored": "The gateway token's file was written. The path only, never the token.",
|
|
447
|
+
"auth-token.persist-failed": "The gateway token could not be saved.",
|
|
448
|
+
"port.fallback": "The preferred port was taken, so a nearby one is used.",
|
|
449
|
+
"port.fallback-distant": "The preferred port and those nearby were taken, so another is used.",
|
|
450
|
+
"request.failed": "A gateway request failed. Throttled: repeats are counted, not written.",
|
|
451
|
+
"websocket.upgrade-failed": "A WebSocket upgrade failed.",
|
|
452
|
+
"events.client-dropped": "An event-stream client buffered too much and was dropped; it reconnects and refetches.",
|
|
453
|
+
"proxy.client-disconnected": "A proxy client went away, so its upstream request was aborted.",
|
|
454
|
+
"throttle.suppressed": "Repeats of the throttled `site` were counted over a window, not written.",
|
|
455
|
+
"throttle.recovered": "The throttled `site` succeeded again, so its fault has cleared.",
|
|
456
|
+
"throttle.evicted": "The tracked-key limit dropped the `site`, so no recovered line follows unless it fails again."
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
"gateway.terminal": {
|
|
460
|
+
description: "The gateway's terminal WebSocket.",
|
|
461
|
+
events: {
|
|
462
|
+
"upgrade-rejected": "A terminal WebSocket upgrade was refused.",
|
|
463
|
+
"socket-error": "A terminal WebSocket reported an error.",
|
|
464
|
+
"subscription-failed": "A terminal subscription failed.",
|
|
465
|
+
"operation-failed": "A terminal operation failed. Fixed text: the operation can hold terminal input."
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
"gateway.tailscale": {
|
|
469
|
+
description: "Tailscale Serve for desktop web access and a standalone backend.",
|
|
470
|
+
events: {
|
|
471
|
+
"web-access.disable-failed": "Desktop web access could not be turned off.",
|
|
472
|
+
"web-access.enable-failed": "Desktop web access could not be turned on.",
|
|
473
|
+
"web-access.cleanup-failed": "Cleaning up after a failed enable also failed.",
|
|
474
|
+
"web-access.reset-failed": "Desktop web access could not be reset.",
|
|
475
|
+
"startup.init-failed": "Desktop web access could not be initialized at startup.",
|
|
476
|
+
available: "Tailscale Serve is publishing the gateway."
|
|
369
477
|
}
|
|
370
478
|
}
|
|
371
479
|
});
|
|
@@ -376,6 +484,18 @@ var LOCAL_SERVER_LOG_AREAS = defineLogAreas({
|
|
|
376
484
|
description: "Agent bridge processes the backend runs on the host.",
|
|
377
485
|
events: {
|
|
378
486
|
"bridge.not-answering": "A bridge with work in progress fails health checks, so it is not restarted yet.",
|
|
487
|
+
"bridge-runtime.installing": "A bridge runtime is being installed.",
|
|
488
|
+
"bridge-runtime.installed": "A bridge runtime finished installing.",
|
|
489
|
+
"opencode.database-lost-retrying": "OpenCode lost its shared database at startup, so it is retried.",
|
|
490
|
+
"server.stopping": "A local server is being stopped, for the fixed `reason` given.",
|
|
491
|
+
"reaper.tmux-list-failed": "Orphaned claude-tmux sessions could not be listed.",
|
|
492
|
+
"reaper.tmux-kill-failed": "An orphaned tmux session could not be killed.",
|
|
493
|
+
"reaper.tmux-reaped": "Orphaned claude-tmux sessions of a deleted environment were killed.",
|
|
494
|
+
"reaper.runtime-root-remove-failed": "A claude-tmux runtime root could not be removed; it stays for a retry.",
|
|
495
|
+
"reaper.server-unidentified": "An orphan candidate could not be identified, so its record is kept.",
|
|
496
|
+
"reaper.server-refused": "An orphan candidate leads no process group, so it was not reaped.",
|
|
497
|
+
"reaper.server-reaping": "An orphaned server is being stopped.",
|
|
498
|
+
"reaper.server-kill-failed": "An orphaned server did not exit.",
|
|
379
499
|
...THROTTLE_LOG_EVENTS
|
|
380
500
|
}
|
|
381
501
|
}
|
|
@@ -417,7 +537,12 @@ var MODEL_LOG_AREAS = defineLogAreas({
|
|
|
417
537
|
models: {
|
|
418
538
|
description: "Agent model catalogues and their persistent caches.",
|
|
419
539
|
events: {
|
|
420
|
-
"cache.write-failed": "A successful catalogue refresh could not update the host cache."
|
|
540
|
+
"cache.write-failed": "A successful catalogue refresh could not update the host cache.",
|
|
541
|
+
"seed.pi-failed": "The host Pi model catalogue could not be seeded; the next launch retries.",
|
|
542
|
+
"bridge.not-ready": "The first-use catalogue bridge did not become ready.",
|
|
543
|
+
"bridge.start-failed": "The first-use catalogue bridge failed to start.",
|
|
544
|
+
"probe.exit-unclean": "A catalogue probe or sign-in server did not exit cleanly.",
|
|
545
|
+
"download.deferred": "A model catalogue could not be downloaded yet."
|
|
421
546
|
}
|
|
422
547
|
}
|
|
423
548
|
});
|
|
@@ -428,8 +553,61 @@ var NATIVE_AGENT_LOG_AREAS = defineLogAreas({
|
|
|
428
553
|
description: "Native agent sessions and what the backend reads from their bridges.",
|
|
429
554
|
events: {
|
|
430
555
|
"catalogue.outdated-bridge": "A bridge predates the command catalogue, so its commands stay unavailable.",
|
|
556
|
+
"handoff.summary-read-failed": "Change summaries could not be read for a handoff, so the carrier says they are unmeasured.",
|
|
557
|
+
"handoff.consume-failed": "A delivered handoff could not be marked consumed.",
|
|
558
|
+
"job.pr-refresh-rollback-failed": "Rolling back a pull request refresh for a job failed.",
|
|
559
|
+
"job.resend-queue-failed": "A resend could not be queued for a job.",
|
|
560
|
+
"interaction.requests-dropped": "Interaction requests that could not be mapped were dropped.",
|
|
561
|
+
"interaction.observe-failed": "Observing a session's interactions failed. Error class only.",
|
|
562
|
+
"human-prompt.listener-failed": "A human prompt listener threw; the others still run.",
|
|
563
|
+
"question.attention-record-failed": "Attention for an async question could not be recorded; the transcript stays readable.",
|
|
564
|
+
"activity.reconcile-failed": "Reconciling an environment's activity failed. Error class only.",
|
|
565
|
+
"activity.persist-failed": "An environment's activity could not be saved.",
|
|
566
|
+
"pr-refresh.schedule-failed": "A pull request refresh after completion could not be scheduled.",
|
|
567
|
+
"launch.startup-failed": "A startup launch failed; it retries unless `permanent`.",
|
|
568
|
+
"queue.failing": "A native prompt queue keeps failing. The key and reason only, never the prompt.",
|
|
569
|
+
"provider.retire-failed": "Retiring an obsolete provider failed.",
|
|
570
|
+
"workflow-result.store-unavailable": "The workflow result store is unavailable, so the provider's result is used.",
|
|
571
|
+
"catalogue.refresh-failed": "A provider's command catalogue could not be refreshed.",
|
|
572
|
+
"dispatch.attach-failed": "Attaching an agent before dispatch failed; the prompt request answers authoritatively.",
|
|
573
|
+
"coordinator-context.ack-failed": "Coordinator repository context could not be acknowledged.",
|
|
574
|
+
"naming.prepare-failed": "First-prompt naming could not be prepared; the prompt still goes ahead.",
|
|
575
|
+
"interrupt.persist-failed": "A turn interrupt could not be saved, so automatic publication stays fenced.",
|
|
576
|
+
"resume.close-replaced-failed": "The session a resume replaced could not be closed.",
|
|
577
|
+
"sign-in.check-failed": "A turn could not be checked for a login refusal.",
|
|
578
|
+
"sign-in.resend-failed": "Sending refused prompts after sign-in failed.",
|
|
579
|
+
"sign-in.prompt-resend-failed": "One refused prompt could not be sent again after sign-in. Error class only.",
|
|
580
|
+
"shutdown.checkpoints-skipped": "Shutdown skipped display-tail checkpoints; provider history stays authoritative. Count only.",
|
|
581
|
+
"turn-recovery.failed": "Recovering an incomplete turn failed.",
|
|
582
|
+
"turn-recovery.exhausted": "A turn failed again after automatic recovery and is left for the user.",
|
|
583
|
+
"turn-recovery.retrying": "An incomplete or provider-failed turn is being retried automatically.",
|
|
584
|
+
"usage-limit.resend-failed": "Resending after a usage limit failed. An unknown send stays in the journal.",
|
|
585
|
+
"title.strategy-failed": "A session title strategy failed, so the next is tried. Content-free: the error can quote the prompt.",
|
|
431
586
|
...THROTTLE_LOG_EVENTS
|
|
432
587
|
}
|
|
588
|
+
},
|
|
589
|
+
"native-agent.goal": {
|
|
590
|
+
description: "The /goal loop: advancing goals and their verifiers.",
|
|
591
|
+
events: {
|
|
592
|
+
"advance.failed": "A goal could not advance; the next sweep retries.",
|
|
593
|
+
"attention.record-failed": "Attention for a goal could not be recorded.",
|
|
594
|
+
"turn-end.settle-failed": "Turn-end work for a goal could not be settled.",
|
|
595
|
+
"verifier.finish-failed": "A verifier failed to finish; the goal stays verifying, so the next sweep runs it again.",
|
|
596
|
+
"verifier.stop-failed": "An earlier verifier could not be stopped.",
|
|
597
|
+
"recover.failed": "Goals could not be recovered at startup."
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
"native-agent.opencode": {
|
|
601
|
+
description: "The OpenCode provider: its request monitor, retries and agent tools.",
|
|
602
|
+
events: {
|
|
603
|
+
"retry.abort-failed": "Aborting an automatic retry failed. Error class only.",
|
|
604
|
+
"retry.abort-not-scheduled": "An automatic retry abort could not be scheduled. Error class only.",
|
|
605
|
+
"agent-tools.unavailable": "OpenCode agent tools remain unavailable for a session.",
|
|
606
|
+
"coordinator-servers.unavailable": "OpenCode coordinator research servers are unavailable.",
|
|
607
|
+
"monitor.reconnecting": "The request monitor lost its stream and is reconnecting. Error class only.",
|
|
608
|
+
"worker-limit.reached": "The bounded request workers are full, so the stream restarts and a snapshot reconciles.",
|
|
609
|
+
"request.failed": "Handling a request event failed, so the stream restarts. Error class only."
|
|
610
|
+
}
|
|
433
611
|
}
|
|
434
612
|
});
|
|
435
613
|
|
|
@@ -452,6 +630,17 @@ var PREVIEW_LOG_AREAS = defineLogAreas({
|
|
|
452
630
|
"partitions.retry-forgotten-failed": "Retrying a forgotten preview cleanup failed.",
|
|
453
631
|
"port-hints.persist-failed": "Preview port hints could not be saved.",
|
|
454
632
|
"transport.close-failed": "A preview transport could not be closed.",
|
|
633
|
+
"ca-bundle.read-failed": "The upstream CA bundle could not be read.",
|
|
634
|
+
"publication.start-failed": "Private preview publication did not start.",
|
|
635
|
+
"publication.reconfigure-failed": "Preview publication could not be reconfigured.",
|
|
636
|
+
"publication.listening": "Private preview origins are listening.",
|
|
637
|
+
"certificate.reloaded": "The preview certificate was reloaded.",
|
|
638
|
+
"access.revoked-close-failed": "A revoked preview resource could not be closed. Error class only.",
|
|
639
|
+
"registry.invalid-definition": "An invalid stored preview service definition was ignored.",
|
|
640
|
+
"registry.environment-reconcile-failed": "An environment's preview services could not be reconciled.",
|
|
641
|
+
"registry.resolver-failed": "A preview resolver failed. Error class only.",
|
|
642
|
+
"registry.revocation-listener-failed": "A preview revocation listener threw. Error class only.",
|
|
643
|
+
"registry.change-emit-failed": "A preview change event could not be emitted. Error class only.",
|
|
455
644
|
...THROTTLE_LOG_EVENTS
|
|
456
645
|
}
|
|
457
646
|
}
|
|
@@ -470,9 +659,33 @@ var RUNTIME_LOG_AREAS = defineLogAreas({
|
|
|
470
659
|
// ../protocol/src/log-vocabulary/terminal.ts
|
|
471
660
|
var TERMINAL_LOG_AREAS = defineLogAreas({
|
|
472
661
|
terminal: {
|
|
473
|
-
description: "The renderer's
|
|
662
|
+
description: "Terminals. The renderer's lines stay in the browser console; the backend's reach the saved log.",
|
|
474
663
|
events: {
|
|
475
664
|
"input.undelivered": "A keystroke did not reach a shell: `no-session` or `not-delivered`.",
|
|
665
|
+
"orphan.reaped": "A terminal no tab references was closed.",
|
|
666
|
+
"agent-completion.notify-failed": "A terminal agent's completion could not be reported.",
|
|
667
|
+
"activity.record-failed": "Terminal environment activity could not be recorded.",
|
|
668
|
+
"pty.exit-listener-failed": "A terminal exit listener threw; the others still run.",
|
|
669
|
+
"pty.exit-notify-failed": "Notifying a terminal's exit failed.",
|
|
670
|
+
"pty.late-exit-listener-failed": "A listener added after a terminal exited threw.",
|
|
671
|
+
"setup.pty-reused": "A setup terminal reused its existing PTY.",
|
|
672
|
+
"setup.pty-spawning": "A setup terminal is spawning its PTY. The argument count only, never the arguments.",
|
|
673
|
+
"setup.pty-spawned": "A setup terminal's PTY started.",
|
|
674
|
+
"setup.pty-exited": "A setup terminal's PTY exited.",
|
|
675
|
+
"setup.preparing": "Workspace preparation started in the setup terminal.",
|
|
676
|
+
"setup.session-creating": "A setup session is being created.",
|
|
677
|
+
"setup.intro-emitted": "The setup intro was written to the terminal.",
|
|
678
|
+
"setup.completed": "Setup finished.",
|
|
679
|
+
"setup.failed": "Setup failed.",
|
|
680
|
+
"setup.already-complete": "Setup was requested but had already finished.",
|
|
681
|
+
"setup.renderer-ensured": "The renderer asked for setup to be running.",
|
|
682
|
+
"setup.renderer-requested": "The renderer asked for the setup session.",
|
|
683
|
+
"setup.renderer-requested-none": "The renderer asked for a setup session that does not exist.",
|
|
684
|
+
"setup.no-commands": "An environment has no setup commands to run.",
|
|
685
|
+
"setup.already-running": "Setup was requested while it was already running.",
|
|
686
|
+
"setup.held-for-approval": "Setup is held until its commands are approved.",
|
|
687
|
+
"setup.renderer-checked-session": "The renderer asked whether a setup terminal session exists.",
|
|
688
|
+
"setup.renderer-requested-buffer": "The renderer asked for a setup terminal's output buffer. A size only, never its contents.",
|
|
476
689
|
"input.resume-failed": "Asking the backend to resume refused terminal input failed.",
|
|
477
690
|
"input.write-failed": "Writing input to a terminal session threw.",
|
|
478
691
|
"listener.remove-failed": "Removing a terminal output listener threw.",
|
|
@@ -572,13 +785,39 @@ var TERMINAL_LOG_AREAS = defineLogAreas({
|
|
|
572
785
|
// ../protocol/src/log-vocabulary/tmux.ts
|
|
573
786
|
var TMUX_LOG_AREAS = defineLogAreas({
|
|
574
787
|
tmux: {
|
|
575
|
-
description: "
|
|
788
|
+
description: "Claude tmux tabs: launch, the poll loop, cleanup and the tmux prompt queue.",
|
|
576
789
|
events: {
|
|
577
790
|
"poll.discovery-failed": "Finding the session's transcript failed; a later tick retries.",
|
|
578
791
|
"poll.snapshot-failed": "Reading the hook and transcript state failed; the next tick retries.",
|
|
579
792
|
"poll.drain-pending-failed": "Delivering pending hook events failed; the next tick retries.",
|
|
580
793
|
"poll.drain-timeouts-failed": "Delivering hook timeouts failed; the next tick retries.",
|
|
581
794
|
"poll.tail-failed": "Reading new transcript lines failed; the next tick retries.",
|
|
795
|
+
"cleanup.session-stop-failed": "A tmux session could not be stopped while cleaning up an environment.",
|
|
796
|
+
"cleanup.skipped": "Environment tmux cleanup was skipped because tmux could not be reached and nothing required it.",
|
|
797
|
+
"cleanup.environments-load-failed": "Environments could not be loaded during tmux cleanup, so it stays incomplete.",
|
|
798
|
+
"cleanup.kill-failed": "An environment's tmux sessions could not be killed.",
|
|
799
|
+
"hooks.uninstall-failed": "Workspace hooks could not be uninstalled.",
|
|
800
|
+
"hooks.git-exclude-failed": "The git exclude for Claude's local settings could not be set.",
|
|
801
|
+
"naming.prepare-failed": "First-prompt naming could not be prepared; the prompt still goes ahead.",
|
|
802
|
+
"orphans.skipped": "Orphan reconciliation was skipped because pane layouts are unreadable.",
|
|
803
|
+
"orphan.reaped": "A tmux session no tab references was killed.",
|
|
804
|
+
"orphan.kill-skipped": "An orphan tmux kill was skipped because the tmux server could not be reached.",
|
|
805
|
+
"cli.thinking-display-probe-failed": "Probing the CLI for --thinking-display failed, so it launches without it.",
|
|
806
|
+
"cli.fast-mode-unsupported": "The claude CLI lacks --settings, so it launches without fast mode.",
|
|
807
|
+
"cli.effort-unsupported": "The claude CLI lacks --effort, so it launches without it.",
|
|
808
|
+
"interactive.snapshot-failed": "An interactive snapshot failed; expected while a pane is closing.",
|
|
809
|
+
"signal.arm-failed": "The Claude state signal could not be armed.",
|
|
810
|
+
"signal.degraded": "The Claude state signal missed a change or rang too often, so polling stays at one second until it is re-armed.",
|
|
811
|
+
"pr-refresh.schedule-failed": "A pull request refresh after a turn could not be scheduled.",
|
|
812
|
+
"pr-probe.failed": "Probing for a pull request an agent created failed.",
|
|
813
|
+
"activity.persist-failed": "Tmux tab activity could not be saved.",
|
|
814
|
+
"fast-mode.persist-failed": "The launch fast mode could not be saved.",
|
|
815
|
+
"fast-mode.repair-failed": "Fast mode metadata could not be repaired on a reattached session.",
|
|
816
|
+
"pane.observe-failed": "A pane observation failed. Error class only: pane contents are sensitive.",
|
|
817
|
+
"turn.failure-record-failed": "A failed turn could not be recorded.",
|
|
818
|
+
"slash-command.settle-timeout": "Timed out waiting for a Claude slash command to settle.",
|
|
819
|
+
"queue.failing": "A tmux prompt queue keeps failing to dispatch.",
|
|
820
|
+
"queue.rename-failed": "An environment could not be named from its first prompt; the prompt still goes ahead.",
|
|
582
821
|
...THROTTLE_LOG_EVENTS
|
|
583
822
|
}
|
|
584
823
|
}
|
|
@@ -605,7 +844,8 @@ var UPDATER_LOG_AREAS = defineLogAreas({
|
|
|
605
844
|
"remote.unavailable": "Updates requested by remote clients are unavailable in this session.",
|
|
606
845
|
"restart-prompt.failed": "The restart prompt for a downloaded update failed.",
|
|
607
846
|
unavailable: "Auto-update could not be set up in this session.",
|
|
608
|
-
"update.failed": "electron-updater reported an update error."
|
|
847
|
+
"update.failed": "electron-updater reported an update error.",
|
|
848
|
+
"standalone.restarting": "A standalone backend is restarting into a new version."
|
|
609
849
|
}
|
|
610
850
|
}
|
|
611
851
|
});
|
|
@@ -616,11 +856,460 @@ var WEB_ANNOTATIONS_LOG_AREAS = defineLogAreas({
|
|
|
616
856
|
description: "Web annotation requests and their background reconciler.",
|
|
617
857
|
events: {
|
|
618
858
|
"reconcile.failed": "A background reconcile pass failed; the next one retries.",
|
|
859
|
+
"legacy.degraded": "Legacy annotation storage is damaged, so the previous committed copy is served read-only.",
|
|
860
|
+
"legacy.draft-index-problem": "The legacy draft index could not be used; `status` says why.",
|
|
861
|
+
"legacy.unreadable-records": "The legacy import found unreadable records; they stay unread.",
|
|
862
|
+
"legacy.unavailable": "Legacy annotation storage could not be read.",
|
|
863
|
+
"legacy.unreadable": "An environment's legacy annotation storage is unreadable.",
|
|
864
|
+
"legacy.archive-failed": "Imported legacy annotation files could not be archived.",
|
|
865
|
+
"legacy.files-archived": "Legacy files beside an imported environment were archived, not imported.",
|
|
866
|
+
"migration.draft-failed": "Migrating one draft failed.",
|
|
867
|
+
"draft-reconcile.deferred": "Draft reconciliation was deferred; a later pass retries.",
|
|
868
|
+
"request.handoff-deferred": "A request's handoff was deferred; a later pass retries.",
|
|
869
|
+
"evidence.materialize-failed": "Materializing a request's evidence failed; it backs off and retries.",
|
|
870
|
+
"queue.publish-deferred": "Publishing a request to the queue was deferred; it retries under the same id.",
|
|
871
|
+
"request.reconcile-failed": "Reconciling a request failed; the next pass retries.",
|
|
872
|
+
"turn-end.reconcile-failed": "Reconciling a request at the end of a turn failed; the next pass retries.",
|
|
873
|
+
"gc.failed": "Annotation garbage collection failed; the next pass retries.",
|
|
874
|
+
"record.unavailable": "An annotation record is unavailable; written once per record.",
|
|
875
|
+
"storage.unavailable": "An environment's annotation store is unreadable.",
|
|
876
|
+
"change-hint.listener-failed": "A change hint listener threw.",
|
|
877
|
+
"orphan.remove-failed": "An orphaned environment's annotation storage could not be removed.",
|
|
878
|
+
"storage.load-failed": "An environment's annotation storage could not be loaded.",
|
|
619
879
|
...THROTTLE_LOG_EVENTS
|
|
620
880
|
}
|
|
621
881
|
}
|
|
622
882
|
});
|
|
623
883
|
|
|
884
|
+
// ../protocol/src/log-vocabulary/storage.ts
|
|
885
|
+
var STORAGE_LOG_AREAS = defineLogAreas({
|
|
886
|
+
storage: {
|
|
887
|
+
description: "The SQLite-backed stores, their snapshots and imports from older formats.",
|
|
888
|
+
events: {
|
|
889
|
+
"usage.environment-label-failed": "Usage labels could not be retained for a removed environment; deletion continues.",
|
|
890
|
+
"snapshot.integrity-failed": "An hourly database snapshot failed its integrity check and was discarded.",
|
|
891
|
+
"snapshot.skipped-low-disk": "The hourly database snapshot was skipped because the disk lacks room; `retryAt` says when it tries again.",
|
|
892
|
+
"snapshot.failed": "The hourly database snapshot failed; `retryAt` says when it tries again, if known.",
|
|
893
|
+
"listener.attention-failed": "An environment attention listener threw; the committed mutation stands.",
|
|
894
|
+
"listener.change-failed": "A resource change listener threw; the committed mutation stands.",
|
|
895
|
+
"kanban.image-cleanup-failed": "An orphaned Kanban image could not be removed after its retries; it is safe to remove later.",
|
|
896
|
+
"nodes.entries-dropped": "Unreadable node registry entries were ignored.",
|
|
897
|
+
"preview-identity.reminted": "The data directory moved or was copied, so previews get a new backend identity.",
|
|
898
|
+
"machine-profile.invalid": "The stored machine profile was invalid and the default was restored.",
|
|
899
|
+
"permission-rules.cleanup-failed": "A deleted project's permission rules could not be removed.",
|
|
900
|
+
"retired.turn-cleanup-pending": "Cleanup of a retired Looped Review turn did not finish and stays pending.",
|
|
901
|
+
"handoffs.prune-failed": "Pruning agent handoffs that nothing references failed; a later prune retries.",
|
|
902
|
+
"desktop-connections.malformed": "Stored desktop connection settings were malformed, so the local connection is used.",
|
|
903
|
+
"legacy-json.moved": "JSON store files written after the SQLite migration were archived, not imported.",
|
|
904
|
+
"legacy-json.archive-failed": "Imported JSON store files could not be archived."
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
});
|
|
908
|
+
|
|
909
|
+
// ../protocol/src/log-vocabulary/build-pipeline.ts
|
|
910
|
+
var BUILD_PIPELINE_LOG_AREAS = defineLogAreas({
|
|
911
|
+
"build-pipeline": {
|
|
912
|
+
description: "Build pipelines: their supervision, stages, transcripts and sidebar state.",
|
|
913
|
+
events: {
|
|
914
|
+
"sidebar.reconcile-failed": "Sidebar activity for pipelines could not be reconciled.",
|
|
915
|
+
"sidebar.update-failed": "The sidebar could not be updated for one pipeline.",
|
|
916
|
+
"result.consume-deferred": "Consuming a stage's workflow result failed; it stays staged and is retried.",
|
|
917
|
+
"consolidation.consume-deferred": "Consuming a review consolidation result failed; it stays pending and is retried.",
|
|
918
|
+
"dispatch.prepare-failed": "Attaching the agent before dispatch failed; the prompt request does the same work and answers authoritatively.",
|
|
919
|
+
"interaction.resolved": "A human interaction on a pipeline stage resolved. Metadata only.",
|
|
920
|
+
"transcripts.migrated": "A transcript migration pass moved stage transcripts; counts only.",
|
|
921
|
+
"transcripts.maintenance-failed": "Migrating or sweeping stage transcripts failed; the next start retries.",
|
|
922
|
+
"restore.skipped": "A pipeline could not be restored at startup and was skipped.",
|
|
923
|
+
"criteria.record-failed": "Acceptance criteria results could not be recorded on the ticket.",
|
|
924
|
+
"workspace.waiting": "A pipeline is waiting for its workspace; written once per reason.",
|
|
925
|
+
"rewind.pending": "A pipeline's code rewind has not finished; written once per reason.",
|
|
926
|
+
"kanban.status-failed": "A restarted pipeline's Kanban status could not be set; it retries shortly.",
|
|
927
|
+
"usage.read-failed": "Reading a stage session's token usage failed.",
|
|
928
|
+
"checkpoint.deferred": "A stage transcript checkpoint could not be written yet; the provider's history stands.",
|
|
929
|
+
"checkpoint.not-committed": "A stage transcript checkpoint was reverted in the commit that should have kept it.",
|
|
930
|
+
"legacy-transcript.deferred": "Moving a legacy inline transcript failed; the inline body stays readable."
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
});
|
|
934
|
+
|
|
935
|
+
// ../protocol/src/log-vocabulary/agent-branch.ts
|
|
936
|
+
var AGENT_BRANCH_LOG_AREAS = defineLogAreas({
|
|
937
|
+
"agent-branch": {
|
|
938
|
+
description: "Agent branches shared by review fan-outs, graph agents and goal verifiers; `owner` names which.",
|
|
939
|
+
events: {
|
|
940
|
+
"observation.checkpoint-failed": "Checkpointing reviewer observations failed; the next pass retries.",
|
|
941
|
+
"transcript.mirror-failed": "Mirroring a reviewer transcript failed.",
|
|
942
|
+
"usage.read-failed": "Reading a reviewer's token usage failed.",
|
|
943
|
+
"result.nudge-failed": "An agent with an uncommitted result could not be nudged.",
|
|
944
|
+
"dispatch.prepare-failed": "Attaching the agent before dispatch failed; the prompt request answers authoritatively.",
|
|
945
|
+
"result.consume-deferred": "Consuming a branch's workflow result failed; it stays staged and is retried."
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
});
|
|
949
|
+
|
|
950
|
+
// ../protocol/src/log-vocabulary/change-tracking.ts
|
|
951
|
+
var CHANGE_TRACKING_LOG_AREAS = defineLogAreas({
|
|
952
|
+
"change-tracking": {
|
|
953
|
+
description: "Change tracking: turn capture, evidence pulls and measurements.",
|
|
954
|
+
events: {
|
|
955
|
+
"journal-import.failed": "Importing surviving OpenCode command journals as legacy summaries failed.",
|
|
956
|
+
"projection.failed": "Projecting a change event onto its environment failed.",
|
|
957
|
+
"startup.reconcile-failed": "Reconciling change tracking at startup failed.",
|
|
958
|
+
"turn-start.capture-failed": "Capturing a turn's start failed, so the turn is untracked.",
|
|
959
|
+
"dispatch.record-failed": "Recording a turn's dispatch outcome failed.",
|
|
960
|
+
"turn.finalize-failed": "Finalizing a turn failed.",
|
|
961
|
+
"turn.settle-failed": "Settling a late interrupted turn failed.",
|
|
962
|
+
"evidence.pull-failed": "Pulling change evidence from a bridge failed; a later pull retries.",
|
|
963
|
+
"measurement.failed": "Recomputing a tool's measurement failed."
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
"diff-stats": {
|
|
967
|
+
description: "Environment diff stats and the worktree signals that drive them.",
|
|
968
|
+
events: {
|
|
969
|
+
"baseline.update-failed": "An environment's diff baseline could not be updated.",
|
|
970
|
+
"scan.watcher-failed": "An environment's diff watcher failed; its scans fall back to polling.",
|
|
971
|
+
"scan.failed": "A diff scan failed; the last results stay, marked stale, and the scan is retried.",
|
|
972
|
+
"scan.freshness-read-failed": "Reading whether an environment's remote is fresh failed.",
|
|
973
|
+
"scan.listener-failed": "A change-tracking scan listener threw; the scan itself stands.",
|
|
974
|
+
"emit.diff-stats-failed": "A diff stats change could not be emitted to its sink.",
|
|
975
|
+
"emit.worktree-snapshot-failed": "A worktree snapshot could not be emitted to its sink.",
|
|
976
|
+
"signal.demoted": "A worktree signal stopped being trusted, so scans fall back to timers until it is re-armed."
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
});
|
|
980
|
+
|
|
981
|
+
// ../protocol/src/log-vocabulary/coordinator.ts
|
|
982
|
+
var COORDINATOR_LOG_AREAS = defineLogAreas({
|
|
983
|
+
coordinator: {
|
|
984
|
+
description: "Coordinators: delegations, status wakes and their store.",
|
|
985
|
+
events: {
|
|
986
|
+
"delegation.open-failed": "A delegation could not be opened; `source` says for what.",
|
|
987
|
+
"deliver-now.drain-failed": "The mail delivery pass after deliverNow failed; the next sweep delivers.",
|
|
988
|
+
"mail.move-failed": "Mail could not move to the new main coordinator.",
|
|
989
|
+
"work.move-failed": "Work could not move to the main coordinator.",
|
|
990
|
+
"wake.observe-remote-workflow-failed": "A remote workflow could not be observed for status wakes.",
|
|
991
|
+
"wake.observe-pull-request-failed": "A pull request could not be observed for status wakes.",
|
|
992
|
+
"wake.observe-workflow-failed": "A workflow could not be observed for status wakes.",
|
|
993
|
+
"wake.deliver-failed": "A workflow status wake could not be delivered; the next pass retries.",
|
|
994
|
+
"wake.waiting-check-failed": "A waiting worker could not be checked; the next pass retries.",
|
|
995
|
+
"wake.resolve-report-failed": "A finished Resolve tab could not be reported.",
|
|
996
|
+
"wake.waiting-report-failed": "A waiting worker could not be reported.",
|
|
997
|
+
"wake.worker-outcomes-failed": "Coordinator-owned workers' merges and deletions could not be checked; the next sweep retries.",
|
|
998
|
+
"store.malformed": "The coordinator store was malformed and is treated as empty.",
|
|
999
|
+
"store.unsupported-version": "The coordinator store has an unsupported version and is treated as empty.",
|
|
1000
|
+
"store.invalid-workspace": "An invalid coordinator workspace record was ignored.",
|
|
1001
|
+
"store.workflows-cleared": "The workflow store was full, so a batch of its oldest finished records was removed.",
|
|
1002
|
+
"store.workflows-in-use": "The workflow store was full and every record was still in use, so new work was refused.",
|
|
1003
|
+
"remote-worker.settle-failed": "A remote worker could not be settled."
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
});
|
|
1007
|
+
|
|
1008
|
+
// ../protocol/src/log-vocabulary/review.ts
|
|
1009
|
+
var REVIEW_LOG_AREAS = defineLogAreas({
|
|
1010
|
+
review: {
|
|
1011
|
+
description: "Multi Review workflows: scheduling, graph runs and interactive fix sessions.",
|
|
1012
|
+
events: {
|
|
1013
|
+
"fix-tab.publish-failed": "A fix request was delivered but its tab could not be opened; the user is told.",
|
|
1014
|
+
"graph-run.not-started": "A workflow's graph run did not start.",
|
|
1015
|
+
"reconcile.scan-failed": "A reconciliation scan failed; the next scan retries.",
|
|
1016
|
+
"graph-engine.unavailable": "The graph engine is selected but unavailable, so the bespoke engine runs.",
|
|
1017
|
+
"graph-run.cancel-failed": "Cancelling a graph run failed; the next pass projects how it ended.",
|
|
1018
|
+
"delete.cleanup-failed": "A cleanup step after deleting a workflow failed; stale tabs reconcile away on hydration.",
|
|
1019
|
+
"fix-session.read-failed": "Reading an interactive fix session's state failed.",
|
|
1020
|
+
"fix-outcome.read-failed": "Reading an interactive fix's outcome failed; it stays pending.",
|
|
1021
|
+
"fix-usage.read-failed": "Reading a fix session's token usage failed.",
|
|
1022
|
+
"result.consume-deferred": "Consuming a workflow result failed; it stays staged and is retried.",
|
|
1023
|
+
"failure-triage.failed": "Classifying a review package's failing tests failed; the package is sealed without the triage and says so."
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
"pull-request": {
|
|
1027
|
+
description: "Pull request monitoring, auto-merge and the `gh` reads behind them.",
|
|
1028
|
+
events: {
|
|
1029
|
+
"merged-state.persist-failed": "A merged pull request's state could not be saved; GitHub stays authoritative and cleanup goes on.",
|
|
1030
|
+
"refresh.failed": "A pull request could not be refreshed; the armed flag stands.",
|
|
1031
|
+
"arm.track-failed": "An armed environment could not be tracked; the monitor's next sync retries.",
|
|
1032
|
+
"gh.pr-list-unparseable": "`gh pr list` returned nothing that parses. Sizes only, never the output.",
|
|
1033
|
+
"monitor.start-failed": "Monitoring could not start for a newly opened pull request.",
|
|
1034
|
+
"cleanup-scheduler.missing": "A merged pull request was seen, but this runtime has no merge cleanup scheduler.",
|
|
1035
|
+
"auto-merge.evaluation-failed": "Evaluating an environment for auto-merge failed.",
|
|
1036
|
+
"auto-merge.merge-failed": "Auto-merge could not merge a pull request; the attempt is held and retried.",
|
|
1037
|
+
"auto-merge.resolve-failed": "Auto-merge could not launch Resolve for a pull request; the attempt is held and retried.",
|
|
1038
|
+
"monitor.detection-failed": "Checking an environment for its pull request failed.",
|
|
1039
|
+
"monitor.detection-admission-failed": "A pull request check could not be admitted to the work pool.",
|
|
1040
|
+
"monitor.terminal-repair-failed": "Repairing a merged or closed pull request's side effects failed.",
|
|
1041
|
+
"monitor.terminal-resume-failed": "Resuming a merged or closed pull request's side effects failed.",
|
|
1042
|
+
"monitor.stale-reading-ignored": "A non-merged reading (`state`) for a pull request already merged was ignored as stale.",
|
|
1043
|
+
"monitor.state-persist-failed": "A pull request's observed state could not be saved.",
|
|
1044
|
+
"monitor.state-clear-failed": "A pull request's saved state could not be cleared.",
|
|
1045
|
+
"monitor.task-reconcile-failed": "Updating the Kanban task of a merged or closed (`state`) pull request failed.",
|
|
1046
|
+
"monitor.task-store-failed": "A pull request could not be recorded on its Kanban task.",
|
|
1047
|
+
"monitor.emit-failed": "A pull request monitor event could not be emitted to its sink."
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
});
|
|
1051
|
+
|
|
1052
|
+
// ../protocol/src/log-vocabulary/public-api.ts
|
|
1053
|
+
var PUBLIC_API_LOG_AREAS = defineLogAreas({
|
|
1054
|
+
"public-api": {
|
|
1055
|
+
description: "The public CLI's operations: their outcomes, reconciliation and exec workers.",
|
|
1056
|
+
events: {
|
|
1057
|
+
"outcome.record-failed": "A background operation's outcome could not be recorded; reconciliation settles it.",
|
|
1058
|
+
"goal-checks.stop-failed": "Goal checks could not be stopped.",
|
|
1059
|
+
"exec.list-failed": "Exec workers could not be listed.",
|
|
1060
|
+
"exec.cancel-failed": "An exec could not be cancelled.",
|
|
1061
|
+
"goal-workers.list-failed": "Goal check workers could not be listed.",
|
|
1062
|
+
"operation.reconcile-failed": "Reconciling one operation failed; the next pass retries.",
|
|
1063
|
+
"reconcile.pass-failed": "A reconciliation pass failed; the next one retries."
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
|
|
1068
|
+
// ../protocol/src/log-vocabulary/agent-accounts.ts
|
|
1069
|
+
var AGENT_ACCOUNTS_LOG_AREAS = defineLogAreas({
|
|
1070
|
+
"agent-accounts": {
|
|
1071
|
+
description: "Agent accounts: automatic switching, staged logins and plan usage.",
|
|
1072
|
+
events: {
|
|
1073
|
+
"switch-notice.failed": "A notice about an automatic account switch failed; the switch stands. `audience` says whose.",
|
|
1074
|
+
"auto-switch.check-failed": "An automatic account check failed; the next nudge retries.",
|
|
1075
|
+
"container-sync.failed": "Handing a login or account to a container failed; `step` says which part.",
|
|
1076
|
+
"last-usage.save-failed": "The last plan usage reading could not be saved; the next save retries.",
|
|
1077
|
+
"login-cleanup.failed": "A temporary login could not be cleaned up.",
|
|
1078
|
+
"login-refresh.deferred": "Containers were not told to refresh their login now; they reconcile from its durable generation."
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
});
|
|
1082
|
+
|
|
1083
|
+
// ../protocol/src/log-vocabulary/docker.ts
|
|
1084
|
+
var DOCKER_LOG_AREAS = defineLogAreas({
|
|
1085
|
+
docker: {
|
|
1086
|
+
description: "Docker containers: lifecycle, starts, staged inputs and the login files they hold.",
|
|
1087
|
+
events: {
|
|
1088
|
+
"portable-inputs.relay-missing": "Docker is rootless and the image predates the staged-input relay, so the container cannot read them until rebuilt.",
|
|
1089
|
+
"project-seed.refused": "A project .env, .env.local or opencode.json was not copied into a new container: a link, not a regular file, outside the project, too large or unreadable.",
|
|
1090
|
+
"opencode.warm-incomplete": "OpenCode did not finish loading /workspace in a container.",
|
|
1091
|
+
"login-keeper.pass-failed": "A Claude login keeper pass failed; the next interval retries.",
|
|
1092
|
+
"login-keeper.refresh-failed": "Refreshing the host Claude login failed. Fixed text: CLI output can hold credentials.",
|
|
1093
|
+
"login-keeper.refresh-not-extended": "Refreshing the host Claude login did not extend its expiry.",
|
|
1094
|
+
"login-keeper.refresh-check-failed": "Checking the host Claude login after a refresh failed.",
|
|
1095
|
+
"login-watcher.pass-failed": "A container login file watcher pass failed; the next one retries.",
|
|
1096
|
+
"lifecycle.record-failure-failed": "A failed container operation could not be recorded.",
|
|
1097
|
+
"lifecycle.reconcile-failed": "Reconciling one environment's container operation failed; the next pass retries.",
|
|
1098
|
+
"replacement.clear-terminals-failed": "Terminal sessions could not be cleared after a container replacement.",
|
|
1099
|
+
"recovery.clear-terminals-failed": "Terminal sessions could not be cleared after a recovery restore.",
|
|
1100
|
+
"github-ranges.seed-not-copied": "The GitHub ranges seed could not be copied into a container, so its firewall fetches them.",
|
|
1101
|
+
"availability.probe-failed": "Docker is not available; written when the diagnostic changes. Fixed-shape metadata only: messages can hold daemon endpoints.",
|
|
1102
|
+
"start.port-collision-retrying": "An automatic host port collided on start, so it is retried once with fresh ports."
|
|
1103
|
+
}
|
|
1104
|
+
},
|
|
1105
|
+
"docker.reachability": {
|
|
1106
|
+
description: "Whether agents in containers can reach the backend's agent tools server.",
|
|
1107
|
+
events: {
|
|
1108
|
+
"check.crashed": "A reachability check crashed.",
|
|
1109
|
+
"check.started": "A reachability check started.",
|
|
1110
|
+
"check.finished": "A reachability check finished.",
|
|
1111
|
+
"check.probe": "One probe of a finished check.",
|
|
1112
|
+
"check.summary": "Content-free status and reason for a check that did not find the host reachable.",
|
|
1113
|
+
"check.remediation": "One command the user can run to unblock containers.",
|
|
1114
|
+
"shutdown.awaiting-network": "Shutdown is waiting for probe network preparation.",
|
|
1115
|
+
"shutdown.cleanup-deferred": "Probe network cleanup waits until its preparation settles.",
|
|
1116
|
+
"shutdown.removing-resources": "Shutdown is removing probe resources.",
|
|
1117
|
+
"shutdown.container-remove-failed": "A probe container could not be removed at shutdown.",
|
|
1118
|
+
"shutdown.network-remove-failed": "The probe network could not be removed at shutdown.",
|
|
1119
|
+
"probe.skipped": "A container probe was skipped because the agent tools server is not listening.",
|
|
1120
|
+
"preflight.refused": "A stage was refused because its container cannot reach the host.",
|
|
1121
|
+
"probe.prepare-failed": "A container could not be prepared for a probe.",
|
|
1122
|
+
"probe.result": "The outcome of probing one container.",
|
|
1123
|
+
"probe.contradicts-host": "A container probe disagrees with the host status, so the host is rechecked.",
|
|
1124
|
+
"topology.detected": "The Docker topology was read.",
|
|
1125
|
+
"firewall.detected": "The host firewall was read.",
|
|
1126
|
+
"probe-network.remove-failed": "The probe network could not be removed.",
|
|
1127
|
+
"probe-network.create-failed": "The probe network could not be created, so only the default bridge is checked.",
|
|
1128
|
+
"event.emit-failed": "A reachability event could not be emitted.",
|
|
1129
|
+
"host-addresses.list-failed": "Host addresses could not be listed.",
|
|
1130
|
+
"probe-image.present": "The probe image is already present.",
|
|
1131
|
+
"probe-image.pulling": "The probe image is being pulled.",
|
|
1132
|
+
"probe-image.pulled": "The probe image was pulled.",
|
|
1133
|
+
"probe-image.pull-failed": "The probe image could not be pulled.",
|
|
1134
|
+
"probe-image.fallback": "The environment image is used as the probe image.",
|
|
1135
|
+
"probe-image.missing": "No probe image is available.",
|
|
1136
|
+
"network.list-failed": "Docker networks could not be listed.",
|
|
1137
|
+
"network.inspect-failed": "A Docker network could not be inspected.",
|
|
1138
|
+
"stale-containers.removing": "Stale probe containers are being removed.",
|
|
1139
|
+
"stale-networks.removing": "Stale probe networks are being removed."
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
});
|
|
1143
|
+
|
|
1144
|
+
// ../protocol/src/log-vocabulary/mcp.ts
|
|
1145
|
+
var MCP_LOG_AREAS = defineLogAreas({
|
|
1146
|
+
"control-mcp": {
|
|
1147
|
+
description: "The Control MCP server other agents and devices reach Orkestrator through.",
|
|
1148
|
+
events: {
|
|
1149
|
+
"listener.port-free": "The Control MCP's fixed port is free again, so it is listening.",
|
|
1150
|
+
"state-listener.failed": "A Control MCP state listener threw; the others still run.",
|
|
1151
|
+
"delegation.remote-open-failed": "A delegation could not be opened on another node.",
|
|
1152
|
+
"delegation.open-failed": "A coordinator delegation could not be opened."
|
|
1153
|
+
}
|
|
1154
|
+
},
|
|
1155
|
+
"mcp-management": {
|
|
1156
|
+
description: "Managed MCP configuration: its commands, overlays and apply loop.",
|
|
1157
|
+
events: {
|
|
1158
|
+
"command.failed": "An MCP management command failed; `ref` is the correlation id shown to the user.",
|
|
1159
|
+
"overlay.materialise-failed": "An MCP overlay could not be written.",
|
|
1160
|
+
"apply.tick-failed": "An MCP apply tick failed; the next one retries."
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
});
|
|
1164
|
+
|
|
1165
|
+
// ../protocol/src/log-vocabulary/design.ts
|
|
1166
|
+
var DESIGN_LOG_AREAS = defineLogAreas({
|
|
1167
|
+
design: {
|
|
1168
|
+
description: "The design canvas: its library, renderer and session links.",
|
|
1169
|
+
events: {
|
|
1170
|
+
"change-signal.failed": "A design change signal failed.",
|
|
1171
|
+
"library.index-write-failed": "The design library index could not be written.",
|
|
1172
|
+
"library.refresh-failed": "The design library could not be refreshed.",
|
|
1173
|
+
"renderer.problem": "The renderer hit a limit or lost a browser; `problem` is a fixed name.",
|
|
1174
|
+
"task.failed": "A design background task failed.",
|
|
1175
|
+
"canvas.needs-recovery": "A design canvas is unreadable and marked for recovery.",
|
|
1176
|
+
"startup.step-failed": "One part of design startup failed; `step` says which.",
|
|
1177
|
+
"legacy.retire-failed": "A migrated legacy design could not be retired.",
|
|
1178
|
+
"profiles.swept": "Design startup removed stale browser profiles.",
|
|
1179
|
+
"session-link.record-failed": "A closing conversation could not be recorded on a design link."
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
});
|
|
1183
|
+
|
|
1184
|
+
// ../protocol/src/log-vocabulary/graph.ts
|
|
1185
|
+
var GRAPH_LOG_AREAS = defineLogAreas({
|
|
1186
|
+
graph: {
|
|
1187
|
+
description: "Graph runs: launches, passes, rewinds, system actions and templates.",
|
|
1188
|
+
events: {
|
|
1189
|
+
"describe.pass-failed": "A graph describe pass failed. Content-free: never the description or draft.",
|
|
1190
|
+
"system.stop-failed": "A system action's work could not be stopped.",
|
|
1191
|
+
"system.action-failed": "A system action failed; `cause` is its fixed failure cause.",
|
|
1192
|
+
"attention.update-failed": "The sidebar could not be updated for a run.",
|
|
1193
|
+
"launch.ticket-link-failed": "A launched run's ticket could not be linked.",
|
|
1194
|
+
"launch.started": "A graph run was launched.",
|
|
1195
|
+
"launch.swept": "Runs that ended without an environment were removed.",
|
|
1196
|
+
"rewind.pending": "A run's code rewind has not finished.",
|
|
1197
|
+
"rewind.applied": "A run was restarted or rewound.",
|
|
1198
|
+
"rewind.waiting": "A run waits for its code rewind to finish.",
|
|
1199
|
+
"history.pruned": "Finished runs beyond an environment's history were removed.",
|
|
1200
|
+
"history.prune-failed": "Pruning an environment's run history failed.",
|
|
1201
|
+
"worktree.cleanup-failed": "A run's branch worktree cleanup failed.",
|
|
1202
|
+
"run.unreadable": "A run is unreadable, so it is not scheduled.",
|
|
1203
|
+
"run.pass-failed": "A pass over a run failed.",
|
|
1204
|
+
"transcript.capture-failed": "A run's transcript capture failed.",
|
|
1205
|
+
"ticket.link-failed": "A run's ticket could not be linked to its environment.",
|
|
1206
|
+
"template.skipped": "A built-in template was skipped as invalid or a duplicate."
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
});
|
|
1210
|
+
|
|
1211
|
+
// ../protocol/src/log-vocabulary/nodes.ts
|
|
1212
|
+
var NODES_LOG_AREAS = defineLogAreas({
|
|
1213
|
+
nodes: {
|
|
1214
|
+
description: "Command nodes: links, handovers, leaf mail and project copies.",
|
|
1215
|
+
events: {
|
|
1216
|
+
"actions.resume-failed": "Approved actions could not be resumed; a later pass retries.",
|
|
1217
|
+
"project-copy.notify-failed": "The coordinator could not be told a project copy finished.",
|
|
1218
|
+
"mail.delivery-deferred": "Leaf mail could not reach a coordinator yet.",
|
|
1219
|
+
"command.post-step-failed": "A step after a routed command failed.",
|
|
1220
|
+
"seed-files.incomplete": "Seed files for a leaf environment were not all copied.",
|
|
1221
|
+
"contact.record-failed": "The latest controller contact could not be recorded.",
|
|
1222
|
+
"settings.send-failed": "Settings could not be sent to a node.",
|
|
1223
|
+
"verification.record-failed": "A node verification could not be recorded.",
|
|
1224
|
+
"profile.record-failed": "A node profile could not be recorded.",
|
|
1225
|
+
"detach.unconfirmed": "A forgotten node has not confirmed the detach yet.",
|
|
1226
|
+
"handover.recovery-pending": "Command handover recovery is still pending."
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
});
|
|
1230
|
+
|
|
1231
|
+
// ../protocol/src/log-vocabulary/linear.ts
|
|
1232
|
+
var LINEAR_LOG_AREAS = defineLogAreas({
|
|
1233
|
+
linear: {
|
|
1234
|
+
description: "Linear issues read for build actions.",
|
|
1235
|
+
events: {
|
|
1236
|
+
"comments.load-failed": "An issue's comments could not be loaded; the issue still renders without them."
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
});
|
|
1240
|
+
|
|
1241
|
+
// ../protocol/src/log-vocabulary/usage-history.ts
|
|
1242
|
+
var USAGE_HISTORY_LOG_AREAS = defineLogAreas({
|
|
1243
|
+
"usage-history": {
|
|
1244
|
+
description: "Recorded agent token usage.",
|
|
1245
|
+
events: {
|
|
1246
|
+
"record.failed": "Agent usage could not be recorded; a later read counts it.",
|
|
1247
|
+
"prune.failed": "Pruning recorded usage failed; the next prune retries."
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
});
|
|
1251
|
+
|
|
1252
|
+
// ../protocol/src/log-vocabulary/feature.ts
|
|
1253
|
+
var FEATURE_LOG_AREAS = defineLogAreas({
|
|
1254
|
+
feature: {
|
|
1255
|
+
description: "Pipeline environments started from a feature, and feature planning.",
|
|
1256
|
+
events: {
|
|
1257
|
+
"naming.fallback": "Automatic naming failed, so a local fallback name is used. Error kind only: the description stays out.",
|
|
1258
|
+
"planning.legacy-adopt-failed": "Legacy planning conversations could not be adopted.",
|
|
1259
|
+
"planning.tick-retrying": "A planning tick failed on a transient error; the next tick retries."
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
});
|
|
1263
|
+
|
|
1264
|
+
// ../protocol/src/log-vocabulary/host.ts
|
|
1265
|
+
var HOST_LOG_AREAS = defineLogAreas({
|
|
1266
|
+
host: {
|
|
1267
|
+
description: "The host machine: its executables, load, suspends and maintenance.",
|
|
1268
|
+
events: {
|
|
1269
|
+
"path.discovered": "Executable discovery finished. Counts and booleans only: PATH entries can hold private directory names.",
|
|
1270
|
+
"tool.available": "A host tool's availability was read.",
|
|
1271
|
+
"tool.missing": "A host tool was not found.",
|
|
1272
|
+
"maintenance.listener-failed": "A host maintenance listener threw; the others still run.",
|
|
1273
|
+
"suspend.reconcile-failed": "Reconciling due work after a host suspension failed.",
|
|
1274
|
+
"load.sample-failed": "Sampling machine load failed; the next sample retries."
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
});
|
|
1278
|
+
|
|
1279
|
+
// ../protocol/src/log-vocabulary/transcript-artifacts.ts
|
|
1280
|
+
var TRANSCRIPT_ARTIFACTS_LOG_AREAS = defineLogAreas({
|
|
1281
|
+
"transcript-artifacts": {
|
|
1282
|
+
description: "Transcript artifacts: previews, printing, grants and their ledger. Ids, kinds, sizes and reason codes only.",
|
|
1283
|
+
events: {
|
|
1284
|
+
"announce-failed": "An artifact change could not be announced.",
|
|
1285
|
+
"cleanup-failed": "An artifact cleanup failed.",
|
|
1286
|
+
"grant-revocation-failed": "A grant could not be revoked.",
|
|
1287
|
+
"ledger-listener-failed": "A ledger listener threw.",
|
|
1288
|
+
"ledger-read-failed": "The ledger could not be read.",
|
|
1289
|
+
"operation-executor-failed": "A preview operation's executor failed.",
|
|
1290
|
+
"operation-failed": "A preview operation failed.",
|
|
1291
|
+
"pdf-preview": "A PDF preview was served.",
|
|
1292
|
+
"pdf-preview-failed": "A PDF preview failed.",
|
|
1293
|
+
"pdf-print-failed": "Printing an artifact to PDF failed.",
|
|
1294
|
+
"pdf-printed": "An artifact was printed to PDF.",
|
|
1295
|
+
"runtime-unavailable": "The artifact runtime could not be created."
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
});
|
|
1299
|
+
|
|
1300
|
+
// ../protocol/src/log-vocabulary/scheduler.ts
|
|
1301
|
+
var SCHEDULER_LOG_AREAS = defineLogAreas({
|
|
1302
|
+
scheduler: {
|
|
1303
|
+
description: "Scheduled jobs and the backend-owned timing that fires them.",
|
|
1304
|
+
events: {
|
|
1305
|
+
"tick.failed": "A scheduler tick failed; the next tick retries.",
|
|
1306
|
+
"job.claim-failed": "A due job could not be claimed.",
|
|
1307
|
+
"fire.heartbeat-failed": "A running fire's heartbeat could not be recorded.",
|
|
1308
|
+
"fire.outcome-record-failed": "A finished fire's outcome could not be recorded."
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
});
|
|
1312
|
+
|
|
624
1313
|
// ../protocol/src/log-vocabulary/web-app.ts
|
|
625
1314
|
var WEB_APP_LOG_AREAS = defineLogAreas({
|
|
626
1315
|
"web.app": {
|
|
@@ -788,7 +1477,7 @@ var WEB_ENVIRONMENT_LOG_AREAS = defineLogAreas({
|
|
|
788
1477
|
"models.pi-seed-failed": "The create dialog could not seed the Pi model catalogue.",
|
|
789
1478
|
"models.opencode-cache-load-failed": "The create dialog could not read cached OpenCode models.",
|
|
790
1479
|
"github-credential.check-failed": "The GitHub credential check before creating failed.",
|
|
791
|
-
"feature-build.start-failed": "Starting a
|
|
1480
|
+
"feature-build.start-failed": "Starting a pipeline environment from the dialog failed.",
|
|
792
1481
|
"settings.extensions-load-failed": "The settings dialog could not load extensions.",
|
|
793
1482
|
"settings.container-reset-failed": "The settings dialog could not reset the container.",
|
|
794
1483
|
"settings.save-failed": "The settings dialog could not save.",
|
|
@@ -1080,6 +1769,25 @@ var LOG_VOCABULARY = {
|
|
|
1080
1769
|
...TMUX_LOG_AREAS,
|
|
1081
1770
|
...UPDATER_LOG_AREAS,
|
|
1082
1771
|
...WEB_ANNOTATIONS_LOG_AREAS,
|
|
1772
|
+
...STORAGE_LOG_AREAS,
|
|
1773
|
+
...BUILD_PIPELINE_LOG_AREAS,
|
|
1774
|
+
...AGENT_BRANCH_LOG_AREAS,
|
|
1775
|
+
...CHANGE_TRACKING_LOG_AREAS,
|
|
1776
|
+
...COORDINATOR_LOG_AREAS,
|
|
1777
|
+
...REVIEW_LOG_AREAS,
|
|
1778
|
+
...PUBLIC_API_LOG_AREAS,
|
|
1779
|
+
...AGENT_ACCOUNTS_LOG_AREAS,
|
|
1780
|
+
...DOCKER_LOG_AREAS,
|
|
1781
|
+
...MCP_LOG_AREAS,
|
|
1782
|
+
...DESIGN_LOG_AREAS,
|
|
1783
|
+
...GRAPH_LOG_AREAS,
|
|
1784
|
+
...NODES_LOG_AREAS,
|
|
1785
|
+
...LINEAR_LOG_AREAS,
|
|
1786
|
+
...USAGE_HISTORY_LOG_AREAS,
|
|
1787
|
+
...FEATURE_LOG_AREAS,
|
|
1788
|
+
...HOST_LOG_AREAS,
|
|
1789
|
+
...TRANSCRIPT_ARTIFACTS_LOG_AREAS,
|
|
1790
|
+
...SCHEDULER_LOG_AREAS,
|
|
1083
1791
|
...WEB_APP_LOG_AREAS,
|
|
1084
1792
|
...WEB_BUILD_PIPELINE_LOG_AREAS,
|
|
1085
1793
|
...WEB_CHAT_LOG_AREAS,
|
|
@@ -1202,8 +1910,10 @@ function stackFrames(target, message) {
|
|
|
1202
1910
|
`).filter((line) => /^\s*at\s/.test(line)).slice(0, MAX_STACK_FRAMES).map((line) => boundedText(relativeFrame(line), MAX_FRAME_CHARS));
|
|
1203
1911
|
return frames.length > 0 ? frames : undefined;
|
|
1204
1912
|
}
|
|
1205
|
-
function describe(error, includeStack, depth) {
|
|
1913
|
+
function describe(error, includeStack, includeMessage, depth) {
|
|
1206
1914
|
if (typeof error !== "object" || error === null) {
|
|
1915
|
+
if (!includeMessage)
|
|
1916
|
+
return { name: "NonError" };
|
|
1207
1917
|
return {
|
|
1208
1918
|
name: "NonError",
|
|
1209
1919
|
message: typeof error === "string" ? boundedText(error, MAX_MESSAGE_CHARS) : `[${typeof error}]`
|
|
@@ -1220,7 +1930,7 @@ function describe(error, includeStack, depth) {
|
|
|
1220
1930
|
const details = { name };
|
|
1221
1931
|
if (commandFailure)
|
|
1222
1932
|
details.outputOmitted = true;
|
|
1223
|
-
else if (message)
|
|
1933
|
+
else if (message && includeMessage)
|
|
1224
1934
|
details.message = boundedText(message, MAX_MESSAGE_CHARS);
|
|
1225
1935
|
const code = read(error, "code");
|
|
1226
1936
|
const safeCode = finite(code) ?? matching(code, CODE_PATTERN);
|
|
@@ -1248,13 +1958,13 @@ function describe(error, includeStack, depth) {
|
|
|
1248
1958
|
details.errorCount = members.length;
|
|
1249
1959
|
const cause = read(error, "cause") ?? (Array.isArray(members) ? members[0] : undefined);
|
|
1250
1960
|
if (cause !== undefined && cause !== null && depth < MAX_CAUSE_DEPTH) {
|
|
1251
|
-
details.cause = describe(cause, false, depth + 1);
|
|
1961
|
+
details.cause = describe(cause, false, includeMessage, depth + 1);
|
|
1252
1962
|
}
|
|
1253
1963
|
return details;
|
|
1254
1964
|
}
|
|
1255
1965
|
function formatLogError(error, options = {}) {
|
|
1256
1966
|
try {
|
|
1257
|
-
return brand(describe(error, options.stack !== false, 0));
|
|
1967
|
+
return brand(describe(error, options.stack !== false, options.message !== false, 0));
|
|
1258
1968
|
} catch {
|
|
1259
1969
|
return brand({ name: "Error", message: "[unreadable]" });
|
|
1260
1970
|
}
|
|
@@ -1433,7 +2143,10 @@ function deliver(record) {
|
|
|
1433
2143
|
line: config.format === "json" ? renderJson(record) : renderText(record),
|
|
1434
2144
|
record
|
|
1435
2145
|
});
|
|
1436
|
-
|
|
2146
|
+
return true;
|
|
2147
|
+
} catch {
|
|
2148
|
+
return false;
|
|
2149
|
+
}
|
|
1437
2150
|
}
|
|
1438
2151
|
function buildRecord(level, area, event, fields) {
|
|
1439
2152
|
const clean = fields ? sanitizeFields(fields, areaSpec(area)?.maxStringChars ?? MAX_FIELD_CHARS) : undefined;
|
|
@@ -1589,6 +2302,19 @@ function resolveFields(fields) {
|
|
|
1589
2302
|
return { fieldsFailed: true };
|
|
1590
2303
|
}
|
|
1591
2304
|
}
|
|
2305
|
+
function deliverEvent(level, area, event, fields) {
|
|
2306
|
+
const spec = areaSpec(area);
|
|
2307
|
+
if (!spec)
|
|
2308
|
+
return deliver(buildRecord(level, "logging", "unknown-area", undefined));
|
|
2309
|
+
if (!Object.hasOwn(spec.events, event))
|
|
2310
|
+
return deliver(buildRecord(level, area, "invalid-event", undefined));
|
|
2311
|
+
return deliver(buildRecord(level, area, event, fields));
|
|
2312
|
+
}
|
|
2313
|
+
function tryWriteLog(level, area, event, fields) {
|
|
2314
|
+
if (LEVEL_RANK[level] > thresholdRank(area))
|
|
2315
|
+
return false;
|
|
2316
|
+
return deliverEvent(level, area, event, resolveFields(fields));
|
|
2317
|
+
}
|
|
1592
2318
|
function createLogger(area) {
|
|
1593
2319
|
const spec = areaSpec(area);
|
|
1594
2320
|
let seenGeneration = -1;
|
|
@@ -1601,13 +2327,7 @@ function createLogger(area) {
|
|
|
1601
2327
|
return LEVEL_RANK[level] <= rank;
|
|
1602
2328
|
};
|
|
1603
2329
|
const writeResolved = (level, event, resolved) => {
|
|
1604
|
-
|
|
1605
|
-
deliver(buildRecord(level, "logging", "unknown-area", undefined));
|
|
1606
|
-
} else if (Object.hasOwn(spec.events, event)) {
|
|
1607
|
-
deliver(buildRecord(level, area, event, resolved));
|
|
1608
|
-
} else {
|
|
1609
|
-
deliver(buildRecord(level, area, "invalid-event", undefined));
|
|
1610
|
-
}
|
|
2330
|
+
deliverEvent(level, area, event, resolved);
|
|
1611
2331
|
};
|
|
1612
2332
|
const write = (level, event, fields) => {
|
|
1613
2333
|
if (!enabled(level))
|
|
@@ -1782,8 +2502,19 @@ function applyLogDetail(detail, env = process.env) {
|
|
|
1782
2502
|
|
|
1783
2503
|
// ../protocol/src/node/bridge-diagnostics.ts
|
|
1784
2504
|
import { createHash } from "node:crypto";
|
|
1785
|
-
|
|
1786
|
-
|
|
2505
|
+
|
|
2506
|
+
// ../protocol/src/event-loop-stall-monitor.ts
|
|
2507
|
+
var log = createLogger("event-loop");
|
|
2508
|
+
var EVENT_LOOP_STALL_ALWAYS_LOG_MS = 1e4;
|
|
2509
|
+
|
|
2510
|
+
// ../protocol/src/node/bridge-diagnostics.ts
|
|
2511
|
+
var log2 = createLogger("bridge.diagnostics");
|
|
2512
|
+
var BRIDGE_DIAGNOSTICS_INTERVAL_MS = 60000;
|
|
2513
|
+
var INTERVAL_MS = BRIDGE_DIAGNOSTICS_INTERVAL_MS;
|
|
2514
|
+
var STALL_NO_DELTA_MS = 2 * INTERVAL_MS;
|
|
2515
|
+
var STALL_TOOL_PENDING_MS = 10 * 60000;
|
|
2516
|
+
var STALL_TICK_DELAY_MS = EVENT_LOOP_STALL_ALWAYS_LOG_MS;
|
|
2517
|
+
var BRIDGE_DIAGNOSTICS_KEEPALIVE_MS = 10 * 60000;
|
|
1787
2518
|
var MAX_PENDING_TOOLS = 128;
|
|
1788
2519
|
var MAX_REPORTED_TOOLS = 8;
|
|
1789
2520
|
var MAX_ID_LENGTH = 1024;
|
|
@@ -1844,6 +2575,28 @@ var UPDATE_KINDS = new Set([
|
|
|
1844
2575
|
"step-started",
|
|
1845
2576
|
"step-completed"
|
|
1846
2577
|
]);
|
|
2578
|
+
var COUNTER_CHANGE_THRESHOLDS = {
|
|
2579
|
+
stderrBytes: 4096,
|
|
2580
|
+
requestsSent: 1,
|
|
2581
|
+
responsesReceived: 1,
|
|
2582
|
+
timeouts: 1,
|
|
2583
|
+
notificationsReceived: Number.POSITIVE_INFINITY,
|
|
2584
|
+
protocolErrors: 1
|
|
2585
|
+
};
|
|
2586
|
+
var WAITING_PHASES = new Set([
|
|
2587
|
+
"sending",
|
|
2588
|
+
"following",
|
|
2589
|
+
"draining",
|
|
2590
|
+
"cancelling"
|
|
2591
|
+
]);
|
|
2592
|
+
function sameSet(a, b) {
|
|
2593
|
+
if (a.size !== b.size)
|
|
2594
|
+
return false;
|
|
2595
|
+
for (const value of a)
|
|
2596
|
+
if (!b.has(value))
|
|
2597
|
+
return false;
|
|
2598
|
+
return true;
|
|
2599
|
+
}
|
|
1847
2600
|
function identity(value) {
|
|
1848
2601
|
if (typeof value !== "string" || !value || value.length > MAX_ID_LENGTH)
|
|
1849
2602
|
return;
|
|
@@ -1919,26 +2672,35 @@ function safeDiagnosticMetrics(value) {
|
|
|
1919
2672
|
result.state = value.state;
|
|
1920
2673
|
return result;
|
|
1921
2674
|
}
|
|
2675
|
+
function bridgeDiagnosticsChangesEnabled() {
|
|
2676
|
+
return log2.isEnabled("trace");
|
|
2677
|
+
}
|
|
1922
2678
|
function writeBridgeDiagnostic({ bridge, event, payload }) {
|
|
1923
|
-
|
|
2679
|
+
return tryWriteLog("info", "bridge.diagnostics", event, { bridge, payload });
|
|
1924
2680
|
}
|
|
1925
2681
|
function bridgeDiagnosticsActive() {
|
|
1926
|
-
return
|
|
2682
|
+
return log2.isEnabled("info");
|
|
2683
|
+
}
|
|
2684
|
+
function bridgeDiagnosticsStreamEnabled(bridge) {
|
|
2685
|
+
return bridgeDebugEnabled(bridge) || log2.isEnabled("debug");
|
|
1927
2686
|
}
|
|
1928
2687
|
function writeDiagnostic(bridge, event, payload, write) {
|
|
1929
2688
|
try {
|
|
1930
2689
|
const json = JSON.stringify({ bridge, event, ...payload });
|
|
1931
2690
|
const bytes = Buffer.byteLength(json);
|
|
1932
2691
|
if (bytes <= MAX_BRIDGE_DIAGNOSTIC_BYTES) {
|
|
1933
|
-
write({ bridge, event, payload: json });
|
|
1934
|
-
return;
|
|
2692
|
+
const accepted = write({ bridge, event, payload: json });
|
|
2693
|
+
return accepted !== false;
|
|
1935
2694
|
}
|
|
1936
|
-
write({
|
|
2695
|
+
const accepted = write({
|
|
1937
2696
|
bridge,
|
|
1938
2697
|
event: "snapshot-overflow",
|
|
1939
2698
|
payload: JSON.stringify({ bridge, event: "snapshot-overflow", omittedBytes: bytes })
|
|
1940
2699
|
});
|
|
1941
|
-
|
|
2700
|
+
return accepted !== false;
|
|
2701
|
+
} catch {
|
|
2702
|
+
return false;
|
|
2703
|
+
}
|
|
1942
2704
|
}
|
|
1943
2705
|
|
|
1944
2706
|
class BridgeRunDiagnostics {
|
|
@@ -1970,6 +2732,7 @@ class BridgeRunDiagnostics {
|
|
|
1970
2732
|
completedTools = 0;
|
|
1971
2733
|
pending = new Map;
|
|
1972
2734
|
phase = "sending";
|
|
2735
|
+
processScope = false;
|
|
1973
2736
|
terminal = "pending";
|
|
1974
2737
|
stream = "pending";
|
|
1975
2738
|
cancellation = "none";
|
|
@@ -1977,6 +2740,8 @@ class BridgeRunDiagnostics {
|
|
|
1977
2740
|
run;
|
|
1978
2741
|
closed = false;
|
|
1979
2742
|
wasActive;
|
|
2743
|
+
baseline;
|
|
2744
|
+
changeQueued = false;
|
|
1980
2745
|
timer;
|
|
1981
2746
|
constructor(bridge, state, now = Date.now, write = writeBridgeDiagnostic, intervalMs = INTERVAL_MS, metrics = () => ({}), active = () => true) {
|
|
1982
2747
|
this.bridge = bridge;
|
|
@@ -2022,7 +2787,8 @@ class BridgeRunDiagnostics {
|
|
|
2022
2787
|
return;
|
|
2023
2788
|
}
|
|
2024
2789
|
if (stage === "completed") {
|
|
2025
|
-
this.pending.delete(key)
|
|
2790
|
+
if (this.pending.delete(key))
|
|
2791
|
+
this.changed();
|
|
2026
2792
|
this.completedTools++;
|
|
2027
2793
|
return;
|
|
2028
2794
|
}
|
|
@@ -2037,13 +2803,23 @@ class BridgeRunDiagnostics {
|
|
|
2037
2803
|
stage: stage === "started" || existing?.stage === "started" ? "started" : "partial",
|
|
2038
2804
|
nested
|
|
2039
2805
|
});
|
|
2806
|
+
if (!existing)
|
|
2807
|
+
this.changed();
|
|
2040
2808
|
}
|
|
2041
2809
|
checkpoint(phase) {
|
|
2810
|
+
if (phase === "attached")
|
|
2811
|
+
this.processScope = true;
|
|
2812
|
+
if (phase === this.phase)
|
|
2813
|
+
return;
|
|
2042
2814
|
this.phase = phase;
|
|
2815
|
+
this.changed();
|
|
2043
2816
|
}
|
|
2044
2817
|
count(key, amount = 1) {
|
|
2045
|
-
if (
|
|
2046
|
-
|
|
2818
|
+
if (this.closed || !Number.isSafeInteger(amount) || amount < 0)
|
|
2819
|
+
return;
|
|
2820
|
+
this.counters[key] += amount;
|
|
2821
|
+
if (amount > 0 && Number.isFinite(COUNTER_CHANGE_THRESHOLDS[key]))
|
|
2822
|
+
this.changed();
|
|
2047
2823
|
}
|
|
2048
2824
|
translationFailed() {
|
|
2049
2825
|
this.translationFailures++;
|
|
@@ -2059,8 +2835,10 @@ class BridgeRunDiagnostics {
|
|
|
2059
2835
|
}
|
|
2060
2836
|
terminalSettled(outcome) {
|
|
2061
2837
|
this.terminal = outcome;
|
|
2062
|
-
if (outcome === "resolved")
|
|
2838
|
+
if (outcome === "resolved" && this.phase !== "draining") {
|
|
2063
2839
|
this.phase = "draining";
|
|
2840
|
+
this.changed();
|
|
2841
|
+
}
|
|
2064
2842
|
}
|
|
2065
2843
|
requestCancellation(reason = "user") {
|
|
2066
2844
|
this.cancellation = "pending";
|
|
@@ -2082,12 +2860,38 @@ class BridgeRunDiagnostics {
|
|
|
2082
2860
|
if (this.closed)
|
|
2083
2861
|
return;
|
|
2084
2862
|
const now = this.now();
|
|
2085
|
-
const age = (time) => time === undefined ? null : Math.max(0, now - time);
|
|
2086
2863
|
const tickDelayMs = event === "heartbeat" ? Math.max(0, now - this.lastTick - this.intervalMs) : 0;
|
|
2087
2864
|
if (event === "heartbeat")
|
|
2088
2865
|
this.lastTick = now;
|
|
2089
|
-
if (!
|
|
2866
|
+
if (!bridgeDiagnosticsActive())
|
|
2867
|
+
return;
|
|
2868
|
+
const stall = this.stallState(now, tickDelayMs);
|
|
2869
|
+
if (event === "heartbeat" && !this.active() && !this.periodicDue(now, stall))
|
|
2870
|
+
return;
|
|
2871
|
+
this.writeSnapshot(event, now, tickDelayMs, stall);
|
|
2872
|
+
}
|
|
2873
|
+
changed() {
|
|
2874
|
+
if (this.closed || this.changeQueued || !bridgeDiagnosticsChangesEnabled())
|
|
2875
|
+
return;
|
|
2876
|
+
this.changeQueued = true;
|
|
2877
|
+
queueMicrotask(() => {
|
|
2878
|
+
this.changeQueued = false;
|
|
2879
|
+
this.reportChange();
|
|
2880
|
+
});
|
|
2881
|
+
}
|
|
2882
|
+
reportChange() {
|
|
2883
|
+
if (this.closed || !bridgeDiagnosticsChangesEnabled() || !bridgeDiagnosticsActive())
|
|
2884
|
+
return;
|
|
2885
|
+
const last = this.baseline;
|
|
2886
|
+
if (last && !this.changedSince(last))
|
|
2090
2887
|
return;
|
|
2888
|
+
const now = this.now();
|
|
2889
|
+
try {
|
|
2890
|
+
this.writeSnapshot("change", now, 0, this.stallState(now, 0));
|
|
2891
|
+
} catch {}
|
|
2892
|
+
}
|
|
2893
|
+
writeSnapshot(event, now, tickDelayMs, stall) {
|
|
2894
|
+
const age = (time) => time === undefined ? null : Math.max(0, now - time);
|
|
2091
2895
|
const pendingTools = Array.from(this.pending.entries()).slice(0, MAX_REPORTED_TOOLS).map(([id, tool]) => ({
|
|
2092
2896
|
id,
|
|
2093
2897
|
kind: tool.kind,
|
|
@@ -2096,7 +2900,7 @@ class BridgeRunDiagnostics {
|
|
|
2096
2900
|
ageMs: age(tool.since)
|
|
2097
2901
|
}));
|
|
2098
2902
|
try {
|
|
2099
|
-
writeDiagnostic(this.bridge, event, {
|
|
2903
|
+
const written = writeDiagnostic(this.bridge, event, {
|
|
2100
2904
|
session: identity(this.state.id),
|
|
2101
2905
|
run: this.run,
|
|
2102
2906
|
phase: this.phase,
|
|
@@ -2123,8 +2927,64 @@ class BridgeRunDiagnostics {
|
|
|
2123
2927
|
completedTools: this.completedTools,
|
|
2124
2928
|
tickDelayMs
|
|
2125
2929
|
}, this.write);
|
|
2930
|
+
if (!written)
|
|
2931
|
+
return;
|
|
2932
|
+
this.baseline = {
|
|
2933
|
+
at: now,
|
|
2934
|
+
phase: this.phase,
|
|
2935
|
+
pending: new Set(this.pending.keys()),
|
|
2936
|
+
counters: { ...this.counters },
|
|
2937
|
+
stall
|
|
2938
|
+
};
|
|
2126
2939
|
} catch {}
|
|
2127
2940
|
}
|
|
2941
|
+
periodicDue(now, stall) {
|
|
2942
|
+
if (stall.signals.has("tick-delay"))
|
|
2943
|
+
return true;
|
|
2944
|
+
const last = this.baseline;
|
|
2945
|
+
if (!last)
|
|
2946
|
+
return true;
|
|
2947
|
+
if (!sameSet(stall.signals, last.stall.signals) || !sameSet(stall.tools, last.stall.tools))
|
|
2948
|
+
return true;
|
|
2949
|
+
if (stall.signals.has("no-delta") && this.changedSince(last))
|
|
2950
|
+
return true;
|
|
2951
|
+
return now - last.at >= BRIDGE_DIAGNOSTICS_KEEPALIVE_MS;
|
|
2952
|
+
}
|
|
2953
|
+
changedSince(last) {
|
|
2954
|
+
if (this.phase !== last.phase)
|
|
2955
|
+
return true;
|
|
2956
|
+
if (this.pending.size !== last.pending.size)
|
|
2957
|
+
return true;
|
|
2958
|
+
for (const key of this.pending.keys())
|
|
2959
|
+
if (!last.pending.has(key))
|
|
2960
|
+
return true;
|
|
2961
|
+
for (const key of Object.keys(this.counters))
|
|
2962
|
+
if (this.counters[key] - last.counters[key] >= COUNTER_CHANGE_THRESHOLDS[key])
|
|
2963
|
+
return true;
|
|
2964
|
+
return false;
|
|
2965
|
+
}
|
|
2966
|
+
stallState(now, tickDelayMs) {
|
|
2967
|
+
const signals = new Set;
|
|
2968
|
+
const tools = new Set;
|
|
2969
|
+
let oldestPending;
|
|
2970
|
+
for (const [key, tool] of this.pending) {
|
|
2971
|
+
if (oldestPending === undefined || tool.since < oldestPending)
|
|
2972
|
+
oldestPending = tool.since;
|
|
2973
|
+
if (now - tool.since >= STALL_TOOL_PENDING_MS)
|
|
2974
|
+
tools.add(key);
|
|
2975
|
+
}
|
|
2976
|
+
const waitingSince = this.processScope ? oldestPending : WAITING_PHASES.has(this.phase) ? this.startedAt : undefined;
|
|
2977
|
+
if (waitingSince !== undefined) {
|
|
2978
|
+
const quietSince = Math.max(this.lastDelta ?? waitingSince, waitingSince);
|
|
2979
|
+
if (now - quietSince >= STALL_NO_DELTA_MS)
|
|
2980
|
+
signals.add("no-delta");
|
|
2981
|
+
}
|
|
2982
|
+
if (tools.size > 0)
|
|
2983
|
+
signals.add("tool-pending");
|
|
2984
|
+
if (tickDelayMs >= STALL_TICK_DELAY_MS)
|
|
2985
|
+
signals.add("tick-delay");
|
|
2986
|
+
return { signals, tools };
|
|
2987
|
+
}
|
|
2128
2988
|
close(phase = "finished") {
|
|
2129
2989
|
if (this.closed)
|
|
2130
2990
|
return;
|
|
@@ -2137,8 +2997,9 @@ class BridgeRunDiagnostics {
|
|
|
2137
2997
|
}
|
|
2138
2998
|
}
|
|
2139
2999
|
function createBridgeDiagnostics(bridge, state, metrics) {
|
|
2140
|
-
return new BridgeRunDiagnostics(bridge, state, undefined, undefined, undefined, metrics, () =>
|
|
3000
|
+
return new BridgeRunDiagnostics(bridge, state, undefined, undefined, undefined, metrics, () => bridgeDiagnosticsStreamEnabled(bridge));
|
|
2141
3001
|
}
|
|
3002
|
+
var bufferedFlushes = new Set;
|
|
2142
3003
|
|
|
2143
3004
|
// ../protocol/src/node/bridge-log-policy.ts
|
|
2144
3005
|
var MAX_BRIDGE_LOG_POLICY_BYTES = 64 * 1024;
|
|
@@ -15026,6 +15887,7 @@ var COORDINATOR_CONTROL_TOOL_NAMES = Object.freeze([
|
|
|
15026
15887
|
"update_schedule",
|
|
15027
15888
|
"update_ticket"
|
|
15028
15889
|
]);
|
|
15890
|
+
var COORDINATOR_PROJECT_HOME_MESSAGE_WINDOW_MS = 3 * 60 * 60000;
|
|
15029
15891
|
var COORDINATOR_CONTEXT_OPEN_TAG = "<orkestrator-coordinator-context>";
|
|
15030
15892
|
var COORDINATOR_CONTEXT_CLOSE_TAG = "</orkestrator-coordinator-context>";
|
|
15031
15893
|
function stripCoordinatorContext(text) {
|
|
@@ -15110,7 +15972,7 @@ function parseCapacityRetryContinuation(text) {
|
|
|
15110
15972
|
}
|
|
15111
15973
|
|
|
15112
15974
|
// ../../bridges/codex-bridge/src/history/rollout.ts
|
|
15113
|
-
var
|
|
15975
|
+
var log3 = createLogger("bridge.codex");
|
|
15114
15976
|
function getCodexHomeDir() {
|
|
15115
15977
|
return process.env.CODEX_HOME || join11(homedir(), ".codex");
|
|
15116
15978
|
}
|
|
@@ -15712,7 +16574,7 @@ async function hydrateMessagesFromPersistedSession(threadId, options = {}) {
|
|
|
15712
16574
|
};
|
|
15713
16575
|
}
|
|
15714
16576
|
}
|
|
15715
|
-
|
|
16577
|
+
log3.warn("rollout.hydrate-failed", { threadId });
|
|
15716
16578
|
return {
|
|
15717
16579
|
messages: [],
|
|
15718
16580
|
title: meta.title,
|
|
@@ -16201,7 +17063,7 @@ async function replayPersistedRollout(threadId, snapshot, meta, structuredTurns)
|
|
|
16201
17063
|
}
|
|
16202
17064
|
|
|
16203
17065
|
// ../../bridges/codex-bridge/src/messages/render-turn.ts
|
|
16204
|
-
var
|
|
17066
|
+
var log4 = createLogger("bridge.codex");
|
|
16205
17067
|
var TRUNCATION_NOTICE = `
|
|
16206
17068
|
… output truncated`;
|
|
16207
17069
|
var SUBAGENT_TRANSCRIPT_PROBE_INTERVAL_MS = 2000;
|
|
@@ -16618,7 +17480,7 @@ async function renderTurn(turn, options) {
|
|
|
16618
17480
|
loadSnapshot = latestSnapshot;
|
|
16619
17481
|
}
|
|
16620
17482
|
} catch (error) {
|
|
16621
|
-
|
|
17483
|
+
log4.warn("subagent.activity-load-failed", { error: formatLogError(error) });
|
|
16622
17484
|
}
|
|
16623
17485
|
}
|
|
16624
17486
|
const { items, itemsByKey, accumulatorsByKey, itemKeys } = collectTurnItems(turn, options.segment);
|
|
@@ -17396,7 +18258,7 @@ function extractThreadId(params) {
|
|
|
17396
18258
|
}
|
|
17397
18259
|
|
|
17398
18260
|
// ../../bridges/codex-bridge/src/app-server/jsonl-rpc-client.ts
|
|
17399
|
-
var
|
|
18261
|
+
var log5 = createLogger("bridge.codex");
|
|
17400
18262
|
var DEFAULT_MAX_INBOUND_LINE_BYTES = 64 * 1024 * 1024;
|
|
17401
18263
|
var DEFAULT_MAX_OUTBOUND_LINE_BYTES = 32 * 1024 * 1024;
|
|
17402
18264
|
var DEFAULT_REQUEST_TIMEOUT_MS = 60000;
|
|
@@ -17508,7 +18370,7 @@ class JsonlRpcClient {
|
|
|
17508
18370
|
try {
|
|
17509
18371
|
this.options.recordInboundLine(line);
|
|
17510
18372
|
} catch (error) {
|
|
17511
|
-
|
|
18373
|
+
log5.error("recorder.threw", { error: formatLogError(error) });
|
|
17512
18374
|
}
|
|
17513
18375
|
}
|
|
17514
18376
|
const message = parseInboundLine(line);
|
|
@@ -17540,7 +18402,7 @@ class JsonlRpcClient {
|
|
|
17540
18402
|
try {
|
|
17541
18403
|
this.options.onServerRequest(message);
|
|
17542
18404
|
} catch (error) {
|
|
17543
|
-
|
|
18405
|
+
log5.error("server-request.handoff-failed", { error: formatLogError(error) });
|
|
17544
18406
|
}
|
|
17545
18407
|
return;
|
|
17546
18408
|
}
|
|
@@ -17549,7 +18411,7 @@ class JsonlRpcClient {
|
|
|
17549
18411
|
try {
|
|
17550
18412
|
this.options.onNotification(message, extractThreadId(message.params));
|
|
17551
18413
|
} catch (error) {
|
|
17552
|
-
|
|
18414
|
+
log5.error("notification.enqueue-failed", { error: formatLogError(error) });
|
|
17553
18415
|
}
|
|
17554
18416
|
return;
|
|
17555
18417
|
}
|
|
@@ -17721,7 +18583,7 @@ class SerialQueue {
|
|
|
17721
18583
|
this.maxObservedDepth = Math.max(this.maxObservedDepth, this.depth);
|
|
17722
18584
|
const previous = this.chains.get(key) ?? Promise.resolve();
|
|
17723
18585
|
const next = previous.then(() => task()).catch((error) => {
|
|
17724
|
-
|
|
18586
|
+
log5.error("queue.task-failed", { key, error: formatLogError(error) });
|
|
17725
18587
|
}).finally(() => {
|
|
17726
18588
|
this.depth -= 1;
|
|
17727
18589
|
if (this.chains.get(key) === next)
|
|
@@ -17744,9 +18606,9 @@ class SerialQueue {
|
|
|
17744
18606
|
// ../../bridges/codex-bridge/src/app-server/notification-recorder.ts
|
|
17745
18607
|
import { appendFile as appendFile4, mkdir as mkdir5 } from "node:fs/promises";
|
|
17746
18608
|
import { join as join13 } from "node:path";
|
|
17747
|
-
var
|
|
18609
|
+
var log6 = createLogger("bridge.codex");
|
|
17748
18610
|
function recorderNotice(message) {
|
|
17749
|
-
|
|
18611
|
+
log6.warn("recorder.notice", { detail: message });
|
|
17750
18612
|
}
|
|
17751
18613
|
var DEFAULT_MAX_RECORDING_BYTES = 64 * 1024 * 1024;
|
|
17752
18614
|
var DEFAULT_FLUSH_INTERVAL_MS = 250;
|
|
@@ -17859,7 +18721,7 @@ class NotificationRecorder {
|
|
|
17859
18721
|
} catch (error) {
|
|
17860
18722
|
this.stats.writeErrors += 1;
|
|
17861
18723
|
this.stats.linesDropped += pending.length;
|
|
17862
|
-
|
|
18724
|
+
log6.error("recorder.write-failed", { error: formatLogError(error, { stack: false }) });
|
|
17863
18725
|
}
|
|
17864
18726
|
}
|
|
17865
18727
|
async close() {
|
|
@@ -17894,7 +18756,7 @@ function createRecorderFromEnv(options) {
|
|
|
17894
18756
|
import { execFile as execFileCallback } from "node:child_process";
|
|
17895
18757
|
import { createHash as createHash8 } from "node:crypto";
|
|
17896
18758
|
import { promisify } from "node:util";
|
|
17897
|
-
var
|
|
18759
|
+
var log7 = createLogger("bridge.codex");
|
|
17898
18760
|
var execFile2 = promisify(execFileCallback);
|
|
17899
18761
|
var RUNTIME_ENV_SCRIPT_ENV = "ORKESTRATOR_RUNTIME_ENV_SCRIPT";
|
|
17900
18762
|
var DEFAULT_RUNTIME_ENV_SCRIPT = "/usr/local/bin/orkestrator-runtime-env.sh";
|
|
@@ -17972,10 +18834,10 @@ async function refreshRuntimeEnvironment(run = execFile2) {
|
|
|
17972
18834
|
});
|
|
17973
18835
|
const updated = applyRuntimeEnvironmentOutput(stdout);
|
|
17974
18836
|
if (updated.length > 0) {
|
|
17975
|
-
|
|
18837
|
+
log7.info("runtime-env.refreshed", { names: updated.join(", ") });
|
|
17976
18838
|
}
|
|
17977
18839
|
} catch (error) {
|
|
17978
|
-
|
|
18840
|
+
log7.warn("runtime-env.refresh-failed", { error: formatLogError(error) });
|
|
17979
18841
|
}
|
|
17980
18842
|
}
|
|
17981
18843
|
function fingerprintRuntimeEnvironment(env = process.env) {
|
|
@@ -17995,7 +18857,7 @@ function runtimeEnvironmentSnapshot(env = process.env) {
|
|
|
17995
18857
|
}
|
|
17996
18858
|
|
|
17997
18859
|
// ../../bridges/codex-bridge/src/app-server/process-supervisor.ts
|
|
17998
|
-
var
|
|
18860
|
+
var log8 = createLogger("bridge.codex");
|
|
17999
18861
|
|
|
18000
18862
|
class AppServerOwnershipUnavailableError extends AppServerUnavailableError {
|
|
18001
18863
|
ownershipContention = true;
|
|
@@ -18276,7 +19138,7 @@ class AppServerSupervisor {
|
|
|
18276
19138
|
if (describedLines >= STDERR_METADATA_LINE_BUDGET)
|
|
18277
19139
|
return;
|
|
18278
19140
|
describedLines += 1;
|
|
18279
|
-
|
|
19141
|
+
log8.info("app-server.stderr", () => ({
|
|
18280
19142
|
generation: generationId,
|
|
18281
19143
|
detail: describeChildStderrLine(line)
|
|
18282
19144
|
}));
|
|
@@ -18300,7 +19162,7 @@ class AppServerSupervisor {
|
|
|
18300
19162
|
stderrTail = "";
|
|
18301
19163
|
if (suppressedLines === 0)
|
|
18302
19164
|
return;
|
|
18303
|
-
|
|
19165
|
+
log8.info("app-server.stderr-suppressed", {
|
|
18304
19166
|
generation: generationId,
|
|
18305
19167
|
lines: suppressedLines,
|
|
18306
19168
|
payloadBytes: suppressedBytes
|
|
@@ -18310,7 +19172,7 @@ class AppServerSupervisor {
|
|
|
18310
19172
|
};
|
|
18311
19173
|
const recorder = (this.options.createRecorder ?? ((generation) => createRecorderFromEnv({ generation })))(generationId);
|
|
18312
19174
|
if (recorder) {
|
|
18313
|
-
|
|
19175
|
+
log8.warn("app-server.recording", {
|
|
18314
19176
|
generation: generationId,
|
|
18315
19177
|
fileName: recorder.getStats().fileName
|
|
18316
19178
|
});
|
|
@@ -18323,7 +19185,7 @@ class AppServerSupervisor {
|
|
|
18323
19185
|
onServerRequest: (request) => this.options.onServerRequest(request, generationId),
|
|
18324
19186
|
onProtocolViolation: (detail) => {
|
|
18325
19187
|
this.unknownNotifications += 1;
|
|
18326
|
-
|
|
19188
|
+
log8.warn("app-server.protocol-violation", { generation: generationId, detail });
|
|
18327
19189
|
},
|
|
18328
19190
|
...recorder ? { recordInboundLine: (line) => recorder.record(line) } : {}
|
|
18329
19191
|
});
|
|
@@ -18401,7 +19263,7 @@ class AppServerSupervisor {
|
|
|
18401
19263
|
return;
|
|
18402
19264
|
const exited = this.current;
|
|
18403
19265
|
this.current = null;
|
|
18404
|
-
|
|
19266
|
+
log8.warn("app-server.exited", {
|
|
18405
19267
|
generation: generationId,
|
|
18406
19268
|
code,
|
|
18407
19269
|
signal,
|
|
@@ -18665,7 +19527,7 @@ class AppServerSupervisor {
|
|
|
18665
19527
|
if (outcome === "contended")
|
|
18666
19528
|
return true;
|
|
18667
19529
|
if (matches && pid !== null) {
|
|
18668
|
-
|
|
19530
|
+
log8.info("app-server.stale-reaped", { pid });
|
|
18669
19531
|
(this.options.signalPidFileProcess ?? signalStaleProcessTree)(pid);
|
|
18670
19532
|
}
|
|
18671
19533
|
return true;
|
|
@@ -19342,7 +20204,7 @@ function buildInteractionResponse(request, answer) {
|
|
|
19342
20204
|
}
|
|
19343
20205
|
|
|
19344
20206
|
// ../../bridges/codex-bridge/src/app-server/server-request-router.ts
|
|
19345
|
-
var
|
|
20207
|
+
var log9 = createLogger("bridge.codex");
|
|
19346
20208
|
var DEFAULT_RESPONSE_TIMEOUT_MS = 1e4;
|
|
19347
20209
|
var DEFAULT_APPROVAL_TIMEOUT_MS = AGENT_INTERACTION_DEFAULT_TIMEOUT_MS;
|
|
19348
20210
|
|
|
@@ -19502,7 +20364,7 @@ class ServerRequestRouter {
|
|
|
19502
20364
|
record.timedOut = true;
|
|
19503
20365
|
this.counts.timedOut += 1;
|
|
19504
20366
|
if (this.sendStarted.has(key)) {
|
|
19505
|
-
|
|
20367
|
+
log9.error("server-request.flush-timeout", {
|
|
19506
20368
|
method: record.method,
|
|
19507
20369
|
timeoutMs: this.responseTimeoutMs
|
|
19508
20370
|
});
|
|
@@ -19606,7 +20468,7 @@ class ServerRequestRouter {
|
|
|
19606
20468
|
accepted = this.options.presentApproval?.(approval) === true;
|
|
19607
20469
|
} catch (error) {
|
|
19608
20470
|
deadline.settle();
|
|
19609
|
-
|
|
20471
|
+
log9.error("approval.present-failed", { error: formatLogError(error) });
|
|
19610
20472
|
return false;
|
|
19611
20473
|
}
|
|
19612
20474
|
if (!accepted) {
|
|
@@ -19643,7 +20505,7 @@ class ServerRequestRouter {
|
|
|
19643
20505
|
try {
|
|
19644
20506
|
this.options.onApprovalResolved?.(parked.request, decision, resolution);
|
|
19645
20507
|
} catch (error) {
|
|
19646
|
-
|
|
20508
|
+
log9.error("approval.resolved-callback-failed", { error: formatLogError(error) });
|
|
19647
20509
|
}
|
|
19648
20510
|
if (options.skipSend) {
|
|
19649
20511
|
this.pending.delete(parked.key);
|
|
@@ -19664,7 +20526,7 @@ class ServerRequestRouter {
|
|
|
19664
20526
|
try {
|
|
19665
20527
|
this.options.onApprovalResolved?.(parked.request, "withdrawn", "withdrawn");
|
|
19666
20528
|
} catch (error) {
|
|
19667
|
-
|
|
20529
|
+
log9.error("approval.resolved-callback-failed", { error: formatLogError(error) });
|
|
19668
20530
|
}
|
|
19669
20531
|
this.pending.delete(parked.key);
|
|
19670
20532
|
this.sendStarted.delete(parked.key);
|
|
@@ -19706,7 +20568,7 @@ class ServerRequestRouter {
|
|
|
19706
20568
|
accepted = this.options.presentInteraction?.(interaction) === true;
|
|
19707
20569
|
} catch (error) {
|
|
19708
20570
|
deadline?.settle();
|
|
19709
|
-
|
|
20571
|
+
log9.error("interaction.present-failed", { error: formatLogError(error) });
|
|
19710
20572
|
return false;
|
|
19711
20573
|
}
|
|
19712
20574
|
if (!accepted) {
|
|
@@ -19742,7 +20604,7 @@ class ServerRequestRouter {
|
|
|
19742
20604
|
try {
|
|
19743
20605
|
this.options.onInteractionResolved?.(parked.request, answer, resolution);
|
|
19744
20606
|
} catch (error) {
|
|
19745
|
-
|
|
20607
|
+
log9.error("interaction.resolved-callback-failed", { error: formatLogError(error) });
|
|
19746
20608
|
}
|
|
19747
20609
|
if (options.skipSend) {
|
|
19748
20610
|
this.pending.delete(parked.key);
|
|
@@ -19775,7 +20637,7 @@ class ServerRequestRouter {
|
|
|
19775
20637
|
try {
|
|
19776
20638
|
await send();
|
|
19777
20639
|
} catch (error) {
|
|
19778
|
-
|
|
20640
|
+
log9.error("server-request.answer-failed", {
|
|
19779
20641
|
method: record.method,
|
|
19780
20642
|
error: formatLogError(error, { stack: false })
|
|
19781
20643
|
});
|
|
@@ -19792,7 +20654,7 @@ class ServerRequestRouter {
|
|
|
19792
20654
|
}
|
|
19793
20655
|
violation(method, detail) {
|
|
19794
20656
|
this.options.onInvariantViolation?.(method, detail);
|
|
19795
|
-
|
|
20657
|
+
log9.error("app-server.invariant-violation", { method, detail });
|
|
19796
20658
|
}
|
|
19797
20659
|
explain(record, message) {
|
|
19798
20660
|
this.options.reportToTranscript?.({
|
|
@@ -20396,7 +21258,7 @@ import {
|
|
|
20396
21258
|
writeFile as writeFile4
|
|
20397
21259
|
} from "node:fs/promises";
|
|
20398
21260
|
import { join as join15 } from "node:path";
|
|
20399
|
-
var
|
|
21261
|
+
var log10 = createLogger("bridge.codex");
|
|
20400
21262
|
var BRIDGE_SESSION_REGISTRY_VERSION = 2;
|
|
20401
21263
|
var SESSION_TITLE_SOURCES = new Set([
|
|
20402
21264
|
"codex",
|
|
@@ -20696,7 +21558,7 @@ class BridgeSessionStore {
|
|
|
20696
21558
|
await chmod(path, PRIVATE_FILE_MODE);
|
|
20697
21559
|
}
|
|
20698
21560
|
warnPersistenceFailure(error) {
|
|
20699
|
-
|
|
21561
|
+
log10.warn("registry.persist-failed", { error: formatLogError(error, { stack: false }) });
|
|
20700
21562
|
}
|
|
20701
21563
|
toRecord(options) {
|
|
20702
21564
|
const { agentMcp: _agentMcp, ...persistedConfig } = options.config;
|
|
@@ -20720,7 +21582,7 @@ class BridgeSessionStore {
|
|
|
20720
21582
|
}
|
|
20721
21583
|
|
|
20722
21584
|
// ../../bridges/codex-bridge/src/sessions/dispatch-journal.ts
|
|
20723
|
-
var
|
|
21585
|
+
var log11 = createLogger("bridge.codex");
|
|
20724
21586
|
var DISPATCH_JOURNAL_VERSION = 1;
|
|
20725
21587
|
var DISPATCH_COMPLETENESS_VERSION = 1;
|
|
20726
21588
|
var MAX_FRESH_SESSION_MARKERS = 256;
|
|
@@ -21259,7 +22121,7 @@ class DispatchJournal {
|
|
|
21259
22121
|
throw error;
|
|
21260
22122
|
});
|
|
21261
22123
|
} catch (error) {
|
|
21262
|
-
|
|
22124
|
+
log11.warn("journal.persist-failed", { error: formatLogError(error, { stack: false }) });
|
|
21263
22125
|
if (options.failClosed)
|
|
21264
22126
|
throw error;
|
|
21265
22127
|
}
|
|
@@ -21924,7 +22786,7 @@ var APP_SERVER_CAPABILITIES = {
|
|
|
21924
22786
|
};
|
|
21925
22787
|
|
|
21926
22788
|
// ../../bridges/codex-bridge/src/engine/app-server-engine.ts
|
|
21927
|
-
var
|
|
22789
|
+
var log12 = createLogger("bridge.codex");
|
|
21928
22790
|
var AGENT_MAIL_TOOL_APPROVALS = Object.fromEntries([
|
|
21929
22791
|
...AGENT_MAIL_TOOL_NAMES,
|
|
21930
22792
|
...ARTIFACT_TOOL_NAMES,
|
|
@@ -22508,7 +23370,7 @@ class AppServerEngine {
|
|
|
22508
23370
|
try {
|
|
22509
23371
|
listener(event);
|
|
22510
23372
|
} catch (error) {
|
|
22511
|
-
|
|
23373
|
+
log12.error("engine.listener-failed", { error: formatLogError(error) });
|
|
22512
23374
|
}
|
|
22513
23375
|
}
|
|
22514
23376
|
}
|
|
@@ -22633,7 +23495,7 @@ class AppServerEngine {
|
|
|
22633
23495
|
const sequence = ++this.accountCheckSequence;
|
|
22634
23496
|
const generation = this.supervisor.getGeneration();
|
|
22635
23497
|
this.supervisor.request("account/read", { refreshToken }).catch(signedOutAccountRead).then((response) => this.applyAccountRead(response, sequence, generation, accountReplaced)).catch((error) => {
|
|
22636
|
-
|
|
23498
|
+
log12.warn("account.sign-in-check-failed", {
|
|
22637
23499
|
error: formatLogError(error, { stack: false })
|
|
22638
23500
|
});
|
|
22639
23501
|
});
|
|
@@ -23220,7 +24082,7 @@ class AppServerEngine {
|
|
|
23220
24082
|
const generation = this.supervisor.getGeneration();
|
|
23221
24083
|
const response = await this.supervisor.request("account/read", { refreshToken: false }).catch(signedOutAccountRead);
|
|
23222
24084
|
this.applyAccountRead(response, sequence, generation, false).catch((error) => {
|
|
23223
|
-
|
|
24085
|
+
log12.warn("account.connector-recovery-failed", {
|
|
23224
24086
|
error: formatLogError(error, { stack: false })
|
|
23225
24087
|
});
|
|
23226
24088
|
});
|
|
@@ -23433,7 +24295,7 @@ class AppServerEngine {
|
|
|
23433
24295
|
await this.supervisor.request("thread/name/set", { threadId, name });
|
|
23434
24296
|
return true;
|
|
23435
24297
|
} catch (error) {
|
|
23436
|
-
|
|
24298
|
+
log12.warn("thread.rename-failed", { error: formatLogError(error, { stack: false }) });
|
|
23437
24299
|
return false;
|
|
23438
24300
|
}
|
|
23439
24301
|
}
|
|
@@ -23453,7 +24315,7 @@ class AppServerEngine {
|
|
|
23453
24315
|
} catch (error) {
|
|
23454
24316
|
if (requireConfirmation)
|
|
23455
24317
|
throw error;
|
|
23456
|
-
|
|
24318
|
+
log12.warn("thread.unsubscribe-failed", { error: formatLogError(error, { stack: false }) });
|
|
23457
24319
|
}
|
|
23458
24320
|
this.accountProofTurns.delete(threadId);
|
|
23459
24321
|
this.rolloutPaths.delete(threadId);
|
|
@@ -23995,7 +24857,7 @@ function externalRevertCut(messages, survivingTurnIds, running) {
|
|
|
23995
24857
|
}
|
|
23996
24858
|
|
|
23997
24859
|
// ../../bridges/codex-bridge/src/app-server-runtime-sessions.ts
|
|
23998
|
-
var
|
|
24860
|
+
var log13 = createLogger("bridge.codex");
|
|
23999
24861
|
var SESSION_CLOSING_ERROR = "Session is closing";
|
|
24000
24862
|
var ACTIVITY_PROCESS = randomUUID8();
|
|
24001
24863
|
|
|
@@ -24122,7 +24984,7 @@ class CodexRuntimeSessions {
|
|
|
24122
24984
|
try {
|
|
24123
24985
|
fork = await this.ctx.options.engine.forkThread(parent.threadId, parent.config, lastTurnId);
|
|
24124
24986
|
} catch (error) {
|
|
24125
|
-
|
|
24987
|
+
log13.warn("thread.fork-failed", {
|
|
24126
24988
|
threadId: parent.threadId,
|
|
24127
24989
|
error: formatLogError(error, { stack: false })
|
|
24128
24990
|
});
|
|
@@ -24174,7 +25036,7 @@ class CodexRuntimeSessions {
|
|
|
24174
25036
|
await this.ctx.callbacks.deleteSession(child.id).catch(() => {
|
|
24175
25037
|
return;
|
|
24176
25038
|
});
|
|
24177
|
-
|
|
25039
|
+
log13.warn("thread.fork-hydrate-failed", {
|
|
24178
25040
|
threadId: parent.threadId,
|
|
24179
25041
|
error: formatLogError(error, { stack: false })
|
|
24180
25042
|
});
|
|
@@ -24189,7 +25051,7 @@ class CodexRuntimeSessions {
|
|
|
24189
25051
|
});
|
|
24190
25052
|
turns = thread?.turns;
|
|
24191
25053
|
} catch (error) {
|
|
24192
|
-
|
|
25054
|
+
log13.warn("thread.turns-read-failed", {
|
|
24193
25055
|
threadId: context.threadId,
|
|
24194
25056
|
error: formatLogError(error, { stack: false })
|
|
24195
25057
|
});
|
|
@@ -24680,7 +25542,7 @@ class CodexRuntimeSessions {
|
|
|
24680
25542
|
try {
|
|
24681
25543
|
turns = (await this.ctx.options.engine.readThread(context.threadId, { includeTurns: true }))?.turns;
|
|
24682
25544
|
} catch (error) {
|
|
24683
|
-
|
|
25545
|
+
log13.warn("thread.turns-read-after-revert-failed", {
|
|
24684
25546
|
threadId: context.threadId,
|
|
24685
25547
|
error: formatLogError(error, { stack: false })
|
|
24686
25548
|
});
|
|
@@ -24771,7 +25633,7 @@ class CodexRuntimeSessions {
|
|
|
24771
25633
|
if (attached && requestedModelChanged) {
|
|
24772
25634
|
attached.modelId = previousConfirmedModel;
|
|
24773
25635
|
}
|
|
24774
|
-
|
|
25636
|
+
log13.warn("session.config-apply-failed", {
|
|
24775
25637
|
sessionId,
|
|
24776
25638
|
error: formatLogError(error, { stack: false })
|
|
24777
25639
|
});
|
|
@@ -24794,7 +25656,7 @@ class CodexRuntimeSessions {
|
|
|
24794
25656
|
try {
|
|
24795
25657
|
context = await this.ctx.callbacks.ensureAttached(sessionId);
|
|
24796
25658
|
} catch (error) {
|
|
24797
|
-
|
|
25659
|
+
log13.warn("transcript.serving-last-known", {
|
|
24798
25660
|
sessionId,
|
|
24799
25661
|
error: formatLogError(error, { stack: false })
|
|
24800
25662
|
});
|
|
@@ -24996,7 +25858,7 @@ class CodexRuntimeSessions {
|
|
|
24996
25858
|
}
|
|
24997
25859
|
return "unpublished";
|
|
24998
25860
|
}
|
|
24999
|
-
|
|
25861
|
+
log13.warn("registry.persist-failed", { error: formatLogError(error, { stack: false }) });
|
|
25000
25862
|
}
|
|
25001
25863
|
if (this.ctx.registry.getSession(sessionId) !== session)
|
|
25002
25864
|
return "released";
|
|
@@ -25090,7 +25952,7 @@ class CodexRuntimeSessions {
|
|
|
25090
25952
|
}
|
|
25091
25953
|
}
|
|
25092
25954
|
// ../../bridges/codex-bridge/src/app-server-runtime-approvals.ts
|
|
25093
|
-
var
|
|
25955
|
+
var log14 = createLogger("bridge.codex");
|
|
25094
25956
|
|
|
25095
25957
|
class CodexRuntimeApprovals {
|
|
25096
25958
|
ctx;
|
|
@@ -25181,7 +26043,7 @@ class CodexRuntimeApprovals {
|
|
|
25181
26043
|
if (this.ctx.options.engine.resolveApproval(approvalId, decision)) {
|
|
25182
26044
|
if (decision === "cancel") {
|
|
25183
26045
|
this.ctx.callbacks.abort(sessionId).catch((error) => {
|
|
25184
|
-
|
|
26046
|
+
log14.error("approval.cancel-failed", { error: formatLogError(error) });
|
|
25185
26047
|
});
|
|
25186
26048
|
}
|
|
25187
26049
|
return "applied";
|
|
@@ -26584,7 +27446,7 @@ class UpdateCoalescer {
|
|
|
26584
27446
|
|
|
26585
27447
|
// ../../bridges/codex-bridge/src/app-server-runtime-capacity-retry.ts
|
|
26586
27448
|
import { stat as stat8 } from "node:fs/promises";
|
|
26587
|
-
var
|
|
27449
|
+
var log15 = createLogger("bridge.codex");
|
|
26588
27450
|
|
|
26589
27451
|
class CodexCapacityRetry {
|
|
26590
27452
|
ctx;
|
|
@@ -26698,7 +27560,7 @@ class CodexCapacityRetry {
|
|
|
26698
27560
|
}
|
|
26699
27561
|
entry.stage = "starting";
|
|
26700
27562
|
const work = this.startContinuation(context, turn, entry).catch((error) => {
|
|
26701
|
-
|
|
27563
|
+
log15.error("turn.capacity-retry-failed", {
|
|
26702
27564
|
turnId: turn.turnId,
|
|
26703
27565
|
error: formatLogError(error, { stack: false })
|
|
26704
27566
|
});
|
|
@@ -26770,7 +27632,7 @@ class CodexCapacityRetry {
|
|
|
26770
27632
|
});
|
|
26771
27633
|
return;
|
|
26772
27634
|
}
|
|
26773
|
-
await this.ctx.journal.markAccepted(requestId, { threadId: context.threadId, turnId: started.turnId }).catch((error) =>
|
|
27635
|
+
await this.ctx.journal.markAccepted(requestId, { threadId: context.threadId, turnId: started.turnId }).catch((error) => log15.warn("turn.capacity-retry-journal-failed", {
|
|
26774
27636
|
requestId,
|
|
26775
27637
|
error: formatLogError(error, { stack: false })
|
|
26776
27638
|
}));
|
|
@@ -26841,7 +27703,7 @@ class CodexCapacityRetry {
|
|
|
26841
27703
|
}
|
|
26842
27704
|
|
|
26843
27705
|
// ../../bridges/codex-bridge/src/app-server-runtime-lifecycle.ts
|
|
26844
|
-
var
|
|
27706
|
+
var log16 = createLogger("bridge.codex");
|
|
26845
27707
|
function artifactConnectionToken(value) {
|
|
26846
27708
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
26847
27709
|
return;
|
|
@@ -27025,7 +27887,7 @@ class CodexRuntimeLifecycle {
|
|
|
27025
27887
|
this.ctx.registry.setPhase(existing, "recovering");
|
|
27026
27888
|
this.emitStatus(existing);
|
|
27027
27889
|
this.ctx.callbacks.scheduleRecoveryBackstop(existing);
|
|
27028
|
-
|
|
27890
|
+
log16.warn("dispatch.restore-failed", {
|
|
27029
27891
|
requestId: record.requestId,
|
|
27030
27892
|
error: formatLogError(error, { stack: false })
|
|
27031
27893
|
});
|
|
@@ -27204,7 +28066,7 @@ class CodexRuntimeLifecycle {
|
|
|
27204
28066
|
});
|
|
27205
28067
|
}));
|
|
27206
28068
|
}
|
|
27207
|
-
|
|
28069
|
+
log16.warn("thread.reattach-failed", {
|
|
27208
28070
|
threadId,
|
|
27209
28071
|
rolloutMissing: isMissingRolloutError(error),
|
|
27210
28072
|
error: formatLogError(error, { stack: false })
|
|
@@ -27285,7 +28147,7 @@ class CodexRuntimeLifecycle {
|
|
|
27285
28147
|
coalescer: new UpdateCoalescer({
|
|
27286
28148
|
intervalMs: this.ctx.options.coalesceIntervalMs ?? (() => messageSnapshotIntervalMs(this.ctx.threadState.get(threadId)?.lastPublishedSnapshotChars ?? 0)),
|
|
27287
28149
|
publish: () => this.ctx.callbacks.publishAssistantMessage(threadId),
|
|
27288
|
-
onError: (error) =>
|
|
28150
|
+
onError: (error) => log16.error("message.publish-failed", { error: formatLogError(error) })
|
|
27289
28151
|
})
|
|
27290
28152
|
};
|
|
27291
28153
|
this.ctx.threadState.set(threadId, state);
|
|
@@ -27321,7 +28183,7 @@ class CodexRuntimeLifecycle {
|
|
|
27321
28183
|
this.ctx.commandCatalogue.withdrawGeneration(event.generation);
|
|
27322
28184
|
const recovery = this.ctx.generationRecovery.then(() => this.ctx.callbacks.recoverAfterGenerationChange(event.generation));
|
|
27323
28185
|
this.ctx.generationRecovery = recovery.catch((error) => {
|
|
27324
|
-
|
|
28186
|
+
log16.error("generation.recovery-failed", { error: formatLogError(error) });
|
|
27325
28187
|
});
|
|
27326
28188
|
return;
|
|
27327
28189
|
}
|
|
@@ -27341,7 +28203,7 @@ class CodexRuntimeLifecycle {
|
|
|
27341
28203
|
}
|
|
27342
28204
|
if (event.kind === "account.reload.requested") {
|
|
27343
28205
|
this.ctx.callbacks.reloadStoredAccountLogin().catch((error) => {
|
|
27344
|
-
|
|
28206
|
+
log16.warn("account.login-reload-failed", { error: formatLogError(error, { stack: false }) });
|
|
27345
28207
|
});
|
|
27346
28208
|
return;
|
|
27347
28209
|
}
|
|
@@ -27644,7 +28506,7 @@ class CodexRuntimeLifecycle {
|
|
|
27644
28506
|
}
|
|
27645
28507
|
this.ctx.options.changeEvidence?.turn(this.evidenceSource(context, turn), event.status);
|
|
27646
28508
|
const finalize = () => this.runFinalization(context, turn).catch((error) => {
|
|
27647
|
-
|
|
28509
|
+
log16.error("turn.finalize-failed", {
|
|
27648
28510
|
turnId: turn.turnId,
|
|
27649
28511
|
error: formatLogError(error, { stack: false })
|
|
27650
28512
|
});
|
|
@@ -27862,7 +28724,7 @@ class CodexRuntimeLifecycle {
|
|
|
27862
28724
|
}
|
|
27863
28725
|
trackCommandChangeWork(work) {
|
|
27864
28726
|
const tracked = work.catch((error) => {
|
|
27865
|
-
|
|
28727
|
+
log16.warn("command-changes.record-failed", { error: formatLogError(error, { stack: false }) });
|
|
27866
28728
|
});
|
|
27867
28729
|
this.ctx.pendingCommandChanges.add(tracked);
|
|
27868
28730
|
tracked.finally(() => this.ctx.pendingCommandChanges.delete(tracked));
|
|
@@ -28305,7 +29167,7 @@ class CodexRuntimeLifecycle {
|
|
|
28305
29167
|
try {
|
|
28306
29168
|
await state.coalescer.flushNow();
|
|
28307
29169
|
} catch (error) {
|
|
28308
|
-
|
|
29170
|
+
log16.error("ordered-events.flush-failed", { error: formatLogError(error) });
|
|
28309
29171
|
}
|
|
28310
29172
|
state.orderedReconcilePending = false;
|
|
28311
29173
|
for (const sessionId of this.ctx.sessionIdsForThread(threadId)) {
|
|
@@ -28324,7 +29186,7 @@ class CodexRuntimeLifecycle {
|
|
|
28324
29186
|
await state.coalescer.flushNow();
|
|
28325
29187
|
event.publish();
|
|
28326
29188
|
} catch (error) {
|
|
28327
|
-
|
|
29189
|
+
log16.error("ordered-events.publish-failed", { error: formatLogError(error) });
|
|
28328
29190
|
state.orderedEvents.length = 0;
|
|
28329
29191
|
state.orderedEventBytes = 0;
|
|
28330
29192
|
state.orderedReconcilePending = true;
|
|
@@ -28333,7 +29195,7 @@ class CodexRuntimeLifecycle {
|
|
|
28333
29195
|
}
|
|
28334
29196
|
}
|
|
28335
29197
|
} catch (error) {
|
|
28336
|
-
|
|
29198
|
+
log16.error("ordered-events.reconcile-failed", { error: formatLogError(error) });
|
|
28337
29199
|
} finally {
|
|
28338
29200
|
state.orderedEventDraining = false;
|
|
28339
29201
|
if ((state.orderedReconcilePending || state.orderedEvents.length > 0) && this.ctx.threadState.get(threadId) === state) {
|
|
@@ -28449,7 +29311,7 @@ function isTabInitialPromptRequestId(requestId) {
|
|
|
28449
29311
|
}
|
|
28450
29312
|
|
|
28451
29313
|
// ../../bridges/codex-bridge/src/app-server-runtime-prompt.ts
|
|
28452
|
-
var
|
|
29314
|
+
var log17 = createLogger("bridge.codex");
|
|
28453
29315
|
function commandRefusal(message) {
|
|
28454
29316
|
return { ok: false, status: 422, error: message, kind: "command-unavailable" };
|
|
28455
29317
|
}
|
|
@@ -29110,7 +29972,7 @@ class CodexRuntimePrompt {
|
|
|
29110
29972
|
try {
|
|
29111
29973
|
outcome = await this.ctx.options.engine.reconcileRequest(context.threadId, accumulator.providerRequestId);
|
|
29112
29974
|
} catch (error) {
|
|
29113
|
-
|
|
29975
|
+
log17.warn("dispatch.reconcile-failed", {
|
|
29114
29976
|
requestId,
|
|
29115
29977
|
threadId: context.threadId,
|
|
29116
29978
|
error: formatLogError(error, { stack: false })
|
|
@@ -29385,7 +30247,7 @@ class CodexRuntimePrompt {
|
|
|
29385
30247
|
if (this.ctx.stopping || this.shouldAbandonDrain(expectedGeneration))
|
|
29386
30248
|
return;
|
|
29387
30249
|
if (Date.now() >= deadline) {
|
|
29388
|
-
|
|
30250
|
+
log17.warn("app-server.drain-expired");
|
|
29389
30251
|
return;
|
|
29390
30252
|
}
|
|
29391
30253
|
await this.waitForThreadActivity();
|
|
@@ -29419,7 +30281,7 @@ class CodexRuntimePrompt {
|
|
|
29419
30281
|
|
|
29420
30282
|
// ../../bridges/codex-bridge/src/app-server-runtime-tail.ts
|
|
29421
30283
|
import { join as join21, relative as relative4, isAbsolute as isAbsolute11 } from "node:path";
|
|
29422
|
-
var
|
|
30284
|
+
var log18 = createLogger("bridge.codex");
|
|
29423
30285
|
|
|
29424
30286
|
class CodexRuntimeTail {
|
|
29425
30287
|
ctx;
|
|
@@ -29568,7 +30430,7 @@ class CodexRuntimeTail {
|
|
|
29568
30430
|
};
|
|
29569
30431
|
}
|
|
29570
30432
|
} catch (error) {
|
|
29571
|
-
|
|
30433
|
+
log18.warn("models.list-failed", { error: formatLogError(error, { stack: false }) });
|
|
29572
30434
|
}
|
|
29573
30435
|
return this.ctx.options.loadCachedModels();
|
|
29574
30436
|
}
|
|
@@ -29594,7 +30456,7 @@ class CodexRuntimeTail {
|
|
|
29594
30456
|
});
|
|
29595
30457
|
}
|
|
29596
30458
|
} catch (error) {
|
|
29597
|
-
|
|
30459
|
+
log18.warn("threads.list-failed", { error: formatLogError(error, { stack: false }) });
|
|
29598
30460
|
}
|
|
29599
30461
|
const archived = new Set;
|
|
29600
30462
|
try {
|
|
@@ -29679,7 +30541,7 @@ class CodexRuntimeTail {
|
|
|
29679
30541
|
else
|
|
29680
30542
|
await this.ctx.options.engine.unarchiveThread(threadId);
|
|
29681
30543
|
} catch (error) {
|
|
29682
|
-
|
|
30544
|
+
log18.warn("thread.archive-failed", {
|
|
29683
30545
|
archived,
|
|
29684
30546
|
error: formatLogError(error, { stack: false })
|
|
29685
30547
|
});
|
|
@@ -30314,7 +31176,7 @@ var CODEX_FALLBACK_MODEL_CATALOG = [
|
|
|
30314
31176
|
];
|
|
30315
31177
|
|
|
30316
31178
|
// ../../bridges/codex-bridge/src/models-cache.ts
|
|
30317
|
-
var
|
|
31179
|
+
var log19 = createLogger("bridge.codex");
|
|
30318
31180
|
var MODEL_REASONING_EFFORTS = new Set([
|
|
30319
31181
|
"minimal",
|
|
30320
31182
|
"low",
|
|
@@ -30461,13 +31323,13 @@ class ModelCatalogCache {
|
|
|
30461
31323
|
await this.opts.writePersistedCache(models);
|
|
30462
31324
|
}
|
|
30463
31325
|
} catch (error) {
|
|
30464
|
-
|
|
31326
|
+
log19.warn("models.refresh-failed", { error: formatLogError(error, { stack: false }) });
|
|
30465
31327
|
}
|
|
30466
31328
|
}
|
|
30467
31329
|
}
|
|
30468
31330
|
|
|
30469
31331
|
// ../../bridges/codex-bridge/src/index.ts
|
|
30470
|
-
var
|
|
31332
|
+
var log20 = createLogger("bridge.codex");
|
|
30471
31333
|
configureBridgeLogger();
|
|
30472
31334
|
var WORKFLOW_RESULT_TOOL_NAMES2 = new Set(WORKFLOW_RESULT_KINDS.map(workflowResultToolName));
|
|
30473
31335
|
function isWorkflowResultTool(value) {
|
|
@@ -30500,7 +31362,7 @@ app.onError((error, c) => {
|
|
|
30500
31362
|
const response = error.getResponse();
|
|
30501
31363
|
return c.newResponse(response.body, response);
|
|
30502
31364
|
}
|
|
30503
|
-
|
|
31365
|
+
log20.error("http.request-failed", {
|
|
30504
31366
|
method: c.req.method,
|
|
30505
31367
|
path: c.req.path,
|
|
30506
31368
|
error: formatLogError(error)
|
|
@@ -30528,10 +31390,10 @@ function notifyObservers(event, revision) {
|
|
|
30528
31390
|
for (const observer of observers) {
|
|
30529
31391
|
try {
|
|
30530
31392
|
Promise.resolve(observer(event, revision, "{}")).catch((error) => {
|
|
30531
|
-
|
|
31393
|
+
log20.warn("sse.observer-failed", { error: formatLogError(error) });
|
|
30532
31394
|
});
|
|
30533
31395
|
} catch (error) {
|
|
30534
|
-
|
|
31396
|
+
log20.warn("sse.observer-failed", { error: formatLogError(error) });
|
|
30535
31397
|
}
|
|
30536
31398
|
}
|
|
30537
31399
|
}
|
|
@@ -30664,7 +31526,7 @@ async function writeCodexRawLog(sessionId, entry, logDir = codexRawLogDir) {
|
|
|
30664
31526
|
})}
|
|
30665
31527
|
`, "utf8");
|
|
30666
31528
|
} catch (error) {
|
|
30667
|
-
|
|
31529
|
+
log20.warn("raw-log.write-failed", { error: formatLogError(error) });
|
|
30668
31530
|
}
|
|
30669
31531
|
}
|
|
30670
31532
|
function createShutdownHandler(timer, clearTimer = clearInterval, exit = (code) => process.exit(code), stopEngine = () => stopSelectedEngine()) {
|
|
@@ -30675,12 +31537,12 @@ function createShutdownHandler(timer, clearTimer = clearInterval, exit = (code)
|
|
|
30675
31537
|
shuttingDown = true;
|
|
30676
31538
|
clearTimer(timer);
|
|
30677
31539
|
stopEngine().catch((error) => {
|
|
30678
|
-
|
|
31540
|
+
log20.warn("engine.stop-failed", { error: formatLogError(error) });
|
|
30679
31541
|
}).finally(() => exit(0));
|
|
30680
31542
|
};
|
|
30681
31543
|
}
|
|
30682
31544
|
function createParentExitHandler(interrupt, shutdown, report = (turns, ms) => {
|
|
30683
|
-
|
|
31545
|
+
log20.info("turns.stopped", { turns, elapsedMs: ms });
|
|
30684
31546
|
}) {
|
|
30685
31547
|
return async () => {
|
|
30686
31548
|
const detectedAt = performance.now();
|
|
@@ -30711,7 +31573,7 @@ function serializeSseEventData(event) {
|
|
|
30711
31573
|
...event.data
|
|
30712
31574
|
});
|
|
30713
31575
|
} catch {
|
|
30714
|
-
|
|
31576
|
+
log20.error("sse.payload-serialize-failed");
|
|
30715
31577
|
return JSON.stringify({
|
|
30716
31578
|
sessionId: event.sessionId,
|
|
30717
31579
|
error: "payload could not be serialized"
|
|
@@ -30776,7 +31638,7 @@ function emit(event) {
|
|
|
30776
31638
|
messageId = retainedMessageId(event.type, payload);
|
|
30777
31639
|
bytes = eager === null ? estimateSsePayloadBytes(payload) : Buffer.byteLength(eager, "utf8");
|
|
30778
31640
|
} catch {
|
|
30779
|
-
|
|
31641
|
+
log20.error("sse.payload-snapshot-failed");
|
|
30780
31642
|
payload = { error: "payload could not be serialized" };
|
|
30781
31643
|
eager = subscribers.size > 0 ? serializeSseEventData({ sessionId, data: payload }) : null;
|
|
30782
31644
|
messageId = undefined;
|
|
@@ -30793,10 +31655,10 @@ function emit(event) {
|
|
|
30793
31655
|
for (const subscriber of subscribers) {
|
|
30794
31656
|
try {
|
|
30795
31657
|
Promise.resolve(subscriber(event, revision, eager ?? "{}")).catch((error) => {
|
|
30796
|
-
|
|
31658
|
+
log20.warn("sse.subscriber-failed", { error: formatLogError(error) });
|
|
30797
31659
|
});
|
|
30798
31660
|
} catch (error) {
|
|
30799
|
-
|
|
31661
|
+
log20.warn("sse.subscriber-failed", { error: formatLogError(error) });
|
|
30800
31662
|
}
|
|
30801
31663
|
}
|
|
30802
31664
|
}
|
|
@@ -30823,7 +31685,7 @@ async function writePersistedBridgeCache(models) {
|
|
|
30823
31685
|
await mkdir9(bridgeCacheDir(), { recursive: true });
|
|
30824
31686
|
await writeFile6(bridgeCachePath(), JSON.stringify({ version: BRIDGE_MODEL_CACHE_VERSION, at: Date.now(), models }, null, 2));
|
|
30825
31687
|
} catch (error) {
|
|
30826
|
-
|
|
31688
|
+
log20.warn("models.cache-persist-failed", { error: formatLogError(error, { stack: false }) });
|
|
30827
31689
|
}
|
|
30828
31690
|
}
|
|
30829
31691
|
async function readCodexCliModelCache() {
|
|
@@ -30845,7 +31707,7 @@ async function fetchLiveModelsFromCli(run = execFile4, env = process.env) {
|
|
|
30845
31707
|
const models = parseModelCatalog(stdout);
|
|
30846
31708
|
return models.length > 0 ? models : null;
|
|
30847
31709
|
} catch (error) {
|
|
30848
|
-
|
|
31710
|
+
log20.warn("models.debug-read-failed", { error: formatLogError(error, { stack: false }) });
|
|
30849
31711
|
return null;
|
|
30850
31712
|
}
|
|
30851
31713
|
}
|
|
@@ -30890,7 +31752,7 @@ async function sweepIdleThreads(runtime = appServerRuntime) {
|
|
|
30890
31752
|
try {
|
|
30891
31753
|
await runtime.sweepIdle();
|
|
30892
31754
|
} catch (error) {
|
|
30893
|
-
|
|
31755
|
+
log20.warn("idle-sweep.failed", { error: formatLogError(error) });
|
|
30894
31756
|
}
|
|
30895
31757
|
}
|
|
30896
31758
|
function createCodexProcessDiagnostics(runtime = appServerRuntime) {
|
|
@@ -30926,9 +31788,9 @@ async function startSelectedEngine(env = process.env, runtime = appServerRuntime
|
|
|
30926
31788
|
}
|
|
30927
31789
|
try {
|
|
30928
31790
|
await runtime.start();
|
|
30929
|
-
|
|
31791
|
+
log20.info("engine.ready", { codexVersion: runtime.getHealth().codexVersion ?? "unknown" });
|
|
30930
31792
|
} catch (error) {
|
|
30931
|
-
|
|
31793
|
+
log20.error("engine.start-failed", { error: formatLogError(error, { stack: false }) });
|
|
30932
31794
|
}
|
|
30933
31795
|
}
|
|
30934
31796
|
var __testing = {
|
|
@@ -31014,7 +31876,7 @@ function startSseKeepalive(writeSSE, intervalMs = 5000, shouldSendAtActiveCadenc
|
|
|
31014
31876
|
id: String(eventRing.latestRevision),
|
|
31015
31877
|
data: "{}"
|
|
31016
31878
|
}).catch((error) => {
|
|
31017
|
-
|
|
31879
|
+
log20.warn("sse.keepalive-failed", { error: formatLogError(error, { stack: false }) });
|
|
31018
31880
|
});
|
|
31019
31881
|
}, intervalMs);
|
|
31020
31882
|
}
|
|
@@ -31268,7 +32130,7 @@ app.get("/session/:id/usage", async (c) => {
|
|
|
31268
32130
|
return c.json({ error: "Session not found" }, 404);
|
|
31269
32131
|
return c.json({ contextUsage });
|
|
31270
32132
|
} catch (error) {
|
|
31271
|
-
|
|
32133
|
+
log20.warn("account.usage-read-failed", { error: formatLogError(error, { stack: false }) });
|
|
31272
32134
|
return c.json({ error: "Account usage is temporarily unavailable" }, 503);
|
|
31273
32135
|
}
|
|
31274
32136
|
});
|
|
@@ -31678,7 +32540,7 @@ app.get("/event/subscribe", (c) => {
|
|
|
31678
32540
|
if (!open)
|
|
31679
32541
|
return;
|
|
31680
32542
|
open = false;
|
|
31681
|
-
|
|
32543
|
+
log20.info("sse.closed", { reason });
|
|
31682
32544
|
resolveConnectionClosed();
|
|
31683
32545
|
};
|
|
31684
32546
|
const writeWhileOpen = createSerializedSseWriter(createOpenSseWriter(() => open, (event) => stream.writeSSE(event)), { onOverflow: () => failSlowSubscriber("write backlog exceeded its cap") });
|
|
@@ -31826,7 +32688,7 @@ if (parentPid !== null) {
|
|
|
31826
32688
|
startParentWatchdog({
|
|
31827
32689
|
parentPid,
|
|
31828
32690
|
onParentExit: () => {
|
|
31829
|
-
|
|
32691
|
+
log20.warn("parent.gone", { parentPid });
|
|
31830
32692
|
createParentExitHandler((budgetMs) => appServerRuntime.interruptForParentExit(budgetMs), shutdownHandler)();
|
|
31831
32693
|
}
|
|
31832
32694
|
});
|