@needmoretruth/nmts-cli 0.39.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ export type { StorageHints } from "./storage-control/hints.ts";
2
+ export { formatBytes, listStorage, readOrRefuse } from "./storage-control/list.ts";
3
+ export type { ReadWalletStorage, StorageItem, StorageListing, StorageRead, StorageStatus, } from "./storage-control/list.ts";
4
+ export { applyExtension, nothingToExtend, planExtension } from "./storage-control/extend.ts";
5
+ export type { ExtendApplySeams, ExtendFacts, ExtendInput, ExtendOutcome, ExtendPlan, ExtendPlanSeams, } from "./storage-control/extend.ts";
6
+ export { planStorageOp, reshapeStorage } from "./storage-control/reshape.ts";
7
+ export type { ReshapeContext, ReshapeOutcome, ReshapeSeams, StorageOp, StorageOpAsk, StorageOpPlan, StorageOpResult, StorageOpReview, StorageShape, } from "./storage-control/reshape.ts";
8
+ export type { StorageOpShape, StorageOpsReads } from "./storage-control-chain.ts";
9
+ export type { StorageResource } from "./shared/lib/storage-control/chain.ts";
10
+ export { DEFAULT_EXTEND_EPOCHS } from "./extend-plan.ts";
11
+ export type { ExtendReads, SignExtension } from "./extend-plan.ts";
12
+ export type { Budget } from "./extend-budget.ts";
13
+ export type { SignStorageOp } from "./wallet-sign-seams.ts";
@@ -0,0 +1,24 @@
1
+ // Storage control without a terminal: what a wallet holds, extending a file's term, and cutting,
2
+ // joining and handing over a resource — decided, priced, signed and handed back rather than printed.
3
+ //
4
+ // ⛔ ONE IMPLEMENTATION, TWO CALLERS, which is the whole reason this entry exists. `nmts extend` and
5
+ // `nmts wallet storage …` are a terminal over these functions: the review a person reads, the
6
+ // question that is asked, the wallet unlock this machine keeps, the exit code. The SDK is
7
+ // somebody else's program and needs the same acts with none of those. A second implementation of
8
+ // "what may be joined with what", or of the order an extension is bought in, would be a second
9
+ // place for rules about money that does not come back to be got right — and the copy nobody
10
+ // re-reads is the one that quietly disagrees.
11
+ //
12
+ // ⛔ NOTHING HERE WRITES TO A STREAM, PICKS AN EXIT CODE OR ASKS ANYBODY ANYTHING. Every refusal is
13
+ // thrown and every outcome is returned; the words a person reads are the caller's, and so is the
14
+ // agreement — a terminal asks for one, a program makes it by calling.
15
+ //
16
+ // ⚠ THE PIECES LIVE IN `storage-control/`, AND THIS IS THE DOOR TO THEM. What a caller imports is
17
+ // this name — `@needmoretruth/nmts-cli/storage-control` — so the pieces can be split and joined
18
+ // without a single caller changing. Nothing in the folder reaches for `node:`: the SDK's browser
19
+ // entry bundles what this exports, and the chain and the signer are loaded only when no seam was
20
+ // supplied.
21
+ export { formatBytes, listStorage, readOrRefuse } from "./storage-control/list.js";
22
+ export { applyExtension, nothingToExtend, planExtension } from "./storage-control/extend.js";
23
+ export { planStorageOp, reshapeStorage } from "./storage-control/reshape.js";
24
+ export { DEFAULT_EXTEND_EPOCHS } from "./extend-plan.js";
@@ -1,3 +1,3 @@
1
- import type { StorageRead } from "./commands/wallet-storage.ts";
1
+ import type { StorageRead } from "./storage-control/list.ts";
2
2
  import type { Network } from "./network.ts";
3
3
  export declare function readWalletStorage(network: Network, address: string): Promise<StorageRead>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@needmoretruth/nmts-cli",
3
- "version": "0.39.0",
3
+ "version": "0.40.0",
4
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": {
@@ -85,6 +85,10 @@
85
85
  "types": "./dist/drive-erase.d.ts",
86
86
  "default": "./dist/drive-erase.js"
87
87
  },
88
+ "./storage-control": {
89
+ "types": "./dist/storage-control.d.ts",
90
+ "default": "./dist/storage-control.js"
91
+ },
88
92
  "./s3-gateway": {
89
93
  "types": "./dist/s3-gateway.d.ts",
90
94
  "default": "./dist/s3-gateway.js"