@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.
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- buildFetchDispatcher,
3
+ daemonFetch,
4
4
  executeJsonRequest
5
- } from "./chunk-KNMCE6WB.js";
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
- const dispatcher = buildFetchDispatcher(url, process.env);
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
- buildFetchDispatcher
226
+ daemonFetch
218
227
  };