@openviking/openclaw-plugin 2026.8.6 → 2026.8.7

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-ZH.md CHANGED
@@ -238,7 +238,7 @@ openclaw openviking setup --base-url <OPENVIKING_URL> --api-key <API_KEY> --peer
238
238
  | --- | --- | --- |
239
239
  | `env` | `{ "source": "env", "id": "OPENVIKING_API_KEY" }` | 启动时读取同名环境变量。 |
240
240
  | `file` | `{ "source": "file", "id": "/etc/secrets/openviking.key" }` | 以 UTF-8 读取并去除首尾空白;`~` 可展开,适配 Kubernetes `secretKeyRef` 卷挂载、0600 权限文件。 |
241
- | `exec` | `{ "source": "exec", "provider": "op", "id": "op://vault/openviking/credential" }` | 运行 `<provider> <id>`,去除 stdout 首尾空白(1Password `op`、Vault、gopass 等均符合此形态)。 |
241
+ | `exec` | 打包版插件不支持(应用市场安装扫描会拦截子进程执行) | 改用命令包一层环境变量:`OPENVIKING_API_KEY=$(op read op://vault/openviking/credential)`,然后配 `env`。 |
242
242
 
243
243
  仍可使用纯字符串形式(含 `${ENV_VAR}` 插值)作为向后兼容路径;此时请限制文件权限或通过受控 Secret 卷提供,并在修改后重启 Gateway、容器或 Pod。
244
244
 
package/INSTALL.md CHANGED
@@ -182,7 +182,7 @@ If the `openclaw` CLI cannot run inside the container, merge the following field
182
182
  | --- | --- | --- |
183
183
  | `env` | `{ "source": "env", "id": "OPENVIKING_API_KEY" }` | Reads the named env var at plugin load time. |
184
184
  | `file` | `{ "source": "file", "id": "/etc/secrets/openviking.key" }` | Reads UTF-8, trims whitespace. `~` is expanded; ideal for Kubernetes `secretKeyRef` volumes and 0600-managed files. |
185
- | `exec` | `{ "source": "exec", "provider": "op", "id": "op://vault/openviking/credential" }` | Runs `<provider> <id>` and trims stdout (1Password `op`, Vault, gopass, etc. all match this shape). |
185
+ | `exec` | not supported in the packaged plugin (marketplace install scanners block subprocess execution) | Wrap the CLI instead: `OPENVIKING_API_KEY=$(op read op://vault/openviking/credential)` and use `env`. |
186
186
 
187
187
  A plain `string` (including `${ENV_VAR}` interpolation) is still accepted, but only as a backward-compatibility path; in that case, restrict file permissions or provide the file through a managed Secret volume, then restart the Gateway, container, or Pod.
188
188
 
package/config.ts CHANGED
@@ -16,11 +16,11 @@ import { getEnv } from "./runtime-utils.js";
16
16
  * leading/trailing whitespace trimmed — convenient for
17
17
  * Kubernetes `secretKeyRef` mount volumes and
18
18
  * file-permission-only deployments.
19
- * source: "exec" -> delegate to host `openclaw` secret resolver when the
20
- * runtime exposes it; today the plugin performs a
21
- * best-effort `provider + id` CLI exec call so that
22
- * 1Password / Vault / gopass users can share OpenViking
23
- * credentials with their other providers.
19
+ * source: "exec" -> NOT supported in the packaged plugin. Marketplace
20
+ * install scanners (OpenClaw/ArkClaw) block any plugin
21
+ * whose shipped code can spawn subprocesses, so the exec
22
+ * resolver was removed from this build; configuring it
23
+ * fails with a clear error pointing at env/file instead.
24
24
  */
25
25
  export type OpenVikingSecretRef =
26
26
  | { source: "env"; id: string }
