@remnic/plugin-openclaw 9.63.3 → 9.63.5

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.
@@ -0,0 +1,16 @@
1
+ // src/plugin-id.ts
2
+ import { LEGACY_PLUGIN_ID, PLUGIN_ID } from "@remnic/core/plugin-id";
3
+ import { PLUGIN_ID as PLUGIN_ID2, LEGACY_PLUGIN_ID as LEGACY_PLUGIN_ID2 } from "@remnic/core/plugin-id";
4
+ import {
5
+ resolveRemnicPluginEntry
6
+ } from "@remnic/core/plugin-id";
7
+ var REMNIC_OPENCLAW_PLUGIN_ID = PLUGIN_ID;
8
+ var REMNIC_OPENCLAW_LEGACY_PLUGIN_ID = LEGACY_PLUGIN_ID;
9
+
10
+ export {
11
+ REMNIC_OPENCLAW_PLUGIN_ID,
12
+ REMNIC_OPENCLAW_LEGACY_PLUGIN_ID,
13
+ PLUGIN_ID2 as PLUGIN_ID,
14
+ LEGACY_PLUGIN_ID2 as LEGACY_PLUGIN_ID,
15
+ resolveRemnicPluginEntry
16
+ };
package/dist/index.js CHANGED
@@ -1,3 +1,10 @@
1
+ import {
2
+ LEGACY_PLUGIN_ID,
3
+ PLUGIN_ID,
4
+ REMNIC_OPENCLAW_LEGACY_PLUGIN_ID,
5
+ REMNIC_OPENCLAW_PLUGIN_ID,
6
+ resolveRemnicPluginEntry
7
+ } from "./chunk-64ONAJ63.js";
1
8
  import {
2
9
  createOpenClawSupportPassportModelRoute
3
10
  } from "./chunk-HDTN2ZKK.js";
@@ -4141,8 +4148,6 @@ function buildSessionCommandDescriptors(pluginId, runtime) {
4141
4148
  }
4142
4149
 
4143
4150
  // src/slot-validator.ts
4144
- var CANONICAL_REMNIC_MEMORY_SLOT_ID = "openclaw-remnic";
4145
- var LEGACY_REMNIC_MEMORY_SLOT_ID = "openclaw-engram";
4146
4151
  var MAX_SLOT_DISTANCE_INPUT_LENGTH = 256;
