very-happy-cli 0.2.179 → 0.2.181
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-DFipFF7-.cjs → AcpBackend-CgHb_ya5.cjs} +3 -3
- package/dist/{AcpBackend-CHp3y7cb.mjs → AcpBackend-DZGCSuXF.mjs} +3 -3
- package/dist/{AcpSessionManager-0zpvRJXc.cjs → AcpSessionManager-CacC2EVn.cjs} +1 -1
- package/dist/{AcpSessionManager-d2-rKWWa.mjs → AcpSessionManager-DwuPzWBh.mjs} +1 -1
- package/dist/{BasePermissionHandler-CH3zuEkA.cjs → BasePermissionHandler-DCP8ZEB4.cjs} +1 -1
- package/dist/{BasePermissionHandler-DdZBYIR4.mjs → BasePermissionHandler-Uo-GUjbb.mjs} +1 -1
- package/dist/{acpSessionResume-DTGmAPLt.mjs → acpSessionResume-9OLTD6kT.mjs} +1 -1
- package/dist/{acpSessionResume-oiCBnAVA.cjs → acpSessionResume-BaVMD80f.cjs} +1 -1
- package/dist/{agentHome-CghLvL_1.mjs → agentHome-B1BsKeqD.mjs} +4 -4
- package/dist/{agentHome-BWcz8mz0.cjs → agentHome-BtUmGcPX.cjs} +4 -4
- package/dist/{api-Cmjfr8Z7.cjs → api-COHFAkb_.cjs} +20 -12
- package/dist/{api-CzwFpJQc.mjs → api-Dr3wXL_7.mjs} +21 -13
- package/dist/{apiMachine-DJkTEiqy.mjs → apiMachine-CHEzPQdS.mjs} +73 -32
- package/dist/{apiMachine-G6OogT08.cjs → apiMachine-D8H7CXaz.cjs} +75 -34
- package/dist/{attachmentContent-B2os4HbA.mjs → attachmentContent-1YwtKgWl.mjs} +2 -2
- package/dist/{attachmentContent-Bo0UAsSu.cjs → attachmentContent-mIhbtRKl.cjs} +2 -2
- package/dist/{auth-DMX0xPNK.mjs → auth-CbZkcMAb.mjs} +8 -8
- package/dist/{auth-D6bBUwZa.cjs → auth-CgQP7d0q.cjs} +5 -5
- package/dist/{auth-BS6PaOOG.mjs → auth-DZsthtSk.mjs} +5 -5
- package/dist/{auth-HEhRaNgL.cjs → auth-Fg8fLadK.cjs} +8 -8
- package/dist/{auto-C6I55iOh.cjs → auto-BB7kqSh5.cjs} +19 -19
- package/dist/{auto-Cl1SEDcD.mjs → auto-_T-Ud-z5.mjs} +19 -19
- package/dist/{backgroundTaskActivity-BVwJBl02.mjs → backgroundTaskActivity-8PdPxrvy.mjs} +1 -1
- package/dist/{bootstrap-iuyufnp3.mjs → bootstrap-B6EkZh4u.mjs} +2 -2
- package/dist/{bootstrap-exVucYav.cjs → bootstrap-CYtOtbi7.cjs} +2 -2
- package/dist/{browser-CSYum7xH.mjs → browser-C2qhUHSE.mjs} +1 -1
- package/dist/{browser-BohJK12g.cjs → browser-DjNNQQk2.cjs} +1 -1
- package/dist/{claudeCliPath-U4HHmV4r.cjs → claudeCliPath-GaP3UUz1.cjs} +1 -1
- package/dist/{claudeLocal-Dq_R3Ax_.mjs → claudeLocal-BAFjWhZ8.mjs} +6 -6
- package/dist/{claudeLocal-re4yjSTx.cjs → claudeLocal-O_w7-fBh.cjs} +8 -8
- package/dist/{claudeLocalLauncher-CN67lN7-.mjs → claudeLocalLauncher-CWn30LZR.mjs} +11 -11
- package/dist/{claudeLocalLauncher-B4hJHpCA.cjs → claudeLocalLauncher-Df3zg1q0.cjs} +13 -13
- package/dist/{claudeSessionFork-BihfD0Ik.mjs → claudeSessionFork-2ZkSTOGn.mjs} +1 -1
- package/dist/{claudeSessionFork-DiSMYerV.cjs → claudeSessionFork-pwcKqB-e.cjs} +1 -1
- package/dist/{client-BhoEBnuN.mjs → client-BKyU66lg.mjs} +2 -2
- package/dist/{client-BKcK1Bi-.cjs → client-CUO3ItoB.cjs} +34 -8
- package/dist/{client-wo9nbxuf.mjs → client-CXOnzuOy.mjs} +2 -2
- package/dist/{client-ZjOsn6nZ.cjs → client-DWs6k041.cjs} +2 -2
- package/dist/{client-CuVdN6PP.cjs → client-D_U2VjO3.cjs} +2 -2
- package/dist/{client-DuTDwWSQ.mjs → client-DsQcxVUV.mjs} +34 -9
- package/dist/codex/happyMcpStdioBridge.cjs +17 -17
- package/dist/codex/happyMcpStdioBridge.mjs +18 -18
- package/dist/{codexAppServerClient-Dt5zxrun.cjs → codexAppServerClient-BRX3JZ_5.cjs} +3 -3
- package/dist/{codexAppServerClient-BK3zra_1.mjs → codexAppServerClient-C3JO3pwM.mjs} +3 -3
- package/dist/{codexCommand-B6pY7CMh.mjs → codexCommand-BZIAAqKS.mjs} +59 -51
- package/dist/{codexCommand-CAZ1SLjg.cjs → codexCommand-dKOc5iQl.cjs} +85 -77
- package/dist/{codexTermination-DmGbHxcD.cjs → codexTermination-BVR9HeVI.cjs} +7 -2
- package/dist/{codexTermination-Cd1Eon_4.mjs → codexTermination-ztFkwHrG.mjs} +7 -2
- package/dist/{config-2oMG_fEI.mjs → config-NbHjx8ge.mjs} +3 -3
- package/dist/{config-B0uK6K7n.cjs → config-cftYxLC7.cjs} +26 -26
- package/dist/{configuration-WMi4idBB.mjs → configuration-BPrfb17M.mjs} +1 -1
- package/dist/{configuration-CMHZnp6G.cjs → configuration-C8JgseHy.cjs} +1 -1
- package/dist/{connect-uaglGrde.cjs → connect-Br8VMrK1.cjs} +27 -27
- package/dist/{connect-BLVHhHzA.mjs → connect-CLD1ai0k.mjs} +14 -14
- package/dist/{context-DXzU5bFM.cjs → context-D1lgQTJC.cjs} +1 -1
- package/dist/{context-DploEcoN.mjs → context-_YGq8xdH.mjs} +1 -1
- package/dist/{controlClient-BWUJrj3t.mjs → controlClient-CkNpT5zS.mjs} +4 -4
- package/dist/{controlClient-C-5qCt8W.cjs → controlClient-D68Zj7Q-.cjs} +3 -3
- package/dist/{createSessionMetadata-3uXrJgOW.mjs → createSessionMetadata-3WAj3_xl.mjs} +2 -2
- package/dist/{createSessionMetadata-BkIzHALd.cjs → createSessionMetadata-DNIbKLHg.cjs} +3 -3
- package/dist/{defaultPermissionMode-pS3vmiSg.cjs → defaultPermissionMode-BmvjP32v.cjs} +2 -2
- package/dist/{defaultPermissionMode-BzxLh20a.mjs → defaultPermissionMode-DXMznl8v.mjs} +2 -2
- package/dist/{detectCLI-DR9ZaN6B.cjs → detectCLI-BuYR_Qxe.cjs} +4 -4
- package/dist/{deterministicJson-B8z2GPi9.cjs → deterministicJson-BS7D7URE.cjs} +89 -24
- package/dist/{deterministicJson-D_whDMFd.mjs → deterministicJson-BcBIKKf1.mjs} +87 -24
- package/dist/{doctor-Br1Kcy2J.cjs → doctor-Be7zC0AF.cjs} +10 -9
- package/dist/{doctor-CmtSsR2-.mjs → doctor-CoOaPq6w.mjs} +8 -8
- package/dist/{doctorReadiness-BCZGcN0a.cjs → doctorReadiness-Dl6yRQCy.cjs} +1 -1
- package/dist/{downloadTarget-BoNwTIH_.mjs → downloadTarget-CeaAXdJj.mjs} +6 -6
- package/dist/{downloadTarget-BQJK_6oH.cjs → downloadTarget-LyOiucn_.cjs} +6 -6
- package/dist/{ensureDaemonRunning-Czo9IHJQ.mjs → ensureDaemonRunning--98j7-17.mjs} +5 -5
- package/dist/{ensureDaemonRunning-BRUmsq6J.cjs → ensureDaemonRunning-B8z37VKD.cjs} +6 -6
- package/dist/fileStore-5qpetZS0.mjs +146 -0
- package/dist/fileStore-7qhnbs6N.cjs +152 -0
- package/dist/{handleResumeCommand-tKD_Hpxc.cjs → handleResumeCommand-BFZlrFVH.cjs} +7 -7
- package/dist/{handleResumeCommand-C8thKjqf.mjs → handleResumeCommand-gO8I4keP.mjs} +6 -6
- package/dist/{index-DMqDMT1Q.cjs → index-B5PXbZjW.cjs} +80 -62
- package/dist/{index-D09T1m8Y.cjs → index-BRMq9gOe.cjs} +3 -3
- package/dist/{index-B0UjHlAe.cjs → index-BkluinoS.cjs} +4 -4
- package/dist/{index-CdQI0C9p.mjs → index-CO0n9ue6.mjs} +4 -4
- package/dist/{index-DPOa4NhL.mjs → index-CeRXrGnH.mjs} +41 -6
- package/dist/{index-C6O2vVjm.cjs → index-Df2eHm3O.cjs} +42 -6
- package/dist/{index-BTxHphpV.mjs → index-DneHoQXf.mjs} +80 -62
- package/dist/{index-BiyC7cZ3.mjs → index-WUj3954m.mjs} +4 -4
- package/dist/{index-D3bidoG8.mjs → index-hQ8LP1C2.mjs} +3 -3
- package/dist/{index-CUuc6iCn.cjs → index-jF2t3ACW.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BX3lv3NO.mjs → install-D0inLCv-.mjs} +1 -1
- package/dist/{install-BXvf2E3o.cjs → install-D2NCbeJ-.cjs} +1 -1
- package/dist/{install-hnve_9vq.mjs → install-DkYFiVK4.mjs} +3 -3
- package/dist/{install-CYRZxS87.cjs → install-FqkSUjPC.cjs} +7 -7
- package/dist/{installPiTools-BKnXjrVu.cjs → installPiTools-CL_axh_6.cjs} +1 -1
- package/dist/{installTerminalHooks-BQZbvxsZ.cjs → installTerminalHooks-BETLKAtd.cjs} +3 -3
- package/dist/lib.cjs +13 -13
- package/dist/lib.d.cts +216 -2
- package/dist/lib.d.mts +216 -2
- package/dist/lib.mjs +13 -13
- package/dist/{lidState-Bb8fgXg3.mjs → lidState-DghbfRbr.mjs} +1 -1
- package/dist/{lidState-Dv2wwFTj.cjs → lidState-x8cJ8J_9.cjs} +1 -1
- package/dist/{localHappyAgentAuth-DjYvkXvV.cjs → localHappyAgentAuth-DZ2kb9uq.cjs} +1 -1
- package/dist/{localHappyAgentAuth-NEU7fax7.mjs → localHappyAgentAuth-IKmeRpuQ.mjs} +1 -1
- package/dist/{logger-C1GWx3gi.cjs → logger-DgBwUSgS.cjs} +2 -2
- package/dist/{logger-BtVhHnD8.mjs → logger-LFr8iPgl.mjs} +2 -2
- package/dist/machineMetadata-BglCsfvf.mjs +75 -0
- package/dist/machineMetadata-DB03ez4K.cjs +87 -0
- package/dist/{main-CWhSsbtU.cjs → main-YQ-Vkakw.cjs} +99 -132
- package/dist/{main-B2LWV8DI.mjs → main-_1LSzlLv.mjs} +93 -126
- package/dist/{mcp-CARUsXHV.cjs → mcp-BIY80jSc.cjs} +15 -15
- package/dist/{mcp-ext92q3Y.mjs → mcp-Csj-mT5Y.mjs} +15 -15
- package/dist/{mirrorProtocol-DEy2g1CB.cjs → mirrorProtocol-BphKIAK9.cjs} +15 -6
- package/dist/{mirrorProtocol-BwYibqry.mjs → mirrorProtocol-CAxOMBkb.mjs} +15 -6
- package/dist/{package-BPPebGQF.mjs → package-DYGwlmXl.mjs} +9 -8
- package/dist/{package-SgqTYsjn.cjs → package-NoD8QOOM.cjs} +9 -8
- package/dist/{panels-BZ0_Tt7B.mjs → panels-B8zRm7_d.mjs} +5 -5
- package/dist/{panels-D1c7q2dD.cjs → panels-DYEc1NyQ.cjs} +5 -5
- package/dist/{peerTools-CWKzcQ7u.mjs → peerTools-CK3JYu1k.mjs} +5 -5
- package/dist/{peerTools-DRQETXaz.cjs → peerTools-CP-x-Peu.cjs} +5 -5
- package/dist/{persistence-BegE7NPa.cjs → persistence-BY-D00wT.cjs} +2 -2
- package/dist/{persistence-Cr-wutZ4.mjs → persistence-D2Djrf7t.mjs} +2 -2
- package/dist/pi-CqyoZMjI.mjs +380 -0
- package/dist/pi-DlsrPCTa.cjs +400 -0
- package/dist/{piRunnerArgs-DwvM_yWA.mjs → piRunnerArgs-IZLoL7TG.mjs} +1 -1
- package/dist/{piRunnerArgs-Cs-378Vz.cjs → piRunnerArgs-gxLYIZH4.cjs} +1 -1
- package/dist/{piRuntime-Bue5mnlc.mjs → piRuntime-D7Y4oHVL.mjs} +2 -2
- package/dist/{piRuntime-BG-1td_n.cjs → piRuntime-o5L8uX-W.cjs} +2 -2
- package/dist/{piTerminal-G4z-xVyy.cjs → piTerminal-C_-JDkLN.cjs} +18 -18
- package/dist/{piTerminal-B5x9X5yV.mjs → piTerminal-Kphx8Uhw.mjs} +18 -18
- package/dist/projectPath-C3ioB4Bu.cjs +13 -0
- package/dist/{prompt-lgF9IE82.cjs → prompt-Bof2aQkI.cjs} +7 -2
- package/dist/{prompt-BOouDaTM.mjs → prompt-QHuFx9j6.mjs} +7 -2
- package/dist/{pushNotifications-DaLQUyi0.cjs → pushNotifications-BXoOSq_G.cjs} +14 -4
- package/dist/{pushNotifications-BdFjDjQe.mjs → pushNotifications-DXGIhE-A.mjs} +14 -4
- package/dist/{query-DYP_W1wp.mjs → query-CcA6DVZK.mjs} +1 -1
- package/dist/{query-Ctfg-5gy.cjs → query-CdCxzuaB.cjs} +1 -1
- package/dist/{rateLimitWindows-Dj_8voBK.cjs → rateLimitWindows-OpAmdOtC.cjs} +1 -1
- package/dist/{rateLimitWindows-CuEqk_0g.mjs → rateLimitWindows-ZtHZHe-l.mjs} +1 -1
- package/dist/{registerCommonHandlers-Cj084Sg7.cjs → registerCommonHandlers-CRjBoJLK.cjs} +30 -30
- package/dist/{registerCommonHandlers-BAlP7SGc.mjs → registerCommonHandlers-DF6bdDtd.mjs} +2 -2
- package/dist/{registerKillSessionHandler-qMju0ZfF.cjs → registerKillSessionHandler-7fOm6ooh.cjs} +6 -6
- package/dist/{registerKillSessionHandler-PD0jWtQo.mjs → registerKillSessionHandler-DDCKL3wf.mjs} +6 -6
- package/dist/{remoteSessionClient-Bn2qu5C5.mjs → remoteSessionClient-B2POSKFT.mjs} +5 -5
- package/dist/{remoteSessionClient-B7i7MkYV.cjs → remoteSessionClient-CFCn42bs.cjs} +5 -5
- package/dist/{reportProgressTool-gHItlSzz.mjs → reportProgressTool-tPxEvh6x.mjs} +4 -4
- package/dist/{reportProgressTool-CM1JFAHg.cjs → reportProgressTool-th4trcET.cjs} +4 -4
- package/dist/{resources-CvIlkzpP.cjs → resources-BPyN59Iv.cjs} +23 -2
- package/dist/{resources-y9jfyO-_.mjs → resources-CH1iP6Cv.mjs} +22 -3
- package/dist/{run-CNXwIe0A.cjs → run-C_FumCQk.cjs} +2767 -183
- package/dist/{run-BM4TxiyN.mjs → run-cKQBbVi4.mjs} +2762 -178
- package/dist/{runClaude-C_3I8hvR.mjs → runClaude-CYnM6krL.mjs} +34 -28
- package/dist/{runClaude-CWhj2V4Q.cjs → runClaude-z_2YC_aa.cjs} +35 -29
- package/dist/{runClaudeDeps-B81cOKnH.cjs → runClaudeDeps-CLubzWnA.cjs} +59 -122
- package/dist/{runClaudeDeps-QGrOeDe2.mjs → runClaudeDeps-duS06Pb4.mjs} +52 -114
- package/dist/{runGemini-BEdWEZLR.mjs → runGemini-C_Pc2EhH.mjs} +39 -37
- package/dist/{runGemini-CgRLYbt5.cjs → runGemini-vEoXV6qT.cjs} +67 -65
- package/dist/{runOpenClaw-C1NVmzOL.cjs → runOpenClaw-CXJCtMgB.cjs} +20 -20
- package/dist/{runOpenClaw-DdQZAYj1.mjs → runOpenClaw-Cxun1qLC.mjs} +19 -19
- package/dist/{sandbox-nocIjliq.cjs → sandbox-CO46H2tK.cjs} +4 -4
- package/dist/{sandbox-DjQUdCMG.mjs → sandbox-CsvPnTmz.mjs} +4 -4
- package/dist/{selfCheck-DCt4Uzbq.cjs → selfCheck-DIr7Gc0i.cjs} +39 -39
- package/dist/selfCheck-NamtBHVB.mjs +85 -0
- package/dist/{send-Ct7X4pPU.mjs → send-DMoFg6F1.mjs} +9 -9
- package/dist/{send-Dydf_hwZ.cjs → send-X2mfVEyr.cjs} +8 -8
- package/dist/{server-CosABFbd.cjs → server-BwTEdbkr.cjs} +6 -6
- package/dist/{server-DTQGZMxh.mjs → server-CkqQ0sRH.mjs} +4 -4
- package/dist/sessionExitLifecycle-CzkLIgNZ.mjs +142 -0
- package/dist/sessionExitLifecycle-DFltxXU8.cjs +148 -0
- package/dist/{sessionLock-DokGab2R.cjs → sessionLock-CdIRJlHH.cjs} +25 -5
- package/dist/{sessionLock-WYIyaVO4.mjs → sessionLock-JIfwCqMk.mjs} +24 -5
- package/dist/{sessionOps-S-qPBLFf.cjs → sessionOps-DVA-00nR.cjs} +4 -4
- package/dist/{sessionOps-BIGgRube.mjs → sessionOps-DqlftXxe.mjs} +5 -5
- package/dist/{sessionScanner-o5hnMi5e.mjs → sessionScanner-BI0Vo1xT.mjs} +3 -3
- package/dist/{sessionScanner-CIMM2hvZ.cjs → sessionScanner-BMwgGAhY.cjs} +3 -3
- package/dist/{sessions-BJHEZpi2.mjs → sessions-D6IimX7b.mjs} +11 -11
- package/dist/{sessions-JchI1w3z.cjs → sessions-DjgEcHaT.cjs} +10 -10
- package/dist/{setupOfflineReconnection-CNiAt5ZP.cjs → setupOfflineReconnection-CjuCiKY3.cjs} +2 -2
- package/dist/{setupOfflineReconnection-DMiBO2y9.mjs → setupOfflineReconnection-DgJK_4m1.mjs} +2 -2
- package/dist/{spawn-DgvUNYEo.mjs → spawn-Dvzy-tzc.mjs} +15 -15
- package/dist/{spawn-6PD7nnoC.cjs → spawn-rhF28shY.cjs} +15 -15
- package/dist/{spawnAgents-P006Hqio.mjs → spawnAgents-CCnlq-FI.mjs} +1 -1
- package/dist/{spawnAgents-DsXgegHM.cjs → spawnAgents-iwuqrgR9.cjs} +1 -1
- package/dist/{spawnHappyCLI-Dywezwk6.cjs → spawnHappyCLI-DnKmIsEt.cjs} +2 -2
- package/dist/{spawnHappyCLI-CCOrEtf9.mjs → spawnHappyCLI-Dq3LLXLb.mjs} +1 -1
- package/dist/{specialCommands-DPcd9edP.mjs → specialCommands-CcyZ1hGA.mjs} +3 -3
- package/dist/{specialCommands-QxPpkGKf.cjs → specialCommands-Zwr2C6A2.cjs} +3 -3
- package/dist/{startFileWatcher-DghDOCO4.mjs → startFileWatcher-4thXDK9d.mjs} +1 -1
- package/dist/{startFileWatcher-RECH5qY8.cjs → startFileWatcher-K6hJSyiR.cjs} +1 -1
- package/dist/startupSessionCreate-BfByJ16A.mjs +24 -0
- package/dist/startupSessionCreate-CKEbq0tL.cjs +26 -0
- package/dist/{streamRelay-DlUWKUpo.cjs → streamRelay-Gy8Xfnon.cjs} +1 -1
- package/dist/{streamRelay-DMV_TXfS.mjs → streamRelay-LcDvyEjK.mjs} +1 -1
- package/dist/{sync-D23jbqVa.cjs → sync-1hQ5KHpL.cjs} +1 -1
- package/dist/{sync-CSe0Rf45.mjs → sync-DO-2PU45.mjs} +1 -1
- package/dist/{systemPrompt-CFNKnh65.mjs → systemPrompt-BctLfMZs.mjs} +3 -3
- package/dist/{systemPrompt-BOy4kU4P.cjs → systemPrompt-Dj7pgkMK.cjs} +3 -3
- package/dist/{teams-DyY669f0.mjs → teams-Bu8YeOoF.mjs} +8 -8
- package/dist/{teams-Ov2BDT-A.cjs → teams-uQxUlyyz.cjs} +8 -8
- package/dist/{time-65DcU6Jx.mjs → time-BcoJaG8E.mjs} +1 -1
- package/dist/{time-CrwIMHta.cjs → time-nqa9shu8.cjs} +1 -1
- package/dist/{titleGenerator-CS_rh2_J.cjs → titleGenerator-D09XyYYG.cjs} +3 -3
- package/dist/{titleGenerator-CiAMxf7s.mjs → titleGenerator-D5r06bhf.mjs} +1 -1
- package/dist/{todo-KY-okGii.cjs → todo-CCOnL7pT.cjs} +6 -6
- package/dist/{todo-BDONw0sK.mjs → todo-D1q8146q.mjs} +6 -6
- package/dist/{tools-D8-PnZEG.mjs → tools-D2E--n1x.mjs} +3 -3
- package/dist/{tools-_w52DZG6.cjs → tools-DiCXnAC5.cjs} +3 -3
- package/dist/{uninstall-8vnLN-IE.cjs → uninstall-BrNwwwSD.cjs} +6 -6
- package/dist/{uninstall-_fjGRP9b.mjs → uninstall-CtwXi1Rt.mjs} +3 -3
- package/package.json +9 -8
- package/dist/machineMetadata-CLHS9sv_.cjs +0 -42
- package/dist/machineMetadata-D-g--oU_.mjs +0 -39
- package/dist/messageBuffer-BWlGgR3A.mjs +0 -71
- package/dist/messageBuffer-fJMH6uY8.cjs +0 -73
- package/dist/projectPath-ChLhdOyt.cjs +0 -13
- package/dist/selfCheck-CjCF4C3v.mjs +0 -85
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var require$$0 = require('fs');
|
|
4
|
+
var require$$1 = require('path');
|
|
5
5
|
var os = require('os');
|
|
6
6
|
var child_process = require('child_process');
|
|
7
|
-
var logger = require('./logger-
|
|
7
|
+
var logger = require('./logger-DgBwUSgS.cjs');
|
|
8
8
|
var constants = require('./constants-VJ0N6WuG.cjs');
|
|
9
9
|
require('chalk');
|
|
10
10
|
require('node:util');
|
|
11
|
-
require('./configuration-
|
|
11
|
+
require('./configuration-C8JgseHy.cjs');
|
|
12
12
|
require('node:fs');
|
|
13
13
|
require('node:os');
|
|
14
14
|
require('node:path');
|
|
15
|
-
require('./package-
|
|
15
|
+
require('./package-NoD8QOOM.cjs');
|
|
16
16
|
require('node:fs/promises');
|
|
17
17
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
18
18
|
|
|
@@ -22,17 +22,17 @@ function readGeminiLocalConfig() {
|
|
|
22
22
|
let googleCloudProject = null;
|
|
23
23
|
let googleCloudProjectEmail = null;
|
|
24
24
|
const possiblePaths = [
|
|
25
|
-
|
|
25
|
+
require$$1.join(os.homedir(), ".gemini", "oauth_creds.json"),
|
|
26
26
|
// Main OAuth credentials file
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
require$$1.join(os.homedir(), ".gemini", "config.json"),
|
|
28
|
+
require$$1.join(os.homedir(), ".config", "gemini", "config.json"),
|
|
29
|
+
require$$1.join(os.homedir(), ".gemini", "auth.json"),
|
|
30
|
+
require$$1.join(os.homedir(), ".config", "gemini", "auth.json")
|
|
31
31
|
];
|
|
32
32
|
for (const configPath of possiblePaths) {
|
|
33
|
-
if (
|
|
33
|
+
if (require$$0.existsSync(configPath)) {
|
|
34
34
|
try {
|
|
35
|
-
const config = JSON.parse(
|
|
35
|
+
const config = JSON.parse(require$$0.readFileSync(configPath, "utf-8"));
|
|
36
36
|
if (!token) {
|
|
37
37
|
const foundToken = config.access_token || config.token || config.apiKey || config.GEMINI_API_KEY;
|
|
38
38
|
if (foundToken && typeof foundToken === "string") {
|
|
@@ -105,22 +105,22 @@ function determineGeminiModel(explicitModel, localConfig) {
|
|
|
105
105
|
}
|
|
106
106
|
function saveGeminiModelToConfig(model) {
|
|
107
107
|
try {
|
|
108
|
-
const configDir =
|
|
109
|
-
const configPath =
|
|
110
|
-
if (!
|
|
111
|
-
|
|
108
|
+
const configDir = require$$1.join(os.homedir(), ".gemini");
|
|
109
|
+
const configPath = require$$1.join(configDir, "config.json");
|
|
110
|
+
if (!require$$0.existsSync(configDir)) {
|
|
111
|
+
require$$0.mkdirSync(configDir, { recursive: true });
|
|
112
112
|
}
|
|
113
113
|
let config = {};
|
|
114
|
-
if (
|
|
114
|
+
if (require$$0.existsSync(configPath)) {
|
|
115
115
|
try {
|
|
116
|
-
config = JSON.parse(
|
|
116
|
+
config = JSON.parse(require$$0.readFileSync(configPath, "utf-8"));
|
|
117
117
|
} catch (error) {
|
|
118
118
|
logger.logger.debug(`[Gemini] Failed to read existing config, creating new one`);
|
|
119
119
|
config = {};
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
config.model = model;
|
|
123
|
-
|
|
123
|
+
require$$0.writeFileSync(configPath, JSON.stringify(config, null, 2), "utf-8");
|
|
124
124
|
logger.logger.debug(`[Gemini] Saved model "${model}" to ${configPath}`);
|
|
125
125
|
} catch (error) {
|
|
126
126
|
logger.logger.debug(`[Gemini] Failed to save model to config:`, error);
|
|
@@ -128,15 +128,15 @@ function saveGeminiModelToConfig(model) {
|
|
|
128
128
|
}
|
|
129
129
|
function saveGoogleCloudProjectToConfig(projectId, email) {
|
|
130
130
|
try {
|
|
131
|
-
const configDir =
|
|
132
|
-
const configPath =
|
|
133
|
-
if (!
|
|
134
|
-
|
|
131
|
+
const configDir = require$$1.join(os.homedir(), ".gemini");
|
|
132
|
+
const configPath = require$$1.join(configDir, "config.json");
|
|
133
|
+
if (!require$$0.existsSync(configDir)) {
|
|
134
|
+
require$$0.mkdirSync(configDir, { recursive: true });
|
|
135
135
|
}
|
|
136
136
|
let config = {};
|
|
137
|
-
if (
|
|
137
|
+
if (require$$0.existsSync(configPath)) {
|
|
138
138
|
try {
|
|
139
|
-
config = JSON.parse(
|
|
139
|
+
config = JSON.parse(require$$0.readFileSync(configPath, "utf-8"));
|
|
140
140
|
} catch {
|
|
141
141
|
config = {};
|
|
142
142
|
}
|
|
@@ -145,7 +145,7 @@ function saveGoogleCloudProjectToConfig(projectId, email) {
|
|
|
145
145
|
if (email) {
|
|
146
146
|
config.googleCloudProjectEmail = email;
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
require$$0.writeFileSync(configPath, JSON.stringify(config, null, 2), "utf-8");
|
|
149
149
|
logger.logger.debug(`[Gemini] Saved Google Cloud Project "${projectId}"${email ? ` for ${email}` : ""} to ${configPath}`);
|
|
150
150
|
} catch (error) {
|
|
151
151
|
logger.logger.debug(`[Gemini] Failed to save Google Cloud Project to config:`, error);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdirSync, chmodSync, readdirSync, statSync, appendFileSync, writeFileSync, existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { p as packageJson } from './package-
|
|
4
|
+
import { p as packageJson } from './package-DYGwlmXl.mjs';
|
|
5
5
|
import { mkdir, chmod, writeFile } from 'node:fs/promises';
|
|
6
6
|
|
|
7
7
|
const PRIVATE_DIRECTORY_MODE = 448;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var node_fs = require('node:fs');
|
|
4
4
|
var os = require('node:os');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var _package = require('./package-
|
|
6
|
+
var _package = require('./package-NoD8QOOM.cjs');
|
|
7
7
|
var promises = require('node:fs/promises');
|
|
8
8
|
|
|
9
9
|
const PRIVATE_DIRECTORY_MODE = 448;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var os = require('os');
|
|
5
|
-
var
|
|
6
|
-
var persistence = require('./persistence-
|
|
7
|
-
var api = require('./api-
|
|
8
|
-
var configuration = require('./configuration-
|
|
5
|
+
var require$$1 = require('path');
|
|
6
|
+
var persistence = require('./persistence-BY-D00wT.cjs');
|
|
7
|
+
var api = require('./api-COHFAkb_.cjs');
|
|
8
|
+
var configuration = require('./configuration-C8JgseHy.cjs');
|
|
9
9
|
var http = require('http');
|
|
10
|
-
var
|
|
11
|
-
var browser = require('./browser-
|
|
10
|
+
var require$$3 = require('crypto');
|
|
11
|
+
var browser = require('./browser-DjNNQQk2.cjs');
|
|
12
12
|
var child_process = require('child_process');
|
|
13
13
|
var util = require('util');
|
|
14
14
|
require('node:fs/promises');
|
|
@@ -17,41 +17,41 @@ require('zod');
|
|
|
17
17
|
require('./authRelay-Dy1qU9td.cjs');
|
|
18
18
|
require('node:crypto');
|
|
19
19
|
require('tweetnacl');
|
|
20
|
-
require('./logger-
|
|
20
|
+
require('./logger-DgBwUSgS.cjs');
|
|
21
21
|
require('node:util');
|
|
22
22
|
require('node:path');
|
|
23
23
|
require('axios');
|
|
24
|
-
require('./lidState-
|
|
24
|
+
require('./lidState-x8cJ8J_9.cjs');
|
|
25
25
|
require('node:events');
|
|
26
26
|
require('socket.io-client');
|
|
27
|
-
require('./pushNotifications-
|
|
28
|
-
require('./index-
|
|
27
|
+
require('./pushNotifications-BXoOSq_G.cjs');
|
|
28
|
+
require('./index-Df2eHm3O.cjs');
|
|
29
29
|
require('@paralleldrive/cuid2');
|
|
30
30
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
31
31
|
require('./limits-C-a7gr04.cjs');
|
|
32
|
-
require('./time-
|
|
33
|
-
require('./registerCommonHandlers-
|
|
32
|
+
require('./time-nqa9shu8.cjs');
|
|
33
|
+
require('./registerCommonHandlers-CRjBoJLK.cjs');
|
|
34
34
|
require('fs/promises');
|
|
35
35
|
require('cross-spawn');
|
|
36
|
-
require('./projectPath-
|
|
36
|
+
require('./projectPath-C3ioB4Bu.cjs');
|
|
37
37
|
require('url');
|
|
38
|
-
require('./sync-
|
|
38
|
+
require('./sync-1hQ5KHpL.cjs');
|
|
39
39
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
40
|
-
require('./controlClient-
|
|
40
|
+
require('./controlClient-D68Zj7Q-.cjs');
|
|
41
41
|
require('node:os');
|
|
42
|
-
require('./package-
|
|
42
|
+
require('./package-NoD8QOOM.cjs');
|
|
43
43
|
require('open');
|
|
44
44
|
|
|
45
45
|
const CLIENT_ID$2 = "app_EMoamEEZ73f0CkXaXp7hrann";
|
|
46
46
|
const AUTH_BASE_URL = "https://auth.openai.com";
|
|
47
47
|
const DEFAULT_PORT$2 = 1455;
|
|
48
48
|
function generatePKCE$2() {
|
|
49
|
-
const verifier =
|
|
50
|
-
const challenge =
|
|
49
|
+
const verifier = require$$3.randomBytes(32).toString("base64url").replace(/[^a-zA-Z0-9\-._~]/g, "");
|
|
50
|
+
const challenge = require$$3.createHash("sha256").update(verifier).digest("base64url").replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
51
51
|
return { verifier, challenge };
|
|
52
52
|
}
|
|
53
53
|
function generateState$2() {
|
|
54
|
-
return
|
|
54
|
+
return require$$3.randomBytes(16).toString("hex");
|
|
55
55
|
}
|
|
56
56
|
function parseJWT(token) {
|
|
57
57
|
const parts = token.split(".");
|
|
@@ -207,12 +207,12 @@ const TOKEN_URL$1 = "https://console.anthropic.com/v1/oauth/token";
|
|
|
207
207
|
const DEFAULT_PORT$1 = 54545;
|
|
208
208
|
const SCOPE = "user:inference";
|
|
209
209
|
function generatePKCE$1() {
|
|
210
|
-
const verifier =
|
|
211
|
-
const challenge =
|
|
210
|
+
const verifier = require$$3.randomBytes(32).toString("base64url").replace(/[^a-zA-Z0-9\-._~]/g, "");
|
|
211
|
+
const challenge = require$$3.createHash("sha256").update(verifier).digest("base64url").replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
212
212
|
return { verifier, challenge };
|
|
213
213
|
}
|
|
214
214
|
function generateState$1() {
|
|
215
|
-
return
|
|
215
|
+
return require$$3.randomBytes(32).toString("base64url");
|
|
216
216
|
}
|
|
217
217
|
async function findAvailablePort$1() {
|
|
218
218
|
return new Promise((resolve) => {
|
|
@@ -360,12 +360,12 @@ const SCOPES = [
|
|
|
360
360
|
"https://www.googleapis.com/auth/userinfo.profile"
|
|
361
361
|
].join(" ");
|
|
362
362
|
function generatePKCE() {
|
|
363
|
-
const verifier =
|
|
364
|
-
const challenge =
|
|
363
|
+
const verifier = require$$3.randomBytes(32).toString("base64url").replace(/[^a-zA-Z0-9\-._~]/g, "");
|
|
364
|
+
const challenge = require$$3.createHash("sha256").update(verifier).digest("base64url").replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
365
365
|
return { verifier, challenge };
|
|
366
366
|
}
|
|
367
367
|
function generateState() {
|
|
368
|
-
return
|
|
368
|
+
return require$$3.randomBytes(32).toString("hex");
|
|
369
369
|
}
|
|
370
370
|
async function findAvailablePort() {
|
|
371
371
|
return new Promise((resolve) => {
|
|
@@ -663,8 +663,8 @@ async function handleConnectStatus() {
|
|
|
663
663
|
}
|
|
664
664
|
function updateLocalGeminiCredentials(tokens) {
|
|
665
665
|
try {
|
|
666
|
-
const geminiDir =
|
|
667
|
-
const credentialsPath =
|
|
666
|
+
const geminiDir = require$$1.join(os.homedir(), ".gemini");
|
|
667
|
+
const credentialsPath = require$$1.join(geminiDir, "oauth_creds.json");
|
|
668
668
|
configuration.ensurePrivateDirectorySync(geminiDir);
|
|
669
669
|
const credentials = {
|
|
670
670
|
access_token: tokens.access_token,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { homedir } from 'os';
|
|
3
3
|
import { join } from 'path';
|
|
4
|
-
import { b as readCredentialsForConfiguredRelay } from './persistence-
|
|
5
|
-
import { A as ApiClient } from './api-
|
|
6
|
-
import { f as ensurePrivateDirectorySync, w as writePrivateFileSync } from './configuration-
|
|
4
|
+
import { b as readCredentialsForConfiguredRelay } from './persistence-D2Djrf7t.mjs';
|
|
5
|
+
import { A as ApiClient } from './api-Dr3wXL_7.mjs';
|
|
6
|
+
import { f as ensurePrivateDirectorySync, w as writePrivateFileSync } from './configuration-BPrfb17M.mjs';
|
|
7
7
|
import { createServer } from 'http';
|
|
8
8
|
import { randomBytes, createHash } from 'crypto';
|
|
9
|
-
import { o as openBrowser } from './browser-
|
|
9
|
+
import { o as openBrowser } from './browser-C2qhUHSE.mjs';
|
|
10
10
|
import { exec } from 'child_process';
|
|
11
11
|
import { promisify } from 'util';
|
|
12
12
|
import 'node:fs/promises';
|
|
@@ -15,29 +15,29 @@ import 'zod';
|
|
|
15
15
|
import './authRelay-DhQhkBvX.mjs';
|
|
16
16
|
import 'node:crypto';
|
|
17
17
|
import 'tweetnacl';
|
|
18
|
-
import './logger-
|
|
18
|
+
import './logger-LFr8iPgl.mjs';
|
|
19
19
|
import 'node:util';
|
|
20
20
|
import 'node:path';
|
|
21
21
|
import 'axios';
|
|
22
|
-
import './lidState-
|
|
22
|
+
import './lidState-DghbfRbr.mjs';
|
|
23
23
|
import 'node:events';
|
|
24
24
|
import 'socket.io-client';
|
|
25
|
-
import './pushNotifications-
|
|
26
|
-
import './index-
|
|
25
|
+
import './pushNotifications-DXGIhE-A.mjs';
|
|
26
|
+
import './index-CeRXrGnH.mjs';
|
|
27
27
|
import '@paralleldrive/cuid2';
|
|
28
28
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
29
29
|
import './limits-DIo7rEBR.mjs';
|
|
30
|
-
import './time-
|
|
31
|
-
import './registerCommonHandlers-
|
|
30
|
+
import './time-BcoJaG8E.mjs';
|
|
31
|
+
import './registerCommonHandlers-DF6bdDtd.mjs';
|
|
32
32
|
import 'fs/promises';
|
|
33
33
|
import 'cross-spawn';
|
|
34
34
|
import './projectPath-BTBIMB57.mjs';
|
|
35
35
|
import 'url';
|
|
36
|
-
import './sync-
|
|
37
|
-
import './backgroundTaskActivity-
|
|
38
|
-
import './controlClient-
|
|
36
|
+
import './sync-DO-2PU45.mjs';
|
|
37
|
+
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
38
|
+
import './controlClient-CkNpT5zS.mjs';
|
|
39
39
|
import 'node:os';
|
|
40
|
-
import './package-
|
|
40
|
+
import './package-DYGwlmXl.mjs';
|
|
41
41
|
import 'open';
|
|
42
42
|
|
|
43
43
|
const CLIENT_ID$2 = "app_EMoamEEZ73f0CkXaXp7hrann";
|
|
@@ -5,7 +5,7 @@ var node_fs = require('node:fs');
|
|
|
5
5
|
var path = require('node:path');
|
|
6
6
|
var node_crypto = require('node:crypto');
|
|
7
7
|
var z = require('zod');
|
|
8
|
-
var configuration = require('./configuration-
|
|
8
|
+
var configuration = require('./configuration-C8JgseHy.cjs');
|
|
9
9
|
|
|
10
10
|
const TeamScopeSchema = z.z.object({
|
|
11
11
|
serverUrl: z.z.string(),
|
|
@@ -3,7 +3,7 @@ import { constants } from 'node:fs';
|
|
|
3
3
|
import { isAbsolute, join, dirname } from 'node:path';
|
|
4
4
|
import { randomUUID } from 'node:crypto';
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
-
import { n as normalizeHttpEndpoint, c as configuration } from './configuration-
|
|
6
|
+
import { n as normalizeHttpEndpoint, c as configuration } from './configuration-BPrfb17M.mjs';
|
|
7
7
|
|
|
8
8
|
const TeamScopeSchema = z.object({
|
|
9
9
|
serverUrl: z.string(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
2
|
-
import { d as readDaemonState, f as clearDaemonState } from './persistence-
|
|
3
|
-
import { c as configuration } from './configuration-
|
|
1
|
+
import { l as logger } from './logger-LFr8iPgl.mjs';
|
|
2
|
+
import { d as readDaemonState, f as clearDaemonState } from './persistence-D2Djrf7t.mjs';
|
|
3
|
+
import { c as configuration } from './configuration-BPrfb17M.mjs';
|
|
4
4
|
|
|
5
5
|
function daemonControlHeaders(controlToken) {
|
|
6
6
|
return {
|
|
@@ -278,4 +278,4 @@ async function checkDaemonHibernation(body) {
|
|
|
278
278
|
};
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
export { checkIfDaemonRunningAndCleanupStaleState as a,
|
|
281
|
+
export { checkIfDaemonRunningAndCleanupStaleState as a, pushFilePreviewViaDaemon as b, checkDaemonHibernation as c, setTerminalTitleViaDaemon as d, spawnDaemonSession as e, stopDaemonSession as f, listDaemonPeers as g, resumeDaemonSession as h, isDaemonRunningCurrentlyInstalledHappyVersion as i, reportSessionEditToDaemon as j, notifyDaemonTurnEvent as k, listDaemonSessions as l, notifyDaemonBackgroundTasks as m, notifyDaemonSessionStarted as n, notifyDaemonSessionEvent as o, pushClipboardViaDaemon as p, notifyDaemonClaudeAuthFailed as q, reportRateLimitsToDaemon as r, stopDaemon as s, cleanupDaemonState as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
4
|
-
var persistence = require('./persistence-
|
|
5
|
-
var configuration = require('./configuration-
|
|
3
|
+
var logger = require('./logger-DgBwUSgS.cjs');
|
|
4
|
+
var persistence = require('./persistence-BY-D00wT.cjs');
|
|
5
|
+
var configuration = require('./configuration-C8JgseHy.cjs');
|
|
6
6
|
|
|
7
7
|
function daemonControlHeaders(controlToken) {
|
|
8
8
|
return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import os from 'node:os';
|
|
2
2
|
import { resolve, isAbsolute, dirname } from 'node:path';
|
|
3
|
-
import { c as configuration } from './configuration-
|
|
3
|
+
import { c as configuration } from './configuration-BPrfb17M.mjs';
|
|
4
4
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
5
|
-
import { p as packageJson } from './package-
|
|
5
|
+
import { p as packageJson } from './package-DYGwlmXl.mjs';
|
|
6
6
|
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
7
7
|
|
|
8
8
|
const realFs = {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var os = require('node:os');
|
|
4
4
|
var path = require('node:path');
|
|
5
|
-
var configuration = require('./configuration-
|
|
6
|
-
var projectPath = require('./projectPath-
|
|
7
|
-
var _package = require('./package-
|
|
5
|
+
var configuration = require('./configuration-C8JgseHy.cjs');
|
|
6
|
+
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
7
|
+
var _package = require('./package-NoD8QOOM.cjs');
|
|
8
8
|
var node_fs = require('node:fs');
|
|
9
9
|
|
|
10
10
|
const realFs = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
4
|
-
var persistence = require('./persistence-
|
|
3
|
+
var logger = require('./logger-DgBwUSgS.cjs');
|
|
4
|
+
var persistence = require('./persistence-BY-D00wT.cjs');
|
|
5
5
|
|
|
6
6
|
const PRESENCE_SETTLE_MS = 6e3;
|
|
7
7
|
async function commitHibernation(deps) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
2
|
-
import { e as evaluateWrapperIdle, j as HIBERNATION_UNSUPPORTED_BACKOFF_MS } from './persistence-
|
|
1
|
+
import { l as logger } from './logger-LFr8iPgl.mjs';
|
|
2
|
+
import { e as evaluateWrapperIdle, j as HIBERNATION_UNSUPPORTED_BACKOFF_MS } from './persistence-D2Djrf7t.mjs';
|
|
3
3
|
|
|
4
4
|
const PRESENCE_SETTLE_MS = 6e3;
|
|
5
5
|
async function commitHibernation(deps) {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var child_process = require('child_process');
|
|
4
4
|
var os = require('os');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var require$$0 = require('fs');
|
|
6
|
+
var require$$1 = require('path');
|
|
7
7
|
|
|
8
8
|
function detectCLIAvailability() {
|
|
9
9
|
const isWindows = os.platform() === "win32";
|
|
@@ -38,7 +38,7 @@ function detectPosix() {
|
|
|
38
38
|
const codex = commandExists("codex");
|
|
39
39
|
const gemini = commandExists("gemini");
|
|
40
40
|
const openclawCommand = commandExists("openclaw");
|
|
41
|
-
const openclawConfig =
|
|
41
|
+
const openclawConfig = require$$0.existsSync(require$$1.join(os.homedir(), ".openclaw", "openclaw.json"));
|
|
42
42
|
const openclawEnv = !!process.env.OPENCLAW_GATEWAY_URL;
|
|
43
43
|
const openclaw = openclawCommand || openclawConfig || openclawEnv;
|
|
44
44
|
const pi = commandExists("pi") && commandExists("pi-acp");
|
|
@@ -50,7 +50,7 @@ function detectWindows() {
|
|
|
50
50
|
const codex = checkCommand("codex");
|
|
51
51
|
const gemini = checkCommand("gemini");
|
|
52
52
|
const openclawCommand = checkCommand("openclaw");
|
|
53
|
-
const openclawConfig =
|
|
53
|
+
const openclawConfig = require$$0.existsSync(require$$1.join(process.env.USERPROFILE || os.homedir(), ".openclaw", "openclaw.json"));
|
|
54
54
|
const openclawEnv = !!process.env.OPENCLAW_GATEWAY_URL;
|
|
55
55
|
const openclaw = openclawCommand || openclawConfig || openclawEnv;
|
|
56
56
|
const pi = checkCommand("pi") && checkCommand("pi-acp");
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
4
|
-
var prompt = require('./prompt-
|
|
5
|
-
var client = require('./client-
|
|
6
|
-
var reportProgressTool = require('./reportProgressTool-
|
|
7
|
-
var index = require('./index-C6O2vVjm.cjs');
|
|
8
|
-
var promises = require('node:fs/promises');
|
|
9
|
-
var node_crypto = require('node:crypto');
|
|
3
|
+
var logger = require('./logger-DgBwUSgS.cjs');
|
|
4
|
+
var prompt = require('./prompt-Bof2aQkI.cjs');
|
|
5
|
+
var client = require('./client-DWs6k041.cjs');
|
|
6
|
+
var reportProgressTool = require('./reportProgressTool-th4trcET.cjs');
|
|
10
7
|
var node_fs = require('node:fs');
|
|
8
|
+
var os = require('node:os');
|
|
11
9
|
var path = require('node:path');
|
|
12
10
|
var z = require('zod');
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
11
|
+
var pi = require('./pi-DlsrPCTa.cjs');
|
|
12
|
+
var promises = require('node:fs/promises');
|
|
13
|
+
var node_crypto = require('node:crypto');
|
|
14
|
+
var client$1 = require('./client-CUO3ItoB.cjs');
|
|
15
|
+
var context = require('./context-D1lgQTJC.cjs');
|
|
16
|
+
var sessionOps = require('./sessionOps-DVA-00nR.cjs');
|
|
17
|
+
var resources = require('./resources-BPyN59Iv.cjs');
|
|
18
|
+
var tools = require('./tools-DiCXnAC5.cjs');
|
|
19
|
+
var peerTools = require('./peerTools-CP-x-Peu.cjs');
|
|
19
20
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
20
21
|
var node_http = require('node:http');
|
|
21
22
|
var streamableHttp_js = require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
22
23
|
var limits = require('./limits-C-a7gr04.cjs');
|
|
23
|
-
var downloadTarget = require('./downloadTarget-
|
|
24
|
+
var downloadTarget = require('./downloadTarget-LyOiucn_.cjs');
|
|
24
25
|
var agentGuidance = require('./agentGuidance-BtBx2xxE.cjs');
|
|
25
26
|
var webPanels = require('./webPanels-FCgFKvVe.cjs');
|
|
26
|
-
var persistence = require('./persistence-
|
|
27
|
-
var pushNotifications = require('./pushNotifications-
|
|
27
|
+
var persistence = require('./persistence-BY-D00wT.cjs');
|
|
28
|
+
var pushNotifications = require('./pushNotifications-BXoOSq_G.cjs');
|
|
28
29
|
var previewPath = require('./previewPath-B0rBdhy1.cjs');
|
|
29
|
-
var
|
|
30
|
+
var require$$3 = require('crypto');
|
|
30
31
|
|
|
31
32
|
function createProjectInjector(deps) {
|
|
32
33
|
const timeoutMs = deps.timeoutMs ?? 1500;
|
|
@@ -121,11 +122,67 @@ function createProjectInjector(deps) {
|
|
|
121
122
|
};
|
|
122
123
|
}
|
|
123
124
|
|
|
125
|
+
const PiContextReportSchema = z.z.object({
|
|
126
|
+
source: z.z.literal("pi"),
|
|
127
|
+
tokens: z.z.number().finite().nonnegative().nullable(),
|
|
128
|
+
contextWindow: z.z.number().finite().positive(),
|
|
129
|
+
model: z.z.string().max(200).nullable().optional(),
|
|
130
|
+
provider: z.z.string().max(200).nullable().optional(),
|
|
131
|
+
/** The pi event that produced the report (`session_compact`, `turn_end`, …). */
|
|
132
|
+
event: z.z.string().max(64).nullable().optional(),
|
|
133
|
+
/** Other registry entries with the same model id. */
|
|
134
|
+
peers: z.z.array(z.z.object({ provider: z.z.string().max(200), contextWindow: z.z.number().finite().positive() })).max(8).optional()
|
|
135
|
+
});
|
|
136
|
+
const obj = (v) => v && typeof v === "object" && !Array.isArray(v) ? v : null;
|
|
137
|
+
const positive = (v) => typeof v === "number" && Number.isFinite(v) && v > 0;
|
|
138
|
+
function piWindowConfigured(modelsJson, provider, model) {
|
|
139
|
+
if (!modelsJson || !provider || !model) return true;
|
|
140
|
+
const config = obj(obj(modelsJson.providers)?.[provider]);
|
|
141
|
+
if (!config) return true;
|
|
142
|
+
if (positive(obj(obj(config.modelOverrides)?.[model])?.contextWindow)) return true;
|
|
143
|
+
const models = Array.isArray(config.models) ? config.models : [];
|
|
144
|
+
const entry = models.map(obj).find((m) => m?.id === model);
|
|
145
|
+
if (!entry) return true;
|
|
146
|
+
return positive(entry.contextWindow);
|
|
147
|
+
}
|
|
148
|
+
function resolvePiContextUsage(report, modelsJson, previous, now) {
|
|
149
|
+
let windowSource = "configured";
|
|
150
|
+
let contextWindow = report.contextWindow;
|
|
151
|
+
if (!piWindowConfigured(modelsJson, report.provider, report.model)) {
|
|
152
|
+
const known = new Set((report.peers ?? []).filter((p) => p.provider !== report.provider && piWindowConfigured(modelsJson, p.provider, report.model)).map((p) => p.contextWindow));
|
|
153
|
+
if (known.size === 1) {
|
|
154
|
+
windowSource = "inferred";
|
|
155
|
+
contextWindow = [...known][0];
|
|
156
|
+
} else {
|
|
157
|
+
windowSource = "unknown";
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
const compactedAt = report.event === "session_compact" ? now : report.tokens === null ? previous?.compactedAt ?? null : null;
|
|
161
|
+
return {
|
|
162
|
+
source: "pi",
|
|
163
|
+
tokens: report.tokens,
|
|
164
|
+
contextWindow,
|
|
165
|
+
updatedAt: now,
|
|
166
|
+
windowSource,
|
|
167
|
+
model: report.model ?? null,
|
|
168
|
+
compactedAt
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function readPiModelsJson(env = process.env, home = os.homedir()) {
|
|
172
|
+
try {
|
|
173
|
+
return obj(JSON.parse(node_fs.readFileSync(path.join(pi.piAgentDir({ home, env }), "models.json"), "utf8")));
|
|
174
|
+
} catch {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
124
179
|
const TEAMS_ADOPT_CAPABILITY = "teams-adopt-v1";
|
|
125
180
|
const TeamAdoptSchema = z.z.object({
|
|
126
181
|
requestId: z.z.string().min(1).max(128),
|
|
127
182
|
name: z.z.string().trim().min(1).max(128),
|
|
128
|
-
teamId: z.z.string().min(1).max(128).optional()
|
|
183
|
+
teamId: z.z.string().min(1).max(128).optional(),
|
|
184
|
+
/** B-730: the owner confirmed moving this session out of the team it already belongs to. */
|
|
185
|
+
transfer: z.z.literal(true).optional()
|
|
129
186
|
}).strict();
|
|
130
187
|
async function retainIntent(path$1, input) {
|
|
131
188
|
await promises.mkdir(path.dirname(path$1), { recursive: true, mode: 448 });
|
|
@@ -208,7 +265,9 @@ function createTeamAdoption(sessionId) {
|
|
|
208
265
|
const connected = await client.initialize(input, { resumeAdoption: true, expectedTeamId: intent.resolvedTeamId, onTeamResolved: (teamId) => retainTeam(path, input, teamId, intent?.guidanceDelivered) });
|
|
209
266
|
const instructions = `${resources.TEAM_SKILL}
|
|
210
267
|
|
|
211
|
-
This session is now connected as the team lead. Call team_inspect to read the authoritative state before continuing the user's goal. Do not call team_create or team_join again
|
|
268
|
+
This session is now connected as the team lead. Call team_inspect to read the authoritative state before continuing the user's goal. Do not call team_create or team_join again.
|
|
269
|
+
|
|
270
|
+
${resources.TEAM_LEAD_PLAYBOOK}`;
|
|
212
271
|
if (!intent.guidanceDelivered) {
|
|
213
272
|
const key = await sessionOps.waitForSessionKey(sessionId, 1e4);
|
|
214
273
|
await sessionOps.sendUserMessage(sessionId, key, instructions, "teams", { localId: `teams-adopt-${input.requestId}`, sentFrom: "team" });
|
|
@@ -221,7 +280,12 @@ This session is now connected as the team lead. Call team_inspect to read the au
|
|
|
221
280
|
});
|
|
222
281
|
operation.safeToChange = true;
|
|
223
282
|
}
|
|
224
|
-
operation.result = {
|
|
283
|
+
operation.result = {
|
|
284
|
+
error: error instanceof Error ? error.message : "Team connection failed; retry the same request",
|
|
285
|
+
...operation.safeToChange ? { safeToChange: true } : {},
|
|
286
|
+
// B-730: the Web asks the owner to confirm a transfer, then sends a new request with `transfer`.
|
|
287
|
+
...error instanceof client$1.SessionInOtherTeamError ? { code: error.code, teamId: error.teamId, teamName: error.teamName } : {}
|
|
288
|
+
};
|
|
225
289
|
}
|
|
226
290
|
})();
|
|
227
291
|
return { status: "pending", requestId: input.requestId };
|
|
@@ -536,13 +600,12 @@ async function startHappyServer(client, options) {
|
|
|
536
600
|
let body = "";
|
|
537
601
|
for await (const chunk of req) {
|
|
538
602
|
body += chunk.toString();
|
|
539
|
-
if (Buffer.byteLength(body) >
|
|
603
|
+
if (Buffer.byteLength(body) > 4096) {
|
|
540
604
|
res.writeHead(413).end();
|
|
541
605
|
return;
|
|
542
606
|
}
|
|
543
607
|
}
|
|
544
|
-
|
|
545
|
-
options.onContextUsage(usage);
|
|
608
|
+
options.onContextUsage(PiContextReportSchema.parse(JSON.parse(body)));
|
|
546
609
|
res.writeHead(204).end();
|
|
547
610
|
} catch {
|
|
548
611
|
if (!res.headersSent) res.writeHead(400).end();
|
|
@@ -687,9 +750,11 @@ function deterministicStringify(obj, options = {}) {
|
|
|
687
750
|
}
|
|
688
751
|
function hashObject(obj, options, encoding = "hex") {
|
|
689
752
|
const jsonString = deterministicStringify(obj, options);
|
|
690
|
-
return
|
|
753
|
+
return require$$3.createHash("sha256").update(jsonString).digest(encoding);
|
|
691
754
|
}
|
|
692
755
|
|
|
693
756
|
exports.createProjectInjector = createProjectInjector;
|
|
694
757
|
exports.hashObject = hashObject;
|
|
758
|
+
exports.readPiModelsJson = readPiModelsJson;
|
|
759
|
+
exports.resolvePiContextUsage = resolvePiContextUsage;
|
|
695
760
|
exports.startHappyServer = startHappyServer;
|