mnemospark 1.3.0 → 1.4.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/README.md +18 -12
- package/dist/cli.js +17 -9
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.js +8 -9
- package/dist/index.js.map +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/mnemospark/references/commands.md +1 -1
package/README.md
CHANGED
|
@@ -52,6 +52,20 @@ openclaw gateway restart
|
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
55
|
+
## OpenClaw Install Warning
|
|
56
|
+
|
|
57
|
+
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.
|
|
58
|
+
|
|
59
|
+
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.
|
|
60
|
+
|
|
61
|
+
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.
|
|
62
|
+
|
|
63
|
+
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.
|
|
64
|
+
|
|
65
|
+
Have ChatGPT or your favorite LLM evaluate the mnemospark codebase. Here's a [starter link](https://chatgpt.com/share/69ce6119-52cc-8394-b9f9-c06528d85ea7).
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
55
69
|
## Slash command reference
|
|
56
70
|
|
|
57
71
|
**Syntax**
|
|
@@ -93,8 +107,6 @@ Use other regions by changing `provider:` and `region:` (defaults: `aws` / `us-e
|
|
|
93
107
|
/mnemospark cloud upload quote-id:<quote-id> wallet-address:<addr> object-id:<id> object-id-hash:<sha256>
|
|
94
108
|
```
|
|
95
109
|
|
|
96
|
-
On **OpenClaw 2026.4.x**, the first successful upload applies the **Mnemospark Renewal Agent Runbook** for you: it ensures a dedicated agent (`mnemospark-renewal` by default) with `tools.deny: ["subagents"]` and `tools.exec.ask: "off"`, updates `~/.openclaw/exec-approvals.json` so `/usr/bin/node` is allowlisted for that agent, runs `openclaw config validate`, and best-effort `openclaw gateway restart`. It then registers the monthly renewal cron with `--no-deliver`, `--agent`, and a `Command: /usr/bin/node …/dist/cli.js cloud payment-settle --renewal …` message. Override paths with `MNEMOSPARK_CRON_AGENT_ID` and `MNEMOSPARK_CRON_NODE_BIN` if your system differs.
|
|
97
|
-
|
|
98
110
|
### List objects
|
|
99
111
|
|
|
100
112
|
```text
|
|
@@ -156,8 +168,7 @@ Optional unless noted. All names use the `MNEMOSPARK_` prefix.
|
|
|
156
168
|
| `MNEMOSPARK_PROXY_VERBOSE_404` | When `1`, `true`, or `yes`, the local HTTP proxy includes a `message` field on **404** responses describing supported paths. Default (unset) is a generic JSON body `{ "error": "Not found" }` only (reduces reconnaissance). |
|
|
157
169
|
| `MNEMOSPARK_CRON_AGENT_ID` | OpenClaw agent id used for the monthly renewal cron (default `mnemospark-renewal`). |
|
|
158
170
|
| `MNEMOSPARK_CRON_NODE_BIN` | Absolute path to `node` for renewal cron exec (default `/usr/bin/node`). |
|
|
159
|
-
| `MNEMOSPARK_DISABLE_OPENCLAW_PREREQ` | Set to `1` to skip automatic runbook application (for advanced debugging only).
|
|
160
|
-
| `MNEMOSPARK_SKIP_GATEWAY_RESTART` | Set to `1` to skip best-effort `openclaw gateway restart` after prerequisite writes. |
|
|
171
|
+
| `MNEMOSPARK_DISABLE_OPENCLAW_PREREQ` | Set to `1` to skip automatic runbook application everywhere it runs (plugin load, CLI install/update; for advanced debugging only). |
|
|
161
172
|
|
|
162
173
|
---
|
|
163
174
|
|
|
@@ -171,15 +182,9 @@ Optional unless noted. All names use the `MNEMOSPARK_` prefix.
|
|
|
171
182
|
|
|
172
183
|
---
|
|
173
184
|
|
|
174
|
-
##
|
|
175
|
-
|
|
176
|
-
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.
|
|
185
|
+
## mnemospark Exec Approvals Runbook
|
|
177
186
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
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.
|
|
181
|
-
|
|
182
|
-
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.
|
|
187
|
+
On **OpenClaw 2026.4.x**, the **Mnemospark Renewal Agent Runbook** is applied when you install or update mnemospark (including `npx mnemospark install`, `npx mnemospark update`, `openclaw plugins install`, and when the gateway loads the plugin): it ensures a dedicated agent (`mnemospark-renewal` by default) with `tools.deny: ["subagents"]` and `tools.exec.ask: "off"`, updates `~/.openclaw/exec-approvals.json` so `/usr/bin/node` is allowlisted for that agent, and runs `openclaw config validate`. OpenClaw restarts the gateway when a plugin is installed or updated; mnemospark does not call `openclaw gateway restart` itself. After a **successful upload**, mnemospark registers the monthly renewal cron only (`--no-deliver`, `--agent`, and a `Command: /usr/bin/node …/dist/cli.js cloud payment-settle --renewal …` message). Override paths with `MNEMOSPARK_CRON_AGENT_ID` and `MNEMOSPARK_CRON_NODE_BIN` if your system differs.
|
|
183
188
|
|
|
184
189
|
---
|
|
185
190
|
|
|
@@ -189,6 +194,7 @@ mnemospark is **open source**. If you want extra assurance, review the repositor
|
|
|
189
194
|
- **402 payment required**: expected in challenge flow; ensure client retries with payment authorization.
|
|
190
195
|
- **Upload/storage backend errors**: verify cloud permissions (e.g. bucket access + IAM role rights).
|
|
191
196
|
- **Command not recognized**: confirm plugin installed and gateway restarted.
|
|
197
|
+
- **Renewal cron / exec failures after upload**: ensure mnemospark was installed or updated through the normal path so the runbook ran (gateway load, `npx mnemospark install`, or `openclaw plugins install`). If the gateway never loaded the plugin, run install again or restart the gateway.
|
|
192
198
|
- **One-step operation correlation**: run `./skills/mnemospark/scripts/debug-operation.sh <operation-id>` (or omit ID to use latest).
|
|
193
199
|
|
|
194
200
|
---
|
package/dist/cli.js
CHANGED
|
@@ -4392,7 +4392,7 @@ async function ensureOpenClawRenewalPrerequisites(options = {}) {
|
|
|
4392
4392
|
parsed = JSON.parse(configRaw);
|
|
4393
4393
|
} catch {
|
|
4394
4394
|
throw new Error(
|
|
4395
|
-
`openclaw.json at ${configPath} is not valid JSON; fix or remove it before
|
|
4395
|
+
`openclaw.json at ${configPath} is not valid JSON; fix or remove it before applying renewal prerequisites.`
|
|
4396
4396
|
);
|
|
4397
4397
|
}
|
|
4398
4398
|
const agents = isRecord(parsed.agents) ? parsed.agents : {};
|
|
@@ -4424,13 +4424,6 @@ async function ensureOpenClawRenewalPrerequisites(options = {}) {
|
|
|
4424
4424
|
await writeFileAtomic(execPath, `${JSON.stringify(mergedExec, null, 2)}
|
|
4425
4425
|
`);
|
|
4426
4426
|
}
|
|
4427
|
-
const skipRestart = options.skipGatewayRestart ?? process.env.MNEMOSPARK_SKIP_GATEWAY_RESTART === "1";
|
|
4428
|
-
if (!skipRestart && (agentChanged || execChanged)) {
|
|
4429
|
-
try {
|
|
4430
|
-
await runOpenClawCli(["gateway", "restart", "--json"], homeDir);
|
|
4431
|
-
} catch {
|
|
4432
|
-
}
|
|
4433
|
-
}
|
|
4434
4427
|
}
|
|
4435
4428
|
|
|
4436
4429
|
// src/cloud-command.ts
|
|
@@ -5335,7 +5328,6 @@ async function removeStoragePaymentCronJob(cronId, adapter) {
|
|
|
5335
5328
|
return adapter.remove(cronId);
|
|
5336
5329
|
}
|
|
5337
5330
|
async function createStoragePaymentCronJob(upload, storagePrice, openClawCronAdapter, openClawHomeDir, nowDateFn = () => /* @__PURE__ */ new Date()) {
|
|
5338
|
-
await ensureOpenClawRenewalPrerequisites({ homeDir: openClawHomeDir });
|
|
5339
5331
|
const renewalFields = {
|
|
5340
5332
|
walletAddress: upload.addr,
|
|
5341
5333
|
objectId: upload.object_id,
|
|
@@ -7950,6 +7942,14 @@ async function promptOrRunOpenClawPluginInstall() {
|
|
|
7950
7942
|
});
|
|
7951
7943
|
if (exitCode === 0) {
|
|
7952
7944
|
await ensureMnemosparkInPluginsAllow();
|
|
7945
|
+
try {
|
|
7946
|
+
await ensureOpenClawRenewalPrerequisites();
|
|
7947
|
+
} catch (err) {
|
|
7948
|
+
console.warn(
|
|
7949
|
+
"[mnemospark] Renewal prerequisites:",
|
|
7950
|
+
err instanceof Error ? err.message : String(err)
|
|
7951
|
+
);
|
|
7952
|
+
}
|
|
7953
7953
|
} else {
|
|
7954
7954
|
console.log(
|
|
7955
7955
|
"\n[mnemospark] OpenClaw plugin install did not succeed. Run manually: openclaw plugins install mnemospark"
|
|
@@ -8049,6 +8049,14 @@ async function runUpdate() {
|
|
|
8049
8049
|
try {
|
|
8050
8050
|
execSync(`npm install mnemospark@${latest}`, { stdio: "inherit" });
|
|
8051
8051
|
console.log(`[mnemospark] Updated to ${latest}.`);
|
|
8052
|
+
try {
|
|
8053
|
+
await ensureOpenClawRenewalPrerequisites();
|
|
8054
|
+
} catch (err) {
|
|
8055
|
+
console.warn(
|
|
8056
|
+
"[mnemospark] Renewal prerequisites:",
|
|
8057
|
+
err instanceof Error ? err.message : String(err)
|
|
8058
|
+
);
|
|
8059
|
+
}
|
|
8052
8060
|
} catch {
|
|
8053
8061
|
console.log(
|
|
8054
8062
|
"[mnemospark] npm install failed. You can update manually: npm install mnemospark@latest"
|