agent-log-viewer 1.2.1 → 1.2.2
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/mcp-server.mjs +2225 -1385
- package/dist/runtime-host.mjs +1690 -972
- package/dist/standalone/.next/BUILD_ID +1 -1
- package/dist/standalone/.next/app-path-routes-manifest.json +26 -24
- package/dist/standalone/.next/build-manifest.json +2 -2
- package/dist/standalone/.next/prerender-manifest.json +4 -4
- package/dist/standalone/.next/required-server-files.json +1 -0
- package/dist/standalone/.next/routes-manifest.json +12 -0
- package/dist/standalone/.next/server/account-migration-controller-worker.js +1 -1
- package/dist/standalone/.next/server/app/_global-error/page.js +2 -2
- package/dist/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/standalone/.next/server/app/_not-found/page.js +1 -1
- package/dist/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/standalone/.next/server/app/_not-found.rsc +2 -2
- package/dist/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/dist/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/dist/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/dist/standalone/.next/server/app/api/access/route.js +1 -1
- package/dist/standalone/.next/server/app/api/access/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/account-migrations/[intentId]/route.js +1 -1
- package/dist/standalone/.next/server/app/api/account-migrations/[intentId]/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/account-project-bindings/route.js +1 -1
- package/dist/standalone/.next/server/app/api/account-project-bindings/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/[id]/status/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/[id]/status/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/active/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/active/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/limits/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/limits/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/login/[operationId]/input/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/login/[operationId]/input/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/login/[operationId]/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/login/[operationId]/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/policy/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/policy/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/terminal/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/claude/terminal/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/cli/route.js +1 -0
- package/dist/standalone/.next/server/app/api/accounts/cli/route.js.nft.json +1 -0
- package/dist/standalone/.next/server/app/api/accounts/cli/route_client-reference-manifest.js +1 -0
- package/dist/standalone/.next/server/app/api/accounts/codex/active/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/codex/active/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/codex/limits/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/codex/limits/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/codex/policy/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/codex/policy/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/codex/reset-credits/route.js +2 -2
- package/dist/standalone/.next/server/app/api/accounts/codex/reset-credits/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/codex/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/codex/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/codex/terminal/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/codex/terminal/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/accounts/route.js +1 -1
- package/dist/standalone/.next/server/app/api/accounts/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/agent/route.js +1 -1
- package/dist/standalone/.next/server/app/api/agent/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/agent/snapshot/route.js +1 -1
- package/dist/standalone/.next/server/app/api/agent/snapshot/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/answer/route.js +1 -1
- package/dist/standalone/.next/server/app/api/answer/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/artifact/route.js +1 -1
- package/dist/standalone/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/attach-command/route.js +1 -1
- package/dist/standalone/.next/server/app/api/attach-command/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/attention/[id]/route.js +1 -1
- package/dist/standalone/.next/server/app/api/attention/[id]/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/attention/route.js +1 -1
- package/dist/standalone/.next/server/app/api/attention/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/board/route.js +1 -1
- package/dist/standalone/.next/server/app/api/board/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/bridge/route.js +1 -1
- package/dist/standalone/.next/server/app/api/bridge/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/conversation-host/route.js +1 -1
- package/dist/standalone/.next/server/app/api/conversation-host/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/conversation-host/targets/route.js +1 -1
- package/dist/standalone/.next/server/app/api/conversation-host/targets/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/conversations/[conversationId]/migration/route.js +1 -1
- package/dist/standalone/.next/server/app/api/conversations/[conversationId]/migration/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/conversations/route.js +1 -1
- package/dist/standalone/.next/server/app/api/conversations/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/files/route.js +6 -3
- package/dist/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/flows/[id]/route.js +1 -1
- package/dist/standalone/.next/server/app/api/flows/[id]/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/flows/route.js +1 -1
- package/dist/standalone/.next/server/app/api/flows/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/image/route.js +1 -1
- package/dist/standalone/.next/server/app/api/image/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/inbox/route.js +2 -2
- package/dist/standalone/.next/server/app/api/inbox/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/lifecycle/reaper/route.js +1 -1
- package/dist/standalone/.next/server/app/api/lifecycle/reaper/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/limits/history/route.js +1 -1
- package/dist/standalone/.next/server/app/api/limits/history/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/limits/route.js +1 -1
- package/dist/standalone/.next/server/app/api/limits/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/log/preflight/route.js +1 -1
- package/dist/standalone/.next/server/app/api/log/preflight/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/log/project-delete/route.js +1 -1
- package/dist/standalone/.next/server/app/api/log/project-delete/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/log/provenance/route.js +14 -12
- package/dist/standalone/.next/server/app/api/log/provenance/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/log/route.js +1 -1
- package/dist/standalone/.next/server/app/api/log/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/log/suggestions/route.js +2 -2
- package/dist/standalone/.next/server/app/api/log/suggestions/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/logs/route.js +1 -1
- package/dist/standalone/.next/server/app/api/logs/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/logs/stream/route.js +2 -2
- package/dist/standalone/.next/server/app/api/logs/stream/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/monitor/runs/route.js +1 -1
- package/dist/standalone/.next/server/app/api/monitor/runs/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/monitor/seat-tick/route.js +6 -5
- package/dist/standalone/.next/server/app/api/monitor/seat-tick/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/monitor/seat-tick/settings/route.js +2 -2
- package/dist/standalone/.next/server/app/api/monitor/seat-tick/settings/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/onboarding/route.js +1 -0
- package/dist/standalone/.next/server/app/api/onboarding/route.js.nft.json +1 -0
- package/dist/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -0
- package/dist/standalone/.next/server/app/api/orchestrator/rotate/route.js +1 -1
- package/dist/standalone/.next/server/app/api/orchestrator/rotate/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/orchestrator/seat/route.js +1 -1
- package/dist/standalone/.next/server/app/api/orchestrator/seat/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/orchestrator/seat/status/route.js +1 -1
- package/dist/standalone/.next/server/app/api/orchestrator/seat/status/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/pipelines/[id]/route.js +1 -1
- package/dist/standalone/.next/server/app/api/pipelines/[id]/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/pipelines/preflight/route.js +1 -1
- package/dist/standalone/.next/server/app/api/pipelines/preflight/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/pipelines/route.js +1 -1
- package/dist/standalone/.next/server/app/api/pipelines/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/pipelines/tick/route.js +1 -2
- package/dist/standalone/.next/server/app/api/pipelines/tick/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/proc/route.js +1 -1
- package/dist/standalone/.next/server/app/api/proc/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/projects/create/route.js +2 -2
- package/dist/standalone/.next/server/app/api/projects/create/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/projects/crown/route.js +1 -1
- package/dist/standalone/.next/server/app/api/projects/crown/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/projects/directories/route.js +1 -1
- package/dist/standalone/.next/server/app/api/projects/directories/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/push/route.js +2 -2
- package/dist/standalone/.next/server/app/api/push/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/resources/route.js +1 -1
- package/dist/standalone/.next/server/app/api/resources/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/roles/route.js +3 -3
- package/dist/standalone/.next/server/app/api/roles/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/answer/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/answer/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/deployments/[deploymentId]/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/deployments/[deploymentId]/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/deployments/capabilities/v1/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/deployments/capabilities/v1/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/deployments/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/deployments/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/hosts/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/hosts/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/inject/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/inject/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/interrupt/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/interrupt/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/operations/[operationId]/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/operations/[operationId]/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/operations/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/operations/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/queue/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/queue/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/realtime/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/realtime/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/send/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/send/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/snapshot/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/snapshot/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/spawn/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/spawn/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/steer/route.js +1 -1
- package/dist/standalone/.next/server/app/api/runtime/steer/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/runtime/stream/route.js +2 -2
- package/dist/standalone/.next/server/app/api/runtime/stream/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/search/transcripts/route.js +1 -1
- package/dist/standalone/.next/server/app/api/search/transcripts/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/session/route.js +1 -1
- package/dist/standalone/.next/server/app/api/session/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/session/supersedence/route.js +1 -1
- package/dist/standalone/.next/server/app/api/session/supersedence/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/session/title/route.js +1 -1
- package/dist/standalone/.next/server/app/api/session/title/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/spawn/policy/route.js +2 -2
- package/dist/standalone/.next/server/app/api/spawn/policy/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/spawn/route.js +1 -1
- package/dist/standalone/.next/server/app/api/spawn/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/spawn/validate/route.js +1 -1
- package/dist/standalone/.next/server/app/api/spawn/validate/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/staging/route.js +2 -2
- package/dist/standalone/.next/server/app/api/staging/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/task-attachments/route.js +2 -2
- package/dist/standalone/.next/server/app/api/task-attachments/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/tasks/[id]/assignment/route.js +1 -1
- package/dist/standalone/.next/server/app/api/tasks/[id]/assignment/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/tasks/[id]/route.js +1 -1
- package/dist/standalone/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/tasks/[id]/send/route.js +1 -1
- package/dist/standalone/.next/server/app/api/tasks/[id]/send/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/tasks/[id]/spawn/route.js +1 -1
- package/dist/standalone/.next/server/app/api/tasks/[id]/spawn/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/tasks/curator/route.js +1 -1
- package/dist/standalone/.next/server/app/api/tasks/curator/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/tasks/route.js +1 -1
- package/dist/standalone/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/telegram/reports/route.js +1 -1
- package/dist/standalone/.next/server/app/api/telegram/reports/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/telegram/route.js +1 -1
- package/dist/standalone/.next/server/app/api/telegram/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/timeline/route.js +1 -1
- package/dist/standalone/.next/server/app/api/timeline/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/tmux/route.js +1 -1
- package/dist/standalone/.next/server/app/api/tmux/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/tmux/targets/route.js +1 -1
- package/dist/standalone/.next/server/app/api/tmux/targets/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/transcribe/backend/route.js +2 -2
- package/dist/standalone/.next/server/app/api/transcribe/backend/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/transcribe/route.js +2 -2
- package/dist/standalone/.next/server/app/api/transcribe/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/transcribe/token/route.js +2 -2
- package/dist/standalone/.next/server/app/api/transcribe/token/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/tts/backend/route.js +1 -1
- package/dist/standalone/.next/server/app/api/tts/backend/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/tts/route.js +2 -2
- package/dist/standalone/.next/server/app/api/tts/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/view/presence/route.js +2 -1
- package/dist/standalone/.next/server/app/api/view/presence/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/workflows/[id]/route.js +1 -1
- package/dist/standalone/.next/server/app/api/workflows/[id]/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/api/workflows/route.js +1 -1
- package/dist/standalone/.next/server/app/api/workflows/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/favicon.ico/route.js +1 -1
- package/dist/standalone/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/index.html +1 -1
- package/dist/standalone/.next/server/app/index.rsc +3 -3
- package/dist/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/dist/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/dist/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/dist/standalone/.next/server/app/page.js +20 -20
- package/dist/standalone/.next/server/app/page.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/standalone/.next/server/app-paths-manifest.json +26 -24
- package/dist/standalone/.next/server/chunks/107.js +1 -1
- package/dist/standalone/.next/server/chunks/1106.js +5 -0
- package/dist/standalone/.next/server/chunks/112.js +1 -0
- package/dist/standalone/.next/server/chunks/1406.js +35 -168
- package/dist/standalone/.next/server/chunks/1585.js +3 -3
- package/dist/standalone/.next/server/chunks/160.js +18 -18
- package/dist/standalone/.next/server/chunks/1617.js +1 -1
- package/dist/standalone/.next/server/chunks/1849.js +1 -1
- package/dist/standalone/.next/server/chunks/1952.js +1 -1
- package/dist/standalone/.next/server/chunks/2499.js +1 -0
- package/dist/standalone/.next/server/chunks/2555.js +1 -1
- package/dist/standalone/.next/server/chunks/2589.js +127 -0
- package/dist/standalone/.next/server/chunks/261.js +1 -0
- package/dist/standalone/.next/server/chunks/2744.js +1 -1
- package/dist/standalone/.next/server/chunks/286.js +2 -2
- package/dist/standalone/.next/server/chunks/2914.js +20 -21
- package/dist/standalone/.next/server/chunks/2916.js +1 -0
- package/dist/standalone/.next/server/chunks/3086.js +1 -1
- package/dist/standalone/.next/server/chunks/3407.js +1 -1
- package/dist/standalone/.next/server/chunks/3509.js +1 -0
- package/dist/standalone/.next/server/chunks/3570.js +1 -1
- package/dist/standalone/.next/server/chunks/3696.js +5 -0
- package/dist/standalone/.next/server/chunks/3743.js +9 -9
- package/dist/standalone/.next/server/chunks/3784.js +5 -0
- package/dist/standalone/.next/server/chunks/3830.js +1 -1
- package/dist/standalone/.next/server/chunks/3957.js +1 -0
- package/dist/standalone/.next/server/chunks/4037.js +1 -1
- package/dist/standalone/.next/server/chunks/4651.js +1 -1
- package/dist/standalone/.next/server/chunks/4972.js +38 -16
- package/dist/standalone/.next/server/chunks/53.js +1 -0
- package/dist/standalone/.next/server/chunks/5408.js +1 -1
- package/dist/standalone/.next/server/chunks/5465.js +156 -0
- package/dist/standalone/.next/server/chunks/5545.js +1 -1
- package/dist/standalone/.next/server/chunks/568.js +1 -1
- package/dist/standalone/.next/server/chunks/6023.js +1 -1
- package/dist/standalone/.next/server/chunks/6211.js +1 -0
- package/dist/standalone/.next/server/chunks/6289.js +1 -2
- package/dist/standalone/.next/server/chunks/6418.js +1 -0
- package/dist/standalone/.next/server/chunks/6453.js +1 -1
- package/dist/standalone/.next/server/chunks/6522.js +1 -1
- package/dist/standalone/.next/server/chunks/6796.js +1 -1
- package/dist/standalone/.next/server/chunks/6826.js +3 -3
- package/dist/standalone/.next/server/chunks/6942.js +3 -3
- package/dist/standalone/.next/server/chunks/6978.js +1 -1
- package/dist/standalone/.next/server/chunks/7008.js +21 -19
- package/dist/standalone/.next/server/chunks/7192.js +1 -1
- package/dist/standalone/.next/server/chunks/7238.js +2 -2
- package/dist/standalone/.next/server/chunks/7294.js +1 -0
- package/dist/standalone/.next/server/chunks/7722.js +1 -1
- package/dist/standalone/.next/server/chunks/781.js +17 -17
- package/dist/standalone/.next/server/chunks/8027.js +1 -1
- package/dist/standalone/.next/server/chunks/8330.js +1 -0
- package/dist/standalone/.next/server/chunks/8444.js +1 -1
- package/dist/standalone/.next/server/chunks/8512.js +1 -1
- package/dist/standalone/.next/server/chunks/8513.js +2 -2
- package/dist/standalone/.next/server/chunks/8617.js +1 -1
- package/dist/standalone/.next/server/chunks/8817.js +2 -2
- package/dist/standalone/.next/server/chunks/8966.js +1 -1
- package/dist/standalone/.next/server/chunks/8985.js +1 -1
- package/dist/standalone/.next/server/chunks/8996.js +1 -1
- package/dist/standalone/.next/server/chunks/9006.js +1 -0
- package/dist/standalone/.next/server/chunks/9060.js +4 -0
- package/dist/standalone/.next/server/chunks/9296.js +20 -21
- package/dist/standalone/.next/server/chunks/9298.js +1 -2
- package/dist/standalone/.next/server/chunks/9307.js +1 -1
- package/dist/standalone/.next/server/chunks/9360.js +12 -12
- package/dist/standalone/.next/server/chunks/9517.js +1 -1
- package/dist/standalone/.next/server/chunks/9611.js +1 -0
- package/dist/standalone/.next/server/chunks/9822.js +1 -1
- package/dist/standalone/.next/server/chunks/9839.js +5 -0
- package/dist/standalone/.next/server/chunks/9867.js +1 -0
- package/dist/standalone/.next/server/chunks/9940.js +37 -15
- package/dist/standalone/.next/server/chunks/9998.js +1 -1
- package/dist/standalone/.next/server/file-scanner-worker.js +1 -1
- package/dist/standalone/.next/server/files-response-worker.js +2 -2
- package/dist/standalone/.next/server/functions-config-manifest.json +2 -0
- package/dist/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/standalone/.next/server/middleware.js +3 -3
- package/dist/standalone/.next/server/pages/404.html +1 -1
- package/dist/standalone/.next/server/pages/500.html +1 -1
- package/dist/standalone/.next/server/resource-collector-worker.js +1 -1
- package/dist/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/standalone/.next/server/state-backup-worker.js +3 -0
- package/dist/standalone/.next/server/wakatime-sync-worker.js +1 -1
- package/dist/standalone/.next/static/chunks/9591-0fd6a5a4172de16d.js +1 -0
- package/dist/standalone/.next/static/chunks/app/_global-error/page-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/access/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/account-migrations/[intentId]/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/account-project-bindings/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/[id]/status/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/active/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/limits/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/login/[operationId]/input/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/login/[operationId]/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/policy/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/terminal/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/cli/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/codex/active/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/codex/limits/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/codex/policy/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/codex/reset-credits/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/codex/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/codex/terminal/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/accounts/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/agent/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/agent/snapshot/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/answer/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/artifact/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/attach-command/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/attention/[id]/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/attention/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/board/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/bridge/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/conversation-host/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/conversation-host/targets/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/conversations/[conversationId]/migration/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/conversations/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/files/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/flows/[id]/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/flows/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/image/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/inbox/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/lifecycle/reaper/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/limits/history/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/limits/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/log/preflight/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/log/project-delete/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/log/provenance/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/log/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/log/suggestions/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/logs/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/logs/stream/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/monitor/runs/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/monitor/seat-tick/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/monitor/seat-tick/settings/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/onboarding/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/orchestrator/rotate/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/orchestrator/seat/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/orchestrator/seat/status/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/pipelines/[id]/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/pipelines/preflight/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/pipelines/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/pipelines/tick/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/proc/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/projects/create/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/projects/crown/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/projects/directories/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/push/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/resources/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/roles/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/answer/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/deployments/[deploymentId]/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/deployments/capabilities/v1/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/deployments/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/hosts/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/inject/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/interrupt/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/operations/[operationId]/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/operations/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/queue/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/realtime/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/send/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/snapshot/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/spawn/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/steer/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/runtime/stream/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/search/transcripts/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/session/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/session/supersedence/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/session/title/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/spawn/policy/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/spawn/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/spawn/validate/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/staging/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/task-attachments/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/tasks/[id]/assignment/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/tasks/[id]/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/tasks/[id]/send/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/tasks/[id]/spawn/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/tasks/curator/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/tasks/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/telegram/reports/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/telegram/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/timeline/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/tmux/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/tmux/targets/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/transcribe/backend/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/transcribe/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/transcribe/token/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/tts/backend/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/tts/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/view/presence/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/workflows/[id]/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/api/workflows/route-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/app/page-a2e19d755e17b569.js +125 -0
- package/dist/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-151390fbd8c93c25.js +1 -0
- package/dist/standalone/.next/static/css/9b32c3f7f468cbcc.css +1 -0
- package/dist/standalone/.next/static/fQ2a5S10vvpyAqE0L_wUj/_buildManifest.js +1 -0
- package/dist/standalone/package.json +1 -1
- package/dist/standalone/server.bun.js +1 -1
- package/dist/standalone/src/lib/viewerInstrumentation.ts +44 -1
- package/package.json +1 -1
- package/dist/standalone/.next/server/chunks/1888.js +0 -1
- package/dist/standalone/.next/server/chunks/4127.js +0 -1
- package/dist/standalone/.next/server/chunks/606.js +0 -126
- package/dist/standalone/.next/static/836HTp-5V8cZC5YWFVOCk/_buildManifest.js +0 -1
- package/dist/standalone/.next/static/chunks/7333-cf17cea2a91e7b4b.js +0 -1
- package/dist/standalone/.next/static/chunks/app/_global-error/page-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/access/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/account-migrations/[intentId]/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/account-project-bindings/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/[id]/status/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/active/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/limits/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/login/[operationId]/input/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/login/[operationId]/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/policy/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/claude/terminal/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/codex/active/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/codex/limits/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/codex/policy/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/codex/reset-credits/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/codex/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/codex/terminal/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/accounts/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/agent/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/agent/snapshot/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/answer/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/artifact/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/attach-command/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/attention/[id]/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/attention/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/board/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/bridge/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/conversation-host/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/conversation-host/targets/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/conversations/[conversationId]/migration/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/conversations/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/files/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/flows/[id]/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/flows/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/image/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/inbox/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/lifecycle/reaper/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/limits/history/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/limits/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/log/preflight/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/log/project-delete/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/log/provenance/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/log/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/log/suggestions/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/logs/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/logs/stream/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/monitor/runs/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/monitor/seat-tick/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/monitor/seat-tick/settings/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/orchestrator/rotate/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/orchestrator/seat/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/orchestrator/seat/status/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/pipelines/[id]/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/pipelines/preflight/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/pipelines/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/pipelines/tick/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/proc/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/projects/create/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/projects/crown/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/projects/directories/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/push/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/resources/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/roles/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/answer/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/deployments/[deploymentId]/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/deployments/capabilities/v1/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/deployments/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/hosts/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/inject/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/interrupt/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/operations/[operationId]/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/operations/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/queue/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/realtime/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/send/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/snapshot/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/spawn/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/steer/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/runtime/stream/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/search/transcripts/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/session/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/session/supersedence/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/session/title/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/spawn/policy/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/spawn/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/spawn/validate/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/staging/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/task-attachments/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/tasks/[id]/assignment/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/tasks/[id]/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/tasks/[id]/send/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/tasks/[id]/spawn/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/tasks/curator/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/tasks/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/telegram/reports/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/telegram/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/timeline/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/tmux/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/tmux/targets/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/transcribe/backend/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/transcribe/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/transcribe/token/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/tts/backend/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/tts/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/view/presence/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/workflows/[id]/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/api/workflows/route-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/app/page-1cde2db61f461960.js +0 -125
- package/dist/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-60a25d1c4cbf0128.js +0 -1
- package/dist/standalone/.next/static/css/b25c03e915fd256b.css +0 -1
- /package/dist/standalone/.next/static/{836HTp-5V8cZC5YWFVOCk → fQ2a5S10vvpyAqE0L_wUj}/_ssgManifest.js +0 -0
|
@@ -65,6 +65,8 @@ interface ViewerReleaseActivationOptions {
|
|
|
65
65
|
log?: (...args: unknown[]) => void;
|
|
66
66
|
fenceRequest?: () => HotStateAuthority | null;
|
|
67
67
|
onFenceRequested?: (request: HotStateAuthority) => void | Promise<void>;
|
|
68
|
+
/** A fence this release acknowledged was withdrawn while it stayed current. */
|
|
69
|
+
onFenceWithdrawn?: () => void | Promise<void>;
|
|
68
70
|
onDemoted?: (context: { fenced: boolean }) => void | Promise<void>;
|
|
69
71
|
}
|
|
70
72
|
|
|
@@ -237,7 +239,12 @@ export async function activateViewerRuntimeWhenCurrent(
|
|
|
237
239
|
}
|
|
238
240
|
const fence = started ? options.fenceRequest?.() ?? null : null;
|
|
239
241
|
if (!fence || fence.mode !== "fencing") {
|
|
240
|
-
if (!fenceInProgress
|
|
242
|
+
if (!fenceInProgress && fencedEpoch !== null) {
|
|
243
|
+
fencedEpoch = null;
|
|
244
|
+
void Promise.resolve(options.onFenceWithdrawn?.()).catch((error) => {
|
|
245
|
+
log("[viewer release] withdrawn fence recovery failed", error);
|
|
246
|
+
});
|
|
247
|
+
}
|
|
241
248
|
} else if (fencedEpoch !== fence.epoch && !fenceInProgress) {
|
|
242
249
|
fenceInProgress = true;
|
|
243
250
|
void Promise.resolve(options.onFenceRequested?.(fence)).then(() => {
|
|
@@ -325,6 +332,10 @@ export async function checkpointHotStateRollbackMirrorsForDemotion(): Promise<Ho
|
|
|
325
332
|
const flowRevision = await flows.checkpointFlowRollbackMirrorForDemotionAsync();
|
|
326
333
|
const pipelineRevisions = await pipelines.checkpointPipelineRollbackMirrorsForDemotionAsync();
|
|
327
334
|
const workflowRevision = await workflows.checkpointWorkflowRollbackMirrorForDemotionAsync();
|
|
335
|
+
/* Stores moved by #1870 record their mirror in `state_imports`, not in the
|
|
336
|
+
checkpoint record older adapters parse. */
|
|
337
|
+
const { checkpointLegacyCollectionMirrorsForDemotion } = await import("@/lib/state/legacyCollections");
|
|
338
|
+
await checkpointLegacyCollectionMirrorsForDemotion();
|
|
328
339
|
return {
|
|
329
340
|
flows: flowRevision,
|
|
330
341
|
pipelines: pipelineRevisions.pipelines,
|
|
@@ -732,6 +743,23 @@ export async function completeViewerRuntimeActivation(
|
|
|
732
743
|
steps.publishViewerReleaseReady();
|
|
733
744
|
}
|
|
734
745
|
|
|
746
|
+
/** Check every state database before a store opens one (#1870 slice 10):
|
|
747
|
+
a damaged one is replaced by its newest good backup, or starts empty. The
|
|
748
|
+
returned `start` raises the board cards and arms the backup timer once the
|
|
749
|
+
release is ready. A failure here never blocks activation. */
|
|
750
|
+
export async function checkStateDatabasesBeforeStores(
|
|
751
|
+
stateDirectory: string,
|
|
752
|
+
): Promise<{ start(ownsTraffic: () => boolean): void }> {
|
|
753
|
+
try {
|
|
754
|
+
const { checkStateDatabasesAtActivation, startStateDurability } = await import("@/lib/state/durability");
|
|
755
|
+
const incidents = checkStateDatabasesAtActivation(stateDirectory);
|
|
756
|
+
return { start: (ownsTraffic) => { startStateDurability({ stateDirectory, incidents, ownsTraffic }); } };
|
|
757
|
+
} catch (error) {
|
|
758
|
+
console.error("[state durability] activation check failed", error instanceof Error ? error.message : String(error));
|
|
759
|
+
return { start: () => {} };
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
|
|
735
763
|
/** The full node-runtime startup sequence `src/instrumentation.ts` defers to. */
|
|
736
764
|
export async function registerViewerRuntime(): Promise<void> {
|
|
737
765
|
discardWakatimeEnvironmentCredential();
|
|
@@ -760,7 +788,10 @@ export async function registerViewerRuntime(): Promise<void> {
|
|
|
760
788
|
await activateViewerRuntimeWhenCurrent(async () => {
|
|
761
789
|
const boundary = await establishHotStateCutoverBoundary(isCurrent);
|
|
762
790
|
activatedReleaseRevision = boundary.authority?.releaseRevision ?? null;
|
|
791
|
+
const durability = await checkStateDatabasesBeforeStores(hotStateDirectory);
|
|
763
792
|
const authority = await initializeHotStateStoresAtStartup(boundary);
|
|
793
|
+
const { ensureLegacyCollectionsImported } = await import("@/lib/state/legacyCollections");
|
|
794
|
+
await ensureLegacyCollectionsImported();
|
|
764
795
|
let activatedAuthority: HotStateAuthority | null = null;
|
|
765
796
|
await completeViewerRuntimeActivation({
|
|
766
797
|
initializeOperatorCapability: initializeOperatorSpawnCapabilityAtStartup,
|
|
@@ -789,6 +820,7 @@ export async function registerViewerRuntime(): Promise<void> {
|
|
|
789
820
|
if (activatedAuthority) markViewerReleaseReady(hotStateDirectory, activatedAuthority);
|
|
790
821
|
},
|
|
791
822
|
});
|
|
823
|
+
durability.start(isCurrent);
|
|
792
824
|
}, isCurrent, {
|
|
793
825
|
fenceRequest: () => {
|
|
794
826
|
const revision = releaseRevision();
|
|
@@ -807,6 +839,17 @@ export async function registerViewerRuntime(): Promise<void> {
|
|
|
807
839
|
agentRegistry().checkpointRollbackMirrorForDemotion();
|
|
808
840
|
acknowledgeHotStateFence(hotStateDirectory, request, revisions);
|
|
809
841
|
},
|
|
842
|
+
/* A cancelled deployment restores this release's authority but leaves the
|
|
843
|
+
rollback mirrors writable, so an older release's MCP process could write
|
|
844
|
+
one nothing reads. Re-running the import folds such writes in and puts
|
|
845
|
+
the tombstones back. */
|
|
846
|
+
onFenceWithdrawn: async () => {
|
|
847
|
+
const revision = releaseRevision();
|
|
848
|
+
const authority = readHotStateAuthority(hotStateDirectory);
|
|
849
|
+
if (!isCurrent() || revision === null || authority?.mode !== "sqlite" || authority.releaseRevision !== revision) return;
|
|
850
|
+
const { ensureLegacyCollectionsImported } = await import("@/lib/state/legacyCollections");
|
|
851
|
+
await ensureLegacyCollectionsImported();
|
|
852
|
+
},
|
|
810
853
|
onDemoted: async ({ fenced }) => {
|
|
811
854
|
await quiesceStartup();
|
|
812
855
|
await completeViewerReleaseDemotion(async () => {
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=1888,exports.ids=[1888],exports.modules={51888:(a,b,c)=>{c.d(b,{Gh:()=>l,JL:()=>i,OV:()=>n,RC:()=>k,Ze:()=>g,aE:()=>q,c7:()=>d,cC:()=>j,fC:()=>f,g9:()=>r,u$:()=>o,wi:()=>s});let d="gpt-6-astra",e="gpt-5.6-sol",f="gpt-5.6-terra",g="gpt-5.6-luna",h=new Set([d,e,f,g,"gpt-5.5","gpt-5.4","gpt-5.4-mini"]);function i(a){return!a?.trim()||h.has(a.trim())}let j={claude:[{id:"opus",label:"Opus 5",shortLabel:"Opus 5",use:"review"},{id:"fable",label:"Fable",shortLabel:"Fable",use:"general"},{id:"sonnet",label:"Sonnet",shortLabel:"Sonnet",use:"implement"},{id:"haiku",label:"Haiku",shortLabel:"Haiku",use:"general"}],codex:[{id:d,label:"GPT-6-Astra",shortLabel:"6-Astra",use:"review"},{id:e,label:"GPT-5.6-Sol",shortLabel:"5.6-Sol",use:"review"},{id:f,label:"GPT-5.6-Terra",shortLabel:"5.6-Terra",use:"implement"},{id:g,label:"GPT-5.6-Luna",shortLabel:"5.6-Luna",use:"general"}]};function k(a,b){let c=b.trim(),d=j[a].map(a=>a.id);return d.includes(c)?{model:c}:{error:`invalid ${a} model id ${JSON.stringify(c)}; valid ${a} model ids: ${d.join(", ")}`}}function l(a){return"codex"===a?d:"opus"}let m=["fable","opus","sonnet","haiku"];function n(a){if("string"!=typeof a)return null;let b=a.trim().toLowerCase();if(!b||b.length>128||/[\u0000-\u001f\u007f]/.test(b))return null;for(let a of m)if(b===a||RegExp(`(?:^|[-_.])${a}(?:[-_.]|$)`).test(b))return a;return null}function o(a){return a?.trim()?n(a):l("claude")}let p={fable:"Fable",mythos:"Mythos",opus:"Opus",sonnet:"Sonnet",haiku:"Haiku"};function q(a,b){let c=b?.trim();if(c)return c;let d=a.trim().toLowerCase();return p[d]?p[d]:d?d.split(/[-_\s]+/).filter(Boolean).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "):a}function r(a){if("string"!=typeof a)return!1;let b=a.trim();return b.startsWith("gpt-")&&b.length<=128&&!/[\u0000-\u001f\u007f]/.test(b)}function s(a){if(void 0===a.model||null===a.model||""===a.model)return{model:null};if("string"!=typeof a.model)return{model:null,error:"model must be a string"};let b=a.model.trim();return b?b.length>128||/[\u0000-\u001f\u007f]/.test(b)?{model:null,error:"model must be a printable id up to 128 characters"}:{model:b}:{model:null}}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=4127,exports.ids=[4127],exports.modules={74127:(a,b,c)=>{c.d(b,{lx:()=>x,vK:()=>C,x_:()=>D});var d=c(77598),e=c(73024),f=c.n(e),g=c(12770),h=c(52509);function i(a){return a&&"object"==typeof a&&!Array.isArray(a)?a:{}}function j(a){return a&&"object"==typeof a&&!Array.isArray(a)?a:null}function k(a){return Array.isArray(a)?a.filter(a=>!!a&&"object"==typeof a&&!Array.isArray(a)):[]}function l(a){return"string"==typeof a?a:""}function m(a){return l(a.timestamp)||l(a.ts)||null}function n(a,b=8388608){let c;try{let d=f().statSync(a),e=Math.max(0,d.size-b),g=f().openSync(a,"r");try{let a=Buffer.alloc(d.size-e);f().readSync(g,a,0,a.length,e),c=a.toString("utf8")}finally{f().closeSync(g)}e>0&&(c=c.slice(c.indexOf("\n")+1))}catch{return[]}let d=[];for(let a of c.split("\n")){let b=a.trim();if(b)try{let a=JSON.parse(b);a&&"object"==typeof a&&!Array.isArray(a)&&d.push(a)}catch{}}return d}function o(a){return"string"==typeof a?a:k(a).map(a=>"text"===a.type||"input_text"===a.type||"output_text"===a.type?l(a.text):"thinking"===a.type?l(a.thinking):"tool_use"===a.type?`${l(a.name)} ${JSON.stringify(i(a.input))}`.trim():"tool_result"===a.type?o(a.content)||l(a.tool_use_id):"").filter(Boolean).join("\n").trim()}function p(a){return k(a).some(a=>"tool_result"===a.type)}function q(a){let b=a.origin;if("system"===a.promptSource&&"task-notification"===i(b).kind||"task"===b||"task"===i(b).kind)return!0;let c=o(i(a.message).content).trim();return/^<task-notification(?:\s[^>]*)?>[\s\S]*<\/task-notification>$/.test(c)}function r(a,b){b.text.trim()&&("message"===b.kind?a.messages.push(b):"reasoning"===b.kind?a.reasoning.push(b):"tool_call"===b.kind||"tool_result"===b.kind?a.tools.push(b):a.traces.push(b))}function s(a){let b=l(a.type);return"user_message"===b?{role:"user",text:l(a.message)}:"agent_message"===b?{role:"assistant",text:l(a.message)}:"message"===b?{role:"assistant"===a.role?"assistant":"user"===a.role?"user":"system",text:o(a.content)||l(a.message)}:null}let t=new Set(["usermessage","hookprompt","agentmessage","functioncalloutput","plan","reasoning","commandexecution","filechange","mcptoolcall","dynamictoolcall","collabagenttoolcall","subagentactivity","websearch","imageview","sleep","imagegeneration","enteredreviewmode","exitedreviewmode","contextcompaction","extension"]);function u(a){return l(a).replace(/[_-]/g,"").toLowerCase()}function v(a){return Array.isArray(a)?a.map(a=>"string"==typeof a?a:l(i(a).text)).filter(a=>a.trim()).join("\n"):""}function w(a,b=2e3){if("string"==typeof a)return a.replace(/\s+/g," ").trim().slice(0,b);if("number"==typeof a||"boolean"==typeof a)return String(a);if(Array.isArray(a))return a.map(a=>w(a,b)).filter(Boolean).join("\n").slice(0,b);let c=i(a),d=o(c.content);if(d)return d.slice(0,b);let e=[c.summary,c.message,c.text,c.detail,c.query,c.path,c.result,c.status].find(a=>"string"==typeof a&&a.trim());return"string"==typeof e?e.replace(/\s+/g," ").trim().slice(0,b):Object.keys(c).filter(a=>!["type","id"].includes(a)).slice(0,8).join(", ").slice(0,b)}function x(a,b){return"claude"===b?function(a){let b={path:a,engine:"claude",messages:[],reasoning:[],tools:[],traces:[]};for(let c of n(a))for(let a of function(a){let b=[],c=a=>{b.push({record:a})},d=m(a);if("user"===a.type){let e=i(a.message).content;if(q(a))return c({kind:"trace",role:"system",ts:d,name:"task-notification",text:o(e)}),b;if(p(e)){for(let a of k(e))"tool_result"===a.type&&c({kind:"tool_result",role:"tool",ts:d,text:o(a.content)||l(a.tool_use_id)});return b}return c({kind:"message",role:"user",ts:d,text:o(e)}),b}if("assistant"===a.type){for(let b of k(i(a.message).content))"text"===b.type?c({kind:"message",role:"assistant",ts:d,text:l(b.text)}):"thinking"===b.type?c({kind:"reasoning",role:"assistant",ts:d,text:l(b.thinking)}):"tool_use"===b.type?c({kind:"tool_call",role:"assistant",ts:d,name:l(b.name),text:JSON.stringify(i(b.input))}):"tool_result"===b.type&&c({kind:"tool_result",role:"tool",ts:d,text:o(b.content)||l(b.tool_use_id)});return b}return("summary"===a.type||"compact"===a.type)&&c({kind:"trace",role:"system",ts:d,name:l(a.type),text:o(a.summary)||JSON.stringify(a)}),b}(c))r(b,a.record);return b}(a):function(a){let b={path:a,engine:"codex",messages:[],reasoning:[],tools:[],traces:[]};for(let c of n(a))for(let a of function(a){let b=[],c=(a,c)=>{b.push({record:a,...c?{representation:c}:{}})},d=i(a.payload),e=function(a){let b=a.started_at_ms??a.completed_at_ms;if("number"!=typeof b||!Number.isFinite(b))return null;let c=new Date(b);return Number.isNaN(c.getTime())?null:c.toISOString()}(d)??m(a),f=l(d.type),g=j(d.item),h=u(f),n=l(g?.type),p=null;if(g&&n&&!n.includes("_")&&("response_item"===a.type||"event_msg"===a.type&&["itemstarted","itemcompleted","itemdelta"].includes(h))?p=g:"response_item"===a.type&&!f.includes("_")&&t.has(u(f))&&(p=d),p)return"event_msg"===a.type&&"itemcompleted"!==h||c(function(a,b){let c=l(a.type)||"item",d=u(c);if("usermessage"===d)return{kind:"message",role:"user",ts:b,text:o(a.content)};if("agentmessage"===d)return{kind:"message",role:"assistant",ts:b,phase:l(a.phase)||void 0,text:o(a.content)||l(a.text)};if("reasoning"===d)return{kind:"reasoning",role:"assistant",ts:b,text:[v(a.summary),v(a.content),l(a.summary_text),l(a.raw_content),l(a.text)].filter((a,b,c)=>!!a.trim()&&c.indexOf(a)===b).join("\n")};if("filechange"===d){var e;return{kind:"tool_call",role:"assistant",ts:b,name:c,text:(Array.isArray(e=a.changes)?e.flatMap(a=>{let b=i(a),c=l(b.path),d=l(i(b.kind).type)||l(b.type)||"change";return c?[`${d} ${c}`]:[]}).join("\n"):Object.entries(i(e)).map(([a,b])=>`${l(i(b).type)||"change"} ${a}`).join("\n"))||"File change"}}return"commandexecution"===d?{kind:"tool_call",role:"assistant",ts:b,name:c,text:[Array.isArray(a.command)?a.command.filter(a=>"string"==typeof a).join(" "):l(a.command),[l(a.stdout),l(a.stderr),l(a.aggregatedOutput??a.aggregated_output)].filter((a,b,c)=>!!a&&c.indexOf(a)===b).join("\n"),l(a.status)].filter(Boolean).join("\n").slice(0,2e3)}:"functioncalloutput"===d?{kind:"tool_result",role:"tool",ts:b,name:c,text:o(a.output)||w(a.output)||l(a.name)}:["mcptoolcall","dynamictoolcall","collabagenttoolcall","websearch","imageview","imagegeneration"].includes(d)?{kind:"tool_call",role:"assistant",ts:b,name:c,text:[[l(a.server),l(a.namespace),l(a.tool),l(a.query),l(a.path)].filter(Boolean).join(" \xb7 "),o(i(a.result).content)||o(a.contentItems)||w(a.contentItems)||w(a.result),l(a.status)].filter(Boolean).join("\n")||c}:"extension"===d?{kind:"tool_call",role:"assistant",ts:b,name:c,text:[[l(a.kind),l(a.action),l(a.query)].filter(Boolean).join(" \xb7 "),w(a.results)].filter(Boolean).join("\n")||c}:"hookprompt"===d?{kind:"trace",role:"system",ts:b,name:c,text:k(a.fragments).map(a=>l(a.text)).filter(Boolean).join("\n")||"Hook prompt"}:"plan"===d?{kind:"trace",role:"system",ts:b,name:c,text:l(a.text)||"Plan updated"}:"subagentactivity"===d?{kind:"trace",role:"system",ts:b,name:c,text:l(a.kind)||"Sub-agent activity"}:"sleep"===d?{kind:"trace",role:"system",ts:b,name:c,text:void 0===a.durationMs?"Sleep":`Sleep ${String(a.durationMs)} ms`}:"enteredreviewmode"===d||"exitedreviewmode"===d?{kind:"trace",role:"system",ts:b,name:c,text:l(a.review)||c}:"contextcompaction"===d?{kind:"trace",role:"system",ts:b,name:c,text:"Context compacted"}:{kind:"trace",role:"system",ts:b,name:c,text:w(a)||c}}(p,e),"response_item"===a.type?"response":"event"),b;let q=s(d);if(q)return c({kind:"message",role:q.role,ts:e,phase:l(d.phase)||void 0,text:q.text},"event_msg"===a.type?"event":"response_item"===a.type?"response":void 0),b;if("event_msg"===a.type&&("agent_reasoning"===f||"reasoning"===f||"reasoning_delta"===f))return c({kind:"reasoning",role:"assistant",ts:e,text:l(d.text)||l(d.message)}),b;if("response_item"===a.type){let a=j(d.item),f=a&&l(a.type)?a:d,g=l(f.type);if("reasoning"===g)c({kind:"reasoning",role:"assistant",ts:e,text:k(f.summary).map(a=>l(a.text)).filter(Boolean).join("\n")||l(f.text)||l(f.message)});else if("function_call"===g||"custom_tool_call"===g){let a=l(f.name);c({kind:"tool_call",role:"assistant",ts:e,...a?{name:a}:{},text:l(f.arguments)||l(f.input)||JSON.stringify(f)})}else if("function_call_output"===g||"custom_tool_call_output"===g){let a=l(f.name);c({kind:"tool_result",role:"tool",ts:e,...a?{name:a}:{},text:o(f.output)||JSON.stringify(f)})}else g&&c({kind:"trace",role:"system",ts:e,name:g,text:JSON.stringify(f)});return b}return["command_execution_output_delta","file_change_output_delta","file_change_patch_updated"].includes(f)?c({kind:"trace",role:"system",ts:e,name:f,text:w(d.delta??d.changes)||f}):f&&!["token_count","thread_settings_applied","task_started"].includes(f)&&c({kind:"trace",role:"system",ts:e,name:f,text:JSON.stringify(d)}),b}(c))r(b,a.record);return b}(a)}let y=(0,h.E)("authorship-scan-checkpoint-v1");function z(a,b,c){let d=c?.count??0,e=c?.parseComplete??!0,f=c?.skippingRecord??!1,g=c?.carry.length?[Buffer.from(c.carry)]:[],h=c?.carry.length??0,j=b=>{let c=b.toString("utf8").trim();if(!c)return!1;try{let b=JSON.parse(c);return!!(b&&"object"==typeof b&&!Array.isArray(b)&&function(a,b){if("claude"===b){if("user"!==a.type||q(a))return!1;let b=i(a.message).content;return!p(b)&&!!o(b).trim()}let c=s(i(a.payload));return c?.role==="user"&&!!c.text.trim()}(b,a))}catch{return e=!1,!1}},k=()=>{g=[],h=0,f=!1};return{consume(a){let c=0;for(;c<=a.length;){let i=a.indexOf(10,c);if(-1===i){let b=a.length-c;!f&&b>0&&(h+b>8388608?(g=[],h=0,f=!0,e=!1):(g.push(Buffer.from(a.subarray(c))),h+=b));break}if(!f){let f=a.subarray(c,i);if(h+f.length>8388608)e=!1;else if(j(h?Buffer.concat([...g,f]):f)&&(d+=1)>=b)return k(),!0}k(),c=i+1}return!1},finish:()=>(!f&&h>0&&j(Buffer.concat(g))&&(d+=1),{count:d,complete:e}),result:()=>({count:d,complete:e}),failed:()=>({count:d,complete:!1}),state:()=>({count:d,carry:h?Buffer.concat(g):Buffer.alloc(0),skippingRecord:f,parseComplete:e})}}function A(a){return(0,d.createHash)("sha256").update(a).digest("base64url")}function B(a,b){return Math.min((a.maxBytes??1/0)-b,void 0===a.budget?1/0:a.budget.remaining)}async function C(a,b,c=Number.MAX_SAFE_INTEGER,d={}){let e=null,h=0,i=a=>{h+=a,d.budget&&(d.budget.remaining-=a)};try{e=await f().promises.open(a,"r");let j=await e.stat(),k=d.resume?y.get(a):void 0;if(k){let b=j.size>k.size,c=k.validatedGrowth?.size===j.size&&k.validatedGrowth.mtimeMs===j.mtimeMs,f=k.dev===j.dev&&k.ino===j.ino&&j.size>=k.offset&&j.size>=k.size&&(j.size!==k.size||j.mtimeMs===k.mtimeMs)&&(!b||c||!!k.prefixSegments?.length);if(f&&b&&!c){let a=k.validation?.size===j.size&&k.validation.mtimeMs===j.mtimeMs?k.validation.index:0,b=k.prefixSegments??[];for(;a<b.length&&f;){let c=b[a];if(d.signal?.aborted||B(d,h)<c.length)return k.validation={size:j.size,mtimeMs:j.mtimeMs,index:a},{count:k.count,complete:!1};let g=Buffer.allocUnsafe(c.length),{bytesRead:l}=await e.read(g,0,g.length,c.offset);i(l),f=l===g.length&&A(g)===c.fingerprint,a+=1}if(f){let a=await e.stat();(f=a.dev===j.dev&&a.ino===j.ino&&a.size===j.size&&a.mtimeMs===j.mtimeMs)&&(k.validation=null,k.validatedGrowth={size:j.size,mtimeMs:j.mtimeMs})}}if(f&&k.headBytes>0){if(d.signal?.aborted||B(d,h)<k.headBytes)return{count:k.count,complete:!1};let a=Buffer.allocUnsafe(k.headBytes),b=0;for(;b<a.length;){let{bytesRead:c}=await e.read(a,b,a.length-b,b);if(0===c)break;b+=c}i(b),f=b===a.length&&A(a)===k.headFingerprint}if(f&&k.boundaryBytes>0&&k.boundaryOffset>0){if(d.signal?.aborted||B(d,h)<k.boundaryBytes)return{count:k.count,complete:!1};let a=Buffer.allocUnsafe(k.boundaryBytes),b=0;for(;b<a.length;){let{bytesRead:c}=await e.read(a,b,a.length-b,k.boundaryOffset+b);if(0===c)break;b+=c}i(b),f=b===a.length&&A(a)===k.boundaryFingerprint}f||(y.delete(a),k=void 0)}if(k&&k.count>=c||k?.done&&k.size===j.size&&k.mtimeMs===j.mtimeMs)return{count:k.count,complete:k.parseComplete};let l=z(b,c,k??void 0),m=k?.offset??0,n=k?.headBytes??0,o=k?.headFingerprint??"",p=k?.boundaryOffset??0,q=k?.boundaryBytes??0,r=k?.boundaryFingerprint??"",s=k?.prefixSegments??[],t=b=>{if(!d.resume)return;let c=l.state();y.set(a,{dev:j.dev,ino:j.ino,size:j.size,mtimeMs:j.mtimeMs,offset:m,carry:c.carry,skippingRecord:c.skippingRecord,count:c.count,parseComplete:c.parseComplete,headBytes:n,headFingerprint:o,boundaryOffset:p,boundaryBytes:q,boundaryFingerprint:r,prefixSegments:s,validation:null,validatedGrowth:null,done:b})},u=Buffer.allocUnsafe(65536),v=0;for(;;){if(d.signal?.aborted)return t(!1),l.failed();let a=B(d,h);if(a<=0)return t(!1),l.failed();let{bytesRead:b}=await e.read(u,0,Math.min(u.length,a),m);if(0===b)break;if(i(b),0===m&&0===n&&(n=Math.min(b,65536),o=A(u.subarray(0,n))),q=Math.min(b,65536),p=m+b-q,r=A(u.subarray(b-q,b)),s.push({offset:m,length:b,fingerprint:A(u.subarray(0,b))}),m+=b,l.consume(u.subarray(0,b)))return t(!1),l.result();(v+=1)>=8&&(v=0,await (0,g.Lh)())}let w=l.finish();return t(!0),w}catch{return{count:0,complete:!1}}finally{await e?.close().catch(()=>void 0)}}function D(a,b){return function(a,b,c=Number.MAX_SAFE_INTEGER){return function(a,b,c=Number.MAX_SAFE_INTEGER){let d=null,e=z(b,c);try{d=f().openSync(a,"r");let b=Buffer.allocUnsafe(65536);for(;;){let a=f().readSync(d,b,0,b.length,null);if(0===a)break;if(e.consume(b.subarray(0,a)))return e.result()}return e.finish()}catch{return e.failed()}finally{null!==d&&f().closeSync(d)}}(a,b,c).count}(a,b,1)>0}}};
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=606,exports.ids=[606,6277],exports.modules={26277:(a,b,c)=>{c.d(b,{Gs:()=>C,Kn:()=>w,gY:()=>x,h3:()=>q,jd:()=>v,kt:()=>E,ue:()=>D,vx:()=>y,w5:()=>z});var d=c(31421);c(77598);var e=c(73024),f=c.n(e),g=c(48161),h=c.n(g),i=c(76760),j=c.n(i),k=c(27146),l=c(89204),m=c(55541),n=c(19777);Object.freeze({repo:"https://github.com/chigwell/telegram-mcp",release:"v3.2.22",commit:"a61294362226bd93052f5a40b4a1b1269a99ce69",license:"Apache-2.0"});let o="127.0.0.1";function p(){let a=Number(process.env.LLV_TELEGRAM_MCP_PORT);return Number.isInteger(a)&&a>0&&a<65536?a:8809}function q(){return`http://${o}:${p()}/mcp`}function r(a,...b){if(a)return a;let c=j().join(process.cwd(),...b);if(f().existsSync(c))return c;let d=j().join(process.cwd(),"..","..",...b);return f().existsSync(d)?d:c}function s(){return r(process.env.LLV_TELEGRAM_VENDOR_DIR,"vendor","telegram-mcp")}function t(){return(0,k.BQ)("telegram","venv")}function u(){return(0,k.BQ)("telegram","vendor-src")}function v(){return process.env.LLV_TELEGRAM_PYTHON||j().join(t(),"bin","python")}function w(){return r(process.env.LLV_TELEGRAM_SERVER_BRIDGE,"bin","telegram-mcp-server.py")}function x(){return r(process.env.LLV_TELEGRAM_SESSION_READER,"bin","telegram-session-reader.mjs")}let y=Object.freeze(["wait_for_settled_message"]);function z(){let a=process.env.LLV_TELEGRAM_API_ID,b=process.env.LLV_TELEGRAM_API_HASH;if(a&&b)return{apiId:a,apiHash:b};try{let a=JSON.parse(f().readFileSync((0,k.ks)("telegram.json"),"utf8"));if("string"==typeof a.apiId&&a.apiId&&"string"==typeof a.apiHash&&a.apiHash)return{apiId:a.apiId,apiHash:a.apiHash}}catch{}return null}function A(){return f().existsSync(j().join(t(),".llv-provisioned"))&&f().existsSync(v())&&f().existsSync(j().join(u(),"pyproject.toml"))}let B=null;function C(){return A()?Promise.resolve(!0):B||(B=(async()=>((0,n._q)(!0),await (0,l.pM)((0,k.BQ)("telegram","connector-provision"),"Telegram connector provisioning is busy",async()=>{var a;return!!A()||await (a={command:process.execPath,args:[r(process.env.LLV_TELEGRAM_PROVISIONER,"bin","provision-telegram-connector.mjs")],cwd:s(),env:{...F(),LLV_STATE_DIR:(0,k.Pn)(),LLV_TELEGRAM_VENDOR_DIR:s(),LLV_TELEGRAM_PYTHON:v()}},new Promise(b=>{let c;try{c=(0,d.spawn)(a.command,a.args,{cwd:a.cwd,env:a.env,stdio:"ignore"})}catch{b(!1);return}c.once("error",()=>b(!1)),c.once("exit",a=>b(0===a))}))&&A()})))().catch(()=>!1).finally(()=>{B=null}))}function D(a){let b=u(),c=(0,m.WG)();return{command:v(),args:[w()],cwd:b,env:{...F(),...c,TELEGRAM_API_ID:a.credentials.apiId,TELEGRAM_API_HASH:a.credentials.apiHash,TELEGRAM_SESSION_STRING:a.sessionString,TELEGRAM_EXPOSED_TOOLS:"read-only",TELEGRAM_EVENT_FEED:"1",TELEGRAM_EVENT_FEED_FILE:(0,n.ZI)(a.credentialRef),LLV_TELEGRAM_EXCLUDED_TOOLS:y.join(","),LLV_TELEGRAM_MCP_TOKEN:a.connectorToken,LLV_TELEGRAM_VENDOR_DIR:b,MCP_TRANSPORT:"http",MCP_HOST:o,MCP_PORT:String(p())}}}function E(a,b){return{command:v(),args:[r(process.env.LLV_TELEGRAM_BRIDGE,"bin","telegram-login-bridge.py"),a],cwd:h().homedir(),env:{...F(),TELEGRAM_API_ID:b.apiId,TELEGRAM_API_HASH:b.apiHash}}}function F(){let a={};for(let b of["PATH","HOME","LANG","LC_ALL","TMPDIR"])void 0!==process.env[b]&&(a[b]=process.env[b]);return a}},55541:(a,b,c)=>{c.d(b,{WG:()=>o,cO:()=>n,yb:()=>l});var d=c(77598),e=c.n(d),f=c(73024),g=c.n(f),h=c(76760),i=c.n(h),j=c(27146),k=c(19777);let l=262144,m=String.raw`import fcntl
|
|
2
|
-
import io
|
|
3
|
-
import os
|
|
4
|
-
import stat
|
|
5
|
-
import sys
|
|
6
|
-
import threading
|
|
7
|
-
|
|
8
|
-
try:
|
|
9
|
-
_path = os.environ["LLV_TELEGRAM_CONNECTOR_LOG"]
|
|
10
|
-
_limit = int(os.environ["LLV_TELEGRAM_CONNECTOR_LOG_MAX_BYTES"])
|
|
11
|
-
if _limit <= 0:
|
|
12
|
-
raise ValueError("invalid log limit")
|
|
13
|
-
_flags = os.O_RDWR | os.O_CREAT | os.O_APPEND
|
|
14
|
-
if hasattr(os, "O_NOFOLLOW"):
|
|
15
|
-
_flags |= os.O_NOFOLLOW
|
|
16
|
-
_fd = os.open(_path, _flags, 0o600)
|
|
17
|
-
_info = os.fstat(_fd)
|
|
18
|
-
if not stat.S_ISREG(_info.st_mode) or (_info.st_mode & 0o077):
|
|
19
|
-
raise PermissionError("unsafe connector log")
|
|
20
|
-
if hasattr(os, "getuid") and _info.st_uid != os.getuid():
|
|
21
|
-
raise PermissionError("connector log owner mismatch")
|
|
22
|
-
except Exception as _error:
|
|
23
|
-
raise SystemExit("connector log sink unavailable") from _error
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def _write_all(data):
|
|
27
|
-
view = memoryview(data)
|
|
28
|
-
while view:
|
|
29
|
-
written = os.write(_fd, view)
|
|
30
|
-
view = view[written:]
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class _BoundedConnectorLog(io.TextIOBase):
|
|
34
|
-
encoding = "utf-8"
|
|
35
|
-
errors = "backslashreplace"
|
|
36
|
-
|
|
37
|
-
def __init__(self):
|
|
38
|
-
self._lock = threading.Lock()
|
|
39
|
-
|
|
40
|
-
def writable(self):
|
|
41
|
-
return True
|
|
42
|
-
|
|
43
|
-
def isatty(self):
|
|
44
|
-
return False
|
|
45
|
-
|
|
46
|
-
def fileno(self):
|
|
47
|
-
return _fd
|
|
48
|
-
|
|
49
|
-
def flush(self):
|
|
50
|
-
return None
|
|
51
|
-
|
|
52
|
-
def write(self, value):
|
|
53
|
-
if not isinstance(value, str):
|
|
54
|
-
value = str(value)
|
|
55
|
-
data = value.encode(self.encoding, self.errors)
|
|
56
|
-
if not data:
|
|
57
|
-
return len(value)
|
|
58
|
-
with self._lock:
|
|
59
|
-
fcntl.flock(_fd, fcntl.LOCK_EX)
|
|
60
|
-
try:
|
|
61
|
-
size = os.fstat(_fd).st_size
|
|
62
|
-
if len(data) >= _limit:
|
|
63
|
-
tail = data[-_limit:]
|
|
64
|
-
os.ftruncate(_fd, 0)
|
|
65
|
-
_write_all(tail)
|
|
66
|
-
elif size + len(data) > _limit:
|
|
67
|
-
keep = _limit - len(data)
|
|
68
|
-
prior = os.pread(_fd, keep, max(0, size - keep))
|
|
69
|
-
os.ftruncate(_fd, 0)
|
|
70
|
-
_write_all(prior[-keep:] + data)
|
|
71
|
-
else:
|
|
72
|
-
_write_all(data)
|
|
73
|
-
finally:
|
|
74
|
-
fcntl.flock(_fd, fcntl.LOCK_UN)
|
|
75
|
-
return len(value)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
_sink = _BoundedConnectorLog()
|
|
79
|
-
sys.stdout = _sink
|
|
80
|
-
sys.stderr = _sink
|
|
81
|
-
`;function n(){return(0,j.BQ)("telegram","connector.log")}function o(){(0,k._q)(!0);let a=(0,j.BQ)("telegram","connector-log-sink");g().mkdirSync(a,{recursive:!0,mode:448});let b=g().lstatSync(a);if(!b.isDirectory()||b.isSymbolicLink()||(63&b.mode)!=0||"function"==typeof process.getuid&&b.uid!==process.getuid())throw Error("unsafe connector log sink directory");let c=i().join(a,"sitecustomize.py"),d=`${c}.${process.pid}.${e().randomUUID()}.tmp`;try{g().writeFileSync(d,m,{flag:"wx",mode:384}),g().renameSync(d,c),g().chmodSync(c,384)}finally{g().rmSync(d,{force:!0})}return!function(){let a="O_NOFOLLOW"in g().constants?g().constants.O_NOFOLLOW:0,b=g().openSync(n(),g().constants.O_RDWR|g().constants.O_CREAT|a,384);try{let a=g().fstatSync(b);if(!a.isFile()||(63&a.mode)!=0||"function"==typeof process.getuid&&a.uid!==process.getuid())throw Error("unsafe connector log");if(a.size<=l)return;let c=Buffer.alloc(l);g().readSync(b,c,0,c.length,a.size-c.length),g().ftruncateSync(b,0),g().writeSync(b,c,0,c.length,0)}finally{g().closeSync(b)}}(),{PYTHONPATH:a,LLV_TELEGRAM_CONNECTOR_LOG:n(),LLV_TELEGRAM_CONNECTOR_LOG_MAX_BYTES:String(l)}}},56592:(a,b,c)=>{c.r(b),c.d(b,{SEAT_TICK_WAKE_UNRESOLVED_REF:()=>b2,reconcileSeatTick:()=>co,runSeatTickCheck:()=>ci,seatTickAttemptExits:()=>ce,seatTickWakeUnresolvedRef:()=>b3,startSeatTick:()=>cq,stopSeatTick:()=>cr,wakeReached:()=>b5});var d=c(77598),e=c.n(d),f=c(73024),g=c.n(f),h=c(14928),i=c(67263),j=c(43318);let k="monitor-ref:",l="orchestrator-unresolved";function m(a){let b=a.match(/^monitor-ref:\s*([A-Za-z0-9_-]{4,64})\s*$/m);return b?b[1]:null}let n=a=>`seat-tick-stuck-${a}`,o="seat-tick-settings",p=a=>`seat-tick-source-${a}`,q=["lane-event","unmerged-pr","stalled","unstarted-task","interval","child-terminal","own-lane-settled"],r=["registry-unreadable","children-unindexed","migration-blocked","migration-pending","discovery-incomplete","ledger-gap","child-departed","child-unplaced","ledger-pending"];function s(){return{seatEpoch:null,lastCheckAt:null,lastWakeAt:null,lastWakeReasons:[],wakesWithoutChange:{},quietSince:null,idleSince:null,lastProposalAt:null,stalledSeen:[],lastWakeFingerprint:null,eventsThrough:null,outstandingWake:null,retiredWakes:[],releasedWake:null,pullRequestGap:null,childrenGap:null,harvestedChildren:[],childrenShown:[],announcedLanes:[]}}let t=3e5,u=24e5,v=864e5,w=5,x=2,y=2592e5;function z(a,b,c){let d=Number(a?.trim());return Number.isFinite(d)&&d>0?d*c:b}function A(a=process.env){let b=a.LLV_SEAT_TICK_CHECK_MINUTES?.trim();return b&&0===Number(b)?null:{checkIntervalMs:z(b,t,6e4),stallAfterMs:z(a.LLV_SEAT_TICK_STALL_MINUTES,u,6e4),proposalIntervalMs:z(a.LLV_SEAT_TICK_PROPOSAL_HOURS,v,36e5),itemsPerWake:Math.floor(z(a.LLV_SEAT_TICK_ITEMS,w,1)),retryGuard:Math.floor(z(a.LLV_SEAT_TICK_RETRY_GUARD,x,1)),backlogAfterMs:z(a.LLV_SEAT_TICK_BACKLOG_DAYS,y,864e5)}}function B(a){return"terminal"!==a.state}function C(a){return"running"===a.status}function D(a){return"terminal"===a.status}function E(a){return`child:${a.conversationId}`}function F(a){return(0,i.jk)(a.type)&&!a.pipelineTerminal}function G(a){if("busy"!==a.turn)return!1;let b=a.activity;return!!b&&("waiting"===b.lifecycle?"busy"===b.turnState:"running"===b.lifecycle||"starting"===b.lifecycle)}function H(a){return"unresolvable"!==a.transcript}function I(a){let b=a.terminalAt?Date.parse(a.terminalAt):NaN;return Number.isFinite(b)?b:a.lastRecordAt?Date.parse(a.lastRecordAt):NaN}function J(a,b){let c=null===b?String(I(a)):b.slice(-32);return`${a.conversationId}@${c}`}let K=["unreadable","stale","unchanged"],L=new Set;function M(a,b){let c=0;for(let d of a.values())d===b&&(c+=1);return c}function N(a,b,c,d){let e=O(a,b);return e||(d.has(J(a,c))?"unchanged":null)}function O(a,b){let c,d;return H(a)&&Number.isFinite(I(a))?(c=I(a),d=b.designatedAt?Date.parse(b.designatedAt):NaN,Number.isFinite(c)&&Number.isFinite(d)&&(c<d-864e5||"number"==typeof a.harvestedEpoch&&a.harvestedEpoch<b.seatEpoch&&c<d))?"stale":null:"unreadable"}function P(a,b){return b?null===O(a,b):H(a)}function Q(a){return a.ownLanes.filter(b=>{let c=b.updatedAt?Date.parse(b.updatedAt):NaN;return Number.isFinite(c)&&a.now-c<a.policy.backlogAfterMs})}function R(a,b,c){if(!a)return!0;let d=Date.parse(a);return!Number.isFinite(d)||b-d>=c}function S(a,b,c){if(!a)return!1;let d=Date.parse(a.since);return Number.isFinite(d)&&b-d>=c}function T(a,b,c){if(!a||!S(a,b,c))return!0;let d=Date.parse(a.lastAttemptAt);return!Number.isFinite(d)||b-d>=c}function U(a,b,c){return a?{...a,gap:b,lastAttemptAt:c,attempts:a.attempts+1}:{gap:b,since:c,lastAttemptAt:c,attempts:1,reported:!1}}let V="unread";function W(a,b){if(null===a)return!0;let c=X(a),d=X(b);return c&&d?c.board!==d.board||c.pullRequests!==V&&d.pullRequests!==V&&c.pullRequests!==d.pullRequests:a!==b}function X(a){let b=a.indexOf(".");return b<=0||b===a.length-1?null:{board:a.slice(0,b),pullRequests:a.slice(b+1)}}function Y(a){switch(a){case"registry-unreadable":return"the registry read failed";case"children-unindexed":return"the registry backend has no indexed lineage projection, so children cannot be paged";case"migration-pending":return"the SQLite accounting has not finished importing the legacy tick state";case"migration-blocked":return"the legacy tick state at state/seat-tick.json cannot be imported and blocks every wake until it is fixed or removed";case"discovery-incomplete":return"an owner's lineage page or the seat file's revocations could not be read to the end";case"ledger-gap":return"a child's event ledger was replaced, torn, malformed or skipped a sequence";case"ledger-pending":return"a child left its running state and its ledger has not been read yet";case"child-departed":return"a tracked child no longer projects under this seat and project";case"child-unplaced":return"a child has no conversation record or an unobserved turn with no host behind it"}}function Z(a,b){let c="pull-requests"===b?a.state.pullRequestGap:a.state.childrenGap;if(!("pull-requests"===b?a.pullRequestsUnavailable:a.childrenUnavailable)||!c||c.reported||!S(c,a.now,a.settings.wakeIntervalMs))return null;let d=`${c.since.slice(0,16).replace("T"," ")} UTC (${c.gap}, ${c.attempts} attempt(s))`;return{card:{ref:p(b),kind:"source-unreadable",instance:c.since,detail:"pull-requests"===b?`The open pull requests of this project's finished lanes have not been readable since ${d}`:`The seat's spawned children have not been fully accountable since ${d}: `+Y(c.gap)},gap:{...c,reported:!0}}}function $(a,b){return{...a,quietSince:a.quietSince??b}}function _(a,b,c){var d,e,f,g,h,i;let j,k,l=new Date(c).toISOString(),m=Math.max(a.eventsThrough??0,b.eventsThrough);if(b.proposal)return{...a,lastWakeAt:l,lastProposalAt:l,lastWakeReasons:[],lastWakeFingerprint:b.fingerprint,quietSince:null,eventsThrough:m,outstandingWake:null,releasedWake:null};let n=b.reasons,o=!W(a.lastWakeFingerprint,b.fingerprint),p={};for(let b of q)n.includes(b)&&(p[b]=o?(a.wakesWithoutChange[b]??0)+1:0);return{...a,lastWakeAt:l,lastWakeReasons:n,lastWakeFingerprint:b.fingerprint,wakesWithoutChange:p,quietSince:null,idleSince:null,eventsThrough:m,outstandingWake:null,releasedWake:null,harvestedChildren:(d=a.harvestedChildren,e=b.children,[...new Set([...d.filter(a=>!e.includes(a)),...e])]),childrenShown:(f=a.childrenShown??[],g=b.shownChildren??[],j=a=>a.slice(0,a.lastIndexOf("@")),k=new Set(g.map(j)),[...f.filter(a=>!k.has(j(a))),...g].slice(-64)),announcedLanes:(h=a.announcedLanes??[],i=b.announcedLanes??[],[...new Set([...h.filter(a=>!i.includes(a)),...i])].slice(-64))}}let aa=()=>({offset:0,identity:null,seq:0,activeTurn:null,settledThrough:0,atEnd:!1,initialSize:0,gap:null}),ab=Buffer.from('"turn-'),ac=new Set(["completed","interrupted","error"]);function ad(a){let b;try{b=JSON.parse(a.toString("utf8"))}catch{return null}if(!b||"object"!=typeof b||Array.isArray(b))return null;let c=b;return"string"!=typeof c.kind||!Number.isSafeInteger(c.seq)||c.seq<=0?null:{kind:c.kind,seq:c.seq,turnId:c.turnId,status:c.status}}let ae="seat-tick-v3",af=new Map,ag=a=>{let b=g().statSync(a);return`${b.dev}:${b.ino}`},ah=a=>e().createHash("sha256").update(JSON.stringify(a)).digest("hex"),ai=(a,b,c="")=>`${a}/${encodeURIComponent(b)}/${encodeURIComponent(c)}`;function aj(a){if(!a||"object"!=typeof a)return null;let b=a=>"string"==typeof a&&a.length>0,c=a=>Number.isSafeInteger(a)&&Number(a)>=0,d=a=>null===a||"string"==typeof a,e=a=>a&&b(a.conversationId)&&"string"==typeof a.title&&["running","terminal","unknown"].includes(a.status)&&(null===a.outcome||["finished","failed"].includes(a.outcome));if(1!==a.schemaVersion||!b(a.key)||"string"!=typeof a.project||"string"!=typeof a.kind||!a.key.startsWith(ai(a.kind,a.project)))return null;switch(a.kind){case"project":{let e=a.state;if(!c(a.revision)||!c(a.sequence)||!["ready","pending","unknown"].includes(a.migration)||!e||"object"!=typeof e||!d(a.gap)||null!==e.seatEpoch&&!c(e.seatEpoch))return null;for(let a of["lastCheckAt","lastWakeAt","quietSince","idleSince","lastProposalAt"]){let b=e[a];if(null!==b&&("string"!=typeof b||!Number.isFinite(Date.parse(b))))return null}if(null!==e.eventsThrough&&!c(e.eventsThrough)||!Array.isArray(e.harvestedChildren)||0!==e.harvestedChildren.length||!Array.isArray(e.lastWakeReasons)||!Array.isArray(e.stalledSeen)||!e.wakesWithoutChange||"object"!=typeof e.wakesWithoutChange||void 0!==e.childrenShown&&(!Array.isArray(e.childrenShown)||!e.childrenShown.every(b))||void 0!==e.announcedLanes&&(!Array.isArray(e.announcedLanes)||!e.announcedLanes.every(b)))return null;let f=a=>!!a&&!!b(a.clientMessageId)&&!!b(a.conversationId)&&!!c(a.seatEpoch)&&!!d(a.operationId)&&!!a.commit&&"boolean"==typeof a.commit.proposal&&!!b(a.commit.fingerprint)&&!!c(a.commit.eventsThrough)&&!!Array.isArray(a.commit.reasons)&&!!Array.isArray(a.commit.children)&&!!a.commit.children.every(b)&&(void 0===a.commit.shownChildren||!!Array.isArray(a.commit.shownChildren)&&!!a.commit.shownChildren.every(b))&&(void 0===a.commit.announcedLanes||!!Array.isArray(a.commit.announcedLanes)&&!!a.commit.announcedLanes.every(b))&&(void 0===a.preparedAt||!!b(a.preparedAt))&&(void 0===a.dispatch||!!a.dispatch&&b(a.dispatch.token)&&["active","refused","returned"].includes(a.dispatch.state)),g=e.outstandingWake;if(null!==g&&!f(g)||void 0!==a.ownerScan&&(!a.ownerScan||!b(a.ownerScan.identity)||"boolean"!=typeof a.ownerScan.gap))return null;let h=e.retiredWakes;if(void 0===h)return{...a,state:{...e,retiredWakes:[]}};if(!Array.isArray(h))return null;let i=[];for(let a of h){if(!a||"object"!=typeof a||!f(a.wake)||!b(a.retiredAt))return null;let d=a.reason??"seat-superseded";if("seat-superseded"!==d&&"unresolved-age"!==d)return null;let e=a.supersededBy??null;if("seat-superseded"===d&&(!e||!b(e.conversationId)||!c(e.seatEpoch))||"unresolved-age"===d&&null!==e)return null;i.push({...a,supersededBy:e,reason:d})}return{...a,state:{...e,retiredWakes:i}}}case"owner":{if(!b(a.conversationId)||!c(a.epoch))return null;if("string"==typeof a.after&&void 0===a.pollKey)return{...a,after:null,pollKey:""};let d=a=>null===a||!!a&&"object"==typeof a&&Number.isSafeInteger(a.order)&&b(a.key);return"string"==typeof a.pollKey&&d(a.after)&&(void 0===a.bootstrap||a.bootstrap&&d(a.bootstrap.after))?a:null}case"child":return b(a.identity)&&b(a.rowKey)&&b(a.owner)&&b(a.launchId)&&e(a.input)&&c(a.generationIndex)&&d(a.runningKey)&&(void 0===a.pollKey||d(a.pollKey))&&(void 0===a.harvestedEpoch||c(a.harvestedEpoch))?{...a,pollKey:a.pollKey??null}:null;case"source":return b(a.identity)&&b(a.child)&&b(a.engine)&&b(a.generation)&&a.cursor&&c(a.cursor.offset)&&c(a.cursor.seq)&&c(a.cursor.settledThrough)&&c(a.cursor.initialSize)&&d(a.cursor.identity)&&d(a.cursor.activeTurn)&&d(a.cursor.gap)&&"boolean"==typeof a.cursor.atEnd?a:null;case"outcome":return Array.isArray(a.tuple)&&[2,3].includes(a.tuple.length)&&a.tuple.every(b)&&a.identity===ah(a.tuple)&&a.key===ai("outcome",a.project,a.identity)&&e(a.input)&&a.input.outcomeId===a.identity&&"terminal"===a.input.status&&["owed","acknowledged"].includes(a.status)&&b(a.child)&&b(a.readyKey)?a:null;case"poll":case"ready":case"owner-poll":case"running":return b(a.target)?a:null;case"legacy":return b(a.conversationId)&&"boolean"==typeof a.reconciled?a:null;default:return null}}function ak(a,b){let c;try{c=g().openSync(a,g().constants.O_RDONLY|g().constants.O_NOFOLLOW);let d=g().fstatSync(c);if(!d.isFile())return{kind:"gap",gap:"not-a-file"};if(d.size>b)return{kind:"gap",gap:"oversized"};let e=Buffer.allocUnsafe(d.size),f=0;for(;f<d.size;){let a=g().readSync(c,e,f,d.size-f,f);if(!a)break;f+=a}try{return{kind:"parsed",value:JSON.parse(e.subarray(0,f).toString("utf8"))}}catch{return{kind:"gap",gap:"malformed"}}}catch(a){return"ENOENT"===a.code?{kind:"absent"}:{kind:"gap",gap:"unreadable"}}finally{void 0!==c&&g().closeSync(c)}}class al{constructor(a,b){this.filename=a,this.project=b;const c=af.get(a);if(c){if(ag(a)!==c.identity)throw Error("seat accounting database was replaced");this.collection=c.collection;return}(0,h.t0)(a,[{collection:ae,schemaVersion:1,migrationId:"monitor-v3",key:a=>a.key,loadRecords:()=>[]}]),this.collection=new h.UY(a,{collection:ae,schemaVersion:1,busyMessage:"seat outcome accounting is busy",key:a=>a.key,decode:aj,clone:structuredClone,strictDecode:!0}),af.set(a,{identity:ag(a),collection:this.collection})}base(a,b=""){return{key:ai(a,this.project,b),project:this.project,schemaVersion:1}}get(a){return this.collection.get(a)}row(){let a=this.get(ai("project",this.project));if(a&&"project"!==a.kind)throw Error("invalid project accounting row");return a}page(a,b){let c=ai(a,this.project);return this.collection.keyRange(c,`${c}~`,b)}pollPage(a){let b=this.collection.keyRange(`${ai("poll",this.project)}0`,`${ai("poll",this.project)}~`,8),c=this.page("poll",a),d=new Set(b.map(a=>a.key));return[...b,...c.filter(a=>!d.has(a.key))].slice(0,a)}ticket(a,b,c,d,e="tail"){if(!Number.isSafeInteger(++b.sequence))throw Error("accounting sequence exhausted");let f={...this.base(c,`${"head"===e?"!":""}${String(b.sequence).padStart(16,"0")}`),kind:c,target:d};return a.put(f),f.key}atHead(a,b){return a.startsWith(ai(b,this.project,"!"))}trackRunning(a,b,c){"running"===c.input.status?c.runningKey||(c.runningKey=this.ticket(a,b,"running",c.key)):c.runningKey&&(a.delete(c.runningKey),c.runningKey=null)}mutate(a){return this.collection.boundedPatch(4096,b=>{let c=b.get(ai("project",this.project));if(!c||"project"!==c.kind)throw Error("accounting migration has not completed");let d=a(b,c);return c.revision++,b.put(c),d})}initialize(a,b){this.collection.boundedPatch(4096,c=>{if(!c.get(ai("project",this.project))){for(let b of a.harvestedChildren)c.put({...this.base("legacy",b),kind:"legacy",conversationId:b,reconciled:!1});c.put({...this.base("project"),kind:"project",revision:0,sequence:0,state:{...a,harvestedChildren:[]},migration:b?"unknown":"ready",gap:b})}})}migrateLegacy(a,b){if(this.row()?.migration==="ready")return;this.row()||this.collection.boundedPatch(2,a=>{a.get(ai("project",this.project))||a.put({...this.base("project"),kind:"project",revision:0,sequence:0,state:s(),migration:"pending",gap:null})});let c=this.row(),d=ak(a,4194304),e=null,f=s(),g=[];if("gap"===d.kind)e="malformed"===d.gap?"legacy-json-malformed":"oversized"===d.gap?"legacy-state-oversized":"legacy-state-unreadable";else if("parsed"===d.kind){let a=d.value,c=a&&"object"==typeof a&&!Array.isArray(a)?a.projects:void 0;if(!c||"object"!=typeof c||Array.isArray(c))e="legacy-projects-unreadable";else{let d="number"==typeof a.version?a.version:null,h=c[this.project];if(void 0!==h){let a=h&&"object"==typeof h&&!Array.isArray(h)?h:{};f=b(a,d);let c=a.harvestedChildren;if(void 0!==c)if(Array.isArray(c))for(let a of c){if("string"!=typeof a||!a||a.length>200){e="legacy-acknowledgments-unreadable";break}g.push(a)}else e="legacy-acknowledgments-unreadable";Object.hasOwn(a,"outstandingWake")&&null!==a.outstandingWake&&!f.outstandingWake&&(e="legacy-outstanding-unreadable")}}}let h=e?[]:[...new Set(g)];for(let a=0;a<h.length;a+=1e3){let b=h.slice(a,a+1e3);this.collection.boundedPatch(1002,a=>{let d=a.get(c.key);if(d&&"project"===d.kind&&d.revision===c.revision)for(let c of b)a.put({...this.base("legacy",c),kind:"legacy",conversationId:c,reconciled:!1})})}this.collection.boundedPatch(2,a=>{let b=a.get(c.key);if(!b||"project"!==b.kind||b.revision!==c.revision)return;let d=e?"unknown":"ready";b.migration===d&&b.gap===e&&e||a.put({...b,revision:b.revision+1,state:e?b.state:{...f,harvestedChildren:[]},migration:d,gap:e})})}readState(){let a=this.row();if(!a)throw Error("missing project accounting");return{...a.state,accounting:{filename:this.filename,revision:a.revision,gap:"ready"===a.migration?a.gap:a.gap??"legacy-migration-pending"}}}writeState(a){this.mutate((b,c)=>{if(a.accounting?.revision!==c.revision)throw Error("stale seat tick state");c.state={...a,accounting:void 0,harvestedChildren:[]}})}owner(a,b){let c=ai("owner",this.project,String(b)),d=this.get(c);if(d?.kind==="owner"&&d.conversationId===a&&d.pollKey)return d;this.mutate((d,e)=>{let f=d.get(c);if(f){if("owner"!==f.kind||f.conversationId!==a)throw Error("contradictory seat ownership");f.pollKey||d.put({...f,pollKey:this.ticket(d,e,"owner-poll",c)});return}let g={...this.base("owner",String(b)),kind:"owner",conversationId:a,epoch:b,after:null,pollKey:""};g.pollKey=this.ticket(d,e,"owner-poll",c),d.put(g)});let e=this.get(c);if(!e||"owner"!==e.kind)throw Error("missing owner provenance");return e}discoverRevokedOwners(a,b){let c,d=this.row();try{let b=g().statSync(a);c=`${b.dev}:${b.ino}:${b.size}:${b.mtimeMs}`}catch(a){return"ENOENT"!==a.code}if(d.ownerScan?.identity===c)return d.ownerScan.gap;let e=ak(a,0x1000000);if("absent"===e.kind)return!1;let f="gap"===e.kind,h=[];if("parsed"===e.kind){let a=e.value,c=a&&"object"==typeof a&&!Array.isArray(a)&&1===a.schemaVersion&&Array.isArray(a.revocations)?a.revocations:null;if(c)for(let a of c){let c=a??{};"string"==typeof c.project&&b(c.project)&&"string"==typeof c.conversationId&&c.conversationId.startsWith("conversation_")&&Number.isSafeInteger(c.seatEpoch)&&Number(c.seatEpoch)>=1&&"string"==typeof c.revokedAt&&Number.isFinite(Date.parse(c.revokedAt))&&h.push({conversationId:c.conversationId,epoch:Number(c.seatEpoch)})}else f=!0}let i=h.slice(0,200),j=h.length>i.length,k=!1;return this.mutate((a,b)=>{if(b.revision!==d.revision){k=!0;return}for(let c of i){let d=ai("owner",this.project,String(c.epoch)),e=a.get(d);if(e){if("owner"!==e.kind||e.conversationId!==c.conversationId)throw Error("contradictory predecessor ownership");continue}let f={...this.base("owner",String(c.epoch)),kind:"owner",conversationId:c.conversationId,epoch:c.epoch,after:null,pollKey:""};f.pollKey=this.ticket(a,b,"owner-poll",d),a.put(f)}j||(b.ownerScan={identity:c,gap:f})}),f||j||k}discovery(a,b){this.mutate((c,d)=>{if(c.get(a.pollKey)){for(let{child:a,position:e}of b){let b=c.get(a.key);if(b){if("child"!==b.kind)throw Error("invalid child provenance");b.pollKey||c.put({...b,pollKey:this.ticket(c,d,"poll",a.key,e)});continue}a.pollKey=this.ticket(c,d,"poll",a.key,e),this.trackRunning(c,d,a),c.put(a)}c.delete(a.pollKey),c.put({...a,pollKey:this.ticket(c,d,"owner-poll",a.key)})}})}adoptPoll(a,b){return a.pollKey?a:(this.mutate(c=>{let d=c.get(a.key),e=c.get(b);d?.kind!=="child"||d.pollKey||e?.kind!=="poll"||e.target!==a.key||c.put({...d,pollKey:b})}),this.get(a.key))}child(a,b,c,d){let e=ah([b,a,c]);return{...this.base("child",e),kind:"child",identity:e,rowKey:a,owner:b,launchId:c,input:d,generationIndex:0,runningKey:null,pollKey:null}}source(a,b,c){let d=ah([b,c]),e=this.get(ai("source",this.project,d));if(e){if("source"!==e.kind||e.child!==a.key||e.engine!==b||e.generation!==c)throw Error("source identity collision");return e}return{...this.base("source",d),kind:"source",identity:d,child:a.key,engine:b,generation:c,cursor:aa()}}ingest(a,b,c,d=!1,e="tail"){this.mutate((f,g)=>{a.pollKey&&f.get(a.pollKey)&&(b?.cursor.identity&&b.legacyBoundary?.identity!==b.cursor.identity&&(b.legacyBoundary={identity:b.cursor.identity,bytes:b.cursor.initialSize}),(d?[[a.launchId,"pre-execution-failure"]]:c.map(a=>[b.engine,b.generation,a.turnId])).forEach((e,h)=>{let i=ah(e),j=ai("outcome",this.project,i),k=d||"completed"!==c[h].status?"failed":"finished",l=f.get(j);if(l){if("outcome"!==l.kind||JSON.stringify(l.tuple)!==JSON.stringify(e))throw Error("outcome identity collision");l.input.outcome!==k&&f.put({...l,gap:"conflicting-terminal"});return}let m=f.get(ai("legacy",this.project,a.input.conversationId)),n={...a.input,status:"terminal",outcome:k,outcomeId:i},o=ai("ready",this.project,String(g.sequence+1).padStart(16,"0"));this.ticket(f,g,"ready",j),f.put({...this.base("outcome",i),kind:"outcome",identity:i,child:a.key,tuple:e,input:n,status:"owed",landingKey:null,readyKey:o,gap:m&&(d||!b?.legacyBoundary||c[h].endOffset<=b.legacyBoundary.bytes)?"legacy-delivery-ambiguous":null})}),b&&f.put(b),this.trackRunning(f,g,a),f.delete(a.pollKey),a.pollKey=this.ticket(f,g,"poll",a.key,e),f.put(a))})}promote(a){!a.pollKey||this.atHead(a.pollKey,"poll")||this.mutate((b,c)=>{b.get(a.pollKey)&&(b.delete(a.pollKey),a.pollKey=this.ticket(b,c,"poll",a.key,"head"),b.put(a))})}rotateCold(a){a.length&&this.mutate((b,c)=>{for(let d of a){let a=b.get(d.key);a?.kind==="child"&&d.pollKey&&a.pollKey===d.pollKey&&b.get(d.pollKey)&&(b.delete(d.pollKey),b.put({...a,pollKey:this.ticket(b,c,"poll",d.key)}))}})}drop(a){this.mutate(b=>{b.get(a.key)&&b.delete(a.key)})}rotateRunning(a){0!==a.length&&this.mutate((b,c)=>{for(let d of a){if("running"!==d.kind||!b.get(d.key))continue;b.delete(d.key);let a=b.get(d.target);a&&"child"===a.kind&&a.runningKey===d.key&&(a.runningKey="running"===a.input.status?this.ticket(b,c,"running",a.key):null,b.put(a))}})}ready(a){return this.page("ready",a).flatMap(a=>{if("ready"!==a.kind)throw Error("invalid ready ticket");let b=this.get(a.target);if(!b||"outcome"!==b.kind)throw Error("missing outcome");return"owed"===b.status&&b.gap&&this.defer(b),"owed"!==b.status||b.gap?[]:[b]})}defer(a){this.mutate((b,c)=>{let d=b.get(a.key);d&&"outcome"===d.kind&&"owed"===d.status&&d.readyKey===a.readyKey&&(b.delete(d.readyKey),d.readyKey=ai("ready",this.project,String(c.sequence+1).padStart(16,"0")),this.ticket(b,c,"ready",d.key),b.put(d))})}prepare(a,b){return this.collection.boundedPatch(4096,c=>{let d=c.get(ai("project",this.project));if(!d||"project"!==d.kind)throw Error("accounting migration has not completed");if(d.revision!==a.accounting?.revision||d.state.outstandingWake||"ready"!==d.migration)return!1;for(let a of b.commit.children){let b=c.get(ai("outcome",this.project,a));if(!b||"outcome"!==b.kind||"owed"!==b.status||b.gap)return!1}return d.state={...a,accounting:void 0,harvestedChildren:[],outstandingWake:b},d.revision++,c.put(d),!0})}beginDispatch(a){return this.mutate((b,c)=>{let d=c.state.outstandingWake;if(!d||d.clientMessageId!==a.clientMessageId||d.dispatch&&"refused"!==d.dispatch.state||d.dispatch?.token!==a.dispatch?.token)return null;let f=e().randomUUID();return c.state.outstandingWake={...d,dispatch:{token:f,state:"active"}},f})}returnedDispatch(a,b,c){this.mutate((d,e)=>{let f=e.state.outstandingWake;if(f?.clientMessageId===a&&f.dispatch?.token===b&&"active"===f.dispatch.state){e.state.outstandingWake={...f,dispatch:{token:b,state:c?"refused":"returned"}};return}let g=e.state.retiredWakes??[],h=g.findIndex(c=>c.wake.clientMessageId===a&&c.wake.dispatch?.token===b&&"active"===c.wake.dispatch.state);if(h<0)return;let i=[...g];i[h]={...i[h],wake:{...i[h].wake,dispatch:{token:b,state:c?"refused":"returned"}}},e.state={...e.state,retiredWakes:i}})}cancelUndispatched(a){return this.mutate((b,c)=>{let d=c.state.outstandingWake;return!!d&&d.clientMessageId===a.clientMessageId&&!d.dispatch&&(c.state.outstandingWake=null,!0)})}settleAbsent(a){return this.mutate((b,c)=>{let d=c.state.outstandingWake;return!!d&&d.clientMessageId===a.clientMessageId&&!d.operationId&&!!d.text&&d.dispatch?.state==="refused"&&d.dispatch.token===a.dispatch?.token&&(c.state.outstandingWake=null,!0)})}retire(a,b,c,d){return this.mutate((e,f)=>{let g=f.state.outstandingWake;if(!g||g.clientMessageId!==a.clientMessageId)return{retired:!1,evicted:null};let h=f.state.retiredWakes??[],i=null;if(h.length>=20){let a=h.findIndex(a=>{if(a.wake.dispatch?.state==="active")return!1;let b=Date.parse(a.wake.preparedAt??a.retiredAt);return Number.isFinite(b)&&void 0!==d&&b<=d});if(a<0)return{retired:!1,evicted:null};i=h[a].wake.clientMessageId,h=[...h.slice(0,a),...h.slice(a+1)]}return f.state={...f.state,outstandingWake:null,retiredWakes:[...h,{wake:g,retiredAt:b,supersededBy:c.supersededBy,reason:c.reason}],releasedWake:{clientMessageId:g.clientMessageId,releasedAt:b}},{retired:!0,evicted:i}})}settleRetired(a){return this.mutate((b,c)=>{let d=c.state.retiredWakes??[],e=d.filter(b=>b.wake.clientMessageId!==a);return e.length!==d.length&&(c.state={...c.state,retiredWakes:e},!0)})}settle(a,b,c){return this.mutate((d,e)=>{let f=e.state.outstandingWake;if(!f||f.clientMessageId!==a||"unsent"===c&&f.dispatch?.state==="active")return!1;if("landed"===c)for(let b of f.commit.children){let c=d.get(ai("outcome",this.project,b));if(!c){if(!b.startsWith("conversation_"))throw Error("missing frozen outcome");d.put({...this.base("legacy",b),kind:"legacy",conversationId:b,reconciled:!0});continue}if("outcome"!==c.kind)throw Error("invalid frozen outcome");d.put({...c,status:"acknowledged",landingKey:a}),d.delete(c.readyKey);let e=d.get(c.child);e?.kind==="child"&&(e.harvestedEpoch??-1)<f.seatEpoch&&d.put({...e,harvestedEpoch:f.seatEpoch})}let g="landed"===c?_(e.state,f.commit,Date.parse(b.lastWakeAt)):e.state;return e.state={...g,accounting:void 0,harvestedChildren:[],outstandingWake:null,releasedWake:"landed"===c?null:b.releasedWake??null},!0})}}var am=c(27146),an=c(67434),ao=c(29307),ap=c(70160),aq=c(58512);function ar(a){let b=(0,ap.agentRegistry)().conversation(a);if(!b)return null;for(let a=b.generations.length-1;a>=0;a-=1){let c=b.generations[a]?.launchProfile?.cwd;if(c&&function(a){try{return g().statSync(a).isDirectory()}catch{return!1}}(c))return c}return null}function as(a,b){if(!a.conversationId)return null;let c=null;try{c=b(a.conversationId)}catch{c=null}return(0,aq.M)(a.project,c)}function at(a=ar){return(0,aq.n)((0,ao.activeOrchestratorSeats)().map(b=>as(b,a)))}function au(a=ar){return(0,ao.activeOrchestratorSeats)().map(b=>{let c=function(a,b=ar){return as(a,b)?.target??a.project}(b,a);return c===b.project?b:{...b,project:c}})}var av=c(75040),aw=c(23509),ax=c(10988),ay=c(31421);let az=(0,c(57975).promisify)(ay.execFile);function aA(a,b){return async c=>{let{stdout:d}=await az("gh",c,{cwd:a,timeout:b,maxBuffer:4194304});return d}}async function aB(a){let b,c=a.run??aA(a.cwd,a.timeoutMs??2e4);try{b=await c(["pr","list","--state","open","--limit",String(a.limit??60),"--json","number,title,headRefName,updatedAt"])}catch(a){return{ok:!1,unavailable:a?.killed===!0||a?.code==="ETIMEDOUT"||a?.name==="TimeoutError"?"timed-out":"command-failed"}}let d=function(a){let b;try{b=JSON.parse(a)}catch{return null}if(!Array.isArray(b))return null;let c=[];for(let a of b){if(!a||"object"!=typeof a||Array.isArray(a)||"number"!=typeof a.number||!Number.isSafeInteger(a.number)||"string"!=typeof a.headRefName||!a.headRefName)return null;c.push({number:a.number,title:"string"==typeof a.title?a.title.slice(0,200):"",headRefName:a.headRefName,updatedAt:"string"==typeof a.updatedAt?a.updatedAt:null})}return c}(b);return d?{ok:!0,pullRequests:d}:{ok:!1,unavailable:"malformed-output"}}async function aC(a){let b=a.run??aA(a.cwd,a.timeoutMs??2e4);try{let d;var c=await b(["issue","list","--state","open","--limit",String(a.limit??40),"--json","number,title,labels,updatedAt"]);try{d=JSON.parse(c)}catch{return[]}if(!Array.isArray(d))return[];let e=[];for(let a of d)!(!a||"object"!=typeof a||Array.isArray(a))&&"number"==typeof a.number&&Number.isSafeInteger(a.number)&&e.push({number:a.number,title:"string"==typeof a.title?a.title.slice(0,200):"",labels:(Array.isArray(a.labels)?a.labels:[]).flatMap(a=>{let b=a?.name;return"string"==typeof b?[b.slice(0,60)]:[]}),updatedAt:"string"==typeof a.updatedAt?a.updatedAt:null});return e}catch{return[]}}var aD=c(76760),aE=c.n(aD),aF=c(89204);function aG(a,b=process.env.LLV_SEAT_TICK_AUDIT_FILE?.trim()||(0,am.BQ)(aE().join("seat-tick","runs.ndjson"))){var c;c={filePath:b,retention:500,busyMessage:"the seat tick journal is busy"},g().mkdirSync(aE().dirname(c.filePath),{recursive:!0,mode:448}),(0,aF.Ol)(c.filePath,c.busyMessage,()=>{g().appendFileSync(c.filePath,`${JSON.stringify(a)}
|
|
82
|
-
`,{encoding:"utf8",mode:384}),function(a,b){let c;try{c=g().readFileSync(a,"utf8").split("\n").filter(a=>a.trim())}catch{return}if(c.length<=b)return;let d=`${a}.${process.pid}.${e().randomUUID()}.tmp`;g().writeFileSync(d,`${c.slice(-b).join("\n")}
|
|
83
|
-
`,{encoding:"utf8",mode:384}),g().renameSync(d,a)}(c.filePath,c.retention)})}function aH(a,b){let c=`
|
|
84
|
-
${(0,j.l)(b.join("\n")).trimEnd()}`,d=Math.max(4e3-c.length,1e3),e=(0,j.l)(a.join("\n")).trimStart();return e.length<=d?`${e}${c}`:`${e.slice(0,d-1).trimEnd()}…${c}`}c(40898);let aI=["Handle the listed items first, then make ONE bounded pass over this project's whole board and act on what stands still: list_pipelines for lanes completed, parked or failed to spawn, the open pull requests their finished lanes left, list_flows, agent_activity with liveOnly for live and stalled agents, and open tasks with nothing running.","Record every outcome where it belongs — on the board card or on the pipeline — not only in this conversation.","If an item cannot be done, mark its task blocked with the reason. That is the stop, and it is the only one.","Do not schedule yourself. The Viewer ticks this seat; a self-scheduled monitor is refused practice.","This tick is yours to govern: seat_tick_settings turns it off, changes how often it wakes you, or turns it back on, per project, with a reason that shows on the board.","Do not wait on the operator inside this turn."];function aJ(a){return`- [${a.kind}] ${a.id} — ${a.label}`}function aK(a){var b;return a?["","Standing monitor note for this project, in the seat's own words (seat_tick_settings sets, replaces and clears it). It shapes what you look at; the contract below still governs what you do:",(b=a).length<=1e3?b:`${b.slice(0,1e3).trimEnd()}… [preview, ${b.length} chars; seat_tick_settings returns the full note]`]:[]}function aL(a){return Math.max(36e5,Number.isFinite(a)&&a>0?2*a:0)}function aM(a,b){let c=a?Date.parse(a):NaN;return Number.isFinite(c)?new Date(c+aL(b)).toISOString():null}function aN(a,b,c){let d=a?Date.parse(a):NaN;return!Number.isFinite(d)||b-d<aL(c)}function aO(a,b,c,d,e=!1){return{clientMessageId:b.clientMessageId,conversationId:b.conversationId,seatEpoch:b.seatEpoch,slot:a,since:c,lapsesAt:aM(c,d),keptPastBound:e}}function aP(a,b,c,d){let e=[],f=a.outstandingWake;for(let c of(f&&e.push(aO("outstanding",f,f.preparedAt??null,d)),a.retiredWakes??[]))b?.conversationId&&c.wake.conversationId===b.conversationId&&e.push(aO("retired",c.wake,c.wake.preparedAt??c.retiredAt,d));let g=e.filter(a=>aN(a.since,c,d));return g.length?g.reduce((a,b)=>a.lapsesAt?b.lapsesAt?b.lapsesAt>a.lapsesAt?b:a:b:a):null}let aQ=new Set(["retained","landed","dropped"]);function aR(a){return a?`${a.slice(0,16).replace("T"," ")} UTC`:"an instant the row does not record"}function aS(a){let b=`this tick is fenced by the wake prepared ${aR(a.since)} under key ${a.clientMessageId}, which is unresolved: no replacement wake is sent for this project until it settles`;return a.keptPastBound?`${b}, and its age bound was spent ${a.lapsesAt?`at ${aR(a.lapsesAt)}`:"before now"}: the next check retires it unresolved and may wake this project, unless the layer holding it reports by then that it still has the payload, or a transport call of its own has not returned`:`${b}, and the fence lapses ${a.lapsesAt?`at ${aR(a.lapsesAt)}`:"once a check has an instant to measure its age from"}, after which the attempt is retired unresolved and the next check may wake`}var aT=c(44405);function aU(){return process.env.LLV_SEAT_TICK_SETTINGS_FILE?.trim()||(0,am.BQ)("seat-tick-settings.json")}function aV(a){return{project:a,enabled:!0,wakeIntervalMinutes:null,reason:null,monitorPrompt:null,until:null,updatedAt:null,setBy:null}}function aW(a){return a.enabled&&null===a.wakeIntervalMinutes}function aX(a){return"string"==typeof a&&Number.isFinite(Date.parse(a))?a:null}function aY(a){try{let b=JSON.parse(g().readFileSync(a,"utf8"));if(!b||"object"!=typeof b||Array.isArray(b))return{version:1,projects:{}};let c=b.projects??{};return{version:1,projects:Object.fromEntries(Object.entries(c).map(([a,b])=>{var c,d,e;let f;return[a,(c=a,d=b,f=aV(c),!d||"object"!=typeof d||Array.isArray(d)?f:{project:c,enabled:!1!==d.enabled,wakeIntervalMinutes:"number"!=typeof(e=d.wakeIntervalMinutes)||!Number.isFinite(e)||e<=0?null:Math.min(525600,e),reason:"string"==typeof d.reason&&d.reason.trim()?d.reason.slice(0,500):null,monitorPrompt:"string"==typeof d.monitorPrompt&&d.monitorPrompt.trim()?d.monitorPrompt.slice(0,16e3):null,until:aX(d.until),updatedAt:aX(d.updatedAt),setBy:function(a){if(!a||"object"!=typeof a||Array.isArray(a))return null;let b=a.kind;return"manager"!==b&&"agent"!==b&&"gateway"!==b&&"unidentified"!==b?null:{kind:b,conversationId:"string"==typeof a.conversationId&&a.conversationId?a.conversationId.slice(0,200):null,project:"string"==typeof a.project&&a.project?a.project.slice(0,200):null,seatEpoch:"number"==typeof a.seatEpoch&&Number.isSafeInteger(a.seatEpoch)?a.seatEpoch:null}}(d.setBy)})]}))}}catch{return{version:1,projects:{}}}}function aZ(a,b,c=aU()){(0,aF.Ol)(c,"seat tick settings are busy",()=>{let d=aY(c);(0,aT.f)(c,{version:1,projects:{...d.projects,[a]:{...b,project:a}}})})}function a$(a,b,c){let d=a.until?Date.parse(a.until):NaN,e=Number.isFinite(d)&&d<=b&&!aW(a),f=null!==a.updatedAt;return e||aW(a)?{enabled:!0,wakeIntervalMs:c,reason:null,monitorPrompt:a.monitorPrompt,until:null,updatedAt:a.updatedAt,isDefault:!0,configured:f,lapsed:e,setBy:e?a.setBy:null}:{enabled:a.enabled,wakeIntervalMs:null===a.wakeIntervalMinutes?c:Math.round(6e4*a.wakeIntervalMinutes),reason:a.reason,monitorPrompt:a.monitorPrompt,until:a.until,updatedAt:a.updatedAt,isDefault:!1,configured:f,lapsed:!1,setBy:a.setBy}}function a_(){return process.env.LLV_SEAT_TICK_STATE_FILE?.trim()||(0,am.BQ)("seat-tick.json")}function a0(a){return"string"==typeof a&&Number.isFinite(Date.parse(a))?a:null}function a1(a){return(Array.isArray(a)?a:[]).filter(a=>"string"==typeof a&&a.length>0&&a.length<=200)}function a2(a){var b;if(!a||"object"!=typeof a||Array.isArray(a))return null;let c="string"==typeof a.clientMessageId?a.clientMessageId:"",d="string"==typeof a.conversationId?a.conversationId:"",e=a.seatEpoch,f=!(b=a.commit)||"object"!=typeof b||Array.isArray(b)?null:"string"==typeof b.fingerprint&&b.fingerprint&&"number"==typeof b.eventsThrough&&Number.isInteger(b.eventsThrough)&&!(b.eventsThrough<0)?{proposal:!0===b.proposal,reasons:(Array.isArray(b.reasons)?b.reasons:[]).filter(a=>q.includes(a)),fingerprint:b.fingerprint.slice(0,200),eventsThrough:b.eventsThrough,children:a1(b.children),shownChildren:a1(b.shownChildren),announcedLanes:a1(b.announcedLanes)}:null;return c&&d&&f&&"number"==typeof e&&Number.isSafeInteger(e)?{clientMessageId:c,conversationId:d,seatEpoch:e,operationId:"string"==typeof a.operationId&&a.operationId?a.operationId:null,commit:f,..."string"==typeof a.text?{text:a.text}:{},...a0(a.preparedAt)?{preparedAt:a.preparedAt}:{}}:null}let a3=["timed-out","command-failed","malformed-output","lanes-unreadable"];function a4(a,b){var c;let d,e=s();if(!a||"object"!=typeof a||Array.isArray(a))return e;let f={},g=a.wakesWithoutChange??{};for(let a of q){let b=g[a];"number"==typeof b&&Number.isInteger(b)&&b>=0&&(f[a]=b)}return{seatEpoch:"number"==typeof a.seatEpoch&&Number.isSafeInteger(a.seatEpoch)?a.seatEpoch:null,lastCheckAt:a0(a.lastCheckAt),lastWakeAt:a0(a.lastWakeAt),lastWakeReasons:(Array.isArray(a.lastWakeReasons)?a.lastWakeReasons:[]).filter(a=>q.includes(a)),wakesWithoutChange:f,quietSince:a0(a.quietSince),idleSince:a0(a.idleSince),lastProposalAt:a0(a.lastProposalAt),stalledSeen:(Array.isArray(a.stalledSeen)?a.stalledSeen:[]).filter(a=>"string"==typeof a&&a.length>0&&a.length<=100).slice(0,200),lastWakeFingerprint:"string"==typeof a.lastWakeFingerprint?a.lastWakeFingerprint.slice(0,200):null,eventsThrough:"number"!=typeof(d=a.eventsThrough)||!Number.isInteger(d)||d<0||b&&0===d&&!a0(a.lastWakeAt)?null:d,outstandingWake:a2(a.outstandingWake),retiredWakes:(Array.isArray(c=a.retiredWakes)?c:[]).flatMap(a=>{if(!a||"object"!=typeof a||Array.isArray(a))return[];let b=a2(a.wake),c=a0(a.retiredAt);if(!b||!c)return[];let d=void 0===a.reason?"seat-superseded":a.reason;if("seat-superseded"!==d&&"unresolved-age"!==d)return[];if("unresolved-age"===d)return a.supersededBy?[]:[{wake:b,retiredAt:c,supersededBy:null,reason:d}];let e=a.supersededBy;if(!e||"object"!=typeof e)return[];let f="string"==typeof e.conversationId?e.conversationId:"",g=e.seatEpoch;return f&&"number"==typeof g&&Number.isSafeInteger(g)?[{wake:b,retiredAt:c,supersededBy:{conversationId:f,seatEpoch:g},reason:d}]:[]}).slice(0,20),releasedWake:function(a){if(!a||"object"!=typeof a||Array.isArray(a))return null;let b="string"==typeof a.clientMessageId&&a.clientMessageId.length>0&&a.clientMessageId.length<=1e3?a.clientMessageId:null,c=a0(a.releasedAt);return b&&c?{clientMessageId:b,releasedAt:c}:null}(a.releasedWake),pullRequestGap:function(a){if(!a||"object"!=typeof a||Array.isArray(a))return null;let b=a3.find(b=>b===a.gap),c=a0(a.since),d=a0(a.lastAttemptAt),e=a.attempts;return b&&c&&d&&"number"==typeof e&&Number.isInteger(e)&&!(e<1)?{gap:b,since:c,lastAttemptAt:d,attempts:e,reported:!0===a.reported}:null}(a.pullRequestGap),childrenGap:null,harvestedChildren:a1(a.harvestedChildren),childrenShown:a1(a.childrenShown).slice(-64),announcedLanes:a1(a.announcedLanes).slice(-64)}}function a5(a,b){return a.seatEpoch===b?a:{...s(),seatEpoch:b,eventsThrough:a.eventsThrough,lastWakeAt:a.lastWakeAt,lastProposalAt:a.lastProposalAt,outstandingWake:a.outstandingWake,retiredWakes:a.retiredWakes??[],releasedWake:a.releasedWake??null,pullRequestGap:a.pullRequestGap,childrenGap:a.childrenGap,harvestedChildren:a.harvestedChildren,accounting:a.accounting}}function a6(a){return a===a_()?aE().join(aE().dirname(a),"state.sqlite"):`${a}.sqlite`}function a7(a,b){let c=new al(a6(b),a);return c.migrateLegacy(b,(a,b)=>a4(a,2!==b)),c}function a8(a,b=a_()){return a7(a,b).readState()}function a9(a,b,c=a_()){let d=a7(a,c);d.writeState(b.accounting?b:{...b,accounting:d.readState().accounting})}var ba=c(88623),bb=c(53344),bc=c(65972),bd=c(12136),be=c(57624),bf=c(30816),bg=c(88370),bh=c(58444);function bi(a){return a instanceof Error&&"AbortError"===a.name?a:new DOMException("catalog selection cancelled","AbortError")}function bj(a,b){let c=Math.max(0,Math.floor(b.limit)),d=b.query?b.query.toLocaleLowerCase():"",e=[],f=new Set,g=0,h=0;for(let i of a){if("claude"===i.engine||"codex"===i.engine)h+=1,b.hostedPaths?.has(i.path)&&f.add(i.path),(!b.project||i.project===b.project)&&(!b.liveOnly||"live"===i.activity||"stalled"===i.activity||b.hostedPaths?.has(i.path))&&(!d||`${i.title}
|
|
85
|
-
${i.project}
|
|
86
|
-
${i.path}`.toLocaleLowerCase().includes(d))&&(g+=1,e.length<c&&e.push(i))}return{entries:e,matched:g,scanned:h,hostedSeen:f}}async function bk(a,b={completedFileScan:bh.Nm}){let c=performance.now();if(b.signal?.aborted)throw bi(b.signal.reason);let d=await b.completedFileScan({signal:b.signal??null});if(b.signal?.aborted)throw bi(b.signal.reason);return{...bj(d.snapshot.files,a),generation:d.generation,cacheStatus:d.cacheStatus,freshScan:!1,selectionMs:performance.now()-c}}async function bl(a,b,c,d){let e=d.now??Date.now,f=d.signal??null,g=new Map,h=0,i=0,j="complete";if(f?.aborted)throw bi(f.reason);let k=async()=>{for(;;){if(f?.aborted)throw bi(f.reason);if("complete"!==j||h>=a.length)return;if(null!==d.deadlineAt&&e()>=d.deadlineAt){j="deadline";return}let k=h,l=a[k],m=Math.max(0,b(l));if(i+m>d.maxBytes){j="byte_budget";return}h=k+1,i+=m,g.set(k,await c(l,f))}},l=(await Promise.allSettled(Array.from({length:Number.isFinite(d.concurrency)?Math.max(1,Math.min(Math.floor(d.concurrency),a.length||1)):1},()=>k()))).find(a=>"rejected"===a.status);if(l?.status==="rejected")throw l.reason;return{results:g,hydrated:g.size,skipped:a.length-g.size,bytes:i,stopped:j}}var bm=c(66812),bn=c(842),bo=c(14310),bp=c(43872);async function bq(a,b){let c=await (0,bn.mR)(b);if("complete"!==c.integrity)return null;let d=(0,bm.j)(c.records,a);return{turn:"terminal"===d.state?"idle":"busy"===d.state?"busy":"unknown",lastRecordTs:function(a){let b=null;for(let c of a){let a=c.timestamp;if("string"!=typeof a)continue;let d=Date.parse(a);Number.isFinite(d)&&(null===b||d>b)&&(b=d)}return b}(c.records)}}async function br(a){let b,c=function(a){let b=null;for(let[c,d]of(0,bp.s9)())(a===d||a.startsWith(d.endsWith(aE().sep)?d:d+aE().sep))&&(!b||d.length>b[1].length)&&(b=[c,d]);return b}(a);if(!c)return null;try{b=await g().promises.stat(a)}catch{return null}if(!b.isFile())return null;let d=(0,bo.q0)(c[0],c[1],a,b);return{path:a,project:d.project,title:d.title,engine:d.engine,mtimeMs:b.mtimeMs,sizeBytes:b.size,conversationId:null,activity:null,activityReason:null}}function bs(a){return{path:a.path,project:a.project,title:a.title,engine:a.engine,mtimeMs:Number.isFinite(a.mtime)?1e3*a.mtime:NaN,sizeBytes:Number.isFinite(a.size)?a.size:void 0,conversationId:a.conversationId??null,activity:a.activity??null,activityReason:a.activityReason??null}}async function bt(a,b,c,d){let e=[];for(let c of a)b.has(c)||e.push(c);if(0===e.length)return{entries:[],truncated:!1};let f=e.length>64,g=f?e.slice(-64):e;return{entries:(await Promise.all(g.map(async a=>{try{return await d(a)}catch{return null}}))).filter(a=>null!==a&&("claude"===a.engine||"codex"===a.engine)&&(!c||a.project===c)),truncated:f}}function bu(a,b){let c=a=>Number.isFinite(a.mtimeMs)?a.mtimeMs:-1/0;return c(b)-c(a)}function bv(a){return a instanceof Error&&"AbortError"===a.name?a:new DOMException("liveness snapshot cancelled","AbortError")}function bw(a){return Math.round(100*Math.max(0,a))/100}async function bx(a,b){let c,d,e=performance.now(),f=b.now(),g=a.signal??null;if(g?.aborted)throw bv(g.reason);let h=Number.isFinite(a.stallAfterMs)&&a.stallAfterMs>0?Math.floor(a.stallAfterMs):6e5,i=Math.max(1,Math.min(200,Number.isInteger(a.limit)?a.limit:100)),j=performance.now(),k=b.registrySnapshot(),l=function(a){let b=new Map,c=new Map;for(let d of a)for(let a of d.runs)for(let e of a.attempts){if(e.historical)continue;let f={pipelineId:d.id,stageId:a.stageId,attempt:e.n,reportedState:e.state,reportedPipelineState:d.state,paneId:e.paneId};e.conversationId&&b.set(e.conversationId,f),e.agentPath&&c.set(e.agentPath,f)}return{byConversation:b,byPath:c}}(b.pipelines()),m=function(a){let b=new Set;for(let c of Object.values(a.entries))("starting"===c.status||"live"===c.status||"idle"===c.status||"handoff"===c.status)&&c.artifactPath&&b.add(c.artifactPath);return b}(k),n=performance.now()-j,o=new Set,p=!!(a.transcriptPath||a.conversationId);if(a.transcriptPath&&o.add(a.transcriptPath),a.conversationId){let b=k.conversations[a.conversationId],c=b?.generations.at(-1)?.path;c&&o.add(c)}let q=performance.now();if(p)c=o.size>0?(await Promise.all([...o].slice(0,i).map(a=>b.describeTranscript(a)))).filter(a=>null!==a):[],d={scope:"targeted",scanned:o.size,matched:c.length,selected:c.length,recovered:0,recoveryTruncated:!1,generation:null,cacheStatus:null,freshScan:!1};else{let e,f={project:a.project,liveOnly:a.liveOnly,limit:i,hostedPaths:m};if(b.selectInventory){let h=await b.selectInventory(f,{signal:g});c=h.entries.map(bs),e=h.hostedSeen??new Set(h.entries.map(a=>a.path)),d={scope:a.project?"project":"corpus",scanned:h.scanned,matched:h.matched,selected:h.entries.length,recovered:0,recoveryTruncated:!1,generation:h.generation,cacheStatus:h.cacheStatus,freshScan:h.freshScan}}else if(b.listFiles){let g=bj(await b.listFiles(),f);c=g.entries.map(bs),e=g.hostedSeen,d={scope:a.project?"project":"corpus",scanned:g.scanned,matched:g.matched,selected:g.entries.length,recovered:0,recoveryTruncated:!1,generation:null,cacheStatus:null,freshScan:!0}}else throw Error("liveness needs an inventory source: install selectInventory");let h=await bt(m,e,a.project,b.describeTranscript),j=new Set(c.map(a=>a.path)),k=h.entries.filter(a=>!j.has(a.path));(k.length>0||h.truncated)&&(k.length>0&&(c=[...c,...k].sort(bu).slice(0,i)),d={...d,matched:d.matched+k.length,selected:c.length,recovered:k.length,recoveryTruncated:h.truncated})}let r=performance.now()-q;if(g?.aborted)throw bv(g.reason);let s=c.filter(a=>"claude"===a.engine||"codex"===a.engine),t=performance.now(),u=Number.isFinite(a.evidenceDeadlineMs)&&a.evidenceDeadlineMs>0?Math.floor(a.evidenceDeadlineMs):2e3,v=await bl(s,a=>Math.min(Number.isFinite(a.sizeBytes)?a.sizeBytes:131072,131072),async(a,c)=>{try{return await b.transcriptEvidence(a.engine,a.path,{signal:c})}catch(a){if(c?.aborted||(0,bd.zf)(a))throw a;return null}},{concurrency:Number.isFinite(a.evidenceConcurrency)?Math.max(1,Math.floor(a.evidenceConcurrency)):4,maxBytes:Number.isFinite(a.evidenceByteBudget)?Math.max(0,Math.floor(a.evidenceByteBudget)):131072*Math.max(1,i),deadlineAt:b.now()+u,signal:g,now:b.now}),w=performance.now()-t;if(g?.aborted)throw bv(g.reason);let x=performance.now(),y=0,z={claude:new Map,codex:new Map},A=s.map((a,c)=>{var d,e;let g,i=v.results.has(c),j=v.results.get(c)??null;i&&null===j&&(y+=1);let m=j?j.turn:"jsonl_turn_open"===a.activityReason?"busy":"jsonl_turn_completed"===a.activityReason?"idle":"unknown",n=j?.lastRecordTs??(Number.isFinite(a.mtimeMs)?a.mtimeMs:null),o=null!==n?Math.max(0,f-n):null,p=function(a,b){for(let c of Object.values(a.entries))if(c.artifactPath===b)return c;return null}(k,a.path),q=function(a,b){if(!a)return{state:"unknown",kind:"none",pid:null};let c="starting"===a.status||"live"===a.status||"idle"===a.status||"handoff"===a.status,d=a.structuredHost?.process??null,e=a.host?{state:(0,bc.eW)(a.host.agent,b)||(0,bc.eW)(a.host.panePid,b)?"alive":"gone",kind:"tmux",pid:a.host.agent.pid}:null,f=d?{state:(0,bc.eW)(d,b)?"alive":"gone",kind:"structured",pid:d.pid}:null;if(!c){let a=e??f;return a?{...a,state:"gone"}:{state:"gone",kind:"none",pid:null}}if(e?.state==="alive")return e;if(f?.state==="alive")return f;if(e)return e;if(f)return f;let g=Date.parse(a.updatedAt);return{state:Number.isFinite(g)&&b.now()-g<3e5?"unknown":"gone",kind:"none",pid:null}}(p,b.probe),r="busy"===m&&"alive"===q.state&&p?.accountId?(d=a.engine,e=p.accountId,(g=z[d]).has(e)||g.set(e,(0,bf.p5)(b.limitsProvenance?.(d,e),f,bf.Lm)),g.get(e)??null):null,s=a.conversationId??function(a,b){for(let c of Object.values(a.conversations))if(c.generations.some(a=>a.path===b)||c.continuityPaths?.includes(b))return c.id;return null}(k,a.path);return{entry:a,conversationId:s,turnState:m,lastRecordMs:n,silentForMs:o,host:q,...function(a){let b=null!==a.silentForMs&&a.silentForMs>=a.stallAfterMs;if("gone"===a.host.state)return"busy"===a.turnState?{lifecycle:"stalled",reason:"host_gone_turn_open"}:{lifecycle:"gone",reason:"host_gone_turn_settled"};if("unknown"===a.host.state){let b=a.startingGraceMs??3e5;return null===a.silentForMs||a.silentForMs<b?{lifecycle:"starting",reason:"launch_unproven"}:"busy"===a.turnState?{lifecycle:"stalled",reason:"launch_unproven_expired"}:{lifecycle:"gone",reason:"launch_unproven_expired"}}return"busy"===a.turnState&&a.providerRetryAt?{lifecycle:"waiting",reason:"provider_throttled",retryAt:a.providerRetryAt}:b?{lifecycle:"stalled",reason:"host_alive_transcript_silent"}:"idle"===a.turnState?{lifecycle:"waiting",reason:"host_alive_turn_idle"}:{lifecycle:"running",reason:"host_alive_turn_active"}}({host:q,turnState:m,silentForMs:o,stallAfterMs:h,providerRetryAt:r}),pipeline:(s?l.byConversation.get(s):void 0)??l.byPath.get(a.path)??null,evidenceSource:i?null!==j?"transcript":"unreadable":"projection"}}),B=n+(performance.now()-x),C=performance.now(),D=A.map(a=>{var b;return{conversationId:a.conversationId,transcriptPath:a.entry.path,project:a.entry.project,engine:a.entry.engine,title:a.entry.title,lastRecordAt:null!==(b=a.lastRecordMs)&&Number.isFinite(b)?new Date(b).toISOString():null,turnState:a.turnState,host:a.host,lifecycle:a.lifecycle,reason:a.reason,retryAt:a.retryAt??null,silentForMs:a.silentForMs,stalledForMs:"stalled"===a.lifecycle||"gone"===a.lifecycle?a.silentForMs:null,pipeline:a.pipeline,evidenceSource:a.evidenceSource}}),E=performance.now()-C;return{observedAt:new Date(f).toISOString(),stallAfterMs:h,count:D.length,stalledCount:D.filter(a=>"stalled"===a.lifecycle).length,stalledConfirmedCount:D.filter(a=>"stalled"===a.lifecycle&&"transcript"===a.evidenceSource).length,conversations:D,selection:{...d,hydrated:v.hydrated,unreadable:y,projected:s.length-v.hydrated,evidenceBytes:v.bytes,budget:v.stopped},timings:{inventorySelectionMs:bw(r),journalProjectionMs:bw(B),evidenceReadMs:bw(w),serializationMs:bw(E),totalMs:bw(performance.now()-e)}}}var by=c(18027),bz=c(93994);function bA(){return{state:"unreadable",error:"deployment ledger is unreadable"}}let bB=`
|
|
87
|
-
ORDER BY COALESCE(
|
|
88
|
-
julianday(json_extract(state_json, '$.createdAt')),
|
|
89
|
-
julianday(json_extract(state_json, '$.updatedAt'))
|
|
90
|
-
) DESC,
|
|
91
|
-
COALESCE(updated_at, 0) DESC,
|
|
92
|
-
id DESC
|
|
93
|
-
`;function bC(a=process.env){let b=function(a=process.env){let b=process.getBuiltinModule?.("bun:sqlite");if(!b)return null;try{return new b.Database(function(a=process.env){return a.LLV_RUNTIME_JOURNAL?.trim()||(0,am.BQ)("runtime-events.sqlite")}(a),{readonly:!0,create:!1})}catch{return null}}(a);if(!b)return bA();try{let a=b.query(`SELECT id, state_json FROM entities WHERE kind = ?${bB} LIMIT 1`).get("deployment");if(!a)return{state:"ok",value:null};let c=function(a,b){try{let c=JSON.parse(a);if(!c||"object"!=typeof c||Array.isArray(c)||c.deploymentId!==b||"string"!=typeof c.revision||"string"!=typeof c.phase)return null;return c}catch{return null}}(a.state_json,a.id);return c?{state:"ok",value:c}:bA()}catch{return bA()}finally{b.close()}}var bD=c(84201),bE=c(80588);function bF(a,b=200){let c=a.split("\n").find(a=>a.trim())??"";return(0,j.t)(c,b)}function bG(a){let b=new Set;for(let c of a.matchAll(/(?<![\w#])#(\d{1,6})\b/g)){let a=Number(c[1]);Number.isSafeInteger(a)&&a>0&&b.add(a)}return[...b]}let bH=new Set(["pending","queued"]),bI=new Set(["delivering","applying"]),bJ=new Set(["delivered","applied","answered"]);async function bK(a,b){let c=await b.operationStatus(a,{currentRetryLeaf:!0});return c?{status:c.receipt.status,reason:c.receipt.reason??null}:null}function bL(a){if(!a)return"unknown";let b=a.status;return bH.has(b)||bI.has(b)?"retained":bJ.has(b)?"landed":"failed"===b&&a.reason===bD.WU?"uncertain":"failed"===b||"rejected"===b?"dropped":"uncertain"}async function bM(a,b){let c=async a=>{try{return await b.journal(a)??"no-record"}catch{return"unreachable"}},d=await b.lookup({conversationId:a.conversationId,clientMessageId:a.clientMessageId});if("absent"===d.kind){if(!a.operationId)return{state:"absent",evidence:{operationId:null,record:null,journal:"unasked"}};let b=await c(a.operationId);return{state:"string"==typeof b?"unknown":bL(b),evidence:{operationId:a.operationId,record:null,journal:b}}}if("found"!==d.kind)return{state:"unknown",evidence:{operationId:a.operationId,record:null,journal:"unasked"}};let e=(a,b)=>({operationId:d.operationId,record:{state:a.state,reason:a.reason,resend:a.resend,settledAt:a.settledAt},journal:b});if(!d.current.readable)return{state:"unknown",evidence:e(d.receipt,"unreachable")};let f=d.current.value;if("in-flight"===f.state){if(!b.settle)return{state:"retained",evidence:e(f,"unasked")};let a=await b.settle(d.operationId);if(!a)return{state:"unknown",evidence:e(f,"unasked")};if("in-flight"===a.state)return{state:"retained",evidence:e(a,"unasked")};f=a}if("delivered"===f.state)return{state:"landed",evidence:e(f,"unasked")};if("safe"===f.resend)return{state:"dropped",evidence:e(f,"unasked")};let g=await c(d.operationId);if("string"==typeof g)return{state:"uncertain",evidence:e(f,g)};let h=bL(g);if("landed"!==h&&"dropped"!==h)return{state:"unknown"===h?"uncertain":h,evidence:e(f,g)};if(!b.settleFromJournal)return{state:h,evidence:e(f,g)};let i=await b.settleFromJournal({conversationId:a.conversationId,operationId:d.operationId,deliveryId:d.deliveryId},g);return"landed"===h?{state:"landed",evidence:{...e(i??f,g),...i?.state==="delivered"?{recorded:"delivered"}:{}}}:i?.resend==="safe"?{state:"dropped",evidence:{...e(i,g),recorded:"lost"}}:{state:"dropped",evidence:{...e(i??f,g),recorded:"refused"}}}async function bN(a,b,c){let d=await c.operationStatus(a,{currentRetryLeaf:!0});if(!d)return"unknown";let e=d.receipt.status;if(bJ.has(e)||bI.has(e))return"too-late";if("failed"===e||"rejected"===e)return"withdrawn";if(!bH.has(e))return"unknown";try{let a=await c.transitionOperation(d.operationId,"failed",{reason:b});return"failed"===a.receipt.status?"withdrawn":"too-late"}catch{let a=await c.operationStatus(d.operationId,{currentRetryLeaf:!0});return a&&bJ.has(a.receipt.status)?"too-late":"unknown"}}async function bO(a,b,c){let d=(0,bD.nb)(c.status,c.reason);if(!d||"unverified"===d.disposition||"uncertain"===bL(c))return null;try{if("delivered"===d.state)a.recordDeliveryOutcomeForOperation(b.conversationId,b.operationId,"delivered",null,"delivered");else{if(!b.deliveryId)return null;a.recordDeliveryOutcome(b.deliveryId,"failed",c.reason??d.reason,"lost")}}catch{return null}return(0,bD.ak)(a.readOnlySnapshot(),b.operationId)}function bP(){return{seatFor:a=>(function(a,b=ar){let c=(0,ao.orchestratorSeatFor)(a);if(c.active)return c;let d=au(b).find(b=>b.project===a)??null;return d?{...c,active:d}:c})(a),activeSeats:()=>au().map(a=>a.project),pipelines:()=>(0,by.loadPipelinesForList)(),archivedPipelines:()=>(0,by.loadArchivedPipelines)(),tasks:()=>(0,ax.h6)(),registry:()=>(0,ap.agentRegistry)(),liveness:async a=>(await bx({...a.conversationId?{conversationId:a.conversationId}:{},...a.project?{project:a.project,liveOnly:!0}:{},stallAfterMs:a.stallAfterMs,limit:a.limit},function(a={}){let b=a.completedFileScan??bh.Nm;return{now:()=>Date.now(),selectInventory:(a,c)=>bk(a,{completedFileScan:b,signal:c?.signal??null}),describeTranscript:br,registrySnapshot:()=>(0,ap.agentRegistry)().readOnlySnapshot(),pipelines:()=>(0,bg.Cz)().pipelines,transcriptEvidence:bq,limitsProvenance:be.io,probe:(0,bc.AM)()}}())).conversations,lifecycleJournal:bb._1,latestDeployment:bC,retirementReport:()=>{try{return JSON.parse(g().readFileSync((0,am.BQ)("host-retirement-report.json"),"utf8"))}catch{return null}},settings:a=>(function(a,b=aU()){return aY(b).projects[a]??aV(a)})(a),openPullRequests:a=>aB(a),wakeState:async a=>bM(a,{lookup:a=>(0,bD.Mc)(a),settle:a=>(0,bD.V$)(a),settleFromJournal:(a,b)=>bO((0,ap.agentRegistry)(),a,b),journal:async a=>{let b=(0,bz.sS)();if(!b)throw Error("runtime host socket is unavailable");return bK(a,b)}}),originalSend:a=>(0,bD.Mc)(a),withdrawWake:async(a,b)=>{let c;if(a.operationId){let c=(0,bz.sS)();return c?bN(a.operationId,b,c):"unknown"}let d=(c=Object.values((0,ap.agentRegistry)().readOnlySnapshot().heldDeliveries).find(b=>b.clientMessageId===a.clientMessageId))?{id:c.id,state:c.state}:null;return d?"delivered"===d.state?"too-late":"held"!==d.state?"unknown":((0,ap.agentRegistry)().terminalizeHeldDelivery(d.id,b),"withdrawn"):"unknown"},now:()=>Date.now()}}function bQ(a){return!a.closedAt&&!a.hiddenAt&&"completed"!==a.state&&"closed"!==a.state}function bR(a){let b=[a.pausedAt,a.resumedAt,...a.runs.flatMap(a=>a.attempts.flatMap(a=>[a.startedAt,a.completedAt]))].filter(a=>"string"==typeof a&&Number.isFinite(Date.parse(a)));return{id:a.id,task:a.task,project:a.project,state:a.state,createdAt:a.createdAt,closedAt:a.closedAt,...a.spec?{spec:a.spec}:{},activityAt:b}}function bS(a){return{id:a.id,project:a.project,status:a.status,text:a.text,updatedAt:a.updatedAt,assignments:a.assignments?.map(a=>({state:a.state,path:a.path,conversationId:a.conversationId??null}))??[],pipelineIds:a.pipelineIds}}function bT(a){return a?{lifecycle:a.lifecycle,reason:a.reason,turnState:a.turnState}:null}async function bU(a,b,c){let d,e=new Map;try{d=await c.liveness({project:a,stallAfterMs:b.stallAfterMs,limit:60})}catch{return e}for(let a of d){let b=a.pipeline?.pipelineId;if(!b||e.has(b))continue;let c=bT(a);c&&e.set(b,c)}return e}async function bV(a,b,c){let d=c.seatFor(a).active;if(!d?.conversationId)return null;let e=c.registry().seatTickConversation(d.conversationId),f=e?.turn.state??"unknown",g=null;if("busy"===f)try{let a=await c.liveness({conversationId:d.conversationId,stallAfterMs:b.stallAfterMs,limit:1});g=bT(a[0])}catch{g=null}return{conversationId:d.conversationId,seatEpoch:d.seatEpoch,path:d.path,designatedAt:"string"==typeof d.designatedAt?d.designatedAt:null,turn:f,activity:g}}function bW(a,b,c=[]){let d=(0,ao.canonicalOrchestratorProject)(a),e=[...b.pipelines(),...c].filter(a=>a.repoDir&&(0,ao.canonicalOrchestratorProject)(a.project)===d).sort((a,b)=>Date.parse(b.createdAt)-Date.parse(a.createdAt));return e[0]?.repoDir??null}function bX(a){return e().createHash("sha256").update(a.join("\n")).digest("hex").slice(0,32)}async function bY(a){let b,c,d={pullRequests:[],unavailable:null,gap:a.gap};if(!a.wakeDue||!a.enabled||!a.seat||G(a.seat))return d;let e=new Date(a.now).toISOString(),f=b=>({pullRequests:[],unavailable:b,gap:U(a.gap,b,e)}),g=a.gap;if(g?.gap==="lanes-unreadable"&&!T(g,a.now,a.wakeIntervalMs))return{pullRequests:[],unavailable:g.gap,gap:g};try{b=a.sources.archivedPipelines()}catch{return f("lanes-unreadable")}let h=[...a.sources.pipelines(),...b].filter(b=>{var c;return(0,ao.canonicalOrchestratorProject)(b.project)===a.project&&!(c=b).hiddenAt&&(!!c.closedAt||"completed"===c.state||"closed"===c.state)});if(0===h.length)return d;let i=bW(a.project,a.sources,b);if(!i)return d;if(a.gap&&!T(a.gap,a.now,a.wakeIntervalMs))return{pullRequests:[],unavailable:a.gap.gap,gap:a.gap};try{c=await a.sources.openPullRequests({cwd:i,limit:60})}catch{c={ok:!1,unavailable:"command-failed"}}if(!c.ok)return f(c.unavailable);let k=c.pullRequests,l=new Map;for(let a of h){if(!a.branch)continue;let b=l.get(a.branch);(!b||Date.parse(a.createdAt)>Date.parse(b.createdAt))&&l.set(a.branch,a)}let m=[];for(let a of k){let b=l.get(a.headRefName);b&&m.push({number:a.number,title:(0,j.t)(a.title,120),pipelineId:b.id,pipelineTitle:(0,j.t)(b.task.split("\n")[0]??"",120),updatedAt:a.updatedAt})}return{pullRequests:m.sort((a,b)=>a.number-b.number),unavailable:null,gap:null}}let bZ=new Set(["starting","pane-bound","host-verified","prompt-delivered","path-pending"]),b$=new Set(["starting","live","idle","handoff"]),b_=new Set(["pipeline","flow","orchestrator"]);async function b0(a,b,c,d,e){var f;if(!b)return{children:[],unavailable:null};if(!c.accounting)return{children:[],unavailable:"registry-unreadable"};let h=new al(c.accounting.filename,a),i=e.registry(),k=e.now(),l=new Set,m=null===(f=c.accounting.gap)?null:"legacy-migration-pending"===f?"migration-pending":"migration-blocked";m&&l.add(m);let n=[],o=(0,bp.s9)().map(([,a])=>a),p=(b,c)=>{let d=b.file.lineageEdges[c];return d?function(a,b,c,d,e,f){if("viewer-spawn"!==c.source)return null;let h=b.canonicalConversationId(c.childConversationId);if((a.memberships[h]??[]).some(a=>b_.has(a.kind)))return null;let i=c.evidence.launchId?a.receipts[c.evidence.launchId]??null:null,k=b.conversation(h),l=k?.generations.at(-1)??null,m=k&&l?(0,ba.sz)(k.engine,l.path):null,n=[...new Set([i?.key,c.childSessionKey,m].filter(a=>!!a).map(ba.pp))].flatMap(b=>a.entries[b]?[a.entries[b]]:[]),o=(0,bE.x)({projectOwnership:k?.projectOwnership??null,cwd:i?.cwd??n[0]?.cwd??null,launchProfileProject:i?.launchProfile.project??l?.launchProfile.project??null}).project;if(!o||(0,ao.canonicalOrchestratorProject)(o)!==d)return null;let p=(0,j.t)(i?.launchProfile.title??l?.launchProfile.title??c.role??"spawned child",120),q=function(a,b,c){if(b.some(a=>b$.has(a.status)))return!0;if(!a||!bZ.has(a.state))return!1;if("starting"!==a.state)return!0;let d=Date.parse(a.createdAt);return Number.isFinite(d)&&c-d<=ap.rK}(i,n,e),r=k?.turn.state??"unknown",s=l?function(a,b){if(!b.some(b=>a===b||a.startsWith(b.endsWith(aE().sep)?b:b+aE().sep)))return null;try{let b=g().statSync(a);return b.isFile()?new Date(b.mtimeMs).toISOString():null}catch{return null}}(l.path,f):null,t=k?.turn.terminalAt??s,u={conversationId:h,title:p,activity:null,lastRecordAt:s,transcript:null===s?"unresolvable":"readable"},v=c.createdAt;return i&&(i.rejection||"failed"===i.state||"conflicted"===i.state)?{input:{...u,transcript:"readable",status:"terminal",outcome:"failed",terminalAt:i.rejection?.rejectedAt??i.createdAt},turn:r,hosted:q,createdAt:v}:k?"terminal"===r?{input:{...u,status:"terminal",outcome:"finished",terminalAt:t},turn:r,hosted:q,createdAt:v}:q?{input:{...u,status:"running",outcome:null,terminalAt:null},turn:r,hosted:q,createdAt:v}:"idle"===r?{input:{...u,status:"terminal",outcome:"finished",terminalAt:t},turn:r,hosted:q,createdAt:v}:"busy"===r?{input:{...u,status:"running",outcome:null,terminalAt:null,activity:{lifecycle:"gone",reason:"host_gone_turn_open",turnState:"busy"}},turn:r,hosted:q,createdAt:v}:{input:{...u,status:"unknown",outcome:null,terminalAt:null},turn:r,hosted:q,createdAt:v}:{input:{...u,status:"unknown",outcome:null,terminalAt:null},turn:r,hosted:q,createdAt:v}}(b.file,(0,ap.MA)(b.file),d,a,k,o):null},q=new Map,s=0,t=(...a)=>{let[b,,c,d]=a,e=d?.length===1?q.get(`${b}/${d[0]}`):null;if(e)return e;if(s+c>60)return l.add("ledger-pending"),null;let f=i.pageSeatChildren(...a);for(let a of(s+=f?.keys.length??0,f?.keys??[]))q.set(`${b}/${a}`,f);return f||(l.add("children-unindexed"),null)},u=0x2000000,v=[],w=a=>{let b=t(a.conversationId,a.after,20);if(!b)return!1;let c=[b],d=a.bootstrap,e=b.after;if(a.after||a.bootstrap||b.complete){if(d&&s<=20){let b=t(a.conversationId,d.after,20);b&&(c.push(b),d=b.complete?void 0:{after:b.after})}}else d={after:b.after},e=b.latest??b.after;let f=[];for(let b of c)for(let c of b.keys){let d=b.file.lineageEdges[c],e=p(b,c);e&&d?.evidence.launchId&&f.push({child:h.child(c,a.conversationId,d.evidence.launchId,e.input),position:"terminal"===e.input.status?"head":"tail"})}return h.discovery({...a,after:b.evidenceGap?a.after:e,bootstrap:d},f),(d||c.some(a=>a.evidenceGap||!a.complete))&&l.add("discovery-incomplete"),!0},x=(a,b,c)=>{let d=a.input,e=a.generationIndex,f=b.file.lineageEdges[a.rowKey];if(!c||!f||f.parentConversationId!==a.owner||f.evidence.launchId!==a.launchId){h.ingest({...a,input:{...a.input,status:"unknown",outcome:null}},null,[]),l.add("child-departed");return}a.input=c.input,"unknown"===a.input.status&&(n.push(a.input),l.add("child-unplaced"));let i=(0,ap.MA)(b.file).conversation(f.childConversationId),j=i?.generations??[],k=j[a.generationIndex%Math.max(1,j.length)],m=b.file.receipts[a.launchId],o=m?.state==="failed"&&null===m.key&&null===m.artifactPath&&0===j.length;if(!k)return void h.ingest(a,null,[],o);let p=h.source(a,i.engine,k.id),q=p.cursor,r=Math.min(u,0x1000000),s=function(a,b,c,d=256){let e;if(!Number.isSafeInteger(c)||c<1||c>0x4000000)throw Error("invalid ledger budget");if(!Number.isSafeInteger(d)||d<1||d>256)throw Error("invalid ledger outcome budget");let f={...b},h=[],i=0,j=0;try{e=g().openSync(a,g().constants.O_RDONLY|g().constants.O_NOFOLLOW);let k=g().fstatSync(e);if(!k.isFile())throw Error("ledger is not a regular file");let l=`${k.dev}:${k.ino}`;(f.identity!==l||k.size<f.offset)&&(f={...aa(),identity:l,initialSize:k.size,gap:b.identity?"ledger-replaced":b.gap}),"ledger-unreadable"===f.gap&&(f.gap=null);let m=Buffer.allocUnsafe(Math.min(262144,Math.max(c,1))),n=[],o=0,p=!1,q=f.offset,r=!1;for(;!r&&q<k.size&&(!(i>=c)||!(j>0)&&(0!==o||p));){let a=g().readSync(e,m,0,m.length,q);if(!a)break;i+=a,q+=a;let b=0;for(;b<a;){let c=m.indexOf(10,b);if(c<0){let c=m.subarray(b,a);p||((o+=c.length)>0x1000000?(p=!0,n=[],o=0):n.push(Buffer.from(c)));break}let e=q-a+c+1;if(p)f.gap="malformed-record",f.resync=!0,p=!1;else{let a=m.subarray(b,c),d=n.length?Buffer.concat([...n,a]):a;d.length>0x1000000?f.gap="malformed-record":function(a,b,c,d){let e;if(b.indexOf(ab)>=0)e=ad(b);else{let a,c,d=(a=b.subarray(Math.max(0,b.length-48)).toString("latin1").trimEnd(),(c=/"seq":(\d{1,15})\}$/.exec(a))?Number(c[1]):null);e=null!==d?{kind:"",seq:d}:ad(b)}if(!e){a.gap="malformed-record",a.resync=!0;return}a.resync?delete a.resync:e.seq!==a.seq+1&&(a.gap="sequence-gap"),a.seq=e.seq,"turn-started"===e.kind?"string"==typeof e.turnId&&e.turnId?a.activeTurn=e.turnId:a.gap="invalid-turn-start":"turn-ended"===e.kind&&("string"==typeof e.turnId&&e.turnId.length>0&&ac.has(String(e.status))?((null===a.activeTurn||a.activeTurn===e.turnId)&&(a.activeTurn=null,a.settledThrough=e.seq),d.push({turnId:e.turnId,status:e.status,seq:e.seq,endOffset:c})):a.gap="invalid-terminal")}(f,d,e,h)}if(n=[],o=0,f.offset=e,j++,b=c+1,h.length>=d){r=!0;break}}}f.atEnd=f.offset===k.size}catch(b){let a="ENOENT"===b.code;f.gap=a?f.identity?"ledger-missing":f.gap:"ledger-unreadable",f.atEnd=!1}finally{void 0!==e&&g().closeSync(e)}return{cursor:f,outcomes:h,bytes:i,records:j}}(aE().join((0,am.BQ)("structured-host-events"),`${encodeURIComponent(k.id)}.jsonl`),p.cursor,r);p.cursor=s.cursor,s.cursor.atEnd&&null===s.cursor.activeTurn&&s.cursor.settledThrough>0&&("idle"===c.turn||"terminal"===c.turn)&&(a.input={...a.input,status:"terminal",outcome:"finished"}),u-=s.bytes,null!==p.cursor.gap&&l.add("ledger-gap"),a.generationIndex=(a.generationIndex+1)%j.length;let t=!s.cursor.atEnd&&(s.bytes>=r||s.outcomes.length>=256);"terminal"===a.input.status&&0===s.bytes&&0===s.outcomes.length&&s.cursor.atEnd&&a.generationIndex===e&&JSON.stringify(q)===JSON.stringify(s.cursor)&&JSON.stringify(d)===JSON.stringify(a.input)?v.push(a):h.ingest(a,p,s.outcomes,!1,t?"head":"tail"),t&&"busy"!==c.turn&&l.add("ledger-pending")};try{let c=h.owner(b.conversationId,b.seatEpoch);if(h.discoverRevokedOwners((0,am.BQ)("orchestrator-seats.json"),b=>(0,ao.canonicalOrchestratorProject)(b)===a)&&l.add("discovery-incomplete"),w(c)){let a=h.page("owner-poll",1)[0];if(s<=20&&a?.kind==="owner-poll"){let b=h.get(a.target);if(!b||"owner"!==b.kind)throw Error("missing owner provenance");let d=b.pollKey?b:h.owner(b.conversationId,b.epoch);d.pollKey!==a.key?h.drop(a):d.key!==c.key&&w(d)}}let f=new Set,g=h.page("running",8);for(let a of g){if("running"!==a.kind)continue;let b=h.get(a.target);if(!b||"child"!==b.kind)throw Error("missing running child");let c=t(b.owner,null,1,[b.rowKey]);if(!c)break;let g=p(c,b.rowKey);if((!g||"running"!==g.input.status||"idle"===g.turn||"terminal"===g.turn)&&(u>0?x(b,c,g):(h.promote(b),l.add("ledger-pending")),!g||"running"!==g.input.status||"running"!==b.input.status))continue;let i=g.input;if("busy"===g.turn&&g.hosted)try{i={...i,activity:bT((await e.liveness({conversationId:i.conversationId,stallAfterMs:d.stallAfterMs,limit:1}))[0])}}catch{i={...i,activity:null}}n.push(i),f.add(b.key)}for(let a of(h.rotateRunning(g.slice(0,4)),h.pollPage(40))){if(u<=0)break;if("poll"!==a.kind)throw Error("invalid poll ticket");let b=h.get(a.target);if(!b||"child"!==b.kind)throw Error("missing child provenance");if((b=h.adoptPoll(b,a.key)).pollKey!==a.key){h.drop(a);continue}if(s>=40&&!q.has(`${b.owner}/${b.rowKey}`))break;let c=t(b.owner,null,1,[b.rowKey]);if(!c)break;let d=p(c,b.rowKey);x(b,c,d),"running"!==b.input.status||f.has(b.key)||(n.push(b.input),f.add(b.key))}for(let a of(h.rotateCold(v),h.ready(20))){let b=h.get(a.child);if(!b||"child"!==b.kind)throw Error("missing ready child");let c=t(b.owner,null,1,[b.rowKey]);if(!c)break;let d=p(c,b.rowKey);if(!d||c.file.lineageEdges[b.rowKey]?.parentConversationId!==b.owner){h.defer(a),l.add("child-departed");continue}let{terminalAt:e,lastRecordAt:f,transcript:g}=d.input;n.push({...a.input,terminalAt:e,lastRecordAt:f,transcript:g,...void 0===b.harvestedEpoch?{}:{harvestedEpoch:b.harvestedEpoch}})}}catch{l.add("registry-unreadable")}return{children:n,unavailable:r.find(a=>l.has(a))??null}}async function b1(a,b,c,d){var e,f,g,h;let i,k,l,n,o,p,q,r,s,t,u=d.now(),v=(0,ao.canonicalOrchestratorProject)(a),w=a$(d.settings(v),u,36e5),x=await bV(v,c,d),y=d.pipelines().filter(a=>bQ(a)&&(0,ao.canonicalOrchestratorProject)(a.project)===v),z=y.map(bR).map(a=>{var b,c;let d;return{kind:"pipeline",id:a.id,title:bF(`${a.task}
|
|
94
|
-
${a.spec??""}`),project:a.project||null,state:"completed"===(b=a.state)||"closed"===b?"terminal":"needs_decision"===b||"paused"===b||"draft"===b?"inert":"active",owner:`pipeline ${a.id}`,updatedAt:0===(d=[...a.activityAt??[],...(c=a.closedAt)?[c]:[]].filter(a=>Number.isFinite(Date.parse(a)))).length?null:d.reduce((a,b)=>Date.parse(b)>Date.parse(a)?b:a),references:bG(`${a.task} ${a.spec??""}`),monitorRef:null}}),A=y.length>0?await bU(v,c,d):new Map,B=y.map((a,b)=>({id:a.id,title:z[b].title,state:z[b].state,updatedAt:z[b].updatedAt,stageActivity:A.get(a.id)??null,stageId:a.cursor?.stageId??null})),C=(e=d.tasks(),f=[...d.pipelines()],e.map(a=>({...a,pipelineIds:f.filter(b=>b.taskIds.includes(a.id)).map(a=>a.id)}))).filter(a=>(0,ao.canonicalOrchestratorProject)(a.project)===v),D=C.map(bS).map(a=>{var b;let c;return{kind:"task",id:a.id,title:bF(a.text),project:a.project||null,state:"done"===(b=a.status)?"terminal":"blocked"===b?"inert":"active",owner:(c=a.pipelineIds?.[0])?`pipeline ${c}`:a.assignments?.find(a=>"delivered"===a.state||"spawning"===a.state||"handoff"===a.state||"linked"===a.state)?"an assigned agent":null,updatedAt:a.updatedAt||null,references:bG(a.text),monitorRef:m(a.text)}}),E=C.map((a,b)=>({id:a.id,title:D[b].title,status:a.status,owned:null!==D[b].owner,updatedAt:a.updatedAt??null})),F=function(a,b,c,d){if(!b)return[];let e=[];for(let f of d.pipelines()){if((0,ao.canonicalOrchestratorProject)(f.project)!==a||f.srcConversationId!==b.conversationId)continue;let d=function(a){if(a.hiddenAt||a.dismissedAt||a.closedAt||"closed"===a.state)return null;let b=a.runs.flatMap(a=>a.attempts);if("completed"===a.state)return"completed";if("needs_decision"===a.state||"needs_decision"===a.pausedState)return 0===b.length?"provisioning-failed":"needs_decision";let c=b.reduce((a,b)=>{let c=Date.parse(b.completedAt??b.startedAt??""),d=a?Date.parse(a.completedAt??a.startedAt??""):-1/0;return Number.isFinite(c)&&c>=d?b:a},null);return c?.state==="failed"?"failed":c?.state==="needs_decision"?"needs_decision":"running"===a.state&&1===b.length?"provisioned":null}(f);d&&!("provisioned"===d&&c.includes(f.id))&&e.push({id:f.id,title:(0,j.t)(f.task.split("\n")[0]??"",120),settled:d,updatedAt:bR(f).activityAt.reduce((a,b)=>!a||Date.parse(b)>Date.parse(a)?b:a,null)??f.createdAt??null,..."provisioning-failed"===d?{detail:(0,j.t)(f.stateDetail??"",160)||null}:{}})}let f=a=>a.updatedAt?Date.parse(a.updatedAt):NaN;return e.sort((a,b)=>(f(b)||0)-(f(a)||0)||a.id.localeCompare(b.id)).slice(0,20)}(v,x,b.announcedLanes??[],d),G=new Set(d.pipelines().filter(bQ).map(a=>a.id)),{events:H,cursor:I}=(g=b.eventsThrough,k=Math.max((i=d.lifecycleJournal()).lastSeq,i.events.at(-1)?.seq??0),null===g?{events:[],cursor:k}:{events:(0,bb.Vj)(i,{project:v,afterSeq:g,limit:200}).events.map(a=>({seq:a.seq,at:a.at,type:a.type,summary:a.summary,pipelineId:a.pipelineId,pipelineTerminal:null!==a.pipelineId&&!G.has(a.pipelineId)})),cursor:g}),{children:J,unavailable:K}=await b0(v,x,b,c,d),L=x?K?U(b.childrenGap,K,new Date(u).toISOString()):null:b.childrenGap,M=b.harvestedChildren,{pullRequests:N,unavailable:O,gap:P}=await bY({project:v,seat:x,wakeDue:R(b.lastWakeAt,u,w.wakeIntervalMs),enabled:w.enabled,now:u,wakeIntervalMs:w.wakeIntervalMs,gap:b.pullRequestGap,sources:d});return{project:v,now:u,seat:x,pipelines:B,tasks:E,events:H,pullRequests:N,pullRequestsUnavailable:O,signals:(l=[],(o="ok"===(n=d.latestDeployment()).state?n.value:null)&&o.terminal&&"succeeded"!==o.phase&&l.push({id:"deploy",label:`the last deployment ended ${o.phase}`}),p=d.retirementReport(),q=p?.refused.filter(a=>a.undetermined).length??0,p&&(p.failed.length>0||q>0)&&l.push({id:"host-retirement",label:`host retirement: ${p.failed.length} failed, ${q} undetermined`}),r=x?.activity,x&&"busy"===x.turn&&r&&("gone"===(h=r).lifecycle||"stalled"===h.lifecycle&&"busy"===h.turnState)&&l.push({id:"seat-host",label:`the seat's own turn is ${r.lifecycle} in ${v} (${r.reason})`}),l),ownLanes:F,children:J,childrenUnavailable:K,changeFingerprint:(s=[...B.map(a=>`p:${a.id}:${a.state}:${a.updatedAt??""}`),...E.map(a=>`t:${a.id}:${a.status}:${a.owned}:${a.updatedAt??""}`),...J.map(a=>`c:${a.conversationId}:${a.outcomeId??""}:${a.status}:${a.terminalAt??""}`),...F.map(a=>`o:${a.id}:${a.settled}:${a.updatedAt??""}`)].sort(),t=N.map(a=>`pr:${a.number}:${a.pipelineId}`).sort(),`${bX(s)}.${O?V:bX(t)}`),state:{...b,eventsThrough:I,pullRequestGap:P,childrenGap:L,harvestedChildren:M,accounting:b.accounting?new al(b.accounting.filename,v).readState().accounting:void 0},policy:c,settings:w}}let b2="seat-tick-wake-unresolved",b3=a=>`${b2}-${e().createHash("sha256").update(a).digest("hex").slice(0,16)}`;function b4(a,b,c){return(0,ax.Pf)(d=>{let e,f=d.tasks.find(c=>(0,ao.canonicalOrchestratorProject)(c.project)===a&&"done"!==c.status&&m(c.text)===b.ref);if("resolved"===b.state){if(!f)return{state:void 0,result:!0};let a=(0,aw.mQ)(d.tasks,f.id,{status:"done"});return a.ok?{state:{tasks:a.tasks,recentCreates:d.recentCreates},result:!0}:{state:void 0,result:!1}}let g=function(a,b,c){var d,e,f,g,h,i,m,n,q,r;if("no-seat"===b.kind)return d=b.detail,(0,j.t)(`Conversation monitor cannot resolve a live orchestrator
|
|
95
|
-
|
|
96
|
-
The monitor resolves the orchestrator through the durable record, never a transcript path. ${d}.
|
|
97
|
-
Until a live orchestrator is adopted, monitor runs report their findings on the board only — nothing is delivered in chat.
|
|
98
|
-
Observed ${c.slice(0,16).replace("T"," ")} UTC.
|
|
99
|
-
|
|
100
|
-
${k} ${l}`,5e3);if("source-unreadable"===b.kind)return b.ref===p("children")?(e=b.detail,f=b.ref,(0,j.t)(`Seat tick cannot fully account for the seat's spawned children
|
|
101
|
-
|
|
102
|
-
${e}.
|
|
103
|
-
Wakes continue on every reason that does not depend on it, and each one names the missing evidence; a finished worker whose outcome is owed, or a stalled one, is what cannot be named while this stands.
|
|
104
|
-
The tick keeps asking on every check and reports nothing further until every child is accounted for — this card is raised once per outage.
|
|
105
|
-
Project ${a}. Observed ${c.slice(0,16).replace("T"," ")} UTC.
|
|
106
|
-
|
|
107
|
-
${k} ${f}`,5e3)):(g=b.detail,h=b.ref,(0,j.t)(`Seat tick cannot read one of its evidence sources
|
|
108
|
-
|
|
109
|
-
${g}.
|
|
110
|
-
Wakes continue on every reason that does not depend on it, and each one names the missing evidence; an unmerged pull request left by a finished lane is what cannot be seen while this stands.
|
|
111
|
-
The tick keeps asking, at this project's wake interval, and reports nothing further until the source answers — this card is raised once per outage.
|
|
112
|
-
Project ${a}. Observed ${c.slice(0,16).replace("T"," ")} UTC.
|
|
113
|
-
|
|
114
|
-
${k} ${h}`,5e3));if("wake-unresolved"===b.kind)return i=b.detail,m=b.ref,(0,j.t)(`Seat tick wake unresolved under its original key
|
|
115
|
-
|
|
116
|
-
${i}.
|
|
117
|
-
Nothing the wake carried is acknowledged: every outcome and lane event it named stays owed until a wake that lands names it.
|
|
118
|
-
Project ${a}. Observed ${c.slice(0,16).replace("T"," ")} UTC.
|
|
119
|
-
|
|
120
|
-
${k} ${m}`,5e3);if("tick-settings"===b.kind){let c,d;return n={project:a,detail:b.detail,reason:b.settings?.reason??null,until:b.settings?.until??null,setBy:b.settings?.setBy??null,updatedAt:b.settings?.updatedAt??null},c=n.setBy?.project&&n.setBy.project!==n.project,d=n.setBy?`Set by ${"manager"===n.setBy.kind?"the designated seat":"gateway"===n.setBy.kind?"the operator's own session":"agent"===n.setBy.kind?"an agent session":"a caller nothing identified"}${n.setBy.conversationId?` (${n.setBy.conversationId})`:""}${c?`, whose own project is ${n.setBy.project}`:""}.`:"Set by nobody the record names.",(0,j.t)(["This project's seat tick is not on its default settings\n",`${n.detail}.`,`Reason given: ${n.reason??"none recorded"}.`,n.until?`It returns to the default at ${n.until.slice(0,16).replace("T"," ")} UTC.`:"It stands until someone changes it back.",d,`Project ${n.project}. Recorded ${n.updatedAt?`${n.updatedAt.slice(0,16).replace("T"," ")} UTC`:"at an unrecorded time"}.`,"Change it with the seat tick settings tool; this card clears itself once the project is back on the defaults.\n",`${k} ${o}`].join("\n"),5e3)}return q=b.detail,r=b.ref,(0,j.t)(`Seat tick stopped re-sending a wake reason
|
|
121
|
-
|
|
122
|
-
${q}.
|
|
123
|
-
Project ${a}. Observed ${c.slice(0,16).replace("T"," ")} UTC.
|
|
124
|
-
The tick resumes this reason on its own once the board or a pipeline moves.
|
|
125
|
-
|
|
126
|
-
${k} ${r}`,5e3)}(a,b,c);if(f){if("open"!==b.state||f.text===g)return{state:void 0,result:!0};let a=(0,aw.mQ)(d.tasks,f.id,{text:g});return a.ok?{state:{tasks:a.tasks,recentCreates:d.recentCreates},result:!0}:{state:void 0,result:!0}}let h=(0,aw.UT)(d.tasks,{project:a,text:g,placement:"unplaced",clientRequestId:(e=b.instance?`${b.ref}:${b.instance}`:b.ref,`monitor-741:${e}`)},d.recentCreates);return h.ok?h.replay?{state:void 0,result:!0}:{state:{tasks:h.tasks,recentCreates:h.recentCreates},result:!0}:{state:void 0,result:!1}},(0,am.BQ)("tasks.json"))}function b5(a){if(!a.ok)return!1;switch(a.outcome){case"held":case"queued":case"delivering":case"pending":return!1;default:return!0}}function b6(a){return a.ok?a.outcome??"delivered":"failed"}function b7(a){return a.ok?null:`the delivery layer would not take the wake: ${(0,j.t)(a.error||"no reason was returned",ca)}`}let b8="the seat tick revoked a wake raised for a seat that has since been replaced";async function b9(a,b){try{let c=await a.wakeState(b);return"string"==typeof c?{observed:c,evidence:null,reason:""}:{observed:c.state,evidence:c.evidence,reason:""}}catch(a){return{observed:"unreadable",evidence:null,reason:(0,j.l)(a instanceof Error?a.message:"unknown error")}}}let ca=200;function cb(a){if(!a)return null;let b=[];if(a.record){let c=a.record,d="delivered"===c.state?"delivered":"in-flight"===c.state?"in flight":"safe"===c.resend?"failed, proven lost":"failed, unverified";b.push(`delivery record: ${d}${c.reason?` — ${(0,j.t)(c.reason,ca)}`:""}`)}else b.push("delivery record: nothing under the key");b.push(a.operationId?`operation ${a.operationId}`:"no operation named");let c=a.journal;return b.push("no-record"===c?"runtime journal holds no record of it":"unreachable"===c?"runtime journal unreachable":"unasked"===c?"runtime journal not asked":`runtime journal: ${c.status}${c.reason?` — ${(0,j.t)(c.reason,ca)}`:""}`),"lost"===a.recorded&&b.push("the delivery record was settled lost on the journal's own verdict"),"delivered"===a.recorded&&b.push("the delivery record was settled delivered on the journal's own verdict"),"refused"===a.recorded&&b.push("the delivery record could not take the journal's verdict and keeps its own answer; the release rests on the journal alone"),b.join("; ")}function cc(a){if("unreadable"===a.observed)return`could not be read${a.reason?` (${a.reason})`:""}`;let b=cb(a.evidence);return`answered "${a.observed}"${b?` (${b})`:""}`}function cd(a,b){let c=cb(b.evidence);return c?`${a}; ${c}`:a}function ce(a,b){let c=["the delivery record or the runtime journal reporting the operation delivered, which credits the plan the wake was raised on","the journal reporting it rejected or failed before actuation, or the record proving it lost, which releases the key and lets the next check raise the wake again","the seat being superseded by a different conversation at a higher epoch, which retires the attempt and lets the successor's own wake go out",`its age bound${b?` at ${b.slice(0,16).replace("T"," ")} UTC`:" — two of this project's wake intervals, and never less than an hour, from when it was prepared"}, which retires it unresolved: it is never re-sent and credits nothing, and the obligations it named are re-derived by the next check, which may wake the seat`];return a?.journal==="no-record"&&a.operationId&&c.push(`the runtime journal holds no record under operation ${a.operationId}, so an operator discard of that operation cannot reach it; supersession and the age bound are the exits left that need no new evidence`),c}function cf(a){return a.supersededBy?"retired to a superseded seat":"retired unresolved on its age bound"}async function cg(a){let b=a.state,c=[...b.retiredWakes];if(!c.length)return b;for(let d of c){let c=d.wake,e=await b9(a.sources,c),f=e.observed,g=null;if("landed"===f)g={verdict:"landed",outcome:"landed",detail:d.supersededBy?"a wake retired to a superseded seat was delivered to it after all; nothing it carried is credited, because the seat that received it no longer holds this project, so every obligation it named is still owed and the successor's own wake carries it":"a wake retired unresolved on its age bound was delivered after all; nothing it carried is credited, because the check that retired it re-derived every obligation it named into a later wake"};else if("dropped"===f)g={verdict:"dropped",outcome:"dropped",detail:`the layer holding a wake ${cf(d)} settled it without delivering it; the obligations it named were never credited and remain owed`};else if("retained"===f){let b;try{b=await a.sources.withdrawWake(c,d.supersededBy?b8:"the seat tick revoked a wake it retired unresolved after its age bound, whose obligations a later wake carries")}catch{b="unknown"}"withdrawn"===b&&(g={verdict:"revoked",outcome:"withdrawn",detail:d.supersededBy?"a wake retired to a superseded seat was taken out of the queue holding it before it could reach that seat":"a wake retired unresolved on its age bound was taken out of the queue holding it, so the wake that replaced it is the only one this seat receives"})}else"absent"!==f||c.operationId||c.dispatch?.state==="active"||(g={verdict:"revoked",outcome:"unsent",detail:`the layer holding a wake ${cf(d)} affirms it holds nothing under its key and no transport call is outstanding: the attempt is released unsent, and it is never re-dispatched because `+(d.supersededBy?"the seat it was prepared for has been replaced":"the check that retired it already re-derived every obligation it named")});if(!g){let b=Date.parse(c.preparedAt??d.retiredAt);if(Number.isFinite(b)&&a.now-b>=a.wakeIntervalMs||"uncertain"===f){let b=`A wake prepared ${(c.preparedAt??d.retiredAt).slice(0,16).replace("T"," ")} UTC for seat epoch ${c.seatEpoch},${d.supersededBy?` which epoch ${d.supersededBy.seatEpoch} has since replaced,`:" retired unresolved on its age bound,"} is still unresolved under its original key; the layer holding it last ${cc(e)}. The attempt is never re-sent and nothing it named is credited, and it no longer holds back this project's wakes. Check the delivery record under its client message id ${c.clientMessageId}`;try{a.ensureCard(a.project,{ref:b3(c.clientMessageId),kind:"wake-unresolved",instance:c.clientMessageId,detail:b},a.at)}catch(a){console.error("[seat tick] card write failed",a instanceof Error?a.name:"unknown")}}continue}if(b.accounting){let d=new al(b.accounting.filename,a.project);if(!d.settleRetired(c.clientMessageId)){b=d.readState();continue}b=d.readState()}else b={...b,retiredWakes:b.retiredWakes.filter(a=>a.wake.clientMessageId!==c.clientMessageId)},a.writeState(a.project,b);a.appendRecord({schemaVersion:1,at:a.at,project:a.project,seatEpoch:c.seatEpoch,verdict:g.verdict,reasons:[],items:0,deferred:0,eventsThrough:b.eventsThrough??0,delivery:{clientMessageId:c.clientMessageId,outcome:g.outcome},detail:cd(g.detail,e)})}return b}async function ch(a){var b,c,d,e,f,g,h,i,k,l,m,n;let o,p,q,r,s=a.state.outstandingWake;if(!s)return a.state;let t=a.state,u=b=>{if(b.accounting){let c=new al(b.accounting.filename,a.project);return c.writeState(b),c.readState()}return a.writeState(a.project,b),b};s.preparedAt||(t=u({...t,outstandingWake:{...s,preparedAt:a.at}}));let v=t.outstandingWake,w=Date.parse(v.preparedAt),x=Number.isFinite(w)&&a.now-w>=a.wakeIntervalMs,y=!a.seat||a.seat.conversationId!==v.conversationId||a.seat.seatEpoch!==v.seatEpoch,z=await b9(a.sources,v),A=z.observed,B=z.reason,C=null,D=null,E=null;if("landed"===A)C={verdict:"landed",outcome:"landed",row:"commit",detail:"a wake the delivery layer had kept reached the seat; the wake stamp and the event cursor move now, on the plan the check that raised it wrote down"};else if("dropped"===A)C={verdict:"dropped",outcome:"dropped",row:"clear",detail:"the layer holding the wake settled it without delivering it, so no stamp moves and the next check may raise it again"};else if(y)if("retained"===A){let b;try{b=await a.sources.withdrawWake(v,b8)}catch(a){b="unknown",B=(0,j.l)(a instanceof Error?a.message:"unknown error")}C="withdrawn"===b?{verdict:"revoked",outcome:"withdrawn",row:"clear",detail:"a wake the delivery layer had accepted but not landed was taken out of its queue before it could reach the replaced seat"}:"too-late"===b?{verdict:"revoked",outcome:"too-late",row:"keep",detail:"the wake raised for the replaced seat could not be taken back: the layer holding it had already let it go, so the replaced seat may have received it; the attempt is kept under its original key until the holder settles it"}:{verdict:"revoked",outcome:"unknown",row:"keep",detail:`the wake raised for the replaced seat could not be revoked: the layer holding it did not answer${B?` (${B})`:""}; it is asked again at the next check`}}else if("uncertain"===A)C={verdict:"uncertain",outcome:"uncertain",row:"keep",detail:"the layer holding the wake raised for the replaced seat ended it without proving arrival; the original key and all obligations remain outstanding, and no wake replaces it"};else if("absent"===A&&!v.operationId&&v.text&&v.dispatch?.state==="refused"&&t.accounting){let b=new al(t.accounting.filename,a.project);if(!b.settleAbsent(v))return b.readState();t=b.readState(),C={verdict:"revoked",outcome:"unsent",row:"clear",detail:"the wake raised for the replaced seat was refused by the delivery layer before it reserved anything, and the record holds nothing under its key and the returned dispatch token was fenced atomically: the attempt is released unsent with nothing it named acknowledged, and the successor's next check raises its own wake"}}else C={verdict:"revoked",outcome:"unknown",row:"keep",detail:`the wake raised for the replaced seat could not be revoked: no holder could account for it${B?` (${B})`:""}; it is asked again at the next check`};else if("uncertain"===A)C={verdict:"uncertain",outcome:"uncertain",row:"keep",detail:"the layer holding the wake ended it without proving arrival; the original key and all obligations remain outstanding, and no wake replaces it"};else if("absent"===A&&!v.operationId&&v.text&&(!v.dispatch||"refused"===v.dispatch.state)&&a.deliver){let b=t.accounting?new al(t.accounting.filename,a.project).readState():t,c=a.sources.seatFor(a.project).active;if(b.outstandingWake?.clientMessageId!==v.clientMessageId)return b;if(!c||c.conversationId!==v.conversationId||c.seatEpoch!==v.seatEpoch)return t;let d=t.accounting?new al(t.accounting.filename,a.project):null;if(!d)return t;let e=d.beginDispatch(v);if(t=d.readState(),!e)return t;v=t.outstandingWake;let f=null;try{f=await a.deliver({pid:null,path:c.path??a.seat?.path??"",conversationId:v.conversationId,clientMessageId:v.clientMessageId,text:v.text,images:[],origin:{kind:"agent",role:"seat-tick"}}),D=b6(f),E=b7(f)}catch(a){D="unreturned",E=`the transport call did not return: ${(0,j.t)(a instanceof Error?a.message:"unknown error",ca)}`}if(f){if(d.returnedDispatch(v.clientMessageId,e,!f.ok&&!f.operationId&&"started"!==f.actuation&&"verify-first"!==f.resend),t=d.readState(),t.outstandingWake?.clientMessageId!==v.clientMessageId)return t;v=t.outstandingWake}f&&b5(f)?C={verdict:"landed",outcome:"landed",row:"commit",detail:"a wake the delivery layer had refused without keeping a record was re-dispatched under its original key and reached the seat; the wake stamp and the event cursor move now, on the plan the check that raised it wrote down"}:f?.operationId&&(v=(t=u({...t,outstandingWake:{...v,operationId:f.operationId}})).outstandingWake)}C?.row==="clear"&&v.dispatch?.state==="active"&&(C={...C,row:"keep",outcome:"unknown",detail:"the delivery record was fenced, but its admitted transport call has not returned; the original attempt remains outstanding until that call is accounted for"});let F=!C||"keep"===C.row,G=F?(o=(c=(b={seat:a.seat,wake:v,observed:A,now:a.now,wakeIntervalMs:a.wakeIntervalMs}).seat,d=b.wake,!c?.conversationId||c.seatEpoch<=d.seatEpoch||c.conversationId===d.conversationId?null:{conversationId:c.conversationId,seatEpoch:c.seatEpoch}))?{reason:"seat-superseded",supersededBy:o}:(e=b.wake,f=b.observed,g=b.now,h=b.wakeIntervalMs,null!==f&&aQ.has(f)||e.dispatch?.state==="active"||aN(e.preparedAt??null,g,h))?null:{reason:"unresolved-age",supersededBy:null}:null,H=!1,I=null;if(G)if(t.accounting){let b=new al(t.accounting.filename,a.project),c=b.retire(v,a.at,G,a.now-aL(a.wakeIntervalMs));H=c.retired,I=c.evicted,t=b.readState()}else t.retiredWakes.length<20&&(t=u({...t,outstandingWake:null,retiredWakes:[...t.retiredWakes,{wake:v,retiredAt:a.at,...G}],releasedWake:{clientMessageId:v.clientMessageId,releasedAt:a.at}}),H=!0);let J=aM(v.preparedAt??null,a.wakeIntervalMs);if(F&&(x||"uncertain"===A)){let b=`A wake prepared ${v.preparedAt.slice(0,16).replace("T"," ")} UTC for ${y?"a seat that has since been replaced":"this seat"} is still unresolved under its original key; the layer holding it last ${cc(z)}${D?`, and a re-dispatch under the same key answered "${D}"${E?` — ${E}`:""}`:""}.`+(H?"seat-superseded"===G.reason?" The attempt is kept under that seat, never re-sent and crediting nothing, and it no longer holds back this project's wakes.":" The attempt is retired unresolved on its age bound, never re-sent and crediting nothing: it no longer holds back this project's wakes, and the next check re-derives everything it named.":" The tick keeps the attempt and dispatches no replacement wake for this project until it lands or the delivery record proves it never actuated."+(i=z.evidence,` What ends it: ${ce(i,J).join("; ")}.`))+` Check the seat's conversation for the wake and the delivery record under its client message id ${v.clientMessageId}`;try{a.ensureCard(a.project,{ref:b3(v.clientMessageId),kind:"wake-unresolved",instance:v.clientMessageId,detail:b},a.at)}catch(a){console.error("[seat tick] card write failed",a instanceof Error?a.name:"unknown")}}if(!C&&!H)return t;let K=C?.row==="commit"?_(t,v.commit,a.now):C?.row==="clear"?{...t,outstandingWake:null,releasedWake:{clientMessageId:v.clientMessageId,releasedAt:a.at}}:t;if(a.appendRecord({schemaVersion:1,at:a.at,project:a.project,seatEpoch:v.seatEpoch,verdict:H?"retired":C.verdict,reasons:[],items:0,deferred:0,eventsThrough:K.eventsThrough??0,delivery:{clientMessageId:v.clientMessageId,outcome:C?.outcome??A},detail:cd(H?(k=C?.detail??null,l=G,m=v,n=I,p="seat-superseded"===l.reason?`the attempt is retired to seat epoch ${m.seatEpoch}, which epoch ${l.supersededBy.seatEpoch} has replaced`:`the attempt is retired unresolved on its age bound: it has been fenced since ${(m.preparedAt??"").slice(0,16).replace("T"," ")} UTC with nothing proving its delivery either way`,q="unresolved-age"===l.reason?"; every obligation it named is still owed and the next check derives its own wake from them":"",r=n?`; the retained-attempt bound was full, so the entry fenced longest ago, under key ${n}, was dropped from the row — it credited nothing and fenced nothing, and its own retirement stands in this journal`:"",`${k?`${k}; `:""}${p}: it keeps its original key, is never re-sent, credits nothing whatever becomes of it, and no longer withholds this project's wakes${q}${r}`):C.detail,z)}),H)return t;if("keep"===C.row)return K;if(t.accounting){let b=new al(t.accounting.filename,a.project);return b.settle(v.clientMessageId,K,"commit"===C.row?"landed":"unsent"),b.readState()}return a.writeState(a.project,K),K}async function ci(a,b={}){let c=void 0===b.policy?A():b.policy;if(!c)return null;let d=b.appendRecord??aG,e=(0,ao.canonicalOrchestratorProject)(a);try{return await cj(e,c,b,d)}catch(b){let a={schemaVersion:1,at:new Date().toISOString(),project:e,seatEpoch:null,verdict:"error",reasons:[],items:0,deferred:0,eventsThrough:0,delivery:null,detail:`the check failed: ${(0,j.l)(b instanceof Error?b.message:"unknown error")}`};return d(a),a}}async function cj(a,b,c,d){var f,g,h,i,m,q,r,s,t,u,v,w,x,y,z;let A,H=c.sources??bP(),I=c.readState??a8,O=c.writeState??a9,S=c.deliver??an.Ku,T=c.ensureCard??b4,U=await ck(a,c),V=H.now(),X=H.seatFor(a).active??null,aa=function(a,b,c){try{return a$(c.settings(a),b,36e5).wakeIntervalMs}catch{return 36e5}}(a,V,H),ab=await cg({project:a,state:a5(I(a),X?.seatEpoch??null),sources:H,appendRecord:d,writeState:O,ensureCard:T,at:new Date(V).toISOString(),now:V,wakeIntervalMs:aa}),ac=await ch({project:a,state:ab,seat:X,sources:H,appendRecord:d,writeState:O,ensureCard:T,deliver:S,at:new Date(V).toISOString(),now:V,wakeIntervalMs:aa}),ad=await b1(a,ac,b,H),ae=new Date(ad.now).toISOString(),af={...ad,state:a5(ad.state,ad.seat?.seatEpoch??null)},ag={...A=function(a){var b,c,d,e;let f,g,h=new Date(a.now).toISOString(),i={...a.state,lastCheckAt:h};if(!a.seat)return{verdict:{kind:"no-seat",detail:"the project has open work and no active orchestrator seat"},state:{...i,seatEpoch:null},cards:[{ref:l,kind:"no-seat",detail:"No active orchestrator seat holds this project, so the tick has nothing to wake"}]};if(G(a.seat))return{verdict:{kind:"skipped",reason:"seat-busy"},state:i,cards:[]};let j={...i,seatEpoch:a.seat.seatEpoch,eventsThrough:function(a,b){let c=b;for(let b of a){if(F(b))break;c=Math.max(c??b.seq,b.seq)}return c}(a.events,i.eventsThrough)},k=function(a){let b={now:new Date(a.now),stallAfterMs:null},c=[];for(let d of a.pipelines){if(!B(d))continue;let a=function(a,b){if("terminal"===a.state)return null;if("inert"===a.state)return`${a.kind} ${a.id} is parked`;if(null===b.stallAfterMs)return null;let c=b.stallAfterMs??1728e5,d=a.updatedAt?Date.parse(a.updatedAt):NaN;return Number.isFinite(d)&&b.now.getTime()-d>c?`${a.kind} ${a.id} is live but shows no movement past the stall threshold`:null}({kind:"pipeline",id:d.id,state:d.state,updatedAt:d.updatedAt},b);if(a){c.push({pipeline:d,reason:a});continue}let e=d.stageActivity;if(e&&("stalled"===e.lifecycle||"gone"===e.lifecycle)){let a=d.stageId?` stage ${d.stageId}`:"";c.push({pipeline:d,reason:`pipeline ${d.id}${a} runs a turn the registry reports ${e.lifecycle} (${e.reason})`})}}return c}(a),m=function(a){let b=[];for(let c of a.children){if(!C(c))continue;let a=c.activity;a&&("stalled"===a.lifecycle||"gone"===a.lifecycle)&&b.push({child:c,reason:`child ${c.conversationId} runs a turn the registry reports ${a.lifecycle} (${a.reason})`})}return b}(a),o=[...k.map(a=>a.pipeline.id),...m.map(a=>E(a.child))],p=Q(a),q=new Map,r=(a,b)=>{let c=q.get(a.conversationId);(!c||K.indexOf(b)<K.indexOf(c))&&q.set(a.conversationId,b)},s=a.children.filter(D).sort((a,b)=>{let c=a=>{let b=a.terminalAt?Date.parse(a.terminalAt):NaN;return Number.isFinite(b)?b:1/0};return c(a)-c(b)||a.conversationId.localeCompare(b.conversationId)}).filter(b=>{let c=N(b,a.seat,b.outcomeId??null,L);return c&&r(b,c),null===c}),t=new Set(a.state.childrenShown??[]),u=(function(a){let b=[],c=new Map;for(let d of a){let a=c.get(d.conversationId);if(!a){b.push(d.conversationId),c.set(d.conversationId,{child:d,outcomeIds:d.outcomeId?[d.outcomeId]:[]});continue}a.child=d,d.outcomeId&&a.outcomeIds.push(d.outcomeId)}return b.map(a=>c.get(a))})(s).filter(b=>{let c=N(b.child,a.seat,b.child.outcomeId??null,t);return c&&r(b.child,c),null===c}),v=m.filter(b=>{let c=N(b.child,a.seat,null,t);return c&&r(b.child,c),null===c}),w=a.children.filter(C).filter(b=>{let c=N(b,a.seat,null,L);return c&&r(b,c),null===c});for(let a of[...u.map(a=>a.child),...v.map(a=>a.child),...w])q.delete(a.conversationId);let x={stale:M(q,"stale"),unreadable:M(q,"unreadable"),unchanged:M(q,"unchanged")},y=k.filter(b=>a.state.stalledSeen.includes(b.pipeline.id)),z=v.filter(b=>a.state.stalledSeen.includes(E(b.child))),A=a.children.filter(a=>"unknown"===a.status).length,H=a.tasks.filter(b=>(function(a,b,c){if("assigned"!==a.status||a.owned)return!1;let d=a.updatedAt?Date.parse(a.updatedAt):NaN;return Number.isFinite(d)&&b-d<c})(b,a.now,a.policy.backlogAfterMs)),I=a.tasks.filter(a=>"assigned"===a.status&&!a.owned).length-H.length,O=a.pipelines.some(B)||a.tasks.some(a=>"inbox"===a.status||"assigned"===a.status)||a.pullRequests.length>0||Q(a).length>0||a.children.some(b=>C(b)&&P(b,a.seat))||a.children.some(b=>D(b)&&P(b,a.seat)),S=(b=a.state.lastWakeAt,R(b,a.now,a.settings.wakeIntervalMs)),T={...j,stalledSeen:o};if(!a.settings.enabled)return{verdict:{kind:"quiet",detail:a.settings.reason?`ticking is off for this project: ${a.settings.reason}`:"ticking is off for this project"},state:$(T,h),cards:[]};let U=a.events.filter(F),V=[];if(S){if(p.length>0){let a=p[0],b=p.length>1?` and ${p.length-1} more`:"";V.push({kind:"own-lane-settled",detail:`a lane you launched is ${a.settled}${b}`})}if(U.length>0){let a=U[0],b=U.length>1?` and ${U.length-1} more`:"";V.push({kind:"lane-event",detail:`${a.type} since the last delivered wake${b}`})}if(u.length>0){let a=u[0],b=u.length>1?` and ${u.length-1} more`:"";V.push({kind:"child-terminal",detail:`a spawned child ${a.child.outcome??"finished"} and its outcome is unharvested${b}`})}if(a.pullRequests.length>0){let b=a.pullRequests[0],c=a.pullRequests.length>1?` and ${a.pullRequests.length-1} more`:"";V.push({kind:"unmerged-pr",detail:`pull request #${b.number}${c} left open by a lane that finished`})}if((y.length>0||z.length>0)&&V.push({kind:"stalled",detail:(y[0]??z[0]).reason}),H.length>0){let a=I>0?`, and ${I} older than the backlog bound the wake no longer names`:"";V.push({kind:"unstarted-task",detail:`${H.length} assigned board task(s) nothing has started${a}`})}let b=a.pipelines.some(B)||w.length>0||a.signals.length>0;O&&b&&0===V.length&&V.push({kind:"interval",detail:"the wake interval elapsed while work is open"})}let X=[],_=[],aa=0;for(let b of V){if(c=a.state,d=b.kind,e=a.changeFingerprint,(W(c.lastWakeFingerprint,e)?0:c.wakesWithoutChange[d]??0)>=a.policy.retryGuard){aa+=1,X.push({ref:n(b.kind),kind:"retry-guard",detail:`Wakes for "${b.kind}" stopped producing any board or pipeline change; the tick has stopped re-sending it until state moves`});continue}_.push(b)}let ab=(f=[],(g=a.pullRequestsUnavailable)&&f.push({source:"pull-requests",gap:g,detail:`the open pull requests of this project's finished lanes could not be read (${g}), so a pull request a finished lane left unmerged cannot be named in this wake`}),a.childrenUnavailable&&f.push({source:"children",gap:a.childrenUnavailable,detail:`the seat's spawned children could not be read (${a.childrenUnavailable}): ${Y(a.childrenUnavailable)}, so a running or finished worker cannot be named in this wake`}),f),ac=Z(a,"pull-requests");ac&&X.push(ac.card);let ad=Z(a,"children");ad&&X.push(ad.card);let ae=ac?.gap??null,af=ad?.gap??null;if(_.length>0){let b=function(a){let{input:b}=a,c=[];for(let a of b.pullRequests)c.push({kind:"pull-request",id:`#${a.number}`,label:`${a.title} — open pull request from ${a.pipelineTitle}, unmerged since that lane finished`});let d=new Set(b.pullRequests.map(a=>a.pipelineId));for(let b of a.ownLanes)d.has(b.id)||c.push({kind:"provisioned"===b.settled?"provisioning":"pipeline",id:b.id,label:function(a){if("provisioned"===a.settled)return`${a.title} — lane you launched: provisioned, first stage running`;if("provisioning-failed"===a.settled)return`${a.title} — lane you launched: provisioning failed, it never ran a stage: ${a.detail||"no reason recorded"}`;let b="completed"===a.settled?"completed, and nobody has closed it out":"failed"===a.settled?"a stage failed":"parked on a decision";return`${a.title} — lane you launched: ${b}`}(b)});for(let b of a.laneEvents)c.push({kind:"event",id:b.pipelineId??b.type,label:`${b.type}: ${b.summary}`});for(let b of a.harvest)c.push({kind:"child",id:b.child.conversationId,outcomeId:b.child.outcomeId,outcomeIds:b.outcomeIds,stateTokens:[J(b.child,b.child.outcomeId??null),J(b.child,null)],label:`${b.child.title} — spawned child ${b.child.outcome??"finished"}, outcome unharvested`});let e=new Set(a.ownLanes.map(a=>a.id));for(let b of a.stalled)e.has(b.pipeline.id)||c.push({kind:"pipeline",id:b.pipeline.id,label:`${b.pipeline.title} — ${b.reason}`});for(let b of a.stalledChildren)c.some(a=>"child"===a.kind&&a.id===b.child.conversationId)||c.push({kind:"child",id:b.child.conversationId,stateTokens:[J(b.child,null)],label:`${b.child.title} — ${b.reason}`});for(let b of a.unstarted)c.push({kind:"task",id:b.id,label:`${b.title} — assigned, nothing started it`});for(let a of b.pipelines)B(a)&&(c.some(b=>b.id===a.id)||c.push({kind:"pipeline",id:a.id,label:`${a.title} — open`}));for(let b of a.runningChildren)c.some(a=>a.id===b.conversationId)||c.push({kind:"child",id:b.outcomeId??b.conversationId,label:`${b.title} — spawned child running`});for(let a of b.signals)c.push({kind:"signal",id:a.id,label:a.label});return c}({input:a,ownLanes:p,stalled:y,stalledChildren:z,harvest:u,runningChildren:w,laneEvents:U,unstarted:H});return{verdict:{kind:"wake",reasons:_,items:b.slice(0,a.policy.itemsPerWake),deferred:Math.max(0,b.length-a.policy.itemsPerWake),skippedChildren:x,gaps:ab},state:T,cards:X,reportedSourceGap:ae,reportedChildrenGap:af}}if(ab.length>0){let a=ab[0],b="children"===a.source?"the seat's spawned children":"the open pull requests of this project's finished lanes",c="children"===a.source?`: ${Y(a.gap)}`:"";return{verdict:{kind:"error",detail:`${b} could not be read (${a.gap})${c}, so nothing owed is not established`},state:T,cards:X,reportedSourceGap:ae,reportedChildrenGap:af}}if(aa>0)return{verdict:{kind:"quiet",detail:"every wake reason is held by the retry guard"},state:$(T,h),cards:X};let ag=A>0?`; ${A} spawned child(ren) in an unknown state`:"";if(!O){let b={...$(T,h),idleSince:a.state.idleSince??h};return S&&R(a.state.lastProposalAt,a.now,a.policy.proposalIntervalMs)?{verdict:{kind:"proactive",detail:`no open lane, no unblocked task, and the proposal slot is due${ag}`},state:b,cards:[]}:{verdict:{kind:"quiet",detail:`the board is done and the proposal slot is not due${ag}`},state:b,cards:[]}}return{verdict:{kind:"quiet",detail:`nothing owed${ag}`},state:{...$(T,h),idleSince:null},cards:[]}}(af),cards:[...A.cards,...function(a){var b;let c=a.settings;if(!c.configured)return[];let d={reason:c.reason,until:c.until,setBy:c.setBy,updatedAt:c.updatedAt};return[{ref:o,kind:"tick-settings",state:c.isDefault?"resolved":"open",settings:d,detail:(b=c).isDefault?b.lapsed?"the recorded tick setting reached its expiry, so this project is back on the default wake interval":"this project is on the default tick settings":b.enabled?`wakes for this project are set to one every ${Math.round(b.wakeIntervalMs/6e4)} minute(s)`:"ticking is off for this project: no wake will be sent until it is turned back on"}]}(af)]};if(af.settings.lapsed)try{let a;(c.writeSettings??aZ)(af.project,(f=af.project,g=af.settings,a=aV(f),g.monitorPrompt?{...a,monitorPrompt:g.monitorPrompt,updatedAt:g.updatedAt,setBy:g.setBy}:a))}catch(a){console.error("[seat tick] lapsed settings could not be persisted",a instanceof Error?a.name:"unknown")}let ah=ag.state;for(let a of ag.cards){let b=!1;try{b=T(af.project,a,ae)}catch(a){console.error("[seat tick] card write failed",a instanceof Error?a.name:"unknown")}b&&"source-unreadable"===a.kind&&(a.ref===p("pull-requests")&&ag.reportedSourceGap&&(ah={...ah,pullRequestGap:ag.reportedSourceGap}),a.ref===p("children")&&ag.reportedChildrenGap&&(ah={...ah,childrenGap:ag.reportedChildrenGap}))}let ai=null,aj=null,ak=null,am=ag.verdict,ao=af.children.filter(a=>"terminal"===a.status).map(a=>a.outcomeId??a.conversationId);if(("wake"===am.kind||"proactive"===am.kind)&&af.seat){let a,f,g,l,n=(h=af.project,i=af.seat.seatEpoch,m={fingerprint:af.changeFingerprint,lastWakeAt:af.state.lastWakeAt,releasedWake:af.state.releasedWake??null,monitorPrompt:af.settings.monitorPrompt},a="wake"===am.kind?am.reasons.map(a=>a.kind).sort().join(","):"proposal",function(a,b,c){if((0,av.sS)(a))return a;let d=`:${c}:digest-${e().createHash("sha256").update(a).digest("hex").slice(0,32)}`,f=`seat-tick:${b}`;return`${f.slice(0,Math.max(0,av.b9-d.length))}${d}`}(`seat-tick:${h}:${i}:${m.lastWakeAt??"first"}:${a}:${m.fingerprint}`+((v=m.monitorPrompt)?`:prompt-${e().createHash("sha256").update(v).digest("hex").slice(0,16)}`:"")+((w=m.releasedWake??null)?`:after-${e().createHash("sha256").update(w.clientMessageId).digest("hex").slice(0,16)}`:""),h,i)),o="wake"===am.kind?(q={project:af.project,reasons:am.reasons,items:am.items,deferred:am.deferred,skippedChildren:am.skippedChildren,signals:af.signals,gaps:am.gaps,monitorPrompt:af.settings.monitorPrompt},f=[`Seat tick — ${q.project}.`,"","Why you were woken:",...q.reasons.map(a=>`- ${a.kind}: ${a.detail}`)],q.gaps&&q.gaps.length>0&&f.push("","Evidence unavailable:",...q.gaps.map(a=>`- ${a.source}: ${a.detail}.`)),f.push("","Items:",...q.items.map(aJ)),q.deferred>0&&f.push(`(${q.deferred} more item(s) held back for the next wake.)`),q.skippedChildren&&q.skippedChildren.stale>0&&f.push(`(${q.skippedChildren.stale} spawned child(ren) not listed: their last activity predates this seat's designation, or an earlier seat epoch already harvested them.)`),q.skippedChildren&&q.skippedChildren.unreadable>0&&f.push(`(${q.skippedChildren.unreadable} spawned child(ren) not listed: the Viewer cannot resolve their transcript, so no seat can read them.)`),q.skippedChildren&&q.skippedChildren.unchanged>0&&f.push(`(${q.skippedChildren.unchanged} spawned child(ren) not listed: nothing has changed about them since the wake that showed them.)`),q.signals.length>0&&f.push("","Signals:",...q.signals.map(a=>`- ${a.label}`)),aH(f,[...aK(q.monitorPrompt),"","Contract:",...aI.map(a=>`- ${a}`)])):(r={project:af.project,issues:await (c.proposalIssues??cl)(af.project,H),signals:af.signals,items:b.itemsPerWake,slot:String(Math.floor(af.now/b.proposalIntervalMs)),monitorPrompt:af.settings.monitorPrompt},g=[`Seat tick — ${r.project}. No lane is open and no board task is waiting, and the proposal slot is due.`,"","Open issues:",...r.issues.length>0?r.issues.map(a=>`- #${a.number} ${a.title}${a.labels.length>0?` [${a.labels.join(", ")}]`:""}`):["- (none readable; rank from the board and the signals below)"]],r.signals.length>0&&g.push("","Signals:",...r.signals.map(a=>`- ${a.label}`)),aH(g,["",`Produce ONE ranked list of at most ${r.items} actions, each with the evidence behind it, and post it as a single board card in inbox for this project.`,"Rank by what actually matters now: what is blocking, what is cheap and finishes something, what has been waiting longest.",`Put this exact line at the foot of the card so the next tick recognizes it: ${k} ${(l=r.slot,`seat-tick-proposal-${l}`)}`,"Open no GitHub issue and start no pipeline from this — the operator moves a card to assigned when they want it, and the next tick starts it.",...aK(r.monitorPrompt),"","Contract:",...aI.map(a=>`- ${a}`)])),p=H.seatFor(af.project).active,A=!p||p.seatEpoch!==af.seat.seatEpoch||p.conversationId!==af.seat.conversationId,B=aP(ah,{conversationId:af.seat.conversationId},af.now,af.settings.wakeIntervalMs),C=null!==B,D=function(a,b){let{fingerprint:c,eventsThrough:d}=b;if("proactive"===a.kind)return{proposal:!0,reasons:[],fingerprint:c,eventsThrough:d,children:[],announcedLanes:[],shownChildren:[]};if("wake"!==a.kind)return null;let e=new Set(b.terminalChildren??[]),f=[...new Set(a.items.flatMap(a=>a.stateTokens??[]))],g=a.items.filter(a=>"child"===a.kind).flatMap(a=>a.outcomeIds?.length?a.outcomeIds:[a.outcomeId??a.id]).filter(a=>e.has(a)),h=a.items.filter(a=>"provisioning"===a.kind).map(a=>a.id);return{proposal:!1,reasons:a.reasons.map(a=>a.kind),fingerprint:c,eventsThrough:d,children:g,announcedLanes:h,shownChildren:f}}(am,{fingerprint:af.changeFingerprint,eventsThrough:af.events.at(-1)?.seq??ah.eventsThrough??0,terminalChildren:ao});if(A)ai={clientMessageId:n,outcome:"seat-rotated"};else if(C)ai={clientMessageId:n,outcome:"deferred-outstanding"},aj=aS(B);else if(D){let a={clientMessageId:n,conversationId:af.seat.conversationId,seatEpoch:af.seat.seatEpoch,operationId:null,commit:D,text:o,preparedAt:ae},b=ah.accounting?new al(ah.accounting.filename,af.project):null;if(b?b.prepare(ah,a):!ah.outstandingWake){ah=b?b.readState():{...ah,outstandingWake:a},b||O(af.project,ah);let c=H.seatFor(af.project).active;if(c&&c.seatEpoch===a.seatEpoch&&c.conversationId===a.conversationId){let e=b?.beginDispatch(a);b&&(ah=b.readState());let f=null;try{if(b&&!e)throw Error("wake dispatch already claimed");f=await S({pid:null,path:c.path??af.seat.path??"",conversationId:c.conversationId,clientMessageId:n,text:o,images:[],origin:{kind:"agent",role:"seat-tick"}}),ai={clientMessageId:n,outcome:b6(f)},ak=b7(f)}catch(a){ai={clientMessageId:n,outcome:"unreturned"},ak=`the transport call for the wake did not return: ${(0,j.t)(a instanceof Error?a.message:"unknown error",ca)}`}if(b&&e&&f&&(b.returnedDispatch(n,e,!f.ok&&!f.operationId&&"started"!==f.actuation&&"verify-first"!==f.resend),ah=b.readState()),f&&b5(f)){let a=_(ah,D,af.now);b?(b.settle(n,a,"landed"),ah=b.readState()):ah=a}else f?.operationId&&ah.outstandingWake&&(ah={...ah,outstandingWake:{...ah.outstandingWake,operationId:f.operationId}},b?(b.writeState(ah),ah=b.readState()):O(af.project,ah)),ah=await ch({project:af.project,state:ah,seat:H.seatFor(af.project).active??null,sources:H,appendRecord:d,writeState:O,ensureCard:T,at:ae,now:af.now,wakeIntervalMs:af.settings.wakeIntervalMs})}else ai={clientMessageId:n,outcome:"seat-rotated"},b?(b.cancelUndispatched(a),ah=b.readState()):ah={...ah,outstandingWake:null}}else{let a,c=b?b.readState():ah;c.accounting?.revision!==ah.accounting?.revision&&(ah=c),ai={clientMessageId:n,outcome:c.accounting?.gap?"accounting-blocked":"deferred-outstanding"};let d=c.accounting?.gap?null:(s={conversationId:af.seat.conversationId},aP(c,s,t=af.now,u=af.settings.wakeIntervalMs)??(c.outstandingWake?(x=c.outstandingWake,y=t,z=u,a=x.preparedAt??null,aO("outstanding",x,a,z,!aN(a,y,z))):null));d&&(aj=aS(d))}}}O(af.project,ah);let ap={schemaVersion:1,at:ae,project:af.project,seatEpoch:af.seat?.seatEpoch??null,verdict:am.kind,reasons:"wake"===am.kind?am.reasons.map(a=>a.kind):[],items:"wake"===am.kind?am.items.length:0,deferred:"wake"===am.kind?am.deferred:0,eventsThrough:ah.eventsThrough??0,delivery:ai,detail:[U,"skipped"===am.kind?"the seat's turn is progressing; the tick is dropped, never queued":"wake"===am.kind?[...am.reasons.map(a=>a.detail),...am.gaps.map(a=>a.detail)].join("; "):am.detail,aj,ak].filter(a=>!!a).join("; ")||null};return d(ap),ap}async function ck(a,b){try{let d=b.reconcileSeat??(async a=>{let{reconcileActiveOrchestratorSeat:b}=await c.e(1585).then(c.bind(c,1585));return b(a)}),e=await d(a);if(!e)return null;let f=e.restored;return`the seat this check opened on was stillborn and has been rolled back: ${(0,j.l)(e.terminalized.seat.intent.error??"no reason was recorded")}; ${f?.conversationId?`the project is designated on ${f.conversationId} again at epoch ${f.seatEpoch}`:"the project is left undesignated, which is what create_orchestrator answers"}`}catch(a){return console.error("[seat tick] the active seat could not be reconciled",a instanceof Error?a.name:"unknown"),null}}async function cl(a,b){let c=bW(a,b);return c?aC({cwd:c}):[]}async function cm(){try{let{viewerReleaseOwnsTraffic:a}=await Promise.resolve().then(c.bind(c,94972));return a()}catch(a){return console.error("[seat tick] traffic authority is unreadable",a instanceof Error?a.name:"unknown"),!0}}function cn(a=at,b=a=>console.error(a)){try{let c=a();c.length>0&&b(`[seat tick] recorded ${c.length} project identity succession(s) for seated projects`);let d=function(a=aU()){return aY(a).projects}();for(let[a,b]of Object.entries(d)){let c=(0,ao.canonicalOrchestratorProject)(a);c===a||d[c]||aZ(c,{...b,project:c})}let e=function(a=a_()){for(let b of Object.keys(function(a){try{let b=JSON.parse(g().readFileSync(a,"utf8"));if(!b||"object"!=typeof b||Array.isArray(b))return{version:2,projects:{}};let c=!("number"==typeof b.version&&b.version>=2),d=b.projects??{};return{version:2,projects:Object.fromEntries(Object.entries(d).map(([a,b])=>[a,a4(b,c)]))}}catch{return{version:2,projects:{}}}}(a).projects))a7(b,a);let b=a6(a);return Object.fromEntries(new al(b,"").collection.snapshot().flatMap(a=>"project"===a.kind?[[a.project,{...a.state,accounting:{filename:b,revision:a.revision,gap:a.gap}}]]:[]))}();for(let[a,b]of Object.entries(e)){let c=(0,ao.canonicalOrchestratorProject)(a);c===a||e[c]||a9(c,{...b,accounting:void 0})}}catch(a){b(`[seat tick] project identity succession failed: ${a instanceof Error?a.name:"unknown"}`)}}async function co(a={}){let b=a.sources??bP(),c=a.appendRecord??aG;if(!await (a.ownsTraffic??cm)()){let a="this release no longer owns viewer traffic, so the seats belong to the promoted one";console.error(`[seat tick] refused: ${a}`);try{c({schemaVersion:1,at:new Date().toISOString(),project:"",seatEpoch:null,verdict:"refused",reasons:[],items:0,deferred:0,eventsThrough:0,delivery:null,detail:`the seat tick sweep was refused and this process's clock stopped: ${a}`})}catch{}return cr(),[]}cn(a.recordSuccessions);let d=[];for(let c of function(a){let b=new Set(a.activeSeats().map(ao.canonicalOrchestratorProject));for(let c of a.pipelines())bQ(c)&&c.project&&b.add((0,ao.canonicalOrchestratorProject)(c.project));for(let c of a.tasks())("inbox"===c.status||"assigned"===c.status)&&c.project&&b.add((0,ao.canonicalOrchestratorProject)(c.project));return[...b].sort()}(b))try{let e=await ci(c,{...a,sources:b});e&&d.push(e)}catch(a){console.error("[seat tick] check could not be journaled",a instanceof Error?a.name:"unknown")}return d}let cp=globalThis;function cq(a={}){let b=a.log??(a=>console.error(a));if(cp.__llvSeatTickTimer){let c="this process already holds the seat tick — exactly one ticker per seat";b(`[seat tick] refused: ${c}`);try{(a.appendRecord??aG)({schemaVersion:1,at:new Date().toISOString(),project:"",seatEpoch:null,verdict:"refused",reasons:[],items:0,deferred:0,eventsThrough:0,delivery:null,detail:`a second seat tick start was refused: ${c}`})}catch{}return!1}cn(a.recordSuccessions,b);let c=void 0===a.policy?A():a.policy;if(!c)return b("[seat tick] not started: LLV_SEAT_TICK_CHECK_MINUTES=0 turns the tick off"),!1;let d=a.scheduleInterval??((a,b)=>setInterval(a,b)),e=a.sweep??(()=>co()),f=d(()=>{cp.__llvSeatTickRunning||(cp.__llvSeatTickRunning=!0,Promise.resolve(e()).catch(a=>console.error("[seat tick] sweep failed",a instanceof Error?a.name:"unknown")).finally(()=>{cp.__llvSeatTickRunning=!1}))},c.checkIntervalMs);return f.unref?.(),cp.__llvSeatTickTimer=f,!0}function cr(){let a=cp.__llvSeatTickTimer;a&&clearInterval(a),cp.__llvSeatTickTimer=void 0,cp.__llvSeatTickRunning=!1}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:96,errorRate:1e-4,numBits:1841,numHashes:14,bitArray:[1,1,0,1,1,1,0,1,1,0,0,0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,1,0,1,1,0,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,0,1,1,0,1,0,0,1,1,0,0,1,1,1,1,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,1,1,1,1,1,0,0,0,1,1,0,1,1,0,1,1,0,0,1,1,1,1,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,1,0,1,0,0,1,1,0,0,0,1,1,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,1,0,0,0,1,1,0,1,0,1,1,0,0,1,1,0,1,0,1,0,0,0,1,0,1,1,1,0,1,0,0,0,1,1,0,0,1,0,0,1,1,0,1,1,0,0,1,1,1,0,1,1,1,0,0,1,0,0,1,0,0,0,1,0,1,1,0,1,0,1,1,0,1,0,0,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,0,1,0,0,1,0,1,1,1,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,1,1,0,0,1,1,1,1,1,0,1,0,0,1,1,0,0,1,1,0,0,0,1,0,0,0,0,1,1,1,1,0,0,1,0,0,0,0,1,1,0,0,1,1,1,0,1,0,0,0,0,1,0,0,0,1,1,1,1,0,1,0,1,0,1,0,1,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,1,0,0,1,1,1,1,0,0,1,0,1,0,1,0,0,0,0,1,1,1,1,1,1,0,1,1,1,0,1,1,0,0,1,0,0,1,0,1,1,1,0,0,0,1,1,0,0,1,0,1,1,1,0,1,1,0,1,1,1,1,1,0,1,0,1,0,1,1,0,1,1,1,0,1,1,0,1,1,0,1,0,1,1,1,0,1,0,0,0,0,1,1,0,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,1,0,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,1,0,0,0,1,0,1,1,0,0,1,1,1,1,1,1,0,1,0,0,1,0,0,1,1,1,1,0,0,0,1,1,1,0,1,0,0,0,0,0,0,1,1,1,1,0,0,1,1,1,1,0,1,1,1,1,0,1,0,1,1,1,1,0,0,1,1,0,1,0,0,0,1,1,1,1,1,1,1,0,1,1,0,0,0,0,1,0,0,1,1,1,0,0,1,0,1,0,1,1,1,0,1,1,0,0,1,1,0,0,1,1,1,0,1,0,0,0,0,1,1,1,1,0,1,1,1,0,0,0,1,1,1,0,1,0,0,1,1,1,1,0,0,0,0,1,0,0,0,0,0,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,1,1,1,0,0,0,1,1,1,1,0,1,0,0,1,0,0,0,0,1,0,0,1,1,1,1,0,0,0,1,1,1,0,1,1,0,1,1,0,1,1,1,1,0,0,1,0,1,0,1,1,0,0,0,1,1,1,0,1,0,0,0,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,1,1,0,0,1,1,0,1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,0,0,1,0,1,0,1,1,0,1,1,1,0,1,1,1,0,1,1,0,1,0,1,1,0,1,0,0,1,0,0,1,1,0,1,0,1,0,1,0,1,1,0,0,0,0,1,0,1,0,0,1,0,0,0,0,1,1,1,0,1,1,1,1,0,1,0,0,0,0,1,0,0,1,1,0,0,0,1,1,1,1,0,0,1,1,0,1,1,0,1,0,1,0,1,1,1,1,0,1,0,0,1,0,1,1,1,0,0,0,1,0,0,0,1,0,0,1,1,1,0,0,1,0,0,0,0,1,1,0,0,1,1,0,1,0,1,0,0,0,1,0,1,1,0,0,1,1,0,0,1,0,0,1,1,0,1,1,1,0,0,1,1,1,0,0,1,0,1,1,0,1,0,1,1,1,0,1,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,0,1,0,0,1,0,0,1,0,1,1,0,1,0,0,1,1,1,1,0,0,0,0,1,1,0,1,1,0,1,0,1,1,1,0,0,1,1,0,1,0,0,1,1,1,1,0,1,1,0,0,1,1,0,0,1,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,1,1,1,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,0,0,1,1,0,1,1,1,1,0,0,1,0,0,0,1,1,0,0,1,0,1,1,0,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,0,0,1,1,0,1,1,0,1,1,1,1,0,0,1,1,1,1,1,0,0,0,0,1,1,1,0,1,1,0,0,0,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,0,1,1,0,1,0,1,1,1,1,1,0,1,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,1,1,0,1,0,0,1,1,0,1,1,1,1,0,0,1,0,1,1,0,0,1,1,1,1,1,0,1,0,0,1,0,0,1,0,1,0,1,1,0,0,1,1,0,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,1,0,0,0,1,1,0,0,1,0,1,1,0,1,1,1,0,1,0,1,1,0,0,0,1,1,1,1,0,1,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,0,0,0,1,1,0,0,1,1,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,0,1,1,1,0,0,1,0,0,0,1,1,1,0,1,1,0,0,0,0,0,1,0,0,1,1,0,1,0,1,1,1,1,1,1,0,1,1,0,1,1,0,1,0,0,1,0,0,0,1,0,0,0,0,1,0,0,1,0,1,1,0,0,1,0,0,1,1,1,1,1,0,0,0,1,1,0,1,1,1,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,1,1,0,0,0,1,1,1,0,1,0,0,0,1,1,1,1,0,1,1,0,0,0,1,0,0,0,0,1,0,1,0,1,1,1,1,0,0,1,1,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,1,0,1,1,0,1,0,1,0,1,0,0,1,1,0,1,1,0,0,1,1,1,0,1,1,0,1,1,0,1,1,0,0,0,0,1,0,1,1,0,1,1,1,1,0,0,0,1,1,0,0,0,0,1,0,1,0,1,0,1,1,0,1,1,0,0,0,1,1,1,1,0,0,1,0,0,1,0,0,1,0,1,1,0,1,0,0,0,1,1,1,0,0,0,1,0,0,0,0,1,0,1,1,0,0,0,0,0,1,0,0,1,1,0,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,0,1,1,0,0,1,1,1,0,1,1,0,0,0,1,1,1,0,0,0,1,1,0,1,0,1,1,0,1,1,1,0,0,0,0,0,0,1,1,1,1,0,1,1,0,0,1,0,1,0,1,0,1,0,1,0,0,1,1,0,0,0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0,0,0,0,1,1,0,0,1,0,1,0,1]},__routerFilterDynamic:{numItems:11,errorRate:1e-4,numBits:211,numHashes:14,bitArray:[0,1,0,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,0,0,1,0,0,1,0,1,0,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,1,0,0,1,1,0,0,0,0,1,1,1,1,1,0,0,1,0,1,1,1,1,1,0,1,0,0,1,0,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,0,1,1,1,0,0,1,0,1,1,1,0,1,1,0,0,1,1,1,0,1,0,1,1,0,0,0,1,0,1,1,0,1,1,0,1,1,0,1,1,1,0,0,1,1,0,1,1,0,1,1,1,0,1,0,0,0,1,0,1,1,1,1,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,0,1,1,0,1,1,1,1,0,0,1,0,0,0,1,1,0,1,1,0,1,1,0,1,0,0,0,0,0,0,1,1,0,0,1,0,1,1,0,0,0,1,0]},sortedPages:["/_app"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|