mnemospark 1.0.1 → 1.2.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.
package/dist/cli.js CHANGED
@@ -2969,6 +2969,15 @@ var USER_AGENT = `mnemospark/${VERSION}`;
2969
2969
  import { existsSync, readFileSync } from "fs";
2970
2970
  import { privateKeyToAccount as privateKeyToAccount6 } from "viem/accounts";
2971
2971
 
2972
+ // src/cloud-help-onboarding.ts
2973
+ var CLOUD_ONBOARDING_BLOCK_LINES = [
2974
+ "",
2975
+ "Start here to securely upload a file and we'll guide you along the way. Copy the line below and replace <file|directory> with the file or directory you'd like to save to the cloud and replace <friendly-name> with an easy to remember name.",
2976
+ "",
2977
+ "`/mnemospark cloud backup <file|directory> name:<friendly-name> async:true`",
2978
+ ""
2979
+ ];
2980
+
2972
2981
  // src/cloud-command.ts
2973
2982
  import { spawn } from "child_process";
2974
2983
  import {
@@ -4216,7 +4225,7 @@ function expandTilde(path) {
4216
4225
  }
4217
4226
  var CLOUD_HELP_TEXT = [
4218
4227
  "\u2601\uFE0F **mnemospark - Wallet and go.** \u{1F499}",
4219
- "",
4228
+ ...CLOUD_ONBOARDING_BLOCK_LINES,
4220
4229
  "**Syntax:** use `/mnemospark cloud \u2026`. Prefer `key:value` for arguments; `key=value` and `--key value` are also accepted. Optional verbose markers: `cloud:true`, `price-storage:true`, etc. Aliases: `wallet:` \u2192 wallet-address, `object:` \u2192 object-id, `quote:` \u2192 quote-id, `hash:` \u2192 object-id-hash.",
4221
4230
  "",
4222
4231
  "**Cloud Commands**",
@@ -5353,8 +5362,11 @@ async function maybeCleanupLocalBackupArchive(archivePath) {
5353
5362
  } catch {
5354
5363
  }
5355
5364
  }
5365
+ function formatMnemosparkCommandCopyBlock(commandLine) {
5366
+ return ["```", commandLine, "```"].join("\n");
5367
+ }
5356
5368
  function formatStorageUploadUserMessage(upload, cronJobId) {
5357
- const lsLine = `/mnemospark cloud ls wallet-address:\`${upload.addr}\``;
5369
+ const lsCommand = `/mnemospark cloud ls wallet-address:${upload.addr}`;
5358
5370
  return [
5359
5371
  `Your file \`${upload.object_id}\` with key \`${upload.object_key}\` has been stored using \`${upload.provider}\` in folder \`${upload.bucket_name}\` in region \`${upload.location}\``,
5360
5372
  "",
@@ -5362,7 +5374,7 @@ function formatStorageUploadUserMessage(upload, cronJobId) {
5362
5374
  "",
5363
5375
  "To view your cloud storage run the command:",
5364
5376
  "",
5365
- lsLine,
5377
+ formatMnemosparkCommandCopyBlock(lsCommand),
5366
5378
  "",
5367
5379
  "Thank you for using mnemospark!",
5368
5380
  `Reach out if you need anything: ${MNEMOSPARK_SUPPORT_EMAIL}`
@@ -5412,13 +5424,13 @@ function extractLsErrorMessage(error) {
5412
5424
  return null;
5413
5425
  }
5414
5426
  function formatPriceStorageUserMessage(quote, localArchiveHint) {
5415
- const uploadLine = `/mnemospark cloud upload quote-id:\`${quote.quote_id}\` wallet-address:\`${quote.addr}\` object-id:\`${quote.object_id}\` object-id-hash:\`${quote.object_id_hash}\``;
5427
+ const uploadCommand = `/mnemospark cloud upload quote-id:${quote.quote_id} wallet-address:${quote.addr} object-id:${quote.object_id} object-id-hash:${quote.object_id_hash}`;
5416
5428
  const lines = [
5417
5429
  `Your storage quote \`${quote.quote_id}\`: storage price \`$${quote.storage_price}\` for file \`${quote.object_id}\` with file size \`${quote.object_size_gb}\` in \`${quote.provider}\` \`${quote.location}\`.`,
5418
5430
  "",
5419
5431
  "If you accept this quote, run:",
5420
5432
  "",
5421
- uploadLine,
5433
+ formatMnemosparkCommandCopyBlock(uploadCommand),
5422
5434
  ""
5423
5435
  ];
5424
5436
  if (localArchiveHint?.trim()) {
@@ -5437,7 +5449,7 @@ var DEFAULT_BACKUP_QUOTE_PROVIDER = "aws";
5437
5449
  var DEFAULT_BACKUP_QUOTE_REGION = "us-east-1";
5438
5450
  function formatBackupSuccessUserMessage(result, walletAddress, friendlyName) {
5439
5451
  const hash = result.objectIdHash.replace(/\s/g, "");
5440
- const priceStorageLine = `/mnemospark cloud price-storage wallet-address:\`${walletAddress}\` object-id:\`${result.objectId}\` object-id-hash:\`${hash}\` gb:\`${result.objectSizeGb}\` provider:${DEFAULT_BACKUP_QUOTE_PROVIDER} region:${DEFAULT_BACKUP_QUOTE_REGION}`;
5452
+ const priceStorageCommand = `/mnemospark cloud price-storage wallet-address:${walletAddress} object-id:${result.objectId} object-id-hash:${hash} gb:${result.objectSizeGb} provider:${DEFAULT_BACKUP_QUOTE_PROVIDER} region:${DEFAULT_BACKUP_QUOTE_REGION}`;
5441
5453
  return [
5442
5454
  `Backup archive: \`${result.archivePath}\``,
5443
5455
  "",
@@ -5448,7 +5460,7 @@ function formatBackupSuccessUserMessage(result, walletAddress, friendlyName) {
5448
5460
  "",
5449
5461
  "Next, request a storage quote.",
5450
5462
  "",
5451
- priceStorageLine,
5463
+ formatMnemosparkCommandCopyBlock(priceStorageCommand),
5452
5464
  "",
5453
5465
  `The default region is ${DEFAULT_BACKUP_QUOTE_REGION}. Change the command parameters to switch regions (not required).`,
5454
5466
  "",
@@ -6453,14 +6465,20 @@ ${operation.result_text}` : meta;
6453
6465
  error_message: operationAfterDispatch?.error_message ?? null
6454
6466
  });
6455
6467
  }
6468
+ const subagentMetaLines = [
6469
+ `Operation started in background. operation-id: ${operationId}`,
6470
+ `orchestrator: subagent`,
6471
+ `subagent-session-id: ${dispatchResult.sessionId}`,
6472
+ timeoutSeconds ? `timeout-seconds: ${timeoutSeconds}` : null
6473
+ ].filter((line) => Boolean(line));
6456
6474
  return {
6457
6475
  text: [
6458
- `Operation started in background. operation-id: ${operationId}`,
6459
- `orchestrator: subagent`,
6460
- `subagent-session-id: ${dispatchResult.sessionId}`,
6461
- timeoutSeconds ? `timeout-seconds: ${timeoutSeconds}` : null,
6462
- `Use /mnemospark cloud op-status operation-id:${operationId}`
6463
- ].filter((line) => Boolean(line)).join("\n")
6476
+ ...subagentMetaLines,
6477
+ "",
6478
+ formatMnemosparkCommandCopyBlock(
6479
+ `/mnemospark cloud op-status operation-id:${operationId}`
6480
+ )
6481
+ ].join("\n")
6464
6482
  };
6465
6483
  } catch (dispatchError) {
6466
6484
  const dispatchMessage = dispatchError instanceof Error ? dispatchError.message : String(dispatchError);
@@ -6562,7 +6580,8 @@ operation-id: ${operationId}`,
6562
6580
  text: [
6563
6581
  `Operation started in background. operation-id: ${operationId}`,
6564
6582
  `orchestrator: inline`,
6565
- `Use /mnemospark cloud op-status operation-id:${operationId}`
6583
+ "",
6584
+ formatMnemosparkCommandCopyBlock(`/mnemospark cloud op-status operation-id:${operationId}`)
6566
6585
  ].join("\n")
6567
6586
  };
6568
6587
  }
@@ -7304,17 +7323,21 @@ operation-id: ${operationId}`,
7304
7323
  // src/mnemospark-handler.ts
7305
7324
  var MNEMOSPARK_ROOT_HELP_TEXT = [
7306
7325
  "\u2601\uFE0F **mnemospark - Wallet and go.** \u{1F499}",
7326
+ ...CLOUD_ONBOARDING_BLOCK_LINES,
7327
+ "To view the full help menu use these commands:",
7307
7328
  "",
7308
- "**Syntax:** `/mnemospark cloud \u2026` or `/mnemospark wallet \u2026`",
7309
- "Arguments may use `key:value`, `key=value`, or `--key value`. Optional verbose markers: `cloud:true`, `price-storage:true`, etc. (same as bare words).",
7310
- "Aliases include `wallet:` \u2192 wallet-address, `object:` \u2192 object-id, `quote:` \u2192 quote-id (see `/mnemospark cloud help`).",
7311
- "",
7312
- "**Cloud storage** \u2014 full reference:",
7329
+ "**Cloud storage**",
7313
7330
  "\u2022 `/mnemospark cloud help`",
7314
7331
  "",
7315
- "**Wallet** \u2014 status:",
7332
+ "**Wallet status and funding link:**",
7316
7333
  "\u2022 `/mnemospark wallet`",
7317
- "\u2022 `/mnemospark wallet help` \u2014 commands and funding link"
7334
+ "\u2022 `/mnemospark wallet help`",
7335
+ "",
7336
+ "**Let your agent run mnemospark for you:**",
7337
+ "",
7338
+ "mnemospark installs as an OpenClaw extension under `~/.openclaw/extensions/mnemospark/`. Point your agent at the bundled skill:",
7339
+ "",
7340
+ "Install the mnemospark skill available at `~/.openclaw/extensions/mnemospark/skills/mnemospark/SKILL.md`"
7318
7341
  ].join("\n");
7319
7342
  var MNEMOSPARK_WALLET_HELP_TEXT = (address) => [
7320
7343
  "\u2601\uFE0F **mnemospark Wallet**",