very-happy-cli 0.2.177 → 0.2.179

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 (203) hide show
  1. package/dist/{AcpBackend-B0K0WrtW.mjs → AcpBackend-CHp3y7cb.mjs} +135 -16
  2. package/dist/{AcpBackend-B-ny68XM.cjs → AcpBackend-DFipFF7-.cjs} +135 -16
  3. package/dist/{AcpSessionManager-CjdJLofq.cjs → AcpSessionManager-0zpvRJXc.cjs} +38 -4
  4. package/dist/{AcpSessionManager-DykjzBM4.mjs → AcpSessionManager-d2-rKWWa.mjs} +38 -4
  5. package/dist/{BasePermissionHandler-DR6nxuEn.cjs → BasePermissionHandler-CH3zuEkA.cjs} +5 -2
  6. package/dist/{BasePermissionHandler-hdY7kTqX.mjs → BasePermissionHandler-DdZBYIR4.mjs} +5 -2
  7. package/dist/acpSessionResume-DTGmAPLt.mjs +67 -0
  8. package/dist/acpSessionResume-oiCBnAVA.cjs +74 -0
  9. package/dist/{agentHome-BdTXEUPe.cjs → agentHome-BWcz8mz0.cjs} +5 -5
  10. package/dist/{agentHome-GRN2VfHv.mjs → agentHome-CghLvL_1.mjs} +5 -5
  11. package/dist/{api-BWX10o97.cjs → api-Cmjfr8Z7.cjs} +29 -261
  12. package/dist/{api-CKBViqI3.mjs → api-CzwFpJQc.mjs} +22 -254
  13. package/dist/{apiMachine-DttO4UFj.mjs → apiMachine-DJkTEiqy.mjs} +53 -16
  14. package/dist/{apiMachine-BYYFGgFs.cjs → apiMachine-G6OogT08.cjs} +53 -16
  15. package/dist/{attachmentContent-cPVF463_.mjs → attachmentContent-B2os4HbA.mjs} +2 -2
  16. package/dist/{attachmentContent-kJKXpkMX.cjs → attachmentContent-Bo0UAsSu.cjs} +4 -4
  17. package/dist/{auth-BmESeKuM.mjs → auth-BS6PaOOG.mjs} +6 -6
  18. package/dist/{auth-CTECt2Oz.cjs → auth-D6bBUwZa.cjs} +6 -6
  19. package/dist/{auth-CKdXb9zp.mjs → auth-DMX0xPNK.mjs} +9 -9
  20. package/dist/{auth-DNxVmVbn.cjs → auth-HEhRaNgL.cjs} +9 -9
  21. package/dist/{authRelay-DSAvg1uv.mjs → authRelay-DhQhkBvX.mjs} +1 -1
  22. package/dist/{authRelay-BdYkC1Po.cjs → authRelay-Dy1qU9td.cjs} +1 -0
  23. package/dist/{auto-D1ypjjfx.cjs → auto-C6I55iOh.cjs} +19 -18
  24. package/dist/{auto-Ch3203qd.mjs → auto-Cl1SEDcD.mjs} +19 -18
  25. package/dist/{bootstrap-6OI698q9.cjs → bootstrap-exVucYav.cjs} +2 -2
  26. package/dist/{bootstrap-C0s2bPFQ.mjs → bootstrap-iuyufnp3.mjs} +2 -2
  27. package/dist/{browser-DG6Uof5O.cjs → browser-BohJK12g.cjs} +1 -1
  28. package/dist/{browser-BlLWZUMx.mjs → browser-CSYum7xH.mjs} +1 -1
  29. package/dist/{claudeLocal-CcWcKnoo.mjs → claudeLocal-Dq_R3Ax_.mjs} +6 -5
  30. package/dist/{claudeLocal-CemsIArT.cjs → claudeLocal-re4yjSTx.cjs} +6 -5
  31. package/dist/{claudeLocalLauncher-A4VuevIi.cjs → claudeLocalLauncher-B4hJHpCA.cjs} +11 -10
  32. package/dist/{claudeLocalLauncher-7p6y88nj.mjs → claudeLocalLauncher-CN67lN7-.mjs} +11 -10
  33. package/dist/{claudeSessionFork-BtROOjqf.mjs → claudeSessionFork-BihfD0Ik.mjs} +1 -1
  34. package/dist/{claudeSessionFork-CbDfm8Fz.cjs → claudeSessionFork-DiSMYerV.cjs} +1 -1
  35. package/dist/{client-DyvBTYee.cjs → client-BKcK1Bi-.cjs} +3 -3
  36. package/dist/client-BhoEBnuN.mjs +71 -0
  37. package/dist/{client-COmgDDy0.cjs → client-CuVdN6PP.cjs} +2 -2
  38. package/dist/{client-BPMWutfs.mjs → client-DuTDwWSQ.mjs} +3 -3
  39. package/dist/client-ZjOsn6nZ.cjs +76 -0
  40. package/dist/{client-DG5ndWLw.mjs → client-wo9nbxuf.mjs} +2 -2
  41. package/dist/codex/happyMcpStdioBridge.cjs +25 -16
  42. package/dist/codex/happyMcpStdioBridge.mjs +25 -16
  43. package/dist/{codexAppServerClient-D-Z8qSfI.mjs → codexAppServerClient-BK3zra_1.mjs} +3 -3
  44. package/dist/{codexAppServerClient-R24WZZfg.cjs → codexAppServerClient-Dt5zxrun.cjs} +3 -3
  45. package/dist/{codexCommand-CVTkZJ1o.mjs → codexCommand-B6pY7CMh.mjs} +66 -61
  46. package/dist/{codexCommand-6hW19gsq.cjs → codexCommand-CAZ1SLjg.cjs} +89 -84
  47. package/dist/{codexTermination-CCIfwzcx.mjs → codexTermination-Cd1Eon_4.mjs} +1 -1
  48. package/dist/{codexTermination-BBU7e92y.cjs → codexTermination-DmGbHxcD.cjs} +1 -1
  49. package/dist/{config-CvsNChKX.mjs → config-2oMG_fEI.mjs} +3 -3
  50. package/dist/{config-DhdrvOLV.cjs → config-B0uK6K7n.cjs} +3 -3
  51. package/dist/{configuration-DZPy0T9Z.cjs → configuration-CMHZnp6G.cjs} +1 -1
  52. package/dist/{configuration-D55F0t16.mjs → configuration-WMi4idBB.mjs} +1 -1
  53. package/dist/{connect-CwCXMRmD.mjs → connect-BLVHhHzA.mjs} +15 -15
  54. package/dist/{connect-Wz-XZYXW.cjs → connect-uaglGrde.cjs} +15 -15
  55. package/dist/{context-BKbrZ55r.cjs → context-DXzU5bFM.cjs} +1 -1
  56. package/dist/{context-CCRpVXFo.mjs → context-DploEcoN.mjs} +1 -1
  57. package/dist/{controlClient-C4xB5J6O.mjs → controlClient-BWUJrj3t.mjs} +3 -3
  58. package/dist/{controlClient-SX8gSza2.cjs → controlClient-C-5qCt8W.cjs} +3 -3
  59. package/dist/{createSessionMetadata-Bi-m0Y_O.mjs → createSessionMetadata-3uXrJgOW.mjs} +2 -2
  60. package/dist/{createSessionMetadata-BCFmYlBo.cjs → createSessionMetadata-BkIzHALd.cjs} +2 -2
  61. package/dist/{defaultPermissionMode-wBcbBezm.mjs → defaultPermissionMode-BzxLh20a.mjs} +2 -2
  62. package/dist/{defaultPermissionMode-DMBEnXll.cjs → defaultPermissionMode-pS3vmiSg.cjs} +2 -2
  63. package/dist/{deterministicJson-ChGfQEF6.cjs → deterministicJson-B8z2GPi9.cjs} +220 -14
  64. package/dist/{deterministicJson-BkQETt8_.mjs → deterministicJson-D_whDMFd.mjs} +217 -12
  65. package/dist/{doctor-BsN3JZJn.cjs → doctor-Br1Kcy2J.cjs} +8 -8
  66. package/dist/{doctor-B9c2C9dF.mjs → doctor-CmtSsR2-.mjs} +8 -8
  67. package/dist/{downloadTarget-Dj3WoVJa.cjs → downloadTarget-BQJK_6oH.cjs} +6 -6
  68. package/dist/{downloadTarget-ByXzbDK4.mjs → downloadTarget-BoNwTIH_.mjs} +6 -6
  69. package/dist/{ensureDaemonRunning-7Wb8M7Lv.cjs → ensureDaemonRunning-BRUmsq6J.cjs} +5 -5
  70. package/dist/{ensureDaemonRunning--HYzs5Ce.mjs → ensureDaemonRunning-Czo9IHJQ.mjs} +5 -5
  71. package/dist/{handleResumeCommand-DHddBkNJ.mjs → handleResumeCommand-C8thKjqf.mjs} +22 -6
  72. package/dist/{handleResumeCommand-OmuUGYjQ.cjs → handleResumeCommand-tKD_Hpxc.cjs} +22 -6
  73. package/dist/{index-CrR4JISa.cjs → index-B0UjHlAe.cjs} +5 -5
  74. package/dist/{index-BzJNDsJq.mjs → index-BTxHphpV.mjs} +254 -49
  75. package/dist/index-BiyC7cZ3.mjs +18 -0
  76. package/dist/{index-De8L5lFK.cjs → index-C6O2vVjm.cjs} +156 -34
  77. package/dist/index-CUuc6iCn.cjs +24 -0
  78. package/dist/{index-Dhl6_bw7.mjs → index-CdQI0C9p.mjs} +5 -5
  79. package/dist/{index-D9NoYc5I.cjs → index-D09T1m8Y.cjs} +3 -3
  80. package/dist/{index-CEm0MYiS.mjs → index-D3bidoG8.mjs} +3 -3
  81. package/dist/{index-BRJzH4sc.cjs → index-DMqDMT1Q.cjs} +257 -52
  82. package/dist/{index-DMy3OCBe.mjs → index-DPOa4NhL.mjs} +154 -35
  83. package/dist/index.cjs +2 -2
  84. package/dist/index.mjs +2 -2
  85. package/dist/{install-BdvKiOQw.mjs → install-BX3lv3NO.mjs} +1 -1
  86. package/dist/{install-Cf6AFSWC.cjs → install-BXvf2E3o.cjs} +1 -1
  87. package/dist/{install-1qn-D9FS.cjs → install-CYRZxS87.cjs} +3 -3
  88. package/dist/{install-BDIUtPXi.mjs → install-hnve_9vq.mjs} +3 -3
  89. package/dist/lib.cjs +14 -14
  90. package/dist/lib.d.cts +65 -1
  91. package/dist/lib.d.mts +65 -1
  92. package/dist/lib.mjs +14 -14
  93. package/dist/{lidState-BqVsw7H1.mjs → lidState-Bb8fgXg3.mjs} +2 -2
  94. package/dist/{lidState-DxbK0qfu.cjs → lidState-Dv2wwFTj.cjs} +2 -2
  95. package/dist/{localHappyAgentAuth-D5tANdRD.cjs → localHappyAgentAuth-DjYvkXvV.cjs} +2 -2
  96. package/dist/{localHappyAgentAuth-Ce8kO2yc.mjs → localHappyAgentAuth-NEU7fax7.mjs} +2 -2
  97. package/dist/{logger-13cBr_ew.mjs → logger-BtVhHnD8.mjs} +2 -2
  98. package/dist/{logger-LvwVeATU.cjs → logger-C1GWx3gi.cjs} +2 -2
  99. package/dist/{machineMetadata-29h7vgf4.cjs → machineMetadata-CLHS9sv_.cjs} +3 -3
  100. package/dist/{machineMetadata-dMida2qq.mjs → machineMetadata-D-g--oU_.mjs} +3 -3
  101. package/dist/{main-x4nAhdH5.mjs → main-B2LWV8DI.mjs} +59 -46
  102. package/dist/{main-DpM5jaFH.cjs → main-CWhSsbtU.cjs} +59 -46
  103. package/dist/{mcp-DQv3caXs.cjs → mcp-CARUsXHV.cjs} +15 -15
  104. package/dist/{mcp-DMiFGYMT.mjs → mcp-ext92q3Y.mjs} +15 -15
  105. package/dist/{mirrorProtocol-Bz8tEabR.mjs → mirrorProtocol-BwYibqry.mjs} +3 -3
  106. package/dist/{mirrorProtocol-BfrERW7Z.cjs → mirrorProtocol-DEy2g1CB.cjs} +3 -3
  107. package/dist/{package-CjlsAaRe.mjs → package-BPPebGQF.mjs} +7 -7
  108. package/dist/{package-Ch9WGDV_.cjs → package-SgqTYsjn.cjs} +7 -7
  109. package/dist/panels-BZ0_Tt7B.mjs +137 -0
  110. package/dist/panels-D1c7q2dD.cjs +142 -0
  111. package/dist/{peerTools-CxmrKnfV.mjs → peerTools-CWKzcQ7u.mjs} +60 -10
  112. package/dist/{peerTools-DtGKWli5.cjs → peerTools-DRQETXaz.cjs} +60 -9
  113. package/dist/{persistence-DXbKOHxl.cjs → persistence-BegE7NPa.cjs} +14 -3
  114. package/dist/{persistence-C_tYtOqK.mjs → persistence-Cr-wutZ4.mjs} +14 -4
  115. package/dist/{piRunnerArgs-BVRZe2AR.cjs → piRunnerArgs-Cs-378Vz.cjs} +8 -2
  116. package/dist/{piRunnerArgs-BpHc-JZl.mjs → piRunnerArgs-DwvM_yWA.mjs} +7 -1
  117. package/dist/{piRuntime-D7eio8Ix.cjs → piRuntime-BG-1td_n.cjs} +2 -2
  118. package/dist/{piRuntime-DOdGF395.mjs → piRuntime-Bue5mnlc.mjs} +2 -2
  119. package/dist/{piTerminal-dpxz4Q8D.mjs → piTerminal-B5x9X5yV.mjs} +18 -18
  120. package/dist/{piTerminal-y_PRo2NY.cjs → piTerminal-G4z-xVyy.cjs} +18 -18
  121. package/dist/processTreeSnapshot-CuLJDNC-.mjs +101 -0
  122. package/dist/processTreeSnapshot-mDbnuojn.cjs +105 -0
  123. package/dist/prompt-BOouDaTM.mjs +99 -0
  124. package/dist/prompt-lgF9IE82.cjs +105 -0
  125. package/dist/{attachmentLimits-Di1Z93lN.mjs → pushNotifications-BdFjDjQe.mjs} +303 -3
  126. package/dist/{attachmentLimits-DtFqqiwR.cjs → pushNotifications-DaLQUyi0.cjs} +304 -2
  127. package/dist/{index-DFPT4HOO.cjs → query-Ctfg-5gy.cjs} +25 -5
  128. package/dist/{index-CEjJnq05.mjs → query-DYP_W1wp.mjs} +26 -3
  129. package/dist/{rateLimitWindows-DYHDGuzQ.mjs → rateLimitWindows-CuEqk_0g.mjs} +1 -1
  130. package/dist/{rateLimitWindows-DFnMU2Vt.cjs → rateLimitWindows-Dj_8voBK.cjs} +1 -1
  131. package/dist/{registerCommonHandlers-D8OMpBbQ.mjs → registerCommonHandlers-BAlP7SGc.mjs} +2 -2
  132. package/dist/{registerCommonHandlers-60VuTkdg.cjs → registerCommonHandlers-Cj084Sg7.cjs} +2 -2
  133. package/dist/{registerKillSessionHandler-Drhf7-Vz.mjs → registerKillSessionHandler-PD0jWtQo.mjs} +6 -6
  134. package/dist/{registerKillSessionHandler-pqChBKwO.cjs → registerKillSessionHandler-qMju0ZfF.cjs} +6 -6
  135. package/dist/{remoteSessionClient-B7NvjHD3.cjs → remoteSessionClient-B7i7MkYV.cjs} +5 -5
  136. package/dist/{remoteSessionClient-D01Hso2-.mjs → remoteSessionClient-Bn2qu5C5.mjs} +5 -5
  137. package/dist/{reportProgressTool-Du_zAK4h.cjs → reportProgressTool-CM1JFAHg.cjs} +84 -2
  138. package/dist/{reportProgressTool-B203EZCR.mjs → reportProgressTool-gHItlSzz.mjs} +82 -3
  139. package/dist/{resources-JDPugcDq.cjs → resources-CvIlkzpP.cjs} +30 -0
  140. package/dist/{resources-BdFBQi8r.mjs → resources-y9jfyO-_.mjs} +30 -0
  141. package/dist/{run-DX4Zs3Ug.mjs → run-BM4TxiyN.mjs} +249 -45
  142. package/dist/{run-DZ5jU53c.cjs → run-CNXwIe0A.cjs} +263 -59
  143. package/dist/{runClaude-ClRhHpwR.cjs → runClaude-CWhj2V4Q.cjs} +37 -41
  144. package/dist/{runClaude-CgPHXP0L.mjs → runClaude-C_3I8hvR.mjs} +37 -41
  145. package/dist/{runClaudeDeps-D2v_WDSL.cjs → runClaudeDeps-B81cOKnH.cjs} +295 -157
  146. package/dist/{runClaudeDeps-Dz2iydq4.mjs → runClaudeDeps-QGrOeDe2.mjs} +295 -160
  147. package/dist/{runGemini-DBXxpoY8.mjs → runGemini-BEdWEZLR.mjs} +61 -55
  148. package/dist/{runGemini-BtZqGFkp.cjs → runGemini-CgRLYbt5.cjs} +61 -55
  149. package/dist/{runOpenClaw-D8q8G57u.cjs → runOpenClaw-C1NVmzOL.cjs} +19 -19
  150. package/dist/{runOpenClaw-BOHpzCEU.mjs → runOpenClaw-DdQZAYj1.mjs} +19 -19
  151. package/dist/{sandbox-C452Vrsc.mjs → sandbox-DjQUdCMG.mjs} +5 -5
  152. package/dist/{sandbox-Cu9mMzjx.cjs → sandbox-nocIjliq.cjs} +5 -5
  153. package/dist/selfCheck-CjCF4C3v.mjs +85 -0
  154. package/dist/{selfCheck-gKa3uVr1.cjs → selfCheck-DCt4Uzbq.cjs} +36 -35
  155. package/dist/{send-B8HARi7x.mjs → send-Ct7X4pPU.mjs} +9 -9
  156. package/dist/{send-2Vb5eppI.cjs → send-Dydf_hwZ.cjs} +9 -9
  157. package/dist/{server-Db9Wuam3.cjs → server-CosABFbd.cjs} +7 -7
  158. package/dist/{server-BBWCIZyS.mjs → server-DTQGZMxh.mjs} +5 -5
  159. package/dist/{sessionLock-6qL_N6Rn.cjs → sessionLock-DokGab2R.cjs} +16 -3
  160. package/dist/{sessionLock-ZfvFVdUi.mjs → sessionLock-WYIyaVO4.mjs} +16 -4
  161. package/dist/{sessionOps-CdgbEJgf.mjs → sessionOps-BIGgRube.mjs} +11 -6
  162. package/dist/{sessionOps-Dmt7WUUs.cjs → sessionOps-S-qPBLFf.cjs} +11 -6
  163. package/dist/{sessionScanner-CQL_WSaC.cjs → sessionScanner-CIMM2hvZ.cjs} +3 -3
  164. package/dist/{sessionScanner-CNVaSNOn.mjs → sessionScanner-o5hnMi5e.mjs} +3 -3
  165. package/dist/{sessions-DTomHfFg.mjs → sessions-BJHEZpi2.mjs} +40 -18
  166. package/dist/{sessions-BJblG_Hx.cjs → sessions-JchI1w3z.cjs} +40 -17
  167. package/dist/{setupOfflineReconnection-DVA0VpQL.cjs → setupOfflineReconnection-CNiAt5ZP.cjs} +2 -2
  168. package/dist/{setupOfflineReconnection-C5trsV-j.mjs → setupOfflineReconnection-DMiBO2y9.mjs} +2 -2
  169. package/dist/{spawn-DRyNAqD8.cjs → spawn-6PD7nnoC.cjs} +49 -18
  170. package/dist/{spawn-CQJFgoOq.mjs → spawn-DgvUNYEo.mjs} +49 -18
  171. package/dist/{spawnAgents-CCjJifAW.cjs → spawnAgents-DsXgegHM.cjs} +37 -1
  172. package/dist/spawnAgents-P006Hqio.mjs +79 -0
  173. package/dist/{spawnHappyCLI-B_0RWxD4.mjs → spawnHappyCLI-CCOrEtf9.mjs} +1 -1
  174. package/dist/{spawnHappyCLI-ChniczJ5.cjs → spawnHappyCLI-Dywezwk6.cjs} +1 -1
  175. package/dist/{specialCommands-DkdFJi4N.mjs → specialCommands-DPcd9edP.mjs} +3 -3
  176. package/dist/{specialCommands-DbntVs0d.cjs → specialCommands-QxPpkGKf.cjs} +3 -3
  177. package/dist/{startFileWatcher-UQyTSRAP.mjs → startFileWatcher-DghDOCO4.mjs} +1 -1
  178. package/dist/{startFileWatcher-C292fhra.cjs → startFileWatcher-RECH5qY8.cjs} +1 -1
  179. package/dist/{streamRelay-_qCd873P.mjs → streamRelay-DMV_TXfS.mjs} +1 -1
  180. package/dist/{streamRelay-Cx01enfe.cjs → streamRelay-DlUWKUpo.cjs} +1 -1
  181. package/dist/{sync-C3p7-KLn.mjs → sync-CSe0Rf45.mjs} +1 -1
  182. package/dist/{sync-C7sxoUYG.cjs → sync-D23jbqVa.cjs} +1 -1
  183. package/dist/{systemPrompt-DtibzbRU.cjs → systemPrompt-BOy4kU4P.cjs} +4 -3
  184. package/dist/{systemPrompt-CdHOlyVW.mjs → systemPrompt-CFNKnh65.mjs} +4 -3
  185. package/dist/{teams-ujXr3AFn.mjs → teams-DyY669f0.mjs} +9 -9
  186. package/dist/{teams-D7O7TpVU.cjs → teams-Ov2BDT-A.cjs} +9 -9
  187. package/dist/{time-yEL6wHUF.mjs → time-65DcU6Jx.mjs} +1 -1
  188. package/dist/{time-Dg5tVB8S.cjs → time-CrwIMHta.cjs} +1 -1
  189. package/dist/{titleGenerator-BMEaDTwU.cjs → titleGenerator-CS_rh2_J.cjs} +9 -8
  190. package/dist/{titleGenerator-Dr-BtjzO.mjs → titleGenerator-CiAMxf7s.mjs} +9 -8
  191. package/dist/{todo-CvJe4M2C.mjs → todo-BDONw0sK.mjs} +7 -7
  192. package/dist/{todo-CUcFamGs.cjs → todo-KY-okGii.cjs} +7 -7
  193. package/dist/{tools-BrM3bZW5.mjs → tools-D8-PnZEG.mjs} +1 -1
  194. package/dist/{tools-DDKTB5aQ.cjs → tools-_w52DZG6.cjs} +1 -1
  195. package/dist/{uninstall-7oLuhYIu.cjs → uninstall-8vnLN-IE.cjs} +3 -3
  196. package/dist/{uninstall-CEcMMQGz.mjs → uninstall-_fjGRP9b.mjs} +3 -3
  197. package/dist/webPanels-B2_C2-3g.mjs +49 -0
  198. package/dist/webPanels-FCgFKvVe.cjs +53 -0
  199. package/package.json +7 -7
  200. package/dist/selfCheck-BAvqBwBR.mjs +0 -84
  201. package/dist/sessionModeFile-CWVq8AT9.mjs +0 -32
  202. package/dist/sessionModeFile-CsLtn_PL.cjs +0 -36
  203. package/dist/spawnAgents-BjtmjBvP.mjs +0 -45
