@agentconnect.md/daemon 1.0.0-rc.220 → 1.0.0-rc.222

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.
Files changed (30) hide show
  1. package/dist/{acp-host-CeJJZbtg.js → acp-host-DE2r7uCO.js} +191 -16
  2. package/dist/acp-host-DE2r7uCO.js.map +1 -0
  3. package/dist/{agent-list-CoYaBcDx.js → agent-list-BwgY3Xqv.js} +2 -2
  4. package/dist/{agent-list-CoYaBcDx.js.map → agent-list-BwgY3Xqv.js.map} +1 -1
  5. package/dist/bridge-DXIVgEzf.js +726 -0
  6. package/dist/bridge-DXIVgEzf.js.map +1 -0
  7. package/dist/{chat-Bcpnzw3h.js → chat--hmAp3lB.js} +4 -3
  8. package/dist/chat--hmAp3lB.js.map +1 -0
  9. package/dist/index.js +5 -5
  10. package/dist/{load-agents-nWFFmN5-.js → load-agents-hq5NXMmx.js} +34 -6
  11. package/dist/load-agents-hq5NXMmx.js.map +1 -0
  12. package/dist/{login-B99oQNXR.js → login-EVa3UJRh.js} +4 -4
  13. package/dist/{login-B99oQNXR.js.map → login-EVa3UJRh.js.map} +1 -1
  14. package/dist/{run-foreground-DLxz75b4.js → run-foreground-B05rDr1z.js} +4101 -211
  15. package/dist/run-foreground-B05rDr1z.js.map +1 -0
  16. package/dist/run-foreground-Bcg0RA3e.js +2 -0
  17. package/dist/{schemas-DujcoO0q.js → schemas-CQkO9hC5.js} +27 -2
  18. package/dist/schemas-CQkO9hC5.js.map +1 -0
  19. package/dist/{bridge-DoUrmBw9.js → stdio-CwrB9yrX.js} +41 -727
  20. package/dist/stdio-CwrB9yrX.js.map +1 -0
  21. package/package.json +1 -1
  22. package/dist/acp-host-CeJJZbtg.js.map +0 -1
  23. package/dist/bridge-DoUrmBw9.js.map +0 -1
  24. package/dist/chat-Bcpnzw3h.js.map +0 -1
  25. package/dist/ipc-2Xbxe7uu.js +0 -35
  26. package/dist/ipc-2Xbxe7uu.js.map +0 -1
  27. package/dist/load-agents-nWFFmN5-.js.map +0 -1
  28. package/dist/run-foreground-DLxz75b4.js.map +0 -1
  29. package/dist/run-foreground-PidBMaVD.js +0 -2
  30. package/dist/schemas-DujcoO0q.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { i as __require, o as __toESM, t as __commonJSMin } from "./rolldown-runtime-CE-6LUnI.js";
2
2
  import { t as require_src$1 } from "./src-DDtlVutj.js";
3
- import { S as NEVER, _ as union, c as intersection, d as number, f as object, g as string, h as record, i as boolean, l as literal, o as discriminatedUnion, r as array, s as int, t as _enum, v as unknown, y as url } from "./schemas-DujcoO0q.js";
3
+ import { T as NEVER, _ as record, a as array, b as unknown, c as discriminatedUnion, d as literal, l as int, m as object, n as _enum, o as boolean, p as number, u as intersection, v as string, x as url, y as union } from "./schemas-CQkO9hC5.js";
4
4
  import { c as registryPath, s as registryCachePath } from "./paths-DEcUO8lC.js";
5
5
  import { delimiter, dirname, join, normalize } from "node:path";
