very-happy-cli 0.2.199 → 0.2.201
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-Bo6bOamG.mjs → AcpBackend-BNinFMHZ.mjs} +3 -3
- package/dist/{AcpBackend-HhZ8nrIh.cjs → AcpBackend-CMFlng3C.cjs} +3 -3
- package/dist/{AcpSessionManager--7nDgA9S.cjs → AcpSessionManager-CPgoICjp.cjs} +2 -2
- package/dist/{AcpSessionManager-C-pkJKO2.mjs → AcpSessionManager-Dg6gKavf.mjs} +2 -2
- package/dist/{BasePermissionHandler-Ffp54Ntg.mjs → BasePermissionHandler-DwcfWUjr.mjs} +1 -1
- package/dist/{BasePermissionHandler-al7UXWRq.cjs → BasePermissionHandler-c-NaRa_E.cjs} +1 -1
- package/dist/{account-DCIz-iyL.cjs → account-D23SGj7p.cjs} +11 -11
- package/dist/{account-Bnk1yyGS.mjs → account-pzgzyIXW.mjs} +11 -11
- package/dist/{accountService-B59oKwa4.cjs → accountService-Cns8UYGI.cjs} +4 -4
- package/dist/{accountService-WPnOpkvs.mjs → accountService-DEpIq6CF.mjs} +4 -4
- package/dist/{acpSessionResume-CfogEHtT.cjs → acpSessionResume-DklOhwir.cjs} +1 -1
- package/dist/{acpSessionResume-BVroOlVN.mjs → acpSessionResume-urFpnGsk.mjs} +1 -1
- package/dist/{agentHome-Y3bMEtCp.cjs → agentHome-BTwMaYw1.cjs} +4 -4
- package/dist/{agentHome-CHTzSiu4.mjs → agentHome-DyrLqr8b.mjs} +4 -4
- package/dist/{api-DibgCucH.mjs → api-1CD4oRSW.mjs} +16 -10
- package/dist/{api-CgzfmyYS.cjs → api-KVVs-GkM.cjs} +16 -10
- package/dist/{apiMachine-DSI5mKlh.cjs → apiMachine-1sd5IVIB.cjs} +18 -18
- package/dist/{apiMachine-BUaFSi27.mjs → apiMachine-BDVE6MOn.mjs} +18 -18
- package/dist/{attachmentContent-D9wq3bok.mjs → attachmentContent-CeF54XeO.mjs} +2 -2
- package/dist/{attachmentContent-JWUS5uhH.cjs → attachmentContent-f3BbOKqz.cjs} +2 -2
- package/dist/{auth-DFMJQDNF.mjs → auth-CV2H-smf.mjs} +8 -8
- package/dist/{auth-B6H2wHTy.cjs → auth-CXCX-iJ-.cjs} +5 -5
- package/dist/{auth-BjWk9sHU.mjs → auth-WCd2S1zA.mjs} +5 -5
- package/dist/{auth-BXav16o0.cjs → auth-eielZ6Sc.cjs} +8 -8
- package/dist/{auto-CMO-VQYN.cjs → auto-49cRCADN.cjs} +17 -17
- package/dist/{auto-DOhQ2OU5.mjs → auto-BsCE_UHT.mjs} +17 -17
- package/dist/{bootstrap-CY7Db_VV.mjs → bootstrap-D_1MskAl.mjs} +2 -2
- package/dist/{bootstrap-Brd_jnA2.cjs → bootstrap-N1PY4ypX.cjs} +2 -2
- package/dist/{browser-BhncBLE4.cjs → browser-B0SEB6r3.cjs} +1 -1
- package/dist/{browser-BpwBEJDU.mjs → browser-DL3QIQLS.mjs} +1 -1
- package/dist/{claudeAccountEnv-z_ecsJAP.cjs → claudeAccountEnv-Btp39mfa.cjs} +1 -1
- package/dist/{claudeAccountEnv-CYwfvK1u.mjs → claudeAccountEnv-DowsOlDB.mjs} +1 -1
- package/dist/{claudeLocal-coKrsYmR.mjs → claudeLocal-DRMWkdCC.mjs} +5 -5
- package/dist/{claudeLocal-Co_DyW-D.cjs → claudeLocal-Ix69XJ1t.cjs} +5 -5
- package/dist/{claudeLocalLauncher-BFnLc0R-.mjs → claudeLocalLauncher-D4tU6R5n.mjs} +10 -10
- package/dist/{claudeLocalLauncher-CNDrO3b6.cjs → claudeLocalLauncher-rDojqNoa.cjs} +10 -10
- package/dist/{claudeSessionFork-BuDN5SkN.cjs → claudeSessionFork-C_X08LFh.cjs} +1 -1
- package/dist/{claudeSessionFork-dOOc9hpA.mjs → claudeSessionFork-H0ZVQALg.mjs} +1 -1
- package/dist/{client-B5uvkdLn.mjs → client-4YWjreN3.mjs} +2 -2
- package/dist/{client-DKPLBLvx.mjs → client-BgInTvr6.mjs} +2 -2
- package/dist/{client-KbhVRYjy.cjs → client-BoymtYLP.cjs} +2 -2
- package/dist/{client-Ng-oAhlX.mjs → client-CK-jvgM1.mjs} +4 -4
- package/dist/client-CMUlpYcy.mjs +114 -0
- package/dist/{client-CBbUzTcm.cjs → client-DGqnrSg4.cjs} +4 -4
- package/dist/client-DI8Rxsbw.cjs +120 -0
- package/dist/{client-BKyTA9Hf.cjs → client-P1VkI76z.cjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +25 -16
- package/dist/codex/happyMcpStdioBridge.mjs +25 -16
- package/dist/{codexAccount-DeFAjaHW.mjs → codexAccount-CieIQLOX.mjs} +1 -1
- package/dist/{codexAccount-8Wv5enLR.cjs → codexAccount-D-OBY29W.cjs} +1 -1
- package/dist/{codexAppServerClient-6QmZ2Tn5.cjs → codexAppServerClient-BnMR-DRn.cjs} +3 -3
- package/dist/{codexAppServerClient-BAcU_XN8.mjs → codexAppServerClient-aDrsSyjS.mjs} +3 -3
- package/dist/{codexCommand-CCeaWZ-1.mjs → codexCommand-BCpJzf3q.mjs} +51 -46
- package/dist/{codexCommand-hJYa82Af.cjs → codexCommand-C3oEEpOa.cjs} +51 -46
- package/dist/{codexTermination-BX0sCNFy.mjs → codexTermination-B5haG5wJ.mjs} +1 -1
- package/dist/{codexTermination-DKjQcC3e.cjs → codexTermination-DXhw5Pzi.cjs} +1 -1
- package/dist/{config-171VOPLq.cjs → config-CdGiZZKy.cjs} +3 -3
- package/dist/{config-9iXYh_zS.mjs → config-D9wjo4oa.mjs} +3 -3
- package/dist/{configuration-D9k5yIzV.mjs → configuration-DhEqAYzz.mjs} +1 -1
- package/dist/{configuration-CAzuk0Xs.cjs → configuration-LWFmTxty.cjs} +1 -1
- package/dist/{connect-MlXU2FE3.cjs → connect-BZLD0aVm.cjs} +13 -13
- package/dist/{connect-BEhKtsEn.mjs → connect-CY_EMXQs.mjs} +13 -13
- package/dist/{context-CI9LnDu1.cjs → context-BbZ18lX0.cjs} +1 -1
- package/dist/{context-WVEuAdf2.mjs → context-UzqWaA7f.mjs} +1 -1
- package/dist/{controlClient-DhFAPGHz.mjs → controlClient-PaIiDxM6.mjs} +3 -3
- package/dist/{controlClient-Bb188cU0.cjs → controlClient-TVMpETsR.cjs} +3 -3
- package/dist/{createSessionMetadata-BIK0Xz31.mjs → createSessionMetadata-BWb81WZg.mjs} +3 -2
- package/dist/{createSessionMetadata-C2EQi_od.cjs → createSessionMetadata-hGZeo_nR.cjs} +3 -2
- package/dist/{daemonAccounts-DD5YBwku.mjs → daemonAccounts-D5shoCLt.mjs} +3 -3
- package/dist/{daemonAccounts-nLyHz8WB.cjs → daemonAccounts-ciidbU2h.cjs} +2 -2
- package/dist/{defaultPermissionMode-BA1fgIpW.cjs → defaultPermissionMode-Cs_Tv83b.cjs} +1 -1
- package/dist/{defaultPermissionMode-Dmw3lpdN.mjs → defaultPermissionMode-DgeiMMqy.mjs} +1 -1
- package/dist/{deterministicJson-DCzFgRiT.cjs → deterministicJson-BpDDS7c9.cjs} +121 -24
- package/dist/{deterministicJson-BJ7LY5-S.mjs → deterministicJson-Cg3z7uUX.mjs} +117 -20
- package/dist/{doctor-jAPeyoi6.mjs → doctor-BanQ3jQg.mjs} +7 -7
- package/dist/{doctor-CH_pTY3Q.cjs → doctor-DOzji0f7.cjs} +7 -7
- package/dist/{downloadTarget-BhMm1keb.mjs → downloadTarget-BCSXmPRE.mjs} +6 -6
- package/dist/{downloadTarget-CZS0BVu2.cjs → downloadTarget-BhIAhyEV.cjs} +6 -6
- package/dist/{ensureDaemonRunning-BjbC8PuJ.mjs → ensureDaemonRunning-BZGBE838.mjs} +5 -5
- package/dist/{ensureDaemonRunning-CTKaWMED.cjs → ensureDaemonRunning-DMOCzvQP.cjs} +5 -5
- package/dist/format-BxGkJUki.mjs +71 -0
- package/dist/format-CgiY6uup.cjs +75 -0
- package/dist/{handleResumeCommand-DbFTdwoc.mjs → handleResumeCommand-BRV-9h0o.mjs} +5 -5
- package/dist/{handleResumeCommand-DsaEUiax.cjs → handleResumeCommand-ChnR-12l.cjs} +5 -5
- package/dist/{index-BnT8yvlF.cjs → index-44o_qMvE.cjs} +72 -3
- package/dist/{index-DuoMPw0y.cjs → index-B7HlUXOX.cjs} +4 -4
- package/dist/{index-qVJYCmRA.cjs → index-BuOzDU17.cjs} +4 -4
- package/dist/{index-DcfbjaVL.mjs → index-C_Y9426m.mjs} +3 -3
- package/dist/{index-BQvPYTNM.mjs → index-CiRMvS73.mjs} +59 -4
- package/dist/{index-BEKb2cxz.mjs → index-D5abHQNL.mjs} +48 -43
- package/dist/{index-DL6ONx6v.cjs → index-DnEgpRo4.cjs} +3 -3
- package/dist/{index-DpQ9OLYi.mjs → index-Do1r62PF.mjs} +4 -4
- package/dist/{index-DdJRSpLB.cjs → index-DuOthh8V.cjs} +47 -42
- package/dist/{index-BAjoMeJi.mjs → index-HJFzeG0B.mjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-CJcRTQVK.mjs → install-BurTXawL.mjs} +3 -3
- package/dist/{install-5nblS8vW.cjs → install-CUAUG3u4.cjs} +3 -3
- package/dist/issue-DpMsnOFm.mjs +229 -0
- package/dist/issue-feEUrjV0.cjs +237 -0
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +7 -0
- package/dist/lib.d.mts +7 -0
- package/dist/lib.mjs +12 -12
- package/dist/{localHappyAgentAuth-Bsk_VyUN.cjs → localHappyAgentAuth-DxlQgaer.cjs} +1 -1
- package/dist/{localHappyAgentAuth-CD896cy4.mjs → localHappyAgentAuth-kg2RFvOy.mjs} +1 -1
- package/dist/{logger-n9NOzHhK.mjs → logger-CFrzcRHD.mjs} +17 -3
- package/dist/{logger-LsJ3Cl5o.cjs → logger-Hyhy2boA.cjs} +17 -2
- package/dist/{machineMetadata-CUU2NSYl.cjs → machineMetadata-BLymhM03.cjs} +3 -3
- package/dist/{machineMetadata-Bc7FwngX.mjs → machineMetadata-DiStbYik.mjs} +3 -3
- package/dist/{main-CEu9zJ4x.cjs → main-7G17Noc3.cjs} +58 -48
- package/dist/{main-CzItRviV.mjs → main-D1rk-68I.mjs} +58 -48
- package/dist/{mcp-yK3ynz_E.mjs → mcp-C0DMPeTt.mjs} +18 -18
- package/dist/{mcp-CPW1yQdX.cjs → mcp-DUeAS-D6.cjs} +18 -18
- package/dist/{mirrorProtocol-5bgkr1Or.cjs → mirrorProtocol-YUoEuIYO.cjs} +3 -3
- package/dist/{mirrorProtocol-CoXxepvL.mjs → mirrorProtocol-dRyartIG.mjs} +3 -3
- package/dist/{package-D7V1BX2I.cjs → package-06cGlmeD.cjs} +7 -7
- package/dist/{package-CCF6FHr2.mjs → package-DxE8PttX.mjs} +7 -7
- package/dist/{panels-CF5n641F.mjs → panels-BUqmsRE0.mjs} +5 -5
- package/dist/{panels-9DdVhaxc.cjs → panels-D0GHfIJC.cjs} +5 -5
- package/dist/{peerTools-gR_3dwdA.mjs → peerTools-BiFpxXdf.mjs} +5 -5
- package/dist/{peerTools-Dv6bgHkW.cjs → peerTools-CTCyRdg2.cjs} +5 -5
- package/dist/{persistence-B5U9rC15.mjs → persistence-CF7oV1oH.mjs} +2 -2
- package/dist/{persistence-Dl3sBrCF.cjs → persistence-_W9tE-bW.cjs} +2 -2
- package/dist/{piRunnerArgs-DOV74xAt.mjs → piRunnerArgs-Cfc-F-FJ.mjs} +1 -1
- package/dist/{piRunnerArgs-rygeUdRz.cjs → piRunnerArgs-T2cAiaGW.cjs} +1 -1
- package/dist/{piRuntime-BvxCy9qQ.cjs → piRuntime-BzECTca4.cjs} +1 -1
- package/dist/{piRuntime-dtlRpOYa.mjs → piRuntime-CzYkZrYV.mjs} +1 -1
- package/dist/{piTerminal-Bx6c5Jyd.mjs → piTerminal-0tOAYsFm.mjs} +20 -20
- package/dist/{piTerminal-ClaMS-57.cjs → piTerminal-WF--dHaC.cjs} +20 -20
- package/dist/{pushNotifications-pHkbUkqT.mjs → pushNotifications-CxX10K6n.mjs} +3 -3
- package/dist/{pushNotifications-IZaTtVDG.cjs → pushNotifications-DdzTbrA3.cjs} +3 -3
- package/dist/{query-D_3rFFWe.mjs → query-Bkh7d52V.mjs} +1 -1
- package/dist/{query-BVqnfxlX.cjs → query-Cwx4pv91.cjs} +1 -1
- package/dist/{rateLimitWindows-DnLJ-gve.mjs → rateLimitWindows-DdUMUEoy.mjs} +1 -1
- package/dist/{rateLimitWindows-C7xi99Eb.cjs → rateLimitWindows-DjJjgjt4.cjs} +1 -1
- package/dist/{reconnectGate-CHI12y0Y.cjs → reconnectGate-DeDhtQJW.cjs} +1 -1
- package/dist/{reconnectGate-DPDXEkOX.mjs → reconnectGate-uTLj82tS.mjs} +1 -1
- package/dist/{registerCommonHandlers-BrTglZnC.mjs → registerCommonHandlers-BYrmi-A4.mjs} +2 -2
- package/dist/{registerCommonHandlers-CUCw-rad.cjs → registerCommonHandlers-BrEtSwNk.cjs} +2 -2
- package/dist/{registerKillSessionHandler-Bo697Mt0.cjs → registerKillSessionHandler-Bp3g11wW.cjs} +6 -6
- package/dist/{registerKillSessionHandler-BJSVT1iq.mjs → registerKillSessionHandler-Cuzq6ecP.mjs} +6 -6
- package/dist/{registerSideQuestionHandler-BFPCMrmC.mjs → registerSideQuestionHandler-BmEWWaZW.mjs} +4 -4
- package/dist/{registerSideQuestionHandler-HNpsU_20.cjs → registerSideQuestionHandler-ChIbHl_g.cjs} +4 -4
- package/dist/{remoteSessionClient-Blz-z9jM.mjs → remoteSessionClient-Dj2rV8Az.mjs} +5 -5
- package/dist/{remoteSessionClient-9NzkfL13.cjs → remoteSessionClient-DoxfnpnK.cjs} +5 -5
- package/dist/{reportProgressTool-CW9rSnwQ.cjs → reportProgressTool-DvZhaEiN.cjs} +113 -3
- package/dist/{reportProgressTool-B2-RFomn.mjs → reportProgressTool-qo0QIFNd.mjs} +111 -4
- package/dist/{run-9aB7U4BF.cjs → run-BqlWdDTL.cjs} +447 -50
- package/dist/{run-BXyfDvCk.mjs → run-mHeOSOEt.mjs} +447 -50
- package/dist/{runClaude-B4ohp5Dk.cjs → runClaude-MjIrNrxT.cjs} +28 -25
- package/dist/{runClaude-BKpWJdCX.mjs → runClaude-Z4BVFEdC.mjs} +28 -25
- package/dist/{runClaudeDeps-B0x5BCqC.mjs → runClaudeDeps-8RXtu0Zc.mjs} +49 -46
- package/dist/{runClaudeDeps-gqSYeQkl.cjs → runClaudeDeps-tPqwAl_m.cjs} +43 -40
- package/dist/{runGemini-BvV5k9b3.mjs → runGemini-DG3jIxWv.mjs} +36 -33
- package/dist/{runGemini-BMzDy7hY.cjs → runGemini-uc-fViXY.cjs} +36 -33
- package/dist/{runOpenClaw-UcIDMHm7.mjs → runOpenClaw-C4676Sdl.mjs} +18 -18
- package/dist/{runOpenClaw-3Cx3C2ww.cjs → runOpenClaw-DZtoCmSG.cjs} +18 -18
- package/dist/{sandbox-QJdxjmxr.cjs → sandbox-DS7uZ71y.cjs} +4 -4
- package/dist/{sandbox-BC-KbWe7.mjs → sandbox-r29ys6I4.mjs} +4 -4
- package/dist/selfCheck-BmT9ihpR.mjs +89 -0
- package/dist/{selfCheck-Be_M5coh.cjs → selfCheck-CSZ-wx1W.cjs} +40 -39
- package/dist/{send-x789D5ci.mjs → send-BGApHm-z.mjs} +8 -8
- package/dist/{send-DhWp8M8B.cjs → send-CrmLy9lW.cjs} +8 -8
- package/dist/{server-kPDtS-DX.cjs → server-CjwXsTKP.cjs} +6 -6
- package/dist/{server-D-aSnlWI.mjs → server-hutEAAn1.mjs} +4 -4
- package/dist/{sessionLock-JWBEd8g_.mjs → sessionLock-Dj9_lShU.mjs} +3 -3
- package/dist/{sessionLock-CuPN9xfW.cjs → sessionLock-unMOEniJ.cjs} +3 -3
- package/dist/sessionMetadata-B44cL4Xj.cjs +29 -0
- package/dist/sessionMetadata-C1eoAi89.mjs +25 -0
- package/dist/{sessionOps-VS1baPz_.mjs → sessionOps-BmhqmPPd.mjs} +4 -4
- package/dist/{sessionOps-CYNOycqT.cjs → sessionOps-SxZr9veq.cjs} +4 -4
- package/dist/{sessionProvider-iRLKuR9V.mjs → sessionProvider-CPlvR0nT.mjs} +10 -10
- package/dist/{sessionProvider-DksA6icp.cjs → sessionProvider-DLlqS4y6.cjs} +10 -10
- package/dist/{sessionScanner--X2Pzlra.cjs → sessionScanner-B7nZ1i40.cjs} +3 -3
- package/dist/{sessionScanner-CAxiFc_3.mjs → sessionScanner-DvVZpLHG.mjs} +3 -3
- package/dist/{sessions-Dca1UgiF.mjs → sessions-BIYm43CM.mjs} +10 -10
- package/dist/{sessions-BrnP53eO.cjs → sessions-CQQW7u6X.cjs} +10 -10
- package/dist/{setupOfflineReconnection-nguxOn4s.mjs → setupOfflineReconnection-BELrtMGG.mjs} +2 -2
- package/dist/{setupOfflineReconnection-Dwg6nHnP.cjs → setupOfflineReconnection-D7WJTAi_.cjs} +2 -2
- package/dist/{spawn-DDyMxQ7Z.cjs → spawn-CuWcPkkN.cjs} +14 -14
- package/dist/{spawn-BJMU9zbZ.mjs → spawn-DnPu7h2o.mjs} +14 -14
- package/dist/{spawnAgents-SeUX5gIq.mjs → spawnAgents-BclZYkov.mjs} +1 -1
- package/dist/{spawnAgents-B8GT4JQX.cjs → spawnAgents-DvbEDCIq.cjs} +1 -1
- package/dist/{spawnHappyCLI-Cvk2ZMYj.cjs → spawnHappyCLI-CI7Ax4mF.cjs} +1 -1
- package/dist/{spawnHappyCLI-DnT_QEdn.mjs → spawnHappyCLI-D6OcgFDR.mjs} +1 -1
- package/dist/{startFileWatcher-Djf0SdmK.mjs → startFileWatcher-BiWGhlGW.mjs} +1 -1
- package/dist/{startFileWatcher-DLfkP-IW.cjs → startFileWatcher-DBW14aP2.cjs} +1 -1
- package/dist/{startupSessionCreate-CxwJb5m9.cjs → startupSessionCreate-DFl54ozj.cjs} +3 -3
- package/dist/{startupSessionCreate-f1g6pp6E.mjs → startupSessionCreate-DbBpGQo9.mjs} +3 -3
- package/dist/{store-D41VdZcL.cjs → store-Cpb1LMNW.cjs} +1 -1
- package/dist/{store-DnaIrYLA.mjs → store-DWmjM4Ex.mjs} +1 -1
- package/dist/{streamRelay-BT9ew0Mk.cjs → streamRelay-4XiiNB3N.cjs} +1 -1
- package/dist/{streamRelay-DEBIU6Ak.mjs → streamRelay-DdGOsW8v.mjs} +1 -1
- package/dist/{sync-B-B5mc8Z.cjs → sync-C764ZzE6.cjs} +1 -1
- package/dist/{sync-Dfr1zgLx.mjs → sync-CcBrziWp.mjs} +1 -1
- package/dist/{systemPrompt-DAQq-bKB.mjs → systemPrompt-9i7bQypR.mjs} +2 -2
- package/dist/{systemPrompt-pxNDR5u8.cjs → systemPrompt-Xy3Dfj1l.cjs} +2 -2
- package/dist/{teams-BuXDbvzq.mjs → teams-BAWOVbdF.mjs} +7 -7
- package/dist/{teams-CBMB5SvT.cjs → teams-VlmzLDSs.cjs} +7 -7
- package/dist/{template-CB4gXtUX.cjs → template-3fV9bi0X.cjs} +1 -1
- package/dist/{template-DE9JMShn.mjs → template-CtRLg2PG.mjs} +1 -1
- package/dist/{time-DTaj0RVK.cjs → time-CDBZWYDb.cjs} +1 -1
- package/dist/{time-PqfO1O58.mjs → time-DJF2csbV.mjs} +1 -1
- package/dist/{titleGenerator-BP5gqicG.cjs → titleGenerator-BYP3fNFo.cjs} +3 -3
- package/dist/{titleGenerator-DVnEGxoB.mjs → titleGenerator-DR9evHBh.mjs} +2 -2
- package/dist/todo-BkFvwx_z.cjs +210 -0
- package/dist/{todo-DaJPxDVT.mjs → todo-DDDQdB-G.mjs} +103 -12
- package/dist/{tools-G3_fMSjb.cjs → tools-BjiRW_Rg.cjs} +1 -1
- package/dist/{tools-B4W8kWU8.mjs → tools-CDktvjWL.mjs} +1 -1
- package/dist/{uninstall-ByWgUWHg.mjs → uninstall-BcMGkwJ0.mjs} +3 -3
- package/dist/{uninstall-C0pua8G4.cjs → uninstall-D5INt3TC.cjs} +3 -3
- package/dist/{wrapperAccount-CsxMfnCK.cjs → wrapperAccount-nGGMJDBF.cjs} +2 -2
- package/dist/{wrapperAccount-BDeMsgbw.mjs → wrapperAccount-z8Swrd08.mjs} +2 -2
- package/package.json +7 -7
- package/dist/selfCheck-NWjxjpSx.mjs +0 -88
- package/dist/todo-BXsQ5-iD.cjs +0 -119
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
4
|
-
var persistence = require('./persistence-
|
|
5
|
-
var api = require('./api-
|
|
3
|
+
var logger = require('./logger-Hyhy2boA.cjs');
|
|
4
|
+
var persistence = require('./persistence-_W9tE-bW.cjs');
|
|
5
|
+
var api = require('./api-KVVs-GkM.cjs');
|
|
6
6
|
|
|
7
7
|
const PRESENCE_SETTLE_MS = 6e3;
|
|
8
8
|
async function commitHibernation(deps) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
2
|
-
import { e as evaluateWrapperIdle, j as isQuiescent, k as HIBERNATION_UNSUPPORTED_BACKOFF_MS } from './persistence-
|
|
3
|
-
import { c as connectionState } from './api-
|
|
1
|
+
import { l as logger } from './logger-CFrzcRHD.mjs';
|
|
2
|
+
import { e as evaluateWrapperIdle, j as isQuiescent, k as HIBERNATION_UNSUPPORTED_BACKOFF_MS } from './persistence-CF7oV1oH.mjs';
|
|
3
|
+
import { c as connectionState } from './api-1CD4oRSW.mjs';
|
|
4
4
|
|
|
5
5
|
const PRESENCE_SETTLE_MS = 6e3;
|
|
6
6
|
async function commitHibernation(deps) {
|
|
@@ -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 index = require('./index-
|
|
6
|
+
var index = require('./index-44o_qMvE.cjs');
|
|
7
7
|
|
|
8
8
|
function providersPath(happyHomeDir) {
|
|
9
9
|
return path.join(happyHomeDir, "providers.json");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFileSync, existsSync, mkdirSync, chmodSync, writeFileSync, renameSync, rmSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { join, dirname } from 'node:path';
|
|
4
|
-
import {
|
|
4
|
+
import { z as AGENT_PROFILE_KINDS } from './index-CiRMvS73.mjs';
|
|
5
5
|
|
|
6
6
|
function providersPath(happyHomeDir) {
|
|
7
7
|
return join(happyHomeDir, "providers.json");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
1
|
+
import { l as logger } from './logger-CFrzcRHD.mjs';
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { K as BUILTIN_TODO_DISCOVERY } from './index-CiRMvS73.mjs';
|
|
6
6
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
7
7
|
import { homedir } from 'node:os';
|
|
8
8
|
import { A as AGENT_GUIDANCE } from './agentGuidance-BDYt2Qy2.mjs';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
3
|
+
var logger = require('./logger-Hyhy2boA.cjs');
|
|
4
4
|
var node_fs = require('node:fs');
|
|
5
5
|
var path$1 = require('node:path');
|
|
6
6
|
var path = require('./path-B7zW-WwE.cjs');
|
|
7
|
-
var index = require('./index-
|
|
7
|
+
var index = require('./index-44o_qMvE.cjs');
|
|
8
8
|
var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
|
|
9
9
|
var os = require('node:os');
|
|
10
10
|
var agentGuidance = require('./agentGuidance-BtBx2xxE.cjs');
|
|
@@ -2,21 +2,21 @@ import { homedir } from 'node:os';
|
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { randomUUID } from 'node:crypto';
|
|
5
|
-
import { t as teamRequest, c as createTeamsClient } from './client-
|
|
6
|
-
import { b as readCredentialsForConfiguredRelay } from './persistence-
|
|
5
|
+
import { t as teamRequest, c as createTeamsClient } from './client-CK-jvgM1.mjs';
|
|
6
|
+
import { b as readCredentialsForConfiguredRelay } from './persistence-CF7oV1oH.mjs';
|
|
7
7
|
import { a as installTeamSkill, i as installAutomationSkill } from './install-B8O1JpJH.mjs';
|
|
8
8
|
import 'node:child_process';
|
|
9
9
|
import 'node:util';
|
|
10
10
|
import 'node:path';
|
|
11
|
-
import './index-
|
|
11
|
+
import './index-CiRMvS73.mjs';
|
|
12
12
|
import '@paralleldrive/cuid2';
|
|
13
|
-
import './configuration-
|
|
13
|
+
import './configuration-DhEqAYzz.mjs';
|
|
14
14
|
import 'node:fs';
|
|
15
|
-
import './package-
|
|
16
|
-
import './context-
|
|
15
|
+
import './package-DxE8PttX.mjs';
|
|
16
|
+
import './context-UzqWaA7f.mjs';
|
|
17
17
|
import './authRelay-DhQhkBvX.mjs';
|
|
18
18
|
import 'tweetnacl';
|
|
19
|
-
import './logger-
|
|
19
|
+
import './logger-CFrzcRHD.mjs';
|
|
20
20
|
import 'chalk';
|
|
21
21
|
import './resources-CLP_MpK4.mjs';
|
|
22
22
|
|
|
@@ -4,21 +4,21 @@ var os = require('node:os');
|
|
|
4
4
|
var promises = require('node:fs/promises');
|
|
5
5
|
var z = require('zod');
|
|
6
6
|
var node_crypto = require('node:crypto');
|
|
7
|
-
var client = require('./client-
|
|
8
|
-
var persistence = require('./persistence-
|
|
7
|
+
var client = require('./client-DGqnrSg4.cjs');
|
|
8
|
+
var persistence = require('./persistence-_W9tE-bW.cjs');
|
|
9
9
|
var install = require('./install-BOHlqewf.cjs');
|
|
10
10
|
require('node:child_process');
|
|
11
11
|
require('node:util');
|
|
12
12
|
require('node:path');
|
|
13
|
-
require('./index-
|
|
13
|
+
require('./index-44o_qMvE.cjs');
|
|
14
14
|
require('@paralleldrive/cuid2');
|
|
15
|
-
require('./configuration-
|
|
15
|
+
require('./configuration-LWFmTxty.cjs');
|
|
16
16
|
require('node:fs');
|
|
17
|
-
require('./package-
|
|
18
|
-
require('./context-
|
|
17
|
+
require('./package-06cGlmeD.cjs');
|
|
18
|
+
require('./context-BbZ18lX0.cjs');
|
|
19
19
|
require('./authRelay-Dy1qU9td.cjs');
|
|
20
20
|
require('tweetnacl');
|
|
21
|
-
require('./logger-
|
|
21
|
+
require('./logger-Hyhy2boA.cjs');
|
|
22
22
|
require('chalk');
|
|
23
23
|
require('./resources-BZ_Be0qM.cjs');
|
|
24
24
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as AUTOMATION_ATTENTION_REASON_MAX_CHARS, q as AUTOMATION_SUMMARY_MAX_CHARS } from './index-CiRMvS73.mjs';
|
|
2
2
|
|
|
3
3
|
function payloadJson(payload) {
|
|
4
4
|
if (!payload) return void 0;
|
|
@@ -5,16 +5,16 @@ var module$1 = require('node:module');
|
|
|
5
5
|
var oneShotPrompts = require('./oneShotPrompts-CL0dip9C.cjs');
|
|
6
6
|
var node_crypto = require('node:crypto');
|
|
7
7
|
var path = require('node:path');
|
|
8
|
-
var logger = require('./logger-
|
|
8
|
+
var logger = require('./logger-Hyhy2boA.cjs');
|
|
9
9
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
10
|
-
var wrapperAccount = require('./wrapperAccount-
|
|
10
|
+
var wrapperAccount = require('./wrapperAccount-nGGMJDBF.cjs');
|
|
11
11
|
|
|
12
12
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
13
13
|
const MAX_PROMPT_SAMPLE_CHARS = 500;
|
|
14
14
|
const MAX_TITLE_CHARS = 60;
|
|
15
15
|
const GENERATION_TIMEOUT_MS = 3e4;
|
|
16
16
|
function loadClaudeVersionUtils() {
|
|
17
|
-
const require$1 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('titleGenerator-
|
|
17
|
+
const require$1 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('titleGenerator-BYP3fNFo.cjs', document.baseURI).href)));
|
|
18
18
|
return require$1(path.resolve(path.join(projectPath.projectPath(), "scripts", "claude_version_utils.cjs")));
|
|
19
19
|
}
|
|
20
20
|
function resolveClaudeBinary(loadUtils = loadClaudeVersionUtils) {
|
|
@@ -3,9 +3,9 @@ import { createRequire } from 'node:module';
|
|
|
3
3
|
import { T as TITLE_PROMPT_PREFIX } from './oneShotPrompts-DT4p6RNd.mjs';
|
|
4
4
|
import { randomUUID } from 'node:crypto';
|
|
5
5
|
import { resolve, join } from 'node:path';
|
|
6
|
-
import { l as logger } from './logger-
|
|
6
|
+
import { l as logger } from './logger-CFrzcRHD.mjs';
|
|
7
7
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
8
|
-
import { a as accountClaudeSettings } from './wrapperAccount-
|
|
8
|
+
import { a as accountClaudeSettings } from './wrapperAccount-z8Swrd08.mjs';
|
|
9
9
|
|
|
10
10
|
const MAX_PROMPT_SAMPLE_CHARS = 500;
|
|
11
11
|
const MAX_TITLE_CHARS = 60;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var configuration = require('./configuration-LWFmTxty.cjs');
|
|
4
|
+
var index = require('./index-44o_qMvE.cjs');
|
|
5
|
+
var persistence = require('./persistence-_W9tE-bW.cjs');
|
|
6
|
+
var context = require('./context-BbZ18lX0.cjs');
|
|
7
|
+
var client = require('./client-DI8Rxsbw.cjs');
|
|
8
|
+
var format = require('./format-CgiY6uup.cjs');
|
|
9
|
+
require('node:fs');
|
|
10
|
+
require('node:os');
|
|
11
|
+
require('node:path');
|
|
12
|
+
require('./package-06cGlmeD.cjs');
|
|
13
|
+
require('node:fs/promises');
|
|
14
|
+
require('zod');
|
|
15
|
+
require('@paralleldrive/cuid2');
|
|
16
|
+
require('./authRelay-Dy1qU9td.cjs');
|
|
17
|
+
require('node:crypto');
|
|
18
|
+
require('tweetnacl');
|
|
19
|
+
require('./logger-Hyhy2boA.cjs');
|
|
20
|
+
require('chalk');
|
|
21
|
+
require('node:util');
|
|
22
|
+
|
|
23
|
+
async function assertAccountTodosAllowed() {
|
|
24
|
+
if (process.env.VH_TEAM_SCOPE_FILE !== void 0) {
|
|
25
|
+
throw new Error("Scoped Teams sessions cannot access account Todos; ask the owner session.");
|
|
26
|
+
}
|
|
27
|
+
const sessionId = process.env.HAPPY_SESSION_ID;
|
|
28
|
+
if (sessionId && await context.readTeamScope(context.teamScopePath(sessionId))) {
|
|
29
|
+
throw new Error("Scoped Teams sessions cannot access account Todos; ask the owner session.");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
async function authenticatedBuiltinTodoClient() {
|
|
33
|
+
await assertAccountTodosAllowed();
|
|
34
|
+
const credentials = await persistence.readCredentialsForConfiguredRelay();
|
|
35
|
+
if (!credentials) throw new Error("Sign in to Very Happy with `very-happy auth login` before accessing Todos.");
|
|
36
|
+
return index.createBuiltinTodoClient(credentials, { serverUrl: configuration.configuration.serverUrl, clientId: "very-happy-cli-todo" });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function issueToTodoRecord(issue) {
|
|
40
|
+
return {
|
|
41
|
+
schemaVersion: 1,
|
|
42
|
+
id: issue.legacyTodoId ?? issue.id,
|
|
43
|
+
key: issue.key,
|
|
44
|
+
title: issue.title,
|
|
45
|
+
note: issue.description,
|
|
46
|
+
status: index.isIssueClosed(issue.status) ? "done" : "open",
|
|
47
|
+
order: issue.sortOrder,
|
|
48
|
+
createdAt: issue.createdAt,
|
|
49
|
+
updatedAt: issue.updatedAt,
|
|
50
|
+
version: issue.version
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const CONFLICT = "Todo version conflict; read the latest task before deciding what to change.";
|
|
54
|
+
async function find(client$1, ref) {
|
|
55
|
+
try {
|
|
56
|
+
return (await client$1.get(ref)).issue;
|
|
57
|
+
} catch (error) {
|
|
58
|
+
if (!(error instanceof client.IssueRequestError && error.code === "issue_not_found")) throw error;
|
|
59
|
+
}
|
|
60
|
+
const { issues } = await client$1.list({ assigneeKind: "none", limit: index.ISSUE_LIMITS.listMax });
|
|
61
|
+
return issues.find((issue) => issue.legacyTodoId === ref) ?? null;
|
|
62
|
+
}
|
|
63
|
+
async function runTodoViaIssues(command, client$1) {
|
|
64
|
+
if (command.action === "list") {
|
|
65
|
+
const { issues, nextCursor } = await client$1.list({ assigneeKind: "none", limit: index.ISSUE_LIMITS.listMax });
|
|
66
|
+
const records = index.sortBuiltinTodos(issues.map(issueToTodoRecord));
|
|
67
|
+
const list = { records, truncated: nextCursor !== null, invalidCount: 0 };
|
|
68
|
+
return list;
|
|
69
|
+
}
|
|
70
|
+
if (command.action === "add") {
|
|
71
|
+
if (command.title.trim().length > index.ISSUE_LIMITS.titleChars) throw new Error(`Todo title must contain 1\u2013${index.ISSUE_LIMITS.titleChars} characters on this server`);
|
|
72
|
+
const title = command.title.trim();
|
|
73
|
+
const note = command.note ?? "";
|
|
74
|
+
let issue2;
|
|
75
|
+
try {
|
|
76
|
+
({ issue: issue2 } = await client$1.create({ title, description: note, status: "todo", assignee: { kind: "none" }, requestId: command.id, legacyTodoId: command.id }));
|
|
77
|
+
} catch (error) {
|
|
78
|
+
if (error instanceof client.IssueRequestError && error.code === "issue_todo_deleted") throw new Error("Todo changed on another device; refresh before retrying");
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
if (issue2.title !== title || issue2.description !== note) throw new Error("This Todo ID already has different content; read it before deciding");
|
|
82
|
+
return issueToTodoRecord(issue2);
|
|
83
|
+
}
|
|
84
|
+
const issue = await find(client$1, command.id);
|
|
85
|
+
if (command.action === "get") return issue && !issue.deletedAt ? issueToTodoRecord(issue) : null;
|
|
86
|
+
if (!issue || issue.deletedAt) throw new Error("Todo not found; it may have been deleted.");
|
|
87
|
+
if (issue.version !== command.version) throw new Error(CONFLICT);
|
|
88
|
+
try {
|
|
89
|
+
if (command.action === "delete") {
|
|
90
|
+
await client$1.remove(issue.id);
|
|
91
|
+
return { id: issueToTodoRecord(issue).id, deleted: true };
|
|
92
|
+
}
|
|
93
|
+
const patch = command.action === "edit" ? { ...command.title !== void 0 ? { title: command.title.trim() } : {}, ...command.note !== void 0 ? { description: command.note } : {} } : { status: command.action === "complete" ? "done" : "todo" };
|
|
94
|
+
return issueToTodoRecord((await client$1.update(issue.id, { ...patch, ifVersion: issue.version })).issue);
|
|
95
|
+
} catch (error) {
|
|
96
|
+
if (error instanceof client.IssueRequestError && error.code === "issue_version_conflict") throw new Error(CONFLICT);
|
|
97
|
+
throw error;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const TODO_HELP = `very-happy todo \u2014 account-owned built-in Todos (JSON output)
|
|
102
|
+
very-happy todo list [--all]
|
|
103
|
+
very-happy todo get ID
|
|
104
|
+
very-happy todo add --id UUID --title TEXT [--note TEXT]
|
|
105
|
+
very-happy todo edit ID --version N [--title TEXT] [--note TEXT]
|
|
106
|
+
very-happy todo complete|reopen|delete ID --version N
|
|
107
|
+
very-happy todo skill
|
|
108
|
+
|
|
109
|
+
Use the version returned by list/get. Conflicts require reading the latest task
|
|
110
|
+
before deciding what to change. Reuse the same add UUID and arguments after an
|
|
111
|
+
unknown result. Use --title=TEXT or --note=TEXT for values starting with --.
|
|
112
|
+
These commands use the current relay and login; they do not
|
|
113
|
+
operate external providers or agent execution plans. skill prints the official
|
|
114
|
+
instructions without authentication. Pass --help for this reference.
|
|
115
|
+
|
|
116
|
+
list shows open and completed todos (--all is accepted and the same).
|
|
117
|
+
On a server with Issues, a todo is an issue without an assignee: add creates a
|
|
118
|
+
todo-status issue, ID may also be an issue key (VH-12), and \`very-happy issue\`
|
|
119
|
+
offers the rest. Without Issues the commands use the classic Todos store.`;
|
|
120
|
+
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
121
|
+
const ISSUE_KEY = /^VH-[1-9][0-9]{0,8}$/i;
|
|
122
|
+
function parseTodoArgs(args) {
|
|
123
|
+
if (args.length === 0 || args.length === 1 && args[0] === "--help") return { action: "help" };
|
|
124
|
+
const action = args[0];
|
|
125
|
+
if (!["list", "get", "add", "edit", "complete", "reopen", "delete", "skill"].includes(action)) throw new Error("Unknown Todo command; use todo --help");
|
|
126
|
+
if (args.length === 2 && args[1] === "--help") return { action: "help" };
|
|
127
|
+
const flags = {};
|
|
128
|
+
let id;
|
|
129
|
+
let all = false;
|
|
130
|
+
for (let i = 1; i < args.length; i++) {
|
|
131
|
+
const arg = args[i];
|
|
132
|
+
if (arg === "--all" && action === "list" && !all) {
|
|
133
|
+
all = true;
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
if (arg.startsWith("--")) {
|
|
137
|
+
const separator = arg.indexOf("=");
|
|
138
|
+
const flag = separator === -1 ? arg : arg.slice(0, separator);
|
|
139
|
+
if (!["--id", "--version", "--title", "--note"].includes(flag) || separator !== -1 && flag !== "--title" && flag !== "--note") throw new Error(`Unknown Todo option: ${arg}`);
|
|
140
|
+
if (Object.hasOwn(flags, flag)) throw new Error(`Duplicate Todo option: ${flag}`);
|
|
141
|
+
const value = separator === -1 ? args[++i] : arg.slice(separator + 1);
|
|
142
|
+
if (value === void 0 || separator === -1 && value.startsWith("--")) throw new Error(`Missing value for ${flag}`);
|
|
143
|
+
flags[flag] = value;
|
|
144
|
+
} else {
|
|
145
|
+
if (id !== void 0) throw new Error("Unexpected Todo argument");
|
|
146
|
+
id = arg;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const allowed = action === "add" ? ["--id", "--title", "--note"] : action === "edit" ? ["--version", "--title", "--note"] : ["complete", "reopen", "delete"].includes(action) ? ["--version"] : [];
|
|
150
|
+
for (const flag of Object.keys(flags)) if (!allowed.includes(flag)) throw new Error(`${flag} is not supported for ${action}`);
|
|
151
|
+
const needsId = ["get", "edit", "complete", "reopen", "delete"].includes(action);
|
|
152
|
+
if (needsId ? !id || !(UUID.test(id) || ISSUE_KEY.test(id)) : id !== void 0) throw new Error(needsId ? "A valid Todo UUID is required" : "Unexpected Todo ID");
|
|
153
|
+
if (action === "add" && (!flags["--id"] || !UUID.test(flags["--id"]))) throw new Error("add requires --id UUID; reuse it when retrying");
|
|
154
|
+
if (action === "add" && flags["--title"] === void 0) throw new Error("add requires --title");
|
|
155
|
+
if (action === "edit" && flags["--title"] === void 0 && flags["--note"] === void 0) throw new Error("edit requires --title or --note");
|
|
156
|
+
if (flags["--title"] !== void 0 && (!flags["--title"].trim() || flags["--title"].trim().length > 500)) throw new Error("Todo title must contain 1\u2013500 characters");
|
|
157
|
+
if (flags["--note"] !== void 0 && flags["--note"].length > 8e3) throw new Error("Todo note exceeds 8000 characters");
|
|
158
|
+
let version;
|
|
159
|
+
if (["edit", "complete", "reopen", "delete"].includes(action)) {
|
|
160
|
+
const value = flags["--version"];
|
|
161
|
+
if (value === void 0 || !/^(0|[1-9][0-9]*)$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error("A non-negative safe integer --version is required");
|
|
162
|
+
version = Number(value);
|
|
163
|
+
}
|
|
164
|
+
return { action, id: action === "add" ? flags["--id"] : id, version, title: flags["--title"], note: flags["--note"], ...all ? { all } : {} };
|
|
165
|
+
}
|
|
166
|
+
async function handleTodoCommand(args, deps = {}) {
|
|
167
|
+
const command = parseTodoArgs(args);
|
|
168
|
+
if (command.action === "help") {
|
|
169
|
+
console.log(TODO_HELP);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (command.action === "skill") {
|
|
173
|
+
console.log(index.BUILTIN_TODO_SKILL);
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
await assertAccountTodosAllowed();
|
|
177
|
+
const issues = deps.issues ?? client.sharedIssuesClient();
|
|
178
|
+
if (!issues.isDisabled()) {
|
|
179
|
+
try {
|
|
180
|
+
await client.importLegacyTodosOnce(issues);
|
|
181
|
+
const result2 = await runTodoViaIssues(command, issues);
|
|
182
|
+
console.log(JSON.stringify({ serverUrl: configuration.configuration.serverUrl, result: result2 }));
|
|
183
|
+
return;
|
|
184
|
+
} catch (error) {
|
|
185
|
+
if (!(error instanceof client.IssuesUnsupportedError)) throw new Error(format.describeIssueError(error));
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (command.id !== void 0 && !UUID.test(command.id)) throw new Error("This server has no Issues; use the Todo UUID");
|
|
189
|
+
const client$1 = await authenticatedBuiltinTodoClient();
|
|
190
|
+
let result;
|
|
191
|
+
if (command.action === "list") result = await client$1.list();
|
|
192
|
+
else if (command.action === "add") result = await client$1.create(command.title, command.note ?? "", command.id);
|
|
193
|
+
else {
|
|
194
|
+
const record = await client$1.get(command.id);
|
|
195
|
+
if (command.action === "get") result = record;
|
|
196
|
+
else {
|
|
197
|
+
if (!record) throw new Error("Todo not found; it may have been deleted.");
|
|
198
|
+
if (record.version !== command.version) throw new Error("Todo version conflict; read the latest task before deciding what to change.");
|
|
199
|
+
if (command.action === "delete") {
|
|
200
|
+
await client$1.remove(record);
|
|
201
|
+
result = { id: record.id, deleted: true };
|
|
202
|
+
} else result = await client$1.update(record, command.action === "edit" ? { ...command.title !== void 0 ? { title: command.title } : {}, ...command.note !== void 0 ? { note: command.note } : {} } : { status: command.action === "complete" ? "done" : "open" });
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
console.log(JSON.stringify({ serverUrl: configuration.configuration.serverUrl, result }));
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
exports.TODO_HELP = TODO_HELP;
|
|
209
|
+
exports.handleTodoCommand = handleTodoCommand;
|
|
210
|
+
exports.parseTodoArgs = parseTodoArgs;
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import { c as configuration } from './configuration-
|
|
2
|
-
import {
|
|
3
|
-
import { b as readCredentialsForConfiguredRelay } from './persistence-
|
|
4
|
-
import { r as readTeamScope, t as teamScopePath } from './context-
|
|
1
|
+
import { c as configuration } from './configuration-DhEqAYzz.mjs';
|
|
2
|
+
import { E as createBuiltinTodoClient, F as ISSUE_LIMITS, G as sortBuiltinTodos, H as isIssueClosed, J as BUILTIN_TODO_SKILL } from './index-CiRMvS73.mjs';
|
|
3
|
+
import { b as readCredentialsForConfiguredRelay } from './persistence-CF7oV1oH.mjs';
|
|
4
|
+
import { r as readTeamScope, t as teamScopePath } from './context-UzqWaA7f.mjs';
|
|
5
|
+
import { a as IssueRequestError, s as sharedIssuesClient, i as importLegacyTodosOnce, I as IssuesUnsupportedError } from './client-CMUlpYcy.mjs';
|
|
6
|
+
import { d as describeIssueError } from './format-BxGkJUki.mjs';
|
|
5
7
|
import 'node:fs';
|
|
6
8
|
import 'node:os';
|
|
7
9
|
import 'node:path';
|
|
8
|
-
import './package-
|
|
10
|
+
import './package-DxE8PttX.mjs';
|
|
9
11
|
import 'node:fs/promises';
|
|
10
12
|
import 'zod';
|
|
11
13
|
import '@paralleldrive/cuid2';
|
|
12
14
|
import './authRelay-DhQhkBvX.mjs';
|
|
13
15
|
import 'node:crypto';
|
|
14
16
|
import 'tweetnacl';
|
|
15
|
-
import './logger-
|
|
17
|
+
import './logger-CFrzcRHD.mjs';
|
|
16
18
|
import 'chalk';
|
|
17
19
|
import 'node:util';
|
|
18
20
|
|
|
19
|
-
async function
|
|
21
|
+
async function assertAccountTodosAllowed() {
|
|
20
22
|
if (process.env.VH_TEAM_SCOPE_FILE !== void 0) {
|
|
21
23
|
throw new Error("Scoped Teams sessions cannot access account Todos; ask the owner session.");
|
|
22
24
|
}
|
|
@@ -24,13 +26,78 @@ async function authenticatedBuiltinTodoClient() {
|
|
|
24
26
|
if (sessionId && await readTeamScope(teamScopePath(sessionId))) {
|
|
25
27
|
throw new Error("Scoped Teams sessions cannot access account Todos; ask the owner session.");
|
|
26
28
|
}
|
|
29
|
+
}
|
|
30
|
+
async function authenticatedBuiltinTodoClient() {
|
|
31
|
+
await assertAccountTodosAllowed();
|
|
27
32
|
const credentials = await readCredentialsForConfiguredRelay();
|
|
28
33
|
if (!credentials) throw new Error("Sign in to Very Happy with `very-happy auth login` before accessing Todos.");
|
|
29
34
|
return createBuiltinTodoClient(credentials, { serverUrl: configuration.serverUrl, clientId: "very-happy-cli-todo" });
|
|
30
35
|
}
|
|
31
36
|
|
|
37
|
+
function issueToTodoRecord(issue) {
|
|
38
|
+
return {
|
|
39
|
+
schemaVersion: 1,
|
|
40
|
+
id: issue.legacyTodoId ?? issue.id,
|
|
41
|
+
key: issue.key,
|
|
42
|
+
title: issue.title,
|
|
43
|
+
note: issue.description,
|
|
44
|
+
status: isIssueClosed(issue.status) ? "done" : "open",
|
|
45
|
+
order: issue.sortOrder,
|
|
46
|
+
createdAt: issue.createdAt,
|
|
47
|
+
updatedAt: issue.updatedAt,
|
|
48
|
+
version: issue.version
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const CONFLICT = "Todo version conflict; read the latest task before deciding what to change.";
|
|
52
|
+
async function find(client, ref) {
|
|
53
|
+
try {
|
|
54
|
+
return (await client.get(ref)).issue;
|
|
55
|
+
} catch (error) {
|
|
56
|
+
if (!(error instanceof IssueRequestError && error.code === "issue_not_found")) throw error;
|
|
57
|
+
}
|
|
58
|
+
const { issues } = await client.list({ assigneeKind: "none", limit: ISSUE_LIMITS.listMax });
|
|
59
|
+
return issues.find((issue) => issue.legacyTodoId === ref) ?? null;
|
|
60
|
+
}
|
|
61
|
+
async function runTodoViaIssues(command, client) {
|
|
62
|
+
if (command.action === "list") {
|
|
63
|
+
const { issues, nextCursor } = await client.list({ assigneeKind: "none", limit: ISSUE_LIMITS.listMax });
|
|
64
|
+
const records = sortBuiltinTodos(issues.map(issueToTodoRecord));
|
|
65
|
+
const list = { records, truncated: nextCursor !== null, invalidCount: 0 };
|
|
66
|
+
return list;
|
|
67
|
+
}
|
|
68
|
+
if (command.action === "add") {
|
|
69
|
+
if (command.title.trim().length > ISSUE_LIMITS.titleChars) throw new Error(`Todo title must contain 1\u2013${ISSUE_LIMITS.titleChars} characters on this server`);
|
|
70
|
+
const title = command.title.trim();
|
|
71
|
+
const note = command.note ?? "";
|
|
72
|
+
let issue2;
|
|
73
|
+
try {
|
|
74
|
+
({ issue: issue2 } = await client.create({ title, description: note, status: "todo", assignee: { kind: "none" }, requestId: command.id, legacyTodoId: command.id }));
|
|
75
|
+
} catch (error) {
|
|
76
|
+
if (error instanceof IssueRequestError && error.code === "issue_todo_deleted") throw new Error("Todo changed on another device; refresh before retrying");
|
|
77
|
+
throw error;
|
|
78
|
+
}
|
|
79
|
+
if (issue2.title !== title || issue2.description !== note) throw new Error("This Todo ID already has different content; read it before deciding");
|
|
80
|
+
return issueToTodoRecord(issue2);
|
|
81
|
+
}
|
|
82
|
+
const issue = await find(client, command.id);
|
|
83
|
+
if (command.action === "get") return issue && !issue.deletedAt ? issueToTodoRecord(issue) : null;
|
|
84
|
+
if (!issue || issue.deletedAt) throw new Error("Todo not found; it may have been deleted.");
|
|
85
|
+
if (issue.version !== command.version) throw new Error(CONFLICT);
|
|
86
|
+
try {
|
|
87
|
+
if (command.action === "delete") {
|
|
88
|
+
await client.remove(issue.id);
|
|
89
|
+
return { id: issueToTodoRecord(issue).id, deleted: true };
|
|
90
|
+
}
|
|
91
|
+
const patch = command.action === "edit" ? { ...command.title !== void 0 ? { title: command.title.trim() } : {}, ...command.note !== void 0 ? { description: command.note } : {} } : { status: command.action === "complete" ? "done" : "todo" };
|
|
92
|
+
return issueToTodoRecord((await client.update(issue.id, { ...patch, ifVersion: issue.version })).issue);
|
|
93
|
+
} catch (error) {
|
|
94
|
+
if (error instanceof IssueRequestError && error.code === "issue_version_conflict") throw new Error(CONFLICT);
|
|
95
|
+
throw error;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
32
99
|
const TODO_HELP = `very-happy todo \u2014 account-owned built-in Todos (JSON output)
|
|
33
|
-
very-happy todo list
|
|
100
|
+
very-happy todo list [--all]
|
|
34
101
|
very-happy todo get ID
|
|
35
102
|
very-happy todo add --id UUID --title TEXT [--note TEXT]
|
|
36
103
|
very-happy todo edit ID --version N [--title TEXT] [--note TEXT]
|
|
@@ -42,8 +109,14 @@ before deciding what to change. Reuse the same add UUID and arguments after an
|
|
|
42
109
|
unknown result. Use --title=TEXT or --note=TEXT for values starting with --.
|
|
43
110
|
These commands use the current relay and login; they do not
|
|
44
111
|
operate external providers or agent execution plans. skill prints the official
|
|
45
|
-
instructions without authentication. Pass --help for this reference
|
|
112
|
+
instructions without authentication. Pass --help for this reference.
|
|
113
|
+
|
|
114
|
+
list shows open and completed todos (--all is accepted and the same).
|
|
115
|
+
On a server with Issues, a todo is an issue without an assignee: add creates a
|
|
116
|
+
todo-status issue, ID may also be an issue key (VH-12), and \`very-happy issue\`
|
|
117
|
+
offers the rest. Without Issues the commands use the classic Todos store.`;
|
|
46
118
|
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
119
|
+
const ISSUE_KEY = /^VH-[1-9][0-9]{0,8}$/i;
|
|
47
120
|
function parseTodoArgs(args) {
|
|
48
121
|
if (args.length === 0 || args.length === 1 && args[0] === "--help") return { action: "help" };
|
|
49
122
|
const action = args[0];
|
|
@@ -51,8 +124,13 @@ function parseTodoArgs(args) {
|
|
|
51
124
|
if (args.length === 2 && args[1] === "--help") return { action: "help" };
|
|
52
125
|
const flags = {};
|
|
53
126
|
let id;
|
|
127
|
+
let all = false;
|
|
54
128
|
for (let i = 1; i < args.length; i++) {
|
|
55
129
|
const arg = args[i];
|
|
130
|
+
if (arg === "--all" && action === "list" && !all) {
|
|
131
|
+
all = true;
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
56
134
|
if (arg.startsWith("--")) {
|
|
57
135
|
const separator = arg.indexOf("=");
|
|
58
136
|
const flag = separator === -1 ? arg : arg.slice(0, separator);
|
|
@@ -69,7 +147,7 @@ function parseTodoArgs(args) {
|
|
|
69
147
|
const allowed = action === "add" ? ["--id", "--title", "--note"] : action === "edit" ? ["--version", "--title", "--note"] : ["complete", "reopen", "delete"].includes(action) ? ["--version"] : [];
|
|
70
148
|
for (const flag of Object.keys(flags)) if (!allowed.includes(flag)) throw new Error(`${flag} is not supported for ${action}`);
|
|
71
149
|
const needsId = ["get", "edit", "complete", "reopen", "delete"].includes(action);
|
|
72
|
-
if (needsId ? !id || !UUID.test(id) : id !== void 0) throw new Error(needsId ? "A valid Todo UUID is required" : "Unexpected Todo ID");
|
|
150
|
+
if (needsId ? !id || !(UUID.test(id) || ISSUE_KEY.test(id)) : id !== void 0) throw new Error(needsId ? "A valid Todo UUID is required" : "Unexpected Todo ID");
|
|
73
151
|
if (action === "add" && (!flags["--id"] || !UUID.test(flags["--id"]))) throw new Error("add requires --id UUID; reuse it when retrying");
|
|
74
152
|
if (action === "add" && flags["--title"] === void 0) throw new Error("add requires --title");
|
|
75
153
|
if (action === "edit" && flags["--title"] === void 0 && flags["--note"] === void 0) throw new Error("edit requires --title or --note");
|
|
@@ -81,9 +159,9 @@ function parseTodoArgs(args) {
|
|
|
81
159
|
if (value === void 0 || !/^(0|[1-9][0-9]*)$/.test(value) || !Number.isSafeInteger(Number(value))) throw new Error("A non-negative safe integer --version is required");
|
|
82
160
|
version = Number(value);
|
|
83
161
|
}
|
|
84
|
-
return { action, id: action === "add" ? flags["--id"] : id, version, title: flags["--title"], note: flags["--note"] };
|
|
162
|
+
return { action, id: action === "add" ? flags["--id"] : id, version, title: flags["--title"], note: flags["--note"], ...all ? { all } : {} };
|
|
85
163
|
}
|
|
86
|
-
async function handleTodoCommand(args) {
|
|
164
|
+
async function handleTodoCommand(args, deps = {}) {
|
|
87
165
|
const command = parseTodoArgs(args);
|
|
88
166
|
if (command.action === "help") {
|
|
89
167
|
console.log(TODO_HELP);
|
|
@@ -93,6 +171,19 @@ async function handleTodoCommand(args) {
|
|
|
93
171
|
console.log(BUILTIN_TODO_SKILL);
|
|
94
172
|
return;
|
|
95
173
|
}
|
|
174
|
+
await assertAccountTodosAllowed();
|
|
175
|
+
const issues = deps.issues ?? sharedIssuesClient();
|
|
176
|
+
if (!issues.isDisabled()) {
|
|
177
|
+
try {
|
|
178
|
+
await importLegacyTodosOnce(issues);
|
|
179
|
+
const result2 = await runTodoViaIssues(command, issues);
|
|
180
|
+
console.log(JSON.stringify({ serverUrl: configuration.serverUrl, result: result2 }));
|
|
181
|
+
return;
|
|
182
|
+
} catch (error) {
|
|
183
|
+
if (!(error instanceof IssuesUnsupportedError)) throw new Error(describeIssueError(error));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
if (command.id !== void 0 && !UUID.test(command.id)) throw new Error("This server has no Issues; use the Todo UUID");
|
|
96
187
|
const client = await authenticatedBuiltinTodoClient();
|
|
97
188
|
let result;
|
|
98
189
|
if (command.action === "list") result = await client.list();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { c as createTeamsClient } from './client-
|
|
2
|
+
import { c as createTeamsClient } from './client-CK-jvgM1.mjs';
|
|
3
3
|
|
|
4
4
|
const CLOSED_GOAL_CHARS = 200;
|
|
5
5
|
const closed = (task) => task.status === "done" || task.status === "cancelled";
|