very-happy-cli 0.2.193 → 0.2.195
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-B4PwjqHt.mjs → AcpBackend-BTIF87yb.mjs} +3 -3
- package/dist/{AcpBackend-DtJCgftG.cjs → AcpBackend-CXSV6FF5.cjs} +3 -3
- package/dist/{AcpSessionManager-D4qshX_H.cjs → AcpSessionManager-BbWODxSp.cjs} +2 -2
- package/dist/{AcpSessionManager-BzKWgkdP.mjs → AcpSessionManager-CEpU_GVk.mjs} +2 -2
- package/dist/{BasePermissionHandler-DV6UM6e9.mjs → BasePermissionHandler-B5ka7Aaf.mjs} +1 -1
- package/dist/{BasePermissionHandler-5iG-cvA2.cjs → BasePermissionHandler-C6iF28Ct.cjs} +1 -1
- package/dist/{account-DvpA60oU.cjs → account-Bvcdk9CH.cjs} +11 -11
- package/dist/{account-Dco_nGT4.mjs → account-WSJcdMGl.mjs} +11 -11
- package/dist/{accountService-Cd7bnkfd.mjs → accountService-BtEgv0fC.mjs} +4 -4
- package/dist/{accountService-CuUSJDhP.cjs → accountService-DL6xhVUa.cjs} +4 -4
- package/dist/{acpSessionResume-Bk9mjXZ9.cjs → acpSessionResume-B2hd1Wub.cjs} +1 -1
- package/dist/{acpSessionResume-TQwN9ZZE.mjs → acpSessionResume-BYMm4w8Q.mjs} +1 -1
- package/dist/{agentHome-c2dlgcw1.cjs → agentHome-CVM15_3U.cjs} +4 -4
- package/dist/{agentHome-Bep8semY.mjs → agentHome-Jl8yWAjF.mjs} +4 -4
- package/dist/{api-DUfunY3x.mjs → api-DOzNOoVJ.mjs} +10 -10
- package/dist/{api-CBE_a88I.cjs → api-TpjZJXV-.cjs} +10 -10
- package/dist/{apiMachine-BqtG0IWm.cjs → apiMachine-COkvJAmd.cjs} +35 -19
- package/dist/{apiMachine-CU_bw5nV.mjs → apiMachine-M-Fs9g5Y.mjs} +35 -19
- package/dist/{attachmentContent-B3AzuYqk.cjs → attachmentContent-BiBOjTXX.cjs} +2 -2
- package/dist/{attachmentContent-KNIZxwlu.mjs → attachmentContent-D6PjMVDq.mjs} +2 -2
- package/dist/{auth-SJ_dPw7H.cjs → auth-BOceB8cL.cjs} +8 -8
- package/dist/{auth-CZ7pKS-j.mjs → auth-BfHLe1gU.mjs} +8 -8
- package/dist/{auth-jN5dNqTO.mjs → auth-Bfe3Ue_B.mjs} +5 -5
- package/dist/{auth-DCjxpI6Z.cjs → auth-DfcdjMUp.cjs} +5 -5
- package/dist/{auto-DC0Sq-qB.mjs → auto-CDeivd5V.mjs} +18 -18
- package/dist/{auto-B_59RYH1.cjs → auto-CnTitokD.cjs} +18 -18
- package/dist/{bootstrap-B3gMpU9e.mjs → bootstrap-BxcKrgR9.mjs} +2 -2
- package/dist/{bootstrap-CoJu9VnB.cjs → bootstrap-DpyP22Wx.cjs} +2 -2
- package/dist/{browser-LHW2hBH8.mjs → browser-Bb0Gqffc.mjs} +1 -1
- package/dist/{browser-v1pdPP1E.cjs → browser-ac0aPrVE.cjs} +1 -1
- package/dist/{claudeAccountEnv-BL1pR_37.mjs → claudeAccountEnv-NyoxjLuJ.mjs} +1 -1
- package/dist/{claudeAccountEnv-CEX_EMZr.cjs → claudeAccountEnv-_O3x5AJ1.cjs} +1 -1
- package/dist/{claudeLocal-BrzM2RBI.cjs → claudeLocal-RGWhplSr.cjs} +5 -5
- package/dist/{claudeLocal-BZUgA5G2.mjs → claudeLocal-otwxWF6e.mjs} +5 -5
- package/dist/{claudeLocalLauncher-A0AQyHFi.mjs → claudeLocalLauncher-CTibA4cU.mjs} +10 -10
- package/dist/{claudeLocalLauncher-XAMpXUM7.cjs → claudeLocalLauncher-yG-MBhY7.cjs} +10 -10
- package/dist/{claudeSessionFork-Mhn2fYe_.cjs → claudeSessionFork-DH_Su4uO.cjs} +104 -38
- package/dist/{claudeSessionFork-_GwIlmMB.mjs → claudeSessionFork-HFFwivGY.mjs} +105 -40
- package/dist/{client-DwbhrX6D.mjs → client-BhAjEv8Z.mjs} +4 -4
- package/dist/{client-D2GWkd-T.cjs → client-BlV73Gbw.cjs} +2 -2
- package/dist/{client-Bde4QVIn.mjs → client-CydHzidF.mjs} +2 -2
- package/dist/{client-CJr8Pjwm.cjs → client-DcXLNaF2.cjs} +2 -2
- package/dist/{client-7RnI9J0W.mjs → client-DpTk1S7C.mjs} +2 -2
- package/dist/{client-DLlnmAPL.cjs → client-DxjYsJ8d.cjs} +4 -4
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAccount-NOX5pmQf.mjs → codexAccount-CKXpXq0B.mjs} +1 -1
- package/dist/{codexAccount-BDQjRbtI.cjs → codexAccount-CYhQir50.cjs} +1 -1
- package/dist/{codexAppServerClient-DWEsZUC4.cjs → codexAppServerClient-C1xBSuVk.cjs} +60 -3
- package/dist/{codexAppServerClient-B3QJV6Ey.mjs → codexAppServerClient-mln0W8vT.mjs} +60 -3
- package/dist/{codexCommand-D1xlj4sT.mjs → codexCommand-CmWhYduF.mjs} +136 -47
- package/dist/{codexCommand-Bg8AmxVm.cjs → codexCommand-Plm-_aRy.cjs} +137 -48
- package/dist/{codexTermination-ByX9GcEJ.cjs → codexTermination-C9c80lIF.cjs} +1 -1
- package/dist/{codexTermination-CaWAVQjZ.mjs → codexTermination-QltAvFpq.mjs} +1 -1
- package/dist/{codexThreadFork-5kwoKjMu.cjs → codexThreadFork-C6ZmcT2z.cjs} +22 -1
- package/dist/{codexThreadFork-DobPd19R.mjs → codexThreadFork-CVzAqELg.mjs} +22 -2
- package/dist/{config-B2GGbiTv.cjs → config-BH75enfT.cjs} +3 -3
- package/dist/{config-C2XYEwXz.mjs → config-DK27kWTT.mjs} +3 -3
- package/dist/{configuration-BBK0rmmj.cjs → configuration-CKaq0tNe.cjs} +1 -1
- package/dist/{configuration-ThKBP_zY.mjs → configuration-CwfgJZKs.mjs} +1 -1
- package/dist/{connect-C3tZs_NC.cjs → connect-_QkCFMxO.cjs} +13 -13
- package/dist/{connect-BirnCl9q.mjs → connect-h3_VMJst.mjs} +13 -13
- package/dist/{context-wDp0aZBK.cjs → context-DbENnaVc.cjs} +1 -1
- package/dist/{context-C0EFLnOg.mjs → context-DcOpvIiR.mjs} +1 -1
- package/dist/{controlClient-DwWTns3A.cjs → controlClient-D_HIbnnS.cjs} +3 -3
- package/dist/{controlClient-Ckl8N1MS.mjs → controlClient-Dv6IvvUq.mjs} +4 -4
- package/dist/{createSessionMetadata-DqZ6h02H.cjs → createSessionMetadata-CusO22Am.cjs} +2 -2
- package/dist/{createSessionMetadata-vug4Cv8z.mjs → createSessionMetadata-DimBsfVG.mjs} +2 -2
- package/dist/{daemonAccounts-CpGDY_4k.cjs → daemonAccounts-CxMJw7x2.cjs} +2 -2
- package/dist/{daemonAccounts-DwPwKxvv.mjs → daemonAccounts-QT-RDDEp.mjs} +3 -3
- package/dist/{defaultPermissionMode-DF5AfeBb.mjs → defaultPermissionMode-B-Vt8ECY.mjs} +1 -1
- package/dist/{defaultPermissionMode-BakXiqRr.cjs → defaultPermissionMode-BCWCMONI.cjs} +1 -1
- package/dist/{deterministicJson-t33SsuRC.cjs → deterministicJson-BYqRKTmL.cjs} +13 -13
- package/dist/{deterministicJson-BzX94gi3.mjs → deterministicJson-CMApF2Rl.mjs} +13 -13
- package/dist/{doctor-C1zyOSXw.mjs → doctor-BkyoZ0Uw.mjs} +7 -7
- package/dist/{doctor-B9ug1LZb.cjs → doctor-Czbl7gk2.cjs} +7 -7
- package/dist/{downloadTarget-T1id2Gh6.cjs → downloadTarget-C5BzZ_bz.cjs} +6 -6
- package/dist/{downloadTarget-Baslc6jW.mjs → downloadTarget-CM0BZNSY.mjs} +6 -6
- package/dist/{ensureDaemonRunning-CoAg11Zi.cjs → ensureDaemonRunning-D508DmcP.cjs} +5 -5
- package/dist/{ensureDaemonRunning-C6ERYK-O.mjs → ensureDaemonRunning-P399ot_C.mjs} +5 -5
- package/dist/{handleResumeCommand-CrlqDuz7.mjs → handleResumeCommand-BK_2ShBf.mjs} +5 -5
- package/dist/{handleResumeCommand-DPi-sPm7.cjs → handleResumeCommand-CCgK7-0v.cjs} +5 -5
- package/dist/{index-Cn73rdtQ.mjs → index-BENDk1i9.mjs} +4 -4
- package/dist/{index-rocrvOYG.cjs → index-BalJgriQ.cjs} +4 -4
- package/dist/{index-D1YnIih6.mjs → index-BlWyEpMw.mjs} +2 -1
- package/dist/{index-B2dJA8VG.cjs → index-Bz9Bj7l1.cjs} +3 -3
- package/dist/{index-B1swQJUS.cjs → index-CGKn-GTK.cjs} +4 -4
- package/dist/{index-Bkslzin5.cjs → index-CSO1-mZ9.cjs} +42 -42
- package/dist/{index-BUFrKZeQ.cjs → index-D9Hidq-g.cjs} +2 -0
- package/dist/{index-BcSPg3c5.mjs → index-DR3NJLVk.mjs} +4 -4
- package/dist/{index-BbdV2mzy.mjs → index-QSAckvNv.mjs} +3 -3
- package/dist/{index-fZO4nF6e.mjs → index-_DRVKtSd.mjs} +43 -43
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-CArXjPfW.cjs → install-CqXaN7_C.cjs} +3 -3
- package/dist/{install-CChhyV2G.mjs → install-DMTvEPrB.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-B_v6qgfE.cjs → lidState-Btv4N_B8.cjs} +1 -1
- package/dist/{lidState-B6yYKjNK.mjs → lidState-Cb3TbhPb.mjs} +1 -1
- package/dist/{localHappyAgentAuth-jJH0n67S.cjs → localHappyAgentAuth-B3Q5DNLR.cjs} +1 -1
- package/dist/{localHappyAgentAuth-KRlg_aI0.mjs → localHappyAgentAuth-CAAIUJyY.mjs} +1 -1
- package/dist/{logger-CX3x2eI4.cjs → logger-BZ5TcbEh.cjs} +2 -2
- package/dist/{logger-JV7-4Q_6.mjs → logger-UgDpJA2u.mjs} +2 -2
- package/dist/{machineMetadata-D5-SW9kv.mjs → machineMetadata-BYHC-3Vx.mjs} +3 -3
- package/dist/{machineMetadata-DhZuM0iB.cjs → machineMetadata-DLb-m4fL.cjs} +3 -3
- package/dist/{main-CFOdXbPD.mjs → main-CwW6lHIw.mjs} +47 -47
- package/dist/{main-1x1HGQEy.cjs → main-LavPb80B.cjs} +47 -47
- package/dist/{mcp-BnKBSEh7.cjs → mcp-BQbWhqUh.cjs} +18 -18
- package/dist/{mcp-R6lMcFLO.mjs → mcp-BjYz5Ymf.mjs} +18 -18
- package/dist/{mirrorProtocol-CD4ntuZJ.mjs → mirrorProtocol-BH5eT99U.mjs} +3 -3
- package/dist/{mirrorProtocol-DO-KtvAL.cjs → mirrorProtocol-Ci9YmCEV.cjs} +3 -3
- package/dist/{package-uzlvxa5S.cjs → package-B61-BBlh.cjs} +7 -7
- package/dist/{package-Bw3H6VLn.mjs → package-C4OfB2YF.mjs} +7 -7
- package/dist/{panels-C46FxjmH.cjs → panels-ByprLJag.cjs} +5 -5
- package/dist/{panels-BamhZCoZ.mjs → panels-cBJT5Up1.mjs} +5 -5
- package/dist/{peerTools-D-VNNFw-.cjs → peerTools-BXSjS8lB.cjs} +5 -5
- package/dist/{peerTools-WtRgTSqG.mjs → peerTools-DS6GqJcn.mjs} +5 -5
- package/dist/{persistence-Cg4sfjQV.mjs → persistence-CQhmtobL.mjs} +2 -2
- package/dist/{persistence-CsmAgN-C.cjs → persistence-DBmeYlwT.cjs} +2 -2
- package/dist/{piRunnerArgs-vnFygygF.cjs → piRunnerArgs-CmEE058l.cjs} +1 -1
- package/dist/{piRunnerArgs-BbaAQvb4.mjs → piRunnerArgs-Dy-3vN_Q.mjs} +1 -1
- package/dist/{piRuntime-C2uj5Ucx.cjs → piRuntime-BCXjC4__.cjs} +1 -1
- package/dist/{piRuntime-Bid7TBf5.mjs → piRuntime-Rq9v4M4e.mjs} +1 -1
- package/dist/{piTerminal-CqxgrI13.mjs → piTerminal-CRhDUqX7.mjs} +20 -20
- package/dist/{piTerminal-Ckpjfoqa.cjs → piTerminal-ehNQOvLL.cjs} +20 -20
- package/dist/{pushNotifications-BbE-qV9I.mjs → pushNotifications-67GmbVfE.mjs} +3 -3
- package/dist/{pushNotifications-BCg7YAiu.cjs → pushNotifications-qCS7_tDF.cjs} +3 -3
- package/dist/{query-vQ-HG394.cjs → query-B4QIiI7e.cjs} +1 -1
- package/dist/{query-Bfr9O_62.mjs → query-CIDBGnv6.mjs} +1 -1
- package/dist/{rateLimitWindows-CRARnKaI.mjs → rateLimitWindows-8-khalzj.mjs} +1 -1
- package/dist/{rateLimitWindows-BZl6GMwQ.cjs → rateLimitWindows-BIfLMxOk.cjs} +1 -1
- package/dist/{registerCommonHandlers-Cj3Nl9y-.mjs → registerCommonHandlers-C7hlztAO.mjs} +2 -2
- package/dist/{registerCommonHandlers-CZGmrPbT.cjs → registerCommonHandlers-G2p0MJu4.cjs} +2 -2
- package/dist/{registerKillSessionHandler-C3EDnW4F.cjs → registerKillSessionHandler-BWvl6wro.cjs} +6 -6
- package/dist/{registerKillSessionHandler-Bg9t45Ub.mjs → registerKillSessionHandler-rwXdO0t0.mjs} +6 -6
- package/dist/registerSideQuestionHandler-CsyPnjce.cjs +366 -0
- package/dist/registerSideQuestionHandler-Xg46gSVh.mjs +358 -0
- package/dist/{remoteSessionClient-CcSP24Zq.cjs → remoteSessionClient-D6_7vNKc.cjs} +5 -5
- package/dist/{remoteSessionClient--0vfA7I5.mjs → remoteSessionClient-DQSnC7ox.mjs} +5 -5
- package/dist/{reportProgressTool-Ddg1yVq2.cjs → reportProgressTool-CIHGKraF.cjs} +3 -3
- package/dist/{reportProgressTool-DVru7jc_.mjs → reportProgressTool-HjzV5y_2.mjs} +3 -3
- package/dist/{run-HtvH6BLi.mjs → run-M06F1958.mjs} +40 -40
- package/dist/{run-BTrIT_jU.cjs → run-tQ4bFkHu.cjs} +40 -40
- package/dist/{runClaude-ipjwAHPI.cjs → runClaude-Ct0_mShC.cjs} +28 -26
- package/dist/{runClaude-DsHTk5Bu.mjs → runClaude-Dm9kQZ-w.mjs} +28 -26
- package/dist/{runClaudeDeps-BKpwL6ln.cjs → runClaudeDeps-BT2kWCrQ.cjs} +44 -333
- package/dist/{runClaudeDeps-BV3vpeyY.mjs → runClaudeDeps-DNOzXjc3.mjs} +47 -336
- package/dist/{runGemini-DhjK6_Fp.mjs → runGemini-BvN-yeQR.mjs} +33 -33
- package/dist/{runGemini-B-G0_7Ab.cjs → runGemini-cua7_iuR.cjs} +33 -33
- package/dist/{runOpenClaw-B6lawk8n.mjs → runOpenClaw-C9E2XzmX.mjs} +18 -18
- package/dist/{runOpenClaw-BHIo8tkn.cjs → runOpenClaw-NpYFRhKm.cjs} +18 -18
- package/dist/{sandbox-CKb7pCXg.mjs → sandbox-C-BXZbt9.mjs} +4 -4
- package/dist/{sandbox-BAsO0ILe.cjs → sandbox-hImfD0-T.cjs} +4 -4
- package/dist/{selfCheck-D4VvVZNi.cjs → selfCheck-B3ulijQM.cjs} +39 -39
- package/dist/selfCheck-D-e9kVhc.mjs +88 -0
- package/dist/{send-Cz5m39QR.cjs → send-BCVQkTOl.cjs} +8 -8
- package/dist/{send-D8ipLKMY.mjs → send-Dv2L8IRW.mjs} +8 -8
- package/dist/{server-CjvgT3N9.mjs → server-BBBfuSB-.mjs} +4 -4
- package/dist/{server-CySyJKPH.cjs → server-DYxyCyYF.cjs} +6 -6
- package/dist/{sessionLock-DdDCuNUs.cjs → sessionLock-B8fsnpZD.cjs} +3 -3
- package/dist/{sessionLock-B73fhgQN.mjs → sessionLock-BexUoWhZ.mjs} +3 -3
- package/dist/{sessionOps-XSEjIqNq.cjs → sessionOps-74pSDXoS.cjs} +4 -4
- package/dist/{sessionOps-C65Iej_C.mjs → sessionOps-BkEgNA2O.mjs} +5 -5
- package/dist/{sessionProvider-Dgsty8z_.cjs → sessionProvider-CWgHsZUA.cjs} +10 -10
- package/dist/{sessionProvider-CLVNkfji.mjs → sessionProvider-DXkhlJE6.mjs} +10 -10
- package/dist/{sessionScanner-D8IVXMMH.cjs → sessionScanner-D56EkcIj.cjs} +3 -3
- package/dist/{sessionScanner-MW1P9Pm9.mjs → sessionScanner-Dhh1wREW.mjs} +3 -3
- package/dist/{sessions-BKz7gZqg.cjs → sessions-C1zRTjUe.cjs} +10 -10
- package/dist/{sessions-Dtk_agUL.mjs → sessions-dJR6k3JY.mjs} +10 -10
- package/dist/{setupOfflineReconnection-DxMiW7OV.cjs → setupOfflineReconnection-CMUdHtFT.cjs} +2 -2
- package/dist/{setupOfflineReconnection-Bvdy-2xd.mjs → setupOfflineReconnection-Dp1rC-eP.mjs} +2 -2
- package/dist/{spawn-Dm4xsZBX.mjs → spawn-D3-Weoiq.mjs} +54 -20
- package/dist/{spawn-DiPkJcrQ.cjs → spawn-kMKI09Kh.cjs} +54 -20
- package/dist/{spawnAgents-B9olJ8xn.cjs → spawnAgents-Cm23BW-D.cjs} +1 -1
- package/dist/{spawnAgents-I29H9nO8.mjs → spawnAgents-hKFGQaSJ.mjs} +1 -1
- package/dist/{spawnHappyCLI-CnMwzjWX.mjs → spawnHappyCLI-CgjpjSTT.mjs} +1 -1
- package/dist/{spawnHappyCLI-BYGOUda1.cjs → spawnHappyCLI-Du1IgJGA.cjs} +1 -1
- package/dist/{startFileWatcher-D14W6gn-.cjs → startFileWatcher-DGOnF95-.cjs} +1 -1
- package/dist/{startFileWatcher-DePAY1T5.mjs → startFileWatcher-DapvIGxp.mjs} +1 -1
- package/dist/{startupSessionCreate-DoK0IvJG.mjs → startupSessionCreate-CSi60oo_.mjs} +3 -3
- package/dist/{startupSessionCreate-rBHd4tc1.cjs → startupSessionCreate-rkIMVGJW.cjs} +3 -3
- package/dist/{store-Vej_738f.mjs → store-Tf-r1ouq.mjs} +1 -1
- package/dist/{store-CkNa6oj4.cjs → store-aa3CVNwS.cjs} +1 -1
- package/dist/{streamRelay-C0G1HOOd.cjs → streamRelay-C2Lb2z39.cjs} +1 -1
- package/dist/{streamRelay-C5U-C4GS.mjs → streamRelay-C9lzMo0V.mjs} +1 -1
- package/dist/{sync-WYBwkJvG.cjs → sync-Cj8Vhltg.cjs} +1 -1
- package/dist/{sync-BP6vnxVP.mjs → sync-GJkf-HGu.mjs} +1 -1
- package/dist/{systemPrompt-aRqBmkpw.mjs → systemPrompt-BEagRbDZ.mjs} +2 -2
- package/dist/{systemPrompt-BkQlCk5_.cjs → systemPrompt-Cne9i1SE.cjs} +2 -2
- package/dist/{teams-CGmC4ygu.mjs → teams-C_18IMNM.mjs} +7 -7
- package/dist/{teams-phbpwAGD.cjs → teams-ClTg6hQ1.cjs} +7 -7
- package/dist/{template-B9pLEP8v.cjs → template-B1AORlgU.cjs} +1 -1
- package/dist/{template-CL9EvQLQ.mjs → template-Ci-cyigF.mjs} +1 -1
- package/dist/{time-BTLcO8jp.cjs → time-BPPTQ_sE.cjs} +1 -1
- package/dist/{time-Cw0liIqB.mjs → time-CIkdLyza.mjs} +1 -1
- package/dist/{titleGenerator-Y1_7ceJC.cjs → titleGenerator-B_OgL9Pd.cjs} +3 -3
- package/dist/{titleGenerator-h6TmFe-c.mjs → titleGenerator-DnwTdTB_.mjs} +2 -2
- package/dist/{todo-BxiPiCvB.cjs → todo-DPQHtZVM.cjs} +6 -6
- package/dist/{todo-OKcTC_VC.mjs → todo-DmHolFRy.mjs} +6 -6
- package/dist/{tools-CcebYtLj.cjs → tools-B3KGMSU5.cjs} +1 -1
- package/dist/{tools-BR-drXZ8.mjs → tools-DqjPHq9I.mjs} +1 -1
- package/dist/{uninstall-D3stWKD2.mjs → uninstall-Cm97eybp.mjs} +3 -3
- package/dist/{uninstall-CnDeCC-M.cjs → uninstall-CrK5dgx8.cjs} +3 -3
- package/dist/{wrapperAccount-D2A4DuZy.cjs → wrapperAccount-BubTurHU.cjs} +2 -2
- package/dist/{wrapperAccount-BkufO_9g.mjs → wrapperAccount-Cq7eZRMx.mjs} +2 -2
- package/package.json +7 -7
- package/dist/rateLimitReporter-BZ8x0-6-.cjs +0 -44
- package/dist/rateLimitReporter-CAz7VMw4.mjs +0 -42
- package/dist/selfCheck-CZ-t1Xzq.mjs +0 -88
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import {
|
|
2
|
+
import { unlink, readFile, rename, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { createReadStream, createWriteStream } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { createInterface } from 'node:readline';
|
|
6
|
-
import { l as logger } from './logger-
|
|
6
|
+
import { l as logger } from './logger-UgDpJA2u.mjs';
|
|
7
7
|
|
|
8
8
|
class ForkTruncateUuidNotFoundError extends Error {
|
|
9
9
|
constructor(cutAfterUuid, sourcePath) {
|
|
@@ -52,20 +52,109 @@ async function discardForkedSession(projectDir, claudeSessionId) {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
async function forkSession(projectDir, sourceClaudeSessionId) {
|
|
55
|
-
const newId = randomUUID();
|
|
56
55
|
const src = jsonlPath(projectDir, sourceClaudeSessionId);
|
|
57
|
-
const
|
|
56
|
+
const lines = completeLines(await readSource(src));
|
|
57
|
+
const newId = await writeFork(projectDir, lines);
|
|
58
|
+
logger.debug(`[CLAUDE FORK] Forked ${sourceClaudeSessionId} -> ${newId}`);
|
|
59
|
+
return newId;
|
|
60
|
+
}
|
|
61
|
+
async function readSource(src) {
|
|
58
62
|
try {
|
|
59
|
-
await
|
|
63
|
+
return await readFile(src, "utf-8");
|
|
60
64
|
} catch (error) {
|
|
61
|
-
if (error.code === "ENOENT")
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
if (error.code === "ENOENT") throw new ForkSourceMissingError(src);
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async function writeFork(projectDir, lines) {
|
|
70
|
+
const newId = randomUUID();
|
|
71
|
+
const destination = jsonlPath(projectDir, newId);
|
|
72
|
+
const temporary = `${destination}.tmp-${process.pid}`;
|
|
73
|
+
try {
|
|
74
|
+
await writeFile(temporary, lines.length > 0 ? lines.join("\n") + "\n" : "", { encoding: "utf-8", flag: "wx" });
|
|
75
|
+
await rename(temporary, destination);
|
|
76
|
+
} catch (error) {
|
|
77
|
+
await unlink(temporary).catch(() => void 0);
|
|
64
78
|
throw error;
|
|
65
79
|
}
|
|
66
|
-
logger.debug(`[CLAUDE FORK] Forked ${sourceClaudeSessionId} -> ${newId}`);
|
|
67
80
|
return newId;
|
|
68
81
|
}
|
|
82
|
+
function completeLines(raw) {
|
|
83
|
+
const lines = raw.split("\n");
|
|
84
|
+
const tail = lines.pop() ?? "";
|
|
85
|
+
if (tail.trim()) {
|
|
86
|
+
try {
|
|
87
|
+
JSON.parse(tail);
|
|
88
|
+
lines.push(tail);
|
|
89
|
+
} catch {
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return lines.filter((line) => line.length > 0);
|
|
93
|
+
}
|
|
94
|
+
const INTERRUPTED_PROMPT = /^\[Request interrupted by user(?: for tool use)?\]$/i;
|
|
95
|
+
const LOCAL_COMMAND_OUTPUT = /^<local-command-(?:stdout|stderr)>/;
|
|
96
|
+
const CONTINUING_STOPS = /* @__PURE__ */ new Set(["tool_use", "pause_turn"]);
|
|
97
|
+
function endsTurn(entry) {
|
|
98
|
+
if (!entry || entry.isSidechain) return false;
|
|
99
|
+
if (entry.type === "assistant") {
|
|
100
|
+
const stop = entry.message?.stop_reason;
|
|
101
|
+
return typeof stop === "string" && !CONTINUING_STOPS.has(stop);
|
|
102
|
+
}
|
|
103
|
+
if (entry.type === "system" && entry.subtype === "compact_boundary") return true;
|
|
104
|
+
if (entry.type === "user" && entry.isCompactSummary) return true;
|
|
105
|
+
const text = userPromptText(entry)?.trim();
|
|
106
|
+
return text !== void 0 && (INTERRUPTED_PROMPT.test(text) || LOCAL_COMMAND_OUTPUT.test(text));
|
|
107
|
+
}
|
|
108
|
+
function findUnfinishedTurn(lines) {
|
|
109
|
+
let start = -1;
|
|
110
|
+
const prompts = [];
|
|
111
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
112
|
+
let entry;
|
|
113
|
+
try {
|
|
114
|
+
entry = JSON.parse(lines[i]);
|
|
115
|
+
} catch {
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (endsTurn(entry)) break;
|
|
119
|
+
const text = userPromptText(entry);
|
|
120
|
+
if (text === null || typeof entry.uuid !== "string") continue;
|
|
121
|
+
start = i;
|
|
122
|
+
prompts.unshift(text);
|
|
123
|
+
}
|
|
124
|
+
return start < 0 ? null : { start, prompts };
|
|
125
|
+
}
|
|
126
|
+
function conversationOf(lines) {
|
|
127
|
+
let conversation = false;
|
|
128
|
+
let prompt = false;
|
|
129
|
+
for (const line of lines) {
|
|
130
|
+
let entry;
|
|
131
|
+
try {
|
|
132
|
+
entry = JSON.parse(line);
|
|
133
|
+
} catch {
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
if (entry?.isSidechain || entry?.isMeta || entry?.isSynthetic || entry?.type !== "user" && entry?.type !== "assistant") continue;
|
|
137
|
+
conversation = true;
|
|
138
|
+
const content = entry.message?.content;
|
|
139
|
+
if (entry.type === "user" && (typeof content === "string" || Array.isArray(content) && content.length > 0 && !content.some((block) => block?.type === "tool_result"))) {
|
|
140
|
+
prompt = true;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return { conversation, prompt };
|
|
144
|
+
}
|
|
145
|
+
async function forkCompletedTurns(projectDir, sourceClaudeSessionId) {
|
|
146
|
+
const src = jsonlPath(projectDir, sourceClaudeSessionId);
|
|
147
|
+
const lines = completeLines(await readSource(src));
|
|
148
|
+
const unfinished = findUnfinishedTurn(lines);
|
|
149
|
+
const kept = unfinished ? lines.slice(0, unfinished.start) : lines;
|
|
150
|
+
const excludedPrompts = unfinished?.prompts ?? [];
|
|
151
|
+
const history = conversationOf(kept);
|
|
152
|
+
if (!history.conversation) return { startFresh: true, excludedPrompts };
|
|
153
|
+
if (!history.prompt) throw new Error("Cannot safely fork: earlier history has no user prompt");
|
|
154
|
+
const newClaudeSessionId = await writeFork(projectDir, kept);
|
|
155
|
+
logger.debug(`[CLAUDE FORK] Forked completed turns of ${sourceClaudeSessionId} -> ${newClaudeSessionId} (${excludedPrompts.length} prompt(s) left out)`);
|
|
156
|
+
return { newClaudeSessionId, excludedPrompts };
|
|
157
|
+
}
|
|
69
158
|
async function forkAndTruncateSession(projectDir, sourceClaudeSessionId, cutAfterUuid) {
|
|
70
159
|
const newId = randomUUID();
|
|
71
160
|
const src = jsonlPath(projectDir, sourceClaudeSessionId);
|
|
@@ -156,16 +245,7 @@ async function listClaudeRewindPoints(projectDir, claudeSessionId) {
|
|
|
156
245
|
}
|
|
157
246
|
async function forkBeforeUserMessage(projectDir, sourceClaudeSessionId, cutBeforeUuid) {
|
|
158
247
|
const src = jsonlPath(projectDir, sourceClaudeSessionId);
|
|
159
|
-
|
|
160
|
-
try {
|
|
161
|
-
raw = await readFile(src, "utf-8");
|
|
162
|
-
} catch (error) {
|
|
163
|
-
if (error.code === "ENOENT") throw new ForkSourceMissingError(src);
|
|
164
|
-
throw error;
|
|
165
|
-
}
|
|
166
|
-
const lines = raw.split("\n");
|
|
167
|
-
let hasPreviousConversation = false;
|
|
168
|
-
let hasPreviousPrompt = false;
|
|
248
|
+
const lines = completeLines(await readSource(src));
|
|
169
249
|
let cut = -1;
|
|
170
250
|
for (let i = 0; i < lines.length; i++) {
|
|
171
251
|
let entry;
|
|
@@ -179,28 +259,13 @@ async function forkBeforeUserMessage(projectDir, sourceClaudeSessionId, cutBefor
|
|
|
179
259
|
cut = i;
|
|
180
260
|
break;
|
|
181
261
|
}
|
|
182
|
-
if (!entry?.isSidechain && !entry?.isMeta && !entry?.isSynthetic && (entry?.type === "user" || entry?.type === "assistant")) {
|
|
183
|
-
hasPreviousConversation = true;
|
|
184
|
-
const content = entry.message?.content;
|
|
185
|
-
if (entry.type === "user" && (typeof content === "string" || Array.isArray(content) && content.length > 0 && !content.some((block) => block?.type === "tool_result"))) {
|
|
186
|
-
hasPreviousPrompt = true;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
262
|
}
|
|
190
263
|
if (cut < 0) throw new ForkTruncateUuidNotFoundError(cutBeforeUuid, src);
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
try {
|
|
197
|
-
await writeFile(temporary, lines.slice(0, cut).join("\n") + "\n", { encoding: "utf-8", flag: "wx" });
|
|
198
|
-
await rename(temporary, destination);
|
|
199
|
-
} catch (error) {
|
|
200
|
-
await unlink(temporary).catch(() => void 0);
|
|
201
|
-
throw error;
|
|
202
|
-
}
|
|
203
|
-
return newId;
|
|
264
|
+
const kept = lines.slice(0, cut);
|
|
265
|
+
const history = conversationOf(kept);
|
|
266
|
+
if (!history.conversation) return null;
|
|
267
|
+
if (!history.prompt) throw new Error("Cannot safely rewind: earlier history has no user prompt");
|
|
268
|
+
return writeFork(projectDir, kept);
|
|
204
269
|
}
|
|
205
270
|
|
|
206
|
-
export { ForkSourceMissingError as F,
|
|
271
|
+
export { ForkSourceMissingError as F, forkCompletedTurns as a, forkAndTruncateSession as b, ForkTruncateUuidNotFoundError as c, discardForkedSession as d, forkBeforeUserMessage as e, forkSession as f, listClaudeRewindPoints as l };
|
|
@@ -2,10 +2,10 @@ import { randomUUID } from 'node:crypto';
|
|
|
2
2
|
import { execFile } from 'node:child_process';
|
|
3
3
|
import { promisify } from 'node:util';
|
|
4
4
|
import { basename, dirname } from 'node:path';
|
|
5
|
-
import { f as isInsideTeamWorktree, g as rebaseTeamWorktreePath } from './index-
|
|
6
|
-
import { c as configuration } from './configuration-
|
|
7
|
-
import { r as readSettings, c as readPersistedSessions, b as readCredentialsForConfiguredRelay } from './persistence-
|
|
8
|
-
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-
|
|
5
|
+
import { f as isInsideTeamWorktree, g as rebaseTeamWorktreePath } from './index-BlWyEpMw.mjs';
|
|
6
|
+
import { c as configuration } from './configuration-CwfgJZKs.mjs';
|
|
7
|
+
import { r as readSettings, c as readPersistedSessions, b as readCredentialsForConfiguredRelay } from './persistence-CQhmtobL.mjs';
|
|
8
|
+
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-DcOpvIiR.mjs';
|
|
9
9
|
|
|
10
10
|
async function teamRequest(path, method, token, scoped, body) {
|
|
11
11
|
const response = await fetch(`${configuration.serverUrl}${path}`, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var configuration = require('./configuration-
|
|
4
|
-
var persistence = require('./persistence-
|
|
3
|
+
var configuration = require('./configuration-CKaq0tNe.cjs');
|
|
4
|
+
var persistence = require('./persistence-DBmeYlwT.cjs');
|
|
5
5
|
|
|
6
6
|
class AutomationsRequestError extends Error {
|
|
7
7
|
constructor(status, code, runStatus, invalidFields = []) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as configuration } from './configuration-
|
|
2
|
-
import { b as readCredentialsForConfiguredRelay } from './persistence-
|
|
1
|
+
import { c as configuration } from './configuration-CwfgJZKs.mjs';
|
|
2
|
+
import { b as readCredentialsForConfiguredRelay } from './persistence-CQhmtobL.mjs';
|
|
3
3
|
|
|
4
4
|
const UNSUPPORTED_BACKOFF_MS = 10 * 6e4;
|
|
5
5
|
class ProjectsUnsupportedError extends Error {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var configuration = require('./configuration-
|
|
4
|
-
var persistence = require('./persistence-
|
|
3
|
+
var configuration = require('./configuration-CKaq0tNe.cjs');
|
|
4
|
+
var persistence = require('./persistence-DBmeYlwT.cjs');
|
|
5
5
|
|
|
6
6
|
const UNSUPPORTED_BACKOFF_MS = 10 * 6e4;
|
|
7
7
|
class ProjectsUnsupportedError extends Error {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as configuration } from './configuration-
|
|
2
|
-
import { b as readCredentialsForConfiguredRelay, r as readSettings } from './persistence-
|
|
1
|
+
import { c as configuration } from './configuration-CwfgJZKs.mjs';
|
|
2
|
+
import { b as readCredentialsForConfiguredRelay, r as readSettings } from './persistence-CQhmtobL.mjs';
|
|
3
3
|
|
|
4
4
|
class AutomationsRequestError extends Error {
|
|
5
5
|
constructor(status, code, runStatus, invalidFields = []) {
|
|
@@ -4,10 +4,10 @@ var node_crypto = require('node:crypto');
|
|
|
4
4
|
var node_child_process = require('node:child_process');
|
|
5
5
|
var node_util = require('node:util');
|
|
6
6
|
var path = require('node:path');
|
|
7
|
-
var index = require('./index-
|
|
8
|
-
var configuration = require('./configuration-
|
|
9
|
-
var persistence = require('./persistence-
|
|
10
|
-
var context = require('./context-
|
|
7
|
+
var index = require('./index-D9Hidq-g.cjs');
|
|
8
|
+
var configuration = require('./configuration-CKaq0tNe.cjs');
|
|
9
|
+
var persistence = require('./persistence-DBmeYlwT.cjs');
|
|
10
|
+
var context = require('./context-DbENnaVc.cjs');
|
|
11
11
|
|
|
12
12
|
async function teamRequest(path, method, token, scoped, body) {
|
|
13
13
|
const response = await fetch(`${configuration.configuration.serverUrl}${path}`, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tools = require('../tools-
|
|
4
|
-
var reportProgressTool = require('../reportProgressTool-
|
|
5
|
-
var peerTools = require('../peerTools-
|
|
3
|
+
var tools = require('../tools-B3KGMSU5.cjs');
|
|
4
|
+
var reportProgressTool = require('../reportProgressTool-CIHGKraF.cjs');
|
|
5
|
+
var peerTools = require('../peerTools-BXSjS8lB.cjs');
|
|
6
6
|
var agentGuidance = require('../agentGuidance-BtBx2xxE.cjs');
|
|
7
7
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
8
8
|
var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
@@ -10,37 +10,37 @@ var index_js = require('@modelcontextprotocol/sdk/client/index.js');
|
|
|
10
10
|
var streamableHttp_js = require('@modelcontextprotocol/sdk/client/streamableHttp.js');
|
|
11
11
|
var z = require('zod');
|
|
12
12
|
var limits = require('../limits-C-a7gr04.cjs');
|
|
13
|
-
require('../client-
|
|
13
|
+
require('../client-DxjYsJ8d.cjs');
|
|
14
14
|
require('node:crypto');
|
|
15
15
|
require('node:child_process');
|
|
16
16
|
require('node:util');
|
|
17
17
|
require('node:path');
|
|
18
|
-
require('../index-
|
|
18
|
+
require('../index-D9Hidq-g.cjs');
|
|
19
19
|
require('@paralleldrive/cuid2');
|
|
20
|
-
require('../configuration-
|
|
20
|
+
require('../configuration-CKaq0tNe.cjs');
|
|
21
21
|
require('node:fs');
|
|
22
22
|
require('node:os');
|
|
23
|
-
require('../package-
|
|
23
|
+
require('../package-B61-BBlh.cjs');
|
|
24
24
|
require('node:fs/promises');
|
|
25
|
-
require('../persistence-
|
|
25
|
+
require('../persistence-DBmeYlwT.cjs');
|
|
26
26
|
require('../authRelay-Dy1qU9td.cjs');
|
|
27
27
|
require('tweetnacl');
|
|
28
|
-
require('../logger-
|
|
28
|
+
require('../logger-BZ5TcbEh.cjs');
|
|
29
29
|
require('chalk');
|
|
30
|
-
require('../context-
|
|
31
|
-
require('../client-
|
|
30
|
+
require('../context-DbENnaVc.cjs');
|
|
31
|
+
require('../client-BlV73Gbw.cjs');
|
|
32
32
|
require('../precheckCompat-CWOi5c9L.cjs');
|
|
33
|
-
require('../client-
|
|
33
|
+
require('../client-DcXLNaF2.cjs');
|
|
34
34
|
require('../prompt-Bof2aQkI.cjs');
|
|
35
35
|
require('../ids-B6ZC0HGt.cjs');
|
|
36
|
-
require('../controlClient-
|
|
37
|
-
require('../sessionOps-
|
|
36
|
+
require('../controlClient-D_HIbnnS.cjs');
|
|
37
|
+
require('../sessionOps-74pSDXoS.cjs');
|
|
38
38
|
require('axios');
|
|
39
|
-
require('../time-
|
|
39
|
+
require('../time-BPPTQ_sE.cjs');
|
|
40
40
|
require('../specialCommands-J3JFOq0J.cjs');
|
|
41
41
|
require('socket.io-client');
|
|
42
42
|
require('../backgroundTaskActivity-CBvUdj39.cjs');
|
|
43
|
-
require('../remoteSessionClient-
|
|
43
|
+
require('../remoteSessionClient-D6_7vNKc.cjs');
|
|
44
44
|
require('../trimIdent-4gvk9Wk6.cjs');
|
|
45
45
|
|
|
46
46
|
function parseArgs(argv) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerTeamsTools } from '../tools-
|
|
2
|
-
import { r as registerAutomationTools, a as registerProjectTools, b as registerReportProgressTool } from '../reportProgressTool-
|
|
3
|
-
import { r as registerSessionPeerTools } from '../peerTools-
|
|
1
|
+
import { r as registerTeamsTools } from '../tools-DqjPHq9I.mjs';
|
|
2
|
+
import { r as registerAutomationTools, a as registerProjectTools, b as registerReportProgressTool } from '../reportProgressTool-HjzV5y_2.mjs';
|
|
3
|
+
import { r as registerSessionPeerTools } from '../peerTools-DS6GqJcn.mjs';
|
|
4
4
|
import { P as PREVIEW_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, c as PREVIEW_DOWNLOAD_PARAM_DESCRIPTION, R as REPORT_PROGRESS_TOOL_NAME } from '../agentGuidance-BDYt2Qy2.mjs';
|
|
5
5
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
@@ -8,37 +8,37 @@ import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
|
8
8
|
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION } from '../limits-DIo7rEBR.mjs';
|
|
11
|
-
import '../client-
|
|
11
|
+
import '../client-BhAjEv8Z.mjs';
|
|
12
12
|
import 'node:crypto';
|
|
13
13
|
import 'node:child_process';
|
|
14
14
|
import 'node:util';
|
|
15
15
|
import 'node:path';
|
|
16
|
-
import '../index-
|
|
16
|
+
import '../index-BlWyEpMw.mjs';
|
|
17
17
|
import '@paralleldrive/cuid2';
|
|
18
|
-
import '../configuration-
|
|
18
|
+
import '../configuration-CwfgJZKs.mjs';
|
|
19
19
|
import 'node:fs';
|
|
20
20
|
import 'node:os';
|
|
21
|
-
import '../package-
|
|
21
|
+
import '../package-C4OfB2YF.mjs';
|
|
22
22
|
import 'node:fs/promises';
|
|
23
|
-
import '../persistence-
|
|
23
|
+
import '../persistence-CQhmtobL.mjs';
|
|
24
24
|
import '../authRelay-DhQhkBvX.mjs';
|
|
25
25
|
import 'tweetnacl';
|
|
26
|
-
import '../logger-
|
|
26
|
+
import '../logger-UgDpJA2u.mjs';
|
|
27
27
|
import 'chalk';
|
|
28
|
-
import '../context-
|
|
29
|
-
import '../client-
|
|
28
|
+
import '../context-DcOpvIiR.mjs';
|
|
29
|
+
import '../client-DpTk1S7C.mjs';
|
|
30
30
|
import '../precheckCompat-DeEbilbr.mjs';
|
|
31
|
-
import '../client-
|
|
31
|
+
import '../client-CydHzidF.mjs';
|
|
32
32
|
import '../prompt-QHuFx9j6.mjs';
|
|
33
33
|
import '../ids-DU6sLx4C.mjs';
|
|
34
|
-
import '../controlClient-
|
|
35
|
-
import '../sessionOps-
|
|
34
|
+
import '../controlClient-Dv6IvvUq.mjs';
|
|
35
|
+
import '../sessionOps-BkEgNA2O.mjs';
|
|
36
36
|
import 'axios';
|
|
37
|
-
import '../time-
|
|
37
|
+
import '../time-CIkdLyza.mjs';
|
|
38
38
|
import '../specialCommands-MXUN0wfI.mjs';
|
|
39
39
|
import 'socket.io-client';
|
|
40
40
|
import '../backgroundTaskActivity-8PdPxrvy.mjs';
|
|
41
|
-
import '../remoteSessionClient
|
|
41
|
+
import '../remoteSessionClient-DQSnC7ox.mjs';
|
|
42
42
|
import '../trimIdent-BAjmv_TG.mjs';
|
|
43
43
|
|
|
44
44
|
function parseArgs(argv) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFileSync, renameSync, rmSync, symlinkSync, mkdirSync, lstatSync, readlinkSync, readdirSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
|
-
import { l as accountCodexHomePath, b as accountSecretPath, e as expandHome } from './store-
|
|
4
|
+
import { l as accountCodexHomePath, b as accountSecretPath, e as expandHome } from './store-Tf-r1ouq.mjs';
|
|
5
5
|
|
|
6
6
|
/*!
|
|
7
7
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var node_child_process = require('node:child_process');
|
|
4
4
|
var spawn = require('cross-spawn');
|
|
5
5
|
var node_readline = require('node:readline');
|
|
6
|
-
var logger = require('./logger-
|
|
6
|
+
var logger = require('./logger-BZ5TcbEh.cjs');
|
|
7
7
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
8
8
|
var manager = require('./manager-HrEj442o.cjs');
|
|
9
|
-
var _package = require('./package-
|
|
10
|
-
var rateLimitWindows = require('./rateLimitWindows-
|
|
9
|
+
var _package = require('./package-B61-BBlh.cjs');
|
|
10
|
+
var rateLimitWindows = require('./rateLimitWindows-BIfLMxOk.cjs');
|
|
11
11
|
var processTree = require('./processTree-CMHWlVse.cjs');
|
|
12
12
|
|
|
13
13
|
const CODEX_HELPER_LABEL_MAX_CHARS = 80;
|
|
@@ -191,6 +191,7 @@ class CodexAppServerClient {
|
|
|
191
191
|
static MAX_CHILD_LABELS = 128;
|
|
192
192
|
// Handlers set by the consumer (runCodex.ts)
|
|
193
193
|
eventHandler = null;
|
|
194
|
+
rawNotificationListeners = /* @__PURE__ */ new Set();
|
|
194
195
|
approvalHandler = null;
|
|
195
196
|
// B-555: subscription rate-limit snapshots (sparse notifications + throttled reads).
|
|
196
197
|
rateLimitHandler = null;
|
|
@@ -868,6 +869,55 @@ ${text}`.slice(-400);
|
|
|
868
869
|
};
|
|
869
870
|
return await this.request("thread/inject_items", params);
|
|
870
871
|
}
|
|
872
|
+
// ─── B-861 side questions ───────────────────────────────────
|
|
873
|
+
// A side client (its own app-server process) drives a throwaway thread
|
|
874
|
+
// with these; none of them touch `_threadId` / `_turnId`, so the client's
|
|
875
|
+
// turn tracking and reconnect-resume stay out of it.
|
|
876
|
+
/** Every app-server notification, raw. Returns the unsubscribe. */
|
|
877
|
+
onRawNotification(listener) {
|
|
878
|
+
this.rawNotificationListeners.add(listener);
|
|
879
|
+
return () => {
|
|
880
|
+
this.rawNotificationListeners.delete(listener);
|
|
881
|
+
};
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* An ephemeral (never persisted) thread for one side question. With
|
|
885
|
+
* `sourceThreadId`: `thread/fork` of the main thread — Codex 0.154 forks a
|
|
886
|
+
* running thread from a second app-server with the turn in flight as
|
|
887
|
+
* `interrupted`, and writes nothing to the source rollout
|
|
888
|
+
* (vh-team-B-861/codex-probe1.log). `excludeTurns` is required for an
|
|
889
|
+
* ephemeral fork of a paginated thread. Read-only sandbox, approval never.
|
|
890
|
+
*/
|
|
891
|
+
async openSideThread(opts) {
|
|
892
|
+
await this.ensureConnected();
|
|
893
|
+
const common = {
|
|
894
|
+
model: opts.model ?? null,
|
|
895
|
+
modelProvider: this.accountOverrides.modelProvider ?? null,
|
|
896
|
+
cwd: opts.cwd,
|
|
897
|
+
approvalPolicy: "never",
|
|
898
|
+
sandbox: "read-only",
|
|
899
|
+
config: { ...this.accountOverrides.config, "features.hooks": false },
|
|
900
|
+
baseInstructions: null,
|
|
901
|
+
developerInstructions: opts.developerInstructions,
|
|
902
|
+
ephemeral: true,
|
|
903
|
+
persistExtendedHistory: false
|
|
904
|
+
};
|
|
905
|
+
const result = opts.sourceThreadId ? await this.request("thread/fork", { ...common, threadId: opts.sourceThreadId, excludeTurns: true, threadSource: null }) : await this.request("thread/start", { ...common, profile: null, compactPrompt: null, includeApplyPatchTool: false, experimentalRawEvents: false });
|
|
906
|
+
return { threadId: result.thread.id };
|
|
907
|
+
}
|
|
908
|
+
/** `turn/start` on a side thread; resolves with the turn id once accepted. */
|
|
909
|
+
async startSideTurn(threadId, text) {
|
|
910
|
+
const result = await this.request("turn/start", {
|
|
911
|
+
threadId,
|
|
912
|
+
input: [{ type: "text", text }],
|
|
913
|
+
approvalPolicy: "never",
|
|
914
|
+
sandboxPolicy: { type: "readOnly" }
|
|
915
|
+
});
|
|
916
|
+
return typeof result?.turn?.id === "string" ? result.turn.id : null;
|
|
917
|
+
}
|
|
918
|
+
async interruptSideTurn(threadId, turnId) {
|
|
919
|
+
await this.request("turn/interrupt", { threadId, turnId });
|
|
920
|
+
}
|
|
871
921
|
async reconnectAndResumeThread() {
|
|
872
922
|
const threadId = this._threadId;
|
|
873
923
|
await this.disconnectInternal({ preserveThreadState: !!threadId });
|
|
@@ -1505,6 +1555,13 @@ ${text}`.slice(-400);
|
|
|
1505
1555
|
}
|
|
1506
1556
|
handleNotification(method, params) {
|
|
1507
1557
|
this.touchTurnWatchdog();
|
|
1558
|
+
for (const listener of this.rawNotificationListeners) {
|
|
1559
|
+
try {
|
|
1560
|
+
listener(method, params);
|
|
1561
|
+
} catch (error) {
|
|
1562
|
+
logger.logger.debug("[CodexAppServer] raw notification listener failed", contentLogMetadata.errorLogMetadata(error));
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1508
1565
|
if (method === "codex/event" || method.startsWith("codex/event/")) {
|
|
1509
1566
|
this.notificationProtocol = "legacy";
|
|
1510
1567
|
const msg = params?.msg;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
2
|
import { spawn } from 'cross-spawn';
|
|
3
3
|
import { createInterface } from 'node:readline';
|
|
4
|
-
import { l as logger } from './logger-
|
|
4
|
+
import { l as logger } from './logger-UgDpJA2u.mjs';
|
|
5
5
|
import { e as errorLogMetadata, c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
6
6
|
import { i as initializeSandbox, w as wrapForMcpTransport } from './manager-BEsI4qt3.mjs';
|
|
7
|
-
import { p as packageJson } from './package-
|
|
8
|
-
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-
|
|
7
|
+
import { p as packageJson } from './package-C4OfB2YF.mjs';
|
|
8
|
+
import { s as shouldReadCodexRateLimits, i as isUnsupportedCodexMethodError } from './rateLimitWindows-8-khalzj.mjs';
|
|
9
9
|
import { s as stopProcessGracefully, k as killProcessTree } from './processTree-CP5IvQ2Z.mjs';
|
|
10
10
|
|
|
11
11
|
const CODEX_HELPER_LABEL_MAX_CHARS = 80;
|
|
@@ -189,6 +189,7 @@ class CodexAppServerClient {
|
|
|
189
189
|
static MAX_CHILD_LABELS = 128;
|
|
190
190
|
// Handlers set by the consumer (runCodex.ts)
|
|
191
191
|
eventHandler = null;
|
|
192
|
+
rawNotificationListeners = /* @__PURE__ */ new Set();
|
|
192
193
|
approvalHandler = null;
|
|
193
194
|
// B-555: subscription rate-limit snapshots (sparse notifications + throttled reads).
|
|
194
195
|
rateLimitHandler = null;
|
|
@@ -866,6 +867,55 @@ ${text}`.slice(-400);
|
|
|
866
867
|
};
|
|
867
868
|
return await this.request("thread/inject_items", params);
|
|
868
869
|
}
|
|
870
|
+
// ─── B-861 side questions ───────────────────────────────────
|
|
871
|
+
// A side client (its own app-server process) drives a throwaway thread
|
|
872
|
+
// with these; none of them touch `_threadId` / `_turnId`, so the client's
|
|
873
|
+
// turn tracking and reconnect-resume stay out of it.
|
|
874
|
+
/** Every app-server notification, raw. Returns the unsubscribe. */
|
|
875
|
+
onRawNotification(listener) {
|
|
876
|
+
this.rawNotificationListeners.add(listener);
|
|
877
|
+
return () => {
|
|
878
|
+
this.rawNotificationListeners.delete(listener);
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* An ephemeral (never persisted) thread for one side question. With
|
|
883
|
+
* `sourceThreadId`: `thread/fork` of the main thread — Codex 0.154 forks a
|
|
884
|
+
* running thread from a second app-server with the turn in flight as
|
|
885
|
+
* `interrupted`, and writes nothing to the source rollout
|
|
886
|
+
* (vh-team-B-861/codex-probe1.log). `excludeTurns` is required for an
|
|
887
|
+
* ephemeral fork of a paginated thread. Read-only sandbox, approval never.
|
|
888
|
+
*/
|
|
889
|
+
async openSideThread(opts) {
|
|
890
|
+
await this.ensureConnected();
|
|
891
|
+
const common = {
|
|
892
|
+
model: opts.model ?? null,
|
|
893
|
+
modelProvider: this.accountOverrides.modelProvider ?? null,
|
|
894
|
+
cwd: opts.cwd,
|
|
895
|
+
approvalPolicy: "never",
|
|
896
|
+
sandbox: "read-only",
|
|
897
|
+
config: { ...this.accountOverrides.config, "features.hooks": false },
|
|
898
|
+
baseInstructions: null,
|
|
899
|
+
developerInstructions: opts.developerInstructions,
|
|
900
|
+
ephemeral: true,
|
|
901
|
+
persistExtendedHistory: false
|
|
902
|
+
};
|
|
903
|
+
const result = opts.sourceThreadId ? await this.request("thread/fork", { ...common, threadId: opts.sourceThreadId, excludeTurns: true, threadSource: null }) : await this.request("thread/start", { ...common, profile: null, compactPrompt: null, includeApplyPatchTool: false, experimentalRawEvents: false });
|
|
904
|
+
return { threadId: result.thread.id };
|
|
905
|
+
}
|
|
906
|
+
/** `turn/start` on a side thread; resolves with the turn id once accepted. */
|
|
907
|
+
async startSideTurn(threadId, text) {
|
|
908
|
+
const result = await this.request("turn/start", {
|
|
909
|
+
threadId,
|
|
910
|
+
input: [{ type: "text", text }],
|
|
911
|
+
approvalPolicy: "never",
|
|
912
|
+
sandboxPolicy: { type: "readOnly" }
|
|
913
|
+
});
|
|
914
|
+
return typeof result?.turn?.id === "string" ? result.turn.id : null;
|
|
915
|
+
}
|
|
916
|
+
async interruptSideTurn(threadId, turnId) {
|
|
917
|
+
await this.request("turn/interrupt", { threadId, turnId });
|
|
918
|
+
}
|
|
869
919
|
async reconnectAndResumeThread() {
|
|
870
920
|
const threadId = this._threadId;
|
|
871
921
|
await this.disconnectInternal({ preserveThreadState: !!threadId });
|
|
@@ -1503,6 +1553,13 @@ ${text}`.slice(-400);
|
|
|
1503
1553
|
}
|
|
1504
1554
|
handleNotification(method, params) {
|
|
1505
1555
|
this.touchTurnWatchdog();
|
|
1556
|
+
for (const listener of this.rawNotificationListeners) {
|
|
1557
|
+
try {
|
|
1558
|
+
listener(method, params);
|
|
1559
|
+
} catch (error) {
|
|
1560
|
+
logger.debug("[CodexAppServer] raw notification listener failed", errorLogMetadata(error));
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1506
1563
|
if (method === "codex/event" || method.startsWith("codex/event/")) {
|
|
1507
1564
|
this.notificationProtocol = "legacy";
|
|
1508
1565
|
const msg = params?.msg;
|