orkestrator 2.36.1 → 2.36.2-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +331 -23
- package/dist/main.js +7949 -3557
- package/package.json +3 -3
- package/resources/acp-bridge/dist/index.js +626 -429
- package/resources/claude-bridge/dist/index.js +540 -147
- package/resources/codex-bridge/dist/index.js +1912 -1261
- package/resources/cursor-bridge/dist/index.js +579 -42
- package/resources/cursor-bridge/runtime/install.json +1 -1
- package/resources/pi-bridge/dist/index.js +730 -103
- package/resources/pi-bridge/runtime/install.json +1 -1
|
@@ -180,6 +180,16 @@ function logErrorKind(error) {
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
// ../protocol/src/log-vocabulary/define.ts
|
|
183
|
+
var ESSENTIAL_ERROR_FIELDS = {
|
|
184
|
+
"error.name": "label",
|
|
185
|
+
"error.code": "label",
|
|
186
|
+
"error.errno": "number",
|
|
187
|
+
"error.syscall": "label",
|
|
188
|
+
"error.exitCode": "number",
|
|
189
|
+
"error.signal": "label",
|
|
190
|
+
"error.outputOmitted": "boolean",
|
|
191
|
+
"error.errorCount": "number"
|
|
192
|
+
};
|
|
183
193
|
var THROTTLE_LOG_EVENTS = {
|
|
184
194
|
"throttle.suppressed": "Repeats of the throttled `site` were counted over a window, not written.",
|
|
185
195
|
"throttle.recovered": "The throttled `site` succeeded again, so its fault has cleared.",
|
|
@@ -229,7 +239,11 @@ var BACKEND_LOG_AREAS = defineLogAreas({
|
|
|
229
239
|
backend: {
|
|
230
240
|
description: "The backend process: startup, background notices and shutdown.",
|
|
231
241
|
events: {
|
|
232
|
-
starting:
|
|
242
|
+
starting: {
|
|
243
|
+
description: "The backend process is starting.",
|
|
244
|
+
essential: true,
|
|
245
|
+
fields: { version: "label" }
|
|
246
|
+
},
|
|
233
247
|
"ssh-socket.resolved": "An SSH agent socket was found.",
|
|
234
248
|
"ssh-socket.missing": "No usable SSH agent socket was found.",
|
|
235
249
|
"standalone-updater.mismatch": "--standalone-updater does not match --data-dir, so self-update is off.",
|
|
@@ -244,8 +258,16 @@ var BACKEND_LOG_AREAS = defineLogAreas({
|
|
|
244
258
|
"notice.failed": "A background notice after a turn or prompt failed; `step` says which.",
|
|
245
259
|
"artifacts.live-unavailable": "Live interactive artifacts are unavailable.",
|
|
246
260
|
"shutdown.step-failed": "One part of shutdown failed and the rest went on; `step` says which.",
|
|
247
|
-
"shutdown.signal-received":
|
|
248
|
-
|
|
261
|
+
"shutdown.signal-received": {
|
|
262
|
+
description: "A signal started shutdown, which tells a clean quit from the backend being killed.",
|
|
263
|
+
essential: true,
|
|
264
|
+
fields: { signal: "label" }
|
|
265
|
+
},
|
|
266
|
+
"shutdown.finished": {
|
|
267
|
+
description: "Shutdown finished, and the process exits with `code`.",
|
|
268
|
+
essential: true,
|
|
269
|
+
fields: { code: "number" }
|
|
270
|
+
},
|
|
249
271
|
"port-policy.second-backend": "Another backend serves the default data directory, so this one avoids its ports.",
|
|
250
272
|
"port-policy.serve-on-free-port": "--tailscale-serve is on a free gateway port; pass --port with --strict-gateway-port to keep one."
|
|
251
273
|
}
|
|
@@ -288,7 +310,10 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
288
310
|
"evidence.record-failed": "Change evidence could not be recorded; the read loop carries on.",
|
|
289
311
|
"evidence.shell-record-failed": "A shell observation could not be recorded.",
|
|
290
312
|
"evidence.turn-record-failed": "Turn change evidence could not be recorded.",
|
|
313
|
+
"agent.exited": "An ACP agent process exited, with its `code` and `signal`, always at `warn`. `requested` is true when the bridge closed it normally, false for an unrequested or fault-driven exit.",
|
|
314
|
+
"http.route-failed": "An HTTP route answered 500; its error message is not logged because it can hold content.",
|
|
291
315
|
"server.listening": "The HTTP server is listening.",
|
|
316
|
+
"session.policy-widening-refused": "A request tried to widen a live session's execution policy and was refused; widened names the axes.",
|
|
292
317
|
"state.composer-reset": "A saved composer state was malformed and was reset.",
|
|
293
318
|
"state.discarded": "Saved bridge state could not be used and was discarded.",
|
|
294
319
|
"state.persist-failed": "Saving bridge state failed; a later write retries.",
|
|
@@ -342,7 +367,7 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
342
367
|
"session.created": "A session was created or recovered.",
|
|
343
368
|
"session.delete-failed": "Deleting a session failed.",
|
|
344
369
|
"session.fork-failed": "Forking a session failed.",
|
|
345
|
-
"session.policy-widening-refused": "A
|
|
370
|
+
"session.policy-widening-refused": "A request tried to widen a live session's execution policy and was refused; widened names the axes.",
|
|
346
371
|
"session.rename-failed": "Renaming a session failed.",
|
|
347
372
|
"session.resolve-failed": "A session could not be found or loaded for a request; action names the request.",
|
|
348
373
|
"session.rewind-failed": "Rewinding session files failed.",
|
|
@@ -376,6 +401,7 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
376
401
|
"app-server.exited": "app-server exited unexpectedly; the code and signal say how.",
|
|
377
402
|
"app-server.invariant-violation": "app-server asked for something its configuration forbids.",
|
|
378
403
|
"app-server.protocol-violation": "app-server wrote a line that is not valid protocol; it was ignored.",
|
|
404
|
+
"app-server.overflow-restart-failed": "Replacing the child after a notification queue overflow failed; the next request tries again.",
|
|
379
405
|
"app-server.recording": "Notification recording is on; recordings hold content.",
|
|
380
406
|
"app-server.stale-reaped": "A stale app-server left by an earlier bridge was stopped.",
|
|
381
407
|
"app-server.stderr": "Metadata of an app-server stderr line, never its content.",
|
|
@@ -406,6 +432,7 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
406
432
|
"ordered-events.publish-failed": "Publishing an ordered event failed; clients are told to rehydrate.",
|
|
407
433
|
"ordered-events.reconcile-failed": "Reconciling ordered events failed.",
|
|
408
434
|
"parent.gone": "The backend that launched this bridge has gone; stopping turns and shutting down.",
|
|
435
|
+
"queue.overflow": "The notification queue passed a bound and dropped its backlog.",
|
|
409
436
|
"queue.task-failed": "A task on a per-thread queue failed.",
|
|
410
437
|
"raw-log.write-failed": "Appending to the raw Codex log failed.",
|
|
411
438
|
"recorder.notice": "The notification recorder needs attention: it is on, or was asked for without its confirmation.",
|
|
@@ -419,6 +446,7 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
419
446
|
"server-request.flush-timeout": "An answer to a server request did not flush in time.",
|
|
420
447
|
"server-request.handoff-failed": "Handing a server request to the router threw.",
|
|
421
448
|
"session.config-apply-failed": "Applying session configuration failed; the route answers unavailable.",
|
|
449
|
+
"session.policy-widening-refused": "A request tried to widen a live session's execution policy and was refused; widened names the axes.",
|
|
422
450
|
"sse.closed": "An event stream was closed by the bridge; the client reconnects and replays.",
|
|
423
451
|
"sse.keepalive-failed": "An event stream keepalive failed.",
|
|
424
452
|
"sse.observer-failed": "An event stream observer failed; it reconnects.",
|
|
@@ -447,19 +475,39 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
447
475
|
events: {
|
|
448
476
|
"agent.archive-failed": "Archiving or unarchiving an agent failed.",
|
|
449
477
|
"http.route-failed": "An HTTP route failed unexpectedly; its error is not logged because it can hold content.",
|
|
478
|
+
"session.policy-widening-refused": "A request tried to widen a live session's execution policy and was refused; widened names the axes.",
|
|
450
479
|
"startup.closes-failed": "Finishing closes a previous process left behind failed at startup.",
|
|
451
480
|
"startup.closes-incomplete": "Some closes a previous process left behind did not finish at startup; a retried close finishes them.",
|
|
452
481
|
"state.publication-failing": "Saving bridge state is failing; new prompts and steers are refused until it recovers.",
|
|
453
482
|
"state.publication-recovered": "Saving bridge state recovered.",
|
|
454
|
-
"state.transcripts-shortened": "The state file reached its limit, so some sessions were saved with a shortened transcript copy."
|
|
483
|
+
"state.transcripts-shortened": "The state file reached its limit, so some sessions were saved with a shortened transcript copy.",
|
|
484
|
+
"session.resume-fell-back": {
|
|
485
|
+
description: "A saved conversation could not be resumed, so a new one started; its error message is not logged because it can hold content.",
|
|
486
|
+
essential: true,
|
|
487
|
+
fields: ESSENTIAL_ERROR_FIELDS
|
|
488
|
+
},
|
|
489
|
+
"turn.failed": "A turn failed; its error message is not logged because it can hold content. A cancelled turn is not a failure.",
|
|
490
|
+
"turn.recovery-failed": "A run recovered after a bridge restart ended in failure, or could not be followed. A cancelled run is not a failure.",
|
|
491
|
+
"turn.send-failed": "Sending a prompt to Cursor failed, so whether its run started is unknown; its error message is not logged because it can hold content.",
|
|
492
|
+
"turn.timed-out": "A turn outlived its time budget, so its run was asked to cancel; `turn.failed` follows if it never stops."
|
|
455
493
|
}
|
|
456
494
|
},
|
|
457
495
|
"bridge.pi": {
|
|
458
496
|
description: "The Pi bridge: its routes, sessions and saved state.",
|
|
459
497
|
events: {
|
|
460
498
|
"http.route-failed": "An HTTP route failed unexpectedly; its error is not logged because it can hold content.",
|
|
499
|
+
"session.policy-widening-refused": "A request tried to widen a live session's execution policy and was refused; widened names the axes.",
|
|
500
|
+
"session-list.failed": "Reading the resumable sessions failed, so none were offered; its error message is not logged because it can hold content.",
|
|
461
501
|
"state.over-budget": "The state file stayed over budget after shedding transcripts, so the write was skipped.",
|
|
462
|
-
"state.transcripts-shed": "The state file was over budget, so some sessions were saved without their transcript."
|
|
502
|
+
"state.transcripts-shed": "The state file was over budget, so some sessions were saved without their transcript.",
|
|
503
|
+
"session.resume-fell-back": {
|
|
504
|
+
description: "A saved conversation could not be reopened, so a new one started; its error message is not logged because it can hold content.",
|
|
505
|
+
essential: true,
|
|
506
|
+
fields: ESSENTIAL_ERROR_FIELDS
|
|
507
|
+
},
|
|
508
|
+
"turn.failed": "A turn failed; its error message is not logged because it can hold content. A cancelled turn is not a failure.",
|
|
509
|
+
"turn.refused": "Pi refused a prompt before starting a run, so nothing ran; its error message is not logged because it can hold content.",
|
|
510
|
+
"turn.startup-timed-out": "Pi did not start a turn within its startup deadline, so the prompt was abandoned."
|
|
463
511
|
}
|
|
464
512
|
}
|
|
465
513
|
});
|
|
@@ -470,14 +518,31 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
470
518
|
description: "The Electron main process: startup, windows, quit and the Local backend's life.",
|
|
471
519
|
events: {
|
|
472
520
|
"backend.docker-context-seed-failed": "An agent-test profile fell back to the default Docker context.",
|
|
473
|
-
"backend.exited":
|
|
474
|
-
|
|
521
|
+
"backend.exited": {
|
|
522
|
+
description: "The Local backend exited unexpectedly; Local work is unavailable. `error.exitCode` and `error.signal` say how.",
|
|
523
|
+
essential: true,
|
|
524
|
+
fields: ESSENTIAL_ERROR_FIELDS
|
|
525
|
+
},
|
|
526
|
+
"backend.exited-recovering": {
|
|
527
|
+
description: "The Local backend exited just after a remote update; relaunching unattended. `error.exitCode` and `error.signal` say how.",
|
|
528
|
+
essential: true,
|
|
529
|
+
fields: ESSENTIAL_ERROR_FIELDS
|
|
530
|
+
},
|
|
475
531
|
"backend.keychain-link-remove-failed": "An agent-test profile kept a legacy link to the host keychain.",
|
|
476
|
-
"backend.start-failed":
|
|
532
|
+
"backend.start-failed": {
|
|
533
|
+
description: "The Local backend did not start; continuing with remote machines.",
|
|
534
|
+
essential: true,
|
|
535
|
+
fields: ESSENTIAL_ERROR_FIELDS
|
|
536
|
+
},
|
|
477
537
|
"clipboard.write-failed": "Writing text to the system clipboard failed.",
|
|
478
538
|
"dev-mode.ignored-packaged": "A packaged app was launched with ELECTRON_DEV=1 and ignored it; it loads its bundled renderer.",
|
|
479
539
|
"instance.already-running": "Another instance holds this data directory; this one will quit.",
|
|
480
|
-
"main-thread.stalled":
|
|
540
|
+
"main-thread.stalled": {
|
|
541
|
+
description: "A timer fired late, so windows, IPC and the stdout reader waited.",
|
|
542
|
+
essential: true,
|
|
543
|
+
minLevel: "error",
|
|
544
|
+
fields: { lagMs: "number", intervalMs: "number" }
|
|
545
|
+
},
|
|
481
546
|
"quit.stopping-backend": "The app is quitting and has asked the Local backend to stop.",
|
|
482
547
|
"relaunch.schedule-failed": "The AppImage relaunch waiter failed; using Electron's relauncher.",
|
|
483
548
|
"relaunch.service-register-failed": "The AppImage relaunch service was refused; using a detached waiter.",
|
|
@@ -488,7 +553,11 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
488
553
|
"saved-machines.attach-failed": "Saved machines were not imported into the command node yet.",
|
|
489
554
|
"saved-machines.attached": "Saved machines were imported into the local command node.",
|
|
490
555
|
"startup.failed": "The application failed to start.",
|
|
491
|
-
"uncaught-exception":
|
|
556
|
+
"uncaught-exception": {
|
|
557
|
+
description: "The main process hit an uncaught exception.",
|
|
558
|
+
essential: true,
|
|
559
|
+
fields: ESSENTIAL_ERROR_FIELDS
|
|
560
|
+
},
|
|
492
561
|
"uncaught-exception.dialog-failed": "The uncaught exception sheet could not be shown.",
|
|
493
562
|
"window.create-failed": "A menu-driven new window could not be created.",
|
|
494
563
|
"window.recreate-failed": "The main window could not be recreated on activation.",
|
|
@@ -511,6 +580,12 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
511
580
|
"unhandled-rejection": "An unhandled rejection occurred while the renderer was starting."
|
|
512
581
|
}
|
|
513
582
|
},
|
|
583
|
+
"desktop.permissions": {
|
|
584
|
+
description: "Permission requests refused on the renderer and workspace realm sessions.",
|
|
585
|
+
events: {
|
|
586
|
+
denied: "A renderer asked for a permission the policy does not grant."
|
|
587
|
+
}
|
|
588
|
+
},
|
|
514
589
|
"desktop.dialog": {
|
|
515
590
|
description: "Native dialogs, whose modal loops hold the main thread while they are open.",
|
|
516
591
|
events: {
|
|
@@ -629,6 +704,8 @@ var GATEWAY_LOG_AREAS = defineLogAreas({
|
|
|
629
704
|
"loopback.unavailable": "The loopback client listener could not start.",
|
|
630
705
|
"auth-token.stored": "The gateway token's file was written. The path only, never the token.",
|
|
631
706
|
"auth-token.persist-failed": "The gateway token could not be saved.",
|
|
707
|
+
"auth-guess.throttled": "A listener saw enough different wrong tokens that it now pauses new ones. Never the values.",
|
|
708
|
+
"host.refused": "A request named a host this gateway does not answer to. Logged once per name, up to a limit.",
|
|
632
709
|
"port.fallback": "The preferred port was taken, so a nearby one is used.",
|
|
633
710
|
"port.fallback-distant": "The preferred port and those nearby were taken, so another is used.",
|
|
634
711
|
"request.failed": "A gateway request failed. Throttled: repeats are counted, not written.",
|
|
@@ -672,6 +749,22 @@ var LOCAL_SERVER_LOG_AREAS = defineLogAreas({
|
|
|
672
749
|
"bridge-runtime.installed": "A bridge runtime finished installing.",
|
|
673
750
|
"opencode.database-lost-retrying": "OpenCode lost its shared database at startup, so it is retried.",
|
|
674
751
|
"server.stopping": "A local server is being stopped, for the fixed `reason` given.",
|
|
752
|
+
"bridge.started": {
|
|
753
|
+
description: "A local bridge process was spawned; `key` names its kind and environment.",
|
|
754
|
+
essential: true,
|
|
755
|
+
fields: { key: "label", pid: "number" }
|
|
756
|
+
},
|
|
757
|
+
"bridge.exited": {
|
|
758
|
+
description: "A local bridge process exited, with its `code` and `signal`. `warn` when nothing asked it to, whatever the code; `info` when the backend stopped it, which `server.stopping` explains.",
|
|
759
|
+
essential: true,
|
|
760
|
+
fields: {
|
|
761
|
+
key: "label",
|
|
762
|
+
pid: "number",
|
|
763
|
+
code: "number",
|
|
764
|
+
signal: "label",
|
|
765
|
+
requested: "boolean"
|
|
766
|
+
}
|
|
767
|
+
},
|
|
675
768
|
"reaper.tmux-list-failed": "Orphaned claude-tmux sessions could not be listed.",
|
|
676
769
|
"reaper.tmux-kill-failed": "An orphaned tmux session could not be killed.",
|
|
677
770
|
"reaper.tmux-reaped": "Orphaned claude-tmux sessions of a deleted environment were killed.",
|
|
@@ -705,13 +798,29 @@ var LOGGING_LOG_AREAS = defineLogAreas({
|
|
|
705
798
|
"capture.started": "Saving logs to disk began for this process.",
|
|
706
799
|
"capture.stopped": "Saving logs to disk stopped for this process.",
|
|
707
800
|
"config.invalid": "A logging environment variable held a value that was ignored.",
|
|
708
|
-
"entries.dropped":
|
|
801
|
+
"entries.dropped": {
|
|
802
|
+
description: "Entries were dropped and counted, for the fixed `reason` given: the queue was full, a write failed or, in the essential log, one event was repeating too fast.",
|
|
803
|
+
essential: true,
|
|
804
|
+
fields: { entries: "number", bytes: "number", reason: "label" }
|
|
805
|
+
},
|
|
806
|
+
"essential.started": {
|
|
807
|
+
description: "This process began writing the essential log. One with no `essential.stopped` before it means the last writer died.",
|
|
808
|
+
essential: true,
|
|
809
|
+
fields: { owner: "label" }
|
|
810
|
+
},
|
|
811
|
+
"essential.stopped": {
|
|
812
|
+
description: "This process stopped writing the essential log, in an orderly exit.",
|
|
813
|
+
essential: true,
|
|
814
|
+
fields: { owner: "label" }
|
|
815
|
+
},
|
|
816
|
+
"essential.write-failed": "Writing the essential log failed. Its entries are counted, and a marker reports them at the next write that works.",
|
|
709
817
|
"policy.changed": "The logging settings changed: saving, retention and levels, with no content.",
|
|
710
818
|
"policy.bridge-predates-route": "A running bridge has no logging settings route; it applies them at its next start.",
|
|
711
819
|
"policy.push-failed": "A running bridge did not take the logging settings after retries; its next start resends them.",
|
|
712
820
|
"prune.failed": "Removing expired log files failed; the next sweep retries.",
|
|
713
821
|
"write.failed": "Appending to the log file failed.",
|
|
714
|
-
"unknown-area": "Code outside the type checker asked for an area that is not listed."
|
|
822
|
+
"unknown-area": "Code outside the type checker asked for an area that is not listed.",
|
|
823
|
+
...THROTTLE_LOG_EVENTS
|
|
715
824
|
}
|
|
716
825
|
}
|
|
717
826
|
});
|
|
@@ -836,7 +945,28 @@ var RUNTIME_LOG_AREAS = defineLogAreas({
|
|
|
836
945
|
"event-loop": {
|
|
837
946
|
description: "This process's event loop. A stall of 10 seconds or more is written at error, so no level hides it.",
|
|
838
947
|
events: {
|
|
839
|
-
stalled:
|
|
948
|
+
stalled: {
|
|
949
|
+
description: "A timer fired late, so every request in that window waited.",
|
|
950
|
+
essential: true,
|
|
951
|
+
minLevel: "error",
|
|
952
|
+
fields: { lagMs: "number", intervalMs: "number" }
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
process: {
|
|
957
|
+
description: "Failures of a whole process that nothing in it handled.",
|
|
958
|
+
events: {
|
|
959
|
+
"rejection.unhandled": {
|
|
960
|
+
description: "A promise rejection reached the fatal rejection guard, which keeps the process running.",
|
|
961
|
+
essential: true,
|
|
962
|
+
fields: { kind: "label", ...ESSENTIAL_ERROR_FIELDS }
|
|
963
|
+
},
|
|
964
|
+
"uncaught-exception": {
|
|
965
|
+
description: "An exception reached the top of the backend, which is about to die with it. `origin` says whether it was thrown or a rejected top-level await.",
|
|
966
|
+
essential: true,
|
|
967
|
+
fields: { origin: "label", ...ESSENTIAL_ERROR_FIELDS }
|
|
968
|
+
},
|
|
969
|
+
...THROTTLE_LOG_EVENTS
|
|
840
970
|
}
|
|
841
971
|
}
|
|
842
972
|
});
|
|
@@ -1074,21 +1204,43 @@ var STORAGE_LOG_AREAS = defineLogAreas({
|
|
|
1074
1204
|
description: "The SQLite-backed stores, their snapshots and imports from older formats.",
|
|
1075
1205
|
events: {
|
|
1076
1206
|
"usage.environment-label-failed": "Usage labels could not be retained for a removed environment; deletion continues.",
|
|
1077
|
-
"
|
|
1207
|
+
"migration.failed": {
|
|
1208
|
+
description: "The database could not be brought to this build's schema, so it did not open; `step` says whether the safety copy or the migration itself failed.",
|
|
1209
|
+
essential: true,
|
|
1210
|
+
fields: {
|
|
1211
|
+
fromVersion: "number",
|
|
1212
|
+
toVersion: "number",
|
|
1213
|
+
step: "label",
|
|
1214
|
+
...ESSENTIAL_ERROR_FIELDS
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
"snapshot.integrity-failed": {
|
|
1218
|
+
description: "A database snapshot failed its integrity check and was discarded.",
|
|
1219
|
+
essential: true,
|
|
1220
|
+
fields: {}
|
|
1221
|
+
},
|
|
1078
1222
|
"snapshot.skipped-low-disk": "The hourly database snapshot was skipped because the disk lacks room; `retryAt` says when it tries again.",
|
|
1079
|
-
"snapshot.failed":
|
|
1223
|
+
"snapshot.failed": {
|
|
1224
|
+
description: "The hourly database snapshot failed; `retryAt` says when it tries again, if known.",
|
|
1225
|
+
essential: true,
|
|
1226
|
+
fields: { retryAt: "label", ...ESSENTIAL_ERROR_FIELDS }
|
|
1227
|
+
},
|
|
1080
1228
|
"listener.attention-failed": "An environment attention listener threw; the committed mutation stands.",
|
|
1081
1229
|
"listener.change-failed": "A resource change listener threw; the committed mutation stands.",
|
|
1082
1230
|
"kanban.image-cleanup-failed": "An orphaned Kanban image could not be removed after its retries; it is safe to remove later.",
|
|
1083
1231
|
"nodes.entries-dropped": "Unreadable node registry entries were ignored.",
|
|
1084
1232
|
"preview-identity.reminted": "The data directory moved or was copied, so previews get a new backend identity.",
|
|
1233
|
+
"preview-settings.invalid": "Invalid preview settings disabled transport and relay.",
|
|
1085
1234
|
"machine-profile.invalid": "The stored machine profile was invalid and the default was restored.",
|
|
1086
1235
|
"permission-rules.cleanup-failed": "A deleted project's permission rules could not be removed.",
|
|
1087
1236
|
"retired.turn-cleanup-pending": "Cleanup of a retired Looped Review turn did not finish and stays pending.",
|
|
1088
1237
|
"handoffs.prune-failed": "Pruning agent handoffs that nothing references failed; a later prune retries.",
|
|
1089
1238
|
"desktop-connections.malformed": "Stored desktop connection settings were malformed, so the local connection is used.",
|
|
1090
1239
|
"legacy-json.moved": "JSON store files written after the SQLite migration were archived, not imported.",
|
|
1091
|
-
"legacy-json.archive-failed": "Imported JSON store files could not be archived."
|
|
1240
|
+
"legacy-json.archive-failed": "Imported JSON store files could not be archived.",
|
|
1241
|
+
"lease.heartbeat-failed": "A held lease's heartbeat failed, which shortens the lease; the next one retries.",
|
|
1242
|
+
"scrub.checkpoint-failed": "Deleted content could not be scrubbed from the WAL because the truncating checkpoint failed or was blocked; the next checkpoint retries.",
|
|
1243
|
+
...THROTTLE_LOG_EVENTS
|
|
1092
1244
|
}
|
|
1093
1245
|
}
|
|
1094
1246
|
});
|
|
@@ -1196,8 +1348,10 @@ var COORDINATOR_LOG_AREAS = defineLogAreas({
|
|
|
1196
1348
|
"remote-worker.settle-failed": "A remote worker could not be settled.",
|
|
1197
1349
|
"checkout.merge-followed": "After an environment's PR merged, the project checkout was fast-forwarded, or `outcome` says why not.",
|
|
1198
1350
|
"checkout.merge-follow-failed": "Fast-forwarding the project checkout failed, after an environment's PR merged or before mail woke the main coordinator.",
|
|
1199
|
-
"checkout.mail-follow": "Before mail woke the main coordinator, the project checkout was fast-forwarded, or `outcome` says why not (`timed-out`, `failed`).",
|
|
1200
|
-
"checkout.mail-follow-failed": "Before mail woke the main coordinator, checking whether to fast-forward the project checkout failed; the mail was delivered anyway."
|
|
1351
|
+
"checkout.mail-follow": "Before mail woke the main coordinator, the project checkout was fast-forwarded (`fast-forwarded-fetched` when the fetch was slow or failed and the upstream commit already fetched was merged), or `outcome` says why not (`timed-out`, `failed`).",
|
|
1352
|
+
"checkout.mail-follow-failed": "Before mail woke the main coordinator, checking whether to fast-forward the project checkout failed; the mail was delivered anyway.",
|
|
1353
|
+
"checkout.message-check": "Before a typed message to the main coordinator, the backend answered whether to fast-forward the project checkout: `outcome` (`offer`, `fast-forwarded`, `turn-running`, `not-behind`, `blocked`, `no-status`), `fetch` (`fetched`, `failed`, `timed-out`, `skipped`) and `durationMs`.",
|
|
1354
|
+
"checkout.message-check-failed": "Before a typed message to the main coordinator, fast-forwarding to the upstream commit already fetched failed after a slow or failed fetch; the message was sent anyway."
|
|
1201
1355
|
}
|
|
1202
1356
|
}
|
|
1203
1357
|
});
|
|
@@ -1300,7 +1454,27 @@ var DOCKER_LOG_AREAS = defineLogAreas({
|
|
|
1300
1454
|
"recovery.clear-terminals-failed": "Terminal sessions could not be cleared after a recovery restore.",
|
|
1301
1455
|
"github-ranges.seed-not-copied": "The GitHub ranges seed could not be copied into a container, so its firewall fetches them.",
|
|
1302
1456
|
"availability.probe-failed": "Docker is not available; written when the diagnostic changes. Fixed-shape metadata only: messages can hold daemon endpoints.",
|
|
1303
|
-
"start.port-collision-retrying": "An automatic host port collided on start, so it is retried once with fresh ports."
|
|
1457
|
+
"start.port-collision-retrying": "An automatic host port collided on start, so it is retried once with fresh ports.",
|
|
1458
|
+
"writer-lease.lost": {
|
|
1459
|
+
description: "This backend lost the registry writer lease, for the fixed `reason` given. Schedules stop and container changes are refused until it restarts.",
|
|
1460
|
+
essential: true,
|
|
1461
|
+
fields: { reason: "label" }
|
|
1462
|
+
},
|
|
1463
|
+
"writer-lease.regained": {
|
|
1464
|
+
description: "This backend took the registry writer lease over from a holder that stopped refreshing it (it crashed, was killed or stalled), `staleForMs` after its last refresh. The counterpart of that holder's `writer-lease.lost` with reason `reclaimed`; a lease left by a clean shutdown is acquired silently.",
|
|
1465
|
+
essential: true,
|
|
1466
|
+
fields: { staleForMs: "number" }
|
|
1467
|
+
},
|
|
1468
|
+
"writer-lease.not-acquired": {
|
|
1469
|
+
description: "This backend started without the registry writer lease, for the fixed `reason` given. A second backend on one data directory is normal: it serves reads, runs no schedules and refuses container changes.",
|
|
1470
|
+
essential: true,
|
|
1471
|
+
fields: { reason: "label" }
|
|
1472
|
+
},
|
|
1473
|
+
"bridge.launched": {
|
|
1474
|
+
description: "A bridge process was launched in a container, for the first time there or as a relaunch; `provider` names it. A relaunch keeps the run before it in the previous log.",
|
|
1475
|
+
essential: true,
|
|
1476
|
+
fields: { provider: "label", containerPort: "number" }
|
|
1477
|
+
}
|
|
1304
1478
|
}
|
|
1305
1479
|
},
|
|
1306
1480
|
"docker.reachability": {
|
|
@@ -2008,6 +2182,146 @@ var LOG_VOCABULARY = {
|
|
|
2008
2182
|
...WEB_SYNC_LOG_AREAS
|
|
2009
2183
|
};
|
|
2010
2184
|
|
|
2185
|
+
// ../protocol/src/log-essential-labels.ts
|
|
2186
|
+
var ERROR_NAMES = new Set([
|
|
2187
|
+
"Error",
|
|
2188
|
+
"TypeError",
|
|
2189
|
+
"RangeError",
|
|
2190
|
+
"ReferenceError",
|
|
2191
|
+
"SyntaxError",
|
|
2192
|
+
"URIError",
|
|
2193
|
+
"EvalError",
|
|
2194
|
+
"AggregateError",
|
|
2195
|
+
"AbortError",
|
|
2196
|
+
"TimeoutError",
|
|
2197
|
+
"SystemError"
|
|
2198
|
+
]);
|
|
2199
|
+
var ERROR_CODES = new Set([
|
|
2200
|
+
"EACCES",
|
|
2201
|
+
"EADDRINUSE",
|
|
2202
|
+
"EADDRNOTAVAIL",
|
|
2203
|
+
"EAGAIN",
|
|
2204
|
+
"EBADF",
|
|
2205
|
+
"EBUSY",
|
|
2206
|
+
"ECANCELED",
|
|
2207
|
+
"ECONNABORTED",
|
|
2208
|
+
"ECONNREFUSED",
|
|
2209
|
+
"ECONNRESET",
|
|
2210
|
+
"EEXIST",
|
|
2211
|
+
"EHOSTUNREACH",
|
|
2212
|
+
"EINTR",
|
|
2213
|
+
"EINVAL",
|
|
2214
|
+
"EIO",
|
|
2215
|
+
"EISDIR",
|
|
2216
|
+
"EMFILE",
|
|
2217
|
+
"ENETUNREACH",
|
|
2218
|
+
"ENFILE",
|
|
2219
|
+
"ENOENT",
|
|
2220
|
+
"ENOMEM",
|
|
2221
|
+
"ENOSPC",
|
|
2222
|
+
"ENOSYS",
|
|
2223
|
+
"ENOTDIR",
|
|
2224
|
+
"ENOTEMPTY",
|
|
2225
|
+
"ENOTFOUND",
|
|
2226
|
+
"EPERM",
|
|
2227
|
+
"EPIPE",
|
|
2228
|
+
"EROFS",
|
|
2229
|
+
"ETIMEDOUT",
|
|
2230
|
+
"EXDEV",
|
|
2231
|
+
"SQLITE_BUSY",
|
|
2232
|
+
"SQLITE_CORRUPT",
|
|
2233
|
+
"SQLITE_FULL",
|
|
2234
|
+
"SQLITE_IOERR",
|
|
2235
|
+
"SQLITE_NOTADB",
|
|
2236
|
+
"SQLITE_READONLY",
|
|
2237
|
+
"ERR_CANCELED",
|
|
2238
|
+
"ERR_STREAM_DESTROYED"
|
|
2239
|
+
]);
|
|
2240
|
+
var SYSCALLS = new Set([
|
|
2241
|
+
"open",
|
|
2242
|
+
"read",
|
|
2243
|
+
"write",
|
|
2244
|
+
"stat",
|
|
2245
|
+
"lstat",
|
|
2246
|
+
"mkdir",
|
|
2247
|
+
"rmdir",
|
|
2248
|
+
"readdir",
|
|
2249
|
+
"rename",
|
|
2250
|
+
"unlink",
|
|
2251
|
+
"fsync",
|
|
2252
|
+
"fdatasync",
|
|
2253
|
+
"close",
|
|
2254
|
+
"access",
|
|
2255
|
+
"chmod",
|
|
2256
|
+
"copyfile",
|
|
2257
|
+
"connect",
|
|
2258
|
+
"listen",
|
|
2259
|
+
"bind",
|
|
2260
|
+
"spawn",
|
|
2261
|
+
"kill",
|
|
2262
|
+
"getaddrinfo"
|
|
2263
|
+
]);
|
|
2264
|
+
var SIGNALS = new Set([
|
|
2265
|
+
"SIGABRT",
|
|
2266
|
+
"SIGALRM",
|
|
2267
|
+
"SIGBUS",
|
|
2268
|
+
"SIGCHLD",
|
|
2269
|
+
"SIGCONT",
|
|
2270
|
+
"SIGFPE",
|
|
2271
|
+
"SIGHUP",
|
|
2272
|
+
"SIGILL",
|
|
2273
|
+
"SIGINT",
|
|
2274
|
+
"SIGKILL",
|
|
2275
|
+
"SIGPIPE",
|
|
2276
|
+
"SIGQUIT",
|
|
2277
|
+
"SIGSEGV",
|
|
2278
|
+
"SIGSTOP",
|
|
2279
|
+
"SIGTERM",
|
|
2280
|
+
"SIGTRAP",
|
|
2281
|
+
"SIGTSTP",
|
|
2282
|
+
"SIGTTIN",
|
|
2283
|
+
"SIGTTOU",
|
|
2284
|
+
"SIGUSR1",
|
|
2285
|
+
"SIGUSR2",
|
|
2286
|
+
"SIGWINCH",
|
|
2287
|
+
"SIGXCPU",
|
|
2288
|
+
"SIGXFSZ"
|
|
2289
|
+
]);
|
|
2290
|
+
var PROVIDERS = new Set(["claude", "codex", "opencode", "cursor", "grok", "acp", "pi"]);
|
|
2291
|
+
var UUID = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
|
|
2292
|
+
var SOURCE = new RegExp(`^(?:claude|codex|opencode|cursor|grok|acp|pi):${UUID}$`, "i");
|
|
2293
|
+
|
|
2294
|
+
// ../protocol/src/log-essential.ts
|
|
2295
|
+
var vocabulary = LOG_VOCABULARY;
|
|
2296
|
+
var UNDECLARED_ERROR_LABELS = new Set([
|
|
2297
|
+
"site",
|
|
2298
|
+
"kind",
|
|
2299
|
+
"step",
|
|
2300
|
+
"reason",
|
|
2301
|
+
"signal",
|
|
2302
|
+
"code"
|
|
2303
|
+
]);
|
|
2304
|
+
function eventSpec(area, event) {
|
|
2305
|
+
const spec = Object.hasOwn(vocabulary, area) ? vocabulary[area] : undefined;
|
|
2306
|
+
if (!spec || !Object.hasOwn(spec.events, event))
|
|
2307
|
+
return null;
|
|
2308
|
+
const definition = spec.events[event];
|
|
2309
|
+
return typeof definition === "object" && definition.essential ? definition : null;
|
|
2310
|
+
}
|
|
2311
|
+
function declaredEssential(area, event, level) {
|
|
2312
|
+
const spec = eventSpec(area, event);
|
|
2313
|
+
return spec && (spec.minLevel !== "error" || level === "error") ? spec : null;
|
|
2314
|
+
}
|
|
2315
|
+
function hasEssentialEvents(area) {
|
|
2316
|
+
const spec = Object.hasOwn(vocabulary, area) ? vocabulary[area] : undefined;
|
|
2317
|
+
return spec !== undefined && Object.values(spec.events).some((event) => typeof event === "object" && event.essential);
|
|
2318
|
+
}
|
|
2319
|
+
function isEssentialEntry(area, event, level) {
|
|
2320
|
+
if (area === "logging" && event === "essential.write-failed")
|
|
2321
|
+
return false;
|
|
2322
|
+
return level === "error" || declaredEssential(area, event, level) !== null;
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2011
2325
|
// ../protocol/src/logger.ts
|
|
2012
2326
|
var LOG_LEVELS = ["error", "warn", "info", "debug", "trace"];
|
|
2013
2327
|
var MAX_FIELD_CHARS = 2048;
|
|
@@ -2052,7 +2366,9 @@ var DEFAULT_CONFIG = {
|
|
|
2052
2366
|
level: "info",
|
|
2053
2367
|
areaLevels: {},
|
|
2054
2368
|
format: "text",
|
|
2055
|
-
sink: consoleSink
|
|
2369
|
+
sink: consoleSink,
|
|
2370
|
+
essentialSink: null,
|
|
2371
|
+
relayEssential: false
|
|
2056
2372
|
};
|
|
2057
2373
|
var config = DEFAULT_CONFIG;
|
|
2058
2374
|
var generation = 0;
|
|
@@ -2163,17 +2479,38 @@ function renderText(record) {
|
|
|
2163
2479
|
function renderJson(record) {
|
|
2164
2480
|
return escapeLogLine(JSON.stringify(record));
|
|
2165
2481
|
}
|
|
2482
|
+
function offerEssential(record) {
|
|
2483
|
+
if (!config.essentialSink || !isEssentialEntry(record.area, record.event, record.level))
|
|
2484
|
+
return;
|
|
2485
|
+
try {
|
|
2486
|
+
config.essentialSink(record);
|
|
2487
|
+
} catch {}
|
|
2488
|
+
}
|
|
2166
2489
|
function deliver(record) {
|
|
2490
|
+
let delivered = true;
|
|
2167
2491
|
try {
|
|
2168
2492
|
config.sink({
|
|
2169
2493
|
method: OUTPUT_METHOD[record.level],
|
|
2170
2494
|
line: config.format === "json" ? renderJson(record) : renderText(record),
|
|
2171
2495
|
record
|
|
2172
2496
|
});
|
|
2173
|
-
return true;
|
|
2174
2497
|
} catch {
|
|
2175
|
-
|
|
2498
|
+
delivered = false;
|
|
2499
|
+
}
|
|
2500
|
+
offerEssential(record);
|
|
2501
|
+
return delivered;
|
|
2502
|
+
}
|
|
2503
|
+
function deliverEssentialOnly(record) {
|
|
2504
|
+
if (config.essentialSink) {
|
|
2505
|
+
offerEssential(record);
|
|
2506
|
+
return;
|
|
2176
2507
|
}
|
|
2508
|
+
if (!config.relayEssential)
|
|
2509
|
+
return;
|
|
2510
|
+
const marked = { ...record, essentialOnly: true };
|
|
2511
|
+
try {
|
|
2512
|
+
config.sink({ method: OUTPUT_METHOD[record.level], line: renderJson(marked), record: marked });
|
|
2513
|
+
} catch {}
|
|
2177
2514
|
}
|
|
2178
2515
|
function buildRecord(level, area, event, fields) {
|
|
2179
2516
|
const clean = fields ? sanitizeFields(fields, areaSpec(area)?.maxStringChars ?? MAX_FIELD_CHARS) : undefined;
|
|
@@ -2338,12 +2675,17 @@ function deliverEvent(level, area, event, fields) {
|
|
|
2338
2675
|
return deliver(buildRecord(level, area, event, fields));
|
|
2339
2676
|
}
|
|
2340
2677
|
function tryWriteLog(level, area, event, fields) {
|
|
2341
|
-
if (LEVEL_RANK[level] > thresholdRank(area))
|
|
2678
|
+
if (LEVEL_RANK[level] > thresholdRank(area)) {
|
|
2679
|
+
if (isEssentialEntry(area, event, level)) {
|
|
2680
|
+
deliverEssentialOnly(buildRecord(level, area, event, resolveFields(fields)));
|
|
2681
|
+
}
|
|
2342
2682
|
return false;
|
|
2683
|
+
}
|
|
2343
2684
|
return deliverEvent(level, area, event, resolveFields(fields));
|
|
2344
2685
|
}
|
|
2345
2686
|
function createLogger(area) {
|
|
2346
2687
|
const spec = areaSpec(area);
|
|
2688
|
+
const mayHoldEssential = hasEssentialEvents(area);
|
|
2347
2689
|
let seenGeneration = -1;
|
|
2348
2690
|
let rank = 0;
|
|
2349
2691
|
const enabled = (level) => {
|
|
@@ -2356,9 +2698,16 @@ function createLogger(area) {
|
|
|
2356
2698
|
const writeResolved = (level, event, resolved) => {
|
|
2357
2699
|
deliverEvent(level, area, event, resolved);
|
|
2358
2700
|
};
|
|
2701
|
+
const writeFiltered = (level, event, fields) => {
|
|
2702
|
+
if (!mayHoldEssential || !isEssentialEntry(area, event, level))
|
|
2703
|
+
return;
|
|
2704
|
+
deliverEssentialOnly(buildRecord(level, area, event, resolveFields(fields)));
|
|
2705
|
+
};
|
|
2359
2706
|
const write = (level, event, fields) => {
|
|
2360
|
-
if (!enabled(level))
|
|
2707
|
+
if (!enabled(level)) {
|
|
2708
|
+
writeFiltered(level, event, fields);
|
|
2361
2709
|
return;
|
|
2710
|
+
}
|
|
2362
2711
|
writeResolved(level, event, resolveFields(fields));
|
|
2363
2712
|
};
|
|
2364
2713
|
return {
|
|
@@ -2369,8 +2718,10 @@ function createLogger(area) {
|
|
|
2369
2718
|
trace: (event, fields) => write("trace", event, fields),
|
|
2370
2719
|
throttled: (level, event, options) => {
|
|
2371
2720
|
syncThrottleLevels();
|
|
2372
|
-
if (!enabled(level))
|
|
2721
|
+
if (!enabled(level)) {
|
|
2722
|
+
writeFiltered(level, event, options.fields);
|
|
2373
2723
|
return;
|
|
2724
|
+
}
|
|
2374
2725
|
if (!spec || !Object.hasOwn(spec.events, event) || event.startsWith("throttle.") || !Object.hasOwn(spec.events, "throttle.recovered")) {
|
|
2375
2726
|
deliver(buildRecord(level, spec ? area : "logging", spec ? "invalid-event" : "unknown-area", undefined));
|
|
2376
2727
|
return;
|
|
@@ -10596,7 +10947,7 @@ var PERMISSION_RULE_PROVIDERS = [
|
|
|
10596
10947
|
"grok",
|
|
10597
10948
|
"pi"
|
|
10598
10949
|
];
|
|
10599
|
-
var
|
|
10950
|
+
var PROVIDERS2 = new Set(PERMISSION_RULE_PROVIDERS);
|
|
10600
10951
|
var KINDS = new Set(PERMISSION_RULE_KINDS);
|
|
10601
10952
|
var SCOPES = new Set(PERMISSION_RULE_SCOPES);
|
|
10602
10953
|
var UNQUOTED_REFUSED = new Set([
|
|
@@ -10855,7 +11206,7 @@ var AGENT_INTERACTION_AUTHORIZATION_KINDS = [
|
|
|
10855
11206
|
];
|
|
10856
11207
|
var INPUT_KINDS = new Set(AGENT_INTERACTION_INPUT_KINDS);
|
|
10857
11208
|
var AUTHORIZATION_KINDS = new Set(AGENT_INTERACTION_AUTHORIZATION_KINDS);
|
|
10858
|
-
var
|
|
11209
|
+
var PROVIDERS3 = new Set(AGENT_INTERACTION_PROVIDERS);
|
|
10859
11210
|
var KINDS2 = new Set(AGENT_INTERACTION_KINDS);
|
|
10860
11211
|
var ORIGINS = new Set(AGENT_INTERACTION_ORIGINS);
|
|
10861
11212
|
var STATES = new Set(AGENT_INTERACTION_STATES);
|
|
@@ -11042,6 +11393,13 @@ var NATIVE_AGENT_USER_MCP_SERVERS_MAX = 32;
|
|
|
11042
11393
|
function isNativeAgentUserMcpServerList(value) {
|
|
11043
11394
|
return Array.isArray(value) && value.length <= NATIVE_AGENT_USER_MCP_SERVERS_MAX && value.every(isNativeAgentMcpServerName) && new Set(value).size === value.length;
|
|
11044
11395
|
}
|
|
11396
|
+
function nativeAgentUserMcpGrant(policy) {
|
|
11397
|
+
const listed = policy?.capabilityPolicy?.userMcpServers;
|
|
11398
|
+
if (!isNativeAgentUserMcpServerList(listed))
|
|
11399
|
+
return;
|
|
11400
|
+
const denied = new Set(nativeAgentDeniedCapabilities(policy).map(nativeAgentMcpServer).filter((name) => name !== undefined));
|
|
11401
|
+
return listed.filter((name) => !denied.has(name));
|
|
11402
|
+
}
|
|
11045
11403
|
var NATIVE_AGENT_USER_MCP_SELECTION = Object.freeze({
|
|
11046
11404
|
claude: Object.freeze({ ordinary: true, readOnly: true }),
|
|
11047
11405
|
codex: Object.freeze({ ordinary: true, readOnly: true }),
|
|
@@ -11391,6 +11749,8 @@ function startParentWatchdog(options) {
|
|
|
11391
11749
|
var AGENT_MAIL_MAX_BODY_BYTES = 32 * 1024;
|
|
11392
11750
|
var AGENT_MAIL_MAX_STORE_BYTES = 32 * 1024 * 1024;
|
|
11393
11751
|
var AGENT_MAIL_DEFAULT_RETENTION_DAYS = 14;
|
|
11752
|
+
var AGENT_MAIL_MAX_ATTACHMENT_BYTES = 8 * 1024 * 1024;
|
|
11753
|
+
var AGENT_MAIL_MAX_TOTAL_ATTACHMENT_BYTES = 32 * 1024 * 1024;
|
|
11394
11754
|
var AGENT_MAIL_DEFAULT_AUTONOMOUS_WAKE_BUDGET = 16;
|
|
11395
11755
|
var AGENT_MAIL_DEFAULT_HOURLY_WAKE_LIMIT = 40;
|
|
11396
11756
|
var ORKESTRATOR_MCP_SERVER_NAME = "orkestrator";
|
|
@@ -11485,7 +11845,7 @@ function truncateErrorUtf8(value, maximumBytes) {
|
|
|
11485
11845
|
}
|
|
11486
11846
|
function normalizedBillingError(text, status, provider) {
|
|
11487
11847
|
const grok = provider === "grok" || /\bgrok build\b/i.test(text);
|
|
11488
|
-
const label = grok ? "Grok Build" :
|
|
11848
|
+
const label = grok ? "Grok Build" : "The agent";
|
|
11489
11849
|
if (GROK_USAGE_EXHAUSTED.test(text) || USAGE_EXHAUSTED.test(text)) {
|
|
11490
11850
|
return grok ? GROK_USAGE_EXHAUSTED_MESSAGE : `${label} usage balance is exhausted. Add usage credits, then retry this message.`;
|
|
11491
11851
|
}
|
|
@@ -11600,6 +11960,51 @@ function formatAcpRpcError(error, provider) {
|
|
|
11600
11960
|
return primary ?? detail ?? "ACP request failed";
|
|
11601
11961
|
}
|
|
11602
11962
|
|
|
11963
|
+
// ../../bridges/acp-bridge/src/acp-jsonl-framer.ts
|
|
11964
|
+
class JsonlLineFramer {
|
|
11965
|
+
#maxLineBytes;
|
|
11966
|
+
#held = [];
|
|
11967
|
+
#heldBytes = 0;
|
|
11968
|
+
constructor(maxLineBytes) {
|
|
11969
|
+
this.#maxLineBytes = maxLineBytes;
|
|
11970
|
+
}
|
|
11971
|
+
accept(chunk, onLine) {
|
|
11972
|
+
let start = 0;
|
|
11973
|
+
let newline = chunk.indexOf(10, start);
|
|
11974
|
+
while (newline >= 0) {
|
|
11975
|
+
const lineBytes = this.#heldBytes + newline - start;
|
|
11976
|
+
if (lineBytes > this.#maxLineBytes) {
|
|
11977
|
+
this.discard();
|
|
11978
|
+
return "oversized";
|
|
11979
|
+
}
|
|
11980
|
+
onLine(this.#takeLine(chunk.subarray(start, newline), lineBytes));
|
|
11981
|
+
start = newline + 1;
|
|
11982
|
+
newline = chunk.indexOf(10, start);
|
|
11983
|
+
}
|
|
11984
|
+
if (start < chunk.length) {
|
|
11985
|
+
this.#held.push(start === 0 ? chunk : chunk.subarray(start));
|
|
11986
|
+
this.#heldBytes += chunk.length - start;
|
|
11987
|
+
}
|
|
11988
|
+
if (this.#heldBytes > this.#maxLineBytes) {
|
|
11989
|
+
this.discard();
|
|
11990
|
+
return "unterminated-oversized";
|
|
11991
|
+
}
|
|
11992
|
+
return;
|
|
11993
|
+
}
|
|
11994
|
+
discard() {
|
|
11995
|
+
this.#held = [];
|
|
11996
|
+
this.#heldBytes = 0;
|
|
11997
|
+
}
|
|
11998
|
+
#takeLine(tail, lineBytes) {
|
|
11999
|
+
if (this.#held.length === 0)
|
|
12000
|
+
return tail.toString("utf8");
|
|
12001
|
+
this.#held.push(tail);
|
|
12002
|
+
const line = Buffer.concat(this.#held, lineBytes).toString("utf8");
|
|
12003
|
+
this.discard();
|
|
12004
|
+
return line;
|
|
12005
|
+
}
|
|
12006
|
+
}
|
|
12007
|
+
|
|
11603
12008
|
// ../../bridges/acp-bridge/src/acp-credentials.ts
|
|
11604
12009
|
import { promises as fs } from "node:fs";
|
|
11605
12010
|
import { homedir } from "node:os";
|
|
@@ -11702,6 +12107,9 @@ function effectiveExecutionPolicy(requested, env = process.env) {
|
|
|
11702
12107
|
return requested;
|
|
11703
12108
|
return coordinatorProcessPolicy();
|
|
11704
12109
|
}
|
|
12110
|
+
function liveExecutionPolicy(state) {
|
|
12111
|
+
return state.policyPending ? undefined : state.policy;
|
|
12112
|
+
}
|
|
11705
12113
|
function effectiveTurnExecutionPolicy(input) {
|
|
11706
12114
|
return input.readOnly ? coordinatorProcessPolicy() : effectiveExecutionPolicy(input.policy);
|
|
11707
12115
|
}
|
|
@@ -12633,6 +13041,7 @@ function grokMcpConfigStatus(loaded, current) {
|
|
|
12633
13041
|
}
|
|
12634
13042
|
|
|
12635
13043
|
// ../../bridges/acp-bridge/src/acp-context.ts
|
|
13044
|
+
var log3 = createLogger("bridge.acp");
|
|
12636
13045
|
var CURSOR_TODO_STATUSES = ["pending", "in_progress", "completed", "cancelled"];
|
|
12637
13046
|
var providerConfig = loadAcpProviderConfig();
|
|
12638
13047
|
var provider = providerConfig.id;
|
|
@@ -12659,8 +13068,6 @@ var clientSessionKeys = new Map;
|
|
|
12659
13068
|
var sessionCreations = new Map;
|
|
12660
13069
|
var sessionResumes = new Map;
|
|
12661
13070
|
var anonymousSessionCreations = 0;
|
|
12662
|
-
var activeCursorToolReplays = 0;
|
|
12663
|
-
var cursorToolReplayProcesses = new Set;
|
|
12664
13071
|
var sessionListProbe = null;
|
|
12665
13072
|
var persistenceTail = Promise.resolve();
|
|
12666
13073
|
var persistenceScheduled = false;
|
|
@@ -12745,10 +13152,6 @@ var MAX_MODEL_ID_BYTES = 1024;
|
|
|
12745
13152
|
var MAX_TOOL_NAME_BYTES = 256;
|
|
12746
13153
|
var MAX_TOOL_TITLE_BYTES = 4 * 1024;
|
|
12747
13154
|
var MAX_TOOL_PATH_BYTES = 16 * 1024;
|
|
12748
|
-
var MAX_REPLAY_RECONCILE_TOOLS = 4096;
|
|
12749
|
-
var MAX_CURSOR_TOOL_REPLAY_PROCESSES = 8;
|
|
12750
|
-
var CURSOR_TOOL_REPLAY_DELAY_MS = 500;
|
|
12751
|
-
var MAX_LIVE_CURSOR_TOOL_REPLAYS_PER_TURN = parseBoundedInteger(process.env.ACP_MAX_LIVE_CURSOR_TOOL_REPLAYS, 8, 0, 64);
|
|
12752
13155
|
var MAX_DIFF_EDIT_DISTANCE = 512;
|
|
12753
13156
|
var DIFF_CONTEXT_LINES = 3;
|
|
12754
13157
|
var MAX_SESSIONS = parseBoundedInteger(process.env.ACP_MAX_SESSIONS, 256, 1, 256);
|
|
@@ -12807,7 +13210,7 @@ class AcpProcess {
|
|
|
12807
13210
|
#closed = false;
|
|
12808
13211
|
#readOnlyProfile;
|
|
12809
13212
|
#terminationOutcome;
|
|
12810
|
-
#
|
|
13213
|
+
#stdoutFramer = new JsonlLineFramer(MAX_LINE_BYTES);
|
|
12811
13214
|
onUpdate = unattachedUpdate;
|
|
12812
13215
|
earlyCommandsUpdate = null;
|
|
12813
13216
|
onVendor = () => {
|
|
@@ -12877,6 +13280,13 @@ class AcpProcess {
|
|
|
12877
13280
|
}
|
|
12878
13281
|
this.child.once("error", (error) => this.#close(error));
|
|
12879
13282
|
this.child.once("exit", (code, signal) => {
|
|
13283
|
+
log3.warn("agent.exited", {
|
|
13284
|
+
provider,
|
|
13285
|
+
pid: this.child.pid ?? null,
|
|
13286
|
+
code,
|
|
13287
|
+
signal,
|
|
13288
|
+
requested: this.#terminationOutcome === "resolved"
|
|
13289
|
+
});
|
|
12880
13290
|
this.#close(new Error(`${provider} ACP process exited (code ${code ?? "null"}, signal ${signal ?? "null"})`), this.#terminationOutcome ?? (code === 0 ? "resolved" : "rejected"));
|
|
12881
13291
|
});
|
|
12882
13292
|
}
|
|
@@ -13010,24 +13420,11 @@ class AcpProcess {
|
|
|
13010
13420
|
#acceptChunk(chunk) {
|
|
13011
13421
|
if (this.#closed)
|
|
13012
13422
|
return;
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
if (newline > MAX_LINE_BYTES) {
|
|
13019
|
-
this.#close(new Error(`${provider} ACP emitted an oversized JSONL frame`));
|
|
13020
|
-
this.#terminateChild("rejected");
|
|
13021
|
-
return;
|
|
13022
|
-
}
|
|
13023
|
-
const line = this.#stdoutBuffer.subarray(0, newline).toString("utf8");
|
|
13024
|
-
this.#stdoutBuffer = this.#stdoutBuffer.subarray(newline + 1);
|
|
13025
|
-
this.#acceptLine(line);
|
|
13026
|
-
}
|
|
13027
|
-
if (this.#stdoutBuffer.length > MAX_LINE_BYTES) {
|
|
13028
|
-
this.#close(new Error(`${provider} ACP emitted an unterminated oversized JSONL frame`));
|
|
13029
|
-
this.#terminateChild("rejected");
|
|
13030
|
-
}
|
|
13423
|
+
const failure = this.#stdoutFramer.accept(chunk, (line) => this.#acceptLine(line));
|
|
13424
|
+
if (!failure)
|
|
13425
|
+
return;
|
|
13426
|
+
this.#close(new Error(failure === "oversized" ? `${provider} ACP emitted an oversized JSONL frame` : `${provider} ACP emitted an unterminated oversized JSONL frame`));
|
|
13427
|
+
this.#terminateChild("rejected");
|
|
13031
13428
|
}
|
|
13032
13429
|
#acceptLine(line) {
|
|
13033
13430
|
if (!line.trim())
|
|
@@ -13328,9 +13725,6 @@ function setSessionListProbe(value) {
|
|
|
13328
13725
|
function adjustAnonymousSessionCreations(delta) {
|
|
13329
13726
|
anonymousSessionCreations += delta;
|
|
13330
13727
|
}
|
|
13331
|
-
function adjustActiveCursorToolReplays(delta) {
|
|
13332
|
-
activeCursorToolReplays += delta;
|
|
13333
|
-
}
|
|
13334
13728
|
function setPersistenceScheduled(value) {
|
|
13335
13729
|
persistenceScheduled = value;
|
|
13336
13730
|
}
|
|
@@ -13343,6 +13737,97 @@ function setShuttingDown(value) {
|
|
|
13343
13737
|
function setCatalogProbe(value) {
|
|
13344
13738
|
catalogProbe = value;
|
|
13345
13739
|
}
|
|
13740
|
+
// ../protocol/src/execution-policy-narrowing.ts
|
|
13741
|
+
var APPROVALS_STRICTNESS = {
|
|
13742
|
+
"auto-approve": 0,
|
|
13743
|
+
ask: 1,
|
|
13744
|
+
deny: 2
|
|
13745
|
+
};
|
|
13746
|
+
var SANDBOX_STRICTNESS = {
|
|
13747
|
+
none: 0,
|
|
13748
|
+
container: 1,
|
|
13749
|
+
provider: 2
|
|
13750
|
+
};
|
|
13751
|
+
function networkStrictness(value) {
|
|
13752
|
+
return value === "restricted" ? 1 : 0;
|
|
13753
|
+
}
|
|
13754
|
+
function isSubset(candidate, of) {
|
|
13755
|
+
const allowed = new Set(of);
|
|
13756
|
+
return candidate.every((item) => allowed.has(item));
|
|
13757
|
+
}
|
|
13758
|
+
function rawCapabilityDenials(policy) {
|
|
13759
|
+
return [
|
|
13760
|
+
...policy.capabilityPolicy?.deny ?? [],
|
|
13761
|
+
...policy.capabilityPolicy?.extendedDeny ?? []
|
|
13762
|
+
];
|
|
13763
|
+
}
|
|
13764
|
+
function executionPolicyWidenings(current, next) {
|
|
13765
|
+
if (!current)
|
|
13766
|
+
return [];
|
|
13767
|
+
const widened = [];
|
|
13768
|
+
if (next.id !== current.id)
|
|
13769
|
+
widened.push("id");
|
|
13770
|
+
if (APPROVALS_STRICTNESS[next.approvals] < APPROVALS_STRICTNESS[current.approvals]) {
|
|
13771
|
+
widened.push("approvals");
|
|
13772
|
+
}
|
|
13773
|
+
if (SANDBOX_STRICTNESS[next.sandbox] < SANDBOX_STRICTNESS[current.sandbox]) {
|
|
13774
|
+
widened.push("sandbox");
|
|
13775
|
+
}
|
|
13776
|
+
if (next.projectResources && !current.projectResources)
|
|
13777
|
+
widened.push("projectResources");
|
|
13778
|
+
if (networkStrictness(next.networkAccess) < networkStrictness(current.networkAccess)) {
|
|
13779
|
+
widened.push("networkAccess");
|
|
13780
|
+
}
|
|
13781
|
+
if (networkStrictness(next.containerNetworkAccess) < networkStrictness(current.containerNetworkAccess)) {
|
|
13782
|
+
widened.push("containerNetworkAccess");
|
|
13783
|
+
}
|
|
13784
|
+
const currentAllow = current.toolPolicy?.allow;
|
|
13785
|
+
const nextAllow = next.toolPolicy?.allow;
|
|
13786
|
+
const allowNarrows = currentAllow === undefined ? nextAllow === undefined || nextAllow.length === 0 : nextAllow !== undefined && isSubset(nextAllow, currentAllow);
|
|
13787
|
+
if (!allowNarrows)
|
|
13788
|
+
widened.push("toolPolicy.allow");
|
|
13789
|
+
if (!isSubset(current.toolPolicy?.deny ?? [], next.toolPolicy?.deny ?? [])) {
|
|
13790
|
+
widened.push("toolPolicy.deny");
|
|
13791
|
+
}
|
|
13792
|
+
if (!isSubset(rawCapabilityDenials(current), rawCapabilityDenials(next))) {
|
|
13793
|
+
widened.push("capabilityPolicy.deny");
|
|
13794
|
+
}
|
|
13795
|
+
if (!isSubset(next.capabilityPolicy?.allow ?? [], current.capabilityPolicy?.allow ?? [])) {
|
|
13796
|
+
widened.push("capabilityPolicy.allow");
|
|
13797
|
+
}
|
|
13798
|
+
const currentServers = nativeAgentUserMcpGrant(current);
|
|
13799
|
+
const nextServers = nativeAgentUserMcpGrant(next);
|
|
13800
|
+
if (currentServers !== undefined && (nextServers === undefined || !isSubset(nextServers, currentServers))) {
|
|
13801
|
+
widened.push("capabilityPolicy.userMcpServers");
|
|
13802
|
+
}
|
|
13803
|
+
return widened;
|
|
13804
|
+
}
|
|
13805
|
+
var POLICY_WIDENING_REFUSED_CODE = "policy-widening-refused";
|
|
13806
|
+
function policyWideningRefusal(widened) {
|
|
13807
|
+
return {
|
|
13808
|
+
error: "Execution policy can only be narrowed on a live session; a wider policy applies after the agent bridge restarts.",
|
|
13809
|
+
code: POLICY_WIDENING_REFUSED_CODE,
|
|
13810
|
+
widened
|
|
13811
|
+
};
|
|
13812
|
+
}
|
|
13813
|
+
|
|
13814
|
+
class PolicyWideningRefusedError extends Error {
|
|
13815
|
+
widened;
|
|
13816
|
+
constructor(widened) {
|
|
13817
|
+
super(policyWideningRefusal(widened).error);
|
|
13818
|
+
this.widened = widened;
|
|
13819
|
+
this.name = "PolicyWideningRefusedError";
|
|
13820
|
+
}
|
|
13821
|
+
refusal() {
|
|
13822
|
+
return policyWideningRefusal(this.widened);
|
|
13823
|
+
}
|
|
13824
|
+
}
|
|
13825
|
+
function assertExecutionPolicyNotWidened(current, next) {
|
|
13826
|
+
const widened = executionPolicyWidenings(current, next);
|
|
13827
|
+
if (widened.length > 0)
|
|
13828
|
+
throw new PolicyWideningRefusedError(widened);
|
|
13829
|
+
}
|
|
13830
|
+
|
|
13346
13831
|
// ../protocol/src/web-annotations-errors.ts
|
|
13347
13832
|
var WEB_ANNOTATION_ERROR_CODES = Object.freeze([
|
|
13348
13833
|
"conflict",
|
|
@@ -13606,9 +14091,6 @@ var WEB_ANNOTATION_BLOCKED_REASON_LABELS = Object.freeze({
|
|
|
13606
14091
|
"dispatch-rejected": "Held — the agent rejected this request; retry or cancel"
|
|
13607
14092
|
});
|
|
13608
14093
|
|
|
13609
|
-
// ../../bridges/acp-bridge/src/acp-tools.ts
|
|
13610
|
-
import { createHash as createHash4 } from "node:crypto";
|
|
13611
|
-
|
|
13612
14094
|
// ../protocol/src/node/bridge-transcript-text.ts
|
|
13613
14095
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
13614
14096
|
function sliceUtf8(value, maximumBytes) {
|
|
@@ -13975,7 +14457,7 @@ function boundTranscriptResponse(messages, maximumBytes, options = {}) {
|
|
|
13975
14457
|
}
|
|
13976
14458
|
|
|
13977
14459
|
// ../../bridges/acp-bridge/src/acp-persist-writer.ts
|
|
13978
|
-
var
|
|
14460
|
+
var log4 = createLogger("bridge.acp");
|
|
13979
14461
|
function boundPersistedSnapshot(snapshot) {
|
|
13980
14462
|
const bounded = {
|
|
13981
14463
|
...snapshot,
|
|
@@ -14172,7 +14654,7 @@ function schedulePersist() {
|
|
|
14172
14654
|
await writePersistedState();
|
|
14173
14655
|
});
|
|
14174
14656
|
setPersistenceTail(operation.catch((error) => {
|
|
14175
|
-
|
|
14657
|
+
log4.warn("state.persist-failed", { error: formatLogError(error, { stack: false }) });
|
|
14176
14658
|
}));
|
|
14177
14659
|
}
|
|
14178
14660
|
function persistState() {
|
|
@@ -15048,9 +15530,6 @@ function applyToolCallUpdate(state, update, isInitial) {
|
|
|
15048
15530
|
syncActiveSubagentTool(state, part);
|
|
15049
15531
|
if (!commitToolPartMutation(state, part, source))
|
|
15050
15532
|
return;
|
|
15051
|
-
if (state.historyReplay === false && state.status === "running" && !turnRequiresCompleteOutput(state) && isSettledToolPart(part) && isGenericCursorToolPart(part)) {
|
|
15052
|
-
scheduleCursorToolMetadataReconcile(state);
|
|
15053
|
-
}
|
|
15054
15533
|
return part;
|
|
15055
15534
|
}
|
|
15056
15535
|
function namesAnotherCall(update, part) {
|
|
@@ -15065,303 +15544,9 @@ function continuesAcrossTurns(state, part, isInitial) {
|
|
|
15065
15544
|
}
|
|
15066
15545
|
return !isInitial && !isSettledToolPart(part);
|
|
15067
15546
|
}
|
|
15068
|
-
function collectReplayToolMetadata(collector, update, isInitial) {
|
|
15069
|
-
const id = boundedString2(update.toolCallId, MAX_TOOL_ID_BYTES)?.trim();
|
|
15070
|
-
if (!id)
|
|
15071
|
-
return;
|
|
15072
|
-
let call = collector.byId.get(id);
|
|
15073
|
-
if (!call && isInitial) {
|
|
15074
|
-
call = { id, retainedBytes: 0 };
|
|
15075
|
-
call.retainedBytes = replayToolMetadataBytes(call);
|
|
15076
|
-
while (collector.byId.size >= collector.capacity) {
|
|
15077
|
-
if (!evictOldestReplayTool(collector, id))
|
|
15078
|
-
break;
|
|
15079
|
-
}
|
|
15080
|
-
if (!makeReplayToolRoom(collector, call.retainedBytes, id))
|
|
15081
|
-
return;
|
|
15082
|
-
collector.retainedBytes += call.retainedBytes;
|
|
15083
|
-
collector.byId.set(id, call);
|
|
15084
|
-
}
|
|
15085
|
-
if (!call)
|
|
15086
|
-
return;
|
|
15087
|
-
const candidate = { ...call };
|
|
15088
|
-
if ("title" in update) {
|
|
15089
|
-
candidate.title = boundedNullableString(update.title, MAX_TOOL_TITLE_BYTES);
|
|
15090
|
-
}
|
|
15091
|
-
if ("name" in update) {
|
|
15092
|
-
candidate.toolName = boundedNullableString(update.name, MAX_TOOL_NAME_BYTES);
|
|
15093
|
-
}
|
|
15094
|
-
if ("kind" in update && !candidate.toolName) {
|
|
15095
|
-
candidate.toolName = boundedNullableString(update.kind, MAX_TOOL_NAME_BYTES);
|
|
15096
|
-
}
|
|
15097
|
-
if ("rawInput" in update && isObject3(update.rawInput)) {
|
|
15098
|
-
candidate.toolName ??= boundedString2(update.rawInput._toolName, MAX_TOOL_NAME_BYTES);
|
|
15099
|
-
candidate.toolArgs = boundedToolArguments(update.rawInput);
|
|
15100
|
-
}
|
|
15101
|
-
if ("content" in update) {
|
|
15102
|
-
candidate.contentOutputHash = replayOutputHash(toolCallContentText(update.content));
|
|
15103
|
-
}
|
|
15104
|
-
if ("rawOutput" in update) {
|
|
15105
|
-
const rawOutput = update.rawOutput === null ? undefined : stringifyToolPayload(update.rawOutput);
|
|
15106
|
-
candidate.rawOutputHash = replayOutputHash(rawOutput);
|
|
15107
|
-
}
|
|
15108
|
-
candidate.retainedBytes = replayToolMetadataBytes(candidate);
|
|
15109
|
-
const growth = candidate.retainedBytes - call.retainedBytes;
|
|
15110
|
-
if (growth > 0 && !makeReplayToolRoom(collector, growth, id))
|
|
15111
|
-
return;
|
|
15112
|
-
collector.retainedBytes += growth;
|
|
15113
|
-
Object.assign(call, candidate);
|
|
15114
|
-
}
|
|
15115
|
-
function evictOldestReplayTool(collector, keepId) {
|
|
15116
|
-
for (const [id, call] of collector.byId) {
|
|
15117
|
-
if (id === keepId)
|
|
15118
|
-
continue;
|
|
15119
|
-
collector.byId.delete(id);
|
|
15120
|
-
collector.retainedBytes -= call.retainedBytes;
|
|
15121
|
-
return true;
|
|
15122
|
-
}
|
|
15123
|
-
return false;
|
|
15124
|
-
}
|
|
15125
|
-
function makeReplayToolRoom(collector, bytes, keepId) {
|
|
15126
|
-
while (collector.retainedBytes + bytes > collector.maximumBytes) {
|
|
15127
|
-
if (!evictOldestReplayTool(collector, keepId))
|
|
15128
|
-
break;
|
|
15129
|
-
}
|
|
15130
|
-
return collector.retainedBytes + bytes <= collector.maximumBytes;
|
|
15131
|
-
}
|
|
15132
|
-
function replayOutputHash(value) {
|
|
15133
|
-
return value === undefined ? undefined : createHash4("sha256").update(value).digest("hex");
|
|
15134
|
-
}
|
|
15135
|
-
function replayToolMetadataBytes(call) {
|
|
15136
|
-
return Buffer.byteLength(JSON.stringify({
|
|
15137
|
-
id: call.id,
|
|
15138
|
-
title: call.title,
|
|
15139
|
-
toolName: call.toolName,
|
|
15140
|
-
toolArgs: call.toolArgs,
|
|
15141
|
-
contentOutputHash: call.contentOutputHash,
|
|
15142
|
-
rawOutputHash: call.rawOutputHash
|
|
15143
|
-
}));
|
|
15144
|
-
}
|
|
15145
|
-
function orderedReplayTools(collector) {
|
|
15146
|
-
return [...collector.byId.values()];
|
|
15147
|
-
}
|
|
15148
|
-
function transcriptToolParts(state) {
|
|
15149
|
-
return state.messages.flatMap((message) => message.parts.flatMap((part) => part.type === "tool-invocation" ? [part] : []));
|
|
15150
|
-
}
|
|
15151
|
-
function normalizedToolKind(value) {
|
|
15152
|
-
const normalized = value?.trim().toLowerCase();
|
|
15153
|
-
return normalized || undefined;
|
|
15154
|
-
}
|
|
15155
|
-
function hasToolArguments(value) {
|
|
15156
|
-
return value !== undefined && Object.keys(value).length > 0;
|
|
15157
|
-
}
|
|
15158
|
-
function isGenericCursorToolTitle(value) {
|
|
15159
|
-
const normalized = value?.trim().toLowerCase();
|
|
15160
|
-
return normalized === "read file" || normalized === "read lints" || normalized === "edit file" || normalized === "grep" || normalized === "find";
|
|
15161
|
-
}
|
|
15162
15547
|
function isSettledToolPart(part) {
|
|
15163
15548
|
return part.toolState === "success" || part.toolState === "failure";
|
|
15164
15549
|
}
|
|
15165
|
-
function isGenericCursorToolPart(part) {
|
|
15166
|
-
return isGenericCursorToolTitle(part.toolTitle) && !hasToolArguments(part.toolArgs);
|
|
15167
|
-
}
|
|
15168
|
-
function cursorToolReplayTargets(state, options = {}) {
|
|
15169
|
-
if (provider !== "cursor")
|
|
15170
|
-
return [];
|
|
15171
|
-
const parts = transcriptToolParts(state).slice(-MAX_REPLAY_RECONCILE_TOOLS);
|
|
15172
|
-
const firstGeneric = parts.findIndex((part) => isGenericCursorToolPart(part));
|
|
15173
|
-
if (firstGeneric === -1)
|
|
15174
|
-
return [];
|
|
15175
|
-
const targets = parts.slice(firstGeneric);
|
|
15176
|
-
if (!options.requireSettled)
|
|
15177
|
-
return targets;
|
|
15178
|
-
const settled = targets.filter((part) => isSettledToolPart(part));
|
|
15179
|
-
if (!settled.some((part) => isGenericCursorToolPart(part)))
|
|
15180
|
-
return [];
|
|
15181
|
-
return settled;
|
|
15182
|
-
}
|
|
15183
|
-
function applyReplayToolMetadata(state, capturedTargets, collector, options = {}) {
|
|
15184
|
-
const liveToolParts = new Set(transcriptToolParts(state));
|
|
15185
|
-
const targets = capturedTargets.filter((part) => liveToolParts.has(part));
|
|
15186
|
-
const replayed = orderedReplayTools(collector);
|
|
15187
|
-
if (targets.length === 0 || replayed.length === 0)
|
|
15188
|
-
return false;
|
|
15189
|
-
const unused = new Set(replayed.keys());
|
|
15190
|
-
const allowKindFallback = options.allowKindFallback !== false;
|
|
15191
|
-
let changed = false;
|
|
15192
|
-
for (const part of targets) {
|
|
15193
|
-
const targetKind = normalizedToolKind(part.toolName);
|
|
15194
|
-
const targetOutputHash = replayOutputHash(part.toolOutput);
|
|
15195
|
-
const sameKind = [...unused].filter((index) => {
|
|
15196
|
-
const replay = replayed[index];
|
|
15197
|
-
if (normalizedToolKind(replay?.toolName) !== targetKind)
|
|
15198
|
-
return false;
|
|
15199
|
-
const replayHash = replay?.contentOutputHash ?? replay?.rawOutputHash;
|
|
15200
|
-
return !(targetOutputHash !== undefined && replayHash !== undefined && replayHash !== targetOutputHash);
|
|
15201
|
-
});
|
|
15202
|
-
const targetPath = part.toolDiff?.filePath ?? toolArgumentPath(part.toolArgs);
|
|
15203
|
-
const pathMatches = targetPath ? sameKind.filter((index) => toolArgumentPath(replayed[index]?.toolArgs) === targetPath) : [];
|
|
15204
|
-
const outputMatches = targetOutputHash ? sameKind.filter((index) => {
|
|
15205
|
-
const replay = replayed[index];
|
|
15206
|
-
const replayHash = replay?.contentOutputHash ?? replay?.rawOutputHash;
|
|
15207
|
-
return replayHash !== undefined && replayHash === targetOutputHash;
|
|
15208
|
-
}) : [];
|
|
15209
|
-
const candidateIndexes = pathMatches.length > 0 ? pathMatches : outputMatches;
|
|
15210
|
-
const replayIndex = candidateIndexes.length === 1 ? candidateIndexes[0] : allowKindFallback && sameKind.length === 1 ? sameKind[0] : undefined;
|
|
15211
|
-
if (replayIndex === undefined)
|
|
15212
|
-
continue;
|
|
15213
|
-
const replay = replayed[replayIndex];
|
|
15214
|
-
if (!replay)
|
|
15215
|
-
continue;
|
|
15216
|
-
unused.delete(replayIndex);
|
|
15217
|
-
let partChanged = false;
|
|
15218
|
-
if (!part.toolName && replay.toolName) {
|
|
15219
|
-
part.toolName = replay.toolName;
|
|
15220
|
-
partChanged = true;
|
|
15221
|
-
}
|
|
15222
|
-
if (!hasToolArguments(part.toolArgs) && hasToolArguments(replay.toolArgs)) {
|
|
15223
|
-
part.toolArgs = replay.toolArgs;
|
|
15224
|
-
partChanged = true;
|
|
15225
|
-
}
|
|
15226
|
-
if (replay.title && isGenericCursorToolTitle(part.toolTitle) && replay.title !== part.toolTitle) {
|
|
15227
|
-
const previousTitle = part.toolTitle;
|
|
15228
|
-
part.toolTitle = replay.title;
|
|
15229
|
-
if (!part.content || part.content === previousTitle)
|
|
15230
|
-
part.content = replay.title;
|
|
15231
|
-
partChanged = true;
|
|
15232
|
-
}
|
|
15233
|
-
if (partChanged) {
|
|
15234
|
-
changed = true;
|
|
15235
|
-
acpToolSourceStates.delete(part);
|
|
15236
|
-
notePartMutation(state, part);
|
|
15237
|
-
}
|
|
15238
|
-
}
|
|
15239
|
-
if (changed)
|
|
15240
|
-
boundTranscript(state);
|
|
15241
|
-
return changed;
|
|
15242
|
-
}
|
|
15243
|
-
async function reconcileCursorToolMetadata(state, child, targets, promptSequence, options = {}) {
|
|
15244
|
-
if (provider !== "cursor" || shuttingDown || state.closing !== undefined || sessions.get(state.id) !== state || state.child !== child || state.promptSequence !== promptSequence || targets.length === 0)
|
|
15245
|
-
return;
|
|
15246
|
-
if (activeCursorToolReplays >= MAX_CURSOR_TOOL_REPLAY_PROCESSES)
|
|
15247
|
-
return;
|
|
15248
|
-
const capacity = Math.min(targets.length, MAX_REPLAY_RECONCILE_TOOLS);
|
|
15249
|
-
if (capacity === 0)
|
|
15250
|
-
return;
|
|
15251
|
-
const collector = {
|
|
15252
|
-
capacity,
|
|
15253
|
-
maximumBytes: MAX_TRANSCRIPT_BYTES,
|
|
15254
|
-
retainedBytes: 0,
|
|
15255
|
-
byId: new Map
|
|
15256
|
-
};
|
|
15257
|
-
adjustActiveCursorToolReplays(1);
|
|
15258
|
-
let replayChild;
|
|
15259
|
-
try {
|
|
15260
|
-
replayChild = new AcpProcess;
|
|
15261
|
-
cursorToolReplayProcesses.add(replayChild);
|
|
15262
|
-
(state.cursorToolReplayChildren ??= new Set).add(replayChild);
|
|
15263
|
-
replayChild.onUpdate = (params) => {
|
|
15264
|
-
if (params.sessionId !== state.acpSessionId || !isObject3(params.update))
|
|
15265
|
-
return;
|
|
15266
|
-
const update = params.update;
|
|
15267
|
-
const kind = typeof update.sessionUpdate === "string" ? update.sessionUpdate : typeof update.type === "string" ? update.type : "";
|
|
15268
|
-
if (kind === "tool_call" || kind === "tool_call_update") {
|
|
15269
|
-
collectReplayToolMetadata(collector, update, kind === "tool_call");
|
|
15270
|
-
}
|
|
15271
|
-
};
|
|
15272
|
-
const initialized = await replayChild.initialize();
|
|
15273
|
-
const capabilities = isObject3(initialized.agentCapabilities) ? initialized.agentCapabilities : undefined;
|
|
15274
|
-
if (capabilities?.loadSession !== true)
|
|
15275
|
-
return;
|
|
15276
|
-
await replayChild.request("session/load", {
|
|
15277
|
-
cwd: workingDirectory,
|
|
15278
|
-
additionalDirectories: [],
|
|
15279
|
-
mcpServers: configuredAcpMcpServers(state.agentMcp),
|
|
15280
|
-
sessionId: state.acpSessionId
|
|
15281
|
-
});
|
|
15282
|
-
if (!shuttingDown && sessions.get(state.id) === state && state.child === child && state.promptSequence === promptSequence && applyReplayToolMetadata(state, targets, collector, options)) {
|
|
15283
|
-
state.revision += 1;
|
|
15284
|
-
schedulePersist();
|
|
15285
|
-
}
|
|
15286
|
-
} catch {} finally {
|
|
15287
|
-
try {
|
|
15288
|
-
await replayChild?.close();
|
|
15289
|
-
} finally {
|
|
15290
|
-
if (replayChild) {
|
|
15291
|
-
cursorToolReplayProcesses.delete(replayChild);
|
|
15292
|
-
state.cursorToolReplayChildren?.delete(replayChild);
|
|
15293
|
-
}
|
|
15294
|
-
adjustActiveCursorToolReplays(-1);
|
|
15295
|
-
}
|
|
15296
|
-
}
|
|
15297
|
-
}
|
|
15298
|
-
function liveCursorReplayBudgetExhausted(state) {
|
|
15299
|
-
const used = state.cursorToolReplayTurn === state.promptSequence ? state.cursorToolReplayRuns ?? 0 : 0;
|
|
15300
|
-
return used >= MAX_LIVE_CURSOR_TOOL_REPLAYS_PER_TURN;
|
|
15301
|
-
}
|
|
15302
|
-
function recordCursorToolReplayRun(state) {
|
|
15303
|
-
if (state.cursorToolReplayTurn !== state.promptSequence) {
|
|
15304
|
-
state.cursorToolReplayTurn = state.promptSequence;
|
|
15305
|
-
state.cursorToolReplayRuns = 0;
|
|
15306
|
-
}
|
|
15307
|
-
state.cursorToolReplayRuns = (state.cursorToolReplayRuns ?? 0) + 1;
|
|
15308
|
-
}
|
|
15309
|
-
function scheduleCursorToolMetadataReconcile(state, options = {}) {
|
|
15310
|
-
if (provider !== "cursor" || shuttingDown || sessions.get(state.id) !== state || state.closing) {
|
|
15311
|
-
return;
|
|
15312
|
-
}
|
|
15313
|
-
if (!options.final && liveCursorReplayBudgetExhausted(state))
|
|
15314
|
-
return;
|
|
15315
|
-
if (options.final || !state.cursorToolReplayPending) {
|
|
15316
|
-
state.cursorToolReplayPending = options.final ? "final" : "live";
|
|
15317
|
-
}
|
|
15318
|
-
if (state.cursorToolReplayRunning)
|
|
15319
|
-
return;
|
|
15320
|
-
if (state.cursorToolReplayTimer) {
|
|
15321
|
-
if (!options.final)
|
|
15322
|
-
return;
|
|
15323
|
-
clearTimeout(state.cursorToolReplayTimer);
|
|
15324
|
-
state.cursorToolReplayTimer = undefined;
|
|
15325
|
-
}
|
|
15326
|
-
const run = () => {
|
|
15327
|
-
state.cursorToolReplayTimer = undefined;
|
|
15328
|
-
if (shuttingDown || sessions.get(state.id) !== state || state.closing)
|
|
15329
|
-
return;
|
|
15330
|
-
const mode = state.cursorToolReplayPending;
|
|
15331
|
-
state.cursorToolReplayPending = undefined;
|
|
15332
|
-
if (!mode)
|
|
15333
|
-
return;
|
|
15334
|
-
if (turnRequiresCompleteOutput(state))
|
|
15335
|
-
return;
|
|
15336
|
-
const child = state.child;
|
|
15337
|
-
const targets = cursorToolReplayTargets(state, { requireSettled: mode === "live" });
|
|
15338
|
-
if (!child || targets.length === 0)
|
|
15339
|
-
return;
|
|
15340
|
-
const promptSequence = state.promptSequence;
|
|
15341
|
-
recordCursorToolReplayRun(state);
|
|
15342
|
-
state.cursorToolReplayRunning = true;
|
|
15343
|
-
reconcileCursorToolMetadata(state, child, targets, promptSequence, {
|
|
15344
|
-
allowKindFallback: mode === "final"
|
|
15345
|
-
}).catch(() => {
|
|
15346
|
-
return;
|
|
15347
|
-
}).finally(() => {
|
|
15348
|
-
state.cursorToolReplayRunning = false;
|
|
15349
|
-
if (state.cursorToolReplayPending) {
|
|
15350
|
-
scheduleCursorToolMetadataReconcile(state, {
|
|
15351
|
-
final: state.cursorToolReplayPending === "final"
|
|
15352
|
-
});
|
|
15353
|
-
}
|
|
15354
|
-
});
|
|
15355
|
-
};
|
|
15356
|
-
state.cursorToolReplayTimer = setTimeout(run, options.final ? 0 : CURSOR_TOOL_REPLAY_DELAY_MS);
|
|
15357
|
-
state.cursorToolReplayTimer.unref();
|
|
15358
|
-
}
|
|
15359
|
-
function cancelCursorToolMetadataReconcile(state) {
|
|
15360
|
-
if (state.cursorToolReplayTimer)
|
|
15361
|
-
clearTimeout(state.cursorToolReplayTimer);
|
|
15362
|
-
state.cursorToolReplayTimer = undefined;
|
|
15363
|
-
state.cursorToolReplayPending = undefined;
|
|
15364
|
-
}
|
|
15365
15550
|
function acpParentTaskUseId(update) {
|
|
15366
15551
|
const candidates = [update.parentToolCallId, update.parent_tool_call_id];
|
|
15367
15552
|
if (isObject3(update._meta)) {
|
|
@@ -16471,7 +16656,7 @@ function providerLabel(provider) {
|
|
|
16471
16656
|
const configured = loadAcpProviderConfig();
|
|
16472
16657
|
return configured.id === provider ? configured.name : provider;
|
|
16473
16658
|
} catch {
|
|
16474
|
-
return provider === "grok" ? "Grok" : provider
|
|
16659
|
+
return provider === "grok" ? "Grok" : provider;
|
|
16475
16660
|
}
|
|
16476
16661
|
}
|
|
16477
16662
|
var CONVERSATION_MODES = [
|
|
@@ -17690,7 +17875,7 @@ async function readJournal(path, maxEntries) {
|
|
|
17690
17875
|
}
|
|
17691
17876
|
|
|
17692
17877
|
// ../../bridges/acp-bridge/src/grok-interjection.ts
|
|
17693
|
-
import { createHash as
|
|
17878
|
+
import { createHash as createHash4, randomBytes as randomBytes5 } from "node:crypto";
|
|
17694
17879
|
var GROK_INTERJECT_METHOD = "_x.ai/interject";
|
|
17695
17880
|
var GROK_INTERJECTION_NOTIFICATION = "_x.ai/session/interjection";
|
|
17696
17881
|
var MAX_GROK_INTERJECTION_JOURNAL = 256;
|
|
@@ -17701,7 +17886,7 @@ function grokRunId(promptSequence) {
|
|
|
17701
17886
|
return `grok:${grokBridgeGeneration}:${promptSequence}`;
|
|
17702
17887
|
}
|
|
17703
17888
|
function grokInterjectionDigest(text) {
|
|
17704
|
-
return
|
|
17889
|
+
return createHash4("sha256").update(text).digest("hex");
|
|
17705
17890
|
}
|
|
17706
17891
|
function parseGrokInterjectResult(value) {
|
|
17707
17892
|
if (!isObject6(value) || value.status !== "queued")
|
|
@@ -17860,7 +18045,7 @@ var SOURCES = new Set([
|
|
|
17860
18045
|
var EXECUTION_KINDS = new Set(NATIVE_AGENT_COMMAND_EXECUTION_KINDS);
|
|
17861
18046
|
var ORIGINS2 = new Set(NATIVE_AGENT_COMMAND_ORIGINS);
|
|
17862
18047
|
var UNAVAILABLE_REASONS = new Set(NATIVE_AGENT_COMMAND_UNAVAILABLE_REASONS);
|
|
17863
|
-
var
|
|
18048
|
+
var ERROR_CODES2 = new Set(NATIVE_AGENT_COMMAND_CATALOGUE_ERROR_CODES);
|
|
17864
18049
|
var encoder = new TextEncoder;
|
|
17865
18050
|
function utf8ByteLength(value) {
|
|
17866
18051
|
if (/^[\x00-\x7f]*$/.test(value))
|
|
@@ -18132,7 +18317,7 @@ function compactCommandSelection(state) {
|
|
|
18132
18317
|
}
|
|
18133
18318
|
|
|
18134
18319
|
// ../../bridges/acp-bridge/src/acp-persistence.ts
|
|
18135
|
-
var
|
|
18320
|
+
var log5 = createLogger("bridge.acp");
|
|
18136
18321
|
async function listNormalizedModels(signal) {
|
|
18137
18322
|
const live = mergeComposerCatalog(provider, [
|
|
18138
18323
|
...catalogCache ? [catalogCache] : [],
|
|
@@ -18180,14 +18365,14 @@ function restoreSessionConfig(candidate) {
|
|
|
18180
18365
|
const restored = parsePersistedAcpSessionConfig(provider, candidate.sessionConfig);
|
|
18181
18366
|
if (restored)
|
|
18182
18367
|
return restored;
|
|
18183
|
-
|
|
18368
|
+
log5.warn("state.session-config-reset");
|
|
18184
18369
|
return emptySessionConfig();
|
|
18185
18370
|
}
|
|
18186
18371
|
if (candidate.composer !== undefined) {
|
|
18187
18372
|
const composer = parsePersistedComposerState(provider, candidate.composer);
|
|
18188
18373
|
if (composer)
|
|
18189
18374
|
return { ...emptySessionConfig(), composer };
|
|
18190
|
-
|
|
18375
|
+
log5.warn("state.composer-reset");
|
|
18191
18376
|
}
|
|
18192
18377
|
return emptySessionConfig();
|
|
18193
18378
|
}
|
|
@@ -18270,7 +18455,7 @@ async function restorePersistedState() {
|
|
|
18270
18455
|
sessions.clear();
|
|
18271
18456
|
bumpCursorDiscoveryRevision();
|
|
18272
18457
|
clientSessionKeys.clear();
|
|
18273
|
-
|
|
18458
|
+
log5.warn("state.discarded", { error: formatLogError(error, { stack: false }) });
|
|
18274
18459
|
const file = stateFile;
|
|
18275
18460
|
if (!file)
|
|
18276
18461
|
return;
|
|
@@ -18343,6 +18528,7 @@ async function loadPersistedState() {
|
|
|
18343
18528
|
transcriptTruncated: candidate.transcriptTruncated === true || Number.isSafeInteger(candidate.droppedMessages) && Number(candidate.droppedMessages) > 0 || Number.isSafeInteger(candidate.droppedParts) && Number(candidate.droppedParts) > 0,
|
|
18344
18529
|
sessionConfig: restoreSessionConfig(candidate),
|
|
18345
18530
|
policy: restorePersistedPolicy(candidate.policy),
|
|
18531
|
+
policyPending: true,
|
|
18346
18532
|
...typeof candidate.readOnly === "boolean" ? { readOnly: candidate.readOnly } : {},
|
|
18347
18533
|
dispatching: false,
|
|
18348
18534
|
historyReplay: false,
|
|
@@ -18797,7 +18983,7 @@ class InteractionDeadline {
|
|
|
18797
18983
|
}
|
|
18798
18984
|
|
|
18799
18985
|
// ../../bridges/acp-bridge/src/acp-command-changes.ts
|
|
18800
|
-
import { createHash as
|
|
18986
|
+
import { createHash as createHash6 } from "node:crypto";
|
|
18801
18987
|
import { resolve as resolve6 } from "node:path";
|
|
18802
18988
|
|
|
18803
18989
|
// ../protocol/src/node/workspace-change-probe.ts
|
|
@@ -19799,7 +19985,7 @@ function workspaceObservationReportIssues(value) {
|
|
|
19799
19985
|
}
|
|
19800
19986
|
|
|
19801
19987
|
// ../protocol/src/node/change-tracking/evidence-spool.ts
|
|
19802
|
-
import { createHash as
|
|
19988
|
+
import { createHash as createHash5, randomUUID as randomUUID2 } from "node:crypto";
|
|
19803
19989
|
import { readdirSync, readFileSync as readFileSync2 } from "node:fs";
|
|
19804
19990
|
import { appendFile as appendFile2, mkdir as mkdir2, rename as rename2, rm as rm3, writeFile as writeFile2 } from "node:fs/promises";
|
|
19805
19991
|
import { join as join7 } from "node:path";
|
|
@@ -19815,10 +20001,10 @@ var DEFAULT_EVIDENCE_SPOOL_LIMITS = {
|
|
|
19815
20001
|
var ENTRIES_FILE = "entries.jsonl";
|
|
19816
20002
|
var BODY_DIRECTORY = "bodies";
|
|
19817
20003
|
function evidenceBodyId(bytes) {
|
|
19818
|
-
return `sha256:${
|
|
20004
|
+
return `sha256:${createHash5("sha256").update(bytes).digest("hex")}`;
|
|
19819
20005
|
}
|
|
19820
20006
|
function stableEvidenceId(...parts) {
|
|
19821
|
-
const hash =
|
|
20007
|
+
const hash = createHash5("sha256");
|
|
19822
20008
|
for (const part of parts)
|
|
19823
20009
|
hash.update(`${part ?? ""}\x00`);
|
|
19824
20010
|
return hash.digest("hex").slice(0, 40);
|
|
@@ -20461,7 +20647,7 @@ function canonicalEvidence(evidence) {
|
|
|
20461
20647
|
}
|
|
20462
20648
|
|
|
20463
20649
|
// ../../bridges/acp-bridge/src/change-evidence.ts
|
|
20464
|
-
var
|
|
20650
|
+
var log6 = createLogger("bridge.acp");
|
|
20465
20651
|
var MAX_DIFF_BLOCKS_PER_CALL = 100;
|
|
20466
20652
|
var MAX_HELD_DIFF_BYTES = 32 * 1024 * 1024;
|
|
20467
20653
|
var MAX_SEEN_CALL_IDS = 8192;
|
|
@@ -20760,7 +20946,7 @@ function recordAcpToolEvidence(state, part, update) {
|
|
|
20760
20946
|
if (isTerminal(phase))
|
|
20761
20947
|
settleRecord(state, part, record);
|
|
20762
20948
|
} catch (error) {
|
|
20763
|
-
|
|
20949
|
+
log6.warn("evidence.record-failed", {
|
|
20764
20950
|
errorClass: error instanceof Error ? error.name : "unknown"
|
|
20765
20951
|
});
|
|
20766
20952
|
}
|
|
@@ -20804,7 +20990,7 @@ function recordAcpShellObservation(state, toolUseId, observation) {
|
|
|
20804
20990
|
...observation.unavailableReason ? { unavailableReason: observation.unavailableReason } : {}
|
|
20805
20991
|
});
|
|
20806
20992
|
} catch (error) {
|
|
20807
|
-
|
|
20993
|
+
log6.warn("evidence.shell-record-failed", {
|
|
20808
20994
|
errorClass: error instanceof Error ? error.name : "unknown"
|
|
20809
20995
|
});
|
|
20810
20996
|
}
|
|
@@ -20836,14 +21022,14 @@ function endAcpTurnEvidence(state, outcome) {
|
|
|
20836
21022
|
const writers = state.activeSubagentToolIds.size > 0 || turn.backgroundLaunched ? "may-write" : "quiescent";
|
|
20837
21023
|
changeEvidenceRecorder().turn({ conversationId: state.id, turnId: turn.turnId }, outcome, writers);
|
|
20838
21024
|
} catch (error) {
|
|
20839
|
-
|
|
21025
|
+
log6.warn("evidence.turn-record-failed", {
|
|
20840
21026
|
errorClass: error instanceof Error ? error.name : "unknown"
|
|
20841
21027
|
});
|
|
20842
21028
|
}
|
|
20843
21029
|
}
|
|
20844
21030
|
|
|
20845
21031
|
// ../../bridges/acp-bridge/src/acp-command-changes.ts
|
|
20846
|
-
var
|
|
21032
|
+
var log7 = createLogger("bridge.acp");
|
|
20847
21033
|
var MAX_WINDOWS_PER_SESSION = 256;
|
|
20848
21034
|
var MAX_CACHED_JOURNALS = MAX_RESUMABLE_SESSIONS;
|
|
20849
21035
|
var probe;
|
|
@@ -20957,7 +21143,7 @@ function closeWindow(active, state, toolUseId, role) {
|
|
|
20957
21143
|
recordAcpShellObservation(state, toolUseId, observation);
|
|
20958
21144
|
recordCommandChange(state, toolUseId, legacyCommandChange(observation));
|
|
20959
21145
|
}).catch((error) => {
|
|
20960
|
-
|
|
21146
|
+
log7.warn("command-change.record-failed", {
|
|
20961
21147
|
errorClass: error instanceof Error ? error.name : "unknown"
|
|
20962
21148
|
});
|
|
20963
21149
|
});
|
|
@@ -21016,7 +21202,7 @@ async function applyJournaledCommandChanges(state) {
|
|
|
21016
21202
|
function journalFor(acpSessionId) {
|
|
21017
21203
|
if (!journalDirectory || !acpSessionId)
|
|
21018
21204
|
return;
|
|
21019
|
-
const name =
|
|
21205
|
+
const name = createHash6("sha256").update(acpSessionId).digest("hex").slice(0, 40);
|
|
21020
21206
|
const path = resolve6(journalDirectory, `${name}.jsonl`);
|
|
21021
21207
|
let journal = journals.get(path);
|
|
21022
21208
|
if (journal) {
|
|
@@ -21132,9 +21318,21 @@ async function adoptAcpSession(acpSessionId, signal, patch, policy, agentMcp) {
|
|
|
21132
21318
|
operation.then(clear, clear);
|
|
21133
21319
|
return signal ? raceAbort(operation, signal) : operation;
|
|
21134
21320
|
}
|
|
21321
|
+
async function replaceSessionPolicy(state, policy) {
|
|
21322
|
+
state.policyPending = false;
|
|
21323
|
+
if (JSON.stringify(state.policy) === JSON.stringify(policy))
|
|
21324
|
+
return;
|
|
21325
|
+
const previous = state.child;
|
|
21326
|
+
state.child = null;
|
|
21327
|
+
clearApprovals(state);
|
|
21328
|
+
state.policy = policy;
|
|
21329
|
+
await previous?.close();
|
|
21330
|
+
}
|
|
21135
21331
|
async function resumeExistingSession(state, signal, patch, policy, agentMcp) {
|
|
21136
21332
|
if (state.closing)
|
|
21137
21333
|
throw new HttpError(409, SESSION_CLOSING_ERROR);
|
|
21334
|
+
if (policy)
|
|
21335
|
+
assertExecutionPolicyNotWidened(liveExecutionPolicy(state), policy);
|
|
21138
21336
|
if (state.status === "running" || state.dispatching) {
|
|
21139
21337
|
throw new HttpError(409, "Session is already running");
|
|
21140
21338
|
}
|
|
@@ -21142,13 +21340,8 @@ async function resumeExistingSession(state, signal, patch, policy, agentMcp) {
|
|
|
21142
21340
|
state.agentMcp = agentMcp;
|
|
21143
21341
|
state.dispatching = true;
|
|
21144
21342
|
try {
|
|
21145
|
-
if (policy
|
|
21146
|
-
|
|
21147
|
-
state.child = null;
|
|
21148
|
-
clearApprovals(state);
|
|
21149
|
-
state.policy = policy;
|
|
21150
|
-
await previous?.close();
|
|
21151
|
-
}
|
|
21343
|
+
if (policy)
|
|
21344
|
+
await replaceSessionPolicy(state, policy);
|
|
21152
21345
|
await ensureSessionProcess(state, signal);
|
|
21153
21346
|
if (patch)
|
|
21154
21347
|
await applyComposerPatch(state, patch, signal);
|
|
@@ -21253,6 +21446,15 @@ async function createSession(clientSessionKey, signal, spawnOptions = {}) {
|
|
|
21253
21446
|
if (existing) {
|
|
21254
21447
|
if (existing.closing)
|
|
21255
21448
|
throw new HttpError(409, SESSION_CLOSING_ERROR);
|
|
21449
|
+
const policy = spawnOptions.policy;
|
|
21450
|
+
if (policy) {
|
|
21451
|
+
assertExecutionPolicyNotWidened(liveExecutionPolicy(existing), policy);
|
|
21452
|
+
if (JSON.stringify(existing.policy) !== JSON.stringify(policy) && (existing.status === "running" || existing.dispatching)) {
|
|
21453
|
+
throw new HttpError(409, "Session is already running");
|
|
21454
|
+
}
|
|
21455
|
+
await replaceSessionPolicy(existing, policy);
|
|
21456
|
+
schedulePersist();
|
|
21457
|
+
}
|
|
21256
21458
|
if (typeof spawnOptions.readOnly === "boolean") {
|
|
21257
21459
|
if (existing.readOnly === true !== spawnOptions.readOnly && (existing.status === "running" || existing.dispatching)) {
|
|
21258
21460
|
throw new HttpError(409, "Session is already running");
|
|
@@ -21266,8 +21468,10 @@ async function createSession(clientSessionKey, signal, spawnOptions = {}) {
|
|
|
21266
21468
|
}
|
|
21267
21469
|
}
|
|
21268
21470
|
const pending = sessionCreations.get(clientSessionKey);
|
|
21269
|
-
if (pending)
|
|
21270
|
-
|
|
21471
|
+
if (pending) {
|
|
21472
|
+
await pending;
|
|
21473
|
+
return createSession(clientSessionKey, signal, spawnOptions);
|
|
21474
|
+
}
|
|
21271
21475
|
}
|
|
21272
21476
|
if (activeSessionReservations() >= MAX_SESSIONS)
|
|
21273
21477
|
throw new HttpError(429, "ACP session limit reached");
|
|
@@ -23044,7 +23248,8 @@ function configureLoggerFromEnvironment(env, options = {}) {
|
|
|
23044
23248
|
configureLogger({
|
|
23045
23249
|
...levels.level ? { level: levels.level } : {},
|
|
23046
23250
|
areaLevels: levels.areaLevels,
|
|
23047
|
-
format
|
|
23251
|
+
format,
|
|
23252
|
+
relayEssential: options.relayToSupervisor === true
|
|
23048
23253
|
});
|
|
23049
23254
|
const log = createLogger("logging");
|
|
23050
23255
|
if (levels.invalid.length > 0) {
|
|
@@ -23692,7 +23897,7 @@ var DEFAULT_MCP_MANAGEMENT_ROLLOUT = Object.freeze({
|
|
|
23692
23897
|
|
|
23693
23898
|
// ../protocol/src/node/bridge-transcript-summary.ts
|
|
23694
23899
|
import { Buffer as Buffer5 } from "node:buffer";
|
|
23695
|
-
import { createHash as
|
|
23900
|
+
import { createHash as createHash7 } from "node:crypto";
|
|
23696
23901
|
|
|
23697
23902
|
// ../protocol/src/node/progressive-transcript.ts
|
|
23698
23903
|
var BRIDGE_TRANSCRIPT_MAX_MESSAGES = 100;
|
|
@@ -23858,7 +24063,7 @@ function digestPayload(payload) {
|
|
|
23858
24063
|
const serialized = JSON.stringify(payload);
|
|
23859
24064
|
return {
|
|
23860
24065
|
bytes: Buffer5.byteLength(serialized),
|
|
23861
|
-
digest:
|
|
24066
|
+
digest: createHash7("sha256").update(serialized).digest("base64url").slice(0, 32)
|
|
23862
24067
|
};
|
|
23863
24068
|
}
|
|
23864
24069
|
function topLevelKey(part, index) {
|
|
@@ -24258,7 +24463,6 @@ function closeSessionRetaining(state) {
|
|
|
24258
24463
|
async function runClose(state) {
|
|
24259
24464
|
state.closing = "fenced";
|
|
24260
24465
|
denyPendingRequests(state);
|
|
24261
|
-
cancelCursorToolMetadataReconcile(state);
|
|
24262
24466
|
if (state.status === "running" || state.dispatching) {
|
|
24263
24467
|
state.retryCancelledPromptSequence = state.dispatching ? state.promptSequence + 1 : state.promptSequence;
|
|
24264
24468
|
state.child?.notify("session/cancel", { sessionId: state.acpSessionId });
|
|
@@ -24283,8 +24487,6 @@ async function runClose(state) {
|
|
|
24283
24487
|
}
|
|
24284
24488
|
if (state.child)
|
|
24285
24489
|
children.add(state.child);
|
|
24286
|
-
for (const child of state.cursorToolReplayChildren ?? [])
|
|
24287
|
-
children.add(child);
|
|
24288
24490
|
for (const child of children)
|
|
24289
24491
|
await child.close();
|
|
24290
24492
|
if (Array.from(children).some((child) => !exited(child)))
|
|
@@ -24889,6 +25091,9 @@ async function route(request, response, clientSignal) {
|
|
|
24889
25091
|
}
|
|
24890
25092
|
if ((action === "prompt" || action === "compact") && request.method === "POST") {
|
|
24891
25093
|
let body = await readJson(request);
|
|
25094
|
+
if (isNativeAgentExecutionPolicy(body.policy)) {
|
|
25095
|
+
assertExecutionPolicyNotWidened(liveExecutionPolicy(state), effectiveExecutionPolicy(body.policy) ?? body.policy);
|
|
25096
|
+
}
|
|
24892
25097
|
if (action === "compact") {
|
|
24893
25098
|
body = {
|
|
24894
25099
|
prompt: "/compact",
|
|
@@ -24953,6 +25158,7 @@ async function route(request, response, clientSignal) {
|
|
|
24953
25158
|
if (state.status === "running" || state.dispatching) {
|
|
24954
25159
|
return json(response, 409, { error: "Session is already running" });
|
|
24955
25160
|
}
|
|
25161
|
+
state.policyPending = false;
|
|
24956
25162
|
if (selectedCommand && state.commandsLive) {
|
|
24957
25163
|
const resolved = resolveSelectedCommand(state, selectedCommand);
|
|
24958
25164
|
if (!resolved.ok)
|
|
@@ -25164,7 +25370,6 @@ ${structuredPromptInstruction(schema)}` : prompt;
|
|
|
25164
25370
|
}
|
|
25165
25371
|
state.revision += 1;
|
|
25166
25372
|
schedulePersist();
|
|
25167
|
-
scheduleCursorToolMetadataReconcile(state, { final: true });
|
|
25168
25373
|
}, (error) => {
|
|
25169
25374
|
state.status = "error";
|
|
25170
25375
|
state.error = error instanceof Error ? error.message : String(error);
|
|
@@ -25175,7 +25380,6 @@ ${structuredPromptInstruction(schema)}` : prompt;
|
|
|
25175
25380
|
state.completedAttemptUsage = undefined;
|
|
25176
25381
|
state.currentTurnRequestId = undefined;
|
|
25177
25382
|
state.currentTurnSawVendorUsage = undefined;
|
|
25178
|
-
cancelCursorToolMetadataReconcile(state);
|
|
25179
25383
|
reconcileStaleToolParts(state, true);
|
|
25180
25384
|
settleCommandChangeWindows(state);
|
|
25181
25385
|
endAcpTurnEvidence(state, "failed");
|
|
@@ -25219,7 +25423,6 @@ ${structuredPromptInstruction(schema)}` : prompt;
|
|
|
25219
25423
|
return await closeSessionRetaining(state) === "closed" ? json(response, 200, { deleted: true }) : json(response, 503, { error: "Session close did not complete" });
|
|
25220
25424
|
}
|
|
25221
25425
|
denyPendingRequests(state);
|
|
25222
|
-
cancelCursorToolMetadataReconcile(state);
|
|
25223
25426
|
await state.child?.close();
|
|
25224
25427
|
sessions.delete(state.id);
|
|
25225
25428
|
if (state.clientSessionKey)
|
|
@@ -25501,6 +25704,9 @@ function installFatalRejectionGuard(options) {
|
|
|
25501
25704
|
try {
|
|
25502
25705
|
warn(`${options.label} Unhandled promise rejection (continuing): ${describe(reason)}`);
|
|
25503
25706
|
} catch {}
|
|
25707
|
+
try {
|
|
25708
|
+
options.onRejection?.(reason);
|
|
25709
|
+
} catch {}
|
|
25504
25710
|
};
|
|
25505
25711
|
target.on("unhandledRejection", handler);
|
|
25506
25712
|
return () => {
|
|
@@ -25508,6 +25714,15 @@ function installFatalRejectionGuard(options) {
|
|
|
25508
25714
|
};
|
|
25509
25715
|
}
|
|
25510
25716
|
|
|
25717
|
+
// ../protocol/src/node/process-failure-log.ts
|
|
25718
|
+
var log8 = createLogger("process");
|
|
25719
|
+
function logUnhandledRejection(reason) {
|
|
25720
|
+
log8.throttled("error", "rejection.unhandled", {
|
|
25721
|
+
error: reason,
|
|
25722
|
+
fields: () => ({ error: formatLogError(reason, { message: false }) })
|
|
25723
|
+
});
|
|
25724
|
+
}
|
|
25725
|
+
|
|
25511
25726
|
// ../../bridges/acp-bridge/src/acp-client-disconnect.ts
|
|
25512
25727
|
function watchClientDisconnect(request, response, onDisconnect) {
|
|
25513
25728
|
const socket = request.socket;
|
|
@@ -25535,7 +25750,7 @@ function watchClientDisconnect(request, response, onDisconnect) {
|
|
|
25535
25750
|
}
|
|
25536
25751
|
|
|
25537
25752
|
// ../../bridges/acp-bridge/src/acp-server.ts
|
|
25538
|
-
var
|
|
25753
|
+
var log9 = createLogger("bridge.acp");
|
|
25539
25754
|
configureBridgeLogger();
|
|
25540
25755
|
await restorePersistedState();
|
|
25541
25756
|
var server = createServer((request, response) => {
|
|
@@ -25549,11 +25764,22 @@ var server = createServer((request, response) => {
|
|
|
25549
25764
|
json(response, 401, { error: error.message, kind: "authentication-required" });
|
|
25550
25765
|
return;
|
|
25551
25766
|
}
|
|
25767
|
+
if (error instanceof PolicyWideningRefusedError) {
|
|
25768
|
+
log9.warn("session.policy-widening-refused", { widened: error.widened.join(",") });
|
|
25769
|
+
json(response, 403, error.refusal());
|
|
25770
|
+
return;
|
|
25771
|
+
}
|
|
25552
25772
|
const status = error instanceof HttpError ? error.status : 500;
|
|
25773
|
+
if (status === 500 && !controller.signal.aborted) {
|
|
25774
|
+
log9.warn("http.route-failed", {
|
|
25775
|
+
method: request.method,
|
|
25776
|
+
error: formatLogError(error, { message: false })
|
|
25777
|
+
});
|
|
25778
|
+
}
|
|
25553
25779
|
json(response, status, { error: error instanceof Error ? error.message : String(error) });
|
|
25554
25780
|
}).finally(stopWatchingClient);
|
|
25555
25781
|
});
|
|
25556
|
-
server.listen(port, hostname, () =>
|
|
25782
|
+
server.listen(port, hostname, () => log9.info("server.listening", { provider, hostname, port }));
|
|
25557
25783
|
var shutdownPromise = null;
|
|
25558
25784
|
function shutdown() {
|
|
25559
25785
|
if (shutdownPromise)
|
|
@@ -25563,18 +25789,14 @@ function shutdown() {
|
|
|
25563
25789
|
for (const state of sessions.values()) {
|
|
25564
25790
|
for (const approval of Array.from(state.approvals.values()))
|
|
25565
25791
|
approval.respond();
|
|
25566
|
-
cancelCursorToolMetadataReconcile(state);
|
|
25567
25792
|
}
|
|
25568
|
-
await Promise.allSettled([
|
|
25569
|
-
...[...sessions.values()].map((state) => state.child?.close()),
|
|
25570
|
-
...[...cursorToolReplayProcesses].map((child) => child.close())
|
|
25571
|
-
]);
|
|
25793
|
+
await Promise.allSettled([...sessions.values()].map((state) => state.child?.close()));
|
|
25572
25794
|
await flushStreamingPersist();
|
|
25573
25795
|
await new Promise((resolvePromise) => server.close(() => resolvePromise()));
|
|
25574
25796
|
})();
|
|
25575
25797
|
return shutdownPromise;
|
|
25576
25798
|
}
|
|
25577
|
-
installFatalRejectionGuard({ label: "[acp-bridge]" });
|
|
25799
|
+
installFatalRejectionGuard({ label: "[acp-bridge]", onRejection: logUnhandledRejection });
|
|
25578
25800
|
var parentPid = parseParentPid(process.env[PARENT_PID_ENV]);
|
|
25579
25801
|
if (parentPid !== null) {
|
|
25580
25802
|
startParentWatchdog({
|
|
@@ -25604,7 +25826,6 @@ export {
|
|
|
25604
25826
|
CURSOR_CHILD_DISCOVERY_SKEW_MS,
|
|
25605
25827
|
CURSOR_JSONL_SOURCE_PREFIX,
|
|
25606
25828
|
CURSOR_TODO_STATUSES,
|
|
25607
|
-
CURSOR_TOOL_REPLAY_DELAY_MS,
|
|
25608
25829
|
DIFF_CONTEXT_LINES,
|
|
25609
25830
|
EXTERNAL_SESSION_PREFIX,
|
|
25610
25831
|
FLATTENED_RETRIABLE_PROVIDER_SUFFIX,
|
|
@@ -25627,7 +25848,6 @@ export {
|
|
|
25627
25848
|
MAX_CURSOR_TASK_PROMPT_BYTES,
|
|
25628
25849
|
MAX_CURSOR_TODOS,
|
|
25629
25850
|
MAX_CURSOR_TODO_CANDIDATES,
|
|
25630
|
-
MAX_CURSOR_TOOL_REPLAY_PROCESSES,
|
|
25631
25851
|
MAX_CURSOR_TRANSCRIPT_HYDRATE_CHILDREN,
|
|
25632
25852
|
MAX_DIFF_EDIT_DISTANCE,
|
|
25633
25853
|
MAX_EVICTED_TOOL_CALL_IDS,
|
|
@@ -25636,7 +25856,6 @@ export {
|
|
|
25636
25856
|
MAX_GROK_INTERJECTION_TEXT_BYTES,
|
|
25637
25857
|
MAX_HISTORY_MESSAGE_IDS,
|
|
25638
25858
|
MAX_LINE_BYTES,
|
|
25639
|
-
MAX_LIVE_CURSOR_TOOL_REPLAYS_PER_TURN,
|
|
25640
25859
|
MAX_MESSAGES,
|
|
25641
25860
|
MAX_MESSAGE_TEXT_BYTES,
|
|
25642
25861
|
MAX_MODEL_ID_BYTES,
|
|
@@ -25646,7 +25865,6 @@ export {
|
|
|
25646
25865
|
MAX_PERSISTED_SESSION_CONFIG_BYTES,
|
|
25647
25866
|
MAX_PERSISTED_STRUCTURED_BYTES,
|
|
25648
25867
|
MAX_PROMPT_JOURNAL,
|
|
25649
|
-
MAX_REPLAY_RECONCILE_TOOLS,
|
|
25650
25868
|
MAX_RESUMABLE_SESSIONS,
|
|
25651
25869
|
MAX_SESSIONS,
|
|
25652
25870
|
MAX_SESSION_LIST_PAGES,
|
|
@@ -25688,9 +25906,7 @@ export {
|
|
|
25688
25906
|
acpToolSourceStates,
|
|
25689
25907
|
acpTurnTokenCount,
|
|
25690
25908
|
activateSubagent,
|
|
25691
|
-
activeCursorToolReplays,
|
|
25692
25909
|
activeSessionReservations,
|
|
25693
|
-
adjustActiveCursorToolReplays,
|
|
25694
25910
|
adjustAnonymousSessionCreations,
|
|
25695
25911
|
adoptAcpSession,
|
|
25696
25912
|
agentRuntime,
|
|
@@ -25705,7 +25921,6 @@ export {
|
|
|
25705
25921
|
applyCursorUpdateTodos,
|
|
25706
25922
|
applyGrokInterjectionBroadcast,
|
|
25707
25923
|
applyOriginPolicy,
|
|
25708
|
-
applyReplayToolMetadata,
|
|
25709
25924
|
applySessionUpdate,
|
|
25710
25925
|
applySubagentFinished,
|
|
25711
25926
|
applySubagentSpawned,
|
|
@@ -25726,13 +25941,11 @@ export {
|
|
|
25726
25941
|
boundedString2 as boundedString,
|
|
25727
25942
|
boundedToolArguments,
|
|
25728
25943
|
bumpCursorDiscoveryRevision,
|
|
25729
|
-
cancelCursorToolMetadataReconcile,
|
|
25730
25944
|
catalogCache,
|
|
25731
25945
|
catalogProbe,
|
|
25732
25946
|
clearApprovals,
|
|
25733
25947
|
clearInteractions,
|
|
25734
25948
|
clientSessionKeys,
|
|
25735
|
-
collectReplayToolMetadata,
|
|
25736
25949
|
commitToolPartMutation,
|
|
25737
25950
|
composerPatchFromSpawn,
|
|
25738
25951
|
configuredAcpMcpServers,
|
|
@@ -25746,14 +25959,11 @@ export {
|
|
|
25746
25959
|
currentCursorDiscoveryRevision,
|
|
25747
25960
|
cursorSubagentTypeLabel,
|
|
25748
25961
|
cursorTaskNamedState,
|
|
25749
|
-
cursorToolReplayProcesses,
|
|
25750
|
-
cursorToolReplayTargets,
|
|
25751
25962
|
diffFileLines,
|
|
25752
25963
|
dispatchAcpPrompt,
|
|
25753
25964
|
emptySessionConfig,
|
|
25754
25965
|
ensureAcpToolSource,
|
|
25755
25966
|
ensureSessionProcess,
|
|
25756
|
-
evictOldestReplayTool,
|
|
25757
25967
|
executable,
|
|
25758
25968
|
externalSessionToken,
|
|
25759
25969
|
failAllActiveSubagents,
|
|
@@ -25770,7 +25980,6 @@ export {
|
|
|
25770
25980
|
grokQuestionTimeoutMs,
|
|
25771
25981
|
grokRunId,
|
|
25772
25982
|
grokWrappedToolCall,
|
|
25773
|
-
hasToolArguments,
|
|
25774
25983
|
hostname,
|
|
25775
25984
|
indexActiveSubagentsFromTranscript,
|
|
25776
25985
|
isAcpTodosToolName,
|
|
@@ -25779,8 +25988,6 @@ export {
|
|
|
25779
25988
|
isCursorTaskMethod,
|
|
25780
25989
|
isCursorTodosToolName,
|
|
25781
25990
|
isCursorUpdateTodosMethod,
|
|
25782
|
-
isGenericCursorToolPart,
|
|
25783
|
-
isGenericCursorToolTitle,
|
|
25784
25991
|
isGrokTodoWriteToolName,
|
|
25785
25992
|
isObject3 as isObject,
|
|
25786
25993
|
isSettledToolPart,
|
|
@@ -25794,9 +26001,7 @@ export {
|
|
|
25794
26001
|
listNormalizedModels,
|
|
25795
26002
|
listResumableSessions,
|
|
25796
26003
|
listResumableSessionsReserved,
|
|
25797
|
-
liveCursorReplayBudgetExhausted,
|
|
25798
26004
|
loadPersistedState,
|
|
25799
|
-
makeReplayToolRoom,
|
|
25800
26005
|
mapAcpToolState,
|
|
25801
26006
|
markGrokInterjectionQueued,
|
|
25802
26007
|
mcpConnectionKey,
|
|
@@ -25807,9 +26012,7 @@ export {
|
|
|
25807
26012
|
normalizeBridgeMessage,
|
|
25808
26013
|
normalizeBridgePart,
|
|
25809
26014
|
normalizeBridgeToolDiff,
|
|
25810
|
-
normalizedToolKind,
|
|
25811
26015
|
omitActiveSpawnDuration,
|
|
25812
|
-
orderedReplayTools,
|
|
25813
26016
|
orkestratorToolPermissionOption,
|
|
25814
26017
|
parkGrokElicitation,
|
|
25815
26018
|
parkGrokInteraction,
|
|
@@ -25853,10 +26056,8 @@ export {
|
|
|
25853
26056
|
pushToolPart,
|
|
25854
26057
|
raceAbort,
|
|
25855
26058
|
readJson,
|
|
25856
|
-
reconcileCursorToolMetadata,
|
|
25857
26059
|
reconcileStaleToolParts,
|
|
25858
26060
|
recordCursorTaskPrompt,
|
|
25859
|
-
recordCursorToolReplayRun,
|
|
25860
26061
|
recordTurnUsage,
|
|
25861
26062
|
rememberCatalog,
|
|
25862
26063
|
rememberHistoryMessage,
|
|
@@ -25864,8 +26065,6 @@ export {
|
|
|
25864
26065
|
rememberTrimmedToolCalls,
|
|
25865
26066
|
renderAcpToolSource,
|
|
25866
26067
|
renderDiffHunks,
|
|
25867
|
-
replayOutputHash,
|
|
25868
|
-
replayToolMetadataBytes,
|
|
25869
26068
|
requestGrokInterjection,
|
|
25870
26069
|
requestPathname,
|
|
25871
26070
|
requestPromptWithRetriableProviderRetries,
|
|
@@ -25884,7 +26083,6 @@ export {
|
|
|
25884
26083
|
route,
|
|
25885
26084
|
safeDiffPath,
|
|
25886
26085
|
saturatedText,
|
|
25887
|
-
scheduleCursorToolMetadataReconcile,
|
|
25888
26086
|
schedulePersist,
|
|
25889
26087
|
scheduleStreamingPersist,
|
|
25890
26088
|
sendJson,
|
|
@@ -25925,7 +26123,6 @@ export {
|
|
|
25925
26123
|
toolCallLifecycle,
|
|
25926
26124
|
toolCallLocationPath,
|
|
25927
26125
|
toolPartAgentId,
|
|
25928
|
-
transcriptToolParts,
|
|
25929
26126
|
trimNoticePartId,
|
|
25930
26127
|
trimPartsTo,
|
|
25931
26128
|
trimmedToolCalls,
|