@@ -232,13 +232,10 @@ function resolvePeerPrefix(configured: unknown): string {
232
232
  * Missing / unreadable files propagate the original node error with an
233
233
  * error prefix that names the OpenViking field, so the user knows which
234
234
  * secretRef failed to load.
235
- * * `exec`: shells out `<provider> <id>`. Providers commonly expose this
236
- * shape (1Password CLI, gopass, HashiCorp Vault), which matches how
237
- * OpenClaw's own `@transmitt0r/openclaw-plugin-onepassword` provider
238
- * resolves `{source:"exec", provider:"onepassword", id:"..."}`. Exec is
239
- * best-effort; failures surface with an error prefix so users can
240
- * distinguish `provider not installed` from `provider configured but id
241
- * missing`.
235
+ * * `exec`: rejected with a "not supported" error. The subprocess-based
236
+ * resolver was removed because marketplace install scanners block plugins
237
+ * whose shipped code can spawn processes; wrap the secret-manager CLI
238
+ * output into an env var or file instead (`OPENVIKING_API_KEY=$(op ...)`).
242
239
  */
243
240
  function resolveSecret(
244
241
  value: string | OpenVikingSecretRef | undefined | null,
@@ -249,7 +246,7 @@ function resolveSecret(
249
246
  if (!value || typeof value !== "object") {
250
247
  throw new Error(
251
248
  `OpenViking ${label} must be a plain string or a SecretRef object ` +
252
- `({source:"env"|"file"|"exec", id})`,
249
+ `({source:"env"|"file", id})`,
253
250
  );
254
251
  }
255
252
  const obj = value as Record<string, unknown>;
@@ -280,39 +277,18 @@ function resolveSecret(
280
277
  }
281
278
  }
282
279
  case "exec": {
283
- const provider = typeof (obj as Record<string, unknown>).provider === "string"
284
- ? (obj as Record<string, unknown>).provider as string
285
- : "";
286
- if (!provider) {
287
- throw new Error(
288
- `OpenViking ${label} SecretRef exec source requires a "provider" field naming the secret-manager CLI on PATH`,
289
- );
290
- }
291
- try {
292
- // Avoid top-level `import "node:child_process"` — this branch is rare
293
- // and keeping the require lazy makes startup marginally faster for
294
- // the 95% of users who pick env/file.
295
- // eslint-disable-next-line @typescript-eslint/no-var-requires
296
- const { execFileSync } = require("node:child_process") as typeof import("node:child_process");
297
- const out = execFileSync(provider, [id], {
298
- encoding: "utf8",
299
- stdio: ["ignore", "pipe", "pipe"],
300
- timeout: 15_000,
301
- env: process.env,
302
- }) as string;
303
- return out.trim();
304
- } catch (err) {
305
- const msg = err instanceof Error ? err.message : String(err);
306
- throw new Error(
307
- `OpenViking ${label} SecretRef exec source: provider "${provider}" failed for id "${id}" (${msg})`,
308
- );
309
- }
280
+ throw new Error(
281
+ `OpenViking ${label} SecretRef exec source is not supported in the packaged plugin ` +
282
+ `(marketplace install scanners block subprocess execution). Export the secret to an ` +
283
+ `environment variable ({source:"env"}) or a file ({source:"file"}) instead, e.g. ` +
284
+ `OPENVIKING_API_KEY=$(op read ${id}).`,
285
+ );
310
286
  }
311
287
  default:
312
288
  throw new Error(
313
289
  `OpenViking ${label} SecretRef has unknown source "${String(
314
290
  (obj as Record<string, unknown>).source,
315
- )}". Supported: "env" | "file" | "exec".`,
291
+ )}". Supported: "env" | "file".`,
316
292
  );
317
293
  }
318
294
  }
@@ -816,7 +792,7 @@ export const memoryOpenVikingConfigSchema = {
816
792
  placeholder: "${OPENVIKING_API_KEY}",
817
793
  help:
818
794
  "Optional API key for OpenViking server. Accepts a plain string, " +
819
- "${ENV_VAR} interpolation, or a SecretRef object ({source: env/file/exec, id}). " +
795
+ "${ENV_VAR} interpolation, or a SecretRef object ({source: env/file, id}). " +
820
796
  "Prefer the SecretRef shapes so the key never sits as plaintext in openclaw.json.",
821
797
  },