@@ -3,6 +3,7 @@ import { z as z$1 } from 'zod';
3
3
  import { isCuid, createId } from '@paralleldrive/cuid2';
4
4
 
5
5
  const CODEX_STEER_CAPABILITY = "codex-steer-v1";
6
+ const PI_STEER_CAPABILITY = "pi-steer-v1";
6
7
  const sessionRoleSchema = z.enum(["user", "agent"]);
7
8
  const sessionTextEventSchema = z.object({
8
9
  t: z.literal("text"),
@@ -426,7 +427,7 @@ z$1.object({
426
427
  events: z$1.array(ConnectionDiagnosticEventSchema).min(1).max(32)
427
428
  }).strict();
428
429
  const TeamPermissionModeSchema = z$1.enum(["default", "bypassPermissions"]);
429
- const id$1 = z$1.string().min(1).max(128);
430
+ const id$2 = z$1.string().min(1).max(128);
430
431
  const text$1 = z$1.string().min(1).max(32e3);
431
432
  const TeamAssistantSchema = z$1.enum(["claude", "codex", "pi-acp"]);
432
433
  const TeamModelSchema = z$1.string().trim().min(1).max(256);
@@ -437,28 +438,28 @@ const TeamActionSchema = z$1.discriminatedUnion("type", [
437
438
  z$1.object({ type: z$1.literal("start"), launch: TeamLaunchSchema }),
438
439
  z$1.object({ type: z$1.literal("set-defaults"), defaults: TeamDefaultsSchema }),
439
440
  z$1.object({ type: z$1.literal("set-permission-mode"), permissionMode: TeamPermissionModeSchema }),
440
- z$1.object({ type: z$1.literal("schedule-create"), name: id$1, botId: id$1, body: text$1, runAt: z$1.number().int().positive().max(864e13), intervalMs: z$1.number().int().min(6e4).max(366 * 864e5).optional() }),
441
- z$1.object({ type: z$1.literal("schedule-pause"), scheduleId: id$1, version: z$1.number().int().positive() }),
442
- z$1.object({ type: z$1.literal("schedule-resume"), scheduleId: id$1, version: z$1.number().int().positive() }),
443
- z$1.object({ type: z$1.literal("schedule-cancel"), scheduleId: id$1, version: z$1.number().int().positive() }),
444
- z$1.object({ type: z$1.literal("reconcile-operation"), operationId: id$1, claimId: id$1, note: z$1.string().trim().min(1).max(4e3) }),
445
- z$1.object({ type: z$1.literal("join"), name: id$1, sessionId: id$1, botId: id$1.optional() }),
446
- z$1.object({ type: z$1.literal("delegate"), goal: text$1, acceptance: z$1.array(text$1).min(1).max(32), parentTaskId: id$1.optional(), assigneeBotId: id$1.optional(), botName: id$1.optional(), directory: z$1.string().min(1).max(4096).optional(), assistant: TeamAssistantSchema.optional(), model: TeamModelSchema.optional() }),
447
- z$1.object({ type: z$1.literal("message"), taskId: id$1, body: text$1, recipientBotId: id$1.optional() }),
448
- z$1.object({ type: z$1.literal("submit"), taskId: id$1, attemptId: id$1, goalVersion: z$1.number().int().positive(), result: text$1 }),
449
- z$1.object({ type: z$1.literal("accept"), taskId: id$1, attemptId: id$1, goalVersion: z$1.number().int().positive() }),
450
- z$1.object({ type: z$1.literal("return"), taskId: id$1, attemptId: id$1, goalVersion: z$1.number().int().positive(), reason: text$1 }),
451
- z$1.object({ type: z$1.literal("cancel"), taskId: id$1, attemptId: id$1, goalVersion: z$1.number().int().positive(), reason: text$1 }),
452
- z$1.object({ type: z$1.literal("handoff"), taskId: id$1, attemptId: id$1, goalVersion: z$1.number().int().positive(), assigneeBotId: id$1 }),
453
- z$1.object({ type: z$1.literal("claim-operation"), operationId: id$1, machineId: id$1, teamLaunchVersion: z$1.literal(1).optional() }),
454
- z$1.object({ type: z$1.literal("complete-operation"), operationId: id$1, machineId: id$1, claimId: id$1, sessionId: id$1.optional(), workingDirectory: z$1.string().min(1).max(4096).optional() }),
455
- z$1.object({ type: z$1.literal("fail-operation"), operationId: id$1, machineId: id$1, claimId: id$1, error: text$1, unknown: z$1.boolean().optional() }),
456
- z$1.object({ type: z$1.literal("session-event"), sessionId: id$1, event: z$1.enum(["idle", "blocked", "exited"]) }),
457
- z$1.object({ type: z$1.literal("message-delivered"), messageId: id$1, recipientBotId: id$1, generation: z$1.number().int().positive(), sessionId: id$1 })
441
+ z$1.object({ type: z$1.literal("schedule-create"), name: id$2, botId: id$2, body: text$1, runAt: z$1.number().int().positive().max(864e13), intervalMs: z$1.number().int().min(6e4).max(366 * 864e5).optional() }),
442
+ z$1.object({ type: z$1.literal("schedule-pause"), scheduleId: id$2, version: z$1.number().int().positive() }),
443
+ z$1.object({ type: z$1.literal("schedule-resume"), scheduleId: id$2, version: z$1.number().int().positive() }),
444
+ z$1.object({ type: z$1.literal("schedule-cancel"), scheduleId: id$2, version: z$1.number().int().positive() }),
445
+ z$1.object({ type: z$1.literal("reconcile-operation"), operationId: id$2, claimId: id$2, note: z$1.string().trim().min(1).max(4e3) }),
446
+ z$1.object({ type: z$1.literal("join"), name: id$2, sessionId: id$2, botId: id$2.optional() }),
447
+ z$1.object({ type: z$1.literal("delegate"), goal: text$1, acceptance: z$1.array(text$1).min(1).max(32), parentTaskId: id$2.optional(), assigneeBotId: id$2.optional(), botName: id$2.optional(), directory: z$1.string().min(1).max(4096).optional(), assistant: TeamAssistantSchema.optional(), model: TeamModelSchema.optional() }),
448
+ z$1.object({ type: z$1.literal("message"), taskId: id$2, body: text$1, recipientBotId: id$2.optional() }),
449
+ z$1.object({ type: z$1.literal("submit"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive(), result: text$1 }),
450
+ z$1.object({ type: z$1.literal("accept"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive() }),
451
+ z$1.object({ type: z$1.literal("return"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive(), reason: text$1 }),
452
+ z$1.object({ type: z$1.literal("cancel"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive(), reason: text$1 }),
453
+ z$1.object({ type: z$1.literal("handoff"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive(), assigneeBotId: id$2 }),
454
+ z$1.object({ type: z$1.literal("claim-operation"), operationId: id$2, machineId: id$2, teamLaunchVersion: z$1.literal(1).optional() }),
455
+ z$1.object({ type: z$1.literal("complete-operation"), operationId: id$2, machineId: id$2, claimId: id$2, sessionId: id$2.optional(), workingDirectory: z$1.string().min(1).max(4096).optional() }),
456
+ z$1.object({ type: z$1.literal("fail-operation"), operationId: id$2, machineId: id$2, claimId: id$2, error: text$1, unknown: z$1.boolean().optional() }),
457
+ z$1.object({ type: z$1.literal("session-event"), sessionId: id$2, event: z$1.enum(["idle", "blocked", "exited"]) }),
458
+ z$1.object({ type: z$1.literal("message-delivered"), messageId: id$2, recipientBotId: id$2, generation: z$1.number().int().positive(), sessionId: id$2 })
458
459
  ]);
459
- z$1.object({ requestId: id$1, action: TeamActionSchema });
460
- z$1.object({ name: id$1, machineId: id$1, requestId: id$1.optional(), launch: TeamLaunchSchema.optional() });
461
- const id = z$1.string().min(1).max(128);
460
+ z$1.object({ requestId: id$2, action: TeamActionSchema });
461
+ z$1.object({ name: id$2, machineId: id$2, requestId: id$2.optional(), launch: TeamLaunchSchema.optional() });
462
+ const id$1 = z$1.string().min(1).max(128);
462
463
  const text = z$1.string().min(1).max(32e3);
463
464
  const AUTOMATION_NAME_PATTERN = /^[a-z0-9][a-z0-9-_.]{0,63}$/;
464
465
  const AutomationNameSchema = z$1.string().regex(AUTOMATION_NAME_PATTERN, "automation name must match [a-z0-9][a-z0-9-_.]{0,63}");
@@ -497,7 +498,7 @@ const AutomationActionSchema = z$1.discriminatedUnion("kind", [
497
498
  worktree: z$1.boolean().optional(),
498
499
  sticky: AutomationStickySchema.optional()
499
500
  }),
500
- z$1.object({ kind: z$1.literal("send"), sessionId: id, prompt: text }),
501
+ z$1.object({ kind: z$1.literal("send"), sessionId: id$1, prompt: text }),
501
502
  z$1.object({
502
503
  kind: z$1.literal("script"),
503
504
  command: z$1.array(z$1.string().min(1).max(4096)).min(1).max(256),
@@ -523,41 +524,45 @@ const maxRuntimeMs = z$1.number().int().min(6e4).max(7 * 864e5);
523
524
  z$1.object({
524
525
  name: AutomationNameSchema,
525
526
  description: z$1.string().max(4e3).nullable().optional(),
526
- machineId: id,
527
+ machineId: id$1,
527
528
  trigger: AutomationTriggerSchema,
528
529
  action: AutomationActionSchema,
529
530
  concurrency: AutomationConcurrencySchema.optional(),
530
531
  maxRuntimeMs: maxRuntimeMs.optional(),
531
532
  status: z$1.enum(AUTOMATION_STATUSES).optional(),
532
533
  /** B-548. Older servers strip it silently — clients must check the response echoes `precheck`. */
533
- precheck: AutomationPrecheckSchema.nullable().optional()
534
+ precheck: AutomationPrecheckSchema.nullable().optional(),
535
+ /** B-644: sessions this automation spawns join this project (quiet variant). Older servers strip it — check the echo. */
536
+ projectId: id$1.nullable().optional()
534
537
  });
535
538
  z$1.object({
536
539
  version: z$1.number().int().positive(),
537
540
  name: AutomationNameSchema.optional(),
538
541
  description: z$1.string().max(4e3).nullable().optional(),
539
- machineId: id.optional(),
542
+ machineId: id$1.optional(),
540
543
  trigger: AutomationTriggerSchema.optional(),
541
544
  action: AutomationActionSchema.optional(),
542
545
  concurrency: AutomationConcurrencySchema.optional(),
543
546
  maxRuntimeMs: maxRuntimeMs.optional(),
544
547
  /** B-548: omitted keeps the current precheck, `null` removes it. Changing `action` alone keeps it too. */
545
- precheck: AutomationPrecheckSchema.nullable().optional()
548
+ precheck: AutomationPrecheckSchema.nullable().optional(),
549
+ /** B-644: omitted keeps the current project, `null` detaches. */
550
+ projectId: id$1.nullable().optional()
546
551
  });
547
552
  const payload = z$1.string().max(AUTOMATION_PAYLOAD_MAX_BYTES).refine((v) => new TextEncoder().encode(v).length <= AUTOMATION_PAYLOAD_MAX_BYTES, "payload exceeds 64KB");
548
553
  z$1.object({ payload: payload.optional(), dedupeKey: z$1.string().min(1).max(256).optional() });
549
554
  z$1.object({ payload: payload.optional() });
550
555
  z$1.object({
551
- machineId: id,
556
+ machineId: id$1,
552
557
  limit: z$1.number().int().min(1).max(AUTOMATION_CLAIM_MAX_RUNS).optional(),
553
558
  leaseMs: z$1.number().int().min(5e3).max(36e5).optional(),
554
559
  /** B-548: what this daemon can execute (e.g. `precheck`). Older daemons send nothing; older servers strip it. */
555
560
  capabilities: z$1.array(z$1.string().min(1).max(64)).max(32).optional()
556
561
  });
557
562
  z$1.object({
558
- claimId: id.optional(),
563
+ claimId: id$1.optional(),
559
564
  status: z$1.enum(["running", "done", "failed", "skipped"]).optional(),
560
- sessionId: id.nullable().optional(),
565
+ sessionId: id$1.nullable().optional(),
561
566
  stickyKey: z$1.string().min(1).max(512).optional(),
562
567
  summary: z$1.string().max(AUTOMATION_SUMMARY_MAX_CHARS).nullable().optional(),
563
568
  error: z$1.string().max(AUTOMATION_SUMMARY_MAX_CHARS).nullable().optional(),
@@ -567,16 +572,130 @@ z$1.object({
567
572
  leaseMs: z$1.number().int().min(5e3).max(36e5).optional()
568
573
  });
569
574
  z$1.object({ by: z$1.string().min(1).max(64).optional() });
570
- z$1.object({ key: z$1.string().min(1).max(512), sessionId: id });
575
+ z$1.object({ key: z$1.string().min(1).max(512), sessionId: id$1 });
571
576
  z$1.object({ key: z$1.string().min(1).max(512) });
572
577
  z$1.object({
573
- automationId: id.optional(),
578
+ automationId: id$1.optional(),
574
579
  name: AutomationNameSchema.optional(),
575
580
  status: z$1.string().min(1).max(64).optional(),
576
581
  attention: z$1.enum(["1", "true", "0", "false"]).optional(),
577
582
  limit: z$1.coerce.number().int().min(1).max(200).optional()
578
583
  });
579
- z$1.object({ machineId: id.optional() });
584
+ z$1.object({ machineId: id$1.optional() });
585
+ const PROJECT_SESSION_CAPABILITY = "project-v1";
586
+ const PROJECT_LIMITS = {
587
+ nameChars: 120,
588
+ goalChars: 2e3,
589
+ instructionsBytes: 8 * 1024,
590
+ folders: 20,
591
+ logTitleChars: 200,
592
+ logBodyBytes: 4 * 1024,
593
+ messageBytes: 64 * 1024,
594
+ presenceBatch: 200,
595
+ memberBatch: 200};
596
+ const id = z$1.string().min(1).max(128);
597
+ const utf8Bytes = (value) => new TextEncoder().encode(value).length;
598
+ const boundedText = (maxBytes) => z$1.string().max(maxBytes).refine((v) => utf8Bytes(v) <= maxBytes, `exceeds ${maxBytes} bytes`);
599
+ const ProjectFolderSchema = z$1.object({
600
+ machineId: id,
601
+ path: z$1.string().min(1).max(4096),
602
+ primary: z$1.boolean().optional()
603
+ });
604
+ const ProjectDefaultsSchema = z$1.object({
605
+ agent: z$1.string().max(64).nullable().optional(),
606
+ model: z$1.string().max(256).nullable().optional(),
607
+ permissionMode: z$1.string().max(64).nullable().optional(),
608
+ worktree: z$1.boolean().nullable().optional()
609
+ });
610
+ const PROJECT_LOG_KINDS = ["decision", "finding", "handoff"];
611
+ const ProjectLogKindSchema = z$1.enum(PROJECT_LOG_KINDS);
612
+ const ProjectMemberViaInputSchema = z$1.enum(["explicit", "lineage", "suggested-accepted", "automation"]);
613
+ z$1.object({
614
+ name: z$1.string().trim().min(1).max(PROJECT_LIMITS.nameChars),
615
+ goal: z$1.string().max(PROJECT_LIMITS.goalChars).nullable().optional(),
616
+ instructions: boundedText(PROJECT_LIMITS.instructionsBytes).optional(),
617
+ folders: z$1.array(ProjectFolderSchema).max(PROJECT_LIMITS.folders).optional(),
618
+ defaults: ProjectDefaultsSchema.optional(),
619
+ /** Idempotency: the same requestId returns the project it created. */
620
+ requestId: id.optional(),
621
+ /** Optional initial members (e.g. "设为项目" moves a folder's sessions in one step). */
622
+ sessionIds: z$1.array(id).max(PROJECT_LIMITS.memberBatch).optional()
623
+ });
624
+ z$1.object({
625
+ name: z$1.string().trim().min(1).max(PROJECT_LIMITS.nameChars).optional(),
626
+ goal: z$1.string().max(PROJECT_LIMITS.goalChars).nullable().optional(),
627
+ folders: z$1.array(ProjectFolderSchema).max(PROJECT_LIMITS.folders).optional(),
628
+ defaults: ProjectDefaultsSchema.optional(),
629
+ archived: z$1.boolean().optional()
630
+ });
631
+ z$1.object({
632
+ instructions: boundedText(PROJECT_LIMITS.instructionsBytes),
633
+ ifVersion: z$1.number().int().min(0),
634
+ /** One-line summary shown in the next-turn digest ("instructions now v8 — …"). */
635
+ summary: z$1.string().max(200).optional()
636
+ });
637
+ z$1.object({
638
+ sessionIds: z$1.array(id).min(1).max(PROJECT_LIMITS.memberBatch),
639
+ via: ProjectMemberViaInputSchema.optional()
640
+ });
641
+ z$1.object({
642
+ kind: ProjectLogKindSchema,
643
+ title: z$1.string().trim().min(1).max(PROJECT_LIMITS.logTitleChars),
644
+ body: boundedText(PROJECT_LIMITS.logBodyBytes).optional(),
645
+ /** Entry id (or `#seq`) this entry replaces. */
646
+ supersedes: z$1.string().min(1).max(128).optional(),
647
+ /** Stamped by the wrapper (the agent cannot fill it). Absent = written by the user. */
648
+ authorSessionId: id.optional()
649
+ });
650
+ z$1.object({
651
+ /** When set, only entries this session authored may be revoked. Absent = the owner. */
652
+ bySessionId: id.optional()
653
+ });
654
+ z$1.object({ teamId: id });
655
+ const ProjectPresenceEntrySchema = z$1.object({
656
+ sessionId: id,
657
+ title: z$1.string().max(200).nullable().optional(),
658
+ agent: z$1.string().max(64).nullable().optional(),
659
+ machine: z$1.string().max(200).nullable().optional(),
660
+ branch: z$1.string().max(200).nullable().optional(),
661
+ state: z$1.string().max(32).nullable().optional(),
662
+ doing: z$1.string().max(200).nullable().optional(),
663
+ injectedInstructionsVersion: z$1.number().int().min(0).nullable().optional(),
664
+ /** Session capabilities the wrapper advertised (e.g. `project-v1`); drives the "未注入" badge. */
665
+ capabilities: z$1.array(z$1.string().max(64)).max(32).optional()
666
+ });
667
+ z$1.object({
668
+ machineId: id,
669
+ sessions: z$1.array(ProjectPresenceEntrySchema).max(PROJECT_LIMITS.presenceBatch),
670
+ /** Sessions of this machine that stopped; their presence rows are marked `offline`. */
671
+ gone: z$1.array(id).max(PROJECT_LIMITS.presenceBatch).optional()
672
+ });
673
+ z$1.object({
674
+ fromSessionId: id,
675
+ toSessionId: id,
676
+ body: boundedText(PROJECT_LIMITS.messageBytes).pipe(z$1.string().min(1))
677
+ });
678
+ z$1.object({
679
+ sessionId: id,
680
+ messageIds: z$1.array(id).min(1).max(100)
681
+ });
682
+ z$1.object({
683
+ full: z$1.enum(["0", "1", "true", "false"]).optional(),
684
+ section: z$1.enum(["instructions", "log", "sessions", "messages"]).optional(),
685
+ /** Read without moving the "since last read" cursor (used by the first-turn prefix). */
686
+ peek: z$1.enum(["0", "1", "true", "false"]).optional()
687
+ });
688
+ z$1.object({
689
+ since: z$1.coerce.number().int().min(0)
690
+ });
691
+ const PROJECT_UX_DISPATCH_ENTRIES = ["quick", "dialog", "project", "sidebar_group", "move", "other"];
692
+ const ProjectUxEventSchema = z$1.discriminatedUnion("kind", [
693
+ /** A session was created (or moved) — where from, and whether it landed in a project. */
694
+ z$1.object({ kind: z$1.literal("dispatch"), entry: z$1.enum(PROJECT_UX_DISPATCH_ENTRIES), inProject: z$1.boolean() }),
695
+ /** The owner opened a session that was waiting for them: how long it had been waiting. */
696
+ z$1.object({ kind: z$1.literal("attention_open"), latencyMs: z$1.number().int().min(0).max(7 * 864e5), inProject: z$1.boolean() })
697
+ ]);
698
+ z$1.object({ events: z$1.array(ProjectUxEventSchema).min(1).max(20) });
580
699
  const BUILTIN_TODO_PREFIX = "vh.todo.v1.";
581
700
  const TITLE_MAX_LENGTH = 500;
582
701
  const NOTE_MAX_LENGTH = 8e3;
@@ -977,11 +1096,11 @@ z$1.object({
977
1096
  sid: z$1.string(),
978
1097
  items: z$1.array(PromptQueueItemSchema)
979
1098
  });
980
- z$1.object({
1099
+ const ServerMigrateNoticeSchema = z$1.object({
981
1100
  url: z$1.string().url().max(512),
982
1101
  webappUrl: z$1.string().url().max(512),
983
1102
  handoff: z$1.string().regex(/^vh1\.[A-Za-z0-9_-]{16,2048}\.[A-Za-z0-9_-]{43}$/),
984
1103
  issuedAt: z$1.number().int().positive()
985
1104
  });
986
1105
 
987
- export { AUTOMATION_NAME_PATTERN as A, BUILTIN_TODO_SKILL as B, ContextUsageSchema as C, PROMPT_QUEUE_CAPABILITY as P, ReleaseDrainNoticeSchema as R, STREAM_DELTA_MAX_CHARS as S, AUTOMATION_PRECHECK_MAX_TIMEOUT_MS as a, AutomationPrecheckSchema as b, createEnvelope as c, createBuiltinTodoClient as d, isClaudeOpus55Model as e, supportsClaudeOpus55 as f, getAgentCodeDefaults as g, AutomationNameSchema as h, isAutomationRunTerminal as i, AutomationConcurrencySchema as j, AutomationActionSchema as k, AutomationTriggerSchema as l, AgentVersionsSchema as m, normalizeAgentKey as n, BUILTIN_TODO_DISCOVERY as o, AGENT_VERSION_SOURCES as p, RelayAssignmentResponseSchema as q, CODEX_STEER_CAPABILITY as r, streamKeyOf as s, RelayCandidatesResponseSchema as t, AUTOMATION_SUMMARY_MAX_CHARS as u, AUTOMATION_PRECHECK_OUTPUT_MAX_CHARS as v, AUTOMATION_PRECHECK_DEFAULT_TIMEOUT_MS as w, AUTOMATION_CLAIM_MAX_RUNS as x, AUTOMATION_DAEMON_CAPABILITY_PRECHECK as y, AUTOMATION_DEFAULT_LEASE_MS as z };
1106
+ export { AUTOMATION_NAME_PATTERN as A, BUILTIN_TODO_SKILL as B, ContextUsageSchema as C, AUTOMATION_CLAIM_MAX_RUNS as D, AUTOMATION_DAEMON_CAPABILITY_PRECHECK as E, AUTOMATION_DEFAULT_LEASE_MS as F, PROMPT_QUEUE_CAPABILITY as P, ReleaseDrainNoticeSchema as R, STREAM_DELTA_MAX_CHARS as S, PROJECT_SESSION_CAPABILITY as a, AUTOMATION_PRECHECK_MAX_TIMEOUT_MS as b, AutomationPrecheckSchema as c, createEnvelope as d, createBuiltinTodoClient as e, BUILTIN_TODO_DISCOVERY as f, getAgentCodeDefaults as g, isClaudeOpus55Model as h, isAutomationRunTerminal as i, supportsClaudeOpus55 as j, AutomationNameSchema as k, AutomationConcurrencySchema as l, AutomationActionSchema as m, normalizeAgentKey as n, AutomationTriggerSchema as o, AgentVersionsSchema as p, PI_STEER_CAPABILITY as q, AGENT_VERSION_SOURCES as r, streamKeyOf as s, RelayAssignmentResponseSchema as t, CODEX_STEER_CAPABILITY as u, RelayCandidatesResponseSchema as v, ServerMigrateNoticeSchema as w, AUTOMATION_SUMMARY_MAX_CHARS as x, AUTOMATION_PRECHECK_OUTPUT_MAX_CHARS as y, AUTOMATION_PRECHECK_DEFAULT_TIMEOUT_MS as z };
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- require('./package-Ch9WGDV_.cjs');
4
- require('./index-D9NoYc5I.cjs');
3
+ require('./package-SgqTYsjn.cjs');
4
+ require('./index-D09T1m8Y.cjs');
5
5
  require('node:module');
6
6
  require('node:fs');
7
7
  require('node:fs/promises');
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import './package-CjlsAaRe.mjs';
2
- import './index-CEm0MYiS.mjs';
1
+ import './package-BPPebGQF.mjs';
2
+ import './index-D3bidoG8.mjs';
3
3
  import 'node:module';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
@@ -1,7 +1,7 @@
1
1
  import { createHash, randomUUID } from 'node:crypto';
2
2
  import { unlink, rmdir, mkdir, lstat, readFile, writeFile, rename } from 'node:fs/promises';
3
3
  import { join, resolve, dirname } from 'node:path';
4
- import { T as TEAM_SKILL } from './resources-BdFBQi8r.mjs';
4
+ import { T as TEAM_SKILL } from './resources-y9jfyO-_.mjs';
5
5
 
6
6
  const AUTOMATION_SKILL = `---
7
7
  name: very-happy-automations
@@ -3,7 +3,7 @@
3
3
  var node_crypto = require('node:crypto');
4
4
  var promises = require('node:fs/promises');
5
5
  var path = require('node:path');
6
- var resources = require('./resources-JDPugcDq.cjs');
6
+ var resources = require('./resources-CvIlkzpP.cjs');
7
7
 
8
8
  const AUTOMATION_SKILL = `---
9
9
  name: very-happy-automations
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var logger = require('./logger-LvwVeATU.cjs');
3
+ var logger = require('./logger-C1GWx3gi.cjs');
4
4
  var fs = require('fs');
5
5
  var child_process = require('child_process');
6
6
  var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
7
7
  var os = require('os');
8
8
  require('chalk');
9
9
  require('node:util');
10
- require('./configuration-DZPy0T9Z.cjs');
10
+ require('./configuration-CMHZnp6G.cjs');
11
11
  require('node:fs');
12
12
  require('node:os');
13
13
  require('node:path');
14
- require('./package-Ch9WGDV_.cjs');
14
+ require('./package-SgqTYsjn.cjs');
15
15
  require('node:fs/promises');
16
16
 
17
17
  const PLIST_LABEL = "com.happy-cli.daemon";
@@ -1,15 +1,15 @@
1
- import { l as logger } from './logger-13cBr_ew.mjs';
1
+ import { l as logger } from './logger-BtVhHnD8.mjs';
2
2
  import { existsSync, writeFileSync, chmodSync } from 'fs';
3
3
  import { execSync } from 'child_process';
4
4
  import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
5
5
  import os from 'os';
6
6
  import 'chalk';
7
7
  import 'node:util';
8
- import './configuration-D55F0t16.mjs';
8
+ import './configuration-WMi4idBB.mjs';
9
9
  import 'node:fs';
10
10
  import 'node:os';
11
11
  import 'node:path';
12
- import './package-CjlsAaRe.mjs';
12
+ import './package-BPPebGQF.mjs';
13
13
  import 'node:fs/promises';
14
14
 
15
15
  const PLIST_LABEL = "com.happy-cli.daemon";
package/dist/lib.cjs CHANGED
@@ -1,25 +1,26 @@
1
1
  'use strict';
2
2
 
3
- var api = require('./api-BWX10o97.cjs');
4
- var logger = require('./logger-LvwVeATU.cjs');
5
- var configuration = require('./configuration-DZPy0T9Z.cjs');
3
+ var api = require('./api-Cmjfr8Z7.cjs');
4
+ var logger = require('./logger-C1GWx3gi.cjs');
5
+ var configuration = require('./configuration-CMHZnp6G.cjs');
6
6
  var types = require('./types-CRS-srZK.cjs');
7
7
  require('axios');
8
- require('./lidState-DxbK0qfu.cjs');
9
- require('./authRelay-BdYkC1Po.cjs');
8
+ require('./lidState-Dv2wwFTj.cjs');
9
+ require('./authRelay-Dy1qU9td.cjs');
10
10
  require('node:crypto');
11
11
  require('tweetnacl');
12
12
  require('os');
13
13
  require('child_process');
14
14
  require('node:events');
15
15
  require('socket.io-client');
16
- require('./attachmentLimits-DtFqqiwR.cjs');
16
+ require('./pushNotifications-DaLQUyi0.cjs');
17
17
  require('zod');
18
- require('./index-De8L5lFK.cjs');
18
+ require('./index-C6O2vVjm.cjs');
19
19
  require('@paralleldrive/cuid2');
20
+ require('./contentLogMetadata-ZSFk_NjQ.cjs');
20
21
  require('./limits-C-a7gr04.cjs');
21
- require('./time-Dg5tVB8S.cjs');
22
- require('./registerCommonHandlers-60VuTkdg.cjs');
22
+ require('./time-CrwIMHta.cjs');
23
+ require('./registerCommonHandlers-Cj084Sg7.cjs');
23
24
  require('util');
24
25
  require('fs/promises');
25
26
  require('crypto');
@@ -27,18 +28,17 @@ require('path');
27
28
  require('cross-spawn');
28
29
  require('./projectPath-ChLhdOyt.cjs');
29
30
  require('url');
30
- require('./sync-C7sxoUYG.cjs');
31
+ require('./sync-D23jbqVa.cjs');
31
32
  require('./backgroundTaskActivity-CBvUdj39.cjs');
32
- require('./controlClient-SX8gSza2.cjs');
33
- require('./persistence-DXbKOHxl.cjs');
33
+ require('./controlClient-C-5qCt8W.cjs');
34
+ require('./persistence-BegE7NPa.cjs');
34
35
  require('node:fs/promises');
35
36
  require('node:fs');
36
- require('./contentLogMetadata-ZSFk_NjQ.cjs');
37
37
  require('chalk');
38
38
  require('node:util');
39
39
  require('node:path');
40
40
  require('node:os');
41
- require('./package-Ch9WGDV_.cjs');
41
+ require('./package-SgqTYsjn.cjs');
42
42
 
43
43
 
44
44
 
package/dist/lib.d.cts CHANGED
@@ -588,6 +588,15 @@ declare const DaemonStateSchema: z$1.ZodObject<{
588
588
  rpcAvailable: z$1.ZodBoolean;
589
589
  detectedAt: z$1.ZodNumber;
590
590
  }, z$1.core.$loose>>;
591
+ webPanels: z$1.ZodOptional<z$1.ZodObject<{
592
+ panels: z$1.ZodArray<z$1.ZodObject<{
593
+ id: z$1.ZodString;
594
+ title: z$1.ZodString;
595
+ url: z$1.ZodString;
596
+ embed: z$1.ZodBoolean;
597
+ }, z$1.core.$strip>>;
598
+ updatedAt: z$1.ZodNumber;
599
+ }, z$1.core.$strip>>;
591
600
  }, z$1.core.$strip>;
592
601
  type DaemonState = z$1.infer<typeof DaemonStateSchema>;
593
602
  type ClaudeAuthState = ClaudeAuthState$1;
@@ -707,6 +716,7 @@ type Metadata = {
707
716
  */
708
717
  terminalId?: string;
709
718
  codexThreadId?: string;
719
+ piSessionId?: string;
710
720
  tools?: string[];
711
721
  slashCommands?: string[];
712
722
  mcpServers?: Array<{
@@ -1291,6 +1301,11 @@ declare class ApiSessionClient extends EventEmitter {
1291
1301
  * own line, so a launcher sends the matching session event only when this
1292
1302
  * says the turn-end did not carry it).
1293
1303
  */
1304
+ /**
1305
+ * B-495: close the turn a fork backfill left open. History, not a live
1306
+ * turn end — so no `turn-ended` tap (board analyzer, completion hooks).
1307
+ */
1308
+ closeReplayedClaudeTurn(): void;
1294
1309
  closeClaudeSessionTurn(status?: SessionTurnEndStatus, meta?: {
1295
1310
  error?: string;
1296
1311
  }): boolean;
@@ -1453,6 +1468,26 @@ declare class ApiSessionClient extends EventEmitter {
1453
1468
  private startSmartReconnect;
1454
1469
  }
1455
1470
 
1471
+ /**
1472
+ * B-510: machine web panels — local web pages a person may need to look at
1473
+ * (noVNC, an agent-browser dashboard, Grafana, a dev server), declared ONLY in
1474
+ * this machine's `~/.happy/settings.json` (`webPanels`) and mirrored to the web
1475
+ * through `daemonState.webPanels`. Spec: specs/2026-09-machine-web-panels.md.
1476
+ *
1477
+ * The web, RPC and server have no write path (same rule as `todoProvider`):
1478
+ * the URL is opened by the viewer's browser, so whoever can write it chooses
1479
+ * what the user's browser loads. Only the machine owner can.
1480
+ *
1481
+ * Nothing is proxied: the viewer's browser connects to the URL directly.
1482
+ */
1483
+ interface WebPanel {
1484
+ id: string;
1485
+ title: string;
1486
+ url: string;
1487
+ /** false = the web only offers "open in new window" (site forbids framing). */
1488
+ embed: boolean;
1489
+ }
1490
+
1456
1491
  /**
1457
1492
  * The backends the daemon can spawn as a remote session.
1458
1493
  *
@@ -1691,6 +1726,9 @@ declare class ApiMachineClient {
1691
1726
  private claudeAuthState;
1692
1727
  /** B-587: the machine's hibernation threshold, published as a capability. */
1693
1728
  private agentHibernationIdleMs;
1729
+ /** B-510: last normalized `webPanels` (null = never set → field not written). */
1730
+ private webPanels;
1731
+ private webPanelsSignatureSent;
1694
1732
  private rateLimitPushChain;
1695
1733
  private readonly rateLimitPublisher;
1696
1734
  private rpcHandlerManager;
@@ -1770,6 +1808,12 @@ declare class ApiMachineClient {
1770
1808
  * `daemonState.agentHibernation` capability. Call before connect().
1771
1809
  */
1772
1810
  setAgentHibernationHandlers(initialIdleMs: number, set: (idleMs: number) => Promise<number>): void;
1811
+ /**
1812
+ * B-510: mirror the local `webPanels` declaration into daemonState. Every
1813
+ * daemonState write is a CAS + DB write + broadcast, so an unchanged list
1814
+ * (same signature as the last one sent) writes nothing.
1815
+ */
1816
+ setWebPanels(panels: WebPanel[]): Promise<void>;
1773
1817
  private publishAgentHibernation;
1774
1818
  /** B-276 machine RPCs. Responses always carry `claudeAuth` so the web can refresh in place. */
1775
1819
  setClaudeAuthHandlers(handlers: {
@@ -1835,6 +1879,9 @@ declare class ApiMachineClient {
1835
1879
  private createControlSocket;
1836
1880
  private activateControlSocket;
1837
1881
  private bindControlDataHandlers;
1882
+ private serverMigrateHandler;
1883
+ /** B-635: the daemon decides what to do with a relay-migration notice (daemon/serverMigration.ts). */
1884
+ setServerMigrateHandler(handler: ((notice: unknown) => void) | null): void;
1838
1885
  private startReleaseHandover;
1839
1886
  private releaseHandover;
1840
1887
  private startKeepAlive;
@@ -1859,7 +1906,7 @@ interface PushToken {
1859
1906
  createdAt: number;
1860
1907
  updatedAt: number;
1861
1908
  }
1862
- type SessionNotificationKind = 'done' | 'permission' | 'question';
1909
+ type SessionNotificationKind = 'done' | 'permission' | 'question' | 'attention';
1863
1910
  declare class PushNotificationClient {
1864
1911
  private readonly token;
1865
1912
  private readonly baseUrl;
@@ -1894,6 +1941,23 @@ declare class PushNotificationClient {
1894
1941
  metadata: Metadata | null | undefined;
1895
1942
  data?: Record<string, any>;
1896
1943
  }): void;
1944
+ /**
1945
+ * B-510 `request_human` / `very-happy attention --session`: an awaited
1946
+ * push-event `attention` (title "Needs you", body = the reason, data.url =
1947
+ * panel deep link or the session). A server that predates the kind answers
1948
+ * 400; then the same push goes out as `question`, so the person is still
1949
+ * reached (compat matrix in specs/2026-09-machine-web-panels.md).
1950
+ */
1951
+ sendAttention(params: {
1952
+ sessionId: string;
1953
+ reason: string;
1954
+ url: string;
1955
+ sessionTitle?: string;
1956
+ }): Promise<{
1957
+ sent: boolean;
1958
+ kind?: SessionNotificationKind;
1959
+ error?: string;
1960
+ }>;
1897
1961
  }
1898
1962
 
1899
1963
  /**