@agentclientprotocol/claude-agent-acp 0.110.2-preview.1 → 0.110.2-preview.2

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.
@@ -134,7 +134,7 @@ async function forkTranscript(params, dependencies) {
134
134
  const upToMessageId = forkPointOf(params.cursorId, history);
135
135
  timing.phase("cursor", ` resolution=${upToMessageId ? "found" : "missing"}`);
136
136
  if (upToMessageId === undefined) {
137
- throw RequestError.invalidParams({ cursorId: params.cursorId }, `Session ${params.sessionId} has no cursor ${params.cursorId} that a fork can start at. Use a cursor that the session announced with the \`fork\` capability, or send the request without \`cursorId\` to fork the whole session.`);
137
+ throw RequestError.invalidParams({ cursorId: params.cursorId }, `Session ${params.sessionId} has no cursor ${params.cursorId} that a fork can start at. Use a cursor that the session announced with the fork capability, or send the request without cursorId to fork the whole session.`);
138
138
  }
139
139
  const forked = await forkClaudeSession(params.sessionId, { upToMessageId });
140
140
  timing.phase("sdk-fork");
@@ -20,7 +20,7 @@ export function initialConfigOptions(entries) {
20
20
  const seen = new Set();
21
21
  for (const { configId } of entries ?? []) {
22
22
  if (seen.has(configId)) {
23
- throw RequestError.invalidParams({ configId }, `\`configOptions\` sets ${configId} more than once. Send one entry for each config option.`);
23
+ throw RequestError.invalidParams({ configId }, `configOptions sets ${configId} more than once. Send one entry for each config option.`);
24
24
  }
25
25
  seen.add(configId);
26
26
  }
package/dist/providers.js CHANGED
@@ -194,10 +194,10 @@ export function validatedGatewayAuthRequest(params) {
194
194
  const gateway = params._meta?.gateway;
195
195
  if (gateway !== undefined && gateway !== null) {
196
196
  if (typeof gateway !== "object" || !isValidBaseUrl(gateway.baseUrl)) {
197
- throw RequestError.invalidParams({ baseUrl: gateway.baseUrl }, "`_meta.gateway.baseUrl` must be a non-empty absolute http(s) URL.");
197
+ throw RequestError.invalidParams({ baseUrl: gateway.baseUrl }, "_meta.gateway.baseUrl must be a non-empty absolute http(s) URL.");
198
198
  }
199
199
  if (gateway.headers !== undefined && typeof gateway.headers !== "object") {
200
- throw RequestError.invalidParams(undefined, "`_meta.gateway.headers` must be an object of header names to values.");
200
+ throw RequestError.invalidParams(undefined, "_meta.gateway.headers must be an object of header names to values.");
201
201
  }
202
202
  }
203
203
  return params;
@@ -267,7 +267,7 @@ export function providerConfigFromSetRequest(params) {
267
267
  vertex.projectId.trim() === "" ||
268
268
  typeof vertex.region !== "string" ||
269
269
  vertex.region.trim() === "") {
270
- throw RequestError.invalidParams(undefined, "vertex apiType requires non-empty `_meta.claudeCode.vertex.projectId` and `_meta.claudeCode.vertex.region`.");
270
+ throw RequestError.invalidParams(undefined, "vertex apiType requires non-empty _meta.claudeCode.vertex.projectId and _meta.claudeCode.vertex.region.");
271
271
  }
272
272
  config.vertex = { projectId: vertex.projectId, region: vertex.region };
273
273
  }
@@ -68,7 +68,7 @@ function archivedFilter(list) {
68
68
  // Omitted or null is `unarchived`.
69
69
  const value = list.archived ?? "unarchived";
70
70
  if (!ARCHIVED_FILTERS.includes(value)) {
71
- throw RequestError.invalidParams({ archived: value }, '`_meta.jetbrains.air.list.archived` must be "unarchived", "archived" or "all"');
71
+ throw RequestError.invalidParams({ archived: value }, '_meta.jetbrains.air.list.archived must be "unarchived", "archived" or "all"');
72
72
  }
73
73
  return value;
74
74
  }
@@ -76,7 +76,7 @@ function optionalBoolean(list, key) {
76
76
  // Omitted or null is false.
77
77
  const value = list[key] ?? false;
78
78
  if (typeof value !== "boolean") {
79
- throw RequestError.invalidParams({ [key]: value }, `\`_meta.jetbrains.air.list.${key}\` must be a boolean`);
79
+ throw RequestError.invalidParams({ [key]: value }, `_meta.jetbrains.air.list.${key} must be a boolean`);
80
80
  }
81
81
  return value;
82
82
  }
@@ -87,7 +87,7 @@ export function parseListOptions(meta) {
87
87
  // anything else is invalid.
88
88
  const raw = list.limit ?? DEFAULT_LIST_LIMIT;
89
89
  if (typeof raw !== "number" || !Number.isInteger(raw) || raw < 1) {
90
- throw RequestError.invalidParams({ limit: raw }, "`_meta.jetbrains.air.list.limit` must be an integer of at least 1");
90
+ throw RequestError.invalidParams({ limit: raw }, "_meta.jetbrains.air.list.limit must be an integer of at least 1");
91
91
  }
92
92
  return {
93
93
  limit: Math.min(MAX_LIST_LIMIT, raw),
package/dist/v2/agent.js CHANGED
@@ -510,7 +510,7 @@ class V2Agent {
510
510
  }
511
511
  async listSessions(params) {
512
512
  if (params.cwd != null && !path.isAbsolute(params.cwd)) {
513
- throw RequestError.invalidParams({ cwd: params.cwd }, "`cwd` must be an absolute path");
513
+ throw RequestError.invalidParams({ cwd: params.cwd }, "cwd must be an absolute path");
514
514
  }
515
515
  const offset = listOffset(params.cursor);
516
516
  // One more than a page tells whether a next page exists.
@@ -1159,11 +1159,11 @@ async function validatedSetup(params) {
1159
1159
  clientSystemPrompt(request.systemPrompt);
1160
1160
  const { cwd } = request;
1161
1161
  if (!path.isAbsolute(cwd)) {
1162
- throw RequestError.invalidParams({ cwd }, `\`cwd\` must be an absolute path, not ${cwd}`);
1162
+ throw RequestError.invalidParams({ cwd }, `cwd must be an absolute path, not ${cwd}`);
1163
1163
  }
1164
1164
  const stat = await fs.stat(cwd).catch(() => undefined);
1165
1165
  if (!stat?.isDirectory()) {
1166
- throw RequestError.invalidParams({ cwd }, `\`cwd\` is not a directory: ${cwd}`);
1166
+ throw RequestError.invalidParams({ cwd }, `cwd is not a directory: ${cwd}`);
1167
1167
  }
1168
1168
  for (const directory of request.additionalDirectories ?? []) {
1169
1169
  if (!path.isAbsolute(directory)) {
@@ -1184,7 +1184,7 @@ async function storedPromptIds(sessionId, cwd, logger) {
1184
1184
  function assertCwdOf(session, cwd, action) {
1185
1185
  if (cwd === session.cwd)
1186
1186
  return;
1187
- throw RequestError.invalidParams({ cwd }, `Session ${session.sessionId} works in ${session.cwd}: ${action} with that \`cwd\``);
1187
+ throw RequestError.invalidParams({ cwd }, `Session ${session.sessionId} works in ${session.cwd}: ${action} with that cwd`);
1188
1188
  }
1189
1189
  function sameDirectories(left, right) {
1190
1190
  const normalize = (directories) => [...new Set(directories.map((directory) => path.resolve(directory)))].sort().join("\n");
package/dist/v2/prompt.js CHANGED
@@ -22,7 +22,7 @@ export function v1PromptRequest({ prompt,
22
22
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
23
23
  idempotencyKey, ...request }) {
24
24
  if (prompt.length === 0) {
25
- throw RequestError.invalidParams({ prompt }, "`prompt` must hold at least one content block");
25
+ throw RequestError.invalidParams({ prompt }, "prompt must hold at least one content block");
26
26
  }
27
27
  return {
28
28
  ...request,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.110.2-preview.1",
6
+ "version": "0.110.2-preview.2",
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",