openclaw-openviking-setup-helper 0.2.16-dev.0 → 0.2.16-dev.2

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.
Files changed (2) hide show
  1. package/install.js +11 -14
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -100,7 +100,7 @@ let showCurrentVersion = false;
100
100
  const selectedMode = "remote";
101
101
  let remoteBaseUrl = "http://127.0.0.1:1933";
102
102
  let remoteApiKey = "";
103
- let remoteAgentId = "";
103
+ let remoteAgentPrefix = "";
104
104
  let upgradeRuntimeConfig = null;
105
105
  let installedUpgradeState = null;
106
106
  let upgradeAudit = null;
@@ -373,7 +373,7 @@ async function collectRemoteConfig() {
373
373
  if (installYes) return;
374
374
  remoteBaseUrl = await question(tr("OpenViking server URL", "OpenViking 服务器地址"), remoteBaseUrl);
375
375
  remoteApiKey = await question(tr("API Key (optional)", "API Key(可选)"), remoteApiKey);
376
- remoteAgentId = await question(tr("Agent ID (optional)", "Agent ID(可选)"), remoteAgentId);
376
+ remoteAgentPrefix = await question(tr("Agent Prefix (optional)", "Agent Prefix(可选)"), remoteAgentPrefix);
377
377
  }
378
378
 
379
379
  async function checkOpenClaw() {
@@ -867,17 +867,16 @@ function formatTargetVersionLabel() {
867
867
 
868
868
  function extractRuntimeConfigFromPluginEntry(entryConfig) {
869
869
  if (!entryConfig || typeof entryConfig !== "object") return null;
870
- if (entryConfig.mode != null && entryConfig.mode !== "remote") return null;
871
870
 
872
- const runtime = { mode: "remote" };
871
+ const runtime = {};
873
872
  if (typeof entryConfig.baseUrl === "string" && entryConfig.baseUrl.trim()) {
874
873
  runtime.baseUrl = entryConfig.baseUrl.trim();
875
874
  }
876
875
  if (typeof entryConfig.apiKey === "string" && entryConfig.apiKey.trim()) {
877
876
  runtime.apiKey = entryConfig.apiKey;
878
877
  }
879
- if (typeof entryConfig.agentId === "string" && entryConfig.agentId.trim()) {
880
- runtime.agentId = entryConfig.agentId.trim();
878
+ if (typeof entryConfig.agent_prefix === "string" && entryConfig.agent_prefix.trim()) {
879
+ runtime.agent_prefix = entryConfig.agent_prefix.trim();
881
880
  }
882
881
  return runtime;
883
882
  }
@@ -1030,10 +1029,10 @@ function prepareUpgradeRuntimeConfig(installedState) {
1030
1029
  }
1031
1030
 
1032
1031
  if (!runtime) {
1033
- runtime = { mode: "remote" };
1032
+ runtime = {};
1034
1033
  }
1035
1034
 
1036
- runtime.mode = "remote";
1035
+ delete runtime.mode;
1037
1036
  runtime.baseUrl = runtime.baseUrl || remoteBaseUrl;
1038
1037
  return runtime;
1039
1038
  }
@@ -1172,7 +1171,7 @@ async function prepareStrongPluginUpgrade() {
1172
1171
  );
1173
1172
  remoteBaseUrl = upgradeRuntimeConfig.baseUrl || remoteBaseUrl;
1174
1173
  remoteApiKey = upgradeRuntimeConfig.apiKey || "";
1175
- remoteAgentId = upgradeRuntimeConfig.agentId || "";
1174
+ remoteAgentPrefix = upgradeRuntimeConfig.agent_prefix || "";
1176
1175
  info(tr(`Upgrade runtime mode: ${selectedMode} (remote OpenViking server)`, `升级运行模式: ${selectedMode}(远程 OpenViking 服务)`));
1177
1176
 
1178
1177
  info(tr(`Upgrade path: ${fromVersion} -> ${toVersion}`, `升级路径: ${fromVersion} -> ${toVersion}`));
@@ -1449,19 +1448,17 @@ async function configureOpenClawPlugin({
1449
1448
  }
1450
1449
 
1451
1450
  const effectiveRuntimeConfig = runtimeConfig || {
1452
- mode: "remote",
1453
1451
  baseUrl: remoteBaseUrl,
1454
1452
  apiKey: remoteApiKey,
1455
- agentId: remoteAgentId,
1453
+ agent_prefix: remoteAgentPrefix,
1456
1454
  };
1457
1455
 
1458
- await oc(["config", "set", `plugins.entries.${pluginId}.config.mode`, "remote"]);
1459
1456
  await oc(["config", "set", `plugins.entries.${pluginId}.config.baseUrl`, effectiveRuntimeConfig.baseUrl || remoteBaseUrl]);
1460
1457
  if (effectiveRuntimeConfig.apiKey) {
1461
1458
  await oc(["config", "set", `plugins.entries.${pluginId}.config.apiKey`, effectiveRuntimeConfig.apiKey]);
1462
1459
  }
1463
- if (effectiveRuntimeConfig.agentId) {
1464
- await oc(["config", "set", `plugins.entries.${pluginId}.config.agentId`, effectiveRuntimeConfig.agentId]);
1460
+ if (effectiveRuntimeConfig.agent_prefix) {
1461
+ await oc(["config", "set", `plugins.entries.${pluginId}.config.agent_prefix`, effectiveRuntimeConfig.agent_prefix]);
1465
1462
  }
1466
1463
 
1467
1464
  // Legacy (memory) plugins need explicit targetUri/autoRecall/autoCapture (new version has defaults in config.ts)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-openviking-setup-helper",
3
- "version": "0.2.16-dev.0",
3
+ "version": "0.2.16-dev.2",
4
4
  "description": "Setup helper for installing OpenViking memory plugin into OpenClaw",
5
5
  "type": "module",
6
6
  "bin": {