@e2e-dev/acp 0.1.1-nightly-20261105030216 → 0.1.1
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/README.md +1 -1
- package/dist/.build.json +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +2 -2
- package/dist/session.d.ts +1 -1
- package/dist/session.js +6 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -23,5 +23,5 @@ export default {
|
|
|
23
23
|
- `codex()` starts Codex through `@agentclientprotocol/codex-acp`.
|
|
24
24
|
|
|
25
25
|
The runner records every action, so steps replay from the cache without the
|
|
26
|
-
agent. See the [guide](https://e2e.
|
|
26
|
+
agent. See the [guide](https://e2e.com/docs/subscriptions#use-your-coding-agent) for options,
|
|
27
27
|
containment, and limits.
|
package/dist/.build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.1.1
|
|
1
|
+
{"version":"0.1.1"}
|
package/dist/mcp.d.ts
CHANGED
|
@@ -31,5 +31,5 @@ export interface ToolServer {
|
|
|
31
31
|
readonly url: string;
|
|
32
32
|
close(): Promise<void>;
|
|
33
33
|
}
|
|
34
|
-
/** Starts the tool server on an ephemeral 127.0.0.1 port. */
|
|
34
|
+
/** Starts the tool server on an ephemeral 127.0.0.1 port. The MCP SDK loads here, with the first server, not with the config. */
|
|
35
35
|
export declare function serveTools(tools: readonly ServedTool[]): Promise<ToolServer>;
|
package/dist/mcp.js
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
import { randomUUID } from 'node:crypto';
|
|
9
9
|
import { createServer } from 'node:http';
|
|
10
10
|
import { Readable } from 'node:stream';
|
|
11
|
-
import { createMcpHandler, McpServer } from '@modelcontextprotocol/server';
|
|
12
11
|
/** The MCP server name the agent sees. Distinct from `e2e mcp`'s `e2e`, so a permission request naming it is about these tools. */
|
|
13
12
|
export const MCP_SERVER_NAME = 'e2e_step';
|
|
14
|
-
/** Starts the tool server on an ephemeral 127.0.0.1 port. */
|
|
13
|
+
/** Starts the tool server on an ephemeral 127.0.0.1 port. The MCP SDK loads here, with the first server, not with the config. */
|
|
15
14
|
export async function serveTools(tools) {
|
|
15
|
+
const { createMcpHandler, McpServer } = await import('@modelcontextprotocol/server');
|
|
16
16
|
const route = `/${randomUUID()}/mcp`;
|
|
17
17
|
const handler = createMcpHandler(() => {
|
|
18
18
|
const server = new McpServer({ name: MCP_SERVER_NAME, version: '1' }, { capabilities: { tools: {} } });
|
package/dist/session.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* else is rejected. Each `prompt` is one `session/prompt` and resolves when
|
|
10
10
|
* the agent's turn ends.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import type { Usage } from '@agentclientprotocol/sdk/unstable';
|
|
13
13
|
import { type ServedTool } from './mcp.ts';
|
|
14
14
|
/** How to start one agent and what its session gets. */
|
|
15
15
|
export interface AgentLaunch {
|
package/dist/session.js
CHANGED
|
@@ -14,7 +14,6 @@ import { mkdtempSync, rmSync } from 'node:fs';
|
|
|
14
14
|
import { tmpdir } from 'node:os';
|
|
15
15
|
import { join } from 'node:path';
|
|
16
16
|
import { Readable, Writable } from 'node:stream';
|
|
17
|
-
import { client, methods, ndJsonStream, PROTOCOL_VERSION, } from '@agentclientprotocol/sdk/unstable';
|
|
18
17
|
import { ConfigurationError } from 'e2e/engine';
|
|
19
18
|
import { MCP_SERVER_NAME, serveTools } from './mcp.js';
|
|
20
19
|
/** Tool kinds an agent uses for its own tools and subagents; never a call of ours without an adapter's mark. */
|
|
@@ -30,6 +29,10 @@ const SECRET_VARIABLE = /^E2E_(?:SECRET|USER)_/i;
|
|
|
30
29
|
* that runs without asking, as soon as it starts or finishes.
|
|
31
30
|
*/
|
|
32
31
|
export async function startSession(launch, tools, signal, onOwnTool = () => undefined) {
|
|
32
|
+
signal.throwIfAborted();
|
|
33
|
+
// Loaded when the first session starts, not when the config imports this package: a process that never runs an ACP step never loads it.
|
|
34
|
+
const { client, methods, ndJsonStream, PROTOCOL_VERSION } = await import('@agentclientprotocol/sdk/unstable');
|
|
35
|
+
// Nothing awaits between this check and the abort listener below, so an abort during the import is not missed.
|
|
33
36
|
signal.throwIfAborted();
|
|
34
37
|
const cwd = mkdtempSync(join(tmpdir(), 'e2e-acp-'));
|
|
35
38
|
let server;
|
|
@@ -110,7 +113,7 @@ export async function startSession(launch, tools, signal, onOwnTool = () => unde
|
|
|
110
113
|
modelId = String(modelOption.currentValue);
|
|
111
114
|
}
|
|
112
115
|
if (launch.mode !== undefined)
|
|
113
|
-
await startup(selectMode(agent, session, launch.mode));
|
|
116
|
+
await startup(selectMode(agent, session, launch.mode, methods));
|
|
114
117
|
}
|
|
115
118
|
catch (error) {
|
|
116
119
|
teardown();
|
|
@@ -181,7 +184,7 @@ function detailsOf(error) {
|
|
|
181
184
|
function isAuthRequired(error) {
|
|
182
185
|
return typeof error === 'object' && error !== null && error.code === AUTH_REQUIRED;
|
|
183
186
|
}
|
|
184
|
-
async function selectMode(agent, session, mode) {
|
|
187
|
+
async function selectMode(agent, session, mode, methods) {
|
|
185
188
|
const option = session.configOptions?.find((entry) => entry.category === 'mode');
|
|
186
189
|
if (option !== undefined && selectValues(option).includes(mode)) {
|
|
187
190
|
await agent.request(methods.agent.session.setConfigOption, { sessionId: session.sessionId, configId: option.id, value: mode });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e2e-dev/acp",
|
|
3
|
-
"version": "0.1.1
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Run e2e agent steps on a coding agent you already use (Claude Code, Codex, Cursor, ...) over the Agent Client Protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"e2e",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"zod": "4.6.7"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"e2e": "0.
|
|
48
|
+
"e2e": ">=0.21.4 <1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@modelcontextprotocol/client": "2.4.0",
|
|
52
52
|
"@types/node": "26.6.6",
|
|
53
|
-
"e2e": "0.
|
|
53
|
+
"e2e": "0.23.0",
|
|
54
54
|
"typescript": "7.0.2",
|
|
55
55
|
"vitest": "5.1.0"
|
|
56
56
|
},
|