@moxt-ai/mobius 0.0.317 → 0.0.319
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/adapter/agent-initialization.d.ts.map +1 -1
- package/dist/acp/adapter/agent-initialization.js +7 -12
- package/dist/acp/adapter/agent-initialization.js.map +1 -1
- package/dist/acp/adapter/claude/agent-connection.d.ts +6 -0
- package/dist/acp/adapter/claude/agent-connection.d.ts.map +1 -0
- package/dist/acp/adapter/claude/agent-connection.js +15 -0
- package/dist/acp/adapter/claude/agent-connection.js.map +1 -0
- package/dist/acp/adapter/codex/agent-connection.d.ts +6 -0
- package/dist/acp/adapter/codex/agent-connection.d.ts.map +1 -0
- package/dist/acp/adapter/codex/agent-connection.js +15 -0
- package/dist/acp/adapter/codex/agent-connection.js.map +1 -0
- package/dist/acp/adapter/pi/agent-connection.d.ts +6 -0
- package/dist/acp/adapter/pi/agent-connection.d.ts.map +1 -0
- package/dist/acp/adapter/pi/agent-connection.js +15 -0
- package/dist/acp/adapter/pi/agent-connection.js.map +1 -0
- package/dist/acp/adapter/session-events.d.ts +1 -1
- package/dist/acp/adapter/session-events.d.ts.map +1 -1
- package/dist/acp/adapter/session-events.js +12 -11
- package/dist/acp/adapter/session-events.js.map +1 -1
- package/dist/acp/agent/agent-definition.d.ts +9 -21
- package/dist/acp/agent/agent-definition.d.ts.map +1 -1
- package/dist/acp/agent/agent-definition.js +11 -31
- package/dist/acp/agent/agent-definition.js.map +1 -1
- package/dist/acp/connection/agent-connection.d.ts +18 -10
- package/dist/acp/connection/agent-connection.d.ts.map +1 -1
- package/dist/acp/connection/agent-connection.js +1 -231
- package/dist/acp/connection/agent-connection.js.map +1 -1
- package/dist/acp/connection/agent-operation.d.ts +4 -0
- package/dist/acp/connection/agent-operation.d.ts.map +1 -0
- package/dist/acp/connection/agent-operation.js +57 -0
- package/dist/acp/connection/agent-operation.js.map +1 -0
- package/dist/acp/connection/endpoint-agent-connection.d.ts +28 -0
- package/dist/acp/connection/endpoint-agent-connection.d.ts.map +1 -0
- package/dist/acp/connection/endpoint-agent-connection.js +31 -0
- package/dist/acp/connection/endpoint-agent-connection.js.map +1 -0
- package/dist/agent/discovery/acp-readiness-probe.d.ts +1 -0
- package/dist/agent/discovery/acp-readiness-probe.d.ts.map +1 -1
- package/dist/agent/discovery/acp-readiness-probe.js +29 -188
- package/dist/agent/discovery/acp-readiness-probe.js.map +1 -1
- package/dist/agent/discovery/discover-agent.d.ts.map +1 -1
- package/dist/agent/discovery/discover-agent.js +4 -6
- package/dist/agent/discovery/discover-agent.js.map +1 -1
- package/dist/agent/discovery/executable-discovery.d.ts +1 -1
- package/dist/agent/discovery/executable-discovery.d.ts.map +1 -1
- package/dist/agent/discovery/executable-discovery.js +1 -6
- package/dist/agent/discovery/executable-discovery.js.map +1 -1
- package/dist/agent/specification/agent-specification.d.ts +3 -9
- package/dist/agent/specification/agent-specification.d.ts.map +1 -1
- package/dist/agent/specification/agent-specification.js +1 -12
- package/dist/agent/specification/agent-specification.js.map +1 -1
- package/dist/agent/specification/vendors/claude-code-agent.d.ts +2 -2
- package/dist/agent/specification/vendors/claude-code-agent.d.ts.map +1 -1
- package/dist/agent/specification/vendors/claude-code-agent.js +2 -2
- package/dist/agent/specification/vendors/claude-code-agent.js.map +1 -1
- package/dist/agent/specification/vendors/codex-agent.d.ts +2 -2
- package/dist/agent/specification/vendors/codex-agent.d.ts.map +1 -1
- package/dist/agent/specification/vendors/codex-agent.js +2 -2
- package/dist/agent/specification/vendors/codex-agent.js.map +1 -1
- package/dist/agent/specification/vendors/pi-agent.d.ts +2 -2
- package/dist/agent/specification/vendors/pi-agent.d.ts.map +1 -1
- package/dist/agent/specification/vendors/pi-agent.js +2 -2
- package/dist/agent/specification/vendors/pi-agent.js.map +1 -1
- package/dist/cli/handler/agents/logic/agent-diagnostics.d.ts.map +1 -1
- package/dist/cli/handler/agents/logic/agent-diagnostics.js +1 -4
- package/dist/cli/handler/agents/logic/agent-diagnostics.js.map +1 -1
- package/dist/cli.js +584 -862
- package/dist/cli.js.map +4 -4
- package/dist/runtime/catalog/resolve-catalog-agent.js +6 -3
- package/dist/runtime/catalog/resolve-catalog-agent.js.map +1 -1
- package/dist/runtime.d.ts +3 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +308 -611
- package/dist/runtime.js.map +4 -4
- package/dist/session/settings/discover-agent-settings.js +1 -1
- package/dist/session/settings/discover-agent-settings.js.map +1 -1
- package/dist/session/turn/session-turns.d.ts +7 -0
- package/dist/session/turn/session-turns.d.ts.map +1 -1
- package/dist/session/turn/session-turns.js +1 -0
- package/dist/session/turn/session-turns.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { acpEndpointTerminationError } from "../../acp/agent/in-process-endpoint.js";
|
|
4
|
-
import { createAcpClient } from "../../acp/connection/create-client.js";
|
|
1
|
+
import { methods, PROTOCOL_VERSION, } from "@agentclientprotocol/sdk";
|
|
2
|
+
import { AcpExecutionError } from "../../acp/acp-error.js";
|
|
5
3
|
import { normalizeAcpCapabilities } from "../../acp/protocol/session-capabilities.js";
|
|
6
|
-
import { captureProcessTree, executableLaunch, platformSpawnOptions, stopProcessTree, } from "../../util/process/executable.js";
|
|
7
4
|
import { AgentProbeError } from "./agent-probe-error.js";
|
|
8
5
|
import { normalizeVersionOutput } from "./version-output.js";
|
|
9
|
-
const ACP_OUTPUT_LIMIT_BYTES = 1024 * 1024;
|
|
10
6
|
export class VerifiedAcpReadiness {
|
|
11
7
|
adapterVersion;
|
|
12
8
|
capabilities;
|
|
@@ -21,106 +17,6 @@ class DiscoveryAcpHandler {
|
|
|
21
17
|
onPermission = (_request, _signal) => Promise.reject(new Error("ACP probe does not grant permissions"));
|
|
22
18
|
onUpdate = (_notification) => Promise.resolve();
|
|
23
19
|
}
|
|
24
|
-
function readableAcpStream(input) {
|
|
25
|
-
let byteLength = 0;
|
|
26
|
-
let open = true;
|
|
27
|
-
return new ReadableStream({
|
|
28
|
-
start(controller) {
|
|
29
|
-
input.on("data", (chunk) => {
|
|
30
|
-
if (!open) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (!(chunk instanceof Uint8Array)) {
|
|
34
|
-
open = false;
|
|
35
|
-
controller.error(new Error("ACP adapter produced invalid output"));
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
byteLength += chunk.byteLength;
|
|
39
|
-
if (byteLength > ACP_OUTPUT_LIMIT_BYTES) {
|
|
40
|
-
open = false;
|
|
41
|
-
controller.error(new Error("ACP adapter output limit exceeded"));
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
controller.enqueue(new Uint8Array(chunk));
|
|
45
|
-
});
|
|
46
|
-
input.once("end", () => {
|
|
47
|
-
if (open) {
|
|
48
|
-
open = false;
|
|
49
|
-
controller.close();
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
input.once("error", (error) => {
|
|
53
|
-
if (open) {
|
|
54
|
-
open = false;
|
|
55
|
-
controller.error(error);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
},
|
|
59
|
-
cancel() {
|
|
60
|
-
open = false;
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
function writableAcpStream(output) {
|
|
65
|
-
return new WritableStream({
|
|
66
|
-
write(chunk) {
|
|
67
|
-
return new Promise((resolveWrite, rejectWrite) => {
|
|
68
|
-
output.write(chunk, (error) => {
|
|
69
|
-
if (error) {
|
|
70
|
-
rejectWrite(error);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
resolveWrite();
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
},
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Probes an in-process agent by running the real ACP conversation against it: Mobius starts the
|
|
81
|
-
* vendor's app-server, initializes it, and performs the same `initialize` handshake the daemon will.
|
|
82
|
-
* There is no adapter executable to spawn, so the probe exercises the code that will serve sessions.
|
|
83
|
-
*/
|
|
84
|
-
async function probeInProcessReadiness(specification, agent, environment, defaultWorkspace, controller) {
|
|
85
|
-
const handler = new DiscoveryAcpHandler();
|
|
86
|
-
const inProcess = agent.createEndpoint({
|
|
87
|
-
command: agent.command,
|
|
88
|
-
cwd: defaultWorkspace,
|
|
89
|
-
environment: { ...filterEnvironment(environment), ...agent.environment },
|
|
90
|
-
onSessionUpdate: handler.onUpdate,
|
|
91
|
-
});
|
|
92
|
-
try {
|
|
93
|
-
const connection = createAcpClient(handler).connect(inProcess.app());
|
|
94
|
-
try {
|
|
95
|
-
return await Promise.race([
|
|
96
|
-
(async () => {
|
|
97
|
-
await inProcess.initialize(controller.signal);
|
|
98
|
-
const initialized = await connection.agent.request(methods.agent.initialize, {
|
|
99
|
-
clientCapabilities: {},
|
|
100
|
-
clientInfo: { name: "mobius", version: "0.0.3" },
|
|
101
|
-
protocolVersion: PROTOCOL_VERSION,
|
|
102
|
-
}, { cancellationSignal: controller.signal });
|
|
103
|
-
if (initialized.protocolVersion !== PROTOCOL_VERSION) {
|
|
104
|
-
throw new AgentProbeError("acp_incompatible", "ACP agent selected an unsupported protocol version");
|
|
105
|
-
}
|
|
106
|
-
await specification.verifyAcp(connection, initialized, defaultWorkspace, controller.signal);
|
|
107
|
-
return new VerifiedAcpReadiness(normalizeVersionOutput(initialized.agentInfo?.version ?? ""), normalizeAcpCapabilities(initialized));
|
|
108
|
-
})(),
|
|
109
|
-
inProcess.terminated.then((termination) => {
|
|
110
|
-
throw new AgentProbeError("acp_incompatible", "The ACP endpoint stopped during initialization", {
|
|
111
|
-
cause: acpEndpointTerminationError(termination),
|
|
112
|
-
});
|
|
113
|
-
}),
|
|
114
|
-
]);
|
|
115
|
-
}
|
|
116
|
-
finally {
|
|
117
|
-
connection.close();
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
finally {
|
|
121
|
-
await inProcess.close();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
20
|
function filterEnvironment(environment) {
|
|
125
21
|
const filtered = {};
|
|
126
22
|
for (const [name, value] of Object.entries(environment)) {
|
|
@@ -130,6 +26,7 @@ function filterEnvironment(environment) {
|
|
|
130
26
|
}
|
|
131
27
|
return filtered;
|
|
132
28
|
}
|
|
29
|
+
/** Exercises the same adapter-owned connection used by sessions, with a bounded probe lifetime. */
|
|
133
30
|
export async function probeAcpReadiness(specification, agent, environment, defaultWorkspace, signal) {
|
|
134
31
|
signal.throwIfAborted();
|
|
135
32
|
const controller = new AbortController();
|
|
@@ -143,106 +40,50 @@ export async function probeAcpReadiness(specification, agent, environment, defau
|
|
|
143
40
|
if (signal.aborted) {
|
|
144
41
|
abort();
|
|
145
42
|
}
|
|
146
|
-
|
|
43
|
+
try {
|
|
44
|
+
const runtime = agent
|
|
45
|
+
.withEnvironment({ ...filterEnvironment(environment), ...agent.environment })
|
|
46
|
+
.createConnection({
|
|
47
|
+
cwd: defaultWorkspace,
|
|
48
|
+
client: new DiscoveryAcpHandler(),
|
|
49
|
+
});
|
|
147
50
|
try {
|
|
148
|
-
return await
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
error.code === -32_000 &&
|
|
162
|
-
specification.authenticationCommand().length > 0) {
|
|
163
|
-
throw new AgentProbeError("authentication_required", "Agent authentication is required", {
|
|
164
|
-
cause: error,
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
throw new AgentProbeError("acp_incompatible", "ACP agent initialization failed", { cause: error });
|
|
51
|
+
return await runtime.race((async () => {
|
|
52
|
+
await runtime.initialize(controller.signal);
|
|
53
|
+
const initialized = await runtime.connection.agent.request(methods.agent.initialize, {
|
|
54
|
+
clientCapabilities: {},
|
|
55
|
+
clientInfo: { name: "mobius", version: "0.0.3" },
|
|
56
|
+
protocolVersion: PROTOCOL_VERSION,
|
|
57
|
+
}, { cancellationSignal: controller.signal });
|
|
58
|
+
if (initialized.protocolVersion !== PROTOCOL_VERSION) {
|
|
59
|
+
throw new AgentProbeError("acp_incompatible", "ACP agent selected an unsupported protocol version");
|
|
60
|
+
}
|
|
61
|
+
await specification.verifyAcp(runtime.connection, initialized, defaultWorkspace, controller.signal);
|
|
62
|
+
return new VerifiedAcpReadiness(normalizeVersionOutput(initialized.agentInfo?.version ?? ""), normalizeAcpCapabilities(initialized));
|
|
63
|
+
})(), "The ACP endpoint stopped during initialization", controller.signal);
|
|
168
64
|
}
|
|
169
65
|
finally {
|
|
170
|
-
|
|
171
|
-
signal.removeEventListener("abort", abort);
|
|
66
|
+
await runtime.closeProcess();
|
|
172
67
|
}
|
|
173
68
|
}
|
|
174
|
-
const launch = executableLaunch(agent.adapterPath, agent.arguments);
|
|
175
|
-
const child = spawn(launch.command, [...launch.arguments], {
|
|
176
|
-
cwd: defaultWorkspace,
|
|
177
|
-
...platformSpawnOptions,
|
|
178
|
-
env: { ...environment, ...agent.environment },
|
|
179
|
-
shell: false,
|
|
180
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
181
|
-
});
|
|
182
|
-
const processExit = new Promise((_resolve, reject) => {
|
|
183
|
-
const rejectExit = () => reject(new Error("ACP adapter exited during initialization"));
|
|
184
|
-
child.once("error", reject);
|
|
185
|
-
child.once("exit", rejectExit);
|
|
186
|
-
if (child.exitCode !== null || child.signalCode !== null) {
|
|
187
|
-
rejectExit();
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
const stdin = child.stdin;
|
|
191
|
-
const stdout = child.stdout;
|
|
192
|
-
const stderr = child.stderr;
|
|
193
|
-
if (stdin === null || stdout === null || stderr === null) {
|
|
194
|
-
await stopProcessTree(child);
|
|
195
|
-
throw new AgentProbeError("acp_incompatible", "ACP adapter streams are unavailable");
|
|
196
|
-
}
|
|
197
|
-
let stderrBytes = 0;
|
|
198
|
-
const consumeStderr = (chunk) => {
|
|
199
|
-
stderrBytes += chunk.byteLength;
|
|
200
|
-
if (stderrBytes > ACP_OUTPUT_LIMIT_BYTES) {
|
|
201
|
-
controller.abort(new Error("ACP adapter output limit exceeded"));
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
stderr.on("data", consumeStderr);
|
|
205
|
-
const connection = createAcpClient(new DiscoveryAcpHandler()).connect(ndJsonStream(writableAcpStream(stdin), readableAcpStream(stdout)));
|
|
206
|
-
try {
|
|
207
|
-
const initialized = await Promise.race([
|
|
208
|
-
connection.agent.request(methods.agent.initialize, {
|
|
209
|
-
clientCapabilities: {},
|
|
210
|
-
clientInfo: { name: "mobius", version: "0.0.3" },
|
|
211
|
-
protocolVersion: PROTOCOL_VERSION,
|
|
212
|
-
}, { cancellationSignal: controller.signal }),
|
|
213
|
-
processExit,
|
|
214
|
-
]);
|
|
215
|
-
if (initialized.protocolVersion !== PROTOCOL_VERSION) {
|
|
216
|
-
throw new AgentProbeError("acp_incompatible", "ACP adapter selected an unsupported protocol version");
|
|
217
|
-
}
|
|
218
|
-
await specification.verifyAcp(connection, initialized, defaultWorkspace, controller.signal);
|
|
219
|
-
return new VerifiedAcpReadiness(normalizeVersionOutput(initialized.agentInfo?.version ?? ""), normalizeAcpCapabilities(initialized));
|
|
220
|
-
}
|
|
221
69
|
catch (error) {
|
|
222
|
-
|
|
223
|
-
signal.throwIfAborted();
|
|
224
|
-
}
|
|
70
|
+
signal.throwIfAborted();
|
|
225
71
|
if (timedOut) {
|
|
226
|
-
throw new AgentProbeError("adapter_probe_timeout", "ACP
|
|
72
|
+
throw new AgentProbeError("adapter_probe_timeout", "ACP agent probe timed out", { cause: error });
|
|
227
73
|
}
|
|
228
74
|
if (error instanceof AgentProbeError) {
|
|
229
75
|
throw error;
|
|
230
76
|
}
|
|
231
|
-
if (error instanceof
|
|
232
|
-
error.code ===
|
|
77
|
+
if (error instanceof AcpExecutionError &&
|
|
78
|
+
error.code === "authentication_required" &&
|
|
233
79
|
specification.authenticationCommand().length > 0) {
|
|
234
80
|
throw new AgentProbeError("authentication_required", "Agent authentication is required", { cause: error });
|
|
235
81
|
}
|
|
236
|
-
throw new AgentProbeError("acp_incompatible", "ACP
|
|
82
|
+
throw new AgentProbeError("acp_incompatible", "ACP agent initialization failed", { cause: error });
|
|
237
83
|
}
|
|
238
84
|
finally {
|
|
239
85
|
clearTimeout(timeout);
|
|
240
86
|
signal.removeEventListener("abort", abort);
|
|
241
|
-
const capturedProcesses = await captureProcessTree(child);
|
|
242
|
-
connection.close();
|
|
243
|
-
stdin.end();
|
|
244
|
-
stderr.removeListener("data", consumeStderr);
|
|
245
|
-
await stopProcessTree(child, capturedProcesses);
|
|
246
87
|
}
|
|
247
88
|
}
|
|
248
89
|
//# sourceMappingURL=acp-readiness-probe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acp-readiness-probe.js","sourceRoot":"","sources":["../../../src/agent/discovery/acp-readiness-probe.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"acp-readiness-probe.js","sourceRoot":"","sources":["../../../src/agent/discovery/acp-readiness-probe.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,OAAO,EACP,gBAAgB,GAInB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAG3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,OAAO,oBAAoB;IACpB,cAAc,CAAS;IACvB,YAAY,CAAsB;IAE3C,YAAY,cAAsB,EAAE,YAAiC;QACjE,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACrC,CAAC;CACJ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AAC,CAAC;gBACpG,OAAO,IAAI,oBAAoB,CAC3B,sBAAsB,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,IAAI,EAAE,CAAC,EAC5D,wBAAwB,CAAC,WAAW,CAAC,CACxC,CAAC;YACN,CAAC,CAAC,EAAE,EACJ,gDAAgD,EAChD,UAAU,CAAC,MAAM,CACpB,CAAC;QACN,CAAC;gBAAS,CAAC;YACP,MAAM,OAAO,CAAC,YAAY,EAAE,CAAC;QACjC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,CAAC,cAAc,EAAE,CAAC;QACxB,IAAI,QAAQ,EAAE,CAAC;YACX,MAAM,IAAI,eAAe,CAAC,uBAAuB,EAAE,2BAA2B,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QACtG,CAAC;QACD,IAAI,KAAK,YAAY,eAAe,EAAE,CAAC;YACnC,MAAM,KAAK,CAAC;QAChB,CAAC;QACD,IACI,KAAK,YAAY,iBAAiB;YAClC,KAAK,CAAC,IAAI,KAAK,yBAAyB;YACxC,aAAa,CAAC,qBAAqB,EAAE,CAAC,MAAM,GAAG,CAAC,EAClD,CAAC;YACC,MAAM,IAAI,eAAe,CAAC,yBAAyB,EAAE,kCAAkC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAC/G,CAAC;QACD,MAAM,IAAI,eAAe,CAAC,kBAAkB,EAAE,iCAAiC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACvG,CAAC;YAAS,CAAC;QACP,YAAY,CAAC,OAAO,CAAC,CAAC;QACtB,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover-agent.d.ts","sourceRoot":"","sources":["../../../src/agent/discovery/discover-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"discover-agent.d.ts","sourceRoot":"","sources":["../../../src/agent/discovery/discover-agent.ts"],"names":[],"mappings":"AAIA,OAAO,EAAkC,KAAK,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAEvH,OAAO,EACH,KAAK,cAAc,EAUtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAyD/E,wBAAsB,aAAa,CAC/B,aAAa,EAAE,uBAAuB,EACtC,OAAO,EAAE,0BAA0B,GACpC,OAAO,CAAC,cAAc,CAAC,CA2IzB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AcpAgentDefinition } from "../../acp/agent/agent-definition.js";
|
|
2
2
|
import { unsupportedSessionCapabilities } from "../../acp/protocol/session-capabilities.js";
|
|
3
3
|
import { ProcessExecutionError } from "../../util/process/executable.js";
|
|
4
|
-
import {
|
|
4
|
+
import { InProcessAcpAgentSpecification } from "../specification/agent-specification.js";
|
|
5
5
|
import { probeAcpReadiness } from "./acp-readiness-probe.js";
|
|
6
6
|
import { AgentProbeFailed, AuthenticationRequiredAgent, AvailableAgent, IncompatibleAdapter, IntegrationProbeFailed, MissingAdapter, MissingAgent, UnsupportedAgentVersion, } from "./agent-discovery.js";
|
|
7
7
|
import { AgentProbeError } from "./agent-probe-error.js";
|
|
@@ -93,7 +93,7 @@ export async function discoverAgent(specification, context) {
|
|
|
93
93
|
return new MissingAdapter(specification);
|
|
94
94
|
}
|
|
95
95
|
for (const adapter of adapters) {
|
|
96
|
-
if (
|
|
96
|
+
if (adapter.path !== agent.path) {
|
|
97
97
|
continue;
|
|
98
98
|
}
|
|
99
99
|
let adapterVersion = "";
|
|
@@ -114,9 +114,7 @@ export async function discoverAgent(specification, context) {
|
|
|
114
114
|
lastFailure = integrationProbeFailure(specification, error);
|
|
115
115
|
continue;
|
|
116
116
|
}
|
|
117
|
-
const buildDefinition = (verifiedAdapterVersion, capabilities) => specification instanceof InProcessAcpAgentSpecification
|
|
118
|
-
? new InProcessAgentDefinition(specification.id, specification.label, agent.path, specification.createEndpoint, launchEnvironment, agentVersion.length > 0 ? agentVersion : verifiedAdapterVersion, agent.identity, capabilities)
|
|
119
|
-
: new LocalAgentDefinition(specification.id, specification.label, adapter.path, specification.launchArguments, launchEnvironment, verifiedAdapterVersion, agentVersion, adapter.identity, agent.identity, capabilities);
|
|
117
|
+
const buildDefinition = (verifiedAdapterVersion, capabilities) => new AcpAgentDefinition(specification.id, specification.label, agent.path, specification.createConnection, launchEnvironment, agentVersion.length > 0 ? agentVersion : verifiedAdapterVersion, agent.identity, capabilities, specification instanceof InProcessAcpAgentSpecification ? agentVersion : verifiedAdapterVersion);
|
|
120
118
|
try {
|
|
121
119
|
const readiness = await probeWithRetry(context.signal, async () => await probeAcpReadiness(specification, buildDefinition(adapterVersion, unsupportedSessionCapabilities()), context.environment, context.defaultWorkspace, context.signal));
|
|
122
120
|
const verifiedAdapterVersion = adapterVersion.length > 0 ? adapterVersion : readiness.adapterVersion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover-agent.js","sourceRoot":"","sources":["../../../src/agent/discovery/discover-agent.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"discover-agent.js","sourceRoot":"","sources":["../../../src/agent/discovery/discover-agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAgC,MAAM,yCAAyC,CAAC;AACvH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAEH,gBAAgB,EAChB,2BAA2B,EAC3B,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,YAA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AC;gBACnB,CAAC;gBACD,WAAW,GAAG,OAAO,CAAC;YAC1B,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO,WAAW,IAAI,IAAI,YAAY,CAAC,aAAa,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ResolvedExecutable } from "../../util/process/executable.ts";
|
|
2
|
-
import {
|
|
2
|
+
import type { LocalAgentSpecification } from "../specification/agent-specification.ts";
|
|
3
3
|
import type { LocalAgentDiscoveryContext } from "./agent-discovery-context.ts";
|
|
4
4
|
export declare function resolveAgentExecutables(specification: LocalAgentSpecification, context: LocalAgentDiscoveryContext): Promise<readonly ResolvedExecutable[]>;
|
|
5
5
|
export declare function resolveAdapterExecutables(specification: LocalAgentSpecification, context: LocalAgentDiscoveryContext): Promise<readonly ResolvedExecutable[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executable-discovery.d.ts","sourceRoot":"","sources":["../../../src/agent/discovery/executable-discovery.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,KAAK,kBAAkB,EAG1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"executable-discovery.d.ts","sourceRoot":"","sources":["../../../src/agent/discovery/executable-discovery.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,KAAK,kBAAkB,EAG1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AACvF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAkC/E,wBAAsB,uBAAuB,CACzC,aAAa,EAAE,uBAAuB,EACtC,OAAO,EAAE,0BAA0B,GACpC,OAAO,CAAC,SAAS,kBAAkB,EAAE,CAAC,CAOxC;AAED,wBAAsB,yBAAyB,CAC3C,aAAa,EAAE,uBAAuB,EACtC,OAAO,EAAE,0BAA0B,GACpC,OAAO,CAAC,SAAS,kBAAkB,EAAE,CAAC,CAExC;AAED,wBAAsB,sBAAsB,CACxC,aAAa,EAAE,uBAAuB,EACtC,OAAO,EAAE,0BAA0B,GACpC,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAGpC;AAED,wBAAsB,wBAAwB,CAC1C,aAAa,EAAE,uBAAuB,EACtC,OAAO,EAAE,0BAA0B,GACpC,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAGpC;AAED,wBAAsB,YAAY,CAC9B,UAAU,EAAE,kBAAkB,EAC9B,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,EACxC,gBAAgB,EAAE,MAAM,EACxB,MAAM,EAAE,WAAW,EACnB,mBAAmB,EAAE,MAAM,EAC3B,SAAS,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAA+B,GAC/D,OAAO,CAAC,MAAM,CAAC,CAcjB;AAED,qBAAa,uBAAuB;IAChC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,YAAY,UAAU,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,EAG1D;CACJ;AAED,wBAAsB,2BAA2B,CAC7C,aAAa,EAAE,uBAAuB,EACtC,OAAO,EAAE,0BAA0B,GACpC,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAqBzC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { isAbsolute } from "node:path";
|
|
2
2
|
import { findExecutableOnPath, ProcessExecutionError, resolveExecutablePath, runBoundedProcess, } from "../../util/process/executable.js";
|
|
3
|
-
import { DirectAcpAgentSpecification, InProcessAcpAgentSpecification, } from "../specification/agent-specification.js";
|
|
4
3
|
import { normalizeVersionOutput } from "./version-output.js";
|
|
5
4
|
async function resolveSpecificationExecutables(executableName, overrideVariable, resolveInstalled, context) {
|
|
6
5
|
const override = context.environment[overrideVariable];
|
|
@@ -31,11 +30,7 @@ export async function resolveAgentExecutables(specification, context) {
|
|
|
31
30
|
return await resolveSpecificationExecutables(specification.agentExecutable, specification.agentOverrideVariable, async () => await specification.resolveInstalledAgentExecutables(context), context);
|
|
32
31
|
}
|
|
33
32
|
export async function resolveAdapterExecutables(specification, context) {
|
|
34
|
-
|
|
35
|
-
specification instanceof InProcessAcpAgentSpecification) {
|
|
36
|
-
return await resolveAgentExecutables(specification, context);
|
|
37
|
-
}
|
|
38
|
-
throw new Error("Unsupported local Agent execution topology");
|
|
33
|
+
return await resolveAgentExecutables(specification, context);
|
|
39
34
|
}
|
|
40
35
|
export async function resolveAgentExecutable(specification, context) {
|
|
41
36
|
const executables = await resolveAgentExecutables(specification, context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executable-discovery.js","sourceRoot":"","sources":["../../../src/agent/discovery/executable-discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACH,oBAAoB,EACpB,qBAAqB,EAErB,qBAAqB,EACrB,iBAAiB,GACpB,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"executable-discovery.js","sourceRoot":"","sources":["../../../src/agent/discovery/executable-discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACH,oBAAoB,EACpB,qBAAqB,EAErB,qBAAqB,EACrB,iBAAiB,GACpB,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,KAAK,UAAU,+BAA+B,CAC1C,cAAsB,EACtB,gBAAwB,EACxB,gBAA8D,EAC9D,OAAmC;IAEnC,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IACvD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QACzB,IAAI,QAAQ,CAAC,MA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OAAO,CAAS;IAEzB,YAAY,UAA8B,EAAE,OAAe;QACvD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;CACJ;AAED,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC7C,aAAsC,EACtC,OAAmC;IAEnC,MAAM,WAAW,GAAG,MAAM,uBAAuB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAC1E,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACnC,IAAI,CAAC;YACD,MAAM,OAAO,GAAG,MAAM,YAAY,CAC9B,UAAU,EACV,aAAa,CAAC,qBAAqB,EACnC,OAAO,CAAC,WAAW,EACnB,OAAO,CAAC,gBAAgB,EACxB,OAAO,CAAC,MAAM,EACd,aAAa,CAAC,+BAA+B,EAC7C,aAAa,CAAC,qBAAqB,CACtC,CAAC;YACF,OAAO,IAAI,uBAAuB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAC5D,CAAC;QAAC,MAAM,CAAC;YACL,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACzB,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YACpC,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { ClientConnection, InitializeResponse } from "@agentclientprotocol/sdk";
|
|
2
|
-
import type {
|
|
2
|
+
import type { AgentConnectionFactory } from "../../acp/connection/agent-connection.ts";
|
|
3
3
|
import type { ResolvedExecutable } from "../../util/process/executable.ts";
|
|
4
4
|
import type { LocalAgentDiscoveryContext } from "../discovery/agent-discovery-context.ts";
|
|
5
5
|
import { normalizeVersionOutput } from "../discovery/version-output.ts";
|
|
6
6
|
export declare abstract class LocalAgentSpecification {
|
|
7
|
+
abstract readonly createConnection: AgentConnectionFactory;
|
|
7
8
|
abstract readonly adapterOverrideVariable: string;
|
|
8
9
|
abstract readonly adapterVersion: string;
|
|
9
10
|
abstract readonly agentExecutable: string;
|
|
@@ -25,24 +26,17 @@ export declare abstract class LocalAgentSpecification {
|
|
|
25
26
|
readonly resolveInstalledAgentExecutables: (_context: LocalAgentDiscoveryContext) => Promise<readonly ResolvedExecutable[]>;
|
|
26
27
|
readonly verifyAcp: (_connection: ClientConnection, _initialized: InitializeResponse, _defaultWorkspace: string, _signal: AbortSignal) => Promise<void>;
|
|
27
28
|
}
|
|
28
|
-
export declare abstract class DirectAcpAgentSpecification extends LocalAgentSpecification {
|
|
29
|
-
readonly adapterOverrideVariable: string;
|
|
30
|
-
readonly agentOverrideVariable: string;
|
|
31
|
-
readonly launchArguments: readonly string[];
|
|
32
|
-
protected constructor(executableOverrideVariable: string, launchArguments: readonly string[]);
|
|
33
|
-
}
|
|
34
29
|
/**
|
|
35
30
|
* A vendor CLI that does not speak ACP, which Mobius drives through the vendor's own protocol from an
|
|
36
31
|
* ACP Agent hosted inside the daemon. There is no adapter to install or version-probe: the same
|
|
37
32
|
* executable is both the Agent and the thing Mobius spawns, so it shares the Agent's override
|
|
38
33
|
* variable.
|
|
39
34
|
*
|
|
40
|
-
* `
|
|
35
|
+
* `createConnection` is the whole vendor contract. Discovery, the readiness probe, and the session
|
|
41
36
|
* manager use it without naming an Agent, so adding an in-process Agent stays a registration rather
|
|
42
37
|
* than an edit to generic code.
|
|
43
38
|
*/
|
|
44
39
|
export declare abstract class InProcessAcpAgentSpecification extends LocalAgentSpecification {
|
|
45
|
-
abstract readonly createEndpoint: InProcessAcpEndpointFactory;
|
|
46
40
|
readonly launchArguments: readonly string[];
|
|
47
41
|
readonly adapterOverrideVariable: string;
|
|
48
42
|
readonly adapterVersion = "in-process";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-specification.d.ts","sourceRoot":"","sources":["../../../src/agent/specification/agent-specification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBA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,qBAAqB,EAAE,SAAS,MAAM,EAAE,CAAiB;IAClE,QAAQ,CAAC,uBAAuB,gCAA0B;IAC1D,QAAQ,CAAC,qBAAqB,gCAA0B;IACxD,QAAQ,CAAC,+BAA+B,EAAE,MAAM,CAAsC;IAEtF,QAAQ,CAAC,uBAAuB,WACpB,kBAAkB,YAChB,0BAA0B,KACrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAsB;IAElE,QAAQ,CAAC,eAAe,QAAO,MAAM,CAAO;IAE5C,QAAQ,CAAC,gCAAgC,aAC3B,0BAA0B,KACrC,OAAO,CAAC,SAAS,kBAAkB,EAAE,CAAC,CAAwB;IAEjE,QAAQ,CAAC,SAAS,gBACD,gBAAgB,gBACf,kBAAkB,qBACb,MAAM,WAChB,WAAW,KACrB,OAAO,CAAC,IAAI,CAAC,CAAsB;CACzC;AAED;;;;;;;;;GASG;AACH,8BAAsB,8BAA+B,SAAQ,uBAAuB;IAChF,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAqB;IAChE,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,cAAc,gBAAgB;IACvC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC,SAAS,aAAa,0BAA0B,EAAE,MAAM,EAIvD;CACJ"}
|
|
@@ -21,24 +21,13 @@ export class LocalAgentSpecification {
|
|
|
21
21
|
resolveInstalledAgentExecutables = (_context) => Promise.resolve([]);
|
|
22
22
|
verifyAcp = (_connection, _initialized, _defaultWorkspace, _signal) => Promise.resolve();
|
|
23
23
|
}
|
|
24
|
-
export class DirectAcpAgentSpecification extends LocalAgentSpecification {
|
|
25
|
-
adapterOverrideVariable;
|
|
26
|
-
agentOverrideVariable;
|
|
27
|
-
launchArguments;
|
|
28
|
-
constructor(executableOverrideVariable, launchArguments) {
|
|
29
|
-
super();
|
|
30
|
-
this.adapterOverrideVariable = executableOverrideVariable;
|
|
31
|
-
this.agentOverrideVariable = executableOverrideVariable;
|
|
32
|
-
this.launchArguments = Object.freeze([...launchArguments]);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
24
|
/**
|
|
36
25
|
* A vendor CLI that does not speak ACP, which Mobius drives through the vendor's own protocol from an
|
|
37
26
|
* ACP Agent hosted inside the daemon. There is no adapter to install or version-probe: the same
|
|
38
27
|
* executable is both the Agent and the thing Mobius spawns, so it shares the Agent's override
|
|
39
28
|
* variable.
|
|
40
29
|
*
|
|
41
|
-
* `
|
|
30
|
+
* `createConnection` is the whole vendor contract. Discovery, the readiness probe, and the session
|
|
42
31
|
* manager use it without naming an Agent, so adding an in-process Agent stays a registration rather
|
|
43
32
|
* than an edit to generic code.
|
|
44
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-specification.js","sourceRoot":"","sources":["../../../src/agent/specification/agent-specification.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,kGAAkG;AAClG,mGAAmG;AACnG,qGAAqG;AACrG,qGAAqG;AACrG,mDAAmD;AACnD,MAAM,kCAAkC,GAAG,MAAM,CAAC;AAClD,MAAM,8BAA8B,GAAG,MAAM,CAAC;AAE9C,MAAM,OAAgB,uBAAuB;
|
|
1
|
+
{"version":3,"file":"agent-specification.js","sourceRoot":"","sources":["../../../src/agent/specification/agent-specification.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,kGAAkG;AAClG,mGAAmG;AACnG,qGAAqG;AACrG,qGAAqG;AACrG,mDAAmD;AACnD,MAAM,kCAAkC,GAAG,MAAM,CAAC;AAClD,MAAM,8BAA8B,GAAG,MAAM,CAAC;AAE9C,MAAM,OAAgB,uBAAuB;IAShC,4BAA4B,GAAW,OAAO,CAAC;IAC/C,yBAAyB,GAAW,OAAO,CAAC;IAC5C,2BAA2B,GAAW,8BAA8B,CAAC;IACrE,qBAAqB,GAAG,GAAW,EAAE,CAAC,EAAE,CAAC;IACzC,uBAAuB,GAAsB,CAAC,WAAW,CAAC,CAAC;IAC3D,qBAAqB,GAAsB,CAAC,WAAW,CAAC,CAAC;IACzD,uBAAuB,GAAG,sBAAsB,CAAC;IACjD,qBAAqB,GAAG,sBAAsB,CAAC;IAC/C,+BAA+B,GAAW,kCAAkC,CAAC;IAE7E,uBAAuB,GAAG,KAAK,EACpC,MAA0B,EAC1B,QAAoC,EACK,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAEzD,eAAe,GAAG,GAAW,EAAE,CAAC,EAAE,CAAC;IAEnC,gCAAgC,GAAG,CACxC,QAAoC,EACE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAExD,SAAS,GAAG,CACjB,WAA6B,EAC7B,YAAgC,EAChC,iBAAyB,EACzB,OAAoB,EACP,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;CACzC;AAED;;;;;;;;;GASG;AACH,MAAM,OAAgB,8BAA+B,SAAQ,uBAAuB;IACvE,eAAe,GAAsB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvD,uBAAuB,CAAS;IAChC,cAAc,GAAG,YAAY,CAAC;IAC9B,qBAAqB,CAAS;IAEvC,YAAsB,0BAAkC;QACpD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,uBAAuB,GAAG,0BAA0B,CAAC;QAC1D,IAAI,CAAC,qBAAqB,GAAG,0BAA0B,CAAC;IAC5D,CAAC;CACJ"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AgentConnectionFactory } from "../../../acp/connection/agent-connection.ts";
|
|
2
2
|
import { type ResolvedExecutable } from "../../../util/process/executable.ts";
|
|
3
3
|
import type { LocalAgentDiscoveryContext } from "../../discovery/agent-discovery-context.ts";
|
|
4
4
|
import { InProcessAcpAgentSpecification } from "../agent-specification.ts";
|
|
5
5
|
export declare class ClaudeCodeAgentSpecification extends InProcessAcpAgentSpecification {
|
|
6
6
|
readonly agentExecutable = "claude";
|
|
7
|
-
readonly
|
|
7
|
+
readonly createConnection: AgentConnectionFactory;
|
|
8
8
|
readonly id = "claude";
|
|
9
9
|
readonly label = "Claude Code";
|
|
10
10
|
readonly minimumSupportedAgentVersion = "2.1.273";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-code-agent.d.ts","sourceRoot":"","sources":["../../../../src/agent/specification/vendors/claude-code-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"claude-code-agent.d.ts","sourceRoot":"","sources":["../../../../src/agent/specification/vendors/claude-code-agent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAE1F,OAAO,EAAE,KAAK,kBAAkB,EAAyB,MAAM,qCAAqC,CAAC;AACrG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAE3E,qBAAa,4BAA6B,SAAQ,8BAA8B;IAC5E,QAAQ,CAAC,eAAe,YAAY;IACpC,QAAQ,CAAC,gBAAgB,EAAE,sBAAsB,CAAmD;IACpG,QAAQ,CAAC,EAAE,YAAY;IACvB,QAAQ,CAAC,KAAK,iBAAiB;IAC/B,SAAkB,4BAA4B,aAAa;IAC3D,SAAkB,yBAAyB,aAAa;IAExD,cAEC;IAED,SAAkB,gCAAgC,YACrC,0BAA0B,KACpC,OAAO,CAAC,SAAS,kBAAkB,EAAE,CAAC,CAavC;CACL"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ClaudeAgentConnection } from "../../../acp/adapter/claude/agent-connection.js";
|
|
2
2
|
import { platformSupportFor } from "../../../util/platform/index.js";
|
|
3
3
|
import { resolveExecutablePath } from "../../../util/process/executable.js";
|
|
4
4
|
import { InProcessAcpAgentSpecification } from "../agent-specification.js";
|
|
5
5
|
export class ClaudeCodeAgentSpecification extends InProcessAcpAgentSpecification {
|
|
6
6
|
agentExecutable = "claude";
|
|
7
|
-
|
|
7
|
+
createConnection = (options) => new ClaudeAgentConnection(options);
|
|
8
8
|
id = "claude";
|
|
9
9
|
label = "Claude Code";
|
|
10
10
|
minimumSupportedAgentVersion = "2.1.273";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-code-agent.js","sourceRoot":"","sources":["../../../../src/agent/specification/vendors/claude-code-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"claude-code-agent.js","sourceRoot":"","sources":["../../../../src/agent/specification/vendors/claude-code-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AAExF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAA2B,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAErG,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAE3E,MAAM,OAAO,4BAA6B,SAAQ,8BAA8B;IACnE,eAAe,GAAG,QAAQ,CAAC;IAC3B,gBAAgB,GAA2B,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC3F,EAAE,GAAG,QAAQ,CAAC;IACd,KAAK,GAAG,aAAa,CAAC;IACb,4BAA4B,GAAG,SAAS,CAAC;IACzC,yBAAyB,GAAG,SAAS,CAAC;IAExD;QACI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAChC,CAAC;IAEiB,gCAAgC,GAAG,KAAK,EACtD,OAAmC,EACG,EAAE;QACxC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;QAChC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;QACtD,MAAM,KAAK,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC,yBAAyB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC1F,MAAM,WAAW,GAAyB,EAAE,CAAC;QAC7C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,MAAM,UAAU,GAAG,MAAM,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAC/D,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YAChC,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;gBACtB,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACjC,CAAC;QACL,CAAC;QACD,OAAO,WAAW,CAAC;IACvB,CAAC,CAAC;CACL"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AgentConnectionFactory } from "../../../acp/connection/agent-connection.ts";
|
|
2
2
|
import { InProcessAcpAgentSpecification } from "../agent-specification.ts";
|
|
3
3
|
export declare class CodexAgentSpecification extends InProcessAcpAgentSpecification {
|
|
4
4
|
readonly versionProbeTimeoutMilliseconds = 10000;
|
|
5
5
|
readonly agentExecutable = "codex";
|
|
6
|
-
readonly
|
|
6
|
+
readonly createConnection: AgentConnectionFactory;
|
|
7
7
|
readonly id = "codex";
|
|
8
8
|
readonly label = "Codex";
|
|
9
9
|
readonly minimumSupportedAgentVersion = "0.153.0";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-agent.d.ts","sourceRoot":"","sources":["../../../../src/agent/specification/vendors/codex-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"codex-agent.d.ts","sourceRoot":"","sources":["../../../../src/agent/specification/vendors/codex-agent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAC1F,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAI3E,qBAAa,uBAAwB,SAAQ,8BAA8B;IACvE,SAAkB,+BAA+B,SAAU;IAC3D,QAAQ,CAAC,eAAe,WAAW;IACnC,QAAQ,CAAC,gBAAgB,EAAE,sBAAsB,CAAkD;IACnG,QAAQ,CAAC,EAAE,WAAW;IACtB,QAAQ,CAAC,KAAK,WAAW;IACzB,SAAkB,4BAA4B,aAAa;IAC3D,SAAkB,yBAAyB,aAAa;IAExD,cAEC;CACJ"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CodexAgentConnection } from "../../../acp/adapter/codex/agent-connection.js";
|
|
2
2
|
import { InProcessAcpAgentSpecification } from "../agent-specification.js";
|
|
3
3
|
// Codex speaks its own app-server protocol rather than ACP, so Mobius hosts the ACP Agent in-process
|
|
4
4
|
// and drives `codex app-server` directly. There is no adapter package to install or version-probe.
|
|
5
5
|
export class CodexAgentSpecification extends InProcessAcpAgentSpecification {
|
|
6
6
|
versionProbeTimeoutMilliseconds = 10_000;
|
|
7
7
|
agentExecutable = "codex";
|
|
8
|
-
|
|
8
|
+
createConnection = (options) => new CodexAgentConnection(options);
|
|
9
9
|
id = "codex";
|
|
10
10
|
label = "Codex";
|
|
11
11
|
minimumSupportedAgentVersion = "0.153.0";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-agent.js","sourceRoot":"","sources":["../../../../src/agent/specification/vendors/codex-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"codex-agent.js","sourceRoot":"","sources":["../../../../src/agent/specification/vendors/codex-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAEtF,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAE3E,qGAAqG;AACrG,mGAAmG;AACnG,MAAM,OAAO,uBAAwB,SAAQ,8BAA8B;IACrD,+BAA+B,GAAG,MAAM,CAAC;IAClD,eAAe,GAAG,OAAO,CAAC;IAC1B,gBAAgB,GAA2B,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC1F,EAAE,GAAG,OAAO,CAAC;IACb,KAAK,GAAG,OAAO,CAAC;IACP,4BAA4B,GAAG,SAAS,CAAC;IACzC,yBAAyB,GAAG,SAAS,CAAC;IAExD;QACI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAC/B,CAAC;CACJ"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type ClientConnection, type InitializeResponse } from "@agentclientprotocol/sdk";
|
|
2
|
-
import type {
|
|
2
|
+
import type { AgentConnectionFactory } from "../../../acp/connection/agent-connection.ts";
|
|
3
3
|
import type { ResolvedExecutable } from "../../../util/process/executable.ts";
|
|
4
4
|
import type { LocalAgentDiscoveryContext } from "../../discovery/agent-discovery-context.ts";
|
|
5
5
|
import { InProcessAcpAgentSpecification } from "../agent-specification.ts";
|
|
6
6
|
export declare class PiAgentSpecification extends InProcessAcpAgentSpecification {
|
|
7
7
|
readonly acpProbeTimeoutMilliseconds = 30000;
|
|
8
8
|
readonly agentExecutable = "pi";
|
|
9
|
-
readonly
|
|
9
|
+
readonly createConnection: AgentConnectionFactory;
|
|
10
10
|
readonly createLaunchEnvironment: (_agent: ResolvedExecutable, context: LocalAgentDiscoveryContext) => Promise<Readonly<Record<string, string>>>;
|
|
11
11
|
readonly id = "pi";
|
|
12
12
|
readonly label = "Pi";
|