@agentclientprotocol/claude-agent-acp 0.31.2 → 0.31.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../src/acp-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,mBAAmB,EACnB,mBAAmB,EAGnB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EAEnB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EAEpB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,6BAA6B,EAC7B,8BAA8B,EAC9B,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EAEtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EAIV,SAAS,EAET,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,KAAK,EAIL,0BAA0B,EAC1B,cAAc,EAEf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAKlG,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAUhD,OAAO,EAAwC,QAAQ,EAAe,MAAM,YAAY,CAAC;AAEzF,eAAO,MAAM,iBAAiB,QACuC,CAAC;AAgBtE;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,CAA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E,MAAM,CAAC;CACd,GACA,mBAAmB,EAAE,CA0CvB;AAED,wBAAgB,MAAM;;;EAWrB"}
package/dist/acp-agent.js CHANGED
@@ -914,7 +914,7 @@ export class ClaudeAcpAgent {
914
914
  // Effort SDK sync is handled inside applyConfigOptionValue so that direct
915
915
  // effort changes and effort changes induced by a model switch go through
916
916
  // the same path.
917
- await this.applyConfigOptionValue(session, params.configId, resolvedValue);
917
+ await this.applyConfigOptionValue(params.sessionId, session, params.configId, resolvedValue);
918
918
  return { configOptions: session.configOptions };
919
919
  }
