very-happy-cli 0.2.197 → 0.2.198
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcpBackend-B-CD1MrV.mjs → AcpBackend-Bm3EodAb.mjs} +3 -3
- package/dist/{AcpBackend-CqDg1GgF.cjs → AcpBackend-DOuWeCAx.cjs} +3 -3
- package/dist/{AcpSessionManager-CgomFAjk.mjs → AcpSessionManager-BiwuXpbx.mjs} +2 -2
- package/dist/{AcpSessionManager-Cv1KTldV.cjs → AcpSessionManager-DvsZWTXp.cjs} +2 -2
- package/dist/{BasePermissionHandler-D6-fZvtx.mjs → BasePermissionHandler-1QcavYFn.mjs} +1 -1
- package/dist/{BasePermissionHandler-BxUjjHiI.cjs → BasePermissionHandler-25RmI4dK.cjs} +1 -1
- package/dist/{account-Bexqa-vj.cjs → account-ChUtFYld.cjs} +11 -11
- package/dist/{account-CnN-iHFd.mjs → account-DA4mbX3-.mjs} +11 -11
- package/dist/{accountService-DL6xhVUa.cjs → accountService-BWUjgHl0.cjs} +4 -4
- package/dist/{accountService-DQ21IlBs.mjs → accountService-D7NZrnQd.mjs} +4 -4
- package/dist/{acpSessionResume-CfEw8L26.cjs → acpSessionResume-CeQu84Ol.cjs} +1 -1
- package/dist/{acpSessionResume-DzFELzTU.mjs → acpSessionResume-D6YgeofW.mjs} +1 -1
- package/dist/{agentHome-CmSA7hBC.mjs → agentHome-DM6mC64c.mjs} +4 -4
- package/dist/{agentHome-CBYL4J4Q.cjs → agentHome-DevJCRG9.cjs} +4 -4
- package/dist/{api-Do7MUIrP.mjs → api-oceym3w6.mjs} +14 -12
- package/dist/{api-CB3tLbbj.cjs → api-te19Pzi3.cjs} +30 -28
- package/dist/{apiMachine-guUGAifI.cjs → apiMachine-BjhCXg6C.cjs} +34 -32
- package/dist/{apiMachine-CytFlPdl.mjs → apiMachine-DCHsqtFQ.mjs} +22 -20
- package/dist/{attachmentContent-errR84kh.cjs → attachmentContent-BfCEgPTP.cjs} +2 -2
- package/dist/{attachmentContent-B8Lg7kgp.mjs → attachmentContent-Dl29U1v1.mjs} +2 -2
- package/dist/{auth-Dnu0Mocz.mjs → auth-BIkCWkRV.mjs} +5 -5
- package/dist/{auth-B-1T6w1U.mjs → auth-BJ8Tej9L.mjs} +8 -8
- package/dist/{auth-ZKJNs8AK.cjs → auth-SH0o7ue7.cjs} +5 -5
- package/dist/{auth-BhM0lHLA.cjs → auth-SshU0tNW.cjs} +8 -8
- package/dist/{auto-CFSmWudH.mjs → auto-Bdr4sSJk.mjs} +17 -17
- package/dist/{auto-eimPZ4gm.cjs → auto-t1B1Yzb3.cjs} +17 -17
- package/dist/{bootstrap-C2JyiPax.mjs → bootstrap-D8DYLUId.mjs} +2 -2
- package/dist/{bootstrap-B7mwfud6.cjs → bootstrap-GZDknvPy.cjs} +2 -2
- package/dist/{browser-Cnk2N81e.mjs → browser-C-H3QYV2.mjs} +1 -1
- package/dist/{browser-B3VVAWcC.cjs → browser-DwCi-9Ya.cjs} +1 -1
- package/dist/{claudeAccountEnv-_O3x5AJ1.cjs → claudeAccountEnv-DSaFKajJ.cjs} +1 -1
- package/dist/{claudeAccountEnv-CPO6CGNd.mjs → claudeAccountEnv-DmVbGhZb.mjs} +1 -1
- package/dist/{claudeLocal-gDpGeteK.mjs → claudeLocal-BiM2x9DJ.mjs} +5 -5
- package/dist/{claudeLocal-CvZ5Sfq_.cjs → claudeLocal-Ck1jTve1.cjs} +5 -5
- package/dist/{claudeLocalLauncher-e_DkguJW.mjs → claudeLocalLauncher-DzvM0jBo.mjs} +10 -10
- package/dist/{claudeLocalLauncher-CFSxFln_.cjs → claudeLocalLauncher-Jsupvl4V.cjs} +10 -10
- package/dist/{claudeSessionFork--_RtwhC2.cjs → claudeSessionFork-CDTbQmYi.cjs} +1 -1
- package/dist/{claudeSessionFork-BMMJmfxX.mjs → claudeSessionFork-D-BhXkRa.mjs} +1 -1
- package/dist/{client-CkiWUkm6.mjs → client-BRuFIwki.mjs} +2 -2
- package/dist/{client-BeEAF2yn.mjs → client-CISkP897.mjs} +2 -2
- package/dist/{client-DmO89_dS.cjs → client-D-HEr922.cjs} +2 -2
- package/dist/{client-Bav5WI8p.mjs → client-E4kW5qjR.mjs} +4 -4
- package/dist/{client-DH_mgm2T.cjs → client-oqSAKwmy.cjs} +2 -2
- package/dist/{client-TZ1BY7kn.cjs → client-v6rdLsBH.cjs} +4 -4
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAccount-CYhQir50.cjs → codexAccount-CQ4W1Ax8.cjs} +1 -1
- package/dist/{codexAccount-iZwmpYti.mjs → codexAccount-CnbDfCOM.mjs} +1 -1
- package/dist/{codexAppServerClient-C4FYS9D9.cjs → codexAppServerClient--K-ILfqM.cjs} +3 -3
- package/dist/{codexAppServerClient-AcMiUjlK.mjs → codexAppServerClient-BLasFGTm.mjs} +3 -3
- package/dist/{codexCommand-BkF16_aL.cjs → codexCommand-M1uNblJx.cjs} +46 -46
- package/dist/{codexCommand-CuteJvKE.mjs → codexCommand-Wv1WVNtM.mjs} +46 -46
- package/dist/{codexTermination-DGgKsMxj.cjs → codexTermination-BumRIUqm.cjs} +1 -1
- package/dist/{codexTermination-CjHWp1C_.mjs → codexTermination-DigTBSJE.mjs} +1 -1
- package/dist/{config-CUvb7oaW.mjs → config-Br2fCFwB.mjs} +3 -3
- package/dist/{config-BklFo_Cs.cjs → config-Czs0Tucv.cjs} +3 -3
- package/dist/{configuration-BL_fxboH.cjs → configuration-DfRs3WLd.cjs} +1 -1
- package/dist/{configuration-BIh6P6kB.mjs → configuration-JBFF7432.mjs} +1 -1
- package/dist/{connect-KIJsx0iT.mjs → connect-CbCqv-MV.mjs} +13 -13
- package/dist/{connect-Bi7cRXtj.cjs → connect-Cr--b0yl.cjs} +13 -13
- package/dist/{context-BYcZIvKn.cjs → context-C5WWlHOl.cjs} +1 -1
- package/dist/{context-Ct__7RAS.mjs → context-DLIjT5qU.mjs} +1 -1
- package/dist/{controlClient-DMtkGpc3.cjs → controlClient-B61crTpk.cjs} +3 -3
- package/dist/{controlClient-CPZkMKsH.mjs → controlClient-D5BYm3PU.mjs} +3 -3
- package/dist/{createSessionMetadata-BWr0XT-Y.cjs → createSessionMetadata-BwYysMTH.cjs} +2 -2
- package/dist/{createSessionMetadata-DkkddlJa.mjs → createSessionMetadata-OMKj3e48.mjs} +2 -2
- package/dist/{daemonAccounts-CxMJw7x2.cjs → daemonAccounts-CqAnPXDJ.cjs} +2 -2
- package/dist/{daemonAccounts-CnAEaJE_.mjs → daemonAccounts-asWvoPKG.mjs} +3 -3
- package/dist/{defaultPermissionMode-CpEJ0wlb.mjs → defaultPermissionMode-4KYZA4WF.mjs} +1 -1
- package/dist/{defaultPermissionMode-BCWCMONI.cjs → defaultPermissionMode-BItpIZML.cjs} +1 -1
- package/dist/{deterministicJson-BO6ZUUiV.cjs → deterministicJson-DIzyb1dQ.cjs} +13 -13
- package/dist/{deterministicJson-Dm3yDrwj.mjs → deterministicJson-DnTSkEgb.mjs} +13 -13
- package/dist/{doctor-DHK-5Hxm.cjs → doctor-Dn1G6QhF.cjs} +7 -7
- package/dist/{doctor-TK49jR60.mjs → doctor-jrvm-tl3.mjs} +7 -7
- package/dist/{downloadTarget-C2XcfMXb.mjs → downloadTarget-BtsN_-LN.mjs} +6 -6
- package/dist/{downloadTarget-QP5nnKsW.cjs → downloadTarget-DGnCGrDZ.cjs} +6 -6
- package/dist/{ensureDaemonRunning-Bi-PF5LL.mjs → ensureDaemonRunning-DCmXUwNi.mjs} +5 -5
- package/dist/{ensureDaemonRunning-pg-EYmG0.cjs → ensureDaemonRunning-DsvcjXb4.cjs} +5 -5
- package/dist/{handleResumeCommand-B69L6W80.mjs → handleResumeCommand-CFupxyHT.mjs} +5 -5
- package/dist/{handleResumeCommand-CMLpVjkl.cjs → handleResumeCommand-hzho-lp7.cjs} +5 -5
- package/dist/{index-DC_XlLAD.cjs → index-5TDKOvkU.cjs} +4 -4
- package/dist/{index-BM14YD9K.mjs → index-BMFLwBCd.mjs} +4 -4
- package/dist/{index-D9Hidq-g.cjs → index-BknTkVnR.cjs} +256 -89
- package/dist/{index-CwwDV02T.mjs → index-CHk8F9OY.mjs} +43 -43
- package/dist/{index-sXThJ-ic.cjs → index-CRI-_-YH.cjs} +42 -42
- package/dist/{index-P6modcWo.mjs → index-CZpFhEmE.mjs} +3 -3
- package/dist/{index-BSSAKD4Q.mjs → index-CofTgtQ3.mjs} +4 -4
- package/dist/{index-C27JFCbe.mjs → index-CxiisoO1.mjs} +256 -89
- package/dist/{index-XeWmi_Wt.cjs → index-DCfEzudP.cjs} +4 -4
- package/dist/{index-DgnbOqH_.cjs → index-EGwuuFdL.cjs} +3 -3
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-Cyb1ZsOO.cjs → install-CB5eTmzm.cjs} +3 -3
- package/dist/{install-B6vD9h4Z.mjs → install-CeDqNGxI.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.mjs +12 -12
- package/dist/{localHappyAgentAuth-Dxl6itKW.cjs → localHappyAgentAuth-B6xdH-Fr.cjs} +1 -1
- package/dist/{localHappyAgentAuth-BupJnMMB.mjs → localHappyAgentAuth-BiIyMoiG.mjs} +1 -1
- package/dist/{logger-CahcyjlK.mjs → logger-BHfBDOsy.mjs} +2 -2
- package/dist/{logger-CtweAuKq.cjs → logger-BrAF4iuT.cjs} +2 -2
- package/dist/{machineMetadata-thOCcaSv.cjs → machineMetadata-D5PO2ylb.cjs} +3 -3
- package/dist/{machineMetadata-jOqz4fn8.mjs → machineMetadata-Ekniv5o4.mjs} +3 -3
- package/dist/{main-CTIbEEsd.cjs → main-C8lsRSYS.cjs} +47 -47
- package/dist/{main-bCGlXj7y.mjs → main-HXdcnexS.mjs} +47 -47
- package/dist/{mcp-dtmpWc-Y.mjs → mcp-C2YD6mq4.mjs} +18 -18
- package/dist/{mcp-BOS5msHd.cjs → mcp-D9sglL02.cjs} +18 -18
- package/dist/{mirrorProtocol-OJPFNpbq.mjs → mirrorProtocol-BLhArCS9.mjs} +3 -3
- package/dist/{mirrorProtocol-CFDn3zfT.cjs → mirrorProtocol-CNF1eHsm.cjs} +3 -3
- package/dist/{package-DUKnh8UF.mjs → package-BGZo2vAj.mjs} +7 -7
- package/dist/{package-DdYN77UN.cjs → package-CStJrLG3.cjs} +7 -7
- package/dist/{panels-DZZTavkP.cjs → panels-D4_yGw4n.cjs} +5 -5
- package/dist/{panels-DQs5x77X.mjs → panels-GVnnEsow.mjs} +5 -5
- package/dist/{peerTools-ByJiL-w1.mjs → peerTools-BO-H0wNj.mjs} +5 -5
- package/dist/{peerTools-03MimWe-.cjs → peerTools-Drow2-P4.cjs} +5 -5
- package/dist/{persistence-CWEaFv6R.cjs → persistence-DGfEdbA5.cjs} +2 -2
- package/dist/{persistence-CPIj3Iha.mjs → persistence-DvD-irLh.mjs} +2 -2
- package/dist/{piRunnerArgs-Aqs-zKLm.cjs → piRunnerArgs-C1dLsoXF.cjs} +1 -1
- package/dist/{piRunnerArgs-DxbuKnFC.mjs → piRunnerArgs-DwcAwwzm.mjs} +1 -1
- package/dist/{piRuntime-KJn9G3Ax.mjs → piRuntime-_yRSPgnR.mjs} +1 -1
- package/dist/{piRuntime-BFMV2Hlg.cjs → piRuntime-d2h0Cska.cjs} +1 -1
- package/dist/{piTerminal-DFzQb38E.cjs → piTerminal-CVB4fa5R.cjs} +20 -20
- package/dist/{piTerminal-DhVFk2Hc.mjs → piTerminal-WN0AMv9u.mjs} +20 -20
- package/dist/{pushNotifications-BhnrQa32.cjs → pushNotifications-3YsyCEfY.cjs} +3 -3
- package/dist/{pushNotifications-CD5-W90c.mjs → pushNotifications-D2UZnoTB.mjs} +3 -3
- package/dist/{query-BRvDJTUF.cjs → query-Ba7UXc_y.cjs} +1 -1
- package/dist/{query-BRTHwQ1m.mjs → query-_sw0hG6A.mjs} +1 -1
- package/dist/{rateLimitWindows-_KfSDJdB.cjs → rateLimitWindows-DiiGHS9r.cjs} +1 -1
- package/dist/{rateLimitWindows-BAfkXSck.mjs → rateLimitWindows-DzXv6p_W.mjs} +1 -1
- package/dist/{lidState-DXy1ymL0.cjs → reconnectGate-BpePVLPu.cjs} +27 -2
- package/dist/{lidState-nbXgabCS.mjs → reconnectGate-CxLgZCBh.mjs} +27 -3
- package/dist/{registerCommonHandlers-CsMpXP1_.cjs → registerCommonHandlers-6iKpECuR.cjs} +2 -2
- package/dist/{registerCommonHandlers-Anq6Ma1d.mjs → registerCommonHandlers-ChdVwZW6.mjs} +2 -2
- package/dist/{registerKillSessionHandler-DnES0UnY.cjs → registerKillSessionHandler-BDTgrstx.cjs} +6 -6
- package/dist/{registerKillSessionHandler-DvA-f_D4.mjs → registerKillSessionHandler-D6wYbAIt.mjs} +6 -6
- package/dist/{registerSideQuestionHandler-B6EgCzBZ.mjs → registerSideQuestionHandler-C3K_qKwA.mjs} +4 -4
- package/dist/{registerSideQuestionHandler-GIzcFczo.cjs → registerSideQuestionHandler-U4LGga_Z.cjs} +4 -4
- package/dist/{remoteSessionClient-DYTwJSZR.mjs → remoteSessionClient-CFNM8UEh.mjs} +5 -5
- package/dist/{remoteSessionClient-BsXgrMSP.cjs → remoteSessionClient-DSC5Cj21.cjs} +5 -5
- package/dist/{reportProgressTool-DzmnFItq.mjs → reportProgressTool-CFmDK8ag.mjs} +3 -3
- package/dist/{reportProgressTool-DhTM7qvk.cjs → reportProgressTool-Cr25LWeW.cjs} +3 -3
- package/dist/{run-D0nDSvGo.cjs → run-Be0yicft.cjs} +40 -40
- package/dist/{run-Cuz34V0P.mjs → run-D0D73Dam.mjs} +40 -40
- package/dist/{runClaude-ySgHmPJg.mjs → runClaude-1NP467UM.mjs} +25 -25
- package/dist/{runClaude-DHHDBtKG.cjs → runClaude-BOxvKK4H.cjs} +25 -25
- package/dist/{runClaudeDeps-k-QAN7Em.mjs → runClaudeDeps-BPzLoWyT.mjs} +46 -46
- package/dist/{runClaudeDeps-Cfeci4al.cjs → runClaudeDeps-CkRlQx2Y.cjs} +40 -40
- package/dist/{runGemini-Dob7MFa2.cjs → runGemini-BowXJRXb.cjs} +33 -33
- package/dist/{runGemini-BpiHwTGj.mjs → runGemini-j2n5ZlOL.mjs} +33 -33
- package/dist/{runOpenClaw-B_7LblMr.mjs → runOpenClaw-6zrT8dPO.mjs} +18 -18
- package/dist/{runOpenClaw-B-BGCcbD.cjs → runOpenClaw-DLsnZnFM.cjs} +18 -18
- package/dist/{sandbox-D4UmUYIM.mjs → sandbox-BFbT6HDl.mjs} +4 -4
- package/dist/{sandbox-D9xs3oeT.cjs → sandbox-DLijcRKk.cjs} +4 -4
- package/dist/selfCheck-DCIqaiMu.mjs +88 -0
- package/dist/{selfCheck-B1ueapb2.cjs → selfCheck-U-A1DCi9.cjs} +39 -39
- package/dist/{send-CgIeqwqq.cjs → send-CGxo_QUR.cjs} +8 -8
- package/dist/{send-BZoS0m6-.mjs → send-CQGKb3Kb.mjs} +8 -8
- package/dist/{server-XgEG5D8c.cjs → server-CWbcDBjV.cjs} +6 -6
- package/dist/{server-C5zdUyIu.mjs → server-DR5bQzTq.mjs} +4 -4
- package/dist/{sessionLock-CbIB9WAp.cjs → sessionLock-CJiayMcZ.cjs} +3 -3
- package/dist/{sessionLock-C4zRSYwt.mjs → sessionLock-DqFKSW8u.mjs} +3 -3
- package/dist/{sessionOps-flaRRzdo.cjs → sessionOps-Cw_JivR2.cjs} +4 -4
- package/dist/{sessionOps-fuLJNyOT.mjs → sessionOps-D-SDNs-D.mjs} +4 -4
- package/dist/{sessionProvider-DPwRzcbT.mjs → sessionProvider-Cb-LtbFQ.mjs} +10 -10
- package/dist/{sessionProvider-DlWrak_l.cjs → sessionProvider-JEAWxBF6.cjs} +10 -10
- package/dist/{sessionScanner-BX7ZBVzX.mjs → sessionScanner-C2M697xz.mjs} +3 -3
- package/dist/{sessionScanner-I6fGycPd.cjs → sessionScanner-zJrc_Oe0.cjs} +3 -3
- package/dist/{sessions-Csz0_dnz.mjs → sessions-CIxnjpCM.mjs} +10 -10
- package/dist/{sessions-Cr0jIQ9r.cjs → sessions-D2yLkE5R.cjs} +10 -10
- package/dist/{setupOfflineReconnection-Pxsr7M_B.mjs → setupOfflineReconnection-DzV1wB4y.mjs} +2 -2
- package/dist/{setupOfflineReconnection-BawiOCUA.cjs → setupOfflineReconnection-Uu3tqISz.cjs} +2 -2
- package/dist/{spawn-C3wiREei.mjs → spawn-CeeM-Piz.mjs} +14 -14
- package/dist/{spawn-Bfw10V7R.cjs → spawn-DD1Sv8Ri.cjs} +14 -14
- package/dist/{spawnAgents-Cm23BW-D.cjs → spawnAgents-CrHgpAzU.cjs} +1 -1
- package/dist/{spawnAgents-N3jxdNJC.mjs → spawnAgents-DEBfpoPZ.mjs} +1 -1
- package/dist/{spawnHappyCLI-C9dzdAh0.mjs → spawnHappyCLI-CUfe8n_m.mjs} +1 -1
- package/dist/{spawnHappyCLI-D4_Ij_BB.cjs → spawnHappyCLI-CYzlz9Sl.cjs} +1 -1
- package/dist/{startFileWatcher-905w_JCn.cjs → startFileWatcher-C0u3J6Bj.cjs} +1 -1
- package/dist/{startFileWatcher-FjvRihwq.mjs → startFileWatcher-JdO3v65I.mjs} +1 -1
- package/dist/{startupSessionCreate-B-QHA-nQ.mjs → startupSessionCreate-CfBajt2k.mjs} +3 -3
- package/dist/{startupSessionCreate-WY7c74aG.cjs → startupSessionCreate-s1ekIs2Z.cjs} +3 -3
- package/dist/{store-BlPvTr_Q.mjs → store-DEhdblkI.mjs} +1 -1
- package/dist/{store-aa3CVNwS.cjs → store-QBBJB5Ox.cjs} +1 -1
- package/dist/{streamRelay-C2Lb2z39.cjs → streamRelay-BVrCYh2G.cjs} +1 -1
- package/dist/{streamRelay-DFZyAPD_.mjs → streamRelay-DymKR1Rk.mjs} +1 -1
- package/dist/{sync-CHU9HM9N.mjs → sync-BLGrIKN9.mjs} +1 -1
- package/dist/{sync-Dz_U1UHu.cjs → sync-BO4DRSub.cjs} +1 -1
- package/dist/{systemPrompt-NTIxM2Ss.cjs → systemPrompt-DTUJZOn6.cjs} +2 -2
- package/dist/{systemPrompt-PHD2Va2G.mjs → systemPrompt-YylizkJs.mjs} +2 -2
- package/dist/{teams-CqoSWbrQ.cjs → teams-DnLPBPKx.cjs} +7 -7
- package/dist/{teams-CgT1c65s.mjs → teams-zkGFcwsG.mjs} +7 -7
- package/dist/{template-CJ8uLlD8.mjs → template-BGlDAjbM.mjs} +1 -1
- package/dist/{template-B1AORlgU.cjs → template-uSKZ53Sv.cjs} +1 -1
- package/dist/{time-BTXLicT9.cjs → time-Cv4hbCLT.cjs} +1 -1
- package/dist/{time-DZ7wPlsL.mjs → time-DZE0879N.mjs} +1 -1
- package/dist/{titleGenerator-BOcHO0fW.mjs → titleGenerator-B2BbmJuc.mjs} +2 -2
- package/dist/{titleGenerator-DxSLdXjL.cjs → titleGenerator-D2ehxbvK.cjs} +3 -3
- package/dist/{todo-CqD6H2Bt.cjs → todo-9kn_9N-H.cjs} +6 -6
- package/dist/{todo-kBweG4H9.mjs → todo-DUpW9d8p.mjs} +6 -6
- package/dist/{tools-DuXYIUTD.mjs → tools-gIDXwAzk.mjs} +1 -1
- package/dist/{tools-C7SRJVwy.cjs → tools-rMr-wPIc.cjs} +1 -1
- package/dist/{uninstall-WJYYM27v.mjs → uninstall-CBlRzvNa.mjs} +3 -3
- package/dist/{uninstall-DHdOrwHT.cjs → uninstall-CHx5TOHi.cjs} +3 -3
- package/dist/{wrapperAccount-RPtq8BwD.mjs → wrapperAccount-Ce78kKMo.mjs} +2 -2
- package/dist/{wrapperAccount-BubTurHU.cjs → wrapperAccount-EkmR4V-v.cjs} +2 -2
- package/package.json +7 -7
- package/dist/selfCheck-BrC9vuGH.mjs +0 -88
|
@@ -636,7 +636,7 @@ function agentProfileUnavailableReason(error) {
|
|
|
636
636
|
return m ? m[1] : null;
|
|
637
637
|
}
|
|
638
638
|
const TeamPermissionModeSchema = z.z.enum(["default", "bypassPermissions"]);
|
|
639
|
-
const id$
|
|
639
|
+
const id$4 = z.z.string().min(1).max(128);
|
|
640
640
|
const text$1 = z.z.string().min(1).max(32e3);
|
|
641
641
|
const TeamAssistantSchema = z.z.enum(["claude", "codex", "pi-acp"]);
|
|
642
642
|
const TeamModelSchema = z.z.string().trim().min(1).max(256);
|
|
@@ -648,50 +648,50 @@ const TeamActionSchema = z.z.discriminatedUnion("type", [
|
|
|
648
648
|
z.z.object({ type: z.z.literal("set-defaults"), defaults: TeamDefaultsSchema }),
|
|
649
649
|
z.z.object({ type: z.z.literal("set-permission-mode"), permissionMode: TeamPermissionModeSchema }),
|
|
650
650
|
/** B-850d: a member's account for its next spawn (absent = follow the team default). An old server answers invalid action. */
|
|
651
|
-
z.z.object({ type: z.z.literal("set-bot-account"), botId: id$
|
|
652
|
-
z.z.object({ type: z.z.literal("schedule-create"), name: id$
|
|
653
|
-
z.z.object({ type: z.z.literal("schedule-pause"), scheduleId: id$
|
|
654
|
-
z.z.object({ type: z.z.literal("schedule-resume"), scheduleId: id$
|
|
655
|
-
z.z.object({ type: z.z.literal("schedule-cancel"), scheduleId: id$
|
|
656
|
-
z.z.object({ type: z.z.literal("reconcile-operation"), operationId: id$
|
|
651
|
+
z.z.object({ type: z.z.literal("set-bot-account"), botId: id$4, agentProfile: AgentProfileChoiceSchema.optional() }),
|
|
652
|
+
z.z.object({ type: z.z.literal("schedule-create"), name: id$4, botId: id$4, body: text$1, runAt: z.z.number().int().positive().max(864e13), intervalMs: z.z.number().int().min(6e4).max(366 * 864e5).optional() }),
|
|
653
|
+
z.z.object({ type: z.z.literal("schedule-pause"), scheduleId: id$4, version: z.z.number().int().positive() }),
|
|
654
|
+
z.z.object({ type: z.z.literal("schedule-resume"), scheduleId: id$4, version: z.z.number().int().positive() }),
|
|
655
|
+
z.z.object({ type: z.z.literal("schedule-cancel"), scheduleId: id$4, version: z.z.number().int().positive() }),
|
|
656
|
+
z.z.object({ type: z.z.literal("reconcile-operation"), operationId: id$4, claimId: id$4, note: z.z.string().trim().min(1).max(4e3) }),
|
|
657
657
|
// B-689: owner asks the execution computer to run a failed/uncertain operation again.
|
|
658
|
-
z.z.object({ type: z.z.literal("retry-operation"), operationId: id$
|
|
658
|
+
z.z.object({ type: z.z.literal("retry-operation"), operationId: id$4, claimId: id$4 }),
|
|
659
659
|
/** B-730: `transfer` = the owner confirmed moving a session that is bound in another live team (Web adopt); without it the server answers `session_in_other_team`. An old server strips it. */
|
|
660
|
-
z.z.object({ type: z.z.literal("join"), name: id$
|
|
661
|
-
z.z.object({ type: z.z.literal("delegate"), goal: text$1, acceptance: z.z.array(text$1).min(1).max(32), parentTaskId: id$
|
|
662
|
-
z.z.object({ type: z.z.literal("message"), taskId: id$
|
|
663
|
-
z.z.object({ type: z.z.literal("submit"), taskId: id$
|
|
664
|
-
z.z.object({ type: z.z.literal("accept"), taskId: id$
|
|
665
|
-
z.z.object({ type: z.z.literal("return"), taskId: id$
|
|
666
|
-
z.z.object({ type: z.z.literal("cancel"), taskId: id$
|
|
667
|
-
z.z.object({ type: z.z.literal("handoff"), taskId: id$
|
|
668
|
-
z.z.object({ type: z.z.literal("claim-operation"), operationId: id$
|
|
669
|
-
z.z.object({ type: z.z.literal("complete-operation"), operationId: id$
|
|
660
|
+
z.z.object({ type: z.z.literal("join"), name: id$4, sessionId: id$4, botId: id$4.optional(), transfer: z.z.literal(true).optional() }),
|
|
661
|
+
z.z.object({ type: z.z.literal("delegate"), goal: text$1, acceptance: z.z.array(text$1).min(1).max(32), parentTaskId: id$4.optional(), assigneeBotId: id$4.optional(), botName: id$4.optional(), directory: z.z.string().min(1).max(4096).optional(), assistant: TeamAssistantSchema.optional(), model: TeamModelSchema.optional(), agentProfile: AgentProfileChoiceSchema.optional() }),
|
|
662
|
+
z.z.object({ type: z.z.literal("message"), taskId: id$4, body: text$1, recipientBotId: id$4.optional() }),
|
|
663
|
+
z.z.object({ type: z.z.literal("submit"), taskId: id$4, attemptId: id$4, goalVersion: z.z.number().int().positive(), result: text$1 }),
|
|
664
|
+
z.z.object({ type: z.z.literal("accept"), taskId: id$4, attemptId: id$4, goalVersion: z.z.number().int().positive() }),
|
|
665
|
+
z.z.object({ type: z.z.literal("return"), taskId: id$4, attemptId: id$4, goalVersion: z.z.number().int().positive(), reason: text$1 }),
|
|
666
|
+
z.z.object({ type: z.z.literal("cancel"), taskId: id$4, attemptId: id$4, goalVersion: z.z.number().int().positive(), reason: text$1 }),
|
|
667
|
+
z.z.object({ type: z.z.literal("handoff"), taskId: id$4, attemptId: id$4, goalVersion: z.z.number().int().positive(), assigneeBotId: id$4 }),
|
|
668
|
+
z.z.object({ type: z.z.literal("claim-operation"), operationId: id$4, machineId: id$4, teamLaunchVersion: z.z.literal(1).optional() }),
|
|
669
|
+
z.z.object({ type: z.z.literal("complete-operation"), operationId: id$4, machineId: id$4, claimId: id$4, sessionId: id$4.optional(), workingDirectory: z.z.string().min(1).max(4096).optional() }),
|
|
670
670
|
z.z.object({
|
|
671
671
|
type: z.z.literal("fail-operation"),
|
|
672
|
-
operationId: id$
|
|
673
|
-
machineId: id$
|
|
674
|
-
claimId: id$
|
|
672
|
+
operationId: id$4,
|
|
673
|
+
machineId: id$4,
|
|
674
|
+
claimId: id$4,
|
|
675
675
|
error: text$1,
|
|
676
676
|
unknown: z.z.boolean().optional(),
|
|
677
677
|
/** B-775: a failed cleanup whose wrapper was already stopped (only resources retained). */
|
|
678
678
|
sessionStopped: z.z.boolean().optional()
|
|
679
679
|
}),
|
|
680
|
-
z.z.object({ type: z.z.literal("session-event"), sessionId: id$
|
|
681
|
-
z.z.object({ type: z.z.literal("message-delivered"), messageId: id$
|
|
680
|
+
z.z.object({ type: z.z.literal("session-event"), sessionId: id$4, event: z.z.enum(["idle", "blocked", "exited"]) }),
|
|
681
|
+
z.z.object({ type: z.z.literal("message-delivered"), messageId: id$4, recipientBotId: id$4, generation: z.z.number().int().positive(), sessionId: id$4 })
|
|
682
682
|
]);
|
|
683
|
-
z.z.object({ requestId: id$
|
|
683
|
+
z.z.object({ requestId: id$4, action: TeamActionSchema });
|
|
684
684
|
const TeamProjectChoiceSchema = z.z.object({
|
|
685
|
-
projectId: id$
|
|
686
|
-
inheritFromSessionId: id$
|
|
685
|
+
projectId: id$4.optional(),
|
|
686
|
+
inheritFromSessionId: id$4.optional(),
|
|
687
687
|
create: z.z.boolean().optional(),
|
|
688
688
|
directory: z.z.string().min(1).max(4096).optional()
|
|
689
689
|
});
|
|
690
|
-
z.z.object({ name: id$
|
|
690
|
+
z.z.object({ name: id$4, machineId: id$4, requestId: id$4.optional(), launch: TeamLaunchSchema.optional(), project: TeamProjectChoiceSchema.optional(), sessionId: id$4.optional(), transfer: z.z.literal(true).optional() });
|
|
691
691
|
z.z.object({
|
|
692
|
-
projectId: id$
|
|
692
|
+
projectId: id$4.nullable().optional(),
|
|
693
693
|
create: z.z.boolean().optional(),
|
|
694
|
-
requestId: id$
|
|
694
|
+
requestId: id$4.optional()
|
|
695
695
|
}).refine((v) => v.projectId !== void 0 !== (v.create === true), "exactly one of projectId / create");
|
|
696
696
|
const TEAM_WORKTREE = /\/teams\/worktrees\/([^/]+)(?:\/|$)/;
|
|
697
697
|
function teamWorktreeId(path) {
|
|
@@ -708,7 +708,7 @@ function rebaseTeamWorktreePath(path, repository) {
|
|
|
708
708
|
const rest = normalized.slice(match.index + match[0].length).replace(/\/+$/, "");
|
|
709
709
|
return rest ? `${repository.replace(/\/+$/, "")}/${rest}` : repository;
|
|
710
710
|
}
|
|
711
|
-
const id$
|
|
711
|
+
const id$3 = z.z.string().min(1).max(128);
|
|
712
712
|
const text = z.z.string().min(1).max(32e3);
|
|
713
713
|
const AUTOMATION_NAME_PATTERN = /^[a-z0-9][a-z0-9-_.]{0,63}$/;
|
|
714
714
|
const AutomationNameSchema = z.z.string().regex(AUTOMATION_NAME_PATTERN, "automation name must match [a-z0-9][a-z0-9-_.]{0,63}");
|
|
@@ -750,7 +750,7 @@ const AutomationActionSchema = z.z.discriminatedUnion("kind", [
|
|
|
750
750
|
/** B-850d: the account the run uses (absent = project default > machine default; null = machine login). An older daemon ignores it. */
|
|
751
751
|
agentProfile: AgentProfileChoiceSchema.optional()
|
|
752
752
|
}),
|
|
753
|
-
z.z.object({ kind: z.z.literal("send"), sessionId: id$
|
|
753
|
+
z.z.object({ kind: z.z.literal("send"), sessionId: id$3, prompt: text }),
|
|
754
754
|
z.z.object({
|
|
755
755
|
kind: z.z.literal("script"),
|
|
756
756
|
command: z.z.array(z.z.string().min(1).max(4096)).min(1).max(256),
|
|
@@ -776,7 +776,7 @@ const maxRuntimeMs = z.z.number().int().min(6e4).max(7 * 864e5);
|
|
|
776
776
|
z.z.object({
|
|
777
777
|
name: AutomationNameSchema,
|
|
778
778
|
description: z.z.string().max(4e3).nullable().optional(),
|
|
779
|
-
machineId: id$
|
|
779
|
+
machineId: id$3,
|
|
780
780
|
trigger: AutomationTriggerSchema,
|
|
781
781
|
action: AutomationActionSchema,
|
|
782
782
|
concurrency: AutomationConcurrencySchema.optional(),
|
|
@@ -785,13 +785,13 @@ z.z.object({
|
|
|
785
785
|
/** B-548. Older servers strip it silently — clients must check the response echoes `precheck`. */
|
|
786
786
|
precheck: AutomationPrecheckSchema.nullable().optional(),
|
|
787
787
|
/** B-644: sessions this automation spawns join this project (quiet variant). Older servers strip it — check the echo. */
|
|
788
|
-
projectId: id$
|
|
788
|
+
projectId: id$3.nullable().optional()
|
|
789
789
|
});
|
|
790
790
|
z.z.object({
|
|
791
791
|
version: z.z.number().int().positive(),
|
|
792
792
|
name: AutomationNameSchema.optional(),
|
|
793
793
|
description: z.z.string().max(4e3).nullable().optional(),
|
|
794
|
-
machineId: id$
|
|
794
|
+
machineId: id$3.optional(),
|
|
795
795
|
trigger: AutomationTriggerSchema.optional(),
|
|
796
796
|
action: AutomationActionSchema.optional(),
|
|
797
797
|
concurrency: AutomationConcurrencySchema.optional(),
|
|
@@ -799,22 +799,22 @@ z.z.object({
|
|
|
799
799
|
/** B-548: omitted keeps the current precheck, `null` removes it. Changing `action` alone keeps it too. */
|
|
800
800
|
precheck: AutomationPrecheckSchema.nullable().optional(),
|
|
801
801
|
/** B-644: omitted keeps the current project, `null` detaches. */
|
|
802
|
-
projectId: id$
|
|
802
|
+
projectId: id$3.nullable().optional()
|
|
803
803
|
});
|
|
804
804
|
const payload = z.z.string().max(AUTOMATION_PAYLOAD_MAX_BYTES).refine((v) => new TextEncoder().encode(v).length <= AUTOMATION_PAYLOAD_MAX_BYTES, "payload exceeds 64KB");
|
|
805
805
|
z.z.object({ payload: payload.optional(), dedupeKey: z.z.string().min(1).max(256).optional() });
|
|
806
806
|
z.z.object({ payload: payload.optional() });
|
|
807
807
|
z.z.object({
|
|
808
|
-
machineId: id$
|
|
808
|
+
machineId: id$3,
|
|
809
809
|
limit: z.z.number().int().min(1).max(AUTOMATION_CLAIM_MAX_RUNS).optional(),
|
|
810
810
|
leaseMs: z.z.number().int().min(5e3).max(36e5).optional(),
|
|
811
811
|
/** B-548: what this daemon can execute (e.g. `precheck`). Older daemons send nothing; older servers strip it. */
|
|
812
812
|
capabilities: z.z.array(z.z.string().min(1).max(64)).max(32).optional()
|
|
813
813
|
});
|
|
814
814
|
z.z.object({
|
|
815
|
-
claimId: id$
|
|
815
|
+
claimId: id$3.optional(),
|
|
816
816
|
status: z.z.enum(["running", "done", "failed", "skipped"]).optional(),
|
|
817
|
-
sessionId: id$
|
|
817
|
+
sessionId: id$3.nullable().optional(),
|
|
818
818
|
stickyKey: z.z.string().min(1).max(512).optional(),
|
|
819
819
|
summary: z.z.string().max(AUTOMATION_SUMMARY_MAX_CHARS).nullable().optional(),
|
|
820
820
|
error: z.z.string().max(AUTOMATION_SUMMARY_MAX_CHARS).nullable().optional(),
|
|
@@ -824,16 +824,16 @@ z.z.object({
|
|
|
824
824
|
leaseMs: z.z.number().int().min(5e3).max(36e5).optional()
|
|
825
825
|
});
|
|
826
826
|
z.z.object({ by: z.z.string().min(1).max(64).optional() });
|
|
827
|
-
z.z.object({ key: z.z.string().min(1).max(512), sessionId: id$
|
|
827
|
+
z.z.object({ key: z.z.string().min(1).max(512), sessionId: id$3 });
|
|
828
828
|
z.z.object({ key: z.z.string().min(1).max(512) });
|
|
829
829
|
z.z.object({
|
|
830
|
-
automationId: id$
|
|
830
|
+
automationId: id$3.optional(),
|
|
831
831
|
name: AutomationNameSchema.optional(),
|
|
832
832
|
status: z.z.string().min(1).max(64).optional(),
|
|
833
833
|
attention: z.z.enum(["1", "true", "0", "false"]).optional(),
|
|
834
834
|
limit: z.z.coerce.number().int().min(1).max(200).optional()
|
|
835
835
|
});
|
|
836
|
-
z.z.object({ machineId: id$
|
|
836
|
+
z.z.object({ machineId: id$3.optional() });
|
|
837
837
|
const PROJECT_SESSION_CAPABILITY = "project-v1";
|
|
838
838
|
const PROJECT_LIMITS = {
|
|
839
839
|
nameChars: 120,
|
|
@@ -845,11 +845,11 @@ const PROJECT_LIMITS = {
|
|
|
845
845
|
messageBytes: 64 * 1024,
|
|
846
846
|
presenceBatch: 200,
|
|
847
847
|
memberBatch: 200};
|
|
848
|
-
const id$
|
|
849
|
-
const utf8Bytes = (value) => new TextEncoder().encode(value).length;
|
|
850
|
-
const boundedText = (maxBytes) => z.z.string().max(maxBytes).refine((v) => utf8Bytes(v) <= maxBytes, `exceeds ${maxBytes} bytes`);
|
|
848
|
+
const id$2 = z.z.string().min(1).max(128);
|
|
849
|
+
const utf8Bytes$1 = (value) => new TextEncoder().encode(value).length;
|
|
850
|
+
const boundedText$1 = (maxBytes) => z.z.string().max(maxBytes).refine((v) => utf8Bytes$1(v) <= maxBytes, `exceeds ${maxBytes} bytes`);
|
|
851
851
|
const ProjectFolderSchema = z.z.object({
|
|
852
|
-
machineId: id$
|
|
852
|
+
machineId: id$2,
|
|
853
853
|
path: z.z.string().min(1).max(4096),
|
|
854
854
|
primary: z.z.boolean().optional()
|
|
855
855
|
});
|
|
@@ -863,17 +863,17 @@ const ProjectDefaultsSchema = z.z.object({
|
|
|
863
863
|
});
|
|
864
864
|
const PROJECT_LOG_KINDS = ["decision", "finding", "handoff"];
|
|
865
865
|
const ProjectLogKindSchema = z.z.enum(PROJECT_LOG_KINDS);
|
|
866
|
-
const ProjectMemberViaInputSchema = z.z.enum(["explicit", "lineage", "suggested-accepted", "automation"]);
|
|
866
|
+
const ProjectMemberViaInputSchema = z.z.enum(["explicit", "lineage", "suggested-accepted", "automation", "issue"]);
|
|
867
867
|
z.z.object({
|
|
868
868
|
name: z.z.string().trim().min(1).max(PROJECT_LIMITS.nameChars),
|
|
869
869
|
goal: z.z.string().max(PROJECT_LIMITS.goalChars).nullable().optional(),
|
|
870
|
-
instructions: boundedText(PROJECT_LIMITS.instructionsBytes).optional(),
|
|
870
|
+
instructions: boundedText$1(PROJECT_LIMITS.instructionsBytes).optional(),
|
|
871
871
|
folders: z.z.array(ProjectFolderSchema).max(PROJECT_LIMITS.folders).optional(),
|
|
872
872
|
defaults: ProjectDefaultsSchema.optional(),
|
|
873
873
|
/** Idempotency: the same requestId returns the project it created. */
|
|
874
|
-
requestId: id$
|
|
874
|
+
requestId: id$2.optional(),
|
|
875
875
|
/** Optional initial members (e.g. "设为项目" moves a folder's sessions in one step). */
|
|
876
|
-
sessionIds: z.z.array(id$
|
|
876
|
+
sessionIds: z.z.array(id$2).max(PROJECT_LIMITS.memberBatch).optional()
|
|
877
877
|
});
|
|
878
878
|
z.z.object({
|
|
879
879
|
name: z.z.string().trim().min(1).max(PROJECT_LIMITS.nameChars).optional(),
|
|
@@ -883,31 +883,31 @@ z.z.object({
|
|
|
883
883
|
archived: z.z.boolean().optional()
|
|
884
884
|
});
|
|
885
885
|
z.z.object({
|
|
886
|
-
instructions: boundedText(PROJECT_LIMITS.instructionsBytes),
|
|
886
|
+
instructions: boundedText$1(PROJECT_LIMITS.instructionsBytes),
|
|
887
887
|
ifVersion: z.z.number().int().min(0),
|
|
888
888
|
/** One-line summary shown in the next-turn digest ("instructions now v8 — …"). */
|
|
889
889
|
summary: z.z.string().max(200).optional()
|
|
890
890
|
});
|
|
891
891
|
z.z.object({
|
|
892
|
-
sessionIds: z.z.array(id$
|
|
892
|
+
sessionIds: z.z.array(id$2).min(1).max(PROJECT_LIMITS.memberBatch),
|
|
893
893
|
via: ProjectMemberViaInputSchema.optional()
|
|
894
894
|
});
|
|
895
895
|
z.z.object({
|
|
896
896
|
kind: ProjectLogKindSchema,
|
|
897
897
|
title: z.z.string().trim().min(1).max(PROJECT_LIMITS.logTitleChars),
|
|
898
|
-
body: boundedText(PROJECT_LIMITS.logBodyBytes).optional(),
|
|
898
|
+
body: boundedText$1(PROJECT_LIMITS.logBodyBytes).optional(),
|
|
899
899
|
/** Entry id (or `#seq`) this entry replaces. */
|
|
900
900
|
supersedes: z.z.string().min(1).max(128).optional(),
|
|
901
901
|
/** Stamped by the wrapper (the agent cannot fill it). Absent = written by the user. */
|
|
902
|
-
authorSessionId: id$
|
|
902
|
+
authorSessionId: id$2.optional()
|
|
903
903
|
});
|
|
904
904
|
z.z.object({
|
|
905
905
|
/** When set, only entries this session authored may be revoked. Absent = the owner. */
|
|
906
|
-
bySessionId: id$
|
|
906
|
+
bySessionId: id$2.optional()
|
|
907
907
|
});
|
|
908
|
-
z.z.object({ teamId: id$
|
|
908
|
+
z.z.object({ teamId: id$2 });
|
|
909
909
|
const ProjectPresenceEntrySchema = z.z.object({
|
|
910
|
-
sessionId: id$
|
|
910
|
+
sessionId: id$2,
|
|
911
911
|
title: z.z.string().max(200).nullable().optional(),
|
|
912
912
|
agent: z.z.string().max(64).nullable().optional(),
|
|
913
913
|
machine: z.z.string().max(200).nullable().optional(),
|
|
@@ -919,19 +919,19 @@ const ProjectPresenceEntrySchema = z.z.object({
|
|
|
919
919
|
capabilities: z.z.array(z.z.string().max(64)).max(32).optional()
|
|
920
920
|
});
|
|
921
921
|
z.z.object({
|
|
922
|
-
machineId: id$
|
|
922
|
+
machineId: id$2,
|
|
923
923
|
sessions: z.z.array(ProjectPresenceEntrySchema).max(PROJECT_LIMITS.presenceBatch),
|
|
924
924
|
/** Sessions of this machine that stopped; their presence rows are marked `offline`. */
|
|
925
|
-
gone: z.z.array(id$
|
|
925
|
+
gone: z.z.array(id$2).max(PROJECT_LIMITS.presenceBatch).optional()
|
|
926
926
|
});
|
|
927
927
|
z.z.object({
|
|
928
|
-
fromSessionId: id$
|
|
929
|
-
toSessionId: id$
|
|
930
|
-
body: boundedText(PROJECT_LIMITS.messageBytes).pipe(z.z.string().min(1))
|
|
928
|
+
fromSessionId: id$2,
|
|
929
|
+
toSessionId: id$2,
|
|
930
|
+
body: boundedText$1(PROJECT_LIMITS.messageBytes).pipe(z.z.string().min(1))
|
|
931
931
|
});
|
|
932
932
|
z.z.object({
|
|
933
|
-
sessionId: id$
|
|
934
|
-
messageIds: z.z.array(id$
|
|
933
|
+
sessionId: id$2,
|
|
934
|
+
messageIds: z.z.array(id$2).min(1).max(100)
|
|
935
935
|
});
|
|
936
936
|
z.z.object({
|
|
937
937
|
full: z.z.enum(["0", "1", "true", "false"]).optional(),
|
|
@@ -1454,17 +1454,17 @@ function resolveLatestModel(table, agent, ctx) {
|
|
|
1454
1454
|
const tier = getLatestModelTier(table, agent);
|
|
1455
1455
|
if (!tier) return { model: null, newest: null, label: null, limited: false, configured: null };
|
|
1456
1456
|
const catalogIds = catalogTierIds(tier, ctx.catalog);
|
|
1457
|
-
const
|
|
1457
|
+
const labels2 = /* @__PURE__ */ new Map();
|
|
1458
1458
|
const known = [];
|
|
1459
1459
|
const runnable = [];
|
|
1460
1460
|
for (const entry of tier.models) {
|
|
1461
1461
|
if (!tierVersion(tier, entry.model)) continue;
|
|
1462
|
-
|
|
1462
|
+
labels2.set(entry.model, entry.label ?? entry.model);
|
|
1463
1463
|
known.push(entry.model);
|
|
1464
1464
|
if (entryRunnable(entry, ctx, catalogIds)) runnable.push(entry.model);
|
|
1465
1465
|
}
|
|
1466
|
-
for (const [id2,
|
|
1467
|
-
if (!
|
|
1466
|
+
for (const [id2, label2] of catalogIds) {
|
|
1467
|
+
if (!labels2.has(id2)) labels2.set(id2, label2);
|
|
1468
1468
|
known.push(id2);
|
|
1469
1469
|
runnable.push(id2);
|
|
1470
1470
|
}
|
|
@@ -1488,7 +1488,7 @@ function resolveLatestModel(table, agent, ctx) {
|
|
|
1488
1488
|
return {
|
|
1489
1489
|
model,
|
|
1490
1490
|
newest,
|
|
1491
|
-
label: model ?
|
|
1491
|
+
label: model ? labels2.get(model) ?? model : null,
|
|
1492
1492
|
limited: newest !== null && !sameVersion,
|
|
1493
1493
|
configured: null
|
|
1494
1494
|
};
|
|
@@ -1650,7 +1650,7 @@ const ATTENTION_LIMITS = {
|
|
|
1650
1650
|
/** Open `needsOwner` items per session before the playbook asks the lead to merge or drop stale ones (§5.1 rule 6). */
|
|
1651
1651
|
openPerSessionSoftCap: 5
|
|
1652
1652
|
};
|
|
1653
|
-
const ATTENTION_SOURCES = ["lead", "agent", "owner", "automation", "team"];
|
|
1653
|
+
const ATTENTION_SOURCES = ["lead", "agent", "owner", "automation", "team", "issue"];
|
|
1654
1654
|
const ATTENTION_KINDS = ["decision", "todo", "blocked", "report", "answer", "question", "request", "pin"];
|
|
1655
1655
|
const OWNER_BOARD_POST_KINDS = ["decision", "todo", "report", "answer"];
|
|
1656
1656
|
const OWNER_BOARD_RESOLVE_OUTCOMES = ["done", "answered", "dropped", "superseded"];
|
|
@@ -1658,11 +1658,11 @@ const ATTENTION_BOARD_LOCAL_ID_PREFIX = "board-";
|
|
|
1658
1658
|
function isAttentionBoardLocalId(localId) {
|
|
1659
1659
|
return typeof localId === "string" && localId.startsWith(ATTENTION_BOARD_LOCAL_ID_PREFIX);
|
|
1660
1660
|
}
|
|
1661
|
-
const id = z.z.string().min(1).max(128);
|
|
1662
|
-
const title = z.z.string().trim().min(1).max(ATTENTION_LIMITS.titleChars);
|
|
1661
|
+
const id$1 = z.z.string().min(1).max(128);
|
|
1662
|
+
const title$1 = z.z.string().trim().min(1).max(ATTENTION_LIMITS.titleChars);
|
|
1663
1663
|
const bodyMd = z.z.string().max(ATTENTION_LIMITS.bodyBytes * 4).refine((v) => new TextEncoder().encode(v).length <= ATTENTION_LIMITS.bodyBytes, "body exceeds 8KB");
|
|
1664
1664
|
const note = z.z.string().max(ATTENTION_LIMITS.noteChars);
|
|
1665
|
-
const requestId = z.z.string().min(1).max(128);
|
|
1665
|
+
const requestId$1 = z.z.string().min(1).max(128);
|
|
1666
1666
|
const key = z.z.string().min(1).max(ATTENTION_LIMITS.keyChars);
|
|
1667
1667
|
const AttentionOptionSchema = z.z.object({
|
|
1668
1668
|
id: z.z.string().trim().min(1).max(ATTENTION_LIMITS.optionIdChars),
|
|
@@ -1671,7 +1671,7 @@ const AttentionOptionSchema = z.z.object({
|
|
|
1671
1671
|
recommended: z.z.boolean().optional()
|
|
1672
1672
|
});
|
|
1673
1673
|
const options = z.z.array(AttentionOptionSchema).min(ATTENTION_LIMITS.options.min).max(ATTENTION_LIMITS.options.max).refine((o) => new Set(o.map((x) => x.id)).size === o.length, "option ids must be unique");
|
|
1674
|
-
const ATTENTION_LINK_TYPES = ["task", "pr", "commit", "url", "panel"];
|
|
1674
|
+
const ATTENTION_LINK_TYPES = ["task", "pr", "commit", "url", "panel", "issue"];
|
|
1675
1675
|
const AttentionLinkSchema = z.z.object({
|
|
1676
1676
|
type: z.z.enum(ATTENTION_LINK_TYPES),
|
|
1677
1677
|
ref: z.z.string().trim().min(1).max(ATTENTION_LIMITS.linkRefChars),
|
|
@@ -1722,17 +1722,17 @@ z.z.object({
|
|
|
1722
1722
|
item: AttentionItemSchema
|
|
1723
1723
|
});
|
|
1724
1724
|
z.z.object({
|
|
1725
|
-
sessionId: id,
|
|
1725
|
+
sessionId: id$1,
|
|
1726
1726
|
source: z.z.enum(ATTENTION_SOURCES),
|
|
1727
1727
|
kind: z.z.enum(ATTENTION_KINDS),
|
|
1728
|
-
title,
|
|
1728
|
+
title: title$1,
|
|
1729
1729
|
bodyMd: bodyMd.optional(),
|
|
1730
1730
|
options: options.optional(),
|
|
1731
1731
|
links: links.optional(),
|
|
1732
1732
|
anchor: AttentionAnchorSchema.optional(),
|
|
1733
|
-
replyToId: id.optional(),
|
|
1733
|
+
replyToId: id$1.optional(),
|
|
1734
1734
|
key: key.optional(),
|
|
1735
|
-
requestId: requestId.optional(),
|
|
1735
|
+
requestId: requestId$1.optional(),
|
|
1736
1736
|
/**
|
|
1737
1737
|
* D5 draft: only the CLI's auto-detect path sets it (`owner_board_post` does
|
|
1738
1738
|
* not expose it). A repost of the key with `false` confirms the draft (and
|
|
@@ -1741,7 +1741,7 @@ z.z.object({
|
|
|
1741
1741
|
inferred: z.z.boolean().default(false)
|
|
1742
1742
|
}).refine((p) => p.kind !== "decision" || p.options !== void 0, { message: "decision needs 2-4 options", path: ["options"] });
|
|
1743
1743
|
z.z.object({
|
|
1744
|
-
title: title.optional(),
|
|
1744
|
+
title: title$1.optional(),
|
|
1745
1745
|
bodyMd: bodyMd.nullable().optional(),
|
|
1746
1746
|
appendMd: bodyMd.optional(),
|
|
1747
1747
|
options: options.nullable().optional(),
|
|
@@ -1750,14 +1750,14 @@ z.z.object({
|
|
|
1750
1750
|
kind: z.z.literal("request").optional(),
|
|
1751
1751
|
state: z.z.enum(["open", "in_progress", "answered"]).optional(),
|
|
1752
1752
|
firstReply: AttentionAnchorSchema.optional(),
|
|
1753
|
-
requestId: requestId.optional()
|
|
1753
|
+
requestId: requestId$1.optional()
|
|
1754
1754
|
}).refine((p) => !(p.bodyMd !== void 0 && p.appendMd !== void 0), "use bodyMd or appendMd, not both");
|
|
1755
1755
|
z.z.object({
|
|
1756
1756
|
outcome: z.z.enum(OWNER_BOARD_RESOLVE_OUTCOMES),
|
|
1757
1757
|
note: note.optional(),
|
|
1758
1758
|
/** Defaults to `lead`. */
|
|
1759
1759
|
by: z.z.enum(["lead", "auto-first-reply"]).optional(),
|
|
1760
|
-
requestId: requestId.optional()
|
|
1760
|
+
requestId: requestId$1.optional()
|
|
1761
1761
|
});
|
|
1762
1762
|
z.z.discriminatedUnion("action", [
|
|
1763
1763
|
z.z.object({ action: z.z.literal("choose"), choice: z.z.string().trim().min(1).max(ATTENTION_LIMITS.optionIdChars), note: note.optional() }),
|
|
@@ -1765,7 +1765,7 @@ z.z.discriminatedUnion("action", [
|
|
|
1765
1765
|
z.z.object({ action: z.z.literal("reopen"), note: note.optional() })
|
|
1766
1766
|
]);
|
|
1767
1767
|
z.z.object({
|
|
1768
|
-
sessionId: id.optional(),
|
|
1768
|
+
sessionId: id$1.optional(),
|
|
1769
1769
|
/** `open` (default) = open + in_progress; `active` adds the latest `answered`; `all` = everything. */
|
|
1770
1770
|
state: z.z.enum(["open", "active", "all"]).optional(),
|
|
1771
1771
|
needsOwner: z.z.enum(["1", "true", "0", "false"]).optional(),
|
|
@@ -1775,30 +1775,30 @@ z.z.object({
|
|
|
1775
1775
|
});
|
|
1776
1776
|
const OwnerBoardPostInputSchema = z.z.object({
|
|
1777
1777
|
kind: z.z.enum(OWNER_BOARD_POST_KINDS),
|
|
1778
|
-
title,
|
|
1778
|
+
title: title$1,
|
|
1779
1779
|
body_md: bodyMd.optional(),
|
|
1780
1780
|
options: options.optional(),
|
|
1781
1781
|
links: links.optional(),
|
|
1782
|
-
reply_to: id.optional(),
|
|
1782
|
+
reply_to: id$1.optional(),
|
|
1783
1783
|
key: key.optional(),
|
|
1784
1784
|
anchor: z.z.union([z.z.literal("this_turn"), z.z.object({ localId: z.z.string().min(1).max(256) })]).optional(),
|
|
1785
|
-
request_id: requestId
|
|
1785
|
+
request_id: requestId$1
|
|
1786
1786
|
}).refine((p) => p.kind !== "decision" || p.options !== void 0, { message: "decision needs 2-4 options", path: ["options"] });
|
|
1787
1787
|
const OwnerBoardUpdateInputSchema = z.z.object({
|
|
1788
|
-
id,
|
|
1789
|
-
title: title.optional(),
|
|
1788
|
+
id: id$1,
|
|
1789
|
+
title: title$1.optional(),
|
|
1790
1790
|
body_md: bodyMd.optional(),
|
|
1791
1791
|
append_md: bodyMd.optional(),
|
|
1792
1792
|
options: options.optional(),
|
|
1793
1793
|
links: links.optional(),
|
|
1794
1794
|
state: z.z.enum(["open", "in_progress"]).optional(),
|
|
1795
|
-
request_id: requestId
|
|
1795
|
+
request_id: requestId$1
|
|
1796
1796
|
}).refine((p) => !(p.body_md !== void 0 && p.append_md !== void 0), "use body_md or append_md, not both");
|
|
1797
1797
|
const OwnerBoardResolveInputSchema = z.z.object({
|
|
1798
|
-
id,
|
|
1798
|
+
id: id$1,
|
|
1799
1799
|
outcome: z.z.enum(OWNER_BOARD_RESOLVE_OUTCOMES),
|
|
1800
1800
|
note: note.optional(),
|
|
1801
|
-
request_id: requestId
|
|
1801
|
+
request_id: requestId$1
|
|
1802
1802
|
});
|
|
1803
1803
|
const OwnerBoardListInputSchema = z.z.object({
|
|
1804
1804
|
state: z.z.enum(["open", "all"]).optional(),
|
|
@@ -1821,6 +1821,173 @@ function ownerBoardPostToRest(sessionId, input, anchor) {
|
|
|
1821
1821
|
inferred: false
|
|
1822
1822
|
};
|
|
1823
1823
|
}
|
|
1824
|
+
const ISSUE_LIMITS = {
|
|
1825
|
+
titleChars: 300,
|
|
1826
|
+
descriptionBytes: 32 * 1024,
|
|
1827
|
+
commentBytes: 16 * 1024,
|
|
1828
|
+
labels: 16,
|
|
1829
|
+
labelChars: 40,
|
|
1830
|
+
/** Distinct agents one comment may @ (each becomes a delivery or a run). */
|
|
1831
|
+
mentionsPerComment: 3,
|
|
1832
|
+
listMax: 500};
|
|
1833
|
+
const ISSUE_STATUSES = ["backlog", "todo", "in_progress", "in_review", "blocked", "done", "cancelled"];
|
|
1834
|
+
const ISSUE_PRIORITIES = ["urgent", "high", "medium", "low", "none"];
|
|
1835
|
+
const ISSUE_AGENT_STATUSES = ["in_progress", "in_review", "blocked"];
|
|
1836
|
+
const ISSUE_ASSIGNABLE_AGENTS = ["claude", "codex", "pi"];
|
|
1837
|
+
const ISSUE_ASSIGNEE_KINDS = ["none", "self", "agent", "team"];
|
|
1838
|
+
const id = z.z.string().min(1).max(128);
|
|
1839
|
+
const requestId = z.z.string().min(1).max(128);
|
|
1840
|
+
const utf8Bytes = (value) => new TextEncoder().encode(value).length;
|
|
1841
|
+
const boundedText = (maxBytes) => z.z.string().max(maxBytes).refine((v) => utf8Bytes(v) <= maxBytes, `exceeds ${maxBytes} bytes`);
|
|
1842
|
+
const title = z.z.string().trim().min(1).max(ISSUE_LIMITS.titleChars);
|
|
1843
|
+
const description = boundedText(ISSUE_LIMITS.descriptionBytes);
|
|
1844
|
+
const commentBody = boundedText(ISSUE_LIMITS.commentBytes).pipe(z.z.string().trim().min(1));
|
|
1845
|
+
const label = z.z.string().trim().min(1).max(ISSUE_LIMITS.labelChars);
|
|
1846
|
+
const labels = z.z.array(label).max(ISSUE_LIMITS.labels);
|
|
1847
|
+
const epochMs = z.z.number().int().min(0).max(864e13);
|
|
1848
|
+
const IssueAgentAssigneeSchema = z.z.object({
|
|
1849
|
+
kind: z.z.literal("agent"),
|
|
1850
|
+
machineId: id,
|
|
1851
|
+
agent: z.z.enum(ISSUE_ASSIGNABLE_AGENTS),
|
|
1852
|
+
agentProfile: AgentProfileChoiceSchema.optional(),
|
|
1853
|
+
model: z.z.string().trim().min(1).max(256).nullable().optional(),
|
|
1854
|
+
permissionMode: z.z.string().trim().min(1).max(64).nullable().optional(),
|
|
1855
|
+
directory: z.z.string().min(1).max(4096).optional(),
|
|
1856
|
+
/** Reserved: run each issue in its own worktree (team-style). Phase 1 servers store it; the daemon ignores it until spec §3.6 lands. */
|
|
1857
|
+
worktree: z.z.boolean().optional()
|
|
1858
|
+
});
|
|
1859
|
+
const IssueAssigneeSchema = z.z.discriminatedUnion("kind", [
|
|
1860
|
+
z.z.object({ kind: z.z.literal("none") }),
|
|
1861
|
+
z.z.object({ kind: z.z.literal("self") }),
|
|
1862
|
+
IssueAgentAssigneeSchema,
|
|
1863
|
+
/** Phase 3; accepted by the schema so the contract is stable, refused by a phase-1 server. */
|
|
1864
|
+
z.z.object({ kind: z.z.literal("team"), teamId: id })
|
|
1865
|
+
]);
|
|
1866
|
+
const IssueMentionSchema = z.z.discriminatedUnion("kind", [
|
|
1867
|
+
z.z.object({ kind: z.z.literal("agent"), agent: z.z.enum(ISSUE_ASSIGNABLE_AGENTS), machineId: id.optional() }),
|
|
1868
|
+
/** Written by the server from an agent's `issue_comment({ mention_owner: true })`; a client may not send it. */
|
|
1869
|
+
z.z.object({ kind: z.z.literal("owner") })
|
|
1870
|
+
]);
|
|
1871
|
+
const humanMentions = z.z.array(IssueMentionSchema).max(ISSUE_LIMITS.mentionsPerComment).refine((list) => list.every((m) => m.kind === "agent"), "only agent mentions may be sent");
|
|
1872
|
+
z.z.object({
|
|
1873
|
+
title,
|
|
1874
|
+
description: description.optional(),
|
|
1875
|
+
/** Default: `todo` when assigned to an agent, otherwise `backlog`. */
|
|
1876
|
+
status: z.z.enum(ISSUE_STATUSES).optional(),
|
|
1877
|
+
priority: z.z.enum(ISSUE_PRIORITIES).optional(),
|
|
1878
|
+
assignee: IssueAssigneeSchema.optional(),
|
|
1879
|
+
projectId: id.nullable().optional(),
|
|
1880
|
+
labels: labels.optional(),
|
|
1881
|
+
dueAt: epochMs.nullable().optional(),
|
|
1882
|
+
parentId: id.nullable().optional(),
|
|
1883
|
+
/** Idempotency: the same requestId returns the issue it created. */
|
|
1884
|
+
requestId: requestId.optional()
|
|
1885
|
+
});
|
|
1886
|
+
z.z.object({
|
|
1887
|
+
title: title.optional(),
|
|
1888
|
+
description: description.optional(),
|
|
1889
|
+
status: z.z.enum(ISSUE_STATUSES).optional(),
|
|
1890
|
+
priority: z.z.enum(ISSUE_PRIORITIES).optional(),
|
|
1891
|
+
assignee: IssueAssigneeSchema.optional(),
|
|
1892
|
+
projectId: id.nullable().optional(),
|
|
1893
|
+
labels: labels.optional(),
|
|
1894
|
+
dueAt: epochMs.nullable().optional(),
|
|
1895
|
+
parentId: id.nullable().optional(),
|
|
1896
|
+
/** Fractional board order within a status column. */
|
|
1897
|
+
sortOrder: z.z.number().finite().optional(),
|
|
1898
|
+
ifVersion: z.z.number().int().min(1).optional()
|
|
1899
|
+
});
|
|
1900
|
+
z.z.object({
|
|
1901
|
+
body: commentBody,
|
|
1902
|
+
mentions: humanMentions.optional(),
|
|
1903
|
+
/** A session this comment quotes / refers to (shown as a chip). */
|
|
1904
|
+
refSessionId: id.optional(),
|
|
1905
|
+
requestId: requestId.optional()
|
|
1906
|
+
});
|
|
1907
|
+
z.z.object({
|
|
1908
|
+
assignee: IssueAgentAssigneeSchema.optional(),
|
|
1909
|
+
/** Also make it the issue's assignee (換 agent). */
|
|
1910
|
+
reassign: z.z.boolean().optional(),
|
|
1911
|
+
requestId: requestId.optional()
|
|
1912
|
+
});
|
|
1913
|
+
z.z.object({ archiveSession: z.z.boolean().optional() });
|
|
1914
|
+
z.z.object({});
|
|
1915
|
+
z.z.object({
|
|
1916
|
+
status: z.z.string().max(200).optional(),
|
|
1917
|
+
projectId: id.optional(),
|
|
1918
|
+
assigneeKind: z.z.enum(ISSUE_ASSIGNEE_KINDS).optional(),
|
|
1919
|
+
label: label.optional(),
|
|
1920
|
+
priority: z.z.string().max(100).optional(),
|
|
1921
|
+
q: z.z.string().max(200).optional(),
|
|
1922
|
+
updatedSince: z.z.coerce.number().int().min(0).optional(),
|
|
1923
|
+
includeDeleted: z.z.enum(["0", "1", "true", "false"]).optional(),
|
|
1924
|
+
limit: z.z.coerce.number().int().min(1).max(ISSUE_LIMITS.listMax).optional(),
|
|
1925
|
+
cursor: z.z.string().max(256).optional()
|
|
1926
|
+
});
|
|
1927
|
+
z.z.object({
|
|
1928
|
+
sessionId: id,
|
|
1929
|
+
status: z.z.enum(ISSUE_AGENT_STATUSES).optional(),
|
|
1930
|
+
comment: commentBody.optional(),
|
|
1931
|
+
requestId: requestId.optional()
|
|
1932
|
+
}).refine((v) => v.status !== void 0 || v.comment !== void 0, "status or comment required");
|
|
1933
|
+
z.z.object({
|
|
1934
|
+
sessionId: id,
|
|
1935
|
+
body: commentBody,
|
|
1936
|
+
mentionOwner: z.z.boolean().optional(),
|
|
1937
|
+
requestId: requestId.optional()
|
|
1938
|
+
});
|
|
1939
|
+
z.z.object({
|
|
1940
|
+
machineId: id,
|
|
1941
|
+
workerVersion: z.z.coerce.number().int().min(1)
|
|
1942
|
+
});
|
|
1943
|
+
z.z.object({ machineId: id });
|
|
1944
|
+
z.z.object({
|
|
1945
|
+
machineId: id,
|
|
1946
|
+
claimId: id,
|
|
1947
|
+
/** `spawn`: the new session. `message`: the session it was delivered to. */
|
|
1948
|
+
sessionId: id
|
|
1949
|
+
});
|
|
1950
|
+
z.z.object({
|
|
1951
|
+
machineId: id,
|
|
1952
|
+
claimId: id,
|
|
1953
|
+
error: z.z.string().min(1).max(4e3),
|
|
1954
|
+
/** True when the outcome is unknown (e.g. timeout after the spawn RPC); the server keeps the run `claimed` for owner retry instead of failing it. */
|
|
1955
|
+
unknown: z.z.boolean().optional()
|
|
1956
|
+
});
|
|
1957
|
+
z.z.object({
|
|
1958
|
+
machineId: id,
|
|
1959
|
+
sessionId: id,
|
|
1960
|
+
event: z.z.enum(["running", "idle", "exited", "crashed"])
|
|
1961
|
+
});
|
|
1962
|
+
z.z.object({
|
|
1963
|
+
/** `VH-12` / id; absent = the issue this session is bound to. */
|
|
1964
|
+
issue: z.z.string().min(1).max(128).optional()
|
|
1965
|
+
});
|
|
1966
|
+
z.z.object({
|
|
1967
|
+
status: z.z.enum(ISSUE_AGENT_STATUSES).optional(),
|
|
1968
|
+
comment: z.z.string().min(1).max(ISSUE_LIMITS.commentBytes).optional()
|
|
1969
|
+
}).refine((v) => v.status !== void 0 || v.comment !== void 0, "status or comment required");
|
|
1970
|
+
z.z.object({
|
|
1971
|
+
body: z.z.string().min(1).max(ISSUE_LIMITS.commentBytes),
|
|
1972
|
+
mention_owner: z.z.boolean().optional()
|
|
1973
|
+
});
|
|
1974
|
+
z.z.object({
|
|
1975
|
+
status: z.z.array(z.z.enum(ISSUE_STATUSES)).max(ISSUE_STATUSES.length).optional(),
|
|
1976
|
+
project: z.z.enum(["current", "any"]).optional(),
|
|
1977
|
+
limit: z.z.number().int().min(1).max(50).optional()
|
|
1978
|
+
});
|
|
1979
|
+
z.z.object({
|
|
1980
|
+
t: z.z.literal("issue"),
|
|
1981
|
+
issue: z.z.object({ id: z.z.string(), version: z.z.number() }).passthrough()
|
|
1982
|
+
});
|
|
1983
|
+
z.z.object({
|
|
1984
|
+
t: z.z.literal("issue-comment"),
|
|
1985
|
+
comment: z.z.object({ id: z.z.string(), issueId: z.z.string() }).passthrough()
|
|
1986
|
+
});
|
|
1987
|
+
z.z.object({
|
|
1988
|
+
t: z.z.literal("issue-run"),
|
|
1989
|
+
run: z.z.object({ id: z.z.string(), issueId: z.z.string(), status: z.z.string() }).passthrough()
|
|
1990
|
+
});
|
|
1824
1991
|
const SYNC_HELLO_MAX_REQUEST_SUBS = 64;
|
|
1825
1992
|
const sessionIdSchema = z__namespace.string().min(1).max(128);
|
|
1826
1993
|
const afterSeqSchema = z__namespace.number().int().min(0).nullable();
|