@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/commands/link.js
CHANGED
|
@@ -20,8 +20,8 @@ import { destinationFor } from "../safe-path.js";
|
|
|
20
20
|
import { resolveServer } from "../server.js";
|
|
21
21
|
import { openSession } from "../session.js";
|
|
22
22
|
import { linkExpiryDays } from "../shared/lib/share/public-link.js";
|
|
23
|
-
const USAGE = `\`${BINARY_NAME} link make <path> [--hide-name] [--expires <n>d]
|
|
24
|
-
`\`${BINARY_NAME} link revoke <id
|
|
23
|
+
const USAGE = `\`${BINARY_NAME} link make <path> [--hide-name] [--expires <n>d]\`, \`${BINARY_NAME} link list <path>\`, ` +
|
|
24
|
+
`\`${BINARY_NAME} link revoke <id>\`, \`${BINARY_NAME} link open <link> [--out <path>]\``;
|
|
25
25
|
export async function link(sub, operand, options = {}) {
|
|
26
26
|
const say = options.write ?? ((line) => process.stdout.write(`${line}\n`));
|
|
27
27
|
if (sub !== "make" && sub !== "list" && sub !== "revoke" && sub !== "open") {
|
package/dist/commands/links.js
CHANGED
|
@@ -13,7 +13,7 @@ import { listLiveLinks, revokeAllLinks, revokeLink } from "../links.js";
|
|
|
13
13
|
import { readFileList } from "../manifest.js";
|
|
14
14
|
import { BINARY_NAME } from "../product.js";
|
|
15
15
|
import { openSession } from "../session.js";
|
|
16
|
-
const USAGE = `\`${BINARY_NAME} links
|
|
16
|
+
const USAGE = `\`${BINARY_NAME} links\`, \`${BINARY_NAME} links revoke <id>\`, \`${BINARY_NAME} links revoke-all\``;
|
|
17
17
|
export async function links(sub, operand, options = {}) {
|
|
18
18
|
const say = options.write ?? ((line) => process.stdout.write(`${line}\n`));
|
|
19
19
|
if (sub !== undefined && sub !== "revoke" && sub !== "revoke-all") {
|
|
@@ -41,7 +41,7 @@ export async function listfile(options = {}) {
|
|
|
41
41
|
exitCode: 4,
|
|
42
42
|
nextStep: `Nothing was written. Run \`${BINARY_NAME} ls\` once while this machine can reach the ` +
|
|
43
43
|
`server: every read of the list keeps its sealed bytes here, and this command writes that ` +
|
|
44
|
-
`copy out. A copy cannot be made from the NMTS key alone
|
|
44
|
+
`copy out. A copy cannot be made from the NMTS key alone. The list itself is what is ` +
|
|
45
45
|
`being copied.`,
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -104,8 +104,8 @@ function saidWhatItIs(say, seq, savedAt, filename) {
|
|
|
104
104
|
say(` File list version ${seq}, as this machine last read it (${savedAt}).`);
|
|
105
105
|
say(` It holds the names, folders and file keys of this account, sealed with the NMTS key.`);
|
|
106
106
|
say(``);
|
|
107
|
-
say(` ⛔ It is not a recovery on its own. It carries no storage-network addresses
|
|
108
|
-
say(` the recovery list saved from the account screen
|
|
107
|
+
say(` ⛔ It is not a recovery on its own. It carries no storage-network addresses (those are in`);
|
|
108
|
+
say(` the recovery list saved from the account screen), and it does not contain the NMTS`);
|
|
109
109
|
say(` key. Keep it somewhere other than your NMTS key: together they are the whole account.`);
|
|
110
110
|
say(` ⚠ A copy goes stale. Run this again after uploading: of two copies, the one whose`);
|
|
111
111
|
say(` filename carries the higher number supersedes the other (this one is ${filename}).`);
|
|
@@ -36,9 +36,9 @@ export async function newPassphrase(options) {
|
|
|
36
36
|
exitCode: 2,
|
|
37
37
|
nextStep: [
|
|
38
38
|
`One of these:`,
|
|
39
|
-
`
|
|
40
|
-
`
|
|
41
|
-
`
|
|
39
|
+
` - set ${PASSPHRASE_ENV_VAR} and run this again`,
|
|
40
|
+
` - ${BINARY_NAME} login --plain store it unsealed (asks for an agreement first)`,
|
|
41
|
+
` - ${BINARY_NAME} login --env store nothing and print the variable to set`,
|
|
42
42
|
].join("\n"),
|
|
43
43
|
});
|
|
44
44
|
}
|
|
@@ -59,6 +59,6 @@ function tooShort() {
|
|
|
59
59
|
return new NmtsError(`That passphrase is shorter than ${MIN_PASSPHRASE} characters.`, {
|
|
60
60
|
exitCode: 2,
|
|
61
61
|
nextStep: `Nothing was written. A short passphrase is guessed whatever the tool does to slow guessing ` +
|
|
62
|
-
`down. ⛔ If it is lost, the sealed copy cannot be opened by anybody
|
|
62
|
+
`down. ⛔ If it is lost, the sealed copy cannot be opened by anybody. Keep it somewhere.`,
|
|
63
63
|
});
|
|
64
64
|
}
|
package/dist/commands/login.js
CHANGED
|
@@ -142,7 +142,7 @@ async function storeSealed(code, server, network, apiKey, options, say) {
|
|
|
142
142
|
say(`Sealed for ${server} (${network}) in ${credentialsPath()}`);
|
|
143
143
|
say(``);
|
|
144
144
|
say(` What is on disk is not the NMTS key. Opening it needs the passphrase, so a copy of`);
|
|
145
|
-
say(` this file
|
|
145
|
+
say(` this file (in a backup, a synced folder, a container image, a stolen disk) is worth`);
|
|
146
146
|
say(` nothing on its own.`);
|
|
147
147
|
say(``);
|
|
148
148
|
say(` ⚠ It does NOT protect your NMTS key from anything running as you on this machine while you`);
|
|
@@ -205,7 +205,7 @@ function printEnvForm(code, say) {
|
|
|
205
205
|
say(``);
|
|
206
206
|
say(` ⚠ Your NMTS key is now on this screen, and probably in this terminal's scrollback. An`);
|
|
207
207
|
say(` environment variable is readable by anything running as you, by every child process,`);
|
|
208
|
-
say(` and
|
|
208
|
+
say(` and, inside a container, by anybody who can run \`docker inspect\`.`);
|
|
209
209
|
say(``);
|
|
210
210
|
say(` ${CODE_ENV_VAR}_FILE names a FILE holding the NMTS key instead, and has none of those.`);
|
|
211
211
|
return 0;
|
|
@@ -225,7 +225,7 @@ function printEnvForm(code, say) {
|
|
|
225
225
|
// registered it — which is more than the check symbol says and less than "the account is live".
|
|
226
226
|
function sayCheckSymbol(say, keyWasAccepted) {
|
|
227
227
|
say(``);
|
|
228
|
-
say(` The NMTS key is well-formed
|
|
228
|
+
say(` The NMTS key is well-formed: its own check symbol matches. That was verified here, offline.`);
|
|
229
229
|
if (!keyWasAccepted) {
|
|
230
230
|
say(` Whether the account EXISTS has not been checked: signing in goes through a human check`);
|
|
231
231
|
say(` this tool cannot pass yet, so that will first show up on a command that needs the server.`);
|
|
@@ -254,22 +254,22 @@ function sayAboutTheKey(outcome, server, say) {
|
|
|
254
254
|
say(`No API key is stored, and every command that talks to the server needs one.`);
|
|
255
255
|
say(``);
|
|
256
256
|
say(` Make one on the account screen at ${HOME_URL}, then run \`${BINARY_NAME} login\` again`);
|
|
257
|
-
say(` with it in ${API_KEY_ENV_VAR}
|
|
257
|
+
say(` with it in ${API_KEY_ENV_VAR}, or enter it when this asks. It is checked with the`);
|
|
258
258
|
say(` server before it is written down.`);
|
|
259
259
|
say(``);
|
|
260
260
|
say(` ${API_KEY_FILE_ENV_VAR} names a FILE holding the key instead, which is the shape a`);
|
|
261
261
|
say(` container cannot leak. The key waives the human check a browser sign-in does, and`);
|
|
262
|
-
say(` nothing else
|
|
262
|
+
say(` nothing else. It opens no file.`);
|
|
263
263
|
return;
|
|
264
264
|
case "stored":
|
|
265
265
|
say(``);
|
|
266
266
|
say(`Key ${outcome.handle} stored for ${server}.`);
|
|
267
267
|
say(``);
|
|
268
|
-
say(` That is the key's public handle
|
|
268
|
+
say(` That is the key's public handle: the part the account screen lists. The secret half`);
|
|
269
269
|
say(` is not printed here.`);
|
|
270
270
|
say(``);
|
|
271
271
|
say(` ${server} accepted it just now, so it is a key this account has and nothing has`);
|
|
272
|
-
say(` revoked. It waives the human check a browser sign-in does, and nothing else
|
|
272
|
+
say(` revoked. It waives the human check a browser sign-in does, and nothing else. It`);
|
|
273
273
|
say(` opens no file, and what it is allowed to ask for was decided when it was made.`);
|
|
274
274
|
if (!outcome.verified) {
|
|
275
275
|
say(``);
|
|
@@ -282,13 +282,13 @@ function sayAboutTheKey(outcome, server, say) {
|
|
|
282
282
|
say(``);
|
|
283
283
|
say(`⚠ A different API key is in ${keySourceName(outcome.from)}. It was NOT stored.`);
|
|
284
284
|
say(``);
|
|
285
|
-
say(` The key already on this machine is left as it is.
|
|
286
|
-
say(`
|
|
287
|
-
say(`
|
|
285
|
+
say(` The key already on this machine is left as it is. Storing the NMTS key does not replace`);
|
|
286
|
+
say(` it on the side: every agent using the old one would stop at a moment nobody would`);
|
|
287
|
+
say(` connect to this.`);
|
|
288
288
|
say(``);
|
|
289
289
|
say(` While that variable is set, every command uses what it holds anyway: the environment`);
|
|
290
|
-
say(` wins over what is stored. To store it instead
|
|
291
|
-
say(` answer the question it asks
|
|
290
|
+
say(` wins over what is stored. To store it instead, at a terminal, run this again and`);
|
|
291
|
+
say(` answer the question it asks. With no terminal, \`${BINARY_NAME} logout\` first and`);
|
|
292
292
|
say(` then \`${BINARY_NAME} login\`.`);
|
|
293
293
|
return;
|
|
294
294
|
}
|
package/dist/commands/logout.js
CHANGED
|
@@ -18,7 +18,7 @@ export function logout(write) {
|
|
|
18
18
|
else
|
|
19
19
|
throw error;
|
|
20
20
|
}
|
|
21
|
-
say(removed ? `Removed ${path}` : `Nothing to remove
|
|
21
|
+
say(removed ? `Removed ${path}` : `Nothing to remove: ${path} does not exist.`);
|
|
22
22
|
if (removed) {
|
|
23
23
|
say(` This deleted a file. It did not end anything on the server, and it cannot reach a copy`);
|
|
24
24
|
say(` that something on this machine already read.`);
|
package/dist/commands/losses.js
CHANGED
|
@@ -42,7 +42,7 @@ function rowsOf(answer) {
|
|
|
42
42
|
if (!Array.isArray(list)) {
|
|
43
43
|
throw new NmtsError(`The server's answer did not carry a list of losses.`, {
|
|
44
44
|
exitCode: 1,
|
|
45
|
-
nextStep: `Nothing was changed. Report it
|
|
45
|
+
nextStep: `Nothing was changed. Report it instead of retrying: the shape of the answer is wrong, and the network is fine.`,
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
return list.map((row) => {
|
|
@@ -139,7 +139,7 @@ export async function losses(options = {}) {
|
|
|
139
139
|
say(JSON.stringify({ blob_object_id: id, dismissed: true }));
|
|
140
140
|
return 0;
|
|
141
141
|
}
|
|
142
|
-
say(`Took the line for ${id} off. The incident stays in a record that names nobody
|
|
142
|
+
say(`Took the line for ${id} off. The incident stays in a record that names nobody. If the same ` +
|
|
143
143
|
`storage is found and lost again, it is shown again.`);
|
|
144
144
|
return 0;
|
|
145
145
|
}
|
|
@@ -159,22 +159,22 @@ export async function losses(options = {}) {
|
|
|
159
159
|
}
|
|
160
160
|
say(rows.length === 1
|
|
161
161
|
? `The chain no longer knows one storage object your credits paid for. That is what the ` +
|
|
162
|
-
`check measured
|
|
162
|
+
`check measured. It did not try the download. The file may no longer come back, and ` +
|
|
163
163
|
`NMTS cannot restore it.`
|
|
164
164
|
: `The chain no longer knows ${rows.length} storage objects your credits paid for. That is ` +
|
|
165
|
-
`what the check measured
|
|
165
|
+
`what the check measured. It did not try the download. Those files may no longer come ` +
|
|
166
166
|
`back, and NMTS cannot restore them.`);
|
|
167
167
|
say(``);
|
|
168
168
|
for (const row of rows) {
|
|
169
169
|
say(`${row.blob_object_id} first missed ${utcDay(row.first_seen)}` +
|
|
170
|
-
(row.required_notice ?
|
|
171
|
-
(row.restricted ?
|
|
170
|
+
(row.required_notice ? `, shown because the law requires it` : ``) +
|
|
171
|
+
(row.restricted ? `, kept but not used while you contest it` : ``));
|
|
172
172
|
}
|
|
173
173
|
say(``);
|
|
174
174
|
say(`The date is when a check first could not find it, not when the storage went. There is no ` +
|
|
175
175
|
`file name: the server cannot pair the object with a file, and NMTS cannot see inside files.`);
|
|
176
176
|
say(`\`${BINARY_NAME} losses --recheck <id>\` asks the chain again now. \`${BINARY_NAME} losses ` +
|
|
177
|
-
`--dismiss <id>\` takes a line off once you have read it
|
|
177
|
+
`--dismiss <id>\` takes a line off once you have read it. The incident stays in a record ` +
|
|
178
178
|
`that names nobody.`);
|
|
179
179
|
return 0;
|
|
180
180
|
}
|
package/dist/commands/ls.js
CHANGED
|
@@ -39,7 +39,7 @@ import { tierLabel, tiersOf } from "../list-tier.js";
|
|
|
39
39
|
function trashWindow(trashedAtMs, nowMs) {
|
|
40
40
|
const left = daysLeftInTrash(trashedAtMs, nowMs);
|
|
41
41
|
if (left <= 0)
|
|
42
|
-
return `past ${TRASH_RETENTION_DAYS} days
|
|
42
|
+
return `past ${TRASH_RETENTION_DAYS} days; \`nmts sweep\` drops it`;
|
|
43
43
|
return `${left} day${left === 1 ? "" : "s"} left`;
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
@@ -158,7 +158,7 @@ export async function ls(options = {}) {
|
|
|
158
158
|
}
|
|
159
159
|
else {
|
|
160
160
|
say(`No file in this account has "${options.find}" in its name` +
|
|
161
|
-
(hidden > 0 ? ` (${hidden} in the trash, not searched
|
|
161
|
+
(hidden > 0 ? ` (${hidden} in the trash, not searched; \`--all\` searches those too)` : ``) +
|
|
162
162
|
`.`);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -175,12 +175,12 @@ export async function ls(options = {}) {
|
|
|
175
175
|
say(``);
|
|
176
176
|
const files = rows.filter((r) => r.kind !== KIND_FOLDER).length;
|
|
177
177
|
const total = rows.filter((r) => r.kind !== KIND_FOLDER).reduce((n, r) => n + r.size, 0);
|
|
178
|
-
say(`${files} file${files === 1 ? "" : "s"}
|
|
178
|
+
say(`${files} file${files === 1 ? "" : "s"}, ${humanSize(total)}` +
|
|
179
179
|
(needle === null ? `` : ` matching "${options.find}"`) +
|
|
180
180
|
(hidden > 0
|
|
181
181
|
? needle === null
|
|
182
|
-
?
|
|
183
|
-
:
|
|
182
|
+
? `, ${hidden} in the trash, hidden (--all shows them)`
|
|
183
|
+
: `, ${hidden} in the trash, not searched (--all searches those too)`
|
|
184
184
|
: ``));
|
|
185
185
|
// ⛔ THE TABLE SAYS WHAT IT LEFT OUT. Under a query the rows above are not the drive, and the
|
|
186
186
|
// two ways that misleads are both quiet ones: files that did not match are simply absent,
|
|
@@ -194,7 +194,7 @@ export async function ls(options = {}) {
|
|
|
194
194
|
say(` Without --find this listing would also have shown ${filteredOutFiles} other ` +
|
|
195
195
|
`file${filteredOutFiles === 1 ? "" : "s"}, which did not match.`);
|
|
196
196
|
}
|
|
197
|
-
say(` Only file names are matched, so a folder is never a match of its own
|
|
197
|
+
say(` Only file names are matched, so a folder is never a match of its own. The folders`);
|
|
198
198
|
say(` above are the ones that hold a match, and folders holding none are not listed.`);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
@@ -208,7 +208,7 @@ export async function ls(options = {}) {
|
|
|
208
208
|
}
|
|
209
209
|
if (list.serverSeqDisagreed !== undefined) {
|
|
210
210
|
say(``);
|
|
211
|
-
say(` The server said version ${list.serverSeqDisagreed}
|
|
211
|
+
say(` The server said version ${list.serverSeqDisagreed}. The sealed list says ${list.seq}.`);
|
|
212
212
|
say(` The sealed number is the one that is authenticated, so it is the one used.`);
|
|
213
213
|
}
|
|
214
214
|
return 0;
|
package/dist/commands/marks.js
CHANGED
|
@@ -165,7 +165,7 @@ async function run(verb, paths, name, options) {
|
|
|
165
165
|
if (target.kind !== KIND_FILE) {
|
|
166
166
|
throw new NmtsError(`"${fullPathOf(index, target)}" is a folder, and marks are for files.`, {
|
|
167
167
|
exitCode: 4,
|
|
168
|
-
nextStep: `Nothing was marked. A star, a pin and a label are shown on files
|
|
168
|
+
nextStep: `Nothing was marked. A star, a pin and a label are shown on files. A folder that ` +
|
|
169
169
|
`carried one would show it nowhere.`,
|
|
170
170
|
});
|
|
171
171
|
}
|
package/dist/commands/mcp.js
CHANGED
|
@@ -172,8 +172,8 @@ export async function mcp(options = {}) {
|
|
|
172
172
|
const gated = withTiers(tools, ctx.asker);
|
|
173
173
|
// ⛔ To stderr, deliberately. A person starting this by hand should see what it is; a client
|
|
174
174
|
// reading stdout must see nothing but protocol.
|
|
175
|
-
note(`${PRODUCT_NAME}
|
|
176
|
-
note(`Tools: ${tools.map((t) => t.name).join("
|
|
175
|
+
note(`${PRODUCT_NAME}, ${identity.accountId}, ${network}, files land in ${outDir}`);
|
|
176
|
+
note(`Tools: ${tools.map((t) => t.name).join(", ")}`);
|
|
177
177
|
// ⚠ READ ONCE, BEFORE THE SERVER STARTS. The line below is written from a callback the
|
|
178
178
|
// protocol drives, and a callback that had to await would report the setting after the
|
|
179
179
|
// sentence it belongs to.
|
|
@@ -191,7 +191,7 @@ export async function mcp(options = {}) {
|
|
|
191
191
|
if (client.host !== null)
|
|
192
192
|
note(`Client: ${describeSighting(client.host)}`);
|
|
193
193
|
else if (client.name !== null)
|
|
194
|
-
note(`Client: ${client.name}
|
|
194
|
+
note(`Client: ${client.name} (not an agent this version knows by name)`);
|
|
195
195
|
},
|
|
196
196
|
// ⛔ AND WHETHER IT CAN BE ASKED ANYTHING, said once for the same reason. A person watching
|
|
197
197
|
// this log needs to know before the first share, not when it is refused.
|
|
@@ -204,7 +204,7 @@ export async function mcp(options = {}) {
|
|
|
204
204
|
return;
|
|
205
205
|
note(built === null
|
|
206
206
|
? "This client cannot show you a question, so sharing is refused here. Share from a terminal."
|
|
207
|
-
: "This client can show you a question
|
|
207
|
+
: "This client can show you a question. Every share will ask you first.");
|
|
208
208
|
},
|
|
209
209
|
});
|
|
210
210
|
return 0;
|
package/dist/commands/mode.js
CHANGED
|
@@ -27,10 +27,10 @@ export async function mode(wanted, target, options = {}) {
|
|
|
27
27
|
say(JSON.stringify({ mode: at, setAt: await setAt(), means: MODE_MEANS[at] }));
|
|
28
28
|
return 0;
|
|
29
29
|
}
|
|
30
|
-
say(`${at}
|
|
30
|
+
say(`${at}: ${MODE_MEANS[at]}`);
|
|
31
31
|
for (const other of AUTONOMY_MODES) {
|
|
32
32
|
if (other !== at)
|
|
33
|
-
say(`${other}
|
|
33
|
+
say(`${other}: ${MODE_MEANS[other]}`);
|
|
34
34
|
}
|
|
35
35
|
say(`Change it, at a terminal: ${BINARY_NAME} mode <${AUTONOMY_MODES.join("|")}>`);
|
|
36
36
|
say(`Read one in full first: ${BINARY_NAME} mode explain <mode>`);
|
|
@@ -39,7 +39,7 @@ export async function mode(wanted, target, options = {}) {
|
|
|
39
39
|
if (wanted === "explain") {
|
|
40
40
|
const which = target === undefined ? null : wantedMode(target);
|
|
41
41
|
if (which === null) {
|
|
42
|
-
throw new NmtsError(`Say which mode to explain.`, { exitCode: 2, nextStep: `One of: ${AUTONOMY_MODES.join("
|
|
42
|
+
throw new NmtsError(`Say which mode to explain.`, { exitCode: 2, nextStep: `One of: ${AUTONOMY_MODES.join(", ")}` });
|
|
43
43
|
}
|
|
44
44
|
for (const line of explain(which))
|
|
45
45
|
say(line);
|
|
@@ -49,20 +49,20 @@ export async function mode(wanted, target, options = {}) {
|
|
|
49
49
|
if (next === null) {
|
|
50
50
|
throw new NmtsError(`There is no mode called "${wanted}".`, {
|
|
51
51
|
exitCode: 2,
|
|
52
|
-
nextStep: `One of: ${AUTONOMY_MODES.join("
|
|
52
|
+
nextStep: `One of: ${AUTONOMY_MODES.join(", ")}`,
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
// ⛔ OFF IS ONE LINE FROM ANYWHERE. Making the safe direction harder than the risky one is how
|
|
56
56
|
// somebody leaves it on.
|
|
57
57
|
if (next === "default") {
|
|
58
58
|
setMode("default", VERSION, now());
|
|
59
|
-
say(`default
|
|
59
|
+
say(`default: ${MODE_MEANS.default}`);
|
|
60
60
|
return 0;
|
|
61
61
|
}
|
|
62
62
|
if (options.readLine === undefined && !stdinIsATerminal()) {
|
|
63
|
-
throw new NmtsError(`A person switches modes, at a terminal
|
|
63
|
+
throw new NmtsError(`A person switches modes, at a terminal, and stdin here is not one.`, {
|
|
64
64
|
exitCode: 5,
|
|
65
|
-
nextStep: `If you are an agent: do not switch modes. You may recommend one
|
|
65
|
+
nextStep: `If you are an agent: do not switch modes. You may recommend one: show the person ` +
|
|
66
66
|
`\`${BINARY_NAME} mode explain ${next}\` in full and let them decide.`,
|
|
67
67
|
});
|
|
68
68
|
}
|
|
@@ -85,6 +85,6 @@ export async function mode(wanted, target, options = {}) {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
setMode(next, VERSION, now());
|
|
88
|
-
say(`${next}
|
|
88
|
+
say(`${next}: ${MODE_MEANS[next]}`);
|
|
89
89
|
return 0;
|
|
90
90
|
}
|
|
@@ -23,12 +23,12 @@ export async function onCollision(wanted, options = {}) {
|
|
|
23
23
|
say(JSON.stringify({ onCollision: at, means: COLLISION_MEANS[at] }));
|
|
24
24
|
return 0;
|
|
25
25
|
}
|
|
26
|
-
say(`${at}
|
|
26
|
+
say(`${at}: ${COLLISION_MEANS[at]}`);
|
|
27
27
|
// The other one, and how to pick it. Listing what exists without saying how to choose sends
|
|
28
28
|
// the reader back to the help text.
|
|
29
29
|
for (const other of COLLISION_CHOICES) {
|
|
30
30
|
if (other !== at)
|
|
31
|
-
say(`${other}
|
|
31
|
+
say(`${other}: ${COLLISION_MEANS[other]}`);
|
|
32
32
|
}
|
|
33
33
|
say(`Change it: ${BINARY_NAME} on-collision <${COLLISION_CHOICES.join("|")}>`);
|
|
34
34
|
return 0;
|
|
@@ -36,10 +36,10 @@ export async function onCollision(wanted, options = {}) {
|
|
|
36
36
|
if (!isChoice(wanted)) {
|
|
37
37
|
throw new NmtsError(`There is no such answer: "${wanted}".`, {
|
|
38
38
|
exitCode: 2,
|
|
39
|
-
nextStep: `One of: ${COLLISION_CHOICES.join("
|
|
39
|
+
nextStep: `One of: ${COLLISION_CHOICES.join(", ")}`,
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
await setChoice(wanted, VERSION, now());
|
|
43
|
-
say(`${wanted}
|
|
43
|
+
say(`${wanted}: ${COLLISION_MEANS[wanted]}`);
|
|
44
44
|
return 0;
|
|
45
45
|
}
|
|
@@ -71,7 +71,7 @@ export function sayWalletAttached(say, attached) {
|
|
|
71
71
|
say(``);
|
|
72
72
|
say(`This wallet also opens the new account: ${attached.locator}`);
|
|
73
73
|
if (attached.keyLeft !== null) {
|
|
74
|
-
say(`⚠ The key borrowed to store it
|
|
74
|
+
say(`⚠ The key borrowed to store it (${attached.keyLeft}) is still live. Cut it with \`${BINARY_NAME} key revoke ${attached.keyLeft}\`.`);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
/** Cut the borrowed key. Its failure is an answer, not a throw: the wallet is attached either way. */
|
|
@@ -60,7 +60,7 @@ export async function mv(operands, options = {}) {
|
|
|
60
60
|
if (destination === undefined || paths.length === 0) {
|
|
61
61
|
throw new NmtsError("`nmts mv` needs what to move and where to put it.", {
|
|
62
62
|
exitCode: 2,
|
|
63
|
-
nextStep: `For example: nmts mv notes.txt archive
|
|
63
|
+
nextStep: `For example: nmts mv notes.txt archive, nmts mv a.txt b.txt archive, ` +
|
|
64
64
|
`nmts mv archive/notes.txt /`,
|
|
65
65
|
});
|
|
66
66
|
}
|
package/dist/commands/padding.js
CHANGED
|
@@ -76,7 +76,7 @@ export async function padding(wanted, options = {}) {
|
|
|
76
76
|
say(at === "pow2"
|
|
77
77
|
? `File sizes are hidden with powers of two: a stored size shows as one value per doubling.`
|
|
78
78
|
: `File sizes are hidden the standard way: a stored size shows as one of a few fixed values per doubling.`);
|
|
79
|
-
say(`Anyone can read the size of a piece stored on the storage network
|
|
79
|
+
say(`Anyone can read the size of a piece stored on the storage network. The blank bytes make it ` +
|
|
80
80
|
`one of a set of fixed values instead of the exact number.`);
|
|
81
81
|
return 0;
|
|
82
82
|
}
|
|
@@ -89,7 +89,7 @@ export async function padding(wanted, options = {}) {
|
|
|
89
89
|
// say "a list exists" about an account nothing was ever put in — refuse instead, and say why.
|
|
90
90
|
const before = await readFileList(session.server, session.apiKey, session.code, session.accountId);
|
|
91
91
|
if (before.manifest === null) {
|
|
92
|
-
throw new NmtsError(`This account has no file list yet
|
|
92
|
+
throw new NmtsError(`This account has no file list yet. The setting lives in the list, and there is nothing to write it into.`, { exitCode: 4, nextStep: `Upload once (\`${BINARY_NAME} put\`) and set it after.` });
|
|
93
93
|
}
|
|
94
94
|
const result = await applyManyToList(session, () => [], { paddingMode: mode });
|
|
95
95
|
if (options.json === true) {
|
|
@@ -108,7 +108,7 @@ export async function padding(wanted, options = {}) {
|
|
|
108
108
|
`network and to anyone who reads the blob. About 1 % less storage.`);
|
|
109
109
|
return 0;
|
|
110
110
|
}
|
|
111
|
-
say(`Set to ${CALLED[wanted]}. It applies to what is uploaded next, from every device
|
|
111
|
+
say(`Set to ${CALLED[wanted]}. It applies to what is uploaded next, from every device. Files ` +
|
|
112
112
|
`already uploaded keep the size they were stored at.`);
|
|
113
113
|
return 0;
|
|
114
114
|
}
|
|
@@ -52,11 +52,11 @@ function keygen(out, say) {
|
|
|
52
52
|
// stored NMTS key, which lives under the user's own profile. So on Windows the mode is not
|
|
53
53
|
// merely reported as absent: the file is cut off from the folder's permissions.
|
|
54
54
|
say(restrictToCurrentUser(path)
|
|
55
|
-
? `Inherited permissions were removed
|
|
55
|
+
? `Inherited permissions were removed. Only your Windows account can open this file.`
|
|
56
56
|
: `Windows applies no POSIX file mode, and restricting the file with icacls failed, so it ` +
|
|
57
57
|
`inherits its folder's permissions. Move it somewhere only you can read.`);
|
|
58
58
|
}
|
|
59
|
-
say(`Register the public key at ${HOME_URL}
|
|
59
|
+
say(`Register the public key at ${HOME_URL}, under ${REGISTER_PATH}. The private half stays in that file.`);
|
|
60
60
|
return 0;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
@@ -48,7 +48,7 @@ function day(instant) {
|
|
|
48
48
|
return Number.isNaN(at.getTime()) ? instant : at.toISOString().slice(0, 10);
|
|
49
49
|
}
|
|
50
50
|
function rowLine(row, display, isDefault) {
|
|
51
|
-
const counts = `sent ${row.sent}
|
|
51
|
+
const counts = `sent ${row.sent}, received ${row.received}, messages ${row.support}`;
|
|
52
52
|
if (row.revokedAt !== null)
|
|
53
53
|
return `#${row.index} ${display} revoked ${day(row.revokedAt)} ${counts}`;
|
|
54
54
|
return `#${row.index} ${display}${isDefault ? " default" : ""} made ${day(row.createdAt)} ${counts}`;
|
|
@@ -57,7 +57,7 @@ function activityLines(activity) {
|
|
|
57
57
|
const out = [];
|
|
58
58
|
for (const s of activity?.sent ?? []) {
|
|
59
59
|
const what = s.path ?? `${s.itemId} (no longer in the file list)`;
|
|
60
|
-
const gone = s.recipientRevoked ? "
|
|
60
|
+
const gone = s.recipientRevoked ? " (the recipient has revoked this code)" : "";
|
|
61
61
|
out.push(` sent ${what} to ${s.recipient} ${day(s.createdAt)} share ${s.id}${gone}`);
|
|
62
62
|
}
|
|
63
63
|
for (const r of activity?.received ?? []) {
|
|
@@ -65,7 +65,7 @@ function activityLines(activity) {
|
|
|
65
65
|
out.push(` received share ${r.id} (will not open: ${r.problem})`);
|
|
66
66
|
continue;
|
|
67
67
|
}
|
|
68
|
-
const gone = r.senderRevoked ? "
|
|
68
|
+
const gone = r.senderRevoked ? " (the sender has revoked this code)" : "";
|
|
69
69
|
out.push(` received ${r.name ?? ""} from ${r.sender ?? ""} ${day(r.createdAt)} share ${r.id}${gone}`);
|
|
70
70
|
}
|
|
71
71
|
return out;
|
|
@@ -123,7 +123,7 @@ export async function listCodes(options = {}) {
|
|
|
123
123
|
say(line);
|
|
124
124
|
}
|
|
125
125
|
say(``);
|
|
126
|
-
say(`${live.length} of ${list.liveMax} live
|
|
126
|
+
say(`${live.length} of ${list.liveMax} live, ${list.madeToday} of ${list.dayCap} made today (UTC)`);
|
|
127
127
|
return 0;
|
|
128
128
|
}
|
|
129
129
|
/**
|
|
@@ -67,7 +67,7 @@ export async function publicCode(options = {}) {
|
|
|
67
67
|
const say = options.write ?? ((line) => process.stdout.write(`${line}\n`));
|
|
68
68
|
if (options.save === true) {
|
|
69
69
|
if (options.publish === true) {
|
|
70
|
-
throw new NmtsError("--save and --publish are two different things
|
|
70
|
+
throw new NmtsError("--save and --publish are two different things. Run them one at a time.", { exitCode: 2 });
|
|
71
71
|
}
|
|
72
72
|
return await savePublicCodeFile(options, say);
|
|
73
73
|
}
|
|
@@ -105,14 +105,14 @@ export async function publicCode(options = {}) {
|
|
|
105
105
|
return 0;
|
|
106
106
|
}
|
|
107
107
|
if (published) {
|
|
108
|
-
say(`public code ${shown.code} (default
|
|
108
|
+
say(`public code ${shown.code} (default, ${live} of ${list.liveMax} live)`);
|
|
109
109
|
say(``);
|
|
110
|
-
say(`Give it to whoever is sending. ⛔ It is NOT your NMTS key
|
|
110
|
+
say(`Give it to whoever is sending. ⛔ It is NOT your NMTS key. That one opens`);
|
|
111
111
|
say(`every file you have and is never given to anybody. This one opens nothing.`);
|
|
112
112
|
return 0;
|
|
113
113
|
}
|
|
114
114
|
say(`public code ${shown.code}`);
|
|
115
|
-
say(` NOT published
|
|
115
|
+
say(` NOT published: nobody can send to it yet`);
|
|
116
116
|
say(``);
|
|
117
117
|
say(`Publishing writes it on the server so a sender can find the key to seal to.`);
|
|
118
118
|
say(`A published code cannot be changed. You can revoke it and make a new one with`);
|
package/dist/commands/pull.js
CHANGED
|
@@ -108,7 +108,7 @@ export async function pull(target, options = {}) {
|
|
|
108
108
|
return failed.length === 0 ? 0 : 1;
|
|
109
109
|
}
|
|
110
110
|
say(``);
|
|
111
|
-
say(`${written.length} written
|
|
111
|
+
say(`${written.length} written, ${skipped.length} already there, ${failed.length} failed`);
|
|
112
112
|
if (skipped.length > 0) {
|
|
113
113
|
say(``);
|
|
114
114
|
say(` What was already there was left alone. --force replaces it, which cannot be undone.`);
|
|
@@ -74,6 +74,6 @@ export async function pushWithWallet(session, options, run) {
|
|
|
74
74
|
return 0;
|
|
75
75
|
}
|
|
76
76
|
say(``);
|
|
77
|
-
say(options.dryRun === true ? ` Nothing was signed and nothing was sent.` : `${uploaded.length} sent
|
|
77
|
+
say(options.dryRun === true ? ` Nothing was signed and nothing was sent.` : `${uploaded.length} sent, ${run.already.length} already there`);
|
|
78
78
|
return 0;
|
|
79
79
|
}
|
package/dist/commands/push.js
CHANGED
|
@@ -43,7 +43,7 @@ export async function push(target, options = {}) {
|
|
|
43
43
|
if (target === undefined || target === "") {
|
|
44
44
|
throw new NmtsError("Say which directory to push.", {
|
|
45
45
|
exitCode: 2,
|
|
46
|
-
nextStep: `\`${BINARY_NAME} push <directory
|
|
46
|
+
nextStep: `\`${BINARY_NAME} push <directory>\`, with a directory on this machine.`,
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
if (tierOf(options) === "heavy")
|
|
@@ -172,7 +172,7 @@ export async function push(target, options = {}) {
|
|
|
172
172
|
return 0;
|
|
173
173
|
}
|
|
174
174
|
say(``);
|
|
175
|
-
say(`${uploaded.length} sent
|
|
175
|
+
say(`${uploaded.length} sent, ${already.length} already there`);
|
|
176
176
|
return 0;
|
|
177
177
|
}
|
|
178
178
|
/** Seal, buy, upload and record ONE file. The account's data key does not outlive it. */
|
|
@@ -52,7 +52,7 @@ export async function putHeavy(target, options) {
|
|
|
52
52
|
if (target === undefined || target === "") {
|
|
53
53
|
throw new NmtsError("Say which file to put.", {
|
|
54
54
|
exitCode: 2,
|
|
55
|
-
nextStep: `\`${BINARY_NAME} put <file
|
|
55
|
+
nextStep: `\`${BINARY_NAME} put <file>\`, with a path on this machine.`,
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
const localPath = resolve(target);
|
|
@@ -108,7 +108,7 @@ export async function putHeavy(target, options) {
|
|
|
108
108
|
say(HEAVY_COPY.stored(report.facts["expiryEpoch"]));
|
|
109
109
|
if (added.replaced !== null) {
|
|
110
110
|
say(``);
|
|
111
|
-
say(` A file called ${name} was already there. It is in the trash now
|
|
111
|
+
say(` A file called ${name} was already there. It is in the trash now; ${BINARY_NAME} restore`);
|
|
112
112
|
say(` brings it back for 30 days. This machine is set to overwrite: ${BINARY_NAME} on-collision`);
|
|
113
113
|
}
|
|
114
114
|
else if (added.name !== name) {
|
|
@@ -17,7 +17,7 @@ export function payerOf(pay) {
|
|
|
17
17
|
return "wallet";
|
|
18
18
|
throw new NmtsError(`--pay takes credits or wallet, not "${pay}".`, {
|
|
19
19
|
exitCode: 2,
|
|
20
|
-
nextStep: `Nothing was sent. --pay wallet buys the storage from the wallet this NMTS key derives
|
|
20
|
+
nextStep: `Nothing was sent. --pay wallet buys the storage from the wallet this NMTS key derives. Without it credits pay.`,
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
/** The options that only mean something when the wallet pays, refused when it does not. */
|
|
@@ -129,11 +129,11 @@ export async function putWithWallet(target, options) {
|
|
|
129
129
|
}
|
|
130
130
|
say(` saved as ${savedAs}`);
|
|
131
131
|
if (original !== null) {
|
|
132
|
-
say(` The file credits paid for is in the trash now
|
|
132
|
+
say(` The file credits paid for is in the trash now; ${BINARY_NAME} restore brings it back for 30 days.`);
|
|
133
133
|
say(` Erasing it releases its storage and settles its deposit: ${BINARY_NAME} erase --release-storage.`);
|
|
134
134
|
}
|
|
135
135
|
else if (done.replaced)
|
|
136
|
-
say(` A file called ${name} was already there. It is in the trash now
|
|
136
|
+
say(` A file called ${name} was already there. It is in the trash now; ${BINARY_NAME} restore brings it back for 30 days.`);
|
|
137
137
|
else if (done.savedAs !== name)
|
|
138
138
|
say(` A file called ${name} was already there, so this one was numbered rather than replacing it.`);
|
|
139
139
|
if (done.resumed)
|
|
@@ -160,7 +160,7 @@ function refuseFromClashes(target, options) {
|
|
|
160
160
|
if (options.to !== undefined)
|
|
161
161
|
throw clash(`--to`, `the re-upload keeps the folder the file is in.`);
|
|
162
162
|
if (options.onCollision !== undefined) {
|
|
163
|
-
throw clash(`--on-collision`, `a re-upload replaces the file it came from
|
|
163
|
+
throw clash(`--on-collision`, `a re-upload replaces the file it came from. That is what it is for.`);
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
/**
|
|
@@ -286,12 +286,12 @@ function tell(ctx, size, step) {
|
|
|
286
286
|
if (step.step === "encoding")
|
|
287
287
|
say(` preparing${where} ${step.bytes} sealed bytes`);
|
|
288
288
|
if (step.step === "reserving")
|
|
289
|
-
say(` signing the registration${where}
|
|
289
|
+
say(` signing the registration${where}: WAL and the relay tip leave the wallet`);
|
|
290
290
|
if (step.step === "uploading")
|
|
291
291
|
say(` uploading${where} ${step.bytes} bytes to ${step.relayUrl}`);
|
|
292
292
|
if (step.step === "certifying") {
|
|
293
293
|
ctx.progress.done();
|
|
294
|
-
say(` signing the certification${where}
|
|
294
|
+
say(` signing the certification${where}: chain fee only`);
|
|
295
295
|
}
|
|
296
296
|
if (step.step === "committing")
|
|
297
297
|
say(` saving to the drive`);
|