4147
4152
  function resolveMemorySlot(runtimeConfig) {
4148
4153
  if (!runtimeConfig || typeof runtimeConfig !== "object") return void 0;
@@ -4179,14 +4184,14 @@ function suggestLikelyRemnicSlot(pluginId, actualSlot) {
4179
4184
  if (actualSlot.length > MAX_SLOT_DISTANCE_INPUT_LENGTH) {
4180
4185
  return pluginId;
4181
4186
  }
4182
- if (actualSlot !== pluginId && (actualSlot === CANONICAL_REMNIC_MEMORY_SLOT_ID || actualSlot === LEGACY_REMNIC_MEMORY_SLOT_ID)) {
4187
+ if (actualSlot !== pluginId && (actualSlot === PLUGIN_ID || actualSlot === LEGACY_PLUGIN_ID)) {
4183
4188
  return pluginId;
4184
4189
  }
4185
4190
  const candidates = Array.from(
4186
4191
  /* @__PURE__ */ new Set([
4187
4192
  pluginId,
4188
- CANONICAL_REMNIC_MEMORY_SLOT_ID,
4189
- LEGACY_REMNIC_MEMORY_SLOT_ID
4193
+ PLUGIN_ID,
4194
+ LEGACY_PLUGIN_ID
4190
4195
  ])
4191
4196
  );
4192
4197
  let best = candidates[0] ?? pluginId;
@@ -5389,34 +5394,6 @@ async function processOpenClawFlushPlanFile(params) {
5389
5394
  return result;
5390
5395
  }
5391
5396
 
5392
- // src/plugin-id.ts
5393
- import { resolvePluginEntry } from "@remnic/core/plugin-entry-resolver";
5394
- var REMNIC_OPENCLAW_PLUGIN_ID = "openclaw-remnic";
5395
- var REMNIC_OPENCLAW_LEGACY_PLUGIN_ID = "openclaw-engram";
5396
- var REMNIC_OPENCLAW_PLUGIN_IDS = [
5397
- REMNIC_OPENCLAW_PLUGIN_ID,
5398
- REMNIC_OPENCLAW_LEGACY_PLUGIN_ID
5399
- ];
5400
- function getOpenClawPluginEntries(raw) {
5401
- const plugins = raw["plugins"] && typeof raw["plugins"] === "object" && !Array.isArray(raw["plugins"]) ? raw["plugins"] : void 0;
5402
- const entries = plugins && plugins["entries"] && typeof plugins["entries"] === "object" && !Array.isArray(plugins["entries"]) ? plugins["entries"] : void 0;
5403
- return entries;
5404
- }
5405
- function getOpenClawMemorySlotId(raw) {
5406
- const plugins = raw["plugins"] && typeof raw["plugins"] === "object" && !Array.isArray(raw["plugins"]) ? raw["plugins"] : void 0;
5407
- const slots = plugins && plugins["slots"] && typeof plugins["slots"] === "object" && !Array.isArray(plugins["slots"]) ? plugins["slots"] : void 0;
5408
- const slotId = slots?.["memory"];
5409
- return typeof slotId === "string" ? slotId : void 0;
5410
- }
5411
- function resolveRemnicOpenClawPluginEntry(raw, preferredId) {
5412
- return resolvePluginEntry(raw, {
5413
- candidateIds: REMNIC_OPENCLAW_PLUGIN_IDS,
5414
- preferredId,
5415
- getEntries: getOpenClawPluginEntries,
5416
- getSlotId: getOpenClawMemorySlotId
5417
- });
5418
- }
5419
-
5420
5397
  // src/delegate-runtime.ts
5421
5398
  import path8 from "path";
5422
5399
  import {
@@ -9293,7 +9270,7 @@ function loadPluginEntryFromFile(pluginId) {
9293
9270
  const configPath = resolveOpenClawConfigFilePath();
9294
9271
  const content = readTextFileNow(configPath);
9295
9272
  const config = JSON.parse(content);
9296
- return resolveRemnicOpenClawPluginEntry(config, pluginId);
9273
+ return resolveRemnicPluginEntry(config, pluginId);
9297
9274
  } catch (err) {
9298
9275
  logger_exports.log.warn(`Failed to load config from file: ${err}`);
9299
9276
  return void 0;
@@ -9318,7 +9295,7 @@ function loadRawConfigFromFile() {
9318
9295
  }
9319
9296
  }
9320
9297
  function readPluginHooksPolicy(apiConfig, pluginId) {
9321
- const apiEntry = resolveRemnicOpenClawPluginEntry(apiConfig, pluginId);
9298
+ const apiEntry = resolveRemnicPluginEntry(apiConfig, pluginId);
9322
9299
  const fromApi = apiEntry?.["hooks"];
9323
9300
  if (fromApi && typeof fromApi === "object") return fromApi;
9324
9301
  return loadPluginEntryFromFile(pluginId)?.["hooks"];
@@ -1,4 +1,5 @@
1
- declare const REMNIC_OPENCLAW_PLUGIN_ID = "openclaw-remnic";
1
+ declare const REMNIC_OPENCLAW_PLUGIN_ID: "openclaw-remnic";
2
+
2
3
  interface OpenclawCommandOptions {
3
4
  timeoutMs: number;
4
5
  }
@@ -1,9 +1,11 @@
1
+ import {
2
+ REMNIC_OPENCLAW_PLUGIN_ID
3
+ } from "./chunk-64ONAJ63.js";
1
4
  import "./chunk-I2KLQ2HA.js";
2
5
 
3
6
  // src/managed-upgrade.ts
4
7
  import fs from "fs";
5
8
  import path from "path";
6
- var REMNIC_OPENCLAW_PLUGIN_ID = "openclaw-remnic";
7
9
  var OPENCLAW_EXEC_TIMEOUT_MS = 12e4;
8
10
  var OPENCLAW_PLUGIN_PACKAGE = "@remnic/plugin-openclaw";
9
11
  var DIST_TAG_SELECTOR = /^[A-Za-z][0-9A-Za-z._-]*$/;