@needmoretruth/nmts-cli 0.17.2 → 0.34.2

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 (419) hide show
  1. package/AGENTS.md +125 -517
  2. package/CHANGELOG.md +104 -0
  3. package/README.ko.md +377 -469
  4. package/README.md +394 -474
  5. package/dist/account-proof.d.ts +29 -0
  6. package/dist/account-proof.js +6 -6
  7. package/dist/account.d.ts +18 -0
  8. package/dist/account.js +5 -5
  9. package/dist/agent-host.d.ts +71 -0
  10. package/dist/agent-host.js +169 -0
  11. package/dist/api-advice.d.ts +2 -0
  12. package/dist/api-advice.js +210 -0
  13. package/dist/api-key.d.ts +79 -0
  14. package/dist/api-key.js +7 -7
  15. package/dist/api-refusal.d.ts +14 -0
  16. package/dist/api-refusal.js +8 -0
  17. package/dist/api.d.ts +114 -0
  18. package/dist/api.js +59 -162
  19. package/dist/args.d.ts +160 -0
  20. package/dist/args.js +118 -30
  21. package/dist/artifact-about.d.ts +49 -0
  22. package/dist/autonomy.d.ts +39 -0
  23. package/dist/autonomy.js +110 -32
  24. package/dist/code-access.d.ts +29 -0
  25. package/dist/code-access.js +3 -3
  26. package/dist/code-vault.d.ts +38 -0
  27. package/dist/code-vault.js +8 -8
  28. package/dist/collision.d.ts +67 -0
  29. package/dist/collision.js +1 -1
  30. package/dist/commands/accept-terms.d.ts +11 -0
  31. package/dist/commands/accept-terms.js +106 -0
  32. package/dist/commands/balance.d.ts +7 -0
  33. package/dist/commands/balance.js +54 -1
  34. package/dist/commands/create-code-file.d.ts +24 -0
  35. package/dist/commands/create-code-file.js +93 -0
  36. package/dist/commands/create-link.d.ts +10 -0
  37. package/dist/commands/create-link.js +232 -0
  38. package/dist/commands/create.d.ts +20 -0
  39. package/dist/commands/create.js +43 -102
  40. package/dist/commands/credits.d.ts +9 -0
  41. package/dist/commands/credits.js +110 -0
  42. package/dist/commands/delete-account.d.ts +11 -0
  43. package/dist/commands/delete-account.js +63 -0
  44. package/dist/commands/deposit.d.ts +7 -0
  45. package/dist/commands/deposit.js +85 -0
  46. package/dist/commands/devices.d.ts +12 -0
  47. package/dist/commands/devices.js +144 -0
  48. package/dist/commands/documents.d.ts +35 -0
  49. package/dist/commands/documents.js +212 -0
  50. package/dist/commands/env.d.ts +5 -0
  51. package/dist/commands/env.js +10 -2
  52. package/dist/commands/erase.d.ts +13 -0
  53. package/dist/commands/erase.js +193 -0
  54. package/dist/commands/expiring.d.ts +19 -0
  55. package/dist/commands/extend.d.ts +33 -0
  56. package/dist/commands/extend.js +54 -15
  57. package/dist/commands/get.d.ts +18 -0
  58. package/dist/commands/key-manage.d.ts +11 -0
  59. package/dist/commands/key-manage.js +162 -0
  60. package/dist/commands/key.d.ts +28 -0
  61. package/dist/commands/key.js +249 -0
  62. package/dist/commands/kit.d.ts +11 -0
  63. package/dist/commands/kit.js +7 -7
  64. package/dist/commands/listfile.d.ts +13 -0
  65. package/dist/commands/listfile.js +12 -5
  66. package/dist/commands/login.d.ts +18 -0
  67. package/dist/commands/login.js +19 -19
  68. package/dist/commands/logout.d.ts +1 -0
  69. package/dist/commands/logout.js +1 -1
  70. package/dist/commands/losses.d.ts +12 -0
  71. package/dist/commands/losses.js +180 -0
  72. package/dist/commands/ls.d.ts +23 -0
  73. package/dist/commands/marks-dispatch.d.ts +2 -0
  74. package/dist/commands/marks-dispatch.js +51 -0
  75. package/dist/commands/marks.d.ts +46 -0
  76. package/dist/commands/marks.js +80 -0
  77. package/dist/commands/mcp.d.ts +24 -0
  78. package/dist/commands/mcp.js +70 -5
  79. package/dist/commands/mode.d.ts +8 -0
  80. package/dist/commands/mode.js +60 -24
  81. package/dist/commands/on-collision.d.ts +6 -0
  82. package/dist/commands/organise.d.ts +46 -0
  83. package/dist/commands/padding.d.ts +7 -0
  84. package/dist/commands/padding.js +114 -0
  85. package/dist/commands/public-code.d.ts +9 -0
  86. package/dist/commands/public-code.js +8 -8
  87. package/dist/commands/pull.d.ts +27 -0
  88. package/dist/commands/push-wallet.d.ts +19 -0
  89. package/dist/commands/push-wallet.js +69 -0
  90. package/dist/commands/push.d.ts +47 -0
  91. package/dist/commands/push.js +37 -7
  92. package/dist/commands/put-wallet.d.ts +77 -0
  93. package/dist/commands/put-wallet.js +316 -0
  94. package/dist/commands/put.d.ts +56 -0
  95. package/dist/commands/put.js +53 -6
  96. package/dist/commands/rebuild.d.ts +18 -0
  97. package/dist/commands/rebuild.js +108 -10
  98. package/dist/commands/receive.d.ts +24 -0
  99. package/dist/commands/recovery-dispatch.d.ts +2 -0
  100. package/dist/commands/recovery-dispatch.js +34 -0
  101. package/dist/commands/recovery-list.d.ts +11 -0
  102. package/dist/commands/recovery-list.js +6 -6
  103. package/dist/commands/recovery.d.ts +25 -0
  104. package/dist/commands/recovery.js +2 -2
  105. package/dist/commands/rollback.d.ts +9 -0
  106. package/dist/commands/rollback.js +118 -0
  107. package/dist/commands/s3.d.ts +23 -0
  108. package/dist/commands/s3.js +6 -6
  109. package/dist/commands/settings.d.ts +5 -0
  110. package/dist/commands/settings.js +21 -6
  111. package/dist/commands/share-dispatch.d.ts +2 -0
  112. package/dist/commands/share-dispatch.js +46 -0
  113. package/dist/commands/share.d.ts +14 -0
  114. package/dist/commands/share.js +13 -3
  115. package/dist/commands/shares-sent.d.ts +18 -0
  116. package/dist/commands/shares-sent.js +95 -0
  117. package/dist/commands/support.d.ts +24 -0
  118. package/dist/commands/support.js +321 -0
  119. package/dist/commands/sweep.d.ts +11 -0
  120. package/dist/commands/tip.d.ts +11 -0
  121. package/dist/commands/tip.js +86 -0
  122. package/dist/commands/trash.d.ts +17 -0
  123. package/dist/commands/trash.js +1 -1
  124. package/dist/commands/trial.d.ts +7 -0
  125. package/dist/commands/trial.js +16 -18
  126. package/dist/commands/unlock.d.ts +16 -0
  127. package/dist/commands/unlock.js +159 -0
  128. package/dist/commands/update.d.ts +42 -0
  129. package/dist/commands/update.js +1 -1
  130. package/dist/commands/usage.d.ts +8 -0
  131. package/dist/commands/verify.d.ts +18 -0
  132. package/dist/commands/verify.js +10 -6
  133. package/dist/commands/wallet-activity.d.ts +26 -0
  134. package/dist/commands/wallet-activity.js +117 -0
  135. package/dist/commands/wallet-donate.d.ts +26 -0
  136. package/dist/commands/wallet-donate.js +163 -0
  137. package/dist/commands/wallet-hall.d.ts +35 -0
  138. package/dist/commands/wallet-hall.js +214 -0
  139. package/dist/commands/wallet-send.d.ts +22 -0
  140. package/dist/commands/wallet-send.js +153 -0
  141. package/dist/commands/wallet-storage-ops.d.ts +24 -0
  142. package/dist/commands/wallet-storage-ops.js +215 -0
  143. package/dist/commands/wallet-storage.d.ts +18 -0
  144. package/dist/commands/wallet-storage.js +95 -0
  145. package/dist/commands/wallet-swap.d.ts +32 -0
  146. package/dist/commands/wallet-swap.js +287 -0
  147. package/dist/commands/wallet.d.ts +36 -0
  148. package/dist/commands/wallet.js +57 -15
  149. package/dist/commands/whoami.d.ts +10 -0
  150. package/dist/commands/whoami.js +24 -6
  151. package/dist/consent.d.ts +140 -0
  152. package/dist/consent.js +89 -30
  153. package/dist/credentials.d.ts +146 -0
  154. package/dist/credentials.js +10 -10
  155. package/dist/crypto-surface.d.ts +197 -0
  156. package/dist/crypto.d.ts +81 -0
  157. package/dist/crypto.js +13 -0
  158. package/dist/deposit.d.ts +25 -0
  159. package/dist/deposit.js +78 -0
  160. package/dist/download-part.d.ts +40 -0
  161. package/dist/download-sink.d.ts +76 -0
  162. package/dist/download.d.ts +79 -0
  163. package/dist/download.js +3 -3
  164. package/dist/drive-paths.d.ts +73 -0
  165. package/dist/environment.d.ts +62 -0
  166. package/dist/environment.js +29 -9
  167. package/dist/errors.d.ts +22 -0
  168. package/dist/errors.js +3 -3
  169. package/dist/exit.d.ts +44 -0
  170. package/dist/expiry.d.ts +58 -0
  171. package/dist/extend-budget.d.ts +35 -0
  172. package/dist/extend-budget.js +81 -0
  173. package/dist/extend-chain.d.ts +43 -0
  174. package/dist/extend-chain.js +40 -3
  175. package/dist/extend-plan.d.ts +148 -0
  176. package/dist/extend-plan.js +1 -1
  177. package/dist/gate.d.ts +18 -0
  178. package/dist/gate.js +100 -0
  179. package/dist/guards.d.ts +2 -0
  180. package/dist/help.d.ts +20 -0
  181. package/dist/help.js +199 -33
  182. package/dist/human-check.d.ts +23 -0
  183. package/dist/index.d.ts +42 -0
  184. package/dist/index.js +49 -0
  185. package/dist/item-trash.d.ts +1 -0
  186. package/dist/kit-file.d.ts +56 -0
  187. package/dist/kit-file.js +10 -10
  188. package/dist/list-file.d.ts +88 -0
  189. package/dist/list-file.js +90 -7
  190. package/dist/list-view-find.d.ts +15 -0
  191. package/dist/list-view-order.d.ts +32 -0
  192. package/dist/main.d.ts +12 -0
  193. package/dist/main.js +112 -113
  194. package/dist/manifest-chunk-cache.d.ts +14 -0
  195. package/dist/manifest-chunk-cache.js +103 -0
  196. package/dist/manifest-chunk-flow.d.ts +81 -0
  197. package/dist/manifest-chunk-flow.js +307 -0
  198. package/dist/manifest-create.d.ts +23 -0
  199. package/dist/manifest-create.js +26 -30
  200. package/dist/manifest-write.d.ts +161 -0
  201. package/dist/manifest-write.js +42 -33
  202. package/dist/manifest.d.ts +82 -0
  203. package/dist/manifest.js +69 -21
  204. package/dist/mark-render.d.ts +26 -0
  205. package/dist/mcp-args.d.ts +17 -0
  206. package/dist/mcp-ask.d.ts +43 -0
  207. package/dist/mcp-ask.js +100 -0
  208. package/dist/mcp-tools/context.d.ts +46 -0
  209. package/dist/mcp-tools/credits.d.ts +3 -0
  210. package/dist/mcp-tools/credits.js +61 -0
  211. package/dist/mcp-tools/files.d.ts +3 -0
  212. package/dist/mcp-tools/files.js +34 -0
  213. package/dist/mcp-tools/organise.d.ts +3 -0
  214. package/dist/mcp-tools/organise.js +82 -2
  215. package/dist/mcp-tools/reads.d.ts +3 -0
  216. package/dist/mcp-tools/reads.js +132 -4
  217. package/dist/mcp-tools/share.d.ts +3 -0
  218. package/dist/mcp-tools/share.js +26 -7
  219. package/dist/mcp-tools/support.d.ts +3 -0
  220. package/dist/mcp-tools/support.js +140 -0
  221. package/dist/mcp-tools/tiers.d.ts +31 -0
  222. package/dist/mcp-tools/tiers.js +147 -0
  223. package/dist/mcp.d.ts +80 -0
  224. package/dist/mcp.js +110 -9
  225. package/dist/net-retry.d.ts +38 -0
  226. package/dist/network.d.ts +10 -0
  227. package/dist/notice.d.ts +7 -0
  228. package/dist/notice.js +7 -7
  229. package/dist/product.d.ts +29 -0
  230. package/dist/product.js +1 -1
  231. package/dist/progress.d.ts +37 -0
  232. package/dist/prompt.d.ts +31 -0
  233. package/dist/prompt.js +1 -1
  234. package/dist/rebuild-key-check.d.ts +26 -0
  235. package/dist/rebuild-key-check.js +90 -0
  236. package/dist/rebuild.d.ts +87 -0
  237. package/dist/rebuild.js +26 -4
  238. package/dist/recovery-assemble.d.ts +40 -0
  239. package/dist/recovery-assemble.js +1 -1
  240. package/dist/recovery-build.d.ts +40 -0
  241. package/dist/recovery-map-file.d.ts +53 -0
  242. package/dist/recovery-map-file.js +4 -4
  243. package/dist/recovery-map.d.ts +197 -0
  244. package/dist/recovery-release.d.ts +104 -0
  245. package/dist/recovery-seq.d.ts +10 -0
  246. package/dist/recovery-source.d.ts +50 -0
  247. package/dist/redact.d.ts +70 -0
  248. package/dist/redact.js +212 -0
  249. package/dist/registration.d.ts +30 -0
  250. package/dist/registration.js +5 -5
  251. package/dist/risk.d.ts +380 -0
  252. package/dist/risk.js +206 -0
  253. package/dist/run-log.d.ts +78 -0
  254. package/dist/run-log.js +301 -0
  255. package/dist/s3/listing.d.ts +47 -0
  256. package/dist/s3/multipart.d.ts +21 -0
  257. package/dist/s3/response-sink.d.ts +8 -0
  258. package/dist/s3/same-file.d.ts +54 -0
  259. package/dist/s3/server.d.ts +58 -0
  260. package/dist/s3/server.js +2 -2
  261. package/dist/s3/sigv4.d.ts +46 -0
  262. package/dist/s3/sigv4.js +1 -1
  263. package/dist/s3/staging.d.ts +10 -0
  264. package/dist/s3/xml.d.ts +28 -0
  265. package/dist/safe-path.d.ts +41 -0
  266. package/dist/seal.d.ts +120 -0
  267. package/dist/secret-reader.d.ts +28 -0
  268. package/dist/server.d.ts +9 -0
  269. package/dist/session.d.ts +32 -0
  270. package/dist/session.js +1 -1
  271. package/dist/setup-questions.d.ts +7 -0
  272. package/dist/share.d.ts +108 -0
  273. package/dist/share.js +1 -1
  274. package/dist/shared/lib/crypto/size-padding.d.ts +55 -0
  275. package/dist/shared/lib/crypto/size-padding.js +5 -0
  276. package/dist/shared/lib/drive/manifest-chunks.d.ts +95 -0
  277. package/dist/shared/lib/drive/manifest-chunks.js +252 -0
  278. package/dist/shared/lib/drive/manifest-codec.d.ts +214 -0
  279. package/dist/shared/lib/drive/manifest-codec.js +7 -7
  280. package/dist/shared/lib/drive/manifest-index.d.ts +98 -0
  281. package/dist/shared/lib/drive/manifest-ops.d.ts +167 -0
  282. package/dist/shared/lib/drive/manifest-ops.js +9 -4
  283. package/dist/shared/lib/drive/manifest-pack.d.ts +65 -0
  284. package/dist/shared/lib/drive/manifest-pack.js +287 -0
  285. package/dist/shared/lib/drive/manifest-settings.d.ts +113 -0
  286. package/dist/shared/lib/drive/manifest-settings.js +87 -6
  287. package/dist/shared/lib/drive/name-conflict.d.ts +76 -0
  288. package/dist/shared/lib/drive/rebuild-verify.d.ts +73 -0
  289. package/dist/shared/lib/drive/rebuild-verify.js +112 -0
  290. package/dist/shared/lib/drive/unique-name.d.ts +9 -0
  291. package/dist/shared/lib/drive/zstd.d.ts +27 -0
  292. package/dist/shared/lib/drive/zstd.js +74 -0
  293. package/dist/shared/lib/extend/epochs.d.ts +205 -0
  294. package/dist/shared/lib/net/retry-budget.d.ts +79 -0
  295. package/dist/shared/lib/share/shared-file-info.d.ts +21 -0
  296. package/dist/shared/lib/storage-control/chain.d.ts +57 -0
  297. package/dist/shared/lib/storage-control/chain.js +82 -0
  298. package/dist/shared/lib/storage-control/plan.d.ts +40 -0
  299. package/dist/shared/lib/storage-control/plan.js +72 -0
  300. package/dist/shared/lib/storage-control/reuse.d.ts +72 -0
  301. package/dist/shared/lib/storage-control/reuse.js +95 -0
  302. package/dist/shared/lib/storage-network.d.ts +25 -0
  303. package/dist/shared/lib/upload/part-plan.d.ts +24 -0
  304. package/dist/shared/lib/wallet/activity.d.ts +138 -0
  305. package/dist/shared/lib/wallet/activity.js +208 -0
  306. package/dist/shared/lib/wallet/send-rules.d.ts +68 -0
  307. package/dist/shared/lib/wallet/send-rules.js +116 -0
  308. package/dist/shared/lib/wallet/swap-rules.d.ts +115 -0
  309. package/dist/shared/lib/wallet/swap-rules.js +199 -0
  310. package/dist/shared/lib/wallet/tip.d.ts +14 -0
  311. package/dist/shared/lib/wallet/tip.js +34 -0
  312. package/dist/shared/lib/wallet/venue-ids.d.ts +23 -0
  313. package/dist/shared/lib/wallet/venue-ids.js +53 -0
  314. package/dist/standing-tip.d.ts +24 -0
  315. package/dist/standing-tip.js +52 -0
  316. package/dist/stdout.d.ts +38 -0
  317. package/dist/storage-control-chain.d.ts +38 -0
  318. package/dist/storage-control-chain.js +78 -0
  319. package/dist/sui-rpc.d.ts +15 -0
  320. package/dist/sui-rpc.js +59 -0
  321. package/dist/support-attach.d.ts +24 -0
  322. package/dist/support-attach.js +72 -0
  323. package/dist/support-copy.d.ts +42 -0
  324. package/dist/support-copy.js +109 -0
  325. package/dist/support-wire.d.ts +49 -0
  326. package/dist/support-wire.js +194 -0
  327. package/dist/trash-sweep.d.ts +55 -0
  328. package/dist/units.d.ts +2 -0
  329. package/dist/update-check.d.ts +50 -0
  330. package/dist/update-source.d.ts +63 -0
  331. package/dist/upload-api.d.ts +3 -0
  332. package/dist/upload-file.d.ts +97 -0
  333. package/dist/upload-file.js +3 -2
  334. package/dist/upload-price.d.ts +50 -0
  335. package/dist/upload-steps.d.ts +26 -0
  336. package/dist/upload-steps.js +29 -9
  337. package/dist/upload-store.d.ts +182 -0
  338. package/dist/upload-wallet-chain.d.ts +54 -0
  339. package/dist/upload-wallet-chain.js +203 -0
  340. package/dist/upload-wallet-plan.d.ts +128 -0
  341. package/dist/upload-wallet-plan.js +184 -0
  342. package/dist/upload-wallet.d.ts +24 -0
  343. package/dist/upload-wallet.js +208 -0
  344. package/dist/upload-wire.d.ts +244 -0
  345. package/dist/upload.d.ts +18 -0
  346. package/dist/upload.js +10 -0
  347. package/dist/usage-report.d.ts +35 -0
  348. package/dist/wallet-activity-chain.d.ts +5 -0
  349. package/dist/wallet-activity-chain.js +31 -0
  350. package/dist/wallet-chain.d.ts +19 -0
  351. package/dist/wallet-chain.js +2 -2
  352. package/dist/wallet-grant.d.ts +50 -0
  353. package/dist/wallet-grant.js +218 -0
  354. package/dist/wallet-send-chain.d.ts +24 -0
  355. package/dist/wallet-send-chain.js +49 -0
  356. package/dist/wallet-sign.d.ts +133 -0
  357. package/dist/wallet-sign.js +317 -0
  358. package/dist/wallet-storage-chain.d.ts +3 -0
  359. package/dist/wallet-storage-chain.js +20 -0
  360. package/dist/wallet-swap-chain.d.ts +52 -0
  361. package/dist/wallet-swap-chain.js +186 -0
  362. package/dist/wallet-swap-quote.d.ts +22 -0
  363. package/dist/wallet-swap-quote.js +126 -0
  364. package/dist/wallet.d.ts +135 -0
  365. package/dist/wallet.js +5 -5
  366. package/dist/walrus-write.d.ts +56 -0
  367. package/dist/walrus-write.js +5 -4
  368. package/dist/walrus.d.ts +86 -0
  369. package/dist/walrus.js +48 -10
  370. package/dist/zstd-node.d.ts +11 -0
  371. package/dist/zstd-node.js +71 -0
  372. package/docs/commands/accept-terms.md +15 -0
  373. package/docs/commands/create.md +17 -0
  374. package/docs/commands/credits.md +34 -0
  375. package/docs/commands/delete-account.md +14 -0
  376. package/docs/commands/deposit.md +27 -0
  377. package/docs/commands/devices.md +9 -0
  378. package/docs/commands/documents.md +10 -0
  379. package/docs/commands/env.md +21 -0
  380. package/docs/commands/extend.md +27 -0
  381. package/docs/commands/folders.md +10 -0
  382. package/docs/commands/get.md +14 -0
  383. package/docs/commands/key.md +14 -0
  384. package/docs/commands/login.md +23 -0
  385. package/docs/commands/logout.md +11 -0
  386. package/docs/commands/losses.md +13 -0
  387. package/docs/commands/ls.md +16 -0
  388. package/docs/commands/marks.md +9 -0
  389. package/docs/commands/mcp.md +33 -0
  390. package/docs/commands/mode.md +29 -0
  391. package/docs/commands/on-collision.md +13 -0
  392. package/docs/commands/padding.md +13 -0
  393. package/docs/commands/public-code.md +9 -0
  394. package/docs/commands/pull.md +9 -0
  395. package/docs/commands/push.md +12 -0
  396. package/docs/commands/put.md +36 -0
  397. package/docs/commands/rebuild.md +13 -0
  398. package/docs/commands/recovery.md +18 -0
  399. package/docs/commands/s3.md +17 -0
  400. package/docs/commands/share.md +15 -0
  401. package/docs/commands/support.md +16 -0
  402. package/docs/commands/tip.md +21 -0
  403. package/docs/commands/trash.md +25 -0
  404. package/docs/commands/trial.md +12 -0
  405. package/docs/commands/unlock.md +25 -0
  406. package/docs/commands/update.md +14 -0
  407. package/docs/commands/usage.md +14 -0
  408. package/docs/commands/verify.md +18 -0
  409. package/docs/commands/wallet.md +67 -0
  410. package/docs/commands/whoami.md +12 -0
  411. package/package.json +67 -8
  412. package/server.json +28 -0
  413. package/vendor/nmts-crypto/nmts_crypto_wasm.d.ts +23 -2
  414. package/vendor/nmts-crypto/nmts_crypto_wasm.js +44 -2
  415. package/vendor/nmts-crypto/nmts_crypto_wasm_bg.wasm +0 -0
  416. package/vendor/nmts-crypto/nmts_crypto_wasm_bg.wasm.d.ts +1 -0
  417. package/vendor/nmts-crypto/package.json +1 -1
  418. package/dist/commands/consent.js +0 -77
  419. package/dist/extend-sign.js +0 -130
