@overdeck/desktop 0.45.24 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/drizzle/overdeck/0000_overdeck_init.sql +36 -1
- package/package.json +1 -1
- package/server/{acceptance-criteria-DDCnXF58.js → acceptance-criteria-10Ur5Dne.js} +2 -2
- package/server/activity-logger-CMthG6Vd.js +3 -0
- package/server/{activity-logger-DDlOIAML.js → activity-logger-CyteR4JO.js} +24 -13
- package/server/{advancing-selfheal-BVwW4qRn.js → advancing-selfheal-BNwqxseD.js} +6 -6
- package/server/{agent-gc-CHcnvonI.js → agent-gc-C3h9Or3a.js} +5 -5
- package/server/agent-state-CYXJVG72.js +3 -0
- package/server/agent-state-service-C63p_ftq.js +2 -0
- package/server/{agent-state-service-BsgWxZuB.js → agent-state-service-Ds6OeFvo.js} +15 -9
- package/server/{agents-EbI0zCJl.js → agents-J5mEnekq.js} +23 -16
- package/server/agents-ePFVoZbu.js +3 -0
- package/server/archive-planning-B2XplFzT.js +2 -0
- package/server/{archive-planning-Du25Jtst.js → archive-planning-BwhxeP7C.js} +22 -26
- package/server/{artifact-index-jobs-CbEDfCDu.js → artifact-index-jobs-D1q_vR3V.js} +2 -2
- package/server/{assemble-J2ZZ2C15.js → assemble-Bgwqv-Ro.js} +2 -2
- package/server/auto-spawn-consent-CQ9Bi9q6.js +1141 -0
- package/server/{backlog-auto-trigger-2R2jog7n.js → backlog-auto-trigger-n1lzPgN4.js} +3 -3
- package/server/{behavior-B3exJ42O.js → behavior-td6-xhQk.js} +2 -2
- package/server/boot-reconciled-stop-events-C7gGe3oB.js +44 -0
- package/server/bridge-pool-patrol-CYH2OLb5.js +136 -0
- package/server/{briefing-freshness-D1wzUIWv.js → briefing-freshness-DRqZ8lAz.js} +2 -2
- package/server/{build-info-Ie_D0_BT.js → build-info-7yiEpl6u.js} +5 -3
- package/server/{build-info-CZk_TITh.js → build-info-CpG__c63.js} +1 -1
- package/server/{checkpoint-manager-DwbQoqrC.js → checkpoint-manager-CkKmB0wZ.js} +1 -1
- package/server/{checkpoint-manager-BI1Wxoku.js → checkpoint-manager-DBcyNR8w.js} +2 -2
- package/server/checkpoint-worker.js +1 -1
- package/server/{checkpoints-CQB1h765.js → checkpoints-D95apurL.js} +2 -2
- package/server/{checkpoints-BJIs5QIA.js → checkpoints-Wm963lm8.js} +1 -1
- package/server/{claude-hooks-provision-8Ngo8TpT.js → claude-hooks-provision-4RPxNkE8.js} +1 -1
- package/server/{claude-hooks-provision-D8GXF3_s.js → claude-hooks-provision-Bjitl9aI.js} +13 -2
- package/server/{claude-permissions-DNWEVV6z.js → claude-permissions-CpbpvUQ2.js} +2 -2
- package/server/{claude-settings-overlay-DWy-Bb4Y.js → claude-settings-overlay-BzkHYDwR.js} +1 -1
- package/server/{claude-settings-overlay-CEdaqpWI.js → claude-settings-overlay-_H9Yrzab.js} +2 -2
- package/server/cli-CjOCSnfj.js +3 -0
- package/server/{cli-RoOx5DUf.js → cli-Cte9ZFGn.js} +9 -9
- package/server/{cliproxy-C8a1vtTU.js → cliproxy-C5fMJ7rY.js} +2 -2
- package/server/{cliproxy-fHfIeiGd.js → cliproxy-DaAbWMjC.js} +1 -1
- package/server/{close-issue-DoOifFIK.js → close-issue-BPh1ARCF.js} +5 -5
- package/server/{closed-issue-reaper-CktPXo8m.js → closed-issue-reaper-DHRfRMrp.js} +1 -1
- package/server/{closed-issue-reaper-Bk3SU4RC.js → closed-issue-reaper-DoOZqGFK.js} +88 -17
- package/server/{codex-BZXGhUVB.js → codex-BzGDW_d3.js} +36 -7
- package/server/{codex-GcHuUF-k.js → codex-o8FJwzmy.js} +1 -1
- package/server/{codex-parser-CFZ1_1Jl.js → codex-parser-Dt-ycU8L.js} +2 -2
- package/server/compaction-continuation-CvXpbZ4w.js +200 -0
- package/server/{config-CKxYiCmX.js → config-Bi3u1VK7.js} +4 -3
- package/server/{config-BZ0sHTju.js → config-BvLe652W.js} +2 -2
- package/server/{config-DzV30TOm.js → config-CL3Gyvja.js} +1 -1
- package/server/{config-yaml-DySPNmKN.js → config-yaml-CxdwhAIA.js} +276 -14
- package/server/conflict-gate-CX80JYYS.js +3 -0
- package/server/{conflict-gate-BaCVrH-N.js → conflict-gate-E4nt7ZeS.js} +60 -14
- package/server/{context-layers-igZ4FI4_.js → context-layers-C_IIysnm.js} +3 -3
- package/server/{context-layers-BrPmE__h.js → context-layers-DAG83UZt.js} +2 -2
- package/server/{control-settings-BQp7_4uD.js → control-settings-CiqGxXnc.js} +56 -19
- package/server/{conversation-compaction-eQB5CkOe.js → conversation-compaction-BE3CNtHF.js} +1 -1
- package/server/{conversation-compaction-CgrR8YYp.js → conversation-compaction-D6-yLtqt.js} +8 -8
- package/server/{conversation-service-DPJ71F33.js → conversation-service-DBxoYMDl.js} +10 -8
- package/server/conversation-service-D_TS2b1r.js +3 -0
- package/server/{conversations-CAsJF9kh.js → conversations-BKDVpB-3.js} +1 -1
- package/server/{conversations-6AfUfbwc.js → conversations-D0UEdLtk.js} +4 -4
- package/server/{cost-R-m6Yi-W.js → cost-DS1s0DbG.js} +3 -3
- package/server/{cost-B2ddP6wq.js → cost-DpgYmYqR.js} +12 -2
- package/server/{cost-sync-BsN6ER0n.js → cost-sync-tOCCGnEt.js} +3 -3
- package/server/{dag-B1ucnjDU.js → dag-BtkgLeqY.js} +2 -2
- package/server/{dangerous-git-ops-BXqeWVSf.js → dangerous-git-ops-CFLykHWt.js} +1 -1
- package/server/dashboard-db-worker.js +7 -7
- package/server/deacon-BIblC-WX.js +4 -0
- package/server/{deacon-nudge-log-6wVqAaqz.js → deacon-nudge-log-B08gF0mh.js} +3 -3
- package/server/{deacon-CU_cAYSR.js → deacon-pLRLbPvR.js} +3308 -2707
- package/server/deacon-pending-lifecycle-B-Io84AP.js +33 -0
- package/server/deacon-swarm-B1XkIvfr.js +2 -0
- package/server/{deacon-swarm-BXZZ1Z2-.js → deacon-swarm-v5PMun-m.js} +15 -14
- package/server/deacon.js +14 -19
- package/server/dead-end-trip-D8A3msX9.js +13 -0
- package/server/delivery-BX9HR4wQ.js +3 -0
- package/server/{deploy-patrol-AiFoP8dw.js → deploy-patrol-sYgOxLeb.js} +69 -18
- package/server/deploy-queue-VfohaPN_.js +169 -0
- package/server/deploy-queue-gHJBycaF.js +3 -0
- package/server/deploy-window-CFRZ0-kt.js +3 -0
- package/server/{deploy-window-C3F-tihF.js → deploy-window-D4DQb8VP.js} +40 -16
- package/server/{dev-supervisor-bcOWqdQE.js → dev-supervisor-DiOBDM1c.js} +2 -2
- package/server/{devcontainer-renderer-_d6XhyND.js → devcontainer-renderer-BUOIlfgD.js} +3 -3
- package/server/dist-B3YPQa5A.js +3 -0
- package/server/{dist-Cb_0uvpS.js → dist-C3A8B8wM.js} +1 -1
- package/server/{dist-src-BSoS7mkd.js → dist-src-C0adpegX.js} +1 -1
- package/server/{docker-DcMTFTUC.js → docker-BJzlkqYB.js} +2 -2
- package/server/docker-Y3PElJb0.js +3 -0
- package/server/dod-DlNtcH6n.js +91 -0
- package/server/durable-review-pipeline-Cibps-Rg.js +20 -0
- package/server/durable-review-pipeline-DP6bIcOY.js +3 -0
- package/server/{ensure-devcontainer-DNi-ono3.js → ensure-devcontainer-BAofzBPv.js} +4 -4
- package/server/{ensure-devcontainer-BZgOhRo7.js → ensure-devcontainer-DMAbWqtQ.js} +1 -1
- package/server/{esm-shims-OSHAYaS1.js → esm-shims-BeObUkaw.js} +1 -1
- package/server/{event-store-EV2cMiXj.js → event-store-5UKzh9Jf.js} +1 -1
- package/server/{event-store-CQL6NeqB.js → event-store-CrHcVC5_.js} +23 -4
- package/server/{events-DTfAe4My.js → events-BNrvchBg.js} +3 -3
- package/server/{events-BTdrdEq8.js → events-CF8QDbuV.js} +1 -1
- package/server/{factory-CFibJuaw.js → factory-Cmm9Hsho.js} +5 -5
- package/server/{feature-registry-population-DKZFMbFt.js → feature-registry-population-B6HpNWRy.js} +4 -4
- package/server/{feature-registry-storage-BdPuLcBX.js → feature-registry-storage-DJEFx1Pf.js} +2 -2
- package/server/{features-ez2271oH.js → features-D5km80UI.js} +2 -2
- package/server/{feedback-target-CoFDHiM8.js → feedback-target-BJ5ZADsu.js} +1 -1
- package/server/{feedback-target-7mqqwrX6.js → feedback-target-DSxEL6lP.js} +8 -8
- package/server/{feedback-writer-CY5L1lB7.js → feedback-writer-C27Hak8a.js} +5 -5
- package/server/{feedback-writer-D3a22RCd.js → feedback-writer-CoB9Z6aU.js} +1 -1
- package/server/{flywheel-DHrgCphM.js → flywheel-BHx8XuMr.js} +47 -20
- package/server/{flywheel-SVF02Jpq.js → flywheel-DZZdtiOL.js} +1 -1
- package/server/{flywheel-DzGtWnJ1.js → flywheel-f662Q-y2.js} +16 -15
- package/server/flywheel-merge-order-D_xLMbJU.js +462 -0
- package/server/flywheel-merge-order-Dil0LmdN.js +2 -0
- package/server/forge-B5o319qI.js +3 -0
- package/server/forge-BaKGCya6.js +383 -0
- package/server/{from-kNxT0bZC.js → from-B3tZbB55.js} +1 -1
- package/server/fs-lock-Bre3sGoz.js +130 -0
- package/server/{fts-db-CE46vDkZ.js → fts-db-IVc4_M3f.js} +2 -2
- package/server/{fts-operations-CqY6zl-i.js → fts-operations-B9jG8wa3.js} +2 -2
- package/server/{git-utils-CRw2zLPC.js → git-utils-CsvYfJU3.js} +30 -5
- package/server/git-utils-Xg4PFN45.js +3 -0
- package/server/{github-app-ClZ2lk8D.js → github-app-Bmg4R9mv.js} +1 -1
- package/server/{github-app-C3QrAUd0.js → github-app-CmNk0zLU.js} +3 -3
- package/server/{github-client-DfQYVUaw.js → github-client-B6KM9_wA.js} +1 -1
- package/server/{github-client-BnIsSrEN.js → github-client-qazkPrg0.js} +3 -3
- package/server/github-pr-lookup-DAcVeRLK.js +58 -0
- package/server/{harness-binary-DPUi-Pv8.js → harness-binary-BSpiXaLw.js} +2 -2
- package/server/{harness-resolve-3lNZkyT4.js → harness-resolve-BAJu5MX8.js} +4 -4
- package/server/{health-events-BDOHby5Q.js → health-events-2Z6Wa9SM.js} +1 -1
- package/server/{health-events-BBcTYQKU.js → health-events-BwX32k8d.js} +2 -2
- package/server/{hooks-DPVX1rwQ.js → hooks-D1g1jKLI.js} +1 -1
- package/server/{hooks-CKZgXlJb.js → hooks-DbtbimEf.js} +2 -2
- package/server/{hume-Cz8igP9E.js → hume-DXNiu6nQ.js} +2 -2
- package/server/hume-VUCNbTgn.js +3 -0
- package/server/{idle-stack-reaper-CuLF0j2H.js → idle-stack-reaper-CRA1e0jr.js} +1 -1
- package/server/{idle-stack-reaper-DDIRwxUY.js → idle-stack-reaper-Cy-dQzW4.js} +99 -6
- package/server/in-flight-guard-D-sSkADM.js +45 -0
- package/server/{infra-BEqFxlJc.js → infra-BDQDRopn.js} +81 -5
- package/server/{injection-C8aiVJrF.js → injection-6AGnXxlj.js} +7 -7
- package/server/{injection-CPUIqNhI.js → injection-Bl8d_jHZ.js} +1 -1
- package/server/inspect-agent-CUwVmr2h.js +2 -0
- package/server/{inspect-agent-BLuJ1AkT.js → inspect-agent-nXdIptyh.js} +26 -25
- package/server/{internal-token-s0-oKybJ.js → internal-token-DzK385vD.js} +2 -2
- package/server/{internal-token-BrcU6qfe.js → internal-token-Ias7N8Kg.js} +1 -1
- package/server/{io-C9kF1wtJ.js → io-B00PBNku.js} +44 -27
- package/server/{issue-closed-CDJk4pIp.js → issue-closed-BehTG1be.js} +8 -8
- package/server/{issue-lifecycle-ojZAzDBP.js → issue-lifecycle-Birk-ifu.js} +42 -30
- package/server/{issue-lifecycle-B8sZHVHh.js → issue-lifecycle-BqSuQvbn.js} +1 -1
- package/server/{issue-service-singleton-BvJ09SaR.js → issue-service-singleton-B2wXiIlw.js} +1 -1
- package/server/{issue-service-singleton-Yx5DdmVJ.js → issue-service-singleton-C6ZduvuY.js} +10 -10
- package/server/{issues-BMmP_77e.js → issues-DQ5-LatB.js} +2 -2
- package/server/{jsonl-parser-BXSlHwEh.js → jsonl-parser-BDpnGFCl.js} +5 -4
- package/server/{label-cleanup-B0UJwnv5.js → label-cleanup-Dwnky8FG.js} +3 -3
- package/server/{lifecycle-xmBfK2GJ.js → lifecycle-B3s4sM1G.js} +6 -7
- package/server/{lifecycle-yPd___5E.js → lifecycle-B4Xdb4cY.js} +2 -2
- package/server/{lifecycle-io-DPo7x11I.js → lifecycle-io-CzTHEooc.js} +1 -1
- package/server/{lifecycle-io-BREGpnLk.js → lifecycle-io-DCo6s6ks.js} +5 -5
- package/server/{linear-client-BsuUvkdA.js → linear-client-9uq7fhiV.js} +3 -3
- package/server/{linear-client-CTskEeT_.js → linear-client-CnbtHiic.js} +1 -1
- package/server/linear-mcp-auth-BxUOzswy.js +280 -0
- package/server/linear-mcp-auth-D46fBCLf.js +2 -0
- package/server/memory-fts-worker.js +1 -1
- package/server/{merge-CefQNAnq.js → merge-DiW9RdSB.js} +13 -11
- package/server/{merge-agent-4WOWlSYA.js → merge-agent-BLUgRsz3.js} +234 -84
- package/server/{merge-agent-CKkgIBPB.js → merge-agent-DQTXZk8z.js} +1 -1
- package/server/{merge-batch-ClFn2T-y.js → merge-batch-Cp_j9BGk.js} +1 -1
- package/server/merge-completeness-B46KqhtY.js +277 -0
- package/server/merge-completeness-BLbB5-6n.js +3 -0
- package/server/merge-ops-1abz6O_P.js +2 -0
- package/server/merge-rebase-CJJVAJuz.js +2 -0
- package/server/{merge-rebase-BfaTyXsw.js → merge-rebase-DIkBjgwq.js} +3 -3
- package/server/{merge-set-DJ8-UErs.js → merge-set-CBgHfwM0.js} +11 -5
- package/server/merge-set-DeUxFsC3.js +3 -0
- package/server/{merge-B1DiziGU.js → merge-sr8Nrnmi.js} +1 -1
- package/server/merge-sync-CpGmk6Ch.js +3 -0
- package/server/{merge-sync-VPV28g0g.js → merge-sync-kr4vqyjM.js} +409 -153
- package/server/{merge-train-CHopycP0.js → merge-train-Dmrcus12.js} +18 -8
- package/server/{merge-train-deps-D1cOZzy2.js → merge-train-deps-D_uGX91G.js} +21 -15
- package/server/merge-verification-NvaAd8CZ.js +220 -0
- package/server/merged-docker-cleanup-worker-DH_hrGPI.js +3 -0
- package/server/merged-docker-cleanup-worker-Y1R06TEl.js +107 -0
- package/server/{multipart-parser-duPAfSBw.js → multipart-parser-R-oC8dQg.js} +2 -2
- package/server/{no-resume-mode-Nw29vaFb.js → no-resume-mode-BgD0JUmM.js} +1 -1
- package/server/node_modules/.package-lock.json +30 -30
- package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/package.json +3 -3
- package/server/node_modules/@google-cloud/common/package.json +2 -2
- package/server/node_modules/@types/node/README.md +1 -1
- package/server/node_modules/@types/node/crypto.d.ts +1 -1
- package/server/node_modules/@types/node/package.json +2 -2
- package/server/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/server/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +1 -1
- package/server/node_modules/gaxios/package.json +1 -1
- package/server/node_modules/google-auth-library/build/src/auth/googleauth.js +24 -19
- package/server/node_modules/google-auth-library/package.json +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/auth.proto +2 -1
- package/server/node_modules/google-gax/build/protos/google/api/backend.proto +12 -1
- package/server/node_modules/google-gax/build/protos/google/api/billing.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/client.proto +165 -53
- package/server/node_modules/google-gax/build/protos/google/api/cloudquotas/v1/resources.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/cloudquotas/v1beta/quota_adjuster_settings.proto +7 -3
- package/server/node_modules/google-gax/build/protos/google/api/cloudquotas/v1beta/resources.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/config_change.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/context.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/control.proto +3 -3
- package/server/node_modules/google-gax/build/protos/google/api/distribution.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/documentation.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/endpoint.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/error_reason.proto +186 -1
- package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/checked.proto +31 -3
- package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/eval.proto +8 -9
- package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/explain.proto +1 -2
- package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/syntax.proto +20 -22
- package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/value.proto +2 -3
- package/server/node_modules/google-gax/build/protos/google/api/field_behavior.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/field_info.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/http.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/httpbody.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/label.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/launch_stage.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/log.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/logging.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/metric.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/monitored_resource.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/monitoring.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/policy.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/quota.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/resource.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/routing.proto +8 -4
- package/server/node_modules/google-gax/build/protos/google/api/service.proto +2 -3
- package/server/node_modules/google-gax/build/protos/google/api/source_info.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/system_parameter.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/api/usage.proto +7 -27
- package/server/node_modules/google-gax/build/protos/google/api/visibility.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/longrunning/operations.proto +20 -1
- package/server/node_modules/google-gax/build/protos/google/protobuf/any.proto +52 -108
- package/server/node_modules/google-gax/build/protos/google/protobuf/compiler/ruby/ruby_generated_code.proto +2 -0
- package/server/node_modules/google-gax/build/protos/google/protobuf/cpp_features.proto +21 -1
- package/server/node_modules/google-gax/build/protos/google/protobuf/cpp_file_options.proto +24 -0
- package/server/node_modules/google-gax/build/protos/google/protobuf/cpp_options.proto +15 -0
- package/server/node_modules/google-gax/build/protos/google/protobuf/descriptor.proto +118 -30
- package/server/node_modules/google-gax/build/protos/google/protobuf/field_mask.proto +16 -18
- package/server/node_modules/google-gax/build/protos/google/protobuf/internal_options.proto +8 -1
- package/server/node_modules/google-gax/build/protos/google/protobuf/json/json_enumval_custom_string.proto +26 -0
- package/server/node_modules/google-gax/build/protos/google/protobuf/json_enumvalue_options.proto +29 -0
- package/server/node_modules/google-gax/build/protos/google/protobuf/json_options.proto +14 -0
- package/server/node_modules/google-gax/build/protos/google/protobuf/struct.proto +38 -22
- package/server/node_modules/google-gax/build/protos/google/protobuf/test_protos/forced_micro_string.proto +3 -0
- package/server/node_modules/google-gax/build/protos/google/protobuf/test_protos/repeated_field_proxy_import_message.proto +14 -0
- package/server/node_modules/google-gax/build/protos/google/protobuf/timestamp.proto +9 -8
- package/server/node_modules/google-gax/build/protos/google/protobuf/util/json_format_proto3.proto +18 -0
- package/server/node_modules/google-gax/build/protos/google/rpc/code.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/rpc/context/attribute_context.proto +7 -2
- package/server/node_modules/google-gax/build/protos/google/rpc/context/audit_context.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/rpc/error_details.proto +5 -5
- package/server/node_modules/google-gax/build/protos/google/rpc/http.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/rpc/status.proto +1 -2
- package/server/node_modules/google-gax/build/protos/google/type/calendar_period.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/type/color.proto +9 -10
- package/server/node_modules/google-gax/build/protos/google/type/date.proto +11 -9
- package/server/node_modules/google-gax/build/protos/google/type/datetime.proto +17 -17
- package/server/node_modules/google-gax/build/protos/google/type/dayofweek.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/type/decimal.proto +11 -13
- package/server/node_modules/google-gax/build/protos/google/type/expr.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/type/fraction.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/type/interval.proto +1 -2
- package/server/node_modules/google-gax/build/protos/google/type/latlng.proto +4 -5
- package/server/node_modules/google-gax/build/protos/google/type/localized_text.proto +3 -3
- package/server/node_modules/google-gax/build/protos/google/type/money.proto +1 -2
- package/server/node_modules/google-gax/build/protos/google/type/month.proto +1 -1
- package/server/node_modules/google-gax/build/protos/google/type/phone_number.proto +20 -15
- package/server/node_modules/google-gax/build/protos/google/type/postal_address.proto +39 -39
- package/server/node_modules/google-gax/build/protos/google/type/quaternion.proto +4 -4
- package/server/node_modules/google-gax/build/protos/google/type/timeofday.proto +11 -8
- package/server/node_modules/google-gax/package.json +5 -5
- package/server/node_modules/retry-request/package.json +4 -4
- package/server/node_modules/teeny-request/package.json +5 -5
- package/server/node_modules/undici/lib/cache/memory-cache-store.js +54 -9
- package/server/node_modules/undici/lib/cache/sqlite-cache-store.js +7 -1
- package/server/node_modules/undici/lib/core/request.js +12 -1
- package/server/node_modules/undici/lib/dispatcher/client-h1.js +11 -2
- package/server/node_modules/undici/lib/global.js +36 -16
- package/server/node_modules/undici/lib/handler/cache-handler.js +236 -116
- package/server/node_modules/undici/lib/handler/cache-revalidation-handler.js +3 -3
- package/server/node_modules/undici/lib/handler/retry-handler.js +24 -0
- package/server/node_modules/undici/lib/interceptor/cache.js +152 -62
- package/server/node_modules/undici/lib/interceptor/decompress.js +5 -2
- package/server/node_modules/undici/lib/util/cache.js +328 -66
- package/server/node_modules/undici/lib/util/date.js +23 -6
- package/server/node_modules/undici/lib/web/cookies/util.js +78 -8
- package/server/node_modules/undici/package.json +1 -1
- package/server/{orphan-proposed-reconciler-BvKkWMJQ.js → orphan-proposed-reconciler-B6vJHxtX.js} +242 -34
- package/server/{orphan-proposed-reconciler-CTSGcK8p.js → orphan-proposed-reconciler-DcgTPPFY.js} +1 -1
- package/server/package-lock.json +31 -31
- package/server/package.json +1 -1
- package/server/{pan-dir-B0c3w0Ya.js → pan-dir-DMzF5wne.js} +25 -11
- package/server/{paths-D-xWGHdh.js → paths-sJBSb7Ul.js} +2 -2
- package/server/pending-lifecycle-claim-DilzGfgk.js +110 -0
- package/server/persistent-logger-H_VjuOu7.js +57 -0
- package/server/{pickup-DUCLWrJY.js → pickup-DWhqzliO.js} +4 -3
- package/server/pipeline-membership-C88VBnhJ.js +3 -0
- package/server/pipeline-membership-D9SBvItj.js +57 -0
- package/server/pipeline-membership-gather-4eR-7Tqy.js +3 -0
- package/server/pipeline-membership-gather-CeVGnNJ2.js +593 -0
- package/server/{pipeline-notifier-BXkJzDC4.js → pipeline-notifier-D0ALV6Nw.js} +2 -2
- package/server/{pipeline-notifier-BJr8gQX6.js → pipeline-notifier-DT6xLFao.js} +1 -1
- package/server/post-merge-lifecycle-worker-8HIeS_J6.js +50 -0
- package/server/{project-pipelines-C0MWUeCU.js → project-pipelines-9SKt2bEc.js} +2 -2
- package/server/{project-repos-B6GycDh9.js → project-repos-B5pIphKg.js} +7 -3
- package/server/project-repos-DPjOdfPa.js +3 -0
- package/server/projects-_n3Zui6K.js +3 -0
- package/server/{prompts-DxzFXuLl.js → prompts-CgzMBvQF.js} +2 -2
- package/server/{providers-u4Ga0jOr.js → providers-BI1mOBQ4.js} +1 -1
- package/server/{providers-qQAwGQDW.js → providers-BJQSnAAp.js} +7 -7
- package/server/public/assets/{chunk-BO2N2NFS-BamJdinX.js → chunk-BO2N2NFS-D_pGACYN.js} +4 -4
- package/server/public/assets/{diagram-OG6HWLK6-DfOB8-w4.js → diagram-OG6HWLK6-BO6fe3hH.js} +1 -1
- package/server/public/assets/{dist-ByIuzMQW.js → dist-5zingMiA.js} +3 -3
- package/server/public/assets/{dist-D7zYSEA6.js → dist-CVxhbI2E.js} +1 -1
- package/server/public/assets/{ganttDiagram-6RSMTGT7-EdmRyXL3.js → ganttDiagram-6RSMTGT7-Bgj4A7kp.js} +1 -1
- package/server/public/assets/{highlighted-body-OFNGDK62-MerOfTX8.js → highlighted-body-OFNGDK62-DNPK7_cm.js} +1 -1
- package/server/public/assets/index-DEpY-D1O.js +807 -0
- package/server/public/assets/index-Ddkcz3WT.css +1 -0
- package/server/public/assets/{linear-BBbArIcK.js → linear-BB0jQT16.js} +1 -1
- package/server/public/assets/mermaid-GHXKKRXX-BzPfaQJ1.js +1 -0
- package/server/public/assets/{pieDiagram-4H26LBE5-BKIddiJN.js → pieDiagram-4H26LBE5-DeGIzzpZ.js} +1 -1
- package/server/public/assets/{prod-B8vYiu52.js → prod-XBLvikex.js} +4 -4
- package/server/public/assets/{quadrantDiagram-W4KKPZXB-D6RtoULk.js → quadrantDiagram-W4KKPZXB-BV9SLeWz.js} +1 -1
- package/server/public/assets/{sankeyDiagram-5OEKKPKP-CLrCedZX.js → sankeyDiagram-5OEKKPKP-Dwja0gj8.js} +1 -1
- package/server/public/assets/{xychartDiagram-2RQKCTM6-hznR8DYl.js → xychartDiagram-2RQKCTM6-DCB4qvfw.js} +1 -1
- package/server/public/index.html +2 -2
- package/server/{pull-requests-_lHueOHW.js → pull-requests-7BgLDsIo.js} +19 -10
- package/server/{pull-requests-7N8WKseP.js → pull-requests-Dq0y6IxE.js} +1 -1
- package/server/{queries-CjNIf-Ub.js → queries-C-MUZaIy.js} +824 -192
- package/server/{rally-CyWT_lNO.js → rally-CPysR4T_.js} +3 -3
- package/server/rally-D_VW4bJv.js +3 -0
- package/server/{rally-api-C8e_1JRi.js → rally-api-8Ptlp2os.js} +2 -2
- package/server/{rally-api-ClOSd-Tt.js → rally-api-CgosKdKL.js} +1 -1
- package/server/{rally-client-sgtVqzNU.js → rally-client-CCX0hADj.js} +1 -1
- package/server/{rally-client-lc-nokqr.js → rally-client-iYMHWQD7.js} +5 -5
- package/server/{reap-terminal-sessions-7KeHv1R1.js → reap-terminal-sessions-4Xg9NGA8.js} +2 -2
- package/server/{reap-terminal-sessions-BtHPo6Xc.js → reap-terminal-sessions-Qf-9LVQc.js} +2 -2
- package/server/{rebuild-stack-lwtsW0GO.js → rebuild-stack-CMdgaylx.js} +16 -7
- package/server/{rebuild-stack-CFvcBHsS.js → rebuild-stack-DqcOVmJO.js} +2 -2
- package/server/{reconstruct-cache-C3Ui7ojV.js → reconstruct-cache-CMZJ_Vjq.js} +9 -7
- package/server/record-BTwWhtBb.js +3 -0
- package/server/{record-update-dE1Aw83j.js → record-update-DaOKS7Wb.js} +124 -157
- package/server/record-update-DhI7eySG.js +3 -0
- package/server/{recovery-trip-BvRWfUXM.js → recovery-trip-DDH-02ng.js} +2 -2
- package/server/{release-engine-Cx48W7z8.js → release-engine-B2X9AfFC.js} +5 -5
- package/server/{release-set-CQfuN9-v.js → release-set-G4XKyQ8K.js} +3 -3
- package/server/{remote-C_2hasl7.js → remote-BXarMvqf.js} +3 -3
- package/server/{remote-ChgimyYa.js → remote-CUhyqjXk.js} +3 -3
- package/server/{remote-agents-By1ige5O.js → remote-agents-Bba-MgSA.js} +311 -48
- package/server/{remote-agents-CA3Ihlxj.js → remote-agents-CLZB3Coc.js} +2 -2
- package/server/{remote-completion-fVe9e_3u.js → remote-completion-CwAp79EC.js} +13 -13
- package/server/resume-mOREjlYu.js +3 -0
- package/server/{review-agent-CIGOQYBD.js → review-agent--pOptAEV.js} +65 -50
- package/server/{review-agent-DNboMyW4.js → review-agent-BTCNkq2h.js} +1 -1
- package/server/{review-artifacts-nRDPuMxd.js → review-artifacts-BNmw8dWE.js} +7 -6
- package/server/{review-context-2uj-YQ8J.js → review-context-DFxYOOJW.js} +9 -9
- package/server/{in-flight-guard-CAAkqPLu.js → review-convoy-liveness-BgU_1jJf.js} +3 -44
- package/server/review-status-CGvlA4o_.js +7737 -0
- package/server/review-status-Dma9SFaN.js +3 -0
- package/server/review-status-emit-DURrmGYX.js +50 -0
- package/server/{review-status-enrichment-Dci-ZwEt.js → review-status-enrichment-8NiNXi5W.js} +4 -4
- package/server/review-status-source-BLx_1siH.js +3 -0
- package/server/{review-status-source-CxuEjLGg.js → review-status-source-DIk1JSow.js} +24 -3
- package/server/{review-status-sync-BTOpxtTC.js → review-status-sync-0GxOqeqF.js} +11 -6
- package/server/{review-status-sync-DSDK3OMy.js → review-status-sync-muT-EBp2.js} +1 -1
- package/server/{review-verdict-feedback-CTd4QMBu.js → review-verdict-feedback-HwF6ODFy.js} +1 -1
- package/server/{review-verdict-feedback-CCjVA7Uk.js → review-verdict-feedback-xJNdqBnX.js} +65 -11
- package/server/{rollup-FGsKki9R.js → rollup-BQaol5TX.js} +8 -8
- package/server/{rollup-BKQC7jp4.js → rollup-BR4t_wck.js} +1 -1
- package/server/{scanner-CnqEZeDy.js → scanner-C-D2cFdX.js} +8 -7
- package/server/{sequence-io-D909zgeH.js → sequence-io-Bmf1EZM5.js} +4 -4
- package/server/{sequencer-agent-CzkcK6P5.js → sequencer-agent-CigMyKh2.js} +7 -6
- package/server/server.js +2005 -614
- package/server/{service-CLeAoU6G.js → service-CD0DvFvD.js} +114 -68
- package/server/{session-fork-CHI1XvL9.js → session-fork-B6cQ5eya.js} +2 -2
- package/server/{session-history-BT3IvqhC.js → session-history-3ON_IJjm.js} +7 -55
- package/server/settings-CVmWiJ-r.js +2 -0
- package/server/{settings-C0zgxOGf.js → settings-PilbFZAM.js} +3 -2
- package/server/{settings-BTMvpNFU.js → settings-VN0qOh4U.js} +3 -3
- package/server/{shadow-engineering-BJfgm-hX.js → shadow-engineering-DXvx77oE.js} +3 -3
- package/server/{shadow-state-7a-524T8.js → shadow-state-BBk_zacw.js} +2 -2
- package/server/{shadow-state-DnDyjujH.js → shadow-state-CZBp7pwq.js} +1 -1
- package/server/{shadow-utils-Db3oroFG.js → shadow-utils-DdZ05AJS.js} +2 -2
- package/server/{ship-log-D9MlVzYU.js → ship-log-7kJfjUX2.js} +1 -1
- package/server/{smart-compaction-CV2ukKND.js → smart-compaction-8fA5k5XN.js} +1 -1
- package/server/{smart-compaction-KCYScAU1.js → smart-compaction-ByhL9cRS.js} +8 -7
- package/server/{spawn-planning-session-DKpdFyOC.js → spawn-planning-session-pcF-YeFE.js} +38 -50
- package/server/spawn-planning-session-vLUJoFjy.js +3 -0
- package/server/{specialist-completion-Ky9wCDpb.js → specialist-completion-B07XjWD2.js} +1 -1
- package/server/{specialist-context-Bn3dCGS2.js → specialist-context-DJ-zFyL3.js} +5 -5
- package/server/{specialist-handoff-logger-CMEwYxa2.js → specialist-handoff-logger-aKSxbIgD.js} +2 -2
- package/server/{specialist-logs-C5p8G7tx.js → specialist-logs-Dae-n52_.js} +3 -3
- package/server/{specialists-CC4r-c2s.js → specialists-6PWdtWcg.js} +1177 -311
- package/server/{specialists-DM6bWjsi.js → specialists-Bz-wFT7R.js} +1 -1
- package/server/{specialists-jiuuyVkp.js → specialists-DUiExaxb.js} +18 -18
- package/server/{specialists-CShuVGWT.js → specialists-KR3pKulN.js} +1 -1
- package/server/specs--enInima.js +3 -0
- package/server/src-B948bGVR.js +11452 -0
- package/server/{src-CXmtj0im.js → src-rac0Mepv.js} +6 -6
- package/server/{src-CdmnTM2m.js → src-vHy2-oCv.js} +3 -3
- package/server/{stack-health-Bn3o8FBX.js → stack-health-BikqHSjn.js} +1 -1
- package/server/{stack-health-DxSdG9cW.js → stack-health-DqLTiEu4.js} +7 -5
- package/server/{stale-task-claims-KJKxxiiQ.js → stale-task-claims-Cab_Fo_Z.js} +5 -4
- package/server/{staleness-DPm7ClwA.js → staleness-C-a5rBxF.js} +1 -1
- package/server/{staleness-CT34nwr9.js → staleness-CGTZyp6V.js} +1 -1
- package/server/{state-home-Cn_Qu8IX.js → state-home-722Dkx92.js} +2 -2
- package/server/{state-mapping-BL_-3Yt8.js → state-mapping-CybR81Uf.js} +1 -1
- package/server/{state-migrate-BGg2ZaOt.js → state-migrate-2u8wIpoL.js} +4 -4
- package/server/{stuck-remediation-DYuPRYYw.js → stuck-remediation-CC6q3eqQ.js} +84 -26
- package/server/{stuck-remediation-s9_2qfi6.js → stuck-remediation-r1TJu68G.js} +1 -1
- package/server/{substrate-bug-weights-service-B-FwCs5V.js → substrate-bug-weights-service-CzIyyWFT.js} +3 -3
- package/server/{summary-fork-DpcxN9tf.js → summary-fork-BqgmgPDt.js} +2 -2
- package/server/{summary-fork-D1RAk9rJ.js → summary-fork-Df2WFijM.js} +8 -8
- package/server/supervisor/{injection-budget-Csw5tqfJ.js → injection-budget-Cg_KIb3o.js} +1 -1
- package/server/supervisor/{paths-DehGY2Fj.js → paths-BBOnCYlO.js} +10 -2
- package/server/supervisor/pty-supervisor.js +50 -4
- package/server/supervisor/{pty-token-x-ea28Us.js → pty-token-BbjwEUUM.js} +3 -3
- package/server/supervisor-B4anCCSm.js +2 -0
- package/server/{supervisor-wM4ooB5O.js → supervisor-BxqSpjcN.js} +3 -3
- package/server/{swarm-readiness-DlP_UjHq.js → swarm-readiness-DfFxa9-n.js} +3 -3
- package/server/{system-prerequisites-DUDj1YHf.js → system-prerequisites-ICLSkhhZ.js} +2 -2
- package/server/{teardown-workspace-DeTTImn-.js → teardown-workspace-DRdi_CPa.js} +15 -16
- package/server/{test-agent-queue-MbxX5vqq.js → test-agent-queue-A_-p-i0I.js} +8 -7
- package/server/{test-verdict-gscuksPv.js → test-verdict-BHgTAwIG.js} +1 -1
- package/server/{test-verdict-bWYBtqBg.js → test-verdict-C4i9aqEP.js} +1 -1
- package/server/{tldr-daemon-BYFkts95.js → tldr-daemon-CvWXBhX1.js} +1 -1
- package/server/{tldr-daemon-C-69c3OI.js → tldr-daemon-wvsU6bKv.js} +2 -2
- package/server/{tmux-R7N7y-Mh.js → tmux-CfDHob9M.js} +174 -4
- package/server/{tmux-B6z7h_vZ.js → tmux-Ctk6RV5l.js} +1 -1
- package/server/{token-BK6t8BIT.js → token-DrxwytsZ.js} +2 -2
- package/server/{token-util-DxXu-vd1.js → token-util-B48BlCba.js} +1 -1
- package/server/token-util-D411CAq9.js +3 -0
- package/server/{tracker-config-G6latr8C.js → tracker-config-BcPMElRB.js} +2 -2
- package/server/{tracker-utils-DHv5pSDT.js → tracker-utils-CJ6BHjcD.js} +3 -3
- package/server/{traefik-connect-Df2uXPsQ.js → traefik-connect-DZ6nMYMj.js} +1 -1
- package/server/{tunnel-DGdUkGoZ.js → tunnel-Bp-dRHZz.js} +1 -1
- package/server/{tunnel-CDVKJpRv.js → tunnel-DUbUPElU.js} +3 -3
- package/server/{typed-errors-BHhE85Ul.js → typed-errors-CKeoDdU3.js} +1 -1
- package/server/{typed-errors-2BTMxkZq.js → typed-errors-DyjseiB6.js} +1 -1
- package/server/{types-hraoaQIp.js → types-Cm5ASJbq.js} +1 -1
- package/server/{types-5M0lupud.js → types-Di8wdakq.js} +1 -1
- package/server/uat-promote-verification-CoJuh7XO.js +92 -0
- package/server/uat-train-4Q0k06CQ.js +0 -0
- package/server/uat-train-Dewoatps.js +2 -0
- package/server/{validate-IfDGkaVR.js → validate-B0C8p66t.js} +8 -6
- package/server/{validation-Dw1pzDzr.js → validation-B_kIRfNe.js} +4 -4
- package/server/{validation-CC9OPqJZ.js → validation-hVOwQk8T.js} +1 -1
- package/server/{verification-artifact-B3itKTxu.js → verification-artifact-BxlxTiYK.js} +1 -1
- package/server/{verification-artifact-TVFSz_q1.js → verification-artifact-D70AtckY.js} +1 -1
- package/server/{verification-runner-BW4HOKAz.js → verification-runner-Bc3cJvpC.js} +1 -1
- package/server/{verification-runner-CkgX6EtI.js → verification-runner-KZTz6u72.js} +40 -18
- package/server/{vtt-parser-DYPbKcIJ.js → vtt-parser-CE_i3Bcw.js} +1 -1
- package/server/{work-agent-prompt-Du8Vh2aJ.js → work-agent-prompt-ByrPAzOy.js} +20 -9
- package/server/{workflows-mbQzh6mQ.js → workflows-D0vP1WrK.js} +252 -99
- package/server/workflows-DtDX08ed.js +2 -0
- package/server/{workspace--8tnhDI0.js → workspace-COWvdibH.js} +1 -1
- package/server/{workspace-BPUws1-_.js → workspace-DQkRPLlQ.js} +3 -3
- package/server/workspace-anchor-drift-DXYIAHzr.js +224 -0
- package/server/workspace-anchor-drift-pwz23TI1.js +3 -0
- package/server/{workspace-config-CIVWZOQr.js → workspace-config-BdZM4PvZ.js} +1 -1
- package/server/{workspace-manager-CBhNdzE4.js → workspace-manager-BPgTrG66.js} +157 -118
- package/server/workspace-manager-C1F3XsnS.js +3 -0
- package/server/{workspace-metadata-BzHnwwX4.js → workspace-metadata-CdjzAP8x.js} +1 -1
- package/server/{workspace-metadata-_WygnyoX.js → workspace-metadata-DkO_iTLo.js} +2 -2
- package/server/{workspaces-Do_9J0LQ.js → workspaces-CRBJikLp.js} +749 -299
- package/sync-sources/dev-skills/pan-dashboard-restart/SKILL.md +34 -10
- package/sync-sources/hooks/linear-mcp-auth-hook +97 -0
- package/sync-sources/rules/ask-user-question-self-contained.md +9 -0
- package/sync-sources/skills/pan-close/SKILL.md +5 -3
- package/sync-sources/skills/pan-merge/SKILL.md +7 -5
- package/sync-sources/skills/pan-peer-review/SKILL.md +195 -0
- package/sync-sources/skills/pan-release/SKILL.md +57 -0
- package/sync-sources/skills/pan-reload/SKILL.md +3 -3
- package/sync-sources/skills/pan-restart/SKILL.md +5 -4
- package/sync-sources/skills/pan-review/SKILL.md +7 -1
- package/sync-sources/skills/pan-sync-main/SKILL.md +9 -8
- package/sync-sources/skills/pipeline-status/SKILL.md +10 -1
- package/sync-sources/skills/workspace-add-repo/SKILL.md +16 -1
- package/server/activity-logger-OEUBdfZ8.js +0 -3
- package/server/agent-state-Bc3tzUC8.js +0 -3
- package/server/agent-state-service-D5UGKIJL.js +0 -2
- package/server/agents-wi9NWzs2.js +0 -3
- package/server/archive-planning-BZDgzoEj.js +0 -3
- package/server/cli-B86rejVV.js +0 -3
- package/server/conflict-gate-BhAY7TUd.js +0 -3
- package/server/conversation-service-BLd3MYsG.js +0 -3
- package/server/deacon-kiQrb4ZT.js +0 -4
- package/server/deacon-swarm-C-GwfjJy.js +0 -2
- package/server/deploy-window-DkZraDyj.js +0 -3
- package/server/dist-Bzy0y69j.js +0 -3
- package/server/dod-C6n9RV3G.js +0 -66
- package/server/flywheel-merge-order-UU0tiUld.js +0 -245
- package/server/flywheel-merge-order-UUcsCDb6.js +0 -2
- package/server/forge-CNFnyqps.js +0 -270
- package/server/forge-DXnS_YFH.js +0 -2
- package/server/git-utils-D0_yhCgF.js +0 -3
- package/server/github-pr-lookup-D16NGsSO.js +0 -44
- package/server/hume-ccTf4wTX.js +0 -3
- package/server/inspect-agent-Brtz0URj.js +0 -2
- package/server/label-reconciler-B4iOAjlC.js +0 -113
- package/server/launcher-generator-BBWG_SiS.js +0 -473
- package/server/merge-ops-CR44oU9-.js +0 -2
- package/server/merge-set-bUqbm3yc.js +0 -3
- package/server/merge-sync-BJYeOODr.js +0 -3
- package/server/merge-verification-BkaOqPsw.js +0 -124
- package/server/pipeline-membership-mY3GprlK.js +0 -420
- package/server/project-repos-DXKQsc_m.js +0 -3
- package/server/projects-vjjcmiN8.js +0 -3
- package/server/public/assets/index-CWeMerGO.js +0 -804
- package/server/public/assets/index-CenuJ3Cw.css +0 -1
- package/server/public/assets/mermaid-GHXKKRXX-CpPWAFwE.js +0 -1
- package/server/rally-zhhtXuDP.js +0 -3
- package/server/record-CN0pj4_5.js +0 -3
- package/server/record-update-bLJxAXH4.js +0 -3
- package/server/resume-BFv1PGpA.js +0 -3
- package/server/review-status-btEYlaxA.js +0 -3
- package/server/review-status-kZj_KyCk.js +0 -1470
- package/server/settings-66A6uvIA.js +0 -2
- package/server/spawn-planning-session-qUC2VWu3.js +0 -2
- package/server/specs-C8Wsn2XO.js +0 -3
- package/server/src-DtcUOZCq.js +0 -4826
- package/server/supervisor-FTJAIsAK.js +0 -2
- package/server/token-util-DuPuNriz.js +0 -3
- package/server/tracker-utils-B4ylXZQK.js +0 -3
- package/server/uat-train-B05BWkp-.js +0 -2
- package/server/uat-train-DDSrSoV1.js +0 -2152
- package/server/workflows-BQu4RFQ-.js +0 -2
- package/server/workspace-manager-CWT55qeI.js +0 -3
package/server/src-DtcUOZCq.js
DELETED
|
@@ -1,4826 +0,0 @@
|
|
|
1
|
-
import { n as __esmMin } from "./rolldown-runtime-DNCzzKnI.js";
|
|
2
|
-
import { Effect, Schema, SchemaGetter } from "effect";
|
|
3
|
-
import * as Rpc from "effect/unstable/rpc/Rpc";
|
|
4
|
-
import * as RpcGroup from "effect/unstable/rpc/RpcGroup";
|
|
5
|
-
//#region ../../../packages/contracts/src/types.ts
|
|
6
|
-
function isChannelReplyKind(value) {
|
|
7
|
-
return typeof value === "string" && CHANNEL_REPLY_KIND_VALUES.includes(value);
|
|
8
|
-
}
|
|
9
|
-
function normalizeChannelReplyPayload(payload, fieldPrefix = "channel_reply") {
|
|
10
|
-
if (payload === null || typeof payload !== "object") throw new Error(`${fieldPrefix} payload must be an object`);
|
|
11
|
-
const source = payload;
|
|
12
|
-
if (!isChannelReplyKind(source.kind)) throw new Error(`${fieldPrefix}.kind must be one of: ${CHANNEL_REPLY_KIND_VALUES.join(", ")}`);
|
|
13
|
-
if (typeof source.summary !== "string") throw new Error(`${fieldPrefix}.summary must be a non-empty string`);
|
|
14
|
-
const summary = source.summary.trim();
|
|
15
|
-
if (summary.length === 0) throw new Error(`${fieldPrefix}.summary must be a non-empty string`);
|
|
16
|
-
if (summary.length > 4096) throw new Error(`${fieldPrefix}.summary must be at most ${MAX_CHANNEL_REPLY_SUMMARY_LENGTH} characters`);
|
|
17
|
-
if (source.artifactRefs !== void 0 && !Array.isArray(source.artifactRefs)) throw new Error(`${fieldPrefix}.artifactRefs must be an array when provided`);
|
|
18
|
-
const rawArtifactRefs = source.artifactRefs ?? [];
|
|
19
|
-
if (rawArtifactRefs.length > 20) throw new Error(`${fieldPrefix}.artifactRefs must contain at most 20 entries`);
|
|
20
|
-
const artifactRefs = rawArtifactRefs.map((item, index) => {
|
|
21
|
-
if (item === null || typeof item !== "object") throw new Error(`${fieldPrefix}.artifactRefs[${index}] must be an object`);
|
|
22
|
-
const ref = item;
|
|
23
|
-
if (typeof ref.uri !== "string") throw new Error(`${fieldPrefix}.artifactRefs[${index}].uri must be a non-empty string`);
|
|
24
|
-
const uri = ref.uri.trim();
|
|
25
|
-
if (uri.length === 0) throw new Error(`${fieldPrefix}.artifactRefs[${index}].uri must be a non-empty string`);
|
|
26
|
-
if (uri.length > 512) throw new Error(`${fieldPrefix}.artifactRefs[${index}].uri must be at most 512 characters`);
|
|
27
|
-
if (!CHANNEL_REPLY_ARTIFACT_URI_PATTERN.test(uri)) throw new Error(`${fieldPrefix}.artifactRefs[${index}].uri must start with file://, https://, or /`);
|
|
28
|
-
if (ref.label !== void 0 && typeof ref.label !== "string") throw new Error(`${fieldPrefix}.artifactRefs[${index}].label must be a string when provided`);
|
|
29
|
-
const label = typeof ref.label === "string" ? ref.label.trim() : void 0;
|
|
30
|
-
if (label !== void 0 && label.length > 512) throw new Error(`${fieldPrefix}.artifactRefs[${index}].label must be at most 512 characters`);
|
|
31
|
-
return {
|
|
32
|
-
uri,
|
|
33
|
-
...label ? { label } : {}
|
|
34
|
-
};
|
|
35
|
-
});
|
|
36
|
-
return {
|
|
37
|
-
kind: source.kind,
|
|
38
|
-
summary,
|
|
39
|
-
artifactRefs
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
var IssueId, AgentId, SequenceNumber, AgentStatus, Role, AgentResolution, ReviewStatusValue, TestStatusValue, UatStatusValue, MergeStatusValue, ReleaseStatusValue, VerificationStatusValue, Activity, WaitingReason, ClaudeChannelPermissionBehavior, ThinkingState, WaitingState, CHANNEL_REPLY_KIND_VALUES, MAX_CHANNEL_REPLY_SUMMARY_LENGTH, CHANNEL_REPLY_ARTIFACT_URI_PATTERN, ChannelReplyKind, ChannelReplyArtifactRef, AgentChannelReply, AgentRuntimeSnapshot, ChannelPermissionRequestSnapshot, AgentSnapshot, ReviewStatusSnapshot, TurnDiffFileChange, ScanProgressSnapshot, EnrichStatsSnapshot, EnrichProgressSnapshot, EmbedProgressSnapshot, DashboardSnapshot, WorkspaceDetail, ResourceStats, SessionNodePresence, SessionNodeType, ReviewerRoundSummary, ReviewerRoundMetadata, ModelOriginEntry, ModelOrigin, SessionNode, FeatureNode, DiscoveredSessionSnapshot, SessionsFeedSource, SessionsFeedRowSnapshot, SessionsFeedFacetBucketString, SessionsFeedFacetBucketNumber, SessionsFeedFacetsSnapshot, ConversationFilter, ConversationCostSummary, ScanResult;
|
|
43
|
-
var init_types = __esmMin((() => {
|
|
44
|
-
IssueId = Schema.String;
|
|
45
|
-
AgentId = Schema.String;
|
|
46
|
-
SequenceNumber = Schema.Number;
|
|
47
|
-
AgentStatus = Schema.Literals([
|
|
48
|
-
"starting",
|
|
49
|
-
"running",
|
|
50
|
-
"stopped",
|
|
51
|
-
"error",
|
|
52
|
-
"unknown"
|
|
53
|
-
]);
|
|
54
|
-
Role = Schema.Literals([
|
|
55
|
-
"plan",
|
|
56
|
-
"work",
|
|
57
|
-
"review",
|
|
58
|
-
"test",
|
|
59
|
-
"ship",
|
|
60
|
-
"flywheel",
|
|
61
|
-
"strike",
|
|
62
|
-
"sequencer",
|
|
63
|
-
"knowledge"
|
|
64
|
-
]);
|
|
65
|
-
AgentResolution = Schema.Literals([
|
|
66
|
-
"working",
|
|
67
|
-
"done",
|
|
68
|
-
"needs_input",
|
|
69
|
-
"stuck",
|
|
70
|
-
"completed",
|
|
71
|
-
"unclear",
|
|
72
|
-
"abandoned",
|
|
73
|
-
"api_error"
|
|
74
|
-
]);
|
|
75
|
-
ReviewStatusValue = Schema.Literals([
|
|
76
|
-
"pending",
|
|
77
|
-
"reviewing",
|
|
78
|
-
"passed",
|
|
79
|
-
"failed",
|
|
80
|
-
"blocked",
|
|
81
|
-
"skipped"
|
|
82
|
-
]);
|
|
83
|
-
TestStatusValue = Schema.Literals([
|
|
84
|
-
"pending",
|
|
85
|
-
"testing",
|
|
86
|
-
"passed",
|
|
87
|
-
"failed",
|
|
88
|
-
"skipped",
|
|
89
|
-
"dispatch_failed"
|
|
90
|
-
]);
|
|
91
|
-
UatStatusValue = Schema.Literals([
|
|
92
|
-
"pending",
|
|
93
|
-
"testing",
|
|
94
|
-
"passed",
|
|
95
|
-
"failed"
|
|
96
|
-
]);
|
|
97
|
-
MergeStatusValue = Schema.Literals([
|
|
98
|
-
"pending",
|
|
99
|
-
"queued",
|
|
100
|
-
"merging",
|
|
101
|
-
"verifying",
|
|
102
|
-
"merged",
|
|
103
|
-
"failed"
|
|
104
|
-
]);
|
|
105
|
-
ReleaseStatusValue = Schema.Literals([
|
|
106
|
-
"pending",
|
|
107
|
-
"releasing",
|
|
108
|
-
"passed",
|
|
109
|
-
"failed",
|
|
110
|
-
"partial",
|
|
111
|
-
"rolled_back",
|
|
112
|
-
"skipped"
|
|
113
|
-
]);
|
|
114
|
-
VerificationStatusValue = Schema.Literals([
|
|
115
|
-
"pending",
|
|
116
|
-
"running",
|
|
117
|
-
"passed",
|
|
118
|
-
"failed",
|
|
119
|
-
"skipped"
|
|
120
|
-
]);
|
|
121
|
-
Activity = Schema.Literals([
|
|
122
|
-
"working",
|
|
123
|
-
"thinking",
|
|
124
|
-
"waiting",
|
|
125
|
-
"idle",
|
|
126
|
-
"stopped"
|
|
127
|
-
]);
|
|
128
|
-
WaitingReason = Schema.Literals([
|
|
129
|
-
"tool_permission",
|
|
130
|
-
"user_question",
|
|
131
|
-
"disambiguation",
|
|
132
|
-
"other"
|
|
133
|
-
]);
|
|
134
|
-
ClaudeChannelPermissionBehavior = Schema.Literals(["allow", "deny"]);
|
|
135
|
-
ThinkingState = Schema.Struct({
|
|
136
|
-
since: Schema.String,
|
|
137
|
-
lastToolAt: Schema.String
|
|
138
|
-
});
|
|
139
|
-
WaitingState = Schema.Struct({
|
|
140
|
-
reason: WaitingReason,
|
|
141
|
-
startedAt: Schema.String,
|
|
142
|
-
message: Schema.optional(Schema.String),
|
|
143
|
-
notificationSent: Schema.optional(Schema.Boolean)
|
|
144
|
-
});
|
|
145
|
-
CHANNEL_REPLY_KIND_VALUES = [
|
|
146
|
-
"status",
|
|
147
|
-
"done",
|
|
148
|
-
"needs_input"
|
|
149
|
-
];
|
|
150
|
-
MAX_CHANNEL_REPLY_SUMMARY_LENGTH = 4 * 1024;
|
|
151
|
-
CHANNEL_REPLY_ARTIFACT_URI_PATTERN = /^(?:file:\/\/|https:\/\/|\/)/;
|
|
152
|
-
ChannelReplyKind = Schema.Literals(CHANNEL_REPLY_KIND_VALUES);
|
|
153
|
-
ChannelReplyArtifactRef = Schema.Struct({
|
|
154
|
-
uri: Schema.String,
|
|
155
|
-
label: Schema.optional(Schema.String)
|
|
156
|
-
});
|
|
157
|
-
AgentChannelReply = Schema.Struct({
|
|
158
|
-
kind: ChannelReplyKind,
|
|
159
|
-
summary: Schema.String,
|
|
160
|
-
artifactRefs: Schema.Array(ChannelReplyArtifactRef),
|
|
161
|
-
reportedAt: Schema.String
|
|
162
|
-
});
|
|
163
|
-
AgentRuntimeSnapshot = Schema.Struct({
|
|
164
|
-
id: AgentId,
|
|
165
|
-
activity: Activity,
|
|
166
|
-
lastActivity: Schema.String,
|
|
167
|
-
currentTool: Schema.optional(Schema.String),
|
|
168
|
-
thinking: Schema.optional(ThinkingState),
|
|
169
|
-
waiting: Schema.optional(WaitingState),
|
|
170
|
-
claudeSessionId: Schema.optional(Schema.String),
|
|
171
|
-
sessionModel: Schema.optional(Schema.String),
|
|
172
|
-
sessionHarness: Schema.optional(Schema.String),
|
|
173
|
-
model: Schema.optional(Schema.String),
|
|
174
|
-
lastMessageAt: Schema.optional(Schema.String),
|
|
175
|
-
channelReply: Schema.optional(AgentChannelReply),
|
|
176
|
-
resolution: Schema.optional(AgentResolution),
|
|
177
|
-
resolutionCount: Schema.optional(Schema.Number),
|
|
178
|
-
resolutionUpdatedAt: Schema.optional(Schema.String),
|
|
179
|
-
currentIssue: Schema.optional(IssueId),
|
|
180
|
-
contextSaturatedAt: Schema.optional(Schema.String),
|
|
181
|
-
updatedAtSequence: SequenceNumber
|
|
182
|
-
});
|
|
183
|
-
ChannelPermissionRequestSnapshot = Schema.Struct({
|
|
184
|
-
requestId: Schema.String,
|
|
185
|
-
agentId: AgentId,
|
|
186
|
-
issueId: Schema.optional(IssueId),
|
|
187
|
-
toolName: Schema.String,
|
|
188
|
-
description: Schema.String,
|
|
189
|
-
inputPreview: Schema.String,
|
|
190
|
-
createdAt: Schema.String
|
|
191
|
-
});
|
|
192
|
-
AgentSnapshot = Schema.Struct({
|
|
193
|
-
id: AgentId,
|
|
194
|
-
issueId: IssueId,
|
|
195
|
-
workspace: Schema.optional(Schema.String),
|
|
196
|
-
runtime: Schema.optional(Schema.String),
|
|
197
|
-
model: Schema.optional(Schema.String),
|
|
198
|
-
status: AgentStatus,
|
|
199
|
-
startedAt: Schema.optional(Schema.String),
|
|
200
|
-
lastActivity: Schema.optional(Schema.String),
|
|
201
|
-
branch: Schema.optional(Schema.String),
|
|
202
|
-
costSoFar: Schema.optional(Schema.Number),
|
|
203
|
-
sessionId: Schema.optional(Schema.String),
|
|
204
|
-
role: Schema.optional(Role),
|
|
205
|
-
phase: Schema.optional(Schema.String),
|
|
206
|
-
workType: Schema.optional(Schema.String),
|
|
207
|
-
roleRunHead: Schema.optional(Schema.String),
|
|
208
|
-
hasLiveTmuxSession: Schema.optional(Schema.Boolean),
|
|
209
|
-
stoppedByUser: Schema.optional(Schema.Boolean),
|
|
210
|
-
paused: Schema.optional(Schema.Boolean),
|
|
211
|
-
pausedReason: Schema.optional(Schema.String),
|
|
212
|
-
pausedAt: Schema.optional(Schema.String),
|
|
213
|
-
troubled: Schema.optional(Schema.Boolean),
|
|
214
|
-
troubledAt: Schema.optional(Schema.String),
|
|
215
|
-
consecutiveFailures: Schema.optional(Schema.Number),
|
|
216
|
-
firstFailureInRunAt: Schema.optional(Schema.String),
|
|
217
|
-
lastFailureAt: Schema.optional(Schema.String),
|
|
218
|
-
lastFailureReason: Schema.optional(Schema.String),
|
|
219
|
-
lastFailureNextRetryAt: Schema.optional(Schema.String),
|
|
220
|
-
runtimeState: Schema.optional(Schema.String),
|
|
221
|
-
hasPendingQuestion: Schema.optional(Schema.Boolean),
|
|
222
|
-
pendingQuestionCount: Schema.optional(Schema.Number),
|
|
223
|
-
pendingQuestionPrompt: Schema.optional(Schema.String),
|
|
224
|
-
pendingQuestionReason: Schema.optional(Schema.String),
|
|
225
|
-
pendingInputCount: Schema.optional(Schema.Number),
|
|
226
|
-
pendingInputKinds: Schema.optional(Schema.Array(Schema.String)),
|
|
227
|
-
pendingAskUserQuestion: Schema.optional(Schema.Struct({
|
|
228
|
-
toolUseId: Schema.String,
|
|
229
|
-
askedAt: Schema.String,
|
|
230
|
-
questions: Schema.Array(Schema.Struct({
|
|
231
|
-
question: Schema.String,
|
|
232
|
-
header: Schema.optional(Schema.String),
|
|
233
|
-
multiSelect: Schema.optional(Schema.Boolean),
|
|
234
|
-
options: Schema.Array(Schema.Struct({
|
|
235
|
-
label: Schema.String,
|
|
236
|
-
description: Schema.optional(Schema.String)
|
|
237
|
-
}))
|
|
238
|
-
}))
|
|
239
|
-
})),
|
|
240
|
-
pendingProposedPlan: Schema.optional(Schema.Struct({
|
|
241
|
-
toolUseId: Schema.String,
|
|
242
|
-
askedAt: Schema.String,
|
|
243
|
-
plan: Schema.String
|
|
244
|
-
})),
|
|
245
|
-
resolution: Schema.optional(AgentResolution),
|
|
246
|
-
resolutionCount: Schema.optional(Schema.Number),
|
|
247
|
-
runtimeSnapshotSequence: Schema.optional(SequenceNumber)
|
|
248
|
-
});
|
|
249
|
-
ReviewStatusSnapshot = Schema.Struct({
|
|
250
|
-
issueId: IssueId,
|
|
251
|
-
reviewStatus: Schema.optional(ReviewStatusValue),
|
|
252
|
-
testStatus: Schema.optional(TestStatusValue),
|
|
253
|
-
uatStatus: Schema.optional(UatStatusValue),
|
|
254
|
-
uatNotes: Schema.optional(Schema.String),
|
|
255
|
-
mergeStatus: Schema.optional(MergeStatusValue),
|
|
256
|
-
releaseStatus: Schema.optional(ReleaseStatusValue),
|
|
257
|
-
releaseNotes: Schema.optional(Schema.String),
|
|
258
|
-
verificationStatus: Schema.optional(VerificationStatusValue),
|
|
259
|
-
verificationNotes: Schema.optional(Schema.String),
|
|
260
|
-
verificationCycleCount: Schema.optional(Schema.Number),
|
|
261
|
-
readyForMerge: Schema.optional(Schema.Boolean),
|
|
262
|
-
updatedAt: Schema.optional(Schema.String),
|
|
263
|
-
prUrl: Schema.optional(Schema.String),
|
|
264
|
-
/** Persistent stuck flag — set by divergence guard, cleared by /unstick */
|
|
265
|
-
stuck: Schema.optional(Schema.Boolean),
|
|
266
|
-
stuckReason: Schema.optional(Schema.String),
|
|
267
|
-
stuckAt: Schema.optional(Schema.String),
|
|
268
|
-
stuckDetails: Schema.optional(Schema.String),
|
|
269
|
-
/** Commit SHA at which review passed; deacon uses this to detect new pushes after review */
|
|
270
|
-
reviewedAtCommit: Schema.optional(Schema.String),
|
|
271
|
-
/** Commit SHA at which the pre-review verification gate last passed */
|
|
272
|
-
lastVerifiedCommit: Schema.optional(Schema.String),
|
|
273
|
-
/** Current merge pipeline step (granular visibility for the merge step tracker) */
|
|
274
|
-
mergeStep: Schema.optional(Schema.String),
|
|
275
|
-
/** PAN-699: timestamp when review agents were dispatched */
|
|
276
|
-
reviewSpawnedAt: Schema.optional(Schema.String),
|
|
277
|
-
/** PAN-699: number of test-agent dispatch retries */
|
|
278
|
-
testRetryCount: Schema.optional(Schema.Number),
|
|
279
|
-
/** PAN-794: parallel-review re-dispatch retry counter (current recovery cycle) */
|
|
280
|
-
reviewRetryCount: Schema.optional(Schema.Number),
|
|
281
|
-
/** PAN-796: review auto-requeue count (circuit breaker threshold) */
|
|
282
|
-
autoRequeueCount: Schema.optional(Schema.Number),
|
|
283
|
-
/** PAN-794: ISO timestamp marking the start of the current recovery cycle */
|
|
284
|
-
recoveryStartedAt: Schema.optional(Schema.String),
|
|
285
|
-
/** Human-requested patrol opt-out — when true, Deacon ignores this issue. */
|
|
286
|
-
deaconIgnored: Schema.optional(Schema.Boolean),
|
|
287
|
-
deaconIgnoredAt: Schema.optional(Schema.String),
|
|
288
|
-
deaconIgnoredReason: Schema.optional(Schema.String),
|
|
289
|
-
/** PAN-1691: per-issue auto-merge routing key. undefined = project default, true = auto-merge (fast lane), false = hold for UAT. */
|
|
290
|
-
autoMerge: Schema.optional(Schema.Boolean),
|
|
291
|
-
/** Active review orchestrator tmux session name (e.g. agent-pan-540-review). */
|
|
292
|
-
reviewCoordinatorSessionName: Schema.optional(Schema.String),
|
|
293
|
-
/** Active review sub-role tmux session names (e.g. agent-pan-540-review-correctness). Discovered at emission time. */
|
|
294
|
-
reviewSessionNames: Schema.optional(Schema.Array(Schema.String)),
|
|
295
|
-
/** Per-role review completion status (keyed by role: 'correctness' | 'security' | ...) */
|
|
296
|
-
reviewSubStatuses: Schema.optional(Schema.Record(Schema.String, Schema.Literals(["running", "done"]))),
|
|
297
|
-
/** PAN-905: queue position in the merge queue */
|
|
298
|
-
queuePosition: Schema.optional(Schema.Number),
|
|
299
|
-
/** PAN-905: currently active specialist (e.g. 'merge-agent') */
|
|
300
|
-
activeSpecialist: Schema.optional(Schema.String),
|
|
301
|
-
/** PAN-905: number of merge retries attempted */
|
|
302
|
-
mergeRetryCount: Schema.optional(Schema.Number),
|
|
303
|
-
/** PAN-905: free-form notes about the merge attempt */
|
|
304
|
-
mergeNotes: Schema.optional(Schema.String),
|
|
305
|
-
/** PAN-905: GitHub-native merge blocker reasons */
|
|
306
|
-
blockerReasons: Schema.optional(Schema.Array(Schema.Struct({
|
|
307
|
-
type: Schema.Literals([
|
|
308
|
-
"failing_checks",
|
|
309
|
-
"merge_conflict",
|
|
310
|
-
"unresolved_conversations",
|
|
311
|
-
"changes_requested",
|
|
312
|
-
"draft_pr",
|
|
313
|
-
"not_mergeable"
|
|
314
|
-
]),
|
|
315
|
-
summary: Schema.String,
|
|
316
|
-
details: Schema.optional(Schema.String),
|
|
317
|
-
detectedAt: Schema.String
|
|
318
|
-
})))
|
|
319
|
-
});
|
|
320
|
-
TurnDiffFileChange = Schema.Struct({
|
|
321
|
-
path: Schema.String,
|
|
322
|
-
kind: Schema.optional(Schema.String),
|
|
323
|
-
additions: Schema.optional(Schema.Number),
|
|
324
|
-
deletions: Schema.optional(Schema.Number)
|
|
325
|
-
});
|
|
326
|
-
Schema.Struct({
|
|
327
|
-
turnId: Schema.String,
|
|
328
|
-
completedAt: Schema.String,
|
|
329
|
-
status: Schema.optional(Schema.String),
|
|
330
|
-
files: Schema.Array(TurnDiffFileChange),
|
|
331
|
-
checkpointRef: Schema.optional(Schema.String),
|
|
332
|
-
assistantMessageId: Schema.optional(Schema.String),
|
|
333
|
-
checkpointTurnCount: Schema.optional(Schema.Number)
|
|
334
|
-
});
|
|
335
|
-
ScanProgressSnapshot = Schema.Struct({
|
|
336
|
-
active: Schema.Boolean,
|
|
337
|
-
mode: Schema.Literals([
|
|
338
|
-
"targeted",
|
|
339
|
-
"watched",
|
|
340
|
-
"system"
|
|
341
|
-
]),
|
|
342
|
-
dirs: Schema.Array(Schema.String),
|
|
343
|
-
dirsProcessed: Schema.Number,
|
|
344
|
-
dirsTotal: Schema.Number,
|
|
345
|
-
sessionsFound: Schema.Number,
|
|
346
|
-
elapsedMs: Schema.Number,
|
|
347
|
-
inserted: Schema.Number,
|
|
348
|
-
updated: Schema.Number,
|
|
349
|
-
skipped: Schema.Number,
|
|
350
|
-
errors: Schema.Number,
|
|
351
|
-
durationMs: Schema.Number
|
|
352
|
-
});
|
|
353
|
-
EnrichStatsSnapshot = Schema.Struct({
|
|
354
|
-
processed: Schema.Number,
|
|
355
|
-
totalCost: Schema.Number,
|
|
356
|
-
failures: Schema.Number,
|
|
357
|
-
durationMs: Schema.Number
|
|
358
|
-
});
|
|
359
|
-
EnrichProgressSnapshot = Schema.Struct({
|
|
360
|
-
sessionId: Schema.Number,
|
|
361
|
-
level: Schema.Number,
|
|
362
|
-
model: Schema.String,
|
|
363
|
-
cost: Schema.Number,
|
|
364
|
-
success: Schema.Boolean,
|
|
365
|
-
error: Schema.optional(Schema.String),
|
|
366
|
-
timestamp: Schema.String
|
|
367
|
-
});
|
|
368
|
-
EmbedProgressSnapshot = Schema.Struct({
|
|
369
|
-
sessionId: Schema.Number,
|
|
370
|
-
model: Schema.String,
|
|
371
|
-
success: Schema.Boolean,
|
|
372
|
-
error: Schema.optional(Schema.String),
|
|
373
|
-
timestamp: Schema.String
|
|
374
|
-
});
|
|
375
|
-
DashboardSnapshot = Schema.Struct({
|
|
376
|
-
sequence: SequenceNumber,
|
|
377
|
-
agents: Schema.Array(AgentSnapshot),
|
|
378
|
-
specialists: Schema.Array(Schema.Unknown),
|
|
379
|
-
reviewStatuses: Schema.Array(ReviewStatusSnapshot),
|
|
380
|
-
issues: Schema.Array(Schema.Unknown),
|
|
381
|
-
recentActivity: Schema.optional(Schema.Array(Schema.Unknown)),
|
|
382
|
-
resources: Schema.optional(Schema.Unknown),
|
|
383
|
-
memory: Schema.optional(Schema.Unknown),
|
|
384
|
-
agentRuntimeById: Schema.optional(Schema.Record(Schema.String, AgentRuntimeSnapshot)),
|
|
385
|
-
channelPermissionRequests: Schema.optional(Schema.Array(ChannelPermissionRequestSnapshot)),
|
|
386
|
-
scanProgress: Schema.optional(Schema.NullOr(ScanProgressSnapshot)),
|
|
387
|
-
enrichStats: Schema.optional(Schema.NullOr(EnrichStatsSnapshot)),
|
|
388
|
-
enrichProgressBySessionId: Schema.optional(Schema.Record(Schema.String, EnrichProgressSnapshot)),
|
|
389
|
-
embedProgressBySessionId: Schema.optional(Schema.Record(Schema.String, EmbedProgressSnapshot)),
|
|
390
|
-
timestamp: Schema.String
|
|
391
|
-
});
|
|
392
|
-
WorkspaceDetail = Schema.Struct({
|
|
393
|
-
workspace: Schema.Unknown,
|
|
394
|
-
reviewStatus: Schema.Unknown,
|
|
395
|
-
planning: Schema.Unknown,
|
|
396
|
-
costs: Schema.Unknown,
|
|
397
|
-
agentOutput: Schema.Array(Schema.String)
|
|
398
|
-
});
|
|
399
|
-
ResourceStats = Schema.Struct({ containers: Schema.Array(Schema.Struct({
|
|
400
|
-
name: Schema.String,
|
|
401
|
-
cpu: Schema.optional(Schema.String),
|
|
402
|
-
mem: Schema.optional(Schema.String),
|
|
403
|
-
status: Schema.optional(Schema.String)
|
|
404
|
-
})) });
|
|
405
|
-
SessionNodePresence = Schema.Literals([
|
|
406
|
-
"active",
|
|
407
|
-
"idle",
|
|
408
|
-
"suspended",
|
|
409
|
-
"ended"
|
|
410
|
-
]);
|
|
411
|
-
SessionNodeType = Schema.Literals([
|
|
412
|
-
"planning",
|
|
413
|
-
"work",
|
|
414
|
-
"knowledge",
|
|
415
|
-
"strike",
|
|
416
|
-
"lint",
|
|
417
|
-
"review",
|
|
418
|
-
"reviewer",
|
|
419
|
-
"test",
|
|
420
|
-
"ship",
|
|
421
|
-
"merge",
|
|
422
|
-
"legacy"
|
|
423
|
-
]);
|
|
424
|
-
ReviewerRoundSummary = Schema.Struct({
|
|
425
|
-
round: Schema.Number,
|
|
426
|
-
status: Schema.optional(Schema.String),
|
|
427
|
-
reviewResult: Schema.optional(Schema.String),
|
|
428
|
-
startedAt: Schema.optional(Schema.String),
|
|
429
|
-
endedAt: Schema.optional(Schema.String),
|
|
430
|
-
durationSec: Schema.optional(Schema.Number),
|
|
431
|
-
cost: Schema.optional(Schema.Number),
|
|
432
|
-
findings: Schema.optional(Schema.Number),
|
|
433
|
-
summary: Schema.optional(Schema.String)
|
|
434
|
-
});
|
|
435
|
-
ReviewerRoundMetadata = Schema.Struct({
|
|
436
|
-
roundCount: Schema.Number,
|
|
437
|
-
latestRound: Schema.Number,
|
|
438
|
-
latestStatus: Schema.optional(Schema.String),
|
|
439
|
-
latestReviewResult: Schema.optional(Schema.String),
|
|
440
|
-
history: Schema.Array(ReviewerRoundSummary)
|
|
441
|
-
});
|
|
442
|
-
ModelOriginEntry = Schema.Struct({
|
|
443
|
-
model: Schema.String,
|
|
444
|
-
weight: Schema.Number,
|
|
445
|
-
lo: Schema.Number,
|
|
446
|
-
hi: Schema.Number,
|
|
447
|
-
chosen: Schema.Boolean
|
|
448
|
-
});
|
|
449
|
-
ModelOrigin = Schema.Struct({
|
|
450
|
-
spawnKey: Schema.String,
|
|
451
|
-
resolved: Schema.String,
|
|
452
|
-
bucket: Schema.Number,
|
|
453
|
-
total: Schema.Number,
|
|
454
|
-
distribution: Schema.Array(ModelOriginEntry)
|
|
455
|
-
});
|
|
456
|
-
SessionNode = Schema.Struct({
|
|
457
|
-
type: SessionNodeType,
|
|
458
|
-
role: Schema.optional(Schema.String),
|
|
459
|
-
sessionId: Schema.String,
|
|
460
|
-
tmuxSession: Schema.optional(Schema.String),
|
|
461
|
-
model: Schema.String,
|
|
462
|
-
harness: Schema.optional(Schema.String),
|
|
463
|
-
startedAt: Schema.String,
|
|
464
|
-
endedAt: Schema.optional(Schema.String),
|
|
465
|
-
planningComplete: Schema.optional(Schema.Boolean),
|
|
466
|
-
duration: Schema.NullOr(Schema.Number),
|
|
467
|
-
status: AgentStatus,
|
|
468
|
-
hasJsonl: Schema.optional(Schema.Boolean),
|
|
469
|
-
transcript: Schema.optional(Schema.String),
|
|
470
|
-
presence: SessionNodePresence,
|
|
471
|
-
awaitingInput: Schema.optional(Schema.Boolean),
|
|
472
|
-
awaitingInputPrompt: Schema.optional(Schema.String),
|
|
473
|
-
awaitingInputReason: Schema.optional(Schema.String),
|
|
474
|
-
/** Which blocking surfaces are open — names the wait in the node's indicator. */
|
|
475
|
-
pendingInputKinds: Schema.optional(Schema.Array(Schema.String)),
|
|
476
|
-
roundMetadata: Schema.optional(ReviewerRoundMetadata),
|
|
477
|
-
deliveryMethod: Schema.optional(Schema.Literals([
|
|
478
|
-
"auto",
|
|
479
|
-
"channels",
|
|
480
|
-
"tmux"
|
|
481
|
-
])),
|
|
482
|
-
paused: Schema.optional(Schema.Boolean),
|
|
483
|
-
pausedReason: Schema.optional(Schema.String),
|
|
484
|
-
pausedAt: Schema.optional(Schema.String),
|
|
485
|
-
troubled: Schema.optional(Schema.Boolean),
|
|
486
|
-
troubledAt: Schema.optional(Schema.String),
|
|
487
|
-
troubledReason: Schema.optional(Schema.String),
|
|
488
|
-
consecutiveFailures: Schema.optional(Schema.Number),
|
|
489
|
-
queuedMailCount: Schema.optional(Schema.Number),
|
|
490
|
-
modelOrigin: Schema.optional(ModelOrigin)
|
|
491
|
-
});
|
|
492
|
-
FeatureNode = Schema.Struct({
|
|
493
|
-
issueId: IssueId,
|
|
494
|
-
title: Schema.String,
|
|
495
|
-
sessions: Schema.Array(SessionNode)
|
|
496
|
-
});
|
|
497
|
-
Schema.Struct({
|
|
498
|
-
projectKey: Schema.String,
|
|
499
|
-
features: Schema.Array(FeatureNode)
|
|
500
|
-
});
|
|
501
|
-
DiscoveredSessionSnapshot = Schema.Struct({
|
|
502
|
-
id: Schema.Number,
|
|
503
|
-
jsonlPath: Schema.String,
|
|
504
|
-
harness: Schema.optional(Schema.String),
|
|
505
|
-
sessionId: Schema.optional(Schema.String),
|
|
506
|
-
workspacePath: Schema.optional(Schema.String),
|
|
507
|
-
workspaceHash: Schema.optional(Schema.String),
|
|
508
|
-
messageCount: Schema.Number,
|
|
509
|
-
firstTs: Schema.optional(Schema.String),
|
|
510
|
-
lastTs: Schema.optional(Schema.String),
|
|
511
|
-
modelsUsed: Schema.Array(Schema.String),
|
|
512
|
-
primaryModel: Schema.optional(Schema.String),
|
|
513
|
-
tokenInput: Schema.Number,
|
|
514
|
-
tokenOutput: Schema.Number,
|
|
515
|
-
estimatedCost: Schema.Number,
|
|
516
|
-
toolsUsed: Schema.Array(Schema.String),
|
|
517
|
-
filesTouched: Schema.Array(Schema.String),
|
|
518
|
-
tags: Schema.Array(Schema.String),
|
|
519
|
-
summary: Schema.optional(Schema.String),
|
|
520
|
-
summaryDetailed: Schema.optional(Schema.String),
|
|
521
|
-
conversationId: Schema.optional(Schema.String),
|
|
522
|
-
conversationName: Schema.optional(Schema.String),
|
|
523
|
-
conversationTitle: Schema.optional(Schema.String),
|
|
524
|
-
enrichmentLevel: Schema.Number,
|
|
525
|
-
enrichmentModel: Schema.optional(Schema.String),
|
|
526
|
-
enrichedAt: Schema.optional(Schema.String),
|
|
527
|
-
enrichmentFailed: Schema.Boolean,
|
|
528
|
-
overdeckManaged: Schema.Boolean,
|
|
529
|
-
panIssueId: Schema.optional(Schema.String),
|
|
530
|
-
panAgentId: Schema.optional(Schema.String),
|
|
531
|
-
scannedAt: Schema.String
|
|
532
|
-
});
|
|
533
|
-
SessionsFeedSource = Schema.Literals(["discovered", "managed-archived"]);
|
|
534
|
-
SessionsFeedRowSnapshot = Schema.Struct({
|
|
535
|
-
id: Schema.Number,
|
|
536
|
-
source: SessionsFeedSource,
|
|
537
|
-
discoveredId: Schema.optional(Schema.Number),
|
|
538
|
-
jsonlPath: Schema.optional(Schema.String),
|
|
539
|
-
sessionId: Schema.optional(Schema.String),
|
|
540
|
-
workspacePath: Schema.optional(Schema.String),
|
|
541
|
-
messageCount: Schema.Number,
|
|
542
|
-
firstTs: Schema.optional(Schema.String),
|
|
543
|
-
lastTs: Schema.optional(Schema.String),
|
|
544
|
-
primaryModel: Schema.optional(Schema.String),
|
|
545
|
-
tokenInput: Schema.Number,
|
|
546
|
-
tokenOutput: Schema.Number,
|
|
547
|
-
estimatedCost: Schema.Number,
|
|
548
|
-
tags: Schema.Array(Schema.String),
|
|
549
|
-
summary: Schema.optional(Schema.String),
|
|
550
|
-
enrichmentLevel: Schema.Number,
|
|
551
|
-
enrichmentFailed: Schema.Boolean,
|
|
552
|
-
overdeckManaged: Schema.Boolean,
|
|
553
|
-
panIssueId: Schema.optional(Schema.String),
|
|
554
|
-
archivedAt: Schema.optional(Schema.String),
|
|
555
|
-
conversationId: Schema.optional(Schema.String),
|
|
556
|
-
conversationName: Schema.optional(Schema.String),
|
|
557
|
-
conversationTitle: Schema.optional(Schema.String),
|
|
558
|
-
harness: Schema.optional(Schema.String)
|
|
559
|
-
});
|
|
560
|
-
SessionsFeedFacetBucketString = Schema.Struct({
|
|
561
|
-
value: Schema.String,
|
|
562
|
-
count: Schema.Number
|
|
563
|
-
});
|
|
564
|
-
SessionsFeedFacetBucketNumber = Schema.Struct({
|
|
565
|
-
value: Schema.Number,
|
|
566
|
-
count: Schema.Number
|
|
567
|
-
});
|
|
568
|
-
SessionsFeedFacetsSnapshot = Schema.Struct({
|
|
569
|
-
primaryModels: Schema.Array(SessionsFeedFacetBucketString),
|
|
570
|
-
tags: Schema.Array(SessionsFeedFacetBucketString),
|
|
571
|
-
tools: Schema.Array(SessionsFeedFacetBucketString),
|
|
572
|
-
files: Schema.Array(SessionsFeedFacetBucketString),
|
|
573
|
-
enrichmentLevels: Schema.Array(SessionsFeedFacetBucketNumber),
|
|
574
|
-
timeBuckets: Schema.Array(Schema.Struct({
|
|
575
|
-
value: Schema.Literals([
|
|
576
|
-
"24h",
|
|
577
|
-
"7d",
|
|
578
|
-
"30d",
|
|
579
|
-
"older"
|
|
580
|
-
]),
|
|
581
|
-
count: Schema.Number
|
|
582
|
-
})),
|
|
583
|
-
costBuckets: Schema.Array(Schema.Struct({
|
|
584
|
-
value: Schema.Literals([
|
|
585
|
-
"<$0.10",
|
|
586
|
-
"$0.10-1",
|
|
587
|
-
"$1-10",
|
|
588
|
-
">$10"
|
|
589
|
-
]),
|
|
590
|
-
count: Schema.Number
|
|
591
|
-
})),
|
|
592
|
-
sources: Schema.Array(Schema.Struct({
|
|
593
|
-
value: SessionsFeedSource,
|
|
594
|
-
count: Schema.Number
|
|
595
|
-
}))
|
|
596
|
-
});
|
|
597
|
-
ConversationFilter = Schema.Struct({
|
|
598
|
-
harness: Schema.optional(Schema.String),
|
|
599
|
-
workspacePath: Schema.optional(Schema.String),
|
|
600
|
-
primaryModel: Schema.optional(Schema.String),
|
|
601
|
-
managed: Schema.optional(Schema.Boolean),
|
|
602
|
-
unmanaged: Schema.optional(Schema.Boolean),
|
|
603
|
-
since: Schema.optional(Schema.String),
|
|
604
|
-
before: Schema.optional(Schema.String),
|
|
605
|
-
after: Schema.optional(Schema.String),
|
|
606
|
-
minCost: Schema.optional(Schema.Number),
|
|
607
|
-
maxCost: Schema.optional(Schema.Number),
|
|
608
|
-
minMessages: Schema.optional(Schema.Number),
|
|
609
|
-
tags: Schema.optional(Schema.Array(Schema.String)),
|
|
610
|
-
tools: Schema.optional(Schema.Array(Schema.String)),
|
|
611
|
-
files: Schema.optional(Schema.Array(Schema.String)),
|
|
612
|
-
issueId: Schema.optional(Schema.String),
|
|
613
|
-
enrichmentLevel: Schema.optional(Schema.Number),
|
|
614
|
-
enriched: Schema.optional(Schema.Boolean),
|
|
615
|
-
notEnriched: Schema.optional(Schema.Boolean),
|
|
616
|
-
query: Schema.optional(Schema.String),
|
|
617
|
-
semantic: Schema.optional(Schema.Boolean),
|
|
618
|
-
similarTo: Schema.optional(Schema.Number),
|
|
619
|
-
limit: Schema.optional(Schema.Number),
|
|
620
|
-
offset: Schema.optional(Schema.Number),
|
|
621
|
-
format: Schema.optional(Schema.Literals([
|
|
622
|
-
"table",
|
|
623
|
-
"json",
|
|
624
|
-
"brief",
|
|
625
|
-
"ids"
|
|
626
|
-
]))
|
|
627
|
-
});
|
|
628
|
-
ConversationCostSummary = Schema.Struct({
|
|
629
|
-
groupBy: Schema.Literals([
|
|
630
|
-
"workspace",
|
|
631
|
-
"model",
|
|
632
|
-
"day",
|
|
633
|
-
"month"
|
|
634
|
-
]),
|
|
635
|
-
entries: Schema.Array(Schema.Struct({
|
|
636
|
-
key: Schema.String,
|
|
637
|
-
totalCost: Schema.Number,
|
|
638
|
-
sessionCount: Schema.Number,
|
|
639
|
-
totalTokensIn: Schema.Number,
|
|
640
|
-
totalTokensOut: Schema.Number
|
|
641
|
-
})),
|
|
642
|
-
grandTotal: Schema.Number,
|
|
643
|
-
totalTokensIn: Schema.Number,
|
|
644
|
-
totalTokensOut: Schema.Number
|
|
645
|
-
});
|
|
646
|
-
ScanResult = Schema.Struct({
|
|
647
|
-
inserted: Schema.Number,
|
|
648
|
-
updated: Schema.Number,
|
|
649
|
-
skipped: Schema.Number,
|
|
650
|
-
errors: Schema.Number,
|
|
651
|
-
durationMs: Schema.Number
|
|
652
|
-
});
|
|
653
|
-
})), MemoryIdentity, MemoryTokenUsage, MemoryObservation, MemoryStatusPhase, MemoryStatus, ResetMarkerScope, ResetMarker, RagDecisionSource, RagDecision, ExtractionProviderTarget;
|
|
654
|
-
var init_memory = __esmMin((() => {
|
|
655
|
-
init_types();
|
|
656
|
-
MemoryIdentity = Schema.Struct({
|
|
657
|
-
projectId: Schema.String,
|
|
658
|
-
workspaceId: Schema.String,
|
|
659
|
-
issueId: IssueId,
|
|
660
|
-
runId: Schema.String,
|
|
661
|
-
sessionId: Schema.String,
|
|
662
|
-
agentRole: Role,
|
|
663
|
-
agentHarness: Schema.String
|
|
664
|
-
});
|
|
665
|
-
MemoryTokenUsage = Schema.Struct({
|
|
666
|
-
prompt: Schema.Number,
|
|
667
|
-
completion: Schema.Number,
|
|
668
|
-
total: Schema.Number
|
|
669
|
-
});
|
|
670
|
-
MemoryObservation = Schema.Struct({
|
|
671
|
-
id: Schema.String,
|
|
672
|
-
timestamp: Schema.String,
|
|
673
|
-
projectId: Schema.String,
|
|
674
|
-
workspaceId: Schema.String,
|
|
675
|
-
issueId: IssueId,
|
|
676
|
-
runId: Schema.String,
|
|
677
|
-
sessionId: Schema.String,
|
|
678
|
-
agentRole: Role,
|
|
679
|
-
agentHarness: Schema.String,
|
|
680
|
-
gitBranch: Schema.String,
|
|
681
|
-
sourceTranscriptOffset: Schema.Number,
|
|
682
|
-
actionStatus: Schema.NullOr(Schema.String),
|
|
683
|
-
narrative: Schema.String,
|
|
684
|
-
summary: Schema.String,
|
|
685
|
-
files: Schema.Array(Schema.String),
|
|
686
|
-
tags: Schema.Array(Schema.String),
|
|
687
|
-
tokens: MemoryTokenUsage,
|
|
688
|
-
model: Schema.String
|
|
689
|
-
});
|
|
690
|
-
MemoryStatusPhase = Schema.Literals([
|
|
691
|
-
"exploring",
|
|
692
|
-
"planning",
|
|
693
|
-
"building",
|
|
694
|
-
"verifying",
|
|
695
|
-
"cleaning",
|
|
696
|
-
"shipping"
|
|
697
|
-
]);
|
|
698
|
-
MemoryStatus = Schema.Struct({
|
|
699
|
-
name: Schema.String,
|
|
700
|
-
headline: Schema.String,
|
|
701
|
-
summary: Schema.String,
|
|
702
|
-
goal: Schema.NullOr(Schema.String),
|
|
703
|
-
phase: MemoryStatusPhase,
|
|
704
|
-
accomplished: Schema.Array(Schema.String),
|
|
705
|
-
decided: Schema.Array(Schema.String),
|
|
706
|
-
open: Schema.Array(Schema.String),
|
|
707
|
-
nextSteps: Schema.Array(Schema.String),
|
|
708
|
-
confidence: Schema.Number,
|
|
709
|
-
workingSet: Schema.Array(Schema.String),
|
|
710
|
-
tags: Schema.Array(Schema.String)
|
|
711
|
-
});
|
|
712
|
-
Schema.Struct({
|
|
713
|
-
id: Schema.String,
|
|
714
|
-
createdAt: Schema.String,
|
|
715
|
-
identity: MemoryIdentity,
|
|
716
|
-
trigger: Schema.Literals([
|
|
717
|
-
"stop-hook",
|
|
718
|
-
"poller",
|
|
719
|
-
"reconciliation",
|
|
720
|
-
"manual"
|
|
721
|
-
]),
|
|
722
|
-
transcriptPath: Schema.String,
|
|
723
|
-
fromOffset: Schema.Number,
|
|
724
|
-
toOffset: Schema.Number,
|
|
725
|
-
lastFullLineOffset: Schema.Number,
|
|
726
|
-
eventsConsumed: Schema.Number,
|
|
727
|
-
compressedText: Schema.String
|
|
728
|
-
});
|
|
729
|
-
ResetMarkerScope = Schema.Literals([
|
|
730
|
-
"project",
|
|
731
|
-
"workspace",
|
|
732
|
-
"issue",
|
|
733
|
-
"session"
|
|
734
|
-
]);
|
|
735
|
-
ResetMarker = Schema.Struct({
|
|
736
|
-
id: Schema.String,
|
|
737
|
-
scope: ResetMarkerScope,
|
|
738
|
-
scopeId: Schema.String,
|
|
739
|
-
fromTimestamp: Schema.String,
|
|
740
|
-
reason: Schema.String,
|
|
741
|
-
createdAt: Schema.String
|
|
742
|
-
});
|
|
743
|
-
RagDecisionSource = Schema.Struct({
|
|
744
|
-
id: Schema.String,
|
|
745
|
-
docType: Schema.Literals([
|
|
746
|
-
"observation",
|
|
747
|
-
"summary",
|
|
748
|
-
"status",
|
|
749
|
-
"sibling",
|
|
750
|
-
"knowledge"
|
|
751
|
-
]),
|
|
752
|
-
scope: Schema.String,
|
|
753
|
-
score: Schema.Number,
|
|
754
|
-
tokens: Schema.Number
|
|
755
|
-
});
|
|
756
|
-
RagDecision = Schema.Struct({
|
|
757
|
-
id: Schema.String,
|
|
758
|
-
timestamp: Schema.String,
|
|
759
|
-
identity: MemoryIdentity,
|
|
760
|
-
surface: Schema.Literals(["spawn", "user-prompt"]),
|
|
761
|
-
outcome: Schema.Literals([
|
|
762
|
-
"injected",
|
|
763
|
-
"skipped",
|
|
764
|
-
"no-hits",
|
|
765
|
-
"expansion-failed",
|
|
766
|
-
"context-too-large",
|
|
767
|
-
"budget-truncated"
|
|
768
|
-
]),
|
|
769
|
-
query: Schema.String,
|
|
770
|
-
expandedTerms: Schema.Array(Schema.String),
|
|
771
|
-
allocations: Schema.Struct({
|
|
772
|
-
status: Schema.Number,
|
|
773
|
-
observations: Schema.Number,
|
|
774
|
-
summaries: Schema.Number,
|
|
775
|
-
sibling: Schema.Number,
|
|
776
|
-
knowledgeIndex: Schema.Number
|
|
777
|
-
}),
|
|
778
|
-
sources: Schema.Array(RagDecisionSource),
|
|
779
|
-
reason: Schema.NullOr(Schema.String)
|
|
780
|
-
});
|
|
781
|
-
ExtractionProviderTarget = Schema.Struct({
|
|
782
|
-
provider: Schema.String,
|
|
783
|
-
model: Schema.String
|
|
784
|
-
});
|
|
785
|
-
Schema.Struct({
|
|
786
|
-
provider: Schema.String,
|
|
787
|
-
model: Schema.String,
|
|
788
|
-
providerEnvVar: Schema.optional(Schema.String),
|
|
789
|
-
modelEnvVar: Schema.optional(Schema.String),
|
|
790
|
-
perDayCostCapUsd: Schema.Number,
|
|
791
|
-
fallbackChain: Schema.Array(ExtractionProviderTarget)
|
|
792
|
-
});
|
|
793
|
-
}));
|
|
794
|
-
//#endregion
|
|
795
|
-
//#region ../../../packages/contracts/src/system-health.ts
|
|
796
|
-
/**
|
|
797
|
-
* Shared V2 system-health contract. Domain measurements use null for unavailable
|
|
798
|
-
* evidence, unknown enum values decode to safe unavailable/unknown states, and
|
|
799
|
-
* the legacy summary is a compatibility projection from the accepted V2 snapshot.
|
|
800
|
-
*/
|
|
801
|
-
function isWorkAgent(agent) {
|
|
802
|
-
return agent.kind === "work" || agent.role === "work";
|
|
803
|
-
}
|
|
804
|
-
function isPlanningAgent(agent) {
|
|
805
|
-
return agent.kind === "planning" || agent.role === "plan" || agent.role === "planning";
|
|
806
|
-
}
|
|
807
|
-
function isSpecialistAgent(agent) {
|
|
808
|
-
return agent.kind === "specialist" || agent.role === "review" || agent.role?.startsWith("review-") === true || agent.role === "test" || agent.role === "ship";
|
|
809
|
-
}
|
|
810
|
-
function projectWebhookRelay(services) {
|
|
811
|
-
const relay = services.find((service) => service.id === "smee-relay" || service.id === "webhook-relay");
|
|
812
|
-
if (!relay) return {
|
|
813
|
-
configured: false,
|
|
814
|
-
running: false,
|
|
815
|
-
status: "unknown",
|
|
816
|
-
message: "Webhook relay health is unavailable."
|
|
817
|
-
};
|
|
818
|
-
const status = relay.status === "running" || relay.status === "not_configured" || relay.status === "stopped" ? relay.status : "unknown";
|
|
819
|
-
return {
|
|
820
|
-
configured: relay.status !== "not_configured",
|
|
821
|
-
running: relay.status === "running",
|
|
822
|
-
status,
|
|
823
|
-
message: relay.message
|
|
824
|
-
};
|
|
825
|
-
}
|
|
826
|
-
/**
|
|
827
|
-
* Projects the V2 domains into the legacy summary without recollecting state.
|
|
828
|
-
* Diagnostic-only swap and virtual-commitment values remain visible here but
|
|
829
|
-
* do not participate in V2 health-state evaluation.
|
|
830
|
-
*/
|
|
831
|
-
function projectLegacySystemHealthSummary(snapshot) {
|
|
832
|
-
const metrics = snapshot.host.metrics;
|
|
833
|
-
const agentMemoryBytes = snapshot.agents.reduce((total, agent) => total + (agent.memoryBytes ?? 0), 0);
|
|
834
|
-
const containers = snapshot.topConsumers.filter((consumer) => consumer.type === "container");
|
|
835
|
-
const containerMemoryBytes = containers.reduce((total, consumer) => total + consumer.memoryBytes, 0);
|
|
836
|
-
const overdeckMemoryBytes = agentMemoryBytes + containerMemoryBytes;
|
|
837
|
-
const totalMemoryBytes = metrics.totalMemoryBytes ?? 0;
|
|
838
|
-
return {
|
|
839
|
-
cpuPercent: metrics.cpuPercent ?? 0,
|
|
840
|
-
loadAverage1m: metrics.loadAverage1m ?? 0,
|
|
841
|
-
loadPerCore1m: metrics.loadPerCore1m ?? 0,
|
|
842
|
-
totalMemoryBytes,
|
|
843
|
-
usedMemoryBytes: metrics.usedMemoryBytes ?? 0,
|
|
844
|
-
availableMemoryBytes: metrics.availableMemoryBytes ?? 0,
|
|
845
|
-
memoryUsedPercent: metrics.memoryUsedPercent ?? 0,
|
|
846
|
-
swapTotalBytes: metrics.swapTotalBytes ?? 0,
|
|
847
|
-
swapUsedBytes: metrics.swapUsedBytes ?? 0,
|
|
848
|
-
swapUsedPercent: metrics.swapUsedPercent ?? 0,
|
|
849
|
-
committedMemoryBytes: metrics.committedMemoryBytes ?? 0,
|
|
850
|
-
commitLimitBytes: metrics.commitLimitBytes ?? 0,
|
|
851
|
-
overcommitPercent: metrics.virtualCommitmentPercent ?? 0,
|
|
852
|
-
agentCount: snapshot.agents.length,
|
|
853
|
-
workAgentCount: snapshot.agents.filter(isWorkAgent).length,
|
|
854
|
-
planningAgentCount: snapshot.agents.filter(isPlanningAgent).length,
|
|
855
|
-
specialistSessionCount: snapshot.agents.filter(isSpecialistAgent).length,
|
|
856
|
-
leakedSpecialistCount: snapshot.agents.filter((agent) => isSpecialistAgent(agent) && agent.lifecycle === "orphaned").length,
|
|
857
|
-
containerCount: containers.length,
|
|
858
|
-
containerMemoryBytes,
|
|
859
|
-
overdeckMemoryBytes,
|
|
860
|
-
overdeckMemoryPercent: totalMemoryBytes > 0 ? Math.round(overdeckMemoryBytes / totalMemoryBytes * 1e3) / 10 : 0,
|
|
861
|
-
smeeRelay: projectWebhookRelay(snapshot.services)
|
|
862
|
-
};
|
|
863
|
-
}
|
|
864
|
-
var HealthStateValue, HealthState, HealthReason, HostPlatform, HostHealthMetrics, AdmissionState, AgentHealthStatus, AgentHealthKind, SpecialistLifecycle, AgentHealthSnapshot, ServiceHealthStatus, ServiceHealthSnapshot, SystemHealthConsumer, LegacyWebhookRelaySummary, LegacySystemHealthSummary, SystemHealthSnapshot;
|
|
865
|
-
var init_system_health = __esmMin((() => {
|
|
866
|
-
HealthStateValue = Schema.Literals([
|
|
867
|
-
"measuring",
|
|
868
|
-
"healthy",
|
|
869
|
-
"warning",
|
|
870
|
-
"critical",
|
|
871
|
-
"unavailable"
|
|
872
|
-
]);
|
|
873
|
-
HealthState = Schema.String.pipe(Schema.decodeTo(HealthStateValue, {
|
|
874
|
-
decode: SchemaGetter.transform((value) => HealthStateValue.literals.includes(value) ? value : "unavailable"),
|
|
875
|
-
encode: SchemaGetter.transform((value) => value)
|
|
876
|
-
}));
|
|
877
|
-
HealthReason = Schema.Struct({
|
|
878
|
-
code: Schema.String,
|
|
879
|
-
domain: Schema.Literals([
|
|
880
|
-
"host",
|
|
881
|
-
"admission",
|
|
882
|
-
"agent",
|
|
883
|
-
"service"
|
|
884
|
-
]),
|
|
885
|
-
severity: Schema.Literals([
|
|
886
|
-
"info",
|
|
887
|
-
"warning",
|
|
888
|
-
"critical"
|
|
889
|
-
]),
|
|
890
|
-
message: Schema.String,
|
|
891
|
-
metric: Schema.optional(Schema.String),
|
|
892
|
-
observed: Schema.optional(Schema.Number),
|
|
893
|
-
threshold: Schema.optional(Schema.Number)
|
|
894
|
-
});
|
|
895
|
-
HostPlatform = Schema.String.pipe(Schema.decodeTo(Schema.Literals([
|
|
896
|
-
"linux",
|
|
897
|
-
"darwin",
|
|
898
|
-
"unsupported"
|
|
899
|
-
]), {
|
|
900
|
-
decode: SchemaGetter.transform((value) => value === "linux" || value === "darwin" || value === "unsupported" ? value : "unsupported"),
|
|
901
|
-
encode: SchemaGetter.transform((value) => value)
|
|
902
|
-
}));
|
|
903
|
-
HostHealthMetrics = Schema.Struct({
|
|
904
|
-
cpuPercent: Schema.NullOr(Schema.Number),
|
|
905
|
-
loadAverage1m: Schema.NullOr(Schema.Number),
|
|
906
|
-
loadPerCore1m: Schema.NullOr(Schema.Number),
|
|
907
|
-
totalMemoryBytes: Schema.NullOr(Schema.Number),
|
|
908
|
-
usedMemoryBytes: Schema.NullOr(Schema.Number),
|
|
909
|
-
availableMemoryBytes: Schema.NullOr(Schema.Number),
|
|
910
|
-
memoryUsedPercent: Schema.NullOr(Schema.Number),
|
|
911
|
-
memoryPressureSomeAvg10: Schema.NullOr(Schema.Number),
|
|
912
|
-
memoryPressureFullAvg10: Schema.NullOr(Schema.Number),
|
|
913
|
-
memoryPressureFreePercent: Schema.NullOr(Schema.Number),
|
|
914
|
-
swapTotalBytes: Schema.NullOr(Schema.Number),
|
|
915
|
-
swapUsedBytes: Schema.NullOr(Schema.Number),
|
|
916
|
-
swapUsedPercent: Schema.NullOr(Schema.Number),
|
|
917
|
-
swapActivityBytesPerMinute: Schema.NullOr(Schema.Number),
|
|
918
|
-
committedMemoryBytes: Schema.NullOr(Schema.Number),
|
|
919
|
-
commitLimitBytes: Schema.NullOr(Schema.Number),
|
|
920
|
-
virtualCommitmentPercent: Schema.NullOr(Schema.Number)
|
|
921
|
-
});
|
|
922
|
-
AdmissionState = Schema.String.pipe(Schema.decodeTo(Schema.Literals([
|
|
923
|
-
"open",
|
|
924
|
-
"soft",
|
|
925
|
-
"blocked",
|
|
926
|
-
"unavailable"
|
|
927
|
-
]), {
|
|
928
|
-
decode: SchemaGetter.transform((value) => value === "open" || value === "soft" || value === "blocked" || value === "unavailable" ? value : "unavailable"),
|
|
929
|
-
encode: SchemaGetter.transform((value) => value)
|
|
930
|
-
}));
|
|
931
|
-
AgentHealthStatus = Schema.String.pipe(Schema.decodeTo(Schema.Literals([
|
|
932
|
-
"healthy",
|
|
933
|
-
"idle",
|
|
934
|
-
"waiting",
|
|
935
|
-
"warning",
|
|
936
|
-
"stalled",
|
|
937
|
-
"wedged",
|
|
938
|
-
"dead",
|
|
939
|
-
"unavailable"
|
|
940
|
-
]), {
|
|
941
|
-
decode: SchemaGetter.transform((value) => value === "healthy" || value === "idle" || value === "waiting" || value === "warning" || value === "stalled" || value === "wedged" || value === "dead" || value === "unavailable" ? value : "unavailable"),
|
|
942
|
-
encode: SchemaGetter.transform((value) => value)
|
|
943
|
-
}));
|
|
944
|
-
AgentHealthKind = Schema.String.pipe(Schema.decodeTo(Schema.Literals([
|
|
945
|
-
"work",
|
|
946
|
-
"planning",
|
|
947
|
-
"specialist",
|
|
948
|
-
"conversation",
|
|
949
|
-
"other"
|
|
950
|
-
]), {
|
|
951
|
-
decode: SchemaGetter.transform((value) => value === "work" || value === "planning" || value === "specialist" || value === "conversation" || value === "other" ? value : "other"),
|
|
952
|
-
encode: SchemaGetter.transform((value) => value)
|
|
953
|
-
}));
|
|
954
|
-
SpecialistLifecycle = Schema.String.pipe(Schema.decodeTo(Schema.Literals([
|
|
955
|
-
"active",
|
|
956
|
-
"warm",
|
|
957
|
-
"orphaned",
|
|
958
|
-
"unknown"
|
|
959
|
-
]), {
|
|
960
|
-
decode: SchemaGetter.transform((value) => value === "active" || value === "warm" || value === "orphaned" || value === "unknown" ? value : "unknown"),
|
|
961
|
-
encode: SchemaGetter.transform((value) => value)
|
|
962
|
-
}));
|
|
963
|
-
AgentHealthSnapshot = Schema.Struct({
|
|
964
|
-
id: Schema.String,
|
|
965
|
-
issueId: Schema.optional(Schema.String),
|
|
966
|
-
role: Schema.optional(Schema.String),
|
|
967
|
-
kind: Schema.optional(AgentHealthKind),
|
|
968
|
-
status: AgentHealthStatus,
|
|
969
|
-
lifecycle: Schema.optional(SpecialistLifecycle),
|
|
970
|
-
tmuxActive: Schema.optional(Schema.Boolean),
|
|
971
|
-
memoryBytes: Schema.optional(Schema.Number),
|
|
972
|
-
memoryGb: Schema.optional(Schema.Number),
|
|
973
|
-
cpuPercent: Schema.optional(Schema.Number),
|
|
974
|
-
currentIssue: Schema.optional(Schema.String),
|
|
975
|
-
lastActivityAt: Schema.optional(Schema.String),
|
|
976
|
-
consecutiveFailures: Schema.optional(Schema.Number),
|
|
977
|
-
killCount: Schema.optional(Schema.Number),
|
|
978
|
-
contextPercent: Schema.optional(Schema.NullOr(Schema.Number)),
|
|
979
|
-
reasons: Schema.Array(HealthReason)
|
|
980
|
-
});
|
|
981
|
-
ServiceHealthStatus = Schema.String.pipe(Schema.decodeTo(Schema.Literals([
|
|
982
|
-
"running",
|
|
983
|
-
"not_configured",
|
|
984
|
-
"degraded",
|
|
985
|
-
"stopped",
|
|
986
|
-
"unavailable"
|
|
987
|
-
]), {
|
|
988
|
-
decode: SchemaGetter.transform((value) => value === "running" || value === "not_configured" || value === "degraded" || value === "stopped" || value === "unavailable" ? value : "unavailable"),
|
|
989
|
-
encode: SchemaGetter.transform((value) => value)
|
|
990
|
-
}));
|
|
991
|
-
ServiceHealthSnapshot = Schema.Struct({
|
|
992
|
-
id: Schema.String,
|
|
993
|
-
label: Schema.optional(Schema.String),
|
|
994
|
-
required: Schema.optional(Schema.Boolean),
|
|
995
|
-
status: ServiceHealthStatus,
|
|
996
|
-
message: Schema.String,
|
|
997
|
-
reasons: Schema.Array(HealthReason)
|
|
998
|
-
});
|
|
999
|
-
SystemHealthConsumer = Schema.Struct({
|
|
1000
|
-
id: Schema.String,
|
|
1001
|
-
label: Schema.String,
|
|
1002
|
-
type: Schema.Literals([
|
|
1003
|
-
"agent",
|
|
1004
|
-
"specialist",
|
|
1005
|
-
"container"
|
|
1006
|
-
]),
|
|
1007
|
-
memoryBytes: Schema.Number,
|
|
1008
|
-
memoryGb: Schema.Number,
|
|
1009
|
-
cpuPercent: Schema.optional(Schema.Number),
|
|
1010
|
-
issueId: Schema.optional(Schema.String),
|
|
1011
|
-
currentIssue: Schema.optional(Schema.String),
|
|
1012
|
-
leaked: Schema.optional(Schema.Boolean),
|
|
1013
|
-
killTarget: Schema.optional(Schema.Struct({
|
|
1014
|
-
kind: Schema.Literals([
|
|
1015
|
-
"agent",
|
|
1016
|
-
"specialist",
|
|
1017
|
-
"container"
|
|
1018
|
-
]),
|
|
1019
|
-
agentId: Schema.optional(Schema.String),
|
|
1020
|
-
containerId: Schema.optional(Schema.String),
|
|
1021
|
-
projectKey: Schema.optional(Schema.String),
|
|
1022
|
-
issueId: Schema.optional(Schema.String),
|
|
1023
|
-
specialistType: Schema.optional(Schema.String)
|
|
1024
|
-
}))
|
|
1025
|
-
});
|
|
1026
|
-
LegacyWebhookRelaySummary = Schema.Struct({
|
|
1027
|
-
configured: Schema.Boolean,
|
|
1028
|
-
running: Schema.Boolean,
|
|
1029
|
-
status: Schema.Literals([
|
|
1030
|
-
"not_configured",
|
|
1031
|
-
"running",
|
|
1032
|
-
"stopped",
|
|
1033
|
-
"unknown"
|
|
1034
|
-
]),
|
|
1035
|
-
message: Schema.String
|
|
1036
|
-
});
|
|
1037
|
-
LegacySystemHealthSummary = Schema.Struct({
|
|
1038
|
-
cpuPercent: Schema.Number,
|
|
1039
|
-
loadAverage1m: Schema.Number,
|
|
1040
|
-
loadPerCore1m: Schema.Number,
|
|
1041
|
-
totalMemoryBytes: Schema.Number,
|
|
1042
|
-
usedMemoryBytes: Schema.Number,
|
|
1043
|
-
availableMemoryBytes: Schema.Number,
|
|
1044
|
-
memoryUsedPercent: Schema.Number,
|
|
1045
|
-
swapTotalBytes: Schema.Number,
|
|
1046
|
-
swapUsedBytes: Schema.Number,
|
|
1047
|
-
swapUsedPercent: Schema.Number,
|
|
1048
|
-
committedMemoryBytes: Schema.Number,
|
|
1049
|
-
commitLimitBytes: Schema.Number,
|
|
1050
|
-
overcommitPercent: Schema.Number,
|
|
1051
|
-
agentCount: Schema.Number,
|
|
1052
|
-
workAgentCount: Schema.Number,
|
|
1053
|
-
planningAgentCount: Schema.Number,
|
|
1054
|
-
specialistSessionCount: Schema.Number,
|
|
1055
|
-
leakedSpecialistCount: Schema.Number,
|
|
1056
|
-
containerCount: Schema.Number,
|
|
1057
|
-
containerMemoryBytes: Schema.Number,
|
|
1058
|
-
overdeckMemoryBytes: Schema.Number,
|
|
1059
|
-
overdeckMemoryPercent: Schema.Number,
|
|
1060
|
-
smeeRelay: LegacyWebhookRelaySummary
|
|
1061
|
-
});
|
|
1062
|
-
SystemHealthSnapshot = Schema.Struct({
|
|
1063
|
-
version: Schema.Literal(2),
|
|
1064
|
-
state: HealthState,
|
|
1065
|
-
updatedAt: Schema.String,
|
|
1066
|
-
nextPollMs: Schema.Number,
|
|
1067
|
-
host: Schema.Struct({
|
|
1068
|
-
state: HealthState,
|
|
1069
|
-
platform: HostPlatform,
|
|
1070
|
-
reasons: Schema.Array(HealthReason),
|
|
1071
|
-
metrics: HostHealthMetrics
|
|
1072
|
-
}),
|
|
1073
|
-
admission: Schema.Struct({
|
|
1074
|
-
state: AdmissionState,
|
|
1075
|
-
availableMemoryBytes: Schema.NullOr(Schema.Number),
|
|
1076
|
-
admittedWorkAgentCount: Schema.Number,
|
|
1077
|
-
reasons: Schema.Array(HealthReason)
|
|
1078
|
-
}),
|
|
1079
|
-
agents: Schema.Array(AgentHealthSnapshot),
|
|
1080
|
-
services: Schema.Array(ServiceHealthSnapshot),
|
|
1081
|
-
topConsumers: Schema.Array(SystemHealthConsumer),
|
|
1082
|
-
summary: LegacySystemHealthSummary
|
|
1083
|
-
});
|
|
1084
|
-
}));
|
|
1085
|
-
//#endregion
|
|
1086
|
-
//#region ../../../packages/contracts/src/events.ts
|
|
1087
|
-
var SystemHeartbeatEvent, BeadsFreshnessChangedEvent, AgentStartedEvent, AgentStoppedEvent, AgentHeartbeatDeadEvent, WorkCompletedEvent, AgentCompletedEvent, ReviewApprovedEvent, TestPassedEvent, AgentStatusChangedEvent, AgentOutputReceivedEvent, AgentEnrichmentChangedEvent, AgentCreatedEvent, AgentActivityChangedEvent, AgentThinkingStartedEvent, AgentThinkingStoppedEvent, AgentWaitingStartedEvent, AgentWaitingClearedEvent, AgentPermissionRequestedEvent, AgentPermissionResolvedEvent, AgentMessageReceivedEvent, AgentChannelReplyEvent, AgentModelSetEvent, AgentCurrentIssueSetEvent, AgentContextSaturationChangedEvent, AgentResolutionChangedEvent, AgentStateRestoredEvent, AgentTurnDiffCompletedEvent, PlanningStartedEvent, PlanningFailedEvent, PlanningSyncEvent, PlanItemStatusChangedEvent, PlanSubitemStatusChangedEvent, PlanItemsUnblockedEvent, PipelineStatusChangedEvent, MergeReadyEvent, ReviewStatusChangedEvent, PipelineReviewStartedEvent, PipelineReviewCompletedEvent, PipelineTestStartedEvent, PipelineTestCompletedEvent, PipelineVerificationStartedEvent, PipelineVerificationFailedEvent, IssueTransitionedEvent, OperatorInterventionEvent, SubstrateBugFiledEvent, ReviewReviewerStartedEvent, ReviewReviewerCompletedEvent, ReviewSpecialistTimedOutEvent, ReviewCoordinatorStartedEvent, ReviewCoordinatorDiedEvent, SpecialistLifecycleState, SpecialistStartedEvent, SpecialistCompletedEvent, SpecialistFailedEvent, ResourcesUpdatedEvent, SystemHealthSeverityChangedEvent, IssuesSnapshotEvent, IssuesUpdatedEvent, IssueStatusChangedEvent, ActivityUpdatedEvent, ActivityEntryEvent, ActivityDetailedEvent, ActivityTtsEvent, DashboardLifecycleStartedEvent, DashboardLifecycleCompletedEvent, DashboardLifecycleFailedEvent, ShadowInferenceUpdateEvent, WorkspaceCreatedEvent, WorkspaceWipeStartedEvent, WorkspaceDestroyedEvent, WorkspaceDeletedEvent, WorkspaceAbortedEvent, MemoryObservationCreatedEvent, MemoryStatusUpdatedEvent, MemoryRollupTriggeredEvent, MemoryResetMarkerCreatedEvent, MemoryHealthChangedEvent, CostEventRecordedEvent, ConversationCompactingChangedEvent, ConversationCreatedEvent, ConversationTitleChangedEvent, ConversationPermissionChangedEvent, ScanStartedEvent, ScanProgressEvent, ScanCompleteEvent, EnrichProgressEvent, EnrichCompleteEvent, EmbedProgressEvent, DomainEvent;
|
|
1088
|
-
var init_events = __esmMin((() => {
|
|
1089
|
-
init_types();
|
|
1090
|
-
init_memory();
|
|
1091
|
-
init_system_health();
|
|
1092
|
-
SystemHeartbeatEvent = Schema.Struct({
|
|
1093
|
-
type: Schema.Literal("system.heartbeat"),
|
|
1094
|
-
timestamp: Schema.String,
|
|
1095
|
-
payload: Schema.Struct({ ts: Schema.Number })
|
|
1096
|
-
});
|
|
1097
|
-
BeadsFreshnessChangedEvent = Schema.Struct({
|
|
1098
|
-
type: Schema.Literal("beads.freshness_changed"),
|
|
1099
|
-
sequence: SequenceNumber,
|
|
1100
|
-
timestamp: Schema.String,
|
|
1101
|
-
payload: Schema.Struct({
|
|
1102
|
-
projectKey: Schema.String,
|
|
1103
|
-
localHead: Schema.String,
|
|
1104
|
-
lastSyncedAt: Schema.String
|
|
1105
|
-
})
|
|
1106
|
-
});
|
|
1107
|
-
AgentStartedEvent = Schema.Struct({
|
|
1108
|
-
type: Schema.Literal("agent.started"),
|
|
1109
|
-
sequence: SequenceNumber,
|
|
1110
|
-
timestamp: Schema.String,
|
|
1111
|
-
payload: Schema.Struct({
|
|
1112
|
-
agentId: AgentId,
|
|
1113
|
-
issueId: IssueId,
|
|
1114
|
-
agent: AgentSnapshot
|
|
1115
|
-
})
|
|
1116
|
-
});
|
|
1117
|
-
AgentStoppedEvent = Schema.Struct({
|
|
1118
|
-
type: Schema.Literal("agent.stopped"),
|
|
1119
|
-
sequence: SequenceNumber,
|
|
1120
|
-
timestamp: Schema.String,
|
|
1121
|
-
payload: Schema.Struct({
|
|
1122
|
-
agentId: AgentId,
|
|
1123
|
-
issueId: IssueId,
|
|
1124
|
-
sessionId: Schema.optional(Schema.String)
|
|
1125
|
-
})
|
|
1126
|
-
});
|
|
1127
|
-
AgentHeartbeatDeadEvent = Schema.Struct({
|
|
1128
|
-
type: Schema.Literal("agent.heartbeat_dead"),
|
|
1129
|
-
sequence: SequenceNumber,
|
|
1130
|
-
timestamp: Schema.String,
|
|
1131
|
-
payload: Schema.Struct({
|
|
1132
|
-
agentId: AgentId,
|
|
1133
|
-
issueId: Schema.optional(IssueId),
|
|
1134
|
-
sessionId: Schema.optional(Schema.String)
|
|
1135
|
-
})
|
|
1136
|
-
});
|
|
1137
|
-
WorkCompletedEvent = Schema.Struct({
|
|
1138
|
-
type: Schema.Literal("work.completed"),
|
|
1139
|
-
sequence: SequenceNumber,
|
|
1140
|
-
timestamp: Schema.String,
|
|
1141
|
-
payload: Schema.Struct({
|
|
1142
|
-
issueId: IssueId,
|
|
1143
|
-
agentId: Schema.optional(AgentId)
|
|
1144
|
-
})
|
|
1145
|
-
});
|
|
1146
|
-
AgentCompletedEvent = Schema.Struct({
|
|
1147
|
-
type: Schema.Literal("agent.completed"),
|
|
1148
|
-
sequence: SequenceNumber,
|
|
1149
|
-
timestamp: Schema.String,
|
|
1150
|
-
payload: Schema.Struct({
|
|
1151
|
-
issueId: IssueId,
|
|
1152
|
-
agentId: Schema.optional(AgentId),
|
|
1153
|
-
role: Schema.optional(Role)
|
|
1154
|
-
})
|
|
1155
|
-
});
|
|
1156
|
-
ReviewApprovedEvent = Schema.Struct({
|
|
1157
|
-
type: Schema.Literal("review.approved"),
|
|
1158
|
-
sequence: SequenceNumber,
|
|
1159
|
-
timestamp: Schema.String,
|
|
1160
|
-
payload: Schema.Struct({ issueId: IssueId })
|
|
1161
|
-
});
|
|
1162
|
-
TestPassedEvent = Schema.Struct({
|
|
1163
|
-
type: Schema.Literal("test.passed"),
|
|
1164
|
-
sequence: SequenceNumber,
|
|
1165
|
-
timestamp: Schema.String,
|
|
1166
|
-
payload: Schema.Struct({ issueId: IssueId })
|
|
1167
|
-
});
|
|
1168
|
-
AgentStatusChangedEvent = Schema.Struct({
|
|
1169
|
-
type: Schema.Literal("agent.status_changed"),
|
|
1170
|
-
sequence: SequenceNumber,
|
|
1171
|
-
timestamp: Schema.String,
|
|
1172
|
-
payload: Schema.Struct({
|
|
1173
|
-
agentId: AgentId,
|
|
1174
|
-
issueId: Schema.optional(IssueId),
|
|
1175
|
-
status: AgentStatus,
|
|
1176
|
-
previousStatus: Schema.optional(AgentStatus),
|
|
1177
|
-
hasLiveTmuxSession: Schema.optional(Schema.Boolean),
|
|
1178
|
-
stoppedByUser: Schema.optional(Schema.Boolean),
|
|
1179
|
-
stoppedByPause: Schema.optional(Schema.Boolean),
|
|
1180
|
-
paused: Schema.optional(Schema.Boolean),
|
|
1181
|
-
pausedReason: Schema.optional(Schema.NullOr(Schema.String)),
|
|
1182
|
-
pausedAt: Schema.optional(Schema.NullOr(Schema.String)),
|
|
1183
|
-
troubled: Schema.optional(Schema.Boolean),
|
|
1184
|
-
troubledAt: Schema.optional(Schema.NullOr(Schema.String)),
|
|
1185
|
-
consecutiveFailures: Schema.optional(Schema.Number),
|
|
1186
|
-
firstFailureInRunAt: Schema.optional(Schema.NullOr(Schema.String)),
|
|
1187
|
-
lastFailureAt: Schema.optional(Schema.NullOr(Schema.String)),
|
|
1188
|
-
lastFailureReason: Schema.optional(Schema.NullOr(Schema.String)),
|
|
1189
|
-
lastFailureNextRetryAt: Schema.optional(Schema.NullOr(Schema.String)),
|
|
1190
|
-
kickoffDelivered: Schema.optional(Schema.Boolean),
|
|
1191
|
-
hostOverride: Schema.optional(Schema.Boolean),
|
|
1192
|
-
role: Schema.optional(Role),
|
|
1193
|
-
model: Schema.optional(Schema.String),
|
|
1194
|
-
workspace: Schema.optional(Schema.String),
|
|
1195
|
-
sessionId: Schema.optional(Schema.String),
|
|
1196
|
-
lastActivity: Schema.optional(Schema.String),
|
|
1197
|
-
lastResumeAt: Schema.optional(Schema.String),
|
|
1198
|
-
stoppedAt: Schema.optional(Schema.String),
|
|
1199
|
-
branch: Schema.optional(Schema.String),
|
|
1200
|
-
costSoFar: Schema.optional(Schema.Number),
|
|
1201
|
-
phase: Schema.optional(Schema.String),
|
|
1202
|
-
workType: Schema.optional(Schema.String),
|
|
1203
|
-
roleRunHead: Schema.optional(Schema.String),
|
|
1204
|
-
flywheelRunId: Schema.optional(Schema.String),
|
|
1205
|
-
reviewSubRole: Schema.optional(Schema.String),
|
|
1206
|
-
reviewRunId: Schema.optional(Schema.String),
|
|
1207
|
-
reviewOutputPath: Schema.optional(Schema.String),
|
|
1208
|
-
reviewSynthesisAgentId: Schema.optional(Schema.String),
|
|
1209
|
-
reviewDeadlineAt: Schema.optional(Schema.String),
|
|
1210
|
-
reviewMonitorSignaled: Schema.optional(Schema.String),
|
|
1211
|
-
reviewRetryAttempt: Schema.optional(Schema.Number),
|
|
1212
|
-
inspectSubRole: Schema.optional(Schema.String),
|
|
1213
|
-
deliveryMethod: Schema.optional(Schema.String),
|
|
1214
|
-
supervisorEnabled: Schema.optional(Schema.Boolean),
|
|
1215
|
-
channelsEnabled: Schema.optional(Schema.Boolean)
|
|
1216
|
-
})
|
|
1217
|
-
});
|
|
1218
|
-
AgentOutputReceivedEvent = Schema.Struct({
|
|
1219
|
-
type: Schema.Literal("agent.output_received"),
|
|
1220
|
-
sequence: SequenceNumber,
|
|
1221
|
-
timestamp: Schema.String,
|
|
1222
|
-
payload: Schema.Struct({
|
|
1223
|
-
agentId: AgentId,
|
|
1224
|
-
lines: Schema.Array(Schema.String)
|
|
1225
|
-
})
|
|
1226
|
-
});
|
|
1227
|
-
AgentEnrichmentChangedEvent = Schema.Struct({
|
|
1228
|
-
type: Schema.Literal("agent.enrichment_changed"),
|
|
1229
|
-
sequence: SequenceNumber,
|
|
1230
|
-
timestamp: Schema.String,
|
|
1231
|
-
payload: Schema.Struct({
|
|
1232
|
-
agentId: AgentId,
|
|
1233
|
-
role: Schema.optional(Role),
|
|
1234
|
-
hasPendingQuestion: Schema.optional(Schema.Boolean),
|
|
1235
|
-
pendingQuestionCount: Schema.optional(Schema.Number),
|
|
1236
|
-
pendingQuestionPrompt: Schema.optional(Schema.String),
|
|
1237
|
-
pendingQuestionReason: Schema.optional(Schema.String),
|
|
1238
|
-
pendingInputCount: Schema.optional(Schema.Number),
|
|
1239
|
-
pendingInputKinds: Schema.optional(Schema.Array(Schema.String)),
|
|
1240
|
-
pendingAskUserQuestion: Schema.optional(Schema.Struct({
|
|
1241
|
-
toolUseId: Schema.String,
|
|
1242
|
-
askedAt: Schema.String,
|
|
1243
|
-
questions: Schema.Array(Schema.Struct({
|
|
1244
|
-
question: Schema.String,
|
|
1245
|
-
header: Schema.optional(Schema.String),
|
|
1246
|
-
multiSelect: Schema.optional(Schema.Boolean),
|
|
1247
|
-
options: Schema.Array(Schema.Struct({
|
|
1248
|
-
label: Schema.String,
|
|
1249
|
-
description: Schema.optional(Schema.String)
|
|
1250
|
-
}))
|
|
1251
|
-
}))
|
|
1252
|
-
})),
|
|
1253
|
-
pendingProposedPlan: Schema.optional(Schema.Struct({
|
|
1254
|
-
toolUseId: Schema.String,
|
|
1255
|
-
askedAt: Schema.String,
|
|
1256
|
-
plan: Schema.String
|
|
1257
|
-
})),
|
|
1258
|
-
resolution: Schema.optional(AgentResolution),
|
|
1259
|
-
resolutionCount: Schema.optional(Schema.Number)
|
|
1260
|
-
})
|
|
1261
|
-
});
|
|
1262
|
-
AgentCreatedEvent = Schema.Struct({
|
|
1263
|
-
type: Schema.Literal("agent.created"),
|
|
1264
|
-
sequence: SequenceNumber,
|
|
1265
|
-
timestamp: Schema.String,
|
|
1266
|
-
payload: Schema.Struct({
|
|
1267
|
-
agentId: AgentId,
|
|
1268
|
-
issueId: IssueId,
|
|
1269
|
-
agent: AgentSnapshot
|
|
1270
|
-
})
|
|
1271
|
-
});
|
|
1272
|
-
AgentActivityChangedEvent = Schema.Struct({
|
|
1273
|
-
type: Schema.Literal("agent.activity_changed"),
|
|
1274
|
-
sequence: SequenceNumber,
|
|
1275
|
-
timestamp: Schema.String,
|
|
1276
|
-
payload: Schema.Struct({
|
|
1277
|
-
agentId: AgentId,
|
|
1278
|
-
activity: Activity,
|
|
1279
|
-
currentTool: Schema.optional(Schema.String)
|
|
1280
|
-
})
|
|
1281
|
-
});
|
|
1282
|
-
AgentThinkingStartedEvent = Schema.Struct({
|
|
1283
|
-
type: Schema.Literal("agent.thinking_started"),
|
|
1284
|
-
sequence: SequenceNumber,
|
|
1285
|
-
timestamp: Schema.String,
|
|
1286
|
-
payload: Schema.Struct({
|
|
1287
|
-
agentId: AgentId,
|
|
1288
|
-
lastToolAt: Schema.String
|
|
1289
|
-
})
|
|
1290
|
-
});
|
|
1291
|
-
AgentThinkingStoppedEvent = Schema.Struct({
|
|
1292
|
-
type: Schema.Literal("agent.thinking_stopped"),
|
|
1293
|
-
sequence: SequenceNumber,
|
|
1294
|
-
timestamp: Schema.String,
|
|
1295
|
-
payload: Schema.Struct({
|
|
1296
|
-
agentId: AgentId,
|
|
1297
|
-
resolvedBy: Schema.Literals([
|
|
1298
|
-
"tool",
|
|
1299
|
-
"waiting",
|
|
1300
|
-
"idle",
|
|
1301
|
-
"stopped"
|
|
1302
|
-
])
|
|
1303
|
-
})
|
|
1304
|
-
});
|
|
1305
|
-
AgentWaitingStartedEvent = Schema.Struct({
|
|
1306
|
-
type: Schema.Literal("agent.waiting_started"),
|
|
1307
|
-
sequence: SequenceNumber,
|
|
1308
|
-
timestamp: Schema.String,
|
|
1309
|
-
payload: Schema.Struct({
|
|
1310
|
-
agentId: AgentId,
|
|
1311
|
-
reason: WaitingReason,
|
|
1312
|
-
message: Schema.optional(Schema.String)
|
|
1313
|
-
})
|
|
1314
|
-
});
|
|
1315
|
-
AgentWaitingClearedEvent = Schema.Struct({
|
|
1316
|
-
type: Schema.Literal("agent.waiting_cleared"),
|
|
1317
|
-
sequence: SequenceNumber,
|
|
1318
|
-
timestamp: Schema.String,
|
|
1319
|
-
payload: Schema.Struct({
|
|
1320
|
-
agentId: AgentId,
|
|
1321
|
-
clearedBy: Schema.Literals([
|
|
1322
|
-
"user_response",
|
|
1323
|
-
"timeout",
|
|
1324
|
-
"stopped",
|
|
1325
|
-
"tool_resumed"
|
|
1326
|
-
])
|
|
1327
|
-
})
|
|
1328
|
-
});
|
|
1329
|
-
AgentPermissionRequestedEvent = Schema.Struct({
|
|
1330
|
-
type: Schema.Literal("agent.permission_requested"),
|
|
1331
|
-
sequence: SequenceNumber,
|
|
1332
|
-
timestamp: Schema.String,
|
|
1333
|
-
payload: ChannelPermissionRequestSnapshot
|
|
1334
|
-
});
|
|
1335
|
-
AgentPermissionResolvedEvent = Schema.Struct({
|
|
1336
|
-
type: Schema.Literal("agent.permission_resolved"),
|
|
1337
|
-
sequence: SequenceNumber,
|
|
1338
|
-
timestamp: Schema.String,
|
|
1339
|
-
payload: Schema.Struct({
|
|
1340
|
-
requestId: Schema.String,
|
|
1341
|
-
agentId: AgentId,
|
|
1342
|
-
issueId: Schema.optional(IssueId),
|
|
1343
|
-
behavior: ClaudeChannelPermissionBehavior
|
|
1344
|
-
})
|
|
1345
|
-
});
|
|
1346
|
-
AgentMessageReceivedEvent = Schema.Struct({
|
|
1347
|
-
type: Schema.Literal("agent.message_received"),
|
|
1348
|
-
sequence: SequenceNumber,
|
|
1349
|
-
timestamp: Schema.String,
|
|
1350
|
-
payload: Schema.Struct({
|
|
1351
|
-
agentId: AgentId,
|
|
1352
|
-
direction: Schema.Literals(["to_agent", "from_agent"]),
|
|
1353
|
-
source: Schema.Literals([
|
|
1354
|
-
"user",
|
|
1355
|
-
"cloister",
|
|
1356
|
-
"specialist",
|
|
1357
|
-
"automated"
|
|
1358
|
-
])
|
|
1359
|
-
})
|
|
1360
|
-
});
|
|
1361
|
-
AgentChannelReplyEvent = Schema.Struct({
|
|
1362
|
-
type: Schema.Literal("agent.channel_reply"),
|
|
1363
|
-
sequence: SequenceNumber,
|
|
1364
|
-
timestamp: Schema.String,
|
|
1365
|
-
payload: Schema.Struct({
|
|
1366
|
-
agentId: AgentId,
|
|
1367
|
-
reply: AgentChannelReply
|
|
1368
|
-
})
|
|
1369
|
-
});
|
|
1370
|
-
AgentModelSetEvent = Schema.Struct({
|
|
1371
|
-
type: Schema.Literal("agent.model_set"),
|
|
1372
|
-
sequence: SequenceNumber,
|
|
1373
|
-
timestamp: Schema.String,
|
|
1374
|
-
payload: Schema.Struct({
|
|
1375
|
-
agentId: AgentId,
|
|
1376
|
-
model: Schema.String,
|
|
1377
|
-
claudeSessionId: Schema.optional(Schema.NullOr(Schema.String)),
|
|
1378
|
-
sessionModel: Schema.optional(Schema.String),
|
|
1379
|
-
sessionHarness: Schema.optional(Schema.String)
|
|
1380
|
-
})
|
|
1381
|
-
});
|
|
1382
|
-
AgentCurrentIssueSetEvent = Schema.Struct({
|
|
1383
|
-
type: Schema.Literal("agent.current_issue_set"),
|
|
1384
|
-
sequence: SequenceNumber,
|
|
1385
|
-
timestamp: Schema.String,
|
|
1386
|
-
payload: Schema.Struct({
|
|
1387
|
-
agentId: AgentId,
|
|
1388
|
-
currentIssue: Schema.optional(IssueId)
|
|
1389
|
-
})
|
|
1390
|
-
});
|
|
1391
|
-
AgentContextSaturationChangedEvent = Schema.Struct({
|
|
1392
|
-
type: Schema.Literal("agent.context_saturation_changed"),
|
|
1393
|
-
sequence: SequenceNumber,
|
|
1394
|
-
timestamp: Schema.String,
|
|
1395
|
-
payload: Schema.Struct({
|
|
1396
|
-
agentId: AgentId,
|
|
1397
|
-
contextSaturatedAt: Schema.optional(Schema.String)
|
|
1398
|
-
})
|
|
1399
|
-
});
|
|
1400
|
-
AgentResolutionChangedEvent = Schema.Struct({
|
|
1401
|
-
type: Schema.Literal("agent.resolution_changed"),
|
|
1402
|
-
sequence: SequenceNumber,
|
|
1403
|
-
timestamp: Schema.String,
|
|
1404
|
-
payload: Schema.Struct({
|
|
1405
|
-
agentId: AgentId,
|
|
1406
|
-
resolution: AgentResolution,
|
|
1407
|
-
resolutionCount: Schema.Number
|
|
1408
|
-
})
|
|
1409
|
-
});
|
|
1410
|
-
AgentStateRestoredEvent = Schema.Struct({
|
|
1411
|
-
type: Schema.Literal("agent.state_restored"),
|
|
1412
|
-
sequence: SequenceNumber,
|
|
1413
|
-
timestamp: Schema.String,
|
|
1414
|
-
payload: Schema.Struct({
|
|
1415
|
-
agentId: AgentId,
|
|
1416
|
-
snapshot: AgentRuntimeSnapshot
|
|
1417
|
-
})
|
|
1418
|
-
});
|
|
1419
|
-
AgentTurnDiffCompletedEvent = Schema.Struct({
|
|
1420
|
-
type: Schema.Literal("agent.turn_diff_completed"),
|
|
1421
|
-
sequence: SequenceNumber,
|
|
1422
|
-
timestamp: Schema.String,
|
|
1423
|
-
payload: Schema.Struct({
|
|
1424
|
-
agentId: AgentId,
|
|
1425
|
-
turnId: Schema.String,
|
|
1426
|
-
completedAt: Schema.String,
|
|
1427
|
-
files: Schema.Array(Schema.Struct({
|
|
1428
|
-
path: Schema.String,
|
|
1429
|
-
kind: Schema.optional(Schema.String),
|
|
1430
|
-
additions: Schema.optional(Schema.Number),
|
|
1431
|
-
deletions: Schema.optional(Schema.Number)
|
|
1432
|
-
})),
|
|
1433
|
-
checkpointRef: Schema.optional(Schema.String),
|
|
1434
|
-
assistantMessageId: Schema.optional(Schema.String),
|
|
1435
|
-
checkpointTurnCount: Schema.optional(Schema.Number)
|
|
1436
|
-
})
|
|
1437
|
-
});
|
|
1438
|
-
PlanningStartedEvent = Schema.Struct({
|
|
1439
|
-
type: Schema.Literal("planning.started"),
|
|
1440
|
-
sequence: SequenceNumber,
|
|
1441
|
-
timestamp: Schema.String,
|
|
1442
|
-
payload: Schema.Struct({
|
|
1443
|
-
issueId: IssueId,
|
|
1444
|
-
sessionName: Schema.String,
|
|
1445
|
-
harness: Schema.optional(Schema.String)
|
|
1446
|
-
})
|
|
1447
|
-
});
|
|
1448
|
-
PlanningFailedEvent = Schema.Struct({
|
|
1449
|
-
type: Schema.Literal("planning.failed"),
|
|
1450
|
-
sequence: SequenceNumber,
|
|
1451
|
-
timestamp: Schema.String,
|
|
1452
|
-
payload: Schema.Struct({
|
|
1453
|
-
issueId: IssueId,
|
|
1454
|
-
error: Schema.String
|
|
1455
|
-
})
|
|
1456
|
-
});
|
|
1457
|
-
PlanningSyncEvent = Schema.Struct({
|
|
1458
|
-
type: Schema.Literal("planning.sync"),
|
|
1459
|
-
sequence: SequenceNumber,
|
|
1460
|
-
timestamp: Schema.String,
|
|
1461
|
-
payload: Schema.Struct({
|
|
1462
|
-
issueId: IssueId,
|
|
1463
|
-
status: Schema.String,
|
|
1464
|
-
progress: Schema.optional(Schema.Number),
|
|
1465
|
-
message: Schema.optional(Schema.String)
|
|
1466
|
-
})
|
|
1467
|
-
});
|
|
1468
|
-
PlanItemStatusChangedEvent = Schema.Struct({
|
|
1469
|
-
type: Schema.Literal("plan.item_status_changed"),
|
|
1470
|
-
sequence: SequenceNumber,
|
|
1471
|
-
timestamp: Schema.String,
|
|
1472
|
-
payload: Schema.Struct({
|
|
1473
|
-
issueId: IssueId,
|
|
1474
|
-
itemId: Schema.String,
|
|
1475
|
-
status: Schema.String
|
|
1476
|
-
})
|
|
1477
|
-
});
|
|
1478
|
-
PlanSubitemStatusChangedEvent = Schema.Struct({
|
|
1479
|
-
type: Schema.Literal("plan.subitem_status_changed"),
|
|
1480
|
-
sequence: SequenceNumber,
|
|
1481
|
-
timestamp: Schema.String,
|
|
1482
|
-
payload: Schema.Struct({
|
|
1483
|
-
issueId: IssueId,
|
|
1484
|
-
itemId: Schema.String,
|
|
1485
|
-
subItemId: Schema.String,
|
|
1486
|
-
status: Schema.String
|
|
1487
|
-
})
|
|
1488
|
-
});
|
|
1489
|
-
PlanItemsUnblockedEvent = Schema.Struct({
|
|
1490
|
-
type: Schema.Literal("plan.items_unblocked"),
|
|
1491
|
-
sequence: SequenceNumber,
|
|
1492
|
-
timestamp: Schema.String,
|
|
1493
|
-
payload: Schema.Struct({
|
|
1494
|
-
issueId: IssueId,
|
|
1495
|
-
items: Schema.Array(Schema.String)
|
|
1496
|
-
})
|
|
1497
|
-
});
|
|
1498
|
-
PipelineStatusChangedEvent = Schema.Struct({
|
|
1499
|
-
type: Schema.Literal("pipeline.status_changed"),
|
|
1500
|
-
sequence: SequenceNumber,
|
|
1501
|
-
timestamp: Schema.String,
|
|
1502
|
-
payload: Schema.Struct({
|
|
1503
|
-
issueId: IssueId,
|
|
1504
|
-
status: ReviewStatusSnapshot
|
|
1505
|
-
})
|
|
1506
|
-
});
|
|
1507
|
-
MergeReadyEvent = Schema.Struct({
|
|
1508
|
-
type: Schema.Literal("merge.ready"),
|
|
1509
|
-
sequence: SequenceNumber,
|
|
1510
|
-
timestamp: Schema.String,
|
|
1511
|
-
payload: Schema.Struct({ issueId: IssueId })
|
|
1512
|
-
});
|
|
1513
|
-
ReviewStatusChangedEvent = Schema.Struct({
|
|
1514
|
-
type: Schema.Literal("review.status_changed"),
|
|
1515
|
-
sequence: SequenceNumber,
|
|
1516
|
-
timestamp: Schema.String,
|
|
1517
|
-
payload: Schema.Struct({
|
|
1518
|
-
issueId: IssueId,
|
|
1519
|
-
status: ReviewStatusSnapshot
|
|
1520
|
-
})
|
|
1521
|
-
});
|
|
1522
|
-
PipelineReviewStartedEvent = Schema.Struct({
|
|
1523
|
-
type: Schema.Literal("pipeline.review-started"),
|
|
1524
|
-
sequence: SequenceNumber,
|
|
1525
|
-
timestamp: Schema.String,
|
|
1526
|
-
payload: Schema.Struct({ issueId: IssueId })
|
|
1527
|
-
});
|
|
1528
|
-
PipelineReviewCompletedEvent = Schema.Struct({
|
|
1529
|
-
type: Schema.Literal("pipeline.review-completed"),
|
|
1530
|
-
sequence: SequenceNumber,
|
|
1531
|
-
timestamp: Schema.String,
|
|
1532
|
-
payload: Schema.Struct({
|
|
1533
|
-
issueId: IssueId,
|
|
1534
|
-
passed: Schema.Boolean
|
|
1535
|
-
})
|
|
1536
|
-
});
|
|
1537
|
-
PipelineTestStartedEvent = Schema.Struct({
|
|
1538
|
-
type: Schema.Literal("pipeline.test-started"),
|
|
1539
|
-
sequence: SequenceNumber,
|
|
1540
|
-
timestamp: Schema.String,
|
|
1541
|
-
payload: Schema.Struct({ issueId: IssueId })
|
|
1542
|
-
});
|
|
1543
|
-
PipelineTestCompletedEvent = Schema.Struct({
|
|
1544
|
-
type: Schema.Literal("pipeline.test-completed"),
|
|
1545
|
-
sequence: SequenceNumber,
|
|
1546
|
-
timestamp: Schema.String,
|
|
1547
|
-
payload: Schema.Struct({
|
|
1548
|
-
issueId: IssueId,
|
|
1549
|
-
passed: Schema.Boolean
|
|
1550
|
-
})
|
|
1551
|
-
});
|
|
1552
|
-
PipelineVerificationStartedEvent = Schema.Struct({
|
|
1553
|
-
type: Schema.Literal("pipeline.verification-started"),
|
|
1554
|
-
sequence: SequenceNumber,
|
|
1555
|
-
timestamp: Schema.String,
|
|
1556
|
-
payload: Schema.Struct({ issueId: IssueId })
|
|
1557
|
-
});
|
|
1558
|
-
PipelineVerificationFailedEvent = Schema.Struct({
|
|
1559
|
-
type: Schema.Literal("pipeline.verification-failed"),
|
|
1560
|
-
sequence: SequenceNumber,
|
|
1561
|
-
timestamp: Schema.String,
|
|
1562
|
-
payload: Schema.Struct({
|
|
1563
|
-
issueId: IssueId,
|
|
1564
|
-
failedCheck: Schema.optional(Schema.String),
|
|
1565
|
-
message: Schema.optional(Schema.String)
|
|
1566
|
-
})
|
|
1567
|
-
});
|
|
1568
|
-
IssueTransitionedEvent = Schema.Struct({
|
|
1569
|
-
type: Schema.Literal("issue.transitioned"),
|
|
1570
|
-
sequence: SequenceNumber,
|
|
1571
|
-
timestamp: Schema.String,
|
|
1572
|
-
payload: Schema.Struct({
|
|
1573
|
-
issueId: IssueId,
|
|
1574
|
-
state: Schema.String
|
|
1575
|
-
})
|
|
1576
|
-
});
|
|
1577
|
-
OperatorInterventionEvent = Schema.Struct({
|
|
1578
|
-
type: Schema.Literal("operator.intervention"),
|
|
1579
|
-
sequence: SequenceNumber,
|
|
1580
|
-
timestamp: Schema.String,
|
|
1581
|
-
payload: Schema.Struct({
|
|
1582
|
-
issueId: IssueId,
|
|
1583
|
-
kind: Schema.Literals([
|
|
1584
|
-
"tell",
|
|
1585
|
-
"pause",
|
|
1586
|
-
"restart",
|
|
1587
|
-
"manual_edit",
|
|
1588
|
-
"deep_wipe",
|
|
1589
|
-
"unpause",
|
|
1590
|
-
"untroubled"
|
|
1591
|
-
]),
|
|
1592
|
-
source: Schema.String
|
|
1593
|
-
})
|
|
1594
|
-
});
|
|
1595
|
-
SubstrateBugFiledEvent = Schema.Struct({
|
|
1596
|
-
type: Schema.Literal("substrate.bug_filed"),
|
|
1597
|
-
sequence: SequenceNumber,
|
|
1598
|
-
timestamp: Schema.String,
|
|
1599
|
-
payload: Schema.Struct({
|
|
1600
|
-
issueId: IssueId,
|
|
1601
|
-
runId: Schema.optional(Schema.String),
|
|
1602
|
-
filedBy: Schema.Literals(["agent", "operator"]),
|
|
1603
|
-
discoveredIn: Schema.optional(IssueId),
|
|
1604
|
-
severity: Schema.Literals([
|
|
1605
|
-
"P0",
|
|
1606
|
-
"P1",
|
|
1607
|
-
"P2"
|
|
1608
|
-
])
|
|
1609
|
-
})
|
|
1610
|
-
});
|
|
1611
|
-
ReviewReviewerStartedEvent = Schema.Struct({
|
|
1612
|
-
type: Schema.Literal("review.reviewer_started"),
|
|
1613
|
-
sequence: SequenceNumber,
|
|
1614
|
-
timestamp: Schema.String,
|
|
1615
|
-
payload: Schema.Struct({
|
|
1616
|
-
issueId: IssueId,
|
|
1617
|
-
role: Schema.String,
|
|
1618
|
-
sessionName: Schema.String
|
|
1619
|
-
})
|
|
1620
|
-
});
|
|
1621
|
-
ReviewReviewerCompletedEvent = Schema.Struct({
|
|
1622
|
-
type: Schema.Literal("review.reviewer_completed"),
|
|
1623
|
-
sequence: SequenceNumber,
|
|
1624
|
-
timestamp: Schema.String,
|
|
1625
|
-
payload: Schema.Struct({
|
|
1626
|
-
issueId: IssueId,
|
|
1627
|
-
role: Schema.String
|
|
1628
|
-
})
|
|
1629
|
-
});
|
|
1630
|
-
ReviewSpecialistTimedOutEvent = Schema.Struct({
|
|
1631
|
-
type: Schema.Literal("review.specialist.timed_out"),
|
|
1632
|
-
sequence: SequenceNumber,
|
|
1633
|
-
timestamp: Schema.String,
|
|
1634
|
-
payload: Schema.Struct({
|
|
1635
|
-
issueId: IssueId,
|
|
1636
|
-
role: Schema.String,
|
|
1637
|
-
sessionName: Schema.String,
|
|
1638
|
-
attempt: Schema.Number,
|
|
1639
|
-
maxRetries: Schema.Number,
|
|
1640
|
-
willRetry: Schema.Boolean
|
|
1641
|
-
})
|
|
1642
|
-
});
|
|
1643
|
-
ReviewCoordinatorStartedEvent = Schema.Struct({
|
|
1644
|
-
type: Schema.Literal("review.coordinator_started"),
|
|
1645
|
-
sequence: SequenceNumber,
|
|
1646
|
-
timestamp: Schema.String,
|
|
1647
|
-
payload: Schema.Struct({
|
|
1648
|
-
issueId: IssueId,
|
|
1649
|
-
sessionName: Schema.String
|
|
1650
|
-
})
|
|
1651
|
-
});
|
|
1652
|
-
ReviewCoordinatorDiedEvent = Schema.Struct({
|
|
1653
|
-
type: Schema.Literal("review.coordinator.died"),
|
|
1654
|
-
sequence: SequenceNumber,
|
|
1655
|
-
timestamp: Schema.String,
|
|
1656
|
-
payload: Schema.Struct({
|
|
1657
|
-
issueId: IssueId,
|
|
1658
|
-
sessionName: Schema.String,
|
|
1659
|
-
reason: Schema.String
|
|
1660
|
-
})
|
|
1661
|
-
});
|
|
1662
|
-
SpecialistLifecycleState = Schema.Literals([
|
|
1663
|
-
"active",
|
|
1664
|
-
"sleeping",
|
|
1665
|
-
"uninitialized"
|
|
1666
|
-
]);
|
|
1667
|
-
SpecialistStartedEvent = Schema.Struct({
|
|
1668
|
-
type: Schema.Literal("specialist.started"),
|
|
1669
|
-
sequence: SequenceNumber,
|
|
1670
|
-
timestamp: Schema.String,
|
|
1671
|
-
payload: Schema.Struct({
|
|
1672
|
-
name: Role,
|
|
1673
|
-
state: SpecialistLifecycleState,
|
|
1674
|
-
isRunning: Schema.Boolean,
|
|
1675
|
-
currentIssue: Schema.optional(Schema.String),
|
|
1676
|
-
lastWake: Schema.optional(Schema.String)
|
|
1677
|
-
})
|
|
1678
|
-
});
|
|
1679
|
-
SpecialistCompletedEvent = Schema.Struct({
|
|
1680
|
-
type: Schema.Literal("specialist.completed"),
|
|
1681
|
-
sequence: SequenceNumber,
|
|
1682
|
-
timestamp: Schema.String,
|
|
1683
|
-
payload: Schema.Struct({
|
|
1684
|
-
name: Role,
|
|
1685
|
-
issueId: Schema.optional(IssueId)
|
|
1686
|
-
})
|
|
1687
|
-
});
|
|
1688
|
-
SpecialistFailedEvent = Schema.Struct({
|
|
1689
|
-
type: Schema.Literal("specialist.failed"),
|
|
1690
|
-
sequence: SequenceNumber,
|
|
1691
|
-
timestamp: Schema.String,
|
|
1692
|
-
payload: Schema.Struct({
|
|
1693
|
-
name: Role,
|
|
1694
|
-
issueId: Schema.optional(IssueId),
|
|
1695
|
-
error: Schema.String
|
|
1696
|
-
})
|
|
1697
|
-
});
|
|
1698
|
-
ResourcesUpdatedEvent = Schema.Struct({
|
|
1699
|
-
type: Schema.Literal("resources.updated"),
|
|
1700
|
-
sequence: SequenceNumber,
|
|
1701
|
-
timestamp: Schema.String,
|
|
1702
|
-
payload: Schema.Struct({ resources: ResourceStats })
|
|
1703
|
-
});
|
|
1704
|
-
SystemHealthSeverityChangedEvent = Schema.Struct({
|
|
1705
|
-
type: Schema.Literal("system.health_severity_changed"),
|
|
1706
|
-
sequence: SequenceNumber,
|
|
1707
|
-
timestamp: Schema.String,
|
|
1708
|
-
payload: Schema.Struct({
|
|
1709
|
-
previousSeverity: Schema.String,
|
|
1710
|
-
severity: Schema.String,
|
|
1711
|
-
reasons: Schema.Array(Schema.String),
|
|
1712
|
-
leakedSpecialistCount: Schema.Number,
|
|
1713
|
-
version: Schema.optional(Schema.Literal(2)),
|
|
1714
|
-
transitionVersion: Schema.optional(Schema.Number),
|
|
1715
|
-
previousState: Schema.optional(HealthState),
|
|
1716
|
-
state: Schema.optional(HealthState),
|
|
1717
|
-
reasonCodes: Schema.optional(Schema.Array(Schema.String)),
|
|
1718
|
-
acceptedAt: Schema.optional(Schema.String)
|
|
1719
|
-
})
|
|
1720
|
-
});
|
|
1721
|
-
IssuesSnapshotEvent = Schema.Struct({
|
|
1722
|
-
type: Schema.Literal("issues.snapshot"),
|
|
1723
|
-
sequence: SequenceNumber,
|
|
1724
|
-
timestamp: Schema.String,
|
|
1725
|
-
payload: Schema.Struct({ issues: Schema.Array(Schema.Unknown) })
|
|
1726
|
-
});
|
|
1727
|
-
IssuesUpdatedEvent = Schema.Struct({
|
|
1728
|
-
type: Schema.Literal("issues.updated"),
|
|
1729
|
-
sequence: SequenceNumber,
|
|
1730
|
-
timestamp: Schema.String,
|
|
1731
|
-
payload: Schema.Struct({ issueId: Schema.optional(IssueId) })
|
|
1732
|
-
});
|
|
1733
|
-
IssueStatusChangedEvent = Schema.Struct({
|
|
1734
|
-
type: Schema.Literal("issue.statusChanged"),
|
|
1735
|
-
sequence: SequenceNumber,
|
|
1736
|
-
timestamp: Schema.String,
|
|
1737
|
-
payload: Schema.Struct({
|
|
1738
|
-
issueId: IssueId,
|
|
1739
|
-
status: Schema.String,
|
|
1740
|
-
canonicalStatus: Schema.String,
|
|
1741
|
-
labels: Schema.optional(Schema.Array(Schema.String))
|
|
1742
|
-
})
|
|
1743
|
-
});
|
|
1744
|
-
ActivityUpdatedEvent = Schema.Struct({
|
|
1745
|
-
type: Schema.Literal("activity.updated"),
|
|
1746
|
-
sequence: SequenceNumber,
|
|
1747
|
-
timestamp: Schema.String,
|
|
1748
|
-
payload: Schema.Struct({ events: Schema.Array(Schema.Unknown) })
|
|
1749
|
-
});
|
|
1750
|
-
ActivityEntryEvent = Schema.Struct({
|
|
1751
|
-
type: Schema.Literal("activity.entry"),
|
|
1752
|
-
sequence: SequenceNumber,
|
|
1753
|
-
timestamp: Schema.String,
|
|
1754
|
-
payload: Schema.Struct({
|
|
1755
|
-
id: Schema.String,
|
|
1756
|
-
source: Schema.String,
|
|
1757
|
-
level: Schema.String,
|
|
1758
|
-
message: Schema.String,
|
|
1759
|
-
details: Schema.optional(Schema.String),
|
|
1760
|
-
issueId: Schema.optional(IssueId),
|
|
1761
|
-
/** Dashboard route the feed navigates to on click (e.g. /conv/<name>, /flywheel). */
|
|
1762
|
-
link: Schema.optional(Schema.String),
|
|
1763
|
-
/** PAN-1862 (FR-12): fire a desktop notification for this entry (operator-facing warnings). */
|
|
1764
|
-
desktop: Schema.optional(Schema.Boolean)
|
|
1765
|
-
})
|
|
1766
|
-
});
|
|
1767
|
-
ActivityDetailedEvent = Schema.Struct({
|
|
1768
|
-
type: Schema.Literal("activity.detailed"),
|
|
1769
|
-
sequence: SequenceNumber,
|
|
1770
|
-
timestamp: Schema.String,
|
|
1771
|
-
payload: Schema.Struct({
|
|
1772
|
-
id: Schema.String,
|
|
1773
|
-
source: Schema.String,
|
|
1774
|
-
level: Schema.String,
|
|
1775
|
-
message: Schema.String,
|
|
1776
|
-
details: Schema.optional(Schema.String),
|
|
1777
|
-
issueId: Schema.optional(IssueId),
|
|
1778
|
-
triggeringEvent: Schema.optional(Schema.String)
|
|
1779
|
-
})
|
|
1780
|
-
});
|
|
1781
|
-
ActivityTtsEvent = Schema.Struct({
|
|
1782
|
-
type: Schema.Literal("activity.tts"),
|
|
1783
|
-
sequence: SequenceNumber,
|
|
1784
|
-
timestamp: Schema.String,
|
|
1785
|
-
payload: Schema.Struct({
|
|
1786
|
-
id: Schema.String,
|
|
1787
|
-
utterance: Schema.String,
|
|
1788
|
-
priority: Schema.optional(Schema.Number),
|
|
1789
|
-
issueId: Schema.optional(IssueId),
|
|
1790
|
-
source: Schema.optional(Schema.String),
|
|
1791
|
-
eventType: Schema.optional(Schema.String)
|
|
1792
|
-
})
|
|
1793
|
-
});
|
|
1794
|
-
DashboardLifecycleStartedEvent = Schema.Struct({
|
|
1795
|
-
type: Schema.Literal("dashboard.lifecycle_started"),
|
|
1796
|
-
sequence: SequenceNumber,
|
|
1797
|
-
timestamp: Schema.String,
|
|
1798
|
-
payload: Schema.Struct({
|
|
1799
|
-
reason: Schema.String,
|
|
1800
|
-
issueId: Schema.optional(IssueId),
|
|
1801
|
-
trigger: Schema.String
|
|
1802
|
-
})
|
|
1803
|
-
});
|
|
1804
|
-
DashboardLifecycleCompletedEvent = Schema.Struct({
|
|
1805
|
-
type: Schema.Literal("dashboard.lifecycle_completed"),
|
|
1806
|
-
sequence: SequenceNumber,
|
|
1807
|
-
timestamp: Schema.String,
|
|
1808
|
-
payload: Schema.Struct({
|
|
1809
|
-
reason: Schema.String,
|
|
1810
|
-
issueId: Schema.optional(IssueId),
|
|
1811
|
-
durationMs: Schema.Number
|
|
1812
|
-
})
|
|
1813
|
-
});
|
|
1814
|
-
DashboardLifecycleFailedEvent = Schema.Struct({
|
|
1815
|
-
type: Schema.Literal("dashboard.lifecycle_failed"),
|
|
1816
|
-
sequence: SequenceNumber,
|
|
1817
|
-
timestamp: Schema.String,
|
|
1818
|
-
payload: Schema.Struct({
|
|
1819
|
-
reason: Schema.String,
|
|
1820
|
-
issueId: Schema.optional(IssueId),
|
|
1821
|
-
error: Schema.String
|
|
1822
|
-
})
|
|
1823
|
-
});
|
|
1824
|
-
ShadowInferenceUpdateEvent = Schema.Struct({
|
|
1825
|
-
type: Schema.Literal("shadow.inference_update"),
|
|
1826
|
-
sequence: SequenceNumber,
|
|
1827
|
-
timestamp: Schema.String,
|
|
1828
|
-
payload: Schema.Struct({
|
|
1829
|
-
issueId: IssueId,
|
|
1830
|
-
content: Schema.String
|
|
1831
|
-
})
|
|
1832
|
-
});
|
|
1833
|
-
WorkspaceCreatedEvent = Schema.Struct({
|
|
1834
|
-
type: Schema.Literal("workspace.created"),
|
|
1835
|
-
sequence: SequenceNumber,
|
|
1836
|
-
timestamp: Schema.String,
|
|
1837
|
-
payload: Schema.Struct({
|
|
1838
|
-
issueId: IssueId,
|
|
1839
|
-
workspacePath: Schema.String
|
|
1840
|
-
})
|
|
1841
|
-
});
|
|
1842
|
-
WorkspaceWipeStartedEvent = Schema.Struct({
|
|
1843
|
-
type: Schema.Literal("workspace.wipe_started"),
|
|
1844
|
-
sequence: SequenceNumber,
|
|
1845
|
-
timestamp: Schema.String,
|
|
1846
|
-
payload: Schema.Struct({ issueId: IssueId })
|
|
1847
|
-
});
|
|
1848
|
-
WorkspaceDestroyedEvent = Schema.Struct({
|
|
1849
|
-
type: Schema.Literal("workspace.destroyed"),
|
|
1850
|
-
sequence: SequenceNumber,
|
|
1851
|
-
timestamp: Schema.String,
|
|
1852
|
-
payload: Schema.Struct({ issueId: IssueId })
|
|
1853
|
-
});
|
|
1854
|
-
WorkspaceDeletedEvent = Schema.Struct({
|
|
1855
|
-
type: Schema.Literal("workspace.deleted"),
|
|
1856
|
-
sequence: SequenceNumber,
|
|
1857
|
-
timestamp: Schema.String,
|
|
1858
|
-
payload: Schema.Struct({ issueId: IssueId })
|
|
1859
|
-
});
|
|
1860
|
-
WorkspaceAbortedEvent = Schema.Struct({
|
|
1861
|
-
type: Schema.Literal("workspace.aborted"),
|
|
1862
|
-
sequence: SequenceNumber,
|
|
1863
|
-
timestamp: Schema.String,
|
|
1864
|
-
payload: Schema.Struct({
|
|
1865
|
-
issueId: IssueId,
|
|
1866
|
-
sessionName: Schema.optional(Schema.String)
|
|
1867
|
-
})
|
|
1868
|
-
});
|
|
1869
|
-
MemoryObservationCreatedEvent = Schema.Struct({
|
|
1870
|
-
type: Schema.Literal("memory.observation_created"),
|
|
1871
|
-
sequence: SequenceNumber,
|
|
1872
|
-
timestamp: Schema.String,
|
|
1873
|
-
payload: Schema.Struct({ observation: MemoryObservation })
|
|
1874
|
-
});
|
|
1875
|
-
MemoryStatusUpdatedEvent = Schema.Struct({
|
|
1876
|
-
type: Schema.Literal("memory.status_updated"),
|
|
1877
|
-
sequence: SequenceNumber,
|
|
1878
|
-
timestamp: Schema.String,
|
|
1879
|
-
payload: Schema.Struct({
|
|
1880
|
-
identity: Schema.Struct({
|
|
1881
|
-
projectId: Schema.String,
|
|
1882
|
-
workspaceId: Schema.String,
|
|
1883
|
-
issueId: IssueId
|
|
1884
|
-
}),
|
|
1885
|
-
status: MemoryStatus,
|
|
1886
|
-
previousStatus: Schema.optional(MemoryStatus)
|
|
1887
|
-
})
|
|
1888
|
-
});
|
|
1889
|
-
MemoryRollupTriggeredEvent = Schema.Struct({
|
|
1890
|
-
type: Schema.Literal("memory.rollup_triggered"),
|
|
1891
|
-
sequence: SequenceNumber,
|
|
1892
|
-
timestamp: Schema.String,
|
|
1893
|
-
payload: Schema.Struct({
|
|
1894
|
-
projectId: Schema.String,
|
|
1895
|
-
workspaceId: Schema.String,
|
|
1896
|
-
issueId: IssueId,
|
|
1897
|
-
pendingCount: Schema.Number,
|
|
1898
|
-
turnIds: Schema.Array(Schema.String),
|
|
1899
|
-
threshold: Schema.Number
|
|
1900
|
-
})
|
|
1901
|
-
});
|
|
1902
|
-
MemoryResetMarkerCreatedEvent = Schema.Struct({
|
|
1903
|
-
type: Schema.Literal("memory.reset_marker_created"),
|
|
1904
|
-
sequence: SequenceNumber,
|
|
1905
|
-
timestamp: Schema.String,
|
|
1906
|
-
payload: Schema.Struct({ marker: ResetMarker })
|
|
1907
|
-
});
|
|
1908
|
-
MemoryHealthChangedEvent = Schema.Struct({
|
|
1909
|
-
type: Schema.Literal("memory.health_changed"),
|
|
1910
|
-
sequence: SequenceNumber,
|
|
1911
|
-
timestamp: Schema.String,
|
|
1912
|
-
payload: Schema.Struct({
|
|
1913
|
-
projectId: Schema.String,
|
|
1914
|
-
issueId: IssueId,
|
|
1915
|
-
status: Schema.Literals([
|
|
1916
|
-
"healthy",
|
|
1917
|
-
"degraded",
|
|
1918
|
-
"failing"
|
|
1919
|
-
]),
|
|
1920
|
-
reason: Schema.NullOr(Schema.String),
|
|
1921
|
-
detail: Schema.optional(Schema.String),
|
|
1922
|
-
ragDecision: Schema.optional(RagDecision)
|
|
1923
|
-
})
|
|
1924
|
-
});
|
|
1925
|
-
CostEventRecordedEvent = Schema.Struct({
|
|
1926
|
-
type: Schema.Literal("cost.event_recorded"),
|
|
1927
|
-
sequence: SequenceNumber,
|
|
1928
|
-
timestamp: Schema.String,
|
|
1929
|
-
payload: Schema.Struct({
|
|
1930
|
-
agentId: AgentId,
|
|
1931
|
-
issueId: IssueId,
|
|
1932
|
-
cost: Schema.Number,
|
|
1933
|
-
inputTokens: Schema.Number,
|
|
1934
|
-
outputTokens: Schema.Number
|
|
1935
|
-
})
|
|
1936
|
-
});
|
|
1937
|
-
ConversationCompactingChangedEvent = Schema.Struct({
|
|
1938
|
-
type: Schema.Literal("conversation.compacting_changed"),
|
|
1939
|
-
sequence: SequenceNumber,
|
|
1940
|
-
timestamp: Schema.String,
|
|
1941
|
-
payload: Schema.Struct({
|
|
1942
|
-
conversationName: Schema.String,
|
|
1943
|
-
compacting: Schema.Boolean
|
|
1944
|
-
})
|
|
1945
|
-
});
|
|
1946
|
-
ConversationCreatedEvent = Schema.Struct({
|
|
1947
|
-
type: Schema.Literal("conversation.created"),
|
|
1948
|
-
sequence: SequenceNumber,
|
|
1949
|
-
timestamp: Schema.String,
|
|
1950
|
-
payload: Schema.Struct({ conversationName: Schema.String })
|
|
1951
|
-
});
|
|
1952
|
-
ConversationTitleChangedEvent = Schema.Struct({
|
|
1953
|
-
type: Schema.Literal("conversation.title_changed"),
|
|
1954
|
-
sequence: SequenceNumber,
|
|
1955
|
-
timestamp: Schema.String,
|
|
1956
|
-
payload: Schema.Struct({
|
|
1957
|
-
conversationName: Schema.String,
|
|
1958
|
-
title: Schema.String,
|
|
1959
|
-
titleSource: Schema.String
|
|
1960
|
-
})
|
|
1961
|
-
});
|
|
1962
|
-
ConversationPermissionChangedEvent = Schema.Struct({
|
|
1963
|
-
type: Schema.Literal("conversation.permission_changed"),
|
|
1964
|
-
sequence: SequenceNumber,
|
|
1965
|
-
timestamp: Schema.String,
|
|
1966
|
-
payload: Schema.Struct({
|
|
1967
|
-
conversationName: Schema.String,
|
|
1968
|
-
waiting: Schema.Boolean,
|
|
1969
|
-
toolName: Schema.optional(Schema.String)
|
|
1970
|
-
})
|
|
1971
|
-
});
|
|
1972
|
-
ScanStartedEvent = Schema.Struct({
|
|
1973
|
-
type: Schema.Literal("scan.started"),
|
|
1974
|
-
sequence: SequenceNumber,
|
|
1975
|
-
timestamp: Schema.String,
|
|
1976
|
-
payload: Schema.Struct({
|
|
1977
|
-
mode: Schema.Literals([
|
|
1978
|
-
"targeted",
|
|
1979
|
-
"watched",
|
|
1980
|
-
"system"
|
|
1981
|
-
]),
|
|
1982
|
-
dirs: Schema.Array(Schema.String)
|
|
1983
|
-
})
|
|
1984
|
-
});
|
|
1985
|
-
ScanProgressEvent = Schema.Struct({
|
|
1986
|
-
type: Schema.Literal("scan.progress"),
|
|
1987
|
-
sequence: SequenceNumber,
|
|
1988
|
-
timestamp: Schema.String,
|
|
1989
|
-
payload: Schema.Struct({
|
|
1990
|
-
dirsProcessed: Schema.Number,
|
|
1991
|
-
dirsTotal: Schema.Number,
|
|
1992
|
-
sessionsFound: Schema.Number,
|
|
1993
|
-
elapsedMs: Schema.Number
|
|
1994
|
-
})
|
|
1995
|
-
});
|
|
1996
|
-
ScanCompleteEvent = Schema.Struct({
|
|
1997
|
-
type: Schema.Literal("scan.complete"),
|
|
1998
|
-
sequence: SequenceNumber,
|
|
1999
|
-
timestamp: Schema.String,
|
|
2000
|
-
payload: Schema.Struct({
|
|
2001
|
-
inserted: Schema.Number,
|
|
2002
|
-
updated: Schema.Number,
|
|
2003
|
-
skipped: Schema.Number,
|
|
2004
|
-
errors: Schema.Number,
|
|
2005
|
-
durationMs: Schema.Number
|
|
2006
|
-
})
|
|
2007
|
-
});
|
|
2008
|
-
EnrichProgressEvent = Schema.Struct({
|
|
2009
|
-
type: Schema.Literal("enrich.progress"),
|
|
2010
|
-
sequence: SequenceNumber,
|
|
2011
|
-
timestamp: Schema.String,
|
|
2012
|
-
payload: Schema.Struct({
|
|
2013
|
-
sessionId: Schema.Number,
|
|
2014
|
-
level: Schema.Number,
|
|
2015
|
-
model: Schema.String,
|
|
2016
|
-
cost: Schema.Number,
|
|
2017
|
-
success: Schema.Boolean,
|
|
2018
|
-
error: Schema.optional(Schema.String)
|
|
2019
|
-
})
|
|
2020
|
-
});
|
|
2021
|
-
EnrichCompleteEvent = Schema.Struct({
|
|
2022
|
-
type: Schema.Literal("enrich.complete"),
|
|
2023
|
-
sequence: SequenceNumber,
|
|
2024
|
-
timestamp: Schema.String,
|
|
2025
|
-
payload: Schema.Struct({
|
|
2026
|
-
processed: Schema.Number,
|
|
2027
|
-
totalCost: Schema.Number,
|
|
2028
|
-
failures: Schema.Number,
|
|
2029
|
-
durationMs: Schema.Number
|
|
2030
|
-
})
|
|
2031
|
-
});
|
|
2032
|
-
EmbedProgressEvent = Schema.Struct({
|
|
2033
|
-
type: Schema.Literal("embed.progress"),
|
|
2034
|
-
sequence: SequenceNumber,
|
|
2035
|
-
timestamp: Schema.String,
|
|
2036
|
-
payload: Schema.Struct({
|
|
2037
|
-
sessionId: Schema.Number,
|
|
2038
|
-
model: Schema.String,
|
|
2039
|
-
success: Schema.Boolean,
|
|
2040
|
-
error: Schema.optional(Schema.String)
|
|
2041
|
-
})
|
|
2042
|
-
});
|
|
2043
|
-
DomainEvent = Schema.Union([
|
|
2044
|
-
SystemHeartbeatEvent,
|
|
2045
|
-
BeadsFreshnessChangedEvent,
|
|
2046
|
-
AgentCreatedEvent,
|
|
2047
|
-
AgentEnrichmentChangedEvent,
|
|
2048
|
-
AgentStartedEvent,
|
|
2049
|
-
AgentStoppedEvent,
|
|
2050
|
-
AgentHeartbeatDeadEvent,
|
|
2051
|
-
WorkCompletedEvent,
|
|
2052
|
-
AgentCompletedEvent,
|
|
2053
|
-
ReviewApprovedEvent,
|
|
2054
|
-
TestPassedEvent,
|
|
2055
|
-
AgentStatusChangedEvent,
|
|
2056
|
-
AgentOutputReceivedEvent,
|
|
2057
|
-
AgentActivityChangedEvent,
|
|
2058
|
-
AgentThinkingStartedEvent,
|
|
2059
|
-
AgentThinkingStoppedEvent,
|
|
2060
|
-
AgentWaitingStartedEvent,
|
|
2061
|
-
AgentWaitingClearedEvent,
|
|
2062
|
-
AgentPermissionRequestedEvent,
|
|
2063
|
-
AgentPermissionResolvedEvent,
|
|
2064
|
-
AgentMessageReceivedEvent,
|
|
2065
|
-
AgentChannelReplyEvent,
|
|
2066
|
-
AgentModelSetEvent,
|
|
2067
|
-
AgentCurrentIssueSetEvent,
|
|
2068
|
-
AgentContextSaturationChangedEvent,
|
|
2069
|
-
AgentResolutionChangedEvent,
|
|
2070
|
-
AgentStateRestoredEvent,
|
|
2071
|
-
AgentTurnDiffCompletedEvent,
|
|
2072
|
-
PlanningStartedEvent,
|
|
2073
|
-
PlanningFailedEvent,
|
|
2074
|
-
PlanningSyncEvent,
|
|
2075
|
-
PlanItemStatusChangedEvent,
|
|
2076
|
-
PlanSubitemStatusChangedEvent,
|
|
2077
|
-
PlanItemsUnblockedEvent,
|
|
2078
|
-
PipelineStatusChangedEvent,
|
|
2079
|
-
MergeReadyEvent,
|
|
2080
|
-
ReviewStatusChangedEvent,
|
|
2081
|
-
PipelineReviewStartedEvent,
|
|
2082
|
-
PipelineReviewCompletedEvent,
|
|
2083
|
-
PipelineTestStartedEvent,
|
|
2084
|
-
PipelineTestCompletedEvent,
|
|
2085
|
-
PipelineVerificationStartedEvent,
|
|
2086
|
-
PipelineVerificationFailedEvent,
|
|
2087
|
-
IssueTransitionedEvent,
|
|
2088
|
-
OperatorInterventionEvent,
|
|
2089
|
-
SubstrateBugFiledEvent,
|
|
2090
|
-
ReviewReviewerStartedEvent,
|
|
2091
|
-
ReviewReviewerCompletedEvent,
|
|
2092
|
-
ReviewSpecialistTimedOutEvent,
|
|
2093
|
-
ReviewCoordinatorStartedEvent,
|
|
2094
|
-
ReviewCoordinatorDiedEvent,
|
|
2095
|
-
SpecialistStartedEvent,
|
|
2096
|
-
SpecialistCompletedEvent,
|
|
2097
|
-
SpecialistFailedEvent,
|
|
2098
|
-
ResourcesUpdatedEvent,
|
|
2099
|
-
SystemHealthSeverityChangedEvent,
|
|
2100
|
-
IssuesSnapshotEvent,
|
|
2101
|
-
IssuesUpdatedEvent,
|
|
2102
|
-
IssueStatusChangedEvent,
|
|
2103
|
-
ActivityUpdatedEvent,
|
|
2104
|
-
ActivityEntryEvent,
|
|
2105
|
-
ActivityDetailedEvent,
|
|
2106
|
-
ActivityTtsEvent,
|
|
2107
|
-
ShadowInferenceUpdateEvent,
|
|
2108
|
-
MemoryObservationCreatedEvent,
|
|
2109
|
-
MemoryStatusUpdatedEvent,
|
|
2110
|
-
MemoryRollupTriggeredEvent,
|
|
2111
|
-
MemoryResetMarkerCreatedEvent,
|
|
2112
|
-
MemoryHealthChangedEvent,
|
|
2113
|
-
CostEventRecordedEvent,
|
|
2114
|
-
WorkspaceCreatedEvent,
|
|
2115
|
-
WorkspaceWipeStartedEvent,
|
|
2116
|
-
WorkspaceDestroyedEvent,
|
|
2117
|
-
WorkspaceDeletedEvent,
|
|
2118
|
-
WorkspaceAbortedEvent,
|
|
2119
|
-
DashboardLifecycleStartedEvent,
|
|
2120
|
-
DashboardLifecycleCompletedEvent,
|
|
2121
|
-
DashboardLifecycleFailedEvent,
|
|
2122
|
-
ConversationCompactingChangedEvent,
|
|
2123
|
-
ConversationCreatedEvent,
|
|
2124
|
-
ConversationTitleChangedEvent,
|
|
2125
|
-
ConversationPermissionChangedEvent,
|
|
2126
|
-
ScanStartedEvent,
|
|
2127
|
-
ScanProgressEvent,
|
|
2128
|
-
ScanCompleteEvent,
|
|
2129
|
-
EnrichProgressEvent,
|
|
2130
|
-
EnrichCompleteEvent,
|
|
2131
|
-
EmbedProgressEvent
|
|
2132
|
-
]);
|
|
2133
|
-
}));
|
|
2134
|
-
//#endregion
|
|
2135
|
-
//#region ../../../packages/contracts/src/editor.ts
|
|
2136
|
-
var EDITORS, EDITOR_IDS, EditorIdSchema, OpenInEditorInput;
|
|
2137
|
-
var init_editor = __esmMin((() => {
|
|
2138
|
-
EDITORS = [
|
|
2139
|
-
{
|
|
2140
|
-
id: "cursor",
|
|
2141
|
-
label: "Cursor",
|
|
2142
|
-
command: "cursor",
|
|
2143
|
-
supportsGoto: true
|
|
2144
|
-
},
|
|
2145
|
-
{
|
|
2146
|
-
id: "windsurf",
|
|
2147
|
-
label: "Windsurf",
|
|
2148
|
-
command: "windsurf",
|
|
2149
|
-
supportsGoto: true
|
|
2150
|
-
},
|
|
2151
|
-
{
|
|
2152
|
-
id: "trae",
|
|
2153
|
-
label: "Trae",
|
|
2154
|
-
command: "trae",
|
|
2155
|
-
supportsGoto: true
|
|
2156
|
-
},
|
|
2157
|
-
{
|
|
2158
|
-
id: "kiro",
|
|
2159
|
-
label: "Kiro",
|
|
2160
|
-
command: "kiro",
|
|
2161
|
-
supportsGoto: true
|
|
2162
|
-
},
|
|
2163
|
-
{
|
|
2164
|
-
id: "vscode",
|
|
2165
|
-
label: "VS Code",
|
|
2166
|
-
command: "code",
|
|
2167
|
-
supportsGoto: true
|
|
2168
|
-
},
|
|
2169
|
-
{
|
|
2170
|
-
id: "vscode-insiders",
|
|
2171
|
-
label: "VS Code Insiders",
|
|
2172
|
-
command: "code-insiders",
|
|
2173
|
-
supportsGoto: true
|
|
2174
|
-
},
|
|
2175
|
-
{
|
|
2176
|
-
id: "vscodium",
|
|
2177
|
-
label: "VSCodium",
|
|
2178
|
-
command: "codium",
|
|
2179
|
-
supportsGoto: true
|
|
2180
|
-
},
|
|
2181
|
-
{
|
|
2182
|
-
id: "zed",
|
|
2183
|
-
label: "Zed",
|
|
2184
|
-
command: "zed",
|
|
2185
|
-
supportsGoto: false
|
|
2186
|
-
},
|
|
2187
|
-
{
|
|
2188
|
-
id: "antigravity",
|
|
2189
|
-
label: "Antigravity",
|
|
2190
|
-
command: "agy",
|
|
2191
|
-
supportsGoto: false
|
|
2192
|
-
},
|
|
2193
|
-
{
|
|
2194
|
-
id: "idea",
|
|
2195
|
-
label: "IntelliJ IDEA",
|
|
2196
|
-
command: "idea",
|
|
2197
|
-
supportsGoto: true
|
|
2198
|
-
},
|
|
2199
|
-
{
|
|
2200
|
-
id: "aqua",
|
|
2201
|
-
label: "Aqua",
|
|
2202
|
-
command: "aqua",
|
|
2203
|
-
supportsGoto: true
|
|
2204
|
-
},
|
|
2205
|
-
{
|
|
2206
|
-
id: "clion",
|
|
2207
|
-
label: "CLion",
|
|
2208
|
-
command: "clion",
|
|
2209
|
-
supportsGoto: true
|
|
2210
|
-
},
|
|
2211
|
-
{
|
|
2212
|
-
id: "datagrip",
|
|
2213
|
-
label: "DataGrip",
|
|
2214
|
-
command: "datagrip",
|
|
2215
|
-
supportsGoto: true
|
|
2216
|
-
},
|
|
2217
|
-
{
|
|
2218
|
-
id: "dataspell",
|
|
2219
|
-
label: "DataSpell",
|
|
2220
|
-
command: "dataspell",
|
|
2221
|
-
supportsGoto: true
|
|
2222
|
-
},
|
|
2223
|
-
{
|
|
2224
|
-
id: "goland",
|
|
2225
|
-
label: "GoLand",
|
|
2226
|
-
command: "goland",
|
|
2227
|
-
supportsGoto: true
|
|
2228
|
-
},
|
|
2229
|
-
{
|
|
2230
|
-
id: "phpstorm",
|
|
2231
|
-
label: "PhpStorm",
|
|
2232
|
-
command: "phpstorm",
|
|
2233
|
-
supportsGoto: true
|
|
2234
|
-
},
|
|
2235
|
-
{
|
|
2236
|
-
id: "pycharm",
|
|
2237
|
-
label: "PyCharm",
|
|
2238
|
-
command: "pycharm",
|
|
2239
|
-
supportsGoto: true
|
|
2240
|
-
},
|
|
2241
|
-
{
|
|
2242
|
-
id: "rider",
|
|
2243
|
-
label: "Rider",
|
|
2244
|
-
command: "rider",
|
|
2245
|
-
supportsGoto: true
|
|
2246
|
-
},
|
|
2247
|
-
{
|
|
2248
|
-
id: "rubymine",
|
|
2249
|
-
label: "RubyMine",
|
|
2250
|
-
command: "rubymine",
|
|
2251
|
-
supportsGoto: true
|
|
2252
|
-
},
|
|
2253
|
-
{
|
|
2254
|
-
id: "rustrover",
|
|
2255
|
-
label: "RustRover",
|
|
2256
|
-
command: "rustrover",
|
|
2257
|
-
supportsGoto: true
|
|
2258
|
-
},
|
|
2259
|
-
{
|
|
2260
|
-
id: "webstorm",
|
|
2261
|
-
label: "WebStorm",
|
|
2262
|
-
command: "webstorm",
|
|
2263
|
-
supportsGoto: true
|
|
2264
|
-
},
|
|
2265
|
-
{
|
|
2266
|
-
id: "file-manager",
|
|
2267
|
-
label: "File Manager",
|
|
2268
|
-
command: null,
|
|
2269
|
-
supportsGoto: false
|
|
2270
|
-
}
|
|
2271
|
-
];
|
|
2272
|
-
EDITOR_IDS = [
|
|
2273
|
-
"cursor",
|
|
2274
|
-
"windsurf",
|
|
2275
|
-
"trae",
|
|
2276
|
-
"kiro",
|
|
2277
|
-
"vscode",
|
|
2278
|
-
"vscode-insiders",
|
|
2279
|
-
"vscodium",
|
|
2280
|
-
"zed",
|
|
2281
|
-
"antigravity",
|
|
2282
|
-
"idea",
|
|
2283
|
-
"aqua",
|
|
2284
|
-
"clion",
|
|
2285
|
-
"datagrip",
|
|
2286
|
-
"dataspell",
|
|
2287
|
-
"goland",
|
|
2288
|
-
"phpstorm",
|
|
2289
|
-
"pycharm",
|
|
2290
|
-
"rider",
|
|
2291
|
-
"rubymine",
|
|
2292
|
-
"rustrover",
|
|
2293
|
-
"webstorm",
|
|
2294
|
-
"file-manager"
|
|
2295
|
-
];
|
|
2296
|
-
EditorIdSchema = Schema.Literals(EDITOR_IDS);
|
|
2297
|
-
OpenInEditorInput = Schema.Struct({
|
|
2298
|
-
cwd: Schema.String,
|
|
2299
|
-
editor: EditorIdSchema
|
|
2300
|
-
});
|
|
2301
|
-
}));
|
|
2302
|
-
//#endregion
|
|
2303
|
-
//#region ../../../packages/contracts/src/flywheel.ts
|
|
2304
|
-
var FlywheelRunId, FlywheelHttpUrl, FlywheelHarness, FlywheelEffort, FlywheelOrchestrator, FlywheelHeadline, FlywheelPipelineVerb, FlywheelPipelineStatus, FlywheelPipelineItem, FlywheelSubstrateBugStatus, FlywheelSubstrateBug, FlywheelAgentStatus, FlywheelAgent, FlywheelParkedItem, FlywheelSuggestionAction, FlywheelSuggestionPriority, FlywheelSuggestion, FlywheelSystemStatus, FlywheelOrders, FlywheelStatus;
|
|
2305
|
-
var init_flywheel = __esmMin((() => {
|
|
2306
|
-
FlywheelRunId = Schema.String.check(Schema.isPattern(/^RUN-\d+$/));
|
|
2307
|
-
FlywheelHttpUrl = Schema.String.check(Schema.isPattern(/^https?:\/\/\S+$/i));
|
|
2308
|
-
FlywheelHarness = Schema.Literals([
|
|
2309
|
-
"claude-code",
|
|
2310
|
-
"pi",
|
|
2311
|
-
"ohmypi",
|
|
2312
|
-
"codex",
|
|
2313
|
-
"acp"
|
|
2314
|
-
]);
|
|
2315
|
-
FlywheelEffort = Schema.Literals([
|
|
2316
|
-
"low",
|
|
2317
|
-
"medium",
|
|
2318
|
-
"high",
|
|
2319
|
-
"xhigh",
|
|
2320
|
-
"max"
|
|
2321
|
-
]);
|
|
2322
|
-
FlywheelOrchestrator = Schema.Struct({
|
|
2323
|
-
harness: FlywheelHarness,
|
|
2324
|
-
model: Schema.String,
|
|
2325
|
-
effort: FlywheelEffort,
|
|
2326
|
-
ctxPercent: Schema.Number
|
|
2327
|
-
});
|
|
2328
|
-
FlywheelHeadline = Schema.Struct({
|
|
2329
|
-
bugsFixed: Schema.Number,
|
|
2330
|
-
swarmItemsMerged: Schema.Number,
|
|
2331
|
-
swarmItemsTotal: Schema.Number,
|
|
2332
|
-
prsMerged: Schema.Number,
|
|
2333
|
-
awaitingUat: Schema.Number
|
|
2334
|
-
});
|
|
2335
|
-
FlywheelPipelineVerb = Schema.Literals([
|
|
2336
|
-
"planning",
|
|
2337
|
-
"working",
|
|
2338
|
-
"reviewing",
|
|
2339
|
-
"testing",
|
|
2340
|
-
"shipping",
|
|
2341
|
-
"merging",
|
|
2342
|
-
"blocked",
|
|
2343
|
-
"parked"
|
|
2344
|
-
]);
|
|
2345
|
-
FlywheelPipelineStatus = Schema.Literals([
|
|
2346
|
-
"queued",
|
|
2347
|
-
"running",
|
|
2348
|
-
"blocked",
|
|
2349
|
-
"passed",
|
|
2350
|
-
"failed",
|
|
2351
|
-
"merged",
|
|
2352
|
-
"parked"
|
|
2353
|
-
]);
|
|
2354
|
-
FlywheelPipelineItem = Schema.Struct({
|
|
2355
|
-
issueId: Schema.String,
|
|
2356
|
-
title: Schema.String,
|
|
2357
|
-
verb: FlywheelPipelineVerb,
|
|
2358
|
-
status: FlywheelPipelineStatus,
|
|
2359
|
-
progressPercent: Schema.optional(Schema.Number),
|
|
2360
|
-
agentId: Schema.optional(Schema.String),
|
|
2361
|
-
pr: Schema.optional(Schema.Number),
|
|
2362
|
-
mergeOrder: Schema.optional(Schema.Number),
|
|
2363
|
-
conflictsWith: Schema.optional(Schema.Array(Schema.String))
|
|
2364
|
-
});
|
|
2365
|
-
FlywheelSubstrateBugStatus = Schema.Literals([
|
|
2366
|
-
"filed",
|
|
2367
|
-
"fixed",
|
|
2368
|
-
"workaround"
|
|
2369
|
-
]);
|
|
2370
|
-
FlywheelSubstrateBug = Schema.Struct({
|
|
2371
|
-
issueId: Schema.String,
|
|
2372
|
-
title: Schema.String,
|
|
2373
|
-
status: FlywheelSubstrateBugStatus,
|
|
2374
|
-
commitSha: Schema.optional(Schema.String),
|
|
2375
|
-
url: Schema.optional(FlywheelHttpUrl)
|
|
2376
|
-
});
|
|
2377
|
-
FlywheelAgentStatus = Schema.Literals([
|
|
2378
|
-
"starting",
|
|
2379
|
-
"running",
|
|
2380
|
-
"waiting",
|
|
2381
|
-
"idle",
|
|
2382
|
-
"stopped",
|
|
2383
|
-
"error"
|
|
2384
|
-
]);
|
|
2385
|
-
FlywheelAgent = Schema.Struct({
|
|
2386
|
-
id: Schema.String,
|
|
2387
|
-
label: Schema.String,
|
|
2388
|
-
status: FlywheelAgentStatus,
|
|
2389
|
-
issueId: Schema.optional(Schema.String),
|
|
2390
|
-
role: Schema.optional(Schema.String),
|
|
2391
|
-
model: Schema.optional(Schema.String),
|
|
2392
|
-
ctxPercent: Schema.optional(Schema.Number),
|
|
2393
|
-
currentAction: Schema.optional(Schema.String)
|
|
2394
|
-
});
|
|
2395
|
-
FlywheelParkedItem = Schema.Struct({
|
|
2396
|
-
issueId: Schema.String,
|
|
2397
|
-
title: Schema.String,
|
|
2398
|
-
reason: Schema.String,
|
|
2399
|
-
parkedAt: Schema.optional(Schema.String)
|
|
2400
|
-
});
|
|
2401
|
-
FlywheelSuggestionAction = Schema.Literals([
|
|
2402
|
-
"start",
|
|
2403
|
-
"resume",
|
|
2404
|
-
"plan",
|
|
2405
|
-
"review",
|
|
2406
|
-
"merge",
|
|
2407
|
-
"unblock",
|
|
2408
|
-
"park",
|
|
2409
|
-
"investigate",
|
|
2410
|
-
"wait"
|
|
2411
|
-
]);
|
|
2412
|
-
FlywheelSuggestionPriority = Schema.Literals([
|
|
2413
|
-
"urgent",
|
|
2414
|
-
"high",
|
|
2415
|
-
"medium",
|
|
2416
|
-
"low"
|
|
2417
|
-
]);
|
|
2418
|
-
FlywheelSuggestion = Schema.Struct({
|
|
2419
|
-
action: FlywheelSuggestionAction,
|
|
2420
|
-
issueId: Schema.optional(Schema.String),
|
|
2421
|
-
rationale: Schema.String,
|
|
2422
|
-
priority: FlywheelSuggestionPriority,
|
|
2423
|
-
filedBy: Schema.optional(Schema.Literals(["agent", "operator"])),
|
|
2424
|
-
weight: Schema.optional(Schema.Number),
|
|
2425
|
-
weightReason: Schema.optional(Schema.String)
|
|
2426
|
-
});
|
|
2427
|
-
FlywheelSystemStatus = Schema.Struct({
|
|
2428
|
-
mainHead: Schema.String,
|
|
2429
|
-
ramUsedMb: Schema.Number,
|
|
2430
|
-
ramTotalMb: Schema.Number,
|
|
2431
|
-
swapUsedMb: Schema.Number,
|
|
2432
|
-
swapTotalMb: Schema.Number,
|
|
2433
|
-
agentsActive: Schema.Number,
|
|
2434
|
-
agentsCap: Schema.Number
|
|
2435
|
-
});
|
|
2436
|
-
FlywheelOrders = Schema.Struct({
|
|
2437
|
-
bookId: Schema.String,
|
|
2438
|
-
bookName: Schema.String,
|
|
2439
|
-
landed: Schema.Number,
|
|
2440
|
-
total: Schema.Number,
|
|
2441
|
-
laneAInFlight: Schema.Array(Schema.String),
|
|
2442
|
-
laneBInFlight: Schema.optional(Schema.String),
|
|
2443
|
-
drained: Schema.Boolean
|
|
2444
|
-
});
|
|
2445
|
-
FlywheelStatus = Schema.Struct({
|
|
2446
|
-
runId: FlywheelRunId,
|
|
2447
|
-
startedAt: Schema.String,
|
|
2448
|
-
elapsedMs: Schema.Number,
|
|
2449
|
-
orchestrator: FlywheelOrchestrator,
|
|
2450
|
-
headline: FlywheelHeadline,
|
|
2451
|
-
activePipeline: Schema.Array(FlywheelPipelineItem),
|
|
2452
|
-
substrateBugs: Schema.Array(FlywheelSubstrateBug),
|
|
2453
|
-
agents: Schema.Array(FlywheelAgent),
|
|
2454
|
-
parked: Schema.Array(FlywheelParkedItem),
|
|
2455
|
-
suggestions: Schema.Array(FlywheelSuggestion).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
|
|
2456
|
-
system: FlywheelSystemStatus,
|
|
2457
|
-
openQuestions: Schema.Array(Schema.String),
|
|
2458
|
-
orders: Schema.optional(FlywheelOrders),
|
|
2459
|
-
ticks: Schema.Number,
|
|
2460
|
-
lastTickAt: Schema.String
|
|
2461
|
-
});
|
|
2462
|
-
}));
|
|
2463
|
-
//#endregion
|
|
2464
|
-
//#region ../../../packages/contracts/src/rpc.ts
|
|
2465
|
-
var WS_METHODS, PanRpcError, TerminalOutput, AgentOutput, ProposedPlan, CompactBoundary, ContextUsage, ChatMessage, WorkLogEntry, ConversationEvent, SessionTreeDelta, SubscribeDomainEventsRpc, SubscribeIssueEventsRpc, SubscribeTerminalRpc, SubscribeAgentOutputRpc, GetSnapshotRpc, ReplayEventsRpc, TerminalOpenRpc, TerminalWriteRpc, TerminalResizeRpc, TerminalCloseRpc, GetWorkspaceDetailRpc, ReadWorkspaceFileInput, ReadWorkspaceFileResult, ReadWorkspaceFileRpc, ResolveFilePathExistsInput, ResolveFilePathExistsResult, ResolveFilePathExistsRpc, StartPlanningRpc, StartAgentRpc, DeepWipeRpc, SendTerminalInputRpc, ResizeTerminalRpc, SubscribeConversationMessagesRpc, SubscribeProjectSessionTreeRpc, SubscribeFlywheelStatusRpc, ShellOpenInEditorRpc, GetAvailableEditorsRpc, DiscoveredSessionListResult, SessionsFeedPayload, SessionsFeedListResult, DiscoveredSessionSearchResult, DiscoveredSessionStatsResult, ConversationCostTotals, ScanConversationsRpc, SearchConversationsRpc, ListDiscoveredSessionsRpc, ListSessionsFeedRpc, GetSessionsFeedFacetsRpc, GetDiscoveredSessionRpc, EnrichSessionsRpc, EmbedSessionsRpc, GetConversationCostRpc, GetConversationCostByWorkspaceRpc, GetConversationStatsRpc, PanRpcGroup;
|
|
2466
|
-
var init_rpc = __esmMin((() => {
|
|
2467
|
-
init_events();
|
|
2468
|
-
init_types();
|
|
2469
|
-
init_editor();
|
|
2470
|
-
init_flywheel();
|
|
2471
|
-
WS_METHODS = {
|
|
2472
|
-
scanConversations: "pan.scanConversations",
|
|
2473
|
-
searchConversations: "pan.searchConversations",
|
|
2474
|
-
listDiscoveredSessions: "pan.listDiscoveredSessions",
|
|
2475
|
-
listSessionsFeed: "pan.listSessionsFeed",
|
|
2476
|
-
getSessionsFeedFacets: "pan.getSessionsFeedFacets",
|
|
2477
|
-
getDiscoveredSession: "pan.getDiscoveredSession",
|
|
2478
|
-
enrichSessions: "pan.enrichSessions",
|
|
2479
|
-
embedSessions: "pan.embedSessions",
|
|
2480
|
-
getConversationCost: "pan.getConversationCost",
|
|
2481
|
-
getConversationCostByWorkspace: "pan.getConversationCostByWorkspace",
|
|
2482
|
-
getConversationStats: "pan.getConversationStats",
|
|
2483
|
-
subscribeDomainEvents: "pan.subscribeDomainEvents",
|
|
2484
|
-
subscribeIssueEvents: "pan.subscribeIssueEvents",
|
|
2485
|
-
subscribeTerminal: "pan.subscribeTerminal",
|
|
2486
|
-
subscribeAgentOutput: "pan.subscribeAgentOutput",
|
|
2487
|
-
subscribeConversationMessages: "pan.subscribeConversationMessages",
|
|
2488
|
-
subscribeProjectSessionTree: "pan.subscribeProjectSessionTree",
|
|
2489
|
-
subscribeFlywheelStatus: "pan.subscribeFlywheelStatus",
|
|
2490
|
-
getSnapshot: "pan.getSnapshot",
|
|
2491
|
-
replayEvents: "pan.replayEvents",
|
|
2492
|
-
getWorkspaceDetail: "pan.getWorkspaceDetail",
|
|
2493
|
-
readWorkspaceFile: "pan.readWorkspaceFile",
|
|
2494
|
-
resolveFilePathExists: "pan.resolveFilePathExists",
|
|
2495
|
-
terminalOpen: "pan.terminalOpen",
|
|
2496
|
-
terminalWrite: "pan.terminalWrite",
|
|
2497
|
-
terminalResize: "pan.terminalResize",
|
|
2498
|
-
terminalClose: "pan.terminalClose",
|
|
2499
|
-
startPlanning: "pan.startPlanning",
|
|
2500
|
-
startAgent: "pan.startAgent",
|
|
2501
|
-
deepWipe: "pan.deepWipe",
|
|
2502
|
-
sendTerminalInput: "pan.sendTerminalInput",
|
|
2503
|
-
resizeTerminal: "pan.resizeTerminal",
|
|
2504
|
-
shellOpenInEditor: "pan.shellOpenInEditor",
|
|
2505
|
-
getAvailableEditors: "pan.getAvailableEditors"
|
|
2506
|
-
};
|
|
2507
|
-
PanRpcError = class extends Schema.TaggedErrorClass()("PanRpcError", {
|
|
2508
|
-
message: Schema.String,
|
|
2509
|
-
code: Schema.optional(Schema.String)
|
|
2510
|
-
}) {};
|
|
2511
|
-
TerminalOutput = Schema.Struct({
|
|
2512
|
-
sessionName: Schema.String,
|
|
2513
|
-
data: Schema.String
|
|
2514
|
-
});
|
|
2515
|
-
AgentOutput = Schema.Struct({
|
|
2516
|
-
agentId: Schema.String,
|
|
2517
|
-
line: Schema.String
|
|
2518
|
-
});
|
|
2519
|
-
ProposedPlan = Schema.Struct({
|
|
2520
|
-
id: Schema.String,
|
|
2521
|
-
plan: Schema.String,
|
|
2522
|
-
planFilePath: Schema.optional(Schema.String),
|
|
2523
|
-
status: Schema.Literals([
|
|
2524
|
-
"pending",
|
|
2525
|
-
"approved",
|
|
2526
|
-
"rejected"
|
|
2527
|
-
]),
|
|
2528
|
-
createdAt: Schema.String,
|
|
2529
|
-
resolvedAt: Schema.optional(Schema.String)
|
|
2530
|
-
});
|
|
2531
|
-
CompactBoundary = Schema.Struct({
|
|
2532
|
-
id: Schema.String,
|
|
2533
|
-
timestamp: Schema.String,
|
|
2534
|
-
trigger: Schema.optional(Schema.String),
|
|
2535
|
-
preTokens: Schema.optional(Schema.Number),
|
|
2536
|
-
model: Schema.optional(Schema.String)
|
|
2537
|
-
});
|
|
2538
|
-
ContextUsage = Schema.Struct({
|
|
2539
|
-
activeBytes: Schema.Number,
|
|
2540
|
-
estimatedTokens: Schema.Number,
|
|
2541
|
-
contextWindow: Schema.Number,
|
|
2542
|
-
percentUsed: Schema.Number,
|
|
2543
|
-
/**
|
|
2544
|
-
* Optional breakdown of the last assistant turn — surfaced by the click
|
|
2545
|
-
* popover on the ContextWindowMeter so users can see WHY the meter says
|
|
2546
|
-
* what it does. Computed by `computeContextUsage()` from JSONL `usage`.
|
|
2547
|
-
*/
|
|
2548
|
-
lastInputTokens: Schema.optional(Schema.Number),
|
|
2549
|
-
lastCacheReadTokens: Schema.optional(Schema.Number),
|
|
2550
|
-
lastCacheCreationTokens: Schema.optional(Schema.Number),
|
|
2551
|
-
/** Highest input_tokens ever observed in this window — triggers 1M detection. */
|
|
2552
|
-
maxObservedInputTokens: Schema.optional(Schema.Number),
|
|
2553
|
-
/** Model the most recent assistant turn ran under (from JSONL). */
|
|
2554
|
-
lastModel: Schema.optional(Schema.NullOr(Schema.String)),
|
|
2555
|
-
/** ISO timestamp of the most recent assistant turn. */
|
|
2556
|
-
lastTurnAt: Schema.optional(Schema.NullOr(Schema.String))
|
|
2557
|
-
});
|
|
2558
|
-
ChatMessage = Schema.Struct({
|
|
2559
|
-
id: Schema.String,
|
|
2560
|
-
role: Schema.Literals([
|
|
2561
|
-
"user",
|
|
2562
|
-
"assistant",
|
|
2563
|
-
"system"
|
|
2564
|
-
]),
|
|
2565
|
-
text: Schema.String,
|
|
2566
|
-
turnId: Schema.optional(Schema.String),
|
|
2567
|
-
createdAt: Schema.String,
|
|
2568
|
-
completedAt: Schema.optional(Schema.String),
|
|
2569
|
-
streaming: Schema.optional(Schema.Boolean),
|
|
2570
|
-
sequence: Schema.optional(Schema.Number)
|
|
2571
|
-
});
|
|
2572
|
-
WorkLogEntry = Schema.Struct({
|
|
2573
|
-
id: Schema.String,
|
|
2574
|
-
createdAt: Schema.String,
|
|
2575
|
-
label: Schema.String,
|
|
2576
|
-
detail: Schema.optional(Schema.String),
|
|
2577
|
-
/** Tool result output (populated when tool_result is received). */
|
|
2578
|
-
result: Schema.optional(Schema.String),
|
|
2579
|
-
command: Schema.optional(Schema.String),
|
|
2580
|
-
changedFiles: Schema.optional(Schema.Array(Schema.String)),
|
|
2581
|
-
tone: Schema.Literals([
|
|
2582
|
-
"thinking",
|
|
2583
|
-
"tool",
|
|
2584
|
-
"info",
|
|
2585
|
-
"error"
|
|
2586
|
-
]),
|
|
2587
|
-
toolTitle: Schema.optional(Schema.String),
|
|
2588
|
-
/** Raw tool_use input dict — drives per-tool expanded rendering (PAN-1459). */
|
|
2589
|
-
toolInput: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
2590
|
-
sequence: Schema.optional(Schema.Number)
|
|
2591
|
-
});
|
|
2592
|
-
ConversationEvent = Schema.Union([Schema.Struct({
|
|
2593
|
-
kind: Schema.Literal("messages"),
|
|
2594
|
-
messages: Schema.Array(ChatMessage),
|
|
2595
|
-
workLog: Schema.Array(WorkLogEntry),
|
|
2596
|
-
streaming: Schema.Boolean,
|
|
2597
|
-
snapshot: Schema.optional(Schema.Boolean),
|
|
2598
|
-
proposedPlan: Schema.optional(ProposedPlan),
|
|
2599
|
-
compactBoundaries: Schema.optional(Schema.Array(CompactBoundary)),
|
|
2600
|
-
contextUsage: Schema.optional(Schema.NullOr(ContextUsage))
|
|
2601
|
-
}), Schema.Struct({ kind: Schema.Literal("discovering") })]);
|
|
2602
|
-
SessionTreeDelta = Schema.Struct({
|
|
2603
|
-
kind: Schema.Literals([
|
|
2604
|
-
"session_added",
|
|
2605
|
-
"session_removed",
|
|
2606
|
-
"presence_changed",
|
|
2607
|
-
"status_changed"
|
|
2608
|
-
]),
|
|
2609
|
-
issueId: Schema.String,
|
|
2610
|
-
sessionId: Schema.String,
|
|
2611
|
-
presence: Schema.optional(SessionNodePresence),
|
|
2612
|
-
status: Schema.optional(AgentStatus),
|
|
2613
|
-
timestamp: Schema.String
|
|
2614
|
-
});
|
|
2615
|
-
SubscribeDomainEventsRpc = Rpc.make(WS_METHODS.subscribeDomainEvents, {
|
|
2616
|
-
payload: Schema.Struct({}),
|
|
2617
|
-
success: DomainEvent,
|
|
2618
|
-
stream: true
|
|
2619
|
-
});
|
|
2620
|
-
SubscribeIssueEventsRpc = Rpc.make(WS_METHODS.subscribeIssueEvents, {
|
|
2621
|
-
payload: Schema.Struct({ issueId: IssueId }),
|
|
2622
|
-
success: DomainEvent,
|
|
2623
|
-
stream: true
|
|
2624
|
-
});
|
|
2625
|
-
SubscribeTerminalRpc = Rpc.make(WS_METHODS.subscribeTerminal, {
|
|
2626
|
-
payload: Schema.Struct({
|
|
2627
|
-
sessionName: Schema.String,
|
|
2628
|
-
cols: Schema.Number,
|
|
2629
|
-
rows: Schema.Number
|
|
2630
|
-
}),
|
|
2631
|
-
success: TerminalOutput,
|
|
2632
|
-
error: PanRpcError,
|
|
2633
|
-
stream: true
|
|
2634
|
-
});
|
|
2635
|
-
SubscribeAgentOutputRpc = Rpc.make(WS_METHODS.subscribeAgentOutput, {
|
|
2636
|
-
payload: Schema.Struct({ agentId: Schema.String }),
|
|
2637
|
-
success: AgentOutput,
|
|
2638
|
-
error: PanRpcError,
|
|
2639
|
-
stream: true
|
|
2640
|
-
});
|
|
2641
|
-
GetSnapshotRpc = Rpc.make(WS_METHODS.getSnapshot, {
|
|
2642
|
-
payload: Schema.Struct({}),
|
|
2643
|
-
success: DashboardSnapshot,
|
|
2644
|
-
error: PanRpcError
|
|
2645
|
-
});
|
|
2646
|
-
ReplayEventsRpc = Rpc.make(WS_METHODS.replayEvents, {
|
|
2647
|
-
payload: Schema.Struct({ fromSequence: SequenceNumber }),
|
|
2648
|
-
success: Schema.Array(DomainEvent),
|
|
2649
|
-
error: PanRpcError
|
|
2650
|
-
});
|
|
2651
|
-
TerminalOpenRpc = Rpc.make(WS_METHODS.terminalOpen, {
|
|
2652
|
-
payload: Schema.Struct({
|
|
2653
|
-
sessionName: Schema.String,
|
|
2654
|
-
cols: Schema.Number,
|
|
2655
|
-
rows: Schema.Number
|
|
2656
|
-
}),
|
|
2657
|
-
success: Schema.Struct({ sessionName: Schema.String }),
|
|
2658
|
-
error: PanRpcError
|
|
2659
|
-
});
|
|
2660
|
-
TerminalWriteRpc = Rpc.make(WS_METHODS.terminalWrite, {
|
|
2661
|
-
payload: Schema.Struct({
|
|
2662
|
-
sessionName: Schema.String,
|
|
2663
|
-
data: Schema.String
|
|
2664
|
-
}),
|
|
2665
|
-
error: PanRpcError
|
|
2666
|
-
});
|
|
2667
|
-
TerminalResizeRpc = Rpc.make(WS_METHODS.terminalResize, {
|
|
2668
|
-
payload: Schema.Struct({
|
|
2669
|
-
sessionName: Schema.String,
|
|
2670
|
-
cols: Schema.Number,
|
|
2671
|
-
rows: Schema.Number
|
|
2672
|
-
}),
|
|
2673
|
-
error: PanRpcError
|
|
2674
|
-
});
|
|
2675
|
-
TerminalCloseRpc = Rpc.make(WS_METHODS.terminalClose, {
|
|
2676
|
-
payload: Schema.Struct({ sessionName: Schema.String }),
|
|
2677
|
-
error: PanRpcError
|
|
2678
|
-
});
|
|
2679
|
-
GetWorkspaceDetailRpc = Rpc.make(WS_METHODS.getWorkspaceDetail, {
|
|
2680
|
-
payload: Schema.Struct({ issueId: IssueId }),
|
|
2681
|
-
success: WorkspaceDetail,
|
|
2682
|
-
error: PanRpcError
|
|
2683
|
-
});
|
|
2684
|
-
ReadWorkspaceFileInput = Schema.Struct({
|
|
2685
|
-
issueId: IssueId,
|
|
2686
|
-
relativePath: Schema.String,
|
|
2687
|
-
line: Schema.optional(Schema.Number),
|
|
2688
|
-
contextLines: Schema.optional(Schema.Number)
|
|
2689
|
-
});
|
|
2690
|
-
ReadWorkspaceFileResult = Schema.Struct({
|
|
2691
|
-
text: Schema.String,
|
|
2692
|
-
lang: Schema.String,
|
|
2693
|
-
truncated: Schema.Boolean,
|
|
2694
|
-
totalLines: Schema.Number
|
|
2695
|
-
});
|
|
2696
|
-
ReadWorkspaceFileRpc = Rpc.make(WS_METHODS.readWorkspaceFile, {
|
|
2697
|
-
payload: ReadWorkspaceFileInput,
|
|
2698
|
-
success: ReadWorkspaceFileResult,
|
|
2699
|
-
error: PanRpcError
|
|
2700
|
-
});
|
|
2701
|
-
ResolveFilePathExistsInput = Schema.Struct({
|
|
2702
|
-
cwd: Schema.String,
|
|
2703
|
-
path: Schema.String
|
|
2704
|
-
});
|
|
2705
|
-
ResolveFilePathExistsResult = Schema.Struct({
|
|
2706
|
-
exists: Schema.Boolean,
|
|
2707
|
-
kind: Schema.NullOr(Schema.Literals(["file", "dir"]))
|
|
2708
|
-
});
|
|
2709
|
-
ResolveFilePathExistsRpc = Rpc.make(WS_METHODS.resolveFilePathExists, {
|
|
2710
|
-
payload: ResolveFilePathExistsInput,
|
|
2711
|
-
success: ResolveFilePathExistsResult,
|
|
2712
|
-
error: PanRpcError
|
|
2713
|
-
});
|
|
2714
|
-
StartPlanningRpc = Rpc.make(WS_METHODS.startPlanning, {
|
|
2715
|
-
payload: Schema.Struct({
|
|
2716
|
-
issueId: IssueId,
|
|
2717
|
-
options: Schema.optional(Schema.Unknown)
|
|
2718
|
-
}),
|
|
2719
|
-
success: Schema.Struct({ queued: Schema.Boolean }),
|
|
2720
|
-
error: PanRpcError
|
|
2721
|
-
});
|
|
2722
|
-
StartAgentRpc = Rpc.make(WS_METHODS.startAgent, {
|
|
2723
|
-
payload: Schema.Struct({
|
|
2724
|
-
issueId: IssueId,
|
|
2725
|
-
options: Schema.optional(Schema.Unknown)
|
|
2726
|
-
}),
|
|
2727
|
-
success: Schema.Struct({ agentId: Schema.String }),
|
|
2728
|
-
error: PanRpcError
|
|
2729
|
-
});
|
|
2730
|
-
DeepWipeRpc = Rpc.make(WS_METHODS.deepWipe, {
|
|
2731
|
-
payload: Schema.Struct({
|
|
2732
|
-
issueId: IssueId,
|
|
2733
|
-
deleteWorkspace: Schema.optional(Schema.Boolean)
|
|
2734
|
-
}),
|
|
2735
|
-
success: Schema.Struct({ wiped: Schema.Boolean }),
|
|
2736
|
-
error: PanRpcError
|
|
2737
|
-
});
|
|
2738
|
-
SendTerminalInputRpc = Rpc.make(WS_METHODS.sendTerminalInput, {
|
|
2739
|
-
payload: Schema.Struct({
|
|
2740
|
-
sessionName: Schema.String,
|
|
2741
|
-
data: Schema.String
|
|
2742
|
-
}),
|
|
2743
|
-
error: PanRpcError
|
|
2744
|
-
});
|
|
2745
|
-
ResizeTerminalRpc = Rpc.make(WS_METHODS.resizeTerminal, {
|
|
2746
|
-
payload: Schema.Struct({
|
|
2747
|
-
sessionName: Schema.String,
|
|
2748
|
-
cols: Schema.Number,
|
|
2749
|
-
rows: Schema.Number
|
|
2750
|
-
}),
|
|
2751
|
-
error: PanRpcError
|
|
2752
|
-
});
|
|
2753
|
-
SubscribeConversationMessagesRpc = Rpc.make(WS_METHODS.subscribeConversationMessages, {
|
|
2754
|
-
payload: Schema.Struct({ conversationName: Schema.String }),
|
|
2755
|
-
success: ConversationEvent,
|
|
2756
|
-
error: PanRpcError,
|
|
2757
|
-
stream: true
|
|
2758
|
-
});
|
|
2759
|
-
SubscribeProjectSessionTreeRpc = Rpc.make(WS_METHODS.subscribeProjectSessionTree, {
|
|
2760
|
-
payload: Schema.Struct({ projectKey: Schema.String }),
|
|
2761
|
-
success: SessionTreeDelta,
|
|
2762
|
-
error: PanRpcError,
|
|
2763
|
-
stream: true
|
|
2764
|
-
});
|
|
2765
|
-
SubscribeFlywheelStatusRpc = Rpc.make(WS_METHODS.subscribeFlywheelStatus, {
|
|
2766
|
-
payload: Schema.Struct({}),
|
|
2767
|
-
success: Schema.NullOr(FlywheelStatus),
|
|
2768
|
-
error: PanRpcError,
|
|
2769
|
-
stream: true
|
|
2770
|
-
});
|
|
2771
|
-
ShellOpenInEditorRpc = Rpc.make(WS_METHODS.shellOpenInEditor, {
|
|
2772
|
-
payload: OpenInEditorInput,
|
|
2773
|
-
error: PanRpcError
|
|
2774
|
-
});
|
|
2775
|
-
GetAvailableEditorsRpc = Rpc.make(WS_METHODS.getAvailableEditors, {
|
|
2776
|
-
success: Schema.Struct({
|
|
2777
|
-
editors: Schema.Array(EditorIdSchema),
|
|
2778
|
-
/**
|
|
2779
|
-
* Default cwd to open when no project/workspace is selected — the
|
|
2780
|
-
* "devroot" fallback. `~/Projects` if it exists, else `$HOME`.
|
|
2781
|
-
*/
|
|
2782
|
-
defaultCwd: Schema.String
|
|
2783
|
-
}),
|
|
2784
|
-
error: PanRpcError
|
|
2785
|
-
});
|
|
2786
|
-
DiscoveredSessionListResult = Schema.Struct({
|
|
2787
|
-
sessions: Schema.Array(DiscoveredSessionSnapshot),
|
|
2788
|
-
count: Schema.Number,
|
|
2789
|
-
total: Schema.Number
|
|
2790
|
-
});
|
|
2791
|
-
SessionsFeedPayload = Schema.Struct({
|
|
2792
|
-
harness: Schema.optional(Schema.String),
|
|
2793
|
-
workspacePath: Schema.optional(Schema.String),
|
|
2794
|
-
primaryModel: Schema.optional(Schema.String),
|
|
2795
|
-
managed: Schema.optional(Schema.Boolean),
|
|
2796
|
-
unmanaged: Schema.optional(Schema.Boolean),
|
|
2797
|
-
since: Schema.optional(Schema.String),
|
|
2798
|
-
before: Schema.optional(Schema.String),
|
|
2799
|
-
after: Schema.optional(Schema.String),
|
|
2800
|
-
minCost: Schema.optional(Schema.Number),
|
|
2801
|
-
maxCost: Schema.optional(Schema.Number),
|
|
2802
|
-
minMessages: Schema.optional(Schema.Number),
|
|
2803
|
-
tags: Schema.optional(Schema.Array(Schema.String)),
|
|
2804
|
-
tools: Schema.optional(Schema.Array(Schema.String)),
|
|
2805
|
-
files: Schema.optional(Schema.Array(Schema.String)),
|
|
2806
|
-
issueId: Schema.optional(Schema.String),
|
|
2807
|
-
enrichmentLevel: Schema.optional(Schema.Number),
|
|
2808
|
-
enriched: Schema.optional(Schema.Boolean),
|
|
2809
|
-
notEnriched: Schema.optional(Schema.Boolean),
|
|
2810
|
-
query: Schema.optional(Schema.String),
|
|
2811
|
-
semantic: Schema.optional(Schema.Boolean),
|
|
2812
|
-
similarTo: Schema.optional(Schema.Number),
|
|
2813
|
-
limit: Schema.optional(Schema.Number),
|
|
2814
|
-
offset: Schema.optional(Schema.Number),
|
|
2815
|
-
cursor: Schema.optional(Schema.String),
|
|
2816
|
-
source: Schema.optional(Schema.Literals(["discovered", "managed-archived"]))
|
|
2817
|
-
});
|
|
2818
|
-
SessionsFeedListResult = Schema.Struct({
|
|
2819
|
-
rows: Schema.Array(SessionsFeedRowSnapshot),
|
|
2820
|
-
nextCursor: Schema.NullOr(Schema.String)
|
|
2821
|
-
});
|
|
2822
|
-
DiscoveredSessionSearchResult = Schema.Struct({
|
|
2823
|
-
sessions: Schema.Array(DiscoveredSessionSnapshot),
|
|
2824
|
-
total: Schema.Number,
|
|
2825
|
-
mode: Schema.String,
|
|
2826
|
-
durationMs: Schema.Number,
|
|
2827
|
-
error: Schema.optional(Schema.String)
|
|
2828
|
-
});
|
|
2829
|
-
DiscoveredSessionStatsResult = Schema.Struct({
|
|
2830
|
-
total: Schema.Number,
|
|
2831
|
-
enriched: Schema.Number,
|
|
2832
|
-
embedded: Schema.Number,
|
|
2833
|
-
managedCount: Schema.Number,
|
|
2834
|
-
embeddingModels: Schema.optional(Schema.Array(Schema.Struct({
|
|
2835
|
-
model: Schema.String,
|
|
2836
|
-
embedded: Schema.Number
|
|
2837
|
-
})))
|
|
2838
|
-
});
|
|
2839
|
-
ConversationCostTotals = Schema.Struct({
|
|
2840
|
-
sessionCount: Schema.Number,
|
|
2841
|
-
totalCost: Schema.Number,
|
|
2842
|
-
totalTokensIn: Schema.Number,
|
|
2843
|
-
totalTokensOut: Schema.Number
|
|
2844
|
-
});
|
|
2845
|
-
ScanConversationsRpc = Rpc.make(WS_METHODS.scanConversations, {
|
|
2846
|
-
payload: Schema.Struct({
|
|
2847
|
-
mode: Schema.Literals([
|
|
2848
|
-
"targeted",
|
|
2849
|
-
"watched",
|
|
2850
|
-
"system"
|
|
2851
|
-
]),
|
|
2852
|
-
dirs: Schema.optional(Schema.Array(Schema.String)),
|
|
2853
|
-
dryRun: Schema.optional(Schema.Boolean)
|
|
2854
|
-
}),
|
|
2855
|
-
success: ScanResult,
|
|
2856
|
-
error: PanRpcError
|
|
2857
|
-
});
|
|
2858
|
-
SearchConversationsRpc = Rpc.make(WS_METHODS.searchConversations, {
|
|
2859
|
-
payload: ConversationFilter,
|
|
2860
|
-
success: DiscoveredSessionSearchResult,
|
|
2861
|
-
error: PanRpcError
|
|
2862
|
-
});
|
|
2863
|
-
ListDiscoveredSessionsRpc = Rpc.make(WS_METHODS.listDiscoveredSessions, {
|
|
2864
|
-
payload: ConversationFilter,
|
|
2865
|
-
success: DiscoveredSessionListResult,
|
|
2866
|
-
error: PanRpcError
|
|
2867
|
-
});
|
|
2868
|
-
ListSessionsFeedRpc = Rpc.make(WS_METHODS.listSessionsFeed, {
|
|
2869
|
-
payload: SessionsFeedPayload,
|
|
2870
|
-
success: SessionsFeedListResult,
|
|
2871
|
-
error: PanRpcError
|
|
2872
|
-
});
|
|
2873
|
-
GetSessionsFeedFacetsRpc = Rpc.make(WS_METHODS.getSessionsFeedFacets, {
|
|
2874
|
-
payload: SessionsFeedPayload,
|
|
2875
|
-
success: SessionsFeedFacetsSnapshot,
|
|
2876
|
-
error: PanRpcError
|
|
2877
|
-
});
|
|
2878
|
-
GetDiscoveredSessionRpc = Rpc.make(WS_METHODS.getDiscoveredSession, {
|
|
2879
|
-
payload: Schema.Struct({ id: Schema.Number }),
|
|
2880
|
-
success: DiscoveredSessionSnapshot,
|
|
2881
|
-
error: PanRpcError
|
|
2882
|
-
});
|
|
2883
|
-
EnrichSessionsRpc = Rpc.make(WS_METHODS.enrichSessions, {
|
|
2884
|
-
payload: Schema.Struct({
|
|
2885
|
-
ids: Schema.optional(Schema.Array(Schema.Number)),
|
|
2886
|
-
filter: Schema.optional(ConversationFilter),
|
|
2887
|
-
level: Schema.Literals([
|
|
2888
|
-
1,
|
|
2889
|
-
2,
|
|
2890
|
-
3
|
|
2891
|
-
]),
|
|
2892
|
-
model: Schema.optional(Schema.String),
|
|
2893
|
-
fullTranscript: Schema.optional(Schema.Boolean),
|
|
2894
|
-
customPrompt: Schema.optional(Schema.String),
|
|
2895
|
-
upgrade: Schema.optional(Schema.Boolean),
|
|
2896
|
-
limit: Schema.optional(Schema.Number),
|
|
2897
|
-
confirmed: Schema.optional(Schema.Boolean),
|
|
2898
|
-
force: Schema.optional(Schema.Boolean)
|
|
2899
|
-
}),
|
|
2900
|
-
success: Schema.Struct({
|
|
2901
|
-
processed: Schema.Number,
|
|
2902
|
-
totalCost: Schema.Number,
|
|
2903
|
-
failures: Schema.Number
|
|
2904
|
-
}),
|
|
2905
|
-
error: PanRpcError
|
|
2906
|
-
});
|
|
2907
|
-
EmbedSessionsRpc = Rpc.make(WS_METHODS.embedSessions, {
|
|
2908
|
-
payload: Schema.Struct({
|
|
2909
|
-
ids: Schema.optional(Schema.Array(Schema.Number)),
|
|
2910
|
-
regenerate: Schema.optional(Schema.Boolean)
|
|
2911
|
-
}),
|
|
2912
|
-
success: Schema.Struct({
|
|
2913
|
-
total: Schema.Number,
|
|
2914
|
-
embedded: Schema.Number,
|
|
2915
|
-
model: Schema.String
|
|
2916
|
-
}),
|
|
2917
|
-
error: PanRpcError
|
|
2918
|
-
});
|
|
2919
|
-
GetConversationCostRpc = Rpc.make(WS_METHODS.getConversationCost, {
|
|
2920
|
-
payload: ConversationFilter,
|
|
2921
|
-
success: ConversationCostTotals,
|
|
2922
|
-
error: PanRpcError
|
|
2923
|
-
});
|
|
2924
|
-
GetConversationCostByWorkspaceRpc = Rpc.make(WS_METHODS.getConversationCostByWorkspace, {
|
|
2925
|
-
payload: ConversationFilter,
|
|
2926
|
-
success: ConversationCostSummary,
|
|
2927
|
-
error: PanRpcError
|
|
2928
|
-
});
|
|
2929
|
-
GetConversationStatsRpc = Rpc.make(WS_METHODS.getConversationStats, {
|
|
2930
|
-
payload: Schema.Struct({}),
|
|
2931
|
-
success: DiscoveredSessionStatsResult,
|
|
2932
|
-
error: PanRpcError
|
|
2933
|
-
});
|
|
2934
|
-
PanRpcGroup = RpcGroup.make(SubscribeDomainEventsRpc, SubscribeIssueEventsRpc, SubscribeTerminalRpc, SubscribeAgentOutputRpc, GetSnapshotRpc, ReplayEventsRpc, GetWorkspaceDetailRpc, ReadWorkspaceFileRpc, ResolveFilePathExistsRpc, TerminalOpenRpc, TerminalWriteRpc, TerminalResizeRpc, TerminalCloseRpc, StartPlanningRpc, StartAgentRpc, DeepWipeRpc, SendTerminalInputRpc, ResizeTerminalRpc, SubscribeConversationMessagesRpc, SubscribeProjectSessionTreeRpc, SubscribeFlywheelStatusRpc, ShellOpenInEditorRpc, GetAvailableEditorsRpc, ScanConversationsRpc, SearchConversationsRpc, ListDiscoveredSessionsRpc, ListSessionsFeedRpc, GetSessionsFeedFacetsRpc, GetDiscoveredSessionRpc, EnrichSessionsRpc, EmbedSessionsRpc, GetConversationCostRpc, GetConversationCostByWorkspaceRpc, GetConversationStatsRpc);
|
|
2935
|
-
}));
|
|
2936
|
-
//#endregion
|
|
2937
|
-
//#region ../../../packages/contracts/src/event-reducers.ts
|
|
2938
|
-
function getMaxMemoryObservationsPerIssue() {
|
|
2939
|
-
const raw = globalThis.process?.env?.OVERDECK_MEMORY_OBSERVATION_LIMIT;
|
|
2940
|
-
const parsed = raw ? Number.parseInt(raw, 10) : NaN;
|
|
2941
|
-
return Number.isInteger(parsed) && parsed > 0 ? parsed : 50;
|
|
2942
|
-
}
|
|
2943
|
-
function trimMemoryObservations(observations) {
|
|
2944
|
-
const max = getMaxMemoryObservationsPerIssue();
|
|
2945
|
-
return observations.length > max ? observations.slice(-max) : observations;
|
|
2946
|
-
}
|
|
2947
|
-
function getMaxTurnDiffSummariesPerAgent() {
|
|
2948
|
-
const raw = globalThis.process?.env?.OVERDECK_TURN_DIFF_SUMMARY_LIMIT;
|
|
2949
|
-
const parsed = raw ? Number.parseInt(raw, 10) : NaN;
|
|
2950
|
-
return Number.isInteger(parsed) && parsed > 0 ? parsed : 200;
|
|
2951
|
-
}
|
|
2952
|
-
function isTerminalTurnDiffSummaryStatus(status) {
|
|
2953
|
-
return status === "stopped" || status === "done" || status === "archived" || status === "closed";
|
|
2954
|
-
}
|
|
2955
|
-
function trimTurnDiffSummaries(summaries) {
|
|
2956
|
-
const max = getMaxTurnDiffSummariesPerAgent();
|
|
2957
|
-
return summaries.length > max ? summaries.slice(-max) : summaries;
|
|
2958
|
-
}
|
|
2959
|
-
function upsertBoundedSessionProgress(bySessionId, progress) {
|
|
2960
|
-
const existing = bySessionId[progress.sessionId];
|
|
2961
|
-
const entries = Object.values(bySessionId);
|
|
2962
|
-
if (existing || entries.length < MAX_SESSION_PROGRESS_ENTRIES) return {
|
|
2963
|
-
...bySessionId,
|
|
2964
|
-
[progress.sessionId]: progress
|
|
2965
|
-
};
|
|
2966
|
-
const keep = entries.sort((a, b) => a.timestamp.localeCompare(b.timestamp)).slice(-(MAX_SESSION_PROGRESS_ENTRIES - 1));
|
|
2967
|
-
const next = {};
|
|
2968
|
-
for (const entry of [...keep, progress]) next[entry.sessionId] = entry;
|
|
2969
|
-
return next;
|
|
2970
|
-
}
|
|
2971
|
-
function omitTurnDiffSummariesForAgent(turnDiffSummariesByAgentId, agentId) {
|
|
2972
|
-
const { [agentId]: _removed, ...rest } = turnDiffSummariesByAgentId ?? {};
|
|
2973
|
-
return rest;
|
|
2974
|
-
}
|
|
2975
|
-
/** Remove all entries in agentIdBySessionId that point to the given agentId. */
|
|
2976
|
-
function removeAgentFromSessionIndex(agentIdBySessionId, agentId) {
|
|
2977
|
-
const next = {};
|
|
2978
|
-
for (const [sessionId, id] of Object.entries(agentIdBySessionId ?? {})) if (id !== agentId) next[sessionId] = id;
|
|
2979
|
-
return next;
|
|
2980
|
-
}
|
|
2981
|
-
function defaultRuntimeSnapshot(agentId, timestamp, sequence) {
|
|
2982
|
-
return {
|
|
2983
|
-
id: agentId,
|
|
2984
|
-
activity: "idle",
|
|
2985
|
-
lastActivity: timestamp,
|
|
2986
|
-
updatedAtSequence: sequence
|
|
2987
|
-
};
|
|
2988
|
-
}
|
|
2989
|
-
/**
|
|
2990
|
-
* Bump runtimeSnapshotSequence on the corresponding AgentSnapshot (if present)
|
|
2991
|
-
* so low-frequency subscribers can cheaply detect a runtime change. No-op if
|
|
2992
|
-
* the agent has no lifecycle snapshot yet (a runtime event arrived before
|
|
2993
|
-
* agent.created — unusual but defensive).
|
|
2994
|
-
*/
|
|
2995
|
-
function bumpRuntimeSnapshotSequence(agentsById, agentId, sequence) {
|
|
2996
|
-
const agent = agentsById[agentId];
|
|
2997
|
-
if (!agent) return agentsById;
|
|
2998
|
-
return {
|
|
2999
|
-
...agentsById,
|
|
3000
|
-
[agentId]: {
|
|
3001
|
-
...agent,
|
|
3002
|
-
runtimeSnapshotSequence: sequence
|
|
3003
|
-
}
|
|
3004
|
-
};
|
|
3005
|
-
}
|
|
3006
|
-
function applyEvent(state, event) {
|
|
3007
|
-
switch (event.type) {
|
|
3008
|
-
case "agent.created": {
|
|
3009
|
-
const existing = state.agentsById[event.payload.agentId];
|
|
3010
|
-
const agent = event.payload.agent;
|
|
3011
|
-
const nextAgentIdBySessionId = agent.sessionId ? {
|
|
3012
|
-
...state.agentIdBySessionId,
|
|
3013
|
-
[agent.sessionId]: agent.id
|
|
3014
|
-
} : state.agentIdBySessionId;
|
|
3015
|
-
return {
|
|
3016
|
-
...state,
|
|
3017
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3018
|
-
agentsById: {
|
|
3019
|
-
...state.agentsById,
|
|
3020
|
-
[event.payload.agentId]: existing ? {
|
|
3021
|
-
...existing,
|
|
3022
|
-
...agent
|
|
3023
|
-
} : agent
|
|
3024
|
-
},
|
|
3025
|
-
agentIdBySessionId: nextAgentIdBySessionId
|
|
3026
|
-
};
|
|
3027
|
-
}
|
|
3028
|
-
case "agent.started": {
|
|
3029
|
-
const agent = event.payload.agent;
|
|
3030
|
-
const nextAgentIdBySessionId = agent.sessionId ? {
|
|
3031
|
-
...state.agentIdBySessionId,
|
|
3032
|
-
[agent.sessionId]: agent.id
|
|
3033
|
-
} : state.agentIdBySessionId;
|
|
3034
|
-
return {
|
|
3035
|
-
...state,
|
|
3036
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3037
|
-
agentsById: {
|
|
3038
|
-
...state.agentsById,
|
|
3039
|
-
[event.payload.agentId]: agent
|
|
3040
|
-
},
|
|
3041
|
-
agentIdBySessionId: nextAgentIdBySessionId
|
|
3042
|
-
};
|
|
3043
|
-
}
|
|
3044
|
-
case "agent.enrichment_changed": {
|
|
3045
|
-
const agent = state.agentsById[event.payload.agentId];
|
|
3046
|
-
if (!agent) return {
|
|
3047
|
-
...state,
|
|
3048
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3049
|
-
};
|
|
3050
|
-
return {
|
|
3051
|
-
...state,
|
|
3052
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3053
|
-
agentsById: {
|
|
3054
|
-
...state.agentsById,
|
|
3055
|
-
[event.payload.agentId]: {
|
|
3056
|
-
...agent,
|
|
3057
|
-
role: event.payload.role ?? agent.role,
|
|
3058
|
-
hasPendingQuestion: event.payload.hasPendingQuestion ?? false,
|
|
3059
|
-
pendingQuestionCount: event.payload.pendingQuestionCount ?? 0,
|
|
3060
|
-
pendingQuestionPrompt: event.payload.pendingQuestionPrompt,
|
|
3061
|
-
pendingQuestionReason: event.payload.pendingQuestionReason,
|
|
3062
|
-
pendingInputCount: event.payload.pendingInputCount,
|
|
3063
|
-
pendingInputKinds: event.payload.pendingInputKinds,
|
|
3064
|
-
pendingAskUserQuestion: event.payload.pendingAskUserQuestion,
|
|
3065
|
-
pendingProposedPlan: event.payload.pendingProposedPlan,
|
|
3066
|
-
resolution: event.payload.resolution,
|
|
3067
|
-
resolutionCount: event.payload.resolutionCount
|
|
3068
|
-
}
|
|
3069
|
-
}
|
|
3070
|
-
};
|
|
3071
|
-
}
|
|
3072
|
-
case "agent.stopped": {
|
|
3073
|
-
const { [event.payload.agentId]: _removed, ...rest } = state.agentsById;
|
|
3074
|
-
const runtimeById = state.agentRuntimeById ?? {};
|
|
3075
|
-
const prevRuntime = runtimeById[event.payload.agentId];
|
|
3076
|
-
const nextRuntimeById = prevRuntime ? {
|
|
3077
|
-
...runtimeById,
|
|
3078
|
-
[event.payload.agentId]: {
|
|
3079
|
-
...prevRuntime,
|
|
3080
|
-
activity: "stopped",
|
|
3081
|
-
currentTool: void 0,
|
|
3082
|
-
thinking: void 0,
|
|
3083
|
-
waiting: void 0,
|
|
3084
|
-
channelReply: void 0,
|
|
3085
|
-
lastActivity: event.timestamp,
|
|
3086
|
-
updatedAtSequence: event.sequence
|
|
3087
|
-
}
|
|
3088
|
-
} : runtimeById;
|
|
3089
|
-
const permissionRequestIdsByAgentId = state.channelPermissionRequestIdsByAgentId ?? {};
|
|
3090
|
-
const pendingIds = permissionRequestIdsByAgentId[event.payload.agentId] ?? [];
|
|
3091
|
-
const nextPermissionRequestsById = { ...state.channelPermissionRequestsById };
|
|
3092
|
-
for (const requestId of pendingIds) delete nextPermissionRequestsById[requestId];
|
|
3093
|
-
const { [event.payload.agentId]: _removedPendingIds, ...restPendingIds } = permissionRequestIdsByAgentId;
|
|
3094
|
-
const resolvedDecisionIdsByAgentId = state.resolvedChannelPermissionDecisionIdsByAgentId ?? {};
|
|
3095
|
-
const resolvedIds = resolvedDecisionIdsByAgentId[event.payload.agentId] ?? [];
|
|
3096
|
-
const nextResolvedDecisionsById = { ...state.resolvedChannelPermissionDecisionsById ?? {} };
|
|
3097
|
-
for (const requestId of resolvedIds) delete nextResolvedDecisionsById[requestId];
|
|
3098
|
-
const { [event.payload.agentId]: _removedResolvedIds, ...restResolvedIds } = resolvedDecisionIdsByAgentId;
|
|
3099
|
-
return {
|
|
3100
|
-
...state,
|
|
3101
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3102
|
-
agentsById: rest,
|
|
3103
|
-
agentRuntimeById: nextRuntimeById,
|
|
3104
|
-
channelPermissionRequestsById: nextPermissionRequestsById,
|
|
3105
|
-
channelPermissionRequestIdsByAgentId: restPendingIds,
|
|
3106
|
-
resolvedChannelPermissionDecisionsById: nextResolvedDecisionsById,
|
|
3107
|
-
resolvedChannelPermissionDecisionIdsByAgentId: restResolvedIds,
|
|
3108
|
-
turnDiffSummariesByAgentId: omitTurnDiffSummariesForAgent(state.turnDiffSummariesByAgentId, event.payload.agentId),
|
|
3109
|
-
agentIdBySessionId: removeAgentFromSessionIndex(state.agentIdBySessionId, event.payload.agentId)
|
|
3110
|
-
};
|
|
3111
|
-
}
|
|
3112
|
-
case "agent.status_changed": {
|
|
3113
|
-
const agent = state.agentsById[event.payload.agentId] ?? (event.payload.role === "strike" && event.payload.issueId ? {
|
|
3114
|
-
id: event.payload.agentId,
|
|
3115
|
-
issueId: event.payload.issueId,
|
|
3116
|
-
status: event.payload.status,
|
|
3117
|
-
role: "strike",
|
|
3118
|
-
startedAt: event.timestamp
|
|
3119
|
-
} : void 0);
|
|
3120
|
-
if (!agent) return {
|
|
3121
|
-
...state,
|
|
3122
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3123
|
-
};
|
|
3124
|
-
const nextTurnDiffSummariesByAgentId = isTerminalTurnDiffSummaryStatus(event.payload.status) ? omitTurnDiffSummariesForAgent(state.turnDiffSummariesByAgentId, event.payload.agentId) : state.turnDiffSummariesByAgentId;
|
|
3125
|
-
const nextAgent = (() => {
|
|
3126
|
-
const base = {
|
|
3127
|
-
...agent,
|
|
3128
|
-
status: event.payload.status
|
|
3129
|
-
};
|
|
3130
|
-
for (const field of [
|
|
3131
|
-
"hasLiveTmuxSession",
|
|
3132
|
-
"stoppedByUser",
|
|
3133
|
-
"stoppedByPause",
|
|
3134
|
-
"paused",
|
|
3135
|
-
"pausedReason",
|
|
3136
|
-
"pausedAt",
|
|
3137
|
-
"troubled",
|
|
3138
|
-
"troubledAt",
|
|
3139
|
-
"consecutiveFailures",
|
|
3140
|
-
"firstFailureInRunAt",
|
|
3141
|
-
"lastFailureAt",
|
|
3142
|
-
"lastFailureReason",
|
|
3143
|
-
"lastFailureNextRetryAt",
|
|
3144
|
-
"kickoffDelivered",
|
|
3145
|
-
"hostOverride",
|
|
3146
|
-
"role",
|
|
3147
|
-
"model",
|
|
3148
|
-
"workspace",
|
|
3149
|
-
"sessionId",
|
|
3150
|
-
"lastActivity",
|
|
3151
|
-
"lastResumeAt",
|
|
3152
|
-
"stoppedAt",
|
|
3153
|
-
"branch",
|
|
3154
|
-
"costSoFar",
|
|
3155
|
-
"phase",
|
|
3156
|
-
"workType",
|
|
3157
|
-
"roleRunHead",
|
|
3158
|
-
"flywheelRunId",
|
|
3159
|
-
"reviewSubRole",
|
|
3160
|
-
"reviewRunId",
|
|
3161
|
-
"reviewOutputPath",
|
|
3162
|
-
"reviewSynthesisAgentId",
|
|
3163
|
-
"reviewDeadlineAt",
|
|
3164
|
-
"reviewMonitorSignaled",
|
|
3165
|
-
"reviewRetryAttempt",
|
|
3166
|
-
"inspectSubRole",
|
|
3167
|
-
"deliveryMethod",
|
|
3168
|
-
"supervisorEnabled",
|
|
3169
|
-
"channelsEnabled"
|
|
3170
|
-
]) if (field in event.payload) {
|
|
3171
|
-
const value = event.payload[field];
|
|
3172
|
-
if (value === null || value === void 0) delete base[field];
|
|
3173
|
-
else base[field] = value;
|
|
3174
|
-
}
|
|
3175
|
-
const sessionAlive = event.payload.hasLiveTmuxSession === true;
|
|
3176
|
-
if (event.payload.status !== "running" && event.payload.status !== "starting" && !sessionAlive) {
|
|
3177
|
-
delete base["hasPendingQuestion"];
|
|
3178
|
-
delete base["pendingQuestionCount"];
|
|
3179
|
-
delete base["pendingQuestionPrompt"];
|
|
3180
|
-
delete base["pendingQuestionReason"];
|
|
3181
|
-
delete base["pendingInputCount"];
|
|
3182
|
-
delete base["pendingInputKinds"];
|
|
3183
|
-
delete base["pendingAskUserQuestion"];
|
|
3184
|
-
delete base["pendingProposedPlan"];
|
|
3185
|
-
}
|
|
3186
|
-
return base;
|
|
3187
|
-
})();
|
|
3188
|
-
return {
|
|
3189
|
-
...state,
|
|
3190
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3191
|
-
agentsById: {
|
|
3192
|
-
...state.agentsById,
|
|
3193
|
-
[event.payload.agentId]: nextAgent
|
|
3194
|
-
},
|
|
3195
|
-
turnDiffSummariesByAgentId: nextTurnDiffSummariesByAgentId,
|
|
3196
|
-
agentIdBySessionId: event.payload.sessionId ? {
|
|
3197
|
-
...state.agentIdBySessionId,
|
|
3198
|
-
[event.payload.sessionId]: event.payload.agentId
|
|
3199
|
-
} : state.agentIdBySessionId
|
|
3200
|
-
};
|
|
3201
|
-
}
|
|
3202
|
-
case "agent.heartbeat_dead": {
|
|
3203
|
-
const agent = state.agentsById[event.payload.agentId];
|
|
3204
|
-
if (!agent) return {
|
|
3205
|
-
...state,
|
|
3206
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3207
|
-
};
|
|
3208
|
-
const runtimeById = state.agentRuntimeById ?? {};
|
|
3209
|
-
const prevRuntime = runtimeById[event.payload.agentId];
|
|
3210
|
-
const nextRuntimeById = prevRuntime ? {
|
|
3211
|
-
...runtimeById,
|
|
3212
|
-
[event.payload.agentId]: {
|
|
3213
|
-
...prevRuntime,
|
|
3214
|
-
activity: "stopped",
|
|
3215
|
-
currentTool: void 0,
|
|
3216
|
-
thinking: void 0,
|
|
3217
|
-
waiting: void 0,
|
|
3218
|
-
channelReply: void 0,
|
|
3219
|
-
lastActivity: event.timestamp,
|
|
3220
|
-
updatedAtSequence: event.sequence
|
|
3221
|
-
}
|
|
3222
|
-
} : runtimeById;
|
|
3223
|
-
return {
|
|
3224
|
-
...state,
|
|
3225
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3226
|
-
agentsById: {
|
|
3227
|
-
...state.agentsById,
|
|
3228
|
-
[event.payload.agentId]: {
|
|
3229
|
-
...agent,
|
|
3230
|
-
status: "error"
|
|
3231
|
-
}
|
|
3232
|
-
},
|
|
3233
|
-
agentRuntimeById: nextRuntimeById
|
|
3234
|
-
};
|
|
3235
|
-
}
|
|
3236
|
-
case "agent.output_received": {
|
|
3237
|
-
const updated = [...state.agentOutputById[event.payload.agentId] ?? [], ...event.payload.lines].slice(-MAX_AGENT_OUTPUT_LINES);
|
|
3238
|
-
return {
|
|
3239
|
-
...state,
|
|
3240
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3241
|
-
agentOutputById: {
|
|
3242
|
-
...state.agentOutputById,
|
|
3243
|
-
[event.payload.agentId]: updated
|
|
3244
|
-
}
|
|
3245
|
-
};
|
|
3246
|
-
}
|
|
3247
|
-
case "pipeline.status_changed":
|
|
3248
|
-
case "review.status_changed": return {
|
|
3249
|
-
...state,
|
|
3250
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3251
|
-
reviewStatusByIssueId: {
|
|
3252
|
-
...state.reviewStatusByIssueId,
|
|
3253
|
-
[event.payload.issueId]: event.payload.status
|
|
3254
|
-
}
|
|
3255
|
-
};
|
|
3256
|
-
case "review.reviewer_started": {
|
|
3257
|
-
const { issueId, role, sessionName } = event.payload;
|
|
3258
|
-
const existing = state.reviewStatusByIssueId[issueId];
|
|
3259
|
-
const prevSubs = existing?.reviewSubStatuses ?? {};
|
|
3260
|
-
const prevNames = existing?.reviewSessionNames ?? [];
|
|
3261
|
-
const nextNames = prevNames.includes(sessionName) ? prevNames : [...prevNames, sessionName];
|
|
3262
|
-
const nextStatus = {
|
|
3263
|
-
...existing ?? { issueId },
|
|
3264
|
-
reviewSubStatuses: {
|
|
3265
|
-
...prevSubs,
|
|
3266
|
-
[role]: "running"
|
|
3267
|
-
},
|
|
3268
|
-
reviewSessionNames: nextNames
|
|
3269
|
-
};
|
|
3270
|
-
return {
|
|
3271
|
-
...state,
|
|
3272
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3273
|
-
reviewStatusByIssueId: {
|
|
3274
|
-
...state.reviewStatusByIssueId,
|
|
3275
|
-
[issueId]: nextStatus
|
|
3276
|
-
}
|
|
3277
|
-
};
|
|
3278
|
-
}
|
|
3279
|
-
case "review.reviewer_completed": {
|
|
3280
|
-
const { issueId, role } = event.payload;
|
|
3281
|
-
const existing = state.reviewStatusByIssueId[issueId];
|
|
3282
|
-
if (!existing) return {
|
|
3283
|
-
...state,
|
|
3284
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3285
|
-
};
|
|
3286
|
-
const prevSubs = existing.reviewSubStatuses ?? {};
|
|
3287
|
-
const nextStatus = {
|
|
3288
|
-
...existing,
|
|
3289
|
-
reviewSubStatuses: {
|
|
3290
|
-
...prevSubs,
|
|
3291
|
-
[role]: "done"
|
|
3292
|
-
}
|
|
3293
|
-
};
|
|
3294
|
-
return {
|
|
3295
|
-
...state,
|
|
3296
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3297
|
-
reviewStatusByIssueId: {
|
|
3298
|
-
...state.reviewStatusByIssueId,
|
|
3299
|
-
[issueId]: nextStatus
|
|
3300
|
-
}
|
|
3301
|
-
};
|
|
3302
|
-
}
|
|
3303
|
-
case "review.specialist.timed_out": return {
|
|
3304
|
-
...state,
|
|
3305
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3306
|
-
};
|
|
3307
|
-
case "review.coordinator_started": {
|
|
3308
|
-
const { issueId, sessionName } = event.payload;
|
|
3309
|
-
const nextStatus = {
|
|
3310
|
-
...state.reviewStatusByIssueId[issueId] ?? { issueId },
|
|
3311
|
-
reviewCoordinatorSessionName: sessionName
|
|
3312
|
-
};
|
|
3313
|
-
return {
|
|
3314
|
-
...state,
|
|
3315
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3316
|
-
reviewStatusByIssueId: {
|
|
3317
|
-
...state.reviewStatusByIssueId,
|
|
3318
|
-
[issueId]: nextStatus
|
|
3319
|
-
}
|
|
3320
|
-
};
|
|
3321
|
-
}
|
|
3322
|
-
case "review.coordinator.died": return {
|
|
3323
|
-
...state,
|
|
3324
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3325
|
-
};
|
|
3326
|
-
case "pipeline.review-started":
|
|
3327
|
-
case "pipeline.review-completed":
|
|
3328
|
-
case "pipeline.test-started":
|
|
3329
|
-
case "pipeline.test-completed": return {
|
|
3330
|
-
...state,
|
|
3331
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3332
|
-
};
|
|
3333
|
-
case "merge.ready": return {
|
|
3334
|
-
...state,
|
|
3335
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3336
|
-
};
|
|
3337
|
-
case "specialist.started":
|
|
3338
|
-
case "specialist.completed":
|
|
3339
|
-
case "specialist.failed": return {
|
|
3340
|
-
...state,
|
|
3341
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3342
|
-
};
|
|
3343
|
-
case "resources.updated": return {
|
|
3344
|
-
...state,
|
|
3345
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3346
|
-
resources: event.payload.resources
|
|
3347
|
-
};
|
|
3348
|
-
case "issues.snapshot": return {
|
|
3349
|
-
...state,
|
|
3350
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3351
|
-
issuesRaw: event.payload.issues
|
|
3352
|
-
};
|
|
3353
|
-
case "issues.updated": return {
|
|
3354
|
-
...state,
|
|
3355
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3356
|
-
};
|
|
3357
|
-
case "issue.statusChanged": {
|
|
3358
|
-
const { issueId, status, canonicalStatus, labels } = event.payload;
|
|
3359
|
-
const updatedIssues = state.issuesRaw.map((issue) => {
|
|
3360
|
-
if (issue["identifier"] === issueId || issue["id"] === issueId) {
|
|
3361
|
-
const patch = {
|
|
3362
|
-
...issue,
|
|
3363
|
-
status,
|
|
3364
|
-
canonicalStatus,
|
|
3365
|
-
state: canonicalStatus
|
|
3366
|
-
};
|
|
3367
|
-
if (labels) patch.labels = labels;
|
|
3368
|
-
return patch;
|
|
3369
|
-
}
|
|
3370
|
-
return issue;
|
|
3371
|
-
});
|
|
3372
|
-
return {
|
|
3373
|
-
...state,
|
|
3374
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3375
|
-
issuesRaw: updatedIssues
|
|
3376
|
-
};
|
|
3377
|
-
}
|
|
3378
|
-
case "activity.updated": return {
|
|
3379
|
-
...state,
|
|
3380
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3381
|
-
recentActivity: event.payload.events.slice(0, MAX_ACTIVITY_ENTRIES)
|
|
3382
|
-
};
|
|
3383
|
-
case "shadow.inference_update": return {
|
|
3384
|
-
...state,
|
|
3385
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3386
|
-
shadowInferenceByIssueId: {
|
|
3387
|
-
...state.shadowInferenceByIssueId,
|
|
3388
|
-
[event.payload.issueId]: event.payload.content
|
|
3389
|
-
}
|
|
3390
|
-
};
|
|
3391
|
-
case "planning.started": {
|
|
3392
|
-
const sessionName = event.payload.sessionName;
|
|
3393
|
-
const issueId = event.payload.issueId;
|
|
3394
|
-
if (sessionName) return {
|
|
3395
|
-
...state,
|
|
3396
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3397
|
-
agentsById: {
|
|
3398
|
-
...state.agentsById,
|
|
3399
|
-
[sessionName]: {
|
|
3400
|
-
...state.agentsById[sessionName],
|
|
3401
|
-
id: sessionName,
|
|
3402
|
-
issueId,
|
|
3403
|
-
status: "running",
|
|
3404
|
-
startedAt: event.timestamp,
|
|
3405
|
-
runtime: event.payload.harness ?? "claude-code",
|
|
3406
|
-
role: "plan"
|
|
3407
|
-
}
|
|
3408
|
-
}
|
|
3409
|
-
};
|
|
3410
|
-
return {
|
|
3411
|
-
...state,
|
|
3412
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3413
|
-
};
|
|
3414
|
-
}
|
|
3415
|
-
case "workspace.created": return {
|
|
3416
|
-
...state,
|
|
3417
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3418
|
-
};
|
|
3419
|
-
case "workspace.wipe_started": {
|
|
3420
|
-
const { issueId } = event.payload;
|
|
3421
|
-
const updatedIssues = state.issuesRaw.map((issue) => {
|
|
3422
|
-
if (issue["identifier"] === issueId || issue["id"] === issueId) return {
|
|
3423
|
-
...issue,
|
|
3424
|
-
canonicalStatus: "wiping",
|
|
3425
|
-
state: "wiping"
|
|
3426
|
-
};
|
|
3427
|
-
return issue;
|
|
3428
|
-
});
|
|
3429
|
-
return {
|
|
3430
|
-
...state,
|
|
3431
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3432
|
-
issuesRaw: updatedIssues
|
|
3433
|
-
};
|
|
3434
|
-
}
|
|
3435
|
-
case "workspace.destroyed":
|
|
3436
|
-
case "workspace.deleted": {
|
|
3437
|
-
const { issueId } = event.payload;
|
|
3438
|
-
const removedAgentIds = Object.entries(state.agentsById).filter(([, agent]) => agent.issueId === issueId).map(([agentId]) => agentId);
|
|
3439
|
-
const updatedAgents = Object.fromEntries(Object.entries(state.agentsById).filter(([, agent]) => agent.issueId !== issueId));
|
|
3440
|
-
let nextTurnDiffSummariesByAgentId = state.turnDiffSummariesByAgentId;
|
|
3441
|
-
let nextAgentIdBySessionId = state.agentIdBySessionId;
|
|
3442
|
-
for (const agentId of removedAgentIds) {
|
|
3443
|
-
nextTurnDiffSummariesByAgentId = omitTurnDiffSummariesForAgent(nextTurnDiffSummariesByAgentId, agentId);
|
|
3444
|
-
nextAgentIdBySessionId = removeAgentFromSessionIndex(nextAgentIdBySessionId, agentId);
|
|
3445
|
-
}
|
|
3446
|
-
const updatedIssues = state.issuesRaw.map((issue) => {
|
|
3447
|
-
if (issue["identifier"] === issueId || issue["id"] === issueId) return {
|
|
3448
|
-
...issue,
|
|
3449
|
-
status: "Todo",
|
|
3450
|
-
canonicalStatus: "todo",
|
|
3451
|
-
state: "todo"
|
|
3452
|
-
};
|
|
3453
|
-
return issue;
|
|
3454
|
-
});
|
|
3455
|
-
return {
|
|
3456
|
-
...state,
|
|
3457
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3458
|
-
agentsById: updatedAgents,
|
|
3459
|
-
turnDiffSummariesByAgentId: nextTurnDiffSummariesByAgentId,
|
|
3460
|
-
agentIdBySessionId: nextAgentIdBySessionId,
|
|
3461
|
-
issuesRaw: updatedIssues
|
|
3462
|
-
};
|
|
3463
|
-
}
|
|
3464
|
-
case "workspace.aborted": {
|
|
3465
|
-
const { issueId, sessionName } = event.payload;
|
|
3466
|
-
let updatedAgents;
|
|
3467
|
-
let nextTurnDiffSummariesByAgentId = state.turnDiffSummariesByAgentId;
|
|
3468
|
-
let nextAgentIdBySessionId = state.agentIdBySessionId;
|
|
3469
|
-
if (sessionName) {
|
|
3470
|
-
const { [sessionName]: _removed, ...rest } = state.agentsById;
|
|
3471
|
-
updatedAgents = rest;
|
|
3472
|
-
nextTurnDiffSummariesByAgentId = omitTurnDiffSummariesForAgent(nextTurnDiffSummariesByAgentId, sessionName);
|
|
3473
|
-
nextAgentIdBySessionId = removeAgentFromSessionIndex(nextAgentIdBySessionId, sessionName);
|
|
3474
|
-
} else {
|
|
3475
|
-
const removedAgentIds = Object.entries(state.agentsById).filter(([, agent]) => agent.issueId === issueId).map(([agentId]) => agentId);
|
|
3476
|
-
updatedAgents = Object.fromEntries(Object.entries(state.agentsById).filter(([, agent]) => agent.issueId !== issueId));
|
|
3477
|
-
for (const agentId of removedAgentIds) {
|
|
3478
|
-
nextTurnDiffSummariesByAgentId = omitTurnDiffSummariesForAgent(nextTurnDiffSummariesByAgentId, agentId);
|
|
3479
|
-
nextAgentIdBySessionId = removeAgentFromSessionIndex(nextAgentIdBySessionId, agentId);
|
|
3480
|
-
}
|
|
3481
|
-
}
|
|
3482
|
-
return {
|
|
3483
|
-
...state,
|
|
3484
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3485
|
-
agentsById: updatedAgents,
|
|
3486
|
-
turnDiffSummariesByAgentId: nextTurnDiffSummariesByAgentId,
|
|
3487
|
-
agentIdBySessionId: nextAgentIdBySessionId
|
|
3488
|
-
};
|
|
3489
|
-
}
|
|
3490
|
-
case "planning.failed":
|
|
3491
|
-
case "planning.sync":
|
|
3492
|
-
case "plan.item_status_changed":
|
|
3493
|
-
case "plan.subitem_status_changed":
|
|
3494
|
-
case "plan.items_unblocked":
|
|
3495
|
-
case "operator.intervention":
|
|
3496
|
-
case "substrate.bug_filed":
|
|
3497
|
-
case "cost.event_recorded": return {
|
|
3498
|
-
...state,
|
|
3499
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3500
|
-
};
|
|
3501
|
-
case "memory.observation_created": {
|
|
3502
|
-
const observation = event.payload.observation;
|
|
3503
|
-
const existing = state.observationsByIssueId[observation.issueId] ?? [];
|
|
3504
|
-
const index = existing.findIndex((entry) => entry.id === observation.id);
|
|
3505
|
-
const updated = trimMemoryObservations(index === -1 ? [...existing, observation] : existing.map((entry, entryIndex) => entryIndex === index ? observation : entry));
|
|
3506
|
-
return {
|
|
3507
|
-
...state,
|
|
3508
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3509
|
-
observationsByIssueId: {
|
|
3510
|
-
...state.observationsByIssueId,
|
|
3511
|
-
[observation.issueId]: updated
|
|
3512
|
-
}
|
|
3513
|
-
};
|
|
3514
|
-
}
|
|
3515
|
-
case "memory.status_updated": {
|
|
3516
|
-
const { identity, status } = event.payload;
|
|
3517
|
-
return {
|
|
3518
|
-
...state,
|
|
3519
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3520
|
-
statusByIssueId: {
|
|
3521
|
-
...state.statusByIssueId,
|
|
3522
|
-
[identity.issueId]: status
|
|
3523
|
-
}
|
|
3524
|
-
};
|
|
3525
|
-
}
|
|
3526
|
-
case "memory.rollup_triggered": {
|
|
3527
|
-
const trigger = {
|
|
3528
|
-
projectId: event.payload.projectId,
|
|
3529
|
-
workspaceId: event.payload.workspaceId,
|
|
3530
|
-
issueId: event.payload.issueId,
|
|
3531
|
-
pendingTurns: [],
|
|
3532
|
-
pendingCount: event.payload.pendingCount,
|
|
3533
|
-
threshold: event.payload.threshold,
|
|
3534
|
-
triggeredAt: event.timestamp
|
|
3535
|
-
};
|
|
3536
|
-
const updated = [...state.rollupsByIssueId[event.payload.issueId] ?? [], trigger].slice(-10);
|
|
3537
|
-
return {
|
|
3538
|
-
...state,
|
|
3539
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3540
|
-
rollupsByIssueId: {
|
|
3541
|
-
...state.rollupsByIssueId,
|
|
3542
|
-
[event.payload.issueId]: updated
|
|
3543
|
-
}
|
|
3544
|
-
};
|
|
3545
|
-
}
|
|
3546
|
-
case "memory.reset_marker_created": {
|
|
3547
|
-
const { marker } = event.payload;
|
|
3548
|
-
const key = `${marker.scope}:${marker.scopeId}`;
|
|
3549
|
-
const existing = state.resetMarkersByScopeId[key] ?? [];
|
|
3550
|
-
const index = existing.findIndex((entry) => entry.id === marker.id);
|
|
3551
|
-
const updated = index === -1 ? [...existing, marker] : existing.map((entry, entryIndex) => entryIndex === index ? marker : entry);
|
|
3552
|
-
return {
|
|
3553
|
-
...state,
|
|
3554
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3555
|
-
resetMarkersByScopeId: {
|
|
3556
|
-
...state.resetMarkersByScopeId,
|
|
3557
|
-
[key]: updated
|
|
3558
|
-
}
|
|
3559
|
-
};
|
|
3560
|
-
}
|
|
3561
|
-
case "memory.health_changed": {
|
|
3562
|
-
const health = {
|
|
3563
|
-
projectId: event.payload.projectId,
|
|
3564
|
-
issueId: event.payload.issueId,
|
|
3565
|
-
status: event.payload.status,
|
|
3566
|
-
reason: event.payload.reason,
|
|
3567
|
-
...event.payload.detail !== void 0 ? { detail: event.payload.detail } : {},
|
|
3568
|
-
...event.payload.ragDecision !== void 0 ? { ragDecision: event.payload.ragDecision } : {},
|
|
3569
|
-
updatedAt: event.timestamp
|
|
3570
|
-
};
|
|
3571
|
-
return {
|
|
3572
|
-
...state,
|
|
3573
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3574
|
-
healthByIssueId: {
|
|
3575
|
-
...state.healthByIssueId,
|
|
3576
|
-
[event.payload.issueId]: health
|
|
3577
|
-
}
|
|
3578
|
-
};
|
|
3579
|
-
}
|
|
3580
|
-
case "agent.activity_changed": {
|
|
3581
|
-
const { agentId, activity, currentTool } = event.payload;
|
|
3582
|
-
const prev = state.agentRuntimeById[agentId] ?? defaultRuntimeSnapshot(agentId, event.timestamp, event.sequence);
|
|
3583
|
-
const next = {
|
|
3584
|
-
...prev,
|
|
3585
|
-
activity,
|
|
3586
|
-
currentTool: activity === "working" ? currentTool : void 0,
|
|
3587
|
-
thinking: activity === "thinking" ? prev.thinking : void 0,
|
|
3588
|
-
waiting: activity === "waiting" ? prev.waiting : void 0,
|
|
3589
|
-
channelReply: activity === "working" ? void 0 : prev.channelReply,
|
|
3590
|
-
lastActivity: event.timestamp,
|
|
3591
|
-
updatedAtSequence: event.sequence
|
|
3592
|
-
};
|
|
3593
|
-
return {
|
|
3594
|
-
...state,
|
|
3595
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3596
|
-
agentRuntimeById: {
|
|
3597
|
-
...state.agentRuntimeById,
|
|
3598
|
-
[agentId]: next
|
|
3599
|
-
},
|
|
3600
|
-
agentsById: bumpRuntimeSnapshotSequence(state.agentsById, agentId, event.sequence)
|
|
3601
|
-
};
|
|
3602
|
-
}
|
|
3603
|
-
case "agent.thinking_started": {
|
|
3604
|
-
const { agentId, lastToolAt } = event.payload;
|
|
3605
|
-
const next = {
|
|
3606
|
-
...state.agentRuntimeById[agentId] ?? defaultRuntimeSnapshot(agentId, event.timestamp, event.sequence),
|
|
3607
|
-
activity: "thinking",
|
|
3608
|
-
currentTool: void 0,
|
|
3609
|
-
thinking: {
|
|
3610
|
-
since: event.timestamp,
|
|
3611
|
-
lastToolAt
|
|
3612
|
-
},
|
|
3613
|
-
waiting: void 0,
|
|
3614
|
-
channelReply: void 0,
|
|
3615
|
-
lastActivity: event.timestamp,
|
|
3616
|
-
updatedAtSequence: event.sequence
|
|
3617
|
-
};
|
|
3618
|
-
return {
|
|
3619
|
-
...state,
|
|
3620
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3621
|
-
agentRuntimeById: {
|
|
3622
|
-
...state.agentRuntimeById,
|
|
3623
|
-
[agentId]: next
|
|
3624
|
-
},
|
|
3625
|
-
agentsById: bumpRuntimeSnapshotSequence(state.agentsById, agentId, event.sequence)
|
|
3626
|
-
};
|
|
3627
|
-
}
|
|
3628
|
-
case "agent.thinking_stopped": {
|
|
3629
|
-
const { agentId } = event.payload;
|
|
3630
|
-
const prev = state.agentRuntimeById[agentId];
|
|
3631
|
-
if (!prev) return {
|
|
3632
|
-
...state,
|
|
3633
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3634
|
-
};
|
|
3635
|
-
const next = {
|
|
3636
|
-
...prev,
|
|
3637
|
-
thinking: void 0,
|
|
3638
|
-
lastActivity: event.timestamp,
|
|
3639
|
-
updatedAtSequence: event.sequence
|
|
3640
|
-
};
|
|
3641
|
-
return {
|
|
3642
|
-
...state,
|
|
3643
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3644
|
-
agentRuntimeById: {
|
|
3645
|
-
...state.agentRuntimeById,
|
|
3646
|
-
[agentId]: next
|
|
3647
|
-
},
|
|
3648
|
-
agentsById: bumpRuntimeSnapshotSequence(state.agentsById, agentId, event.sequence)
|
|
3649
|
-
};
|
|
3650
|
-
}
|
|
3651
|
-
case "agent.waiting_started": {
|
|
3652
|
-
const { agentId, reason, message } = event.payload;
|
|
3653
|
-
const next = {
|
|
3654
|
-
...state.agentRuntimeById[agentId] ?? defaultRuntimeSnapshot(agentId, event.timestamp, event.sequence),
|
|
3655
|
-
activity: "waiting",
|
|
3656
|
-
currentTool: void 0,
|
|
3657
|
-
thinking: void 0,
|
|
3658
|
-
waiting: {
|
|
3659
|
-
reason,
|
|
3660
|
-
startedAt: event.timestamp,
|
|
3661
|
-
message
|
|
3662
|
-
},
|
|
3663
|
-
lastActivity: event.timestamp,
|
|
3664
|
-
updatedAtSequence: event.sequence
|
|
3665
|
-
};
|
|
3666
|
-
return {
|
|
3667
|
-
...state,
|
|
3668
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3669
|
-
agentRuntimeById: {
|
|
3670
|
-
...state.agentRuntimeById,
|
|
3671
|
-
[agentId]: next
|
|
3672
|
-
},
|
|
3673
|
-
agentsById: bumpRuntimeSnapshotSequence(state.agentsById, agentId, event.sequence)
|
|
3674
|
-
};
|
|
3675
|
-
}
|
|
3676
|
-
case "agent.waiting_cleared": {
|
|
3677
|
-
const { agentId } = event.payload;
|
|
3678
|
-
const prev = state.agentRuntimeById[agentId];
|
|
3679
|
-
if (!prev) return {
|
|
3680
|
-
...state,
|
|
3681
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
3682
|
-
};
|
|
3683
|
-
const next = {
|
|
3684
|
-
...prev,
|
|
3685
|
-
waiting: void 0,
|
|
3686
|
-
lastActivity: event.timestamp,
|
|
3687
|
-
updatedAtSequence: event.sequence
|
|
3688
|
-
};
|
|
3689
|
-
return {
|
|
3690
|
-
...state,
|
|
3691
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3692
|
-
agentRuntimeById: {
|
|
3693
|
-
...state.agentRuntimeById,
|
|
3694
|
-
[agentId]: next
|
|
3695
|
-
},
|
|
3696
|
-
agentsById: bumpRuntimeSnapshotSequence(state.agentsById, agentId, event.sequence)
|
|
3697
|
-
};
|
|
3698
|
-
}
|
|
3699
|
-
case "agent.permission_requested": {
|
|
3700
|
-
const request = event.payload;
|
|
3701
|
-
const permissionRequestIdsByAgentId = state.channelPermissionRequestIdsByAgentId ?? {};
|
|
3702
|
-
const resolvedDecisionsById = state.resolvedChannelPermissionDecisionsById ?? {};
|
|
3703
|
-
const resolvedDecisionIdsByAgentId = state.resolvedChannelPermissionDecisionIdsByAgentId ?? {};
|
|
3704
|
-
const nextPendingIds = permissionRequestIdsByAgentId[request.agentId] ?? [];
|
|
3705
|
-
const resolvedDecision = resolvedDecisionsById[request.requestId];
|
|
3706
|
-
const nextResolvedDecisionsById = { ...resolvedDecisionsById };
|
|
3707
|
-
const nextResolvedIdsByAgentId = { ...resolvedDecisionIdsByAgentId };
|
|
3708
|
-
if (resolvedDecision) {
|
|
3709
|
-
delete nextResolvedDecisionsById[request.requestId];
|
|
3710
|
-
const filteredResolvedIds = (nextResolvedIdsByAgentId[resolvedDecision.agentId] ?? []).filter((id) => id !== request.requestId);
|
|
3711
|
-
if (filteredResolvedIds.length > 0) nextResolvedIdsByAgentId[resolvedDecision.agentId] = filteredResolvedIds;
|
|
3712
|
-
else delete nextResolvedIdsByAgentId[resolvedDecision.agentId];
|
|
3713
|
-
}
|
|
3714
|
-
return {
|
|
3715
|
-
...state,
|
|
3716
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3717
|
-
channelPermissionRequestsById: {
|
|
3718
|
-
...state.channelPermissionRequestsById,
|
|
3719
|
-
[request.requestId]: request
|
|
3720
|
-
},
|
|
3721
|
-
channelPermissionRequestIdsByAgentId: {
|
|
3722
|
-
...permissionRequestIdsByAgentId,
|
|
3723
|
-
[request.agentId]: nextPendingIds.includes(request.requestId) ? nextPendingIds : [...nextPendingIds, request.requestId]
|
|
3724
|
-
},
|
|
3725
|
-
resolvedChannelPermissionDecisionsById: nextResolvedDecisionsById,
|
|
3726
|
-
resolvedChannelPermissionDecisionIdsByAgentId: nextResolvedIdsByAgentId
|
|
3727
|
-
};
|
|
3728
|
-
}
|
|
3729
|
-
case "agent.permission_resolved": {
|
|
3730
|
-
const { [event.payload.requestId]: _removed, ...rest } = state.channelPermissionRequestsById;
|
|
3731
|
-
const nextPendingIdsByAgentId = { ...state.channelPermissionRequestIdsByAgentId ?? {} };
|
|
3732
|
-
const filteredPendingIds = (nextPendingIdsByAgentId[event.payload.agentId] ?? []).filter((id) => id !== event.payload.requestId);
|
|
3733
|
-
if (filteredPendingIds.length > 0) nextPendingIdsByAgentId[event.payload.agentId] = filteredPendingIds;
|
|
3734
|
-
else delete nextPendingIdsByAgentId[event.payload.agentId];
|
|
3735
|
-
const resolvedDecisionIdsByAgentId = state.resolvedChannelPermissionDecisionIdsByAgentId ?? {};
|
|
3736
|
-
const nextResolvedIds = resolvedDecisionIdsByAgentId[event.payload.agentId] ?? [];
|
|
3737
|
-
return {
|
|
3738
|
-
...state,
|
|
3739
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3740
|
-
channelPermissionRequestsById: rest,
|
|
3741
|
-
channelPermissionRequestIdsByAgentId: nextPendingIdsByAgentId,
|
|
3742
|
-
resolvedChannelPermissionDecisionsById: {
|
|
3743
|
-
...state.resolvedChannelPermissionDecisionsById ?? {},
|
|
3744
|
-
[event.payload.requestId]: {
|
|
3745
|
-
requestId: event.payload.requestId,
|
|
3746
|
-
agentId: event.payload.agentId,
|
|
3747
|
-
issueId: event.payload.issueId,
|
|
3748
|
-
behavior: event.payload.behavior
|
|
3749
|
-
}
|
|
3750
|
-
},
|
|
3751
|
-
resolvedChannelPermissionDecisionIdsByAgentId: {
|
|
3752
|
-
...resolvedDecisionIdsByAgentId,
|
|
3753
|
-
[event.payload.agentId]: nextResolvedIds.includes(event.payload.requestId) ? nextResolvedIds : [...nextResolvedIds, event.payload.requestId]
|
|
3754
|
-
}
|
|
3755
|
-
};
|
|
3756
|
-
}
|
|
3757
|
-
case "agent.message_received": {
|
|
3758
|
-
const { agentId, direction } = event.payload;
|
|
3759
|
-
const prev = state.agentRuntimeById[agentId] ?? defaultRuntimeSnapshot(agentId, event.timestamp, event.sequence);
|
|
3760
|
-
const next = {
|
|
3761
|
-
...prev,
|
|
3762
|
-
lastMessageAt: event.timestamp,
|
|
3763
|
-
channelReply: direction === "to_agent" ? void 0 : prev.channelReply,
|
|
3764
|
-
lastActivity: event.timestamp,
|
|
3765
|
-
updatedAtSequence: event.sequence
|
|
3766
|
-
};
|
|
3767
|
-
return {
|
|
3768
|
-
...state,
|
|
3769
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3770
|
-
agentRuntimeById: {
|
|
3771
|
-
...state.agentRuntimeById,
|
|
3772
|
-
[agentId]: next
|
|
3773
|
-
},
|
|
3774
|
-
agentsById: bumpRuntimeSnapshotSequence(state.agentsById, agentId, event.sequence)
|
|
3775
|
-
};
|
|
3776
|
-
}
|
|
3777
|
-
case "agent.channel_reply": {
|
|
3778
|
-
const { agentId, reply } = event.payload;
|
|
3779
|
-
const prev = state.agentRuntimeById[agentId] ?? defaultRuntimeSnapshot(agentId, event.timestamp, event.sequence);
|
|
3780
|
-
const next = {
|
|
3781
|
-
...prev,
|
|
3782
|
-
channelReply: {
|
|
3783
|
-
...reply,
|
|
3784
|
-
reportedAt: event.timestamp
|
|
3785
|
-
},
|
|
3786
|
-
resolution: reply.kind === "done" ? "done" : reply.kind === "needs_input" ? "needs_input" : prev.resolution,
|
|
3787
|
-
resolutionUpdatedAt: reply.kind === "done" || reply.kind === "needs_input" ? event.timestamp : prev.resolutionUpdatedAt,
|
|
3788
|
-
lastActivity: event.timestamp,
|
|
3789
|
-
updatedAtSequence: event.sequence
|
|
3790
|
-
};
|
|
3791
|
-
return {
|
|
3792
|
-
...state,
|
|
3793
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3794
|
-
agentRuntimeById: {
|
|
3795
|
-
...state.agentRuntimeById,
|
|
3796
|
-
[agentId]: next
|
|
3797
|
-
},
|
|
3798
|
-
agentsById: bumpRuntimeSnapshotSequence(state.agentsById, agentId, event.sequence)
|
|
3799
|
-
};
|
|
3800
|
-
}
|
|
3801
|
-
case "agent.model_set": {
|
|
3802
|
-
const { agentId, model, claudeSessionId, sessionModel, sessionHarness } = event.payload;
|
|
3803
|
-
const prev = state.agentRuntimeById[agentId] ?? defaultRuntimeSnapshot(agentId, event.timestamp, event.sequence);
|
|
3804
|
-
const nextSessionId = claudeSessionId === null ? void 0 : claudeSessionId ?? prev.claudeSessionId;
|
|
3805
|
-
const next = {
|
|
3806
|
-
...prev,
|
|
3807
|
-
model,
|
|
3808
|
-
claudeSessionId: nextSessionId,
|
|
3809
|
-
sessionModel: sessionModel ?? prev.sessionModel,
|
|
3810
|
-
sessionHarness: sessionHarness ?? prev.sessionHarness,
|
|
3811
|
-
lastActivity: event.timestamp,
|
|
3812
|
-
updatedAtSequence: event.sequence
|
|
3813
|
-
};
|
|
3814
|
-
let nextAgentIdBySessionId = state.agentIdBySessionId;
|
|
3815
|
-
if (claudeSessionId !== void 0 && nextSessionId !== prev.claudeSessionId) {
|
|
3816
|
-
if (prev.claudeSessionId && state.agentIdBySessionId[prev.claudeSessionId] === agentId) {
|
|
3817
|
-
const { [prev.claudeSessionId]: _removed, ...rest } = nextAgentIdBySessionId;
|
|
3818
|
-
nextAgentIdBySessionId = rest;
|
|
3819
|
-
}
|
|
3820
|
-
if (nextSessionId) nextAgentIdBySessionId = {
|
|
3821
|
-
...nextAgentIdBySessionId,
|
|
3822
|
-
[nextSessionId]: agentId
|
|
3823
|
-
};
|
|
3824
|
-
}
|
|
3825
|
-
return {
|
|
3826
|
-
...state,
|
|
3827
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3828
|
-
agentRuntimeById: {
|
|
3829
|
-
...state.agentRuntimeById,
|
|
3830
|
-
[agentId]: next
|
|
3831
|
-
},
|
|
3832
|
-
agentsById: bumpRuntimeSnapshotSequence(state.agentsById, agentId, event.sequence),
|
|
3833
|
-
agentIdBySessionId: nextAgentIdBySessionId
|
|
3834
|
-
};
|
|
3835
|
-
}
|
|
3836
|
-
case "agent.current_issue_set": {
|
|
3837
|
-
const { agentId, currentIssue } = event.payload;
|
|
3838
|
-
const next = {
|
|
3839
|
-
...state.agentRuntimeById[agentId] ?? defaultRuntimeSnapshot(agentId, event.timestamp, event.sequence),
|
|
3840
|
-
currentIssue,
|
|
3841
|
-
lastActivity: event.timestamp,
|
|
3842
|
-
updatedAtSequence: event.sequence
|
|
3843
|
-
};
|
|
3844
|
-
return {
|
|
3845
|
-
...state,
|
|
3846
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3847
|
-
agentRuntimeById: {
|
|
3848
|
-
...state.agentRuntimeById,
|
|
3849
|
-
[agentId]: next
|
|
3850
|
-
},
|
|
3851
|
-
agentsById: bumpRuntimeSnapshotSequence(state.agentsById, agentId, event.sequence)
|
|
3852
|
-
};
|
|
3853
|
-
}
|
|
3854
|
-
case "agent.context_saturation_changed": {
|
|
3855
|
-
const { agentId, contextSaturatedAt } = event.payload;
|
|
3856
|
-
const next = {
|
|
3857
|
-
...state.agentRuntimeById[agentId] ?? defaultRuntimeSnapshot(agentId, event.timestamp, event.sequence),
|
|
3858
|
-
contextSaturatedAt,
|
|
3859
|
-
updatedAtSequence: event.sequence
|
|
3860
|
-
};
|
|
3861
|
-
return {
|
|
3862
|
-
...state,
|
|
3863
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3864
|
-
agentRuntimeById: {
|
|
3865
|
-
...state.agentRuntimeById,
|
|
3866
|
-
[agentId]: next
|
|
3867
|
-
},
|
|
3868
|
-
agentsById: bumpRuntimeSnapshotSequence(state.agentsById, agentId, event.sequence)
|
|
3869
|
-
};
|
|
3870
|
-
}
|
|
3871
|
-
case "agent.resolution_changed": {
|
|
3872
|
-
const { agentId, resolution, resolutionCount } = event.payload;
|
|
3873
|
-
const next = {
|
|
3874
|
-
...state.agentRuntimeById[agentId] ?? defaultRuntimeSnapshot(agentId, event.timestamp, event.sequence),
|
|
3875
|
-
resolution,
|
|
3876
|
-
resolutionCount,
|
|
3877
|
-
resolutionUpdatedAt: event.timestamp,
|
|
3878
|
-
lastActivity: event.timestamp,
|
|
3879
|
-
updatedAtSequence: event.sequence
|
|
3880
|
-
};
|
|
3881
|
-
return {
|
|
3882
|
-
...state,
|
|
3883
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3884
|
-
agentRuntimeById: {
|
|
3885
|
-
...state.agentRuntimeById,
|
|
3886
|
-
[agentId]: next
|
|
3887
|
-
},
|
|
3888
|
-
agentsById: bumpRuntimeSnapshotSequence(state.agentsById, agentId, event.sequence)
|
|
3889
|
-
};
|
|
3890
|
-
}
|
|
3891
|
-
case "agent.state_restored": {
|
|
3892
|
-
const { agentId, snapshot } = event.payload;
|
|
3893
|
-
const next = {
|
|
3894
|
-
...snapshot,
|
|
3895
|
-
updatedAtSequence: event.sequence
|
|
3896
|
-
};
|
|
3897
|
-
return {
|
|
3898
|
-
...state,
|
|
3899
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3900
|
-
agentRuntimeById: {
|
|
3901
|
-
...state.agentRuntimeById,
|
|
3902
|
-
[agentId]: next
|
|
3903
|
-
},
|
|
3904
|
-
agentsById: bumpRuntimeSnapshotSequence(state.agentsById, agentId, event.sequence)
|
|
3905
|
-
};
|
|
3906
|
-
}
|
|
3907
|
-
case "activity.entry": {
|
|
3908
|
-
const entry = event.payload;
|
|
3909
|
-
const updated = [{
|
|
3910
|
-
id: entry.id,
|
|
3911
|
-
timestamp: event.timestamp,
|
|
3912
|
-
...entry
|
|
3913
|
-
}, ...state.recentActivity].slice(0, MAX_ACTIVITY_ENTRIES);
|
|
3914
|
-
return {
|
|
3915
|
-
...state,
|
|
3916
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3917
|
-
recentActivity: updated
|
|
3918
|
-
};
|
|
3919
|
-
}
|
|
3920
|
-
case "activity.detailed": {
|
|
3921
|
-
const entry = event.payload;
|
|
3922
|
-
const updated = [{
|
|
3923
|
-
id: entry.id,
|
|
3924
|
-
timestamp: event.timestamp,
|
|
3925
|
-
...entry
|
|
3926
|
-
}, ...state.detailedActivity].slice(0, MAX_DETAILED_ENTRIES);
|
|
3927
|
-
return {
|
|
3928
|
-
...state,
|
|
3929
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3930
|
-
detailedActivity: updated
|
|
3931
|
-
};
|
|
3932
|
-
}
|
|
3933
|
-
case "activity.tts": {
|
|
3934
|
-
const entry = event.payload;
|
|
3935
|
-
const updated = [{
|
|
3936
|
-
id: entry.id,
|
|
3937
|
-
timestamp: event.timestamp,
|
|
3938
|
-
...entry
|
|
3939
|
-
}, ...state.ttsActivity].slice(0, MAX_TTS_ENTRIES);
|
|
3940
|
-
return {
|
|
3941
|
-
...state,
|
|
3942
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3943
|
-
ttsActivity: updated
|
|
3944
|
-
};
|
|
3945
|
-
}
|
|
3946
|
-
case "dashboard.lifecycle_started": {
|
|
3947
|
-
const { reason, issueId, trigger } = event.payload;
|
|
3948
|
-
return {
|
|
3949
|
-
...state,
|
|
3950
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3951
|
-
dashboardLifecycle: {
|
|
3952
|
-
active: true,
|
|
3953
|
-
reason,
|
|
3954
|
-
issueId,
|
|
3955
|
-
trigger,
|
|
3956
|
-
startedAt: event.timestamp,
|
|
3957
|
-
completedAt: null,
|
|
3958
|
-
failedAt: null,
|
|
3959
|
-
error: null
|
|
3960
|
-
}
|
|
3961
|
-
};
|
|
3962
|
-
}
|
|
3963
|
-
case "dashboard.lifecycle_completed": {
|
|
3964
|
-
const { reason, issueId } = event.payload;
|
|
3965
|
-
return {
|
|
3966
|
-
...state,
|
|
3967
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3968
|
-
dashboardLifecycle: {
|
|
3969
|
-
...state.dashboardLifecycle,
|
|
3970
|
-
active: false,
|
|
3971
|
-
reason: reason ?? state.dashboardLifecycle.reason,
|
|
3972
|
-
issueId: issueId ?? state.dashboardLifecycle.issueId,
|
|
3973
|
-
completedAt: event.timestamp
|
|
3974
|
-
}
|
|
3975
|
-
};
|
|
3976
|
-
}
|
|
3977
|
-
case "dashboard.lifecycle_failed": {
|
|
3978
|
-
const { reason, issueId, error } = event.payload;
|
|
3979
|
-
return {
|
|
3980
|
-
...state,
|
|
3981
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
3982
|
-
dashboardLifecycle: {
|
|
3983
|
-
...state.dashboardLifecycle,
|
|
3984
|
-
active: false,
|
|
3985
|
-
reason: reason ?? state.dashboardLifecycle.reason,
|
|
3986
|
-
issueId: issueId ?? state.dashboardLifecycle.issueId,
|
|
3987
|
-
failedAt: event.timestamp,
|
|
3988
|
-
error
|
|
3989
|
-
}
|
|
3990
|
-
};
|
|
3991
|
-
}
|
|
3992
|
-
case "agent.turn_diff_completed": {
|
|
3993
|
-
const p = event.payload;
|
|
3994
|
-
const existing = state.turnDiffSummariesByAgentId[p.agentId] ?? [];
|
|
3995
|
-
const summary = {
|
|
3996
|
-
turnId: p.turnId,
|
|
3997
|
-
completedAt: p.completedAt,
|
|
3998
|
-
files: p.files,
|
|
3999
|
-
checkpointRef: p.checkpointRef,
|
|
4000
|
-
assistantMessageId: p.assistantMessageId ?? void 0,
|
|
4001
|
-
checkpointTurnCount: p.checkpointTurnCount
|
|
4002
|
-
};
|
|
4003
|
-
const idx = existing.findIndex((s) => s.turnId === p.turnId);
|
|
4004
|
-
const updated = trimTurnDiffSummaries(idx >= 0 ? existing.map((s, i) => i === idx ? summary : s) : [...existing, summary]);
|
|
4005
|
-
return {
|
|
4006
|
-
...state,
|
|
4007
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
4008
|
-
turnDiffSummariesByAgentId: {
|
|
4009
|
-
...state.turnDiffSummariesByAgentId,
|
|
4010
|
-
[p.agentId]: updated
|
|
4011
|
-
}
|
|
4012
|
-
};
|
|
4013
|
-
}
|
|
4014
|
-
case "conversation.compacting_changed": {
|
|
4015
|
-
const { conversationName, compacting } = event.payload;
|
|
4016
|
-
if (!compacting) {
|
|
4017
|
-
const { [conversationName]: _removed, ...rest } = state.conversationsCompactingByName;
|
|
4018
|
-
return {
|
|
4019
|
-
...state,
|
|
4020
|
-
conversationsCompactingByName: rest
|
|
4021
|
-
};
|
|
4022
|
-
}
|
|
4023
|
-
return {
|
|
4024
|
-
...state,
|
|
4025
|
-
conversationsCompactingByName: {
|
|
4026
|
-
...state.conversationsCompactingByName,
|
|
4027
|
-
[conversationName]: true
|
|
4028
|
-
}
|
|
4029
|
-
};
|
|
4030
|
-
}
|
|
4031
|
-
case "conversation.created": return {
|
|
4032
|
-
...state,
|
|
4033
|
-
conversationsListRevision: state.conversationsListRevision + 1
|
|
4034
|
-
};
|
|
4035
|
-
case "conversation.title_changed": return {
|
|
4036
|
-
...state,
|
|
4037
|
-
conversationsListRevision: state.conversationsListRevision + 1
|
|
4038
|
-
};
|
|
4039
|
-
case "conversation.permission_changed": {
|
|
4040
|
-
const { conversationName, waiting } = event.payload;
|
|
4041
|
-
if (!waiting) {
|
|
4042
|
-
const { [conversationName]: _removed, ...rest } = state.conversationsAwaitingPermissionByName;
|
|
4043
|
-
return {
|
|
4044
|
-
...state,
|
|
4045
|
-
conversationsAwaitingPermissionByName: rest
|
|
4046
|
-
};
|
|
4047
|
-
}
|
|
4048
|
-
return {
|
|
4049
|
-
...state,
|
|
4050
|
-
conversationsAwaitingPermissionByName: {
|
|
4051
|
-
...state.conversationsAwaitingPermissionByName,
|
|
4052
|
-
[conversationName]: true
|
|
4053
|
-
}
|
|
4054
|
-
};
|
|
4055
|
-
}
|
|
4056
|
-
case "scan.started": {
|
|
4057
|
-
const { mode, dirs } = event.payload;
|
|
4058
|
-
return {
|
|
4059
|
-
...state,
|
|
4060
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
4061
|
-
scanProgress: {
|
|
4062
|
-
active: true,
|
|
4063
|
-
mode,
|
|
4064
|
-
dirs,
|
|
4065
|
-
dirsProcessed: 0,
|
|
4066
|
-
dirsTotal: 0,
|
|
4067
|
-
sessionsFound: 0,
|
|
4068
|
-
elapsedMs: 0,
|
|
4069
|
-
inserted: 0,
|
|
4070
|
-
updated: 0,
|
|
4071
|
-
skipped: 0,
|
|
4072
|
-
errors: 0,
|
|
4073
|
-
durationMs: 0
|
|
4074
|
-
}
|
|
4075
|
-
};
|
|
4076
|
-
}
|
|
4077
|
-
case "scan.progress": {
|
|
4078
|
-
if (!state.scanProgress) return {
|
|
4079
|
-
...state,
|
|
4080
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
4081
|
-
};
|
|
4082
|
-
const { dirsProcessed, dirsTotal, sessionsFound, elapsedMs } = event.payload;
|
|
4083
|
-
return {
|
|
4084
|
-
...state,
|
|
4085
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
4086
|
-
scanProgress: {
|
|
4087
|
-
...state.scanProgress,
|
|
4088
|
-
dirsProcessed,
|
|
4089
|
-
dirsTotal,
|
|
4090
|
-
sessionsFound,
|
|
4091
|
-
elapsedMs
|
|
4092
|
-
}
|
|
4093
|
-
};
|
|
4094
|
-
}
|
|
4095
|
-
case "scan.complete": {
|
|
4096
|
-
if (!state.scanProgress) return {
|
|
4097
|
-
...state,
|
|
4098
|
-
sequence: Math.max(state.sequence, event.sequence)
|
|
4099
|
-
};
|
|
4100
|
-
const { inserted, updated, skipped, errors, durationMs } = event.payload;
|
|
4101
|
-
return {
|
|
4102
|
-
...state,
|
|
4103
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
4104
|
-
scanProgress: {
|
|
4105
|
-
...state.scanProgress,
|
|
4106
|
-
active: false,
|
|
4107
|
-
inserted,
|
|
4108
|
-
updated,
|
|
4109
|
-
skipped,
|
|
4110
|
-
errors,
|
|
4111
|
-
durationMs
|
|
4112
|
-
}
|
|
4113
|
-
};
|
|
4114
|
-
}
|
|
4115
|
-
case "enrich.progress": {
|
|
4116
|
-
const { sessionId, level, model, cost, success, error } = event.payload;
|
|
4117
|
-
const prev = state.enrichStats ?? {
|
|
4118
|
-
processed: 0,
|
|
4119
|
-
totalCost: 0,
|
|
4120
|
-
failures: 0,
|
|
4121
|
-
durationMs: 0
|
|
4122
|
-
};
|
|
4123
|
-
const progress = {
|
|
4124
|
-
sessionId,
|
|
4125
|
-
level,
|
|
4126
|
-
model,
|
|
4127
|
-
cost,
|
|
4128
|
-
success,
|
|
4129
|
-
error,
|
|
4130
|
-
timestamp: event.timestamp
|
|
4131
|
-
};
|
|
4132
|
-
return {
|
|
4133
|
-
...state,
|
|
4134
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
4135
|
-
enrichStats: {
|
|
4136
|
-
processed: prev.processed + 1,
|
|
4137
|
-
totalCost: prev.totalCost + (success ? cost : 0),
|
|
4138
|
-
failures: prev.failures + (success ? 0 : 1),
|
|
4139
|
-
durationMs: 0
|
|
4140
|
-
},
|
|
4141
|
-
enrichProgressBySessionId: upsertBoundedSessionProgress(state.enrichProgressBySessionId, progress)
|
|
4142
|
-
};
|
|
4143
|
-
}
|
|
4144
|
-
case "enrich.complete": {
|
|
4145
|
-
const { processed, totalCost, failures, durationMs } = event.payload;
|
|
4146
|
-
return {
|
|
4147
|
-
...state,
|
|
4148
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
4149
|
-
enrichStats: {
|
|
4150
|
-
processed,
|
|
4151
|
-
totalCost,
|
|
4152
|
-
failures,
|
|
4153
|
-
durationMs
|
|
4154
|
-
},
|
|
4155
|
-
enrichProgressBySessionId: {}
|
|
4156
|
-
};
|
|
4157
|
-
}
|
|
4158
|
-
case "embed.progress": {
|
|
4159
|
-
const { sessionId, model, success, error } = event.payload;
|
|
4160
|
-
const progress = {
|
|
4161
|
-
sessionId,
|
|
4162
|
-
model,
|
|
4163
|
-
success,
|
|
4164
|
-
error,
|
|
4165
|
-
timestamp: event.timestamp
|
|
4166
|
-
};
|
|
4167
|
-
return {
|
|
4168
|
-
...state,
|
|
4169
|
-
sequence: Math.max(state.sequence, event.sequence),
|
|
4170
|
-
embedProgressBySessionId: upsertBoundedSessionProgress(state.embedProgressBySessionId, progress)
|
|
4171
|
-
};
|
|
4172
|
-
}
|
|
4173
|
-
default: return state;
|
|
4174
|
-
}
|
|
4175
|
-
}
|
|
4176
|
-
var INITIAL_READ_MODEL_STATE, MAX_AGENT_OUTPUT_LINES, MAX_ACTIVITY_ENTRIES, MAX_DETAILED_ENTRIES, MAX_TTS_ENTRIES, MAX_SESSION_PROGRESS_ENTRIES;
|
|
4177
|
-
var init_event_reducers = __esmMin((() => {
|
|
4178
|
-
INITIAL_READ_MODEL_STATE = {
|
|
4179
|
-
sequence: 0,
|
|
4180
|
-
agentsById: {},
|
|
4181
|
-
agentRuntimeById: {},
|
|
4182
|
-
reviewStatusByIssueId: {},
|
|
4183
|
-
resources: null,
|
|
4184
|
-
agentOutputById: {},
|
|
4185
|
-
issuesRaw: [],
|
|
4186
|
-
recentActivity: [],
|
|
4187
|
-
detailedActivity: [],
|
|
4188
|
-
ttsActivity: [],
|
|
4189
|
-
shadowInferenceByIssueId: {},
|
|
4190
|
-
turnDiffSummariesByAgentId: {},
|
|
4191
|
-
channelPermissionRequestsById: {},
|
|
4192
|
-
channelPermissionRequestIdsByAgentId: {},
|
|
4193
|
-
resolvedChannelPermissionDecisionsById: {},
|
|
4194
|
-
resolvedChannelPermissionDecisionIdsByAgentId: {},
|
|
4195
|
-
conversationsCompactingByName: {},
|
|
4196
|
-
conversationsAwaitingPermissionByName: {},
|
|
4197
|
-
conversationsListRevision: 0,
|
|
4198
|
-
observationsByIssueId: {},
|
|
4199
|
-
statusByIssueId: {},
|
|
4200
|
-
rollupsByIssueId: {},
|
|
4201
|
-
resetMarkersByScopeId: {},
|
|
4202
|
-
healthByIssueId: {},
|
|
4203
|
-
scanProgress: null,
|
|
4204
|
-
enrichStats: null,
|
|
4205
|
-
enrichProgressBySessionId: {},
|
|
4206
|
-
embedProgressBySessionId: {},
|
|
4207
|
-
agentIdBySessionId: {},
|
|
4208
|
-
dashboardLifecycle: {
|
|
4209
|
-
active: false,
|
|
4210
|
-
reason: null,
|
|
4211
|
-
issueId: null,
|
|
4212
|
-
trigger: null,
|
|
4213
|
-
startedAt: null,
|
|
4214
|
-
completedAt: null,
|
|
4215
|
-
failedAt: null,
|
|
4216
|
-
error: null
|
|
4217
|
-
}
|
|
4218
|
-
};
|
|
4219
|
-
MAX_AGENT_OUTPUT_LINES = 200;
|
|
4220
|
-
MAX_ACTIVITY_ENTRIES = 50;
|
|
4221
|
-
MAX_DETAILED_ENTRIES = 200;
|
|
4222
|
-
MAX_TTS_ENTRIES = 50;
|
|
4223
|
-
MAX_SESSION_PROGRESS_ENTRIES = 100;
|
|
4224
|
-
})), FlywheelStatsCriterionStatus, FlywheelStatsTrend, FlywheelStatsCriterionValueObject, FlywheelStatsCriterionValue, FlywheelStatsCriterion, FlywheelStatsCriteria, FlywheelStats;
|
|
4225
|
-
var init_flywheel_stats = __esmMin((() => {
|
|
4226
|
-
FlywheelStatsCriterionStatus = Schema.Literals([
|
|
4227
|
-
"green",
|
|
4228
|
-
"yellow",
|
|
4229
|
-
"red",
|
|
4230
|
-
"insufficient_data"
|
|
4231
|
-
]);
|
|
4232
|
-
FlywheelStatsTrend = Schema.Literals([
|
|
4233
|
-
"up",
|
|
4234
|
-
"down",
|
|
4235
|
-
"flat"
|
|
4236
|
-
]);
|
|
4237
|
-
FlywheelStatsCriterionValueObject = Schema.Record(Schema.String, Schema.Json);
|
|
4238
|
-
FlywheelStatsCriterionValue = Schema.Union([Schema.Number, FlywheelStatsCriterionValueObject]);
|
|
4239
|
-
FlywheelStatsCriterion = Schema.Struct({
|
|
4240
|
-
label: Schema.String,
|
|
4241
|
-
value: FlywheelStatsCriterionValue,
|
|
4242
|
-
target: FlywheelStatsCriterionValue,
|
|
4243
|
-
status: FlywheelStatsCriterionStatus,
|
|
4244
|
-
trend: Schema.optional(FlywheelStatsTrend),
|
|
4245
|
-
sampleSize: Schema.Number,
|
|
4246
|
-
dataSufficient: Schema.Boolean
|
|
4247
|
-
});
|
|
4248
|
-
FlywheelStatsCriteria = Schema.Struct({
|
|
4249
|
-
c1_bugRate: FlywheelStatsCriterion,
|
|
4250
|
-
c2_p0Bugs: FlywheelStatsCriterion,
|
|
4251
|
-
c3_passRate: FlywheelStatsCriterion,
|
|
4252
|
-
c4_mttr: FlywheelStatsCriterion,
|
|
4253
|
-
c5_intervention: FlywheelStatsCriterion,
|
|
4254
|
-
c6_timeConsistency: FlywheelStatsCriterion,
|
|
4255
|
-
c7_flake: FlywheelStatsCriterion
|
|
4256
|
-
});
|
|
4257
|
-
FlywheelStats = Schema.Struct({
|
|
4258
|
-
window: Schema.String,
|
|
4259
|
-
generatedAt: Schema.String,
|
|
4260
|
-
criteria: FlywheelStatsCriteria
|
|
4261
|
-
});
|
|
4262
|
-
Schema.decodeUnknownSync(FlywheelStats);
|
|
4263
|
-
Schema.encodeSync(FlywheelStats);
|
|
4264
|
-
}));
|
|
4265
|
-
//#endregion
|
|
4266
|
-
//#region ../../../packages/contracts/src/orders.ts
|
|
4267
|
-
var OrderBookLane, OrderBookStatus, OrderBookPosture, OrderBookItem, OrderBookSettings, OrderBook, OrderBookIndexEntry;
|
|
4268
|
-
var init_orders = __esmMin((() => {
|
|
4269
|
-
OrderBookLane = Schema.Literals(["A", "B"]);
|
|
4270
|
-
OrderBookStatus = Schema.Literals([
|
|
4271
|
-
"draft",
|
|
4272
|
-
"ready",
|
|
4273
|
-
"running",
|
|
4274
|
-
"drained",
|
|
4275
|
-
"complete"
|
|
4276
|
-
]);
|
|
4277
|
-
OrderBookPosture = Schema.Literals(["open", "drain"]);
|
|
4278
|
-
OrderBookItem = Schema.Struct({
|
|
4279
|
-
issue: Schema.String,
|
|
4280
|
-
lane: OrderBookLane,
|
|
4281
|
-
order: Schema.Number,
|
|
4282
|
-
prereqs: Schema.Array(Schema.String),
|
|
4283
|
-
reVerify: Schema.Boolean,
|
|
4284
|
-
planAtPickup: Schema.optional(Schema.Boolean),
|
|
4285
|
-
addedAt: Schema.String,
|
|
4286
|
-
addedBy: Schema.String
|
|
4287
|
-
});
|
|
4288
|
-
OrderBookSettings = Schema.Struct({
|
|
4289
|
-
laneAConcurrency: Schema.Number,
|
|
4290
|
-
briefOverlay: Schema.optional(Schema.String),
|
|
4291
|
-
posture: OrderBookPosture,
|
|
4292
|
-
postureSetAt: Schema.optional(Schema.String),
|
|
4293
|
-
postureSetBy: Schema.optional(Schema.String),
|
|
4294
|
-
postureReason: Schema.optional(Schema.String)
|
|
4295
|
-
});
|
|
4296
|
-
OrderBook = Schema.Struct({
|
|
4297
|
-
id: Schema.String,
|
|
4298
|
-
name: Schema.String,
|
|
4299
|
-
status: OrderBookStatus,
|
|
4300
|
-
settings: OrderBookSettings,
|
|
4301
|
-
items: Schema.Array(OrderBookItem),
|
|
4302
|
-
runId: Schema.optional(Schema.String),
|
|
4303
|
-
createdAt: Schema.String,
|
|
4304
|
-
updatedAt: Schema.String
|
|
4305
|
-
});
|
|
4306
|
-
OrderBookIndexEntry = Schema.Struct({
|
|
4307
|
-
id: Schema.String,
|
|
4308
|
-
name: Schema.String,
|
|
4309
|
-
status: OrderBookStatus,
|
|
4310
|
-
runId: Schema.optional(Schema.String),
|
|
4311
|
-
updatedAt: Schema.String
|
|
4312
|
-
});
|
|
4313
|
-
})), CONTEXT_LAYER_KINDS, CONTEXT_PREVIEW_HARNESSES, ContextPreviewHarness, ContextProjectSummary, ContextWorkspaceSummary, ContextLayerBase, GlobalContextLayerRecord, ProjectContextLayerRecord, WorkspaceContextLayerRecord, ContextEditableLayerRecord, GlobalContextLayerTarget, ProjectContextLayerTarget, WorkspaceContextLayerTarget, ContextLayerTarget, ContextLayerDraft, ContextSyncTarget, ContextPreviewRequest, ContextHarnessPreviews, ContextPreviewDiagnostic, ContextLayerSaveRequest;
|
|
4314
|
-
var init_context_layers = __esmMin((() => {
|
|
4315
|
-
CONTEXT_LAYER_KINDS = [
|
|
4316
|
-
"global",
|
|
4317
|
-
"project",
|
|
4318
|
-
"workspace"
|
|
4319
|
-
];
|
|
4320
|
-
CONTEXT_PREVIEW_HARNESSES = [
|
|
4321
|
-
"claude-code",
|
|
4322
|
-
"ohmypi",
|
|
4323
|
-
"codex",
|
|
4324
|
-
"acp"
|
|
4325
|
-
];
|
|
4326
|
-
Schema.Literals(CONTEXT_LAYER_KINDS);
|
|
4327
|
-
ContextPreviewHarness = Schema.Literals(CONTEXT_PREVIEW_HARNESSES);
|
|
4328
|
-
ContextProjectSummary = Schema.Struct({
|
|
4329
|
-
projectKey: Schema.String,
|
|
4330
|
-
name: Schema.String,
|
|
4331
|
-
path: Schema.String,
|
|
4332
|
-
issuePrefix: Schema.optional(Schema.String),
|
|
4333
|
-
tracker: Schema.optional(Schema.Literals([
|
|
4334
|
-
"linear",
|
|
4335
|
-
"github",
|
|
4336
|
-
"gitlab",
|
|
4337
|
-
"rally"
|
|
4338
|
-
])),
|
|
4339
|
-
workspaceRoot: Schema.optional(Schema.String)
|
|
4340
|
-
});
|
|
4341
|
-
ContextWorkspaceSummary = Schema.Struct({
|
|
4342
|
-
projectKey: Schema.String,
|
|
4343
|
-
path: Schema.String,
|
|
4344
|
-
name: Schema.String,
|
|
4345
|
-
issueId: Schema.optional(Schema.String),
|
|
4346
|
-
branch: Schema.optional(Schema.String)
|
|
4347
|
-
});
|
|
4348
|
-
ContextLayerBase = {
|
|
4349
|
-
file: Schema.String,
|
|
4350
|
-
exists: Schema.Boolean,
|
|
4351
|
-
content: Schema.String,
|
|
4352
|
-
editable: Schema.Boolean
|
|
4353
|
-
};
|
|
4354
|
-
GlobalContextLayerRecord = Schema.Struct({
|
|
4355
|
-
kind: Schema.Literal("global"),
|
|
4356
|
-
...ContextLayerBase
|
|
4357
|
-
});
|
|
4358
|
-
ProjectContextLayerRecord = Schema.Struct({
|
|
4359
|
-
kind: Schema.Literal("project"),
|
|
4360
|
-
projectKey: Schema.String,
|
|
4361
|
-
...ContextLayerBase
|
|
4362
|
-
});
|
|
4363
|
-
WorkspaceContextLayerRecord = Schema.Struct({
|
|
4364
|
-
kind: Schema.Literal("workspace"),
|
|
4365
|
-
projectKey: Schema.String,
|
|
4366
|
-
workspacePath: Schema.String,
|
|
4367
|
-
...ContextLayerBase
|
|
4368
|
-
});
|
|
4369
|
-
ContextEditableLayerRecord = Schema.Union([
|
|
4370
|
-
GlobalContextLayerRecord,
|
|
4371
|
-
ProjectContextLayerRecord,
|
|
4372
|
-
WorkspaceContextLayerRecord
|
|
4373
|
-
]);
|
|
4374
|
-
GlobalContextLayerTarget = Schema.Struct({ kind: Schema.Literal("global") });
|
|
4375
|
-
ProjectContextLayerTarget = Schema.Struct({
|
|
4376
|
-
kind: Schema.Literal("project"),
|
|
4377
|
-
projectKey: Schema.String
|
|
4378
|
-
});
|
|
4379
|
-
WorkspaceContextLayerTarget = Schema.Struct({
|
|
4380
|
-
kind: Schema.Literal("workspace"),
|
|
4381
|
-
projectKey: Schema.String,
|
|
4382
|
-
workspacePath: Schema.String
|
|
4383
|
-
});
|
|
4384
|
-
ContextLayerTarget = Schema.Union([
|
|
4385
|
-
GlobalContextLayerTarget,
|
|
4386
|
-
ProjectContextLayerTarget,
|
|
4387
|
-
WorkspaceContextLayerTarget
|
|
4388
|
-
]);
|
|
4389
|
-
ContextLayerDraft = Schema.Struct({
|
|
4390
|
-
target: ContextLayerTarget,
|
|
4391
|
-
content: Schema.String
|
|
4392
|
-
});
|
|
4393
|
-
ContextSyncTarget = Schema.Struct({
|
|
4394
|
-
harness: ContextPreviewHarness,
|
|
4395
|
-
layerKind: Schema.Literals(["global", "project"]),
|
|
4396
|
-
projectKey: Schema.optional(Schema.String),
|
|
4397
|
-
/** Short human label, e.g. "Claude Code · global". */
|
|
4398
|
-
label: Schema.String,
|
|
4399
|
-
/** Resolved absolute path of the target file. */
|
|
4400
|
-
path: Schema.String,
|
|
4401
|
-
exists: Schema.Boolean,
|
|
4402
|
-
/** True when the file already contains a Overdeck-managed region. */
|
|
4403
|
-
hasManagedRegion: Schema.Boolean,
|
|
4404
|
-
/** True when the file has hand-authored content outside the managed region. */
|
|
4405
|
-
hasUserContent: Schema.Boolean
|
|
4406
|
-
});
|
|
4407
|
-
Schema.Struct({
|
|
4408
|
-
operation: Schema.Literal("load"),
|
|
4409
|
-
projects: Schema.Array(ContextProjectSummary),
|
|
4410
|
-
workspaces: Schema.Array(ContextWorkspaceSummary),
|
|
4411
|
-
layers: Schema.Array(ContextEditableLayerRecord),
|
|
4412
|
-
/** Injection targets `pan sync` writes managed regions into. */
|
|
4413
|
-
targets: Schema.Array(ContextSyncTarget)
|
|
4414
|
-
});
|
|
4415
|
-
ContextPreviewRequest = Schema.Struct({
|
|
4416
|
-
operation: Schema.Literal("preview"),
|
|
4417
|
-
selectedLayer: ContextLayerTarget,
|
|
4418
|
-
drafts: Schema.Array(ContextLayerDraft)
|
|
4419
|
-
});
|
|
4420
|
-
ContextHarnessPreviews = Schema.Struct({
|
|
4421
|
-
"claude-code": Schema.String,
|
|
4422
|
-
ohmypi: Schema.String,
|
|
4423
|
-
codex: Schema.String,
|
|
4424
|
-
acp: Schema.String,
|
|
4425
|
-
fullPrompt: Schema.String
|
|
4426
|
-
});
|
|
4427
|
-
ContextPreviewDiagnostic = Schema.Struct({
|
|
4428
|
-
level: Schema.Literals([
|
|
4429
|
-
"info",
|
|
4430
|
-
"warning",
|
|
4431
|
-
"error"
|
|
4432
|
-
]),
|
|
4433
|
-
message: Schema.String,
|
|
4434
|
-
layer: Schema.optional(ContextLayerTarget)
|
|
4435
|
-
});
|
|
4436
|
-
Schema.Struct({
|
|
4437
|
-
operation: Schema.Literal("preview"),
|
|
4438
|
-
previews: ContextHarnessPreviews,
|
|
4439
|
-
diagnostics: Schema.Array(ContextPreviewDiagnostic)
|
|
4440
|
-
});
|
|
4441
|
-
ContextLayerSaveRequest = Schema.Struct({
|
|
4442
|
-
operation: Schema.Literal("save"),
|
|
4443
|
-
target: ContextLayerTarget,
|
|
4444
|
-
content: Schema.String
|
|
4445
|
-
});
|
|
4446
|
-
Schema.Struct({
|
|
4447
|
-
operation: Schema.Literal("save"),
|
|
4448
|
-
layer: ContextEditableLayerRecord,
|
|
4449
|
-
savedAt: Schema.String
|
|
4450
|
-
});
|
|
4451
|
-
Schema.Struct({ operation: Schema.Literal("sync") });
|
|
4452
|
-
Schema.Struct({
|
|
4453
|
-
operation: Schema.Literal("sync"),
|
|
4454
|
-
success: Schema.Boolean,
|
|
4455
|
-
exitCode: Schema.optional(Schema.Number),
|
|
4456
|
-
stdout: Schema.String,
|
|
4457
|
-
stderr: Schema.String,
|
|
4458
|
-
syncedAt: Schema.String
|
|
4459
|
-
});
|
|
4460
|
-
})), ArtifactId, ArtifactSlug, ArtifactHash, ArtifactAgentRole, ArtifactAgentHarness, ArtifactLifecycleState, ArtifactValidationCode, ArtifactValidationFinding, ArtifactValidationResult, ArtifactMetadata, ArtifactUrls, ArtifactListEntry;
|
|
4461
|
-
var init_artifacts = __esmMin((() => {
|
|
4462
|
-
ArtifactId = Schema.String;
|
|
4463
|
-
ArtifactSlug = Schema.String;
|
|
4464
|
-
ArtifactHash = Schema.String;
|
|
4465
|
-
ArtifactAgentRole = Schema.Literals([
|
|
4466
|
-
"plan",
|
|
4467
|
-
"work",
|
|
4468
|
-
"review",
|
|
4469
|
-
"test",
|
|
4470
|
-
"ship",
|
|
4471
|
-
"flywheel",
|
|
4472
|
-
"user"
|
|
4473
|
-
]);
|
|
4474
|
-
ArtifactAgentHarness = Schema.Literals([
|
|
4475
|
-
"claude-code",
|
|
4476
|
-
"pi",
|
|
4477
|
-
"ohmypi",
|
|
4478
|
-
"codex",
|
|
4479
|
-
"acp",
|
|
4480
|
-
"user"
|
|
4481
|
-
]);
|
|
4482
|
-
ArtifactLifecycleState = Schema.Literals([
|
|
4483
|
-
"published",
|
|
4484
|
-
"pending_changes",
|
|
4485
|
-
"unshared"
|
|
4486
|
-
]);
|
|
4487
|
-
ArtifactValidationCode = Schema.Literals([
|
|
4488
|
-
"invalid_file_type",
|
|
4489
|
-
"not_a_file",
|
|
4490
|
-
"size_limit_exceeded",
|
|
4491
|
-
"forbidden_asset_url",
|
|
4492
|
-
"secret_detected",
|
|
4493
|
-
"secret_allowed",
|
|
4494
|
-
"high_entropy_string",
|
|
4495
|
-
"inline_event_handler",
|
|
4496
|
-
"missing_image_alt"
|
|
4497
|
-
]);
|
|
4498
|
-
ArtifactValidationFinding = Schema.Struct({
|
|
4499
|
-
code: ArtifactValidationCode,
|
|
4500
|
-
message: Schema.String,
|
|
4501
|
-
line: Schema.optional(Schema.Number),
|
|
4502
|
-
column: Schema.optional(Schema.Number),
|
|
4503
|
-
rule: Schema.optional(Schema.String),
|
|
4504
|
-
strict: Schema.optional(Schema.Boolean)
|
|
4505
|
-
});
|
|
4506
|
-
ArtifactValidationResult = Schema.Struct({
|
|
4507
|
-
ok: Schema.Boolean,
|
|
4508
|
-
filePath: Schema.optional(Schema.String),
|
|
4509
|
-
size: Schema.Number,
|
|
4510
|
-
hash: ArtifactHash,
|
|
4511
|
-
strict: Schema.Boolean,
|
|
4512
|
-
errors: Schema.Array(ArtifactValidationFinding),
|
|
4513
|
-
warnings: Schema.Array(ArtifactValidationFinding)
|
|
4514
|
-
});
|
|
4515
|
-
ArtifactMetadata = Schema.Struct({
|
|
4516
|
-
artifactId: ArtifactId,
|
|
4517
|
-
slug: ArtifactSlug,
|
|
4518
|
-
issueId: Schema.optional(Schema.NullOr(Schema.String)),
|
|
4519
|
-
workspaceId: Schema.optional(Schema.NullOr(Schema.String)),
|
|
4520
|
-
agentRole: Schema.optional(Schema.NullOr(ArtifactAgentRole)),
|
|
4521
|
-
agentHarness: Schema.optional(Schema.NullOr(ArtifactAgentHarness)),
|
|
4522
|
-
runId: Schema.optional(Schema.NullOr(Schema.String)),
|
|
4523
|
-
sessionId: Schema.optional(Schema.NullOr(Schema.String)),
|
|
4524
|
-
filePath: Schema.String,
|
|
4525
|
-
currentHash: ArtifactHash,
|
|
4526
|
-
lastPublishedHash: Schema.optional(Schema.NullOr(ArtifactHash)),
|
|
4527
|
-
supersedes: Schema.optional(Schema.NullOr(ArtifactId)),
|
|
4528
|
-
title: Schema.optional(Schema.NullOr(Schema.String)),
|
|
4529
|
-
description: Schema.optional(Schema.NullOr(Schema.String)),
|
|
4530
|
-
createdAt: Schema.String,
|
|
4531
|
-
publishedAt: Schema.optional(Schema.NullOr(Schema.String)),
|
|
4532
|
-
unsharedAt: Schema.optional(Schema.NullOr(Schema.String))
|
|
4533
|
-
});
|
|
4534
|
-
ArtifactUrls = Schema.Struct({
|
|
4535
|
-
wrapperUrl: Schema.String,
|
|
4536
|
-
rawUrl: Schema.String
|
|
4537
|
-
});
|
|
4538
|
-
Schema.Struct({
|
|
4539
|
-
artifact: Schema.optional(ArtifactMetadata),
|
|
4540
|
-
filePath: Schema.String,
|
|
4541
|
-
currentHash: ArtifactHash,
|
|
4542
|
-
lastPublishedHash: Schema.optional(Schema.NullOr(ArtifactHash)),
|
|
4543
|
-
pendingChanges: Schema.Boolean,
|
|
4544
|
-
validation: Schema.optional(ArtifactValidationResult)
|
|
4545
|
-
});
|
|
4546
|
-
Schema.Struct({
|
|
4547
|
-
artifact: ArtifactMetadata,
|
|
4548
|
-
urls: ArtifactUrls,
|
|
4549
|
-
validation: ArtifactValidationResult,
|
|
4550
|
-
published: Schema.Boolean
|
|
4551
|
-
});
|
|
4552
|
-
Schema.Struct({
|
|
4553
|
-
artifact: ArtifactMetadata,
|
|
4554
|
-
urls: ArtifactUrls,
|
|
4555
|
-
validation: ArtifactValidationResult,
|
|
4556
|
-
published: Schema.Boolean,
|
|
4557
|
-
pendingChanges: Schema.Boolean
|
|
4558
|
-
});
|
|
4559
|
-
Schema.Struct({
|
|
4560
|
-
artifact: ArtifactMetadata,
|
|
4561
|
-
unshared: Schema.Boolean
|
|
4562
|
-
});
|
|
4563
|
-
ArtifactListEntry = Schema.Struct({
|
|
4564
|
-
artifact: ArtifactMetadata,
|
|
4565
|
-
urls: ArtifactUrls,
|
|
4566
|
-
status: ArtifactLifecycleState,
|
|
4567
|
-
pendingChanges: Schema.Boolean,
|
|
4568
|
-
thumbnailUrl: Schema.optional(Schema.String)
|
|
4569
|
-
});
|
|
4570
|
-
Schema.Struct({ artifacts: Schema.Array(ArtifactListEntry) });
|
|
4571
|
-
Schema.Struct({
|
|
4572
|
-
artifact: ArtifactMetadata,
|
|
4573
|
-
urls: ArtifactUrls,
|
|
4574
|
-
status: ArtifactLifecycleState,
|
|
4575
|
-
pendingChanges: Schema.Boolean
|
|
4576
|
-
});
|
|
4577
|
-
Schema.Struct({
|
|
4578
|
-
issueId: Schema.optional(Schema.String),
|
|
4579
|
-
workspaceId: Schema.optional(Schema.String),
|
|
4580
|
-
artifacts: Schema.Array(ArtifactListEntry)
|
|
4581
|
-
});
|
|
4582
|
-
})), FeatureRegistryStatus;
|
|
4583
|
-
var init_feature_registry = __esmMin((() => {
|
|
4584
|
-
FeatureRegistryStatus = Schema.Literals([
|
|
4585
|
-
"active",
|
|
4586
|
-
"archived",
|
|
4587
|
-
"merged",
|
|
4588
|
-
"deferred"
|
|
4589
|
-
]);
|
|
4590
|
-
Schema.Struct({
|
|
4591
|
-
featureId: Schema.String,
|
|
4592
|
-
featureName: Schema.String,
|
|
4593
|
-
description: Schema.NullOr(Schema.String),
|
|
4594
|
-
owningWorkspaceId: Schema.NullOr(Schema.String),
|
|
4595
|
-
owningIssueId: Schema.NullOr(Schema.String),
|
|
4596
|
-
owningAgentId: Schema.NullOr(Schema.String),
|
|
4597
|
-
status: FeatureRegistryStatus,
|
|
4598
|
-
createdAt: Schema.String,
|
|
4599
|
-
updatedAt: Schema.String,
|
|
4600
|
-
tags: Schema.Array(Schema.String)
|
|
4601
|
-
});
|
|
4602
|
-
}));
|
|
4603
|
-
//#endregion
|
|
4604
|
-
//#region ../../../packages/contracts/src/harness-behavior.ts
|
|
4605
|
-
function getHarnessBehavior(harness) {
|
|
4606
|
-
if (harness === "ohmypi" || harness === "pi") return OHMYPI_BEHAVIOR;
|
|
4607
|
-
if (harness === "codex") return CODEX_BEHAVIOR;
|
|
4608
|
-
if (harness === "acp") return ACP_BEHAVIOR;
|
|
4609
|
-
return CLAUDE_CODE_BEHAVIOR;
|
|
4610
|
-
}
|
|
4611
|
-
function getRuntimeBehavior(runtime) {
|
|
4612
|
-
return BEHAVIORS[runtime];
|
|
4613
|
-
}
|
|
4614
|
-
var CLAUDE_CODE_BEHAVIOR, OHMYPI_BEHAVIOR, CODEX_BEHAVIOR, ACP_BEHAVIOR, BEHAVIORS;
|
|
4615
|
-
var init_harness_behavior = __esmMin((() => {
|
|
4616
|
-
CLAUDE_CODE_BEHAVIOR = {
|
|
4617
|
-
displayName: "Claude Code",
|
|
4618
|
-
executableName: "claude",
|
|
4619
|
-
processNames: ["claude"],
|
|
4620
|
-
launchCommandKind: "claude-code",
|
|
4621
|
-
deliveryKind: "pty-supervisor",
|
|
4622
|
-
readinessKind: "claude-session-signal",
|
|
4623
|
-
transcriptKind: "claude-jsonl",
|
|
4624
|
-
sessionIdSource: "launcher-session-id",
|
|
4625
|
-
contextLayerKind: "claude",
|
|
4626
|
-
feedKind: "claude_code",
|
|
4627
|
-
supportsPtySupervisor: true,
|
|
4628
|
-
supportsChannelsBridge: true,
|
|
4629
|
-
supportsConversationStreaming: false,
|
|
4630
|
-
supportsPatchProjection: true,
|
|
4631
|
-
usesRpcFifo: false,
|
|
4632
|
-
usesCodexHome: false,
|
|
4633
|
-
injectsPromptTimeMemory: false,
|
|
4634
|
-
workAgentMode: "claude-code",
|
|
4635
|
-
readyTimeoutSeconds: 30
|
|
4636
|
-
};
|
|
4637
|
-
OHMYPI_BEHAVIOR = {
|
|
4638
|
-
displayName: "Pi",
|
|
4639
|
-
executableName: "omp",
|
|
4640
|
-
processNames: ["omp"],
|
|
4641
|
-
launchCommandKind: "ohmypi-rpc",
|
|
4642
|
-
deliveryKind: "rpc-fifo",
|
|
4643
|
-
readinessKind: "ohmypi-ready-file",
|
|
4644
|
-
transcriptKind: "ohmypi-jsonl",
|
|
4645
|
-
sessionIdSource: "transcript-jsonl",
|
|
4646
|
-
contextLayerKind: "pi",
|
|
4647
|
-
feedKind: "pi",
|
|
4648
|
-
supportsPtySupervisor: false,
|
|
4649
|
-
supportsChannelsBridge: false,
|
|
4650
|
-
supportsConversationStreaming: true,
|
|
4651
|
-
supportsPatchProjection: false,
|
|
4652
|
-
usesRpcFifo: true,
|
|
4653
|
-
usesCodexHome: false,
|
|
4654
|
-
injectsPromptTimeMemory: true,
|
|
4655
|
-
workAgentMode: "ohmypi-rpc",
|
|
4656
|
-
readyTimeoutSeconds: 120
|
|
4657
|
-
};
|
|
4658
|
-
CODEX_BEHAVIOR = {
|
|
4659
|
-
displayName: "Codex",
|
|
4660
|
-
executableName: "codex",
|
|
4661
|
-
processNames: ["codex"],
|
|
4662
|
-
launchCommandKind: "codex-work-tui",
|
|
4663
|
-
deliveryKind: "codex-exec-resume",
|
|
4664
|
-
readinessKind: "codex-tui-prompt",
|
|
4665
|
-
transcriptKind: "codex-rollout-jsonl",
|
|
4666
|
-
sessionIdSource: "codex-thread-id",
|
|
4667
|
-
contextLayerKind: "codex",
|
|
4668
|
-
feedKind: "codex",
|
|
4669
|
-
supportsPtySupervisor: true,
|
|
4670
|
-
supportsChannelsBridge: false,
|
|
4671
|
-
supportsConversationStreaming: true,
|
|
4672
|
-
supportsPatchProjection: true,
|
|
4673
|
-
usesRpcFifo: false,
|
|
4674
|
-
usesCodexHome: true,
|
|
4675
|
-
injectsPromptTimeMemory: false,
|
|
4676
|
-
workAgentMode: "codex-work-tui",
|
|
4677
|
-
readyTimeoutSeconds: 30
|
|
4678
|
-
};
|
|
4679
|
-
ACP_BEHAVIOR = {
|
|
4680
|
-
displayName: "ACP",
|
|
4681
|
-
executableName: "acp-host",
|
|
4682
|
-
processNames: ["acp-host", "kimi"],
|
|
4683
|
-
launchCommandKind: "acp-host",
|
|
4684
|
-
deliveryKind: "acp-host-rpc",
|
|
4685
|
-
readinessKind: "acp-host-ready",
|
|
4686
|
-
transcriptKind: "acp-jsonl",
|
|
4687
|
-
sessionIdSource: "acp-session-id",
|
|
4688
|
-
contextLayerKind: "acp",
|
|
4689
|
-
feedKind: "acp",
|
|
4690
|
-
supportsPtySupervisor: false,
|
|
4691
|
-
supportsChannelsBridge: false,
|
|
4692
|
-
supportsConversationStreaming: true,
|
|
4693
|
-
supportsPatchProjection: false,
|
|
4694
|
-
usesRpcFifo: false,
|
|
4695
|
-
usesCodexHome: false,
|
|
4696
|
-
injectsPromptTimeMemory: false,
|
|
4697
|
-
workAgentMode: "acp-host",
|
|
4698
|
-
readyTimeoutSeconds: 30
|
|
4699
|
-
};
|
|
4700
|
-
BEHAVIORS = {
|
|
4701
|
-
"claude-code": CLAUDE_CODE_BEHAVIOR,
|
|
4702
|
-
ohmypi: OHMYPI_BEHAVIOR,
|
|
4703
|
-
codex: CODEX_BEHAVIOR,
|
|
4704
|
-
acp: ACP_BEHAVIOR
|
|
4705
|
-
};
|
|
4706
|
-
})), HygieneFinding, HygienePullRequest;
|
|
4707
|
-
var init_hygiene = __esmMin((() => {
|
|
4708
|
-
HygieneFinding = Schema.Struct({
|
|
4709
|
-
id: Schema.String,
|
|
4710
|
-
summary: Schema.String,
|
|
4711
|
-
detail: Schema.optional(Schema.String),
|
|
4712
|
-
urgent: Schema.optional(Schema.Boolean)
|
|
4713
|
-
});
|
|
4714
|
-
HygienePullRequest = Schema.Struct({
|
|
4715
|
-
number: Schema.Number,
|
|
4716
|
-
branch: Schema.String,
|
|
4717
|
-
url: Schema.String,
|
|
4718
|
-
blocking: Schema.Literals([
|
|
4719
|
-
"review-pending",
|
|
4720
|
-
"test-pending",
|
|
4721
|
-
"failing-checks",
|
|
4722
|
-
"awaiting-UAT",
|
|
4723
|
-
"clean"
|
|
4724
|
-
])
|
|
4725
|
-
});
|
|
4726
|
-
Schema.Struct({
|
|
4727
|
-
generatedAt: Schema.String,
|
|
4728
|
-
root: Schema.String,
|
|
4729
|
-
needsAttention: Schema.Boolean,
|
|
4730
|
-
skipped: Schema.Array(Schema.String),
|
|
4731
|
-
push: Schema.Struct({
|
|
4732
|
-
ahead: Schema.Number,
|
|
4733
|
-
commits: Schema.Array(Schema.String)
|
|
4734
|
-
}),
|
|
4735
|
-
tree: Schema.Struct({
|
|
4736
|
-
files: Schema.Array(Schema.String),
|
|
4737
|
-
backups: Schema.Array(Schema.String)
|
|
4738
|
-
}),
|
|
4739
|
-
prs: Schema.Array(HygienePullRequest),
|
|
4740
|
-
agents: Schema.Struct({
|
|
4741
|
-
counts: Schema.Record(Schema.String, Schema.Number),
|
|
4742
|
-
problems: Schema.Array(HygieneFinding)
|
|
4743
|
-
}),
|
|
4744
|
-
sessions: Schema.Struct({
|
|
4745
|
-
total: Schema.Number,
|
|
4746
|
-
zombies: Schema.Array(Schema.String)
|
|
4747
|
-
}),
|
|
4748
|
-
branches: Schema.Struct({ stale: Schema.Array(Schema.String) }),
|
|
4749
|
-
workspaces: Schema.Struct({ stale: Schema.Array(Schema.String) }),
|
|
4750
|
-
disk: Schema.Struct({
|
|
4751
|
-
availableGb: Schema.Number,
|
|
4752
|
-
thresholdGb: Schema.Number,
|
|
4753
|
-
urgent: Schema.Boolean
|
|
4754
|
-
}),
|
|
4755
|
-
fixes: Schema.Struct({
|
|
4756
|
-
branchesDeleted: Schema.Array(Schema.String),
|
|
4757
|
-
workspacesRemoved: Schema.Array(Schema.Struct({
|
|
4758
|
-
path: Schema.String,
|
|
4759
|
-
freedBytes: Schema.Number
|
|
4760
|
-
})),
|
|
4761
|
-
errors: Schema.Array(Schema.String)
|
|
4762
|
-
})
|
|
4763
|
-
});
|
|
4764
|
-
}));
|
|
4765
|
-
//#endregion
|
|
4766
|
-
//#region ../../../packages/contracts/src/update.ts
|
|
4767
|
-
var init_update = __esmMin((() => {}));
|
|
4768
|
-
var init_deploy = __esmMin((() => {
|
|
4769
|
-
Schema.Struct({
|
|
4770
|
-
status: Schema.Literals([
|
|
4771
|
-
"fresh",
|
|
4772
|
-
"stale",
|
|
4773
|
-
"unknown"
|
|
4774
|
-
]),
|
|
4775
|
-
buildCommit: Schema.NullOr(Schema.String),
|
|
4776
|
-
originMainSha: Schema.NullOr(Schema.String),
|
|
4777
|
-
behindTotal: Schema.NullOr(Schema.Number),
|
|
4778
|
-
behindBuildInputs: Schema.NullOr(Schema.Number),
|
|
4779
|
-
originMainLastCommitAt: Schema.NullOr(Schema.Number),
|
|
4780
|
-
originMainLastBuildInputCommitAt: Schema.NullOr(Schema.Number),
|
|
4781
|
-
computedAt: Schema.Number,
|
|
4782
|
-
reason: Schema.optional(Schema.String)
|
|
4783
|
-
});
|
|
4784
|
-
}));
|
|
4785
|
-
//#endregion
|
|
4786
|
-
//#region ../../../packages/contracts/src/issue-sort.ts
|
|
4787
|
-
/**
|
|
4788
|
-
* Compares issue identifiers numerically within their prefix, so PAN-532 sorts
|
|
4789
|
-
* before PAN-2822. Every issue-id sort should use this comparator (PAN-2831).
|
|
4790
|
-
*/
|
|
4791
|
-
function compareIssueIds(a, b) {
|
|
4792
|
-
return collator.compare(a, b);
|
|
4793
|
-
}
|
|
4794
|
-
var collator;
|
|
4795
|
-
var init_issue_sort = __esmMin((() => {
|
|
4796
|
-
collator = new Intl.Collator("en", {
|
|
4797
|
-
numeric: true,
|
|
4798
|
-
sensitivity: "base"
|
|
4799
|
-
});
|
|
4800
|
-
}));
|
|
4801
|
-
//#endregion
|
|
4802
|
-
//#region ../../../packages/contracts/src/index.ts
|
|
4803
|
-
var init_src = __esmMin((() => {
|
|
4804
|
-
init_types();
|
|
4805
|
-
init_events();
|
|
4806
|
-
init_memory();
|
|
4807
|
-
init_rpc();
|
|
4808
|
-
init_event_reducers();
|
|
4809
|
-
init_editor();
|
|
4810
|
-
init_flywheel();
|
|
4811
|
-
init_flywheel_stats();
|
|
4812
|
-
init_orders();
|
|
4813
|
-
init_context_layers();
|
|
4814
|
-
init_artifacts();
|
|
4815
|
-
init_feature_registry();
|
|
4816
|
-
init_harness_behavior();
|
|
4817
|
-
init_hygiene();
|
|
4818
|
-
init_update();
|
|
4819
|
-
init_system_health();
|
|
4820
|
-
init_deploy();
|
|
4821
|
-
init_issue_sort();
|
|
4822
|
-
}));
|
|
4823
|
-
//#endregion
|
|
4824
|
-
export { AgentSnapshot as A, EDITORS as C, MemoryObservation as D, projectLegacySystemHealthSummary as E, normalizeChannelReplyPayload as M, MemoryStatus as O, FlywheelStatus as S, SystemHealthSnapshot as T, trimTurnDiffSummaries as _, OHMYPI_BEHAVIOR as a, WS_METHODS as b, ContextLayerSaveRequest as c, OrderBookIndexEntry as d, FlywheelStats as f, isTerminalTurnDiffSummaryStatus as g, getMaxTurnDiffSummariesPerAgent as h, CODEX_BEHAVIOR as i, ReviewStatusSnapshot as j, AgentRuntimeSnapshot as k, ContextPreviewRequest as l, applyEvent as m, compareIssueIds as n, getHarnessBehavior as o, INITIAL_READ_MODEL_STATE as p, CLAUDE_CODE_BEHAVIOR as r, getRuntimeBehavior as s, init_src as t, OrderBook as u, PanRpcError as v, DomainEvent as w, FlywheelRunId as x, PanRpcGroup as y };
|
|
4825
|
-
|
|
4826
|
-
//# sourceMappingURL=src-DtcUOZCq.js.map
|