@needmoretruth/nmts-cli 0.59.0 → 0.61.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.
- package/AGENTS.md +49 -49
- package/CHANGELOG.md +135 -98
- package/LICENSING.md +8 -8
- package/README.ko.md +156 -156
- package/README.md +111 -111
- package/dist/api-advice.js +34 -34
- package/dist/api-key.js +2 -2
- package/dist/artifact-about.d.ts +1 -1
- package/dist/autonomy.js +12 -12
- package/dist/code-access.js +3 -3
- package/dist/code-vault.js +1 -1
- package/dist/commands/accept-terms.js +4 -4
- package/dist/commands/ai-account.js +10 -10
- package/dist/commands/balance.js +7 -7
- package/dist/commands/create-code-file.js +3 -3
- package/dist/commands/create-link.js +36 -41
- package/dist/commands/create-pass.js +3 -3
- package/dist/commands/create.js +4 -4
- package/dist/commands/credits.js +2 -2
- package/dist/commands/delete-account.js +3 -3
- package/dist/commands/deposit.js +3 -3
- package/dist/commands/devices.js +3 -3
- package/dist/commands/documents.js +1 -1
- package/dist/commands/env.js +13 -13
- package/dist/commands/erase.js +5 -5
- package/dist/commands/expiring.js +9 -7
- package/dist/commands/extend.js +14 -12
- package/dist/commands/get.js +2 -2
- package/dist/commands/handover.js +2 -2
- package/dist/commands/key-manage.js +2 -2
- package/dist/commands/key.js +5 -5
- package/dist/commands/link.js +2 -2
- package/dist/commands/links.js +1 -1
- package/dist/commands/listfile.js +3 -3
- package/dist/commands/login-passphrase.js +4 -4
- package/dist/commands/login.js +12 -12
- package/dist/commands/logout.js +1 -1
- package/dist/commands/losses.js +7 -7
- package/dist/commands/ls.js +7 -7
- package/dist/commands/marks.js +1 -1
- package/dist/commands/mcp.js +4 -4
- package/dist/commands/mode.js +8 -8
- package/dist/commands/on-collision.js +4 -4
- package/dist/commands/openers-attach.js +1 -1
- package/dist/commands/organise.js +1 -1
- package/dist/commands/padding.js +3 -3
- package/dist/commands/platform.js +2 -2
- package/dist/commands/public-code-manage.js +4 -4
- package/dist/commands/public-code.js +4 -4
- package/dist/commands/pull.js +1 -1
- package/dist/commands/push-heavy.js +1 -1
- package/dist/commands/push-wallet.js +1 -1
- package/dist/commands/push.js +2 -2
- package/dist/commands/put-heavy.js +2 -2
- package/dist/commands/put-payer.js +1 -1
- package/dist/commands/put-wallet.js +5 -5
- package/dist/commands/put.js +3 -3
- package/dist/commands/rebuild.js +13 -13
- package/dist/commands/receive.js +2 -2
- package/dist/commands/recovery-list.js +1 -1
- package/dist/commands/recovery.js +7 -7
- package/dist/commands/rollback.js +2 -2
- package/dist/commands/s3.js +3 -3
- package/dist/commands/share.js +7 -7
- package/dist/commands/shares-sent.js +2 -2
- package/dist/commands/support.js +1 -1
- package/dist/commands/sweep.js +3 -3
- package/dist/commands/tip.js +2 -2
- package/dist/commands/trial.js +8 -8
- package/dist/commands/unlock.js +6 -6
- package/dist/commands/update.js +3 -3
- package/dist/commands/usage.js +4 -4
- package/dist/commands/verify.js +1 -1
- package/dist/commands/wallet-activity.js +3 -3
- package/dist/commands/wallet-donate.js +4 -4
- package/dist/commands/wallet-hall.js +5 -5
- package/dist/commands/wallet-list.js +2 -2
- package/dist/commands/wallet-send.js +5 -5
- package/dist/commands/wallet-storage-buy.js +1 -1
- package/dist/commands/wallet-storage-extend.js +1 -1
- package/dist/commands/wallet-storage-ops.js +5 -5
- package/dist/commands/wallet-storage.js +1 -1
- package/dist/commands/wallet-swap.js +14 -14
- package/dist/commands/wallet-use.js +3 -3
- package/dist/commands/wallet.js +7 -7
- package/dist/consent.js +7 -7
- package/dist/credentials.js +1 -1
- package/dist/deposit.js +1 -1
- package/dist/download-part.js +1 -1
- package/dist/download-sink-node.js +3 -3
- package/dist/download.js +1 -1
- package/dist/drive-edit/errors.js +1 -1
- package/dist/drive-edit/folders.js +1 -1
- package/dist/drive-edit/trash.js +2 -2
- package/dist/drive-erase.js +1 -1
- package/dist/environment.js +5 -5
- package/dist/errors.js +1 -1
- package/dist/extend-budget.js +5 -5
- package/dist/extend-chain.js +1 -1
- package/dist/extend-plan.js +4 -4
- package/dist/gate.js +1 -1
- package/dist/handover.js +2 -2
- package/dist/heavy-copy.d.ts +1 -1
- package/dist/heavy-copy.js +7 -7
- package/dist/help-options.js +13 -13
- package/dist/help.js +54 -40
- package/dist/human-check.js +2 -2
- package/dist/kit-file.js +6 -6
- package/dist/list-file.js +1 -1
- package/dist/manifest-chunk-flow.js +1 -1
- package/dist/manifest-create.js +2 -2
- package/dist/manifest-write.js +1 -1
- package/dist/manifest.js +6 -3
- package/dist/mcp-args.js +1 -1
- package/dist/mcp-tools/credits.js +5 -5
- package/dist/mcp-tools/files.js +6 -6
- package/dist/mcp-tools/organise.js +7 -7
- package/dist/mcp-tools/reads.js +17 -17
- package/dist/mcp-tools/share.js +6 -6
- package/dist/mcp-tools/support.js +3 -3
- package/dist/mcp-tools/tiers.js +4 -4
- package/dist/notice.js +1 -1
- package/dist/openers/wallet.js +1 -1
- package/dist/platform-sign.js +2 -2
- package/dist/product.d.ts +1 -1
- package/dist/product.js +1 -1
- package/dist/public-codes.js +2 -2
- package/dist/recovery-assemble.js +1 -1
- package/dist/recovery-map-file.js +1 -1
- package/dist/recovery-map.js +1 -1
- package/dist/recovery-source.js +1 -1
- package/dist/recovery.js +1 -1
- package/dist/risk.d.ts +4 -4
- package/dist/risk.js +4 -4
- package/dist/s3/call.js +1 -1
- package/dist/s3/same-file.js +1 -1
- package/dist/setup-questions.js +1 -1
- package/dist/shared/lib/drive/manifest-index.d.ts +9 -0
- package/dist/shared/lib/drive/manifest-index.js +11 -0
- package/dist/shared/lib/heavy/order-plan.js +4 -4
- package/dist/shared/lib/heavy/sp-upload.js +1 -1
- package/dist/shared/lib/upload/relay-limit.d.ts +30 -0
- package/dist/shared/lib/upload/relay-limit.js +74 -0
- package/dist/shared/lib/vendor/nmt-pow.d.ts +21 -0
- package/dist/shared/lib/vendor/nmt-pow.js +56 -0
- package/dist/shared/lib/walrus/node-certificate.js +1 -1
- package/dist/shared/lib/walrus/node-quorum.js +1 -1
- package/dist/sharing-inbox.js +1 -1
- package/dist/sharing.js +4 -4
- package/dist/standing-tip.js +1 -1
- package/dist/storage-control/extend.js +2 -2
- package/dist/storage-control/reshape.js +3 -3
- package/dist/support-copy.js +4 -4
- package/dist/support-wire.js +4 -4
- package/dist/update-source.js +1 -1
- package/dist/upload-price.d.ts +10 -0
- package/dist/upload-price.js +21 -0
- package/dist/upload-quote.js +2 -2
- package/dist/upload-run.js +1 -1
- package/dist/upload-steps.js +1 -1
- package/dist/upload-store.js +1 -1
- package/dist/upload-wallet-chain.js +1 -1
- package/dist/upload-wallet-plan.js +12 -12
- package/dist/upload-wallet-put.js +1 -1
- package/dist/upload-wallet.js +2 -2
- package/dist/upload.js +2 -2
- package/dist/wallet-grant.js +3 -3
- package/dist/wallet-pay-index.js +1 -1
- package/dist/wallet-sign-external.js +5 -5
- package/dist/wallet-sign.js +6 -6
- package/dist/wallet-swap-words.js +3 -3
- package/dist/walrus.js +2 -2
- package/docs/commands/accept-terms.md +3 -3
- package/docs/commands/ai-account.md +4 -4
- package/docs/commands/create.md +8 -8
- package/docs/commands/credits.md +9 -9
- package/docs/commands/delete-account.md +4 -4
- package/docs/commands/deposit.md +7 -7
- package/docs/commands/devices.md +4 -4
- package/docs/commands/documents.md +5 -5
- package/docs/commands/env.md +10 -10
- package/docs/commands/extend.md +4 -4
- package/docs/commands/folders.md +3 -3
- package/docs/commands/get.md +4 -4
- package/docs/commands/handover.md +12 -12
- package/docs/commands/heavy.md +4 -4
- package/docs/commands/key.md +8 -8
- package/docs/commands/link.md +9 -9
- package/docs/commands/login.md +4 -4
- package/docs/commands/logout.md +2 -2
- package/docs/commands/losses.md +3 -3
- package/docs/commands/ls.md +5 -5
- package/docs/commands/marks.md +5 -5
- package/docs/commands/mcp.md +9 -9
- package/docs/commands/mode.md +6 -6
- package/docs/commands/on-collision.md +4 -4
- package/docs/commands/openers.md +5 -5
- package/docs/commands/padding.md +7 -7
- package/docs/commands/platform.md +2 -2
- package/docs/commands/public-code.md +8 -8
- package/docs/commands/pull.md +2 -2
- package/docs/commands/push.md +3 -3
- package/docs/commands/put.md +11 -11
- package/docs/commands/rebuild.md +5 -5
- package/docs/commands/recovery.md +4 -4
- package/docs/commands/s3.md +6 -6
- package/docs/commands/share.md +8 -8
- package/docs/commands/support.md +7 -7
- package/docs/commands/tip.md +7 -7
- package/docs/commands/trash.md +8 -8
- package/docs/commands/trial.md +5 -5
- package/docs/commands/unlock.md +4 -4
- package/docs/commands/update.md +3 -3
- package/docs/commands/usage.md +4 -4
- package/docs/commands/verify.md +5 -5
- package/docs/commands/wallet.md +25 -25
- package/docs/commands/whoami.md +5 -5
- package/examples/podman.sh +3 -3
- package/package.json +1 -1
- package/server.json +2 -2
package/dist/api-advice.js
CHANGED
|
@@ -21,7 +21,7 @@ export function adviseFor(code) {
|
|
|
21
21
|
case "CLEARANCE_REQUIRED":
|
|
22
22
|
case "TURNSTILE_FAILED":
|
|
23
23
|
return ("This account needs a human check, which a command-line tool cannot pass. An API key " +
|
|
24
|
-
"made on the account screen is what waives it
|
|
24
|
+
"made on the account screen is what waives it. Put it in NMTS_API_KEY. If that screen " +
|
|
25
25
|
"has no place to make one, this server does not have API keys switched on.");
|
|
26
26
|
case "UNAUTHORIZED":
|
|
27
27
|
return "The credential is missing or expired. Check NMTS_API_KEY, or make a new key.";
|
|
@@ -30,26 +30,26 @@ export function adviseFor(code) {
|
|
|
30
30
|
case "SESSION_REVOKED":
|
|
31
31
|
return "That is a browser session somebody ended from another device, not an API key. A key is what a program should carry; NMTS_API_KEY is where it goes.";
|
|
32
32
|
case "API_KEY_REVOKED":
|
|
33
|
-
return "Somebody revoked this key. It will not start working again
|
|
33
|
+
return "Somebody revoked this key. It will not start working again. Make a new one.";
|
|
34
34
|
case "API_KEY_EXPIRED":
|
|
35
35
|
return "This key reached the end of the lifetime it was given. Make a new one.";
|
|
36
36
|
case "API_KEY_SCOPE":
|
|
37
37
|
return ("The key is valid and was not given permission for this. Nothing here will succeed with " +
|
|
38
|
-
"it
|
|
38
|
+
"it. A key with the right permissions has to be made on the account screen.");
|
|
39
39
|
case "API_KEY_MALFORMED":
|
|
40
40
|
return ("What was sent is not a well-formed key. Check that the whole string was copied, with " +
|
|
41
|
-
"no quotes or line break
|
|
41
|
+
"no quotes or line break. It is one line of exactly 65 characters.");
|
|
42
42
|
case "ACCOUNT_CODE_NOT_A_CREDENTIAL":
|
|
43
|
-
return ("That was an NMTS key, not an API key. An NMTS key never goes to the server
|
|
43
|
+
return ("That was an NMTS key, not an API key. An NMTS key never goes to the server. It stays " +
|
|
44
44
|
"on this machine and opens the files. Put the NMTS key in NMTS_ACCOUNT_CODE and the API key in " +
|
|
45
45
|
"NMTS_API_KEY.");
|
|
46
46
|
case "AGENT_VERIFY_REQUIRED":
|
|
47
47
|
return ("This was refused because nothing has checked lately that a person is behind this " +
|
|
48
|
-
"account's key. Ask the person to run `nmts verify` and to follow what it prints
|
|
48
|
+
"account's key. Ask the person to run `nmts verify` and to follow what it prints: it " +
|
|
49
49
|
"gives them a code to type at a browser, and nothing here can pass that check for them.");
|
|
50
50
|
case "SUPPORT_DUPLICATE":
|
|
51
51
|
return ("The same message reached the developer within the last day, so this one was not filed " +
|
|
52
|
-
"twice
|
|
52
|
+
"twice. Nothing was lost. Sending it again will be refused again: say something the " +
|
|
53
53
|
"first message did not, or read the reply on the thread that is already open.");
|
|
54
54
|
// ⛔ THE REFUSAL IS CORRECT AND THERE IS NOTHING HERE TO WORK AROUND. Accepting terms is a
|
|
55
55
|
// person reading a document and agreeing to it; a program doing it for them would be
|
|
@@ -84,7 +84,7 @@ export function adviseFor(code) {
|
|
|
84
84
|
return "An account already exists for that. Use the one you have rather than making another.";
|
|
85
85
|
case "ALPHA_NOT_OPEN":
|
|
86
86
|
return ("This build asks the server for a channel it does not open. This is not something to " +
|
|
87
|
-
"retry or to fix with a different credential
|
|
87
|
+
"retry or to fix with a different credential. Use a release build.");
|
|
88
88
|
case "API_KEY_CAP":
|
|
89
89
|
return ("The account holds as many live keys as it is allowed. Nothing here can raise the limit: " +
|
|
90
90
|
"the person has to revoke a key they no longer use, on the account screen at nmts.me.");
|
|
@@ -100,60 +100,60 @@ export function adviseFor(code) {
|
|
|
100
100
|
case "INVALID_CREDENTIALS":
|
|
101
101
|
return ("The server did not accept what was sent. For an API key: check that key. For `key new`: the " +
|
|
102
102
|
"server checked the proof derived from the NMTS key, and it did not match a registered " +
|
|
103
|
-
"account
|
|
103
|
+
"account. The NMTS key itself never goes to the server.");
|
|
104
104
|
case "LOCKED_OUT":
|
|
105
105
|
return ("Too many failed attempts, so this is shut for a while. Retrying now makes it longer, " +
|
|
106
|
-
"not shorter. The refusal carries the moment it lifts
|
|
106
|
+
"not shorter. The refusal carries the moment it lifts. Wait for it.");
|
|
107
107
|
case "RATE_LIMITED":
|
|
108
|
-
return ("Too many requests too quickly. Wait and send fewer
|
|
108
|
+
return ("Too many requests too quickly. Wait and send fewer. The refusal carries how long. This " +
|
|
109
109
|
"is not a credential problem, so changing keys will not help.");
|
|
110
110
|
case "SURFACE_MISMATCH":
|
|
111
111
|
return ("This account acts through a different build than the one calling. The refusal names " +
|
|
112
|
-
"which
|
|
112
|
+
"which. Nothing on this machine can change it, and the person switches it at nmts.me.");
|
|
113
113
|
// ── The terms ─────────────────────────────────────────────────────────────────────────────
|
|
114
114
|
case "TERMS_VERSION_MISMATCH":
|
|
115
|
-
return ("The versions sent are not the ones in force
|
|
116
|
-
"
|
|
115
|
+
return ("The versions sent are not the ones in force. The refusal carries the ones that are. " +
|
|
116
|
+
"The copy is stale and the server still serves: read the current versions and send those.");
|
|
117
117
|
case "TERMS_NOT_IN_FORCE":
|
|
118
118
|
return ("There is nothing to accept, so accepting cannot be what is missing. This is a server " +
|
|
119
|
-
"condition
|
|
119
|
+
"condition. Report it rather than retrying.");
|
|
120
120
|
// ── Credits and the free trial ────────────────────────────────────────────────────────────
|
|
121
121
|
// NMTS Heavy's order route names the same three credit refusals in its own spelling (lower case).
|
|
122
122
|
case "file_credits_cap":
|
|
123
123
|
case "CREDIT_FILE_CAP":
|
|
124
124
|
return ("One file may cost at most the published cap in credits, and this one costs more. The " +
|
|
125
|
-
"refusal carries both numbers. Splitting the file is the way through
|
|
125
|
+
"refusal carries both numbers. Splitting the file is the way through. More credits is not.");
|
|
126
126
|
case "day_credits_cap":
|
|
127
127
|
case "CREDIT_DAILY_CAP":
|
|
128
128
|
return ("The account has spent its allowance for today. The refusal carries the cap and what is " +
|
|
129
|
-
"spent. Waiting for the day to turn is the only remedy
|
|
129
|
+
"spent. Waiting for the day to turn is the only remedy. Buying credits does not lift it.");
|
|
130
130
|
// ⛔ FOUR CODES, FOUR REMEDIES, and that is why the server did not send one. They are cleared
|
|
131
131
|
// by four different acts — name an account of your own · name a different one · send less ·
|
|
132
132
|
// send some — and a retry loop that could not tell them apart would do the wrong one.
|
|
133
133
|
case "CREDIT_TRANSFER_OUTSIDE_FAMILY":
|
|
134
|
-
return ("Credits move between one person's own accounts
|
|
135
|
-
"under it
|
|
134
|
+
return ("Credits move between one person's own accounts (the account they made and every account " +
|
|
135
|
+
"under it) and nowhere else. The recipient named is not one of them, or does not exist: " +
|
|
136
136
|
"the server answers both the same way, so this cannot be used to find out which " +
|
|
137
137
|
"identifiers are real. Nothing was moved, and no credential changes this.");
|
|
138
138
|
case "CREDIT_TRANSFER_SELF":
|
|
139
139
|
return "The recipient named is the account sending. Name another account of the same family. Nothing was moved.";
|
|
140
140
|
case "CREDIT_TRANSFER_INSUFFICIENT":
|
|
141
|
-
return ("The sending account cannot cover that amount
|
|
141
|
+
return ("The sending account cannot cover that amount. The refusal carries what was needed and " +
|
|
142
142
|
"what it can spend. Nothing was moved and nothing is held. Send the smaller number, or " +
|
|
143
143
|
"get credits into that account first (`nmts trial`, or a funded wallet).");
|
|
144
144
|
case "CREDIT_TRANSFER_ZERO":
|
|
145
|
-
return "The transfer named no credits. Send a whole number above zero
|
|
145
|
+
return "The transfer named no credits. Send a whole number above zero. Nothing was moved.";
|
|
146
146
|
case "TRIAL_CLOSED":
|
|
147
147
|
return "The free trial is not open at all right now. Credits have to come from a funded wallet.";
|
|
148
148
|
case "TRIAL_FULL":
|
|
149
|
-
return "This week's free-trial places are taken. Applying again this week cannot succeed
|
|
149
|
+
return "This week's free-trial places are taken. Applying again this week cannot succeed. Next week can.";
|
|
150
150
|
case "TRIAL_ALREADY":
|
|
151
151
|
return "This account already took the free trial this week. It comes round weekly, not once.";
|
|
152
152
|
case "TRIAL_HELD":
|
|
153
153
|
return "Free-trial applications are paused pending review. Retrying does not move it.";
|
|
154
154
|
case "TRIAL_LINE_CAPPED":
|
|
155
|
-
return ("This internet connection has taken its share of this week's places today
|
|
156
|
-
"on the connection,
|
|
155
|
+
return ("This internet connection has taken its share of this week's places today. The limit is " +
|
|
156
|
+
"on the connection, so another account here hits it too.");
|
|
157
157
|
// ── Storage, the chain, and what is safe to retry ─────────────────────────────────────────
|
|
158
158
|
// ⛔ THE THREE OUTCOMES ARE DIFFERENT AND AN AGENT MUST NOT COLLAPSE THEM. Refused means it did
|
|
159
159
|
// not happen. Failed means it did not finish. Uncertain means nobody knows — and that is the
|
|
@@ -162,7 +162,7 @@ export function adviseFor(code) {
|
|
|
162
162
|
return ("The storage service refused the request itself, so nothing was spent and nothing was " +
|
|
163
163
|
"stored. Retrying the same request will be refused the same way.");
|
|
164
164
|
case "CHAIN_REGISTER_FAILED":
|
|
165
|
-
return "Registering the storage did not go through. Nothing is stored
|
|
165
|
+
return "Registering the storage did not go through. Nothing is stored. The upload can be tried again.";
|
|
166
166
|
case "CHAIN_CERTIFY_FAILED":
|
|
167
167
|
return ("The bytes went out but the storage was never certified, so the file is not safely stored. " +
|
|
168
168
|
"Try the upload again.");
|
|
@@ -174,24 +174,24 @@ export function adviseFor(code) {
|
|
|
174
174
|
"and no credential or credit changes it. Try tomorrow.");
|
|
175
175
|
case "CHAIN_DELETE_FAILED":
|
|
176
176
|
return ("The storage could not be released. The file's record is gone from this side either way, " +
|
|
177
|
-
"so nothing here is stuck
|
|
177
|
+
"so nothing here is stuck: the storage runs out on its own when its time is up.");
|
|
178
178
|
case "RELEASE_NOT_SPONSORED":
|
|
179
179
|
return ("This file's storage was not paid for with credits, so it is not the server's to release. " +
|
|
180
180
|
"Storage bought from a wallet is released by that wallet.");
|
|
181
181
|
case "SPONSORED_IDEM_MISMATCH":
|
|
182
182
|
return ("This reservation key already names a different blob: the piece was re-encrypted after it " +
|
|
183
183
|
"was reserved. Repeating the call under this key cannot work, and nothing was charged for " +
|
|
184
|
-
"it. Reserve the new bytes under a key the account has never used
|
|
184
|
+
"it. Reserve the new bytes under a key the account has never used: a key made fresh for " +
|
|
185
185
|
"each upload, not one worked out from the file, which gives the same answer again.");
|
|
186
186
|
case "SPONSORED_STATE":
|
|
187
|
-
return ("The upload is not at the step that call belongs to
|
|
187
|
+
return ("The upload is not at the step that call belongs to. The steps have an order and one was " +
|
|
188
188
|
"skipped or already done. Start the upload again rather than repeating this call.");
|
|
189
189
|
// ── Two callers, one drive ────────────────────────────────────────────────────────────────
|
|
190
190
|
case "MANIFEST_TOO_LARGE":
|
|
191
191
|
return ("The sealed file list is over the server's ceiling (16 MiB), so this save was refused and " +
|
|
192
192
|
"nothing changed. The list is stored as a small index plus chunks, and the index holds one " +
|
|
193
|
-
"short row per chunk
|
|
194
|
-
"Save once more to convert it
|
|
193
|
+
"short row per chunk, so an account reaches this only with a list that is not in chunks. " +
|
|
194
|
+
"Save once more to convert it. The ceiling is then the account's chunk allowance, which " +
|
|
195
195
|
"grows with confirmed files (details.allowed on MANIFEST_CHUNKS_EXCEEDED).");
|
|
196
196
|
// ── The chunked file list (NCF-3 §6.3) ────────────────────────────────────────────────────
|
|
197
197
|
case "MANIFEST_CHUNK_HASH":
|
|
@@ -200,8 +200,8 @@ export function adviseFor(code) {
|
|
|
200
200
|
"the bytes it decodes to, and send it under that name.");
|
|
201
201
|
case "MANIFEST_CHUNK_TOO_LARGE":
|
|
202
202
|
return ("One chunk of the file list is over the server's 4 MiB ceiling of sealed bytes. Pack " +
|
|
203
|
-
"fewer entries per chunk
|
|
204
|
-
"to it is always under this
|
|
203
|
+
"fewer entries per chunk (the format's own bound is on the plaintext, so a chunk built " +
|
|
204
|
+
"to it is always under this) and send the same index again.");
|
|
205
205
|
case "MANIFEST_CHUNK_MISSING":
|
|
206
206
|
return ("The index names chunks this account has not stored. The refusal lists them in " +
|
|
207
207
|
"details.missing: write exactly those chunks, then send the same index again. Nothing " +
|
|
@@ -209,14 +209,14 @@ export function adviseFor(code) {
|
|
|
209
209
|
case "MANIFEST_CHUNKS_EXCEEDED":
|
|
210
210
|
return ("The account is at its chunk allowance (details.allowed). It is a base allowance plus " +
|
|
211
211
|
"one chunk for every details.per_verified_items files the storage network has confirmed, " +
|
|
212
|
-
"so it grows as files are stored
|
|
212
|
+
"so it grows as files are stored. Deleting files or packing the list into fewer chunks is " +
|
|
213
213
|
"what brings this write inside it.");
|
|
214
214
|
case "VERSION_CONFLICT":
|
|
215
215
|
return ("Something else changed the drive since this was read. Nothing is lost and nothing is " +
|
|
216
216
|
"wrong with the credential: read the current state and apply the change to that.");
|
|
217
217
|
case "ERASE_BLOCKED":
|
|
218
218
|
return ("The account cannot be erased while retained records still point at it. This will not " +
|
|
219
|
-
"clear by retrying
|
|
219
|
+
"clear by retrying. The records have their own retention and it has to run out.");
|
|
220
220
|
case "credits_insufficient":
|
|
221
221
|
case "CREDITS_SHORT":
|
|
222
222
|
return "The account does not have enough credits for this upload.";
|
package/dist/api-key.js
CHANGED
|
@@ -273,8 +273,8 @@ async function refuse(shape, value) {
|
|
|
273
273
|
return new NmtsError(`That is an NMTS key, not an API key.`, {
|
|
274
274
|
exitCode: 2,
|
|
275
275
|
nextStep: `It was NOT sent anywhere: the NMTS key stays on this machine, and it is what opens ` +
|
|
276
|
-
`your files. An API key is a different thing
|
|
277
|
-
`it opens nothing. Make one on the account screen at ${HOME_URL}
|
|
276
|
+
`your files. An API key is a different thing: it makes the server answer a program, and ` +
|
|
277
|
+
`it opens nothing. Make one on the account screen at ${HOME_URL}. It begins ` +
|
|
278
278
|
`\`${KEY_PREFIX}\`. ${NOTHING_WAS_WRITTEN}`,
|
|
279
279
|
});
|
|
280
280
|
}
|
package/dist/artifact-about.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare const CRYPTO_SPEC_URL = "https://github.com/needmoretruth/nmts-re
|
|
|
11
11
|
* is the field's own contract — what the writer says about itself — and a person holding two
|
|
12
12
|
* copies of one account's artefacts can then tell which program made each.
|
|
13
13
|
*/
|
|
14
|
-
export declare const WRITTEN_BY = "nmts-cli 0.
|
|
14
|
+
export declare const WRITTEN_BY = "nmts-cli 0.61.1";
|
|
15
15
|
/** Which of the three artefacts a wrapper is. A reader holding several can sort them. */
|
|
16
16
|
export type ArtifactKind = "recovery-list" | "file-list" | "recovery-kit";
|
|
17
17
|
/**
|
package/dist/autonomy.js
CHANGED
|
@@ -39,8 +39,8 @@ export const AUTONOMY_MODES = ["default", "auto-low", "auto-high", "skip-permiss
|
|
|
39
39
|
export const MODE_MEANS = {
|
|
40
40
|
default: "A person is asked before anything but reading and tidying. This is the default.",
|
|
41
41
|
"auto-low": "The agent decides whether you asked for it, or whether it is fine to do unasked, and goes ahead " +
|
|
42
|
-
"with low and medium acts. High acts still ask and stay locked
|
|
43
|
-
"auto-high": "Like auto-low, but the agent is told to reason for itself more
|
|
42
|
+
"with low and medium acts. High acts still ask and stay locked. Irreversible ones are refused.",
|
|
43
|
+
"auto-high": "Like auto-low, but the agent is told to reason for itself more: for a model you trust to keep " +
|
|
44
44
|
"itself safe. The tool refuses exactly what auto-low refuses.",
|
|
45
45
|
"skip-permissions": "Nothing asks and nothing is refused. You have left the chair. Irreversible acts still need a " +
|
|
46
46
|
"written reason, kept in the run log.",
|
|
@@ -54,19 +54,19 @@ export function explain(mode) {
|
|
|
54
54
|
switch (mode) {
|
|
55
55
|
case "default":
|
|
56
56
|
return [
|
|
57
|
-
`default
|
|
57
|
+
`default: ${MODE_MEANS.default}`,
|
|
58
58
|
`What happens: reading, downloading, listing, moving, renaming, labelling run at once. Anything`,
|
|
59
59
|
`that changes or spends is asked about (y/N here, or --yes from an agent that asked you).`,
|
|
60
|
-
`High acts
|
|
60
|
+
`High acts (sharing, signing with the wallet, signing devices out, exposing the NMTS key) are`,
|
|
61
61
|
`locked until you unlock them (\`nmts unlock\`). Erasing the account or files takes a typed sentence.`,
|
|
62
62
|
`Risk: the smallest. Cost: an agent stops for you often.`,
|
|
63
63
|
];
|
|
64
64
|
case "auto-low":
|
|
65
65
|
return [
|
|
66
|
-
`auto-low
|
|
66
|
+
`auto-low: ${MODE_MEANS["auto-low"]}`,
|
|
67
67
|
`What happens: the agent runs reads, tidying and reversible changes without asking, and may run`,
|
|
68
|
-
`medium acts
|
|
69
|
-
`publishing or making a public code
|
|
68
|
+
`medium acts (uploads that spend credits within the server's daily ceiling, making an API key,`,
|
|
69
|
+
`publishing or making a public code) when it judges you asked for them or would want them.`,
|
|
70
70
|
`High acts (sharing, wallet signing, signing devices out) are still asked about and stay locked`,
|
|
71
71
|
`until you unlock them. Erasing the account or files is refused however it is asked.`,
|
|
72
72
|
`Risk: credits can be spent and metadata changed without a question each time. What you gain:`,
|
|
@@ -75,9 +75,9 @@ export function explain(mode) {
|
|
|
75
75
|
];
|
|
76
76
|
case "auto-high":
|
|
77
77
|
return [
|
|
78
|
-
`auto-high
|
|
79
|
-
`What happens: the tool refuses exactly what auto-low refuses
|
|
80
|
-
`the agent reads. In auto-low it asks itself "did they ask for this?"
|
|
78
|
+
`auto-high: ${MODE_MEANS["auto-high"]}`,
|
|
79
|
+
`What happens: the tool refuses exactly what auto-low refuses. What changes is the instruction`,
|
|
80
|
+
`the agent reads. In auto-low it asks itself "did they ask for this?". In auto-high it is told to`,
|
|
81
81
|
`weigh the situation itself and act on its own judgement where a question would only delay.`,
|
|
82
82
|
`Use it only for a model you would trust with the decisions a careful assistant makes unasked.`,
|
|
83
83
|
`Risk: the same acts as auto-low, decided with less deference to you. What you gain: fewer stops`,
|
|
@@ -86,7 +86,7 @@ export function explain(mode) {
|
|
|
86
86
|
];
|
|
87
87
|
case "skip-permissions":
|
|
88
88
|
return [
|
|
89
|
-
`skip-permissions
|
|
89
|
+
`skip-permissions: ${MODE_MEANS["skip-permissions"]}`,
|
|
90
90
|
`What happens: every act runs, locked or not, asked or not. The agent may unlock things, share,`,
|
|
91
91
|
`sign with the wallet, sign devices out, erase files and the account. Erasing still needs`,
|
|
92
92
|
`--reason "<why now>", and the reason is kept in this machine's run log.`,
|
|
@@ -169,6 +169,6 @@ export async function setMode(mode, version, now) {
|
|
|
169
169
|
export function announcement(mode) {
|
|
170
170
|
if (mode === "default")
|
|
171
171
|
return null;
|
|
172
|
-
return `${BANNER_PREFIX}${mode}
|
|
172
|
+
return `${BANNER_PREFIX}${mode}: ${MODE_MEANS[mode]} Turn it off with \`nmts mode default\`.`;
|
|
173
173
|
}
|
|
174
174
|
const BANNER_PREFIX = "nmts: autonomy is ";
|
package/dist/code-access.js
CHANGED
|
@@ -53,9 +53,9 @@ async function readPassphrase(allowPrompt) {
|
|
|
53
53
|
allowPrompt
|
|
54
54
|
? `There is no terminal to type it into, so one of these has to supply it:`
|
|
55
55
|
: `This command reads its own protocol from the terminal, so it cannot ask. Supply it:`,
|
|
56
|
-
`
|
|
57
|
-
`
|
|
58
|
-
`
|
|
56
|
+
` - set ${PASSPHRASE_ENV_VAR} for this run`,
|
|
57
|
+
` - name a file holding the code instead: NMTS_ACCOUNT_CODE_FILE=/path`,
|
|
58
|
+
` - store it unsealed: ${BINARY_NAME} login --plain (this asks for an agreement first)`,
|
|
59
59
|
``,
|
|
60
60
|
`The sealed file is ${credentialsPath()}.`,
|
|
61
61
|
].join("\n"),
|
package/dist/code-vault.js
CHANGED
|
@@ -80,7 +80,7 @@ export class WrongPassphraseError extends NmtsError {
|
|
|
80
80
|
constructor() {
|
|
81
81
|
super("That passphrase does not open the stored NMTS key.", {
|
|
82
82
|
exitCode: 3,
|
|
83
|
-
nextStep: "Try again. If the passphrase is lost, the stored copy cannot be recovered
|
|
83
|
+
nextStep: "Try again. If the passphrase is lost, the stored copy cannot be recovered. Sign in " +
|
|
84
84
|
"again with the NMTS key itself.",
|
|
85
85
|
});
|
|
86
86
|
this.name = "WrongPassphraseError";
|
|
@@ -40,7 +40,7 @@ export async function acceptTerms(options = {}) {
|
|
|
40
40
|
if (!relayed && options.readLine === undefined && !stdinIsATerminal()) {
|
|
41
41
|
throw new NmtsError("There is no terminal to type into (stdin is not a TTY).", {
|
|
42
42
|
exitCode: 3,
|
|
43
|
-
nextStep: `Run this where a person can type the two versions, or
|
|
43
|
+
nextStep: `Run this where a person can type the two versions, or, after they have said so, ` +
|
|
44
44
|
`\`${BINARY_NAME} accept-terms --accept-terms <version> --accept-privacy <version> --yes\`.`,
|
|
45
45
|
});
|
|
46
46
|
}
|
|
@@ -54,7 +54,7 @@ export async function acceptTerms(options = {}) {
|
|
|
54
54
|
const standing = key === null ? null : await standingOf(server, key.key);
|
|
55
55
|
if (standing !== null && !standing.owed) {
|
|
56
56
|
say(`This account has already accepted the documents in force ` +
|
|
57
|
-
`(Terms of Service ${standing.terms}
|
|
57
|
+
`(Terms of Service ${standing.terms}, Privacy Policy ${standing.privacy}). Nothing to do.`);
|
|
58
58
|
return 0;
|
|
59
59
|
}
|
|
60
60
|
if (standing === null) {
|
|
@@ -62,10 +62,10 @@ export async function acceptTerms(options = {}) {
|
|
|
62
62
|
say(`Each document prints its version at the top.`);
|
|
63
63
|
}
|
|
64
64
|
else {
|
|
65
|
-
say(`In force: Terms of Service ${standing.terms}
|
|
65
|
+
say(`In force: Terms of Service ${standing.terms}, Privacy Policy ${standing.privacy}.`);
|
|
66
66
|
say(`This account has not accepted this pair, so uploads and shares are refused until it does.`);
|
|
67
67
|
}
|
|
68
|
-
say(`Read them first: \`${BINARY_NAME} terms
|
|
68
|
+
say(`Read them first: \`${BINARY_NAME} terms\`, \`${BINARY_NAME} privacy\`, what changed: ` +
|
|
69
69
|
`\`${BINARY_NAME} notices\` (or ${HOME_URL}/notices).`);
|
|
70
70
|
say(``);
|
|
71
71
|
const terms = (options.terms ?? (await ask(`Type the Terms of Service version you have read and accept: `))).trim();
|
|
@@ -36,7 +36,7 @@ function childrenOf(answer) {
|
|
|
36
36
|
const list = isRecord(answer) ? answer["children"] : undefined;
|
|
37
37
|
if (!Array.isArray(list)) {
|
|
38
38
|
throw new NmtsError(`The server's answer did not carry a list of AI accounts.`, {
|
|
39
|
-
nextStep: `Nothing was changed. Report it
|
|
39
|
+
nextStep: `Nothing was changed. Report it instead of retrying: the shape of the answer is wrong, and the network is fine.`,
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
const out = [];
|
|
@@ -94,7 +94,7 @@ export async function aiAccount(verb, args) {
|
|
|
94
94
|
exitCode: 2,
|
|
95
95
|
nextStep: `The verbs are \`${BINARY_NAME} ai-account list\`, \`${BINARY_NAME} ai-account create [place]\` ` +
|
|
96
96
|
`and \`${BINARY_NAME} ai-account delete <account id>\`. Each needs the NMTS key on this ` +
|
|
97
|
-
`machine
|
|
97
|
+
`machine. An API key cannot reach any of them.`,
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
export async function list(options = {}) {
|
|
@@ -107,7 +107,7 @@ export async function list(options = {}) {
|
|
|
107
107
|
}
|
|
108
108
|
if (children.length === 0) {
|
|
109
109
|
say(`This account has made no AI accounts.`);
|
|
110
|
-
say(`\`${BINARY_NAME} ai-account create\` makes one
|
|
110
|
+
say(`\`${BINARY_NAME} ai-account create\` makes one: an ordinary account with its own key and`);
|
|
111
111
|
say(`its own empty drive, so nothing of this one's is handed over.`);
|
|
112
112
|
return 0;
|
|
113
113
|
}
|
|
@@ -115,9 +115,9 @@ export async function list(options = {}) {
|
|
|
115
115
|
say(`place ${child.child_index} ${child.account_id} ${child.status} made ${child.created_at.slice(0, 10)}`);
|
|
116
116
|
}
|
|
117
117
|
say(``);
|
|
118
|
-
say(`Each one's NMTS key comes from this account's key and its place, so it can be derived again
|
|
119
|
-
say(
|
|
120
|
-
say(`
|
|
118
|
+
say(`Each one's NMTS key comes from this account's key and its place, so it can be derived again.`);
|
|
119
|
+
say(`\`${BINARY_NAME} ai-account create <place>\` on a place that is already taken says so instead of`);
|
|
120
|
+
say(`printing it. \`${BINARY_NAME} ai-account delete <account id>\` erases one for good.`);
|
|
121
121
|
return 0;
|
|
122
122
|
}
|
|
123
123
|
/** The place this run uses: the one asked for, or the lowest that is free. */
|
|
@@ -141,7 +141,7 @@ function placeFor(asked, taken) {
|
|
|
141
141
|
return place;
|
|
142
142
|
throw new NmtsError(`All ${PLACES} places under this account are taken.`, {
|
|
143
143
|
exitCode: 4,
|
|
144
|
-
nextStep: `Nothing was made. Erase one with \`${BINARY_NAME} ai-account delete <account id
|
|
144
|
+
nextStep: `Nothing was made. Erase one with \`${BINARY_NAME} ai-account delete <account id>\`. Its place ` +
|
|
145
145
|
`comes free and re-deriving at that place later gives the same account back.`,
|
|
146
146
|
});
|
|
147
147
|
}
|
|
@@ -190,7 +190,7 @@ export async function create(asked, options = {}) {
|
|
|
190
190
|
throw new NmtsError(`The first AI account under this account is made in a browser.`, {
|
|
191
191
|
exitCode: 4,
|
|
192
192
|
nextStep: `Nothing was made. Turning the feature on costs a human check, which no command-line tool ` +
|
|
193
|
-
`can pass
|
|
193
|
+
`can pass. Do it once on the account screen at ${HOME_URL}, and every one after it can be ` +
|
|
194
194
|
`made from here.`,
|
|
195
195
|
});
|
|
196
196
|
}
|
|
@@ -206,7 +206,7 @@ export async function create(asked, options = {}) {
|
|
|
206
206
|
say(``);
|
|
207
207
|
say(` account id ${childIdentity.accountId}`);
|
|
208
208
|
say(``);
|
|
209
|
-
say(`⛔ THIS IS ITS NMTS KEY. It opens that account and nothing else
|
|
209
|
+
say(`⛔ THIS IS ITS NMTS KEY. It opens that account and nothing else, not this one.`);
|
|
210
210
|
say(` Hand it to the program that will use it, and keep it as carefully as your own.`);
|
|
211
211
|
say(``);
|
|
212
212
|
say(` ${childCode}`);
|
|
@@ -227,7 +227,7 @@ export async function remove(id, options = {}) {
|
|
|
227
227
|
if (id === undefined || id === "") {
|
|
228
228
|
throw new NmtsError(`Say which AI account to erase.`, {
|
|
229
229
|
exitCode: 2,
|
|
230
|
-
nextStep: `\`${BINARY_NAME} ai-account delete <account id
|
|
230
|
+
nextStep: `\`${BINARY_NAME} ai-account delete <account id>\`, with the id \`${BINARY_NAME} ai-account list\` prints.`,
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
const who = await caller(options);
|
package/dist/commands/balance.js
CHANGED
|
@@ -37,7 +37,7 @@ function asSummary(value) {
|
|
|
37
37
|
const terms = value["terms"];
|
|
38
38
|
if (!isRecord(credits) || !isRecord(quota) || !isRecord(storage)) {
|
|
39
39
|
throw new NmtsError("The server described this account in a shape this version cannot read.", {
|
|
40
|
-
nextStep: `Update this tool
|
|
40
|
+
nextStep: `Update this tool (\`npm install -g ${BINARY_NAME}\`) or read it in a browser.`,
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
const expiry = credits["soonest_expiry"];
|
|
@@ -128,29 +128,29 @@ export async function balance(options = {}) {
|
|
|
128
128
|
// already bought is not touched when one lapses.
|
|
129
129
|
say(` soonest to lapse unused: ${credits.soonest_expiry}`);
|
|
130
130
|
}
|
|
131
|
-
say(`ceilings ${credits.file_cap} per file
|
|
131
|
+
say(`ceilings ${credits.file_cap} per file, ${credits.daily_cap} per day`);
|
|
132
132
|
if (credits.held > 0) {
|
|
133
133
|
// Tied up, not spent: each credit-paid file puts a deposit down, returned when its period ends.
|
|
134
|
-
say(`deposits ${plural(credits.held, "credit", "credits")} held on ${plural(credits.deposits, "stored file", "stored files")}
|
|
134
|
+
say(`deposits ${plural(credits.held, "credit", "credits")} held on ${plural(credits.deposits, "stored file", "stored files")}, back when the storage period ends`);
|
|
135
135
|
// ⚠ Per file, and what has already gone out of it. A deposit is spent a fee at a time, so
|
|
136
136
|
// "set aside" and "spent" are two different numbers about the same file.
|
|
137
137
|
for (const row of summary.deposits) {
|
|
138
|
-
say(` ${row.deposit_credits} set aside
|
|
138
|
+
say(` ${row.deposit_credits} set aside, ${row.spent_credits} spent`);
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
if (credits.deposit_max > 0) {
|
|
142
|
-
say(` an upload sets ${credits.deposit_default} aside by default
|
|
142
|
+
say(` an upload sets ${credits.deposit_default} aside by default; ` +
|
|
143
143
|
`0 to ${credits.deposit_max}, \`${BINARY_NAME} deposit\` or --deposit for one upload`);
|
|
144
144
|
}
|
|
145
145
|
say(`holding ${humanSize(quota.used)} across ${plural(storage.parts, "stored piece", "stored pieces")}`);
|
|
146
146
|
if (storage.earliest_expiry_epoch !== null) {
|
|
147
|
-
say(` the earliest lease ends at storage period ${storage.earliest_expiry_epoch}
|
|
147
|
+
say(` the earliest lease ends at storage period ${storage.earliest_expiry_epoch}: ` +
|
|
148
148
|
`\`${BINARY_NAME} expiring\` reads the clock and says when that is`);
|
|
149
149
|
}
|
|
150
150
|
if (summary.terms.acceptance_required) {
|
|
151
151
|
say(``);
|
|
152
152
|
say(`⛔ New terms are in force and this account has not accepted them.`);
|
|
153
|
-
say(` A person reads and accepts them
|
|
153
|
+
say(` A person reads and accepts them: \`${BINARY_NAME} accept-terms\` here, or in a browser.`);
|
|
154
154
|
}
|
|
155
155
|
return 0;
|
|
156
156
|
}
|
|
@@ -29,7 +29,7 @@ export function codeFileTarget(out) {
|
|
|
29
29
|
throw new NmtsError("The new NMTS key will not be sent to stdout.", {
|
|
30
30
|
exitCode: 2,
|
|
31
31
|
nextStep: `Nothing was created. stdout is what a program reads and a log keeps, and this is the ` +
|
|
32
|
-
`only copy of your NMTS key. Name a file
|
|
32
|
+
`only copy of your NMTS key. Name a file (\`--out ./account-code.txt\`) or leave --out off ` +
|
|
33
33
|
`and read it off the screen.`,
|
|
34
34
|
});
|
|
35
35
|
}
|
|
@@ -76,7 +76,7 @@ export function writeCodeFile(path, code) {
|
|
|
76
76
|
// never the contents, so it is safe to pass on; the code itself appears in no message here.
|
|
77
77
|
throw new NmtsError(`The NMTS key could not be written to ${path}.`, {
|
|
78
78
|
exitCode: 1,
|
|
79
|
-
nextStep: `Nothing was created
|
|
79
|
+
nextStep: `Nothing was created. The file is written before the account is asked for, so that a ` +
|
|
80
80
|
`failure here costs nothing. Cause: ${error instanceof Error ? error.message : String(error)}`,
|
|
81
81
|
});
|
|
82
82
|
}
|
|
@@ -87,7 +87,7 @@ export function jsonNeedsAFile() {
|
|
|
87
87
|
exitCode: 2,
|
|
88
88
|
nextStep: `Nothing was created. Machine-readable output is read by a program and kept by a log, and ` +
|
|
89
89
|
`your NMTS key is the only key this account will ever have. \`--out ./account-code.txt\` writes ` +
|
|
90
|
-
`it to a file only you can read
|
|
90
|
+
`it to a file only you can read. The JSON then names that file. Without --json the NMTS key is ` +
|
|
91
91
|
`printed on the screen for a person to keep.`,
|
|
92
92
|
});
|
|
93
93
|
}
|