@@ -0,0 +1,16 @@
1
+ # nmts support — write to the developer of NMTS
2
+
3
+ Commands: support
4
+ Tiers: support=none · support.send=low
5
+
6
+ `support send` files a report: a bug, a confusing message, an idea, a question. It is optional,
7
+ always. A good report has four parts — the command you ran, what you expected, what happened, and
8
+ `--attach-log` so the server's answers to the last runs come along. `--category` (bug · idea ·
9
+ account · storage · payment · privacy; `nmts support --help` lists the finer ones), `--message`
10
+ or `--message-file`, `--omit <text>` for a value that must not travel. The log is redacted on this
11
+ machine before it leaves; the NMTS key, the API key, passphrase and key material never go. Write in
12
+ English. One report per problem.
13
+
14
+ In the default mode it prints what it would send and asks (or takes `--yes`); in an auto mode it
15
+ sends after printing. Replies arrive in the thread: `support list`, `support show <code>`,
16
+ `support reply <code> --message`. If the CLI itself cannot run, the second door is nmts@nmts.me.
@@ -0,0 +1,21 @@
1
+ # nmts tip — a standing share of every storage payment, sent to the developer
2
+
3
+ Commands: tip
4
+ Tiers: tip=none · tip.set=none
5
+
6
+ Every payment the wallet makes in WAL — an upload paid by wallet, a storage extension — can send a
7
+ share of that amount to the developer as a gift. `nmts tip` shows the share; `nmts tip 2.5` sets
8
+ it to 2.5 %; `nmts tip off` stops it. The default is 0 and nothing is ever sent at 0.
9
+
10
+ The share lives in the sealed file list, like `padding`: the server never learns it, and the
11
+ browser and every machine send the same share. Setting it needs the `donate` unlock, because a
12
+ person is agreeing to a standing gift — an agent that was not handed that unlock cannot raise it.
13
+ The agreement is asked once, when the share first goes above 0; changing it afterwards asks
14
+ nothing. Above 10 % the command confirms once more, in words, that this share of every payment is
15
+ meant, permanently (`--yes` answers it).
16
+
17
+ After a payment the share is sent without a question, from the same wallet, to the address the
18
+ server publishes, and the command prints the amount, the transaction id, and a thank-you. It is
19
+ outside the `wallet` unlock's spending ceiling. A gift is not refundable, buys nothing, and is
20
+ visible to anyone on a chain explorer. `--dry-run` payments send nothing. There is no one-time
21
+ tip at the terminal; that offer is the browser's.
@@ -0,0 +1,25 @@
1
+ # nmts rm, restore, sweep, erase — the trash, and the one way past it
2
+
3
+ Commands: rm, restore, sweep, erase
4
+ Tiers: rm=low · restore=low · sweep=medium · erase=ultra-high · erase.release=ultra-high(release-storage)
5
+
6
+ `nmts rm <paths>` moves things to the trash, where they stay restorable for thirty days;
7
+ `nmts restore <paths>` brings them back. Both are free and instant. In the default mode each asks
8
+ once (or takes `--yes`); in an auto mode they run. A path is matched whole — `photos/a.jpg` is not
9
+ `a.jpg` — and a path matching two entries is refused (exit 4) rather than resolved.
10
+
11
+ `nmts sweep` drops only entries whose thirty days have run out, cannot be undone, and asks on every
12
+ run — it prints what would go and stops until `--yes`, in every mode but skip-permissions where the
13
+ mode is the answer.
14
+
15
+ `nmts erase <paths>` erases files for good, trash or not: the server's record of each file (with
16
+ its shares) and this account's key to it in the file list. It is the one act above high besides
17
+ erasing the account: in the default mode a person types the sentence `I UNDERSTAND THIS IS
18
+ PERMANENT` at the terminal; in both auto modes it is refused whatever is unlocked; under
19
+ skip-permissions it runs only with `--reason "<why>"` and `--yes`. It needs the NMTS key
20
+ beside the key. The bytes on the storage network are not touched — they stay, unreadable, until
21
+ their term ends. `--release-storage` first asks the server to destroy the storage bought with
22
+ credits under each file, on the chain, and is locked until a person runs `nmts unlock
23
+ release-storage`; storage bought by the wallet is left alone and said so, and the erase goes on.
24
+ Nothing is erased behind a release that failed. If somebody asks you to destroy a file
25
+ permanently, this is the command, and it is theirs to confirm.
@@ -0,0 +1,12 @@
1
+ # nmts trial — this week's free credits
2
+
3
+ Commands: trial
4
+ Tiers: trial=none · trial.apply=low
5
+
6
+ `trial` reads what is left of this week's free credits. `trial apply` asks for some: in the default
7
+ mode it asks first, in an auto mode it runs. The rules are the server's — one application per
8
+ account per week, first come first served against a weekly budget, no flag that asks for more and
9
+ no retry loop that waits for a place. Applying asks for no browser check of its own: the server
10
+ reads the account's four-week human check as the person behind an API key, so `trial apply` works
11
+ exactly while that check is live. When it is not, the refusal names `nmts verify` — the code a
12
+ person types to renew it — rather than a credential problem.
@@ -0,0 +1,25 @@
1
+ # nmts unlock, lock — what a person has opened on this machine
2
+
3
+ Commands: unlock, lock, consent
4
+ Tiers: unlock=none · lock=none · consent=none
5
+
6
+ High acts are locked until a person opens them, once per machine, at a terminal. `nmts unlock`
7
+ lists the keys and their state; `nmts unlock <key>` prints what the key opens, its risk and its
8
+ limit, asks y/N, and records the answer with a date; `nmts lock <key>` closes it again. `consent`
9
+ is the older name for the same command. An agent does not run the unlock command: when a run
10
+ exits 5 naming a key, show the person the text it printed and let them decide.
11
+
12
+ | key | what it opens |
13
+ |---|---|
14
+ | `unsafe-code-storage` | `login --plain`: the NMTS key stored unsealed |
15
+ | `plain-env` | the NMTS key from `NMTS_ACCOUNT_CODE`, or `login --env` |
16
+ | `share` | `share`: giving another account a file (each share still asks) |
17
+ | `wallet` | signing with the wallet: `extend`, `put`/`push --pay wallet` (scope `storage`), and with `--scope all` also `wallet send` and `wallet swap`. It carries an expiry (`--days`, at most 30, or `--until`) and optional ceilings (`--cap-wal`, `--cap-sui`) |
18
+ | `donate` | gifts to the developer: `wallet donate` (each still asks) |
19
+ | `sign-out` | `devices --sign-out` |
20
+ | `rollback` | `rollback` |
21
+ | `reveal` | `whoami --reveal` |
22
+ | `kit` | `kit`: the recovery list with the NMTS key inside |
23
+
24
+ Under skip-permissions the unlock command runs without a terminal, because that mode is the
25
+ person's standing answer to every question.
@@ -0,0 +1,14 @@
1
+ # nmts update — replace the program you are running
2
+
3
+ Commands: update
4
+ Tiers: update=low
5
+
6
+ Installs the newest published release over the one running. It is not part of any task somebody
7
+ gave you: run it when the person asked for it, not because a notice appeared. In the default mode
8
+ it asks first; in an auto mode it runs. `--dry-run` prints the versions and the exact command and
9
+ changes nothing — the form to run when the question is "is this current". Commands started after
10
+ it are a different version, which is a fact to report.
11
+
12
+ Once a day after a command finishes, the tool asks the releases page which version is newest and
13
+ the next run prints one line on stderr when that is newer. `--json` output is unaffected, setting
14
+ `NMTS_NO_UPDATE_CHECK` to anything stops it, and `nmts env` reports what it last found.
@@ -0,0 +1,14 @@
1
+ # nmts usage, balance, expiring — what the account holds and can still buy
2
+
3
+ Commands: usage, balance, expiring
4
+ Tiers: usage=none · balance=none · expiring=none
5
+
6
+ `usage` counts what is stored: files, bytes, the largest files, the trash. `balance` is the
7
+ question to ask before uploading anything large: credits left, what they buy, and the per-file and
8
+ per-day ceilings on spending. `expiring` lists files whose bought storage runs out soon, and when;
9
+ `nmts extend` buys more time (`nmts help extend`). All three only read.
10
+
11
+ `balance` opens with `AI account (not the main account)` when this account was made under somebody
12
+ else's for an AI to work in — its own key, its own wallet, its own empty drive, and not the account
13
+ its maker uses. `--json` carries the same fact as `ai_account`. Nothing is printed for an ordinary
14
+ account. `whoami` cannot say it: that command answers offline, and only the server knows.
@@ -0,0 +1,18 @@
1
+ # nmts verify — the check that says a person is here
2
+
3
+ Commands: verify
4
+ Tiers: verify=none
5
+
6
+ The server keeps "has a person checked in lately" as a separate question from "is this a valid
7
+ key", and the answer expires every four weeks. It does not gate the work: reading, writing,
8
+ listing, folders, the trash, the recovery files and the wallet's balances never ask about it.
9
+ Exactly three things do — making another account, the free trial, and creating a share — and
10
+ while it is lapsed the account runs in a tighter rate tier (slower, not refused) and some requests
11
+ come back `AGENT_VERIFY_REQUIRED`.
12
+
13
+ You cannot pass it. `verify --status` says whether it is live and until when, asks for no code and
14
+ interrupts nobody; run it before asking anybody for anything. `verify` prints a short code for the
15
+ account holder to type at nmts.me and waits; `--json` gives the code and then the outcome, one
16
+ object per line. Interrupting the wait does not cancel the code. Exit 1 means the code stopped
17
+ working before it was used; nothing was spent and running it again is safe. The code it prints is
18
+ not the NMTS key and is worth nothing after use.
@@ -0,0 +1,67 @@
1
+ # nmts wallet — the wallet your NMTS key derives
2
+
3
+ Commands: wallet
4
+ Tiers: wallet=none · wallet.send=high(wallet) · wallet.swap=high(wallet) · wallet.donate=high(donate) · wallet.storage.reshape=high(wallet) · wallet.storage.give=high(wallet) · wallet.hall=none · wallet.hall.set=medium
5
+
6
+ `wallet` shows the address and its SUI and WAL balances; `wallet address` derives the address
7
+ offline (`--qr` draws it); `wallet activity` lists recent transactions, named only where the chain
8
+ proves it; `wallet storage` lists storage resources (size × time) held outside any file. None of
9
+ these signs.
10
+
11
+ ## Where SUI comes from, and why it is SUI
12
+
13
+ You can store without any coin here: credits pay the network for you (the weekly free trial at
14
+ nmts.me, or credits somebody gave you), and `nmts balance` shows them. The wallet matters only when
15
+ you pay the network yourself.
16
+
17
+ The files live on Walrus, and Walrus is paid on the Sui chain in WAL, with gas in SUI. That is why
18
+ this wallet holds SUI and WAL and nothing else — not a preference, the chain the storage runs on.
19
+ Fiat is not taken because taking it would make NMTS hold your money, which it never does.
20
+
21
+ Getting SUI (as of 2026-09-06): buy it on an exchange that lists it (Binance and Upbit did on that
22
+ date — a statement of fact, not a recommendation) and send it to `wallet address`; or, if you hold
23
+ SUI or WAL already, `wallet swap` exchanges one for the other on a public venue. `wallet address
24
+ --qr` draws the address for a phone.
25
+
26
+ `wallet storage` also reshapes what it lists, and each of these signs (storage control — the
27
+ resources are the person's, in their wallet, and every step is their signature):
28
+
29
+ - `wallet storage split <id> --size <bytes>` keeps that much in the resource and leaves the rest as
30
+ a new resource over the same period; `--epochs <n>` keeps the first n epochs and leaves the rest
31
+ as a new resource of the same size. Under the wallet unlock, scope `storage`.
32
+ - `wallet storage merge <id> <id>` joins two: sizes add when the periods are identical, periods join
33
+ when the sizes are equal and the periods touch; anything else is refused with the reason before
34
+ the chain is asked. Scope `storage`.
35
+ - `wallet storage transfer <id> <address>` hands a resource to another wallet. No file goes with it
36
+ — what goes is size and remaining time; files stay sealed with this account's keys. Not undoable,
37
+ and NMTS cannot recall it. Scope `all`.
38
+
39
+ Each prints the review with the chain fee measured by a dry run, and a refusal the chain would
40
+ give ends the run there; nothing is signed without `--yes` on that run. Sizes are what a resource
41
+ holds after the network's encoding, as the listing prints them.
42
+
43
+ Three coin subcommands sign, and every signed transaction is irreversible by anyone:
44
+
45
+ - `wallet send <SUI|WAL> <amount|max> <address>` — locked until a person runs `nmts unlock wallet
46
+ --scope all`, prints the review, and sends only with `--yes` on that run. `--fee-cap` bounds the
47
+ chain fee.
48
+ - `wallet swap <SUI|WAL> <amount|max>` — the same unlock. Without `--venue` it prints both quotes
49
+ (DeepBook and Bluefin, mainnet) and exits 4; choosing the venue is the person's decision, so show
50
+ them the two rows rather than pick. With `--venue` it prints the review and swaps only with
51
+ `--yes`. `--slippage-bps` (default 50) and `--fee-cap` bound the fill; a swap outside the
52
+ ordinary bands (slippage under 10 or over 200 bps, a fee cap far from the measured fee, a quote
53
+ more than 3 % from the site's reference price) is refused even with `--yes`. `--accept-extremes`
54
+ is a person's flag, refused in the auto modes; never pass it on somebody's behalf.
55
+ - `wallet donate <SUI|WAL> <amount>` — a voluntary gift to the developer, in either coin. Locked
56
+ until a person runs `nmts unlock donate`, and needs `--yes` on every run. A gift is not refundable,
57
+ buys nothing, goes to the address the server publishes, and is visible to anyone on a chain
58
+ explorer. It is outside the wallet unlock and its ceiling. A standing share of every WAL
59
+ payment is `nmts tip`, not a gift on its own.
60
+
61
+ One more reads the gifts back, and one flag on it publishes a name:
62
+
63
+ - `wallet hall` prints the gift hall of fame — the developer, then the ten largest senders as read
64
+ from the public chain, with the rest of the list at nmts.me/hall; reading it signs nothing and
65
+ needs no NMTS key. `--name <name>` (1 to 24 characters, no links, not an address) signs a
66
+ short message with this account's wallet so the server shows that name beside the address, and
67
+ `--remove` puts the entry back to a shortened address.
@@ -0,0 +1,12 @@
1
+ # nmts whoami — which account this machine holds
2
+
3
+ Commands: whoami
4
+ Tiers: whoami=none · whoami.reveal=high(reveal)
5
+
6
+ Prints the account id the stored code belongs to, offline, with no server call. `--json` gives it
7
+ to a program.
8
+
9
+ `--reveal` prints the NMTS key itself. An agent never needs this — the tool already holds the
10
+ code — so it is locked until a person runs `nmts unlock reveal` at a terminal, and then asked about
11
+ on every run in every mode but skip-permissions. Never write the NMTS key anywhere it can be read
12
+ again: a log, a commit, a file, a message. It is the only key to the account and cannot be rotated.
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@needmoretruth/nmts-cli",
3
- "version": "0.17.2",
4
- "description": "Command-line access to NMTS end-to-end encrypted storage, for people and for their agents.",
3
+ "version": "0.34.2",
4
+ "description": "Command-line and MCP access to NMTS (NeedMoreTruthStorage, https://nmts.me): open-source, end-to-end encrypted storage on the Walrus network. No fee to NMTS; you pay the network from your own wallet. For people and for their agents.",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
- "homepage": "https://github.com/needmoretruth/nmts-cli",
9
+ "homepage": "https://nmts.me",
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/needmoretruth/nmts-cli.git"
@@ -20,25 +20,82 @@
20
20
  "sui",
21
21
  "encryption",
22
22
  "e2ee",
23
+ "end-to-end-encryption",
24
+ "encrypted-storage",
23
25
  "storage",
26
+ "cloud-storage",
27
+ "non-custodial",
24
28
  "cli",
25
29
  "mcp",
26
- "agent"
30
+ "mcp-server",
31
+ "agent",
32
+ "ai-agents"
27
33
  ],
28
34
  "type": "module",
29
35
  "bin": {
30
36
  "nmts": "./dist/main.js"
31
37
  },
38
+ "types": "./dist/index.d.ts",
39
+ "exports": {
40
+ ".": {
41
+ "types": "./dist/index.d.ts",
42
+ "default": "./dist/index.js"
43
+ },
44
+ "./api": {
45
+ "types": "./dist/api.d.ts",
46
+ "default": "./dist/api.js"
47
+ },
48
+ "./credentials": {
49
+ "types": "./dist/credentials.d.ts",
50
+ "default": "./dist/credentials.js"
51
+ },
52
+ "./crypto": {
53
+ "types": "./dist/crypto.d.ts",
54
+ "default": "./dist/crypto.js"
55
+ },
56
+ "./errors": {
57
+ "types": "./dist/errors.d.ts",
58
+ "default": "./dist/errors.js"
59
+ },
60
+ "./manifest": {
61
+ "types": "./dist/manifest.d.ts",
62
+ "default": "./dist/manifest.js"
63
+ },
64
+ "./manifest-write": {
65
+ "types": "./dist/manifest-write.d.ts",
66
+ "default": "./dist/manifest-write.js"
67
+ },
68
+ "./drive-paths": {
69
+ "types": "./dist/drive-paths.d.ts",
70
+ "default": "./dist/drive-paths.js"
71
+ },
72
+ "./upload-file": {
73
+ "types": "./dist/upload-file.d.ts",
74
+ "default": "./dist/upload-file.js"
75
+ },
76
+ "./download": {
77
+ "types": "./dist/download.d.ts",
78
+ "default": "./dist/download.js"
79
+ },
80
+ "./wallet-sign": {
81
+ "types": "./dist/wallet-sign.d.ts",
82
+ "default": "./dist/wallet-sign.js"
83
+ },
84
+ "./package.json": "./package.json"
85
+ },
32
86
  "engines": {
33
- "node": ">=22"
87
+ "node": ">=22.15.0"
34
88
  },
35
89
  "files": [
36
90
  "dist",
37
91
  "vendor",
38
92
  "README.md",
39
93
  "AGENTS.md",
94
+ "docs",
40
95
  "LICENSE",
41
- "LICENSING.md"
96
+ "LICENSING.md",
97
+ "CHANGELOG.md",
98
+ "server.json"
42
99
  ],
43
100
  "scripts": {
44
101
  "compile": "tsc -p tsconfig.json",
@@ -51,6 +108,8 @@
51
108
  },
52
109
  "dependencies": {
53
110
  "@mysten/sui": "^2.20.1",
54
- "@mysten/walrus": "^1.2.3"
55
- }
111
+ "@mysten/walrus": "^1.2.3",
112
+ "uqr": "^0.1.3"
113
+ },
114
+ "mcpName": "io.github.needmoretruth/nmts"
56
115
  }
