@slock-ai/daemon 0.53.2 → 0.54.1-play.20260526153716
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/dist/chat-bridge.js +3 -5
- package/dist/{chunk-KNMCE6WB.js → chunk-VOZJ2ELH.js} +10 -1
- package/dist/{chunk-UIJF67BT.js → chunk-XYSTUB3F.js} +716 -158
- package/dist/cli/index.js +498 -56
- package/dist/cli/package.json +5 -0
- package/dist/core.js +7 -3
- package/dist/drivers/piSdkRunner.js +96 -0
- package/dist/index.js +6 -4
- package/package.json +2 -1
package/dist/chat-bridge.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
daemonFetch,
|
|
4
4
|
executeJsonRequest
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VOZJ2ELH.js";
|
|
6
6
|
|
|
7
7
|
// src/chat-bridge.ts
|
|
8
8
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -47,9 +47,7 @@ var runtimeActionHeaders = {
|
|
|
47
47
|
...launchId ? { "X-Agent-Launch-Id": launchId } : {}
|
|
48
48
|
};
|
|
49
49
|
function bridgeFetch(url, init = {}) {
|
|
50
|
-
|
|
51
|
-
const requestInit = dispatcher ? { ...init, dispatcher } : init;
|
|
52
|
-
return fetch(url, requestInit);
|
|
50
|
+
return daemonFetch(url, init);
|
|
53
51
|
}
|
|
54
52
|
var server = new McpServer({
|
|
55
53
|
name: "chat",
|
|
@@ -207,6 +207,15 @@ function buildFetchDispatcher(targetUrl, env) {
|
|
|
207
207
|
return dispatcher;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
+
// src/daemonFetch.ts
|
|
211
|
+
function withDaemonFetchProxy(input, init = {}, env = process.env) {
|
|
212
|
+
const dispatcher = buildFetchDispatcher(input.toString(), env);
|
|
213
|
+
return dispatcher ? { ...init, dispatcher } : init;
|
|
214
|
+
}
|
|
215
|
+
function daemonFetch(input, init, env = process.env) {
|
|
216
|
+
return fetch(input, withDaemonFetchProxy(input, init, env));
|
|
217
|
+
}
|
|
218
|
+
|
|
210
219
|
export {
|
|
211
220
|
subscribeDaemonLogs,
|
|
212
221
|
logger,
|
|
@@ -214,5 +223,5 @@ export {
|
|
|
214
223
|
executeJsonRequest,
|
|
215
224
|
executeResponseRequest,
|
|
216
225
|
buildWebSocketOptions,
|
|
217
|
-
|
|
226
|
+
daemonFetch
|
|
218
227
|
};
|