very-happy-cli 0.2.199 → 0.2.200

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.
Files changed (214) hide show
  1. package/dist/{AcpBackend-Bo6bOamG.mjs → AcpBackend-Cnp6WNn8.mjs} +3 -3
  2. package/dist/{AcpBackend-HhZ8nrIh.cjs → AcpBackend-CwSShYPI.cjs} +3 -3
  3. package/dist/{AcpSessionManager-C-pkJKO2.mjs → AcpSessionManager-C4O3jhT_.mjs} +2 -2
  4. package/dist/{AcpSessionManager--7nDgA9S.cjs → AcpSessionManager-DqW99tOL.cjs} +2 -2
  5. package/dist/{BasePermissionHandler-Ffp54Ntg.mjs → BasePermissionHandler-8Msj0Z8j.mjs} +1 -1
  6. package/dist/{BasePermissionHandler-al7UXWRq.cjs → BasePermissionHandler-CgqjIUyG.cjs} +1 -1
  7. package/dist/{account-Bnk1yyGS.mjs → account-BIxPuBEs.mjs} +11 -11
  8. package/dist/{account-DCIz-iyL.cjs → account-DcNh2_SN.cjs} +11 -11
  9. package/dist/{accountService-B59oKwa4.cjs → accountService-BDJo14mY.cjs} +4 -4
  10. package/dist/{accountService-WPnOpkvs.mjs → accountService-ELazcp3V.mjs} +4 -4
  11. package/dist/{acpSessionResume-CfogEHtT.cjs → acpSessionResume-B_W8uTI6.cjs} +1 -1
  12. package/dist/{acpSessionResume-BVroOlVN.mjs → acpSessionResume-De_sTG30.mjs} +1 -1
  13. package/dist/{agentHome-CHTzSiu4.mjs → agentHome-C-900jC1.mjs} +4 -4
  14. package/dist/{agentHome-Y3bMEtCp.cjs → agentHome-C-usjJwB.cjs} +4 -4
  15. package/dist/{api-CgzfmyYS.cjs → api-BPWRzeNF.cjs} +16 -10
  16. package/dist/{api-DibgCucH.mjs → api-DCUiAds-.mjs} +16 -10
  17. package/dist/{apiMachine-BUaFSi27.mjs → apiMachine-CJl4m3V3.mjs} +18 -18
  18. package/dist/{apiMachine-DSI5mKlh.cjs → apiMachine-DjhbA1rL.cjs} +18 -18
  19. package/dist/{attachmentContent-D9wq3bok.mjs → attachmentContent-BKIq6EXR.mjs} +2 -2
  20. package/dist/{attachmentContent-JWUS5uhH.cjs → attachmentContent-C2f1UEP9.cjs} +2 -2
  21. package/dist/{auth-BjWk9sHU.mjs → auth-8jKFCZOX.mjs} +5 -5
  22. package/dist/{auth-BXav16o0.cjs → auth-h6oU63Ni.cjs} +8 -8
  23. package/dist/{auth-B6H2wHTy.cjs → auth-oAnLi4Tl.cjs} +5 -5
  24. package/dist/{auth-DFMJQDNF.mjs → auth-uLRHXOGY.mjs} +8 -8
  25. package/dist/{auto-DOhQ2OU5.mjs → auto-A5arQ-bI.mjs} +17 -17
  26. package/dist/{auto-CMO-VQYN.cjs → auto-Bpa5iA1A.cjs} +17 -17
  27. package/dist/{bootstrap-CY7Db_VV.mjs → bootstrap-BkLFgEGF.mjs} +2 -2
  28. package/dist/{bootstrap-Brd_jnA2.cjs → bootstrap-DUKAKxrJ.cjs} +2 -2
  29. package/dist/{browser-BpwBEJDU.mjs → browser-BAlw0rns.mjs} +1 -1
  30. package/dist/{browser-BhncBLE4.cjs → browser-Ds-N-Dup.cjs} +1 -1
  31. package/dist/{claudeAccountEnv-CYwfvK1u.mjs → claudeAccountEnv-CI8RlIB9.mjs} +1 -1
  32. package/dist/{claudeAccountEnv-z_ecsJAP.cjs → claudeAccountEnv-D33xXRE7.cjs} +1 -1
  33. package/dist/{claudeLocal-Co_DyW-D.cjs → claudeLocal-BbsOT-EF.cjs} +5 -5
  34. package/dist/{claudeLocal-coKrsYmR.mjs → claudeLocal-X48n0RhP.mjs} +5 -5
  35. package/dist/{claudeLocalLauncher-BFnLc0R-.mjs → claudeLocalLauncher-D18gRtxz.mjs} +10 -10
  36. package/dist/{claudeLocalLauncher-CNDrO3b6.cjs → claudeLocalLauncher-D1jS3iK4.cjs} +10 -10
  37. package/dist/{claudeSessionFork-BuDN5SkN.cjs → claudeSessionFork-Bkxn40Y8.cjs} +1 -1
  38. package/dist/{claudeSessionFork-dOOc9hpA.mjs → claudeSessionFork-n1vMiFcP.mjs} +1 -1
  39. package/dist/client-1zIbVVX5.cjs +120 -0
  40. package/dist/{client-DKPLBLvx.mjs → client-BXwIqRha.mjs} +2 -2
  41. package/dist/client-BgxQ9aej.mjs +114 -0
  42. package/dist/{client-B5uvkdLn.mjs → client-Blpuk2Hr.mjs} +2 -2
  43. package/dist/{client-KbhVRYjy.cjs → client-BnoN4P4t.cjs} +2 -2
  44. package/dist/{client-Ng-oAhlX.mjs → client-C0qjAgZ_.mjs} +4 -4
  45. package/dist/{client-CBbUzTcm.cjs → client-C8BTmcrh.cjs} +4 -4
  46. package/dist/{client-BKyTA9Hf.cjs → client-D0_UOmC1.cjs} +2 -2
  47. package/dist/codex/happyMcpStdioBridge.cjs +25 -16
  48. package/dist/codex/happyMcpStdioBridge.mjs +25 -16
  49. package/dist/{codexAccount-DeFAjaHW.mjs → codexAccount-BAezf1fY.mjs} +1 -1
  50. package/dist/{codexAccount-8Wv5enLR.cjs → codexAccount-DfeCHUOU.cjs} +1 -1
  51. package/dist/{codexAppServerClient-BAcU_XN8.mjs → codexAppServerClient-By4ntTIr.mjs} +3 -3
  52. package/dist/{codexAppServerClient-6QmZ2Tn5.cjs → codexAppServerClient-xBeqblCj.cjs} +3 -3
  53. package/dist/{codexCommand-CCeaWZ-1.mjs → codexCommand-C7BVsmPu.mjs} +50 -46
  54. package/dist/{codexCommand-hJYa82Af.cjs → codexCommand-CgzJe-Ti.cjs} +54 -50
  55. package/dist/{codexTermination-BX0sCNFy.mjs → codexTermination-BS0sLBKS.mjs} +1 -1
  56. package/dist/{codexTermination-DKjQcC3e.cjs → codexTermination-DVrdQx3Q.cjs} +1 -1
  57. package/dist/{config-171VOPLq.cjs → config-4R0rnthZ.cjs} +3 -3
  58. package/dist/{config-9iXYh_zS.mjs → config-D3jidXDu.mjs} +3 -3
  59. package/dist/{configuration-D9k5yIzV.mjs → configuration-4pG95tsq.mjs} +1 -1
  60. package/dist/{configuration-CAzuk0Xs.cjs → configuration-ClUt7pqs.cjs} +1 -1
  61. package/dist/{connect-MlXU2FE3.cjs → connect-Da2NQJ3K.cjs} +13 -13
  62. package/dist/{connect-BEhKtsEn.mjs → connect-Do5qcqmg.mjs} +13 -13
  63. package/dist/{context-WVEuAdf2.mjs → context-Cf05DtNM.mjs} +1 -1
  64. package/dist/{context-CI9LnDu1.cjs → context-wMsIGwBw.cjs} +1 -1
  65. package/dist/{controlClient-Bb188cU0.cjs → controlClient-SYDFcIkk.cjs} +3 -3
  66. package/dist/{controlClient-DhFAPGHz.mjs → controlClient-bqCKl9Nv.mjs} +3 -3
  67. package/dist/{createSessionMetadata-BIK0Xz31.mjs → createSessionMetadata-CQkxe_4T.mjs} +3 -2
  68. package/dist/{createSessionMetadata-C2EQi_od.cjs → createSessionMetadata-msQTEvvn.cjs} +3 -2
  69. package/dist/{daemonAccounts-DD5YBwku.mjs → daemonAccounts-B8xnkprW.mjs} +3 -3
  70. package/dist/{daemonAccounts-nLyHz8WB.cjs → daemonAccounts-Ch_rSTSX.cjs} +2 -2
  71. package/dist/{defaultPermissionMode-BA1fgIpW.cjs → defaultPermissionMode-BETWd5Lf.cjs} +1 -1
  72. package/dist/{defaultPermissionMode-Dmw3lpdN.mjs → defaultPermissionMode-Cl3OvdHp.mjs} +1 -1
  73. package/dist/{deterministicJson-BJ7LY5-S.mjs → deterministicJson-BRAeReBK.mjs} +67 -17
  74. package/dist/{deterministicJson-DCzFgRiT.cjs → deterministicJson-CQ8jkArF.cjs} +72 -22
  75. package/dist/{doctor-CH_pTY3Q.cjs → doctor-C9D-t20z.cjs} +7 -7
  76. package/dist/{doctor-jAPeyoi6.mjs → doctor-Dy7z3qvy.mjs} +7 -7
  77. package/dist/{downloadTarget-CZS0BVu2.cjs → downloadTarget-DfoOSrYi.cjs} +6 -6
  78. package/dist/{downloadTarget-BhMm1keb.mjs → downloadTarget-Diq-GBu4.mjs} +6 -6
  79. package/dist/{ensureDaemonRunning-CTKaWMED.cjs → ensureDaemonRunning-Df76EtKd.cjs} +5 -5
  80. package/dist/{ensureDaemonRunning-BjbC8PuJ.mjs → ensureDaemonRunning-LqrgqVG3.mjs} +5 -5
  81. package/dist/format-CbliQN8V.mjs +70 -0
  82. package/dist/format-P9_M_7ga.cjs +74 -0
  83. package/dist/{handleResumeCommand-DsaEUiax.cjs → handleResumeCommand-CjCtwrrm.cjs} +5 -5
  84. package/dist/{handleResumeCommand-DbFTdwoc.mjs → handleResumeCommand-Dz4Aw_aZ.mjs} +5 -5
  85. package/dist/{index-DpQ9OLYi.mjs → index-BNBXrqRE.mjs} +4 -4
  86. package/dist/{index-BnT8yvlF.cjs → index-BiutHOAO.cjs} +60 -1
  87. package/dist/{index-DdJRSpLB.cjs → index-ByBOdEvG.cjs} +48 -44
  88. package/dist/{index-qVJYCmRA.cjs → index-CbzettaI.cjs} +4 -4
  89. package/dist/{index-DuoMPw0y.cjs → index-CdOnhx2X.cjs} +4 -4
  90. package/dist/{index-BEKb2cxz.mjs → index-CjMA70-R.mjs} +47 -43
  91. package/dist/{index-DL6ONx6v.cjs → index-DUwOmhnq.cjs} +3 -3
  92. package/dist/{index-DcfbjaVL.mjs → index-Sdvy1Lsf.mjs} +3 -3
  93. package/dist/{index-BAjoMeJi.mjs → index-XP-qcJQ3.mjs} +4 -4
  94. package/dist/{index-BQvPYTNM.mjs → index-kwsivEs-.mjs} +48 -2
  95. package/dist/index.cjs +2 -2
  96. package/dist/index.mjs +2 -2
  97. package/dist/{install-5nblS8vW.cjs → install-C4dKrmxR.cjs} +3 -3
  98. package/dist/{install-CJcRTQVK.mjs → install-DMXd8Z4c.mjs} +3 -3
  99. package/dist/issue-BijeNKIT.cjs +237 -0
  100. package/dist/issue-COytLvGE.mjs +229 -0
  101. package/dist/lib.cjs +12 -12
  102. package/dist/lib.d.cts +6 -0
  103. package/dist/lib.d.mts +6 -0
  104. package/dist/lib.mjs +12 -12
  105. package/dist/{localHappyAgentAuth-Bsk_VyUN.cjs → localHappyAgentAuth-CjtNcaI0.cjs} +1 -1
  106. package/dist/{localHappyAgentAuth-CD896cy4.mjs → localHappyAgentAuth-DeDQjw24.mjs} +1 -1
  107. package/dist/{logger-n9NOzHhK.mjs → logger-BLMi8oJK.mjs} +2 -2
  108. package/dist/{logger-LsJ3Cl5o.cjs → logger-D28MY1Bv.cjs} +2 -2
  109. package/dist/{machineMetadata-CUU2NSYl.cjs → machineMetadata-BzjrIn_N.cjs} +3 -3
  110. package/dist/{machineMetadata-Bc7FwngX.mjs → machineMetadata-D8OWVD4l.mjs} +3 -3
  111. package/dist/{main-CEu9zJ4x.cjs → main-DoJIcSOh.cjs} +57 -47
  112. package/dist/{main-CzItRviV.mjs → main-c0fCuBON.mjs} +57 -47
  113. package/dist/{mcp-CPW1yQdX.cjs → mcp-CEtvR6tG.cjs} +18 -18
  114. package/dist/{mcp-yK3ynz_E.mjs → mcp-DKkBFGUa.mjs} +18 -18
  115. package/dist/{mirrorProtocol-5bgkr1Or.cjs → mirrorProtocol-CCl9dtzh.cjs} +3 -3
  116. package/dist/{mirrorProtocol-CoXxepvL.mjs → mirrorProtocol-DFQLXDBI.mjs} +3 -3
  117. package/dist/{package-D7V1BX2I.cjs → package-BFSsS_dl.cjs} +7 -7
  118. package/dist/{package-CCF6FHr2.mjs → package-DbGqY8Ej.mjs} +7 -7
  119. package/dist/{panels-CF5n641F.mjs → panels-2yIO9FxQ.mjs} +5 -5
  120. package/dist/{panels-9DdVhaxc.cjs → panels-BqLXIQif.cjs} +5 -5
  121. package/dist/{peerTools-gR_3dwdA.mjs → peerTools-4GYKxr8J.mjs} +5 -5
  122. package/dist/{peerTools-Dv6bgHkW.cjs → peerTools-Z8V2E0AF.cjs} +5 -5
  123. package/dist/{persistence-B5U9rC15.mjs → persistence-DbOKjdUD.mjs} +3 -3
  124. package/dist/{persistence-Dl3sBrCF.cjs → persistence-TpVFA5-I.cjs} +2 -2
  125. package/dist/{piRunnerArgs-DOV74xAt.mjs → piRunnerArgs-Bdj0sjAT.mjs} +1 -1
  126. package/dist/{piRunnerArgs-rygeUdRz.cjs → piRunnerArgs-DOEJJymf.cjs} +1 -1
  127. package/dist/{piRuntime-dtlRpOYa.mjs → piRuntime-B0QZykV7.mjs} +1 -1
  128. package/dist/{piRuntime-BvxCy9qQ.cjs → piRuntime-DiRayy91.cjs} +1 -1
  129. package/dist/{piTerminal-Bx6c5Jyd.mjs → piTerminal-DGF4X7C-.mjs} +20 -20
  130. package/dist/{piTerminal-ClaMS-57.cjs → piTerminal-DciFqPEi.cjs} +20 -20
  131. package/dist/{pushNotifications-IZaTtVDG.cjs → pushNotifications-C1i2W1GQ.cjs} +3 -3
  132. package/dist/{pushNotifications-pHkbUkqT.mjs → pushNotifications-CrCTpDiN.mjs} +3 -3
  133. package/dist/{query-BVqnfxlX.cjs → query-BkOpCpRo.cjs} +1 -1
  134. package/dist/{query-D_3rFFWe.mjs → query-CrSvcV32.mjs} +1 -1
  135. package/dist/{rateLimitWindows-C7xi99Eb.cjs → rateLimitWindows-BREA7OZj.cjs} +1 -1
  136. package/dist/{rateLimitWindows-DnLJ-gve.mjs → rateLimitWindows-DZVrafmm.mjs} +1 -1
  137. package/dist/{reconnectGate-DPDXEkOX.mjs → reconnectGate-COxAZTv8.mjs} +1 -1
  138. package/dist/{reconnectGate-CHI12y0Y.cjs → reconnectGate-YQ5jXJfY.cjs} +1 -1
  139. package/dist/{registerCommonHandlers-BrTglZnC.mjs → registerCommonHandlers-Cfl_dEWs.mjs} +2 -2
  140. package/dist/{registerCommonHandlers-CUCw-rad.cjs → registerCommonHandlers-D95IxqDN.cjs} +2 -2
  141. package/dist/{registerKillSessionHandler-Bo697Mt0.cjs → registerKillSessionHandler-DJJXtc_L.cjs} +6 -6
  142. package/dist/{registerKillSessionHandler-BJSVT1iq.mjs → registerKillSessionHandler-DoE6xgH3.mjs} +6 -6
  143. package/dist/{registerSideQuestionHandler-HNpsU_20.cjs → registerSideQuestionHandler-DsRz-aD9.cjs} +4 -4
  144. package/dist/{registerSideQuestionHandler-BFPCMrmC.mjs → registerSideQuestionHandler-Dv00rqcy.mjs} +4 -4
  145. package/dist/{remoteSessionClient-Blz-z9jM.mjs → remoteSessionClient-BFd_D9ka.mjs} +5 -5
  146. package/dist/{remoteSessionClient-9NzkfL13.cjs → remoteSessionClient-DleOeQlN.cjs} +5 -5
  147. package/dist/{reportProgressTool-B2-RFomn.mjs → reportProgressTool-D4xKY9Ur.mjs} +111 -4
  148. package/dist/{reportProgressTool-CW9rSnwQ.cjs → reportProgressTool-DtEpDqv3.cjs} +113 -3
  149. package/dist/{run-9aB7U4BF.cjs → run-CVAIFpsp.cjs} +391 -42
  150. package/dist/{run-BXyfDvCk.mjs → run-iDEMW4js.mjs} +391 -42
  151. package/dist/{runClaude-BKpWJdCX.mjs → runClaude-DvHdLJaV.mjs} +27 -25
  152. package/dist/{runClaude-B4ohp5Dk.cjs → runClaude-gucCQBma.cjs} +30 -28
  153. package/dist/{runClaudeDeps-gqSYeQkl.cjs → runClaudeDeps-CQ8vvqUQ.cjs} +42 -40
  154. package/dist/{runClaudeDeps-B0x5BCqC.mjs → runClaudeDeps-DkFWFwVc.mjs} +48 -46
  155. package/dist/{runGemini-BvV5k9b3.mjs → runGemini-B2lXQDru.mjs} +35 -33
  156. package/dist/{runGemini-BMzDy7hY.cjs → runGemini-C0vqJYtS.cjs} +35 -33
  157. package/dist/{runOpenClaw-3Cx3C2ww.cjs → runOpenClaw-DNV7GX73.cjs} +18 -18
  158. package/dist/{runOpenClaw-UcIDMHm7.mjs → runOpenClaw-Ddb6sOkY.mjs} +18 -18
  159. package/dist/{sandbox-BC-KbWe7.mjs → sandbox-Cw0cPDDh.mjs} +4 -4
  160. package/dist/{sandbox-QJdxjmxr.cjs → sandbox-FA0RlaZg.cjs} +4 -4
  161. package/dist/selfCheck-B-hKig8I.mjs +89 -0
  162. package/dist/{selfCheck-Be_M5coh.cjs → selfCheck-DFC8fzhF.cjs} +40 -39
  163. package/dist/{send-DhWp8M8B.cjs → send-BFd-5b_Q.cjs} +8 -8
  164. package/dist/{send-x789D5ci.mjs → send-CwgqPftE.mjs} +8 -8
  165. package/dist/{server-D-aSnlWI.mjs → server-C_4Fk45r.mjs} +4 -4
  166. package/dist/{server-kPDtS-DX.cjs → server-DwOdMGAP.cjs} +6 -6
  167. package/dist/{sessionLock-JWBEd8g_.mjs → sessionLock-CphKQyav.mjs} +3 -3
  168. package/dist/{sessionLock-CuPN9xfW.cjs → sessionLock-DglhFHzB.cjs} +3 -3
  169. package/dist/{startupSessionCreate-CxwJb5m9.cjs → sessionMetadata-DyTJ0Ki5.cjs} +14 -3
  170. package/dist/{startupSessionCreate-f1g6pp6E.mjs → sessionMetadata-V7Z7F-cj.mjs} +14 -4
  171. package/dist/{sessionOps-CYNOycqT.cjs → sessionOps-CIFvoFPA.cjs} +4 -4
  172. package/dist/{sessionOps-VS1baPz_.mjs → sessionOps-D-uFSTHk.mjs} +4 -4
  173. package/dist/{sessionProvider-DksA6icp.cjs → sessionProvider-B0daO-Ln.cjs} +10 -10
  174. package/dist/{sessionProvider-iRLKuR9V.mjs → sessionProvider-D8y7K8bK.mjs} +10 -10
  175. package/dist/{sessionScanner--X2Pzlra.cjs → sessionScanner-CWflbWoH.cjs} +3 -3
  176. package/dist/{sessionScanner-CAxiFc_3.mjs → sessionScanner-DQAOP6pU.mjs} +3 -3
  177. package/dist/{sessions-Dca1UgiF.mjs → sessions-CaO_-AI7.mjs} +10 -10
  178. package/dist/{sessions-BrnP53eO.cjs → sessions-CzpI76qj.cjs} +10 -10
  179. package/dist/{setupOfflineReconnection-Dwg6nHnP.cjs → setupOfflineReconnection-BZHRoKDx.cjs} +2 -2
  180. package/dist/{setupOfflineReconnection-nguxOn4s.mjs → setupOfflineReconnection-Ck-p0YPb.mjs} +2 -2
  181. package/dist/{spawn-BJMU9zbZ.mjs → spawn-BEJxfj60.mjs} +14 -14
  182. package/dist/{spawn-DDyMxQ7Z.cjs → spawn-DyjOa4nf.cjs} +14 -14
  183. package/dist/{spawnAgents-B8GT4JQX.cjs → spawnAgents-IiuqX0S5.cjs} +1 -1
  184. package/dist/{spawnAgents-SeUX5gIq.mjs → spawnAgents-XObVj6zN.mjs} +1 -1
  185. package/dist/{spawnHappyCLI-Cvk2ZMYj.cjs → spawnHappyCLI-C3XuIB2N.cjs} +1 -1
  186. package/dist/{spawnHappyCLI-DnT_QEdn.mjs → spawnHappyCLI-Cc9kKpcq.mjs} +1 -1
  187. package/dist/{startFileWatcher-DLfkP-IW.cjs → startFileWatcher-CeDJl9mN.cjs} +1 -1
  188. package/dist/{startFileWatcher-Djf0SdmK.mjs → startFileWatcher-t3K1y9kY.mjs} +1 -1
  189. package/dist/{store-DnaIrYLA.mjs → store-CqNAE-0v.mjs} +1 -1
  190. package/dist/{store-D41VdZcL.cjs → store-DOZAMV4W.cjs} +1 -1
  191. package/dist/{streamRelay-DEBIU6Ak.mjs → streamRelay-7D7v0hvk.mjs} +1 -1
  192. package/dist/{streamRelay-BT9ew0Mk.cjs → streamRelay-Dyp4x44P.cjs} +1 -1
  193. package/dist/{sync-B-B5mc8Z.cjs → sync-BvxhuW9R.cjs} +1 -1
  194. package/dist/{sync-Dfr1zgLx.mjs → sync-s1pUqWGm.mjs} +1 -1
  195. package/dist/{systemPrompt-pxNDR5u8.cjs → systemPrompt-CCdSrtn3.cjs} +2 -2
  196. package/dist/{systemPrompt-DAQq-bKB.mjs → systemPrompt-CLYTbBhV.mjs} +2 -2
  197. package/dist/{teams-BuXDbvzq.mjs → teams-BVp5F_xN.mjs} +7 -7
  198. package/dist/{teams-CBMB5SvT.cjs → teams-D2q1DQWz.cjs} +7 -7
  199. package/dist/{template-CB4gXtUX.cjs → template-M1YGFYUT.cjs} +1 -1
  200. package/dist/{template-DE9JMShn.mjs → template-oBrR0saD.mjs} +1 -1
  201. package/dist/{time-DTaj0RVK.cjs → time-D-v2Cd9e.cjs} +1 -1
  202. package/dist/{time-PqfO1O58.mjs → time-qd46L189.mjs} +1 -1
  203. package/dist/{titleGenerator-DVnEGxoB.mjs → titleGenerator-BdeHi3IY.mjs} +2 -2
  204. package/dist/{titleGenerator-BP5gqicG.cjs → titleGenerator-CSYqcorn.cjs} +3 -3
  205. package/dist/{todo-DaJPxDVT.mjs → todo-DiEhLgUZ.mjs} +95 -12
  206. package/dist/{todo-BXsQ5-iD.cjs → todo-Dq_YuJvj.cjs} +101 -18
  207. package/dist/{tools-G3_fMSjb.cjs → tools-CY2zrdd5.cjs} +1 -1
  208. package/dist/{tools-B4W8kWU8.mjs → tools-DR7GWBBV.mjs} +1 -1
  209. package/dist/{uninstall-C0pua8G4.cjs → uninstall-BHhHjbzE.cjs} +3 -3
  210. package/dist/{uninstall-ByWgUWHg.mjs → uninstall-BvwDZVU9.mjs} +3 -3
  211. package/dist/{wrapperAccount-BDeMsgbw.mjs → wrapperAccount-CpDsQL15.mjs} +2 -2
  212. package/dist/{wrapperAccount-CsxMfnCK.cjs → wrapperAccount-ejUjAQaM.cjs} +2 -2
  213. package/package.json +7 -7
  214. package/dist/selfCheck-NWjxjpSx.mjs +0 -88
