@context-use/openclaw-memory 0.1.0-beta.32 → 0.1.0-beta.523
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/bootstrap.js +50 -26
- package/dist/index.js +949 -97
- package/dist/remove-worker.js +1299 -0
- package/dist/setup-prompt.js +7 -3
- package/dist/setup-runtime.js +16 -0
- package/dist/setup.js +663 -175
- package/openclaw.plugin.json +3 -1
- package/package.json +1 -1
package/dist/setup-prompt.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "@context-use/openclaw-memory",
|
|
4
|
-
version: "0.1.0-beta.
|
|
4
|
+
version: "0.1.0-beta.523",
|
|
5
5
|
description: "Context Use as OpenClaw's sole durable personal memory",
|
|
6
6
|
type: "module",
|
|
7
7
|
license: "MIT",
|
|
@@ -82,9 +82,12 @@ ${openclawConnectCommand(serverUrl)}
|
|
|
82
82
|
|
|
83
83
|
Follow the plugin's instructions: give me the authorization URL and ask me to return the final localhost redirect URL. When I send it back, finish connecting. Let the plugin manage configuration and gateway refresh.
|
|
84
84
|
|
|
85
|
-
After authorization,
|
|
85
|
+
After authorization, tell me to start a new session with /new so the gateway can finish applying the memory settings. Verify openclaw context-use status in that new session before confirming that memory is active.`;
|
|
86
|
+
}
|
|
87
|
+
var OPENCLAW_REMOVAL_PROMPT = `Remove the Context Use memory plugin using ${OPENCLAW_INSTALL_COMMAND} remove in this OpenClaw profile. This also works if authorization was never completed or the plugin is disabled. Let the plugin restore its configuration changes, clear its credentials and refresh the gateway. Preserve my remote memories and conversation history. Removal runs separately: end this turn once it is queued, then check ${OPENCLAW_INSTALL_COMMAND} status in a new turn. Do not poll from the requesting turn, schedule retries, stop the gateway, or reinstall to finish removal. Verify that a fresh conversation uses the restored memory provider.`;
|
|
88
|
+
function openclawReconnectPrompt(serverUrl) {
|
|
89
|
+
return `Reauthorize my Context Use memory plugin for ${serverUrl}. Run ${OPENCLAW_INSTALL_COMMAND} reconnect '${serverUrl.replaceAll("'", "'\\''")}' in the same OpenClaw profile. Give me the new authorization URL and ask me to return the final localhost redirect URL. Pass that URL to ${OPENCLAW_INSTALL_COMMAND} authorize through standard input. Let the plugin manage configuration and gateway refresh. After authorization, tell me to start a new session with /new, then verify status in that new session before confirming that memory is active.`;
|
|
86
90
|
}
|
|
87
|
-
var OPENCLAW_REMOVAL_PROMPT = `Remove the Context Use memory plugin using ${OPENCLAW_INSTALL_COMMAND} remove in this OpenClaw profile. This also works if authorization was never completed or the plugin is disabled. Let the plugin restore its configuration changes, clear its credentials and refresh the gateway. Preserve my remote memories and conversation history. Verify that a fresh conversation uses the restored memory provider.`;
|
|
88
91
|
export {
|
|
89
92
|
OPENCLAW_INSTALL_COMMAND,
|
|
90
93
|
OPENCLAW_NPM_URL,
|
|
@@ -92,5 +95,6 @@ export {
|
|
|
92
95
|
OPENCLAW_REMOVAL_PROMPT,
|
|
93
96
|
OPENCLAW_REQUIREMENT,
|
|
94
97
|
openclawConnectCommand,
|
|
98
|
+
openclawReconnectPrompt,
|
|
95
99
|
openclawSetupPrompt
|
|
96
100
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/setup-runtime.ts
|
|
2
|
+
import { registerHooks } from "node:module";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
var hostSdkAnchor = process.env.CONTEXT_USE_OPENCLAW_SDK;
|
|
5
|
+
if (!hostSdkAnchor) {
|
|
6
|
+
throw new Error("OpenClaw SDK location was not provided.");
|
|
7
|
+
}
|
|
8
|
+
var parentURL = pathToFileURL(hostSdkAnchor).href;
|
|
9
|
+
registerHooks({
|
|
10
|
+
resolve(specifier, context, nextResolve) {
|
|
11
|
+
if (specifier.startsWith("openclaw/plugin-sdk/")) {
|
|
12
|
+
return nextResolve(specifier, { ...context, parentURL });
|
|
13
|
+
}
|
|
14
|
+
return nextResolve(specifier, context);
|
|
15
|
+
}
|
|
16
|
+
});
|