920
920
  async applySessionMode(sessionId, modeId) {
@@ -929,8 +929,15 @@ export class ClaudeAcpAgent {
929
929
  default:
930
930
  throw new Error("Invalid Mode");
931
931
  }
932
+ const session = this.sessions[sessionId];
933
+ if (!session) {
934
+ throw new Error("Session not found");
935
+ }
936
+ if (!session.modes.availableModes.some((mode) => mode.id === modeId)) {
937
+ throw new Error(`Mode ${modeId} is not available in this session`);
938
+ }
932
939
  try {
933
- await this.sessions[sessionId].query.setPermissionMode(modeId);
940
+ await session.query.setPermissionMode(modeId);
934
941
  }
935
942
  catch (error) {
936
943
  if (error instanceof Error) {
@@ -990,7 +997,7 @@ export class ClaudeAcpAgent {
990
997
  };
991
998
  }
992
999
  if (toolName === "ExitPlanMode") {
993
- const options = [
1000
+ const optionsAll = [
994
1001
  { kind: "allow_always", name: 'Yes, and use "auto" mode', optionId: "auto" },
995
1002
  {
996
1003
  kind: "allow_always",
@@ -1001,12 +1008,18 @@ export class ClaudeAcpAgent {
1001
1008
  { kind: "reject_once", name: "No, keep planning", optionId: "plan" },
1002
1009
  ];
1003
1010
  if (ALLOW_BYPASS) {
1004
- options.unshift({
1011
+ optionsAll.unshift({
1005
1012
  kind: "allow_always",
1006
1013
  name: "Yes, and bypass permissions",
1007
1014
  optionId: "bypassPermissions",
1008
1015
  });
1009
1016
  }
1017
+ // Filter against the session's currently-advertised modes so we never
1018
+ // present options the active model can't honor (e.g. `auto` on Haiku).
1019
+ // `bypassPermissions` is already covered by `availableModes` via
1020
+ // `buildAvailableModes`/`ALLOW_BYPASS`. The `plan` option is a
1021
+ // "keep planning" reject path; it's always present in `availableModes`.
1022
+ const options = optionsAll.filter((o) => session.modes.availableModes.some((m) => m.id === o.optionId));
1010
1023
  const response = await this.client.requestPermission({
1011
1024
  options,
1012
1025
  sessionId,
@@ -1019,24 +1032,26 @@ export class ClaudeAcpAgent {
1019
1032
  if (signal.aborted || response.outcome?.outcome === "cancelled") {
1020
1033
  throw new Error("Tool use aborted");
1021
1034
  }
1022
- if (response.outcome?.outcome === "selected" &&
1023
- (response.outcome.optionId === "default" ||
1024
- response.outcome.optionId === "acceptEdits" ||
1025
- response.outcome.optionId === "auto" ||
1026
- response.outcome.optionId === "bypassPermissions")) {
1035
+ const selectedMode = response.outcome?.outcome === "selected" ? response.outcome.optionId : undefined;
1036
+ const selectedModeWasOffered = options.some((option) => option.optionId === selectedMode);
1037
+ if (selectedModeWasOffered &&
1038
+ (selectedMode === "default" ||
1039
+ selectedMode === "acceptEdits" ||
1040
+ selectedMode === "auto" ||
1041
+ selectedMode === "bypassPermissions")) {
1027
1042
  await this.client.sessionUpdate({
1028
1043
  sessionId,
1029
1044
  update: {
1030
1045
  sessionUpdate: "current_mode_update",
1031
- currentModeId: response.outcome.optionId,
1046
+ currentModeId: selectedMode,
1032
1047
  },
1033
1048
  });
1034
- await this.updateConfigOption(sessionId, "mode", response.outcome.optionId);
1049
+ await this.updateConfigOption(sessionId, "mode", selectedMode);
1035
1050
  return {
1036
1051
  behavior: "allow",
1037
1052
  updatedInput: toolInput,
1038
1053
  updatedPermissions: suggestions ?? [
1039
- { type: "setMode", mode: response.outcome.optionId, destination: "session" },
1054
+ { type: "setMode", mode: selectedMode, destination: "session" },
1040
1055
  ],
1041
1056
  };
1042
1057
  }
@@ -1123,7 +1138,7 @@ export class ClaudeAcpAgent {
1123
1138
  const session = this.sessions[sessionId];
1124
1139
  if (!session)
1125
1140
  return;
1126
- await this.applyConfigOptionValue(session, configId, value);
1141
+ await this.applyConfigOptionValue(sessionId, session, configId, value);
1127
1142
  await this.client.sessionUpdate({
1128
1143
  sessionId,
1129
1144
  update: {
@@ -1132,10 +1147,10 @@ export class ClaudeAcpAgent {
1132
1147
  },
1133
1148
  });
1134
1149
  }
1135
- async applyConfigOptionValue(session, configId, value) {
1136
- // Sync top-level session state
1150
+ async applyConfigOptionValue(sessionId, session, configId, value) {
1137
1151
  if (configId === "mode") {
1138
1152
  session.modes = { ...session.modes, currentModeId: value };
1153
+ session.configOptions = session.configOptions.map((o) => o.id === configId && typeof o.currentValue === "string" ? { ...o, currentValue: value } : o);
1139
1154
  }
1140
1155
  else if (configId === "model") {
1141
1156
  if (session.models.currentModelId !== value) {
@@ -1146,9 +1161,35 @@ export class ClaudeAcpAgent {
1146
1161
  session.contextWindowSize = inferContextWindowFromModel(value) ?? DEFAULT_CONTEXT_WINDOW;
1147
1162
  }
1148
1163
  session.models = { ...session.models, currentModelId: value };
1149
- }
1150
- // Update configOptions
1151
- if (configId === "model") {
1164
+ // Recompute availableModes for the new model and clamp the current
1165
+ // mode if the SDK no longer offers it (today: "auto" on Haiku).
1166
+ // `ModelInfo.supportsAutoMode` is the canonical SDK signal.
1167
+ const newModelInfo = session.modelInfos.find((m) => m.value === value);
1168
+ const newAvailableModes = buildAvailableModes(newModelInfo);
1169
+ // Capture BEFORE mutating session.modes so the log message reflects
1170
+ // the invalidated mode rather than "default".
1171
+ const previousModeId = session.modes.currentModeId;
1172
+ let modeDowngraded = false;
1173
+ if (!newAvailableModes.some((m) => m.id === previousModeId)) {
1174
+ session.modes = {
1175
+ availableModes: newAvailableModes,
1176
+ currentModeId: "default",
1177
+ };
1178
+ try {
1179
+ await session.query.setPermissionMode("default");
1180
+ }
1181
+ catch (err) {
1182
+ // Failing the entire model switch over a bookkeeping sync error is
1183
+ // worse UX than logging and continuing; the user explicitly asked
1184
+ // to change models. The next setPermissionMode from the user will
1185
+ // either succeed or surface a fresh error.
1186
+ this.logger.error(`Failed to sync permissionMode to "default" after model switch invalidated "${previousModeId}":`, err);
1187
+ }
1188
+ modeDowngraded = true;
1189
+ }
1190
+ else {
1191
+ session.modes = { ...session.modes, availableModes: newAvailableModes };
1192
+ }
1152
1193
  // Rebuild config options since effort levels depend on the selected model
1153
1194
  const effortOpt = session.configOptions.find((o) => o.id === "effort");
1154
1195
  const currentEffort = typeof effortOpt?.currentValue === "string" ? effortOpt.currentValue : undefined;
@@ -1161,6 +1202,21 @@ export class ClaudeAcpAgent {
1161
1202
  effortLevel: newEffort,
1162
1203
  });
1163
1204
  }
1205
+ // Emit current_mode_update only after session.modes AND
1206
+ // session.configOptions have been fully reconciled. This way, a failure
1207
+ // in the configOptions/effort rebuild above can't leave the client with
1208
+ // a clamped currentModeId but stale configOptions, and the notification
1209
+ // still precedes the caller's config_option_update so order-sensitive
1210
+ // clients update currentModeId before re-rendering the option list.
1211
+ if (modeDowngraded) {
1212
+ await this.client.sessionUpdate({
1213
+ sessionId,
1214
+ update: {
1215
+ sessionUpdate: "current_mode_update",
1216
+ currentModeId: "default",
1217
+ },
1218
+ });
1219
+ }
1164
1220
  }
1165
1221
  else {
1166
1222
  session.configOptions = session.configOptions.map((o) => o.id === configId && typeof o.currentValue === "string" ? { ...o, currentValue: value } : o);
@@ -1382,43 +1438,39 @@ export class ClaudeAcpAgent {
1382
1438
  throw RequestError.authRequired(undefined, "This integration does not support using claude.ai subscriptions.");
1383
1439
  }
1384
1440
  const models = await getAvailableModels(q, initializationResult.models, settingsManager, this.logger);
1385
- const availableModes = [
1386
- {
1387
- id: "auto",
1388
- name: "Auto",
1389
- description: "Use a model classifier to approve/deny permission prompts",
1390
- },
1391
- {
1392
- id: "default",
1393
- name: "Default",
1394
- description: "Standard behavior, prompts for dangerous operations",
1395
- },
1396
- {
1397
- id: "acceptEdits",
1398
- name: "Accept Edits",
1399
- description: "Auto-accept file edit operations",
1400
- },
1401
- {
1402
- id: "plan",
1403
- name: "Plan Mode",
1404
- description: "Planning mode, no actual tool execution",
1405
- },
1406
- {
1407
- id: "dontAsk",
1408
- name: "Don't Ask",
1409
- description: "Don't prompt for permissions, deny if not pre-approved",
1410
- },
1411
- ];
1412
- // Only works in non-root mode
1413
- if (ALLOW_BYPASS) {
1414
- availableModes.push({
1415
- id: "bypassPermissions",
1416
- name: "Bypass Permissions",
1417
- description: "Bypass all permission checks",
1418
- });
1441
+ // Gate `auto` (and future model-specific modes) on the resolved model's
1442
+ // `ModelInfo`. See `buildAvailableModes` for the canonical SDK signal.
1443
+ const currentModelInfo = initializationResult.models.find((m) => m.value === models.currentModelId);
1444
+ const availableModes = buildAvailableModes(currentModelInfo);
1445
+ // Clamp `permissionMode` if the resolved session does not offer it. The
1446
+ // common case is `permissions.defaultMode: "auto"` resolving to a model
1447
+ // that does not support auto mode (e.g. Haiku); without this clamp the
1448
+ // SDK would later throw `"auto mode unavailable for this model"` from
1449
+ // `setPermissionMode`. Keep `permissionMode` as the resolved user intent
1450
+ // (matches what was passed into `options.permissionMode` above) and use
1451
+ // `effectiveMode` for the post-clamp value the session actually runs in.
1452
+ let effectiveMode = permissionMode;
1453
+ if (!availableModes.some((m) => m.id === effectiveMode)) {
1454
+ if (effectiveMode === "auto") {
1455
+ this.logger.error(`permissions.defaultMode "auto" is not available for model ` +
1456
+ `"${models.currentModelId}"; falling back to "default".`);
1457
+ }
1458
+ else {
1459
+ this.logger.error(`permissions.defaultMode "${effectiveMode}" is not available in ` +
1460
+ `this session; falling back to "default".`);
1461
+ }
1462
+ effectiveMode = "default";
1463
+ // Sync the SDK so it doesn't keep "auto" cached internally. Wrapped in
1464
+ // try/catch since failing here would abort session creation entirely.
1465
+ try {
1466
+ await q.setPermissionMode("default");
1467
+ }
1468
+ catch (err) {
1469
+ this.logger.error("Failed to sync clamped permissionMode to SDK:", err);
1470
+ }
1419
1471
  }
1420
1472
  const modes = {
1421
- currentModeId: permissionMode,
1473
+ currentModeId: effectiveMode,
1422
1474
  availableModes,
1423
1475
  };
1424
1476
  const configOptions = buildConfigOptions(modes, models, initializationResult.models, settingsManager.getSettings().effortLevel);
@@ -1531,6 +1583,48 @@ function createEnvForGateway(gatewayMeta) {
1531
1583
  ANTHROPIC_AUTH_TOKEN: "", // Must be specified to bypass claude login requirement
1532
1584
  };
1533
1585
  }
1586
+ /**
1587
+ * Build the list of permission modes the agent will advertise for the given
1588
+ * model. `auto` is gated by `ModelInfo.supportsAutoMode === true`, which is
1589
+ * the SDK's model-level availability signal. `undefined`/`false` both exclude
1590
+ * `auto`. `bypassPermissions` is still gated by `ALLOW_BYPASS`.
1591
+ */
1592
+ function buildAvailableModes(modelInfo) {
1593
+ const modes = [];
1594
+ // Only advertise "auto" when the SDK reports the model supports it.
1595
+ if (modelInfo?.supportsAutoMode === true) {
1596
+ modes.push({
1597
+ id: "auto",
1598
+ name: "Auto",
1599
+ description: "Use a model classifier to approve/deny permission prompts",
1600
+ });
1601
+ }
1602
+ modes.push({
1603
+ id: "default",
1604
+ name: "Default",
1605
+ description: "Standard behavior, prompts for dangerous operations",
1606
+ }, {
1607
+ id: "acceptEdits",
1608
+ name: "Accept Edits",
1609
+ description: "Auto-accept file edit operations",
1610
+ }, {
1611
+ id: "plan",
1612
+ name: "Plan Mode",
1613
+ description: "Planning mode, no actual tool execution",
1614
+ }, {
1615
+ id: "dontAsk",
1616
+ name: "Don't Ask",
1617
+ description: "Don't prompt for permissions, deny if not pre-approved",
1618
+ });
1619
+ if (ALLOW_BYPASS) {
1620
+ modes.push({
1621
+ id: "bypassPermissions",
1622
+ name: "Bypass Permissions",
1623
+ description: "Bypass all permission checks",
1624
+ });
1625
+ }
1626
+ return modes;
1627
+ }
1534
1628
  function buildConfigOptions(modes, models, modelInfos, currentEffortLevel) {
1535
1629
  const options = [
1536
1630
  {
@@ -1587,7 +1681,7 @@ function buildConfigOptions(modes, models, modelInfos, currentEffortLevel) {
1587
1681
  id: "effort",
1588
1682
  name: "Effort",
1589
1683
  description: "Available effort levels for this model",
1590
- category: "effort",
1684
+ category: "thought_level",
1591
1685
  type: "select",
1592
1686
  currentValue: validEffort,
1593
1687
  options: effortOptions,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.31.2",
6
+ "version": "0.31.4",
7
7
  "description": "An ACP-compatible coding agent powered by the Claude Agent SDK (TypeScript)",
8
8
  "main": "dist/lib.js",
9
9
  "types": "dist/lib.d.ts",
@@ -60,16 +60,16 @@
60
60
  "author": "Zed Industries",
61
61
  "license": "Apache-2.0",
62
62
  "dependencies": {
63
- "@agentclientprotocol/sdk": "0.20.0",
64
- "@anthropic-ai/claude-agent-sdk": "0.2.119",
63
+ "@agentclientprotocol/sdk": "0.21.0",
64
+ "@anthropic-ai/claude-agent-sdk": "0.2.121",
65
65
  "zod": "^3.25.0 || ^4.0.0"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@anthropic-ai/sdk": "0.89.0",
69
69
  "@eslint/js": "10.0.1",
70
70
  "@types/node": "25.6.0",
71
- "@typescript-eslint/eslint-plugin": "8.59.0",
72
- "@typescript-eslint/parser": "8.59.0",
71
+ "@typescript-eslint/eslint-plugin": "8.59.1",
72
+ "@typescript-eslint/parser": "8.59.1",
73
73
  "eslint": "10.2.1",
74
74
  "eslint-config-prettier": "10.1.8",
75
75
  "globals": "17.5.0",