mcacp 0.1.0

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.
Files changed (49) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +195 -0
  3. package/dist/acp/agent-requests.d.ts +19 -0
  4. package/dist/acp/agent-requests.js +166 -0
  5. package/dist/acp/agent-requests.js.map +1 -0
  6. package/dist/acp/lifecycle.d.ts +50 -0
  7. package/dist/acp/lifecycle.js +127 -0
  8. package/dist/acp/lifecycle.js.map +1 -0
  9. package/dist/acp/status.d.ts +31 -0
  10. package/dist/acp/status.js +72 -0
  11. package/dist/acp/status.js.map +1 -0
  12. package/dist/acp/transport.d.ts +34 -0
  13. package/dist/acp/transport.js +175 -0
  14. package/dist/acp/transport.js.map +1 -0
  15. package/dist/config/index.d.ts +27 -0
  16. package/dist/config/index.js +162 -0
  17. package/dist/config/index.js.map +1 -0
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.js +11 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/permissions/index.d.ts +16 -0
  22. package/dist/permissions/index.js +70 -0
  23. package/dist/permissions/index.js.map +1 -0
  24. package/dist/registry/index.d.ts +52 -0
  25. package/dist/registry/index.js +240 -0
  26. package/dist/registry/index.js.map +1 -0
  27. package/dist/server/index.d.ts +5 -0
  28. package/dist/server/index.js +271 -0
  29. package/dist/server/index.js.map +1 -0
  30. package/dist/sessions/index.d.ts +91 -0
  31. package/dist/sessions/index.js +151 -0
  32. package/dist/sessions/index.js.map +1 -0
  33. package/dist/sessions/prompt.d.ts +78 -0
  34. package/dist/sessions/prompt.js +361 -0
  35. package/dist/sessions/prompt.js.map +1 -0
  36. package/dist/types/acp.d.ts +343 -0
  37. package/dist/types/acp.js +17 -0
  38. package/dist/types/acp.js.map +1 -0
  39. package/dist/types/config.d.ts +135 -0
  40. package/dist/types/config.js +43 -0
  41. package/dist/types/config.js.map +1 -0
  42. package/dist/types/index.d.ts +3 -0
  43. package/dist/types/index.js +4 -0
  44. package/dist/types/index.js.map +1 -0
  45. package/dist/types/tools.d.ts +619 -0
  46. package/dist/types/tools.js +441 -0
  47. package/dist/types/tools.js.map +1 -0
  48. package/docs/configuration.md +164 -0
  49. package/package.json +58 -0
