@agentconnect.md/daemon 1.0.0-rc.221 → 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.
- package/dist/{acp-host-zyZ_j0yY.js → acp-host-DE2r7uCO.js} +64 -11
- package/dist/acp-host-DE2r7uCO.js.map +1 -0
- package/dist/{agent-list-Vx-p1X3q.js → agent-list-BwgY3Xqv.js} +2 -2
- package/dist/{agent-list-Vx-p1X3q.js.map → agent-list-BwgY3Xqv.js.map} +1 -1
- package/dist/bridge-DXIVgEzf.js +726 -0
- package/dist/bridge-DXIVgEzf.js.map +1 -0
- package/dist/{chat-CqfkPkqK.js → chat--hmAp3lB.js} +3 -3
- package/dist/{chat-CqfkPkqK.js.map → chat--hmAp3lB.js.map} +1 -1
- package/dist/index.js +5 -5
- package/dist/{load-agents-C1m5Y9n_.js → load-agents-hq5NXMmx.js} +33 -6
- package/dist/load-agents-hq5NXMmx.js.map +1 -0
- package/dist/{login-DUhkVhAr.js → login-EVa3UJRh.js} +4 -4
- package/dist/{login-DUhkVhAr.js.map → login-EVa3UJRh.js.map} +1 -1
- package/dist/{run-foreground-mvTzCScX.js → run-foreground-B05rDr1z.js} +3454 -37
- package/dist/run-foreground-B05rDr1z.js.map +1 -0
- package/dist/run-foreground-Bcg0RA3e.js +2 -0
- package/dist/{schemas-DujcoO0q.js → schemas-CQkO9hC5.js} +27 -2
- package/dist/schemas-CQkO9hC5.js.map +1 -0
- package/dist/{bridge-DoUrmBw9.js → stdio-CwrB9yrX.js} +41 -727
- package/dist/stdio-CwrB9yrX.js.map +1 -0
- package/package.json +1 -1
- package/dist/acp-host-zyZ_j0yY.js.map +0 -1
- package/dist/bridge-DoUrmBw9.js.map +0 -1
- package/dist/ipc-2Xbxe7uu.js +0 -35
- package/dist/ipc-2Xbxe7uu.js.map +0 -1
- package/dist/load-agents-C1m5Y9n_.js.map +0 -1
- package/dist/run-foreground-PSOzCSP8.js +0 -2
- package/dist/run-foreground-mvTzCScX.js.map +0 -1
- 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 {
|
|
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.
|
|
@@ -437,7 +444,8 @@ const AgentSpec = object({
|
|
|
437
444
|
fastMode: boolean().optional(),
|
|
438
445
|
permissionMode: string().optional(),
|
|
439
446
|
workspace: AgentWorkspace.optional(),
|
|
440
|
-
env: record(string(), string()).optional()
|
|
447
|
+
env: record(string(), string()).optional(),
|
|
448
|
+
mcpServers: array(string()).default([])
|
|
441
449
|
});
|
|
442
450
|
const AgentLaunch = object({
|
|
443
451
|
agentId: string().uuid(),
|
|
@@ -1041,6 +1049,15 @@ const UsageReport = object({
|
|
|
1041
1049
|
* daemons report the full snapshot instead; the CP keeps accepting the old
|
|
1042
1050
|
* frame from older daemons.
|
|
1043
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
|
+
});
|
|
1044
1061
|
const FactsRuntimeProfile = object({
|
|
1045
1062
|
runtime: string(),
|
|
1046
1063
|
version: string(),
|
|
@@ -1052,7 +1069,27 @@ const FactsRuntimeProfile = object({
|
|
|
1052
1069
|
"none"
|
|
1053
1070
|
]),
|
|
1054
1071
|
acpProtocolVersion: number().int().optional(),
|
|
1055
|
-
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()
|
|
1056
1093
|
});
|
|
1057
1094
|
/**
|
|
1058
1095
|
* Full snapshot of the daemon's installed runtimes — D→C EVT (protocol §7.3a),
|
|
@@ -1062,7 +1099,10 @@ const FactsRuntimeProfile = object({
|
|
|
1062
1099
|
* that are no longer installed. Idempotent (latest-wins). Supersedes the
|
|
1063
1100
|
* per-runtime `facts/runtime-profile` upsert.
|
|
1064
1101
|
*/
|
|
1065
|
-
const DaemonRuntimes = object({
|
|
1102
|
+
const DaemonRuntimes = object({
|
|
1103
|
+
runtimes: array(FactsRuntimeProfile),
|
|
1104
|
+
mcpServers: array(FactsMcpServer).default([])
|
|
1105
|
+
});
|
|
1066
1106
|
/** Non-secret config update — C→D EVT, protocol §8.3 / frame #26. */
|
|
1067
1107
|
const ConfigPush = object({ keys: record(string(), unknown()) });
|
|
1068
1108
|
/** Fleet: drain+exit, supervisor restarts — C→D REQ, protocol §8.3 / frame #27. */
|
|
@@ -10281,6 +10321,7 @@ var AcpHost = class {
|
|
|
10281
10321
|
lastFastOption = null;
|
|
10282
10322
|
sessionConfigs = /* @__PURE__ */ new Map();
|
|
10283
10323
|
negotiatedProtocolVersion;
|
|
10324
|
+
mcpCaps = null;
|
|
10284
10325
|
constructor(runtime, opts) {
|
|
10285
10326
|
this.runtime = runtime;
|
|
10286
10327
|
this.opts = opts;
|
|
@@ -10337,7 +10378,12 @@ var AcpHost = class {
|
|
|
10337
10378
|
this.negotiatedProtocolVersion = init.protocolVersion;
|
|
10338
10379
|
this.canLoad = init.agentCapabilities?.loadSession ?? false;
|
|
10339
10380
|
this.promptCaps = init.agentCapabilities?.promptCapabilities ?? {};
|
|
10340
|
-
|
|
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})`);
|
|
10341
10387
|
}
|
|
10342
10388
|
/** Whether the agent advertised support for a gated prompt content-block kind.
|
|
10343
10389
|
* `text` and `resource_link` are baseline and always return true. */
|
|
@@ -10489,6 +10535,12 @@ var AcpHost = class {
|
|
|
10489
10535
|
acpProtocolVersion() {
|
|
10490
10536
|
return this.negotiatedProtocolVersion;
|
|
10491
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
|
+
}
|
|
10492
10544
|
/** True iff THIS agent process created or loaded `sessionId` in its current lifetime. */
|
|
10493
10545
|
hasSession(sessionId) {
|
|
10494
10546
|
return this.live.has(sessionId);
|
|
@@ -10499,16 +10551,17 @@ var AcpHost = class {
|
|
|
10499
10551
|
}
|
|
10500
10552
|
/** Resume a previously-created session by id (ACP `session/load`). The agent
|
|
10501
10553
|
* restores its own history server-side; its replayed session/update stream is
|
|
10502
|
-
* suppressed so it isn't re-posted.
|
|
10503
|
-
*
|
|
10504
|
-
|
|
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) {
|
|
10505
10558
|
this.loadingSessions.add(sessionId);
|
|
10506
10559
|
try {
|
|
10507
10560
|
const _meta = claudeSessionMeta(effortOverride ?? this.opts.configPrefs?.reasoningEffort, this.isClaudeRuntime(), this.opts.configPrefs?.systemPrompt);
|
|
10508
10561
|
const res = await this.conn.agent.request(methods.agent.session.load, {
|
|
10509
10562
|
sessionId,
|
|
10510
10563
|
cwd,
|
|
10511
|
-
mcpServers
|
|
10564
|
+
mcpServers,
|
|
10512
10565
|
..._meta ? { _meta } : {}
|
|
10513
10566
|
});
|
|
10514
10567
|
this.live.add(sessionId);
|
|
@@ -10565,6 +10618,6 @@ var AcpHost = class {
|
|
|
10565
10618
|
}
|
|
10566
10619
|
};
|
|
10567
10620
|
//#endregion
|
|
10568
|
-
export {
|
|
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 };
|
|
10569
10622
|
|
|
10570
|
-
//# sourceMappingURL=acp-host-
|
|
10623
|
+
//# sourceMappingURL=acp-host-DE2r7uCO.js.map
|