822
798
  headers: {
package/dist/config.js CHANGED
@@ -94,13 +94,10 @@ function resolvePeerPrefix(configured) {
94
94
  * Missing / unreadable files propagate the original node error with an
95
95
  * error prefix that names the OpenViking field, so the user knows which
96
96
  * secretRef failed to load.
97
- * * `exec`: shells out `<provider> <id>`. Providers commonly expose this
98
- * shape (1Password CLI, gopass, HashiCorp Vault), which matches how
99
- * OpenClaw's own `@transmitt0r/openclaw-plugin-onepassword` provider
100
- * resolves `{source:"exec", provider:"onepassword", id:"..."}`. Exec is
101
- * best-effort; failures surface with an error prefix so users can
102
- * distinguish `provider not installed` from `provider configured but id
103
- * missing`.
97
+ * * `exec`: rejected with a "not supported" error. The subprocess-based
98
+ * resolver was removed because marketplace install scanners block plugins
99
+ * whose shipped code can spawn processes; wrap the secret-manager CLI
100
+ * output into an env var or file instead (`OPENVIKING_API_KEY=$(op ...)`).
104
101
  */
105
102
  function resolveSecret(value, label) {
106
103
  if (value === undefined || value === null)
@@ -109,7 +106,7 @@ function resolveSecret(value, label) {
109
106
  return value;
110
107
  if (!value || typeof value !== "object") {
111
108
  throw new Error(`OpenViking ${label} must be a plain string or a SecretRef object ` +
112
- `({source:"env"|"file"|"exec", id})`);
109
+ `({source:"env"|"file", id})`);
113
110
  }
114
111
  const obj = value;
115
112
  if (typeof obj.id !== "string" || !obj.id) {
@@ -136,33 +133,13 @@ function resolveSecret(value, label) {
136
133
  }
137
134
  }
138
135
  case "exec": {
139
- const provider = typeof obj.provider === "string"
140
- ? obj.provider
141
- : "";
142
- if (!provider) {
143
- throw new Error(`OpenViking ${label} SecretRef exec source requires a "provider" field naming the secret-manager CLI on PATH`);
144
- }
145
- try {
146
- // Avoid top-level `import "node:child_process"` — this branch is rare
147
- // and keeping the require lazy makes startup marginally faster for
148
- // the 95% of users who pick env/file.
149
- // eslint-disable-next-line @typescript-eslint/no-var-requires
150
- const { execFileSync } = require("node:child_process");
151
- const out = execFileSync(provider, [id], {
152
- encoding: "utf8",
153
- stdio: ["ignore", "pipe", "pipe"],
154
- timeout: 15_000,
155
- env: process.env,
156
- });
157
- return out.trim();
158
- }
159
- catch (err) {
160
- const msg = err instanceof Error ? err.message : String(err);
161
- throw new Error(`OpenViking ${label} SecretRef exec source: provider "${provider}" failed for id "${id}" (${msg})`);
162
- }
136
+ throw new Error(`OpenViking ${label} SecretRef exec source is not supported in the packaged plugin ` +
137
+ `(marketplace install scanners block subprocess execution). Export the secret to an ` +
138
+ `environment variable ({source:"env"}) or a file ({source:"file"}) instead, e.g. ` +
139
+ `OPENVIKING_API_KEY=$(op read ${id}).`);
163
140
  }
164
141
  default:
165
- throw new Error(`OpenViking ${label} SecretRef has unknown source "${String(obj.source)}". Supported: "env" | "file" | "exec".`);
142
+ throw new Error(`OpenViking ${label} SecretRef has unknown source "${String(obj.source)}". Supported: "env" | "file".`);
166
143
  }
167
144
  }
168
145
  function resolvePeerRole(configured) {
@@ -519,7 +496,7 @@ export const memoryOpenVikingConfigSchema = {
519
496
  sensitive: true,
520
497
  placeholder: "${OPENVIKING_API_KEY}",
521
498
  help: "Optional API key for OpenViking server. Accepts a plain string, " +
522
- "${ENV_VAR} interpolation, or a SecretRef object ({source: env/file/exec, id}). " +
499
+ "${ENV_VAR} interpolation, or a SecretRef object ({source: env/file, id}). " +
523
500
  "Prefer the SecretRef shapes so the key never sits as plaintext in openclaw.json.",
524
501
  },
525
502
  headers: {
@@ -100,7 +100,7 @@
100
100
  "label": "OpenViking API Key",
101
101
  "sensitive": true,
102
102
  "placeholder": "${OPENVIKING_API_KEY}",
103
- "help": "Optional API key for OpenViking server. Accepts a plain string, ${ENV_VAR} interpolation, or a SecretRef object ({source: env/file/exec, id}). Prefer a SecretRef so the key is never stored as plaintext in openclaw.json."
103
+ "help": "Optional API key for OpenViking server. Accepts a plain string, ${ENV_VAR} interpolation, or a SecretRef object ({source: env/file, id}). Prefer a SecretRef so the key is never stored as plaintext in openclaw.json."
104
104
  },
105
105
  "headers": {
106
106
  "label": "Headers",
@@ -320,18 +320,6 @@
320
320
  "source": { "type": "string", "const": "file" },
321
321
  "id": { "type": "string", "description": "Absolute file path or ~/relative path. Example: /etc/secrets/openviking.key." }
322
322
  }
323
- },
324
- {
325
- "type": "object",
326
- "title": "SecretRef (exec)",
327
- "description": "Read the API key by shelling out to a secret-manager CLI. Matches the shape used by OpenClaw's core provider configs so 1Password, HashiCorp Vault, gopass, etc. can manage the OpenViking key alongside LLM/TTS/MCP credentials.",
328
- "additionalProperties": false,
329
- "required": ["source", "provider", "id"],
330
- "properties": {
331
- "source": { "type": "string", "const": "exec" },
332
- "provider": { "type": "string", "description": "CLI binary name on PATH. Examples: op, vault, gopass." },
333
- "id": { "type": "string", "description": "Argument passed to the provider CLI to select the specific secret, e.g. 'vault kv get -field=key secret/openviking' in plain-arg form; this implementation passes id as a single arg." }
334
- }
335
323
  }
336
324
  ]
337
325
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openviking/openclaw-plugin",
3
- "version": "2026.8.6",
3
+ "version": "2026.8.7",
4
4
  "displayName": "OpenViking",
5
5
  "description": "OpenClaw context-engine plugin — OpenViking AI memory, long-term memory, knowledge base, semantic search, RAG, context engine. 长期记忆 · 知识库 · 语义检索 · 上下文引擎",
6
6
  "type": "module",