orkestrator 2.35.4-beta → 2.36.0
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 +1733 -554
- package/dist/main.js +199894 -190292
- package/package.json +3 -3
- package/resources/acp-bridge/dist/index.js +1471 -537
- package/resources/claude-bridge/dist/index.js +1231 -160
- package/resources/codex-bridge/dist/index.js +1521 -243
- package/resources/cursor-bridge/dist/index.js +932 -51
- package/resources/cursor-bridge/runtime/install.json +1 -1
- package/resources/pi-bridge/dist/index.js +964 -53
- package/resources/pi-bridge/runtime/install.json +1 -1
|
@@ -499,6 +499,7 @@ var port = parsePort(process.env.PORT);
|
|
|
499
499
|
var hostname = process.env.HOSTNAME?.trim() || "127.0.0.1";
|
|
500
500
|
var workingDirectory = resolve(process.env.CWD?.trim() || process.cwd());
|
|
501
501
|
var authToken = process.env.PI_BRIDGE_TOKEN?.trim() || randomBytes(32).toString("base64url");
|
|
502
|
+
delete process.env.PI_BRIDGE_TOKEN;
|
|
502
503
|
function stateFilePath() {
|
|
503
504
|
const directory = process.env.PI_BRIDGE_STATE_DIR?.trim();
|
|
504
505
|
return directory ? resolve(directory, "state.json") : null;
|
|
@@ -2434,6 +2435,27 @@ var SUPPRESSED_COMPOSER_PARAMETERS = Object.freeze({
|
|
|
2434
2435
|
claude: Object.freeze(["parameter:thinking", "parameter:context1m"]),
|
|
2435
2436
|
cursor: Object.freeze(["parameter:variant"])
|
|
2436
2437
|
});
|
|
2438
|
+
var COMPACT_INSTRUCTIONS_MAX_LENGTH = 16000;
|
|
2439
|
+
function parseCompactInstructionsBody(body) {
|
|
2440
|
+
if (body === undefined || body === null)
|
|
2441
|
+
return { ok: true };
|
|
2442
|
+
if (typeof body !== "object" || Array.isArray(body)) {
|
|
2443
|
+
return { ok: false, error: "Compact request body must be an object" };
|
|
2444
|
+
}
|
|
2445
|
+
const raw = body.instructions;
|
|
2446
|
+
if (raw === undefined)
|
|
2447
|
+
return { ok: true };
|
|
2448
|
+
if (typeof raw !== "string")
|
|
2449
|
+
return { ok: false, error: "instructions must be a string" };
|
|
2450
|
+
const instructions = raw.trim();
|
|
2451
|
+
if (instructions.length > COMPACT_INSTRUCTIONS_MAX_LENGTH) {
|
|
2452
|
+
return {
|
|
2453
|
+
ok: false,
|
|
2454
|
+
error: `instructions must be at most ${COMPACT_INSTRUCTIONS_MAX_LENGTH} characters`
|
|
2455
|
+
};
|
|
2456
|
+
}
|
|
2457
|
+
return instructions ? { ok: true, instructions } : { ok: true };
|
|
2458
|
+
}
|
|
2437
2459
|
function isNativeAgentExecutionPolicy(value) {
|
|
2438
2460
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
2439
2461
|
return false;
|
|
@@ -4081,6 +4103,7 @@ var COORDINATOR_CONTROL_TOOL_NAMES = Object.freeze([
|
|
|
4081
4103
|
"update_schedule",
|
|
4082
4104
|
"update_ticket"
|
|
4083
4105
|
]);
|
|
4106
|
+
var COORDINATOR_PROJECT_HOME_MESSAGE_WINDOW_MS = 3 * 60 * 60000;
|
|
4084
4107
|
|
|
4085
4108
|
// ../protocol/src/agent-mail.ts
|
|
4086
4109
|
var AGENT_MAIL_MAX_BODY_BYTES = 32 * 1024;
|
|
@@ -4132,7 +4155,7 @@ var NATIVE_AGENT_MAIL_CAPABILITIES = Object.freeze(Object.fromEntries(AGENT_PLAT
|
|
|
4132
4155
|
// ../protocol/src/secret-redaction.ts
|
|
4133
4156
|
var TEXT_RULES = [
|
|
4134
4157
|
{
|
|
4135
|
-
pattern: /([a-z][a-z0-9+.-]*:\/\/)[^/\s:@]+(?::[^/\s@]*)?@/gi,
|
|
4158
|
+
pattern: /(?<![a-z0-9+.-])([a-z][a-z0-9+.-]*:\/\/)[^/\s:@]+(?::[^/\s@]*)?@/gi,
|
|
4136
4159
|
replacement: "$1[redacted]@"
|
|
4137
4160
|
},
|
|
4138
4161
|
{
|
|
@@ -4152,7 +4175,7 @@ var TEXT_RULES = [
|
|
|
4152
4175
|
{ pattern: /\bAKIA[0-9A-Z]{12,}/g, replacement: "[redacted]" },
|
|
4153
4176
|
{ pattern: /\bAIza[0-9A-Za-z_-]{20,}/g, replacement: "[redacted]" },
|
|
4154
4177
|
{
|
|
4155
|
-
pattern:
|
|
4178
|
+
pattern: /(?<![A-Za-z0-9_-])(-*\b(?:[A-Za-z0-9]+[_-])*(?:api[_-]?key|apikey|access[_-]?token|refresh[_-]?token|auth[_-]?token|token|secret|client[_-]?secret|password|passwd|passphrase|authorization))("?\s*[:=]\s*)("?)(?!Bearer\b|Basic\b|\[redacted\])[^\s"',;)&]{6,}\3/gi,
|
|
4156
4179
|
replacement: "$1$2[redacted]"
|
|
4157
4180
|
}
|
|
4158
4181
|
];
|
|
@@ -28809,8 +28832,10 @@ function stackFrames(target, message) {
|
|
|
28809
28832
|
`).filter((line) => /^\s*at\s/.test(line)).slice(0, MAX_STACK_FRAMES).map((line) => boundedText3(relativeFrame(line), MAX_FRAME_CHARS));
|
|
28810
28833
|
return frames.length > 0 ? frames : undefined;
|
|
28811
28834
|
}
|
|
28812
|
-
function describe2(error, includeStack, depth) {
|
|
28835
|
+
function describe2(error, includeStack, includeMessage, depth) {
|
|
28813
28836
|
if (typeof error !== "object" || error === null) {
|
|
28837
|
+
if (!includeMessage)
|
|
28838
|
+
return { name: "NonError" };
|
|
28814
28839
|
return {
|
|
28815
28840
|
name: "NonError",
|
|
28816
28841
|
message: typeof error === "string" ? boundedText3(error, MAX_MESSAGE_CHARS) : `[${typeof error}]`
|
|
@@ -28827,7 +28852,7 @@ function describe2(error, includeStack, depth) {
|
|
|
28827
28852
|
const details = { name };
|
|
28828
28853
|
if (commandFailure)
|
|
28829
28854
|
details.outputOmitted = true;
|
|
28830
|
-
else if (message)
|
|
28855
|
+
else if (message && includeMessage)
|
|
28831
28856
|
details.message = boundedText3(message, MAX_MESSAGE_CHARS);
|
|
28832
28857
|
const code = read(error, "code");
|
|
28833
28858
|
const safeCode = finite(code) ?? matching(code, CODE_PATTERN);
|
|
@@ -28855,13 +28880,13 @@ function describe2(error, includeStack, depth) {
|
|
|
28855
28880
|
details.errorCount = members.length;
|
|
28856
28881
|
const cause = read(error, "cause") ?? (Array.isArray(members) ? members[0] : undefined);
|
|
28857
28882
|
if (cause !== undefined && cause !== null && depth < MAX_CAUSE_DEPTH) {
|
|
28858
|
-
details.cause = describe2(cause, false, depth + 1);
|
|
28883
|
+
details.cause = describe2(cause, false, includeMessage, depth + 1);
|
|
28859
28884
|
}
|
|
28860
28885
|
return details;
|
|
28861
28886
|
}
|
|
28862
28887
|
function formatLogError(error, options = {}) {
|
|
28863
28888
|
try {
|
|
28864
|
-
return brand(describe2(error, options.stack !== false, 0));
|
|
28889
|
+
return brand(describe2(error, options.stack !== false, options.message !== false, 0));
|
|
28865
28890
|
} catch {
|
|
28866
28891
|
return brand({ name: "Error", message: "[unreadable]" });
|
|
28867
28892
|
}
|
|
@@ -28893,7 +28918,16 @@ var AGENT_MAIL_LOG_AREAS = defineLogAreas({
|
|
|
28893
28918
|
"agent-mail": {
|
|
28894
28919
|
description: "Delivering agent mail into waiting agent sessions.",
|
|
28895
28920
|
events: {
|
|
28896
|
-
"delivery.waiting": "The drain passed over a pending message, for a reason it had not yet logged."
|
|
28921
|
+
"delivery.waiting": "The drain passed over a pending message, for a reason it had not yet logged.",
|
|
28922
|
+
"drain.new-mail-failed": "Draining newly received mail failed; the next sweep delivers it.",
|
|
28923
|
+
"presence.sync-failed": "Mailboxes could not be synchronized.",
|
|
28924
|
+
"inject.verified": "An injected message's delivery was checked. Ids and decisions only.",
|
|
28925
|
+
"inject.dispatched": "Messages were dispatched into a session. Ids and decisions only.",
|
|
28926
|
+
"stopped-worker.action-failed": "Nothing could act on mail for a stopped worker.",
|
|
28927
|
+
"coordinator.start-failed": "The main coordinator could not be started for a new message.",
|
|
28928
|
+
"message.placed": "A message was placed in a mailbox. Ids and decisions only, never subjects or bodies.",
|
|
28929
|
+
"budget.hold-notify-failed": "The coordinator could not be told about held worker mail.",
|
|
28930
|
+
"budget.reset-failed": "The mail budget could not be reset for a prompted tab."
|
|
28897
28931
|
}
|
|
28898
28932
|
}
|
|
28899
28933
|
});
|
|
@@ -28915,6 +28949,30 @@ var BACKEND_LOG_AREAS = defineLogAreas({
|
|
|
28915
28949
|
"job.failed": "One pass of the job named in `scope` failed; its next pass retries.",
|
|
28916
28950
|
...THROTTLE_LOG_EVENTS
|
|
28917
28951
|
}
|
|
28952
|
+
},
|
|
28953
|
+
backend: {
|
|
28954
|
+
description: "The backend process: startup, background notices and shutdown.",
|
|
28955
|
+
events: {
|
|
28956
|
+
starting: "The backend process is starting.",
|
|
28957
|
+
"ssh-socket.resolved": "An SSH agent socket was found.",
|
|
28958
|
+
"ssh-socket.missing": "No usable SSH agent socket was found.",
|
|
28959
|
+
"standalone-updater.mismatch": "--standalone-updater does not match --data-dir, so self-update is off.",
|
|
28960
|
+
"instance.publish-failed": "The instance descriptor could not be published.",
|
|
28961
|
+
"instance.republish-failed": "The instance descriptor could not be republished; a later pass retries.",
|
|
28962
|
+
"parent.exited": "The parent process exited, so local servers are shutting down.",
|
|
28963
|
+
"startup.step-failed": "One part of startup failed and the backend carried on; `step` says which.",
|
|
28964
|
+
"startup.setup-fence-failed": "An environment's interrupted setup could not be fenced.",
|
|
28965
|
+
"startup.setup-adopt-failed": "An environment's pending setup could not be adopted.",
|
|
28966
|
+
"startup.deletion-pending": "An interrupted environment deletion stays pending. Its owning step logged the detail.",
|
|
28967
|
+
"startup.looped-review-pending": "Cleanup of the retired Looped Review stays pending.",
|
|
28968
|
+
"notice.failed": "A background notice after a turn or prompt failed; `step` says which.",
|
|
28969
|
+
"artifacts.live-unavailable": "Live interactive artifacts are unavailable.",
|
|
28970
|
+
"shutdown.step-failed": "One part of shutdown failed and the rest went on; `step` says which.",
|
|
28971
|
+
"shutdown.signal-received": "A signal started shutdown, which tells a clean quit from the backend being killed.",
|
|
28972
|
+
"shutdown.finished": "Shutdown finished, and the process exits with `code`.",
|
|
28973
|
+
"port-policy.second-backend": "Another backend serves the default data directory, so this one avoids its ports.",
|
|
28974
|
+
"port-policy.serve-on-free-port": "--tailscale-serve is on a free gateway port; pass --port with --strict-gateway-port to keep one."
|
|
28975
|
+
}
|
|
28918
28976
|
}
|
|
28919
28977
|
});
|
|
28920
28978
|
|
|
@@ -28922,11 +28980,12 @@ var BACKEND_LOG_AREAS = defineLogAreas({
|
|
|
28922
28980
|
var MAX_BRIDGE_DIAGNOSTIC_BYTES = 8192;
|
|
28923
28981
|
var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
28924
28982
|
"bridge.diagnostics": {
|
|
28925
|
-
description: "Metadata snapshots of bridge turns and processes,
|
|
28983
|
+
description: "Metadata snapshots of bridge turns and processes: lifecycle, stalls and a keepalive at info, every minute at debug, and each change at trace. docs/architecture/bridge-diagnostics.md reads them.",
|
|
28926
28984
|
tag: "bridge-diagnostics",
|
|
28927
28985
|
maxStringChars: MAX_BRIDGE_DIAGNOSTIC_BYTES,
|
|
28928
28986
|
events: {
|
|
28929
|
-
heartbeat: "
|
|
28987
|
+
heartbeat: "A periodic snapshot of an open turn or process: every minute at debug; at info only as stall evidence (a stall starting or clearing, a late timer, a change during a silent stall) or the ten-minute keepalive.",
|
|
28988
|
+
change: "At trace only: a snapshot written as soon as the phase, the pending tools or a counter past its threshold changes.",
|
|
28930
28989
|
"send-started": "A turn or process diagnostic scope began.",
|
|
28931
28990
|
"send-resolved": "The provider accepted a dispatch.",
|
|
28932
28991
|
"cancel-requested": "Cancellation of a turn was requested.",
|
|
@@ -29007,6 +29066,7 @@ var BRIDGE_LOG_AREAS = defineLogAreas({
|
|
|
29007
29066
|
"session.created": "A session was created or recovered.",
|
|
29008
29067
|
"session.delete-failed": "Deleting a session failed.",
|
|
29009
29068
|
"session.fork-failed": "Forking a session failed.",
|
|
29069
|
+
"session.policy-widening-refused": "A config request tried to widen a live session's execution policy and was refused; widened names the axes.",
|
|
29010
29070
|
"session.rename-failed": "Renaming a session failed.",
|
|
29011
29071
|
"session.resolve-failed": "A session could not be found or loaded for a request; action names the request.",
|
|
29012
29072
|
"session.rewind-failed": "Rewinding session files failed.",
|
|
@@ -29139,6 +29199,7 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
29139
29199
|
"backend.keychain-link-remove-failed": "An agent-test profile kept a legacy link to the host keychain.",
|
|
29140
29200
|
"backend.start-failed": "The Local backend did not start; continuing with remote machines.",
|
|
29141
29201
|
"clipboard.write-failed": "Writing text to the system clipboard failed.",
|
|
29202
|
+
"dev-mode.ignored-packaged": "A packaged app was launched with ELECTRON_DEV=1 and ignored it; it loads its bundled renderer.",
|
|
29142
29203
|
"instance.already-running": "Another instance holds this data directory; this one will quit.",
|
|
29143
29204
|
"main-thread.stalled": "A timer fired late, so windows, IPC and the stdout reader waited.",
|
|
29144
29205
|
"quit.stopping-backend": "The app is quitting and has asked the Local backend to stop.",
|
|
@@ -29211,7 +29272,8 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
29211
29272
|
description: "Preparing the pinned agent toolchain at desktop startup.",
|
|
29212
29273
|
events: {
|
|
29213
29274
|
"bootstrap-progress.show-failed": "The toolchain progress window could not be shown.",
|
|
29214
|
-
"prepare.failed": "Preparing the pinned agent tools failed."
|
|
29275
|
+
"prepare.failed": "Preparing the pinned agent tools failed.",
|
|
29276
|
+
"prepare.ready": "The pinned agent tools were verified and activated; durationMs is how long startup waited."
|
|
29215
29277
|
}
|
|
29216
29278
|
},
|
|
29217
29279
|
"artifact-host": {
|
|
@@ -29225,7 +29287,7 @@ var DESKTOP_LOG_AREAS = defineLogAreas({
|
|
|
29225
29287
|
// ../protocol/src/log-vocabulary/environment.ts
|
|
29226
29288
|
var ENVIRONMENT_LOG_AREAS = defineLogAreas({
|
|
29227
29289
|
environment: {
|
|
29228
|
-
description: "Environment naming,
|
|
29290
|
+
description: "Environment naming, setup, status, moves, deletion and cleanup afterwards.",
|
|
29229
29291
|
events: {
|
|
29230
29292
|
"cleanup.branch-kept": "A deleted environment's local branch was kept, as it may hold unmerged work.",
|
|
29231
29293
|
"rename.failed": "Naming an environment from its pending prompt failed for the first time.",
|
|
@@ -29234,6 +29296,40 @@ var ENVIRONMENT_LOG_AREAS = defineLogAreas({
|
|
|
29234
29296
|
"setup.attention-not-recorded": "Held setup could not be recorded as needing the user's attention.",
|
|
29235
29297
|
"setup.coordinator-not-notified": "The worker's coordinator could not be told that its setup is held for approval.",
|
|
29236
29298
|
"setup.unknown-environment": "The renderer was asked to act on the setup of an environment it does not hold.",
|
|
29299
|
+
"cleanup.rearmed": "A deleted environment's stopped cleanup is retried once under a new backend version.",
|
|
29300
|
+
"cleanup.exhausted": "A deleted environment's cleanup keeps failing after its attempts; written once per environment.",
|
|
29301
|
+
"cleanup.retry-not-admitted": "A cleanup retry was not admitted; the entry stays for the next start.",
|
|
29302
|
+
"cleanup.step-failed": "One step of a deleted environment's cleanup failed; a later reconcile retries it.",
|
|
29303
|
+
"cleanup.record-failed": "A finished cleanup step could not be recorded, so it may run again.",
|
|
29304
|
+
"cleanup.sweep-failed": "A cleanup sweep failed; written once per sweep.",
|
|
29305
|
+
"cleanup.reconcile-failed": "A cleanup reconcile pass failed; the next one retries.",
|
|
29306
|
+
"orphan-state.remove-failed": "An orphaned environment state directory could not be removed.",
|
|
29307
|
+
"orphan-state.removed": "Orphaned environment state directories were removed.",
|
|
29308
|
+
"orphan-state.sweep-failed": "Sweeping orphaned environment state failed.",
|
|
29309
|
+
"orphan-canvas.removed": "Orphaned design canvases were removed.",
|
|
29310
|
+
"orphan-canvas.sweep-failed": "Sweeping orphaned design canvases failed.",
|
|
29311
|
+
"orphan-branches.swept": "Orphaned environment branches were deleted, or kept as they may hold unmerged work.",
|
|
29312
|
+
"stray-workspace.remove-failed": "A stray workspace directory could not be removed.",
|
|
29313
|
+
"stray-workspace.removed": "Stray workspace directories were removed.",
|
|
29314
|
+
"stray-workspace.kept": "Unowned workspace directories that hold files were kept; remove them by hand if unneeded.",
|
|
29315
|
+
"temp-files.removed": "Abandoned temp files were removed.",
|
|
29316
|
+
"status.ownership-probe-failed": "A strict container ownership probe failed, so the stored status is kept.",
|
|
29317
|
+
"status.docker-error": "A transient Docker error stopped a status read, so the stored status is kept.",
|
|
29318
|
+
"setup.clear-launch-failed": "A pending agent launch could not be cleared after setup failed.",
|
|
29319
|
+
"setup.record-failure-failed": "A setup failure before its first attempt could not be recorded.",
|
|
29320
|
+
"lifecycle.failed": "Starting, rebuilding or recreating an environment failed; `operation` says which.",
|
|
29321
|
+
"tab-teardown.pending": "A tab's teardown failed and stays pending; the reconcile sweep retries.",
|
|
29322
|
+
"tab-reconcile.skipped": "Orphaned tab reconciliation was skipped because pane layouts are unreadable.",
|
|
29323
|
+
"orphan-session.reaped": "A native session no tab references was torn down.",
|
|
29324
|
+
"handoff-sweep.failed": "Sweeping transferred transcripts no tab references failed.",
|
|
29325
|
+
"delete.terminals-survived": "Terminal process trees outlived termination, so the deletion stops.",
|
|
29326
|
+
"delete.artifacts-left": "Graph run artifact directories were not removed.",
|
|
29327
|
+
"delete.worktrees-kept": "Graph runs kept branch worktrees.",
|
|
29328
|
+
"delete.step-failed": "One best-effort part of deleting an environment failed; `step` says which, and the rest goes on.",
|
|
29329
|
+
"merge-cleanup.resume-failed": "A merge cleanup interrupted by a restart could not be resumed.",
|
|
29330
|
+
"move.sessions-not-moved": "A provider's sessions could not follow a moved environment.",
|
|
29331
|
+
"move.recovery-failed": "Recovering an interrupted environment move failed.",
|
|
29332
|
+
"stop.settle-activity-failed": "Agent activity could not be settled after a runtime stopped.",
|
|
29237
29333
|
...THROTTLE_LOG_EVENTS
|
|
29238
29334
|
}
|
|
29239
29335
|
}
|
|
@@ -29242,10 +29338,50 @@ var ENVIRONMENT_LOG_AREAS = defineLogAreas({
|
|
|
29242
29338
|
// ../protocol/src/log-vocabulary/gateway.ts
|
|
29243
29339
|
var GATEWAY_LOG_AREAS = defineLogAreas({
|
|
29244
29340
|
gateway: {
|
|
29245
|
-
description: "The
|
|
29341
|
+
description: "The gateway other devices, browsers and the desktop connect through.",
|
|
29246
29342
|
events: {
|
|
29247
29343
|
"remote.start-failed": "The desktop could not start the remote gateway.",
|
|
29248
|
-
"remote.stop-failed": "The desktop could not stop the remote gateway cleanly."
|
|
29344
|
+
"remote.stop-failed": "The desktop could not stop the remote gateway cleanly.",
|
|
29345
|
+
disabled: "The gateway is disabled by its environment variable.",
|
|
29346
|
+
"tailscale.no-address": "No Tailscale address was found, so the gateway did not start.",
|
|
29347
|
+
"tailscale.no-address-fallback": "No Tailscale address was found, so the gateway binds its fallback address.",
|
|
29348
|
+
"control.listening": "The backend control listener is up.",
|
|
29349
|
+
"browser.listening": "The browser listener is up.",
|
|
29350
|
+
"browser.unavailable": "The browser listener could not start; control remains if started, or loopback is attempted.",
|
|
29351
|
+
"browser.unavailable-degraded": "No browser listener was started (`reason=no-tailscale-address`); control remains if started, or loopback is attempted.",
|
|
29352
|
+
"loopback.listening": "The loopback client listener is up.",
|
|
29353
|
+
"loopback.unavailable": "The loopback client listener could not start.",
|
|
29354
|
+
"auth-token.stored": "The gateway token's file was written. The path only, never the token.",
|
|
29355
|
+
"auth-token.persist-failed": "The gateway token could not be saved.",
|
|
29356
|
+
"port.fallback": "The preferred port was taken, so a nearby one is used.",
|
|
29357
|
+
"port.fallback-distant": "The preferred port and those nearby were taken, so another is used.",
|
|
29358
|
+
"request.failed": "A gateway request failed. Throttled: repeats are counted, not written.",
|
|
29359
|
+
"websocket.upgrade-failed": "A WebSocket upgrade failed.",
|
|
29360
|
+
"events.client-dropped": "An event-stream client buffered too much and was dropped; it reconnects and refetches.",
|
|
29361
|
+
"proxy.client-disconnected": "A proxy client went away, so its upstream request was aborted.",
|
|
29362
|
+
"throttle.suppressed": "Repeats of the throttled `site` were counted over a window, not written.",
|
|
29363
|
+
"throttle.recovered": "The throttled `site` succeeded again, so its fault has cleared.",
|
|
29364
|
+
"throttle.evicted": "The tracked-key limit dropped the `site`, so no recovered line follows unless it fails again."
|
|
29365
|
+
}
|
|
29366
|
+
},
|
|
29367
|
+
"gateway.terminal": {
|
|
29368
|
+
description: "The gateway's terminal WebSocket.",
|
|
29369
|
+
events: {
|
|
29370
|
+
"upgrade-rejected": "A terminal WebSocket upgrade was refused.",
|
|
29371
|
+
"socket-error": "A terminal WebSocket reported an error.",
|
|
29372
|
+
"subscription-failed": "A terminal subscription failed.",
|
|
29373
|
+
"operation-failed": "A terminal operation failed. Fixed text: the operation can hold terminal input."
|
|
29374
|
+
}
|
|
29375
|
+
},
|
|
29376
|
+
"gateway.tailscale": {
|
|
29377
|
+
description: "Tailscale Serve for desktop web access and a standalone backend.",
|
|
29378
|
+
events: {
|
|
29379
|
+
"web-access.disable-failed": "Desktop web access could not be turned off.",
|
|
29380
|
+
"web-access.enable-failed": "Desktop web access could not be turned on.",
|
|
29381
|
+
"web-access.cleanup-failed": "Cleaning up after a failed enable also failed.",
|
|
29382
|
+
"web-access.reset-failed": "Desktop web access could not be reset.",
|
|
29383
|
+
"startup.init-failed": "Desktop web access could not be initialized at startup.",
|
|
29384
|
+
available: "Tailscale Serve is publishing the gateway."
|
|
29249
29385
|
}
|
|
29250
29386
|
}
|
|
29251
29387
|
});
|
|
@@ -29256,6 +29392,18 @@ var LOCAL_SERVER_LOG_AREAS = defineLogAreas({
|
|
|
29256
29392
|
description: "Agent bridge processes the backend runs on the host.",
|
|
29257
29393
|
events: {
|
|
29258
29394
|
"bridge.not-answering": "A bridge with work in progress fails health checks, so it is not restarted yet.",
|
|
29395
|
+
"bridge-runtime.installing": "A bridge runtime is being installed.",
|
|
29396
|
+
"bridge-runtime.installed": "A bridge runtime finished installing.",
|
|
29397
|
+
"opencode.database-lost-retrying": "OpenCode lost its shared database at startup, so it is retried.",
|
|
29398
|
+
"server.stopping": "A local server is being stopped, for the fixed `reason` given.",
|
|
29399
|
+
"reaper.tmux-list-failed": "Orphaned claude-tmux sessions could not be listed.",
|
|
29400
|
+
"reaper.tmux-kill-failed": "An orphaned tmux session could not be killed.",
|
|
29401
|
+
"reaper.tmux-reaped": "Orphaned claude-tmux sessions of a deleted environment were killed.",
|
|
29402
|
+
"reaper.runtime-root-remove-failed": "A claude-tmux runtime root could not be removed; it stays for a retry.",
|
|
29403
|
+
"reaper.server-unidentified": "An orphan candidate could not be identified, so its record is kept.",
|
|
29404
|
+
"reaper.server-refused": "An orphan candidate leads no process group, so it was not reaped.",
|
|
29405
|
+
"reaper.server-reaping": "An orphaned server is being stopped.",
|
|
29406
|
+
"reaper.server-kill-failed": "An orphaned server did not exit.",
|
|
29259
29407
|
...THROTTLE_LOG_EVENTS
|
|
29260
29408
|
}
|
|
29261
29409
|
}
|
|
@@ -29297,7 +29445,12 @@ var MODEL_LOG_AREAS = defineLogAreas({
|
|
|
29297
29445
|
models: {
|
|
29298
29446
|
description: "Agent model catalogues and their persistent caches.",
|
|
29299
29447
|
events: {
|
|
29300
|
-
"cache.write-failed": "A successful catalogue refresh could not update the host cache."
|
|
29448
|
+
"cache.write-failed": "A successful catalogue refresh could not update the host cache.",
|
|
29449
|
+
"seed.pi-failed": "The host Pi model catalogue could not be seeded; the next launch retries.",
|
|
29450
|
+
"bridge.not-ready": "The first-use catalogue bridge did not become ready.",
|
|
29451
|
+
"bridge.start-failed": "The first-use catalogue bridge failed to start.",
|
|
29452
|
+
"probe.exit-unclean": "A catalogue probe or sign-in server did not exit cleanly.",
|
|
29453
|
+
"download.deferred": "A model catalogue could not be downloaded yet."
|
|
29301
29454
|
}
|
|
29302
29455
|
}
|
|
29303
29456
|
});
|
|
@@ -29308,8 +29461,62 @@ var NATIVE_AGENT_LOG_AREAS = defineLogAreas({
|
|
|
29308
29461
|
description: "Native agent sessions and what the backend reads from their bridges.",
|
|
29309
29462
|
events: {
|
|
29310
29463
|
"catalogue.outdated-bridge": "A bridge predates the command catalogue, so its commands stay unavailable.",
|
|
29464
|
+
"compact.instructions-ignored": "A bridge compacted without confirming the instructions sent with /compact: it predates them.",
|
|
29465
|
+
"handoff.summary-read-failed": "Change summaries could not be read for a handoff, so the carrier says they are unmeasured.",
|
|
29466
|
+
"handoff.consume-failed": "A delivered handoff could not be marked consumed.",
|
|
29467
|
+
"job.pr-refresh-rollback-failed": "Rolling back a pull request refresh for a job failed.",
|
|
29468
|
+
"job.resend-queue-failed": "A resend could not be queued for a job.",
|
|
29469
|
+
"interaction.requests-dropped": "Interaction requests that could not be mapped were dropped.",
|
|
29470
|
+
"interaction.observe-failed": "Observing a session's interactions failed. Error class only.",
|
|
29471
|
+
"human-prompt.listener-failed": "A human prompt listener threw; the others still run.",
|
|
29472
|
+
"question.attention-record-failed": "Attention for an async question could not be recorded; the transcript stays readable.",
|
|
29473
|
+
"activity.reconcile-failed": "Reconciling an environment's activity failed. Error class only.",
|
|
29474
|
+
"activity.persist-failed": "An environment's activity could not be saved.",
|
|
29475
|
+
"pr-refresh.schedule-failed": "A pull request refresh after completion could not be scheduled.",
|
|
29476
|
+
"launch.startup-failed": "A startup launch failed; it retries unless `permanent`.",
|
|
29477
|
+
"queue.failing": "A native prompt queue keeps failing. The key and reason only, never the prompt.",
|
|
29478
|
+
"provider.retire-failed": "Retiring an obsolete provider failed.",
|
|
29479
|
+
"workflow-result.store-unavailable": "The workflow result store is unavailable, so the provider's result is used.",
|
|
29480
|
+
"catalogue.refresh-failed": "A provider's command catalogue could not be refreshed.",
|
|
29481
|
+
"dispatch.attach-failed": "Attaching an agent before dispatch failed; the prompt request answers authoritatively.",
|
|
29482
|
+
"coordinator-context.ack-failed": "Coordinator repository context could not be acknowledged.",
|
|
29483
|
+
"naming.prepare-failed": "First-prompt naming could not be prepared; the prompt still goes ahead.",
|
|
29484
|
+
"interrupt.persist-failed": "A turn interrupt could not be saved, so automatic publication stays fenced.",
|
|
29485
|
+
"resume.close-replaced-failed": "The session a resume replaced could not be closed.",
|
|
29486
|
+
"sign-in.check-failed": "A turn could not be checked for a login refusal.",
|
|
29487
|
+
"sign-in.resend-failed": "Sending refused prompts after sign-in failed.",
|
|
29488
|
+
"sign-in.prompt-resend-failed": "One refused prompt could not be sent again after sign-in. Error class only.",
|
|
29489
|
+
"shutdown.checkpoints-skipped": "Shutdown skipped display-tail checkpoints; provider history stays authoritative. Count only.",
|
|
29490
|
+
"turn-recovery.failed": "Recovering an incomplete turn failed.",
|
|
29491
|
+
"turn-recovery.exhausted": "A turn failed again after automatic recovery and is left for the user.",
|
|
29492
|
+
"turn-recovery.retrying": "An incomplete or provider-failed turn is being retried automatically.",
|
|
29493
|
+
"usage-limit.resend-failed": "Resending after a usage limit failed. An unknown send stays in the journal.",
|
|
29494
|
+
"title.strategy-failed": "A session title strategy failed, so the next is tried. Content-free: the error can quote the prompt.",
|
|
29311
29495
|
...THROTTLE_LOG_EVENTS
|
|
29312
29496
|
}
|
|
29497
|
+
},
|
|
29498
|
+
"native-agent.goal": {
|
|
29499
|
+
description: "The /goal loop: advancing goals and their verifiers.",
|
|
29500
|
+
events: {
|
|
29501
|
+
"advance.failed": "A goal could not advance; the next sweep retries.",
|
|
29502
|
+
"attention.record-failed": "Attention for a goal could not be recorded.",
|
|
29503
|
+
"turn-end.settle-failed": "Turn-end work for a goal could not be settled.",
|
|
29504
|
+
"verifier.finish-failed": "A verifier failed to finish; the goal stays verifying, so the next sweep runs it again.",
|
|
29505
|
+
"verifier.stop-failed": "An earlier verifier could not be stopped.",
|
|
29506
|
+
"recover.failed": "Goals could not be recovered at startup."
|
|
29507
|
+
}
|
|
29508
|
+
},
|
|
29509
|
+
"native-agent.opencode": {
|
|
29510
|
+
description: "The OpenCode provider: its request monitor, retries and agent tools.",
|
|
29511
|
+
events: {
|
|
29512
|
+
"retry.abort-failed": "Aborting an automatic retry failed. Error class only.",
|
|
29513
|
+
"retry.abort-not-scheduled": "An automatic retry abort could not be scheduled. Error class only.",
|
|
29514
|
+
"agent-tools.unavailable": "OpenCode agent tools remain unavailable for a session.",
|
|
29515
|
+
"coordinator-servers.unavailable": "OpenCode coordinator research servers are unavailable.",
|
|
29516
|
+
"monitor.reconnecting": "The request monitor lost its stream and is reconnecting. Error class only.",
|
|
29517
|
+
"worker-limit.reached": "The bounded request workers are full, so the stream restarts and a snapshot reconciles.",
|
|
29518
|
+
"request.failed": "Handling a request event failed, so the stream restarts. Error class only."
|
|
29519
|
+
}
|
|
29313
29520
|
}
|
|
29314
29521
|
});
|
|
29315
29522
|
|
|
@@ -29332,6 +29539,17 @@ var PREVIEW_LOG_AREAS = defineLogAreas({
|
|
|
29332
29539
|
"partitions.retry-forgotten-failed": "Retrying a forgotten preview cleanup failed.",
|
|
29333
29540
|
"port-hints.persist-failed": "Preview port hints could not be saved.",
|
|
29334
29541
|
"transport.close-failed": "A preview transport could not be closed.",
|
|
29542
|
+
"ca-bundle.read-failed": "The upstream CA bundle could not be read.",
|
|
29543
|
+
"publication.start-failed": "Private preview publication did not start.",
|
|
29544
|
+
"publication.reconfigure-failed": "Preview publication could not be reconfigured.",
|
|
29545
|
+
"publication.listening": "Private preview origins are listening.",
|
|
29546
|
+
"certificate.reloaded": "The preview certificate was reloaded.",
|
|
29547
|
+
"access.revoked-close-failed": "A revoked preview resource could not be closed. Error class only.",
|
|
29548
|
+
"registry.invalid-definition": "An invalid stored preview service definition was ignored.",
|
|
29549
|
+
"registry.environment-reconcile-failed": "An environment's preview services could not be reconciled.",
|
|
29550
|
+
"registry.resolver-failed": "A preview resolver failed. Error class only.",
|
|
29551
|
+
"registry.revocation-listener-failed": "A preview revocation listener threw. Error class only.",
|
|
29552
|
+
"registry.change-emit-failed": "A preview change event could not be emitted. Error class only.",
|
|
29335
29553
|
...THROTTLE_LOG_EVENTS
|
|
29336
29554
|
}
|
|
29337
29555
|
}
|
|
@@ -29350,9 +29568,33 @@ var RUNTIME_LOG_AREAS = defineLogAreas({
|
|
|
29350
29568
|
// ../protocol/src/log-vocabulary/terminal.ts
|
|
29351
29569
|
var TERMINAL_LOG_AREAS = defineLogAreas({
|
|
29352
29570
|
terminal: {
|
|
29353
|
-
description: "The renderer's
|
|
29571
|
+
description: "Terminals. The renderer's lines stay in the browser console; the backend's reach the saved log.",
|
|
29354
29572
|
events: {
|
|
29355
29573
|
"input.undelivered": "A keystroke did not reach a shell: `no-session` or `not-delivered`.",
|
|
29574
|
+
"orphan.reaped": "A terminal no tab references was closed.",
|
|
29575
|
+
"agent-completion.notify-failed": "A terminal agent's completion could not be reported.",
|
|
29576
|
+
"activity.record-failed": "Terminal environment activity could not be recorded.",
|
|
29577
|
+
"pty.exit-listener-failed": "A terminal exit listener threw; the others still run.",
|
|
29578
|
+
"pty.exit-notify-failed": "Notifying a terminal's exit failed.",
|
|
29579
|
+
"pty.late-exit-listener-failed": "A listener added after a terminal exited threw.",
|
|
29580
|
+
"setup.pty-reused": "A setup terminal reused its existing PTY.",
|
|
29581
|
+
"setup.pty-spawning": "A setup terminal is spawning its PTY. The argument count only, never the arguments.",
|
|
29582
|
+
"setup.pty-spawned": "A setup terminal's PTY started.",
|
|
29583
|
+
"setup.pty-exited": "A setup terminal's PTY exited.",
|
|
29584
|
+
"setup.preparing": "Workspace preparation started in the setup terminal.",
|
|
29585
|
+
"setup.session-creating": "A setup session is being created.",
|
|
29586
|
+
"setup.intro-emitted": "The setup intro was written to the terminal.",
|
|
29587
|
+
"setup.completed": "Setup finished.",
|
|
29588
|
+
"setup.failed": "Setup failed.",
|
|
29589
|
+
"setup.already-complete": "Setup was requested but had already finished.",
|
|
29590
|
+
"setup.renderer-ensured": "The renderer asked for setup to be running.",
|
|
29591
|
+
"setup.renderer-requested": "The renderer asked for the setup session.",
|
|
29592
|
+
"setup.renderer-requested-none": "The renderer asked for a setup session that does not exist.",
|
|
29593
|
+
"setup.no-commands": "An environment has no setup commands to run.",
|
|
29594
|
+
"setup.already-running": "Setup was requested while it was already running.",
|
|
29595
|
+
"setup.held-for-approval": "Setup is held until its commands are approved.",
|
|
29596
|
+
"setup.renderer-checked-session": "The renderer asked whether a setup terminal session exists.",
|
|
29597
|
+
"setup.renderer-requested-buffer": "The renderer asked for a setup terminal's output buffer. A size only, never its contents.",
|
|
29356
29598
|
"input.resume-failed": "Asking the backend to resume refused terminal input failed.",
|
|
29357
29599
|
"input.write-failed": "Writing input to a terminal session threw.",
|
|
29358
29600
|
"listener.remove-failed": "Removing a terminal output listener threw.",
|
|
@@ -29452,13 +29694,41 @@ var TERMINAL_LOG_AREAS = defineLogAreas({
|
|
|
29452
29694
|
// ../protocol/src/log-vocabulary/tmux.ts
|
|
29453
29695
|
var TMUX_LOG_AREAS = defineLogAreas({
|
|
29454
29696
|
tmux: {
|
|
29455
|
-
description: "
|
|
29697
|
+
description: "Claude tmux tabs: launch, the poll loop, cleanup and the tmux prompt queue.",
|
|
29456
29698
|
events: {
|
|
29457
29699
|
"poll.discovery-failed": "Finding the session's transcript failed; a later tick retries.",
|
|
29458
29700
|
"poll.snapshot-failed": "Reading the hook and transcript state failed; the next tick retries.",
|
|
29459
29701
|
"poll.drain-pending-failed": "Delivering pending hook events failed; the next tick retries.",
|
|
29460
29702
|
"poll.drain-timeouts-failed": "Delivering hook timeouts failed; the next tick retries.",
|
|
29461
29703
|
"poll.tail-failed": "Reading new transcript lines failed; the next tick retries.",
|
|
29704
|
+
"cleanup.session-stop-failed": "A tmux session could not be stopped while cleaning up an environment.",
|
|
29705
|
+
"cleanup.skipped": "Environment tmux cleanup was skipped because tmux could not be reached and nothing required it.",
|
|
29706
|
+
"cleanup.environments-load-failed": "Environments could not be loaded during tmux cleanup, so it stays incomplete.",
|
|
29707
|
+
"cleanup.kill-failed": "An environment's tmux sessions could not be killed.",
|
|
29708
|
+
"hooks.uninstall-failed": "Workspace hooks could not be uninstalled.",
|
|
29709
|
+
"hooks.git-exclude-failed": "The git exclude for Claude's local settings could not be set.",
|
|
29710
|
+
"naming.prepare-failed": "First-prompt naming could not be prepared; the prompt still goes ahead.",
|
|
29711
|
+
"orphans.skipped": "Orphan reconciliation was skipped because pane layouts are unreadable.",
|
|
29712
|
+
"orphan.reaped": "A tmux session no tab references was killed.",
|
|
29713
|
+
"orphan.kill-skipped": "An orphan tmux kill was skipped because the tmux server could not be reached.",
|
|
29714
|
+
"cli.thinking-display-probe-failed": "Probing the CLI for --thinking-display failed, so it launches without it.",
|
|
29715
|
+
"cli.fast-mode-unsupported": "The claude CLI lacks --settings, so it launches without fast mode.",
|
|
29716
|
+
"cli.effort-unsupported": "The claude CLI lacks --effort, so it launches without it.",
|
|
29717
|
+
"interactive.snapshot-failed": "An interactive snapshot failed; expected while a pane is closing.",
|
|
29718
|
+
"signal.arm-failed": "The Claude state signal could not be armed.",
|
|
29719
|
+
"signal.degraded": "The Claude state signal missed a change or rang too often, so polling stays at one second until it is re-armed.",
|
|
29720
|
+
"hook-signal.arm-failed": "The tmux hook doorbell could not be armed.",
|
|
29721
|
+
"hook-signal.degraded": "The tmux hook doorbell missed a hook, so idle tabs poll every second until it is re-armed.",
|
|
29722
|
+
"pr-refresh.schedule-failed": "A pull request refresh after a turn could not be scheduled.",
|
|
29723
|
+
"pr-probe.failed": "Probing for a pull request an agent created failed.",
|
|
29724
|
+
"activity.persist-failed": "Tmux tab activity could not be saved.",
|
|
29725
|
+
"fast-mode.persist-failed": "The launch fast mode could not be saved.",
|
|
29726
|
+
"fast-mode.repair-failed": "Fast mode metadata could not be repaired on a reattached session.",
|
|
29727
|
+
"pane.observe-failed": "A pane observation failed. Error class only: pane contents are sensitive.",
|
|
29728
|
+
"turn.failure-record-failed": "A failed turn could not be recorded.",
|
|
29729
|
+
"slash-command.settle-timeout": "Timed out waiting for a Claude slash command to settle.",
|
|
29730
|
+
"queue.failing": "A tmux prompt queue keeps failing to dispatch.",
|
|
29731
|
+
"queue.rename-failed": "An environment could not be named from its first prompt; the prompt still goes ahead.",
|
|
29462
29732
|
...THROTTLE_LOG_EVENTS
|
|
29463
29733
|
}
|
|
29464
29734
|
}
|
|
@@ -29485,7 +29755,8 @@ var UPDATER_LOG_AREAS = defineLogAreas({
|
|
|
29485
29755
|
"remote.unavailable": "Updates requested by remote clients are unavailable in this session.",
|
|
29486
29756
|
"restart-prompt.failed": "The restart prompt for a downloaded update failed.",
|
|
29487
29757
|
unavailable: "Auto-update could not be set up in this session.",
|
|
29488
|
-
"update.failed": "electron-updater reported an update error."
|
|
29758
|
+
"update.failed": "electron-updater reported an update error.",
|
|
29759
|
+
"standalone.restarting": "A standalone backend is restarting into a new version."
|
|
29489
29760
|
}
|
|
29490
29761
|
}
|
|
29491
29762
|
});
|
|
@@ -29496,11 +29767,473 @@ var WEB_ANNOTATIONS_LOG_AREAS = defineLogAreas({
|
|
|
29496
29767
|
description: "Web annotation requests and their background reconciler.",
|
|
29497
29768
|
events: {
|
|
29498
29769
|
"reconcile.failed": "A background reconcile pass failed; the next one retries.",
|
|
29770
|
+
"legacy.degraded": "Legacy annotation storage is damaged, so the previous committed copy is served read-only.",
|
|
29771
|
+
"legacy.draft-index-problem": "The legacy draft index could not be used; `status` says why.",
|
|
29772
|
+
"legacy.unreadable-records": "The legacy import found unreadable records; they stay unread.",
|
|
29773
|
+
"legacy.unavailable": "Legacy annotation storage could not be read.",
|
|
29774
|
+
"legacy.unreadable": "An environment's legacy annotation storage is unreadable.",
|
|
29775
|
+
"legacy.archive-failed": "Imported legacy annotation files could not be archived.",
|
|
29776
|
+
"legacy.files-archived": "Legacy files beside an imported environment were archived, not imported.",
|
|
29777
|
+
"migration.draft-failed": "Migrating one draft failed.",
|
|
29778
|
+
"draft-reconcile.deferred": "Draft reconciliation was deferred; a later pass retries.",
|
|
29779
|
+
"request.handoff-deferred": "A request's handoff was deferred; a later pass retries.",
|
|
29780
|
+
"evidence.materialize-failed": "Materializing a request's evidence failed; it backs off and retries.",
|
|
29781
|
+
"queue.publish-deferred": "Publishing a request to the queue was deferred; it retries under the same id.",
|
|
29782
|
+
"request.reconcile-failed": "Reconciling a request failed; the next pass retries.",
|
|
29783
|
+
"turn-end.reconcile-failed": "Reconciling a request at the end of a turn failed; the next pass retries.",
|
|
29784
|
+
"gc.failed": "Annotation garbage collection failed; the next pass retries.",
|
|
29785
|
+
"record.unavailable": "An annotation record is unavailable; written once per record.",
|
|
29786
|
+
"storage.unavailable": "An environment's annotation store is unreadable.",
|
|
29787
|
+
"change-hint.listener-failed": "A change hint listener threw.",
|
|
29788
|
+
"orphan.remove-failed": "An orphaned environment's annotation storage could not be removed.",
|
|
29789
|
+
"storage.load-failed": "An environment's annotation storage could not be loaded.",
|
|
29499
29790
|
...THROTTLE_LOG_EVENTS
|
|
29500
29791
|
}
|
|
29501
29792
|
}
|
|
29502
29793
|
});
|
|
29503
29794
|
|
|
29795
|
+
// ../protocol/src/log-vocabulary/storage.ts
|
|
29796
|
+
var STORAGE_LOG_AREAS = defineLogAreas({
|
|
29797
|
+
storage: {
|
|
29798
|
+
description: "The SQLite-backed stores, their snapshots and imports from older formats.",
|
|
29799
|
+
events: {
|
|
29800
|
+
"usage.environment-label-failed": "Usage labels could not be retained for a removed environment; deletion continues.",
|
|
29801
|
+
"snapshot.integrity-failed": "An hourly database snapshot failed its integrity check and was discarded.",
|
|
29802
|
+
"snapshot.skipped-low-disk": "The hourly database snapshot was skipped because the disk lacks room; `retryAt` says when it tries again.",
|
|
29803
|
+
"snapshot.failed": "The hourly database snapshot failed; `retryAt` says when it tries again, if known.",
|
|
29804
|
+
"listener.attention-failed": "An environment attention listener threw; the committed mutation stands.",
|
|
29805
|
+
"listener.change-failed": "A resource change listener threw; the committed mutation stands.",
|
|
29806
|
+
"kanban.image-cleanup-failed": "An orphaned Kanban image could not be removed after its retries; it is safe to remove later.",
|
|
29807
|
+
"nodes.entries-dropped": "Unreadable node registry entries were ignored.",
|
|
29808
|
+
"preview-identity.reminted": "The data directory moved or was copied, so previews get a new backend identity.",
|
|
29809
|
+
"machine-profile.invalid": "The stored machine profile was invalid and the default was restored.",
|
|
29810
|
+
"permission-rules.cleanup-failed": "A deleted project's permission rules could not be removed.",
|
|
29811
|
+
"retired.turn-cleanup-pending": "Cleanup of a retired Looped Review turn did not finish and stays pending.",
|
|
29812
|
+
"handoffs.prune-failed": "Pruning agent handoffs that nothing references failed; a later prune retries.",
|
|
29813
|
+
"desktop-connections.malformed": "Stored desktop connection settings were malformed, so the local connection is used.",
|
|
29814
|
+
"legacy-json.moved": "JSON store files written after the SQLite migration were archived, not imported.",
|
|
29815
|
+
"legacy-json.archive-failed": "Imported JSON store files could not be archived."
|
|
29816
|
+
}
|
|
29817
|
+
}
|
|
29818
|
+
});
|
|
29819
|
+
|
|
29820
|
+
// ../protocol/src/log-vocabulary/build-pipeline.ts
|
|
29821
|
+
var BUILD_PIPELINE_LOG_AREAS = defineLogAreas({
|
|
29822
|
+
"build-pipeline": {
|
|
29823
|
+
description: "Build pipelines: their supervision, stages, transcripts and sidebar state.",
|
|
29824
|
+
events: {
|
|
29825
|
+
"sidebar.reconcile-failed": "Sidebar activity for pipelines could not be reconciled.",
|
|
29826
|
+
"sidebar.update-failed": "The sidebar could not be updated for one pipeline.",
|
|
29827
|
+
"result.consume-deferred": "Consuming a stage's workflow result failed; it stays staged and is retried.",
|
|
29828
|
+
"consolidation.consume-deferred": "Consuming a review consolidation result failed; it stays pending and is retried.",
|
|
29829
|
+
"dispatch.prepare-failed": "Attaching the agent before dispatch failed; the prompt request does the same work and answers authoritatively.",
|
|
29830
|
+
"interaction.resolved": "A human interaction on a pipeline stage resolved. Metadata only.",
|
|
29831
|
+
"transcripts.migrated": "A transcript migration pass moved stage transcripts; counts only.",
|
|
29832
|
+
"transcripts.maintenance-failed": "Migrating or sweeping stage transcripts failed; the next start retries.",
|
|
29833
|
+
"restore.skipped": "A pipeline could not be restored at startup and was skipped.",
|
|
29834
|
+
"criteria.record-failed": "Acceptance criteria results could not be recorded on the ticket.",
|
|
29835
|
+
"workspace.waiting": "A pipeline is waiting for its workspace; written once per reason.",
|
|
29836
|
+
"rewind.pending": "A pipeline's code rewind has not finished; written once per reason.",
|
|
29837
|
+
"kanban.status-failed": "A restarted pipeline's Kanban status could not be set; it retries shortly.",
|
|
29838
|
+
"usage.read-failed": "Reading a stage session's token usage failed.",
|
|
29839
|
+
"checkpoint.deferred": "A stage transcript checkpoint could not be written yet; the provider's history stands.",
|
|
29840
|
+
"checkpoint.not-committed": "A stage transcript checkpoint was reverted in the commit that should have kept it.",
|
|
29841
|
+
"legacy-transcript.deferred": "Moving a legacy inline transcript failed; the inline body stays readable."
|
|
29842
|
+
}
|
|
29843
|
+
}
|
|
29844
|
+
});
|
|
29845
|
+
|
|
29846
|
+
// ../protocol/src/log-vocabulary/agent-branch.ts
|
|
29847
|
+
var AGENT_BRANCH_LOG_AREAS = defineLogAreas({
|
|
29848
|
+
"agent-branch": {
|
|
29849
|
+
description: "Agent branches shared by review fan-outs, graph agents and goal verifiers; `owner` names which.",
|
|
29850
|
+
events: {
|
|
29851
|
+
"observation.checkpoint-failed": "Checkpointing reviewer observations failed; the next pass retries.",
|
|
29852
|
+
"transcript.mirror-failed": "Mirroring a reviewer transcript failed.",
|
|
29853
|
+
"usage.read-failed": "Reading a reviewer's token usage failed.",
|
|
29854
|
+
"result.nudge-failed": "An agent with an uncommitted result could not be nudged.",
|
|
29855
|
+
"dispatch.prepare-failed": "Attaching the agent before dispatch failed; the prompt request answers authoritatively.",
|
|
29856
|
+
"result.consume-deferred": "Consuming a branch's workflow result failed; it stays staged and is retried."
|
|
29857
|
+
}
|
|
29858
|
+
}
|
|
29859
|
+
});
|
|
29860
|
+
|
|
29861
|
+
// ../protocol/src/log-vocabulary/change-tracking.ts
|
|
29862
|
+
var CHANGE_TRACKING_LOG_AREAS = defineLogAreas({
|
|
29863
|
+
"change-tracking": {
|
|
29864
|
+
description: "Change tracking: turn capture, evidence pulls and measurements.",
|
|
29865
|
+
events: {
|
|
29866
|
+
"journal-import.failed": "Importing surviving OpenCode command journals as legacy summaries failed.",
|
|
29867
|
+
"projection.failed": "Projecting a change event onto its environment failed.",
|
|
29868
|
+
"startup.reconcile-failed": "Reconciling change tracking at startup failed.",
|
|
29869
|
+
"turn-start.capture-failed": "Capturing a turn's start failed, so the turn is untracked.",
|
|
29870
|
+
"dispatch.record-failed": "Recording a turn's dispatch outcome failed.",
|
|
29871
|
+
"turn.finalize-failed": "Finalizing a turn failed.",
|
|
29872
|
+
"turn.settle-failed": "Settling a late interrupted turn failed.",
|
|
29873
|
+
"evidence.pull-failed": "Pulling change evidence from a bridge failed; a later pull retries.",
|
|
29874
|
+
"measurement.failed": "Recomputing a tool's measurement failed."
|
|
29875
|
+
}
|
|
29876
|
+
},
|
|
29877
|
+
"diff-stats": {
|
|
29878
|
+
description: "Environment diff stats and the worktree signals that drive them.",
|
|
29879
|
+
events: {
|
|
29880
|
+
"baseline.update-failed": "An environment's diff baseline could not be updated.",
|
|
29881
|
+
"scan.watcher-failed": "An environment's diff watcher failed; its scans fall back to polling.",
|
|
29882
|
+
"scan.failed": "A diff scan failed; the last results stay, marked stale, and the scan is retried.",
|
|
29883
|
+
"scan.freshness-read-failed": "Reading whether an environment's remote is fresh failed.",
|
|
29884
|
+
"scan.listener-failed": "A change-tracking scan listener threw; the scan itself stands.",
|
|
29885
|
+
"emit.diff-stats-failed": "A diff stats change could not be emitted to its sink.",
|
|
29886
|
+
"emit.worktree-snapshot-failed": "A worktree snapshot could not be emitted to its sink.",
|
|
29887
|
+
"signal.demoted": "A worktree signal stopped being trusted, so scans fall back to timers until it is re-armed."
|
|
29888
|
+
}
|
|
29889
|
+
}
|
|
29890
|
+
});
|
|
29891
|
+
|
|
29892
|
+
// ../protocol/src/log-vocabulary/coordinator.ts
|
|
29893
|
+
var COORDINATOR_LOG_AREAS = defineLogAreas({
|
|
29894
|
+
coordinator: {
|
|
29895
|
+
description: "Coordinators: delegations, status wakes and their store.",
|
|
29896
|
+
events: {
|
|
29897
|
+
"delegation.open-failed": "A delegation could not be opened; `source` says for what.",
|
|
29898
|
+
"deliver-now.drain-failed": "The mail delivery pass after deliverNow failed; the next sweep delivers.",
|
|
29899
|
+
"mail.move-failed": "Mail could not move to the new main coordinator.",
|
|
29900
|
+
"work.move-failed": "Work could not move to the main coordinator.",
|
|
29901
|
+
"wake.observe-remote-workflow-failed": "A remote workflow could not be observed for status wakes.",
|
|
29902
|
+
"wake.observe-pull-request-failed": "A pull request could not be observed for status wakes.",
|
|
29903
|
+
"wake.observe-feature-plan-failed": "A feature plan could not be observed for status wakes.",
|
|
29904
|
+
"wake.observe-workflow-failed": "A workflow could not be observed for status wakes.",
|
|
29905
|
+
"wake.deliver-failed": "A workflow status wake could not be delivered; the next pass retries.",
|
|
29906
|
+
"wake.waiting-check-failed": "A waiting worker could not be checked; the next pass retries.",
|
|
29907
|
+
"wake.resolve-report-failed": "A finished Resolve tab could not be reported.",
|
|
29908
|
+
"wake.waiting-report-failed": "A waiting worker could not be reported.",
|
|
29909
|
+
"wake.worker-outcomes-failed": "Coordinator-owned workers' merges and deletions could not be checked; the next sweep retries.",
|
|
29910
|
+
"store.malformed": "The coordinator store was malformed and is treated as empty.",
|
|
29911
|
+
"store.unsupported-version": "The coordinator store has an unsupported version and is treated as empty.",
|
|
29912
|
+
"store.invalid-workspace": "An invalid coordinator workspace record was ignored.",
|
|
29913
|
+
"store.workflows-cleared": "The workflow store was full, so a batch of its oldest finished records was removed.",
|
|
29914
|
+
"store.workflows-in-use": "The workflow store was full and every record was still in use, so new work was refused.",
|
|
29915
|
+
"remote-worker.settle-failed": "A remote worker could not be settled.",
|
|
29916
|
+
"checkout.merge-followed": "After an environment's PR merged, the project checkout was fast-forwarded, or `outcome` says why not.",
|
|
29917
|
+
"checkout.merge-follow-failed": "Fast-forwarding the project checkout failed, after an environment's PR merged or before mail woke the main coordinator.",
|
|
29918
|
+
"checkout.mail-follow": "Before mail woke the main coordinator, the project checkout was fast-forwarded, or `outcome` says why not (`timed-out`, `failed`).",
|
|
29919
|
+
"checkout.mail-follow-failed": "Before mail woke the main coordinator, checking whether to fast-forward the project checkout failed; the mail was delivered anyway."
|
|
29920
|
+
}
|
|
29921
|
+
}
|
|
29922
|
+
});
|
|
29923
|
+
|
|
29924
|
+
// ../protocol/src/log-vocabulary/review.ts
|
|
29925
|
+
var REVIEW_LOG_AREAS = defineLogAreas({
|
|
29926
|
+
review: {
|
|
29927
|
+
description: "Multi Review workflows: scheduling, graph runs and interactive fix sessions.",
|
|
29928
|
+
events: {
|
|
29929
|
+
"fix-tab.publish-failed": "A fix request was delivered but its tab could not be opened; the user is told.",
|
|
29930
|
+
"graph-run.not-started": "A workflow's graph run did not start.",
|
|
29931
|
+
"reconcile.scan-failed": "A reconciliation scan failed; the next scan retries.",
|
|
29932
|
+
"graph-engine.unavailable": "The graph engine is selected but unavailable, so the bespoke engine runs.",
|
|
29933
|
+
"graph-run.cancel-failed": "Cancelling a graph run failed; the next pass projects how it ended.",
|
|
29934
|
+
"delete.cleanup-failed": "A cleanup step after deleting a workflow failed; stale tabs reconcile away on hydration.",
|
|
29935
|
+
"fix-session.read-failed": "Reading an interactive fix session's state failed.",
|
|
29936
|
+
"fix-outcome.read-failed": "Reading an interactive fix's outcome failed; it stays pending.",
|
|
29937
|
+
"fix-usage.read-failed": "Reading a fix session's token usage failed.",
|
|
29938
|
+
"result.consume-deferred": "Consuming a workflow result failed; it stays staged and is retried.",
|
|
29939
|
+
"failure-triage.failed": "Classifying a review package's failing tests failed; the package is sealed without the triage and says so."
|
|
29940
|
+
}
|
|
29941
|
+
},
|
|
29942
|
+
"pull-request": {
|
|
29943
|
+
description: "Pull request monitoring, auto-merge and the `gh` reads behind them.",
|
|
29944
|
+
events: {
|
|
29945
|
+
"merged-state.persist-failed": "A merged pull request's state could not be saved; GitHub stays authoritative and cleanup goes on.",
|
|
29946
|
+
"refresh.failed": "A pull request could not be refreshed; the armed flag stands.",
|
|
29947
|
+
"arm.track-failed": "An armed environment could not be tracked; the monitor's next sync retries.",
|
|
29948
|
+
"gh.pr-list-unparseable": "`gh pr list` returned nothing that parses. Sizes only, never the output.",
|
|
29949
|
+
"monitor.start-failed": "Monitoring could not start for a newly opened pull request.",
|
|
29950
|
+
"cleanup-scheduler.missing": "A merged pull request was seen, but this runtime has no merge cleanup scheduler.",
|
|
29951
|
+
"checkout.follow-merge-lookup-failed": "A merged pull request's project could not be read, so its checkout was not fast-forwarded.",
|
|
29952
|
+
"auto-merge.evaluation-failed": "Evaluating an environment for auto-merge failed.",
|
|
29953
|
+
"auto-merge.merge-failed": "Auto-merge could not merge a pull request; the attempt is held and retried.",
|
|
29954
|
+
"auto-merge.resolve-failed": "Auto-merge could not launch Resolve for a pull request; the attempt is held and retried.",
|
|
29955
|
+
"monitor.detection-failed": "Checking an environment for its pull request failed.",
|
|
29956
|
+
"monitor.detection-admission-failed": "A pull request check could not be admitted to the work pool.",
|
|
29957
|
+
"monitor.terminal-repair-failed": "Repairing a merged or closed pull request's side effects failed.",
|
|
29958
|
+
"monitor.terminal-resume-failed": "Resuming a merged or closed pull request's side effects failed.",
|
|
29959
|
+
"monitor.stale-reading-ignored": "A non-merged reading (`state`) for a pull request already merged was ignored as stale.",
|
|
29960
|
+
"monitor.state-persist-failed": "A pull request's observed state could not be saved.",
|
|
29961
|
+
"monitor.state-clear-failed": "A pull request's saved state could not be cleared.",
|
|
29962
|
+
"monitor.task-reconcile-failed": "Updating the Kanban task of a merged or closed (`state`) pull request failed.",
|
|
29963
|
+
"monitor.task-store-failed": "A pull request could not be recorded on its Kanban task.",
|
|
29964
|
+
"monitor.emit-failed": "A pull request monitor event could not be emitted to its sink."
|
|
29965
|
+
}
|
|
29966
|
+
}
|
|
29967
|
+
});
|
|
29968
|
+
|
|
29969
|
+
// ../protocol/src/log-vocabulary/public-api.ts
|
|
29970
|
+
var PUBLIC_API_LOG_AREAS = defineLogAreas({
|
|
29971
|
+
"public-api": {
|
|
29972
|
+
description: "The public CLI's operations: their outcomes, reconciliation and exec workers.",
|
|
29973
|
+
events: {
|
|
29974
|
+
"outcome.record-failed": "A background operation's outcome could not be recorded; reconciliation settles it.",
|
|
29975
|
+
"goal-checks.stop-failed": "Goal checks could not be stopped.",
|
|
29976
|
+
"exec.list-failed": "Exec workers could not be listed.",
|
|
29977
|
+
"exec.cancel-failed": "An exec could not be cancelled.",
|
|
29978
|
+
"goal-workers.list-failed": "Goal check workers could not be listed.",
|
|
29979
|
+
"operation.reconcile-failed": "Reconciling one operation failed; the next pass retries.",
|
|
29980
|
+
"reconcile.pass-failed": "A reconciliation pass failed; the next one retries."
|
|
29981
|
+
}
|
|
29982
|
+
}
|
|
29983
|
+
});
|
|
29984
|
+
|
|
29985
|
+
// ../protocol/src/log-vocabulary/agent-accounts.ts
|
|
29986
|
+
var AGENT_ACCOUNTS_LOG_AREAS = defineLogAreas({
|
|
29987
|
+
"agent-accounts": {
|
|
29988
|
+
description: "Agent accounts: automatic switching, staged logins and plan usage.",
|
|
29989
|
+
events: {
|
|
29990
|
+
"switch-notice.failed": "A notice about an automatic account switch failed; the switch stands. `audience` says whose.",
|
|
29991
|
+
"auto-switch.check-failed": "An automatic account check failed; the next nudge retries.",
|
|
29992
|
+
"container-sync.failed": "Handing a login or account to a container failed; `step` says which part.",
|
|
29993
|
+
"last-usage.save-failed": "The last plan usage reading could not be saved; the next save retries.",
|
|
29994
|
+
"login-cleanup.failed": "A temporary login could not be cleaned up.",
|
|
29995
|
+
"login-renewal.failed": "Renewing an idle account's sign-in to read its usage failed; it is retried after a backoff.",
|
|
29996
|
+
"login-renewal.not-extended": "Claude Code ran to renew an idle account's sign-in, but its token is still lapsed.",
|
|
29997
|
+
"login-refresh.deferred": "Containers were not told to refresh their login now; they reconcile from its durable generation."
|
|
29998
|
+
}
|
|
29999
|
+
}
|
|
30000
|
+
});
|
|
30001
|
+
|
|
30002
|
+
// ../protocol/src/log-vocabulary/docker.ts
|
|
30003
|
+
var DOCKER_LOG_AREAS = defineLogAreas({
|
|
30004
|
+
docker: {
|
|
30005
|
+
description: "Docker containers: lifecycle, starts, staged inputs and the login files they hold.",
|
|
30006
|
+
events: {
|
|
30007
|
+
"portable-inputs.relay-missing": "Docker is rootless and the image predates the staged-input relay, so the container cannot read them until rebuilt.",
|
|
30008
|
+
"project-seed.refused": "A project .env, .env.local or opencode.json was not copied into a new container: a link, not a regular file, outside the project, too large or unreadable.",
|
|
30009
|
+
"opencode.warm-incomplete": "OpenCode did not finish loading /workspace in a container.",
|
|
30010
|
+
"lifecycle-event.reconcile-failed": "Reconciling an environment after a container start or stop event failed; the next status read retries.",
|
|
30011
|
+
"login-keeper.pass-failed": "A Claude login keeper pass failed; the next interval retries.",
|
|
30012
|
+
"login-keeper.refresh-failed": "Refreshing the host Claude login failed. Fixed text: CLI output can hold credentials.",
|
|
30013
|
+
"login-keeper.refresh-not-extended": "Refreshing the host Claude login did not extend its expiry.",
|
|
30014
|
+
"login-keeper.refresh-check-failed": "Checking the host Claude login after a refresh failed.",
|
|
30015
|
+
"login-watcher.pass-failed": "A container login file watcher pass failed; the next one retries.",
|
|
30016
|
+
"lifecycle.record-failure-failed": "A failed container operation could not be recorded.",
|
|
30017
|
+
"lifecycle.reconcile-failed": "Reconciling one environment's container operation failed; the next pass retries.",
|
|
30018
|
+
"replacement.clear-terminals-failed": "Terminal sessions could not be cleared after a container replacement.",
|
|
30019
|
+
"recovery.clear-terminals-failed": "Terminal sessions could not be cleared after a recovery restore.",
|
|
30020
|
+
"github-ranges.seed-not-copied": "The GitHub ranges seed could not be copied into a container, so its firewall fetches them.",
|
|
30021
|
+
"availability.probe-failed": "Docker is not available; written when the diagnostic changes. Fixed-shape metadata only: messages can hold daemon endpoints.",
|
|
30022
|
+
"start.port-collision-retrying": "An automatic host port collided on start, so it is retried once with fresh ports."
|
|
30023
|
+
}
|
|
30024
|
+
},
|
|
30025
|
+
"docker.reachability": {
|
|
30026
|
+
description: "Whether agents in containers can reach the backend's agent tools server.",
|
|
30027
|
+
events: {
|
|
30028
|
+
"check.crashed": "A reachability check crashed.",
|
|
30029
|
+
"check.started": "A reachability check started.",
|
|
30030
|
+
"check.finished": "A reachability check finished.",
|
|
30031
|
+
"check.probe": "One probe of a finished check.",
|
|
30032
|
+
"check.summary": "Content-free status and reason for a check that did not find the host reachable.",
|
|
30033
|
+
"check.remediation": "One command the user can run to unblock containers.",
|
|
30034
|
+
"shutdown.awaiting-network": "Shutdown is waiting for probe network preparation.",
|
|
30035
|
+
"shutdown.cleanup-deferred": "Probe network cleanup waits until its preparation settles.",
|
|
30036
|
+
"shutdown.removing-resources": "Shutdown is removing probe resources.",
|
|
30037
|
+
"shutdown.container-remove-failed": "A probe container could not be removed at shutdown.",
|
|
30038
|
+
"shutdown.network-remove-failed": "The probe network could not be removed at shutdown.",
|
|
30039
|
+
"probe.skipped": "A container probe was skipped because the agent tools server is not listening.",
|
|
30040
|
+
"preflight.refused": "A stage was refused because its container cannot reach the host.",
|
|
30041
|
+
"probe.prepare-failed": "A container could not be prepared for a probe.",
|
|
30042
|
+
"probe.result": "The outcome of probing one container.",
|
|
30043
|
+
"probe.contradicts-host": "A container probe disagrees with the host status, so the host is rechecked.",
|
|
30044
|
+
"topology.detected": "The Docker topology was read.",
|
|
30045
|
+
"firewall.detected": "The host firewall was read.",
|
|
30046
|
+
"probe-network.remove-failed": "The probe network could not be removed.",
|
|
30047
|
+
"probe-network.create-failed": "The probe network could not be created, so only the default bridge is checked.",
|
|
30048
|
+
"event.emit-failed": "A reachability event could not be emitted.",
|
|
30049
|
+
"host-addresses.list-failed": "Host addresses could not be listed.",
|
|
30050
|
+
"probe-image.present": "The probe image is already present.",
|
|
30051
|
+
"probe-image.pulling": "The probe image is being pulled.",
|
|
30052
|
+
"probe-image.pulled": "The probe image was pulled.",
|
|
30053
|
+
"probe-image.pull-failed": "The probe image could not be pulled.",
|
|
30054
|
+
"probe-image.fallback": "The environment image is used as the probe image.",
|
|
30055
|
+
"probe-image.missing": "No probe image is available.",
|
|
30056
|
+
"network.list-failed": "Docker networks could not be listed.",
|
|
30057
|
+
"network.inspect-failed": "A Docker network could not be inspected.",
|
|
30058
|
+
"stale-containers.removing": "Stale probe containers are being removed.",
|
|
30059
|
+
"stale-networks.removing": "Stale probe networks are being removed."
|
|
30060
|
+
}
|
|
30061
|
+
}
|
|
30062
|
+
});
|
|
30063
|
+
|
|
30064
|
+
// ../protocol/src/log-vocabulary/mcp.ts
|
|
30065
|
+
var MCP_LOG_AREAS = defineLogAreas({
|
|
30066
|
+
"control-mcp": {
|
|
30067
|
+
description: "The Control MCP server other agents and devices reach Orkestrator through.",
|
|
30068
|
+
events: {
|
|
30069
|
+
"listener.port-free": "The Control MCP's fixed port is free again, so it is listening.",
|
|
30070
|
+
"state-listener.failed": "A Control MCP state listener threw; the others still run.",
|
|
30071
|
+
"delegation.remote-open-failed": "A delegation could not be opened on another node.",
|
|
30072
|
+
"delegation.open-failed": "A coordinator delegation could not be opened."
|
|
30073
|
+
}
|
|
30074
|
+
},
|
|
30075
|
+
"mcp-management": {
|
|
30076
|
+
description: "Managed MCP configuration: its commands, overlays and apply loop.",
|
|
30077
|
+
events: {
|
|
30078
|
+
"command.failed": "An MCP management command failed; `ref` is the correlation id shown to the user.",
|
|
30079
|
+
"overlay.materialise-failed": "An MCP overlay could not be written.",
|
|
30080
|
+
"apply.tick-failed": "An MCP apply tick failed; the next one retries."
|
|
30081
|
+
}
|
|
30082
|
+
}
|
|
30083
|
+
});
|
|
30084
|
+
|
|
30085
|
+
// ../protocol/src/log-vocabulary/design.ts
|
|
30086
|
+
var DESIGN_LOG_AREAS = defineLogAreas({
|
|
30087
|
+
design: {
|
|
30088
|
+
description: "The design canvas: its library, renderer and session links.",
|
|
30089
|
+
events: {
|
|
30090
|
+
"change-signal.failed": "A design change signal failed.",
|
|
30091
|
+
"library.index-write-failed": "The design library index could not be written.",
|
|
30092
|
+
"library.refresh-failed": "The design library could not be refreshed.",
|
|
30093
|
+
"renderer.problem": "The renderer hit a limit or lost a browser; `problem` is a fixed name.",
|
|
30094
|
+
"task.failed": "A design background task failed.",
|
|
30095
|
+
"canvas.needs-recovery": "A design canvas is unreadable and marked for recovery.",
|
|
30096
|
+
"startup.step-failed": "One part of design startup failed; `step` says which.",
|
|
30097
|
+
"legacy.retire-failed": "A migrated legacy design could not be retired.",
|
|
30098
|
+
"profiles.swept": "Design startup removed stale browser profiles.",
|
|
30099
|
+
"session-link.record-failed": "A closing conversation could not be recorded on a design link."
|
|
30100
|
+
}
|
|
30101
|
+
}
|
|
30102
|
+
});
|
|
30103
|
+
|
|
30104
|
+
// ../protocol/src/log-vocabulary/graph.ts
|
|
30105
|
+
var GRAPH_LOG_AREAS = defineLogAreas({
|
|
30106
|
+
graph: {
|
|
30107
|
+
description: "Graph runs: launches, passes, rewinds, system actions and templates.",
|
|
30108
|
+
events: {
|
|
30109
|
+
"describe.pass-failed": "A graph describe pass failed. Content-free: never the description or draft.",
|
|
30110
|
+
"system.stop-failed": "A system action's work could not be stopped.",
|
|
30111
|
+
"system.action-failed": "A system action failed; `cause` is its fixed failure cause.",
|
|
30112
|
+
"attention.update-failed": "The sidebar could not be updated for a run.",
|
|
30113
|
+
"launch.ticket-link-failed": "A launched run's ticket could not be linked.",
|
|
30114
|
+
"launch.started": "A graph run was launched.",
|
|
30115
|
+
"launch.swept": "Runs that ended without an environment were removed.",
|
|
30116
|
+
"rewind.pending": "A run's code rewind has not finished.",
|
|
30117
|
+
"rewind.applied": "A run was restarted or rewound.",
|
|
30118
|
+
"rewind.waiting": "A run waits for its code rewind to finish.",
|
|
30119
|
+
"history.pruned": "Finished runs beyond an environment's history were removed.",
|
|
30120
|
+
"history.prune-failed": "Pruning an environment's run history failed.",
|
|
30121
|
+
"worktree.cleanup-failed": "A run's branch worktree cleanup failed.",
|
|
30122
|
+
"run.unreadable": "A run is unreadable, so it is not scheduled.",
|
|
30123
|
+
"run.pass-failed": "A pass over a run failed.",
|
|
30124
|
+
"transcript.capture-failed": "A run's transcript capture failed.",
|
|
30125
|
+
"ticket.link-failed": "A run's ticket could not be linked to its environment.",
|
|
30126
|
+
"template.skipped": "A built-in template was skipped as invalid or a duplicate."
|
|
30127
|
+
}
|
|
30128
|
+
}
|
|
30129
|
+
});
|
|
30130
|
+
|
|
30131
|
+
// ../protocol/src/log-vocabulary/nodes.ts
|
|
30132
|
+
var NODES_LOG_AREAS = defineLogAreas({
|
|
30133
|
+
nodes: {
|
|
30134
|
+
description: "Command nodes: links, handovers, leaf mail, ticket sync and project copies.",
|
|
30135
|
+
events: {
|
|
30136
|
+
"actions.resume-failed": "Approved actions could not be resumed; a later pass retries.",
|
|
30137
|
+
"project-copy.notify-failed": "The coordinator could not be told a project copy finished.",
|
|
30138
|
+
"mail.delivery-deferred": "Leaf mail could not reach a coordinator yet.",
|
|
30139
|
+
"command.post-step-failed": "A step after a routed command failed.",
|
|
30140
|
+
"seed-files.incomplete": "Seed files for a leaf environment were not all copied.",
|
|
30141
|
+
"contact.record-failed": "The latest controller contact could not be recorded.",
|
|
30142
|
+
"settings.send-failed": "Settings could not be sent to a node.",
|
|
30143
|
+
"verification.record-failed": "A node verification could not be recorded.",
|
|
30144
|
+
"profile.record-failed": "A node profile could not be recorded.",
|
|
30145
|
+
"detach.unconfirmed": "A forgotten node has not confirmed the detach yet.",
|
|
30146
|
+
"handover.recovery-pending": "Command handover recovery is still pending.",
|
|
30147
|
+
"ticket-sync.work-record-failed": "A remote build started but its ticket work location could not be saved.",
|
|
30148
|
+
"ticket-sync.failed": "A Kanban sync with a node failed; it is retried.",
|
|
30149
|
+
"ticket-sync.unknown-project": "A node sent ticket changes for a project that no longer exists here.",
|
|
30150
|
+
"ticket-sync.forget-failed": "A detached command node's ticket copies could not be released."
|
|
30151
|
+
}
|
|
30152
|
+
}
|
|
30153
|
+
});
|
|
30154
|
+
|
|
30155
|
+
// ../protocol/src/log-vocabulary/linear.ts
|
|
30156
|
+
var LINEAR_LOG_AREAS = defineLogAreas({
|
|
30157
|
+
linear: {
|
|
30158
|
+
description: "Linear issues read for build actions.",
|
|
30159
|
+
events: {
|
|
30160
|
+
"comments.load-failed": "An issue's comments could not be loaded; the issue still renders without them."
|
|
30161
|
+
}
|
|
30162
|
+
}
|
|
30163
|
+
});
|
|
30164
|
+
|
|
30165
|
+
// ../protocol/src/log-vocabulary/usage-history.ts
|
|
30166
|
+
var USAGE_HISTORY_LOG_AREAS = defineLogAreas({
|
|
30167
|
+
"usage-history": {
|
|
30168
|
+
description: "Recorded agent token usage.",
|
|
30169
|
+
events: {
|
|
30170
|
+
"record.failed": "Agent usage could not be recorded; a later read counts it.",
|
|
30171
|
+
"prune.failed": "Pruning recorded usage failed; the next prune retries."
|
|
30172
|
+
}
|
|
30173
|
+
}
|
|
30174
|
+
});
|
|
30175
|
+
|
|
30176
|
+
// ../protocol/src/log-vocabulary/feature.ts
|
|
30177
|
+
var FEATURE_LOG_AREAS = defineLogAreas({
|
|
30178
|
+
feature: {
|
|
30179
|
+
description: "Pipeline environments started from a feature, and feature planning.",
|
|
30180
|
+
events: {
|
|
30181
|
+
"naming.fallback": "Automatic naming failed, so a local fallback name is used. Error kind only: the description stays out.",
|
|
30182
|
+
"planning.legacy-adopt-failed": "Legacy planning conversations could not be adopted.",
|
|
30183
|
+
"planning.tick-retrying": "A planning tick failed on a transient error; the next tick retries."
|
|
30184
|
+
}
|
|
30185
|
+
}
|
|
30186
|
+
});
|
|
30187
|
+
|
|
30188
|
+
// ../protocol/src/log-vocabulary/host.ts
|
|
30189
|
+
var HOST_LOG_AREAS = defineLogAreas({
|
|
30190
|
+
host: {
|
|
30191
|
+
description: "The host machine: its executables, load, suspends and maintenance.",
|
|
30192
|
+
events: {
|
|
30193
|
+
"path.discovered": "Executable discovery finished. Counts and booleans only: PATH entries can hold private directory names.",
|
|
30194
|
+
"tool.available": "A host tool's availability was read.",
|
|
30195
|
+
"tool.missing": "A host tool was not found.",
|
|
30196
|
+
"maintenance.listener-failed": "A host maintenance listener threw; the others still run.",
|
|
30197
|
+
"suspend.reconcile-failed": "Reconciling due work after a host suspension failed.",
|
|
30198
|
+
"load.sample-failed": "Sampling machine load failed; the next sample retries."
|
|
30199
|
+
}
|
|
30200
|
+
}
|
|
30201
|
+
});
|
|
30202
|
+
|
|
30203
|
+
// ../protocol/src/log-vocabulary/transcript-artifacts.ts
|
|
30204
|
+
var TRANSCRIPT_ARTIFACTS_LOG_AREAS = defineLogAreas({
|
|
30205
|
+
"transcript-artifacts": {
|
|
30206
|
+
description: "Transcript artifacts: previews, printing, grants and their ledger. Ids, kinds, sizes and reason codes only.",
|
|
30207
|
+
events: {
|
|
30208
|
+
"announce-failed": "An artifact change could not be announced.",
|
|
30209
|
+
"cleanup-failed": "An artifact cleanup failed.",
|
|
30210
|
+
"grant-revocation-failed": "A grant could not be revoked.",
|
|
30211
|
+
"ledger-listener-failed": "A ledger listener threw.",
|
|
30212
|
+
"ledger-read-failed": "The ledger could not be read.",
|
|
30213
|
+
"operation-executor-failed": "A preview operation's executor failed.",
|
|
30214
|
+
"operation-failed": "A preview operation failed.",
|
|
30215
|
+
"pdf-preview": "A PDF preview was served.",
|
|
30216
|
+
"pdf-preview-failed": "A PDF preview failed.",
|
|
30217
|
+
"pdf-print-failed": "Printing an artifact to PDF failed.",
|
|
30218
|
+
"pdf-printed": "An artifact was printed to PDF.",
|
|
30219
|
+
"runtime-unavailable": "The artifact runtime could not be created."
|
|
30220
|
+
}
|
|
30221
|
+
}
|
|
30222
|
+
});
|
|
30223
|
+
|
|
30224
|
+
// ../protocol/src/log-vocabulary/scheduler.ts
|
|
30225
|
+
var SCHEDULER_LOG_AREAS = defineLogAreas({
|
|
30226
|
+
scheduler: {
|
|
30227
|
+
description: "Scheduled jobs and the backend-owned timing that fires them.",
|
|
30228
|
+
events: {
|
|
30229
|
+
"tick.failed": "A scheduler tick failed; the next tick retries.",
|
|
30230
|
+
"job.claim-failed": "A due job could not be claimed.",
|
|
30231
|
+
"fire.heartbeat-failed": "A running fire's heartbeat could not be recorded.",
|
|
30232
|
+
"fire.outcome-record-failed": "A finished fire's outcome could not be recorded."
|
|
30233
|
+
}
|
|
30234
|
+
}
|
|
30235
|
+
});
|
|
30236
|
+
|
|
29504
30237
|
// ../protocol/src/log-vocabulary/web-app.ts
|
|
29505
30238
|
var WEB_APP_LOG_AREAS = defineLogAreas({
|
|
29506
30239
|
"web.app": {
|
|
@@ -29668,7 +30401,7 @@ var WEB_ENVIRONMENT_LOG_AREAS = defineLogAreas({
|
|
|
29668
30401
|
"models.pi-seed-failed": "The create dialog could not seed the Pi model catalogue.",
|
|
29669
30402
|
"models.opencode-cache-load-failed": "The create dialog could not read cached OpenCode models.",
|
|
29670
30403
|
"github-credential.check-failed": "The GitHub credential check before creating failed.",
|
|
29671
|
-
"feature-build.start-failed": "Starting a
|
|
30404
|
+
"feature-build.start-failed": "Starting a pipeline environment from the dialog failed.",
|
|
29672
30405
|
"settings.extensions-load-failed": "The settings dialog could not load extensions.",
|
|
29673
30406
|
"settings.container-reset-failed": "The settings dialog could not reset the container.",
|
|
29674
30407
|
"settings.save-failed": "The settings dialog could not save.",
|
|
@@ -29960,6 +30693,25 @@ var LOG_VOCABULARY = {
|
|
|
29960
30693
|
...TMUX_LOG_AREAS,
|
|
29961
30694
|
...UPDATER_LOG_AREAS,
|
|
29962
30695
|
...WEB_ANNOTATIONS_LOG_AREAS,
|
|
30696
|
+
...STORAGE_LOG_AREAS,
|
|
30697
|
+
...BUILD_PIPELINE_LOG_AREAS,
|
|
30698
|
+
...AGENT_BRANCH_LOG_AREAS,
|
|
30699
|
+
...CHANGE_TRACKING_LOG_AREAS,
|
|
30700
|
+
...COORDINATOR_LOG_AREAS,
|
|
30701
|
+
...REVIEW_LOG_AREAS,
|
|
30702
|
+
...PUBLIC_API_LOG_AREAS,
|
|
30703
|
+
...AGENT_ACCOUNTS_LOG_AREAS,
|
|
30704
|
+
...DOCKER_LOG_AREAS,
|
|
30705
|
+
...MCP_LOG_AREAS,
|
|
30706
|
+
...DESIGN_LOG_AREAS,
|
|
30707
|
+
...GRAPH_LOG_AREAS,
|
|
30708
|
+
...NODES_LOG_AREAS,
|
|
30709
|
+
...LINEAR_LOG_AREAS,
|
|
30710
|
+
...USAGE_HISTORY_LOG_AREAS,
|
|
30711
|
+
...FEATURE_LOG_AREAS,
|
|
30712
|
+
...HOST_LOG_AREAS,
|
|
30713
|
+
...TRANSCRIPT_ARTIFACTS_LOG_AREAS,
|
|
30714
|
+
...SCHEDULER_LOG_AREAS,
|
|
29963
30715
|
...WEB_APP_LOG_AREAS,
|
|
29964
30716
|
...WEB_BUILD_PIPELINE_LOG_AREAS,
|
|
29965
30717
|
...WEB_CHAT_LOG_AREAS,
|
|
@@ -30137,7 +30889,10 @@ function deliver(record) {
|
|
|
30137
30889
|
line: config2.format === "json" ? renderJson(record) : renderText(record),
|
|
30138
30890
|
record
|
|
30139
30891
|
});
|
|
30140
|
-
|
|
30892
|
+
return true;
|
|
30893
|
+
} catch {
|
|
30894
|
+
return false;
|
|
30895
|
+
}
|
|
30141
30896
|
}
|
|
30142
30897
|
function buildRecord(level, area, event, fields) {
|
|
30143
30898
|
const clean = fields ? sanitizeFields(fields, areaSpec(area)?.maxStringChars ?? MAX_FIELD_CHARS) : undefined;
|
|
@@ -30293,6 +31048,19 @@ function resolveFields(fields) {
|
|
|
30293
31048
|
return { fieldsFailed: true };
|
|
30294
31049
|
}
|
|
30295
31050
|
}
|
|
31051
|
+
function deliverEvent(level, area, event, fields) {
|
|
31052
|
+
const spec = areaSpec(area);
|
|
31053
|
+
if (!spec)
|
|
31054
|
+
return deliver(buildRecord(level, "logging", "unknown-area", undefined));
|
|
31055
|
+
if (!Object.hasOwn(spec.events, event))
|
|
31056
|
+
return deliver(buildRecord(level, area, "invalid-event", undefined));
|
|
31057
|
+
return deliver(buildRecord(level, area, event, fields));
|
|
31058
|
+
}
|
|
31059
|
+
function tryWriteLog(level, area, event, fields) {
|
|
31060
|
+
if (LEVEL_RANK[level] > thresholdRank(area))
|
|
31061
|
+
return false;
|
|
31062
|
+
return deliverEvent(level, area, event, resolveFields(fields));
|
|
31063
|
+
}
|
|
30296
31064
|
function createLogger(area) {
|
|
30297
31065
|
const spec = areaSpec(area);
|
|
30298
31066
|
let seenGeneration = -1;
|
|
@@ -30305,13 +31073,7 @@ function createLogger(area) {
|
|
|
30305
31073
|
return LEVEL_RANK[level] <= rank;
|
|
30306
31074
|
};
|
|
30307
31075
|
const writeResolved = (level, event, resolved) => {
|
|
30308
|
-
|
|
30309
|
-
deliver(buildRecord(level, "logging", "unknown-area", undefined));
|
|
30310
|
-
} else if (Object.hasOwn(spec.events, event)) {
|
|
30311
|
-
deliver(buildRecord(level, area, event, resolved));
|
|
30312
|
-
} else {
|
|
30313
|
-
deliver(buildRecord(level, area, "invalid-event", undefined));
|
|
30314
|
-
}
|
|
31076
|
+
deliverEvent(level, area, event, resolved);
|
|
30315
31077
|
};
|
|
30316
31078
|
const write = (level, event, fields) => {
|
|
30317
31079
|
if (!enabled(level))
|
|
@@ -33880,8 +34642,19 @@ function pushMessage(state, role, content, parts, createdAt, messageId = randomB
|
|
|
33880
34642
|
}
|
|
33881
34643
|
// ../protocol/src/node/bridge-diagnostics.ts
|
|
33882
34644
|
import { createHash as createHash4 } from "node:crypto";
|
|
33883
|
-
|
|
33884
|
-
|
|
34645
|
+
|
|
34646
|
+
// ../protocol/src/event-loop-stall-monitor.ts
|
|
34647
|
+
var log2 = createLogger("event-loop");
|
|
34648
|
+
var EVENT_LOOP_STALL_ALWAYS_LOG_MS = 1e4;
|
|
34649
|
+
|
|
34650
|
+
// ../protocol/src/node/bridge-diagnostics.ts
|
|
34651
|
+
var log3 = createLogger("bridge.diagnostics");
|
|
34652
|
+
var BRIDGE_DIAGNOSTICS_INTERVAL_MS = 60000;
|
|
34653
|
+
var INTERVAL_MS = BRIDGE_DIAGNOSTICS_INTERVAL_MS;
|
|
34654
|
+
var STALL_NO_DELTA_MS = 2 * INTERVAL_MS;
|
|
34655
|
+
var STALL_TOOL_PENDING_MS = 10 * 60000;
|
|
34656
|
+
var STALL_TICK_DELAY_MS = EVENT_LOOP_STALL_ALWAYS_LOG_MS;
|
|
34657
|
+
var BRIDGE_DIAGNOSTICS_KEEPALIVE_MS = 10 * 60000;
|
|
33885
34658
|
var MAX_PENDING_TOOLS = 128;
|
|
33886
34659
|
var MAX_REPORTED_TOOLS = 8;
|
|
33887
34660
|
var MAX_ID_LENGTH = 1024;
|
|
@@ -33942,6 +34715,28 @@ var UPDATE_KINDS = new Set([
|
|
|
33942
34715
|
"step-started",
|
|
33943
34716
|
"step-completed"
|
|
33944
34717
|
]);
|
|
34718
|
+
var COUNTER_CHANGE_THRESHOLDS = {
|
|
34719
|
+
stderrBytes: 4096,
|
|
34720
|
+
requestsSent: 1,
|
|
34721
|
+
responsesReceived: 1,
|
|
34722
|
+
timeouts: 1,
|
|
34723
|
+
notificationsReceived: Number.POSITIVE_INFINITY,
|
|
34724
|
+
protocolErrors: 1
|
|
34725
|
+
};
|
|
34726
|
+
var WAITING_PHASES = new Set([
|
|
34727
|
+
"sending",
|
|
34728
|
+
"following",
|
|
34729
|
+
"draining",
|
|
34730
|
+
"cancelling"
|
|
34731
|
+
]);
|
|
34732
|
+
function sameSet(a, b) {
|
|
34733
|
+
if (a.size !== b.size)
|
|
34734
|
+
return false;
|
|
34735
|
+
for (const value of a)
|
|
34736
|
+
if (!b.has(value))
|
|
34737
|
+
return false;
|
|
34738
|
+
return true;
|
|
34739
|
+
}
|
|
33945
34740
|
function identity(value) {
|
|
33946
34741
|
if (typeof value !== "string" || !value || value.length > MAX_ID_LENGTH)
|
|
33947
34742
|
return;
|
|
@@ -34017,26 +34812,35 @@ function safeDiagnosticMetrics(value) {
|
|
|
34017
34812
|
result.state = value.state;
|
|
34018
34813
|
return result;
|
|
34019
34814
|
}
|
|
34815
|
+
function bridgeDiagnosticsChangesEnabled() {
|
|
34816
|
+
return log3.isEnabled("trace");
|
|
34817
|
+
}
|
|
34020
34818
|
function writeBridgeDiagnostic({ bridge, event, payload }) {
|
|
34021
|
-
|
|
34819
|
+
return tryWriteLog("info", "bridge.diagnostics", event, { bridge, payload });
|
|
34022
34820
|
}
|
|
34023
34821
|
function bridgeDiagnosticsActive() {
|
|
34024
|
-
return
|
|
34822
|
+
return log3.isEnabled("info");
|
|
34823
|
+
}
|
|
34824
|
+
function bridgeDiagnosticsStreamEnabled(bridge) {
|
|
34825
|
+
return bridgeDebugEnabled(bridge) || log3.isEnabled("debug");
|
|
34025
34826
|
}
|
|
34026
34827
|
function writeDiagnostic(bridge, event, payload, write) {
|
|
34027
34828
|
try {
|
|
34028
34829
|
const json = JSON.stringify({ bridge, event, ...payload });
|
|
34029
34830
|
const bytes = Buffer.byteLength(json);
|
|
34030
34831
|
if (bytes <= MAX_BRIDGE_DIAGNOSTIC_BYTES) {
|
|
34031
|
-
write({ bridge, event, payload: json });
|
|
34032
|
-
return;
|
|
34832
|
+
const accepted = write({ bridge, event, payload: json });
|
|
34833
|
+
return accepted !== false;
|
|
34033
34834
|
}
|
|
34034
|
-
write({
|
|
34835
|
+
const accepted = write({
|
|
34035
34836
|
bridge,
|
|
34036
34837
|
event: "snapshot-overflow",
|
|
34037
34838
|
payload: JSON.stringify({ bridge, event: "snapshot-overflow", omittedBytes: bytes })
|
|
34038
34839
|
});
|
|
34039
|
-
|
|
34840
|
+
return accepted !== false;
|
|
34841
|
+
} catch {
|
|
34842
|
+
return false;
|
|
34843
|
+
}
|
|
34040
34844
|
}
|
|
34041
34845
|
|
|
34042
34846
|
class BridgeRunDiagnostics {
|
|
@@ -34068,6 +34872,7 @@ class BridgeRunDiagnostics {
|
|
|
34068
34872
|
completedTools = 0;
|
|
34069
34873
|
pending = new Map;
|
|
34070
34874
|
phase = "sending";
|
|
34875
|
+
processScope = false;
|
|
34071
34876
|
terminal = "pending";
|
|
34072
34877
|
stream = "pending";
|
|
34073
34878
|
cancellation = "none";
|
|
@@ -34075,6 +34880,8 @@ class BridgeRunDiagnostics {
|
|
|
34075
34880
|
run;
|
|
34076
34881
|
closed = false;
|
|
34077
34882
|
wasActive;
|
|
34883
|
+
baseline;
|
|
34884
|
+
changeQueued = false;
|
|
34078
34885
|
timer;
|
|
34079
34886
|
constructor(bridge, state, now = Date.now, write = writeBridgeDiagnostic, intervalMs = INTERVAL_MS, metrics = () => ({}), active = () => true) {
|
|
34080
34887
|
this.bridge = bridge;
|
|
@@ -34120,7 +34927,8 @@ class BridgeRunDiagnostics {
|
|
|
34120
34927
|
return;
|
|
34121
34928
|
}
|
|
34122
34929
|
if (stage === "completed") {
|
|
34123
|
-
this.pending.delete(key)
|
|
34930
|
+
if (this.pending.delete(key))
|
|
34931
|
+
this.changed();
|
|
34124
34932
|
this.completedTools++;
|
|
34125
34933
|
return;
|
|
34126
34934
|
}
|
|
@@ -34135,13 +34943,23 @@ class BridgeRunDiagnostics {
|
|
|
34135
34943
|
stage: stage === "started" || existing?.stage === "started" ? "started" : "partial",
|
|
34136
34944
|
nested
|
|
34137
34945
|
});
|
|
34946
|
+
if (!existing)
|
|
34947
|
+
this.changed();
|
|
34138
34948
|
}
|
|
34139
34949
|
checkpoint(phase) {
|
|
34950
|
+
if (phase === "attached")
|
|
34951
|
+
this.processScope = true;
|
|
34952
|
+
if (phase === this.phase)
|
|
34953
|
+
return;
|
|
34140
34954
|
this.phase = phase;
|
|
34955
|
+
this.changed();
|
|
34141
34956
|
}
|
|
34142
34957
|
count(key, amount = 1) {
|
|
34143
|
-
if (
|
|
34144
|
-
|
|
34958
|
+
if (this.closed || !Number.isSafeInteger(amount) || amount < 0)
|
|
34959
|
+
return;
|
|
34960
|
+
this.counters[key] += amount;
|
|
34961
|
+
if (amount > 0 && Number.isFinite(COUNTER_CHANGE_THRESHOLDS[key]))
|
|
34962
|
+
this.changed();
|
|
34145
34963
|
}
|
|
34146
34964
|
translationFailed() {
|
|
34147
34965
|
this.translationFailures++;
|
|
@@ -34157,8 +34975,10 @@ class BridgeRunDiagnostics {
|
|
|
34157
34975
|
}
|
|
34158
34976
|
terminalSettled(outcome) {
|
|
34159
34977
|
this.terminal = outcome;
|
|
34160
|
-
if (outcome === "resolved")
|
|
34978
|
+
if (outcome === "resolved" && this.phase !== "draining") {
|
|
34161
34979
|
this.phase = "draining";
|
|
34980
|
+
this.changed();
|
|
34981
|
+
}
|
|
34162
34982
|
}
|
|
34163
34983
|
requestCancellation(reason = "user") {
|
|
34164
34984
|
this.cancellation = "pending";
|
|
@@ -34180,12 +35000,38 @@ class BridgeRunDiagnostics {
|
|
|
34180
35000
|
if (this.closed)
|
|
34181
35001
|
return;
|
|
34182
35002
|
const now = this.now();
|
|
34183
|
-
const age = (time) => time === undefined ? null : Math.max(0, now - time);
|
|
34184
35003
|
const tickDelayMs = event === "heartbeat" ? Math.max(0, now - this.lastTick - this.intervalMs) : 0;
|
|
34185
35004
|
if (event === "heartbeat")
|
|
34186
35005
|
this.lastTick = now;
|
|
34187
|
-
if (!
|
|
35006
|
+
if (!bridgeDiagnosticsActive())
|
|
35007
|
+
return;
|
|
35008
|
+
const stall = this.stallState(now, tickDelayMs);
|
|
35009
|
+
if (event === "heartbeat" && !this.active() && !this.periodicDue(now, stall))
|
|
35010
|
+
return;
|
|
35011
|
+
this.writeSnapshot(event, now, tickDelayMs, stall);
|
|
35012
|
+
}
|
|
35013
|
+
changed() {
|
|
35014
|
+
if (this.closed || this.changeQueued || !bridgeDiagnosticsChangesEnabled())
|
|
34188
35015
|
return;
|
|
35016
|
+
this.changeQueued = true;
|
|
35017
|
+
queueMicrotask(() => {
|
|
35018
|
+
this.changeQueued = false;
|
|
35019
|
+
this.reportChange();
|
|
35020
|
+
});
|
|
35021
|
+
}
|
|
35022
|
+
reportChange() {
|
|
35023
|
+
if (this.closed || !bridgeDiagnosticsChangesEnabled() || !bridgeDiagnosticsActive())
|
|
35024
|
+
return;
|
|
35025
|
+
const last = this.baseline;
|
|
35026
|
+
if (last && !this.changedSince(last))
|
|
35027
|
+
return;
|
|
35028
|
+
const now = this.now();
|
|
35029
|
+
try {
|
|
35030
|
+
this.writeSnapshot("change", now, 0, this.stallState(now, 0));
|
|
35031
|
+
} catch {}
|
|
35032
|
+
}
|
|
35033
|
+
writeSnapshot(event, now, tickDelayMs, stall) {
|
|
35034
|
+
const age = (time) => time === undefined ? null : Math.max(0, now - time);
|
|
34189
35035
|
const pendingTools = Array.from(this.pending.entries()).slice(0, MAX_REPORTED_TOOLS).map(([id, tool]) => ({
|
|
34190
35036
|
id,
|
|
34191
35037
|
kind: tool.kind,
|
|
@@ -34194,7 +35040,7 @@ class BridgeRunDiagnostics {
|
|
|
34194
35040
|
ageMs: age(tool.since)
|
|
34195
35041
|
}));
|
|
34196
35042
|
try {
|
|
34197
|
-
writeDiagnostic(this.bridge, event, {
|
|
35043
|
+
const written = writeDiagnostic(this.bridge, event, {
|
|
34198
35044
|
session: identity(this.state.id),
|
|
34199
35045
|
run: this.run,
|
|
34200
35046
|
phase: this.phase,
|
|
@@ -34221,8 +35067,64 @@ class BridgeRunDiagnostics {
|
|
|
34221
35067
|
completedTools: this.completedTools,
|
|
34222
35068
|
tickDelayMs
|
|
34223
35069
|
}, this.write);
|
|
35070
|
+
if (!written)
|
|
35071
|
+
return;
|
|
35072
|
+
this.baseline = {
|
|
35073
|
+
at: now,
|
|
35074
|
+
phase: this.phase,
|
|
35075
|
+
pending: new Set(this.pending.keys()),
|
|
35076
|
+
counters: { ...this.counters },
|
|
35077
|
+
stall
|
|
35078
|
+
};
|
|
34224
35079
|
} catch {}
|
|
34225
35080
|
}
|
|
35081
|
+
periodicDue(now, stall) {
|
|
35082
|
+
if (stall.signals.has("tick-delay"))
|
|
35083
|
+
return true;
|
|
35084
|
+
const last = this.baseline;
|
|
35085
|
+
if (!last)
|
|
35086
|
+
return true;
|
|
35087
|
+
if (!sameSet(stall.signals, last.stall.signals) || !sameSet(stall.tools, last.stall.tools))
|
|
35088
|
+
return true;
|
|
35089
|
+
if (stall.signals.has("no-delta") && this.changedSince(last))
|
|
35090
|
+
return true;
|
|
35091
|
+
return now - last.at >= BRIDGE_DIAGNOSTICS_KEEPALIVE_MS;
|
|
35092
|
+
}
|
|
35093
|
+
changedSince(last) {
|
|
35094
|
+
if (this.phase !== last.phase)
|
|
35095
|
+
return true;
|
|
35096
|
+
if (this.pending.size !== last.pending.size)
|
|
35097
|
+
return true;
|
|
35098
|
+
for (const key of this.pending.keys())
|
|
35099
|
+
if (!last.pending.has(key))
|
|
35100
|
+
return true;
|
|
35101
|
+
for (const key of Object.keys(this.counters))
|
|
35102
|
+
if (this.counters[key] - last.counters[key] >= COUNTER_CHANGE_THRESHOLDS[key])
|
|
35103
|
+
return true;
|
|
35104
|
+
return false;
|
|
35105
|
+
}
|
|
35106
|
+
stallState(now, tickDelayMs) {
|
|
35107
|
+
const signals = new Set;
|
|
35108
|
+
const tools = new Set;
|
|
35109
|
+
let oldestPending;
|
|
35110
|
+
for (const [key, tool] of this.pending) {
|
|
35111
|
+
if (oldestPending === undefined || tool.since < oldestPending)
|
|
35112
|
+
oldestPending = tool.since;
|
|
35113
|
+
if (now - tool.since >= STALL_TOOL_PENDING_MS)
|
|
35114
|
+
tools.add(key);
|
|
35115
|
+
}
|
|
35116
|
+
const waitingSince = this.processScope ? oldestPending : WAITING_PHASES.has(this.phase) ? this.startedAt : undefined;
|
|
35117
|
+
if (waitingSince !== undefined) {
|
|
35118
|
+
const quietSince = Math.max(this.lastDelta ?? waitingSince, waitingSince);
|
|
35119
|
+
if (now - quietSince >= STALL_NO_DELTA_MS)
|
|
35120
|
+
signals.add("no-delta");
|
|
35121
|
+
}
|
|
35122
|
+
if (tools.size > 0)
|
|
35123
|
+
signals.add("tool-pending");
|
|
35124
|
+
if (tickDelayMs >= STALL_TICK_DELAY_MS)
|
|
35125
|
+
signals.add("tick-delay");
|
|
35126
|
+
return { signals, tools };
|
|
35127
|
+
}
|
|
34226
35128
|
close(phase = "finished") {
|
|
34227
35129
|
if (this.closed)
|
|
34228
35130
|
return;
|
|
@@ -34235,8 +35137,9 @@ class BridgeRunDiagnostics {
|
|
|
34235
35137
|
}
|
|
34236
35138
|
}
|
|
34237
35139
|
function createBridgeDiagnostics(bridge, state, metrics) {
|
|
34238
|
-
return new BridgeRunDiagnostics(bridge, state, undefined, undefined, undefined, metrics, () =>
|
|
35140
|
+
return new BridgeRunDiagnostics(bridge, state, undefined, undefined, undefined, metrics, () => bridgeDiagnosticsStreamEnabled(bridge));
|
|
34239
35141
|
}
|
|
35142
|
+
var bufferedFlushes = new Set;
|
|
34240
35143
|
|
|
34241
35144
|
// ../protocol/src/structured-output-text.ts
|
|
34242
35145
|
var STRUCTURED_OUTPUT_RECOVERY_CHARS = 1024 * 1024;
|
|
@@ -36612,7 +37515,7 @@ async function answerSessionActivityBatch(body, read, options = {}) {
|
|
|
36612
37515
|
}
|
|
36613
37516
|
|
|
36614
37517
|
// ../../bridges/pi-bridge/src/http.ts
|
|
36615
|
-
var
|
|
37518
|
+
var log4 = createLogger("bridge.pi");
|
|
36616
37519
|
|
|
36617
37520
|
class HttpError extends Error {
|
|
36618
37521
|
status;
|
|
@@ -36696,7 +37599,7 @@ async function route(request, response, clientSignal) {
|
|
|
36696
37599
|
if (error instanceof PromptAttachmentError) {
|
|
36697
37600
|
return json(response, 400, { error: error.message });
|
|
36698
37601
|
}
|
|
36699
|
-
|
|
37602
|
+
log4.error("http.route-failed");
|
|
36700
37603
|
return json(response, 500, { error: "Internal bridge error" });
|
|
36701
37604
|
}
|
|
36702
37605
|
}
|
|
@@ -36942,7 +37845,7 @@ async function routeSession(request, response, url, clientSignal) {
|
|
|
36942
37845
|
return await handleCancel(response, state);
|
|
36943
37846
|
}
|
|
36944
37847
|
if (action === "compact" && request.method === "POST") {
|
|
36945
|
-
return await handleCompact(response, state);
|
|
37848
|
+
return await handleCompact(request, response, state);
|
|
36946
37849
|
}
|
|
36947
37850
|
if (action === "steer" && request.method === "POST") {
|
|
36948
37851
|
return await handleSteer(request, response, state);
|
|
@@ -37044,7 +37947,7 @@ async function handleCancel(response, state) {
|
|
|
37044
37947
|
}
|
|
37045
37948
|
return json(response, 200, { cancelled: false });
|
|
37046
37949
|
}
|
|
37047
|
-
async function handleCompact(response, state) {
|
|
37950
|
+
async function handleCompact(request, response, state) {
|
|
37048
37951
|
assertSessionOpen(state);
|
|
37049
37952
|
if (state.status === "running" || state.dispatching || state.compacting || state.commandReload || state.promptClaim !== undefined) {
|
|
37050
37953
|
throw new HttpError(409, "Session is already running");
|
|
@@ -37052,9 +37955,14 @@ async function handleCompact(response, state) {
|
|
|
37052
37955
|
state.dispatching = true;
|
|
37053
37956
|
state.compacting = true;
|
|
37054
37957
|
state.revision += 1;
|
|
37958
|
+
let instructions;
|
|
37055
37959
|
try {
|
|
37960
|
+
const parsed = parseCompactInstructionsBody(await readJsonValue(request));
|
|
37961
|
+
if (!parsed.ok)
|
|
37962
|
+
throw new HttpError(400, parsed.error);
|
|
37963
|
+
instructions = parsed.instructions;
|
|
37056
37964
|
const session = await ensureSession(state);
|
|
37057
|
-
await session.compact();
|
|
37965
|
+
await session.compact(instructions);
|
|
37058
37966
|
} finally {
|
|
37059
37967
|
state.compacting = false;
|
|
37060
37968
|
state.dispatching = false;
|
|
@@ -37064,7 +37972,7 @@ async function handleCompact(response, state) {
|
|
|
37064
37972
|
return;
|
|
37065
37973
|
});
|
|
37066
37974
|
}
|
|
37067
|
-
return json(response, 200, { compacted: true });
|
|
37975
|
+
return json(response, 200, instructions ? { compacted: true, instructions: "applied" } : { compacted: true });
|
|
37068
37976
|
}
|
|
37069
37977
|
async function handleSteer(request, response, state) {
|
|
37070
37978
|
const body = await readJson(request);
|
|
@@ -37575,6 +38483,10 @@ function readBoundedString(value, limit, field) {
|
|
|
37575
38483
|
return trimmed;
|
|
37576
38484
|
}
|
|
37577
38485
|
async function readJson(request) {
|
|
38486
|
+
const parsed = await readJsonValue(request);
|
|
38487
|
+
return isObject(parsed) ? parsed : {};
|
|
38488
|
+
}
|
|
38489
|
+
async function readJsonValue(request) {
|
|
37578
38490
|
const chunks = [];
|
|
37579
38491
|
let total = 0;
|
|
37580
38492
|
for await (const chunk of request) {
|
|
@@ -37587,8 +38499,7 @@ async function readJson(request) {
|
|
|
37587
38499
|
if (total === 0)
|
|
37588
38500
|
return {};
|
|
37589
38501
|
try {
|
|
37590
|
-
|
|
37591
|
-
return isObject(parsed) ? parsed : {};
|
|
38502
|
+
return JSON.parse(Buffer.concat(chunks).toString("utf8"));
|
|
37592
38503
|
} catch {
|
|
37593
38504
|
throw new HttpError(400, "Request body must be JSON");
|
|
37594
38505
|
}
|
|
@@ -37696,7 +38607,7 @@ function startParentWatchdog(options) {
|
|
|
37696
38607
|
}
|
|
37697
38608
|
|
|
37698
38609
|
// ../protocol/src/bridge-lifecycle.ts
|
|
37699
|
-
var
|
|
38610
|
+
var log5 = createLogger("bridge.lifecycle");
|
|
37700
38611
|
var TERMINATION_SIGNALS = ["SIGTERM", "SIGINT"];
|
|
37701
38612
|
function errorKind(error) {
|
|
37702
38613
|
if (error instanceof Error)
|
|
@@ -37750,7 +38661,7 @@ class BridgeLifecycle {
|
|
|
37750
38661
|
}
|
|
37751
38662
|
requestExit() {
|
|
37752
38663
|
this.#exit ??= this.shutdown().then(() => this.#options.exit(0), (error) => {
|
|
37753
|
-
|
|
38664
|
+
log5.error("shutdown.failed", {
|
|
37754
38665
|
bridge: this.#options.label,
|
|
37755
38666
|
errorClass: errorKind(error)
|
|
37756
38667
|
});
|
|
@@ -37767,7 +38678,7 @@ class BridgeLifecycle {
|
|
|
37767
38678
|
try {
|
|
37768
38679
|
idleSweep.run();
|
|
37769
38680
|
} catch (error) {
|
|
37770
|
-
|
|
38681
|
+
log5.warn("idle-sweep.failed", {
|
|
37771
38682
|
bridge: this.#options.label,
|
|
37772
38683
|
errorClass: errorKind(error)
|
|
37773
38684
|
});
|