@wrongstack/acp 0.313.0 → 0.316.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.
@@ -1,11 +1,4 @@
1
1
  import { type ClientCapabilities, type RunTurnApi, type SessionConfigOption, type SessionMode } from './protocol-contract.js';
2
- export declare const WRONGSTACK_AUTH_METHODS: {
3
- id: string;
4
- name: string;
5
- description: string;
6
- type: string;
7
- args: string[];
8
- }[];
9
2
  /** Single global mode id, sufficient for v1. */
10
3
  export declare const DEFAULT_MODE_ID = "code";
11
4
  export declare const DEFAULT_MAX_SESSIONS = 64;
@@ -4,10 +4,11 @@ export declare class ACPSessionError extends Error {
4
4
  readonly cause: unknown;
5
5
  constructor(kind: ACPSessionErrorKind, message: string, cause?: unknown);
6
6
  }
7
- export interface JsonRpcError {
7
+ interface JsonRpcError {
8
8
  code: number;
9
9
  message: string;
10
10
  data?: unknown;
11
11
  }
12
12
  export declare function isJsonRpcError(v: unknown): v is JsonRpcError;
13
+ export {};
13
14
  //# sourceMappingURL=acp-session-errors.d.ts.map
@@ -1,6 +1,5 @@
1
1
  import type { AgentCapabilities, McpServer, SessionId, SessionInfo } from '../types/acp-v1.js';
2
2
  import type { ACPSessionOptions } from './acp-session-types.js';
3
- export declare function filterMcpServers(agentCapabilities: AgentCapabilities, servers?: McpServer[]): McpServer[];
4
3
  export interface ACPSessionOpContext {
5
4
  closed: boolean;
6
5
  sessionId: SessionId | null;
package/dist/index.js CHANGED
@@ -4613,6 +4613,7 @@ async function runOneAcpTask(opts) {
4613
4613
  config: { id: role, name: role, role, provider: "acp", prompt: "" },
4614
4614
  budget,
4615
4615
  signal: opts.signal ?? new AbortController().signal,
4616
+ ...opts.sessionId !== void 0 ? { sessionId: opts.sessionId } : {},
4616
4617
  bridge: null
4617
4618
  };
4618
4619
  const result = await runner({ id: `acp-${role}`, description: opts.task }, ctx);
@@ -20,6 +20,8 @@ export interface RunOneAcpTaskOptions {
20
20
  signal?: AbortSignal | undefined;
21
21
  onProgress?: ACPProgressHandler | undefined;
22
22
  permissionPolicy?: PermissionPolicy | undefined;
23
+ /** Owning WrongStack session for session-scoped ACP operations. */
24
+ sessionId?: string | undefined;
23
25
  }
24
26
  export interface RunOneAcpTaskResult {
25
27
  result: string;
@@ -41,10 +41,10 @@ export type SessionId = string & {
41
41
  export type ToolCallId = string & {
42
42
  readonly __acpToolCallId: unique symbol;
43
43
  };
44
- export type MessageId = string & {
44
+ type MessageId = string & {
45
45
  readonly __acpMessageId: unique symbol;
46
46
  };
47
- export type TerminalId = string & {
47
+ type TerminalId = string & {
48
48
  readonly __acpTerminalId: unique symbol;
49
49
  };
50
50
  export type PlanEntryId = string & {
@@ -70,18 +70,18 @@ export interface PromptCapabilities {
70
70
  audio?: boolean | undefined;
71
71
  embeddedContext?: boolean | undefined;
72
72
  }
73
- export interface McpCapabilities {
73
+ interface McpCapabilities {
74
74
  http?: boolean | undefined;
75
75
  sse?: boolean | undefined;
76
76
  }
77
- export interface SessionCapabilities {
77
+ interface SessionCapabilities {
78
78
  close?: Record<string, unknown> | undefined;
79
79
  list?: Record<string, unknown> | undefined;
80
80
  delete?: Record<string, unknown> | undefined;
81
81
  resume?: Record<string, unknown> | undefined;
82
82
  additionalDirectories?: Record<string, unknown> | undefined;
83
83
  }
84
- export interface AuthCapabilities {
84
+ interface AuthCapabilities {
85
85
  logout?: Record<string, unknown> | undefined;
86
86
  }
87
87
  export interface AgentCapabilities {
@@ -103,7 +103,7 @@ export interface AuthenticateRequest {
103
103
  export type AuthenticateResponse = {};
104
104
  export type LogoutRequest = {};
105
105
  export type LogoutResponse = {};
106
- export interface StdioMcpServer {
106
+ interface StdioMcpServer {
107
107
  name: string;
108
108
  command: string;
109
109
  args?: string[] | undefined;
@@ -112,7 +112,7 @@ export interface StdioMcpServer {
112
112
  value: string;
113
113
  }[] | undefined;
114
114
  }
115
- export interface HttpMcpServer {
115
+ interface HttpMcpServer {
116
116
  type: 'http';
117
117
  name: string;
118
118
  url: string;
@@ -121,7 +121,7 @@ export interface HttpMcpServer {
121
121
  value: string;
122
122
  }[] | undefined;
123
123
  }
124
- export interface SseMcpServer {
124
+ interface SseMcpServer {
125
125
  type: 'sse';
126
126
  name: string;
127
127
  url: string;
@@ -192,7 +192,7 @@ export interface SessionConfigOption {
192
192
  * about audience/priority. Spec leaves shape open; we mirror the fields
193
193
  * the spec shows in its examples.
194
194
  */
195
- export interface ContentAnnotations {
195
+ interface ContentAnnotations {
196
196
  audience?: ('user' | 'assistant')[] | undefined;
197
197
  priority?: number | undefined;
198
198
  [key: string]: unknown;
@@ -202,7 +202,7 @@ export interface TextContent {
202
202
  text: string;
203
203
  annotations?: ContentAnnotations | undefined;
204
204
  }
205
- export interface ImageContent {
205
+ interface ImageContent {
206
206
  type: 'image';
207
207
  mimeType: string;
208
208
  /** Base64-encoded image data. */
@@ -210,31 +210,31 @@ export interface ImageContent {
210
210
  uri?: string | undefined;
211
211
  annotations?: ContentAnnotations | undefined;
212
212
  }
213
- export interface AudioContent {
213
+ interface AudioContent {
214
214
  type: 'audio';
215
215
  mimeType: string;
216
216
  /** Base64-encoded audio data. */
217
217
  data: string;
218
218
  annotations?: ContentAnnotations | undefined;
219
219
  }
220
- export interface TextResourceContents {
220
+ interface TextResourceContents {
221
221
  uri: string;
222
222
  mimeType?: string | undefined;
223
223
  text: string;
224
224
  }
225
- export interface BlobResourceContents {
225
+ interface BlobResourceContents {
226
226
  uri: string;
227
227
  mimeType?: string | undefined;
228
228
  /** Base64-encoded binary. */
229
229
  blob: string;
230
230
  }
231
- export type EmbeddedResourceContents = TextResourceContents | BlobResourceContents;
232
- export interface EmbeddedResourceContent {
231
+ type EmbeddedResourceContents = TextResourceContents | BlobResourceContents;
232
+ interface EmbeddedResourceContent {
233
233
  type: 'resource';
234
234
  resource: EmbeddedResourceContents;
235
235
  annotations?: ContentAnnotations | undefined;
236
236
  }
237
- export interface ResourceLinkContent {
237
+ interface ResourceLinkContent {
238
238
  type: 'resource_link';
239
239
  uri: string;
240
240
  name: string;
@@ -260,7 +260,7 @@ export type ToolCallContent = {
260
260
  type: 'terminal';
261
261
  terminalId: TerminalId;
262
262
  };
263
- export interface ToolCallLocation {
263
+ interface ToolCallLocation {
264
264
  path: string;
265
265
  /** 1-based per the spec's argument requirements. */
266
266
  line?: number | undefined;
@@ -291,23 +291,23 @@ export interface ToolCallUpdateFields {
291
291
  rawInput?: Record<string, unknown> | undefined;
292
292
  rawOutput?: Record<string, unknown> | undefined;
293
293
  }
294
- export type PlanEntryPriority = 'high' | 'medium' | 'low';
295
- export type PlanEntryStatus = 'pending' | 'in_progress' | 'completed';
294
+ type PlanEntryPriority = 'high' | 'medium' | 'low';
295
+ type PlanEntryStatus = 'pending' | 'in_progress' | 'completed';
296
296
  export interface PlanEntry {
297
297
  /** Required by the spec for the array shape, but per-entry id is optional. */
298
298
  content: string;
299
299
  priority: PlanEntryPriority;
300
300
  status: PlanEntryStatus;
301
301
  }
302
- export interface AvailableCommandInput {
302
+ interface AvailableCommandInput {
303
303
  hint: string;
304
304
  }
305
- export interface AvailableCommand {
305
+ interface AvailableCommand {
306
306
  name: string;
307
307
  description: string;
308
308
  input?: AvailableCommandInput | undefined;
309
309
  }
310
- export type SessionModeId = string & {
310
+ type SessionModeId = string & {
311
311
  readonly __acpModeId: unique symbol;
312
312
  };
313
313
  export interface SessionMode {
@@ -315,19 +315,19 @@ export interface SessionMode {
315
315
  name: string;
316
316
  description?: string | undefined;
317
317
  }
318
- export interface SessionModeState {
318
+ interface SessionModeState {
319
319
  currentModeId: SessionModeId;
320
320
  availableModes: SessionMode[];
321
321
  }
322
322
  /** Reserved spec categories. Underscore-prefixed names are free for custom use. */
323
- export type ConfigOptionCategory = 'mode' | 'model' | 'thought_level' | `_${string}`;
324
- export type ConfigOptionType = 'select' | string;
325
- export interface ConfigOptionValue {
323
+ type ConfigOptionCategory = 'mode' | 'model' | 'thought_level' | `_${string}`;
324
+ type ConfigOptionType = 'select' | string;
325
+ interface ConfigOptionValue {
326
326
  value: string;
327
327
  name: string;
328
328
  description?: string | undefined;
329
329
  }
330
- export interface ConfigOption {
330
+ interface ConfigOption {
331
331
  id: string;
332
332
  name: string;
333
333
  description?: string | undefined;
@@ -356,7 +356,7 @@ export interface UsageUpdate {
356
356
  size: number;
357
357
  cost?: UsageCost | undefined;
358
358
  }
359
- export type PermissionOptionKind = 'allow_once' | 'allow_always' | 'reject_once' | 'reject_always';
359
+ type PermissionOptionKind = 'allow_once' | 'allow_always' | 'reject_once' | 'reject_always';
360
360
  export interface PermissionOption {
361
361
  optionId: string;
362
362
  name: string;
@@ -444,7 +444,7 @@ export interface UsageUpdateUpdate {
444
444
  * the raw payload so forward-compat code can switch on
445
445
  * `kind === 'next_edit_suggestions'` etc. without losing the data.
446
446
  */
447
- export interface UnstableSessionUpdate {
447
+ interface UnstableSessionUpdate {
448
448
  sessionUpdate: `_unstable_${string}`;
449
449
  [key: string]: unknown;
450
450
  }
@@ -473,4 +473,5 @@ export interface SessionUpdateNotification {
473
473
  * without updating the consumer.
474
474
  */
475
475
  export declare function assertNeverSessionUpdate(x: never): never;
476
+ export {};
476
477
  //# sourceMappingURL=acp-v1.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/acp",
3
- "version": "0.313.0",
3
+ "version": "0.316.1",
4
4
  "license": "MIT",
5
5
  "description": "ACP (Agent Client Protocol) integration for WrongStack — client + agent support",
6
6
  "keywords": [
@@ -52,7 +52,7 @@
52
52
  ],
53
53
  "dependencies": {
54
54
  "@agentclientprotocol/sdk": "^1.4.0",
55
- "@wrongstack/core": "0.313.0"
55
+ "@wrongstack/core": "0.316.1"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/node": "^26.2.0",