cursor-agent-a2a 1.0.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.
- package/LICENSE +21 -0
- package/README.md +306 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/routes/__tests__/cursorAgent.test.d.ts +14 -0
- package/dist/routes/__tests__/cursorAgent.test.d.ts.map +1 -0
- package/dist/routes/__tests__/cursorAgent.test.js +486 -0
- package/dist/routes/__tests__/cursorAgent.test.js.map +1 -0
- package/dist/routes/cursorAgent.d.ts +20 -0
- package/dist/routes/cursorAgent.d.ts.map +1 -0
- package/dist/routes/cursorAgent.js +722 -0
- package/dist/routes/cursorAgent.js.map +1 -0
- package/dist/services/__tests__/cursorAgentService.test.d.ts +12 -0
- package/dist/services/__tests__/cursorAgentService.test.d.ts.map +1 -0
- package/dist/services/__tests__/cursorAgentService.test.js +421 -0
- package/dist/services/__tests__/cursorAgentService.test.js.map +1 -0
- package/dist/services/cursorAgentService.d.ts +60 -0
- package/dist/services/cursorAgentService.d.ts.map +1 -0
- package/dist/services/cursorAgentService.js +392 -0
- package/dist/services/cursorAgentService.js.map +1 -0
- package/dist/types/a2a.d.ts +89 -0
- package/dist/types/a2a.d.ts.map +1 -0
- package/dist/types/a2a.js +7 -0
- package/dist/types/a2a.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor Agent A2A Service
|
|
3
|
+
*
|
|
4
|
+
* Wraps Cursor CLI agent command as an A2A-compatible service.
|
|
5
|
+
* This is an independent service that doesn't depend on AgentStudio's agent system.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Executes `cursor agent --print` commands
|
|
9
|
+
* - Supports JSON and stream-json output formats
|
|
10
|
+
* - Manages workspace directories
|
|
11
|
+
* - Handles authentication via CURSOR_API_KEY or local login
|
|
12
|
+
*/
|
|
13
|
+
import { spawn } from 'child_process';
|
|
14
|
+
/**
|
|
15
|
+
* Generate Agent Card for Cursor Agent
|
|
16
|
+
*/
|
|
17
|
+
export function generateCursorAgentCard(baseUrl) {
|
|
18
|
+
const skills = [
|
|
19
|
+
{
|
|
20
|
+
name: 'code_generation',
|
|
21
|
+
description: 'Generate and modify code files',
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
message: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'Natural language instruction for code generation or modification',
|
|
28
|
+
},
|
|
29
|
+
workspace: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'Working directory path (optional)',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
required: ['message'],
|
|
35
|
+
},
|
|
36
|
+
outputSchema: {
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
response: { type: 'string', description: 'Agent response text' },
|
|
40
|
+
filesModified: {
|
|
41
|
+
type: 'array',
|
|
42
|
+
items: { type: 'string' },
|
|
43
|
+
description: 'List of files that were modified',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'code_review',
|
|
50
|
+
description: 'Review code and provide feedback',
|
|
51
|
+
inputSchema: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {
|
|
54
|
+
message: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'Code review request or specific questions',
|
|
57
|
+
},
|
|
58
|
+
workspace: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'Working directory path (optional)',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
required: ['message'],
|
|
64
|
+
},
|
|
65
|
+
outputSchema: {
|
|
66
|
+
type: 'object',
|
|
67
|
+
properties: {
|
|
68
|
+
response: { type: 'string', description: 'Review feedback' },
|
|
69
|
+
suggestions: {
|
|
70
|
+
type: 'array',
|
|
71
|
+
items: { type: 'string' },
|
|
72
|
+
description: 'List of suggestions',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'code_search',
|
|
79
|
+
description: 'Search and analyze codebase',
|
|
80
|
+
inputSchema: {
|
|
81
|
+
type: 'object',
|
|
82
|
+
properties: {
|
|
83
|
+
message: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
description: 'Search query or analysis request',
|
|
86
|
+
},
|
|
87
|
+
workspace: {
|
|
88
|
+
type: 'string',
|
|
89
|
+
description: 'Working directory path (optional)',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
required: ['message'],
|
|
93
|
+
},
|
|
94
|
+
outputSchema: {
|
|
95
|
+
type: 'object',
|
|
96
|
+
properties: {
|
|
97
|
+
response: { type: 'string', description: 'Search results or analysis' },
|
|
98
|
+
matches: {
|
|
99
|
+
type: 'array',
|
|
100
|
+
items: { type: 'string' },
|
|
101
|
+
description: 'List of matching files or code locations',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
const securitySchemes = [
|
|
108
|
+
{
|
|
109
|
+
type: 'apiKey',
|
|
110
|
+
in: 'header',
|
|
111
|
+
name: 'Authorization',
|
|
112
|
+
scheme: 'bearer',
|
|
113
|
+
},
|
|
114
|
+
];
|
|
115
|
+
return {
|
|
116
|
+
name: 'Cursor Agent',
|
|
117
|
+
description: 'AI-powered code assistant via Cursor CLI. Can generate code, review code, search codebase, and execute commands.',
|
|
118
|
+
version: '1.0.0',
|
|
119
|
+
url: `${baseUrl}/cursor-agent`,
|
|
120
|
+
skills,
|
|
121
|
+
securitySchemes,
|
|
122
|
+
context: {
|
|
123
|
+
a2aAgentId: 'cursor-agent',
|
|
124
|
+
projectId: 'cursor-agent',
|
|
125
|
+
projectName: 'Cursor Agent',
|
|
126
|
+
workingDirectory: process.cwd(),
|
|
127
|
+
agentType: 'cursor-agent',
|
|
128
|
+
agentCategory: 'builtin',
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Execute Cursor Agent command synchronously
|
|
134
|
+
*/
|
|
135
|
+
export async function executeCursorAgent(message, config = {}) {
|
|
136
|
+
const startTime = Date.now();
|
|
137
|
+
const workspace = config.workspace || process.cwd();
|
|
138
|
+
const timeout = config.timeout || 600000; // 10 minutes default
|
|
139
|
+
try {
|
|
140
|
+
// Build command arguments
|
|
141
|
+
const args = [
|
|
142
|
+
'agent',
|
|
143
|
+
'--print',
|
|
144
|
+
'--output-format',
|
|
145
|
+
'json',
|
|
146
|
+
'--workspace',
|
|
147
|
+
workspace,
|
|
148
|
+
'--force', // Allow command execution
|
|
149
|
+
];
|
|
150
|
+
// Add session resume if sessionId is provided
|
|
151
|
+
if (config.sessionId) {
|
|
152
|
+
args.push('--resume', config.sessionId);
|
|
153
|
+
}
|
|
154
|
+
// Set up environment
|
|
155
|
+
const env = {
|
|
156
|
+
...process.env,
|
|
157
|
+
...(config.apiKey && { CURSOR_API_KEY: config.apiKey }),
|
|
158
|
+
};
|
|
159
|
+
// Spawn cursor process
|
|
160
|
+
const child = spawn('cursor', args, {
|
|
161
|
+
cwd: workspace,
|
|
162
|
+
env,
|
|
163
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
164
|
+
});
|
|
165
|
+
// Set up timeout
|
|
166
|
+
const timeoutId = setTimeout(() => {
|
|
167
|
+
child.kill('SIGTERM');
|
|
168
|
+
}, timeout);
|
|
169
|
+
// Write message to stdin
|
|
170
|
+
child.stdin?.write(message);
|
|
171
|
+
child.stdin?.end();
|
|
172
|
+
// Collect output
|
|
173
|
+
let stdout = '';
|
|
174
|
+
let stderr = '';
|
|
175
|
+
let sessionId;
|
|
176
|
+
child.stdout?.on('data', (data) => {
|
|
177
|
+
stdout += data.toString();
|
|
178
|
+
});
|
|
179
|
+
child.stderr?.on('data', (data) => {
|
|
180
|
+
stderr += data.toString();
|
|
181
|
+
});
|
|
182
|
+
// Wait for process to complete
|
|
183
|
+
await new Promise((resolve, reject) => {
|
|
184
|
+
child.on('close', (code) => {
|
|
185
|
+
clearTimeout(timeoutId);
|
|
186
|
+
if (code === 0) {
|
|
187
|
+
resolve();
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
reject(new Error(`Cursor agent exited with code ${code}: ${stderr || stdout}`));
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
child.on('error', (error) => {
|
|
194
|
+
clearTimeout(timeoutId);
|
|
195
|
+
reject(error);
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
// Parse JSON output
|
|
199
|
+
// Cursor CLI returns JSON in format: {"type":"result","result":"...","session_id":"..."}
|
|
200
|
+
let response = '';
|
|
201
|
+
try {
|
|
202
|
+
const lines = stdout.trim().split('\n').filter((line) => line.trim());
|
|
203
|
+
for (const line of lines) {
|
|
204
|
+
try {
|
|
205
|
+
const json = JSON.parse(line);
|
|
206
|
+
// Handle result type (Cursor CLI format)
|
|
207
|
+
if (json.type === 'result' && json.result) {
|
|
208
|
+
response += json.result;
|
|
209
|
+
}
|
|
210
|
+
// Handle assistant message format (if present)
|
|
211
|
+
if (json.type === 'assistant' && json.message?.content) {
|
|
212
|
+
for (const block of json.message.content) {
|
|
213
|
+
if (block.type === 'text') {
|
|
214
|
+
response += block.text;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
// Extract session ID
|
|
219
|
+
if (json.session_id) {
|
|
220
|
+
sessionId = json.session_id;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
catch (parseError) {
|
|
224
|
+
// If JSON parsing fails, use raw output
|
|
225
|
+
if (!response) {
|
|
226
|
+
response = stdout;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
catch (parseError) {
|
|
232
|
+
// Fallback to raw output
|
|
233
|
+
response = stdout || stderr;
|
|
234
|
+
}
|
|
235
|
+
const processingTimeMs = Date.now() - startTime;
|
|
236
|
+
return {
|
|
237
|
+
success: true,
|
|
238
|
+
response: response || 'No response generated',
|
|
239
|
+
sessionId,
|
|
240
|
+
metadata: {
|
|
241
|
+
processingTimeMs,
|
|
242
|
+
},
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
catch (error) {
|
|
246
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
247
|
+
return {
|
|
248
|
+
success: false,
|
|
249
|
+
error: errorMessage,
|
|
250
|
+
metadata: {
|
|
251
|
+
processingTimeMs: Date.now() - startTime,
|
|
252
|
+
},
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Execute Cursor Agent command with streaming output
|
|
258
|
+
*/
|
|
259
|
+
export async function executeCursorAgentStream(message, config = {}, onEvent) {
|
|
260
|
+
const workspace = config.workspace || process.cwd();
|
|
261
|
+
const timeout = config.timeout || 600000; // 10 minutes default
|
|
262
|
+
return new Promise((resolve, reject) => {
|
|
263
|
+
// Build command arguments
|
|
264
|
+
const args = [
|
|
265
|
+
'agent',
|
|
266
|
+
'--print',
|
|
267
|
+
'--output-format',
|
|
268
|
+
'stream-json',
|
|
269
|
+
'--stream-partial-output',
|
|
270
|
+
'--workspace',
|
|
271
|
+
workspace,
|
|
272
|
+
'--force',
|
|
273
|
+
];
|
|
274
|
+
// Add session resume if sessionId is provided
|
|
275
|
+
if (config.sessionId) {
|
|
276
|
+
args.push('--resume', config.sessionId);
|
|
277
|
+
}
|
|
278
|
+
// Set up environment
|
|
279
|
+
const env = {
|
|
280
|
+
...process.env,
|
|
281
|
+
...(config.apiKey && { CURSOR_API_KEY: config.apiKey }),
|
|
282
|
+
};
|
|
283
|
+
// Spawn cursor process
|
|
284
|
+
const child = spawn('cursor', args, {
|
|
285
|
+
cwd: workspace,
|
|
286
|
+
env,
|
|
287
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
288
|
+
});
|
|
289
|
+
// Set up timeout
|
|
290
|
+
const timeoutId = setTimeout(() => {
|
|
291
|
+
child.kill('SIGTERM');
|
|
292
|
+
reject(new Error('Cursor agent command timed out'));
|
|
293
|
+
}, timeout);
|
|
294
|
+
// Write message to stdin
|
|
295
|
+
child.stdin?.write(message);
|
|
296
|
+
child.stdin?.end();
|
|
297
|
+
let sessionId;
|
|
298
|
+
let buffer = '';
|
|
299
|
+
// Process stdout line by line
|
|
300
|
+
child.stdout?.on('data', (data) => {
|
|
301
|
+
buffer += data.toString();
|
|
302
|
+
const lines = buffer.split('\n');
|
|
303
|
+
buffer = lines.pop() || ''; // Keep incomplete line in buffer
|
|
304
|
+
for (const line of lines) {
|
|
305
|
+
if (!line.trim())
|
|
306
|
+
continue;
|
|
307
|
+
try {
|
|
308
|
+
const json = JSON.parse(line);
|
|
309
|
+
const timestamp = Date.now();
|
|
310
|
+
// Extract session ID
|
|
311
|
+
if (json.session_id && !sessionId) {
|
|
312
|
+
sessionId = json.session_id;
|
|
313
|
+
}
|
|
314
|
+
// Map Cursor output to stream events
|
|
315
|
+
// Handle result type (Cursor CLI format)
|
|
316
|
+
if (json.type === 'result') {
|
|
317
|
+
if (json.result) {
|
|
318
|
+
onEvent({
|
|
319
|
+
type: 'message',
|
|
320
|
+
content: json.result,
|
|
321
|
+
sessionId,
|
|
322
|
+
timestamp,
|
|
323
|
+
data: json,
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
onEvent({
|
|
327
|
+
type: 'result',
|
|
328
|
+
sessionId,
|
|
329
|
+
timestamp,
|
|
330
|
+
data: json,
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
else if (json.type === 'assistant' && json.message?.content) {
|
|
334
|
+
for (const block of json.message.content) {
|
|
335
|
+
if (block.type === 'text') {
|
|
336
|
+
onEvent({
|
|
337
|
+
type: 'message',
|
|
338
|
+
content: block.text,
|
|
339
|
+
sessionId,
|
|
340
|
+
timestamp,
|
|
341
|
+
data: json,
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
else if (block.type === 'tool_use') {
|
|
345
|
+
onEvent({
|
|
346
|
+
type: 'tool_use',
|
|
347
|
+
sessionId,
|
|
348
|
+
timestamp,
|
|
349
|
+
data: block,
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
catch (parseError) {
|
|
356
|
+
// If JSON parsing fails, send as raw message
|
|
357
|
+
onEvent({
|
|
358
|
+
type: 'message',
|
|
359
|
+
content: line,
|
|
360
|
+
sessionId,
|
|
361
|
+
timestamp: Date.now(),
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
// Process stderr
|
|
367
|
+
child.stderr?.on('data', (data) => {
|
|
368
|
+
const errorText = data.toString();
|
|
369
|
+
onEvent({
|
|
370
|
+
type: 'error',
|
|
371
|
+
content: errorText,
|
|
372
|
+
sessionId,
|
|
373
|
+
timestamp: Date.now(),
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
// Handle process completion
|
|
377
|
+
child.on('close', (code) => {
|
|
378
|
+
clearTimeout(timeoutId);
|
|
379
|
+
if (code === 0) {
|
|
380
|
+
resolve({ sessionId });
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
383
|
+
reject(new Error(`Cursor agent exited with code ${code}`));
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
child.on('error', (error) => {
|
|
387
|
+
clearTimeout(timeoutId);
|
|
388
|
+
reject(error);
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
//# sourceMappingURL=cursorAgentService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursorAgentService.js","sourceRoot":"","sources":["../../src/services/cursorAgentService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO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AS,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClC,OAAO,CAAC;gBACN,IAAI,EAAE,OAAO;gBACb,OAAO,EAAE,SAAS;gBAClB,SAAS;gBACT,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;aACtB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,4BAA4B;QAC5B,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YACzB,YAAY,CAAC,SAAS,CAAC,CAAC;YACxB,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;gBACf,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;YACzB,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,KAAK,CAAC,iCAAiC,IAAI,EAAE,CAAC,CAAC,CAAC;YAC7D,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YAC1B,YAAY,CAAC,SAAS,CAAC,CAAC;YACxB,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A2A Protocol Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Independent type definitions for A2A (Agent-to-Agent) protocol
|
|
5
|
+
*/
|
|
6
|
+
export interface JSONSchema {
|
|
7
|
+
type: string;
|
|
8
|
+
properties?: Record<string, any>;
|
|
9
|
+
required?: string[];
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
export interface Skill {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
inputSchema: JSONSchema;
|
|
16
|
+
outputSchema: JSONSchema;
|
|
17
|
+
}
|
|
18
|
+
export interface SecurityScheme {
|
|
19
|
+
type: 'apiKey';
|
|
20
|
+
in: 'header';
|
|
21
|
+
name: 'Authorization';
|
|
22
|
+
scheme: 'bearer';
|
|
23
|
+
}
|
|
24
|
+
export interface AgentCard {
|
|
25
|
+
name: string;
|
|
26
|
+
description: string;
|
|
27
|
+
version: string;
|
|
28
|
+
url: string;
|
|
29
|
+
skills: Skill[];
|
|
30
|
+
securitySchemes: SecurityScheme[];
|
|
31
|
+
context: {
|
|
32
|
+
a2aAgentId: string;
|
|
33
|
+
projectId: string;
|
|
34
|
+
projectName: string;
|
|
35
|
+
workingDirectory: string;
|
|
36
|
+
agentType: string;
|
|
37
|
+
agentCategory: 'builtin' | 'subagent';
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export type TaskStatus = 'pending' | 'running' | 'completed' | 'failed' | 'canceled';
|
|
41
|
+
export interface TaskOutput {
|
|
42
|
+
result: string;
|
|
43
|
+
artifacts?: Array<{
|
|
44
|
+
type: string;
|
|
45
|
+
name: string;
|
|
46
|
+
data?: string;
|
|
47
|
+
url?: string;
|
|
48
|
+
}>;
|
|
49
|
+
}
|
|
50
|
+
export interface TaskError {
|
|
51
|
+
message: string;
|
|
52
|
+
code: string;
|
|
53
|
+
stack?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface A2AMessageRequest {
|
|
56
|
+
message: string;
|
|
57
|
+
context?: Record<string, unknown>;
|
|
58
|
+
sessionId?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface A2AMessageResponse {
|
|
61
|
+
response: string;
|
|
62
|
+
sessionId?: string;
|
|
63
|
+
metadata?: {
|
|
64
|
+
processingTimeMs?: number;
|
|
65
|
+
[key: string]: any;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export interface A2ATaskRequest {
|
|
69
|
+
message: string;
|
|
70
|
+
timeout?: number;
|
|
71
|
+
context?: Record<string, unknown>;
|
|
72
|
+
workspace?: string;
|
|
73
|
+
sessionId?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface A2ATaskStatusResponse {
|
|
76
|
+
taskId: string;
|
|
77
|
+
status: TaskStatus;
|
|
78
|
+
progress?: {
|
|
79
|
+
currentStep?: string;
|
|
80
|
+
percentComplete?: number;
|
|
81
|
+
};
|
|
82
|
+
output?: TaskOutput;
|
|
83
|
+
errorDetails?: TaskError;
|
|
84
|
+
createdAt: string;
|
|
85
|
+
updatedAt: string;
|
|
86
|
+
startedAt?: string;
|
|
87
|
+
completedAt?: string;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=a2a.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a2a.d.ts","sourceRoot":"","sources":["../../src/types/a2a.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,UAAU,CAAC;IACxB,YAAY,EAAE,UAAU,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,QAAQ,CAAC;IACb,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,QAAQ,CAAC;CAClB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,OAAO,EAAE;QACP,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE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B;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE;QACT,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a2a.js","sourceRoot":"","sources":["../../src/types/a2a.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cursor-agent-a2a",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Independent A2A-compatible service wrapping Cursor CLI agent command",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md",
|
|
11
|
+
"LICENSE"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"dev": "tsx watch src/index.ts",
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"start": "node dist/index.js",
|
|
17
|
+
"type-check": "tsc --noEmit",
|
|
18
|
+
"test": "vitest",
|
|
19
|
+
"test:run": "vitest run",
|
|
20
|
+
"test:coverage": "vitest run --coverage",
|
|
21
|
+
"prepublishOnly": "pnpm run build"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"cursor",
|
|
25
|
+
"a2a",
|
|
26
|
+
"agent",
|
|
27
|
+
"cli",
|
|
28
|
+
"agent-to-agent",
|
|
29
|
+
"ai",
|
|
30
|
+
"code-assistant"
|
|
31
|
+
],
|
|
32
|
+
"author": {
|
|
33
|
+
"name": "jeffkit",
|
|
34
|
+
"email": "bbmyth@gmail.com"
|
|
35
|
+
},
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/jeffkit/cursor-agent-a2a.git"
|
|
40
|
+
},
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/jeffkit/cursor-agent-a2a/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/jeffkit/cursor-agent-a2a#readme",
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"express": "^4.18.2",
|
|
50
|
+
"cors": "^2.8.5",
|
|
51
|
+
"uuid": "^9.0.1",
|
|
52
|
+
"dotenv": "^16.3.1"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@types/express": "^4.17.21",
|
|
56
|
+
"@types/node": "^20.10.0",
|
|
57
|
+
"@types/uuid": "^9.0.7",
|
|
58
|
+
"@types/cors": "^2.8.17",
|
|
59
|
+
"@types/supertest": "^6.0.3",
|
|
60
|
+
"@vitest/coverage-v8": "^2.1.0",
|
|
61
|
+
"@vitest/ui": "^2.1.0",
|
|
62
|
+
"supertest": "^7.1.4",
|
|
63
|
+
"tsx": "^4.7.0",
|
|
64
|
+
"typescript": "^5.3.3",
|
|
65
|
+
"vitest": "^2.1.0"
|
|
66
|
+
}
|
|
67
|
+
}
|