@automatalabs/acp-agents 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acp-client.d.ts +14 -2
- package/dist/acp-client.d.ts.map +1 -1
- package/dist/acp-client.js +34 -14
- package/dist/client-handlers.d.ts +4 -1
- package/dist/client-handlers.d.ts.map +1 -1
- package/dist/client-handlers.js +6 -3
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/interactive.d.ts +11 -1
- package/dist/interactive.d.ts.map +1 -1
- package/dist/interactive.js +10 -0
- package/dist/protocol-coverage.d.ts +12 -0
- package/dist/protocol-coverage.d.ts.map +1 -0
- package/dist/protocol-coverage.js +49 -0
- package/package.json +2 -2
package/dist/acp-client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ContentBlock, type PromptRequest, type PromptResponse, type RequestPermissionResponse, type SessionConfigOption, type SessionNotification, type SetSessionConfigOptionRequest, type SetSessionConfigOptionResponse } from "@agentclientprotocol/sdk";
|
|
1
|
+
import { type ContentBlock, type AgentNotificationMethod, type AgentNotificationParamsByMethod, type AgentRequestMethod, type AgentRequestParamsByMethod, type AgentRequestResponsesByMethod, type PromptRequest, type PromptResponse, type RequestPermissionResponse, type SendRequestOptions, type SessionConfigOption, type SessionNotification, type SetSessionConfigOptionRequest, type SetSessionConfigOptionResponse } from "@agentclientprotocol/sdk";
|
|
2
2
|
import type { TSchema } from "typebox";
|
|
3
3
|
import { type AgentHistoryEntry, type McpServerConfig } from "@automatalabs/shared-types";
|
|
4
4
|
import type { Backend, BackendId, StructuredSource } from "./backend.js";
|
|
@@ -143,6 +143,16 @@ export declare class PooledConnection {
|
|
|
143
143
|
prompt(request: PromptRequest): Promise<PromptResponse>;
|
|
144
144
|
/** session/set_config_option on this connection, raced against process death. */
|
|
145
145
|
setSessionConfigOption(request: SetSessionConfigOptionRequest): Promise<SetSessionConfigOptionResponse>;
|
|
146
|
+
/** RAW protocol escape hatch: this makes the full ACP spec reachable (for example
|
|
147
|
+
* session/set_mode, session/fork, authenticate). Prefer the named wrappers when they exist
|
|
148
|
+
* because they preserve engine semantics such as accumulation/drain and usage recording;
|
|
149
|
+
* calling session/prompt here bypasses those paths. */
|
|
150
|
+
request<Method extends AgentRequestMethod>(method: Method, params: AgentRequestParamsByMethod[Method], options?: SendRequestOptions): Promise<AgentRequestResponsesByMethod[Method]>;
|
|
151
|
+
request<Response = unknown, Params = unknown>(method: string, params?: Params, options?: SendRequestOptions): Promise<Response>;
|
|
152
|
+
/** RAW protocol notification escape hatch. Prefer named wrappers when they exist because
|
|
153
|
+
* wrapper paths carry engine-specific lifecycle semantics that raw protocol calls do not. */
|
|
154
|
+
notify<Method extends AgentNotificationMethod>(method: Method, params: AgentNotificationParamsByMethod[Method]): Promise<void>;
|
|
155
|
+
notify<Params = unknown>(method: string, params?: Params): Promise<void>;
|
|
146
156
|
/** Best-effort ACP cancel for one session (wired to opts.signal). The PROCESS stays pooled. */
|
|
147
157
|
cancelSession(sessionId: string): Promise<void>;
|
|
148
158
|
/**
|
|
@@ -206,7 +216,9 @@ export declare class SessionHandle implements StructuredSource {
|
|
|
206
216
|
* carried by the model select itself, so it is treated as satisfied (no fallback).
|
|
207
217
|
*/
|
|
208
218
|
private applyModelModifiers;
|
|
209
|
-
/** Set one session config option via the wire method and adopt the echoed catalog.
|
|
219
|
+
/** Set one session config option via the wire method and adopt the echoed catalog.
|
|
220
|
+
* A boolean value drives a `type: "boolean"` option (the request must carry the type
|
|
221
|
+
* discriminator on the wire); a string value drives a select option. */
|
|
210
222
|
private applyConfigOption;
|
|
211
223
|
/** Send a prompt turn and drain it; returns the final PromptResponse. */
|
|
212
224
|
prompt(content: string | ContentBlock[], promptMeta?: Record<string, unknown>): Promise<PromptResponse>;
|
package/dist/acp-client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acp-client.d.ts","sourceRoot":"","sources":["../src/acp-client.ts"],"names":[],"mappings":"AAwBA,OAAO,EAUL,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"acp-client.d.ts","sourceRoot":"","sources":["../src/acp-client.ts"],"names":[],"mappings":"AAwBA,OAAO,EAUL,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,EAIlC,KAAK,aAAa,EAClB,KAAK,cAAc,EAMnB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAGxB,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EAOpC,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAML,KAAK,sBAAsB,EAC5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA2C,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACzF,OAAO,EAAoB,KAAK,kBAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAGL,KAAK,cAAc,EAEpB,MAAM,sBAAsB,CAAC;AAiB9B,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAQD;8FAC8F;AAC9F,cAAM,YAAY;IAWd,QAAQ,CAAC,GAAG,EAAE,MAAM;IACpB,QAAQ,CAAC,MAAM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IAED;;;;;;;;;;;;;;;;;OAiBG;IACG,WAAW,CACf,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAgBjF;;;;;;;OAOG;YACW,mBAAmB;IAoDjC;;6EAEyE;YAC3D,iBAAiB;IAS/B,yEAAyE;IACnE,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAoB7G,2DAA2D;IAC3D,eAAe,IAAI,MAAM;IAIzB,qFAAqF;IACrF,mBAAmB,IAAI,OAAO;IAI9B,gGAAgG;IAC1F,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B,6EAA6E;IACvE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAO/B"}
|
package/dist/acp-client.js
CHANGED
|
@@ -594,6 +594,12 @@ export class PooledConnection {
|
|
|
594
594
|
setSessionConfigOption(request) {
|
|
595
595
|
return this.race(this.connection.agent.request(AGENT_METHODS.session_set_config_option, request));
|
|
596
596
|
}
|
|
597
|
+
request(method, params, options) {
|
|
598
|
+
return this.race(this.connection.agent.request(method, params, options));
|
|
599
|
+
}
|
|
600
|
+
notify(method, params) {
|
|
601
|
+
return this.race(this.connection.agent.notify(method, params));
|
|
602
|
+
}
|
|
597
603
|
/** Best-effort ACP cancel for one session (wired to opts.signal). The PROCESS stays pooled. */
|
|
598
604
|
async cancelSession(sessionId) {
|
|
599
605
|
this.client.settlePendingPermissions(sessionId);
|
|
@@ -775,29 +781,39 @@ export class SessionHandle {
|
|
|
775
781
|
fallbacks.push(`${spec}: reasoning_effort "${effortTokens.join(",")}" not advertised`);
|
|
776
782
|
}
|
|
777
783
|
}
|
|
778
|
-
// Fast mode: a `fast` token turns the advertised toggle on.
|
|
784
|
+
// Fast mode: a `fast` token turns the advertised toggle on. The agent may advertise
|
|
785
|
+
// it as a `type: "boolean"` option (agents gate that shape on our
|
|
786
|
+
// session.configOptions.boolean capability) or as the legacy on/off select.
|
|
779
787
|
if (fastRequested && !effortAbsorbedByModel) {
|
|
780
788
|
const fastOption = this.configOptions.find(isFastModeOption);
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
await this.applyConfigOption(fastOption.id, onValue);
|
|
789
|
+
if (fastOption?.type === "boolean") {
|
|
790
|
+
if (fastOption.currentValue !== true) {
|
|
791
|
+
await this.applyConfigOption(fastOption.id, true);
|
|
785
792
|
}
|
|
786
793
|
}
|
|
787
794
|
else {
|
|
788
|
-
|
|
789
|
-
|
|
795
|
+
const onValue = fastOption ? fastModeOnValue(flattenSelectOptions(fastOption.options)) : undefined;
|
|
796
|
+
if (fastOption && onValue) {
|
|
797
|
+
if (fastOption.currentValue !== onValue) {
|
|
798
|
+
await this.applyConfigOption(fastOption.id, onValue);
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
else {
|
|
802
|
+
// No Fast-mode option, or it advertises no "on" value.
|
|
803
|
+
fallbacks.push(`${spec}: Fast mode not advertised`);
|
|
804
|
+
}
|
|
790
805
|
}
|
|
791
806
|
}
|
|
792
807
|
return fallbacks;
|
|
793
808
|
}
|
|
794
|
-
/** Set one session config option via the wire method and adopt the echoed catalog.
|
|
809
|
+
/** Set one session config option via the wire method and adopt the echoed catalog.
|
|
810
|
+
* A boolean value drives a `type: "boolean"` option (the request must carry the type
|
|
811
|
+
* discriminator on the wire); a string value drives a select option. */
|
|
795
812
|
async applyConfigOption(configId, value) {
|
|
796
|
-
const
|
|
797
|
-
sessionId: this.sessionId,
|
|
798
|
-
configId,
|
|
799
|
-
|
|
800
|
-
});
|
|
813
|
+
const request = typeof value === "boolean"
|
|
814
|
+
? { sessionId: this.sessionId, configId, value, type: "boolean" }
|
|
815
|
+
: { sessionId: this.sessionId, configId, value };
|
|
816
|
+
const response = await this.pooled.setSessionConfigOption(request);
|
|
801
817
|
this.configOptions = response.configOptions;
|
|
802
818
|
}
|
|
803
819
|
/** Send a prompt turn and drain it; returns the final PromptResponse. */
|
|
@@ -861,8 +877,12 @@ function isModelSelectOption(option) {
|
|
|
861
877
|
function isReasoningEffortOption(option) {
|
|
862
878
|
return option.type === "select" && (option.id === "reasoning_effort" || option.category === "thought_level");
|
|
863
879
|
}
|
|
880
|
+
/** Fast mode is matched by its stable id (upstream codex-acp moved the category to
|
|
881
|
+
* "model_config"; the legacy category match is kept for older agents). Both the
|
|
882
|
+
* `type: "boolean"` and the legacy on/off select shapes qualify — the caller branches
|
|
883
|
+
* on `type`. */
|
|
864
884
|
function isFastModeOption(option) {
|
|
865
|
-
return option.
|
|
885
|
+
return option.id === "fast-mode" || option.category === "fast-mode";
|
|
866
886
|
}
|
|
867
887
|
/** Split the trailing `[...]` of a `model[effort]` spec into its comma/space/plus-separated
|
|
868
888
|
* tokens (e.g. `gpt-5.1-codex[high]` -> ["high"], `gpt-5-codex[high fast]` -> ["high","fast"]). */
|
|
@@ -20,7 +20,10 @@ export interface ClientHandlers {
|
|
|
20
20
|
fs?: FsHandlers;
|
|
21
21
|
terminal?: TerminalHandlers;
|
|
22
22
|
}
|
|
23
|
-
/** The client capability advertisement derived solely from registered consumer
|
|
23
|
+
/** The client capability advertisement: fs/terminal derived solely from registered consumer
|
|
24
|
+
* handlers, plus the capabilities this client supports natively regardless of handlers —
|
|
25
|
+
* boolean session config options (SessionHandle drives the catalog programmatically and
|
|
26
|
+
* handles `type: "boolean"` entries, e.g. codex-acp's Fast-mode toggle). */
|
|
24
27
|
export declare function clientCapabilitiesFor(handlers: ClientHandlers | undefined): ClientCapabilities;
|
|
25
28
|
/** Fail-fast validation for JavaScript consumers bypassing the TerminalHandlers type. */
|
|
26
29
|
export declare function validateClientHandlers(handlers: ClientHandlers | undefined): void;
|
|
@@ -1 +1 @@
|
|
|
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G,IAAI,CAAC,GAAG,qBAAqB,GAAG,IAAI,CAAC;CACzE;AAED,MAAM,WAAW,gBAAgB;IAC/B,cAAc,CACZ,MAAM,EAAE,qBAAqB,EAC7B,GAAG,EAAE,iBAAiB,GACrB,OAAO,CAAC,sBAAsB,CAAC,GAAG,sBAAsB,CAAC;IAC5D,cAAc,CACZ,MAAM,EAAE,qBAAqB,EAC7B,GAAG,EAAE,iBAAiB,GACrB,OAAO,CAAC,sBAAsB,CAAC,GAAG,sBAAsB,CAAC;IAC5D,mBAAmB,CACjB,MAAM,EAAE,0BAA0B,EAClC,GAAG,EAAE,iBAAiB,GACrB,OAAO,CAAC,2BAA2B,CAAC,GAAG,2BAA2B,CAAC;IACtE,YAAY,CACV,MAAM,EAAE,mBAAmB,EAC3B,GAAG,EAAE,iBAAiB,GACrB,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,GAAG,oBAAoB,GAAG,IAAI,CAAC;IACtE,eAAe,CACb,MAAM,EAAE,sBAAsB,EAC9B,GAAG,EAAE,iBAAiB,GACrB,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,GAAG,uBAAuB,GAAG,IAAI,CAAC;CAC7E;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B;AAUD;;;6EAG6E;AAC7E,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,cAAc,GAAG,SAAS,GAAG,kBAAkB,CAY9F;AAED,yFAAyF;AACzF,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,CAMjF"}
|
package/dist/client-handlers.js
CHANGED
|
@@ -5,11 +5,14 @@ const TERMINAL_HANDLER_METHODS = [
|
|
|
5
5
|
"killTerminal",
|
|
6
6
|
"releaseTerminal",
|
|
7
7
|
];
|
|
8
|
-
/** The client capability advertisement derived solely from registered consumer
|
|
8
|
+
/** The client capability advertisement: fs/terminal derived solely from registered consumer
|
|
9
|
+
* handlers, plus the capabilities this client supports natively regardless of handlers —
|
|
10
|
+
* boolean session config options (SessionHandle drives the catalog programmatically and
|
|
11
|
+
* handles `type: "boolean"` entries, e.g. codex-acp's Fast-mode toggle). */
|
|
9
12
|
export function clientCapabilitiesFor(handlers) {
|
|
13
|
+
const capabilities = { session: { configOptions: { boolean: {} } } };
|
|
10
14
|
if (!handlers)
|
|
11
|
-
return
|
|
12
|
-
const capabilities = {};
|
|
15
|
+
return capabilities;
|
|
13
16
|
const fs = handlers.fs;
|
|
14
17
|
const fsCapabilities = {};
|
|
15
18
|
if (typeof fs?.readTextFile === "function")
|
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,14 @@ export { AcpAgentRunner, createAcpRunner, selectBackend } from "./runner.js";
|
|
|
2
2
|
export type { AcpRunnerOptions } from "./runner.js";
|
|
3
3
|
export { InteractiveSession } from "./interactive.js";
|
|
4
4
|
export type { InteractiveSessionOptions, InteractiveTurn } from "./interactive.js";
|
|
5
|
+
export { AGENT_METHODS, CLIENT_METHODS } from "@agentclientprotocol/sdk";
|
|
6
|
+
export type { AgentNotificationMethod, AgentNotificationParamsByMethod, AgentRequestMethod, AgentRequestParamsByMethod, AgentRequestResponsesByMethod, SendRequestOptions, } from "@agentclientprotocol/sdk";
|
|
5
7
|
export { BACKENDS_ENV, registryWithRunBackends, resolveBackendRegistry } from "./registry.js";
|
|
6
8
|
export type { BackendRegistry, CustomBackendConfig, RegisteredBackend } from "./registry.js";
|
|
7
9
|
export { PooledConnection, SessionHandle } from "./acp-client.js";
|
|
8
10
|
export type { AcpSessionOptions, PooledConnectionDeps } from "./acp-client.js";
|
|
11
|
+
export { AGENT_METHOD_COVERAGE, CLIENT_METHOD_COVERAGE } from "./protocol-coverage.js";
|
|
12
|
+
export type { AgentMethodCoverage, ClientMethodCoverage } from "./protocol-coverage.js";
|
|
9
13
|
export { GATED_CUSTOM_META_KEYS, adaptPromptContent, gateCustomMeta, isSupportedProtocolVersion, negotiateCapabilities, unsupportedMcpServer, } from "./capabilities.js";
|
|
10
14
|
export type { NegotiatedCapabilities } from "./capabilities.js";
|
|
11
15
|
export { AcpAgentPool, resolvePoolSize } from "./pool.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC7E,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC7E,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACzE,YAAY,EACV,uBAAuB,EACvB,+BAA+B,EAC/B,kBAAkB,EAClB,0BAA0B,EAC1B,6BAA6B,EAC7B,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC9F,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE7F,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA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YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEtE,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,aAAa,GACd,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhF,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
// @automatalabs/workflows facade (which mcp-server builds on) via createAcpRunner().
|
|
7
7
|
export { AcpAgentRunner, createAcpRunner, selectBackend } from "./runner.js";
|
|
8
8
|
export { InteractiveSession } from "./interactive.js";
|
|
9
|
+
export { AGENT_METHODS, CLIENT_METHODS } from "@agentclientprotocol/sdk";
|
|
9
10
|
// The custom-backend registry: run ANY ACP agent as an agent() target.
|
|
10
11
|
export { BACKENDS_ENV, registryWithRunBackends, resolveBackendRegistry } from "./registry.js";
|
|
11
12
|
export { PooledConnection, SessionHandle } from "./acp-client.js";
|
|
13
|
+
export { AGENT_METHOD_COVERAGE, CLIENT_METHOD_COVERAGE } from "./protocol-coverage.js";
|
|
12
14
|
// ACP capability negotiation: parse/validate the initialize response and gate what the client
|
|
13
15
|
// sends (custom `_meta` keys, MCP transports) on what the connected agent advertised.
|
|
14
16
|
export { GATED_CUSTOM_META_KEYS, adaptPromptContent, gateCustomMeta, isSupportedProtocolVersion, negotiateCapabilities, unsupportedMcpServer, } from "./capabilities.js";
|
package/dist/interactive.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ContentBlock, StopReason } from "@agentclientprotocol/sdk";
|
|
1
|
+
import type { AgentNotificationMethod, AgentNotificationParamsByMethod, AgentRequestMethod, AgentRequestParamsByMethod, AgentRequestResponsesByMethod, ContentBlock, SendRequestOptions, StopReason } from "@agentclientprotocol/sdk";
|
|
2
2
|
import type { McpServerConfig, PromptImage } from "@automatalabs/shared-types";
|
|
3
3
|
import type { RunOptions } from "@automatalabs/shared-types";
|
|
4
4
|
import type { Backend, BackendId } from "./backend.js";
|
|
@@ -97,6 +97,16 @@ export declare class InteractiveSession {
|
|
|
97
97
|
images?: readonly PromptImage[];
|
|
98
98
|
promptMeta?: Record<string, unknown>;
|
|
99
99
|
}): Promise<InteractiveTurn>;
|
|
100
|
+
/** RAW protocol escape hatch for held-open sessions. Params carry `sessionId` explicitly;
|
|
101
|
+
* use `session.sessionId` so the wire call targets this session. Prefer named wrappers when
|
|
102
|
+
* they exist because they preserve engine semantics such as accumulation/drain and usage
|
|
103
|
+
* recording; calling session/prompt here bypasses those paths. */
|
|
104
|
+
request<Method extends AgentRequestMethod>(method: Method, params: AgentRequestParamsByMethod[Method], options?: SendRequestOptions): Promise<AgentRequestResponsesByMethod[Method]>;
|
|
105
|
+
request<Response = unknown, Params = unknown>(method: string, params?: Params, options?: SendRequestOptions): Promise<Response>;
|
|
106
|
+
/** RAW protocol notification escape hatch for held-open sessions. Params carry `sessionId`
|
|
107
|
+
* explicitly; use `session.sessionId` so the wire call targets this session. */
|
|
108
|
+
notify<Method extends AgentNotificationMethod>(method: Method, params: AgentNotificationParamsByMethod[Method]): Promise<void>;
|
|
109
|
+
notify<Params = unknown>(method: string, params?: Params): Promise<void>;
|
|
100
110
|
/** Best-effort ACP session/cancel for the active turn. Pending permission resolvers are
|
|
101
111
|
* settled as cancelled by the SessionHandle/PooledConnection cancel path. */
|
|
102
112
|
cancel(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../src/interactive.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"interactive.d.ts","sour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C,IAAI,CAAC;IAChB,MAAM,CAAC,MAAM,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMxE;kFAC8E;IACxE,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAK7B;;oGAEgG;IAChG,EAAE,CAAC,CAAC,SAAS,YAAY,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IAiB9E;4FACwF;IACxF,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAKV,SAAS;IAkBvB,OAAO,CAAC,mBAAmB;CAK5B"}
|
package/dist/interactive.js
CHANGED
|
@@ -75,6 +75,16 @@ export class InteractiveSession {
|
|
|
75
75
|
this.promptInFlight = false;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
+
async request(method, params, options) {
|
|
79
|
+
if (this.releasePromise)
|
|
80
|
+
throw new Error("InteractiveSession has been released");
|
|
81
|
+
return this.connection.request(method, params, options);
|
|
82
|
+
}
|
|
83
|
+
async notify(method, params) {
|
|
84
|
+
if (this.releasePromise)
|
|
85
|
+
throw new Error("InteractiveSession has been released");
|
|
86
|
+
await this.connection.notify(method, params);
|
|
87
|
+
}
|
|
78
88
|
/** Best-effort ACP session/cancel for the active turn. Pending permission resolvers are
|
|
79
89
|
* settled as cancelled by the SessionHandle/PooledConnection cancel path. */
|
|
80
90
|
async cancel() {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AGENT_METHODS, CLIENT_METHODS } from "@agentclientprotocol/sdk";
|
|
2
|
+
type ValueOf<T> = T[keyof T];
|
|
3
|
+
type ClientMethod = ValueOf<typeof CLIENT_METHODS>;
|
|
4
|
+
type AgentMethod = ValueOf<typeof AGENT_METHODS>;
|
|
5
|
+
export type ClientMethodCoverage = "served" | "pending";
|
|
6
|
+
export type AgentMethodCoverage = "driven" | "passthrough";
|
|
7
|
+
/** Enforceable definition of "full ACP spec support": every SDK method constant is classified
|
|
8
|
+
* here, and the tripwire test fails when an SDK bump silently widens or shrinks the protocol. */
|
|
9
|
+
export declare const CLIENT_METHOD_COVERAGE: Record<ClientMethod, ClientMethodCoverage>;
|
|
10
|
+
export declare const AGENT_METHOD_COVERAGE: Record<AgentMethod, AgentMethodCoverage>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=protocol-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol-coverage.d.ts","sourceRoot":"","sources":["../src/protocol-coverage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEzE,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B,KAAK,YAAY,GAAG,OAAO,CAAC,OAAO,cAAc,CAAC,CAAC;AACnD,KAAK,WAAW,GAAG,OAAO,CAAC,OAAO,aAAa,CAAC,CAAC;AAEjD,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,SAAS,CAAC;AACxD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE3D;kGACkG;AAClG,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,YAAY,EAAE,oBAAoB,CAe7E,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,WAAW,EAAE,mBAAmB,CA6B1E,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { AGENT_METHODS, CLIENT_METHODS } from "@agentclientprotocol/sdk";
|
|
2
|
+
/** Enforceable definition of "full ACP spec support": every SDK method constant is classified
|
|
3
|
+
* here, and the tripwire test fails when an SDK bump silently widens or shrinks the protocol. */
|
|
4
|
+
export const CLIENT_METHOD_COVERAGE = {
|
|
5
|
+
[CLIENT_METHODS.session_request_permission]: "served",
|
|
6
|
+
[CLIENT_METHODS.session_update]: "served",
|
|
7
|
+
[CLIENT_METHODS.fs_read_text_file]: "served",
|
|
8
|
+
[CLIENT_METHODS.fs_write_text_file]: "served",
|
|
9
|
+
[CLIENT_METHODS.terminal_create]: "served",
|
|
10
|
+
[CLIENT_METHODS.terminal_output]: "served",
|
|
11
|
+
[CLIENT_METHODS.terminal_release]: "served",
|
|
12
|
+
[CLIENT_METHODS.terminal_wait_for_exit]: "served",
|
|
13
|
+
[CLIENT_METHODS.terminal_kill]: "served",
|
|
14
|
+
[CLIENT_METHODS.mcp_connect]: "pending",
|
|
15
|
+
[CLIENT_METHODS.mcp_message]: "pending",
|
|
16
|
+
[CLIENT_METHODS.mcp_disconnect]: "pending",
|
|
17
|
+
[CLIENT_METHODS.elicitation_create]: "pending",
|
|
18
|
+
[CLIENT_METHODS.elicitation_complete]: "pending",
|
|
19
|
+
};
|
|
20
|
+
export const AGENT_METHOD_COVERAGE = {
|
|
21
|
+
[AGENT_METHODS.initialize]: "driven",
|
|
22
|
+
[AGENT_METHODS.authenticate]: "passthrough",
|
|
23
|
+
[AGENT_METHODS.providers_list]: "passthrough",
|
|
24
|
+
[AGENT_METHODS.providers_set]: "passthrough",
|
|
25
|
+
[AGENT_METHODS.providers_disable]: "passthrough",
|
|
26
|
+
[AGENT_METHODS.session_new]: "driven",
|
|
27
|
+
[AGENT_METHODS.session_load]: "passthrough",
|
|
28
|
+
[AGENT_METHODS.session_set_mode]: "passthrough",
|
|
29
|
+
[AGENT_METHODS.session_set_config_option]: "driven",
|
|
30
|
+
[AGENT_METHODS.session_prompt]: "driven",
|
|
31
|
+
[AGENT_METHODS.session_cancel]: "driven",
|
|
32
|
+
[AGENT_METHODS.mcp_message]: "passthrough",
|
|
33
|
+
[AGENT_METHODS.session_list]: "passthrough",
|
|
34
|
+
[AGENT_METHODS.session_delete]: "passthrough",
|
|
35
|
+
[AGENT_METHODS.session_fork]: "passthrough",
|
|
36
|
+
[AGENT_METHODS.session_resume]: "passthrough",
|
|
37
|
+
[AGENT_METHODS.session_close]: "driven",
|
|
38
|
+
[AGENT_METHODS.logout]: "passthrough",
|
|
39
|
+
[AGENT_METHODS.nes_start]: "passthrough",
|
|
40
|
+
[AGENT_METHODS.nes_suggest]: "passthrough",
|
|
41
|
+
[AGENT_METHODS.nes_accept]: "passthrough",
|
|
42
|
+
[AGENT_METHODS.nes_reject]: "passthrough",
|
|
43
|
+
[AGENT_METHODS.nes_close]: "passthrough",
|
|
44
|
+
[AGENT_METHODS.document_did_open]: "passthrough",
|
|
45
|
+
[AGENT_METHODS.document_did_change]: "passthrough",
|
|
46
|
+
[AGENT_METHODS.document_did_close]: "passthrough",
|
|
47
|
+
[AGENT_METHODS.document_did_save]: "passthrough",
|
|
48
|
+
[AGENT_METHODS.document_did_focus]: "passthrough",
|
|
49
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automatalabs/acp-agents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@agentclientprotocol/sdk": "^1.2.0",
|
|
31
31
|
"@agentclientprotocol/claude-agent-acp": "0.56.0",
|
|
32
|
-
"@automatalabs/codex-acp": "1.
|
|
32
|
+
"@automatalabs/codex-acp": "1.4.0",
|
|
33
33
|
"typebox": "1.3.2",
|
|
34
34
|
"@automatalabs/shared-types": "0.8.0"
|
|
35
35
|
},
|