@moltzap/client 2026.529.0 → 2026.718.0

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 (363) hide show
  1. package/dist/agent-client.d.ts +2 -65
  2. package/dist/agent-client.d.ts.map +1 -1
  3. package/dist/agent-client.js +1 -286
  4. package/dist/agent-client.js.map +1 -1
  5. package/dist/app-client.d.ts +3 -0
  6. package/dist/app-client.d.ts.map +1 -0
  7. package/dist/app-client.js +2 -0
  8. package/dist/app-client.js.map +1 -0
  9. package/dist/auth.d.ts +6 -15
  10. package/dist/auth.d.ts.map +1 -1
  11. package/dist/auth.js +12 -16
  12. package/dist/auth.js.map +1 -1
  13. package/dist/channel-base/format-cross-conv.d.ts +10 -15
  14. package/dist/channel-base/format-cross-conv.d.ts.map +1 -1
  15. package/dist/channel-base/format-cross-conv.js +10 -15
  16. package/dist/channel-base/format-cross-conv.js.map +1 -1
  17. package/dist/channel-base/format-group-block.d.ts +8 -10
  18. package/dist/channel-base/format-group-block.d.ts.map +1 -1
  19. package/dist/channel-base/format-group-block.js +8 -10
  20. package/dist/channel-base/format-group-block.js.map +1 -1
  21. package/dist/channel-base/index.d.ts +3 -62
  22. package/dist/channel-base/index.d.ts.map +1 -1
  23. package/dist/channel-base/index.js +2 -65
  24. package/dist/channel-base/index.js.map +1 -1
  25. package/dist/channel-base/lease-guard.d.ts +0 -2
  26. package/dist/channel-base/lease-guard.d.ts.map +1 -1
  27. package/dist/channel-base/lease-guard.js +0 -2
  28. package/dist/channel-base/lease-guard.js.map +1 -1
  29. package/dist/channel-base/lease-store.d.ts +2 -3
  30. package/dist/channel-base/lease-store.d.ts.map +1 -1
  31. package/dist/channel-base/lease-store.js +2 -3
  32. package/dist/channel-base/lease-store.js.map +1 -1
  33. package/dist/channel-base/lease.d.ts +25 -31
  34. package/dist/channel-base/lease.d.ts.map +1 -1
  35. package/dist/channel-base/lease.js +29 -45
  36. package/dist/channel-base/lease.js.map +1 -1
  37. package/dist/channel-core-enrichment.d.ts +1 -1
  38. package/dist/channel-core-enrichment.d.ts.map +1 -1
  39. package/dist/channel-core-test-support.d.ts +17 -11
  40. package/dist/channel-core-test-support.d.ts.map +1 -1
  41. package/dist/channel-core-test-support.js +5 -6
  42. package/dist/channel-core-test-support.js.map +1 -1
  43. package/dist/channel-core.d.ts +24 -29
  44. package/dist/channel-core.d.ts.map +1 -1
  45. package/dist/channel-core.js +18 -42
  46. package/dist/channel-core.js.map +1 -1
  47. package/dist/cli/commands/agents.d.ts +3 -6
  48. package/dist/cli/commands/agents.d.ts.map +1 -1
  49. package/dist/cli/commands/agents.js +14 -50
  50. package/dist/cli/commands/agents.js.map +1 -1
  51. package/dist/cli/commands/contacts.d.ts +5 -6
  52. package/dist/cli/commands/contacts.d.ts.map +1 -1
  53. package/dist/cli/commands/contacts.js +15 -43
  54. package/dist/cli/commands/contacts.js.map +1 -1
  55. package/dist/cli/commands/conversations.d.ts +8 -18
  56. package/dist/cli/commands/conversations.d.ts.map +1 -1
  57. package/dist/cli/commands/conversations.js +14 -65
  58. package/dist/cli/commands/conversations.js.map +1 -1
  59. package/dist/cli/commands/messages.d.ts +13 -35
  60. package/dist/cli/commands/messages.d.ts.map +1 -1
  61. package/dist/cli/commands/messages.js +21 -46
  62. package/dist/cli/commands/messages.js.map +1 -1
  63. package/dist/cli/commands/register.d.ts +10 -12
  64. package/dist/cli/commands/register.d.ts.map +1 -1
  65. package/dist/cli/commands/register.js +47 -133
  66. package/dist/cli/commands/register.js.map +1 -1
  67. package/dist/cli/commands/send.d.ts +23 -36
  68. package/dist/cli/commands/send.d.ts.map +1 -1
  69. package/dist/cli/commands/send.js +25 -72
  70. package/dist/cli/commands/send.js.map +1 -1
  71. package/dist/cli/commands/start.d.ts +10 -124
  72. package/dist/cli/commands/start.d.ts.map +1 -1
  73. package/dist/cli/commands/start.js +28 -510
  74. package/dist/cli/commands/start.js.map +1 -1
  75. package/dist/cli/commands/status.d.ts +1 -1
  76. package/dist/cli/commands/status.d.ts.map +1 -1
  77. package/dist/cli/commands/status.js +8 -9
  78. package/dist/cli/commands/status.js.map +1 -1
  79. package/dist/cli/commands/test-transport.d.ts +12 -5
  80. package/dist/cli/commands/test-transport.d.ts.map +1 -1
  81. package/dist/cli/commands/test-transport.js +15 -15
  82. package/dist/cli/commands/test-transport.js.map +1 -1
  83. package/dist/cli/index.js +13 -40
  84. package/dist/cli/index.js.map +1 -1
  85. package/dist/cli/output.d.ts +4 -0
  86. package/dist/cli/output.d.ts.map +1 -0
  87. package/dist/cli/output.js +9 -0
  88. package/dist/cli/output.js.map +1 -0
  89. package/dist/cli/socket-client.d.ts +7 -14
  90. package/dist/cli/socket-client.d.ts.map +1 -1
  91. package/dist/cli/socket-client.js +15 -38
  92. package/dist/cli/socket-client.js.map +1 -1
  93. package/dist/cli/transport.d.ts +53 -116
  94. package/dist/cli/transport.d.ts.map +1 -1
  95. package/dist/cli/transport.js +45 -295
  96. package/dist/cli/transport.js.map +1 -1
  97. package/dist/config.d.ts +24 -0
  98. package/dist/config.d.ts.map +1 -0
  99. package/dist/config.js +35 -0
  100. package/dist/config.js.map +1 -0
  101. package/dist/config.test-utils.d.ts +13 -0
  102. package/dist/config.test-utils.d.ts.map +1 -0
  103. package/dist/config.test-utils.js +46 -0
  104. package/dist/config.test-utils.js.map +1 -0
  105. package/dist/index.d.ts +3 -8
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +2 -12
  108. package/dist/index.js.map +1 -1
  109. package/dist/local-daemon-rpc.d.ts +259 -8
  110. package/dist/local-daemon-rpc.d.ts.map +1 -1
  111. package/dist/local-daemon-rpc.js +189 -12
  112. package/dist/local-daemon-rpc.js.map +1 -1
  113. package/dist/{runtime/local-history.d.ts → local-history.d.ts} +16 -21
  114. package/dist/local-history.d.ts.map +1 -0
  115. package/dist/{runtime/local-history.js → local-history.js} +16 -21
  116. package/dist/local-history.js.map +1 -0
  117. package/dist/local-paths.d.ts +0 -2
  118. package/dist/local-paths.d.ts.map +1 -1
  119. package/dist/local-paths.js +0 -4
  120. package/dist/local-paths.js.map +1 -1
  121. package/dist/local-socket-server.d.ts +22 -0
  122. package/dist/local-socket-server.d.ts.map +1 -0
  123. package/dist/{runtime/local-socket-server.js → local-socket-server.js} +4 -9
  124. package/dist/local-socket-server.js.map +1 -0
  125. package/dist/message-rendering.d.ts +3 -0
  126. package/dist/message-rendering.d.ts.map +1 -0
  127. package/dist/message-rendering.js +7 -0
  128. package/dist/message-rendering.js.map +1 -0
  129. package/dist/notification/__tests__/{snapshot-semantics.types-check.d.ts → subscribe-signatures.types-check.d.ts} +1 -1
  130. package/dist/notification/__tests__/subscribe-signatures.types-check.d.ts.map +1 -0
  131. package/dist/notification/__tests__/subscribe-signatures.types-check.js +55 -0
  132. package/dist/notification/__tests__/subscribe-signatures.types-check.js.map +1 -0
  133. package/dist/notification/errors.d.ts +18 -6
  134. package/dist/notification/errors.d.ts.map +1 -1
  135. package/dist/notification/errors.js +13 -15
  136. package/dist/notification/errors.js.map +1 -1
  137. package/dist/notification/index.d.ts +5 -0
  138. package/dist/notification/index.d.ts.map +1 -0
  139. package/dist/notification/index.js +5 -0
  140. package/dist/notification/index.js.map +1 -0
  141. package/dist/notification/stream.d.ts +33 -49
  142. package/dist/notification/stream.d.ts.map +1 -1
  143. package/dist/notification/stream.js +33 -76
  144. package/dist/notification/stream.js.map +1 -1
  145. package/dist/pagination.d.ts +20 -10
  146. package/dist/pagination.d.ts.map +1 -1
  147. package/dist/pagination.js +8 -9
  148. package/dist/pagination.js.map +1 -1
  149. package/dist/profile.d.ts +92 -0
  150. package/dist/profile.d.ts.map +1 -0
  151. package/dist/profile.js +149 -0
  152. package/dist/profile.js.map +1 -0
  153. package/dist/refs.d.ts.map +1 -0
  154. package/dist/refs.js.map +1 -0
  155. package/dist/service-archive-purge.d.ts +2 -1
  156. package/dist/service-archive-purge.d.ts.map +1 -1
  157. package/dist/service-archive-purge.js.map +1 -1
  158. package/dist/{runtime/service-helpers.d.ts → service-helpers.d.ts} +5 -11
  159. package/dist/service-helpers.d.ts.map +1 -0
  160. package/dist/{runtime/service-helpers.js → service-helpers.js} +2 -9
  161. package/dist/service-helpers.js.map +1 -0
  162. package/dist/service-local-daemon.d.ts +22 -0
  163. package/dist/service-local-daemon.d.ts.map +1 -0
  164. package/dist/service-local-daemon.js +185 -0
  165. package/dist/service-local-daemon.js.map +1 -0
  166. package/dist/service.d.ts +65 -57
  167. package/dist/service.d.ts.map +1 -1
  168. package/dist/service.js +205 -156
  169. package/dist/service.js.map +1 -1
  170. package/dist/test-utils/channel-service-fixture.d.ts +3 -2
  171. package/dist/test-utils/channel-service-fixture.d.ts.map +1 -1
  172. package/dist/test-utils/channel-service-fixture.js.map +1 -1
  173. package/dist/test-utils/fake-service.d.ts +26 -18
  174. package/dist/test-utils/fake-service.d.ts.map +1 -1
  175. package/dist/test-utils/fake-service.js +28 -42
  176. package/dist/test-utils/fake-service.js.map +1 -1
  177. package/dist/test-utils/ids.d.ts +3 -1
  178. package/dist/test-utils/ids.d.ts.map +1 -1
  179. package/dist/test-utils/ids.js.map +1 -1
  180. package/dist/test-utils/index.d.ts +9 -2
  181. package/dist/test-utils/index.d.ts.map +1 -1
  182. package/dist/test-utils/index.js +8 -1
  183. package/dist/test-utils/index.js.map +1 -1
  184. package/dist/test-utils/standalone-provisioning.d.ts +17 -0
  185. package/dist/test-utils/standalone-provisioning.d.ts.map +1 -0
  186. package/dist/test-utils/standalone-provisioning.js +14 -0
  187. package/dist/test-utils/standalone-provisioning.js.map +1 -0
  188. package/dist/tsconfig.tsbuildinfo +1 -0
  189. package/package.json +49 -27
  190. package/dist/auth.test.d.ts +0 -2
  191. package/dist/auth.test.d.ts.map +0 -1
  192. package/dist/auth.test.js +0 -121
  193. package/dist/auth.test.js.map +0 -1
  194. package/dist/channel-core-context.test.d.ts +0 -2
  195. package/dist/channel-core-context.test.d.ts.map +0 -1
  196. package/dist/channel-core-context.test.js +0 -342
  197. package/dist/channel-core-context.test.js.map +0 -1
  198. package/dist/channel-core-dispatch.test.d.ts +0 -2
  199. package/dist/channel-core-dispatch.test.d.ts.map +0 -1
  200. package/dist/channel-core-dispatch.test.js +0 -557
  201. package/dist/channel-core-dispatch.test.js.map +0 -1
  202. package/dist/channel-core.test.d.ts +0 -2
  203. package/dist/channel-core.test.d.ts.map +0 -1
  204. package/dist/channel-core.test.js +0 -232
  205. package/dist/channel-core.test.js.map +0 -1
  206. package/dist/cli/__tests__/cli-multi-agent.int.test.d.ts +0 -2
  207. package/dist/cli/__tests__/cli-multi-agent.int.test.d.ts.map +0 -1
  208. package/dist/cli/__tests__/cli-multi-agent.int.test.js +0 -132
  209. package/dist/cli/__tests__/cli-multi-agent.int.test.js.map +0 -1
  210. package/dist/cli/commands/invite.d.ts +0 -7
  211. package/dist/cli/commands/invite.d.ts.map +0 -1
  212. package/dist/cli/commands/invite.js +0 -11
  213. package/dist/cli/commands/invite.js.map +0 -1
  214. package/dist/cli/commands/messages.test.d.ts +0 -2
  215. package/dist/cli/commands/messages.test.d.ts.map +0 -1
  216. package/dist/cli/commands/messages.test.js +0 -99
  217. package/dist/cli/commands/messages.test.js.map +0 -1
  218. package/dist/cli/commands/ping.d.ts +0 -7
  219. package/dist/cli/commands/ping.d.ts.map +0 -1
  220. package/dist/cli/commands/ping.js +0 -37
  221. package/dist/cli/commands/ping.js.map +0 -1
  222. package/dist/cli/commands/register.test.d.ts +0 -2
  223. package/dist/cli/commands/register.test.d.ts.map +0 -1
  224. package/dist/cli/commands/register.test.js +0 -91
  225. package/dist/cli/commands/register.test.js.map +0 -1
  226. package/dist/cli/commands/send.test.d.ts +0 -2
  227. package/dist/cli/commands/send.test.d.ts.map +0 -1
  228. package/dist/cli/commands/send.test.js +0 -59
  229. package/dist/cli/commands/send.test.js.map +0 -1
  230. package/dist/cli/commands/start.test.d.ts +0 -2
  231. package/dist/cli/commands/start.test.d.ts.map +0 -1
  232. package/dist/cli/commands/start.test.js +0 -624
  233. package/dist/cli/commands/start.test.js.map +0 -1
  234. package/dist/cli/commands/whoami.d.ts +0 -8
  235. package/dist/cli/commands/whoami.d.ts.map +0 -1
  236. package/dist/cli/commands/whoami.js +0 -28
  237. package/dist/cli/commands/whoami.js.map +0 -1
  238. package/dist/cli/config.d.ts +0 -66
  239. package/dist/cli/config.d.ts.map +0 -1
  240. package/dist/cli/config.js +0 -148
  241. package/dist/cli/config.js.map +0 -1
  242. package/dist/cli/config.test.d.ts +0 -2
  243. package/dist/cli/config.test.d.ts.map +0 -1
  244. package/dist/cli/config.test.js +0 -89
  245. package/dist/cli/config.test.js.map +0 -1
  246. package/dist/cli/http-client.d.ts +0 -17
  247. package/dist/cli/http-client.d.ts.map +0 -1
  248. package/dist/cli/http-client.js +0 -38
  249. package/dist/cli/http-client.js.map +0 -1
  250. package/dist/cli/profile.d.ts +0 -126
  251. package/dist/cli/profile.d.ts.map +0 -1
  252. package/dist/cli/profile.js +0 -231
  253. package/dist/cli/profile.js.map +0 -1
  254. package/dist/cli/profile.test.d.ts +0 -2
  255. package/dist/cli/profile.test.d.ts.map +0 -1
  256. package/dist/cli/profile.test.js +0 -369
  257. package/dist/cli/profile.test.js.map +0 -1
  258. package/dist/cli/transport.test.d.ts +0 -2
  259. package/dist/cli/transport.test.d.ts.map +0 -1
  260. package/dist/cli/transport.test.js +0 -312
  261. package/dist/cli/transport.test.js.map +0 -1
  262. package/dist/notification/__tests__/filter-equivalence.test.d.ts +0 -2
  263. package/dist/notification/__tests__/filter-equivalence.test.d.ts.map +0 -1
  264. package/dist/notification/__tests__/filter-equivalence.test.js +0 -123
  265. package/dist/notification/__tests__/filter-equivalence.test.js.map +0 -1
  266. package/dist/notification/__tests__/snapshot-semantics.test.d.ts +0 -2
  267. package/dist/notification/__tests__/snapshot-semantics.test.d.ts.map +0 -1
  268. package/dist/notification/__tests__/snapshot-semantics.test.js +0 -261
  269. package/dist/notification/__tests__/snapshot-semantics.test.js.map +0 -1
  270. package/dist/notification/__tests__/snapshot-semantics.types-check.d.ts.map +0 -1
  271. package/dist/notification/__tests__/snapshot-semantics.types-check.js +0 -62
  272. package/dist/notification/__tests__/snapshot-semantics.types-check.js.map +0 -1
  273. package/dist/pagination.test.d.ts +0 -2
  274. package/dist/pagination.test.d.ts.map +0 -1
  275. package/dist/pagination.test.js +0 -72
  276. package/dist/pagination.test.js.map +0 -1
  277. package/dist/runtime/close-info.d.ts +0 -84
  278. package/dist/runtime/close-info.d.ts.map +0 -1
  279. package/dist/runtime/close-info.js +0 -102
  280. package/dist/runtime/close-info.js.map +0 -1
  281. package/dist/runtime/close-info.test.d.ts +0 -2
  282. package/dist/runtime/close-info.test.d.ts.map +0 -1
  283. package/dist/runtime/close-info.test.js +0 -109
  284. package/dist/runtime/close-info.test.js.map +0 -1
  285. package/dist/runtime/errors.d.ts +0 -11
  286. package/dist/runtime/errors.d.ts.map +0 -1
  287. package/dist/runtime/errors.js +0 -41
  288. package/dist/runtime/errors.js.map +0 -1
  289. package/dist/runtime/errors.test.d.ts +0 -2
  290. package/dist/runtime/errors.test.d.ts.map +0 -1
  291. package/dist/runtime/errors.test.js +0 -79
  292. package/dist/runtime/errors.test.js.map +0 -1
  293. package/dist/runtime/frame.d.ts +0 -8
  294. package/dist/runtime/frame.d.ts.map +0 -1
  295. package/dist/runtime/frame.js +0 -12
  296. package/dist/runtime/frame.js.map +0 -1
  297. package/dist/runtime/frame.test.d.ts +0 -2
  298. package/dist/runtime/frame.test.d.ts.map +0 -1
  299. package/dist/runtime/frame.test.js +0 -59
  300. package/dist/runtime/frame.test.js.map +0 -1
  301. package/dist/runtime/index.d.ts +0 -10
  302. package/dist/runtime/index.d.ts.map +0 -1
  303. package/dist/runtime/index.js +0 -9
  304. package/dist/runtime/index.js.map +0 -1
  305. package/dist/runtime/local-history.d.ts.map +0 -1
  306. package/dist/runtime/local-history.js.map +0 -1
  307. package/dist/runtime/local-service-commands.d.ts +0 -26
  308. package/dist/runtime/local-service-commands.d.ts.map +0 -1
  309. package/dist/runtime/local-service-commands.js +0 -29
  310. package/dist/runtime/local-service-commands.js.map +0 -1
  311. package/dist/runtime/local-socket-server.d.ts +0 -20
  312. package/dist/runtime/local-socket-server.d.ts.map +0 -1
  313. package/dist/runtime/local-socket-server.js.map +0 -1
  314. package/dist/runtime/refs.d.ts.map +0 -1
  315. package/dist/runtime/refs.js.map +0 -1
  316. package/dist/runtime/runtime.test.d.ts +0 -2
  317. package/dist/runtime/runtime.test.d.ts.map +0 -1
  318. package/dist/runtime/runtime.test.js +0 -37
  319. package/dist/runtime/runtime.test.js.map +0 -1
  320. package/dist/runtime/service-helpers.d.ts.map +0 -1
  321. package/dist/runtime/service-helpers.js.map +0 -1
  322. package/dist/runtime/service-teardown.d.ts +0 -5
  323. package/dist/runtime/service-teardown.d.ts.map +0 -1
  324. package/dist/runtime/service-teardown.js +0 -36
  325. package/dist/runtime/service-teardown.js.map +0 -1
  326. package/dist/runtime/service-teardown.test.d.ts +0 -2
  327. package/dist/runtime/service-teardown.test.d.ts.map +0 -1
  328. package/dist/runtime/service-teardown.test.js +0 -80
  329. package/dist/runtime/service-teardown.test.js.map +0 -1
  330. package/dist/runtime/subscribers.d.ts +0 -152
  331. package/dist/runtime/subscribers.d.ts.map +0 -1
  332. package/dist/runtime/subscribers.js +0 -222
  333. package/dist/runtime/subscribers.js.map +0 -1
  334. package/dist/service-socket-path.test.d.ts +0 -2
  335. package/dist/service-socket-path.test.d.ts.map +0 -1
  336. package/dist/service-socket-path.test.js +0 -87
  337. package/dist/service-socket-path.test.js.map +0 -1
  338. package/dist/service.test.d.ts +0 -2
  339. package/dist/service.test.d.ts.map +0 -1
  340. package/dist/service.test.js +0 -796
  341. package/dist/service.test.js.map +0 -1
  342. package/dist/test/index.d.ts +0 -47
  343. package/dist/test/index.d.ts.map +0 -1
  344. package/dist/test/index.js +0 -39
  345. package/dist/test/index.js.map +0 -1
  346. package/dist/test-utils/conformance-adapter.d.ts +0 -40
  347. package/dist/test-utils/conformance-adapter.d.ts.map +0 -1
  348. package/dist/test-utils/conformance-adapter.js +0 -250
  349. package/dist/test-utils/conformance-adapter.js.map +0 -1
  350. package/dist/tm-client-test-support.d.ts +0 -184
  351. package/dist/tm-client-test-support.d.ts.map +0 -1
  352. package/dist/tm-client-test-support.js +0 -466
  353. package/dist/tm-client-test-support.js.map +0 -1
  354. package/dist/tm-client.d.ts +0 -269
  355. package/dist/tm-client.d.ts.map +0 -1
  356. package/dist/tm-client.js +0 -518
  357. package/dist/tm-client.js.map +0 -1
  358. package/dist/tm-client.test.d.ts +0 -2
  359. package/dist/tm-client.test.d.ts.map +0 -1
  360. package/dist/tm-client.test.js +0 -490
  361. package/dist/tm-client.test.js.map +0 -1
  362. /package/dist/{runtime/refs.d.ts → refs.d.ts} +0 -0
  363. /package/dist/{runtime/refs.js → refs.js} +0 -0
