tenjin-cli 0.1.0-alpha.33 → 0.1.0-alpha.35

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 (495) hide show
  1. package/NOTICE.md +110 -0
  2. package/README.md +87 -81
  3. package/dist/{_esm-BIN7VY2L.js → _esm-2KST7HQ7.js} +7 -7
  4. package/dist/alive-5TV22PNF.js +51 -0
  5. package/dist/auth-XI7BJFLW.js +47 -0
  6. package/dist/{auto-update-Y24UL56V.js → auto-update-7L24KDWA.js} +4 -5
  7. package/dist/balance-DFHC6XEU.js +71 -0
  8. package/dist/{ccip-DHDFKTQV.js → ccip-HOW3DZYF.js} +4 -4
  9. package/dist/chunk-24XKUN2S.js +202 -0
  10. package/dist/chunk-24XKUN2S.js.map +1 -0
  11. package/dist/chunk-2L7TDGLV.js +56 -0
  12. package/dist/chunk-2L7TDGLV.js.map +1 -0
  13. package/dist/{chunk-C2Q76BVM.js → chunk-2U7H35IP.js} +29 -7
  14. package/dist/chunk-2U7H35IP.js.map +1 -0
  15. package/dist/chunk-2W4DQQUU.js +176 -0
  16. package/dist/chunk-2W4DQQUU.js.map +1 -0
  17. package/dist/{chunk-LRW6S53P.js → chunk-34SAECKZ.js} +35 -11
  18. package/dist/chunk-34SAECKZ.js.map +1 -0
  19. package/dist/{chunk-2I4QTOLB.js → chunk-3MZ7DYRO.js} +1 -1
  20. package/dist/chunk-3MZ7DYRO.js.map +1 -0
  21. package/dist/{chunk-RVPYTUP4.js → chunk-3Y2EHT4F.js} +13 -9
  22. package/dist/chunk-3Y2EHT4F.js.map +1 -0
  23. package/dist/chunk-3Y6BHIN6.js +169 -0
  24. package/dist/chunk-3Y6BHIN6.js.map +1 -0
  25. package/dist/{chunk-4K7TQHNP.js → chunk-3YPL6T3P.js} +17 -33
  26. package/dist/chunk-3YPL6T3P.js.map +1 -0
  27. package/dist/{chunk-E7SW44LM.js → chunk-44MVIRZH.js} +121 -6
  28. package/dist/chunk-44MVIRZH.js.map +1 -0
  29. package/dist/chunk-45MMSBHA.js +321 -0
  30. package/dist/chunk-45MMSBHA.js.map +1 -0
  31. package/dist/{chunk-3FMZGI7I.js → chunk-4CE6TMI5.js} +1 -1
  32. package/dist/chunk-4CE6TMI5.js.map +1 -0
  33. package/dist/{chunk-QXP3Z3JN.js → chunk-4MBCJFY4.js} +35 -3
  34. package/dist/chunk-4MBCJFY4.js.map +1 -0
  35. package/dist/chunk-4TPL54KW.js +227 -0
  36. package/dist/chunk-4TPL54KW.js.map +1 -0
  37. package/dist/chunk-54ELBTKE.js +1615 -0
  38. package/dist/chunk-54ELBTKE.js.map +1 -0
  39. package/dist/{chunk-NDGZDTSJ.js → chunk-5F4OB5B3.js} +115 -57
  40. package/dist/chunk-5F4OB5B3.js.map +1 -0
  41. package/dist/chunk-5HN4KVQU.js +3348 -0
  42. package/dist/chunk-5HN4KVQU.js.map +1 -0
  43. package/dist/{chunk-ZDZERB6L.js → chunk-5J4E5GYI.js} +572 -407
  44. package/dist/chunk-5J4E5GYI.js.map +1 -0
  45. package/dist/{chunk-ZNNXRNFD.js → chunk-5N4GGUBN.js} +48 -6
  46. package/dist/chunk-5N4GGUBN.js.map +1 -0
  47. package/dist/chunk-5USBZ2MU.js +58 -0
  48. package/dist/chunk-5USBZ2MU.js.map +1 -0
  49. package/dist/chunk-64WOMNYR.js +183 -0
  50. package/dist/chunk-64WOMNYR.js.map +1 -0
  51. package/dist/{chunk-ILNIZ5I2.js → chunk-65RS4LQS.js} +1825 -1715
  52. package/dist/chunk-65RS4LQS.js.map +1 -0
  53. package/dist/{chunk-IE7P2BZE.js → chunk-6QMDUDF2.js} +3 -3
  54. package/dist/{chunk-IADZOXKN.js → chunk-7SLOTLO7.js} +19 -697
  55. package/dist/chunk-7SLOTLO7.js.map +1 -0
  56. package/dist/{chunk-WFSPCCVW.js → chunk-7V25UAQO.js} +99 -99
  57. package/dist/{chunk-WFSPCCVW.js.map → chunk-7V25UAQO.js.map} +1 -1
  58. package/dist/chunk-BGA4DO5M.js +719 -0
  59. package/dist/chunk-BGA4DO5M.js.map +1 -0
  60. package/dist/chunk-BVP7YK2J.js +706 -0
  61. package/dist/chunk-BVP7YK2J.js.map +1 -0
  62. package/dist/chunk-C265QIMJ.js +83 -0
  63. package/dist/chunk-C265QIMJ.js.map +1 -0
  64. package/dist/{chunk-XQJXNMSB.js → chunk-CRG54LEB.js} +1 -1
  65. package/dist/chunk-CRG54LEB.js.map +1 -0
  66. package/dist/{chunk-KG3D7FIF.js → chunk-CZJOMUBP.js} +2 -2
  67. package/dist/{chunk-36RVGZNY.js → chunk-D6M3ZK66.js} +22 -39
  68. package/dist/chunk-D6M3ZK66.js.map +1 -0
  69. package/dist/{chunk-3UCIG4TG.js → chunk-DI4QAGRZ.js} +1 -11
  70. package/dist/chunk-DI4QAGRZ.js.map +1 -0
  71. package/dist/{chunk-JKKAIPTU.js → chunk-DIH2G3YG.js} +47 -10
  72. package/dist/chunk-DIH2G3YG.js.map +1 -0
  73. package/dist/chunk-DJ36BM62.js +78 -0
  74. package/dist/chunk-DJ36BM62.js.map +1 -0
  75. package/dist/chunk-DTEWAVNE.js +114 -0
  76. package/dist/chunk-DTEWAVNE.js.map +1 -0
  77. package/dist/chunk-F2KJAJ7T.js +13 -0
  78. package/dist/chunk-F2KJAJ7T.js.map +1 -0
  79. package/dist/{chunk-BF4XHEQK.js → chunk-F3QPGYOY.js} +6 -6
  80. package/dist/chunk-F3QPGYOY.js.map +1 -0
  81. package/dist/{chunk-3GNJXKIT.js → chunk-F43CV6UC.js} +2 -2
  82. package/dist/{chunk-J57UC3DD.js → chunk-FKVJKLPI.js} +3 -3
  83. package/dist/{chunk-V2LQLN5H.js → chunk-FYFHH7V5.js} +59 -8
  84. package/dist/{chunk-V2LQLN5H.js.map → chunk-FYFHH7V5.js.map} +1 -1
  85. package/dist/chunk-GAJC4BQZ.js +1096 -0
  86. package/dist/chunk-GAJC4BQZ.js.map +1 -0
  87. package/dist/{chunk-DOQGNFHM.js → chunk-GH5UKMZD.js} +2 -12
  88. package/dist/{chunk-DOQGNFHM.js.map → chunk-GH5UKMZD.js.map} +1 -1
  89. package/dist/{chunk-WYXUQGOL.js → chunk-HAZAN4UM.js} +7 -6
  90. package/dist/chunk-HAZAN4UM.js.map +1 -0
  91. package/dist/chunk-HI5XQOX2.js +393 -0
  92. package/dist/chunk-HI5XQOX2.js.map +1 -0
  93. package/dist/chunk-HKGUKAQW.js +488 -0
  94. package/dist/chunk-HKGUKAQW.js.map +1 -0
  95. package/dist/{chunk-SO3XRZPX.js → chunk-HPRVFJPM.js} +6 -6
  96. package/dist/{chunk-L6JEXB3E.js → chunk-HQR4BWKX.js} +3 -131
  97. package/dist/chunk-HQR4BWKX.js.map +1 -0
  98. package/dist/chunk-HZKANST2.js +177 -0
  99. package/dist/chunk-HZKANST2.js.map +1 -0
  100. package/dist/{chunk-UUGOUOVT.js → chunk-I557SAOM.js} +8 -2
  101. package/dist/chunk-I557SAOM.js.map +1 -0
  102. package/dist/{chunk-TC2WZLSC.js → chunk-IGLWLH73.js} +8 -7
  103. package/dist/chunk-IGLWLH73.js.map +1 -0
  104. package/dist/chunk-ILWCKCOI.js +58 -0
  105. package/dist/chunk-ILWCKCOI.js.map +1 -0
  106. package/dist/{chunk-2GP3HRYK.js → chunk-INSIW65E.js} +182 -182
  107. package/dist/{chunk-MPZUYCAP.js → chunk-IULCDMVG.js} +12 -1
  108. package/dist/chunk-IULCDMVG.js.map +1 -0
  109. package/dist/{chunk-INTFHMU4.js → chunk-IVNSUAVC.js} +25 -26
  110. package/dist/chunk-IVNSUAVC.js.map +1 -0
  111. package/dist/chunk-JDQZCREI.js +87 -0
  112. package/dist/chunk-JDQZCREI.js.map +1 -0
  113. package/dist/chunk-JHFFUVON.js +1050 -0
  114. package/dist/chunk-JHFFUVON.js.map +1 -0
  115. package/dist/{chunk-RL5UUDT4.js → chunk-JNUKLSMZ.js} +3 -3
  116. package/dist/chunk-JTILUN4W.js +2933 -0
  117. package/dist/chunk-JTILUN4W.js.map +1 -0
  118. package/dist/{chunk-OJNTCYQQ.js → chunk-JTX3BUDK.js} +37 -53
  119. package/dist/chunk-JTX3BUDK.js.map +1 -0
  120. package/dist/{chunk-X5ZBP3IY.js → chunk-JUUBBBY5.js} +2 -2
  121. package/dist/chunk-JUUBBBY5.js.map +1 -0
  122. package/dist/chunk-JWAK7JQB.js +15 -0
  123. package/dist/chunk-JWAK7JQB.js.map +1 -0
  124. package/dist/{chunk-UXZONNEQ.js → chunk-K5KNGC4I.js} +34 -31
  125. package/dist/chunk-K5KNGC4I.js.map +1 -0
  126. package/dist/chunk-KAQ4Q3TO.js +135 -0
  127. package/dist/chunk-KAQ4Q3TO.js.map +1 -0
  128. package/dist/chunk-KFVJYLVL.js +125 -0
  129. package/dist/chunk-KFVJYLVL.js.map +1 -0
  130. package/dist/chunk-KGUE5AVX.js +69 -0
  131. package/dist/chunk-KGUE5AVX.js.map +1 -0
  132. package/dist/{chunk-FVIGCDSV.js → chunk-KLDMLWXT.js} +11 -85
  133. package/dist/chunk-KLDMLWXT.js.map +1 -0
  134. package/dist/chunk-KNKDMTHU.js +453 -0
  135. package/dist/chunk-KNKDMTHU.js.map +1 -0
  136. package/dist/chunk-LDA6TAYQ.js +95 -0
  137. package/dist/chunk-LDA6TAYQ.js.map +1 -0
  138. package/dist/chunk-LWSSIZOY.js +347 -0
  139. package/dist/chunk-LWSSIZOY.js.map +1 -0
  140. package/dist/{chunk-ZURZHELF.js → chunk-MAHNZA6C.js} +158 -41
  141. package/dist/chunk-MAHNZA6C.js.map +1 -0
  142. package/dist/chunk-MEWZCIA6.js +220 -0
  143. package/dist/chunk-MEWZCIA6.js.map +1 -0
  144. package/dist/{chunk-2SNUOHAT.js → chunk-MEZJ3I63.js} +49 -1
  145. package/dist/chunk-MEZJ3I63.js.map +1 -0
  146. package/dist/chunk-MJDO4EXD.js +353 -0
  147. package/dist/chunk-MJDO4EXD.js.map +1 -0
  148. package/dist/chunk-NJA6NT3A.js +6595 -0
  149. package/dist/chunk-NJA6NT3A.js.map +1 -0
  150. package/dist/{chunk-LHHMV4GU.js → chunk-NVSKJPRC.js} +1 -1
  151. package/dist/{chunk-LHHMV4GU.js.map → chunk-NVSKJPRC.js.map} +1 -1
  152. package/dist/{chunk-4YOZGGTZ.js → chunk-OC7K2DVZ.js} +5 -5
  153. package/dist/chunk-OC7K2DVZ.js.map +1 -0
  154. package/dist/chunk-ODRPASFP.js +2078 -0
  155. package/dist/chunk-ODRPASFP.js.map +1 -0
  156. package/dist/chunk-OJJFANO6.js +133 -0
  157. package/dist/chunk-OJJFANO6.js.map +1 -0
  158. package/dist/{chunk-JNJWBTU2.js → chunk-OQWPRFAC.js} +332 -882
  159. package/dist/chunk-OQWPRFAC.js.map +1 -0
  160. package/dist/chunk-P4I7BFNJ.js +11 -0
  161. package/dist/chunk-P4I7BFNJ.js.map +1 -0
  162. package/dist/{chunk-SNNSAGMT.js → chunk-P6YQWIT2.js} +4058 -4039
  163. package/dist/chunk-P6YQWIT2.js.map +1 -0
  164. package/dist/{chunk-JRGFKVAZ.js → chunk-PETQ5WEA.js} +2 -2
  165. package/dist/{chunk-HMWYAUA6.js → chunk-Q6RSJCXB.js} +29 -69
  166. package/dist/chunk-Q6RSJCXB.js.map +1 -0
  167. package/dist/{chunk-U3IKUGRP.js → chunk-QKEUKBRK.js} +17 -23
  168. package/dist/chunk-QKEUKBRK.js.map +1 -0
  169. package/dist/{chunk-2RWB7RKE.js → chunk-QKYUCITR.js} +174 -5814
  170. package/dist/chunk-QKYUCITR.js.map +1 -0
  171. package/dist/chunk-QQDPRTLP.js +127 -0
  172. package/dist/chunk-QQDPRTLP.js.map +1 -0
  173. package/dist/chunk-QQYCYAKI.js +79 -0
  174. package/dist/chunk-QQYCYAKI.js.map +1 -0
  175. package/dist/chunk-R4KDH477.js +1064 -0
  176. package/dist/chunk-R4KDH477.js.map +1 -0
  177. package/dist/chunk-R5TR2DIK.js +119 -0
  178. package/dist/chunk-R5TR2DIK.js.map +1 -0
  179. package/dist/chunk-R62PKTAG.js +66 -0
  180. package/dist/chunk-R62PKTAG.js.map +1 -0
  181. package/dist/{chunk-BFDQ4WNW.js → chunk-RFZA7PSM.js} +4 -5
  182. package/dist/chunk-RFZA7PSM.js.map +1 -0
  183. package/dist/chunk-RGCPELQN.js +219 -0
  184. package/dist/chunk-RGCPELQN.js.map +1 -0
  185. package/dist/chunk-RGVCOG2S.js +910 -0
  186. package/dist/chunk-RGVCOG2S.js.map +1 -0
  187. package/dist/chunk-SOLNJ3AZ.js +209 -0
  188. package/dist/chunk-SOLNJ3AZ.js.map +1 -0
  189. package/dist/chunk-TFT2X7SH.js +77 -0
  190. package/dist/chunk-TFT2X7SH.js.map +1 -0
  191. package/dist/chunk-TUCKEEXE.js +2 -0
  192. package/dist/chunk-TVWCLUBI.js +293 -0
  193. package/dist/chunk-TVWCLUBI.js.map +1 -0
  194. package/dist/chunk-U4TRWSVE.js +78 -0
  195. package/dist/chunk-U4TRWSVE.js.map +1 -0
  196. package/dist/chunk-UIB33QQP.js +379 -0
  197. package/dist/chunk-UIB33QQP.js.map +1 -0
  198. package/dist/chunk-V6GIVALQ.js +1889 -0
  199. package/dist/chunk-V6GIVALQ.js.map +1 -0
  200. package/dist/chunk-VHXCPXUS.js +366 -0
  201. package/dist/chunk-VHXCPXUS.js.map +1 -0
  202. package/dist/{chunk-HGZEPQUT.js → chunk-VU6GMWF6.js} +17 -8
  203. package/dist/chunk-VU6GMWF6.js.map +1 -0
  204. package/dist/chunk-VWZYE3NC.js +8415 -0
  205. package/dist/chunk-VWZYE3NC.js.map +1 -0
  206. package/dist/{chunk-AGMVASXZ.js → chunk-W2GXIARJ.js} +88 -11
  207. package/dist/chunk-W2GXIARJ.js.map +1 -0
  208. package/dist/chunk-W4G3K3V7.js +288 -0
  209. package/dist/chunk-W4G3K3V7.js.map +1 -0
  210. package/dist/chunk-W74LJ5OT.js +588 -0
  211. package/dist/chunk-W74LJ5OT.js.map +1 -0
  212. package/dist/chunk-W7ELYLYK.js +233 -0
  213. package/dist/chunk-W7ELYLYK.js.map +1 -0
  214. package/dist/{chunk-BPMWXTFX.js → chunk-WFZX352D.js} +7 -7
  215. package/dist/chunk-WXA3WTPF.js +20 -0
  216. package/dist/chunk-WXA3WTPF.js.map +1 -0
  217. package/dist/chunk-XRGFH7FI.js +454 -0
  218. package/dist/chunk-XRGFH7FI.js.map +1 -0
  219. package/dist/chunk-XSCGUO2U.js +330 -0
  220. package/dist/chunk-XSCGUO2U.js.map +1 -0
  221. package/dist/chunk-XWROSMI5.js +1039 -0
  222. package/dist/chunk-XWROSMI5.js.map +1 -0
  223. package/dist/chunk-Y2EXZ47H.js +40 -0
  224. package/dist/chunk-Y2EXZ47H.js.map +1 -0
  225. package/dist/chunk-YJGEVBKZ.js +47 -0
  226. package/dist/chunk-YJGEVBKZ.js.map +1 -0
  227. package/dist/{chunk-6CMM6YCB.js → chunk-YWWMISDY.js} +2 -2
  228. package/dist/{chunk-WXA2BWTE.js → chunk-ZCT5DJ3G.js} +2 -48
  229. package/dist/chunk-ZCT5DJ3G.js.map +1 -0
  230. package/dist/chunk-ZEYA2WWX.js +982 -0
  231. package/dist/chunk-ZEYA2WWX.js.map +1 -0
  232. package/dist/chunk-ZRC7Z5X3.js +82 -0
  233. package/dist/chunk-ZRC7Z5X3.js.map +1 -0
  234. package/dist/{chunk-3AIHRXKO.js → chunk-ZS7JIUJ3.js} +12 -10
  235. package/dist/chunk-ZS7JIUJ3.js.map +1 -0
  236. package/dist/{clack-EZ7TDWQU.js → clack-Q4RNC5VE.js} +2 -6
  237. package/dist/{claude-cli-2YKABJJZ.js → claude-cli-GIIHOBGT.js} +4 -2
  238. package/dist/claude-install-BAUSJMW3.js +64 -0
  239. package/dist/{cli-E36SPKBW.js → cli-QY4KKA3D.js} +632 -150
  240. package/dist/cli-QY4KKA3D.js.map +1 -0
  241. package/dist/client-3YQKORVK.js +710 -0
  242. package/dist/client-3YQKORVK.js.map +1 -0
  243. package/dist/{codex-event-ZO2GEFE6.js → codex-event-EUTCAOTQ.js} +3 -5
  244. package/dist/{codex-host-KECJVTA2.js → codex-host-ZON3S6HU.js} +7 -7
  245. package/dist/{codex-install-HQZDGFXW.js → codex-install-HZV2DOAB.js} +242 -88
  246. package/dist/codex-install-HZV2DOAB.js.map +1 -0
  247. package/dist/config-QZOBMTEL.js +57 -0
  248. package/dist/config-names-Z5NZD5R2.js +224 -0
  249. package/dist/config-names-Z5NZD5R2.js.map +1 -0
  250. package/dist/config-rules-YOYHS6YL.js +55 -0
  251. package/dist/config-subagents-WQV2ZAD5.js +362 -0
  252. package/dist/config-subagents-WQV2ZAD5.js.map +1 -0
  253. package/dist/connect-YDWTYU4B.js +1020 -0
  254. package/dist/connect-YDWTYU4B.js.map +1 -0
  255. package/dist/core-0a66n3e7-TTP554XV.js +127 -0
  256. package/dist/core-0a66n3e7-TTP554XV.js.map +1 -0
  257. package/dist/core-0bmnpbz2-C2JIRVZO.js +10790 -0
  258. package/dist/core-0bmnpbz2-C2JIRVZO.js.map +1 -0
  259. package/dist/core-9je8ee1j-74DGHWPV.js +30 -0
  260. package/dist/core-9je8ee1j-74DGHWPV.js.map +1 -0
  261. package/dist/core-wadgcjfh-TSZFQZGH.js +666 -0
  262. package/dist/core-wadgcjfh-TSZFQZGH.js.map +1 -0
  263. package/dist/core-zg882d22-LKV5DZYW.js +37 -0
  264. package/dist/core-zg882d22-LKV5DZYW.js.map +1 -0
  265. package/dist/decision-QSKHOGCO.js +145 -0
  266. package/dist/{doctor-I6XQEKWD.js → doctor-ZWJXRD75.js} +162 -148
  267. package/dist/doctor-ZWJXRD75.js.map +1 -0
  268. package/dist/{env-proxy-R6ZMLQTT.js → env-proxy-XLSLHBKQ.js} +2 -2
  269. package/dist/{ethersCompat-Df4a6QIZ-X6YZWAML.js → ethersCompat-Df4a6QIZ-K3DMHR6Y.js} +5 -5
  270. package/dist/explicit-ME2NRADQ.js +371 -0
  271. package/dist/explicit-ME2NRADQ.js.map +1 -0
  272. package/dist/flush-stdio-NYIJ3QXT.js +18 -0
  273. package/dist/fund-VF7TLDJH.js +722 -0
  274. package/dist/fund-VF7TLDJH.js.map +1 -0
  275. package/dist/hook-command-VZ27MGWO.js +49 -0
  276. package/dist/hosts/claude/.claude-plugin/marketplace.json +2 -2
  277. package/dist/hosts/claude/tenjin/.claude-plugin/plugin.json +2 -2
  278. package/dist/hosts/claude/tenjin/hooks/hook-data.ts +152 -0
  279. package/dist/hosts/claude/tenjin/hooks/hooks.json +7 -0
  280. package/dist/hosts/claude/tenjin/hooks/model-viewer.tsx +2987 -0
  281. package/dist/hosts/claude/tenjin/hooks/register.tsx +527 -56
  282. package/dist/hosts/claude/tenjin/skills/tenjin-pay/SKILL.md +14 -4
  283. package/dist/hosts/claude/tenjin/types/index.d.ts +144 -1
  284. package/dist/{hosts-DVQJ32QC.js → hosts-3EMTVM4H.js} +7 -6
  285. package/dist/index.js +18 -15
  286. package/dist/index.js.map +1 -1
  287. package/dist/install-ZA7L2UF3.js +115 -0
  288. package/dist/install-funding-JDGYTF72.js +30 -0
  289. package/dist/install-identity-FFAYEFLX.js +30 -0
  290. package/dist/{install-wallet-5M4OTYLX.js → install-wallet-2SFOVE3Q.js} +68 -53
  291. package/dist/install-wallet-2SFOVE3Q.js.map +1 -0
  292. package/dist/mcp-36S6MK3C.js +67642 -0
  293. package/dist/mcp-36S6MK3C.js.map +1 -0
  294. package/dist/new-install-5L4GY3LN.js +51 -0
  295. package/dist/{package-IJFGMWEV.js → package-BONDXSV3.js} +2 -2
  296. package/dist/{passphrase-IFTDS3CU.js → passphrase-T4ULBN4M.js} +16 -12
  297. package/dist/{paths-XCSAKISU.js → paths-O2KDWZ76.js} +18 -28
  298. package/dist/pay-CMV5KL74.js +74 -0
  299. package/dist/{payments-HFPPWHTV.js → payments-Z6UBZL4Z.js} +36 -26
  300. package/dist/payments-Z6UBZL4Z.js.map +1 -0
  301. package/dist/reclaim-subagent-credit-ABSF67SJ.js +105 -0
  302. package/dist/reclaim-subagent-credit-ABSF67SJ.js.map +1 -0
  303. package/dist/{redact-D7ASVWKL.js → redact-LOTHE5TS.js} +2 -8
  304. package/dist/redact-LOTHE5TS.js.map +1 -0
  305. package/dist/routing-quote-AHLAREXR.js +40 -0
  306. package/dist/routing-quote-AHLAREXR.js.map +1 -0
  307. package/dist/run-JH7ELYAM.js +88 -0
  308. package/dist/run-JH7ELYAM.js.map +1 -0
  309. package/dist/runtime-2GX4ALJP.js +410 -0
  310. package/dist/runtime-2GX4ALJP.js.map +1 -0
  311. package/dist/runtime-activate-IDQ2NCSP.js +39 -0
  312. package/dist/runtime-activate-IDQ2NCSP.js.map +1 -0
  313. package/dist/{runtime-fetch-ZSSSK72Y.js → runtime-fetch-6LOBHBEN.js} +4 -4
  314. package/dist/runtime-fetch-6LOBHBEN.js.map +1 -0
  315. package/dist/runtime-launchers-YAPKCBHV.js +31 -0
  316. package/dist/runtime-launchers-YAPKCBHV.js.map +1 -0
  317. package/dist/{runtime-layout-WIDILZ6K.js → runtime-layout-QHZQJV7C.js} +5 -4
  318. package/dist/runtime-layout-QHZQJV7C.js.map +1 -0
  319. package/dist/runtime-place-4POL4KK4.js +37 -0
  320. package/dist/runtime-place-4POL4KK4.js.map +1 -0
  321. package/dist/runtime-provenance-MNJGVBV2.js +12 -0
  322. package/dist/runtime-provenance-MNJGVBV2.js.map +1 -0
  323. package/dist/{secp256k1-ZZZT2CAX.js → secp256k1-N5P2GVGF.js} +3 -3
  324. package/dist/secp256k1-N5P2GVGF.js.map +1 -0
  325. package/dist/{send-GCVEAQKL.js → send-ELXFKEKY.js} +35 -32
  326. package/dist/send-ELXFKEKY.js.map +1 -0
  327. package/dist/status-FXUFWJDM.js +404 -0
  328. package/dist/status-FXUFWJDM.js.map +1 -0
  329. package/dist/{status-line-OPCXDHL2.js → status-line-IH5JBWBC.js} +51 -43
  330. package/dist/status-line-IH5JBWBC.js.map +1 -0
  331. package/dist/streamableHttp-CP2ZQBIK.js +768 -0
  332. package/dist/streamableHttp-CP2ZQBIK.js.map +1 -0
  333. package/dist/{uninstall-BAWRBXXQ.js → uninstall-LJZUKM4D.js} +76 -76
  334. package/dist/uninstall-LJZUKM4D.js.map +1 -0
  335. package/dist/update-EUIX72IX.js +68 -0
  336. package/dist/update-EUIX72IX.js.map +1 -0
  337. package/dist/usage-EKDC7LUC.js +180 -0
  338. package/dist/usage-EKDC7LUC.js.map +1 -0
  339. package/dist/{usdc-VG4CIOUK.js → usdc-YIHK2OMC.js} +8 -12
  340. package/dist/usdc-YIHK2OMC.js.map +1 -0
  341. package/dist/{viemAdapter-By13KInL-DOFTEIJV.js → viemAdapter-By13KInL-PRLSIESK.js} +5 -5
  342. package/dist/viemAdapter-By13KInL-PRLSIESK.js.map +1 -0
  343. package/dist/wallet-HSW757W6.js +80 -0
  344. package/dist/wallet-HSW757W6.js.map +1 -0
  345. package/dist/wallet-kdf-worker.mjs +1433 -818
  346. package/docs/agent-permissions.md +88 -155
  347. package/docs/router-reference.md +236 -0
  348. package/docs/safety-model.md +31 -33
  349. package/docs/subagents-internals.md +97 -0
  350. package/docs/subagents.md +348 -0
  351. package/docs/troubleshooting.md +10 -6
  352. package/package.json +12 -8
  353. package/scripts/installers/install.sh +7 -1
  354. package/dist/alive-GSOWKUOY.js +0 -38
  355. package/dist/chunk-2I4QTOLB.js.map +0 -1
  356. package/dist/chunk-2M2VPI2E.js +0 -560
  357. package/dist/chunk-2M2VPI2E.js.map +0 -1
  358. package/dist/chunk-2RWB7RKE.js.map +0 -1
  359. package/dist/chunk-2SNUOHAT.js.map +0 -1
  360. package/dist/chunk-3623BLPV.js +0 -184
  361. package/dist/chunk-3623BLPV.js.map +0 -1
  362. package/dist/chunk-36RVGZNY.js.map +0 -1
  363. package/dist/chunk-3AIHRXKO.js.map +0 -1
  364. package/dist/chunk-3FMZGI7I.js.map +0 -1
  365. package/dist/chunk-3UCIG4TG.js.map +0 -1
  366. package/dist/chunk-4K7TQHNP.js.map +0 -1
  367. package/dist/chunk-4LMUQMBH.js +0 -29
  368. package/dist/chunk-4LMUQMBH.js.map +0 -1
  369. package/dist/chunk-4USCZ2NI.js +0 -228
  370. package/dist/chunk-4USCZ2NI.js.map +0 -1
  371. package/dist/chunk-4YOZGGTZ.js.map +0 -1
  372. package/dist/chunk-62KNUYWD.js +0 -111
  373. package/dist/chunk-62KNUYWD.js.map +0 -1
  374. package/dist/chunk-A5GKIG5O.js +0 -2037
  375. package/dist/chunk-A5GKIG5O.js.map +0 -1
  376. package/dist/chunk-AGMVASXZ.js.map +0 -1
  377. package/dist/chunk-BF4XHEQK.js.map +0 -1
  378. package/dist/chunk-BFDQ4WNW.js.map +0 -1
  379. package/dist/chunk-C2Q76BVM.js.map +0 -1
  380. package/dist/chunk-CEXSOI5R.js +0 -808
  381. package/dist/chunk-CEXSOI5R.js.map +0 -1
  382. package/dist/chunk-E7SW44LM.js.map +0 -1
  383. package/dist/chunk-EDJWHDDL.js +0 -33
  384. package/dist/chunk-EDJWHDDL.js.map +0 -1
  385. package/dist/chunk-FVIGCDSV.js.map +0 -1
  386. package/dist/chunk-GTTUCOPD.js +0 -105
  387. package/dist/chunk-GTTUCOPD.js.map +0 -1
  388. package/dist/chunk-HDPUXS3Z.js +0 -122
  389. package/dist/chunk-HDPUXS3Z.js.map +0 -1
  390. package/dist/chunk-HGGWCP7W.js +0 -120
  391. package/dist/chunk-HGGWCP7W.js.map +0 -1
  392. package/dist/chunk-HGZEPQUT.js.map +0 -1
  393. package/dist/chunk-HMWYAUA6.js.map +0 -1
  394. package/dist/chunk-IADZOXKN.js.map +0 -1
  395. package/dist/chunk-ILNIZ5I2.js.map +0 -1
  396. package/dist/chunk-INTFHMU4.js.map +0 -1
  397. package/dist/chunk-JKKAIPTU.js.map +0 -1
  398. package/dist/chunk-JNJWBTU2.js.map +0 -1
  399. package/dist/chunk-KM7RY2ZS.js +0 -246
  400. package/dist/chunk-KM7RY2ZS.js.map +0 -1
  401. package/dist/chunk-KOGZDMHO.js +0 -21
  402. package/dist/chunk-KOGZDMHO.js.map +0 -1
  403. package/dist/chunk-L6JEXB3E.js.map +0 -1
  404. package/dist/chunk-LRW6S53P.js.map +0 -1
  405. package/dist/chunk-LXAYUOXI.js +0 -511
  406. package/dist/chunk-LXAYUOXI.js.map +0 -1
  407. package/dist/chunk-MEFB5KHA.js +0 -59
  408. package/dist/chunk-MEFB5KHA.js.map +0 -1
  409. package/dist/chunk-MPZUYCAP.js.map +0 -1
  410. package/dist/chunk-NDGZDTSJ.js.map +0 -1
  411. package/dist/chunk-OJNTCYQQ.js.map +0 -1
  412. package/dist/chunk-P3LFTKE7.js +0 -58
  413. package/dist/chunk-P3LFTKE7.js.map +0 -1
  414. package/dist/chunk-QXP3Z3JN.js.map +0 -1
  415. package/dist/chunk-RVPYTUP4.js.map +0 -1
  416. package/dist/chunk-SNNSAGMT.js.map +0 -1
  417. package/dist/chunk-TC2WZLSC.js.map +0 -1
  418. package/dist/chunk-TKPF35W6.js +0 -29
  419. package/dist/chunk-TKPF35W6.js.map +0 -1
  420. package/dist/chunk-U3IKUGRP.js.map +0 -1
  421. package/dist/chunk-UUGOUOVT.js.map +0 -1
  422. package/dist/chunk-UXZONNEQ.js.map +0 -1
  423. package/dist/chunk-WXA2BWTE.js.map +0 -1
  424. package/dist/chunk-WYXUQGOL.js.map +0 -1
  425. package/dist/chunk-X5ZBP3IY.js.map +0 -1
  426. package/dist/chunk-XKESD27X.js +0 -10
  427. package/dist/chunk-XKESD27X.js.map +0 -1
  428. package/dist/chunk-XQJXNMSB.js.map +0 -1
  429. package/dist/chunk-Y527D4TV.js +0 -56
  430. package/dist/chunk-Y527D4TV.js.map +0 -1
  431. package/dist/chunk-ZDZERB6L.js.map +0 -1
  432. package/dist/chunk-ZNNXRNFD.js.map +0 -1
  433. package/dist/chunk-ZURZHELF.js.map +0 -1
  434. package/dist/cli-E36SPKBW.js.map +0 -1
  435. package/dist/codex-install-HQZDGFXW.js.map +0 -1
  436. package/dist/config-HY2E4GGW.js +0 -55
  437. package/dist/doctor-I6XQEKWD.js.map +0 -1
  438. package/dist/fund-2QRO7OJL.js +0 -378
  439. package/dist/fund-2QRO7OJL.js.map +0 -1
  440. package/dist/hook-command-2UBCSZG6.js +0 -43
  441. package/dist/install-ILUX5C4A.js +0 -107
  442. package/dist/install-identity-TZKGY6LQ.js +0 -31
  443. package/dist/install-wallet-5M4OTYLX.js.map +0 -1
  444. package/dist/mcp-LE4DUS22.js +0 -14127
  445. package/dist/mcp-LE4DUS22.js.map +0 -1
  446. package/dist/pay-WCG3IH4R.js +0 -55
  447. package/dist/payments-HFPPWHTV.js.map +0 -1
  448. package/dist/plugin-registration-PZFI5GZW.js +0 -68
  449. package/dist/runtime-UZOKSUZX.js +0 -1321
  450. package/dist/runtime-UZOKSUZX.js.map +0 -1
  451. package/dist/send-GCVEAQKL.js.map +0 -1
  452. package/dist/status-HCVAOCN7.js +0 -150
  453. package/dist/status-HCVAOCN7.js.map +0 -1
  454. package/dist/status-line-OPCXDHL2.js.map +0 -1
  455. package/dist/uninstall-BAWRBXXQ.js.map +0 -1
  456. package/dist/update-CACXLQLR.js +0 -56
  457. package/dist/wallet-QL4UUXEZ.js +0 -55
  458. /package/dist/{_esm-BIN7VY2L.js.map → _esm-2KST7HQ7.js.map} +0 -0
  459. /package/dist/{alive-GSOWKUOY.js.map → alive-5TV22PNF.js.map} +0 -0
  460. /package/dist/{auto-update-Y24UL56V.js.map → auth-XI7BJFLW.js.map} +0 -0
  461. /package/dist/{ccip-DHDFKTQV.js.map → auto-update-7L24KDWA.js.map} +0 -0
  462. /package/dist/{clack-EZ7TDWQU.js.map → balance-DFHC6XEU.js.map} +0 -0
  463. /package/dist/{claude-cli-2YKABJJZ.js.map → ccip-HOW3DZYF.js.map} +0 -0
  464. /package/dist/{chunk-IE7P2BZE.js.map → chunk-6QMDUDF2.js.map} +0 -0
  465. /package/dist/{chunk-KG3D7FIF.js.map → chunk-CZJOMUBP.js.map} +0 -0
  466. /package/dist/{chunk-3GNJXKIT.js.map → chunk-F43CV6UC.js.map} +0 -0
  467. /package/dist/{chunk-J57UC3DD.js.map → chunk-FKVJKLPI.js.map} +0 -0
  468. /package/dist/{chunk-SO3XRZPX.js.map → chunk-HPRVFJPM.js.map} +0 -0
  469. /package/dist/{chunk-2GP3HRYK.js.map → chunk-INSIW65E.js.map} +0 -0
  470. /package/dist/{chunk-RL5UUDT4.js.map → chunk-JNUKLSMZ.js.map} +0 -0
  471. /package/dist/{chunk-JRGFKVAZ.js.map → chunk-PETQ5WEA.js.map} +0 -0
  472. /package/dist/{codex-event-ZO2GEFE6.js.map → chunk-TUCKEEXE.js.map} +0 -0
  473. /package/dist/{chunk-BPMWXTFX.js.map → chunk-WFZX352D.js.map} +0 -0
  474. /package/dist/{chunk-6CMM6YCB.js.map → chunk-YWWMISDY.js.map} +0 -0
  475. /package/dist/{codex-host-KECJVTA2.js.map → clack-Q4RNC5VE.js.map} +0 -0
  476. /package/dist/{config-HY2E4GGW.js.map → claude-cli-GIIHOBGT.js.map} +0 -0
  477. /package/dist/{env-proxy-R6ZMLQTT.js.map → claude-install-BAUSJMW3.js.map} +0 -0
  478. /package/dist/{ethersCompat-Df4a6QIZ-X6YZWAML.js.map → codex-event-EUTCAOTQ.js.map} +0 -0
  479. /package/dist/{hook-command-2UBCSZG6.js.map → codex-host-ZON3S6HU.js.map} +0 -0
  480. /package/dist/{hosts-DVQJ32QC.js.map → config-QZOBMTEL.js.map} +0 -0
  481. /package/dist/{install-ILUX5C4A.js.map → config-rules-YOYHS6YL.js.map} +0 -0
  482. /package/dist/{install-identity-TZKGY6LQ.js.map → decision-QSKHOGCO.js.map} +0 -0
  483. /package/dist/{package-IJFGMWEV.js.map → env-proxy-XLSLHBKQ.js.map} +0 -0
  484. /package/dist/{passphrase-IFTDS3CU.js.map → ethersCompat-Df4a6QIZ-K3DMHR6Y.js.map} +0 -0
  485. /package/dist/{paths-XCSAKISU.js.map → flush-stdio-NYIJ3QXT.js.map} +0 -0
  486. /package/dist/{pay-WCG3IH4R.js.map → hook-command-VZ27MGWO.js.map} +0 -0
  487. /package/dist/{plugin-registration-PZFI5GZW.js.map → hosts-3EMTVM4H.js.map} +0 -0
  488. /package/dist/{redact-D7ASVWKL.js.map → install-ZA7L2UF3.js.map} +0 -0
  489. /package/dist/{runtime-fetch-ZSSSK72Y.js.map → install-funding-JDGYTF72.js.map} +0 -0
  490. /package/dist/{runtime-layout-WIDILZ6K.js.map → install-identity-FFAYEFLX.js.map} +0 -0
  491. /package/dist/{secp256k1-ZZZT2CAX.js.map → new-install-5L4GY3LN.js.map} +0 -0
  492. /package/dist/{update-CACXLQLR.js.map → package-BONDXSV3.js.map} +0 -0
  493. /package/dist/{usdc-VG4CIOUK.js.map → passphrase-T4ULBN4M.js.map} +0 -0
  494. /package/dist/{viemAdapter-By13KInL-DOFTEIJV.js.map → paths-O2KDWZ76.js.map} +0 -0
  495. /package/dist/{wallet-QL4UUXEZ.js.map → pay-CMV5KL74.js.map} +0 -0
