@context-use/openclaw-memory 0.1.0-beta.30 → 0.1.0-beta.63

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 CHANGED
@@ -2,7 +2,7 @@
2
2
  // package.json
3
3
  var package_default = {
4
4
  name: "@context-use/openclaw-memory",
5
- version: "0.1.0-beta.30",
5
+ version: "0.1.0-beta.63",
6
6
  description: "Context Use as OpenClaw's sole durable personal memory",
7
7
  type: "module",
8
8
  license: "MIT",
@@ -88,7 +88,6 @@ After authorization, verify openclaw context-use status. If connected and authen
88
88
  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.`;
89
89
 
90
90
  // src/bootstrap.ts
91
- import { spawn } from "node:child_process";
92
91
  import { join as join2 } from "node:path";
93
92
  import { satisfies as satisfies2 } from "semver";
94
93
 
@@ -107,7 +106,10 @@ var OPENCLAW_VERSION_RANGE = package_default.peerDependencies.openclaw;
107
106
  var CALLBACK_URL = "http://127.0.0.1:49187/context-use/callback";
108
107
  var REQUEST_TIMEOUT_MS = 30000;
109
108
  var AUTHORIZATION_TIMEOUT_MS = 600000;
109
+ var AUTHORIZATION_SCOPE = "mcp offline_access";
110
110
  var toolName = (name) => `context_use_${name}`;
111
+ var FINISH_LEARNING_TOOL = toolName("finish_learning");
112
+ var SAVE_ATTACHMENT_TOOL = toolName("save_learning_attachment");
111
113
  var PluginConfigSchema = z.strictObject({
112
114
  agentId: z.string().regex(/^[a-z0-9][a-z0-9_-]*$/),
113
115
  serverUrl: z.url()
@@ -154,10 +156,17 @@ import { resolve } from "node:path";
154
156
  import { z as z2 } from "zod";
155
157
 
156
158
  // src/host-command.ts
157
- import { execFile } from "node:child_process";
159
+ import { execFile, spawn } from "node:child_process";
158
160
  import { promisify } from "node:util";
159
161
  var execute = promisify(execFile);
160
162
  var HOST_TIMEOUT_MS = 120000;
163
+ async function runSetupCommand(input) {
164
+ const child = spawn(process.execPath, [input.script, ...input.args], { stdio: "inherit" });
165
+ return await new Promise((resolve, reject) => {
166
+ child.once("error", reject);
167
+ child.once("exit", (code) => resolve(code ?? 1));
168
+ });
169
+ }
161
170
  async function openclaw(args) {
162
171
  const result = await execute("openclaw", args, {
163
172
  timeout: HOST_TIMEOUT_MS,
@@ -291,12 +300,9 @@ async function main(args) {
291
300
  if (!installed) {
292
301
  throw new ConnectionError("Context Use is not installed. Run connect first.");
293
302
  }
294
- const child = spawn(process.execPath, [join2(installed.rootDir, "dist/setup.js"), ...args], {
295
- stdio: "inherit"
296
- });
297
- process.exitCode = await new Promise((resolve3, reject) => {
298
- child.once("error", reject);
299
- child.once("exit", (code) => resolve3(code ?? 1));
303
+ process.exitCode = await runSetupCommand({
304
+ script: join2(installed.rootDir, "dist/setup.js"),
305
+ args
300
306
  });
301
307
  }
302
308
  try {