@needmoretruth/nmts-cli 0.17.2 → 0.34.1

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 +124 -516
  2. package/CHANGELOG.md +98 -0
  3. package/README.ko.md +374 -467
  4. package/README.md +384 -465
  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,71 @@
1
+ // The zstd encoder this program hands to the file-list codec (NCF-3 §6.3.4, compression flag 0x02).
2
+ //
3
+ // ⛔ NOTHING IS IMPLEMENTED HERE. The shared codec declares the SHAPE of an encoder and a register
4
+ // to put one in; the browser fills that register with a WebAssembly build it fetches, and this
5
+ // file fills it with Node's own `zlib`. Writing a compressor by hand would be a second answer
6
+ // to a solved problem, and the two halves of the product have to produce the same bytes.
7
+ //
8
+ // ⛔ THE FRAME IS BOUNDED BEFORE ANYTHING IS ALLOCATED FOR IT, twice. A zstd frame says up front
9
+ // how many bytes it expands to; that number is read out of the header (14 bytes, no allocation)
10
+ // and compared against the caller's bound, and the bound is then ALSO handed to `zlib` as
11
+ // `maxOutputLength`, which refuses rather than truncating. A file list is authenticated, so a
12
+ // frame this big cannot arrive from a stranger — but a build that met a corrupt one must not be
13
+ // asked for a gigabyte of memory first, and a decompressor that quietly returned a SHORTER list
14
+ // would be the one failure this format may never have.
15
+ //
16
+ // ⛔ `node:zlib` IS IMPORTED ONLY WHEN A LIST IS ACTUALLY READ OR WRITTEN. An agent runs this tool
17
+ // in a loop, so everything loaded before the command is known is paid for thousands of times.
18
+ // The module body below holds two closures and nothing else.
19
+ //
20
+ // ⚠ NODE 22.15.0 IS THE FLOOR. zstd landed in Node's `zlib` there (and in 23.8.0 on the odd-numbered
21
+ // line); `package.json` states it, and a build without it simply registers nothing — the writer
22
+ // falls back to gzip, which every reader of both format versions understands.
23
+ import { setZstdCodec, zstdContentSize } from "./shared/lib/drive/zstd.js";
24
+ let loaded = null;
25
+ async function zlib() {
26
+ if (loaded === null)
27
+ loaded = await import("node:zlib");
28
+ return loaded;
29
+ }
30
+ const codec = {
31
+ async compress(bytes, level) {
32
+ const z = await zlib();
33
+ return z.zstdCompressSync(bytes, {
34
+ params: { [z.constants.ZSTD_c_compressionLevel]: level },
35
+ });
36
+ },
37
+ async decompress(bytes, maxOut) {
38
+ // Read the frame's own claim first. The codec above this one checks it too; this is the last
39
+ // place before a buffer is sized from a number the frame supplied about itself.
40
+ const declared = zstdContentSize(bytes);
41
+ if (declared === null) {
42
+ throw new Error("This part of the file list does not say how large it expands to.");
43
+ }
44
+ if (declared > maxOut) {
45
+ throw new Error(`This part of the file list claims ${declared} bytes, over the ${maxOut} allowed.`);
46
+ }
47
+ const z = await zlib();
48
+ return z.zstdDecompressSync(bytes, { maxOutputLength: maxOut });
49
+ },
50
+ };
51
+ /** True once this process has handed the codec over, so the register is written once. */
52
+ let registered = false;
53
+ /**
54
+ * Make this program able to write and read compression flag 0x02. Safe to call more than once.
55
+ *
56
+ * ⛔ CALLED FROM THE FILE-LIST FLOW RATHER THAN FROM THE ENTRY POINT, and that is deliberate: the
57
+ * package is a library and an MCP server as well as a command, and a list opened through any of
58
+ * those doors has to be able to expand a zstd frame the browser wrote. Putting it here also
59
+ * means `nmts --help` never loads it.
60
+ */
61
+ export function registerNodeZstd() {
62
+ if (registered)
63
+ return;
64
+ registered = true;
65
+ setZstdCodec(codec);
66
+ }
67
+ /** For tests that need this process to look like a build with no encoder. */
68
+ export function forgetNodeZstd() {
69
+ registered = false;
70
+ setZstdCodec(null);
71
+ }
@@ -0,0 +1,15 @@
1
+ # nmts accept-terms — accept a new version of the Terms
2
+
3
+ Commands: accept-terms
4
+ Tiers: accept-terms=none · accept-terms.accept=high
5
+
6
+ When new Terms take effect, the server refuses uploads and shares from an account that has not
7
+ accepted them (`TERMS_ACCEPTANCE_REQUIRED`). `accept-terms --status` says where the account
8
+ stands and reads nothing else.
9
+
10
+ Accepting is the person's act. At a terminal they read the documents (`nmts terms`, `nmts privacy`,
11
+ `nmts notices` for what changed) and type the two versions. When you are relaying their answer,
12
+ put the question to them in your own words, then run
13
+ `nmts accept-terms --accept-terms <version> --accept-privacy <version> --yes` — the versions they
14
+ named, never "the current one". It needs the NMTS key, is asked about in every mode but
15
+ skip-permissions, and has no lock. The other way in is the account screen at nmts.me.
@@ -0,0 +1,17 @@
1
+ # nmts create — make a new account
2
+
3
+ Commands: create
4
+ Tiers: create=high
5
+
6
+ Signs in with one account's key and creates another, printing the new code once — nothing can
7
+ print it again, because the server stores a one-way verifier and never the NMTS key. This is how a
8
+ service that keeps its customers' files in NMTS gives each customer a drive; the first account of
9
+ all has to be made in a browser. It needs a key with `files:write` and a live human check behind
10
+ it, and the server allows two a day and five a week per key.
11
+
12
+ There is no lock: the account does not exist yet. The person's acceptance is the two flags,
13
+ `--accept-terms <version> --accept-privacy <version>` — a version they read, never "the current
14
+ one" — and without them it is refused. With `--json` the NMTS key does not go into the output:
15
+ `--out <file>` is required and the JSON carries the path. A new account starts with no credits,
16
+ and the free trial runs its own human check on every application. It stores nothing on this
17
+ machine and switches nothing over.
@@ -0,0 +1,34 @@
1
+ # nmts credits — moving credits between your own accounts
2
+
3
+ Commands: credits
4
+ Tiers: credits=none · credits.transfer=medium
5
+
6
+ `nmts credits transfer --to <account identifier> <credits>` moves whole credits from the account
7
+ this key belongs to onto another account of the same family — the account a person made, and every
8
+ account made under it. `--to` takes the receiving account's identifier: what `nmts whoami` prints
9
+ for that account, and what the account screen lists beside an AI account. `--json` prints
10
+ `{"to":"…","credits":5,"from_balance":80,"to_balance":50}`; without it, both balances are printed
11
+ under the line that says how many moved.
12
+
13
+ **It cannot reach anyone else.** A recipient outside the family is refused, and an account that
14
+ does not exist is refused in exactly the same words — so this door cannot be used to find out which
15
+ identifiers are real. There is no price, no fee and no third party here: nothing is bought or sold,
16
+ and the family's total is what it was a moment before.
17
+
18
+ **Why it exists.** The free trial, the human check and the ceilings belong to the whole family: one
19
+ week's place for the tree rather than one each. That place lands on one account, and this is how it
20
+ reaches the account that needs it.
21
+
22
+ It needs the account's human check to be live, the same as the free trial does. When it is not, the
23
+ refusal names `nmts verify` — the code a person types at a browser — rather than a credential
24
+ problem. It is a **medium** act: asked in the default mode, your judgement in an auto mode. Nothing
25
+ is spent by moving credits, and running the same command the other way puts them back.
26
+
27
+ The credits keep the expiry they already had. The move drains the soonest-expiring lots first, so
28
+ sending 100 may arrive as several grants with different dates, and moving them never renews them.
29
+
30
+ Four refusals, four different remedies, and none of them is a retry:
31
+ `CREDIT_TRANSFER_OUTSIDE_FAMILY` (name an account of your own) · `CREDIT_TRANSFER_SELF` (that is
32
+ the account sending) · `CREDIT_TRANSFER_INSUFFICIENT` (send less — the refusal carries what was
33
+ needed and what the account can spend) · `CREDIT_TRANSFER_ZERO` (send some). Nothing is moved and
34
+ nothing is held in any of the four.
@@ -0,0 +1,14 @@
1
+ # nmts delete-account — erase the account's server record
2
+
3
+ Commands: delete-account
4
+ Tiers: delete-account=ultra-high
5
+
6
+ Erases the account, the file list, every file's record and share, sessions and keys. It cannot be
7
+ undone. Not erased: the bytes on the storage network (paid through their term, unreadable without
8
+ the records) and the NMTS key on this machine (`nmts logout` removes it). Storage already paid
9
+ for is not refunded — the funds went to the network, never to NMTS.
10
+
11
+ It is the one act above high. In the default mode a person types a sentence at the terminal; in
12
+ both auto modes it is refused whatever is unlocked; under skip-permissions it runs only with
13
+ `--reason "<why>"` and `--yes`, and the reason is the place to say, having thought it through,
14
+ why this is what the person wants. Do not run it because it would tidy something up.
@@ -0,0 +1,27 @@
1
+ # nmts deposit — the credit deposit an upload sets aside
2
+
3
+ Commands: deposit
4
+ Tiers: deposit=none · deposit.set=low
5
+
6
+ Every file paid for with credits sets a deposit aside in the same transaction as the price: whole
7
+ credits, from 0 to 64, chosen per upload. The deposit is what a later chain operation on that file
8
+ is charged against — releasing its storage early, or a storage operation that costs the network a
9
+ fee — converted to credits, at least one per operation, and whatever is left comes back when the
10
+ storage period ends. It does not count against the per-file or per-day ceilings, and it returns
11
+ with the price if the chain never registers the upload.
12
+
13
+ `nmts deposit` prints what this account sets aside by default, `64 (not set)` until somebody
14
+ chooses; `nmts deposit <n>` records another number. `put --deposit <n>` and `push --deposit <n>`
15
+ set it for one run without changing the default, and are refused before anything is sent when the
16
+ number is not a whole 0 to 64. A wallet-paid upload takes no deposit and refuses the flag: the
17
+ wallet buys its own storage.
18
+
19
+ `0` is a real answer and is not withheld. A file with no deposit still releases — it pays twice
20
+ the same chain fee out of the balance at that moment, and is refused, with both numbers named,
21
+ when the balance cannot cover it. Every screen that offers 0 says that in the same breath.
22
+
23
+ The default lives in the sealed file list, so the server never learns it and it follows the account
24
+ to every device; reading it costs a list read and setting it costs a list write, which is why
25
+ setting it is a low act (asked once in the default mode, run in an auto mode). It applies to what
26
+ is uploaded next: a deposit already set aside on a stored file is that file's and is not moved.
27
+ `nmts balance` shows what is held, what each file set aside and how much of it has been spent.
@@ -0,0 +1,9 @@
1
+ # nmts devices — what is signed in to this account
2
+
3
+ Commands: devices
4
+ Tiers: devices=none · devices.sign-out=high(sign-out)
5
+
6
+ Lists the devices and keys signed in to this account. `--sign-out <id|all>` ends one or all of
7
+ them; whoever is there is signed out at once. It needs the NMTS key beside the API key, is locked
8
+ until a person runs `nmts unlock sign-out`, and asks on every run in every mode but
9
+ skip-permissions — at the terminal, or with `--yes` after the person has said so.
@@ -0,0 +1,10 @@
1
+ # nmts notices, terms, privacy — what NMTS has posted
2
+
3
+ Commands: notices, terms, privacy
4
+ Tiers: notices=none · terms=none · privacy=none
5
+
6
+ `notices` lists what NMTS has posted; `notices <id>` prints one and `--save <id>` keeps it as a
7
+ file. `terms` prints the Terms of Service in force (`--board` for the message board's own,
8
+ `--lang ko` for Korean), `privacy` the Privacy Policy; `--save` writes either under the name the
9
+ server gives it, `--out` says where. Each document prints its version at the top — the value
10
+ `accept-terms` asks for. All three only read.
@@ -0,0 +1,21 @@
1
+ # nmts env — where this is running, and what that means
2
+
3
+ Commands: env
4
+ Tiers: env=none
5
+
6
+ Needs no credential and contacts nothing. Run it first on a machine you have not seen; `--json`
7
+ gives the same thing to parse. It reports the operating system; whether this is a Docker or Podman
8
+ container and whether root here is root on the host; whether a file written here can be kept
9
+ private (measured, not guessed); whether there is a terminal and whether a browser could be
10
+ opened; whether an NMTS key and an API key were found and where each came from; if the stored
11
+ code is sealed, whether a passphrase is actually reachable; which agent left a marker here; and
12
+ what the version check last found. The `advice` it returns is written to be repeated to the person
13
+ as-is — do that when something in it is a `warn`.
14
+
15
+ Codex, Hermes and OpenClaw clear the environment before starting an MCP server, so none of
16
+ `NMTS_ACCOUNT_CODE`, `NMTS_ACCOUNT_CODE_FILE`, `NMTS_API_KEY` or `NMTS_PASSPHRASE` survives there.
17
+ Store the credentials with `nmts login` instead; an empty `agentHosts` list is what those three
18
+ look like, not evidence that no agent is running.
19
+
20
+ Inside a container, do not put the NMTS key in an environment variable. Write it to a file
21
+ and set `NMTS_ACCOUNT_CODE_FILE` to its path — `--secret` mounts, tmpfs and bind mounts all work.
@@ -0,0 +1,27 @@
1
+ # nmts extend — buy more storage time for one file
2
+
3
+ Commands: extend
4
+ Tiers: extend=high(wallet)
5
+
6
+ Signs and spends WAL from the wallet your NMTS key derives. It is a standing choice: locked
7
+ until a person runs `nmts unlock wallet` at a terminal (scope `storage` is enough, with an expiry
8
+ and, if they want one, a spending ceiling), and asked nothing afterwards while that unlock lasts.
9
+
10
+ ```sh
11
+ nmts extend notes/report.pdf --dry-run # the real price. Nothing is signed, no key is touched
12
+ nmts extend notes/report.pdf --epochs 4 # how many epochs to add (default 2)
13
+ ```
14
+
15
+ If the account holds a standing share (`nmts tip`), that share of the WAL just paid goes to the
16
+ developer right after the extension, without a question.
17
+
18
+ ```sh
19
+ ```
20
+
21
+ Both forms print the price in WAL, the chain fee in SUI measured by a dry run of the exact
22
+ transaction (`null` in `--json` when it could not be measured, never 0), and what the wallet
23
+ holds. A wallet short of either exits 4 with the two numbers before anything else; a balance the
24
+ chain could not read is said as unread, not as zero. A file nowhere near its deadline is refused
25
+ rather than extended; `--yes` says to do it anyway. If the purchase succeeds and the server then
26
+ fails to record the date, that is reported as itself and must not be retried — the storage is
27
+ already bought.
@@ -0,0 +1,10 @@
1
+ # nmts mkdir, mv, rename — folders and names
2
+
3
+ Commands: mkdir, mv, rename
4
+ Tiers: mkdir=none · mv=none · rename=none
5
+
6
+ Free, instant, reversible, and none of them stops to ask. `mkdir <path>` makes a folder and any
7
+ missing folder above it. `mv <paths> <folder>` moves things into a folder; `/` is the top of the
8
+ drive. `rename <path> <name>` gives one thing a new name and refuses a name already used in that
9
+ folder rather than numbering it. Paths are matched whole, and a path matching two entries is
10
+ refused (exit 4).
@@ -0,0 +1,14 @@
1
+ # nmts get — fetch one file
2
+
3
+ Commands: get
4
+ Tiers: get=none
5
+
6
+ Takes the path exactly as `nmts ls` prints it, fetches the sealed parts, decrypts and checks them,
7
+ and writes the file. `--out` chooses where. It will not replace an existing file without `--force`
8
+ — "already exists" is the person's decision.
9
+
10
+ It never leaves a half-right file: bytes go to a temporary name beside the target and are renamed
11
+ into place only once the hash matches, one part held in memory at a time. `--out -` hands the file
12
+ to stdout and writes nothing; in that mode every line for a person, including `--json`, goes to
13
+ stderr, binary bytes are refused when stdout is a terminal, and files over 64 MiB are refused
14
+ because a pipe cannot be taken back.
@@ -0,0 +1,14 @@
1
+ # nmts key — API keys made from the NMTS key
2
+
3
+ Commands: key
4
+ Tiers: key=none · key.new=medium · key.list=none · key.revoke=medium
5
+
6
+ `key new` makes an API key with the NMTS key alone — no browser — and stores it as this
7
+ machine's credential; `--print` shows it once as well. `--scopes read,write,spend` says what it may
8
+ do (default `read`; a program that uploads needs all three), `--days`/`--until` how long it lasts
9
+ (the server clamps at its own ceiling and the reply says the date). `key list` shows every key of
10
+ the account — what it may do, when it stops, when it was last used, and which one is this
11
+ machine's. `key revoke <id>` ends one and `key revoke all` ends every one; whatever used it stops
12
+ working. All three present the NMTS key's proof, never an API key: an API key cannot list or cut keys, and
13
+ that is what makes revoking mean something. In the default mode `new` and `revoke` ask first (or
14
+ take `--yes`); in an auto mode they are your judgement. NMTS keeps no copy of a key.
@@ -0,0 +1,23 @@
1
+ # nmts login — keep the NMTS key on this machine, and take an API key
2
+
3
+ Commands: login
4
+ Tiers: login=none · login.plain=high(unsafe-code-storage) · login.env=high(plain-env)
5
+
6
+ `nmts login` stores the NMTS key sealed under a passphrase, checks whichever API key it finds
7
+ (`NMTS_API_KEY_FILE`, `NMTS_API_KEY`) with the server, and stores that too. It prints the key's
8
+ public handle and never the key. It does not replace a stored key unless the run says so.
9
+
10
+ Every later command needs the passphrase, from `NMTS_PASSPHRASE` or a terminal. A sealed code with
11
+ no passphrase in reach is not a usable credential; `nmts env` says which case this machine is in.
12
+
13
+ Two other shapes exist and both are locked until a person opens them once, at a terminal:
14
+
15
+ - `--plain` stores the NMTS key unsealed. Unlock: `nmts unlock unsafe-code-storage`.
16
+ - `--env` stores nothing and prints the variable to set. Unlock: `nmts unlock plain-env`. The same
17
+ unlock covers reading the NMTS key from `NMTS_ACCOUNT_CODE` on every command — an environment
18
+ variable is readable through `docker inspect`, `/proc/<pid>/environ` and most CI logs.
19
+
20
+ Once unlocked, neither asks again: they are standing choices, not per-run questions.
21
+
22
+ Prefer `NMTS_ACCOUNT_CODE_FILE=/path` over any of this: the file is read and never copied, it asks
23
+ nothing, and it is the shape that works in a container. See `nmts help env`.
@@ -0,0 +1,11 @@
1
+ # nmts logout — remove the stored credentials
2
+
3
+ Commands: logout
4
+ Tiers: logout=none
5
+
6
+ Removes the NMTS key and API key this tool stored on this machine. Nothing on the server
7
+ changes: the key stays valid until revoked (`nmts key revoke`, or the account screen), and the
8
+ account is untouched. A code that came from an environment variable or a file is not touched
9
+ either — this only forgets what `nmts login` wrote.
10
+
11
+ Run it when a machine is handed over or a task is finished on a machine the person does not keep.
@@ -0,0 +1,13 @@
1
+ # nmts losses — storage the daily check could not find
2
+
3
+ Commands: losses
4
+ Tiers: losses=none · losses.dismiss=medium
5
+
6
+ Lists storage objects paid with this account's credits that NMTS's daily check could not find on
7
+ the chain, newest first: a public chain object id and the day a check first missed it, no file
8
+ name, because the server cannot pair them. `--recheck <id>` asks the chain again now. Both only
9
+ read.
10
+
11
+ `--dismiss <id>` puts a line down for good, which is somebody saying "I have read this". In the
12
+ default mode it asks first (or takes `--yes`); in an auto mode it is your judgement, and the safe
13
+ judgement is to show the person the line rather than dismiss it for them.
@@ -0,0 +1,16 @@
1
+ # nmts ls — list the files
2
+
3
+ Commands: ls, listfile
4
+ Tiers: ls=none · listfile=none
5
+
6
+ `nmts ls` lists the account's files. `--json` prints one object: `{state, seq, entries: [{id, path,
7
+ kind, size, updatedAt, trashed, trashedAt}], hiddenTrashed, firstTimeOnThisMachine,
8
+ serverSeqDisagreed}` — parse that, not the table. Trashed entries are omitted unless `--all`, and
9
+ `hiddenTrashed` says how many; do not report a file as gone without checking. `--find <text>`
10
+ keeps only names containing the text, `--sort name|size|date` and `--desc` order the listing.
11
+
12
+ It refuses rather than lists when the server offers a file list older than one this machine has
13
+ already seen, or a different list at the same version. Report that and stop; it is not transient.
14
+
15
+ `nmts listfile` writes this machine's copy of the sealed file list out as a file (`--out`, or
16
+ `--out -` for stdout). It is sealed: without the NMTS key it says nothing.
@@ -0,0 +1,9 @@
1
+ # nmts star, pin, label — marks on files
2
+
3
+ Commands: star, unstar, pin, unpin, label, unlabel
4
+ Tiers: star=none · unstar=none · pin=none · unpin=none · label=none · unlabel=none
5
+
6
+ Free and reversible; nothing here asks. `star <files>` gathers files in favourites, `pin <files>`
7
+ holds them at the top of their folder, and `label <name> <files>` attaches a word you choose; the
8
+ `un-` forms take each off. A label exists while a file wears it. `label --rename <old> <new>`
9
+ renames a label on every file that carries it; `unlabel <name> --all` takes it off all of them.
@@ -0,0 +1,33 @@
1
+ # nmts mcp — serve this account as MCP tools
2
+
3
+ Commands: mcp
4
+ Tiers: mcp=none
5
+
6
+ Serves most of this tool's commands as MCP tools on stdin/stdout. The person chose the directory
7
+ files land in when they started the server (`--out`), and no tool takes a destination. Each tool's
8
+ description starts with its tier, the listing carries the MCP hints (read-only, destructive), and
9
+ the same gate the command line runs sits before every call: a locked act is refused until a person
10
+ unlocks it at a terminal, and an act that needs the person's yes in this mode is put to them over
11
+ MCP elicitation — or refused, naming the way round it, when the client cannot ask.
12
+
13
+ The tools: `nmts_whoami` `nmts_list` `nmts_usage` `nmts_expiring` `nmts_balance` `nmts_shares`
14
+ `nmts_shares_sent` · `nmts_wallet_activity` `nmts_wallet_storage` · `nmts_devices` · `nmts_notices`
15
+ `nmts_notice` `nmts_terms` `nmts_privacy` · `nmts_losses` `nmts_loss_recheck` · `nmts_get`
16
+ `nmts_pull` `nmts_receive` · `nmts_put` `nmts_push` `nmts_padding` `nmts_deposit` · `nmts_public_code` ·
17
+ `nmts_mkdir` `nmts_move` `nmts_rename` `nmts_mark` `nmts_label_rename` `nmts_unlabel_all`
18
+ `nmts_trash` `nmts_restore` · `nmts_credits_transfer` · `nmts_share` `nmts_unshare` · `nmts_support_send`
19
+ `nmts_support_list` `nmts_support_show` `nmts_support_reply`.
20
+
21
+ Deliberately absent: signing in or out, keys and unlocks, the human check, permanent destruction,
22
+ rebuilding or rolling back the file list, and the recovery files. If one of those is what the work
23
+ needs, say so and let the person do it.
24
+
25
+ ```
26
+ claude mcp add nmts -- nmts mcp --out /where/files/should/land
27
+ codex mcp add nmts -- nmts mcp --out /where/files/should/land
28
+ opencode mcp add nmts -- nmts mcp --out /where/files/should/land
29
+ ```
30
+
31
+ A sealed stored code is opened once, at startup; `nmts mcp` never prompts, so a sealed code with
32
+ no `NMTS_PASSPHRASE` exits 3 at startup rather than hang. Arguments are checked against what each
33
+ tool declares — `"dry_run": "true"` is a refusal, not an upload.
@@ -0,0 +1,29 @@
1
+ # nmts mode — how much an agent may decide without asking
2
+
3
+ Commands: mode
4
+ Tiers: mode=none
5
+
6
+ Every act this tool performs has a tier — none, low, medium, high, ultra-high — and the mode says
7
+ what each tier meets:
8
+
9
+ | | default | auto-low | auto-high | skip-permissions |
10
+ |---|---|---|---|---|
11
+ | none | runs | runs | runs | runs |
12
+ | low | asks | runs | runs | runs |
13
+ | medium | asks | your judgement | your judgement | runs |
14
+ | high | unlock, then asks | unlock, then asks | unlock, then asks | runs |
15
+ | ultra-high | a person types | refused | refused | `--reason` and `--yes` |
16
+
17
+ "Asks" means: at a terminal, a y/N question; with no terminal, exit 5 and the sentence to run again
18
+ with `--yes` after the person has said so. "Your judgement" means the tool does not block: in an
19
+ auto mode you decide whether this is what the person wants, and auto-high is the mode where they
20
+ asked you to think further ahead than auto-low. "Unlock" is `nmts unlock <key>`, a person's act at
21
+ a terminal (`nmts help unlock`). Under skip-permissions nothing asks and nothing is locked; an
22
+ ultra-high act still wants a `--reason`, which is where you say why it is right.
23
+
24
+ Switching is a person's act: `nmts mode auto-low` at a terminal (the auto modes ask y/N, skip-
25
+ permissions asks for a typed sentence); `nmts mode default` turns it off; `nmts mode explain
26
+ <mode>` prints what a mode does, its risk and its gain, and `nmts mode` prints which one is on.
27
+ Every other command announces an active mode on stderr. Do not switch a mode, and do not tell the
28
+ person to switch one so that you can finish a task; you may recommend one when it fits, with the
29
+ explanation, and let them decide.
@@ -0,0 +1,13 @@
1
+ # nmts on-collision — a name already in use
2
+
3
+ Commands: on-collision
4
+ Tiers: on-collision=none · on-collision.set=low
5
+
6
+ Reads or sets what an upload does when its name is already taken in the destination folder:
7
+ `rename` numbers the new file (`report (2).pdf`) and leaves what is there alone; `overwrite` puts
8
+ the old file in the trash, where `nmts restore` brings it back for thirty days. The default is
9
+ `rename`. Setting it is a low act: asked once in the default mode, run in an auto mode.
10
+
11
+ `put --on-collision overwrite` asks for the other answer for one run, and only takes effect while a
12
+ mode is on; in the default mode the upload is renamed and says so, because displacing somebody's
13
+ file is not a decision an agent makes alone.
@@ -0,0 +1,13 @@
1
+ # nmts padding — how file sizes are hidden
2
+
3
+ Commands: padding
4
+ Tiers: padding=none · padding.set=low
5
+
6
+ A stored file's size is public on the storage network no matter what; padding is how coarsely it
7
+ is rounded up before sealing. `standard` allows a few dozen sizes per doubling for about one
8
+ percent more storage; `pow2` allows one per doubling, hides more, and costs more on average; `off`
9
+ rounds nothing, so the file's exact length is visible to the network and to anyone who reads the
10
+ blob, and about one percent less storage is used. The setting lives in the sealed file list, so it
11
+ follows the account to every device and the server never learns it. Reading costs a list read;
12
+ setting costs a list write, is a low act (asked once in the default mode, run in an auto mode), and
13
+ applies to what is uploaded next — bytes already on the network are not re-padded.
@@ -0,0 +1,9 @@
1
+ # nmts public-code — the code other accounts send files to
2
+
3
+ Commands: public-code
4
+ Tiers: public-code=none · public-code.publish=medium
5
+
6
+ Prints the account's public code and whether it has been published. It is not the NMTS key.
7
+ An unpublished code cannot receive anything. Publishing is permanent, so it is `--publish` and not
8
+ automatic: in the default mode it asks first (or takes `--yes`); in an auto mode it is your
9
+ judgement, and a permanent, public act is one to put to the person.
@@ -0,0 +1,9 @@
1
+ # nmts pull — fetch a folder, or everything
2
+
3
+ Commands: pull
4
+ Tiers: pull=none
5
+
6
+ Downloads a whole folder, or the whole account with no argument, keeping its shape under `--out`.
7
+ Files already present with the right content are skipped; `--force` replaces what differs. Unlike
8
+ `push`, it carries on past a file that fails and reports the list at the end, because a download
9
+ that fails costs nothing to try again.
@@ -0,0 +1,12 @@
1
+ # nmts push — upload a whole directory
2
+
3
+ Commands: push
4
+ Tiers: push=medium · push.wallet=high(wallet)
5
+
6
+ Uploads a directory, rebuilding its shape in the account, and spends credits the way `put` does
7
+ (`nmts help put`). It stops at the first failure, saying what is already uploaded; running it again
8
+ sends only the rest. Names already in the destination are skipped, dot-files are left alone
9
+ without `--hidden`, and symbolic links are not followed. `--to` names the destination folder,
10
+ `--dry-run` prices the whole run and sends nothing.
11
+
12
+ `--pay wallet` does what it does for `put`, one file at a time, under the same standing unlock.
@@ -0,0 +1,36 @@
1
+ # nmts put — encrypt one file and upload it
2
+
3
+ Commands: put
4
+ Tiers: put=medium · put.wallet=high(wallet)
5
+
6
+ This is the command that spends. The price is one credit per started mebibyte, printed before the
7
+ upload starts. In the default mode it asks first (answer at the terminal, or run with `--yes`);
8
+ in an auto mode it runs when you judge it is what the person wants.
9
+
10
+ ```sh
11
+ nmts put report.pdf --dry-run # says the price, sends nothing, charges nothing
12
+ nmts put report.pdf --to notes # into a folder that already exists
13
+ nmts put report.pdf --name x.pdf # under another name
14
+ nmts put report.pdf --json # one JSON object, no progress output
15
+ ```
16
+
17
+ A file larger than one part (64 MiB by default, `--part-size` changes it) is split and each part
18
+ is bought separately; a run that stops partway is finished by running the same command again, which
19
+ buys only what was never bought. If `put` fails, read whether the message says the account has
20
+ already paid: when it has, the same command finishes the job for nothing more; when it has not,
21
+ nothing was spent. `CHAIN_UNCERTAIN` is the one refusal where retrying can pay twice — run
22
+ `nmts ls` and look for the file first.
23
+
24
+ A name already taken in that folder is decided by this machine's setting (`nmts help on-collision`).
25
+ The default numbers the new file and leaves what is there alone.
26
+
27
+ **`--pay wallet`** buys the storage from the wallet your NMTS key derives instead of from
28
+ credits, and signs. It is a standing choice: locked until a person runs `nmts unlock wallet` (scope
29
+ `storage` is enough), and asked nothing afterwards while that unlock lasts. Before anything is
30
+ signed it prints the review: the WAL price, the relay's tip in SUI, the chain fee measured by a dry
31
+ run (`null` in `--json` when it could not be measured, never 0), both balances, and the term
32
+ (`--epochs`, default 2). A wallet short of either exits 4 with the two numbers. `--storage
33
+ fit|whole|<object id>` uses a free storage resource the wallet holds for a one-part file: `fit`
34
+ cuts it to size and leaves the rest free, `whole` binds all of it with the file. Do not choose
35
+ `--storage` for the person: the leftover is their decision. `--epochs` and `--storage` without
36
+ `--pay wallet` exit 2.
@@ -0,0 +1,13 @@
1
+ # nmts rebuild, rollback — the file list itself
2
+
3
+ Commands: rebuild, rollback
4
+ Tiers: rebuild=medium · rollback=high(rollback)
5
+
6
+ `rebuild` builds a file list from the server's rows, for an account that has none on this machine
7
+ and none on the server; `--force` rebuilds one this machine has already seen a list for. In the
8
+ default mode it asks first (or takes `--yes`); in an auto mode it is your judgement.
9
+
10
+ `rollback` puts the previous file list back. Nothing can say on somebody's behalf that the list
11
+ they are looking at is the wrong one, so it is locked until a person runs `nmts unlock rollback`,
12
+ and then needs `--yes` on every run in every mode but skip-permissions; without it the run says
13
+ what would happen and changes nothing.
@@ -0,0 +1,18 @@
1
+ # nmts recovery, recovery-list, kit — for the day NMTS is not there
2
+
3
+ Commands: recovery, recovery-list, kit
4
+ Tiers: recovery=none · recovery-list=none · kit=high(kit)
5
+
6
+ `recovery-list` writes the file that finds this account's bytes without NMTS: encrypted, it holds
7
+ where every file's bytes are and the key that opens each, and carries no NMTS key. `kit`
8
+ writes that list together with the NMTS key in the clear, so whoever holds that file holds the
9
+ account and the wallet — it is locked until a person runs `nmts unlock kit`, and asked about on
10
+ every run in every mode but skip-permissions. Both refuse to write a partial artefact and refuse a
11
+ name already taken without `--force`. Do not make either as part of some other task, and do not
12
+ put a kit anywhere the person did not name.
13
+
14
+ `recovery` downloads the standalone program that reads files back without NMTS, one executable for
15
+ this machine, and makes it runnable; it installs nothing and puts nothing on the PATH. Do not run
16
+ it as part of another task: who decides to have a program on their disk is the person. The
17
+ download is checked against the published hash, which proves the bytes are the ones published and
18
+ does not prove the program is honest.
@@ -0,0 +1,17 @@
1
+ # nmts s3 — hand the drive to a program that speaks S3
2
+
3
+ Commands: s3
4
+ Tiers: s3=medium
5
+
6
+ Starts a server on this machine's loopback address (`--port`, default 9000) that answers the S3
7
+ protocol, so rclone, the AWS CLI or a backup program can list, download and upload this account's
8
+ files without knowing NMTS. Uploads through it spend credits, which is why starting it is a medium
9
+ act: asked once in the default mode, your judgement in an auto mode. The credentials it prints are
10
+ made at start and stored nowhere; they stop working when the command stops.
11
+
12
+ The bucket is `drive` and a key is the file's path; folders come back as common prefixes.
13
+ Re-uploading a file that is already there is free and answered `200` — the gateway compares
14
+ content, not names. A key holding a different file is refused with `409`: this drive does not
15
+ replace files; delete first if replacing is what was asked for. Large files go up in pieces and an
16
+ interrupted upload stores nothing. It runs until stopped and the address cannot be changed; start
17
+ it for the task that needs it and stop it afterwards.
@@ -0,0 +1,15 @@
1
+ # nmts share, shares, receive, unshare — files between accounts
2
+
3
+ Commands: share, shares, receive, unshare
4
+ Tiers: share=high(share) · shares=none · receive=none · unshare=low
5
+
6
+ `share <path> <public code>` gives one file to another account. Whoever holds that code can then
7
+ download it; withdrawing later stops further downloads and cannot recall a copy already fetched,
8
+ and the code is not checked against a person — the wrong code sends the file to whoever holds it.
9
+ So it is locked until a person runs `nmts unlock share` once, and then asks on every run: it prints
10
+ the file and the code and stops until the same command is run with `--yes`, in every mode but
11
+ skip-permissions. Sharing is also on the short list the periodic human check gates.
12
+
13
+ `shares` lists what was shared with this account; `shares --sent <path>` says who one file was
14
+ shared with. `receive <id>` downloads one shared file (`--out`, `--force` as for `get`). `unshare
15
+ <id>` withdraws a share you sent, or removes one you were sent; in the default mode it asks once.