@@ -1,126 +0,0 @@
1
- import { Brand, Effect } from "effect";
2
- /**
3
- * Branded profile name. Enforces the same NAME_PATTERN already gated by
4
- * `commands/register.ts`: `/^[a-z0-9][a-z0-9-]{1,30}[a-z0-9]$/`.
5
- */
6
- export type ProfileName = string & Brand.Brand<"ProfileName">;
7
- /** Sentinel used when the caller addresses the legacy top-level record. */
8
- export type DefaultProfileId = "default";
9
- /**
10
- * One profile's auth record. Shape mirrors the singleton's auth subset.
11
- * `registeredAt` is OPTIONAL — legacy configs produced by pre-v2 `moltzap
12
- * register` never wrote the field. The profile layer tolerates its absence
13
- * so existing `~/.moltzap/config.json` files decode into `LayeredConfig`
14
- * without rewrite (Invariant §4.3).
15
- */
16
- export interface ProfileRecord {
17
- readonly apiKey: string;
18
- readonly agentName: string;
19
- readonly serverUrl: string;
20
- readonly registeredAt?: string;
21
- }
22
- /**
23
- * Layered view of config.json. The legacy top-level keys populate
24
- * `default`; named records live under `profiles.&lt;name>`. `serverUrl`
25
- * is surfaced at the top because it is shared across profiles unless
26
- * a profile overrides it.
27
- */
28
- export interface LayeredConfig {
29
- readonly default: ProfileRecord | undefined;
30
- readonly profiles: ReadonlyMap<ProfileName, ProfileRecord>;
31
- readonly serverUrl: string;
32
- }
33
- /** Exhaustive error union for the profile surface. */
34
- export type ProfileError = ProfileNotFoundError | ProfileAlreadyExistsError | ProfileInvalidNameError | ProfileConfigReadError | ProfileConfigWriteError;
35
- declare const ProfileNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
36
- readonly _tag: "ProfileNotFoundError";
37
- } & Readonly<A>;
38
- export declare class ProfileNotFoundError extends ProfileNotFoundError_base<{
39
- readonly name: string;
40
- }> {
41
- }
42
- declare const ProfileAlreadyExistsError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
43
- readonly _tag: "ProfileAlreadyExistsError";
44
- } & Readonly<A>;
45
- declare class ProfileAlreadyExistsError extends ProfileAlreadyExistsError_base<{
46
- readonly name: string;
47
- }> {
48
- }
49
- declare const ProfileInvalidNameError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
50
- readonly _tag: "ProfileInvalidNameError";
51
- } & Readonly<A>;
52
- export declare class ProfileInvalidNameError extends ProfileInvalidNameError_base<{
53
- readonly name: string;
54
- readonly reason: string;
55
- }> {
56
- }
57
- declare const ProfileConfigReadError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
58
- readonly _tag: "ProfileConfigReadError";
59
- } & Readonly<A>;
60
- export declare class ProfileConfigReadError extends ProfileConfigReadError_base<{
61
- readonly path: string;
62
- readonly cause: unknown;
63
- }> {
64
- }
65
- declare const ProfileConfigWriteError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
66
- readonly _tag: "ProfileConfigWriteError";
67
- } & Readonly<A>;
68
- export declare class ProfileConfigWriteError extends ProfileConfigWriteError_base<{
69
- readonly path: string;
70
- readonly cause: unknown;
71
- }> {
72
- }
73
- /**
74
- * Parse and brand a raw profile name. Rejects the empty string and any
75
- * string that fails NAME_PATTERN.
76
- */
77
- export declare const parseProfileName: (raw: string) => Effect.Effect<ProfileName, ProfileInvalidNameError>;
78
- /**
79
- * Load the full layered config view. Missing file resolves to an empty
80
- * view; malformed file surfaces as ProfileConfigReadError. No silent
81
- * defaults on parse error.
82
- *
83
- * Unknown-key tolerance: the decoder accepts extra top-level keys (e.g.
84
- * future experimental fields) without failing. This keeps forward and
85
- * backward compatibility explicit rather than implicit.
86
- */
87
- export declare const loadLayeredConfig: Effect.Effect<LayeredConfig, ProfileConfigReadError>;
88
- /**
89
- * Resolve the auth record for a given profile name.
90
- *
91
- * When `name` is `undefined`, the `default` record is returned (legacy
92
- * behavior for users who never pass `--profile`). When `name` is supplied
93
- * and no matching record exists, fails with ProfileNotFoundError — do not
94
- * silently fall back to `default`; that would violate Invariant §4.3's
95
- * "takes precedence" clause in the opposite direction.
96
- */
97
- export declare const resolveProfileAuth: (name: ProfileName | undefined) => Effect.Effect<ProfileRecord, ProfileNotFoundError | ProfileConfigReadError>;
98
- /**
99
- * Persist a new profile record under `profiles.&lt;name>`, or replace the
100
- * legacy top-level record when `name` is `"default"`.
101
- *
102
- * When called with `"default"`, writes the legacy top-level `apiKey` /
103
- * `agentName` fields (not under `profiles`) so pre-profile-aware readers
104
- * keep working (Invariant §4.3).
105
- */
106
- export declare const writeProfile: (name: ProfileName | DefaultProfileId, record: ProfileRecord) => Effect.Effect<void, ProfileConfigWriteError | ProfileConfigReadError>;
107
- /**
108
- * `--no-persist` contract for `moltzap register`. Revised Invariant §4.4
109
- * per architect design doc rev 4 finding 2: no file under `$HOME/.moltzap/`
110
- * OR `$HOME/.openclaw/` is created or modified. Returns the record so the
111
- * caller can print it; does no I/O under either tree.
112
- *
113
- * The register command invokes either `writeProfile` + the existing
114
- * `writeOpenClawChannelConfig` (default) or `emitNoPersist` (when the flag
115
- * is set) — both side effects are gated by the single flag. The register
116
- * handler NEVER calls both paths on the same invocation.
117
- *
118
- * The register command pipes the returned record through the printer,
119
- * which writes agentId / apiKey / serverUrl / claimUrl to stdout (so
120
- * callers can `$(moltzap register --no-persist ...)` into env).
121
- */
122
- export declare const emitNoPersist: (record: ProfileRecord) => Effect.Effect<{
123
- readonly record: ProfileRecord;
124
- }, never>;
125
- export {};
126
- //# sourceMappingURL=profile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/cli/profile.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,KAAK,EAAQ,MAAM,EAAU,MAAM,QAAQ,CAAC;AAKrD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAG9D,2EAA2E;AAC3E,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAYzC;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IAC3D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAID,sDAAsD;AACtD,MAAM,M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CAAC,IAAI,EAAE,uBAAuB,GAAG,sBAAsB,CAI7B,CAAC;AAE3C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,aAAa,KACpB,MAAM,CAAC,MAAM,CAAC;IAAE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAA;CAAE,EAAE,KAAK,CAC9B,CAAC"}
@@ -1,231 +0,0 @@
1
- /**
2
- * Profile layer over `~/.moltzap/config.json`.
3
- *
4
- * Backward-compatible extension of the existing singleton: the top-level
5
- * `apiKey` / `agentName` fields (see cli/config.ts) remain the "default"
6
- * record; named profiles live under a new top-level `profiles` key.
7
- *
8
- * Spec sbd#177 rev 3 §5.2 (`--profile &lt;name>`, `--no-persist`),
9
- * Invariants §4.3 (coexistence) and §4.4 (no-disk-write guarantee).
10
- *
11
- * Architect note. The existing `cli/config.ts` pre-dates this branch and is
12
- * not edited here (architect rule: no edits to pre-dating files beyond one
13
- * barrel). `loadLayeredConfig` therefore reads the file directly for the
14
- * profile-aware path; impl-staff may collapse this back into `config.ts`
15
- * during implementation, at which point the profile module becomes a
16
- * named export of `config.ts`. The public interface defined below is the
17
- * contract impl-staff preserves regardless of layout.
18
- */
19
- import { FileSystem } from "@effect/platform";
20
- import { NodeFileSystem } from "@effect/platform-node";
21
- import { Brand, Data, Effect, Either } from "effect";
22
- import { getMoltZapConfigDir, getMoltZapConfigPath } from "../local-paths.js";
23
- const ProfileNameBrand = Brand.nominal();
24
- const NAME_PATTERN = /^[a-z0-9][a-z0-9-]{1,30}[a-z0-9]$/;
25
- const DEFAULT_SERVER_URL = "wss://api.moltzap.xyz";
26
- const CONFIG_FILE_MODE = 0o600;
27
- const JSON_INDENT_SPACES = 2;
28
- const getConfigDir = getMoltZapConfigDir;
29
- const getConfigFilePathSync = getMoltZapConfigPath;
30
- export class ProfileNotFoundError extends Data.TaggedError("ProfileNotFoundError") {
31
- }
32
- class ProfileAlreadyExistsError extends Data.TaggedError("ProfileAlreadyExistsError") {
33
- }
34
- export class ProfileInvalidNameError extends Data.TaggedError("ProfileInvalidNameError") {
35
- }
36
- export class ProfileConfigReadError extends Data.TaggedError("ProfileConfigReadError") {
37
- }
38
- export class ProfileConfigWriteError extends Data.TaggedError("ProfileConfigWriteError") {
39
- }
40
- // ─── Public API ────────────────────────────────────────────────────────────
41
- /**
42
- * Parse and brand a raw profile name. Rejects the empty string and any
43
- * string that fails NAME_PATTERN.
44
- */
45
- export const parseProfileName = (raw) => {
46
- if (raw.length === 0) {
47
- return Effect.fail(new ProfileInvalidNameError({ name: raw, reason: "empty string" }));
48
- }
49
- if (!NAME_PATTERN.test(raw)) {
50
- return Effect.fail(new ProfileInvalidNameError({
51
- name: raw,
52
- reason: "must be 3-32 chars, lowercase alphanumeric and hyphens, cannot start or end with a hyphen",
53
- }));
54
- }
55
- return Effect.succeed(ProfileNameBrand(raw));
56
- };
57
- const isRecord = (x) => typeof x === "object" && x !== null && !Array.isArray(x);
58
- const decodeProfileRecord = (raw, fallbackServerUrl) => {
59
- if (!isRecord(raw))
60
- return undefined;
61
- const { apiKey, agentName } = raw;
62
- if (typeof apiKey !== "string" || typeof agentName !== "string") {
63
- return undefined;
64
- }
65
- const serverUrl = typeof raw.serverUrl === "string" ? raw.serverUrl : fallbackServerUrl;
66
- const record = { apiKey, agentName, serverUrl };
67
- if (typeof raw.registeredAt === "string") {
68
- return { ...record, registeredAt: raw.registeredAt };
69
- }
70
- return record;
71
- };
72
- const readRawConfigText = (configPath) => FileSystem.FileSystem.pipe(Effect.flatMap((fileSystem) => fileSystem
73
- .exists(configPath)
74
- .pipe(Effect.flatMap((exists) => exists
75
- ? fileSystem.readFileString(configPath, "utf-8")
76
- : Effect.succeed(null)))), Effect.provide(NodeFileSystem.layer), Effect.either, Effect.flatMap(Either.match({
77
- onLeft: (cause) => Effect.fail(new ProfileConfigReadError({ path: configPath, cause })),
78
- onRight: (value) => Effect.succeed(value),
79
- })));
80
- const parseRawConfig = (configPath, text) => Effect.try({
81
- try: () => JSON.parse(text),
82
- catch: (err) => new ProfileConfigReadError({ path: configPath, cause: err }),
83
- });
84
- const requireRawConfigRecord = (configPath, parsed) => isRecord(parsed)
85
- ? Effect.succeed(parsed)
86
- : Effect.fail(new ProfileConfigReadError({
87
- path: configPath,
88
- cause: "config root is not a JSON object",
89
- }));
90
- const readRawConfig = () => Effect.gen(function* () {
91
- const configPath = getConfigFilePathSync();
92
- const text = yield* readRawConfigText(configPath);
93
- if (text === null) {
94
- return { raw: {}, existed: false };
95
- }
96
- const parsed = yield* parseRawConfig(configPath, text);
97
- const raw = yield* requireRawConfigRecord(configPath, parsed);
98
- return { raw, existed: true };
99
- });
100
- function defaultProfileFromRaw(raw, serverUrl) {
101
- if (typeof raw.apiKey !== "string" || typeof raw.agentName !== "string") {
102
- return undefined;
103
- }
104
- return {
105
- apiKey: raw.apiKey,
106
- agentName: raw.agentName,
107
- serverUrl,
108
- };
109
- }
110
- function profilesFromRaw(raw, serverUrl) {
111
- const profiles = new Map();
112
- if (!isRecord(raw.profiles))
113
- return profiles;
114
- for (const [name, value] of Object.entries(raw.profiles)) {
115
- if (!NAME_PATTERN.test(name))
116
- continue; // tolerate malformed entries
117
- const record = decodeProfileRecord(value, serverUrl);
118
- if (record !== undefined) {
119
- profiles.set(ProfileNameBrand(name), record);
120
- }
121
- }
122
- return profiles;
123
- }
124
- /**
125
- * Load the full layered config view. Missing file resolves to an empty
126
- * view; malformed file surfaces as ProfileConfigReadError. No silent
127
- * defaults on parse error.
128
- *
129
- * Unknown-key tolerance: the decoder accepts extra top-level keys (e.g.
130
- * future experimental fields) without failing. This keeps forward and
131
- * backward compatibility explicit rather than implicit.
132
- */
133
- export const loadLayeredConfig = Effect.gen(function* () {
134
- const { raw } = yield* readRawConfig();
135
- const serverUrl = typeof raw.serverUrl === "string" ? raw.serverUrl : DEFAULT_SERVER_URL;
136
- return {
137
- default: defaultProfileFromRaw(raw, serverUrl),
138
- profiles: profilesFromRaw(raw, serverUrl),
139
- serverUrl,
140
- };
141
- }).pipe(Effect.withSpan("loadLayeredConfig"));
142
- /**
143
- * Resolve the auth record for a given profile name.
144
- *
145
- * When `name` is `undefined`, the `default` record is returned (legacy
146
- * behavior for users who never pass `--profile`). When `name` is supplied
147
- * and no matching record exists, fails with ProfileNotFoundError — do not
148
- * silently fall back to `default`; that would violate Invariant §4.3's
149
- * "takes precedence" clause in the opposite direction.
150
- */
151
- export const resolveProfileAuth = (name) => Effect.gen(function* () {
152
- const layered = yield* loadLayeredConfig;
153
- if (name === undefined) {
154
- if (layered.default === undefined) {
155
- return yield* Effect.fail(new ProfileNotFoundError({ name: "default" }));
156
- }
157
- return layered.default;
158
- }
159
- const found = layered.profiles.get(name);
160
- if (found === undefined) {
161
- return yield* Effect.fail(new ProfileNotFoundError({ name }));
162
- }
163
- return found;
164
- }).pipe(Effect.withSpan("resolveProfileAuth"));
165
- function profileBodyFromRecord(record) {
166
- return {
167
- apiKey: record.apiKey,
168
- agentName: record.agentName,
169
- serverUrl: record.serverUrl,
170
- ...(record.registeredAt !== undefined
171
- ? { registeredAt: record.registeredAt }
172
- : {}),
173
- };
174
- }
175
- function nextProfileConfig(raw, name, record) {
176
- const next = { ...raw };
177
- if (name === "default") {
178
- next.serverUrl = record.serverUrl;
179
- next.apiKey = record.apiKey;
180
- next.agentName = record.agentName;
181
- return next;
182
- }
183
- const existingProfiles = isRecord(next.profiles) ? next.profiles : {};
184
- next.profiles = {
185
- ...existingProfiles,
186
- [name]: profileBodyFromRecord(record),
187
- };
188
- if (typeof next.serverUrl !== "string") {
189
- next.serverUrl = record.serverUrl;
190
- }
191
- return next;
192
- }
193
- const writeRawConfig = (next) => {
194
- const configDir = getConfigDir();
195
- const configPath = getConfigFilePathSync();
196
- return FileSystem.FileSystem.pipe(Effect.flatMap((fileSystem) => fileSystem
197
- .makeDirectory(configDir, { recursive: true })
198
- .pipe(Effect.zipRight(fileSystem.writeFileString(configPath, JSON.stringify(next, null, JSON_INDENT_SPACES) + "\n", { mode: CONFIG_FILE_MODE })))), Effect.provide(NodeFileSystem.layer), Effect.either, Effect.flatMap(Either.match({
199
- onLeft: (cause) => Effect.fail(new ProfileConfigWriteError({ path: configPath, cause })),
200
- onRight: (value) => Effect.succeed(value),
201
- })));
202
- };
203
- /**
204
- * Persist a new profile record under `profiles.&lt;name>`, or replace the
205
- * legacy top-level record when `name` is `"default"`.
206
- *
207
- * When called with `"default"`, writes the legacy top-level `apiKey` /
208
- * `agentName` fields (not under `profiles`) so pre-profile-aware readers
209
- * keep working (Invariant §4.3).
210
- */
211
- export const writeProfile = (name, record) => Effect.gen(function* () {
212
- const { raw } = yield* readRawConfig();
213
- yield* writeRawConfig(nextProfileConfig(raw, name, record));
214
- }).pipe(Effect.withSpan("writeProfile"));
215
- /**
216
- * `--no-persist` contract for `moltzap register`. Revised Invariant §4.4
217
- * per architect design doc rev 4 finding 2: no file under `$HOME/.moltzap/`
218
- * OR `$HOME/.openclaw/` is created or modified. Returns the record so the
219
- * caller can print it; does no I/O under either tree.
220
- *
221
- * The register command invokes either `writeProfile` + the existing
222
- * `writeOpenClawChannelConfig` (default) or `emitNoPersist` (when the flag
223
- * is set) — both side effects are gated by the single flag. The register
224
- * handler NEVER calls both paths on the same invocation.
225
- *
226
- * The register command pipes the returned record through the printer,
227
- * which writes agentId / apiKey / serverUrl / claimUrl to stdout (so
228
- * callers can `$(moltzap register --no-persist ...)` into env).
229
- */
230
- export const emitNoPersist = (record) => Effect.succeed({ record });
231
- //# sourceMappingURL=profile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/cli/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACr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AG,EAAE,GAAG,KAAK,CAAC,CAAC,aAAa,EAAE,CAAC;IACvC,KAAK,CAAC,CAAC,cAAc,CAAC,iBAAiB,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;AAE3C;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,MAAqB,EACqC,EAAE,CAC5D,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=profile.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.test.d.ts","sourceRoot":"","sources":["../../src/cli/profile.test.ts"],"names":[],"mappings":""}