6
6
  import { accessSync, constants, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
@@ -418,6 +418,13 @@ const AgentWorkspace = discriminatedUnion("mode", [object({ mode: literal("scrat
418
418
  gitCredential: _enum(["github-app"]).optional()
419
419
  })]);
420
420
  /**
421
+ * MCP-server name reserved for the daemon's own injected stdio bridge (its
422
+ * platform tools). A config-defined or agent-enabled server under this name
423
+ * would collide with the bridge entry at ACP `session/new`, so the daemon
424
+ * strips it and the CP rejects it in `AgentSpec.mcpServers` at the API edge.
425
+ */
426
+ const RESERVED_MCP_SERVER_NAME = "agentconnect";
427
+ /**
421
428
  * The editable agent definition the CP owns and the daemon needs to run it:
422
429
  * prompt + runtime selection. Raft ships this in the launch config and the
423
430
  * daemon synthesizes the system prompt locally; `description` IS the prompt.
@@ -435,8 +442,10 @@ const AgentSpec = object({
435
442
  "high"
436
443
  ]).optional(),
437
444
  fastMode: boolean().optional(),
445
+ permissionMode: string().optional(),
438
446
  workspace: AgentWorkspace.optional(),
439
- env: record(string(), string()).optional()
447
+ env: record(string(), string()).optional(),
448
+ mcpServers: array(string()).default([])
440
449
  });
441
450
  const AgentLaunch = object({
442
451
  agentId: string().uuid(),
@@ -899,6 +908,82 @@ const WorkspaceGitPullResult = object({
899
908
  deletions: number().int().nonnegative().optional()
900
909
  });
901
910
  //#endregion
911
+ //#region ../protocol/dist/frames/memory.js
912
+ /**
913
+ * Agent memory directory (C→D REQ → REP) — the console's read/write of an agent's
914
+ * long-term memory, and the surface the daemon serves it from.
915
+ *
916
+ * Memory is a DIRECTORY at the agent's ROOT (`<agent-root>/memory/`), OUTSIDE the
917
+ * workspace — so it survives a workspace reset / re-clone and is never committed
918
+ * into a github-workspace repo. It follows the index-plus-topics shape: a lean
919
+ * `MEMORY.md` index (injected into the prompt every session, bounded) plus any
920
+ * number of `<topic>.md` files the agent reads on demand. The agent maintains it
921
+ * via MCP tools; these frames are the third channel — the CP reading/writing it
922
+ * for the console — all pointing at the same directory.
923
+ *
924
+ * The CP stores NO memory content — bytes are pulled live from the owning daemon
925
+ * and proxied to the console, never persisted (body-locality). A not-yet-created
926
+ * file/dir is DATA (`exists:false`), not an error; only an unknown agent or a
927
+ * path-containment violation (`BAD_PAYLOAD`) or an unexpected fs failure
928
+ * (`INTERNAL`) comes back as an `error` frame.
929
+ *
930
+ * - `memory/list`: the topic files in the memory dir (flat; the index + topics).
931
+ * - `memory/read`: one byte slice of a memory file (`path` relative to the memory
932
+ * dir; default `MEMORY.md`). `limit` is a ceiling — the daemon returns fewer
933
+ * bytes to keep the JSON-escaped REP under the 256 KiB frame cap and always ends
934
+ * on a UTF-8 boundary. `nextOffset` is authoritative — do NOT recompute it.
935
+ * - `memory/write`: replace the whole named memory file with `content`.
936
+ */
937
+ /** The default file name of the memory index (loaded into the prompt each session). */
938
+ const MEMORY_INDEX = "MEMORY.md";
939
+ /** One entry in a memory-dir listing (name-only; not a path). */
940
+ const MemoryEntry = object({
941
+ name: string(),
942
+ size: number().int().nonnegative(),
943
+ mtime: string()
944
+ });
945
+ /** C→D REQ: list the files in the agent's memory dir. */
946
+ const MemoryListReq = object({ agentId: string().min(1) });
947
+ /** D→C REP (corr = the req id): the memory dir's files (or `exists:false`). */
948
+ const MemoryListPage = object({
949
+ agentId: string(),
950
+ exists: boolean(),
951
+ entries: array(MemoryEntry)
952
+ });
953
+ /** C→D REQ: read one byte slice of a memory file (path relative to the memory dir). */
954
+ const MemoryReadReq = object({
955
+ agentId: string().min(1),
956
+ path: string().default(MEMORY_INDEX),
957
+ offset: number().int().nonnegative().default(0),
958
+ limit: number().int().positive().max(65536).default(65536)
959
+ });
960
+ /** D→C REP (corr = the req id): the memory file slice (or `exists:false`). Always utf8 text. */
961
+ const MemoryReadContent = object({
962
+ agentId: string(),
963
+ path: string(),
964
+ exists: boolean(),
965
+ size: number().int().nonnegative().optional(),
966
+ mtime: string().optional(),
967
+ content: string().optional(),
968
+ offset: number().int().nonnegative().optional(),
969
+ nextOffset: number().int().nonnegative().optional(),
970
+ truncated: boolean().optional()
971
+ });
972
+ /** C→D REQ: replace the whole named memory file with `content` (console edit). */
973
+ const MemoryWriteReq = object({
974
+ agentId: string().min(1),
975
+ path: string().default(MEMORY_INDEX),
976
+ content: string(),
977
+ ifMatchMtime: string().optional()
978
+ });
979
+ /** D→C REP (corr = the req id): the written state, so the console can refresh. */
980
+ const MemoryWriteOk = object({
981
+ agentId: string(),
982
+ path: string(),
983
+ size: number().int().nonnegative(),
984
+ mtime: string()
985
+ });
986
+ //#endregion
902
987
  //#region ../protocol/dist/frames/telemetry.js
903
988
  /**
904
989
  * Telemetry & facts (D→C) — protocol §7.
@@ -964,6 +1049,15 @@ const UsageReport = object({
964
1049
  * daemons report the full snapshot instead; the CP keeps accepting the old
965
1050
  * frame from older daemons.
966
1051
  */
1052
+ /**
1053
+ * MCP transports a runtime accepts on `session/new` `mcpServers` (from the ACP
1054
+ * `initialize` response's `agentCapabilities.mcpCapabilities`). Stdio is the ACP
1055
+ * baseline every agent must accept, so only the optional transports are listed.
1056
+ */
1057
+ const McpTransportCapabilities = object({
1058
+ http: boolean(),
1059
+ sse: boolean()
1060
+ });
967
1061
  const FactsRuntimeProfile = object({
968
1062
  runtime: string(),
969
1063
  version: string(),
@@ -975,7 +1069,27 @@ const FactsRuntimeProfile = object({
975
1069
  "none"
976
1070
  ]),
977
1071
  acpProtocolVersion: number().int().optional(),
978
- toolCalling: boolean()
1072
+ toolCalling: boolean(),
1073
+ mcpCapabilities: McpTransportCapabilities.optional()
1074
+ });
1075
+ /**
1076
+ * Probe result for one daemon-configured MCP server (daemon config `mcpServers`).
1077
+ * The daemon connects to the server (MCP initialize + `tools/list`) so the
1078
+ * console can show what each server offers before the user enables it on an
1079
+ * agent. Metadata only — definitions (commands, URLs, headers) stay daemon-local.
1080
+ */
1081
+ const FactsMcpServer = object({
1082
+ name: string(),
1083
+ transport: _enum([
1084
+ "stdio",
1085
+ "http",
1086
+ "sse"
1087
+ ]),
1088
+ /** True iff the MCP handshake succeeded. */
1089
+ ok: boolean(),
1090
+ tools: array(string()).default([]),
1091
+ version: string().optional(),
1092
+ error: string().optional()
979
1093
  });
980
1094
  /**
981
1095
  * Full snapshot of the daemon's installed runtimes — D→C EVT (protocol §7.3a),
@@ -985,7 +1099,10 @@ const FactsRuntimeProfile = object({
985
1099
  * that are no longer installed. Idempotent (latest-wins). Supersedes the
986
1100
  * per-runtime `facts/runtime-profile` upsert.
987
1101
  */
988
- const DaemonRuntimes = object({ runtimes: array(FactsRuntimeProfile) });
1102
+ const DaemonRuntimes = object({
1103
+ runtimes: array(FactsRuntimeProfile),
1104
+ mcpServers: array(FactsMcpServer).default([])
1105
+ });
989
1106
  /** Non-secret config update — C→D EVT, protocol §8.3 / frame #26. */
990
1107
  const ConfigPush = object({ keys: record(string(), unknown()) });
991
1108
  /** Fleet: drain+exit, supervisor restarts — C→D REQ, protocol §8.3 / frame #27. */
@@ -1026,6 +1143,7 @@ const ErrorFrame = object({
1026
1143
  "LEASE_EXPIRED",
1027
1144
  "LEASE_DENIED",
1028
1145
  "RATE_LIMITED",
1146
+ "CONFLICT",
1029
1147
  "INTERNAL"
1030
1148
  ]),
1031
1149
  message: string(),
@@ -1077,6 +1195,7 @@ const WebchatEvent = discriminatedUnion("kind", [
1077
1195
  const WebchatStatus = object({
1078
1196
  model: string().optional(),
1079
1197
  effort: string().optional(),
1198
+ permissionMode: string().optional(),
1080
1199
  fastMode: boolean().optional(),
1081
1200
  contextUsed: number().int().optional(),
1082
1201
  contextSize: number().int().optional(),
@@ -1085,6 +1204,7 @@ const WebchatStatus = object({
1085
1204
  costCurrency: string().optional(),
1086
1205
  models: array(string()).optional(),
1087
1206
  efforts: array(string()).optional(),
1207
+ permissionModes: array(string()).optional(),
1088
1208
  fastModeAvailable: boolean().optional(),
1089
1209
  sessionId: string().optional()
1090
1210
  });
@@ -1144,6 +1264,11 @@ const FRAME_SCHEMAS = {
1144
1264
  agentId: string().uuid(),
1145
1265
  effort: string()
1146
1266
  }),
1267
+ "webchat/set-permission-mode": object({
1268
+ conversationId: string().uuid(),
1269
+ agentId: string().uuid(),
1270
+ permissionMode: string()
1271
+ }),
1147
1272
  "webchat/set-fast": object({
1148
1273
  conversationId: string().uuid(),
1149
1274
  agentId: string().uuid(),
@@ -1190,6 +1315,12 @@ const FRAME_SCHEMAS = {
1190
1315
  "workspace/gitstatus/result": WorkspaceGitStatus,
1191
1316
  "workspace/gitpull": WorkspaceGitPullReq,
1192
1317
  "workspace/gitpull/result": WorkspaceGitPullResult,
1318
+ "memory/list": MemoryListReq,
1319
+ "memory/list/page": MemoryListPage,
1320
+ "memory/read": MemoryReadReq,
1321
+ "memory/read/content": MemoryReadContent,
1322
+ "memory/write": MemoryWriteReq,
1323
+ "memory/write/ok": MemoryWriteOk,
1193
1324
  "config/push": ConfigPush,
1194
1325
  "daemon/restart": DaemonRestart,
1195
1326
  "daemon/upgrade": DaemonUpgrade,
@@ -1232,6 +1363,7 @@ discriminatedUnion("type", [
1232
1363
  frame("webchat/close", FRAME_SCHEMAS["webchat/close"]),
1233
1364
  frame("webchat/set-model", FRAME_SCHEMAS["webchat/set-model"]),
1234
1365
  frame("webchat/set-effort", FRAME_SCHEMAS["webchat/set-effort"]),
1366
+ frame("webchat/set-permission-mode", FRAME_SCHEMAS["webchat/set-permission-mode"]),
1235
1367
  frame("webchat/set-fast", FRAME_SCHEMAS["webchat/set-fast"]),
1236
1368
  frame("webchat/cancel", FRAME_SCHEMAS["webchat/cancel"]),
1237
1369
  frame("route/assign", FRAME_SCHEMAS["route/assign"]),
@@ -1274,6 +1406,12 @@ discriminatedUnion("type", [
1274
1406
  frame("workspace/gitstatus/result", FRAME_SCHEMAS["workspace/gitstatus/result"]),
1275
1407
  frame("workspace/gitpull", FRAME_SCHEMAS["workspace/gitpull"]),
1276
1408
  frame("workspace/gitpull/result", FRAME_SCHEMAS["workspace/gitpull/result"]),
1409
+ frame("memory/list", FRAME_SCHEMAS["memory/list"]),
1410
+ frame("memory/list/page", FRAME_SCHEMAS["memory/list/page"]),
1411
+ frame("memory/read", FRAME_SCHEMAS["memory/read"]),
1412
+ frame("memory/read/content", FRAME_SCHEMAS["memory/read/content"]),
1413
+ frame("memory/write", FRAME_SCHEMAS["memory/write"]),
1414
+ frame("memory/write/ok", FRAME_SCHEMAS["memory/write/ok"]),
1277
1415
  frame("config/push", FRAME_SCHEMAS["config/push"]),
1278
1416
  frame("daemon/restart", FRAME_SCHEMAS["daemon/restart"]),
1279
1417
  frame("daemon/upgrade", FRAME_SCHEMAS["daemon/upgrade"]),
@@ -5773,11 +5911,7 @@ function usesGithubApp(agent) {
5773
5911
  async function prepareWorkspace(agent) {
5774
5912
  const cwd = agent.workspace.path;
5775
5913
  mkdirSync(cwd, { recursive: true });
5776
- if (agent.workspace.mode === "from-scratch") {
5777
- const mem = join(cwd, "memory.md");
5778
- if (!existsSync(mem)) writeFileSync(mem, `# ${agent.name} memory\n`);
5779
- return cwd;
5780
- }
5914
+ if (agent.workspace.mode === "from-scratch") return cwd;
5781
5915
  if (!existsSync(join(cwd, ".git"))) {
5782
5916
  await cloneRepo(agent);
5783
5917
  return cwd;
@@ -10149,6 +10283,20 @@ function effortOptionsFrom(configOptions, isClaudeRuntime) {
10149
10283
  };
10150
10284
  }
10151
10285
  /**
10286
+ * Extract the permission/approval mode selector from a session's `configOptions` (ACP
10287
+ * `category: "mode"`, `type: "select"`). Returns null when the runtime exposes no mode
10288
+ * selector.
10289
+ */
10290
+ function permissionModeOptionsFrom(configOptions) {
10291
+ const opt = configOptions?.find((o) => o.category === "mode" && o.type === "select");
10292
+ if (!opt || opt.type !== "select") return null;
10293
+ const modes = opt.options.flatMap((o) => "group" in o ? o.options : [o]).map((o) => o.value);
10294
+ return {
10295
+ current: opt.currentValue,
10296
+ modes
10297
+ };
10298
+ }
10299
+ /**
10152
10300
  * Extract the fast-mode toggle from a session's `configOptions` (ACP `category:
10153
10301
  * "model_config"`, `type: "select"` with on/off values). Returns null when the current
10154
10302
  * model advertises no fast toggle.
@@ -10169,9 +10317,11 @@ var AcpHost = class {
10169
10317
  promptCaps = {};
10170
10318
  lastModelOptions = null;
10171
10319
  lastEffortOptions = null;
10320
+ lastPermissionModeOptions = null;
10172
10321
  lastFastOption = null;
10173
10322
  sessionConfigs = /* @__PURE__ */ new Map();
10174
10323
  negotiatedProtocolVersion;
10324
+ mcpCaps = null;
10175
10325
  constructor(runtime, opts) {
10176
10326
  this.runtime = runtime;
10177
10327
  this.opts = opts;
@@ -10195,6 +10345,7 @@ var AcpHost = class {
10195
10345
  this.opts.log?.info(`acp: CLAUDE_CODE_EXECUTABLE not set — using claude on PATH (${claude})`);
10196
10346
  }
10197
10347
  }
10348
+ if (this.isClaudeRuntime() && env.CLAUDE_CODE_DISABLE_AUTO_MEMORY === void 0) env.CLAUDE_CODE_DISABLE_AUTO_MEMORY = "1";
10198
10349
  const child = spawn$1(resolveCommandPath(this.runtime.command, env) ?? this.runtime.command, this.runtime.args, {
10199
10350
  stdio: [
10200
10351
  "pipe",
@@ -10227,7 +10378,12 @@ var AcpHost = class {
10227
10378
  this.negotiatedProtocolVersion = init.protocolVersion;
10228
10379
  this.canLoad = init.agentCapabilities?.loadSession ?? false;
10229
10380
  this.promptCaps = init.agentCapabilities?.promptCapabilities ?? {};
10230
- this.opts.log?.debug(`acp: agent initialized (loadSession=${this.canLoad}, prompt caps: image=${!!this.promptCaps.image} audio=${!!this.promptCaps.audio} embeddedContext=${!!this.promptCaps.embeddedContext})`);
10381
+ const mcp = init.agentCapabilities?.mcpCapabilities;
10382
+ this.mcpCaps = {
10383
+ http: mcp?.http ?? false,
10384
+ sse: mcp?.sse ?? false
10385
+ };
10386
+ this.opts.log?.debug(`acp: agent initialized (loadSession=${this.canLoad}, prompt caps: image=${!!this.promptCaps.image} audio=${!!this.promptCaps.audio} embeddedContext=${!!this.promptCaps.embeddedContext}, mcp: http=${this.mcpCaps.http} sse=${this.mcpCaps.sse})`);
10231
10387
  }
10232
10388
  /** Whether the agent advertised support for a gated prompt content-block kind.
10233
10389
  * `text` and `resource_link` are baseline and always return true. */
@@ -10277,6 +10433,7 @@ var AcpHost = class {
10277
10433
  const fastMode = this.opts.configPrefs?.fastMode;
10278
10434
  const prefs = [
10279
10435
  ["model", this.opts.configPrefs?.model],
10436
+ ["mode", this.opts.configPrefs?.permissionMode],
10280
10437
  ["thought_level", ultracode ? void 0 : this.opts.configPrefs?.reasoningEffort],
10281
10438
  ["model_config", fastMode === void 0 ? void 0 : fastMode ? "on" : "off"]
10282
10439
  ];
@@ -10304,6 +10461,7 @@ var AcpHost = class {
10304
10461
  refreshOptionCaches(configOptions) {
10305
10462
  this.lastModelOptions = modelOptionsFrom(configOptions);
10306
10463
  this.lastEffortOptions = effortOptionsFrom(configOptions, this.isClaudeRuntime());
10464
+ this.lastPermissionModeOptions = permissionModeOptionsFrom(configOptions);
10307
10465
  this.lastFastOption = fastOptionFrom(configOptions);
10308
10466
  }
10309
10467
  /** The model selector advertised by the most recent session/new|load, or null if the
@@ -10316,6 +10474,11 @@ var AcpHost = class {
10316
10474
  effortOptions() {
10317
10475
  return this.lastEffortOptions;
10318
10476
  }
10477
+ /** The permission/approval mode selector from the most recent session/new|load, or
10478
+ * null if none is offered. */
10479
+ permissionModeOptions() {
10480
+ return this.lastPermissionModeOptions;
10481
+ }
10319
10482
  /** The fast-mode toggle from the most recent session/new|load, or null if the current
10320
10483
  * model offers no fast mode. */
10321
10484
  fastModeOption() {
@@ -10357,6 +10520,11 @@ var AcpHost = class {
10357
10520
  if (effort === "ultracode") return false;
10358
10521
  return this.setSessionConfig(sessionId, "thought_level", effort);
10359
10522
  }
10523
+ /** Switch the permission/approval mode of an already-running session (ACP `mode`
10524
+ * select). Values are runtime-owned and validated against the advertised options. */
10525
+ async setSessionPermissionMode(sessionId, mode) {
10526
+ return this.setSessionConfig(sessionId, "mode", mode);
10527
+ }
10360
10528
  /** Toggle fast mode on an already-running session (ACP `model_config` on/off select).
10361
10529
  * False when the current model offers no fast toggle. */
10362
10530
  async setSessionFastMode(sessionId, on) {
@@ -10367,6 +10535,12 @@ var AcpHost = class {
10367
10535
  acpProtocolVersion() {
10368
10536
  return this.negotiatedProtocolVersion;
10369
10537
  }
10538
+ /** The optional MCP transports the agent advertised at initialize (stdio is
10539
+ * baseline and always accepted; the unstable `acp` flag is ignored). null
10540
+ * before the handshake completed. Feeds the runtime probe's transport gating. */
10541
+ mcpCapabilities() {
10542
+ return this.mcpCaps;
10543
+ }
10370
10544
  /** True iff THIS agent process created or loaded `sessionId` in its current lifetime. */
10371
10545
  hasSession(sessionId) {
10372
10546
  return this.live.has(sessionId);
@@ -10377,16 +10551,17 @@ var AcpHost = class {
10377
10551
  }
10378
10552
  /** Resume a previously-created session by id (ACP `session/load`). The agent
10379
10553
  * restores its own history server-side; its replayed session/update stream is
10380
- * suppressed so it isn't re-posted. Throws if the agent can't load the id
10381
- * (caller falls back to newSession). */
10382
- async loadSession(sessionId, cwd, effortOverride) {
10554
+ * suppressed so it isn't re-posted. `mcpServers` must be re-attached here — the
10555
+ * agent doesn't persist them across processes. Throws if the agent can't load
10556
+ * the id (caller falls back to newSession). */
10557
+ async loadSession(sessionId, cwd, mcpServers = [], effortOverride) {
10383
10558
  this.loadingSessions.add(sessionId);
10384
10559
  try {
10385
10560
  const _meta = claudeSessionMeta(effortOverride ?? this.opts.configPrefs?.reasoningEffort, this.isClaudeRuntime(), this.opts.configPrefs?.systemPrompt);
10386
10561
  const res = await this.conn.agent.request(methods.agent.session.load, {
10387
10562
  sessionId,
10388
10563
  cwd,
10389
- mcpServers: [],
10564
+ mcpServers,
10390
10565
  ..._meta ? { _meta } : {}
10391
10566
  });
10392
10567
  this.live.add(sessionId);
@@ -10443,6 +10618,6 @@ var AcpHost = class {
10443
10618
  }
10444
10619
  };
10445
10620
  //#endregion
10446
- export { resolveRuntimes as _, initGitInjection as a, simpleGit as c, MAX_FRAME_BYTES as d, buildEnvelope as f, cachedRuntimeVersions as g, cachedRuntimeNames as h, prepareWorkspace as i, isFrame as l, encode as m, installedRuntimes as n, probeGitVersion as o, decodeEnvelope as p, prefetchWorkspace as r, sessionGitEnv as s, AcpHost as t, normalizeGitUrl as u };
10621
+ export { cachedRuntimeNames as _, initGitInjection as a, simpleGit as c, MAX_FRAME_BYTES as d, buildEnvelope as f, RESERVED_MCP_SERVER_NAME as g, MEMORY_INDEX as h, prepareWorkspace as i, isFrame as l, encode as m, installedRuntimes as n, probeGitVersion as o, decodeEnvelope as p, prefetchWorkspace as r, sessionGitEnv as s, AcpHost as t, normalizeGitUrl as u, cachedRuntimeVersions as v, resolveRuntimes as y };
10447
10622
 
10448
- //# sourceMappingURL=acp-host-CeJJZbtg.js.map
10623
+ //# sourceMappingURL=acp-host-DE2r7uCO.js.map