@@ -0,0 +1,343 @@
1
+ /** Unique identifier for an ACP session. */
2
+ export type SessionId = string;
3
+ /** Protocol version expressed as a uint16 value. */
4
+ export type ProtocolVersion = number;
5
+ /** Identifier for a JSON-RPC request. */
6
+ export type RequestId = string | number | null;
7
+ /** Unique identifier for a tool call within a session. */
8
+ export type ToolCallId = string;
9
+ /** Unique identifier for a terminal instance within a session. */
10
+ export type TerminalId = string;
11
+ /** Identifier for a session mode. */
12
+ export type SessionModeId = string;
13
+ /** Role of a participant in the conversation. */
14
+ export type Role = 'user' | 'assistant';
15
+ /** Parameters sent by the client to initialize the ACP connection. */
16
+ export interface InitializeParams {
17
+ protocolVersion: ProtocolVersion;
18
+ clientCapabilities: ClientCapabilities;
19
+ clientInfo?: Implementation;
20
+ }
21
+ /** Result returned by the agent after initialization. */
22
+ export interface InitializeResult {
23
+ protocolVersion: ProtocolVersion;
24
+ agentCapabilities: AgentCapabilities;
25
+ agentInfo?: Implementation;
26
+ authMethods?: AuthMethod[];
27
+ }
28
+ /** Describes a named software component with version info. */
29
+ export interface Implementation {
30
+ name: string;
31
+ version: string;
32
+ title?: string;
33
+ }
34
+ /** Capabilities the client advertises during initialization. */
35
+ export interface ClientCapabilities {
36
+ fs?: {
37
+ readTextFile?: boolean;
38
+ writeTextFile?: boolean;
39
+ };
40
+ terminal?: boolean;
41
+ }
42
+ /** Capabilities the agent advertises during initialization. */
43
+ export interface AgentCapabilities {
44
+ loadSession?: boolean;
45
+ mcpCapabilities?: {
46
+ http?: boolean;
47
+ sse?: boolean;
48
+ };
49
+ promptCapabilities?: {
50
+ image?: boolean;
51
+ audio?: boolean;
52
+ embeddedContext?: boolean;
53
+ };
54
+ sessionCapabilities?: Record<string, boolean>;
55
+ }
56
+ /** Describes an authentication method the agent supports. */
57
+ export interface AuthMethod {
58
+ id: string;
59
+ name: string;
60
+ description?: string;
61
+ }
62
+ export interface McpServerStdio {
63
+ name: string;
64
+ command: string;
65
+ args?: string[];
66
+ env?: EnvVariable[];
67
+ }
68
+ export interface McpServerHttp {
69
+ type: 'http';
70
+ name: string;
71
+ url: string;
72
+ headers?: HttpHeader[];
73
+ }
74
+ export interface McpServerSse {
75
+ type: 'sse';
76
+ name: string;
77
+ url: string;
78
+ headers?: HttpHeader[];
79
+ }
80
+ export type McpServer = McpServerStdio | McpServerHttp | McpServerSse;
81
+ export interface EnvVariable {
82
+ name: string;
83
+ value: string;
84
+ }
85
+ export interface HttpHeader {
86
+ name: string;
87
+ value: string;
88
+ }
89
+ export interface SessionNewParams {
90
+ cwd: string;
91
+ mcpServers: McpServer[];
92
+ }
93
+ export interface SessionNewResult {
94
+ sessionId: SessionId;
95
+ modes?: SessionModeState;
96
+ }
97
+ export interface SessionLoadParams {
98
+ sessionId: SessionId;
99
+ cwd: string;
100
+ mcpServers: McpServer[];
101
+ }
102
+ export interface SessionLoadResult {
103
+ modes?: SessionModeState;
104
+ }
105
+ export interface SessionMode {
106
+ id: SessionModeId;
107
+ name: string;
108
+ description?: string;
109
+ }
110
+ export interface SessionModeState {
111
+ availableModes: SessionMode[];
112
+ currentModeId: SessionModeId;
113
+ }
114
+ export interface SessionSetModeParams {
115
+ sessionId: SessionId;
116
+ modeId: SessionModeId;
117
+ }
118
+ export interface SessionCancelParams {
119
+ sessionId: SessionId;
120
+ }
121
+ export type ContentBlock = TextContent | ImageContent | AudioContent | ResourceLinkContent | ResourceContent;
122
+ export interface TextContent {
123
+ type: 'text';
124
+ text: string;
125
+ }
126
+ export interface ImageContent {
127
+ type: 'image';
128
+ data: string;
129
+ mimeType: string;
130
+ }
131
+ export interface AudioContent {
132
+ type: 'audio';
133
+ data: string;
134
+ mimeType: string;
135
+ }
136
+ export interface ResourceLinkContent {
137
+ type: 'resource_link';
138
+ uri: string;
139
+ mimeType?: string;
140
+ title?: string;
141
+ }
142
+ export interface ResourceContent {
143
+ type: 'resource';
144
+ resource: EmbeddedResource;
145
+ }
146
+ export interface EmbeddedResource {
147
+ uri: string;
148
+ mimeType?: string;
149
+ text?: string;
150
+ blob?: string;
151
+ }
152
+ export interface SessionPromptParams {
153
+ sessionId: SessionId;
154
+ prompt: ContentBlock[];
155
+ }
156
+ export interface SessionPromptResult {
157
+ stopReason: StopReason;
158
+ }
159
+ export type StopReason = 'end_turn' | 'max_tokens' | 'max_turn_requests' | 'refusal' | 'cancelled';
160
+ export interface SessionUpdateNotification {
161
+ sessionId: SessionId;
162
+ update: SessionUpdate;
163
+ }
164
+ export type SessionUpdate = PlanUpdate | AgentMessageChunkUpdate | AgentThoughtChunkUpdate | UserMessageChunkUpdate | ToolCallUpdate | ToolCallStatusUpdate | AvailableCommandsUpdate | CurrentModeUpdate;
165
+ export interface PlanUpdate {
166
+ sessionUpdate: 'plan';
167
+ entries: PlanEntry[];
168
+ }
169
+ export interface PlanEntry {
170
+ content: string;
171
+ status: 'pending' | 'in_progress' | 'completed';
172
+ priority: 'high' | 'medium' | 'low';
173
+ }
174
+ export interface AgentMessageChunkUpdate {
175
+ sessionUpdate: 'agent_message_chunk';
176
+ content: ContentBlock;
177
+ }
178
+ export interface AgentThoughtChunkUpdate {
179
+ sessionUpdate: 'agent_thought_chunk';
180
+ content: ContentBlock;
181
+ }
182
+ export interface UserMessageChunkUpdate {
183
+ sessionUpdate: 'user_message_chunk';
184
+ content: ContentBlock;
185
+ }
186
+ export interface ToolCallUpdate {
187
+ sessionUpdate: 'tool_call';
188
+ toolCallId: ToolCallId;
189
+ title: string;
190
+ status: ToolCallStatus;
191
+ kind?: ToolKind;
192
+ content?: ToolCallContent[];
193
+ locations?: ToolCallLocation[];
194
+ input?: string;
195
+ metadata?: Record<string, unknown>;
196
+ }
197
+ export interface ToolCallStatusUpdate {
198
+ sessionUpdate: 'tool_call_update';
199
+ toolCallId: ToolCallId;
200
+ status: ToolCallStatus;
201
+ content?: ToolCallContent[];
202
+ }
203
+ export type ToolCallStatus = 'pending' | 'in_progress' | 'completed' | 'cancelled';
204
+ export type ToolKind = 'text' | 'command' | 'file_edit' | 'file_create' | 'file_delete' | 'search' | 'other';
205
+ export type ToolCallContent = {
206
+ type: 'content';
207
+ content: ContentBlock;
208
+ } | {
209
+ type: 'diff';
210
+ diff: Diff;
211
+ };
212
+ export interface ToolCallLocation {
213
+ path: string;
214
+ startLine?: number;
215
+ endLine?: number;
216
+ }
217
+ export interface Diff {
218
+ path: string;
219
+ oldText: string;
220
+ newText: string;
221
+ }
222
+ export interface AvailableCommandsUpdate {
223
+ sessionUpdate: 'available_commands_update';
224
+ commands: string[];
225
+ }
226
+ export interface CurrentModeUpdate {
227
+ sessionUpdate: 'current_mode_update';
228
+ modeState: SessionModeState;
229
+ }
230
+ export interface RequestPermissionParams {
231
+ sessionId: SessionId;
232
+ toolCall: ToolCallInfo;
233
+ options: PermissionOption[];
234
+ }
235
+ export interface ToolCallInfo {
236
+ toolCallId: ToolCallId;
237
+ title: string;
238
+ }
239
+ export interface PermissionOption {
240
+ optionId: string;
241
+ name: string;
242
+ kind: 'allow_once' | 'allow_always' | 'reject_once' | 'reject_always';
243
+ }
244
+ export type RequestPermissionOutcome = {
245
+ selected: {
246
+ optionId: string;
247
+ };
248
+ } | {
249
+ cancelled: Record<string, never>;
250
+ };
251
+ export interface FsReadTextFileParams {
252
+ sessionId: SessionId;
253
+ path: string;
254
+ line?: number;
255
+ limit?: number;
256
+ }
257
+ export interface FsReadTextFileResult {
258
+ content: string;
259
+ }
260
+ export interface FsWriteTextFileParams {
261
+ sessionId: SessionId;
262
+ path: string;
263
+ content: string;
264
+ }
265
+ export interface FsWriteTextFileResult {
266
+ }
267
+ export interface TerminalCreateParams {
268
+ sessionId: SessionId;
269
+ command: string;
270
+ args?: string[];
271
+ cwd?: string;
272
+ env?: EnvVariable[];
273
+ outputByteLimit?: number;
274
+ }
275
+ export interface TerminalCreateResult {
276
+ terminalId: TerminalId;
277
+ }
278
+ export interface TerminalOutputParams {
279
+ sessionId: SessionId;
280
+ terminalId: TerminalId;
281
+ }
282
+ export interface TerminalOutputResult {
283
+ output: string;
284
+ truncated: boolean;
285
+ exitStatus?: TerminalExitStatus;
286
+ }
287
+ export interface TerminalWaitForExitParams {
288
+ sessionId: SessionId;
289
+ terminalId: TerminalId;
290
+ }
291
+ export interface TerminalWaitForExitResult {
292
+ exitCode?: number;
293
+ signal?: string;
294
+ }
295
+ export interface TerminalKillParams {
296
+ sessionId: SessionId;
297
+ terminalId: TerminalId;
298
+ }
299
+ export interface TerminalReleaseParams {
300
+ sessionId: SessionId;
301
+ terminalId: TerminalId;
302
+ }
303
+ export interface TerminalExitStatus {
304
+ exitCode?: number;
305
+ signal?: string;
306
+ }
307
+ export declare enum AcpErrorCode {
308
+ ParseError = -32700,
309
+ InvalidRequest = -32600,
310
+ MethodNotFound = -32601,
311
+ InvalidParams = -32602,
312
+ InternalError = -32603,
313
+ AuthenticationRequired = -32000,
314
+ ResourceNotFound = -32002
315
+ }
316
+ export interface Annotations {
317
+ audience?: ('user' | 'assistant')[];
318
+ priority?: number;
319
+ lastModified?: string;
320
+ }
321
+ export interface JsonRpcRequest {
322
+ jsonrpc: '2.0';
323
+ id: RequestId;
324
+ method: string;
325
+ params?: unknown;
326
+ }
327
+ export interface JsonRpcResponse {
328
+ jsonrpc: '2.0';
329
+ id: RequestId;
330
+ result?: unknown;
331
+ error?: JsonRpcError;
332
+ }
333
+ export interface JsonRpcNotification {
334
+ jsonrpc: '2.0';
335
+ method: string;
336
+ params?: unknown;
337
+ }
338
+ export interface JsonRpcError {
339
+ code: number;
340
+ message: string;
341
+ data?: unknown;
342
+ }
343
+ export type JsonRpcMessage = JsonRpcRequest | JsonRpcResponse | JsonRpcNotification;
@@ -0,0 +1,17 @@
1
+ // =============================================================================
2
+ // Agent Client Protocol (ACP) - TypeScript Type Definitions
3
+ // =============================================================================
4
+ // -----------------------------------------------------------------------------
5
+ // Error Codes
6
+ // -----------------------------------------------------------------------------
7
+ export var AcpErrorCode;
8
+ (function (AcpErrorCode) {
9
+ AcpErrorCode[AcpErrorCode["ParseError"] = -32700] = "ParseError";
10
+ AcpErrorCode[AcpErrorCode["InvalidRequest"] = -32600] = "InvalidRequest";
11
+ AcpErrorCode[AcpErrorCode["MethodNotFound"] = -32601] = "MethodNotFound";
12
+ AcpErrorCode[AcpErrorCode["InvalidParams"] = -32602] = "InvalidParams";
13
+ AcpErrorCode[AcpErrorCode["InternalError"] = -32603] = "InternalError";
14
+ AcpErrorCode[AcpErrorCode["AuthenticationRequired"] = -32000] = "AuthenticationRequired";
15
+ AcpErrorCode[AcpErrorCode["ResourceNotFound"] = -32002] = "ResourceNotFound";
16
+ })(AcpErrorCode || (AcpErrorCode = {}));
17
+ //# sourceMappingURL=acp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acp.js","sourceRoot":"","sources":["../../src/types/acp.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,4DAA4D;AAC5D,gFAAgF;AA8ZhF,gFAAgF;AAChF,cAAc;AACd,gFAAgF;AAEhF,MAAM,CAAN,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,gEAAmB,CAAA;IACnB,wEAAuB,CAAA;IACvB,wEAAuB,CAAA;IACvB,sEAAsB,CAAA;IACtB,sEAAsB,CAAA;IACtB,wFAA+B,CAAA;IAC/B,4EAAyB,CAAA;AAC3B,CAAC,EARW,YAAY,KAAZ,YAAY,QAQvB"}
@@ -0,0 +1,135 @@
1
+ import { z } from 'zod';
2
+ export declare const PermissionPolicySchema: z.ZodEnum<["elicit", "allow_all", "deny_all", "operator"]>;
3
+ export type PermissionPolicy = z.infer<typeof PermissionPolicySchema>;
4
+ /** Per-agent config — matches the Zed/JetBrains agent_servers schema at its core. */
5
+ export declare const AgentServerSchema: z.ZodObject<{
6
+ /** Executable command to run */
7
+ command: z.ZodOptional<z.ZodString>;
8
+ /** Command-line arguments */
9
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10
+ /** Environment variables */
11
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
12
+ /** Auto-reap timeout in milliseconds. 0 = disabled. */
13
+ autoReapMs: z.ZodOptional<z.ZodNumber>;
14
+ /** Default permission policy for new sessions with this agent */
15
+ permissionPolicy: z.ZodOptional<z.ZodEnum<["elicit", "allow_all", "deny_all", "operator"]>>;
16
+ /** Custom install path override */
17
+ installPath: z.ZodOptional<z.ZodString>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ command?: string | undefined;
20
+ args?: string[] | undefined;
21
+ env?: Record<string, string> | undefined;
22
+ autoReapMs?: number | undefined;
23
+ permissionPolicy?: "elicit" | "allow_all" | "deny_all" | "operator" | undefined;
24
+ installPath?: string | undefined;
25
+ }, {
26
+ command?: string | undefined;
27
+ args?: string[] | undefined;
28
+ env?: Record<string, string> | undefined;
29
+ autoReapMs?: number | undefined;
30
+ permissionPolicy?: "elicit" | "allow_all" | "deny_all" | "operator" | undefined;
31
+ installPath?: string | undefined;
32
+ }>;
33
+ export type AgentServer = z.infer<typeof AgentServerSchema>;
34
+ export declare const McacpConfigSchema: z.ZodObject<{
35
+ /** Registry URLs to fetch agent listings from */
36
+ registries: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
37
+ /** Per-agent configuration — same key as Zed and JetBrains */
38
+ agent_servers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
39
+ /** Executable command to run */
40
+ command: z.ZodOptional<z.ZodString>;
41
+ /** Command-line arguments */
42
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
43
+ /** Environment variables */
44
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
45
+ /** Auto-reap timeout in milliseconds. 0 = disabled. */
46
+ autoReapMs: z.ZodOptional<z.ZodNumber>;
47
+ /** Default permission policy for new sessions with this agent */
48
+ permissionPolicy: z.ZodOptional<z.ZodEnum<["elicit", "allow_all", "deny_all", "operator"]>>;
49
+ /** Custom install path override */
50
+ installPath: z.ZodOptional<z.ZodString>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ command?: string | undefined;
53
+ args?: string[] | undefined;
54
+ env?: Record<string, string> | undefined;
55
+ autoReapMs?: number | undefined;
56
+ permissionPolicy?: "elicit" | "allow_all" | "deny_all" | "operator" | undefined;
57
+ installPath?: string | undefined;
58
+ }, {
59
+ command?: string | undefined;
60
+ args?: string[] | undefined;
61
+ env?: Record<string, string> | undefined;
62
+ autoReapMs?: number | undefined;
63
+ permissionPolicy?: "elicit" | "allow_all" | "deny_all" | "operator" | undefined;
64
+ installPath?: string | undefined;
65
+ }>>>;
66
+ /** Default auto-reap timeout in ms */
67
+ defaultAutoReapMs: z.ZodDefault<z.ZodNumber>;
68
+ /** Default permission policy */
69
+ defaultPermissionPolicy: z.ZodDefault<z.ZodEnum<["elicit", "allow_all", "deny_all", "operator"]>>;
70
+ /** Directory for session persistence files */
71
+ sessionDir: z.ZodDefault<z.ZodString>;
72
+ /** Directory for installed agent binaries */
73
+ installDir: z.ZodDefault<z.ZodString>;
74
+ /** Nagle timeout (ms) for batching text chunk events. 0 = disabled (push every chunk immediately). */
75
+ promptConsolidateMs: z.ZodDefault<z.ZodNumber>;
76
+ /** Heartbeat timeout in ms — agent considered unresponsive after this */
77
+ heartbeatTimeoutMs: z.ZodDefault<z.ZodNumber>;
78
+ /** MCACP client info sent during ACP initialize */
79
+ clientInfo: z.ZodDefault<z.ZodObject<{
80
+ name: z.ZodDefault<z.ZodString>;
81
+ version: z.ZodDefault<z.ZodString>;
82
+ title: z.ZodDefault<z.ZodString>;
83
+ }, "strip", z.ZodTypeAny, {
84
+ name: string;
85
+ version: string;
86
+ title: string;
87
+ }, {
88
+ name?: string | undefined;
89
+ version?: string | undefined;
90
+ title?: string | undefined;
91
+ }>>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ registries: string[];
94
+ agent_servers: Record<string, {
95
+ command?: string | undefined;
96
+ args?: string[] | undefined;
97
+ env?: Record<string, string> | undefined;
98
+ autoReapMs?: number | undefined;
99
+ permissionPolicy?: "elicit" | "allow_all" | "deny_all" | "operator" | undefined;
100
+ installPath?: string | undefined;
101
+ }>;
102
+ defaultAutoReapMs: number;
103
+ defaultPermissionPolicy: "elicit" | "allow_all" | "deny_all" | "operator";
104
+ sessionDir: string;
105
+ installDir: string;
106
+ promptConsolidateMs: number;
107
+ heartbeatTimeoutMs: number;
108
+ clientInfo: {
109
+ name: string;
110
+ version: string;
111
+ title: string;
112
+ };
113
+ }, {
114
+ registries?: string[] | undefined;
115
+ agent_servers?: Record<string, {
116
+ command?: string | undefined;
117
+ args?: string[] | undefined;
118
+ env?: Record<string, string> | undefined;
119
+ autoReapMs?: number | undefined;
120
+ permissionPolicy?: "elicit" | "allow_all" | "deny_all" | "operator" | undefined;
121
+ installPath?: string | undefined;
122
+ }> | undefined;
123
+ defaultAutoReapMs?: number | undefined;
124
+ defaultPermissionPolicy?: "elicit" | "allow_all" | "deny_all" | "operator" | undefined;
125
+ sessionDir?: string | undefined;
126
+ installDir?: string | undefined;
127
+ promptConsolidateMs?: number | undefined;
128
+ heartbeatTimeoutMs?: number | undefined;
129
+ clientInfo?: {
130
+ name?: string | undefined;
131
+ version?: string | undefined;
132
+ title?: string | undefined;
133
+ } | undefined;
134
+ }>;
135
+ export type McacpConfig = z.infer<typeof McacpConfigSchema>;
@@ -0,0 +1,43 @@
1
+ import { z } from 'zod';
2
+ export const PermissionPolicySchema = z.enum(['elicit', 'allow_all', 'deny_all', 'operator']);
3
+ /** Per-agent config — matches the Zed/JetBrains agent_servers schema at its core. */
4
+ export const AgentServerSchema = z.object({
5
+ /** Executable command to run */
6
+ command: z.string().optional(),
7
+ /** Command-line arguments */
8
+ args: z.array(z.string()).optional(),
9
+ /** Environment variables */
10
+ env: z.record(z.string()).optional(),
11
+ // -- MCACP extensions (not in editor configs) --
12
+ /** Auto-reap timeout in milliseconds. 0 = disabled. */
13
+ autoReapMs: z.number().min(0).optional(),
14
+ /** Default permission policy for new sessions with this agent */
15
+ permissionPolicy: PermissionPolicySchema.optional(),
16
+ /** Custom install path override */
17
+ installPath: z.string().optional(),
18
+ });
19
+ export const McacpConfigSchema = z.object({
20
+ /** Registry URLs to fetch agent listings from */
21
+ registries: z.array(z.string().url()).default(['https://cdn.agentclientprotocol.com/registry/v1/latest/registry.json']),
22
+ /** Per-agent configuration — same key as Zed and JetBrains */
23
+ agent_servers: z.record(z.string(), AgentServerSchema).default({}),
24
+ /** Default auto-reap timeout in ms */
25
+ defaultAutoReapMs: z.number().min(0).default(300000),
26
+ /** Default permission policy */
27
+ defaultPermissionPolicy: PermissionPolicySchema.default('elicit'),
28
+ /** Directory for session persistence files */
29
+ sessionDir: z.string().default('./.mcacp'),
30
+ /** Directory for installed agent binaries */
31
+ installDir: z.string().default('./.mcacp/agents'),
32
+ /** Nagle timeout (ms) for batching text chunk events. 0 = disabled (push every chunk immediately). */
33
+ promptConsolidateMs: z.number().min(0).default(5000),
34
+ /** Heartbeat timeout in ms — agent considered unresponsive after this */
35
+ heartbeatTimeoutMs: z.number().min(0).default(60000),
36
+ /** MCACP client info sent during ACP initialize */
37
+ clientInfo: z.object({
38
+ name: z.string().default('mcacp'),
39
+ version: z.string().default('0.1.0'),
40
+ title: z.string().default('MCACP Bridge'),
41
+ }).default({}),
42
+ });
43
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;AAG9F,qFAAqF;AACrF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,gCAAgC;IAChC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,6BAA6B;IAC7B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpC,4BAA4B;IAC5B,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpC,iDAAiD;IACjD,uDAAuD;IACvD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACxC,iEAAiE;IACjE,gBAAgB,EAAE,sBAAsB,CAAC,QAAQ,EAAE;IACnD,mCAAmC;IACnC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,iDAAiD;IACjD,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAC3C,CAAC,sEAAsE,CAAC,CACzE;IACD,8DAA8D;IAC9D,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,iBAAiB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAClE,sCAAsC;IACtC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACpD,gCAAgC;IAChC,uBAAuB,EAAE,sBAAsB,CAAC,OAAO,CAAC,QAAQ,CAAC;IACjE,8CAA8C;IAC9C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;IAC1C,6CAA6C;IAC7C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC;IACjD,sGAAsG;IACtG,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACpD,yEAAyE;IACzE,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACpD,mDAAmD;IACnD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;QACjC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;QACpC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC;KAC1C,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CACf,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './acp.js';
2
+ export * from './tools.js';
3
+ export * from './config.js';
@@ -0,0 +1,4 @@
1
+ export * from './acp.js';
2
+ export * from './tools.js';
3
+ export * from './config.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}