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/dist/index.d.ts
CHANGED
|
@@ -744,14 +744,13 @@ type EnsureOpenClawRenewalPrerequisitesOptions = {
|
|
|
744
744
|
homeDir?: string;
|
|
745
745
|
/** Skip all OpenClaw mutations (tests). */
|
|
746
746
|
disabled?: boolean;
|
|
747
|
-
/** Skip gateway restart (tests). */
|
|
748
|
-
skipGatewayRestart?: boolean;
|
|
749
747
|
};
|
|
750
748
|
/**
|
|
751
|
-
* Apply the Mnemospark Renewal Agent Runbook
|
|
749
|
+
* Apply the Mnemospark Renewal Agent Runbook (install/update / plugin load):
|
|
752
750
|
* - `agents.list` entry via `openclaw config set` + `openclaw config validate`
|
|
753
751
|
* - `~/.openclaw/exec-approvals.json` merge for the node binary
|
|
754
|
-
*
|
|
752
|
+
*
|
|
753
|
+
* Gateway restart is not performed here; OpenClaw restarts the gateway when a plugin is installed or updated.
|
|
755
754
|
*/
|
|
756
755
|
declare function ensureOpenClawRenewalPrerequisites(options?: EnsureOpenClawRenewalPrerequisitesOptions): Promise<void>;
|
|
757
756
|
|
package/dist/index.js
CHANGED
|
@@ -4437,7 +4437,7 @@ async function ensureOpenClawRenewalPrerequisites(options = {}) {
|
|
|
4437
4437
|
parsed = JSON.parse(configRaw);
|
|
4438
4438
|
} catch {
|
|
4439
4439
|
throw new Error(
|
|
4440
|
-
`openclaw.json at ${configPath} is not valid JSON; fix or remove it before
|
|
4440
|
+
`openclaw.json at ${configPath} is not valid JSON; fix or remove it before applying renewal prerequisites.`
|
|
4441
4441
|
);
|
|
4442
4442
|
}
|
|
4443
4443
|
const agents = isRecord(parsed.agents) ? parsed.agents : {};
|
|
@@ -4469,13 +4469,6 @@ async function ensureOpenClawRenewalPrerequisites(options = {}) {
|
|
|
4469
4469
|
await writeFileAtomic(execPath, `${JSON.stringify(mergedExec, null, 2)}
|
|
4470
4470
|
`);
|
|
4471
4471
|
}
|
|
4472
|
-
const skipRestart = options.skipGatewayRestart ?? process.env.MNEMOSPARK_SKIP_GATEWAY_RESTART === "1";
|
|
4473
|
-
if (!skipRestart && (agentChanged || execChanged)) {
|
|
4474
|
-
try {
|
|
4475
|
-
await runOpenClawCli(["gateway", "restart", "--json"], homeDir);
|
|
4476
|
-
} catch {
|
|
4477
|
-
}
|
|
4478
|
-
}
|
|
4479
4472
|
}
|
|
4480
4473
|
|
|
4481
4474
|
// src/cloud-command.ts
|
|
@@ -5380,7 +5373,6 @@ async function removeStoragePaymentCronJob(cronId, adapter) {
|
|
|
5380
5373
|
return adapter.remove(cronId);
|
|
5381
5374
|
}
|
|
5382
5375
|
async function createStoragePaymentCronJob(upload, storagePrice, openClawCronAdapter, openClawHomeDir, nowDateFn = () => /* @__PURE__ */ new Date()) {
|
|
5383
|
-
await ensureOpenClawRenewalPrerequisites({ homeDir: openClawHomeDir });
|
|
5384
5376
|
const renewalFields = {
|
|
5385
5377
|
walletAddress: upload.addr,
|
|
5386
5378
|
objectId: upload.object_id,
|
|
@@ -7935,6 +7927,13 @@ var plugin = {
|
|
|
7935
7927
|
if (isCompletionMode()) {
|
|
7936
7928
|
return;
|
|
7937
7929
|
}
|
|
7930
|
+
try {
|
|
7931
|
+
await ensureOpenClawRenewalPrerequisites();
|
|
7932
|
+
} catch (err) {
|
|
7933
|
+
api.logger.warn(
|
|
7934
|
+
`mnemospark renewal prerequisites: ${err instanceof Error ? err.message : String(err)}`
|
|
7935
|
+
);
|
|
7936
|
+
}
|
|
7938
7937
|
try {
|
|
7939
7938
|
api.registerCommand({
|
|
7940
7939
|
name: "mnemospark",
|