package/server.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.needmoretruth/nmts",
4
+ "description": "End-to-end encrypted storage on the Walrus network, as MCP tools: upload, download, list, share, credits and the wallet, from the machine it runs on.",
5
+ "repository": {
6
+ "url": "https://github.com/needmoretruth/nmts-cli",
7
+ "source": "github"
8
+ },
9
+ "version": "0.34.2",
10
+ "packages": [
11
+ {
12
+ "registryType": "npm",
13
+ "registryBaseUrl": "https://registry.npmjs.org",
14
+ "identifier": "@needmoretruth/nmts-cli",
15
+ "version": "0.34.2",
16
+ "transport": {
17
+ "type": "stdio"
18
+ },
19
+ "packageArguments": [
20
+ {
21
+ "type": "positional",
22
+ "value": "mcp"
23
+ }
24
+ ],
25
+ "runtimeHint": "npx"
26
+ }
27
+ ]
28
+ }
@@ -149,6 +149,24 @@ export function account_code_parse(input: string): Uint8Array;
149
149
  */
150
150
  export function b64_encode(data: Uint8Array): string;
151
151
 
152
+ /**
153
+ * The ACCOUNT CODE of AI account number `index` (1-based) from the 32-byte `ai_account_root`
154
+ * (NCF-3 §1.5), in the same display form `account_code_generate` returns.
155
+ *
156
+ * ⛔ It takes the ROOT rather than the parent's code for the same reason `wallet_seed_for` does:
157
+ * the browser derives once at sign-in and keeps only the roots, so by the time somebody asks for
158
+ * an AI account the account code is long gone from memory and re-running Argon2id would mean
159
+ * asking them to type it again.
160
+ *
161
+ * The 20 bytes it returns are an ordinary account code — the child derives its own chain from
162
+ * them, including its own AI-account root, so the tree carries on downward under one rule. The
163
+ * expansion is one-way: a child's code reveals nothing about the parent's.
164
+ *
165
+ * Rejects `index` 0: AI accounts are numbered from 1, so that walking `1..=n` from the top code
166
+ * reaches every code that can exist beneath it.
167
+ */
168
+ export function derive_ai_account_code(ai_account_root: Uint8Array, index: number): string;
169
+
152
170
  /**
153
171
  * Derives the 32-byte wrapping key for a passphrase-protected "remember this device" record.
154
172
  *
@@ -206,7 +224,7 @@ export function header_plaintext_len(header: Uint8Array): number;
206
224
  /**
207
225
  * Derives the account keys from the 20 raw account-code bytes (NCF-3 §1).
208
226
  *
209
- * Returns one concatenated buffer (`KDF_DERIVE_LEN` = 256 bytes) the caller slices:
227
+ * Returns one concatenated buffer (`KDF_DERIVE_LEN` = 288 bytes) the caller slices:
210
228
  * ```text
211
229
  * 0.. 16 account_id public — the server's lookup key
212
230
  * 16.. 48 auth_secret secret — sent to the server over TLS at login
@@ -217,11 +235,13 @@ export function header_plaintext_len(header: Uint8Array): number;
217
235
  * 176..208 wallet_root secret — parent of EVERY wallet, including the first
218
236
  * 208..224 share_address public — the address a user hands out to be shared with
219
237
  * 224..256 share_sig_seed secret — ML-DSA-44 seed; its key IS the identity root (§5.2a)
238
+ * 256..288 ai_account_root secret — parent of every AI-account code (§1.5, the product rule of 2026-09-06)
220
239
  * ```
221
240
  * Every secret region above must be retained inside the crypto worker and never cross the
222
241
  * postMessage boundary.
223
242
  *
224
- * ⚠ **This layout only ever grows at the TAIL.** `share_sig_seed` was appended in 2026-08-02
243
+ * ⚠ **This layout only ever grows at the TAIL**, and `ai_account_root` was appended on 2026-09-06
244
+ * under the same rule. `share_sig_seed` was appended in 2026-08-02
225
245
  * rather than filed beside the other two share secrets, where it would read better, because
226
246
  * inserting it there would shift `wallet_root` and `share_address` and every constant on the
227
247
  * JS side would be silently wrong about which 32 bytes it was holding. Readability loses to
@@ -399,6 +419,7 @@ export interface InitOutput {
399
419
  readonly account_code_generate: () => [number, number];
400
420
  readonly account_code_parse: (a: number, b: number) => [number, number, number, number];
401
421
  readonly b64_encode: (a: number, b: number) => [number, number];
422
+ readonly derive_ai_account_code: (a: number, b: number, c: number) => [number, number, number, number];
402
423
  readonly device_wrap_key: (a: number, b: number, c: number, d: number) => [number, number, number, number];
403
424
  readonly envelope_open: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
404
425
  readonly envelope_seal: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
@@ -352,6 +352,46 @@ export function b64_encode(data) {
352
352
  }
353
353
  }
354
354
 
355
+ /**
356
+ * The ACCOUNT CODE of AI account number `index` (1-based) from the 32-byte `ai_account_root`
357
+ * (NCF-3 §1.5), in the same display form `account_code_generate` returns.
358
+ *
359
+ * ⛔ It takes the ROOT rather than the parent's code for the same reason `wallet_seed_for` does:
360
+ * the browser derives once at sign-in and keeps only the roots, so by the time somebody asks for
361
+ * an AI account the account code is long gone from memory and re-running Argon2id would mean
362
+ * asking them to type it again.
363
+ *
364
+ * The 20 bytes it returns are an ordinary account code — the child derives its own chain from
365
+ * them, including its own AI-account root, so the tree carries on downward under one rule. The
366
+ * expansion is one-way: a child's code reveals nothing about the parent's.
367
+ *
368
+ * Rejects `index` 0: AI accounts are numbered from 1, so that walking `1..=n` from the top code
369
+ * reaches every code that can exist beneath it.
370
+ * @param {Uint8Array} ai_account_root
371
+ * @param {number} index
372
+ * @returns {string}
373
+ */
374
+ export function derive_ai_account_code(ai_account_root, index) {
375
+ let deferred3_0;
376
+ let deferred3_1;
377
+ try {
378
+ const ptr0 = passArray8ToWasm0(ai_account_root, wasm.__wbindgen_malloc);
379
+ const len0 = WASM_VECTOR_LEN;
380
+ const ret = wasm.derive_ai_account_code(ptr0, len0, index);
381
+ var ptr2 = ret[0];
382
+ var len2 = ret[1];
383
+ if (ret[3]) {
384
+ ptr2 = 0; len2 = 0;
385
+ throw takeFromExternrefTable0(ret[2]);
386
+ }
387
+ deferred3_0 = ptr2;
388
+ deferred3_1 = len2;
389
+ return getStringFromWasm0(ptr2, len2);
390
+ } finally {
391
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
392
+ }
393
+ }
394
+
355
395
  /**
356
396
  * Derives the 32-byte wrapping key for a passphrase-protected "remember this device" record.
357
397
  *
@@ -518,7 +558,7 @@ export function header_plaintext_len(header) {
518
558
  /**
519
559
  * Derives the account keys from the 20 raw account-code bytes (NCF-3 §1).
520
560
  *
521
- * Returns one concatenated buffer (`KDF_DERIVE_LEN` = 256 bytes) the caller slices:
561
+ * Returns one concatenated buffer (`KDF_DERIVE_LEN` = 288 bytes) the caller slices:
522
562
  * ```text
523
563
  * 0.. 16 account_id public — the server's lookup key
524
564
  * 16.. 48 auth_secret secret — sent to the server over TLS at login
@@ -529,11 +569,13 @@ export function header_plaintext_len(header) {
529
569
  * 176..208 wallet_root secret — parent of EVERY wallet, including the first
530
570
  * 208..224 share_address public — the address a user hands out to be shared with
531
571
  * 224..256 share_sig_seed secret — ML-DSA-44 seed; its key IS the identity root (§5.2a)
572
+ * 256..288 ai_account_root secret — parent of every AI-account code (§1.5, the product rule of 2026-09-06)
532
573
  * ```
533
574
  * Every secret region above must be retained inside the crypto worker and never cross the
534
575
  * postMessage boundary.
535
576
  *
536
- * ⚠ **This layout only ever grows at the TAIL.** `share_sig_seed` was appended in 2026-08-02
577
+ * ⚠ **This layout only ever grows at the TAIL**, and `ai_account_root` was appended on 2026-09-06
578
+ * under the same rule. `share_sig_seed` was appended in 2026-08-02
537
579
  * rather than filed beside the other two share secrets, where it would read better, because
538
580
  * inserting it there would shift `wallet_root` and `share_address` and every constant on the
539
581
  * JS side would be silently wrong about which 32 bytes it was holding. Readability loses to
@@ -8,6 +8,7 @@ export const account_code_display: (a: number, b: number) => [number, number, nu
8
8
  export const account_code_generate: () => [number, number];
9
9
  export const account_code_parse: (a: number, b: number) => [number, number, number, number];
10
10
  export const b64_encode: (a: number, b: number) => [number, number];
11
+ export const derive_ai_account_code: (a: number, b: number, c: number) => [number, number, number, number];
11
12
  export const device_wrap_key: (a: number, b: number, c: number, d: number) => [number, number, number, number];
12
13
  export const envelope_open: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
13
14
  export const envelope_seal: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "description": "wasm-bindgen surface over nmts-crypto (NCF-1) for nmts/web. Production build only — never enable the `vectors` feature here.",
5
5
  "version": "0.1.0",
6
- "license": "AGPL-3.0-only",
6
+ "license": "Apache-2.0",
7
7
  "files": [
8
8
  "nmts_crypto_wasm_bg.wasm",
9
9
  "nmts_crypto_wasm.js",
@@ -1,77 +0,0 @@
1
- // `nmts consent` — see what this machine has agreed to, and change it.
2
- //
3
- // ⛔ IT IS A COMMAND AND NOT A PROMPT. A yes/no question in the middle of another command cannot
4
- // be answered by anything that is not a terminal, which is most of the places this tool runs:
5
- // a container, a build step, an agent's subprocess. Making agreement its own command means the
6
- // same answer works everywhere, is recorded with a date, and can be looked at afterwards —
7
- // none of which is true of a keystroke.
8
- import { CONSENTS, CONSENT_KEYS, grant, grantedAt, revoke } from "../consent.js";
9
- import { NmtsError } from "../errors.js";
10
- import { BINARY_NAME, SUPPORT_EMAIL, VERSION } from "../product.js";
11
- function isKey(value) {
12
- return CONSENT_KEYS.includes(value);
13
- }
14
- function keyOrFail(raw) {
15
- if (raw === undefined || raw === "") {
16
- throw new NmtsError("Say which one.", {
17
- exitCode: 2,
18
- nextStep: `One of: ${CONSENT_KEYS.join(" · ")}`,
19
- });
20
- }
21
- if (!isKey(raw)) {
22
- throw new NmtsError(`There is nothing called "${raw}" to agree to.`, {
23
- exitCode: 2,
24
- nextStep: `One of: ${CONSENT_KEYS.join(" · ")}`,
25
- });
26
- }
27
- return raw;
28
- }
29
- export function consent(action, target, options = {}) {
30
- const say = options.write ?? ((line) => process.stdout.write(`${line}\n`));
31
- const now = options.now ?? (() => new Date());
32
- if (action === undefined || action === "" || action === "list") {
33
- if (options.json) {
34
- say(JSON.stringify(CONSENT_KEYS.map((key) => ({
35
- key,
36
- granted: grantedAt(key) !== null,
37
- grantedAt: grantedAt(key),
38
- what: CONSENTS[key].what,
39
- risk: CONSENTS[key].risk,
40
- }))));
41
- return 0;
42
- }
43
- for (const key of CONSENT_KEYS) {
44
- const at = grantedAt(key);
45
- say(`${at === null ? " not agreed" : " agreed "} ${key}`);
46
- say(` ${CONSENTS[key].what}`);
47
- if (at !== null)
48
- say(` agreed on this machine ${at}`);
49
- say(``);
50
- }
51
- say(` ${BINARY_NAME} consent grant <name> agree, on this machine, once`);
52
- say(` ${BINARY_NAME} consent revoke <name> take it back`);
53
- say(``);
54
- say(` Agreeing here does not change what the published Terms say. NMTS is not responsible`);
55
- say(` for what any program on this machine does with this account, an AI agent included.`);
56
- say(` Something wrong or confusing? ${SUPPORT_EMAIL}`);
57
- return 0;
58
- }
59
- if (action === "grant") {
60
- const key = keyOrFail(target);
61
- grant(key, VERSION, now());
62
- say(`agreed: ${key}`);
63
- say(` ${CONSENTS[key].what}`);
64
- say(` ${CONSENTS[key].limit}`);
65
- return 0;
66
- }
67
- if (action === "revoke") {
68
- const key = keyOrFail(target);
69
- revoke(key);
70
- say(`taken back: ${key}`);
71
- return 0;
72
- }
73
- throw new NmtsError(`Unknown: ${BINARY_NAME} consent ${action}`, {
74
- exitCode: 2,
75
- nextStep: `Try \`${BINARY_NAME} consent\`, \`${BINARY_NAME} consent grant <name>\`, or \`${BINARY_NAME} consent revoke <name>\`.`,
76
- });
77
- }