@@ -0,0 +1,666 @@
1
+ import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
+ import {
3
+ Kt,
4
+ e
5
+ } from "./chunk-JDQZCREI.js";
6
+ import {
7
+ qe
8
+ } from "./chunk-2L7TDGLV.js";
9
+ import "./chunk-W4G3K3V7.js";
10
+ import {
11
+ Le
12
+ } from "./chunk-BGA4DO5M.js";
13
+ import {
14
+ $e,
15
+ En,
16
+ Ie,
17
+ Mt,
18
+ N,
19
+ Sn,
20
+ U,
21
+ Ve,
22
+ _e,
23
+ c,
24
+ ct,
25
+ dt,
26
+ f,
27
+ i,
28
+ m,
29
+ n,
30
+ o,
31
+ oe,
32
+ pt,
33
+ re,
34
+ rt,
35
+ s,
36
+ se,
37
+ ut,
38
+ v,
39
+ ye
40
+ } from "./chunk-VWZYE3NC.js";
41
+ import {
42
+ _enum,
43
+ _null,
44
+ _undefined,
45
+ array,
46
+ boolean,
47
+ discriminatedUnion,
48
+ iso_exports,
49
+ literal,
50
+ looseObject,
51
+ object,
52
+ string,
53
+ unknown
54
+ } from "./chunk-P6YQWIT2.js";
55
+ import "./chunk-ZXTAQYNA.js";
56
+
57
+ // node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.3.325_@anthropic-ai+sdk@0.137.0_zod@4.6.7__@modelconte_6201ba81a17d8b6bc4087a6afdf0345f/node_modules/@anthropic-ai/claude-agent-sdk/core-wadgcjfh.mjs
58
+ import { randomUUID as pe } from "crypto";
59
+ import { constants as ne } from "fs";
60
+ import { open as Fn, readdir as ae, rm as Nn, stat as Tn } from "fs/promises";
61
+ import { join as b } from "path";
62
+ import { mkdir as On } from "fs/promises";
63
+ import { dirname as xn } from "path";
64
+ import { dirname as Cn, join as _n } from "path";
65
+ import { basename as z, dirname as J } from "path";
66
+ import { isAbsolute as An, sep as Z } from "path";
67
+ if (typeof Symbol.dispose !== "symbol") {
68
+ try {
69
+ Symbol.dispose = /* @__PURE__ */ Symbol.for("Symbol.dispose");
70
+ } catch {
71
+ }
72
+ }
73
+ if (typeof Symbol.asyncDispose !== "symbol") {
74
+ try {
75
+ Symbol.asyncDispose = /* @__PURE__ */ Symbol.for("Symbol.asyncDispose");
76
+ } catch {
77
+ }
78
+ }
79
+ var x = class {
80
+ available = void 0;
81
+ probing = void 0;
82
+ procUnreadableLogged = false;
83
+ };
84
+ var Ot = new i(() => new x());
85
+ function Ee(t) {
86
+ return s(t, "expected a segment that is not empty or made only of dots and spaces, with no path separator, NUL or set-aside shape");
87
+ }
88
+ function P(t) {
89
+ if (typeof t !== "object" || t === null) return s("key", "expected a key object");
90
+ let r = Ne(t);
91
+ if (r !== void 0) return r;
92
+ let a = Pn(t);
93
+ if (a === void 0) return s("key", `${t.namespace} is not a storage namespace`);
94
+ return ke("key", a);
95
+ }
96
+ function ke(t, r) {
97
+ for (let [a, u, d] of r) {
98
+ let l = `${t}.${a}`;
99
+ if (u === void 0) {
100
+ if (d !== "optional") return s(l, "required");
101
+ } else if (je(a)) {
102
+ if (!(t === "scope" && a === "agentRelPath" && Array.isArray(u) && u.length === 0) && (!Array.isArray(u) || !Mt(u))) return s(l, "expected a non-empty array of segments, none empty or made only of dots and spaces, with no path separator, NUL or set-aside shape");
103
+ } else if (typeof u !== "string" || !re(u)) return Ee(l);
104
+ }
105
+ return;
106
+ }
107
+ function je(t) {
108
+ return t === "relPath" || t === "agentRelPath";
109
+ }
110
+ var K = ["commands", "agents", "output-styles", "skills", "workflows", "routines", "themes", "rules", "session-env", "uploads", "mcp-skill-archives", "usage-data", "mcp-discovery-cache"];
111
+ var we = new Set(K);
112
+ var Re = `must be one of the userConfigDir directory names (${K.join(", ")})`;
113
+ var F = ["installed", "marketplaces", "flagged", "catalog", "inUseSweep"];
114
+ var Pe = new Set(F);
115
+ var ve = `must be one of the pluginRegistry files (${F.join(", ")})`;
116
+ var T = ["manifest", "catalog"];
117
+ var Ce = new Set(T);
118
+ var Oe = `must be one of the marketplaceCache forms (${T.join(", ")})`;
119
+ var M = ["world"];
120
+ var xe = new Set(M);
121
+ var Ae = `must be one of the session journal names (${M.join(", ")})`;
122
+ function Ke(t) {
123
+ return xe.has(t);
124
+ }
125
+ function Fe(t) {
126
+ return typeof t === "string" && /^[0-9a-f]{64}$/.test(t);
127
+ }
128
+ function Ne(t) {
129
+ if (t.namespace === "transcript") return Ue(t);
130
+ if (t.namespace === "pluginAssetCache" && !Fe(t.digest)) return s("key.digest", "must be a SHA-256 digest: 64 lowercase hexadecimal characters");
131
+ if (t.namespace === "globalConfig" && "kind" in t) {
132
+ if (!Ge(t.kind)) return s("key.kind", He);
133
+ if (typeof t.stamp !== "string") return s("key.stamp", "a recovery copy key carries its stamp");
134
+ }
135
+ if (t.namespace === "task") return pn(t);
136
+ if (t.namespace === "sidecar") {
137
+ let r = R("key.sessionId", t.sessionId);
138
+ if (r !== void 0) return r;
139
+ if (Y(t.relPath)) return s("key.relPath", C);
140
+ return Je(t.relPath) ? s("key.relPath", ze) : void 0;
141
+ }
142
+ if (t.namespace === "recording") return R("key.sessionId", t.sessionId) ?? (G(t.stamp) ? void 0 : s("key.stamp", We));
143
+ if (t.namespace === "jobsRoot") return mn(t);
144
+ if (t.namespace === "userConfigDir" && !we.has(t.dir)) return s("key.dir", Re);
145
+ if (t.namespace === "fileHistory") return Te(t);
146
+ if (t.namespace === "settings" && !un(t.layer)) return s("key.layer", "must be user, project or local");
147
+ if (t.namespace === "log") return fn(t);
148
+ if (t.namespace === "job" && hn(t.relPath)) return s("key.relPath", gn);
149
+ if (t.namespace === "sessionLog") return wn("key", t) ?? (jn(t.logName) ? void 0 : s("key.logName", "must be the session-log stem <sessionId8>[-<title-slug>]: up to eight word characters, then lower-case a-z / 0-9 runs joined by single hyphens; not a bare device name"));
150
+ if (t.namespace === "pluginRegistry" && !Pe.has(t.file)) return s("key.file", ve);
151
+ if (t.namespace === "marketplaceCache") {
152
+ if (!("relPath" in t)) return Ce.has(t.form) ? void 0 : s("key.form", Oe);
153
+ return t.form === void 0 ? void 0 : s("key.form", "a tree file key carries relPath, not form");
154
+ }
155
+ if (t.namespace !== "agentMemory") return;
156
+ if (!Me(t.layer)) return s("key.layer", "must be user, project or local");
157
+ if (t.layer === "user" && "projectKey" in t) return s("key.projectKey", "the user layer is not keyed by project");
158
+ if (t.layer !== "user" && typeof t.projectKey !== "string") return s("key.projectKey", "required for the project and local layers");
159
+ return typeof t.agentType === "string" ? void 0 : s("key.agentType", "an agent memory key names its agent");
160
+ }
161
+ function Te(t) {
162
+ return typeof t.backupFileName !== "string" || !En.test(t.backupFileName) ? s("key.backupFileName", "must be a backup file name the engine has ever written (hex hash @v version)") : void 0;
163
+ }
164
+ function Me(t) {
165
+ return t === "user" || t === "project" || t === "local";
166
+ }
167
+ var D = ["backup", "corrupted"];
168
+ var De = new Set(D);
169
+ var He = `must be one of the global-config copy kinds (${D.join(", ")})`;
170
+ function Ge(t) {
171
+ return De.has(t);
172
+ }
173
+ function Ue(t) {
174
+ let r = R("key.sessionId", t.sessionId);
175
+ if (r !== void 0) return r;
176
+ if (Y(t.agentRelPath)) return s("key.agentRelPath", C);
177
+ if ("sessionJournal" in t) {
178
+ if (typeof t.sessionJournal !== "string" || !Ke(t.sessionJournal)) return s("key.sessionJournal", Ae);
179
+ return t.agentId === void 0 && t.agentRelPath === void 0 && !("journal" in t) ? void 0 : s("key.sessionJournal", "a session journal key names the session's own journal: no agentId, agentRelPath or run journal");
180
+ }
181
+ if ("journal" in t) {
182
+ if (t.journal !== true) return s("key.journal", "must be true");
183
+ if (!Array.isArray(t.agentRelPath)) return s("key.agentRelPath", "a run journal key carries its run directory");
184
+ return t.agentId === void 0 ? void 0 : s("key.agentId", "a transcript key names an agent transcript or the run journal, never both");
185
+ }
186
+ return t.agentRelPath !== void 0 && t.agentId === void 0 ? s("key.agentRelPath", "requires agentId or journal") : void 0;
187
+ }
188
+ var Be = "cloud-snapshots";
189
+ var H = /* @__PURE__ */ new Set(["memory", "tiny_memory", "bagel", Be, "connector-downloads", "bridge-pointer.json", ".session-aliases"]);
190
+ var Ye = /^[0-9]{1,16}$/;
191
+ var We = "must be the recording stamp: 1 to 16 decimal digits (epoch milliseconds)";
192
+ var I = ".cast";
193
+ var ze = `<stamp>${I} inside a session's folder is that session's terminal recording stream: address it as keys.recording(projectKey, sessionId, stamp)`;
194
+ function G(t) {
195
+ return typeof t === "string" && Ye.test(t);
196
+ }
197
+ function Je(t) {
198
+ return Array.isArray(t) && typeof t[0] === "string" && oe(t[0]).some((r) => Xe(r) !== void 0);
199
+ }
200
+ function Xe(t) {
201
+ if (!t.endsWith(I)) return;
202
+ let r = t.slice(0, -I.length);
203
+ return G(r) ? r : void 0;
204
+ }
205
+ var V = [".ccr-tip.json", ".precompact.json", I];
206
+ var Ze = `must not end with ${V.join(", ")}: those name a session's project-level sibling files`;
207
+ function Qe(t) {
208
+ return oe(t).some((r) => V.some((a) => r.endsWith(a)));
209
+ }
210
+ var B = ".dir-sync.json";
211
+ var en = `must not end with ${B}: that name is reserved for a cloud session's record at the project level`;
212
+ function nn(t) {
213
+ return oe(t).some((r) => r.endsWith(B));
214
+ }
215
+ var tn = `${[...H].join(", ")} are reserved: they name project-level entries, not sessions`;
216
+ function rn(t) {
217
+ return oe(t).some((r) => H.has(r));
218
+ }
219
+ function R(t, r) {
220
+ if (typeof r !== "string") return;
221
+ if (rn(r)) return s(t, tn);
222
+ if (Qe(r)) return s(t, Ze);
223
+ if (nn(r)) return s(t, en);
224
+ return $e(r) ? s(t, C) : void 0;
225
+ }
226
+ var on = ".meta.json";
227
+ var sn = ".meta is reserved for the list metadata key, under every spelling that opens its file";
228
+ function an(t) {
229
+ return cn(`${t}.json`);
230
+ }
231
+ function cn(t) {
232
+ return oe(t).includes(on);
233
+ }
234
+ var C = "names a .jsonl stream, which only a transcript key addresses";
235
+ function Y(t) {
236
+ return Array.isArray(t) && t.some((r) => typeof r === "string" && $e(r));
237
+ }
238
+ function un(t) {
239
+ return t === "user" || t === "project" || t === "local";
240
+ }
241
+ var dn = "must be debug, telemetry or apiDump";
242
+ function ln(t) {
243
+ return t === "debug" || t === "telemetry" || t === "apiDump";
244
+ }
245
+ function fn(t) {
246
+ if (!ln(t.channel)) return s("key.channel", dn);
247
+ if (t.channel !== "apiDump") return;
248
+ for (let r of ["agentId", "runId"]) if (r in t && t[r] !== void 0) return s(`key.${r}`, "an apiDump key names its dump by one id \u2014 the agent's for a subagent's requests, else the session's (today's dump-prompts/<id>.jsonl); agentId and runId nest nothing on this channel");
249
+ return;
250
+ }
251
+ function pn(t) {
252
+ if ("taskId" in t && ("meta" in t || "highWaterMark" in t)) return s("key.taskId", "a task key names an item, the list metadata or the list high-water mark, never more than one");
253
+ if ("meta" in t && "highWaterMark" in t) return s("key.highWaterMark", "a task key names an item, the list metadata or the list high-water mark, never more than one");
254
+ if ("meta" in t && t.meta !== true) return s("key.meta", "must be true");
255
+ if ("highWaterMark" in t && t.highWaterMark !== true) return s("key.highWaterMark", "must be true");
256
+ if (typeof t.listId !== "string") return s("key.listId", "a task key carries its listId");
257
+ if ("meta" in t || "highWaterMark" in t) return;
258
+ if (typeof t.taskId !== "string") return s("key.taskId", "a task item key carries its taskId");
259
+ if (an(t.taskId)) return s("key.taskId", sn);
260
+ return;
261
+ }
262
+ function mn(t) {
263
+ if ("file" in t && "draftKey" in t) return s("key.draftKey", "a jobs-root key names the pins file or one draft, never both");
264
+ if ("file" in t) return t.file === "pins" ? void 0 : s("key.file", "must be pins");
265
+ if (typeof t.draftKey !== "string") return s("key.draftKey", "a jobs-root draft key carries its draftKey");
266
+ return Rn.test(t.draftKey) ? void 0 : s("key.draftKey", "must be 8 lowercase hex characters");
267
+ }
268
+ var W = "timeline.jsonl";
269
+ var gn = `${W} is the job's timeline stream: address it as keys.jobTimeline(jobId)`;
270
+ function hn(t) {
271
+ return Array.isArray(t) && typeof t[0] === "string" && oe(t[0]).includes(W);
272
+ }
273
+ var yn = /^\d{4}$/;
274
+ var A = /^\d{2}$/;
275
+ var bn = /^[A-Za-z0-9_-]{1,8}(?:-[a-z0-9]+)*$/;
276
+ var In = 128;
277
+ var kn = /^(?:con|prn|aux|nul|com\d|lpt\d)$/i;
278
+ function jn(t) {
279
+ return typeof t === "string" && t.length <= In && bn.test(t) && !kn.test(t);
280
+ }
281
+ function wn(t, r) {
282
+ if (r.year !== void 0 && !w(yn, r.year)) return s(`${t}.year`, "must be four digits (YYYY)");
283
+ if (r.month !== void 0 && !w(A, r.month)) return s(`${t}.month`, "must be two digits (MM)");
284
+ if (r.day !== void 0 && !w(A, r.day)) return s(`${t}.day`, "must be two digits (DD)");
285
+ return;
286
+ }
287
+ function w(t, r) {
288
+ return typeof r === "string" && t.test(r);
289
+ }
290
+ var Rn = /^[0-9a-f]{8}$/;
291
+ function Pn(t) {
292
+ switch (t.namespace) {
293
+ case "transcript":
294
+ return [["projectKey", t.projectKey], ["sessionId", t.sessionId], ["agentId", t.agentId, "optional"], ["agentRelPath", t.agentRelPath, "optional"]];
295
+ case "history":
296
+ case "identity":
297
+ return [];
298
+ case "globalConfig":
299
+ return "kind" in t ? [["stamp", t.stamp]] : [];
300
+ case "settings":
301
+ return t.layer === "user" ? [] : t.layer === "project" ? [["projectKey", t.projectKey]] : [["consentRootKey", t.consentRootKey]];
302
+ case "task":
303
+ return "taskId" in t ? [["listId", t.listId], ["taskId", t.taskId]] : [["listId", t.listId]];
304
+ case "memory":
305
+ return [["projectKey", t.projectKey], ["relPath", t.relPath]];
306
+ case "pluginRegistry":
307
+ return [];
308
+ case "marketplaceCache":
309
+ return "relPath" in t ? [["marketplace", t.marketplace], ["relPath", t.relPath]] : [["marketplace", t.marketplace]];
310
+ case "pluginCache":
311
+ return [["marketplace", t.marketplace], ["plugin", t.plugin], ["version", t.version], ["relPath", t.relPath]];
312
+ case "cache":
313
+ return [["store", t.store], ["id", t.id]];
314
+ case "paste":
315
+ return [["id", t.id]];
316
+ case "pluginAssetCache":
317
+ return [["digest", t.digest]];
318
+ case "state":
319
+ return [["id", t.id]];
320
+ case "plan":
321
+ return [["name", t.name]];
322
+ case "feedbackDraft":
323
+ return [["draftId", t.draftId]];
324
+ case "agentMemory":
325
+ return [...t.layer === "user" ? [] : [["projectKey", t.projectKey]], ["agentType", t.agentType], ["relPath", t.relPath]];
326
+ case "team":
327
+ return [["team", t.team]];
328
+ case "sidecar":
329
+ return [["projectKey", t.projectKey], ["sessionId", t.sessionId], ["relPath", t.relPath]];
330
+ case "scratch":
331
+ return [["sessionId", t.sessionId], ["relPath", t.relPath]];
332
+ case "userConfigDir":
333
+ return [["relPath", t.relPath]];
334
+ case "fileHistory":
335
+ return [["sessionId", t.sessionId], ["backupFileName", t.backupFileName]];
336
+ case "job":
337
+ return [["jobId", t.jobId], ["relPath", t.relPath]];
338
+ case "daemon":
339
+ return [["relPath", t.relPath]];
340
+ case "jobsRoot":
341
+ return "file" in t ? [] : [["draftKey", t.draftKey]];
342
+ case "session":
343
+ return [["file", t.file]];
344
+ case "bridgePointer":
345
+ case "sessionAliases":
346
+ return [["projectKey", t.projectKey]];
347
+ case "dirSyncRecord":
348
+ return [["projectKey", t.projectKey], ["sessionId", t.sessionId]];
349
+ case "mailbox":
350
+ return [["team", t.team], ["teammate", t.teammate]];
351
+ case "log":
352
+ return [["sessionId", t.sessionId], ["agentId", t.agentId, "optional"], ["runId", t.runId, "optional"]];
353
+ case "jobTimeline":
354
+ return [["jobId", t.jobId]];
355
+ case "recording":
356
+ return [["projectKey", t.projectKey], ["sessionId", t.sessionId], ["stamp", t.stamp]];
357
+ case "sessionLog":
358
+ return [["projectKey", t.projectKey], ["year", t.year], ["month", t.month], ["day", t.day], ["logName", t.logName]];
359
+ }
360
+ return;
361
+ }
362
+ var vn = 6;
363
+ function _(t) {
364
+ let r = z(t);
365
+ if ($e(r)) return;
366
+ let a = v(), u = [r], d = J(t);
367
+ while (d !== a && u.length <= vn + 1) {
368
+ let S = J(d);
369
+ if (S === d) return;
370
+ u.unshift(z(d)), d = S;
371
+ }
372
+ if (d !== a || u.length < 3) return;
373
+ let [l, g, ...h] = u;
374
+ if (!re(l) || !re(g) || h.length === 0 || !h.every(re)) return;
375
+ let y = N.sidecar(l, g, h);
376
+ return P(y) === void 0 ? y : void 0;
377
+ }
378
+ var yr = e(() => object({ archived: boolean(), at: iso_exports.datetime({ offset: true }) }));
379
+ function q(t, r) {
380
+ return _n(Cn(t), r, "archived.json");
381
+ }
382
+ var Ln = ["human", "sdk", "unknown"];
383
+ var Sr = e(() => {
384
+ let t = object({ kind: string() }).optional(), r = literal(false).optional();
385
+ return discriminatedUnion("type", [object({ type: literal("user"), timestamp: string(), message: object({ content: unknown() }), origin: t, promptSource: string().optional(), persist: _undefined().optional(), turnOrigin: _enum(Ln).optional(), toolUseResult: _null().optional(), isCompactSummary: r, isSidechain: r, isVirtual: r, isVisibleInTranscriptOnly: r, isMeta: r, textNotTyped: r, handedOff: r, queueSkipAttachments: r, wakeupSource: _undefined().optional(), scheduledTaskId: _undefined().optional() }), object({ type: literal("attachment"), timestamp: string(), isSidechain: r, attachment: object({ type: literal("queued_command"), prompt: unknown(), origin: t, commandMode: _enum(["prompt", "bash"]).optional(), isMeta: r }) })]);
386
+ });
387
+ var br = e(() => array(looseObject({ type: string() })));
388
+ async function X(t, r, a, u) {
389
+ let d = q(t, r), l = o({ archived: a.archived, at: (/* @__PURE__ */ new Date()).toISOString(), by: a.by });
390
+ if (f() && u !== void 0) {
391
+ let g = _(d);
392
+ if (g !== void 0) {
393
+ let h = await u.write(g, l, { mode: 384 });
394
+ if (!h.ok) throw Error("Session archive: record not writable via storage", { cause: h.error });
395
+ return;
396
+ }
397
+ }
398
+ if (m()) throw Error("Session archive: this process keeps no files");
399
+ await On(xn(d), { recursive: true, mode: 448 }), await Le(d, l, 384);
400
+ }
401
+ function Kn(t) {
402
+ let r = process.cwd();
403
+ return r.endsWith(Z) ? r + t : r + Z + t;
404
+ }
405
+ function Q(t) {
406
+ return (r) => t.hostFiles.realPath(rt.workspace(r === "" || An(r) ? r : Kn(r)), { native: true });
407
+ }
408
+ function ee(t) {
409
+ if (!f() || t === void 0) return;
410
+ return { backend: t, transcriptKey: N.transcript, isKeySegment: re, realWorkspacePath: Q(t) };
411
+ }
412
+ function k(t) {
413
+ return t === void 0 ? void 0 : { source: t, hoverRestOn: f() };
414
+ }
415
+ var Mn = 64;
416
+ function O(t) {
417
+ return f() ? t : void 0;
418
+ }
419
+ async function ie(t, r, a = {}, u) {
420
+ if (!U(t)) throw Error(`Invalid sessionId: ${t}`);
421
+ if (!r.trim()) throw Error("title must be non-empty");
422
+ let d = o({ type: "custom-title", customTitle: r.trim(), sessionId: t }) + `
423
+ `;
424
+ await fe(t, d, a, O(u));
425
+ }
426
+ async function ce(t, r, a = {}, u) {
427
+ if (!U(t)) throw Error(`Invalid sessionId: ${t}`);
428
+ if (r !== null) {
429
+ let l = _e(r).trim();
430
+ if (!l) throw Error("tag must be non-empty (use null to clear)");
431
+ r = l;
432
+ }
433
+ let d = o({ type: "tag", tag: r ?? "", sessionId: t }) + `
434
+ `;
435
+ await fe(t, d, a, O(u));
436
+ }
437
+ async function ue(t, r, a = {}, u) {
438
+ if (!U(t)) throw new c(`Invalid sessionId: ${t}`, "setSessionArchived: invalid sessionId (must be a UUID)");
439
+ let d = f(), l = d ? u : void 0, g = /* @__PURE__ */ new Set();
440
+ for await (let { filePath: S } of Sn(t, a.dir, ee(l), d)) g.add(S);
441
+ if (g.size === 0) throw new c(a.dir ? `Session ${t} not found in project directory for ${a.dir}` : `Session ${t} not found in any project directory`, "setSessionArchived: session not found");
442
+ let y = (await Promise.allSettled([...g].map((S) => X(S, t, { archived: r, by: "sdk" }, l)))).find((S) => S.status === "rejected");
443
+ if (y) throw y.reason;
444
+ }
445
+ async function de(t, r = {}, a) {
446
+ if (!U(t)) throw Error(`Invalid sessionId: ${t}`);
447
+ let u = O(a);
448
+ for (let d of await $n(r, u)) {
449
+ if (f() && u !== void 0) {
450
+ let h = Ve(d, u.isKeySegment);
451
+ if (h !== void 0) {
452
+ if (await Dn(h, t, u)) return;
453
+ continue;
454
+ }
455
+ }
456
+ let l = b(d, `${t}.jsonl`), g;
457
+ try {
458
+ ({ size: g } = await Tn(l));
459
+ } catch (h) {
460
+ let y = n(h);
461
+ if (y === "ENOENT" || y === "ENOTDIR") continue;
462
+ throw h;
463
+ }
464
+ if (g === 0) continue;
465
+ await Nn(l, { force: true }), await Kt(b(d, t));
466
+ return;
467
+ }
468
+ throw Error(r.dir ? `Session ${t} not found in project directory for ${r.dir}` : `Session ${t} not found in any project directory`);
469
+ }
470
+ async function Dn(t, r, a) {
471
+ let { backend: u, transcriptKey: d } = a, l = d(t, r), g = await u.statMeta(l);
472
+ if (!g.ok) {
473
+ if (g.error.code === "NotFound") return false;
474
+ throw Error("Session delete: transcript unreadable via storage", { cause: g.error });
475
+ }
476
+ if ((g.value.storedBytes ?? g.value.size) === 0) return false;
477
+ for (let y of ["transcript", "sidecar"]) {
478
+ let S = await u.deleteScope({ namespace: y, projectKey: t, sessionId: r });
479
+ if (!S.ok) throw Error("Session delete: session directory not deletable via storage", { cause: S.error });
480
+ }
481
+ let h = await u.delete(l);
482
+ if (!h.ok) throw Error("Session delete: transcript not deletable via storage", { cause: h.error });
483
+ return true;
484
+ }
485
+ async function $n(t, r) {
486
+ if (t.dir) {
487
+ let u = await ut(t.dir, dt(r, f())), d = await te(u, r), l;
488
+ try {
489
+ l = await qe(u);
490
+ } catch {
491
+ l = [];
492
+ }
493
+ for (let g of l) {
494
+ if (g === u) continue;
495
+ d.push(...await te(g, r));
496
+ }
497
+ return d;
498
+ }
499
+ let a = v();
500
+ if (f() && r !== void 0) {
501
+ let u = await le(r);
502
+ if (u === void 0) return [];
503
+ if (u.laterPageFailed) throw Error("Session delete: project listing incomplete via storage");
504
+ return u.names.map((d) => b(a, d));
505
+ }
506
+ try {
507
+ return (await ae(a, { withFileTypes: true })).filter((d) => d.isDirectory() || d.isSymbolicLink()).map((d) => b(a, d.name));
508
+ } catch {
509
+ return [];
510
+ }
511
+ }
512
+ async function te(t, r) {
513
+ let a = k(r);
514
+ if (a === void 0 || !a.hoverRestOn) return ye(t);
515
+ let u = await ye(t, a), d = Ie(t), l = process.platform === "win32", g = [];
516
+ for (let h of u) if (h === d || await pt(h, t, l, a)) g.push(h);
517
+ return g;
518
+ }
519
+ async function le(t) {
520
+ let r = [], a, u = 0;
521
+ try {
522
+ do {
523
+ let d = await t.backend.listEntries({ namespace: "transcript" }, { skipScopeStats: true, ...a !== void 0 && { cursor: a } });
524
+ if (!d.ok) return u === 0 ? void 0 : { names: r, laterPageFailed: true };
525
+ for (let l of d.value.items) {
526
+ let g = ct(l, t.isKeySegment);
527
+ if (g !== void 0) r.push(g);
528
+ }
529
+ a = d.value.cursor;
530
+ } while (a && ++u < Mn);
531
+ return { names: r, laterPageFailed: Boolean(a) };
532
+ } catch {
533
+ return u === 0 && r.length === 0 ? void 0 : { names: r, laterPageFailed: true };
534
+ }
535
+ }
536
+ async function fe(t, r, a, u) {
537
+ let d = `${t}.jsonl`;
538
+ if (a.dir) {
539
+ let h = await ut(a.dir, dt(u, f()));
540
+ for (let S of await ye(h, k(u))) if (await j(b(S, d), r, L(S, t, u))) return;
541
+ let y;
542
+ try {
543
+ y = await qe(h);
544
+ } catch {
545
+ y = [];
546
+ }
547
+ for (let S of y) {
548
+ if (S === h) continue;
549
+ for (let E of await ye(S, k(u))) if (await j(b(E, d), r, L(E, t, u))) return;
550
+ }
551
+ throw Error(`Session ${t} not found in project directory for ${a.dir}`);
552
+ }
553
+ let l = v();
554
+ if (f() && u !== void 0) {
555
+ let h = await le(u);
556
+ if (h === void 0) throw new c(`Session ${t} not found (no projects directory)`, "Session not found (no projects directory)");
557
+ let { names: y } = h;
558
+ for (let S of y) {
559
+ let E = b(l, S);
560
+ if (await j(b(E, d), r, L(E, t, u))) return;
561
+ }
562
+ throw new c(`Session ${t} not found in any project directory`, "Session not found in any project directory");
563
+ }
564
+ let g;
565
+ try {
566
+ g = await ae(l);
567
+ } catch {
568
+ throw Error(`Session ${t} not found (no projects directory)`);
569
+ }
570
+ for (let h of g) if (await j(b(l, h, d), r)) return;
571
+ throw Error(`Session ${t} not found in any project directory`);
572
+ }
573
+ async function j(t, r, a) {
574
+ if (f() && a !== void 0) return Hn(a, r);
575
+ let u;
576
+ try {
577
+ u = await Fn(t, ne.O_WRONLY | ne.O_APPEND);
578
+ } catch (d) {
579
+ let l = n(d);
580
+ if (l === "ENOENT" || l === "ENOTDIR") return false;
581
+ throw d;
582
+ }
583
+ try {
584
+ let { size: d } = await u.stat();
585
+ if (d === 0) return false;
586
+ let l = process.platform === "win32" ? d : void 0, g = Buffer.from(r, "utf8"), h = 0;
587
+ while (h < g.length) {
588
+ let { bytesWritten: y } = await u.write(g, h, g.length - h, l);
589
+ if (y <= 0) throw new c(`tryAppend: short write to ${t} stalled with ${g.length - h} bytes remaining`, "tryAppend: zero-progress short write");
590
+ if (h += y, l !== void 0) l += y;
591
+ }
592
+ return true;
593
+ } finally {
594
+ await u.close();
595
+ }
596
+ }
597
+ async function Hn({ backend: t, key: r }, a) {
598
+ let u = await t.append(r, [{ data: a }], { precondition: { type: "ifExists", nonEmpty: true } });
599
+ if (!u.ok) {
600
+ if (u.error.code === "NotFound") return false;
601
+ throw Error("Session append: transcript not writable via storage", { cause: u.error });
602
+ }
603
+ return true;
604
+ }
605
+ function L(t, r, a) {
606
+ if (!f() || a === void 0) return;
607
+ let u = Ve(t, a.isKeySegment);
608
+ return u === void 0 ? void 0 : { backend: a.backend, key: a.transcriptKey(u, r) };
609
+ }
610
+ async function so(t, r, a) {
611
+ if (a?.sessionStore) return Gn(a.sessionStore, t, r, a.dir);
612
+ return ie(t, r, a);
613
+ }
614
+ async function ao(t, r, a) {
615
+ if (a?.sessionStore) return Un(a.sessionStore, t, r, a.dir);
616
+ return ce(t, r, a);
617
+ }
618
+ async function io(t, r) {
619
+ return me(t, true, r);
620
+ }
621
+ async function co(t, r) {
622
+ return me(t, false, r);
623
+ }
624
+ async function uo(t, r) {
625
+ if (!U(t)) throw new c(`Invalid sessionId: ${t}`, "deleteSession: invalid sessionId (must be a UUID)");
626
+ if (r?.sessionStore) {
627
+ if (!r.sessionStore.delete) return;
628
+ let a = se(r.dir);
629
+ await r.sessionStore.delete({ projectKey: a, sessionId: t });
630
+ return;
631
+ }
632
+ return de(t, r);
633
+ }
634
+ async function me(t, r, a) {
635
+ if (a?.sessionStore) throw new c("Archiving is not supported with sessionStore: a SessionStore holds transcript entries, and the archived mark is not one", "setSessionArchived: sessionStore is not supported");
636
+ return ue(t, r, a);
637
+ }
638
+ async function Gn(t, r, a, u) {
639
+ if (!U(r)) throw new c(`Invalid sessionId: ${r}`, "renameSession: invalid sessionId (must be a UUID)");
640
+ if (!a.trim()) throw Error("title must be non-empty");
641
+ let d = se(u);
642
+ await t.append({ projectKey: d, sessionId: r }, [{ type: "custom-title", customTitle: a.trim(), sessionId: r, uuid: pe(), timestamp: (/* @__PURE__ */ new Date()).toISOString() }]);
643
+ }
644
+ async function Un(t, r, a, u) {
645
+ if (!U(r)) throw new c(`Invalid sessionId: ${r}`, "tagSession: invalid sessionId (must be a UUID)");
646
+ if (a !== null) {
647
+ let l = _e(a).trim();
648
+ if (!l) throw Error("tag must be non-empty (use null to clear)");
649
+ a = l;
650
+ }
651
+ let d = se(u);
652
+ await t.append({ projectKey: d, sessionId: r }, [{ type: "tag", tag: a ?? "", sessionId: r, uuid: pe(), timestamp: (/* @__PURE__ */ new Date()).toISOString() }]);
653
+ }
654
+ export {
655
+ io as archiveSession,
656
+ uo as deleteSession,
657
+ so as renameSession,
658
+ ao as tagSession,
659
+ co as unarchiveSession
660
+ };
661
+ /*! Bundled license information:
662
+
663
+ @anthropic-ai/claude-agent-sdk/core-wadgcjfh.mjs:
664
+ (*! symbol-dispose-prelude: defines Symbol.dispose and Symbol.asyncDispose if missing, for this bundle's `using`. *)
665
+ */
666
+ //# sourceMappingURL=core-wadgcjfh-TSZFQZGH.js.map