mnemospark 1.2.1 → 1.2.2
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/README.md +24 -12
- package/dist/cli.js +88 -19
- package/dist/cli.js.map +1 -1
- package/dist/index.js +88 -19
- package/dist/index.js.map +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/mnemospark/SKILL.md +4 -2
- package/skills/mnemospark/references/commands.md +1 -1
- package/scripts/README.md +0 -55
- package/scripts/install-aws-cli.sh +0 -28
- package/scripts/install-jq.sh +0 -13
- package/scripts/install-pnpm.sh +0 -20
- package/scripts/reinstall.sh +0 -102
- package/scripts/uninstall.sh +0 -67
- package/scripts/verify-dev-tools.sh +0 -56
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Wallet and go. 💙**
|
|
4
4
|
_No forms. No email. Just Base. 💙_
|
|
5
5
|
|
|
6
|
-
mnemospark is an agentic service layer for OpenClaw
|
|
6
|
+
mnemospark is an agentic service layer for OpenClaw plus a standalone x402 payment + verification backend. It enables encrypted, authenticated, fully autonomous cloud and data workflows—paid via x402 with USDC on Base. No human onboarding. No API keys. The blockchain transaction is the record.
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ mnemospark is an agentic service layer for OpenClaw and a standalone x402 paymen
|
|
|
11
11
|
|
|
12
12
|
mnemospark connects OpenClaw agents to cloud workflows with wallet-native auth + payment rails.
|
|
13
13
|
|
|
14
|
-
- **Wallet-
|
|
14
|
+
- **Wallet-native authentication** for storage/API actions
|
|
15
15
|
- **x402-native payments** with USDC on Base
|
|
16
16
|
- **Agent-first flow** (quote → pay → provision)
|
|
17
17
|
- **Encrypted payload support** and structured request signing
|
|
@@ -24,7 +24,7 @@ mnemospark connects OpenClaw agents to cloud workflows with wallet-native auth +
|
|
|
24
24
|
### 1) Install the plugin in OpenClaw
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
openclaw plugins install mnemospark
|
|
27
|
+
openclaw plugins install mnemospark --dangerously-force-unsafe-install
|
|
28
28
|
openclaw gateway start
|
|
29
29
|
```
|
|
30
30
|
|
|
@@ -57,7 +57,7 @@ openclaw gateway restart
|
|
|
57
57
|
**Syntax**
|
|
58
58
|
|
|
59
59
|
- **Chat / OpenClaw (primary):** use `key:value` for arguments (for example `wallet-address:0x…`, `region:us-east-1`). `key=value` is also accepted.
|
|
60
|
-
- **Agent-driven workflows and CLI-style usage:** prefer `--parameter value` (
|
|
60
|
+
- **Agent-driven workflows and CLI-style usage:** prefer `--parameter value` (for example `npx mnemospark` or shell scripts).
|
|
61
61
|
|
|
62
62
|
**Top-level routes** (after `/mnemospark`)
|
|
63
63
|
|
|
@@ -82,33 +82,33 @@ Use via `/mnemospark cloud …` (or `/mnemospark wallet …`) in OpenClaw chat.
|
|
|
82
82
|
### Get a storage quote
|
|
83
83
|
|
|
84
84
|
```text
|
|
85
|
-
/mnemospark cloud price-storage
|
|
85
|
+
/mnemospark cloud price-storage wallet-address:<addr> object-id:<id> object-id-hash:<sha256> gb:<gb> provider:aws region:us-east-1
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
Use other regions by changing
|
|
88
|
+
Use other regions by changing `provider:` and `region:` (defaults: `aws` / `us-east-1`).
|
|
89
89
|
|
|
90
90
|
### Upload using quote
|
|
91
91
|
|
|
92
92
|
```text
|
|
93
|
-
/mnemospark cloud upload
|
|
93
|
+
/mnemospark cloud upload quote-id:<quote-id> wallet-address:<addr> object-id:<id> object-id-hash:<sha256>
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
### List objects
|
|
97
97
|
|
|
98
98
|
```text
|
|
99
|
-
/mnemospark cloud ls
|
|
99
|
+
/mnemospark cloud ls wallet-address:<addr> object-key:<object-key>
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
### Download object
|
|
103
103
|
|
|
104
104
|
```text
|
|
105
|
-
/mnemospark cloud download
|
|
105
|
+
/mnemospark cloud download wallet-address:<addr> object-key:<object-key>
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
### Delete object
|
|
109
109
|
|
|
110
110
|
```text
|
|
111
|
-
/mnemospark cloud delete
|
|
111
|
+
/mnemospark cloud delete wallet-address:<addr> object-key:<object-key>
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
---
|
|
@@ -118,7 +118,7 @@ Use other regions by changing `--provider` and `--region` (defaults: `aws` / `us
|
|
|
118
118
|
mnemospark follows a quote-and-pay execution model:
|
|
119
119
|
|
|
120
120
|
1. Agent requests a quote.
|
|
121
|
-
2. Agent provides wallet-
|
|
121
|
+
2. Agent provides wallet-native + payment authorization.
|
|
122
122
|
3. Backend verifies payment/auth context.
|
|
123
123
|
4. Storage action executes.
|
|
124
124
|
|
|
@@ -165,11 +165,23 @@ Optional unless noted. All names use the `MNEMOSPARK_` prefix.
|
|
|
165
165
|
|
|
166
166
|
---
|
|
167
167
|
|
|
168
|
+
## OpenClaw Install Warning
|
|
169
|
+
|
|
170
|
+
If OpenClaw shows a warning about **dangerous code patterns** when installing or updating mnemospark—often mentioning shell execution (`child_process`), environment variables, and network access—here is what is going on.
|
|
171
|
+
|
|
172
|
+
mnemospark is an **OpenClaw plugin** that talks to **your configured mnemospark backend**, runs a **local HTTP proxy** for storage workflows, and can **invoke the `openclaw` CLI** and system tools when needed (for example creating archives with `tar` or running `npm` when you use the update command). Those features use the same low-level Node.js APIs—`child_process` and `fetch`—that security tools also associate with risky software, so the installer may warn you even when the behavior is intentional and benign.
|
|
173
|
+
|
|
174
|
+
We also read **environment variables** you set on purpose (such as `MNEMOSPARK_BACKEND_API_BASE_URL`, `MNEMOSPARK_PROXY_PORT`, or wallet-related settings) so you can configure the plugin without editing code. Automated scans sometimes flag “environment access + network” as a possible credential-stealing pattern. In mnemospark, that combination exists because the plugin is **configurable and networked by design**, not because we are harvesting your unrelated secrets.
|
|
175
|
+
|
|
176
|
+
mnemospark is **open source**. If you want extra assurance, review the repository, search for `child_process`, `process.env`, and `fetch`, and run your own tests in a safe environment. The warning helps keep the ecosystem safe; for mnemospark it reflects **capabilities**, not a finding of malicious intent.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
168
180
|
## Troubleshooting
|
|
169
181
|
|
|
170
182
|
- **Missing wallet/auth errors**: verify wallet key is present and request signature headers are generated.
|
|
171
183
|
- **402 payment required**: expected in challenge flow; ensure client retries with payment authorization.
|
|
172
|
-
- **Upload/storage backend errors**: verify cloud permissions (e.g
|
|
184
|
+
- **Upload/storage backend errors**: verify cloud permissions (e.g. bucket access + IAM role rights).
|
|
173
185
|
- **Command not recognized**: confirm plugin installed and gateway restarted.
|
|
174
186
|
- **One-step operation correlation**: run `./skills/mnemospark/scripts/debug-operation.sh <operation-id>` (or omit ID to use latest).
|
|
175
187
|
|
package/dist/cli.js
CHANGED
|
@@ -4139,7 +4139,8 @@ var priceStorageSchema = {
|
|
|
4139
4139
|
args: [
|
|
4140
4140
|
{ name: "wallet-address", aliases: ["wallet"], required: true },
|
|
4141
4141
|
{ name: "object-id", aliases: ["object"], required: true },
|
|
4142
|
-
|
|
4142
|
+
// Optional: omit when the object exists in local SQLite after backup; CLI resolves sha256 from state.db.
|
|
4143
|
+
{ name: "object-id-hash", aliases: ["hash"] },
|
|
4143
4144
|
{ name: "gb", required: true },
|
|
4144
4145
|
{ name: "provider", required: true },
|
|
4145
4146
|
{ name: "region", required: true }
|
|
@@ -4231,7 +4232,7 @@ var TAR_OVERHEAD_BYTES = 10 * 1024 * 1024;
|
|
|
4231
4232
|
var QUOTE_VALIDITY_USER_NOTE = "Quotes are valid for one hour. Please run price-storage again if you need a new quote.";
|
|
4232
4233
|
var MNEMOSPARK_SUPPORT_EMAIL = "pluggedin@mnemospark.ai";
|
|
4233
4234
|
var CLOUD_HELP_FOOTER_STATE = "Local state: mnemospark records quotes, objects, payments, cron jobs, friendly names, and operation metadata in ~/.openclaw/mnemospark/state.db (SQLite). For troubleshooting and correlation, commands and the HTTP proxy append structured JSON lines to ~/.openclaw/mnemospark/events.jsonl. Monthly storage billing jobs are listed in ~/.openclaw/cron/jobs.json for OpenClaw scheduling.";
|
|
4234
|
-
var REQUIRED_PRICE_STORAGE = "wallet-address:, object-id:, object-id-hash
|
|
4235
|
+
var REQUIRED_PRICE_STORAGE = "wallet-address:, object-id:, gb:, provider:, region: (object-id-hash: optional if the object exists in local SQLite after backup)";
|
|
4235
4236
|
var REQUIRED_UPLOAD = "quote-id:, wallet-address:, object-id:, object-id-hash:";
|
|
4236
4237
|
var REQUIRED_BACKUP = "<file|directory> and name:<friendly-name>";
|
|
4237
4238
|
var REQUIRED_PAYMENT_SETTLE = "wallet-address: and (quote-id: | renewal:true with object-key:)";
|
|
@@ -4261,10 +4262,10 @@ var CLOUD_HELP_TEXT = [
|
|
|
4261
4262
|
" Purpose: create a local tar+gzip archive under ~/.openclaw/mnemospark/backup (filename from sanitized friendly name) and record metadata in SQLite for later price-storage and upload.",
|
|
4262
4263
|
" Required: " + REQUIRED_BACKUP,
|
|
4263
4264
|
"",
|
|
4264
|
-
"\u2022 `/mnemospark cloud price-storage wallet-address:<addr> object-id:<id> object-id-hash:<hash> gb:<gb> provider:aws region:us-east-1`",
|
|
4265
|
-
" Purpose: request a storage quote before upload (defaults shown; override `provider:` / `region:` for other regions).",
|
|
4265
|
+
"\u2022 `/mnemospark cloud price-storage wallet-address:<addr> object-id:<id> [object-id-hash:<hash>] gb:<gb> provider:aws region:us-east-1`",
|
|
4266
|
+
" Purpose: request a storage quote before upload (defaults shown; override `provider:` / `region:` for other regions). Omit `object-id-hash:` when the object is already in local SQLite (e.g. after backup); mnemospark reads sha256 from ~/.openclaw/mnemospark/state.db.",
|
|
4266
4267
|
" Required: " + REQUIRED_PRICE_STORAGE,
|
|
4267
|
-
" Shorter: `wallet:\u2026 object:\u2026 hash:\u2026 gb:\u2026 provider:\u2026 region:\u2026`",
|
|
4268
|
+
" Shorter: `wallet:\u2026 object:\u2026 [hash:\u2026] gb:\u2026 provider:\u2026 region:\u2026`",
|
|
4268
4269
|
"",
|
|
4269
4270
|
"\u2022 `/mnemospark cloud upload quote-id:<quote-id> wallet-address:<addr> object-id:<id> object-id-hash:<hash> [name:<friendly-name>] [async:true] [orchestrator:<inline|subagent>] [timeout-seconds:<n>]`",
|
|
4270
4271
|
" Purpose: upload an encrypted object using a valid quote-id.",
|
|
@@ -4475,6 +4476,41 @@ function stripAsyncControlFlags(args) {
|
|
|
4475
4476
|
function mergeArgParseWarnings(a, b) {
|
|
4476
4477
|
return [...a, ...b];
|
|
4477
4478
|
}
|
|
4479
|
+
async function resolvePriceStorageHashFromDatastore(datastore, partial) {
|
|
4480
|
+
await datastore.ensureReady();
|
|
4481
|
+
const row = await datastore.findObjectById(partial.object_id.trim());
|
|
4482
|
+
const wallet = partial.wallet_address.trim().toLowerCase();
|
|
4483
|
+
if (!row) {
|
|
4484
|
+
return {
|
|
4485
|
+
ok: false,
|
|
4486
|
+
message: "Cannot resolve object-id-hash: no object found in local SQLite for this object-id. Run backup first, or pass --object-id-hash explicitly."
|
|
4487
|
+
};
|
|
4488
|
+
}
|
|
4489
|
+
if (row.wallet_address.trim().toLowerCase() !== wallet) {
|
|
4490
|
+
return {
|
|
4491
|
+
ok: false,
|
|
4492
|
+
message: "Cannot resolve object-id-hash: wallet-address does not match the object record in ~/.openclaw/mnemospark/state.db."
|
|
4493
|
+
};
|
|
4494
|
+
}
|
|
4495
|
+
const sha = row.sha256?.trim();
|
|
4496
|
+
if (!sha) {
|
|
4497
|
+
return {
|
|
4498
|
+
ok: false,
|
|
4499
|
+
message: "Cannot resolve object-id-hash: local object record has no sha256 yet. Run backup first, or pass --object-id-hash explicitly."
|
|
4500
|
+
};
|
|
4501
|
+
}
|
|
4502
|
+
return {
|
|
4503
|
+
ok: true,
|
|
4504
|
+
request: {
|
|
4505
|
+
wallet_address: partial.wallet_address.trim(),
|
|
4506
|
+
object_id: partial.object_id.trim(),
|
|
4507
|
+
object_id_hash: sha.replace(/\s/g, ""),
|
|
4508
|
+
gb: partial.gb,
|
|
4509
|
+
provider: partial.provider.trim(),
|
|
4510
|
+
region: partial.region.trim()
|
|
4511
|
+
}
|
|
4512
|
+
};
|
|
4513
|
+
}
|
|
4478
4514
|
function parseCloudArgs(args) {
|
|
4479
4515
|
const trimmed = args?.trim() ?? "";
|
|
4480
4516
|
if (!trimmed) {
|
|
@@ -4544,18 +4580,38 @@ function parseCloudArgs(args) {
|
|
|
4544
4580
|
}
|
|
4545
4581
|
const flags = valuesToStringRecord(parsed.values);
|
|
4546
4582
|
const gb = Number.parseFloat(flags.gb ?? "");
|
|
4547
|
-
const
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
region: flags.region
|
|
4554
|
-
});
|
|
4555
|
-
if (!request) {
|
|
4583
|
+
const hashRaw = flags["object-id-hash"]?.trim();
|
|
4584
|
+
const walletAddress = flags["wallet-address"]?.trim();
|
|
4585
|
+
const objectId = flags["object-id"]?.trim();
|
|
4586
|
+
const provider = flags.provider?.trim();
|
|
4587
|
+
const region = flags.region?.trim();
|
|
4588
|
+
if (!walletAddress || !objectId || !provider || !region || !Number.isFinite(gb)) {
|
|
4556
4589
|
return { mode: "price-storage-invalid" };
|
|
4557
4590
|
}
|
|
4558
|
-
|
|
4591
|
+
if (hashRaw) {
|
|
4592
|
+
const request = parsePriceStorageQuoteRequest({
|
|
4593
|
+
wallet_address: walletAddress,
|
|
4594
|
+
object_id: objectId,
|
|
4595
|
+
object_id_hash: hashRaw,
|
|
4596
|
+
gb,
|
|
4597
|
+
provider,
|
|
4598
|
+
region
|
|
4599
|
+
});
|
|
4600
|
+
if (!request) {
|
|
4601
|
+
return { mode: "price-storage-invalid" };
|
|
4602
|
+
}
|
|
4603
|
+
return { mode: "price-storage", priceStorageRequest: request };
|
|
4604
|
+
}
|
|
4605
|
+
return {
|
|
4606
|
+
mode: "price-storage-resolve-hash",
|
|
4607
|
+
priceStoragePartial: {
|
|
4608
|
+
wallet_address: walletAddress,
|
|
4609
|
+
object_id: objectId,
|
|
4610
|
+
gb,
|
|
4611
|
+
provider,
|
|
4612
|
+
region
|
|
4613
|
+
}
|
|
4614
|
+
};
|
|
4559
4615
|
}
|
|
4560
4616
|
if (subcommand === "upload") {
|
|
4561
4617
|
const parsed = parseCommandArgs(rest, uploadSchema);
|
|
@@ -6692,10 +6748,23 @@ operation-id: ${operationId}`,
|
|
|
6692
6748
|
};
|
|
6693
6749
|
}
|
|
6694
6750
|
}
|
|
6695
|
-
if (parsed.mode === "price-storage") {
|
|
6751
|
+
if (parsed.mode === "price-storage" || parsed.mode === "price-storage-resolve-hash") {
|
|
6752
|
+
let priceStorageRequest;
|
|
6753
|
+
if (parsed.mode === "price-storage-resolve-hash") {
|
|
6754
|
+
const resolved = await resolvePriceStorageHashFromDatastore(
|
|
6755
|
+
datastore,
|
|
6756
|
+
parsed.priceStoragePartial
|
|
6757
|
+
);
|
|
6758
|
+
if (!resolved.ok) {
|
|
6759
|
+
return { text: resolved.message, isError: true };
|
|
6760
|
+
}
|
|
6761
|
+
priceStorageRequest = resolved.request;
|
|
6762
|
+
} else {
|
|
6763
|
+
priceStorageRequest = parsed.priceStorageRequest;
|
|
6764
|
+
}
|
|
6696
6765
|
const correlation = buildRequestCorrelation();
|
|
6697
6766
|
try {
|
|
6698
|
-
const quote = await requestPriceStorageQuote(
|
|
6767
|
+
const quote = await requestPriceStorageQuote(priceStorageRequest, {
|
|
6699
6768
|
...options.proxyQuoteOptions,
|
|
6700
6769
|
correlation
|
|
6701
6770
|
});
|
|
@@ -6753,8 +6822,8 @@ operation-id: ${operationId}`,
|
|
|
6753
6822
|
{
|
|
6754
6823
|
operation_id: correlation.operationId,
|
|
6755
6824
|
trace_id: correlation.traceId,
|
|
6756
|
-
wallet_address:
|
|
6757
|
-
object_id:
|
|
6825
|
+
wallet_address: priceStorageRequest.wallet_address,
|
|
6826
|
+
object_id: priceStorageRequest.object_id,
|
|
6758
6827
|
status: "failed"
|
|
6759
6828
|
},
|
|
6760
6829
|
mnemosparkHomeDir
|