@@ -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 { t as AGENT_PROFILE_KINDS } from './index-BQvPYTNM.mjs';
4
+ import { z as AGENT_PROFILE_KINDS } from './index-kwsivEs-.mjs';
5
5
 
6
6
  function providersPath(happyHomeDir) {
7
7
  return join(happyHomeDir, "providers.json");
@@ -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-BnT8yvlF.cjs');
6
+ var index = require('./index-BiutHOAO.cjs');
7
7
 
8
8
  function providersPath(happyHomeDir) {
9
9
  return path.join(happyHomeDir, "providers.json");
@@ -1,4 +1,4 @@
1
- import { S as STREAM_DELTA_MAX_CHARS } from './index-BQvPYTNM.mjs';
1
+ import { S as STREAM_DELTA_MAX_CHARS } from './index-kwsivEs-.mjs';
2
2
 
3
3
  const STREAM_FLUSH_MS = 80;
4
4
  const PROGRESS_FLUSH_MS = 250;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BnT8yvlF.cjs');
3
+ var index = require('./index-BiutHOAO.cjs');
4
4
 
5
5
  const STREAM_FLUSH_MS = 80;
6
6
  const PROGRESS_FLUSH_MS = 250;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var time = require('./time-DTaj0RVK.cjs');
3
+ var time = require('./time-D-v2Cd9e.cjs');
4
4
 
5
5
  class InvalidateSync {
6
6
  _invalidated = false;
@@ -1,4 +1,4 @@
1
- import { b as backoff } from './time-PqfO1O58.mjs';
1
+ import { b as backoff } from './time-qd46L189.mjs';
2
2
 
3
3
  class InvalidateSync {
4
4
  _invalidated = false;
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var logger = require('./logger-LsJ3Cl5o.cjs');
3
+ var logger = require('./logger-D28MY1Bv.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-BnT8yvlF.cjs');
7
+ var index = require('./index-BiutHOAO.cjs');
8
8
  var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
9
9
  var os = require('node:os');
10
10
  var agentGuidance = require('./agentGuidance-BtBx2xxE.cjs');
@@ -1,8 +1,8 @@
1
- import { l as logger } from './logger-n9NOzHhK.mjs';
1
+ import { l as logger } from './logger-BLMi8oJK.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 { w as BUILTIN_TODO_DISCOVERY } from './index-BQvPYTNM.mjs';
5
+ import { J as BUILTIN_TODO_DISCOVERY } from './index-kwsivEs-.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';
@@ -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-Ng-oAhlX.mjs';
6
- import { b as readCredentialsForConfiguredRelay } from './persistence-B5U9rC15.mjs';
5
+ import { t as teamRequest, c as createTeamsClient } from './client-C0qjAgZ_.mjs';
6
+ import { b as readCredentialsForConfiguredRelay } from './persistence-DbOKjdUD.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-BQvPYTNM.mjs';
11
+ import './index-kwsivEs-.mjs';
12
12
  import '@paralleldrive/cuid2';
13
- import './configuration-D9k5yIzV.mjs';
13
+ import './configuration-4pG95tsq.mjs';
14
14
  import 'node:fs';
15
- import './package-CCF6FHr2.mjs';
16
- import './context-WVEuAdf2.mjs';
15
+ import './package-DbGqY8Ej.mjs';
16
+ import './context-Cf05DtNM.mjs';
17
17
  import './authRelay-DhQhkBvX.mjs';
18
18
  import 'tweetnacl';
19
- import './logger-n9NOzHhK.mjs';
19
+ import './logger-BLMi8oJK.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-CBbUzTcm.cjs');
8
- var persistence = require('./persistence-Dl3sBrCF.cjs');
7
+ var client = require('./client-C8BTmcrh.cjs');
8
+ var persistence = require('./persistence-TpVFA5-I.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-BnT8yvlF.cjs');
13
+ require('./index-BiutHOAO.cjs');
14
14
  require('@paralleldrive/cuid2');
15
- require('./configuration-CAzuk0Xs.cjs');
15
+ require('./configuration-ClUt7pqs.cjs');
16
16
  require('node:fs');
17
- require('./package-D7V1BX2I.cjs');
18
- require('./context-CI9LnDu1.cjs');
17
+ require('./package-BFSsS_dl.cjs');
18
+ require('./context-wMsIGwBw.cjs');
19
19
  require('./authRelay-Dy1qU9td.cjs');
20
20
  require('tweetnacl');
21
- require('./logger-LsJ3Cl5o.cjs');
21
+ require('./logger-D28MY1Bv.cjs');
22
22
  require('chalk');
23
23
  require('./resources-BZ_Be0qM.cjs');
24
24
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BnT8yvlF.cjs');
3
+ var index = require('./index-BiutHOAO.cjs');
4
4
 
5
5
  function payloadJson(payload) {
6
6
  if (!payload) return void 0;
@@ -1,4 +1,4 @@
1
- import { h as AUTOMATION_ATTENTION_REASON_MAX_CHARS, j as AUTOMATION_SUMMARY_MAX_CHARS } from './index-BQvPYTNM.mjs';
1
+ import { o as AUTOMATION_ATTENTION_REASON_MAX_CHARS, q as AUTOMATION_SUMMARY_MAX_CHARS } from './index-kwsivEs-.mjs';
2
2
 
3
3
  function payloadJson(payload) {
4
4
  if (!payload) return void 0;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var logger = require('./logger-LsJ3Cl5o.cjs');
3
+ var logger = require('./logger-D28MY1Bv.cjs');
4
4
 
5
5
  async function delay(ms) {
6
6
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -1,4 +1,4 @@
1
- import { l as logger } from './logger-n9NOzHhK.mjs';
1
+ import { l as logger } from './logger-BLMi8oJK.mjs';
2
2
 
3
3
  async function delay(ms) {
4
4
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -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-n9NOzHhK.mjs';
6
+ import { l as logger } from './logger-BLMi8oJK.mjs';
7
7
  import { p as projectPath } from './projectPath-BTBIMB57.mjs';
8
- import { a as accountClaudeSettings } from './wrapperAccount-BDeMsgbw.mjs';
8
+ import { a as accountClaudeSettings } from './wrapperAccount-CpDsQL15.mjs';
9
9
 
10
10
  const MAX_PROMPT_SAMPLE_CHARS = 500;
11
11
  const MAX_TITLE_CHARS = 60;
@@ -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-LsJ3Cl5o.cjs');
8
+ var logger = require('./logger-D28MY1Bv.cjs');
9
9
  var projectPath = require('./projectPath-C3ioB4Bu.cjs');
10
- var wrapperAccount = require('./wrapperAccount-CsxMfnCK.cjs');
10
+ var wrapperAccount = require('./wrapperAccount-ejUjAQaM.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-BP5gqicG.cjs', document.baseURI).href)));
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-CSYqcorn.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) {
@@ -1,22 +1,24 @@
1
- import { c as configuration } from './configuration-D9k5yIzV.mjs';
2
- import { q as createBuiltinTodoClient, B as BUILTIN_TODO_SKILL } from './index-BQvPYTNM.mjs';
3
- import { b as readCredentialsForConfiguredRelay } from './persistence-B5U9rC15.mjs';
4
- import { r as readTeamScope, t as teamScopePath } from './context-WVEuAdf2.mjs';
1
+ import { c as configuration } from './configuration-4pG95tsq.mjs';
2
+ import { E as createBuiltinTodoClient, F as ISSUE_LIMITS, g as ISSUE_STATUSES, G as isIssueClosed, H as BUILTIN_TODO_SKILL } from './index-kwsivEs-.mjs';
3
+ import { b as readCredentialsForConfiguredRelay } from './persistence-DbOKjdUD.mjs';
4
+ import { r as readTeamScope, t as teamScopePath } from './context-Cf05DtNM.mjs';
5
+ import { a as IssueRequestError, s as sharedIssuesClient, i as importLegacyTodosOnce, I as IssuesUnsupportedError } from './client-BgxQ9aej.mjs';
6
+ import { d as describeIssueError } from './format-CbliQN8V.mjs';
5
7
  import 'node:fs';
6
8
  import 'node:os';
7
9
  import 'node:path';
8
- import './package-CCF6FHr2.mjs';
10
+ import './package-DbGqY8Ej.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-n9NOzHhK.mjs';
17
+ import './logger-BLMi8oJK.mjs';
16
18
  import 'chalk';
17
19
  import 'node:util';
18
20
 
19
- async function authenticatedBuiltinTodoClient() {
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,70 @@ 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.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 OPEN = ISSUE_STATUSES.filter((s) => !isIssueClosed(s)).join(",");
52
+ const CONFLICT = "Todo version conflict; read the latest task before deciding what to change.";
53
+ async function find(client, ref) {
54
+ try {
55
+ return (await client.get(ref)).issue;
56
+ } catch (error) {
57
+ if (!(error instanceof IssueRequestError && error.code === "issue_not_found")) throw error;
58
+ }
59
+ const { issues } = await client.list({ assigneeKind: "none", limit: ISSUE_LIMITS.listMax });
60
+ return issues.find((issue) => issue.legacyTodoId === ref) ?? null;
61
+ }
62
+ async function runTodoViaIssues(command, client) {
63
+ if (command.action === "list") {
64
+ const { issues, nextCursor } = await client.list({ assigneeKind: "none", ...command.all ? {} : { status: OPEN }, limit: ISSUE_LIMITS.listMax });
65
+ const records = issues.map(issueToTodoRecord).sort((a, b) => a.order - b.order || a.createdAt - b.createdAt);
66
+ const list = { records, truncated: nextCursor !== null, invalidCount: 0 };
67
+ return list;
68
+ }
69
+ if (command.action === "add") {
70
+ if (command.title.trim().length > ISSUE_LIMITS.titleChars) throw new Error(`Todo title must contain 1\u2013${ISSUE_LIMITS.titleChars} characters on this server`);
71
+ const { issue: issue2 } = await client.create({ title: command.title.trim(), description: command.note ?? "", status: "todo", assignee: { kind: "none" }, requestId: command.id });
72
+ return issueToTodoRecord(issue2);
73
+ }
74
+ const issue = await find(client, command.id);
75
+ if (command.action === "get") return issue && !issue.deletedAt ? issueToTodoRecord(issue) : null;
76
+ if (!issue || issue.deletedAt) throw new Error("Todo not found; it may have been deleted.");
77
+ if (issue.version !== command.version) throw new Error(CONFLICT);
78
+ try {
79
+ if (command.action === "delete") {
80
+ await client.remove(issue.id);
81
+ return { id: issue.id, deleted: true };
82
+ }
83
+ 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" };
84
+ return issueToTodoRecord((await client.update(issue.id, { ...patch, ifVersion: issue.version })).issue);
85
+ } catch (error) {
86
+ if (error instanceof IssueRequestError && error.code === "issue_version_conflict") throw new Error(CONFLICT);
87
+ throw error;
88
+ }
89
+ }
90
+
32
91
  const TODO_HELP = `very-happy todo \u2014 account-owned built-in Todos (JSON output)
33
- very-happy todo list
92
+ very-happy todo list [--all]
34
93
  very-happy todo get ID
35
94
  very-happy todo add --id UUID --title TEXT [--note TEXT]
36
95
  very-happy todo edit ID --version N [--title TEXT] [--note TEXT]
@@ -42,8 +101,14 @@ before deciding what to change. Reuse the same add UUID and arguments after an
42
101
  unknown result. Use --title=TEXT or --note=TEXT for values starting with --.
43
102
  These commands use the current relay and login; they do not
44
103
  operate external providers or agent execution plans. skill prints the official
45
- instructions without authentication. Pass --help for this reference.`;
104
+ instructions without authentication. Pass --help for this reference.
105
+
106
+ On a server with Issues, a todo is an issue without an assignee: list shows the
107
+ open ones (--all adds completed), add creates a todo-status issue, ID may also be
108
+ an issue key (VH-12), and \`very-happy issue\` offers the rest. Without Issues the
109
+ commands use the classic Todos store.`;
46
110
  const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
111
+ const ISSUE_KEY = /^VH-[1-9][0-9]{0,8}$/i;
47
112
  function parseTodoArgs(args) {
48
113
  if (args.length === 0 || args.length === 1 && args[0] === "--help") return { action: "help" };
49
114
  const action = args[0];
@@ -51,8 +116,13 @@ function parseTodoArgs(args) {
51
116
  if (args.length === 2 && args[1] === "--help") return { action: "help" };
52
117
  const flags = {};
53
118
  let id;
119
+ let all = false;
54
120
  for (let i = 1; i < args.length; i++) {
55
121
  const arg = args[i];
122
+ if (arg === "--all" && action === "list" && !all) {
123
+ all = true;
124
+ continue;
125
+ }
56
126
  if (arg.startsWith("--")) {
57
127
  const separator = arg.indexOf("=");
58
128
  const flag = separator === -1 ? arg : arg.slice(0, separator);
@@ -69,7 +139,7 @@ function parseTodoArgs(args) {
69
139
  const allowed = action === "add" ? ["--id", "--title", "--note"] : action === "edit" ? ["--version", "--title", "--note"] : ["complete", "reopen", "delete"].includes(action) ? ["--version"] : [];
70
140
  for (const flag of Object.keys(flags)) if (!allowed.includes(flag)) throw new Error(`${flag} is not supported for ${action}`);
71
141
  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");
142
+ 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
143
  if (action === "add" && (!flags["--id"] || !UUID.test(flags["--id"]))) throw new Error("add requires --id UUID; reuse it when retrying");
74
144
  if (action === "add" && flags["--title"] === void 0) throw new Error("add requires --title");
75
145
  if (action === "edit" && flags["--title"] === void 0 && flags["--note"] === void 0) throw new Error("edit requires --title or --note");
@@ -81,9 +151,9 @@ function parseTodoArgs(args) {
81
151
  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
152
  version = Number(value);
83
153
  }
84
- return { action, id: action === "add" ? flags["--id"] : id, version, title: flags["--title"], note: flags["--note"] };
154
+ return { action, id: action === "add" ? flags["--id"] : id, version, title: flags["--title"], note: flags["--note"], ...all ? { all } : {} };
85
155
  }
86
- async function handleTodoCommand(args) {
156
+ async function handleTodoCommand(args, deps = {}) {
87
157
  const command = parseTodoArgs(args);
88
158
  if (command.action === "help") {
89
159
  console.log(TODO_HELP);
@@ -93,6 +163,19 @@ async function handleTodoCommand(args) {
93
163
  console.log(BUILTIN_TODO_SKILL);
94
164
  return;
95
165
  }
166
+ await assertAccountTodosAllowed();
167
+ const issues = deps.issues ?? sharedIssuesClient();
168
+ if (!issues.isDisabled()) {
169
+ try {
170
+ await importLegacyTodosOnce(issues);
171
+ const result2 = await runTodoViaIssues(command, issues);
172
+ console.log(JSON.stringify({ serverUrl: configuration.serverUrl, result: result2 }));
173
+ return;
174
+ } catch (error) {
175
+ if (!(error instanceof IssuesUnsupportedError)) throw new Error(describeIssueError(error));
176
+ }
177
+ }
178
+ if (command.id !== void 0 && !UUID.test(command.id)) throw new Error("This server has no Issues; use the Todo UUID");
96
179
  const client = await authenticatedBuiltinTodoClient();
97
180
  let result;
98
181
  if (command.action === "list") result = await client.list();
@@ -1,24 +1,26 @@
1
1
  'use strict';
2
2
 
3
- var configuration = require('./configuration-CAzuk0Xs.cjs');
4
- var index = require('./index-BnT8yvlF.cjs');
5
- var persistence = require('./persistence-Dl3sBrCF.cjs');
6
- var context = require('./context-CI9LnDu1.cjs');
3
+ var configuration = require('./configuration-ClUt7pqs.cjs');
4
+ var index = require('./index-BiutHOAO.cjs');
5
+ var persistence = require('./persistence-TpVFA5-I.cjs');
6
+ var context = require('./context-wMsIGwBw.cjs');
7
+ var client = require('./client-1zIbVVX5.cjs');
8
+ var format = require('./format-P9_M_7ga.cjs');
7
9
  require('node:fs');
8
10
  require('node:os');
9
11
  require('node:path');
10
- require('./package-D7V1BX2I.cjs');
12
+ require('./package-BFSsS_dl.cjs');
11
13
  require('node:fs/promises');
12
14
  require('zod');
13
15
  require('@paralleldrive/cuid2');
14
16
  require('./authRelay-Dy1qU9td.cjs');
15
17
  require('node:crypto');
16
18
  require('tweetnacl');
17
- require('./logger-LsJ3Cl5o.cjs');
19
+ require('./logger-D28MY1Bv.cjs');
18
20
  require('chalk');
19
21
  require('node:util');
20
22
 
21
- async function authenticatedBuiltinTodoClient() {
23
+ async function assertAccountTodosAllowed() {
22
24
  if (process.env.VH_TEAM_SCOPE_FILE !== void 0) {
23
25
  throw new Error("Scoped Teams sessions cannot access account Todos; ask the owner session.");
24
26
  }
@@ -26,13 +28,70 @@ async function authenticatedBuiltinTodoClient() {
26
28
  if (sessionId && await context.readTeamScope(context.teamScopePath(sessionId))) {
27
29
  throw new Error("Scoped Teams sessions cannot access account Todos; ask the owner session.");
28
30
  }
31
+ }
32
+ async function authenticatedBuiltinTodoClient() {
33
+ await assertAccountTodosAllowed();
29
34
  const credentials = await persistence.readCredentialsForConfiguredRelay();
30
35
  if (!credentials) throw new Error("Sign in to Very Happy with `very-happy auth login` before accessing Todos.");
31
36
  return index.createBuiltinTodoClient(credentials, { serverUrl: configuration.configuration.serverUrl, clientId: "very-happy-cli-todo" });
32
37
  }
33
38
 
39
+ function issueToTodoRecord(issue) {
40
+ return {
41
+ schemaVersion: 1,
42
+ id: 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 OPEN = index.ISSUE_STATUSES.filter((s) => !index.isIssueClosed(s)).join(",");
54
+ const CONFLICT = "Todo version conflict; read the latest task before deciding what to change.";
55
+ async function find(client$1, ref) {
56
+ try {
57
+ return (await client$1.get(ref)).issue;
58
+ } catch (error) {
59
+ if (!(error instanceof client.IssueRequestError && error.code === "issue_not_found")) throw error;
60
+ }
61
+ const { issues } = await client$1.list({ assigneeKind: "none", limit: index.ISSUE_LIMITS.listMax });
62
+ return issues.find((issue) => issue.legacyTodoId === ref) ?? null;
63
+ }
64
+ async function runTodoViaIssues(command, client$1) {
65
+ if (command.action === "list") {
66
+ const { issues, nextCursor } = await client$1.list({ assigneeKind: "none", ...command.all ? {} : { status: OPEN }, limit: index.ISSUE_LIMITS.listMax });
67
+ const records = issues.map(issueToTodoRecord).sort((a, b) => a.order - b.order || a.createdAt - b.createdAt);
68
+ const list = { records, truncated: nextCursor !== null, invalidCount: 0 };
69
+ return list;
70
+ }
71
+ if (command.action === "add") {
72
+ 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`);
73
+ const { issue: issue2 } = await client$1.create({ title: command.title.trim(), description: command.note ?? "", status: "todo", assignee: { kind: "none" }, requestId: command.id });
74
+ return issueToTodoRecord(issue2);
75
+ }
76
+ const issue = await find(client$1, command.id);
77
+ if (command.action === "get") return issue && !issue.deletedAt ? issueToTodoRecord(issue) : null;
78
+ if (!issue || issue.deletedAt) throw new Error("Todo not found; it may have been deleted.");
79
+ if (issue.version !== command.version) throw new Error(CONFLICT);
80
+ try {
81
+ if (command.action === "delete") {
82
+ await client$1.remove(issue.id);
83
+ return { id: issue.id, deleted: true };
84
+ }
85
+ 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" };
86
+ return issueToTodoRecord((await client$1.update(issue.id, { ...patch, ifVersion: issue.version })).issue);
87
+ } catch (error) {
88
+ if (error instanceof client.IssueRequestError && error.code === "issue_version_conflict") throw new Error(CONFLICT);
89
+ throw error;
90
+ }
91
+ }
92
+
34
93
  const TODO_HELP = `very-happy todo \u2014 account-owned built-in Todos (JSON output)
35
- very-happy todo list
94
+ very-happy todo list [--all]
36
95
  very-happy todo get ID
37
96
  very-happy todo add --id UUID --title TEXT [--note TEXT]
38
97
  very-happy todo edit ID --version N [--title TEXT] [--note TEXT]
@@ -44,8 +103,14 @@ before deciding what to change. Reuse the same add UUID and arguments after an
44
103
  unknown result. Use --title=TEXT or --note=TEXT for values starting with --.
45
104
  These commands use the current relay and login; they do not
46
105
  operate external providers or agent execution plans. skill prints the official
47
- instructions without authentication. Pass --help for this reference.`;
106
+ instructions without authentication. Pass --help for this reference.
107
+
108
+ On a server with Issues, a todo is an issue without an assignee: list shows the
109
+ open ones (--all adds completed), add creates a todo-status issue, ID may also be
110
+ an issue key (VH-12), and \`very-happy issue\` offers the rest. Without Issues the
111
+ commands use the classic Todos store.`;
48
112
  const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
113
+ const ISSUE_KEY = /^VH-[1-9][0-9]{0,8}$/i;
49
114
  function parseTodoArgs(args) {
50
115
  if (args.length === 0 || args.length === 1 && args[0] === "--help") return { action: "help" };
51
116
  const action = args[0];
@@ -53,8 +118,13 @@ function parseTodoArgs(args) {
53
118
  if (args.length === 2 && args[1] === "--help") return { action: "help" };
54
119
  const flags = {};
55
120
  let id;
121
+ let all = false;
56
122
  for (let i = 1; i < args.length; i++) {
57
123
  const arg = args[i];
124
+ if (arg === "--all" && action === "list" && !all) {
125
+ all = true;
126
+ continue;
127
+ }
58
128
  if (arg.startsWith("--")) {
59
129
  const separator = arg.indexOf("=");
60
130
  const flag = separator === -1 ? arg : arg.slice(0, separator);
@@ -71,7 +141,7 @@ function parseTodoArgs(args) {
71
141
  const allowed = action === "add" ? ["--id", "--title", "--note"] : action === "edit" ? ["--version", "--title", "--note"] : ["complete", "reopen", "delete"].includes(action) ? ["--version"] : [];
72
142
  for (const flag of Object.keys(flags)) if (!allowed.includes(flag)) throw new Error(`${flag} is not supported for ${action}`);
73
143
  const needsId = ["get", "edit", "complete", "reopen", "delete"].includes(action);
74
- if (needsId ? !id || !UUID.test(id) : id !== void 0) throw new Error(needsId ? "A valid Todo UUID is required" : "Unexpected Todo ID");
144
+ 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");
75
145
  if (action === "add" && (!flags["--id"] || !UUID.test(flags["--id"]))) throw new Error("add requires --id UUID; reuse it when retrying");
76
146
  if (action === "add" && flags["--title"] === void 0) throw new Error("add requires --title");
77
147
  if (action === "edit" && flags["--title"] === void 0 && flags["--note"] === void 0) throw new Error("edit requires --title or --note");
@@ -83,9 +153,9 @@ function parseTodoArgs(args) {
83
153
  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");
84
154
  version = Number(value);
85
155
  }
86
- return { action, id: action === "add" ? flags["--id"] : id, version, title: flags["--title"], note: flags["--note"] };
156
+ return { action, id: action === "add" ? flags["--id"] : id, version, title: flags["--title"], note: flags["--note"], ...all ? { all } : {} };
87
157
  }
88
- async function handleTodoCommand(args) {
158
+ async function handleTodoCommand(args, deps = {}) {
89
159
  const command = parseTodoArgs(args);
90
160
  if (command.action === "help") {
91
161
  console.log(TODO_HELP);
@@ -95,20 +165,33 @@ async function handleTodoCommand(args) {
95
165
  console.log(index.BUILTIN_TODO_SKILL);
96
166
  return;
97
167
  }
98
- const client = await authenticatedBuiltinTodoClient();
168
+ await assertAccountTodosAllowed();
169
+ const issues = deps.issues ?? client.sharedIssuesClient();
170
+ if (!issues.isDisabled()) {
171
+ try {
172
+ await client.importLegacyTodosOnce(issues);
173
+ const result2 = await runTodoViaIssues(command, issues);
174
+ console.log(JSON.stringify({ serverUrl: configuration.configuration.serverUrl, result: result2 }));
175
+ return;
176
+ } catch (error) {
177
+ if (!(error instanceof client.IssuesUnsupportedError)) throw new Error(format.describeIssueError(error));
178
+ }
179
+ }
180
+ if (command.id !== void 0 && !UUID.test(command.id)) throw new Error("This server has no Issues; use the Todo UUID");
181
+ const client$1 = await authenticatedBuiltinTodoClient();
99
182
  let result;
100
- if (command.action === "list") result = await client.list();
101
- else if (command.action === "add") result = await client.create(command.title, command.note ?? "", command.id);
183
+ if (command.action === "list") result = await client$1.list();
184
+ else if (command.action === "add") result = await client$1.create(command.title, command.note ?? "", command.id);
102
185
  else {
103
- const record = await client.get(command.id);
186
+ const record = await client$1.get(command.id);
104
187
  if (command.action === "get") result = record;
105
188
  else {
106
189
  if (!record) throw new Error("Todo not found; it may have been deleted.");
107
190
  if (record.version !== command.version) throw new Error("Todo version conflict; read the latest task before deciding what to change.");
108
191
  if (command.action === "delete") {
109
- await client.remove(record);
192
+ await client$1.remove(record);
110
193
  result = { id: record.id, deleted: true };
111
- } else result = await client.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" });
194
+ } 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" });
112
195
  }
113
196
  }
114
197
  console.log(JSON.stringify({ serverUrl: configuration.configuration.serverUrl, result }));
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var z = require('zod');
4
- var client = require('./client-CBbUzTcm.cjs');
4
+ var client = require('./client-C8BTmcrh.cjs');
5
5
 
6
6
  const CLOSED_GOAL_CHARS = 200;
7
7
  const closed = (task) => task.status === "done" || task.status === "cancelled";
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { c as createTeamsClient } from './client-Ng-oAhlX.mjs';
2
+ import { c as createTeamsClient } from './client-C0qjAgZ_.mjs';
3
3
 
4
4
  const CLOSED_GOAL_CHARS = 200;
5
5
  const closed = (task) => task.status === "done" || task.status === "cancelled";
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var logger = require('./logger-LsJ3Cl5o.cjs');
3
+ var logger = require('./logger-D28MY1Bv.cjs');
4
4
  var require$$0 = require('fs');
5
5
  var child_process = require('child_process');
6
6
  require('chalk');
7
7
  require('node:util');
8
- require('./configuration-CAzuk0Xs.cjs');
8
+ require('./configuration-ClUt7pqs.cjs');
9
9
  require('node:fs');
10
10
  require('node:os');
11
11
  require('node:path');
12
- require('./package-D7V1BX2I.cjs');
12
+ require('./package-BFSsS_dl.cjs');
13
13
  require('node:fs/promises');
14
14
 
15
15
  const PLIST_LABEL = "com.happy-cli.daemon";
@@ -1,13 +1,13 @@
1
- import { l as logger } from './logger-n9NOzHhK.mjs';
1
+ import { l as logger } from './logger-BLMi8oJK.mjs';
2
2
  import { existsSync, unlinkSync } from 'fs';
3
3
  import { execSync } from 'child_process';
4
4
  import 'chalk';
5
5
  import 'node:util';
6
- import './configuration-D9k5yIzV.mjs';
6
+ import './configuration-4pG95tsq.mjs';
7
7
  import 'node:fs';
8
8
  import 'node:os';
9
9
  import 'node:path';
10
- import './package-CCF6FHr2.mjs';
10
+ import './package-DbGqY8Ej.mjs';
11
11
  import 'node:fs/promises';
12
12
 
13
13
  const PLIST_LABEL = "com.happy-cli.daemon";