very-happy-cli 0.2.186 → 0.2.188
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-ConXUH67.mjs → AcpBackend-2loP7MpF.mjs} +3 -3
- package/dist/{AcpBackend-aVv-_nH_.cjs → AcpBackend-B8AYkp5n.cjs} +3 -3
- package/dist/{AcpSessionManager-BxD1AQ8L.mjs → AcpSessionManager-C17doAoR.mjs} +2 -2
- package/dist/{AcpSessionManager-aRdzf_6R.cjs → AcpSessionManager-CLqo9R9Y.cjs} +2 -2
- package/dist/{BasePermissionHandler-BsOLZCNB.cjs → BasePermissionHandler-C8UEcFz0.cjs} +1 -1
- package/dist/{BasePermissionHandler-Hj7Qregq.mjs → BasePermissionHandler-CrfyUmqO.mjs} +1 -1
- package/dist/{acpSessionResume-CKacrrHV.mjs → acpSessionResume-F705a1cF.mjs} +1 -1
- package/dist/{acpSessionResume-CpPNoxaW.cjs → acpSessionResume-OuYlLGxL.cjs} +1 -1
- package/dist/{agentHome-CawmLuWV.mjs → agentHome-Dc7LYF3d.mjs} +4 -4
- package/dist/{agentHome-VS7FrFQZ.cjs → agentHome-DsKHJ_Sf.cjs} +4 -4
- package/dist/{api-DjqQTT16.cjs → api-BOqjYd5r.cjs} +10 -10
- package/dist/{api-DUFy21Nf.mjs → api-DNKa7kVy.mjs} +10 -10
- package/dist/{apiMachine-D2BrVBYu.cjs → apiMachine--rcPpMmt.cjs} +14 -14
- package/dist/{apiMachine-B0sBCHNZ.mjs → apiMachine-Di1G9ECW.mjs} +14 -14
- package/dist/{attachmentContent-2kInPZrP.cjs → attachmentContent-BFRMLong.cjs} +2 -2
- package/dist/{attachmentContent-D01-pLOB.mjs → attachmentContent-C9S4ekAz.mjs} +2 -2
- package/dist/{auth-DP3eN2Fv.mjs → auth-BNhhk2Fr.mjs} +5 -5
- package/dist/{auth-B-CqTcVh.mjs → auth-Bzwo_vOM.mjs} +8 -8
- package/dist/{auth-CujfCIv-.cjs → auth-CQtfznF0.cjs} +8 -8
- package/dist/{auth-CImUXAjH.cjs → auth-CXmI92aj.cjs} +5 -5
- package/dist/{auto-D4KRQIBu.mjs → auto-DHYOLnXB.mjs} +19 -19
- package/dist/{auto-oWgZl7mM.cjs → auto-DXLdaX5O.cjs} +19 -19
- package/dist/{bootstrap-MFmMruyB.mjs → bootstrap-Di38SnpN.mjs} +2 -2
- package/dist/{bootstrap-B7YvJcVK.cjs → bootstrap-eJ1l7VYl.cjs} +2 -2
- package/dist/{browser-CfFbN1Us.mjs → browser-6Cg7G6bb.mjs} +1 -1
- package/dist/{browser-C19iD31j.cjs → browser-D3uBFRQu.cjs} +1 -1
- package/dist/{claudeLocal-C4A7-BmS.cjs → claudeLocal-BBaE4QF_.cjs} +9 -8
- package/dist/{claudeLocal-C6wNx9qH.mjs → claudeLocal-CqaEs-81.mjs} +7 -6
- package/dist/{claudeLocalLauncher-DdPfufcS.mjs → claudeLocalLauncher-BDUPxtsI.mjs} +11 -11
- package/dist/{claudeLocalLauncher-BfCKs7Le.cjs → claudeLocalLauncher-wPxKtH_P.cjs} +11 -11
- package/dist/{claudeSessionFork-B8NjdHYD.cjs → claudeSessionFork-CmY25Fl3.cjs} +1 -1
- package/dist/{claudeSessionFork-D8XT48Lf.mjs → claudeSessionFork-DzWFzj9m.mjs} +1 -1
- package/dist/{client-jAdkYZRf.cjs → client-C2HcMqRF.cjs} +14 -5
- package/dist/{client-DAnQqPmc.mjs → client-DWws_aQK.mjs} +2 -2
- package/dist/{client-BfGuTBMO.mjs → client-DcDE6Ifk.mjs} +2 -2
- package/dist/{client-CMIhQ32m.cjs → client-DmY03OZZ.cjs} +2 -2
- package/dist/{client-CTNxuHVc.cjs → client-agH03Irm.cjs} +2 -2
- package/dist/{client-CKM07bJH.mjs → client-qJ0y8fus.mjs} +14 -5
- package/dist/codex/happyMcpStdioBridge.cjs +18 -17
- package/dist/codex/happyMcpStdioBridge.mjs +18 -17
- package/dist/{codexAppServerClient-DhOC61k9.mjs → codexAppServerClient-DgE99i7X.mjs} +39 -5
- package/dist/{codexAppServerClient-Dv1Mh3MS.cjs → codexAppServerClient-DwzC8LR0.cjs} +39 -5
- package/dist/{codexCommand-CWrFt3Ne.cjs → codexCommand-1vFEA1KT.cjs} +118 -60
- package/dist/{codexCommand-D3_i93Rm.mjs → codexCommand-DUSVzbKh.mjs} +115 -57
- package/dist/{codexTermination-B08GgahL.mjs → codexTermination-Bybovr2z.mjs} +1 -1
- package/dist/{codexTermination-DErS0cGt.cjs → codexTermination-DuDPyBRR.cjs} +1 -1
- package/dist/{config-D3OBduhj.mjs → config-BrzZ0O-6.mjs} +3 -3
- package/dist/{config-D_aj3xgw.cjs → config-C4xOL5bH.cjs} +3 -3
- package/dist/{configuration-DbCHeEeP.mjs → configuration-BZHpFD7K.mjs} +1 -1
- package/dist/{configuration-CI0GWwaT.cjs → configuration-DyPW9mVa.cjs} +1 -1
- package/dist/{connect-BuwVpjkZ.mjs → connect-Cw_INlj8.mjs} +13 -13
- package/dist/{connect-839tEkPN.cjs → connect-DurKwMEo.cjs} +13 -13
- package/dist/{context-zhirgqSw.cjs → context-2xDvjkQp.cjs} +1 -1
- package/dist/{context-D2Y_qLs0.mjs → context-t7YV0aZc.mjs} +1 -1
- package/dist/{controlClient-Dv80mB_j.mjs → controlClient-Bw56NIrj.mjs} +4 -4
- package/dist/{controlClient-BIi1tzEo.cjs → controlClient-DvFaPsg6.cjs} +3 -3
- package/dist/{createSessionMetadata-Dqy_DfoF.mjs → createSessionMetadata-Dn5BkLfU.mjs} +2 -2
- package/dist/{createSessionMetadata-DT24NjY2.cjs → createSessionMetadata-Dpg6bV6f.cjs} +2 -2
- package/dist/{defaultPermissionMode-yR27mevc.mjs → defaultPermissionMode-DMTnlccv.mjs} +2 -2
- package/dist/{defaultPermissionMode-BYqJbPhc.cjs → defaultPermissionMode-Dlm0q1m0.cjs} +2 -2
- package/dist/{deterministicJson-COiJcmUR.mjs → deterministicJson-CsRckxVq.mjs} +14 -14
- package/dist/{deterministicJson-CoWlyn_X.cjs → deterministicJson-D0BrV1FD.cjs} +14 -14
- package/dist/{doctor-Ymj096qP.mjs → doctor-B4HQiW6j.mjs} +7 -7
- package/dist/{doctor-DI6aIOne.cjs → doctor-CYe4d9kU.cjs} +7 -7
- package/dist/{downloadTarget-BOXHrxbm.cjs → downloadTarget-CuhBVvuC.cjs} +6 -6
- package/dist/{downloadTarget-DRXCRDub.mjs → downloadTarget-tYMV_VHo.mjs} +6 -6
- package/dist/{ensureDaemonRunning-BqNjYnar.cjs → ensureDaemonRunning-Ce3BlWiR.cjs} +5 -5
- package/dist/{ensureDaemonRunning-DTrrXAdz.mjs → ensureDaemonRunning-DVtIG9z7.mjs} +5 -5
- package/dist/{handleResumeCommand-DW_MRgtz.mjs → handleResumeCommand-BU1uMNyv.mjs} +5 -5
- package/dist/{handleResumeCommand-BBKUGhCv.cjs → handleResumeCommand-CLxsmAW0.cjs} +5 -5
- package/dist/{index-Cyu_8WAd.mjs → index-B1OxWiNG.mjs} +3 -3
- package/dist/{index-BumVulwx.cjs → index-BOe6dKnL.cjs} +215 -18
- package/dist/{index-04pYyzsJ.mjs → index-CVHRt3SS.mjs} +4 -4
- package/dist/{index-WW17yjQO.mjs → index-ChX0eVXw.mjs} +92 -46
- package/dist/{index-CmlAXizv.mjs → index-DDz0Ftoy.mjs} +7 -7
- package/dist/{index-D9lJhXUk.cjs → index-DG1kGjkF.cjs} +93 -47
- package/dist/{index-W8wlfp57.cjs → index-DoXbGEAi.cjs} +3 -3
- package/dist/{index-Bq6VHNdk.cjs → index-KwuXqLwe.cjs} +4 -4
- package/dist/{index-B9f1vKcC.mjs → index-WKyN-bNy.mjs} +212 -17
- package/dist/{index-CY573fnz.cjs → index-wWJJAQRk.cjs} +7 -7
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-F3rP8tBU.mjs → install-B8O1JpJH.mjs} +1 -1
- package/dist/{install-BATFlr_l.cjs → install-BOHlqewf.cjs} +1 -1
- package/dist/{install-C5XCDwgD.mjs → install-CMa_FOWu.mjs} +3 -3
- package/dist/{install-C1y_g7kj.cjs → install-cAYvHxXR.cjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +6 -0
- package/dist/lib.d.mts +6 -0
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-CZ1ggYiB.mjs → lidState-D-lsD1FS.mjs} +1 -1
- package/dist/{lidState-BxHu6dus.cjs → lidState-d1vgQ3n7.cjs} +1 -1
- package/dist/{localHappyAgentAuth-BHklNDKQ.cjs → localHappyAgentAuth-DucSnCg3.cjs} +1 -1
- package/dist/{localHappyAgentAuth-OJk4xDwg.mjs → localHappyAgentAuth-wvDp-nGj.mjs} +1 -1
- package/dist/{logger-L0pLBOLK.cjs → logger-C3vZG6Q0.cjs} +2 -2
- package/dist/{logger-CpaeM90D.mjs → logger-RpzJ4d8V.mjs} +2 -2
- package/dist/{machineMetadata-YeHF4gSY.cjs → machineMetadata-CAvFq1Jg.cjs} +3 -3
- package/dist/{machineMetadata-ukaYmmlK.mjs → machineMetadata-CiQ2_1Mq.mjs} +3 -3
- package/dist/{main-VyiAJXfb.cjs → main-ChpYcFZi.cjs} +46 -46
- package/dist/{main-pkH_VRP-.mjs → main-IPhaImjm.mjs} +46 -46
- package/dist/{mcp-Y8Xsr2Xh.cjs → mcp-2xF232hL.cjs} +15 -15
- package/dist/{mcp-BwoAhEnN.mjs → mcp-CWnMvju6.mjs} +15 -15
- package/dist/{mirrorProtocol-Did0-1jn.cjs → mirrorProtocol-CVzPObON.cjs} +3 -3
- package/dist/{mirrorProtocol-DukUp2Bj.mjs → mirrorProtocol-Dr7fNq8V.mjs} +3 -3
- package/dist/{package-DagIeOhi.mjs → package-CwB8rFJt.mjs} +10 -10
- package/dist/{package-BuATIMpK.cjs → package-Gnf_935w.cjs} +10 -10
- package/dist/{panels-CZ_CRUbM.cjs → panels-DTlTsndU.cjs} +5 -5
- package/dist/{panels-C3dUoUbA.mjs → panels-L1mSkC-y.mjs} +5 -5
- package/dist/{peerTools-CUCqJ83-.mjs → peerTools-2_8Bw9PU.mjs} +5 -5
- package/dist/{peerTools-Cs3Ln6d0.cjs → peerTools-C1E5cQ86.cjs} +5 -5
- package/dist/{persistence-FgtDuVAP.mjs → persistence-Bn4qEbDg.mjs} +2 -2
- package/dist/{persistence-CIzOAWK6.cjs → persistence-CqtjFiD1.cjs} +2 -2
- package/dist/{piRunnerArgs-CJhXFPM9.cjs → piRunnerArgs-BI8yQRBZ.cjs} +1 -1
- package/dist/{piRunnerArgs-YbYkfixz.mjs → piRunnerArgs-DWBb63W9.mjs} +1 -1
- package/dist/{piRuntime-CEzoAYHe.cjs → piRuntime--mQ43MSM.cjs} +2 -2
- package/dist/{piRuntime-CShuw-1A.mjs → piRuntime-Do8oqbm3.mjs} +2 -2
- package/dist/{piTerminal-DVr2W6bI.cjs → piTerminal-BzcvLFsP.cjs} +18 -18
- package/dist/{piTerminal-BvvcgVoW.mjs → piTerminal-GC1KHTYQ.mjs} +18 -18
- package/dist/promptCacheTtl-B8PCzE6k.cjs +76 -0
- package/dist/promptCacheTtl-Ce0TVbrx.mjs +72 -0
- package/dist/{pushNotifications-2CyhYAte.mjs → pushNotifications-BThg4nVd.mjs} +3 -3
- package/dist/{pushNotifications-OtQY-Mfa.cjs → pushNotifications-Bb-QSqXw.cjs} +3 -3
- package/dist/{query-DimRl61I.cjs → query-Bz3pocKH.cjs} +5 -4
- package/dist/{query-B7DvMlYM.mjs → query-CkgIJ_Dy.mjs} +3 -2
- package/dist/{specialCommands-ByrcSYSh.cjs → rateLimitReporter-BkHyvLru.cjs} +3 -55
- package/dist/{specialCommands-B-DAeFrU.mjs → rateLimitReporter-Iw4k3Bbr.mjs} +4 -55
- package/dist/{rateLimitWindows-DwhrA5wy.cjs → rateLimitWindows-Bm_dcQGW.cjs} +1 -1
- package/dist/{rateLimitWindows-C0zbGT7K.mjs → rateLimitWindows-CQ4tIQnx.mjs} +1 -1
- package/dist/{registerCommonHandlers-De54jKz8.cjs → registerCommonHandlers-CIs6H2DV.cjs} +2 -2
- package/dist/{registerCommonHandlers-X9lnO2TF.mjs → registerCommonHandlers-CaWl9ll1.mjs} +2 -2
- package/dist/{remoteSessionClient-9j3N_bzV.cjs → remoteSessionClient-DgUMfPW4.cjs} +5 -5
- package/dist/{remoteSessionClient-BApor-c2.mjs → remoteSessionClient-uPj7omsw.mjs} +5 -5
- package/dist/{reportProgressTool-RR5VkbDf.cjs → reportProgressTool-CaJ8EwLq.cjs} +3 -3
- package/dist/{reportProgressTool-6mDoxKuq.mjs → reportProgressTool-DUEq3xAL.mjs} +3 -3
- package/dist/{resources-CqwHPhdK.cjs → resources-BZ_Be0qM.cjs} +1 -1
- package/dist/{resources-CLdQfe3b.mjs → resources-CLP_MpK4.mjs} +1 -1
- package/dist/{run-CmA3cPD_.mjs → run-DTUJBD6p.mjs} +37 -37
- package/dist/{run-B2ZorDI7.cjs → run-DyyGMqND.cjs} +37 -37
- package/dist/{runClaude-Dk73bQ0n.cjs → runClaude-8JDaPoGQ.cjs} +22 -22
- package/dist/{runClaude-bxwea9mX.mjs → runClaude-DTNvIz2J.mjs} +22 -22
- package/dist/{runClaudeDeps-dVfReVd4.cjs → runClaudeDeps-BeLo5zss.cjs} +84 -55
- package/dist/{runClaudeDeps-DoaYM017.mjs → runClaudeDeps-CgGkgg7e.mjs} +86 -56
- package/dist/{runGemini-BD-wQe5q.cjs → runGemini-BSOdU563.cjs} +55 -51
- package/dist/{runGemini-Dq2iv4UF.mjs → runGemini-eU8UOzfc.mjs} +53 -49
- package/dist/{runOpenClaw-BXLv_bvU.cjs → runOpenClaw-CYyFoGRZ.cjs} +30 -26
- package/dist/{runOpenClaw-C1NB1aLx.mjs → runOpenClaw-D8RZiA1e.mjs} +28 -24
- package/dist/{sandbox-9MIBf8kS.cjs → sandbox-C8zfNX-4.cjs} +4 -4
- package/dist/{sandbox-Dqs_T8Jw.mjs → sandbox-DlPahdhl.mjs} +4 -4
- package/dist/selfCheck-4bcdHPFQ.mjs +86 -0
- package/dist/{selfCheck-CkUezhrg.cjs → selfCheck-D28nvuPJ.cjs} +37 -37
- package/dist/{send-rdhpycNB.cjs → send-C58kX4qz.cjs} +8 -8
- package/dist/{send-4q066vij.mjs → send-DBpv-1eh.mjs} +8 -8
- package/dist/{server-DxTjt1mK.cjs → server-I_CETZzn.cjs} +6 -6
- package/dist/{server-DN6TvjhP.mjs → server-J5K6pOox.mjs} +4 -4
- package/dist/{sessionLock-DOsE5UUf.mjs → sessionLock-C7Wg1RVd.mjs} +3 -3
- package/dist/{sessionLock-h4162Jrf.cjs → sessionLock-DjE7O0LS.cjs} +3 -3
- package/dist/{sessionOps--9p2IzVA.mjs → sessionOps-CYjMT7Ad.mjs} +4 -4
- package/dist/{sessionOps-tmBKG5qg.cjs → sessionOps-DGMpl9NB.cjs} +4 -4
- package/dist/{sessionProvider-B9w7rFDR.cjs → sessionProvider-DVtxrOuM.cjs} +5 -5
- package/dist/{sessionProvider-C6MHJZ9Z.mjs → sessionProvider-TLiFn9kD.mjs} +5 -5
- package/dist/{sessionScanner-Bgvz8Uiy.cjs → sessionScanner-BZ1ZSn6I.cjs} +3 -3
- package/dist/{sessionScanner-B6hzp5R9.mjs → sessionScanner-CknV1IlN.mjs} +3 -3
- package/dist/{sessions-DJMVXKRz.cjs → sessions-CTkBKs5U.cjs} +10 -10
- package/dist/{sessions-iItaUQAF.mjs → sessions-DU4bxkap.mjs} +10 -10
- package/dist/{setupOfflineReconnection-DL4HUMDJ.cjs → setupOfflineReconnection-CQHNuP_0.cjs} +2 -2
- package/dist/{setupOfflineReconnection-DF78nz1N.mjs → setupOfflineReconnection-DaOXnGuH.mjs} +2 -2
- package/dist/{spawn-CL9A8dBJ.cjs → spawn-C0wZc03S.cjs} +67 -25
- package/dist/{spawn-CoYfACsc.mjs → spawn-DdnYTtQe.mjs} +67 -26
- package/dist/{spawnAgents-DsJSyLDl.cjs → spawnAgents-BjyU78Ue.cjs} +21 -9
- package/dist/{spawnAgents-f2q31uUV.mjs → spawnAgents-D-7wMw-a.mjs} +21 -10
- package/dist/{spawnHappyCLI-BWOub_Uf.cjs → spawnHappyCLI-BJUd974I.cjs} +1 -1
- package/dist/{spawnHappyCLI-BcSO1rF6.mjs → spawnHappyCLI-CnyyJk74.mjs} +1 -1
- package/dist/{registerKillSessionHandler-CAif4Uz4.cjs → specialCommands-BsvSoDhC.cjs} +91 -6
- package/dist/{registerKillSessionHandler-CrLsN5m3.mjs → specialCommands-DHU7TNeK.mjs} +88 -7
- package/dist/{startFileWatcher-DVia64Vg.mjs → startFileWatcher-CpO5Mwbr.mjs} +1 -1
- package/dist/{startFileWatcher-BZrpUz7_.cjs → startFileWatcher-DBboREco.cjs} +1 -1
- package/dist/{startupSessionCreate-CY4tPjlZ.mjs → startupSessionCreate-BgaVuvQp.mjs} +1 -1
- package/dist/{startupSessionCreate-63ABDnfJ.cjs → startupSessionCreate-C1u2dtz8.cjs} +1 -1
- package/dist/{streamRelay-B3FloUTT.mjs → streamRelay-CqBynIon.mjs} +1 -1
- package/dist/{streamRelay-Cn_uGG6m.cjs → streamRelay-D9a4cBEa.cjs} +1 -1
- package/dist/{sync-CKSmwxec.cjs → sync-6HFRJP1h.cjs} +1 -1
- package/dist/{sync-CZjyTC4v.mjs → sync-I8NYmycF.mjs} +1 -1
- package/dist/{systemPrompt-BPzhf5d5.cjs → systemPrompt-BDWj5QSL.cjs} +2 -2
- package/dist/{systemPrompt-BKUVX-fd.mjs → systemPrompt-C1RSY_60.mjs} +2 -2
- package/dist/{teams-B2-KPjRg.mjs → teams-GpLFbXXE.mjs} +9 -9
- package/dist/{teams-CHBszdmc.cjs → teams-eUD7ymif.cjs} +9 -9
- package/dist/{template-DPsqlHJQ.cjs → template-17HATY_Y.cjs} +1 -1
- package/dist/{template-DuKZw-Sz.mjs → template-CEK8MEjo.mjs} +1 -1
- package/dist/{time-DcICfW0N.cjs → time-BAJRbB6U.cjs} +1 -1
- package/dist/{time-BsNUVcKH.mjs → time-umG7yHkb.mjs} +1 -1
- package/dist/{titleGenerator-B4b4ah--.mjs → titleGenerator-dmFlxkRs.mjs} +1 -1
- package/dist/{titleGenerator-Bvk1mx7G.cjs → titleGenerator-iqb2jOF1.cjs} +2 -2
- package/dist/{todo-C7--CBge.mjs → todo-CT4AJ3sH.mjs} +6 -6
- package/dist/{todo-BN4hhun6.cjs → todo-DsR7WnQS.cjs} +6 -6
- package/dist/tools-30E66QL_.cjs +140 -0
- package/dist/tools-BOWazSD6.mjs +137 -0
- package/dist/{uninstall-_qDbgdxh.cjs → uninstall-BtTc9hHa.cjs} +3 -3
- package/dist/{uninstall-Bjwl9bqK.mjs → uninstall-DImXs6VZ.mjs} +3 -3
- package/package.json +10 -10
- package/dist/selfCheck-Dz_Sm7w8.mjs +0 -86
- package/dist/smallFastModel-BLNgMrwR.mjs +0 -18
- package/dist/smallFastModel-D_uxGMo3.cjs +0 -21
- package/dist/tools-BILbS8Hh.mjs +0 -60
- package/dist/tools-Bl5Q_6Nr.cjs +0 -63
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
|
|
5
|
+
function ensureLocalProxyBypass(env) {
|
|
6
|
+
const existing = env.NO_PROXY ?? env.no_proxy ?? "";
|
|
7
|
+
const entries = existing.split(",").map((s) => s.trim()).filter(Boolean);
|
|
8
|
+
const toAdd = ["127.0.0.1", "localhost", "::1"].filter((h) => !entries.includes(h));
|
|
9
|
+
if (toAdd.length === 0) return;
|
|
10
|
+
const updated = existing ? `${existing},${toAdd.join(",")}` : toAdd.join(",");
|
|
11
|
+
env.NO_PROXY = updated;
|
|
12
|
+
env.no_proxy = updated;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const SMALL_FAST_MODEL = "claude-haiku-4-5-20251001";
|
|
16
|
+
function pinSmallFastModel(env) {
|
|
17
|
+
if (!env.ANTHROPIC_SMALL_FAST_MODEL) {
|
|
18
|
+
env.ANTHROPIC_SMALL_FAST_MODEL = SMALL_FAST_MODEL;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const HAPPY_PROMPT_CACHE_TTL_ENV = "HAPPY_CLAUDE_PROMPT_CACHE_TTL";
|
|
23
|
+
const DEFAULT_PROMPT_CACHE_TTL = "1h";
|
|
24
|
+
const CLAUDE_TTL_ENV_KEYS = [
|
|
25
|
+
"CLAUDE_CODE_PROMPT_CACHE_TTL",
|
|
26
|
+
"CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL",
|
|
27
|
+
"CLAUDE_CODE_MESSAGES_PROMPT_CACHE_TTL",
|
|
28
|
+
"ENABLE_PROMPT_CACHING_1H",
|
|
29
|
+
"FORCE_PROMPT_CACHING_5M"
|
|
30
|
+
];
|
|
31
|
+
const CLAUDE_TTL_SETTINGS_KEYS = ["promptCacheTtl", "subagentPromptCacheTtl"];
|
|
32
|
+
function hasValue(value) {
|
|
33
|
+
return typeof value === "string" ? value.trim() !== "" : value !== void 0 && value !== null;
|
|
34
|
+
}
|
|
35
|
+
function settingsChooseTtl(doc) {
|
|
36
|
+
if (!doc || typeof doc !== "object") return false;
|
|
37
|
+
const record = doc;
|
|
38
|
+
if (CLAUDE_TTL_SETTINGS_KEYS.some((key) => hasValue(record[key]))) return true;
|
|
39
|
+
const env = record.env;
|
|
40
|
+
return !!env && typeof env === "object" && CLAUDE_TTL_ENV_KEYS.some((key) => hasValue(env[key]));
|
|
41
|
+
}
|
|
42
|
+
function decidePromptCacheTtl(env, readSettings) {
|
|
43
|
+
const own = env[HAPPY_PROMPT_CACHE_TTL_ENV]?.trim().toLowerCase();
|
|
44
|
+
if (own && own !== DEFAULT_PROMPT_CACHE_TTL) return "opted-out";
|
|
45
|
+
if (CLAUDE_TTL_ENV_KEYS.some((key) => hasValue(env[key]))) return "user-env";
|
|
46
|
+
if (readSettings().some(settingsChooseTtl)) return "user-settings";
|
|
47
|
+
if (env.HAPPY_SPAWNED_BY === "automation" && !hasValue(env.VH_AUTOMATION_STICKY)) return "one-shot-automation";
|
|
48
|
+
return "default-1h";
|
|
49
|
+
}
|
|
50
|
+
function claudeSettingsPaths(env, cwd, platform = process.platform) {
|
|
51
|
+
const configDir = env.CLAUDE_CONFIG_DIR?.trim() || join(homedir(), ".claude");
|
|
52
|
+
const paths = [join(configDir, "settings.json")];
|
|
53
|
+
if (cwd) paths.push(join(cwd, ".claude", "settings.json"), join(cwd, ".claude", "settings.local.json"));
|
|
54
|
+
if (platform === "darwin") paths.push("/Library/Application Support/ClaudeCode/managed-settings.json");
|
|
55
|
+
else if (platform === "win32") paths.push("C:\\Program Files\\ClaudeCode\\managed-settings.json");
|
|
56
|
+
else paths.push("/etc/claude-code/managed-settings.json");
|
|
57
|
+
return paths;
|
|
58
|
+
}
|
|
59
|
+
function readJson(path) {
|
|
60
|
+
try {
|
|
61
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
62
|
+
} catch {
|
|
63
|
+
return void 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function applyPromptCacheTtlDefault(env, cwd) {
|
|
67
|
+
const decision = decidePromptCacheTtl(env, () => claudeSettingsPaths(env, cwd).map(readJson));
|
|
68
|
+
if (decision === "default-1h") env.CLAUDE_CODE_PROMPT_CACHE_TTL = DEFAULT_PROMPT_CACHE_TTL;
|
|
69
|
+
return decision;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { applyPromptCacheTtlDefault as a, ensureLocalProxyBypass as e, pinSmallFastModel as p };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { v as AgentVersionsSchema } from './index-WKyN-bNy.mjs';
|
|
3
3
|
import axios from 'axios';
|
|
4
|
-
import { l as logger } from './logger-
|
|
5
|
-
import { c as configuration } from './configuration-
|
|
4
|
+
import { l as logger } from './logger-RpzJ4d8V.mjs';
|
|
5
|
+
import { c as configuration } from './configuration-BZHpFD7K.mjs';
|
|
6
6
|
import { c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
7
7
|
|
|
8
8
|
z.object({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var z = require('zod');
|
|
4
|
-
var index = require('./index-
|
|
4
|
+
var index = require('./index-BOe6dKnL.cjs');
|
|
5
5
|
var axios = require('axios');
|
|
6
|
-
var logger = require('./logger-
|
|
7
|
-
var configuration = require('./configuration-
|
|
6
|
+
var logger = require('./logger-C3vZG6Q0.cjs');
|
|
7
|
+
var configuration = require('./configuration-DyPW9mVa.cjs');
|
|
8
8
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
9
9
|
|
|
10
10
|
z.z.object({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var claudeAgentSdk = require('@anthropic-ai/claude-agent-sdk');
|
|
4
|
-
var
|
|
5
|
-
var logger = require('./logger-
|
|
4
|
+
var promptCacheTtl = require('./promptCacheTtl-B8PCzE6k.cjs');
|
|
5
|
+
var logger = require('./logger-C3vZG6Q0.cjs');
|
|
6
6
|
var processTreeSnapshot = require('./processTreeSnapshot-mDbnuojn.cjs');
|
|
7
7
|
|
|
8
8
|
const HAPPY_DEFAULT_ENTRYPOINT = "remote_mobile";
|
|
@@ -107,9 +107,10 @@ function query(params) {
|
|
|
107
107
|
if (env.CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS === void 0) {
|
|
108
108
|
env.CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS = "1";
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
promptCacheTtl.pinSmallFastModel(env);
|
|
111
|
+
promptCacheTtl.applyPromptCacheTtlDefault(env, opts?.cwd);
|
|
111
112
|
if (opts?.mcpServers && Object.keys(opts.mcpServers).length > 0) {
|
|
112
|
-
|
|
113
|
+
promptCacheTtl.ensureLocalProxyBypass(env);
|
|
113
114
|
}
|
|
114
115
|
if (sdkOptions.allowDangerouslySkipPermissions && typeof process.getuid === "function" && process.getuid() === 0 && env.IS_SANDBOX === void 0) {
|
|
115
116
|
env.IS_SANDBOX = "1";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { query as query$1 } from '@anthropic-ai/claude-agent-sdk';
|
|
2
|
-
import { p as pinSmallFastModel, e as ensureLocalProxyBypass } from './
|
|
3
|
-
import { l as logger } from './logger-
|
|
2
|
+
import { p as pinSmallFastModel, a as applyPromptCacheTtlDefault, e as ensureLocalProxyBypass } from './promptCacheTtl-Ce0TVbrx.mjs';
|
|
3
|
+
import { l as logger } from './logger-RpzJ4d8V.mjs';
|
|
4
4
|
import { s as snapshotTree, k as killSurvivors } from './processTreeSnapshot-CuLJDNC-.mjs';
|
|
5
5
|
|
|
6
6
|
const HAPPY_DEFAULT_ENTRYPOINT = "remote_mobile";
|
|
@@ -106,6 +106,7 @@ function query(params) {
|
|
|
106
106
|
env.CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS = "1";
|
|
107
107
|
}
|
|
108
108
|
pinSmallFastModel(env);
|
|
109
|
+
applyPromptCacheTtlDefault(env, opts?.cwd);
|
|
109
110
|
if (opts?.mcpServers && Object.keys(opts.mcpServers).length > 0) {
|
|
110
111
|
ensureLocalProxyBypass(env);
|
|
111
112
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
4
|
-
var controlClient = require('./controlClient-
|
|
5
|
-
var rateLimitWindows = require('./rateLimitWindows-
|
|
3
|
+
var logger = require('./logger-C3vZG6Q0.cjs');
|
|
4
|
+
var controlClient = require('./controlClient-DvFaPsg6.cjs');
|
|
5
|
+
var rateLimitWindows = require('./rateLimitWindows-Bm_dcQGW.cjs');
|
|
6
6
|
|
|
7
7
|
function createRateLimitReporter(send, now = Date.now) {
|
|
8
8
|
const last = /* @__PURE__ */ new Map();
|
|
@@ -41,56 +41,4 @@ function wrapperRateLimitReporter() {
|
|
|
41
41
|
return processReporter;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
function parseCompact(message) {
|
|
45
|
-
const trimmed = message.trim();
|
|
46
|
-
if (trimmed === "/compact") {
|
|
47
|
-
return {
|
|
48
|
-
isCompact: true,
|
|
49
|
-
originalMessage: trimmed
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
if (trimmed.startsWith("/compact ")) {
|
|
53
|
-
return {
|
|
54
|
-
isCompact: true,
|
|
55
|
-
originalMessage: trimmed
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
isCompact: false,
|
|
60
|
-
originalMessage: message
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
function parseClear(message) {
|
|
64
|
-
const trimmed = message.trim();
|
|
65
|
-
return {
|
|
66
|
-
isClear: trimmed === "/clear"
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
function parseSpecialCommand(message) {
|
|
70
|
-
const compactResult = parseCompact(message);
|
|
71
|
-
if (compactResult.isCompact) {
|
|
72
|
-
return {
|
|
73
|
-
type: "compact",
|
|
74
|
-
originalMessage: compactResult.originalMessage
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
const clearResult = parseClear(message);
|
|
78
|
-
if (clearResult.isClear) {
|
|
79
|
-
return {
|
|
80
|
-
type: "clear"
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
const trimmed = message.trim().toLowerCase();
|
|
84
|
-
if (trimmed === "/mcp") {
|
|
85
|
-
return { type: "mcp" };
|
|
86
|
-
}
|
|
87
|
-
if (trimmed === "/skills") {
|
|
88
|
-
return { type: "skills" };
|
|
89
|
-
}
|
|
90
|
-
return {
|
|
91
|
-
type: null
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
exports.parseSpecialCommand = parseSpecialCommand;
|
|
96
44
|
exports.wrapperRateLimitReporter = wrapperRateLimitReporter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
2
|
-
import {
|
|
3
|
-
import { f as fromCodexRateLimits, a as fromClaudeRateLimitInfo, r as rateLimitReportSignature, R as RATE_LIMIT_OBSERVED_REFRESH_MS } from './rateLimitWindows-
|
|
1
|
+
import { l as logger } from './logger-RpzJ4d8V.mjs';
|
|
2
|
+
import { a as reportRateLimitsToDaemon } from './controlClient-Bw56NIrj.mjs';
|
|
3
|
+
import { f as fromCodexRateLimits, a as fromClaudeRateLimitInfo, r as rateLimitReportSignature, R as RATE_LIMIT_OBSERVED_REFRESH_MS } from './rateLimitWindows-CQ4tIQnx.mjs';
|
|
4
4
|
|
|
5
5
|
function createRateLimitReporter(send, now = Date.now) {
|
|
6
6
|
const last = /* @__PURE__ */ new Map();
|
|
@@ -39,55 +39,4 @@ function wrapperRateLimitReporter() {
|
|
|
39
39
|
return processReporter;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
const trimmed = message.trim();
|
|
44
|
-
if (trimmed === "/compact") {
|
|
45
|
-
return {
|
|
46
|
-
isCompact: true,
|
|
47
|
-
originalMessage: trimmed
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
if (trimmed.startsWith("/compact ")) {
|
|
51
|
-
return {
|
|
52
|
-
isCompact: true,
|
|
53
|
-
originalMessage: trimmed
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
return {
|
|
57
|
-
isCompact: false,
|
|
58
|
-
originalMessage: message
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function parseClear(message) {
|
|
62
|
-
const trimmed = message.trim();
|
|
63
|
-
return {
|
|
64
|
-
isClear: trimmed === "/clear"
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
function parseSpecialCommand(message) {
|
|
68
|
-
const compactResult = parseCompact(message);
|
|
69
|
-
if (compactResult.isCompact) {
|
|
70
|
-
return {
|
|
71
|
-
type: "compact",
|
|
72
|
-
originalMessage: compactResult.originalMessage
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
const clearResult = parseClear(message);
|
|
76
|
-
if (clearResult.isClear) {
|
|
77
|
-
return {
|
|
78
|
-
type: "clear"
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
const trimmed = message.trim().toLowerCase();
|
|
82
|
-
if (trimmed === "/mcp") {
|
|
83
|
-
return { type: "mcp" };
|
|
84
|
-
}
|
|
85
|
-
if (trimmed === "/skills") {
|
|
86
|
-
return { type: "skills" };
|
|
87
|
-
}
|
|
88
|
-
return {
|
|
89
|
-
type: null
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export { parseSpecialCommand as p, wrapperRateLimitReporter as w };
|
|
42
|
+
export { wrapperRateLimitReporter as w };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
3
|
+
var logger = require('./logger-C3vZG6Q0.cjs');
|
|
4
4
|
var child_process = require('child_process');
|
|
5
5
|
var util = require('util');
|
|
6
6
|
var fs = require('fs/promises');
|
|
@@ -9,7 +9,7 @@ var require$$1 = require('path');
|
|
|
9
9
|
var spawn = require('cross-spawn');
|
|
10
10
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
11
11
|
var os = require('os');
|
|
12
|
-
var configuration = require('./configuration-
|
|
12
|
+
var configuration = require('./configuration-DyPW9mVa.cjs');
|
|
13
13
|
|
|
14
14
|
function run$1(args, options) {
|
|
15
15
|
const RUNNER_PATH = require$$1.resolve(require$$1.join(projectPath.projectPath(), "scripts", "ripgrep_launcher.cjs"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
1
|
+
import { l as logger } from './logger-RpzJ4d8V.mjs';
|
|
2
2
|
import { spawn as spawn$1, exec } from 'child_process';
|
|
3
3
|
import { promisify } from 'util';
|
|
4
4
|
import { mkdir, writeFile, appendFile, stat, rename, unlink, readdir, readFile } from 'fs/promises';
|
|
@@ -7,7 +7,7 @@ import { resolve, join, sep } from 'path';
|
|
|
7
7
|
import { spawn } from 'cross-spawn';
|
|
8
8
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
9
9
|
import { platform } from 'os';
|
|
10
|
-
import { c as configuration } from './configuration-
|
|
10
|
+
import { c as configuration } from './configuration-BZHpFD7K.mjs';
|
|
11
11
|
|
|
12
12
|
function run$1(args, options) {
|
|
13
13
|
const RUNNER_PATH = resolve(join(projectPath(), "scripts", "ripgrep_launcher.cjs"));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var controlClient = require('./controlClient-
|
|
4
|
-
var sessionOps = require('./sessionOps-
|
|
5
|
-
var time = require('./time-
|
|
3
|
+
var controlClient = require('./controlClient-DvFaPsg6.cjs');
|
|
4
|
+
var sessionOps = require('./sessionOps-DGMpl9NB.cjs');
|
|
5
|
+
var time = require('./time-BAJRbB6U.cjs');
|
|
6
6
|
var axios = require('axios');
|
|
7
7
|
var os = require('node:os');
|
|
8
|
-
var configuration = require('./configuration-
|
|
9
|
-
var persistence = require('./persistence-
|
|
8
|
+
var configuration = require('./configuration-DyPW9mVa.cjs');
|
|
9
|
+
var persistence = require('./persistence-CqtjFiD1.cjs');
|
|
10
10
|
var node_crypto = require('node:crypto');
|
|
11
11
|
|
|
12
12
|
const ACTIVE_FRESH_WINDOW_MS = 15 * 60 * 1e3;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { j as resumeDaemonSession, l as listDaemonSessions } from './controlClient-
|
|
2
|
-
import { d as archiveSession, u as unarchiveSession, h as sessionLiveness, e as sendUserMessage, i as readSessionState, o as openUserScopedSocket } from './sessionOps
|
|
3
|
-
import { d as delay } from './time-
|
|
1
|
+
import { j as resumeDaemonSession, l as listDaemonSessions } from './controlClient-Bw56NIrj.mjs';
|
|
2
|
+
import { d as archiveSession, u as unarchiveSession, h as sessionLiveness, e as sendUserMessage, i as readSessionState, o as openUserScopedSocket } from './sessionOps-CYjMT7Ad.mjs';
|
|
3
|
+
import { d as delay } from './time-umG7yHkb.mjs';
|
|
4
4
|
import axios from 'axios';
|
|
5
5
|
import { hostname } from 'node:os';
|
|
6
|
-
import { c as configuration } from './configuration-
|
|
7
|
-
import { r as readSettings, b as readCredentialsForConfiguredRelay } from './persistence-
|
|
6
|
+
import { c as configuration } from './configuration-BZHpFD7K.mjs';
|
|
7
|
+
import { r as readSettings, b as readCredentialsForConfiguredRelay } from './persistence-Bn4qEbDg.mjs';
|
|
8
8
|
import { randomUUID } from 'node:crypto';
|
|
9
9
|
|
|
10
10
|
const ACTIVE_FRESH_WINDOW_MS = 15 * 60 * 1e3;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var z = require('zod');
|
|
4
|
-
var index = require('./index-
|
|
5
|
-
var client = require('./client-
|
|
4
|
+
var index = require('./index-BOe6dKnL.cjs');
|
|
5
|
+
var client = require('./client-DmY03OZZ.cjs');
|
|
6
6
|
var precheckCompat = require('./precheckCompat-CWOi5c9L.cjs');
|
|
7
|
-
var client$1 = require('./client-
|
|
7
|
+
var client$1 = require('./client-agH03Irm.cjs');
|
|
8
8
|
var prompt = require('./prompt-Bof2aQkI.cjs');
|
|
9
9
|
var agentGuidance = require('./agentGuidance-BtBx2xxE.cjs');
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { o as AutomationNameSchema, d as AUTOMATION_ATTENTION_REASON_MAX_CHARS, e as AUTOMATION_SUMMARY_MAX_CHARS, c as AutomationPrecheckSchema,
|
|
3
|
-
import { a as authenticatedAutomationsClient, b as automationRunIdFromEnv } from './client-
|
|
2
|
+
import { o as AutomationNameSchema, d as AUTOMATION_ATTENTION_REASON_MAX_CHARS, e as AUTOMATION_SUMMARY_MAX_CHARS, c as AutomationPrecheckSchema, q as AutomationConcurrencySchema, t as AutomationActionSchema, u as AutomationTriggerSchema } from './index-WKyN-bNy.mjs';
|
|
3
|
+
import { a as authenticatedAutomationsClient, b as automationRunIdFromEnv } from './client-DcDE6Ifk.mjs';
|
|
4
4
|
import { u as updateAutomationChecked, c as createAutomationChecked } from './precheckCompat-DeEbilbr.mjs';
|
|
5
|
-
import { P as ProjectsUnsupportedError, a as ProjectRequestError, s as sharedProjectsClient } from './client-
|
|
5
|
+
import { P as ProjectsUnsupportedError, a as ProjectRequestError, s as sharedProjectsClient } from './client-DWws_aQK.mjs';
|
|
6
6
|
import { f as formatContextForTool } from './prompt-QHuFx9j6.mjs';
|
|
7
7
|
import { R as REPORT_PROGRESS_TOOL_NAME, d as REPORT_PROGRESS_TOOL_TITLE, e as REPORT_PROGRESS_TOOL_DESCRIPTION } from './agentGuidance-BDYt2Qy2.mjs';
|
|
8
8
|
|
|
@@ -32,7 +32,7 @@ You coordinate; members do the work. Follow these defaults unless the user says
|
|
|
32
32
|
3. Prevent conflicts. Before delegating, name the files or modules each task will touch. Give work on the same area to one member in sequence, or agree the boundary and who rebases onto whom before both start. Relay overlaps between members yourself. Merges are serialized and yours.
|
|
33
33
|
4. Keep the team context. When the user gives a new instruction, or you make a decision, assign work, accept or return a result, or agree a conflict rule, record it at once with mcp__happy__project_note (kind decision, finding or handoff) in the team's project. After a context compaction or restart, read mcp__happy__project_context (full=true) and team_inspect before acting. If it answers "not in a project", ask the user to link this team to a project on the team page.
|
|
34
34
|
5. Write complete task briefs. Each goal states the background with the user's own words, what to do, acceptance criteria, boundaries (no merging, releasing or touching production unless the user authorized it), and the evidence to hand back (tests, screenshots, CI).
|
|
35
|
-
6. Review before accepting. A submission is not completion: check its evidence before team_accept. With team_return, say exactly what is wrong and how to fix it. Have a different member re-review security-sensitive changes. An idle member is neither done nor stuck; run team_inspect before chasing it.
|
|
35
|
+
6. Review before accepting. A submission is not completion: check its evidence before team_accept. With team_return, say exactly what is wrong and how to fix it. Have a different member re-review security-sensitive changes. An idle member is neither done nor stuck; run team_inspect before chasing it. Submissions and member messages wake you as a new turn: end your turn and wait; never poll with sleep loops, which hold those notifications back.
|
|
36
36
|
7. Report through the briefing board. With the owner_board_* tools: every decision the user must make goes on the board (owner_board_post kind decision, 2-4 options, one recommended, a stable key), never repeated in chat or member replies; refresh it with owner_board_update. Answer what you can in the stream (it is attached for you); if it needs work, say who is on it, set owner_board_update state in_progress, then owner_board_post kind answer with reply_to. Post a report for milestones (accepted, merged, released, incident conclusion) and a todo for what only the user can do offline (request_human when it blocks you); not progress, idle members or review detail. One item per topic, at most 5 open. Without the board, report conclusion first, with only what they must decide or know. Set recipientBotId on every team_message; without it the message goes to the task's assignee.
|
|
37
37
|
8. Never create a team to recover. If a team tool says this session has no team or no team scope, do not call team_create or team_join: run team_inspect, or tell the user and wait.`;
|
|
38
38
|
const TEAM_MEMBER_RULES = `Before starting, read the team's project context with mcp__happy__project_context; it returns "not in a project" when the team has none. Do only what your task asks. If your work overlaps another member's or needs a wider scope, tell your lead with team_message (recipientBotId = the lead) before going further. Submit with evidence: commands and results, artifact paths, screenshots or CI links.`;
|
|
@@ -30,7 +30,7 @@ You coordinate; members do the work. Follow these defaults unless the user says
|
|
|
30
30
|
3. Prevent conflicts. Before delegating, name the files or modules each task will touch. Give work on the same area to one member in sequence, or agree the boundary and who rebases onto whom before both start. Relay overlaps between members yourself. Merges are serialized and yours.
|
|
31
31
|
4. Keep the team context. When the user gives a new instruction, or you make a decision, assign work, accept or return a result, or agree a conflict rule, record it at once with mcp__happy__project_note (kind decision, finding or handoff) in the team's project. After a context compaction or restart, read mcp__happy__project_context (full=true) and team_inspect before acting. If it answers "not in a project", ask the user to link this team to a project on the team page.
|
|
32
32
|
5. Write complete task briefs. Each goal states the background with the user's own words, what to do, acceptance criteria, boundaries (no merging, releasing or touching production unless the user authorized it), and the evidence to hand back (tests, screenshots, CI).
|
|
33
|
-
6. Review before accepting. A submission is not completion: check its evidence before team_accept. With team_return, say exactly what is wrong and how to fix it. Have a different member re-review security-sensitive changes. An idle member is neither done nor stuck; run team_inspect before chasing it.
|
|
33
|
+
6. Review before accepting. A submission is not completion: check its evidence before team_accept. With team_return, say exactly what is wrong and how to fix it. Have a different member re-review security-sensitive changes. An idle member is neither done nor stuck; run team_inspect before chasing it. Submissions and member messages wake you as a new turn: end your turn and wait; never poll with sleep loops, which hold those notifications back.
|
|
34
34
|
7. Report through the briefing board. With the owner_board_* tools: every decision the user must make goes on the board (owner_board_post kind decision, 2-4 options, one recommended, a stable key), never repeated in chat or member replies; refresh it with owner_board_update. Answer what you can in the stream (it is attached for you); if it needs work, say who is on it, set owner_board_update state in_progress, then owner_board_post kind answer with reply_to. Post a report for milestones (accepted, merged, released, incident conclusion) and a todo for what only the user can do offline (request_human when it blocks you); not progress, idle members or review detail. One item per topic, at most 5 open. Without the board, report conclusion first, with only what they must decide or know. Set recipientBotId on every team_message; without it the message goes to the task's assignee.
|
|
35
35
|
8. Never create a team to recover. If a team tool says this session has no team or no team scope, do not call team_create or team_join: run team_inspect, or tell the user and wait.`;
|
|
36
36
|
const TEAM_MEMBER_RULES = `Before starting, read the team's project context with mcp__happy__project_context; it returns "not in a project" when the team has none. Do only what your task asks. If your work overlaps another member's or needs a wider scope, tell your lead with team_message (recipientBotId = the lead) before going further. Submit with evidence: commands and results, artifact paths, screenshots or CI links.`;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { i as isClaudeSessionId, g as extractCompleteLines, h as decideBackfill, j as parseTerminalHookPayload, k as decideMirrorBinding, M as MIRROR_BACKFILL_LINES_DEFAULT, m as mirrorLineKey, n as mirrorLocalId, o as initializeOwnedWorktree, e as summarizeSpawnSessionForLog, q as startAgentVersionChecks, W as WORKTREE_CAPABILITY_VERSION, t as currentWorktreeService } from './mirrorProtocol-
|
|
1
|
+
import { i as isClaudeSessionId, g as extractCompleteLines, h as decideBackfill, j as parseTerminalHookPayload, k as decideMirrorBinding, M as MIRROR_BACKFILL_LINES_DEFAULT, m as mirrorLineKey, n as mirrorLocalId, o as initializeOwnedWorktree, e as summarizeSpawnSessionForLog, q as startAgentVersionChecks, W as WORKTREE_CAPABILITY_VERSION, t as currentWorktreeService } from './mirrorProtocol-Dr7fNq8V.mjs';
|
|
2
2
|
import { F as FS_MKDIR_CAPABILITY_VERSION } from './fsMkdir-DumgLTzR.mjs';
|
|
3
|
-
import { P as PI_ADAPTER_INSTALL_HINT, s as sanitizeSpawnModel } from './piRunnerArgs-
|
|
3
|
+
import { P as PI_ADAPTER_INSTALL_HINT, s as sanitizeSpawnModel } from './piRunnerArgs-DWBb63W9.mjs';
|
|
4
4
|
import fs from 'fs/promises';
|
|
5
5
|
import os from 'os';
|
|
6
6
|
import * as tmp from 'tmp';
|
|
7
7
|
import axios from 'axios';
|
|
8
8
|
import { readFileSync, openSync, fsyncSync, closeSync, renameSync, existsSync, readdirSync, statSync, unlinkSync, realpathSync, promises, constants as constants$1, writeFileSync, mkdirSync, accessSync, readSync, rmdirSync } from 'node:fs';
|
|
9
9
|
import { join, isAbsolute, resolve, dirname, sep, basename, relative } from 'node:path';
|
|
10
|
-
import { f as ensurePrivateDirectorySync, w as writePrivateFileSync, c as configuration } from './configuration-
|
|
11
|
-
import { T as TurnActivityTracker, A as ApiClient } from './api-
|
|
12
|
-
import { S as SPAWN_AGENTS, i as isSpawnAgent, s as sanitizeSpawnPermissionMode, r as resolveSpawnPermissionMode, a as resolveFirstMessageMeta, j as joinProject } from './spawnAgents-
|
|
13
|
-
import { l as logger } from './logger-
|
|
14
|
-
import { p as pruneStaleCompileCaches } from './index-
|
|
15
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
10
|
+
import { f as ensurePrivateDirectorySync, w as writePrivateFileSync, c as configuration } from './configuration-BZHpFD7K.mjs';
|
|
11
|
+
import { T as TurnActivityTracker, A as ApiClient } from './api-DNKa7kVy.mjs';
|
|
12
|
+
import { S as SPAWN_AGENTS, i as isSpawnAgent, s as sanitizeSpawnPermissionMode, r as resolveSpawnPermissionMode, a as resolveFirstMessageMeta, j as joinProject } from './spawnAgents-D-7wMw-a.mjs';
|
|
13
|
+
import { l as logger } from './logger-RpzJ4d8V.mjs';
|
|
14
|
+
import { p as pruneStaleCompileCaches } from './index-B1OxWiNG.mjs';
|
|
15
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-BNhhk2Fr.mjs';
|
|
16
16
|
import { spawn, execSync } from 'child_process';
|
|
17
|
-
import { p as packageJson } from './package-
|
|
18
|
-
import { a as globalPrefixForPackage, N as NPM_SAFE_ARG, g as getEnvironmentInfo } from './doctor-
|
|
19
|
-
import { s as spawnHappyCLI } from './spawnHappyCLI-
|
|
20
|
-
import { c as readPersistedSessions, r as readSettings, l as latchKeepAwake, q as reportSignature, s as decideDaemonHibernation, t as nextCheckDelay, v as persistSession, d as readDaemonState, x as acquireDaemonLock, a as resolveCheckMs, y as resolveIdleMs, z as deletePersistedSessions, A as writeDaemonState, B as writeSettings, C as settingIdleMs, u as updateSettings, D as rewriteCredentialsForRelay, g as readCredentials, E as releaseDaemonLock } from './persistence-
|
|
21
|
-
import { i as isDaemonRunningCurrentlyInstalledHappyVersion, s as stopDaemon, u as cleanupDaemonState } from './controlClient-
|
|
22
|
-
import { e as sendUserMessage, f as readSessionMetadata, r as readSessionTranscript, l as listAccountSessions, a as listSessions, M as MAX_READ_LIMIT, s as sessionWebUrl, g as waitForSessionKey, d as archiveSession, j as analyzeLatestTurn, k as readSessionLog, m as TURN_WINDOW, n as userPromptText } from './sessionOps
|
|
17
|
+
import { p as packageJson } from './package-CwB8rFJt.mjs';
|
|
18
|
+
import { a as globalPrefixForPackage, N as NPM_SAFE_ARG, g as getEnvironmentInfo } from './doctor-B4HQiW6j.mjs';
|
|
19
|
+
import { s as spawnHappyCLI } from './spawnHappyCLI-CnyyJk74.mjs';
|
|
20
|
+
import { c as readPersistedSessions, r as readSettings, l as latchKeepAwake, q as reportSignature, s as decideDaemonHibernation, t as nextCheckDelay, v as persistSession, d as readDaemonState, x as acquireDaemonLock, a as resolveCheckMs, y as resolveIdleMs, z as deletePersistedSessions, A as writeDaemonState, B as writeSettings, C as settingIdleMs, u as updateSettings, D as rewriteCredentialsForRelay, g as readCredentials, E as releaseDaemonLock } from './persistence-Bn4qEbDg.mjs';
|
|
21
|
+
import { i as isDaemonRunningCurrentlyInstalledHappyVersion, s as stopDaemon, u as cleanupDaemonState } from './controlClient-Bw56NIrj.mjs';
|
|
22
|
+
import { e as sendUserMessage, f as readSessionMetadata, r as readSessionTranscript, l as listAccountSessions, a as listSessions, M as MAX_READ_LIMIT, s as sessionWebUrl, g as waitForSessionKey, d as archiveSession, j as analyzeLatestTurn, k as readSessionLog, m as TURN_WINDOW, n as userPromptText } from './sessionOps-CYjMT7Ad.mjs';
|
|
23
23
|
import fastify from 'fastify';
|
|
24
24
|
import { z } from 'zod';
|
|
25
25
|
import { validatorCompiler, serializerCompiler } from 'fastify-type-provider-zod';
|
|
@@ -27,62 +27,62 @@ import { d as decodeBase64, s as sameRelay, e as encodeBase64, h as decrypt } fr
|
|
|
27
27
|
import { randomBytes, createHash, timingSafeEqual, randomUUID } from 'node:crypto';
|
|
28
28
|
import { c as checkPreviewPath } from './previewPath-CXN4Vag0.mjs';
|
|
29
29
|
import { a as BACKGROUND_TASKS_MAX, d as BACKGROUND_TASK_DESCRIPTION_MAX, e as BackgroundTaskTracker } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
30
|
-
import { b as sanitizeRateLimitReport } from './rateLimitWindows-
|
|
31
|
-
import { f as formatEditConflictNotice, b as SESSION_PEER_SENT_FROM, s as sendPeerMessage, l as listPeerSessions, C as CLI_PEER_SENDER_ID } from './peerTools-
|
|
30
|
+
import { b as sanitizeRateLimitReport } from './rateLimitWindows-CQ4tIQnx.mjs';
|
|
31
|
+
import { f as formatEditConflictNotice, b as SESSION_PEER_SENT_FROM, s as sendPeerMessage, l as listPeerSessions, C as CLI_PEER_SENDER_ID } from './peerTools-2_8Bw9PU.mjs';
|
|
32
32
|
import os$1, { hostname, homedir, tmpdir } from 'node:os';
|
|
33
|
-
import { c as RemoteCallBudget, e as REMOTE_WRITE_CALLS_PER_MINUTE, d as deliverToSession, g as guardRemoteSessionOpsRequest, h as remoteError, i as REMOTE_OP_DEADLINE_MS, j as formatRemoteAuditLine, k as REMOTE_SEND_COMMIT_DEADLINE_MS, m as REMOTE_RESUME_WAIT_MS, n as capRemoteTranscript, o as capRemoteText, p as REMOTE_ANSWER_MAX_BYTES, q as REMOTE_TITLE_MAX_BYTES } from './remoteSessionClient-
|
|
34
|
-
import { assistantHome, bootstrapAssistantHome } from './bootstrap-
|
|
35
|
-
import { refreshAgentHomes, locateClaudeConversation, agentHomeSpawnEnv } from './index-
|
|
33
|
+
import { c as RemoteCallBudget, e as REMOTE_WRITE_CALLS_PER_MINUTE, d as deliverToSession, g as guardRemoteSessionOpsRequest, h as remoteError, i as REMOTE_OP_DEADLINE_MS, j as formatRemoteAuditLine, k as REMOTE_SEND_COMMIT_DEADLINE_MS, m as REMOTE_RESUME_WAIT_MS, n as capRemoteTranscript, o as capRemoteText, p as REMOTE_ANSWER_MAX_BYTES, q as REMOTE_TITLE_MAX_BYTES } from './remoteSessionClient-uPj7omsw.mjs';
|
|
34
|
+
import { assistantHome, bootstrapAssistantHome } from './bootstrap-Di38SnpN.mjs';
|
|
35
|
+
import { refreshAgentHomes, locateClaudeConversation, agentHomeSpawnEnv } from './index-CVHRt3SS.mjs';
|
|
36
36
|
import require$$0, { existsSync as existsSync$1, statSync as statSync$1, mkdtempSync, rmSync } from 'fs';
|
|
37
37
|
import require$$1, { join as join$1 } from 'path';
|
|
38
38
|
import { spawn as spawn$1, execFile, spawnSync } from 'node:child_process';
|
|
39
39
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
40
40
|
import { d as daemonEndpointsMatch, r as resolveClaudeCredentialReadiness } from './doctorReadiness-C208SMN9.mjs';
|
|
41
|
-
import { o as ownerRetryPending, c as consumeOwnerRetry, s as spawnGate, a as afterStartupFailure, b as startupFailureMessage, T as TEAM_SPAWN_MAX_ATTEMPTS, d as TEAM_CLEANUP_RETRY_MS, g as getInitialMachineMetadata, e as getStartupCliAvailability, f as TEAM_RETRY_CAPABILITY_VERSION, w as withRunningCliFacts } from './machineMetadata-
|
|
41
|
+
import { o as ownerRetryPending, c as consumeOwnerRetry, s as spawnGate, a as afterStartupFailure, b as startupFailureMessage, T as TEAM_SPAWN_MAX_ATTEMPTS, d as TEAM_CLEANUP_RETRY_MS, g as getInitialMachineMetadata, e as getStartupCliAvailability, f as TEAM_RETRY_CAPABILITY_VERSION, w as withRunningCliFacts } from './machineMetadata-CiQ2_1Mq.mjs';
|
|
42
42
|
import { M as ModelConfigError, B as BackupStore, r as readConfigFile, s as sha256, a as atomicWriteFile } from './fileStore-5qpetZS0.mjs';
|
|
43
43
|
import { c as collectSecretValues, a as parseJsonObject, b as childObject, s as setOrDelete, d as changedPaths, e as stringifyLike, f as fail, n as normalizeModelList, g as normalizeModelId, h as normalizeSecret, i as normalizeBaseUrl, u as uniq, j as baseUrlWarnings, m as maskSecret, k as getPath$1, l as normalizeProviderId, o as piAdapter, r as redactText } from './pi-CqyoZMjI.mjs';
|
|
44
44
|
import require$$3 from 'crypto';
|
|
45
45
|
import { c as commandOnPath } from './detectCLI-CSGMlV51.mjs';
|
|
46
|
-
import { buildResumeLaunch } from './handleResumeCommand-
|
|
46
|
+
import { buildResumeLaunch } from './handleResumeCommand-BU1uMNyv.mjs';
|
|
47
47
|
import { n as normalizeWebPanels } from './webPanels-B2_C2-3g.mjs';
|
|
48
|
-
import {
|
|
48
|
+
import { M as ServerMigrateNoticeSchema, N as isHarnessInstallId, e as AUTOMATION_SUMMARY_MAX_CHARS, Q as AUTOMATION_PRECHECK_OUTPUT_MAX_CHARS, T as AUTOMATION_PRECHECK_DEFAULT_TIMEOUT_MS, b as AUTOMATION_PRECHECK_MAX_TIMEOUT_MS, U as AUTOMATION_CLAIM_MAX_RUNS, V as AUTOMATION_DAEMON_CAPABILITY_PRECHECK, W as AUTOMATION_DEFAULT_LEASE_MS, i as isAutomationRunTerminal, X as HARNESS_INSTALL_CAPABILITY_VERSION } from './index-WKyN-bNy.mjs';
|
|
49
49
|
import { access, symlink, readFile, rm, unlink, readlink, lstat, constants, rename, mkdir, copyFile, readdir, stat, open } from 'node:fs/promises';
|
|
50
50
|
import { p as parseExactVersion, c as compareExactVersions, f as fetchCliUpdateState, r as resolveCliUpdateCheckInterval, D as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS } from './cliUpdate-Y34VGe9Y.mjs';
|
|
51
|
-
import { P as ProjectsUnsupportedError, c as createProjectsClient } from './client-
|
|
52
|
-
import { c as createAutomationsClient, i as isAutomationsUnavailable, d as AutomationsRequestError } from './client-
|
|
51
|
+
import { P as ProjectsUnsupportedError, c as createProjectsClient } from './client-DWws_aQK.mjs';
|
|
52
|
+
import { c as createAutomationsClient, i as isAutomationsUnavailable, d as AutomationsRequestError } from './client-DcDE6Ifk.mjs';
|
|
53
53
|
import { w as withKeychainOffPath, a as keychainIdentityFor, i as interpretSecurityRead, s as securityReadArgs, b as securityDeleteArgs, c as keychainOffShimDir, d as interpretCredentialsFile, C as CREDENTIALS_REJECTED_DETAIL, e as buildClaudeAuthState, f as claudeAuthStateChanged, r as resolveSdkClaudeBinary, g as classifyAuthStatus, h as diagnoseStores, p as parseLaunchctlPid, H as HAPPY_DAEMON_LAUNCHD_LABEL, j as classifyLineage, l as probeLaunchdJob, m as detectDaemonSupervisor, n as daemonLineage, o as probeSystemdKillMode, q as wrappersSurviveHandover, t as handoverWaitsForSessions } from './daemonSupervisor-BxohggqN.mjs';
|
|
54
54
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
55
55
|
import { b as extractClaudeEditPaths } from './editPaths-BVfS_FFL.mjs';
|
|
56
|
-
import { s as startFileWatcher } from './startFileWatcher-
|
|
57
|
-
import { I as InvalidateSync } from './sync-
|
|
56
|
+
import { s as startFileWatcher } from './startFileWatcher-CpO5Mwbr.mjs';
|
|
57
|
+
import { I as InvalidateSync } from './sync-I8NYmycF.mjs';
|
|
58
58
|
import { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
|
|
59
59
|
import { t as tmuxArgs, a as scrubTmuxClientEnv, s as shellescape } from './tmuxSocket-B8Yx20sT.mjs';
|
|
60
|
-
import { p as processIdentityFields, r as readSessionLock, t as terminateProcess, d as terminateProcessTree } from './sessionLock-
|
|
60
|
+
import { p as processIdentityFields, r as readSessionLock, t as terminateProcess, d as terminateProcessTree } from './sessionLock-C7Wg1RVd.mjs';
|
|
61
61
|
import { findAllHappyProcesses } from './doctor-BPkYWSuq.mjs';
|
|
62
|
-
import { T as TEAM_SKILL, a as TEAM_LEAD_PLAYBOOK, b as TEAM_MEMBER_RULES } from './resources-
|
|
62
|
+
import { T as TEAM_SKILL, a as TEAM_LEAD_PLAYBOOK, b as TEAM_MEMBER_RULES } from './resources-CLP_MpK4.mjs';
|
|
63
63
|
import { promisify } from 'node:util';
|
|
64
|
-
import { b as clipText, r as renderAction, c as clipAutomationReport, e as renderTemplate } from './template-
|
|
64
|
+
import { b as clipText, r as renderAction, c as clipAutomationReport, e as renderTemplate } from './template-CEK8MEjo.mjs';
|
|
65
65
|
import { d as describeAgentHome } from './loginShellEnv-Dw8M7tkI.mjs';
|
|
66
|
-
import './acpSessionResume-
|
|
67
|
-
import './lidState-
|
|
66
|
+
import './acpSessionResume-F705a1cF.mjs';
|
|
67
|
+
import './lidState-D-lsD1FS.mjs';
|
|
68
68
|
import 'node:events';
|
|
69
69
|
import 'socket.io-client';
|
|
70
|
-
import './pushNotifications-
|
|
70
|
+
import './pushNotifications-BThg4nVd.mjs';
|
|
71
71
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
72
72
|
import './limits-DIo7rEBR.mjs';
|
|
73
|
-
import './time-
|
|
74
|
-
import './registerCommonHandlers-
|
|
73
|
+
import './time-umG7yHkb.mjs';
|
|
74
|
+
import './registerCommonHandlers-CaWl9ll1.mjs';
|
|
75
75
|
import 'util';
|
|
76
76
|
import 'cross-spawn';
|
|
77
77
|
import '@paralleldrive/cuid2';
|
|
78
78
|
import 'chalk';
|
|
79
79
|
import 'node:module';
|
|
80
80
|
import 'tweetnacl';
|
|
81
|
-
import './browser-
|
|
81
|
+
import './browser-6Cg7G6bb.mjs';
|
|
82
82
|
import 'open';
|
|
83
83
|
import './ids-DU6sLx4C.mjs';
|
|
84
84
|
import 'url';
|
|
85
|
-
import './localHappyAgentAuth-
|
|
85
|
+
import './localHappyAgentAuth-wvDp-nGj.mjs';
|
|
86
86
|
import './processTreeSnapshot-CuLJDNC-.mjs';
|
|
87
87
|
import 'ps-list';
|
|
88
88
|
|
|
@@ -7161,7 +7161,7 @@ ${action.prompt}`, { localId: `automation-${run.id}` });
|
|
|
7161
7161
|
}
|
|
7162
7162
|
}
|
|
7163
7163
|
persist({ runId: run.id, automationId: automation.id, kind: "spawn", phase: "starting", claimId: run.claimId, stickyKey, ...action.worktree ? { directory } : {} });
|
|
7164
|
-
const spawned = await deps.spawn({ directory, agent, permissionMode, spawnedBy: AUTOMATION_SPAWNED_BY, environmentVariables: env });
|
|
7164
|
+
const spawned = await deps.spawn({ directory, agent, permissionMode, spawnedBy: AUTOMATION_SPAWNED_BY, environmentVariables: stickyKey ? { ...env, VH_AUTOMATION_STICKY: "1" } : env });
|
|
7165
7165
|
if (spawned.type !== "success") {
|
|
7166
7166
|
await failNow(claimed, "spawn", spawned.type === "error" ? spawned.errorMessage : "Directory approval required", "spawn_failed");
|
|
7167
7167
|
return;
|