@e2e-dev/acp 0.1.2 → 0.1.3-nightly-20261116092245

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/.build.json CHANGED
@@ -1 +1 @@
1
- {"version":"0.1.2"}
1
+ {"version":"0.1.3-nightly-20261116092245"}
package/dist/executor.js CHANGED
@@ -49,8 +49,9 @@ function executor(name, options, launch) {
49
49
  cache: 'inherit',
50
50
  async runStep(ctx) {
51
51
  const { held, session } = await ready(ctx, launch, memoryKey);
52
+ ctx.signal.throwIfAborted();
52
53
  const active = activeStep(ctx);
53
- const text = await stepMessage(active, held.tools, held.introduced ? undefined : [RULES, options.system, ctx.agentContext]);
54
+ const text = await untilAborted(stepMessage(active, held.tools, held.introduced ? undefined : [RULES, options.system, ctx.agentContext]), ctx.signal);
54
55
  // A step that ended while its screen was read sends no prompt, which no cancel would reach.
55
56
  ctx.signal.throwIfAborted();
56
57
  held.introduced = true;
@@ -105,7 +106,7 @@ async function ready(ctx, launch, memoryKey) {
105
106
  throw error;
106
107
  throw new AgentError('MODEL_PROVIDER_FAILED', `The ACP agent did not start: ${message(error)}`, { cause: error });
107
108
  }
108
- if (!(await settled(held.turn, LAST_TURN_GRACE_MS))) {
109
+ if (!(await settled(held.turn, LAST_TURN_GRACE_MS, ctx.signal))) {
109
110
  session.close();
110
111
  ctx.attempt.memory.delete(memoryKey);
111
112
  throw new AgentError('MODEL_PROVIDER_FAILED', 'The ACP agent did not stop the turn of a step that already ended');
@@ -242,8 +243,8 @@ function inputTokens(usage) {
242
243
  const cacheApart = cached > 0 && usage.totalTokens >= usage.inputTokens + usage.outputTokens + cached;
243
244
  return cacheApart ? usage.inputTokens + cached : usage.inputTokens;
244
245
  }
245
- /** Whether `promise` settles within `ms`; no promise has nothing to wait for. */
246
- async function settled(promise, ms) {
246
+ /** Whether `promise` settles within `ms`; rejects with the step's reason if the step ends first. */
247
+ async function settled(promise, ms, signal) {
247
248
  if (promise === undefined)
248
249
  return true;
249
250
  let timer;
@@ -251,7 +252,7 @@ async function settled(promise, ms) {
251
252
  timer = setTimeout(() => resolve(false), ms);
252
253
  });
253
254
  const done = promise.then(() => true, () => true);
254
- return Promise.race([done, timeout]).finally(() => clearTimeout(timer));
255
+ return untilAborted(Promise.race([done, timeout]), signal).finally(() => clearTimeout(timer));
255
256
  }
256
257
  /** The verdict of a step where the agent acted with a tool of its own, which the runner neither saw nor recorded. */
257
258
  function ownToolUsed(title) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e2e-dev/acp",
3
- "version": "0.1.2",
3
+ "version": "0.1.3-nightly-20261116092245",
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.21.4 <1"
48
+ "e2e": "0.23.2-nightly-20261116092245"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@modelcontextprotocol/client": "2.4.0",
52
52
  "@types/node": "26.6.6",
53
- "e2e": "0.23.1",
53
+ "e2e": "0.23.2-nightly-20261116092245",
54
54
  "typescript": "7.0.2",
55
55
  "vitest": "5.1.0"
56
56
  },