@openclaw/nostr 2026.9.3 → 2026.9.5

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 (532) hide show
  1. package/assets/activity.svg +3 -0
  2. package/assets/icon.png +0 -0
  3. package/dist/{channel-DWFChLbP.js → .setup/channel-ByGdjtr3.mjs} +35 -19
  4. package/dist/.setup/secret-contract-api-DUmw8THQ.mjs +2 -0
  5. package/dist/.setup/secret-contract-api-nVWula4c.mjs +37 -0
  6. package/dist/.setup/setup-plugin-api-B7i5rR6T.mjs +2 -0
  7. package/dist/.setup/setup-plugin-api-B7qtJE84.mjs +82 -0
  8. package/dist/{setup-surface-mA5PMspO.js → .setup/setup-surface-Dx8QxWSP.mjs} +1 -1
  9. package/dist/api.js +60 -7
  10. package/dist/channel-plugin-api.js +1 -1
  11. package/dist/doctor-contract-api.js +62 -106
  12. package/dist/secret-contract-api.js +1 -36
  13. package/dist/setup-api.js +1 -1
  14. package/dist/setup-entry.js +3 -2
  15. package/dist/setup-plugin-api.js +1 -81
  16. package/node_modules/nostr-tools/lib/cjs/abstract-pool.js +3 -1
  17. package/node_modules/nostr-tools/lib/cjs/abstract-pool.js.map +2 -2
  18. package/node_modules/nostr-tools/lib/cjs/abstract-relay.js +3 -1
  19. package/node_modules/nostr-tools/lib/cjs/abstract-relay.js.map +2 -2
  20. package/node_modules/nostr-tools/lib/cjs/index.js +3 -1
  21. package/node_modules/nostr-tools/lib/cjs/index.js.map +2 -2
  22. package/node_modules/nostr-tools/lib/cjs/nip46.js +3 -1
  23. package/node_modules/nostr-tools/lib/cjs/nip46.js.map +2 -2
  24. package/node_modules/nostr-tools/lib/cjs/pool.js +3 -1
  25. package/node_modules/nostr-tools/lib/cjs/pool.js.map +2 -2
  26. package/node_modules/nostr-tools/lib/cjs/relay.js +3 -1
  27. package/node_modules/nostr-tools/lib/cjs/relay.js.map +2 -2
  28. package/node_modules/nostr-tools/lib/esm/abstract-pool.js +3 -1
  29. package/node_modules/nostr-tools/lib/esm/abstract-pool.js.map +2 -2
  30. package/node_modules/nostr-tools/lib/esm/abstract-relay.js +3 -1
  31. package/node_modules/nostr-tools/lib/esm/abstract-relay.js.map +2 -2
  32. package/node_modules/nostr-tools/lib/esm/index.js +3 -1
  33. package/node_modules/nostr-tools/lib/esm/index.js.map +2 -2
  34. package/node_modules/nostr-tools/lib/esm/nip46.js +3 -1
  35. package/node_modules/nostr-tools/lib/esm/nip46.js.map +2 -2
  36. package/node_modules/nostr-tools/lib/esm/pool.js +3 -1
  37. package/node_modules/nostr-tools/lib/esm/pool.js.map +2 -2
  38. package/node_modules/nostr-tools/lib/esm/relay.js +3 -1
  39. package/node_modules/nostr-tools/lib/esm/relay.js.map +2 -2
  40. package/node_modules/nostr-tools/lib/nostr.bundle.js +3 -1
  41. package/node_modules/nostr-tools/lib/nostr.bundle.js.map +2 -2
  42. package/node_modules/nostr-tools/package.json +1 -1
  43. package/node_modules/zod/README.md +27 -0
  44. package/node_modules/zod/compile.cjs +77 -0
  45. package/node_modules/zod/compile.d.cts +1 -0
  46. package/node_modules/zod/compile.d.ts +1 -0
  47. package/node_modules/zod/compile.js +52 -0
  48. package/node_modules/zod/index.cjs +2 -2
  49. package/node_modules/zod/index.d.cts +1 -2
  50. package/node_modules/zod/index.d.ts +1 -2
  51. package/node_modules/zod/index.js +5 -2
  52. package/node_modules/zod/package.json +13 -2
  53. package/node_modules/zod/src/compile.ts +56 -0
  54. package/node_modules/zod/src/index.ts +5 -2
  55. package/node_modules/zod/src/v3/ZodError.ts +22 -12
  56. package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
  57. package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
  58. package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
  59. package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
  60. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
  61. package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
  62. package/node_modules/zod/src/v3/types.ts +5 -5
  63. package/node_modules/zod/src/v4/classic/checks.ts +1 -0
  64. package/node_modules/zod/src/v4/classic/compat.ts +26 -18
  65. package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
  66. package/node_modules/zod/src/v4/classic/errors.ts +59 -44
  67. package/node_modules/zod/src/v4/classic/external.ts +12 -9
  68. package/node_modules/zod/src/v4/classic/from-json-schema.ts +140 -78
  69. package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
  70. package/node_modules/zod/src/v4/classic/index.ts +2 -2
  71. package/node_modules/zod/src/v4/classic/iso.ts +2 -72
  72. package/node_modules/zod/src/v4/classic/parse.ts +10 -4
  73. package/node_modules/zod/src/v4/classic/schemas.ts +452 -262
  74. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
  75. package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
  76. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +135 -0
  77. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +30 -1
  78. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
  79. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
  80. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
  81. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
  82. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
  83. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +720 -0
  84. package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
  85. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
  86. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
  87. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
  88. package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
  89. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
  90. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +155 -13
  91. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +11 -0
  92. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
  93. package/node_modules/zod/src/v4/classic/tests/error.test.ts +274 -6
  94. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +425 -10
  95. package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
  96. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
  97. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
  98. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
  99. package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
  100. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +281 -0
  101. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +47 -0
  102. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
  103. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +183 -0
  104. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
  105. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
  106. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
  107. package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
  108. package/node_modules/zod/src/v4/classic/tests/number.test.ts +46 -9
  109. package/node_modules/zod/src/v4/classic/tests/object.test.ts +245 -12
  110. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +234 -0
  111. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
  112. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
  113. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
  114. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
  115. package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
  116. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +33 -2
  117. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
  118. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
  119. package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
  120. package/node_modules/zod/src/v4/classic/tests/string.test.ts +127 -5
  121. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
  122. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +11 -2
  123. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1585 -173
  124. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
  125. package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
  126. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +76 -0
  127. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
  128. package/node_modules/zod/src/v4/core/api.ts +48 -12
  129. package/node_modules/zod/src/v4/core/checks.ts +57 -44
  130. package/node_modules/zod/src/v4/core/compile.ts +2188 -0
  131. package/node_modules/zod/src/v4/core/core.ts +98 -19
  132. package/node_modules/zod/src/v4/core/doc.ts +11 -7
  133. package/node_modules/zod/src/v4/core/errors.ts +115 -24
  134. package/node_modules/zod/src/v4/core/index.ts +3 -0
  135. package/node_modules/zod/src/v4/core/json-schema-generator.ts +6 -1
  136. package/node_modules/zod/src/v4/core/json-schema-processors.ts +257 -93
  137. package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
  138. package/node_modules/zod/src/v4/core/memoizer.ts +284 -0
  139. package/node_modules/zod/src/v4/core/parse.ts +131 -38
  140. package/node_modules/zod/src/v4/core/regexes.ts +30 -13
  141. package/node_modules/zod/src/v4/core/registries.ts +2 -2
  142. package/node_modules/zod/src/v4/core/schemas.ts +759 -461
  143. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +969 -0
  144. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
  145. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
  146. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
  147. package/node_modules/zod/src/v4/core/tests/compile.test.ts +1639 -0
  148. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
  149. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
  150. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
  151. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
  152. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
  153. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
  154. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +31 -0
  155. package/node_modules/zod/src/v4/core/to-json-schema.ts +275 -42
  156. package/node_modules/zod/src/v4/core/util.ts +268 -42
  157. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  158. package/node_modules/zod/src/v4/core/visit.ts +193 -0
  159. package/node_modules/zod/src/v4/index.ts +3 -3
  160. package/node_modules/zod/src/v4/locales/ar.ts +3 -0
  161. package/node_modules/zod/src/v4/locales/az.ts +3 -0
  162. package/node_modules/zod/src/v4/locales/be.ts +10 -0
  163. package/node_modules/zod/src/v4/locales/bg.ts +3 -0
  164. package/node_modules/zod/src/v4/locales/bn.ts +121 -0
  165. package/node_modules/zod/src/v4/locales/ca.ts +3 -0
  166. package/node_modules/zod/src/v4/locales/ckb.ts +138 -0
  167. package/node_modules/zod/src/v4/locales/cs.ts +3 -0
  168. package/node_modules/zod/src/v4/locales/da.ts +5 -2
  169. package/node_modules/zod/src/v4/locales/de.ts +3 -0
  170. package/node_modules/zod/src/v4/locales/el.ts +1 -0
  171. package/node_modules/zod/src/v4/locales/en.ts +15 -4
  172. package/node_modules/zod/src/v4/locales/eo.ts +3 -0
  173. package/node_modules/zod/src/v4/locales/es.ts +2 -0
  174. package/node_modules/zod/src/v4/locales/fa.ts +3 -0
  175. package/node_modules/zod/src/v4/locales/fi.ts +3 -0
  176. package/node_modules/zod/src/v4/locales/fr-CA.ts +3 -0
  177. package/node_modules/zod/src/v4/locales/fr.ts +19 -14
  178. package/node_modules/zod/src/v4/locales/gu.ts +121 -0
  179. package/node_modules/zod/src/v4/locales/he.ts +6 -1
  180. package/node_modules/zod/src/v4/locales/hi.ts +124 -0
  181. package/node_modules/zod/src/v4/locales/hr.ts +2 -0
  182. package/node_modules/zod/src/v4/locales/hu.ts +3 -0
  183. package/node_modules/zod/src/v4/locales/hy.ts +9 -0
  184. package/node_modules/zod/src/v4/locales/id.ts +3 -0
  185. package/node_modules/zod/src/v4/locales/index.ts +10 -0
  186. package/node_modules/zod/src/v4/locales/is.ts +3 -0
  187. package/node_modules/zod/src/v4/locales/it.ts +3 -0
  188. package/node_modules/zod/src/v4/locales/ja.ts +3 -0
  189. package/node_modules/zod/src/v4/locales/ka.ts +3 -0
  190. package/node_modules/zod/src/v4/locales/km.ts +3 -0
  191. package/node_modules/zod/src/v4/locales/kn.ts +124 -0
  192. package/node_modules/zod/src/v4/locales/ko.ts +3 -0
  193. package/node_modules/zod/src/v4/locales/lt.ts +2 -0
  194. package/node_modules/zod/src/v4/locales/mk.ts +3 -0
  195. package/node_modules/zod/src/v4/locales/ms.ts +3 -0
  196. package/node_modules/zod/src/v4/locales/ne.ts +126 -0
  197. package/node_modules/zod/src/v4/locales/nl.ts +3 -0
  198. package/node_modules/zod/src/v4/locales/nn.ts +119 -0
  199. package/node_modules/zod/src/v4/locales/no.ts +5 -2
  200. package/node_modules/zod/src/v4/locales/ota.ts +3 -0
  201. package/node_modules/zod/src/v4/locales/pl.ts +3 -0
  202. package/node_modules/zod/src/v4/locales/ps.ts +3 -0
  203. package/node_modules/zod/src/v4/locales/pt-BR.ts +159 -0
  204. package/node_modules/zod/src/v4/locales/pt.ts +99 -58
  205. package/node_modules/zod/src/v4/locales/ro.ts +1 -0
  206. package/node_modules/zod/src/v4/locales/ru.ts +10 -0
  207. package/node_modules/zod/src/v4/locales/sk.ts +121 -0
  208. package/node_modules/zod/src/v4/locales/sl.ts +3 -0
  209. package/node_modules/zod/src/v4/locales/sv.ts +5 -2
  210. package/node_modules/zod/src/v4/locales/ta.ts +3 -0
  211. package/node_modules/zod/src/v4/locales/th.ts +3 -0
  212. package/node_modules/zod/src/v4/locales/tk.ts +111 -0
  213. package/node_modules/zod/src/v4/locales/tr.ts +3 -0
  214. package/node_modules/zod/src/v4/locales/uk.ts +3 -0
  215. package/node_modules/zod/src/v4/locales/ur.ts +3 -0
  216. package/node_modules/zod/src/v4/locales/uz.ts +1 -0
  217. package/node_modules/zod/src/v4/locales/vi.ts +3 -0
  218. package/node_modules/zod/src/v4/locales/yo.ts +3 -0
  219. package/node_modules/zod/src/v4/locales/zh-CN.ts +3 -0
  220. package/node_modules/zod/src/v4/locales/zh-TW.ts +3 -0
  221. package/node_modules/zod/src/v4/mini/checks.ts +1 -0
  222. package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
  223. package/node_modules/zod/src/v4/mini/external.ts +10 -1
  224. package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
  225. package/node_modules/zod/src/v4/mini/parse.ts +2 -0
  226. package/node_modules/zod/src/v4/mini/schemas.ts +135 -56
  227. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
  228. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
  229. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
  230. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
  231. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
  232. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
  233. package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
  234. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
  235. package/node_modules/zod/src/v4/mini/tests/index.test.ts +72 -5
  236. package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
  237. package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
  238. package/node_modules/zod/src/v4/mini/tests/string.test.ts +21 -0
  239. package/node_modules/zod/v3/ZodError.cjs +22 -12
  240. package/node_modules/zod/v3/ZodError.d.cts +1 -1
  241. package/node_modules/zod/v3/ZodError.d.ts +1 -1
  242. package/node_modules/zod/v3/ZodError.js +22 -12
  243. package/node_modules/zod/v3/types.cjs +7 -5
  244. package/node_modules/zod/v3/types.js +7 -5
  245. package/node_modules/zod/v4/classic/checks.cjs +2 -1
  246. package/node_modules/zod/v4/classic/checks.d.cts +1 -1
  247. package/node_modules/zod/v4/classic/checks.d.ts +1 -1
  248. package/node_modules/zod/v4/classic/checks.js +1 -1
  249. package/node_modules/zod/v4/classic/compat.d.cts +9 -11
  250. package/node_modules/zod/v4/classic/compat.d.ts +9 -11
  251. package/node_modules/zod/v4/classic/deep-partial.cjs +39 -0
  252. package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
  253. package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
  254. package/node_modules/zod/v4/classic/deep-partial.js +13 -0
  255. package/node_modules/zod/v4/classic/errors.cjs +43 -34
  256. package/node_modules/zod/v4/classic/errors.d.cts +3 -4
  257. package/node_modules/zod/v4/classic/errors.d.ts +3 -4
  258. package/node_modules/zod/v4/classic/errors.js +43 -34
  259. package/node_modules/zod/v4/classic/external.cjs +30 -27
  260. package/node_modules/zod/v4/classic/external.d.cts +5 -2
  261. package/node_modules/zod/v4/classic/external.d.ts +5 -2
  262. package/node_modules/zod/v4/classic/external.js +5 -8
  263. package/node_modules/zod/v4/classic/from-json-schema.cjs +136 -75
  264. package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
  265. package/node_modules/zod/v4/classic/in-out.cjs +63 -0
  266. package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
  267. package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
  268. package/node_modules/zod/v4/classic/in-out.js +36 -0
  269. package/node_modules/zod/v4/classic/index.cjs +2 -2
  270. package/node_modules/zod/v4/classic/index.d.cts +1 -2
  271. package/node_modules/zod/v4/classic/index.d.ts +1 -2
  272. package/node_modules/zod/v4/classic/index.js +2 -2
  273. package/node_modules/zod/v4/classic/iso.cjs +11 -22
  274. package/node_modules/zod/v4/classic/iso.d.cts +2 -17
  275. package/node_modules/zod/v4/classic/iso.d.ts +2 -17
  276. package/node_modules/zod/v4/classic/iso.js +2 -17
  277. package/node_modules/zod/v4/classic/parse.cjs +4 -1
  278. package/node_modules/zod/v4/classic/parse.d.cts +17 -4
  279. package/node_modules/zod/v4/classic/parse.d.ts +17 -4
  280. package/node_modules/zod/v4/classic/parse.js +1 -0
  281. package/node_modules/zod/v4/classic/schemas.cjs +498 -398
  282. package/node_modules/zod/v4/classic/schemas.d.cts +53 -18
  283. package/node_modules/zod/v4/classic/schemas.d.ts +53 -18
  284. package/node_modules/zod/v4/classic/schemas.js +492 -396
  285. package/node_modules/zod/v4/core/api.cjs +23 -4
  286. package/node_modules/zod/v4/core/api.d.cts +13 -9
  287. package/node_modules/zod/v4/core/api.d.ts +13 -9
  288. package/node_modules/zod/v4/core/api.js +21 -4
  289. package/node_modules/zod/v4/core/checks.cjs +37 -31
  290. package/node_modules/zod/v4/core/checks.d.cts +13 -13
  291. package/node_modules/zod/v4/core/checks.d.ts +13 -13
  292. package/node_modules/zod/v4/core/checks.js +37 -31
  293. package/node_modules/zod/v4/core/compile.cjs +1813 -0
  294. package/node_modules/zod/v4/core/compile.d.cts +51 -0
  295. package/node_modules/zod/v4/core/compile.d.ts +51 -0
  296. package/node_modules/zod/v4/core/compile.js +1783 -0
  297. package/node_modules/zod/v4/core/core.cjs +81 -18
  298. package/node_modules/zod/v4/core/core.d.cts +16 -4
  299. package/node_modules/zod/v4/core/core.d.ts +16 -4
  300. package/node_modules/zod/v4/core/core.js +82 -19
  301. package/node_modules/zod/v4/core/doc.cjs +5 -7
  302. package/node_modules/zod/v4/core/doc.d.cts +3 -1
  303. package/node_modules/zod/v4/core/doc.d.ts +3 -1
  304. package/node_modules/zod/v4/core/doc.js +5 -7
  305. package/node_modules/zod/v4/core/errors.cjs +110 -25
  306. package/node_modules/zod/v4/core/errors.d.cts +4 -0
  307. package/node_modules/zod/v4/core/errors.d.ts +4 -0
  308. package/node_modules/zod/v4/core/errors.js +110 -25
  309. package/node_modules/zod/v4/core/index.cjs +5 -1
  310. package/node_modules/zod/v4/core/index.d.cts +3 -0
  311. package/node_modules/zod/v4/core/index.d.ts +3 -0
  312. package/node_modules/zod/v4/core/index.js +3 -0
  313. package/node_modules/zod/v4/core/json-schema-generator.cjs +4 -0
  314. package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
  315. package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
  316. package/node_modules/zod/v4/core/json-schema-generator.js +4 -0
  317. package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
  318. package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
  319. package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
  320. package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
  321. package/node_modules/zod/v4/core/memoizer.cjs +272 -0
  322. package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
  323. package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
  324. package/node_modules/zod/v4/core/memoizer.js +265 -0
  325. package/node_modules/zod/v4/core/parse.cjs +96 -34
  326. package/node_modules/zod/v4/core/parse.d.cts +14 -11
  327. package/node_modules/zod/v4/core/parse.d.ts +14 -11
  328. package/node_modules/zod/v4/core/parse.js +94 -33
  329. package/node_modules/zod/v4/core/regexes.cjs +27 -15
  330. package/node_modules/zod/v4/core/regexes.d.cts +2 -0
  331. package/node_modules/zod/v4/core/regexes.d.ts +2 -0
  332. package/node_modules/zod/v4/core/regexes.js +24 -13
  333. package/node_modules/zod/v4/core/registries.js +2 -2
  334. package/node_modules/zod/v4/core/schemas.cjs +537 -326
  335. package/node_modules/zod/v4/core/schemas.d.cts +100 -31
  336. package/node_modules/zod/v4/core/schemas.d.ts +100 -31
  337. package/node_modules/zod/v4/core/schemas.js +526 -325
  338. package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
  339. package/node_modules/zod/v4/core/to-json-schema.d.cts +42 -3
  340. package/node_modules/zod/v4/core/to-json-schema.d.ts +42 -3
  341. package/node_modules/zod/v4/core/to-json-schema.js +241 -39
  342. package/node_modules/zod/v4/core/util.cjs +212 -31
  343. package/node_modules/zod/v4/core/util.d.cts +58 -1
  344. package/node_modules/zod/v4/core/util.d.ts +58 -1
  345. package/node_modules/zod/v4/core/util.js +202 -30
  346. package/node_modules/zod/v4/core/versions.cjs +2 -2
  347. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  348. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  349. package/node_modules/zod/v4/core/versions.js +2 -2
  350. package/node_modules/zod/v4/core/visit.cjs +195 -0
  351. package/node_modules/zod/v4/core/visit.d.cts +30 -0
  352. package/node_modules/zod/v4/core/visit.d.ts +30 -0
  353. package/node_modules/zod/v4/core/visit.js +169 -0
  354. package/node_modules/zod/v4/index.cjs +15 -5
  355. package/node_modules/zod/v4/index.d.cts +2 -2
  356. package/node_modules/zod/v4/index.d.ts +2 -2
  357. package/node_modules/zod/v4/index.js +3 -2
  358. package/node_modules/zod/v4/locales/ar.cjs +3 -0
  359. package/node_modules/zod/v4/locales/ar.js +3 -0
  360. package/node_modules/zod/v4/locales/az.cjs +3 -0
  361. package/node_modules/zod/v4/locales/az.js +3 -0
  362. package/node_modules/zod/v4/locales/be.cjs +10 -0
  363. package/node_modules/zod/v4/locales/be.js +10 -0
  364. package/node_modules/zod/v4/locales/bg.cjs +3 -0
  365. package/node_modules/zod/v4/locales/bg.js +3 -0
  366. package/node_modules/zod/v4/locales/bn.cjs +138 -0
  367. package/node_modules/zod/v4/locales/bn.d.cts +5 -0
  368. package/node_modules/zod/v4/locales/bn.d.ts +4 -0
  369. package/node_modules/zod/v4/locales/bn.js +111 -0
  370. package/node_modules/zod/v4/locales/ca.cjs +3 -0
  371. package/node_modules/zod/v4/locales/ca.js +3 -0
  372. package/node_modules/zod/v4/locales/ckb.cjs +158 -0
  373. package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
  374. package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
  375. package/node_modules/zod/v4/locales/ckb.js +131 -0
  376. package/node_modules/zod/v4/locales/cs.cjs +3 -0
  377. package/node_modules/zod/v4/locales/cs.js +3 -0
  378. package/node_modules/zod/v4/locales/da.cjs +5 -2
  379. package/node_modules/zod/v4/locales/da.js +5 -2
  380. package/node_modules/zod/v4/locales/de.cjs +3 -0
  381. package/node_modules/zod/v4/locales/de.js +3 -0
  382. package/node_modules/zod/v4/locales/el.cjs +1 -0
  383. package/node_modules/zod/v4/locales/el.js +1 -0
  384. package/node_modules/zod/v4/locales/en.cjs +14 -4
  385. package/node_modules/zod/v4/locales/en.js +14 -4
  386. package/node_modules/zod/v4/locales/eo.cjs +3 -0
  387. package/node_modules/zod/v4/locales/eo.js +3 -0
  388. package/node_modules/zod/v4/locales/es.cjs +2 -0
  389. package/node_modules/zod/v4/locales/es.js +2 -0
  390. package/node_modules/zod/v4/locales/fa.cjs +3 -0
  391. package/node_modules/zod/v4/locales/fa.js +3 -0
  392. package/node_modules/zod/v4/locales/fi.cjs +3 -0
  393. package/node_modules/zod/v4/locales/fi.js +3 -0
  394. package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
  395. package/node_modules/zod/v4/locales/fr-CA.js +3 -0
  396. package/node_modules/zod/v4/locales/fr.cjs +16 -14
  397. package/node_modules/zod/v4/locales/fr.js +16 -14
  398. package/node_modules/zod/v4/locales/gu.cjs +138 -0
  399. package/node_modules/zod/v4/locales/gu.d.cts +5 -0
  400. package/node_modules/zod/v4/locales/gu.d.ts +4 -0
  401. package/node_modules/zod/v4/locales/gu.js +111 -0
  402. package/node_modules/zod/v4/locales/he.cjs +5 -0
  403. package/node_modules/zod/v4/locales/he.js +5 -0
  404. package/node_modules/zod/v4/locales/hi.cjs +136 -0
  405. package/node_modules/zod/v4/locales/hi.d.cts +5 -0
  406. package/node_modules/zod/v4/locales/hi.d.ts +4 -0
  407. package/node_modules/zod/v4/locales/hi.js +109 -0
  408. package/node_modules/zod/v4/locales/hr.cjs +2 -0
  409. package/node_modules/zod/v4/locales/hr.js +2 -0
  410. package/node_modules/zod/v4/locales/hu.cjs +3 -0
  411. package/node_modules/zod/v4/locales/hu.js +3 -0
  412. package/node_modules/zod/v4/locales/hy.cjs +9 -0
  413. package/node_modules/zod/v4/locales/hy.js +9 -0
  414. package/node_modules/zod/v4/locales/id.cjs +3 -0
  415. package/node_modules/zod/v4/locales/id.js +3 -0
  416. package/node_modules/zod/v4/locales/index.cjs +22 -2
  417. package/node_modules/zod/v4/locales/index.d.cts +10 -0
  418. package/node_modules/zod/v4/locales/index.d.ts +10 -0
  419. package/node_modules/zod/v4/locales/index.js +10 -0
  420. package/node_modules/zod/v4/locales/is.cjs +3 -0
  421. package/node_modules/zod/v4/locales/is.js +3 -0
  422. package/node_modules/zod/v4/locales/it.cjs +3 -0
  423. package/node_modules/zod/v4/locales/it.js +3 -0
  424. package/node_modules/zod/v4/locales/ja.cjs +3 -0
  425. package/node_modules/zod/v4/locales/ja.js +3 -0
  426. package/node_modules/zod/v4/locales/ka.cjs +3 -0
  427. package/node_modules/zod/v4/locales/ka.js +3 -0
  428. package/node_modules/zod/v4/locales/km.cjs +3 -0
  429. package/node_modules/zod/v4/locales/km.js +3 -0
  430. package/node_modules/zod/v4/locales/kn.cjs +141 -0
  431. package/node_modules/zod/v4/locales/kn.d.cts +5 -0
  432. package/node_modules/zod/v4/locales/kn.d.ts +4 -0
  433. package/node_modules/zod/v4/locales/kn.js +114 -0
  434. package/node_modules/zod/v4/locales/ko.cjs +3 -0
  435. package/node_modules/zod/v4/locales/ko.js +3 -0
  436. package/node_modules/zod/v4/locales/lt.cjs +2 -0
  437. package/node_modules/zod/v4/locales/lt.js +2 -0
  438. package/node_modules/zod/v4/locales/mk.cjs +3 -0
  439. package/node_modules/zod/v4/locales/mk.js +3 -0
  440. package/node_modules/zod/v4/locales/ms.cjs +3 -0
  441. package/node_modules/zod/v4/locales/ms.js +3 -0
  442. package/node_modules/zod/v4/locales/ne.cjs +136 -0
  443. package/node_modules/zod/v4/locales/ne.d.cts +5 -0
  444. package/node_modules/zod/v4/locales/ne.d.ts +4 -0
  445. package/node_modules/zod/v4/locales/ne.js +109 -0
  446. package/node_modules/zod/v4/locales/nl.cjs +3 -0
  447. package/node_modules/zod/v4/locales/nl.js +3 -0
  448. package/node_modules/zod/v4/locales/nn.cjs +138 -0
  449. package/node_modules/zod/v4/locales/nn.d.cts +5 -0
  450. package/node_modules/zod/v4/locales/nn.d.ts +4 -0
  451. package/node_modules/zod/v4/locales/nn.js +111 -0
  452. package/node_modules/zod/v4/locales/no.cjs +5 -2
  453. package/node_modules/zod/v4/locales/no.js +5 -2
  454. package/node_modules/zod/v4/locales/ota.cjs +3 -0
  455. package/node_modules/zod/v4/locales/ota.js +3 -0
  456. package/node_modules/zod/v4/locales/pl.cjs +3 -0
  457. package/node_modules/zod/v4/locales/pl.js +3 -0
  458. package/node_modules/zod/v4/locales/ps.cjs +3 -0
  459. package/node_modules/zod/v4/locales/ps.js +3 -0
  460. package/node_modules/zod/v4/locales/pt-BR.cjs +168 -0
  461. package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
  462. package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
  463. package/node_modules/zod/v4/locales/pt-BR.js +141 -0
  464. package/node_modules/zod/v4/locales/pt.cjs +87 -55
  465. package/node_modules/zod/v4/locales/pt.js +87 -55
  466. package/node_modules/zod/v4/locales/ro.cjs +1 -0
  467. package/node_modules/zod/v4/locales/ro.js +1 -0
  468. package/node_modules/zod/v4/locales/ru.cjs +10 -0
  469. package/node_modules/zod/v4/locales/ru.js +10 -0
  470. package/node_modules/zod/v4/locales/sk.cjs +141 -0
  471. package/node_modules/zod/v4/locales/sk.d.cts +5 -0
  472. package/node_modules/zod/v4/locales/sk.d.ts +4 -0
  473. package/node_modules/zod/v4/locales/sk.js +114 -0
  474. package/node_modules/zod/v4/locales/sl.cjs +3 -0
  475. package/node_modules/zod/v4/locales/sl.js +3 -0
  476. package/node_modules/zod/v4/locales/sv.cjs +5 -2
  477. package/node_modules/zod/v4/locales/sv.js +5 -2
  478. package/node_modules/zod/v4/locales/ta.cjs +3 -0
  479. package/node_modules/zod/v4/locales/ta.js +3 -0
  480. package/node_modules/zod/v4/locales/th.cjs +3 -0
  481. package/node_modules/zod/v4/locales/th.js +3 -0
  482. package/node_modules/zod/v4/locales/tk.cjs +132 -0
  483. package/node_modules/zod/v4/locales/tk.d.cts +5 -0
  484. package/node_modules/zod/v4/locales/tk.d.ts +4 -0
  485. package/node_modules/zod/v4/locales/tk.js +105 -0
  486. package/node_modules/zod/v4/locales/tr.cjs +3 -0
  487. package/node_modules/zod/v4/locales/tr.js +3 -0
  488. package/node_modules/zod/v4/locales/uk.cjs +3 -0
  489. package/node_modules/zod/v4/locales/uk.js +3 -0
  490. package/node_modules/zod/v4/locales/ur.cjs +3 -0
  491. package/node_modules/zod/v4/locales/ur.js +3 -0
  492. package/node_modules/zod/v4/locales/uz.cjs +1 -0
  493. package/node_modules/zod/v4/locales/uz.js +1 -0
  494. package/node_modules/zod/v4/locales/vi.cjs +3 -0
  495. package/node_modules/zod/v4/locales/vi.js +3 -0
  496. package/node_modules/zod/v4/locales/yo.cjs +3 -0
  497. package/node_modules/zod/v4/locales/yo.js +3 -0
  498. package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
  499. package/node_modules/zod/v4/locales/zh-CN.js +3 -0
  500. package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
  501. package/node_modules/zod/v4/locales/zh-TW.js +3 -0
  502. package/node_modules/zod/v4/mini/checks.cjs +2 -1
  503. package/node_modules/zod/v4/mini/checks.d.cts +1 -1
  504. package/node_modules/zod/v4/mini/checks.d.ts +1 -1
  505. package/node_modules/zod/v4/mini/checks.js +1 -1
  506. package/node_modules/zod/v4/mini/deep-partial.cjs +39 -0
  507. package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
  508. package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
  509. package/node_modules/zod/v4/mini/deep-partial.js +13 -0
  510. package/node_modules/zod/v4/mini/external.cjs +12 -1
  511. package/node_modules/zod/v4/mini/external.d.cts +5 -2
  512. package/node_modules/zod/v4/mini/external.d.ts +5 -2
  513. package/node_modules/zod/v4/mini/external.js +3 -1
  514. package/node_modules/zod/v4/mini/in-out.cjs +63 -0
  515. package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
  516. package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
  517. package/node_modules/zod/v4/mini/in-out.js +36 -0
  518. package/node_modules/zod/v4/mini/parse.cjs +3 -1
  519. package/node_modules/zod/v4/mini/parse.d.cts +1 -1
  520. package/node_modules/zod/v4/mini/parse.d.ts +1 -1
  521. package/node_modules/zod/v4/mini/parse.js +1 -1
  522. package/node_modules/zod/v4/mini/schemas.cjs +75 -47
  523. package/node_modules/zod/v4/mini/schemas.d.cts +43 -13
  524. package/node_modules/zod/v4/mini/schemas.d.ts +43 -13
  525. package/node_modules/zod/v4/mini/schemas.js +71 -45
  526. package/openclaw.plugin.json +6 -7
  527. package/package.json +10 -7
  528. package/node_modules/zod/src/v4/core/config.ts +0 -15
  529. /package/dist/{config-schema-CkYd8ACn.js → .setup/config-schema-CkYd8ACn.mjs} +0 -0
  530. /package/dist/{inbound-direct-dm-runtime-DHn9NoYN.js → .setup/inbound-direct-dm-runtime-DHn9NoYN.mjs} +0 -0
  531. /package/dist/{setup-adapter-KJ_iGKiG.js → .setup/setup-adapter-KJ_iGKiG.mjs} +0 -0
  532. /package/dist/{state-account-id-CvBZ9s6P.js → .setup/state-account-id-CvBZ9s6P.mjs} +0 -0
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
2
+ <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4 18V6h5l6 12h5V6M9 6l11 12M4 6l11 12" />
3
+ </svg>
Binary file
@@ -1,7 +1,7 @@
1
- import { a as listNostrAccountIds, c as normalizePubkey, n as nostrSetupContract, o as resolveDefaultNostrAccountId, r as nostrSetupWizard, s as resolveNostrAccount } from "./setup-surface-mA5PMspO.js";
2
- import { a as collectStatusIssuesFromLastError, i as buildChannelConfigSchema, n as NostrProfileSchema, o as createDefaultChannelRuntimeState, r as DEFAULT_ACCOUNT_ID, s as formatPairingApproveHint, t as NostrConfigSchema } from "./config-schema-CkYd8ACn.js";
3
- import { c as validatePrivateKey, l as DEFAULT_RELAYS } from "./setup-adapter-KJ_iGKiG.js";
4
- import { t as normalizeNostrStateAccountId } from "./state-account-id-CvBZ9s6P.js";
1
+ import { a as listNostrAccountIds, c as normalizePubkey, n as nostrSetupContract, o as resolveDefaultNostrAccountId, r as nostrSetupWizard, s as resolveNostrAccount } from "./setup-surface-Dx8QxWSP.mjs";
2
+ import { a as collectStatusIssuesFromLastError, i as buildChannelConfigSchema, n as NostrProfileSchema, o as createDefaultChannelRuntimeState, r as DEFAULT_ACCOUNT_ID, s as formatPairingApproveHint, t as NostrConfigSchema } from "./config-schema-CkYd8ACn.mjs";
3
+ import { c as validatePrivateKey, l as DEFAULT_RELAYS } from "./setup-adapter-KJ_iGKiG.mjs";
4
+ import { t as normalizeNostrStateAccountId } from "./state-account-id-CvBZ9s6P.mjs";
5
5
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
6
6
  import { createScopedDmSecurityResolver, createTopLevelChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
7
7
  import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
@@ -1050,7 +1050,7 @@ async function startNostrBus(options) {
1050
1050
  return;
1051
1051
  }
1052
1052
  const replyTo = async (text) => {
1053
- await sendEncryptedDm(pool, sk, event.pubkey, text, relays, metrics, circuitBreakers, healthTracker, onError, event.id);
1053
+ await sendEncryptedDm(pool, sk, event.pubkey, text, relays, metrics, circuitBreakers, healthTracker, onError, { replyToEventId: event.id });
1054
1054
  };
1055
1055
  if (Buffer.byteLength(event.content, "utf8") > guardPolicy.maxCiphertextBytes) {
1056
1056
  if (rejectIfGlobalRateLimited()) throw new Error(`Nostr event ${event.id} hit the global rate limit.`);
@@ -1214,8 +1214,8 @@ async function startNostrBus(options) {
1214
1214
  await Promise.allSettled([stopRelays("startup failed"), ingress.stop()]);
1215
1215
  throw error;
1216
1216
  }
1217
- const sendDm = async (toPubkey, text) => {
1218
- return await sendEncryptedDm(pool, sk, toPubkey, text, relays, metrics, circuitBreakers, healthTracker, onError);
1217
+ const sendDm = async (toPubkey, text, sendOptions) => {
1218
+ return await sendEncryptedDm(pool, sk, toPubkey, text, relays, metrics, circuitBreakers, healthTracker, onError, sendOptions);
1219
1219
  };
1220
1220
  const publishProfile$1 = async (profile) => {
1221
1221
  const lastPublishedAt = (await readNostrProfileState({ accountId }))?.lastPublishedAt ?? void 0;
@@ -1263,10 +1263,10 @@ async function startNostrBus(options) {
1263
1263
  /**
1264
1264
  * Send an encrypted DM to a pubkey
1265
1265
  */
1266
- async function sendEncryptedDm(pool, sk, toPubkey, text, relays, metrics, circuitBreakers, healthTracker, onError, replyToEventId) {
1266
+ async function sendEncryptedDm(pool, sk, toPubkey, text, relays, metrics, circuitBreakers, healthTracker, onError, options) {
1267
1267
  const ciphertext = encrypt(sk, toPubkey, text);
1268
1268
  const tags = [["p", toPubkey]];
1269
- if (replyToEventId) tags.push(["e", replyToEventId]);
1269
+ if (options?.replyToEventId) tags.push(["e", options.replyToEventId]);
1270
1270
  const reply = finalizeEvent({
1271
1271
  kind: 4,
1272
1272
  content: ciphertext,
@@ -1276,16 +1276,11 @@ async function sendEncryptedDm(pool, sk, toPubkey, text, relays, metrics, circui
1276
1276
  const sortedRelays = healthTracker.getSortedRelays(relays);
1277
1277
  let lastError;
1278
1278
  for (const relay of sortedRelays) {
1279
+ options?.assertDirectAdapterHandoff?.();
1279
1280
  const cb = circuitBreakers.get(relay);
1280
1281
  if (cb && !cb.canAttempt()) continue;
1281
1282
  const startTime = Date.now();
1282
- try {
1283
- await pool.publish([relay], reply)[0];
1284
- const latency = Date.now() - startTime;
1285
- cb?.recordSuccess();
1286
- healthTracker.recordSuccess(relay, latency);
1287
- return reply.id;
1288
- } catch (err) {
1283
+ const recordFailure = (err) => {
1289
1284
  lastError = err instanceof Error ? err : new Error(String(err));
1290
1285
  const latency = Date.now() - startTime;
1291
1286
  cb?.recordFailure();
@@ -1295,6 +1290,24 @@ async function sendEncryptedDm(pool, sk, toPubkey, text, relays, metrics, circui
1295
1290
  latency
1296
1291
  });
1297
1292
  onError?.(lastError, `publish to ${relay}`);
1293
+ };
1294
+ const connection = await pool.ensureRelay(relay, { connectionTimeout: pool.maxWaitForConnection }).catch((err) => {
1295
+ recordFailure(/* @__PURE__ */ new Error(`connection failure: ${String(err)}`));
1296
+ });
1297
+ if (!connection) continue;
1298
+ options?.assertDirectAdapterHandoff?.();
1299
+ if (options?.onPlatformSendDispatch) {
1300
+ await options.onPlatformSendDispatch();
1301
+ options.assertDirectAdapterHandoff?.();
1302
+ }
1303
+ try {
1304
+ await connection.publish(reply);
1305
+ const latency = Date.now() - startTime;
1306
+ cb?.recordSuccess();
1307
+ healthTracker.recordSuccess(relay, latency);
1308
+ return reply.id;
1309
+ } catch (err) {
1310
+ recordFailure(err);
1298
1311
  }
1299
1312
  }
1300
1313
  throw new Error(`Failed to publish to any relay: ${lastError?.message}`);
@@ -1408,7 +1421,7 @@ const startNostrGatewayAccount = async (ctx) => {
1408
1421
  ctx.log?.warn?.(`[${account.accountId}] dropping Nostr DM after preflight drift (${senderPubkey}, ${resolvedAccess.senderAccess.reasonCode})`);
1409
1422
  return;
1410
1423
  }
1411
- const { dispatchInboundDirectDm } = await import("./inbound-direct-dm-runtime-DHn9NoYN.js");
1424
+ const { dispatchInboundDirectDm } = await import("./inbound-direct-dm-runtime-DHn9NoYN.mjs");
1412
1425
  await dispatchInboundDirectDm({
1413
1426
  channelRuntime,
1414
1427
  resolveChannelIngress: async (contextBinding) => {
@@ -1517,7 +1530,7 @@ const nostrOutboundAdapter = {
1517
1530
  text: true,
1518
1531
  messageSendingHooks: true
1519
1532
  } },
1520
- sendText: async ({ cfg, to, text, accountId }) => {
1533
+ sendText: async ({ cfg, to, text, accountId, assertDirectAdapterHandoff, onPlatformSendDispatch }) => {
1521
1534
  const core = getNostrRuntime();
1522
1535
  const aid = accountId ?? resolveDefaultNostrAccountId(cfg);
1523
1536
  const bus = activeBuses.get(aid);
@@ -1530,7 +1543,10 @@ const nostrOutboundAdapter = {
1530
1543
  const message = stripMarkdown(core.channel.text.convertMarkdownTables(text ?? "", tableMode));
1531
1544
  if (!message) throw new Error("Nostr send requires non-empty text after markdown stripping.");
1532
1545
  const normalizedTo = normalizePubkey(to);
1533
- const eventId = await bus.sendDm(normalizedTo, message);
1546
+ const eventId = await bus.sendDm(normalizedTo, message, {
1547
+ assertDirectAdapterHandoff,
1548
+ onPlatformSendDispatch
1549
+ });
1534
1550
  return attachChannelToResult("nostr", {
1535
1551
  to: normalizedTo,
1536
1552
  messageId: eventId
@@ -0,0 +1,2 @@
1
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-api-nVWula4c.mjs";
2
+ export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
@@ -0,0 +1,37 @@
1
+ import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
2
+ import { collectSecretInputAssignment, createChannelSecretTargetRegistryEntries, getChannelRecord } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
3
+ //#region extensions/nostr/src/secret-contract.ts
4
+ const secretTargetRegistryEntries = createChannelSecretTargetRegistryEntries({
5
+ channelKey: "nostr",
6
+ channel: ["privateKey"]
7
+ });
8
+ function collectRuntimeConfigAssignments(params) {
9
+ const nostr = getChannelRecord(params.config, "nostr");
10
+ if (!nostr) return;
11
+ const accountId = normalizeAccountId(typeof nostr.defaultAccount === "string" ? nostr.defaultAccount : void 0);
12
+ collectSecretInputAssignment({
13
+ value: nostr.privateKey,
14
+ path: "channels.nostr.privateKey",
15
+ expected: "string",
16
+ defaults: params.defaults,
17
+ context: params.context,
18
+ active: nostr.enabled !== false,
19
+ inactiveReason: "Nostr channel is disabled.",
20
+ owner: {
21
+ ownerKind: "account",
22
+ ownerId: `nostr:${accountId}`,
23
+ requiredForGateway: false,
24
+ disposition: "isolate",
25
+ contract: nostr
26
+ },
27
+ apply: (value) => {
28
+ nostr.privateKey = value;
29
+ }
30
+ });
31
+ }
32
+ const channelSecrets = {
33
+ secretTargetRegistryEntries,
34
+ collectRuntimeConfigAssignments
35
+ };
36
+ //#endregion
37
+ export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
@@ -0,0 +1,2 @@
1
+ import { t as nostrSetupPlugin } from "./setup-plugin-api-B7qtJE84.mjs";
2
+ export { nostrSetupPlugin };
@@ -0,0 +1,82 @@
1
+ import { i as buildChannelConfigSchema, t as NostrConfigSchema } from "./config-schema-CkYd8ACn.mjs";
2
+ import { i as createNostrSetupStatus, l as DEFAULT_RELAYS, n as createNostrSetupAdapter, o as hasConfiguredNostrPrivateKey, r as createNostrSetupContract, s as resolveNostrPrivateKey } from "./setup-adapter-KJ_iGKiG.mjs";
3
+ import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
4
+ import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
5
+ import { createDelegatedSetupWizardProxy } from "openclaw/plugin-sdk/setup-runtime";
6
+ //#region extensions/nostr/src/channel.setup.ts
7
+ const channel = "nostr";
8
+ function getNostrConfig(cfg) {
9
+ return cfg.channels?.nostr;
10
+ }
11
+ function resolveDefaultSetupNostrAccountId(cfg) {
12
+ return normalizeAccountId(getNostrConfig(cfg)?.defaultAccount);
13
+ }
14
+ function resolveSetupNostrAccount(params) {
15
+ const nostrCfg = getNostrConfig(params.cfg);
16
+ const accountId = normalizeAccountId(params.accountId ?? resolveDefaultSetupNostrAccountId(params.cfg));
17
+ const privateKey = resolveNostrPrivateKey(nostrCfg?.privateKey);
18
+ const configured = hasConfiguredNostrPrivateKey(nostrCfg?.privateKey);
19
+ return {
20
+ accountId,
21
+ name: typeof nostrCfg?.name === "string" ? nostrCfg.name : void 0,
22
+ enabled: nostrCfg?.enabled !== false,
23
+ configured,
24
+ privateKey,
25
+ publicKey: "",
26
+ relays: nostrCfg?.relays ?? DEFAULT_RELAYS,
27
+ profile: nostrCfg?.profile,
28
+ config: {
29
+ enabled: nostrCfg?.enabled,
30
+ name: nostrCfg?.name,
31
+ privateKey: nostrCfg?.privateKey,
32
+ relays: nostrCfg?.relays,
33
+ dmPolicy: nostrCfg?.dmPolicy,
34
+ allowFrom: nostrCfg?.allowFrom,
35
+ profile: nostrCfg?.profile
36
+ }
37
+ };
38
+ }
39
+ const nostrSetupWizard = createDelegatedSetupWizardProxy({
40
+ channel,
41
+ loadWizard: async () => (await import("./setup-surface-Dx8QxWSP.mjs").then((n) => n.i)).nostrSetupWizard,
42
+ status: createNostrSetupStatus(resolveSetupNostrAccount),
43
+ resolveShouldPromptAccountIds: () => false,
44
+ delegatePrepare: true,
45
+ delegateFinalize: true
46
+ });
47
+ const nostrSetupPlugin = {
48
+ id: channel,
49
+ meta: {
50
+ id: channel,
51
+ label: "Nostr",
52
+ selectionLabel: "Nostr",
53
+ docsPath: "/channels/nostr",
54
+ docsLabel: "nostr",
55
+ blurb: "Decentralized DMs via Nostr relays (NIP-04)",
56
+ order: 100
57
+ },
58
+ capabilities: {
59
+ chatTypes: ["direct"],
60
+ media: false
61
+ },
62
+ reload: { configPrefixes: ["channels.nostr"] },
63
+ configSchema: buildChannelConfigSchema(NostrConfigSchema),
64
+ setupContract: createNostrSetupContract(createNostrSetupAdapter({ resolveAccountId: (cfg, accountId) => accountId?.trim() || resolveDefaultSetupNostrAccountId(cfg) })),
65
+ setupWizard: nostrSetupWizard,
66
+ config: {
67
+ listAccountIds: (cfg) => resolveSetupNostrAccount({ cfg }).configured ? [resolveDefaultSetupNostrAccountId(cfg)] : [],
68
+ resolveAccount: (cfg, accountId) => resolveSetupNostrAccount({
69
+ cfg,
70
+ accountId
71
+ }),
72
+ defaultAccountId: resolveDefaultSetupNostrAccountId,
73
+ isConfigured: (account) => account.configured,
74
+ describeAccount: (account) => describeAccountSnapshot({
75
+ account,
76
+ configured: account.configured,
77
+ extra: { publicKey: account.publicKey }
78
+ })
79
+ }
80
+ };
81
+ //#endregion
82
+ export { nostrSetupPlugin as t };
@@ -1,4 +1,4 @@
1
- import { a as parseRelayUrls, c as validatePrivateKey, i as createNostrSetupStatus, l as DEFAULT_RELAYS, n as createNostrSetupAdapter, o as hasConfiguredNostrPrivateKey, r as createNostrSetupContract, s as resolveNostrPrivateKey, t as buildNostrSetupPatch } from "./setup-adapter-KJ_iGKiG.js";
1
+ import { a as parseRelayUrls, c as validatePrivateKey, i as createNostrSetupStatus, l as DEFAULT_RELAYS, n as createNostrSetupAdapter, o as hasConfiguredNostrPrivateKey, r as createNostrSetupContract, s as resolveNostrPrivateKey, t as buildNostrSetupPatch } from "./setup-adapter-KJ_iGKiG.mjs";
2
2
  import { createAccountListHelpers } from "openclaw/plugin-sdk/account-helpers";
3
3
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
package/dist/api.js CHANGED
@@ -1,8 +1,8 @@
1
- import { s as resolveNostrAccount } from "./setup-surface-mA5PMspO.js";
1
+ import { s as resolveNostrAccount } from "./.setup/setup-surface-Dx8QxWSP.mjs";
2
2
  import { getPluginRuntimeGatewayRequestScope } from "./runtime-api.js";
3
- import { n as NostrProfileSchema } from "./config-schema-CkYd8ACn.js";
4
- import { a as getNostrRuntime, i as contentToProfile, n as nostrPlugin, o as setNostrRuntime, r as publishNostrProfile, t as getNostrProfileState } from "./channel-DWFChLbP.js";
5
- import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
3
+ import { n as NostrProfileSchema } from "./.setup/config-schema-CkYd8ACn.mjs";
4
+ import { a as getNostrRuntime, i as contentToProfile, n as nostrPlugin, o as setNostrRuntime, r as publishNostrProfile, t as getNostrProfileState } from "./.setup/channel-ByGdjtr3.mjs";
5
+ import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { z } from "zod";
7
7
  import { SimplePool } from "nostr-tools";
8
8
  import { createFixedWindowRateLimiter as createFixedWindowRateLimiter$1 } from "openclaw/plugin-sdk/webhook-ingress";
@@ -11,9 +11,26 @@ import { isBlockedHostnameOrIp, isLoopbackHost } from "openclaw/plugin-sdk/ssrf-
11
11
  import { readJsonBodyWithLimit, requestBodyErrorToText } from "openclaw/plugin-sdk/webhook-request-guards";
12
12
  import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
13
13
  //#region extensions/nostr/src/nostr-profile-url-safety.ts
14
+ function normalizeNostrProfileUrlForRuntime(urlStr) {
15
+ return urlStr.replace(/^([a-z][a-z\d+.-]*:\/\/\[[\da-f:]*:)(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})(\].*)$/iu, (original, prefix, a, b, c, d, suffix) => {
16
+ const octets = [
17
+ a,
18
+ b,
19
+ c,
20
+ d
21
+ ].map(Number);
22
+ if (octets.some((octet) => !Number.isInteger(octet) || octet > 255)) return original;
23
+ const high = (octets[0] ?? 0) << 8 | (octets[1] ?? 0);
24
+ const low = (octets[2] ?? 0) << 8 | (octets[3] ?? 0);
25
+ return `${prefix}${high.toString(16)}:${low.toString(16)}${suffix}`;
26
+ });
27
+ }
28
+ function parseNostrProfileUrl(urlStr) {
29
+ return new URL(normalizeNostrProfileUrlForRuntime(urlStr));
30
+ }
14
31
  function validateUrlSafety(urlStr) {
15
32
  try {
16
- const url = new URL(urlStr);
33
+ const url = parseNostrProfileUrl(urlStr);
17
34
  if (url.protocol !== "https:") return {
18
35
  ok: false,
19
36
  error: "URL must use https:// protocol"
@@ -204,6 +221,36 @@ const ProfileUpdateSchema = NostrProfileSchema.extend({
204
221
  lud16: lud16FormatSchema
205
222
  });
206
223
  const PROFILE_MUTATION_SCOPE = "operator.admin";
224
+ const PROFILE_URL_FIELDS = [
225
+ "picture",
226
+ "banner",
227
+ "website"
228
+ ];
229
+ function normalizeProfileUpdateUrlInputs(value) {
230
+ if (!isRecord(value)) return value;
231
+ const record = value;
232
+ let normalized;
233
+ for (const field of PROFILE_URL_FIELDS) {
234
+ const input = record[field];
235
+ if (typeof input !== "string") continue;
236
+ const next = normalizeNostrProfileUrlForRuntime(input);
237
+ if (next !== input) {
238
+ normalized ??= { ...record };
239
+ normalized[field] = next;
240
+ }
241
+ }
242
+ return normalized ?? value;
243
+ }
244
+ function restoreProfileUpdateUrlInputs(profile, value) {
245
+ if (!isRecord(value)) return profile;
246
+ const record = value;
247
+ return {
248
+ ...profile,
249
+ ...typeof record.picture === "string" ? { picture: record.picture } : {},
250
+ ...typeof record.banner === "string" ? { banner: record.banner } : {},
251
+ ...typeof record.website === "string" ? { website: record.website } : {}
252
+ };
253
+ }
207
254
  function sendJson(res, status, body) {
208
255
  res.statusCode = status;
209
256
  res.setHeader("Content-Type", "application/json; charset=utf-8");
@@ -341,6 +388,7 @@ function createNostrProfileHttpHandler(ctx) {
341
388
  });
342
389
  return true;
343
390
  } catch (err) {
391
+ if (res.writableEnded) return true;
344
392
  ctx.log?.error(`Profile HTTP error: ${String(err)}`);
345
393
  sendJson(res, 500, {
346
394
  ok: false,
@@ -380,7 +428,7 @@ async function handleUpdateProfile(accountId, ctx, req, res) {
380
428
  });
381
429
  return true;
382
430
  }
383
- const parseResult = ProfileUpdateSchema.safeParse(body);
431
+ const parseResult = ProfileUpdateSchema.safeParse(normalizeProfileUpdateUrlInputs(body));
384
432
  if (!parseResult.success) {
385
433
  sendJson(res, 400, {
386
434
  ok: false,
@@ -389,7 +437,7 @@ async function handleUpdateProfile(accountId, ctx, req, res) {
389
437
  });
390
438
  return true;
391
439
  }
392
- const profile = parseResult.data;
440
+ const profile = restoreProfileUpdateUrlInputs(parseResult.data, body);
393
441
  if (profile.picture) {
394
442
  const pictureCheck = validateUrlSafety(profile.picture);
395
443
  if (!pictureCheck.ok) {
@@ -426,9 +474,11 @@ async function handleUpdateProfile(accountId, ctx, req, res) {
426
474
  };
427
475
  try {
428
476
  const result = await withPublishLock(accountId, async () => {
477
+ await getPluginRuntimeGatewayRequestScope()?.revalidate?.();
429
478
  return await publishNostrProfile(accountId, mergedProfile);
430
479
  });
431
480
  if (result.successes.length > 0) {
481
+ await getPluginRuntimeGatewayRequestScope()?.revalidate?.();
432
482
  await ctx.updateConfigProfile(accountId, mergedProfile);
433
483
  ctx.log?.info(`[${accountId}] Profile published to ${result.successes.length} relay(s)`);
434
484
  } else ctx.log?.warn(`[${accountId}] Profile publish failed on all relays`);
@@ -441,6 +491,7 @@ async function handleUpdateProfile(accountId, ctx, req, res) {
441
491
  persisted: result.successes.length > 0
442
492
  });
443
493
  } catch (err) {
494
+ if (res.writableEnded) return true;
444
495
  ctx.log?.error(`[${accountId}] Profile publish error: ${String(err)}`);
445
496
  sendJson(res, 500, {
446
497
  ok: false,
@@ -473,6 +524,7 @@ async function handleImportProfile(accountId, ctx, req, res) {
473
524
  const body = await readJsonBody(req);
474
525
  if (typeof body === "object" && body !== null) autoMerge = body.autoMerge === true;
475
526
  } catch {}
527
+ await getPluginRuntimeGatewayRequestScope()?.revalidate?.();
476
528
  ctx.log?.info(`[${accountId}] Importing profile for ${pubkey.slice(0, 8)}...`);
477
529
  const result = await importProfileFromRelays({
478
530
  pubkey,
@@ -488,6 +540,7 @@ async function handleImportProfile(accountId, ctx, req, res) {
488
540
  return true;
489
541
  }
490
542
  if (autoMerge && result.profile) {
543
+ await getPluginRuntimeGatewayRequestScope()?.revalidate?.();
491
544
  const merged = mergeProfiles(ctx.getConfigProfile(accountId), result.profile);
492
545
  await ctx.updateConfigProfile(accountId, merged);
493
546
  ctx.log?.info(`[${accountId}] Profile imported and merged`);
@@ -1,2 +1,2 @@
1
- import { n as nostrPlugin } from "./channel-DWFChLbP.js";
1
+ import { n as nostrPlugin } from "./.setup/channel-ByGdjtr3.mjs";
2
2
  export { nostrPlugin };
@@ -1,4 +1,4 @@
1
- import { t as normalizeNostrStateAccountId } from "./state-account-id-CvBZ9s6P.js";
1
+ import { t as normalizeNostrStateAccountId } from "./.setup/state-account-id-CvBZ9s6P.mjs";
2
2
  import { asFiniteNumber } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import fs from "node:fs/promises";
4
4
  import path from "node:path";
@@ -72,116 +72,72 @@ async function ensureStoreCapacity(params) {
72
72
  }
73
73
  return existingKeys;
74
74
  }
75
- const stateMigrations = [{
76
- id: "nostr-bus-state-json-to-plugin-state",
77
- label: "Nostr bus state",
78
- async detectLegacyState(params) {
79
- const files = await listLegacyFiles({
80
- stateDir: params.stateDir,
81
- prefix: "bus-state-",
82
- parse: parseBusState
83
- });
84
- if (files.length === 0) return null;
85
- return { preview: [`- Nostr bus state: ${files.length} ${files.length === 1 ? "account" : "accounts"} -> plugin state (${BUS_STATE_NAMESPACE})`] };
86
- },
87
- async migrateLegacyState(params) {
88
- const changes = [];
89
- const warnings = [];
90
- const files = await listLegacyFiles({
91
- stateDir: params.stateDir,
92
- prefix: "bus-state-",
93
- parse: parseBusState
94
- });
95
- const store = params.context.openPluginStateKeyedStore({
96
- namespace: BUS_STATE_NAMESPACE,
97
- maxEntries: MAX_NOSTR_STATE_ENTRIES
98
- });
99
- const existingKeys = await ensureStoreCapacity({
100
- files,
101
- store,
102
- maxEntries: MAX_NOSTR_STATE_ENTRIES,
103
- label: "Nostr bus state",
104
- warnings
105
- });
106
- if (!existingKeys) return {
107
- changes,
108
- warnings
109
- };
110
- let imported = 0;
111
- for (const file of files) {
112
- if (!existingKeys.has(file.accountId)) {
113
- await store.register(file.accountId, file.value);
114
- existingKeys.add(file.accountId);
115
- imported++;
116
- }
117
- await archiveLegacyStateSource({
118
- filePath: file.filePath,
119
- label: "Nostr bus state",
120
- changes,
75
+ function createNostrStateMigration(options) {
76
+ return {
77
+ id: `nostr-${options.namespace}-json-to-plugin-state`,
78
+ label: options.label,
79
+ async detectLegacyState(params) {
80
+ const files = await listLegacyFiles({
81
+ stateDir: params.stateDir,
82
+ prefix: `${options.namespace}-`,
83
+ parse: options.parse
84
+ });
85
+ if (files.length === 0) return null;
86
+ return { preview: [`- ${options.label}: ${files.length} ${files.length === 1 ? "account" : "accounts"} -> plugin state (${options.namespace})`] };
87
+ },
88
+ async migrateLegacyState(params) {
89
+ const changes = [];
90
+ const warnings = [];
91
+ const files = await listLegacyFiles({
92
+ stateDir: params.stateDir,
93
+ prefix: `${options.namespace}-`,
94
+ parse: options.parse
95
+ });
96
+ const store = params.context.openPluginStateKeyedStore({
97
+ namespace: options.namespace,
98
+ maxEntries: MAX_NOSTR_STATE_ENTRIES
99
+ });
100
+ const existingKeys = await ensureStoreCapacity({
101
+ files,
102
+ store,
103
+ maxEntries: MAX_NOSTR_STATE_ENTRIES,
104
+ label: options.label,
121
105
  warnings
122
106
  });
123
- }
124
- if (imported > 0) changes.unshift(`Migrated ${imported} Nostr bus-state ${imported === 1 ? "entry" : "entries"} -> plugin state`);
125
- return {
126
- changes,
127
- warnings
128
- };
129
- }
130
- }, {
131
- id: "nostr-profile-state-json-to-plugin-state",
132
- label: "Nostr profile state",
133
- async detectLegacyState(params) {
134
- const files = await listLegacyFiles({
135
- stateDir: params.stateDir,
136
- prefix: "profile-state-",
137
- parse: parseProfileState
138
- });
139
- if (files.length === 0) return null;
140
- return { preview: [`- Nostr profile state: ${files.length} ${files.length === 1 ? "account" : "accounts"} -> plugin state (${PROFILE_STATE_NAMESPACE})`] };
141
- },
142
- async migrateLegacyState(params) {
143
- const changes = [];
144
- const warnings = [];
145
- const files = await listLegacyFiles({
146
- stateDir: params.stateDir,
147
- prefix: "profile-state-",
148
- parse: parseProfileState
149
- });
150
- const store = params.context.openPluginStateKeyedStore({
151
- namespace: PROFILE_STATE_NAMESPACE,
152
- maxEntries: MAX_NOSTR_STATE_ENTRIES
153
- });
154
- const existingKeys = await ensureStoreCapacity({
155
- files,
156
- store,
157
- maxEntries: MAX_NOSTR_STATE_ENTRIES,
158
- label: "Nostr profile state",
159
- warnings
160
- });
161
- if (!existingKeys) return {
162
- changes,
163
- warnings
164
- };
165
- let imported = 0;
166
- for (const file of files) {
167
- if (!existingKeys.has(file.accountId)) {
168
- await store.register(file.accountId, file.value);
169
- existingKeys.add(file.accountId);
170
- imported++;
107
+ if (!existingKeys) return {
108
+ changes,
109
+ warnings
110
+ };
111
+ let imported = 0;
112
+ for (const file of files) {
113
+ if (!existingKeys.has(file.accountId)) {
114
+ await store.register(file.accountId, file.value);
115
+ existingKeys.add(file.accountId);
116
+ imported++;
117
+ }
118
+ await archiveLegacyStateSource({
119
+ filePath: file.filePath,
120
+ label: options.label,
121
+ changes,
122
+ warnings
123
+ });
171
124
  }
172
- await archiveLegacyStateSource({
173
- filePath: file.filePath,
174
- label: "Nostr profile state",
125
+ if (imported > 0) changes.unshift(`Migrated ${imported} Nostr ${options.namespace} ${imported === 1 ? "entry" : "entries"} -> plugin state`);
126
+ return {
175
127
  changes,
176
128
  warnings
177
- });
129
+ };
178
130
  }
179
- if (imported > 0) changes.unshift(`Migrated ${imported} Nostr profile-state ${imported === 1 ? "entry" : "entries"} -> plugin state`);
180
- return {
181
- changes,
182
- warnings
183
- };
184
- }
185
- }];
131
+ };
132
+ }
133
+ const stateMigrations = [createNostrStateMigration({
134
+ namespace: BUS_STATE_NAMESPACE,
135
+ label: "Nostr bus state",
136
+ parse: parseBusState
137
+ }), createNostrStateMigration({
138
+ namespace: PROFILE_STATE_NAMESPACE,
139
+ label: "Nostr profile state",
140
+ parse: parseProfileState
141
+ })];
186
142
  //#endregion
187
143
  export { stateMigrations };
@@ -1,37 +1,2 @@
1
- import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
2
- import { collectSecretInputAssignment, createChannelSecretTargetRegistryEntries, getChannelRecord } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
3
- //#region extensions/nostr/src/secret-contract.ts
4
- const secretTargetRegistryEntries = createChannelSecretTargetRegistryEntries({
5
- channelKey: "nostr",
6
- channel: ["privateKey"]
7
- });
8
- function collectRuntimeConfigAssignments(params) {
9
- const nostr = getChannelRecord(params.config, "nostr");
10
- if (!nostr) return;
11
- const accountId = normalizeAccountId(typeof nostr.defaultAccount === "string" ? nostr.defaultAccount : void 0);
12
- collectSecretInputAssignment({
13
- value: nostr.privateKey,
14
- path: "channels.nostr.privateKey",
15
- expected: "string",
16
- defaults: params.defaults,
17
- context: params.context,
18
- active: nostr.enabled !== false,
19
- inactiveReason: "Nostr channel is disabled.",
20
- owner: {
21
- ownerKind: "account",
22
- ownerId: `nostr:${accountId}`,
23
- requiredForGateway: false,
24
- disposition: "isolate",
25
- contract: nostr
26
- },
27
- apply: (value) => {
28
- nostr.privateKey = value;
29
- }
30
- });
31
- }
32
- const channelSecrets = {
33
- secretTargetRegistryEntries,
34
- collectRuntimeConfigAssignments
35
- };
36
- //#endregion
1
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./.setup/secret-contract-api-nVWula4c.mjs";
37
2
  export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
package/dist/setup-api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { r as nostrSetupWizard, t as nostrSetupAdapter } from "./setup-surface-mA5PMspO.js";
1
+ import { r as nostrSetupWizard, t as nostrSetupAdapter } from "./.setup/setup-surface-Dx8QxWSP.mjs";
2
2
  export { nostrSetupAdapter, nostrSetupWizard };
@@ -1,13 +1,14 @@
1
1
  import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
2
+ import { fileURLToPath } from "node:url";
2
3
  //#region extensions/nostr/setup-entry.ts
3
4
  var setup_entry_default = defineBundledChannelSetupEntry({
4
5
  importMetaUrl: import.meta.url,
5
6
  plugin: {
6
- specifier: "./setup-plugin-api.js",
7
+ specifier: fileURLToPath(new URL(".setup/setup-plugin-api-B7i5rR6T.mjs", import.meta.url).href),
7
8
  exportName: "nostrSetupPlugin"
8
9
  },
9
10
  secrets: {
10
- specifier: "./secret-contract-api.js",
11
+ specifier: fileURLToPath(new URL(".setup/secret-contract-api-DUmw8THQ.mjs", import.meta.url).href),
11
12
  exportName: "channelSecrets"
12
13
  }
13
14
  });