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
@@ -1,8 +1,9 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
 
3
3
  // src/lib/paths.ts
4
+ import { realpath } from "node:fs/promises";
4
5
  import { homedir } from "node:os";
5
- import { join, resolve } from "node:path";
6
+ import { join, resolve, sep } from "node:path";
6
7
  function dataDir(env = process.env) {
7
8
  const override = env.TENJIN_DATA_DIR;
8
9
  if (override !== void 0 && override.length > 0) return resolve(override);
@@ -11,6 +12,19 @@ function dataDir(env = process.env) {
11
12
  function defaultDataDir(home = homedir()) {
12
13
  return join(home, ".tenjin");
13
14
  }
15
+ function isDefaultDataDir(dir, home = homedir()) {
16
+ return resolve(dir) === resolve(defaultDataDir(home));
17
+ }
18
+ function realOr(path) {
19
+ return realpath(path).catch(() => resolve(path));
20
+ }
21
+ async function samePath(a, b) {
22
+ const [x, y] = await Promise.all([realOr(a), realOr(b)]);
23
+ return x === y;
24
+ }
25
+ function tilde(path, home) {
26
+ return path === home || path.startsWith(`${home}${sep}`) ? `~${path.slice(home.length)}` : path;
27
+ }
14
28
  function runtimeDir(dir = dataDir()) {
15
29
  return join(dir, "runtime");
16
30
  }
@@ -26,24 +40,12 @@ function walletPath(dir = dataDir()) {
26
40
  function installIdPath(dir = dataDir()) {
27
41
  return join(dir, "install-id");
28
42
  }
29
- function sessionPath(dir = dataDir()) {
30
- return join(dir, "session.json");
31
- }
32
43
  function spendLedgerPath(dir = dataDir()) {
33
44
  return join(dir, "spend.json");
34
45
  }
35
- function balanceCachePath(dir = dataDir()) {
36
- return join(dir, "balance.json");
37
- }
38
46
  function updateCheckPath(dir = dataDir()) {
39
47
  return join(dir, "update-check.json");
40
48
  }
41
- function hooksDir(dir = dataDir()) {
42
- return join(dir, "hooks");
43
- }
44
- function hookHealthPath(dir = dataDir()) {
45
- return join(dir, "hook-health.json");
46
- }
47
49
  function passphraseBlobPath(dir = dataDir()) {
48
50
  return join(dir, "passphrase.dpapi");
49
51
  }
@@ -59,31 +61,6 @@ function passphraseFilePathFor(account, dir = dataDir()) {
59
61
  function archivedWalletPath(account, dir = dataDir()) {
60
62
  return join(dir, `wallet.${account}.json.bak`);
61
63
  }
62
- function loopDbPath(dir = dataDir()) {
63
- return join(dir, "loop.db");
64
- }
65
- function daemonTokenPath(dir = dataDir()) {
66
- return join(dir, "daemon.token");
67
- }
68
- function daemonPidPath(dir = dataDir()) {
69
- return join(dir, "daemon.pid");
70
- }
71
- function daemonLogPath(dir = dataDir()) {
72
- return join(dir, "daemon.log");
73
- }
74
- function daemonSpawnPath(dir = dataDir()) {
75
- return join(dir, "daemon.spawn");
76
- }
77
- function daemonBundlePath(dir = dataDir()) {
78
- return join(hooksDir(dir), "tenjin-daemon.mjs");
79
- }
80
- function shimBundlePath(dir = dataDir()) {
81
- return join(hooksDir(dir), "tenjin-shim.mjs");
82
- }
83
- var VITEST_REPORTER_FILE = "tenjin-vitest-reporter.mjs";
84
- function vitestReporterPath(dir = dataDir()) {
85
- return join(hooksDir(dir), VITEST_REPORTER_FILE);
86
- }
87
64
  function downloadsDir(dir = dataDir()) {
88
65
  return join(dir, "downloads");
89
66
  }
@@ -96,38 +73,45 @@ function jobsDir(dir = dataDir()) {
96
73
  function quotesDir(dir = dataDir()) {
97
74
  return join(dir, "quotes");
98
75
  }
76
+ function sourcesDir(dir = dataDir()) {
77
+ return join(dir, "sources");
78
+ }
79
+ function sourceVaultPath(id, dir = dataDir()) {
80
+ return join(sourcesDir(dir), `${id}.json`);
81
+ }
82
+ function sourceKeyBlobPath(id, dir = dataDir()) {
83
+ return join(sourcesDir(dir), `${id}.key.dpapi`);
84
+ }
85
+ function sourceKeyFilePath(id, dir = dataDir()) {
86
+ return join(sourcesDir(dir), `${id}.key.plain`);
87
+ }
99
88
 
100
89
  export {
101
90
  dataDir,
102
91
  defaultDataDir,
92
+ isDefaultDataDir,
93
+ realOr,
94
+ samePath,
95
+ tilde,
103
96
  runtimeDir,
104
97
  launcherDir,
105
98
  configPath,
106
99
  walletPath,
107
100
  installIdPath,
108
- sessionPath,
109
101
  spendLedgerPath,
110
- balanceCachePath,
111
102
  updateCheckPath,
112
- hooksDir,
113
- hookHealthPath,
114
103
  passphraseBlobPath,
115
104
  passphraseBlobPathFor,
116
105
  passphraseRecordPath,
117
106
  passphraseFilePathFor,
118
107
  archivedWalletPath,
119
- loopDbPath,
120
- daemonTokenPath,
121
- daemonPidPath,
122
- daemonLogPath,
123
- daemonSpawnPath,
124
- daemonBundlePath,
125
- shimBundlePath,
126
- VITEST_REPORTER_FILE,
127
- vitestReporterPath,
128
108
  downloadsDir,
129
109
  paidLedgerPath,
130
110
  jobsDir,
131
- quotesDir
111
+ quotesDir,
112
+ sourcesDir,
113
+ sourceVaultPath,
114
+ sourceKeyBlobPath,
115
+ sourceKeyFilePath
132
116
  };
133
- //# sourceMappingURL=chunk-OJNTCYQQ.js.map
117
+ //# sourceMappingURL=chunk-JTX3BUDK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/paths.ts"],"sourcesContent":["import { realpath } from 'node:fs/promises';\nimport { homedir } from 'node:os';\nimport { join, resolve, sep } from 'node:path';\n\n/**\n * Where the CLI keeps its config and wallet. Defaults to ~/.tenjin, overridable\n * via TENJIN_DATA_DIR (CI, ephemeral agents, and every test — which point it at\n * a temp dir so the real home is never touched).\n */\nexport function dataDir(env: NodeJS.ProcessEnv = process.env): string {\n const override = env.TENJIN_DATA_DIR;\n // Absolute, always: a relative override must mean the same directory from\n // every process, whatever its working directory.\n if (override !== undefined && override.length > 0) return resolve(override);\n return defaultDataDir();\n}\n\n/**\n * The data dir a run with no override resolves. Split out of {@link dataDir} so\n * a caller holding a home directory can ask whether some other profile IS the\n * default one, without a second copy of the `.tenjin` literal.\n */\nexport function defaultDataDir(home: string = homedir()): string {\n return join(home, '.tenjin');\n}\n\n/** Is `dir` the default data dir for `home`? Only that profile owns the runtime and plugin registration. */\nexport function isDefaultDataDir(dir: string, home: string = homedir()): boolean {\n return resolve(dir) === resolve(defaultDataDir(home));\n}\n\n/** `path` with links resolved, or made absolute as given when it cannot be. */\nexport function realOr(path: string): Promise<string> {\n return realpath(path).catch(() => resolve(path));\n}\n\n/** Do `a` and `b` name the same place, links resolved? */\nexport async function samePath(a: string, b: string): Promise<boolean> {\n const [x, y] = await Promise.all([realOr(a), realOr(b)]);\n return x === y;\n}\n\n/** `path` with the home folder written as `~`. */\nexport function tilde(path: string, home: string): string {\n return path === home || path.startsWith(`${home}${sep}`) ? `~${path.slice(home.length)}` : path;\n}\n\n/**\n * Tenjin's own runtime: copies of the CLI, the Node that runs them and the\n * plugin folder Claude Code loads, so neither an npm folder nor the `node` on\n * PATH has to outlive an upgrade. Only the default data dir has one; see\n * `src/lib/runtime.ts`.\n */\nexport function runtimeDir(dir: string = dataDir()): string {\n return join(dir, 'runtime');\n}\n\n/**\n * Where the `tenjin` launcher goes: `~/.local/bin`, the folder the XDG layout\n * and most shells' defaults already put on PATH, and none of a Node version\n * manager's.\n */\nexport function launcherDir(home: string = homedir()): string {\n return join(home, '.local', 'bin');\n}\n\nexport function configPath(dir: string = dataDir()): string {\n return join(dir, 'config.json');\n}\n\nexport function walletPath(dir: string = dataDir()): string {\n return join(dir, 'wallet.json');\n}\n\n/**\n * The anonymous install id sent to Tenjin as `tenjin-install-id` (lib/install-identity).\n * Under the data dir so it survives upgrades and reinstalls of the CLI itself.\n */\nexport function installIdPath(dir: string = dataDir()): string {\n return join(dir, 'install-id');\n}\n\n/**\n * Where the client-side rolling spend ledger lives (lib/wallet/spend.ts).\n *\n * Its own file, NOT `session.json`, which an earlier release cached a session\n * key in: the two schemas were incompatible and both readers treated a parse\n * failure as \"absent\", so a shared path meant each writer silently destroyed\n * the other's file.\n */\nexport function spendLedgerPath(dir: string = dataDir()): string {\n return join(dir, 'spend.json');\n}\n\n/**\n * Where the once-a-day \"a newer tenjin-cli exists\" check caches the registry\n * answer. A pure cache: nothing here is authoritative, so an unreadable file is\n * simply re-fetched.\n */\nexport function updateCheckPath(dir: string = dataDir()): string {\n return join(dir, 'update-check.json');\n}\n\n/**\n * Where the LEGACY (pre-per-wallet) Windows DPAPI passphrase blob lives. The\n * file holds a DPAPI CurrentUser ciphertext, not the passphrase in plaintext.\n * New writes go to the per-wallet path below; this one is only read as a\n * migration fallback and removed after a verified per-wallet copy exists.\n */\nexport function passphraseBlobPath(dir: string = dataDir()): string {\n return join(dir, 'passphrase.dpapi');\n}\n\n/**\n * The per-wallet Windows DPAPI passphrase blob: one file per wallet address\n * (lowercase), so creating a new wallet never clobbers an old wallet's blob.\n * Only ever written on win32; other platforms use their own OS store.\n */\nexport function passphraseBlobPathFor(account: string, dir: string = dataDir()): string {\n return join(dir, `passphrase.${account}.dpapi`);\n}\n\n/**\n * The sidecar that records WHERE each wallet's passphrase was saved\n * (`src/lib/passphrase-record.ts`), keyed by lowercase address. A separate\n * file rather than a field in wallet.json, so the funded key file is never\n * rewritten and an older CLI still reads it. No sidecar means today's lookup\n * order, unchanged.\n */\nexport function passphraseRecordPath(dir: string = dataDir()): string {\n return join(dir, 'passphrase-store.json');\n}\n\n/**\n * The per-wallet passphrase FILE store: the plaintext passphrase, mode 0600 in\n * a 0700 directory, no trailing newline. Not encrypted; the same trade-off the\n * GitHub CLI makes with its `hosts.yml` token. Used only where no OS credential\n * store exists (headless Linux, WSL, a sandbox) or when the user chose\n * `--insecure-storage`; never as the fallback for a keychain that is merely\n * locked. One file per wallet address (lowercase), like the DPAPI blob above.\n */\nexport function passphraseFilePathFor(account: string, dir: string = dataDir()): string {\n return join(dir, `passphrase.${account}.plain`);\n}\n\n/**\n * Where `wallet create --replace` parks the outgoing wallet's keystore, keyed by\n * its lowercase address so successive replaces can never collide. Together with\n * the wallet's per-address passphrase entry in the OS store, this file keeps the\n * replaced wallet's funds recoverable; it is never read by the active-wallet\n * path.\n */\nexport function archivedWalletPath(account: string, dir: string = dataDir()): string {\n return join(dir, `wallet.${account}.json.bak`);\n}\n\n/**\n * Where a router lookup that bought a file (a sound, an image) saves it. The\n * bytes cannot ride in the tool result, so the result names this file instead.\n */\nexport function downloadsDir(dir: string = dataDir()): string {\n return join(dir, 'downloads');\n}\n\n/**\n * One JSON line per paid router call: what was bought, from whom, for how much,\n * the settlement it carried and the files it saved. The user's own record; only\n * reconcile reads it back (`tenjin payments reconcile`, and the `request` tool's\n * pass beside each lookup), to settle what was left unknown.\n */\nexport function paidLedgerPath(dir: string = dataDir()): string {\n return join(dir, 'paid', 'ledger.jsonl');\n}\n\n/**\n * One file per take of a paid router call whose seller was still working when\n * the call ended: where to poll, until when, and what it saved. `request({job})`\n * resumes from it in any later process.\n */\nexport function jobsDir(dir: string = dataDir()): string {\n return join(dir, 'jobs');\n}\n\n/**\n * One file per quote: a router call over the automatic limits, kept with its\n * exact plan until the user approves it, it runs once, or it expires.\n */\nexport function quotesDir(dir: string = dataDir()): string {\n return join(dir, 'quotes');\n}\n\n/**\n * Connected accounts (plan 37): one folder, 0700, holding each account's vault\n * (`<id>.json`, its sign-in encrypted with a key kept in the OS store) and,\n * where the key cannot go to an OS store, that key's DPAPI blob or plain file.\n * Its own names, never the passphrase helpers': `passphrase.source:<id>.dpapi`\n * would be an NTFS alternate data stream on Windows.\n */\nexport function sourcesDir(dir: string = dataDir()): string {\n return join(dir, 'sources');\n}\n\n/** One connected account's vault. `id` is a checked account id (`ids.ts`). */\nexport function sourceVaultPath(id: string, dir: string = dataDir()): string {\n return join(sourcesDir(dir), `${id}.json`);\n}\n\n/** The DPAPI blob of one account's vault key, on Windows. */\nexport function sourceKeyBlobPath(id: string, dir: string = dataDir()): string {\n return join(sourcesDir(dir), `${id}.key.dpapi`);\n}\n\n/** One account's vault key in plain text, 0600, where no OS store exists. */\nexport function sourceKeyFilePath(id: string, dir: string = dataDir()): string {\n return join(sourcesDir(dir), `${id}.key.plain`);\n}\n"],"mappings":";;;AAAA,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,MAAM,SAAS,WAAW;AAO5B,SAAS,QAAQ,MAAyB,QAAQ,KAAa;AACpE,QAAM,WAAW,IAAI;AAGrB,MAAI,aAAa,UAAa,SAAS,SAAS,EAAG,QAAO,QAAQ,QAAQ;AAC1E,SAAO,eAAe;AACxB;AAOO,SAAS,eAAe,OAAe,QAAQ,GAAW;AAC/D,SAAO,KAAK,MAAM,SAAS;AAC7B;AAGO,SAAS,iBAAiB,KAAa,OAAe,QAAQ,GAAY;AAC/E,SAAO,QAAQ,GAAG,MAAM,QAAQ,eAAe,IAAI,CAAC;AACtD;AAGO,SAAS,OAAO,MAA+B;AACpD,SAAO,SAAS,IAAI,EAAE,MAAM,MAAM,QAAQ,IAAI,CAAC;AACjD;AAGA,eAAsB,SAAS,GAAW,GAA6B;AACrE,QAAM,CAAC,GAAG,CAAC,IAAI,MAAM,QAAQ,IAAI,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;AACvD,SAAO,MAAM;AACf;AAGO,SAAS,MAAM,MAAc,MAAsB;AACxD,SAAO,SAAS,QAAQ,KAAK,WAAW,GAAG,IAAI,GAAG,GAAG,EAAE,IAAI,IAAI,KAAK,MAAM,KAAK,MAAM,CAAC,KAAK;AAC7F;AAQO,SAAS,WAAW,MAAc,QAAQ,GAAW;AAC1D,SAAO,KAAK,KAAK,SAAS;AAC5B;AAOO,SAAS,YAAY,OAAe,QAAQ,GAAW;AAC5D,SAAO,KAAK,MAAM,UAAU,KAAK;AACnC;AAEO,SAAS,WAAW,MAAc,QAAQ,GAAW;AAC1D,SAAO,KAAK,KAAK,aAAa;AAChC;AAEO,SAAS,WAAW,MAAc,QAAQ,GAAW;AAC1D,SAAO,KAAK,KAAK,aAAa;AAChC;AAMO,SAAS,cAAc,MAAc,QAAQ,GAAW;AAC7D,SAAO,KAAK,KAAK,YAAY;AAC/B;AAUO,SAAS,gBAAgB,MAAc,QAAQ,GAAW;AAC/D,SAAO,KAAK,KAAK,YAAY;AAC/B;AAOO,SAAS,gBAAgB,MAAc,QAAQ,GAAW;AAC/D,SAAO,KAAK,KAAK,mBAAmB;AACtC;AAQO,SAAS,mBAAmB,MAAc,QAAQ,GAAW;AAClE,SAAO,KAAK,KAAK,kBAAkB;AACrC;AAOO,SAAS,sBAAsB,SAAiB,MAAc,QAAQ,GAAW;AACtF,SAAO,KAAK,KAAK,cAAc,OAAO,QAAQ;AAChD;AASO,SAAS,qBAAqB,MAAc,QAAQ,GAAW;AACpE,SAAO,KAAK,KAAK,uBAAuB;AAC1C;AAUO,SAAS,sBAAsB,SAAiB,MAAc,QAAQ,GAAW;AACtF,SAAO,KAAK,KAAK,cAAc,OAAO,QAAQ;AAChD;AASO,SAAS,mBAAmB,SAAiB,MAAc,QAAQ,GAAW;AACnF,SAAO,KAAK,KAAK,UAAU,OAAO,WAAW;AAC/C;AAMO,SAAS,aAAa,MAAc,QAAQ,GAAW;AAC5D,SAAO,KAAK,KAAK,WAAW;AAC9B;AAQO,SAAS,eAAe,MAAc,QAAQ,GAAW;AAC9D,SAAO,KAAK,KAAK,QAAQ,cAAc;AACzC;AAOO,SAAS,QAAQ,MAAc,QAAQ,GAAW;AACvD,SAAO,KAAK,KAAK,MAAM;AACzB;AAMO,SAAS,UAAU,MAAc,QAAQ,GAAW;AACzD,SAAO,KAAK,KAAK,QAAQ;AAC3B;AASO,SAAS,WAAW,MAAc,QAAQ,GAAW;AAC1D,SAAO,KAAK,KAAK,SAAS;AAC5B;AAGO,SAAS,gBAAgB,IAAY,MAAc,QAAQ,GAAW;AAC3E,SAAO,KAAK,WAAW,GAAG,GAAG,GAAG,EAAE,OAAO;AAC3C;AAGO,SAAS,kBAAkB,IAAY,MAAc,QAAQ,GAAW;AAC7E,SAAO,KAAK,WAAW,GAAG,GAAG,GAAG,EAAE,YAAY;AAChD;AAGO,SAAS,kBAAkB,IAAY,MAAc,QAAQ,GAAW;AAC7E,SAAO,KAAK,WAAW,GAAG,GAAG,GAAG,EAAE,YAAY;AAChD;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
  import {
3
3
  CliError
4
- } from "./chunk-3UCIG4TG.js";
4
+ } from "./chunk-DI4QAGRZ.js";
5
5
 
6
6
  // src/lib/wallet-unlock.ts
7
7
  var UNLOCK_REASONS = /* @__PURE__ */ new Set([
@@ -94,4 +94,4 @@ export {
94
94
  classifyUnlockError,
95
95
  unlockReasonOf
96
96
  };
97
- //# sourceMappingURL=chunk-X5ZBP3IY.js.map
97
+ //# sourceMappingURL=chunk-JUUBBBY5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/wallet-unlock.ts"],"sourcesContent":["import { CliError } from './errors';\n\n/**\n * WHY A WALLET COULD NOT SIGN, AS ONE VOCABULARY. The wallet layer throws with\n * it, the routing payer skips with it, the hooks gate and word notices with it,\n * and doctor renders it, so every surface names the same cause the same way.\n *\n * HOOK-SAFE ON PURPOSE: it imports `./errors` and nothing else. `tenjin hook`,\n * `alive` and the status line read these reasons, and their chunk graph must\n * stay free of `src/lib/wallet/`, viem, ox and the x402 SDK\n * (`src/router/dist-chunks.test.ts`). That is why the reasons live here and not\n * beside the wallet code that produces them.\n *\n * Six reasons are DEFINITE (this wallet cannot sign until a person fixes\n * something) and two are not (`keychain_locked`, `unlock_timeout`: the store or\n * the clock did not answer, which says nothing about the wallet). Only a\n * definite reason may withhold an offer or skip a routing attempt.\n */\nexport type UnlockReason =\n | 'no_wallet'\n | 'wallet_corrupt'\n | 'env_key_invalid'\n | 'passphrase_missing'\n | 'passphrase_wrong'\n | 'env_passphrase_wrong'\n | 'keychain_locked'\n | 'unlock_timeout';\n\nconst UNLOCK_REASONS: ReadonlySet<string> = new Set<UnlockReason>([\n 'no_wallet',\n 'wallet_corrupt',\n 'env_key_invalid',\n 'passphrase_missing',\n 'passphrase_wrong',\n 'env_passphrase_wrong',\n 'keychain_locked',\n 'unlock_timeout',\n]);\n\n/** A store that keeps a wallet's passphrase across sessions: the platform's own\n * credential store, or the 0600 file where there is none. */\nexport type DurableStore = 'keychain' | 'secret-service' | 'dpapi' | 'file';\n\n/** Where a passphrase came from, for messages; 'legacy' = the pre-per-wallet shared slot. */\nexport type PassphraseLabel = 'env' | DurableStore | 'legacy' | 'prompt';\n\nconst PASSPHRASE_LABELS: ReadonlySet<string> = new Set<PassphraseLabel>([\n 'env',\n 'keychain',\n 'secret-service',\n 'dpapi',\n 'file',\n 'legacy',\n 'prompt',\n]);\n\n/**\n * What actually produced a signature, as doctor, install and the router report\n * it. Defined here rather than in `src/router/eligibility.ts` (which re-exports\n * it) because `src/lib/wallet/provider.ts` needs it too, and lib must not\n * import router.\n */\nexport type SigningSource = 'key-env' | 'passphrase-env' | DurableStore | 'legacy';\n\n/** The cause a wallet throw site attaches as `CliError.details.unlock`. */\nexport interface UnlockDetails {\n reason: UnlockReason;\n source?: PassphraseLabel;\n}\n\n/** Every reason except the two that say the store or the clock did not answer. */\nexport const DEFINITE_UNLOCK: ReadonlySet<UnlockReason> = new Set<UnlockReason>([\n 'no_wallet',\n 'wallet_corrupt',\n 'env_key_invalid',\n 'passphrase_missing',\n 'passphrase_wrong',\n 'env_passphrase_wrong',\n]);\n\n/** Said once when TENJIN_WALLET_PASSPHRASE did not open the wallet and a saved\n * passphrase did: the wallet works, the variable is the thing to remove. */\nexport const ENV_PASSPHRASE_WRONG = 'TENJIN_WALLET_PASSPHRASE is set but wrong; remove it.';\n\n/**\n * Carried by every person-facing string that names `tenjin wallet repair`. A\n * passphrase never goes on a command line or into chat: repair\n * asks for it at a hidden prompt, and this clause tells the person so before an\n * agent can suggest otherwise.\n */\nexport const REPAIR_CLAUSE =\n '(it asks for the passphrase in your terminal; never paste it into chat)';\n\n/** The person's fix for a wallet whose saved passphrase is gone or wrong. */\nexport const REPAIR_IN_TERMINAL =\n `Run \\`tenjin wallet repair\\` yourself ${REPAIR_CLAUSE}.` as const;\n\n/**\n * The only fix for a keychain that exists but did not answer. It never\n * points at the plaintext file or at another passphrase: a locked keychain is\n * unlocked, not routed around.\n */\nexport const KEYCHAIN_LOCKED_FIX =\n 'Unlock your keychain (or log in to the desktop session) and retry.';\n\n/**\n * A failed file-store write at create or repair. Never used for an\n * OS store: there is no keychain to unlock when the file could not be written.\n */\nexport function FILE_STORE_FAILED_FIX(path: string): string {\n // The file's own folder (`TENJIN_DATA_DIR` moves it), cut by hand: this module imports nothing.\n const dir = path.replace(/[/\\\\][^/\\\\]*$/, '') || '/';\n return `Tenjin could not save the passphrase to ${path}; check that ${dir} is writable.`;\n}\n\n/** Shown once when create or repair has waited on the keychain for a second at a terminal. */\nexport const KEYCHAIN_WAIT_LINE = 'Waiting for the keychain…';\n\n/** Why a passphrase went to the 0600 file: no OS store answered the probe as present. */\nexport function NO_KEYRING_LINE(path: string): string {\n return `No keyring reachable from this session; passphrase saved to ${path} (readable only by you).`;\n}\n\n/**\n * The one TENJIN_WALLET_KEY expression: a 0x-prefixed 32-byte hex private key,\n * case-insensitive. `src/lib/wallet/store.ts` re-exports it, so the wallet\n * layer's `loadCredential` and the hook-safe `wallet-facts.ts` test exactly\n * the same thing. Do not tighten it in\n * one place only: a key one accepts and the other rejects is a wallet doctor\n * calls fine and the hooks call broken.\n */\nexport const PRIVATE_KEY_RE = /^0x[0-9a-f]{64}$/i;\n\n/** `{ unlock: { reason, source } }`, the value every wallet throw site passes as CliError `details`. */\nexport function unlockDetails(\n reason: UnlockReason,\n source?: PassphraseLabel,\n): { unlock: UnlockDetails } {\n return { unlock: source === undefined ? { reason } : { reason, source } };\n}\n\n/** Whether `value` is a well-formed `details.unlock`: a known reason, and a known source if any. */\nfunction isUnlockDetails(value: unknown): value is UnlockDetails {\n if (typeof value !== 'object' || value === null) return false;\n const { reason, source } = value as { reason?: unknown; source?: unknown };\n if (typeof reason !== 'string' || !UNLOCK_REASONS.has(reason)) return false;\n return source === undefined || (typeof source === 'string' && PASSPHRASE_LABELS.has(source));\n}\n\n/** `details.unlock` of a CliError that carries a valid one, else undefined. */\nfunction detailsOf(err: unknown): UnlockDetails | undefined {\n if (!(err instanceof CliError)) return undefined;\n const unlock = (err.details as { unlock?: unknown } | null | undefined)?.unlock;\n return isUnlockDetails(unlock) ? unlock : undefined;\n}\n\n/**\n * WHAT AN UNLOCK FAILURE MEANS, for gating and wording. In order:\n * `details.unlock` when the thrower classified it; `WALLET_MISSING` is\n * `no_wallet`; an AbortError or TimeoutError is `unlock_timeout`. ANY other\n * error, an undetailed CliError included, is `wallet_locked`, which is never\n * definite: nobody said why, so nothing may be withheld on its account.\n *\n * It never matches on message text. A message is wording, free to change; a\n * reason that hung on it would turn a copy edit into a gating change.\n */\nexport function classifyUnlockError(err: unknown): {\n reason: UnlockReason | 'wallet_locked';\n definite: boolean;\n source?: PassphraseLabel;\n} {\n const unlock = detailsOf(err);\n if (unlock !== undefined) {\n return {\n reason: unlock.reason,\n definite: DEFINITE_UNLOCK.has(unlock.reason),\n ...(unlock.source !== undefined ? { source: unlock.source } : {}),\n };\n }\n if (err instanceof CliError && err.code === 'WALLET_MISSING') {\n return { reason: 'no_wallet', definite: true };\n }\n const name = (err as { name?: unknown } | null | undefined)?.name;\n // By name, not class: a DOMException from AbortSignal.timeout and a\n // hand-made Error named AbortError mean the same thing here.\n if (name === 'AbortError' || name === 'TimeoutError') {\n return { reason: 'unlock_timeout', definite: false };\n }\n return { reason: 'wallet_locked', definite: false };\n}\n\n/**\n * `details.unlock.reason` when `err` is a CliError carrying a valid\n * `details.unlock`; null for anything else (an undetailed WALLET_MISSING, an\n * AbortError, any other CliError or value).\n *\n * The only gate for swapping a fix to its model-facing `agentFix`. Not\n * {@link classifyUnlockError}: its `wallet_locked` fallback covers EVERY\n * undetailed error, a `REGISTRY_MISMATCH` or an HTTP failure included, and\n * swapping on it would replace those errors' own fixes with wallet advice.\n */\nexport function unlockReasonOf(err: unknown): UnlockReason | null {\n return detailsOf(err)?.reason ?? null;\n}\n"],"mappings":";;;;;;AA4BA,IAAM,iBAAsC,oBAAI,IAAkB;AAAA,EAChE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AASD,IAAM,oBAAyC,oBAAI,IAAqB;AAAA,EACtE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAiBM,IAAM,kBAA6C,oBAAI,IAAkB;AAAA,EAC9E;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAIM,IAAM,uBAAuB;AAQ7B,IAAM,gBACX;AAGK,IAAM,qBACX,yCAAyC,aAAa;AAOjD,IAAM,sBACX;AAMK,SAAS,sBAAsB,MAAsB;AAE1D,QAAM,MAAM,KAAK,QAAQ,iBAAiB,EAAE,KAAK;AACjD,SAAO,2CAA2C,IAAI,gBAAgB,GAAG;AAC3E;AAGO,IAAM,qBAAqB;AAG3B,SAAS,gBAAgB,MAAsB;AACpD,SAAO,+DAA+D,IAAI;AAC5E;AAUO,IAAM,iBAAiB;AAGvB,SAAS,cACd,QACA,QAC2B;AAC3B,SAAO,EAAE,QAAQ,WAAW,SAAY,EAAE,OAAO,IAAI,EAAE,QAAQ,OAAO,EAAE;AAC1E;AAGA,SAAS,gBAAgB,OAAwC;AAC/D,MAAI,OAAO,UAAU,YAAY,UAAU,KAAM,QAAO;AACxD,QAAM,EAAE,QAAQ,OAAO,IAAI;AAC3B,MAAI,OAAO,WAAW,YAAY,CAAC,eAAe,IAAI,MAAM,EAAG,QAAO;AACtE,SAAO,WAAW,UAAc,OAAO,WAAW,YAAY,kBAAkB,IAAI,MAAM;AAC5F;AAGA,SAAS,UAAU,KAAyC;AAC1D,MAAI,EAAE,eAAe,UAAW,QAAO;AACvC,QAAM,SAAU,IAAI,SAAqD;AACzE,SAAO,gBAAgB,MAAM,IAAI,SAAS;AAC5C;AAYO,SAAS,oBAAoB,KAIlC;AACA,QAAM,SAAS,UAAU,GAAG;AAC5B,MAAI,WAAW,QAAW;AACxB,WAAO;AAAA,MACL,QAAQ,OAAO;AAAA,MACf,UAAU,gBAAgB,IAAI,OAAO,MAAM;AAAA,MAC3C,GAAI,OAAO,WAAW,SAAY,EAAE,QAAQ,OAAO,OAAO,IAAI,CAAC;AAAA,IACjE;AAAA,EACF;AACA,MAAI,eAAe,YAAY,IAAI,SAAS,kBAAkB;AAC5D,WAAO,EAAE,QAAQ,aAAa,UAAU,KAAK;AAAA,EAC/C;AACA,QAAM,OAAQ,KAA+C;AAG7D,MAAI,SAAS,gBAAgB,SAAS,gBAAgB;AACpD,WAAO,EAAE,QAAQ,kBAAkB,UAAU,MAAM;AAAA,EACrD;AACA,SAAO,EAAE,QAAQ,iBAAiB,UAAU,MAAM;AACpD;AAYO,SAAS,eAAe,KAAmC;AAChE,SAAO,UAAU,GAAG,GAAG,UAAU;AACnC;","names":[]}
@@ -0,0 +1,15 @@
1
+ import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
+
3
+ // src/lib/ids.ts
4
+ var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
5
+ var ADDRESS_RE = /^0x[0-9a-fA-F]{40}$/;
6
+ var LOWERCASE_ADDRESS_RE = /^0x[0-9a-f]{40}$/;
7
+ var ATOMIC_RE = /^\d{1,39}$/;
8
+
9
+ export {
10
+ UUID_RE,
11
+ ADDRESS_RE,
12
+ LOWERCASE_ADDRESS_RE,
13
+ ATOMIC_RE
14
+ };
15
+ //# sourceMappingURL=chunk-JWAK7JQB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/ids.ts"],"sourcesContent":["/**\n * The shared identity patterns for server-controlled values that become file\n * paths, URL segments, or terminal output. One definition so a future change\n * (e.g. accepting uppercase ids) cannot be applied in one command and missed in\n * another.\n */\nexport const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n/** A wallet address, any case. */\nexport const ADDRESS_RE = /^0x[0-9a-fA-F]{40}$/;\n/** A wallet address in the lowercase form file names and ledger keys use. */\nexport const LOWERCASE_ADDRESS_RE = /^0x[0-9a-f]{40}$/;\n/** A non-negative atomic USDC integer string (6-decimal base units). */\nexport const ATOMIC_RE = /^\\d{1,39}$/;\n"],"mappings":";;;AAMO,IAAM,UAAU;AAEhB,IAAM,aAAa;AAEnB,IAAM,uBAAuB;AAE7B,IAAM,YAAY;","names":[]}
@@ -1,10 +1,7 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
  import {
3
3
  createLocalSpendAuthorizer
4
- } from "./chunk-V2LQLN5H.js";
5
- import {
6
- emitNotice
7
- } from "./chunk-FVIGCDSV.js";
4
+ } from "./chunk-FYFHH7V5.js";
8
5
  import {
9
6
  STORE_TIMEOUTS,
10
7
  describeStoreLocation,
@@ -12,11 +9,13 @@ import {
12
9
  readStoredPassphrase,
13
10
  resolvePassphrase,
14
11
  storeDurablyDetailed,
15
- storeNoun,
16
12
  toStoreOutcome,
17
13
  unstorableWhy,
18
14
  walletStoreAccount
19
- } from "./chunk-CEXSOI5R.js";
15
+ } from "./chunk-HI5XQOX2.js";
16
+ import {
17
+ storeNoun
18
+ } from "./chunk-XRGFH7FI.js";
20
19
  import {
21
20
  hashAuthorization,
22
21
  hashMessage,
@@ -25,16 +24,16 @@ import {
25
24
  publicKeyToAddress,
26
25
  serializeSignature,
27
26
  serializeTransaction
28
- } from "./chunk-WFSPCCVW.js";
27
+ } from "./chunk-7V25UAQO.js";
29
28
  import {
30
29
  hmac,
31
30
  secp256k1,
32
31
  sha256
33
- } from "./chunk-JRGFKVAZ.js";
32
+ } from "./chunk-PETQ5WEA.js";
34
33
  import {
35
34
  InvalidAddressError,
36
- concat3 as concat,
37
- from2 as from,
35
+ concat2 as concat,
36
+ from,
38
37
  hexToBytes,
39
38
  isAddress,
40
39
  isEqual,
@@ -42,10 +41,10 @@ import {
42
41
  keccak256,
43
42
  numberToHex,
44
43
  random,
45
- slice3 as slice,
44
+ slice2 as slice,
46
45
  toHex,
47
46
  toHex2
48
- } from "./chunk-2GP3HRYK.js";
47
+ } from "./chunk-INSIW65E.js";
49
48
  import {
50
49
  ahash,
51
50
  anumber,
@@ -57,11 +56,17 @@ import {
57
56
  rotl,
58
57
  swap32IfBE,
59
58
  u32
60
- } from "./chunk-BPMWXTFX.js";
59
+ } from "./chunk-WFZX352D.js";
61
60
  import {
62
61
  readPassphraseRecord,
63
62
  writePassphraseRecord
64
- } from "./chunk-3AIHRXKO.js";
63
+ } from "./chunk-ZS7JIUJ3.js";
64
+ import {
65
+ ADDRESS_RE
66
+ } from "./chunk-JWAK7JQB.js";
67
+ import {
68
+ emitNotice
69
+ } from "./chunk-KLDMLWXT.js";
65
70
  import {
66
71
  ENV_PASSPHRASE_WRONG,
67
72
  FILE_STORE_FAILED_FIX,
@@ -71,30 +76,29 @@ import {
71
76
  REPAIR_IN_TERMINAL,
72
77
  unlockDetails,
73
78
  unlockReasonOf
74
- } from "./chunk-X5ZBP3IY.js";
75
- import {
76
- hasCode
77
- } from "./chunk-2I4QTOLB.js";
78
- import {
79
- external_exports
80
- } from "./chunk-SNNSAGMT.js";
79
+ } from "./chunk-JUUBBBY5.js";
81
80
  import {
82
81
  fsyncDir,
83
82
  writeFileAtomicExclusive
84
83
  } from "./chunk-7WEQQJLG.js";
85
84
  import {
86
- CliError
87
- } from "./chunk-3UCIG4TG.js";
85
+ hasCode
86
+ } from "./chunk-3MZ7DYRO.js";
88
87
  import {
89
88
  archivedWalletPath,
90
89
  passphraseFilePathFor,
91
90
  spendLedgerPath,
92
91
  walletPath
93
- } from "./chunk-OJNTCYQQ.js";
92
+ } from "./chunk-JTX3BUDK.js";
93
+ import {
94
+ external_exports
95
+ } from "./chunk-P6YQWIT2.js";
96
+ import {
97
+ CliError
98
+ } from "./chunk-DI4QAGRZ.js";
94
99
 
95
100
  // src/lib/wallet/store.ts
96
101
  import { readFile, stat } from "node:fs/promises";
97
- var ADDRESS_RE = /^0x[0-9a-fA-F]{40}$/;
98
102
  var KeystoreV3Schema = external_exports.object({
99
103
  crypto: external_exports.object({
100
104
  cipher: external_exports.literal("aes-128-ctr"),
@@ -122,7 +126,7 @@ async function walletFileMode(dir) {
122
126
  try {
123
127
  return (await stat(walletPath(dir))).mode & 511;
124
128
  } catch (err) {
125
- if (isNotFound(err)) return null;
129
+ if (hasCode(err, "ENOENT")) return null;
126
130
  throw err;
127
131
  }
128
132
  }
@@ -132,7 +136,7 @@ async function readWalletRecord(dir) {
132
136
  try {
133
137
  raw = await readFile(path, "utf8");
134
138
  } catch (err) {
135
- if (isNotFound(err)) return null;
139
+ if (hasCode(err, "ENOENT")) return null;
136
140
  throw new CliError("WALLET_INVALID_KEY", `Could not read the wallet file at ${path}.`, {
137
141
  fix: `Check file permissions on ${path}.`,
138
142
  cause: err,
@@ -213,9 +217,6 @@ function isPreEncryptionRecord(json) {
213
217
  const rec = json;
214
218
  return rec.schemaVersion === 1 || "privateKey" in rec;
215
219
  }
216
- function isNotFound(err) {
217
- return hasCode(err, "ENOENT");
218
- }
219
220
 
220
221
  // src/lib/wallet/local.ts
221
222
  import { link, readdir, stat as stat2, unlink } from "node:fs/promises";
@@ -1687,6 +1688,8 @@ export {
1687
1688
  walletFileExists,
1688
1689
  readWalletRecord,
1689
1690
  walletExistsError,
1691
+ isWindows,
1692
+ KEY_STORAGE,
1690
1693
  createLocalProvider,
1691
1694
  openKeystore,
1692
1695
  verifyLocalWallet,
@@ -1706,4 +1709,4 @@ export {
1706
1709
  @noble/ciphers/esm/utils.js:
1707
1710
  (*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) *)
1708
1711
  */
1709
- //# sourceMappingURL=chunk-UXZONNEQ.js.map
1712
+ //# sourceMappingURL=chunk-K5KNGC4I.js.map