@openviking/dsh-memory-plugin 0.5.8 → 0.5.9
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/config.mjs +1 -1
- package/mcp-env.mjs +9 -4
- package/package.json +1 -1
- package/servers/mcp-proxy.mjs +4 -4
package/config.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { buildPluginConfig } from "./shared/plugin-config.mjs";
|
|
2
2
|
import { loadCredentialFiles } from "./shared/credentials.mjs";
|
|
3
3
|
|
|
4
|
-
export const PLUGIN_VERSION = "0.5.
|
|
4
|
+
export const PLUGIN_VERSION = "0.5.9";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Namespace for the bridged OpenViking MCP tools. DSH publishes every MCP tool
|
package/mcp-env.mjs
CHANGED
|
@@ -12,15 +12,20 @@ export const PROXY_PATH = fileURLToPath(new URL("./servers/mcp-proxy.mjs", impor
|
|
|
12
12
|
* DSH scrubs credential-shaped names out of the environment a subprocess
|
|
13
13
|
* inherits, and the Cordis patch is invisible to one, so the proxy cannot
|
|
14
14
|
* resolve the connection the way this process did. It gets the answer instead:
|
|
15
|
-
* the resolved connection and this session's peer, forwarded
|
|
16
|
-
* `env` source so the child reads no file and lands on exactly
|
|
17
|
-
*
|
|
15
|
+
* the resolved connection, diagnostics, and this session's peer, forwarded
|
|
16
|
+
* with the forced `env` source so the child reads no file and lands on exactly
|
|
17
|
+
* these values — the empty ones included.
|
|
18
18
|
*/
|
|
19
19
|
export function buildMcpConfig(config) {
|
|
20
20
|
// In DSH Desktop, process.execPath is Electron's executable rather than a
|
|
21
21
|
// standalone Node binary. This tells Electron to run the proxy script as
|
|
22
22
|
// Node instead of attempting to launch a second Desktop instance.
|
|
23
|
-
const env = {
|
|
23
|
+
const env = {
|
|
24
|
+
ELECTRON_RUN_AS_NODE: "1",
|
|
25
|
+
...forwardConnectionEnv(config),
|
|
26
|
+
OPENVIKING_DEBUG: config.debug ? "1" : "0",
|
|
27
|
+
OPENVIKING_DEBUG_LOG: config.debugLogPath || "",
|
|
28
|
+
};
|
|
24
29
|
if (config.recallPeerScope) env.OPENVIKING_RECALL_PEER_SCOPE = config.recallPeerScope;
|
|
25
30
|
if (config.timeoutMs) env.OPENVIKING_TIMEOUT_MS = String(config.timeoutMs);
|
|
26
31
|
return {
|
package/package.json
CHANGED
package/servers/mcp-proxy.mjs
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* stdio -> streamable-HTTP MCP proxy for the OpenViking DSH bundle.
|
|
5
5
|
*
|
|
6
6
|
* DSH's MCP bridge starts this process as a local stdio MCP server. The proxy
|
|
7
|
-
* resolves its connection through the same `resolveConfig()`
|
|
8
|
-
* runtime, from the child environment
|
|
7
|
+
* resolves its connection and diagnostics through the same `resolveConfig()`
|
|
8
|
+
* as the in-process runtime, from the child environment built in `mcp-env.mjs`: DSH
|
|
9
9
|
* scrubs credential-shaped names out of what it inherits, and values that came
|
|
10
10
|
* from the Cordis patch are invisible to a subprocess otherwise.
|
|
11
11
|
*/
|
|
@@ -25,8 +25,8 @@ export function readProxyConfig(env = process.env, cwd = process.cwd()) {
|
|
|
25
25
|
// still decides whether the proxy may send it. In broad recall mode the
|
|
26
26
|
// actor header must stay unset; otherwise a process launched in workspace A
|
|
27
27
|
// narrows MCP searches for a session whose runtime is serving workspace B.
|
|
28
|
-
debug:
|
|
29
|
-
debugLogPath: env.OV_DEBUG_LOG ||
|
|
28
|
+
debug: env.OV_DEBUG_LOG ? true : cfg.debug,
|
|
29
|
+
debugLogPath: env.OV_DEBUG_LOG || cfg.debugLogPath,
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
|