@moxt-ai/mobius 0.0.318 → 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 +579 -860
- 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 +303 -609
- 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/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-initialization.d.ts","sourceRoot":"","sources":["../../../src/acp/adapter/agent-initialization.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,qBAAa,+BAAgC,SAAQ,iBAAiB;IAClE,YAAY,KAAK,EAAE,OAAO,EAGzB;CACJ;AAED,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"agent-initialization.d.ts","sourceRoot":"","sources":["../../../src/acp/adapter/agent-initialization.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,qBAAa,+BAAgC,SAAQ,iBAAiB;IAClE,YAAY,KAAK,EAAE,OAAO,EAGzB;CACJ;AAED,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAWxG;AAED,wBAAsB,yBAAyB,CAC3C,UAAU,EAAE,wBAAwB,EACpC,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,WAAW;;;;;;;;;;;;;;;;;;GA6CtB"}
|
|
@@ -11,24 +11,19 @@ export class RetryableAcpInitializationError extends AcpExecutionError {
|
|
|
11
11
|
}
|
|
12
12
|
export async function validateAgentRuntime(agent, signal) {
|
|
13
13
|
signal.throwIfAborted();
|
|
14
|
-
const unchanged = await Promise.all(
|
|
15
|
-
agent.kind === "acp-adapter-process" ? revalidateExecutable(agent.adapterIdentity) : Promise.resolve(true),
|
|
16
|
-
revalidateExecutable(agent.agentIdentity),
|
|
17
|
-
]);
|
|
14
|
+
const unchanged = await Promise.all(agent.runtimeExecutables.map((identity) => revalidateExecutable(identity)));
|
|
18
15
|
signal.throwIfAborted();
|
|
19
16
|
if (unchanged.some((result) => !result)) {
|
|
20
17
|
throw new AcpExecutionError("The local Agent runtime changed; restart Mobius before starting a new conversation", {}, "agent_runtime_changed");
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
20
|
export async function initializeAgentConnection(connection, agentId, verifiedVersion, signal) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
31
|
-
}
|
|
21
|
+
await connection
|
|
22
|
+
.race(connection.initialize(signal), "The Agent runtime exited during initialization", signal)
|
|
23
|
+
.catch((cause) => {
|
|
24
|
+
signal.throwIfAborted();
|
|
25
|
+
throw new RetryableAcpInitializationError(cause);
|
|
26
|
+
});
|
|
32
27
|
const initialized = await connection
|
|
33
28
|
.race(connection.connection.agent.request(methods.agent.initialize, {
|
|
34
29
|
clientCapabilities: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-initialization.js","sourceRoot":"","sources":["../../../src/acp/adapter/agent-initialization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAA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D,EAAE,kBAAkB,EAAE,MAAM,EAAE,CACjC,EACD,wCAAwC,EACxC,MAAM,CACT;SACA,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;QACtB,MAAM,CAAC,cAAc,EAAE,CAAC;QACxB,MAAM,IAAI,+BAA+B,CAAC,KAAK,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IACP,IAAI,WAAW,CAAC,eAAe,KAAK,gBAAgB,EAAE,CAAC;QACnD,MAAM,IAAI,iBAAiB,CACvB,oDAAoD,EACpD,EAAE,EACF,0BAA0B,CAC7B,CAAC;IACN,CAAC;IACD,OAAO;QACH,YAAY,EAAE,wBAAwB,CAAC,WAAW,CAAC;QACnD,SAAS,EAAE,QAAQ,CAAC,WAAW,CAAC,SAAS,EAAE,KAAK,IAAI,WAAW,CAAC,SAAS,EAAE,IAAI,IAAI,OAAO,EAAE,GAAG,CAAC;QAChG,YAAY,EAAE,QAAQ,CAClB,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,IAAI,EAAE,CAAC,EACrF,GAAG,CACN;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AgentConnectionLaunchOptions } from "../../connection/agent-connection.ts";
|
|
2
|
+
import { EndpointAgentConnection } from "../../connection/endpoint-agent-connection.ts";
|
|
3
|
+
export declare class ClaudeAgentConnection extends EndpointAgentConnection {
|
|
4
|
+
constructor(options: AgentConnectionLaunchOptions);
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=agent-connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-connection.d.ts","sourceRoot":"","sources":["../../../../src/acp/adapter/claude/agent-connection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAGxF,qBAAa,qBAAsB,SAAQ,uBAAuB;IAC9D,YAAY,OAAO,EAAE,4BAA4B,EAShD;CACJ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EndpointAgentConnection } from "../../connection/endpoint-agent-connection.js";
|
|
2
|
+
import { ClaudeAcpEndpoint } from "../../harness/claude/endpoint.js";
|
|
3
|
+
export class ClaudeAgentConnection extends EndpointAgentConnection {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
const endpoint = new ClaudeAcpEndpoint({
|
|
6
|
+
command: options.command,
|
|
7
|
+
cwd: options.cwd,
|
|
8
|
+
environment: options.environment,
|
|
9
|
+
onSessionUpdate: options.client.onUpdate,
|
|
10
|
+
onBackgroundActivity: (active) => options.onBackgroundActivity?.(active),
|
|
11
|
+
});
|
|
12
|
+
super(endpoint, options.client);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=agent-connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-connection.js","sourceRoot":"","sources":["../../../../src/acp/adapter/claude/agent-connection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,MAAM,OAAO,qBAAsB,SAAQ,uBAAuB;IAC9D,YAAY,OAAqC;QAC7C,MAAM,QAAQ,GAAG,IAAI,iBAAiB,CAAC;YACnC,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;YACxC,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC,MAAM,CAAC;SAC3E,CAAC,CAAC;QACH,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;CACJ"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AgentConnectionLaunchOptions } from "../../connection/agent-connection.ts";
|
|
2
|
+
import { EndpointAgentConnection } from "../../connection/endpoint-agent-connection.ts";
|
|
3
|
+
export declare class CodexAgentConnection extends EndpointAgentConnection {
|
|
4
|
+
constructor(options: AgentConnectionLaunchOptions);
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=agent-connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-connection.d.ts","sourceRoot":"","sources":["../../../../src/acp/adapter/codex/agent-connection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAGxF,qBAAa,oBAAqB,SAAQ,uBAAuB;IAC7D,YAAY,OAAO,EAAE,4BAA4B,EAShD;CACJ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EndpointAgentConnection } from "../../connection/endpoint-agent-connection.js";
|
|
2
|
+
import { CodexAcpAgent } from "../../harness/codex/agent.js";
|
|
3
|
+
export class CodexAgentConnection extends EndpointAgentConnection {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
const endpoint = new CodexAcpAgent({
|
|
6
|
+
command: options.command,
|
|
7
|
+
cwd: options.cwd,
|
|
8
|
+
environment: options.environment,
|
|
9
|
+
onSessionUpdate: options.client.onUpdate,
|
|
10
|
+
onBackgroundActivity: (active) => options.onBackgroundActivity?.(active),
|
|
11
|
+
});
|
|
12
|
+
super(endpoint, options.client);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=agent-connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-connection.js","sourceRoot":"","sources":["../../../../src/acp/adapter/codex/agent-connection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,MAAM,OAAO,oBAAqB,SAAQ,uBAAuB;IAC7D,YAAY,OAAqC;QAC7C,MAAM,QAAQ,GAAG,IAAI,aAAa,CAAC;YAC/B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;YACxC,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC,MAAM,CAAC;SAC3E,CAAC,CAAC;QACH,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;CACJ"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AgentConnectionLaunchOptions } from "../../connection/agent-connection.ts";
|
|
2
|
+
import { EndpointAgentConnection } from "../../connection/endpoint-agent-connection.ts";
|
|
3
|
+
export declare class PiAgentConnection extends EndpointAgentConnection {
|
|
4
|
+
constructor(options: AgentConnectionLaunchOptions);
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=agent-connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-connection.d.ts","sourceRoot":"","sources":["../../../../src/acp/adapter/pi/agent-connection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAGxF,qBAAa,iBAAkB,SAAQ,uBAAuB;IAC1D,YAAY,OAAO,EAAE,4BAA4B,EAShD;CACJ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EndpointAgentConnection } from "../../connection/endpoint-agent-connection.js";
|
|
2
|
+
import { PiAcpEndpoint } from "../../harness/pi/endpoint.js";
|
|
3
|
+
export class PiAgentConnection extends EndpointAgentConnection {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
const endpoint = new PiAcpEndpoint({
|
|
6
|
+
command: options.command,
|
|
7
|
+
cwd: options.cwd,
|
|
8
|
+
environment: options.environment,
|
|
9
|
+
onSessionUpdate: options.client.onUpdate,
|
|
10
|
+
onBackgroundActivity: (active) => options.onBackgroundActivity?.(active),
|
|
11
|
+
});
|
|
12
|
+
super(endpoint, options.client);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=agent-connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-connection.js","sourceRoot":"","sources":["../../../../src/acp/adapter/pi/agent-connection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,MAAM,OAAO,iBAAkB,SAAQ,uBAAuB;IAC1D,YAAY,OAAqC;QAC7C,MAAM,QAAQ,GAAG,IAAI,aAAa,CAAC;YAC/B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;YACxC,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC,MAAM,CAAC;SAC3E,CAAC,CAAC;QACH,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;CACJ"}
|
|
@@ -57,7 +57,7 @@ export declare class AdapterSessionConnection {
|
|
|
57
57
|
readonly events: Pick<AgentUpdateStream, "sessionId" | "select" | "drained">;
|
|
58
58
|
constructor(options: AdapterSessionConnectionOptions, externalizer: Pick<AcpContentExternalizer, "update">, normalizeEvent: (event: unknown) => unknown, onClosed?: () => void);
|
|
59
59
|
get connection(): import("@agentclientprotocol/sdk").ClientConnection;
|
|
60
|
-
|
|
60
|
+
readonly initialize: (signal: AbortSignal) => Promise<void>;
|
|
61
61
|
readonly agentSettingsModelEffort: () => Readonly<{
|
|
62
62
|
effortSettingId: string;
|
|
63
63
|
modelSettingId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-events.d.ts","sourceRoot":"","sources":["../../../src/acp/adapter/session-events.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,gBAAgB,EAErB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EAC3B,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AA4BjF,KAAK,iBAAiB,GAChB;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,sGAAsG;AACtG,MAAM,MAAM,mBAAmB,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;CAAE,GAC1E;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC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AAc,YAAa,+BAA+B,KAAG,wBAAwB,CACV;IAEpF,QAAQ,CAAC,mBAAmB,YAAa,sBAAsB,KAAG,wBAAwB,CAoBxF;CACL"}
|
|
@@ -2,7 +2,6 @@ import { setImmediate as yieldToRuntime } from "node:timers/promises";
|
|
|
2
2
|
import { decodeAcpSessionUpdate, } from "@moxt-ai/mobius-sdk/protocol";
|
|
3
3
|
import { truncate } from "../../util/value-utils.js";
|
|
4
4
|
import { AcpExecutionError } from "../acp-error.js";
|
|
5
|
-
import { AgentConnection } from "../connection/agent-connection.js";
|
|
6
5
|
import { AgentUpdateStream } from "../connection/agent-update-stream.js";
|
|
7
6
|
import { sessionConfigProtocolForAgent } from "../protocol/session-config-protocol.js";
|
|
8
7
|
// The event wire schema limits text to one million UTF-16 code units.
|
|
@@ -140,21 +139,23 @@ export class AdapterSessionConnection {
|
|
|
140
139
|
onElicitation: options.interactions.onElicitation,
|
|
141
140
|
onElicitationComplete: options.interactions.onElicitationComplete,
|
|
142
141
|
};
|
|
143
|
-
this.#connection =
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
this.#connection = options.agent.createConnection({
|
|
143
|
+
cwd: options.cwd,
|
|
144
|
+
client,
|
|
145
|
+
onBackgroundActivity: (active) => {
|
|
146
|
+
if (this.#lifetime.signal.aborted) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
this.#backgroundActivity = active;
|
|
150
|
+
this.#onBackgroundActivity(active);
|
|
151
|
+
},
|
|
149
152
|
});
|
|
150
153
|
}
|
|
151
154
|
get connection() {
|
|
152
155
|
return this.#connection.connection;
|
|
153
156
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
agentSettingsModelEffort = () => this.#connection.inProcessAgent?.agentSettingsModelEffort?.() ?? null;
|
|
157
|
+
initialize = (signal) => this.#connection.initialize(signal);
|
|
158
|
+
agentSettingsModelEffort = () => this.#connection.agentSettingsModelEffort();
|
|
158
159
|
race = (operation, exitMessage, signal) => this.#connection.race(operation, exitMessage, signal);
|
|
159
160
|
closeProcess = async () => {
|
|
160
161
|
this.#lifetime.abort(new DOMException("The adapter event subscription closed", "AbortError"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-events.js","sourceRoot":"","sources":["../../../src/acp/adapter/session-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAEH,sBAAsB,GAIzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"session-events.js","sourceRoot":"","sources":["../../../src/acp/adapter/session-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAEH,sBAAsB,GAIzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAGzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAEvF,sEAAsE;AACtE,MAAM,mCAAmC,GAAG,SAAS,CAAC;AAEtD,QAAQ,CAAC,CAAC,oBAAoB,CAAC,MAAqB;IAChD,IACI,MAAM,CAAC,aAAa,KAAK,qBAAqB;QAC9C,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM;QAC9B,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,mCAAmC,EACnE,CAAC;QACC,MAAM,MAAM,CAAC;QACb,OAAO;IACX,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,C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wC,EAA4B,EAAE,CAC7F,IAAI,wBAAwB,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IAE3E,mBAAmB,GAAG,CAAC,OAA+B,EAA4B,EAAE;QACzF,MAAM,iBAAiB,GAAG,KAAK,IAAoB,EAAE;YACjD,MAAM,IAAI,iBAAiB,CACvB,4DAA4D,EAC5D,EAAE,EACF,wCAAwC,CAC3C,CAAC;QACN,CAAC,CAAC;QACF,OAAO,IAAI,wBAAwB,CAC/B;YACI,GAAG,OAAO;YACV,YAAY,EAAE;gBACV,YAAY,EAAE,iBAAiB;gBAC/B,aAAa,EAAE,iBAAiB;gBAChC,qBAAqB,EAAE,iBAAiB;aAC3C;SACJ,EACD,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,eAAe,CACvB,CAAC;IACN,CAAC,CAAC;CACL"}
|
|
@@ -1,32 +1,20 @@
|
|
|
1
1
|
import type { SessionCapabilities } from "@moxt-ai/mobius-sdk/protocol";
|
|
2
2
|
import type { ExecutableIdentity } from "../../util/process/executable.ts";
|
|
3
|
-
import type {
|
|
4
|
-
|
|
3
|
+
import type { AgentConnection, AgentConnectionFactory, AgentConnectionOptions } from "../connection/agent-connection.ts";
|
|
4
|
+
/** A verified local Agent. Its adapter owns how connections are established. */
|
|
5
|
+
export declare class AcpAgentDefinition {
|
|
6
|
+
#private;
|
|
5
7
|
readonly agentIdentity: ExecutableIdentity;
|
|
6
8
|
readonly agentVersion: string;
|
|
9
|
+
readonly adapterVersion: string;
|
|
7
10
|
readonly capabilities: SessionCapabilities;
|
|
8
11
|
readonly command: string;
|
|
9
12
|
readonly environment: Readonly<Record<string, string>>;
|
|
10
13
|
readonly id: string;
|
|
11
14
|
readonly label: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
readonly kind = "acp-adapter-process";
|
|
17
|
-
readonly adapterIdentity: ExecutableIdentity;
|
|
18
|
-
readonly adapterPath: string;
|
|
19
|
-
readonly adapterVersion: string;
|
|
20
|
-
readonly arguments: readonly string[];
|
|
21
|
-
constructor(id: string, label: string, command: string, arguments_: readonly string[], environment?: Readonly<Record<string, string>>, adapterVersion?: string, agentVersion?: string, adapterIdentity?: ExecutableIdentity, agentIdentity?: ExecutableIdentity, capabilities?: SessionCapabilities);
|
|
22
|
-
readonly withEnvironment: (environment: Readonly<Record<string, string>>) => LocalAgentDefinition;
|
|
23
|
-
}
|
|
24
|
-
export declare class InProcessAcpAgentDefinition extends AgentDefinition {
|
|
25
|
-
readonly kind = "in-process-acp";
|
|
26
|
-
readonly createEndpoint: InProcessAcpEndpointFactory;
|
|
27
|
-
constructor(id: string, label: string, command: string, createEndpoint: InProcessAcpEndpointFactory, environment?: Readonly<Record<string, string>>, agentVersion?: string, agentIdentity?: ExecutableIdentity, capabilities?: SessionCapabilities);
|
|
28
|
-
readonly withEnvironment: (environment: Readonly<Record<string, string>>) => InProcessAcpAgentDefinition;
|
|
15
|
+
readonly runtimeExecutables: readonly ExecutableIdentity[];
|
|
16
|
+
constructor(id: string, label: string, command: string, createConnection: AgentConnectionFactory, environment?: Readonly<Record<string, string>>, agentVersion?: string, agentIdentity?: ExecutableIdentity, capabilities?: SessionCapabilities, adapterVersion?: string, runtimeExecutables?: readonly ExecutableIdentity[]);
|
|
17
|
+
readonly createConnection: (options: AgentConnectionOptions) => AgentConnection;
|
|
18
|
+
readonly withEnvironment: (environment: Readonly<Record<string, string>>) => AcpAgentDefinition;
|
|
29
19
|
}
|
|
30
|
-
export type AcpAgentDefinition = LocalAgentDefinition | InProcessAcpAgentDefinition;
|
|
31
|
-
export {};
|
|
32
20
|
//# sourceMappingURL=agent-definition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-definition.d.ts","sourceRoot":"","sources":["../../../src/acp/agent/agent-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAA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oB;IAElG,QAAQ,CAAC,eAAe,gBAAiB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAG,kBAAkB,CAYxF;CACT"}
|
|
@@ -1,50 +1,30 @@
|
|
|
1
1
|
import { readExecutableIdentity } from "../../util/process/local-executable.js";
|
|
2
2
|
import { unsupportedSessionCapabilities } from "../protocol/session-capabilities.js";
|
|
3
|
-
|
|
3
|
+
/** A verified local Agent. Its adapter owns how connections are established. */
|
|
4
|
+
export class AcpAgentDefinition {
|
|
4
5
|
agentIdentity;
|
|
5
6
|
agentVersion;
|
|
7
|
+
adapterVersion;
|
|
6
8
|
capabilities;
|
|
7
9
|
command;
|
|
8
10
|
environment;
|
|
9
11
|
id;
|
|
10
12
|
label;
|
|
11
|
-
|
|
13
|
+
runtimeExecutables;
|
|
14
|
+
#connectionFactory;
|
|
15
|
+
constructor(id, label, command, createConnection, environment = {}, agentVersion = "", agentIdentity = readExecutableIdentity(command), capabilities = unsupportedSessionCapabilities(), adapterVersion = agentVersion, runtimeExecutables = [agentIdentity]) {
|
|
12
16
|
this.agentIdentity = agentIdentity;
|
|
13
17
|
this.agentVersion = agentVersion;
|
|
18
|
+
this.adapterVersion = adapterVersion;
|
|
14
19
|
this.capabilities = Object.freeze({ ...capabilities });
|
|
15
20
|
this.command = agentIdentity.realPath;
|
|
16
21
|
this.environment = Object.freeze({ ...environment });
|
|
17
22
|
this.id = id;
|
|
18
23
|
this.label = label;
|
|
24
|
+
this.runtimeExecutables = Object.freeze([...new Set([agentIdentity, ...runtimeExecutables])]);
|
|
25
|
+
this.#connectionFactory = createConnection;
|
|
19
26
|
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// and the vendor binary is handed to it through an environment variable.
|
|
23
|
-
export class LocalAgentDefinition extends AgentDefinition {
|
|
24
|
-
kind = "acp-adapter-process";
|
|
25
|
-
adapterIdentity;
|
|
26
|
-
adapterPath;
|
|
27
|
-
adapterVersion;
|
|
28
|
-
arguments;
|
|
29
|
-
constructor(id, label, command, arguments_, environment = {}, adapterVersion = "", agentVersion = "", adapterIdentity = readExecutableIdentity(command), agentIdentity = adapterIdentity, capabilities = unsupportedSessionCapabilities()) {
|
|
30
|
-
super(id, label, command, environment, agentVersion, agentIdentity, capabilities);
|
|
31
|
-
this.adapterIdentity = adapterIdentity;
|
|
32
|
-
this.adapterPath = adapterIdentity.realPath;
|
|
33
|
-
this.adapterVersion = adapterVersion;
|
|
34
|
-
this.arguments = Object.freeze([...arguments_]);
|
|
35
|
-
}
|
|
36
|
-
withEnvironment = (environment) => new LocalAgentDefinition(this.id, this.label, this.command, this.arguments, environment, this.adapterVersion, this.agentVersion, this.adapterIdentity, this.agentIdentity, this.capabilities);
|
|
37
|
-
}
|
|
38
|
-
// A vendor CLI that Mobius drives through the vendor's own protocol from an ACP Agent hosted inside
|
|
39
|
-
// the daemon. There is no adapter process. `command` is the vendor binary the endpoint spawns, and
|
|
40
|
-
// `createEndpoint` is how the daemon builds that Agent without naming a vendor.
|
|
41
|
-
export class InProcessAcpAgentDefinition extends AgentDefinition {
|
|
42
|
-
kind = "in-process-acp";
|
|
43
|
-
createEndpoint;
|
|
44
|
-
constructor(id, label, command, createEndpoint, environment = {}, agentVersion = "", agentIdentity = readExecutableIdentity(command), capabilities = unsupportedSessionCapabilities()) {
|
|
45
|
-
super(id, label, command, environment, agentVersion, agentIdentity, capabilities);
|
|
46
|
-
this.createEndpoint = createEndpoint;
|
|
47
|
-
}
|
|
48
|
-
withEnvironment = (environment) => new InProcessAcpAgentDefinition(this.id, this.label, this.command, this.createEndpoint, environment, this.agentVersion, this.agentIdentity, this.capabilities);
|
|
27
|
+
createConnection = (options) => this.#connectionFactory({ ...options, command: this.command, environment: this.environment });
|
|
28
|
+
withEnvironment = (environment) => new AcpAgentDefinition(this.id, this.label, this.command, this.#connectionFactory, environment, this.agentVersion, this.agentIdentity, this.capabilities, this.adapterVersion, this.runtimeExecutables);
|
|
49
29
|
}
|
|
50
30
|
//# sourceMappingURL=agent-definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-definition.js","sourceRoot":"","sources":["../../../src/acp/agent/agent-definition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-definition.js","sourceRoot":"","sources":["../../../src/acp/agent/agent-definition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAMhF,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF,gFAAgF;AAChF,MAAM,OAAO,kBAAkB;IAClB,aAAa,CAAqB;IAClC,YAAY,CAAS;IACrB,cAAc,CAAS;IACvB,YAAY,CAAsB;IAClC,OAAO,CAAS;IAChB,WAAW,CAAmC;IAC9C,EAAE,CAAS;IACX,KAAK,CAAS;IACd,kBAAkB,CAAgC;IAClD,kBAAkB,CAAyB;IAEpD,YACI,EAAU,EACV,KAAa,EACb,OAAe,EACf,gBAAwC,EACxC,WAAW,GAAqC,EAAE,EAClD,YAAY,GAAG,EAAE,EACjB,aAAa,GAAuB,sBAAsB,CAAC,OAAO,CAAC,EACnE,YAAY,GAAwB,8BAA8B,EAAE,EACpE,cAAc,GAAG,YAAY,EAC7B,kBAAkB,GAAkC,CAAC,aAAa,CAAC;QAEnE,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;QACvD,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,WAAW,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,aAAa,EAAE,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9F,IAAI,CAAC,kBAAkB,GAAG,gBAAgB,CAAC;IAC/C,CAAC;IAEQ,gBAAgB,GAAG,CAAC,OAA+B,EAAmB,EAAE,CAC7E,IAAI,CAAC,kBAAkB,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IAEzF,eAAe,GAAG,CAAC,WAA6C,EAAsB,EAAE,CAC7F,IAAI,kBAAkB,CAClB,IAAI,CAAC,EAAE,EACP,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,kBAAkB,EACvB,WAAW,EACX,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,kBAAkB,CAC1B,CAAC;CACT"}
|
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare class AgentConnection {
|
|
8
|
-
#private;
|
|
1
|
+
import type { ClientConnection } from "@agentclientprotocol/sdk";
|
|
2
|
+
import type { AgentModelEffort } from "@moxt-ai/mobius-sdk/protocol";
|
|
3
|
+
import type { AcpEndpointTermination } from "../agent/in-process-endpoint.ts";
|
|
4
|
+
import type { AcpClientHandler } from "./create-client.ts";
|
|
5
|
+
/** Adapter-owned runtime and transport for one ACP client. */
|
|
6
|
+
export interface AgentConnection {
|
|
9
7
|
readonly connection: ClientConnection;
|
|
10
8
|
readonly termination: Promise<AcpEndpointTermination>;
|
|
11
|
-
|
|
12
|
-
get inProcessAgent(): InProcessAcpEndpoint | null;
|
|
9
|
+
readonly initialize: (signal: AbortSignal) => Promise<void>;
|
|
13
10
|
readonly closeProcess: () => Promise<void>;
|
|
11
|
+
readonly agentSettingsModelEffort: () => AgentModelEffort | null;
|
|
14
12
|
readonly race: <T>(operation: Promise<T>, exitMessage: string, signal: AbortSignal) => Promise<T>;
|
|
15
13
|
}
|
|
14
|
+
export interface AgentConnectionOptions {
|
|
15
|
+
readonly cwd: string;
|
|
16
|
+
readonly client: AcpClientHandler;
|
|
17
|
+
readonly onBackgroundActivity?: (active: boolean) => void;
|
|
18
|
+
}
|
|
19
|
+
export interface AgentConnectionLaunchOptions extends AgentConnectionOptions {
|
|
20
|
+
readonly command: string;
|
|
21
|
+
readonly environment: Readonly<Record<string, string>>;
|
|
22
|
+
}
|
|
23
|
+
export type AgentConnectionFactory = (options: AgentConnectionLaunchOptions) => AgentConnection;
|
|
16
24
|
//# sourceMappingURL=agent-connection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-connection.d.ts","sourceRoot":"","sources":["../../../src/acp/connection/agent-connection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-connection.d.ts","sourceRoot":"","sources":["../../../src/acp/connection/agent-connection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE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