zooid 0.10.0 → 0.11.0

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/bin.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  renderRegistration,
17
17
  startDaemonSocketServer,
18
18
  startWorkforcePublisher
19
- } from "./chunk-LIMRV7C4.js";
19
+ } from "./chunk-OCRQ3LWL.js";
20
20
 
21
21
  // src/bin.ts
22
22
  import { resolve as resolve6 } from "path";
@@ -32571,6 +32571,7 @@ var McpZodTypeKind;
32571
32571
 
32572
32572
  // ../context-mcp/src/factory.ts
32573
32573
  import { createRequire } from "module";
32574
+ import { dirname } from "path";
32574
32575
  function resolveDefaultBin() {
32575
32576
  const req = createRequire(import.meta.url);
32576
32577
  return req.resolve("@zooid/context-mcp/bin");
@@ -32580,7 +32581,25 @@ function getDefaultBin() {
32580
32581
  if (!cachedDefaultBin) cachedDefaultBin = resolveDefaultBin();
32581
32582
  return cachedDefaultBin;
32582
32583
  }
32584
+ var CONTEXT_CONTAINER_BIN_DIR = "/zooid/context-mcp";
32585
+ var CONTEXT_CONTAINER_BIN = `${CONTEXT_CONTAINER_BIN_DIR}/bin.js`;
32586
+ var CONTEXT_CONTAINER_SOCK = "/zooid/context.sock";
32587
+ function contextContainerMounts(opts) {
32588
+ const binFile = opts.binPath ?? getDefaultBin();
32589
+ return [
32590
+ { path: dirname(binFile), target: CONTEXT_CONTAINER_BIN_DIR, mode: "ro" },
32591
+ { path: opts.sockPath, target: CONTEXT_CONTAINER_SOCK, mode: "rw" }
32592
+ ];
32593
+ }
32583
32594
  function buildContextServerSpec(opts) {
32595
+ if (opts.containerize) {
32596
+ return {
32597
+ name: "zooid-context",
32598
+ command: "node",
32599
+ args: [CONTEXT_CONTAINER_BIN, "--spawn-id", opts.spawnId],
32600
+ env: [{ name: "ZOOID_DAEMON_SOCK", value: CONTEXT_CONTAINER_SOCK }]
32601
+ };
32602
+ }
32584
32603
  return {
32585
32604
  name: "zooid-context",
32586
32605
  command: process.execPath,
@@ -32730,6 +32749,15 @@ Set agents.<name>.container.image, top-level container.image, or use a preset th
32730
32749
  }
32731
32750
  }
32732
32751
  const contextSpawns = buildContextSpawns(cfg, opts);
32752
+ if (cfg.runtime !== "local" && opts.daemonSockPath && contextSpawns) {
32753
+ for (const name of Object.keys(cfg.agents)) {
32754
+ if (!contextSpawns[name]) continue;
32755
+ mountsByAgent[name] = [
32756
+ ...mountsByAgent[name] ?? [],
32757
+ ...contextContainerMounts({ sockPath: opts.daemonSockPath })
32758
+ ];
32759
+ }
32760
+ }
32733
32761
  return new AcpAgentRegistry({
32734
32762
  runtime,
32735
32763
  agents: cfg.agents,
@@ -32775,7 +32803,11 @@ function buildContextSpawns(cfg, opts) {
32775
32803
  threadRef: { channelId: channelId ?? threadId, threadId },
32776
32804
  provider
32777
32805
  });
32778
- return buildContextServerSpec({ spawnId, sockPath });
32806
+ return buildContextServerSpec({
32807
+ spawnId,
32808
+ sockPath,
32809
+ containerize: cfg.runtime !== "local"
32810
+ });
32779
32811
  };
32780
32812
  } else {
32781
32813
  result[name] = void 0;
@@ -32812,4 +32844,4 @@ export {
32812
32844
  startDaemonSocketServer,
32813
32845
  buildAcpRegistry
32814
32846
  };
32815
- //# sourceMappingURL=chunk-LIMRV7C4.js.map
32847
+ //# sourceMappingURL=chunk-OCRQ3LWL.js.map