openclaw-openviking-setup-helper 0.2.16-dev.1 → 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.
- package/install.js +8 -8
- 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
|
|
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
|
-
|
|
376
|
+
remoteAgentPrefix = await question(tr("Agent Prefix (optional)", "Agent Prefix(可选)"), remoteAgentPrefix);
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
async function checkOpenClaw() {
|
|
@@ -875,8 +875,8 @@ function extractRuntimeConfigFromPluginEntry(entryConfig) {
|
|
|
875
875
|
if (typeof entryConfig.apiKey === "string" && entryConfig.apiKey.trim()) {
|
|
876
876
|
runtime.apiKey = entryConfig.apiKey;
|
|
877
877
|
}
|
|
878
|
-
if (typeof entryConfig.
|
|
879
|
-
runtime.
|
|
878
|
+
if (typeof entryConfig.agent_prefix === "string" && entryConfig.agent_prefix.trim()) {
|
|
879
|
+
runtime.agent_prefix = entryConfig.agent_prefix.trim();
|
|
880
880
|
}
|
|
881
881
|
return runtime;
|
|
882
882
|
}
|
|
@@ -1171,7 +1171,7 @@ async function prepareStrongPluginUpgrade() {
|
|
|
1171
1171
|
);
|
|
1172
1172
|
remoteBaseUrl = upgradeRuntimeConfig.baseUrl || remoteBaseUrl;
|
|
1173
1173
|
remoteApiKey = upgradeRuntimeConfig.apiKey || "";
|
|
1174
|
-
|
|
1174
|
+
remoteAgentPrefix = upgradeRuntimeConfig.agent_prefix || "";
|
|
1175
1175
|
info(tr(`Upgrade runtime mode: ${selectedMode} (remote OpenViking server)`, `升级运行模式: ${selectedMode}(远程 OpenViking 服务)`));
|
|
1176
1176
|
|
|
1177
1177
|
info(tr(`Upgrade path: ${fromVersion} -> ${toVersion}`, `升级路径: ${fromVersion} -> ${toVersion}`));
|
|
@@ -1450,15 +1450,15 @@ async function configureOpenClawPlugin({
|
|
|
1450
1450
|
const effectiveRuntimeConfig = runtimeConfig || {
|
|
1451
1451
|
baseUrl: remoteBaseUrl,
|
|
1452
1452
|
apiKey: remoteApiKey,
|
|
1453
|
-
|
|
1453
|
+
agent_prefix: remoteAgentPrefix,
|
|
1454
1454
|
};
|
|
1455
1455
|
|
|
1456
1456
|
await oc(["config", "set", `plugins.entries.${pluginId}.config.baseUrl`, effectiveRuntimeConfig.baseUrl || remoteBaseUrl]);
|
|
1457
1457
|
if (effectiveRuntimeConfig.apiKey) {
|
|
1458
1458
|
await oc(["config", "set", `plugins.entries.${pluginId}.config.apiKey`, effectiveRuntimeConfig.apiKey]);
|
|
1459
1459
|
}
|
|
1460
|
-
if (effectiveRuntimeConfig.
|
|
1461
|
-
await oc(["config", "set", `plugins.entries.${pluginId}.config.
|
|
1460
|
+
if (effectiveRuntimeConfig.agent_prefix) {
|
|
1461
|
+
await oc(["config", "set", `plugins.entries.${pluginId}.config.agent_prefix`, effectiveRuntimeConfig.agent_prefix]);
|
|
1462
1462
|
}
|
|
1463
1463
|
|
|
1464
1464
|
// Legacy (memory) plugins need explicit targetUri/autoRecall/autoCapture (new version has defaults in config.ts)
|