adhdev 0.1.53 → 0.2.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/dist/cli-entrypoint.js +12020 -0
- package/dist/cli-entrypoint.js.map +1 -0
- package/dist/index.js +9789 -9864
- package/dist/index.js.map +1 -0
- package/package.json +19 -16
- package/providers/_builtin/CONTRIBUTING.md +141 -0
- package/providers/_builtin/README.md +51 -0
- package/providers/_builtin/acp/agentpool/provider.json +47 -0
- package/providers/_builtin/acp/amp/provider.json +45 -0
- package/providers/_builtin/acp/auggie/provider.json +50 -0
- package/providers/_builtin/acp/autodev/provider.json +47 -0
- package/providers/_builtin/acp/autohand/provider.json +45 -0
- package/providers/_builtin/acp/blackbox-ai/provider.json +47 -0
- package/providers/_builtin/acp/claude-agent/provider.json +50 -0
- package/providers/_builtin/acp/cline-acp/provider.json +47 -0
- package/providers/_builtin/acp/code-assistant/provider.json +47 -0
- package/providers/_builtin/acp/codebuddy/provider.json +47 -0
- package/providers/_builtin/acp/codex-cli/provider.json +50 -0
- package/providers/_builtin/acp/corust-agent/provider.json +45 -0
- package/providers/_builtin/acp/crow-cli/provider.json +47 -0
- package/providers/_builtin/acp/cursor-acp/provider.json +47 -0
- package/providers/_builtin/acp/deepagents/provider.json +45 -0
- package/providers/_builtin/acp/dimcode/provider.json +47 -0
- package/providers/_builtin/acp/docker-cagent/provider.json +50 -0
- package/providers/_builtin/acp/factory-droid/provider.json +53 -0
- package/providers/_builtin/acp/fast-agent/provider.json +45 -0
- package/providers/_builtin/acp/fount/provider.json +47 -0
- package/providers/_builtin/acp/gemini-cli/provider.json +107 -0
- package/providers/_builtin/acp/github-copilot/provider.json +47 -0
- package/providers/_builtin/acp/goose/provider.json +50 -0
- package/providers/_builtin/acp/junie/provider.json +45 -0
- package/providers/_builtin/acp/kilo/provider.json +45 -0
- package/providers/_builtin/acp/kimi-cli/provider.json +50 -0
- package/providers/_builtin/acp/kiro-cli/provider.json +47 -0
- package/providers/_builtin/acp/minion-code/provider.json +45 -0
- package/providers/_builtin/acp/mistral-vibe/provider.json +50 -0
- package/providers/_builtin/acp/nova/provider.json +47 -0
- package/providers/_builtin/acp/openclaw/provider.json +47 -0
- package/providers/_builtin/acp/opencode/provider.json +45 -0
- package/providers/_builtin/acp/openhands/provider.json +47 -0
- package/providers/_builtin/acp/pi-acp/provider.json +45 -0
- package/providers/_builtin/acp/qoder/provider.json +47 -0
- package/providers/_builtin/acp/qwen-code/provider.json +53 -0
- package/providers/_builtin/acp/stakpak/provider.json +47 -0
- package/providers/_builtin/acp/vtcode/provider.json +47 -0
- package/providers/_builtin/cli/claude-cli/provider.json +78 -0
- package/providers/_builtin/cli/codex-cli/provider.json +60 -0
- package/providers/_builtin/cli/gemini-cli/provider.json +64 -0
- package/providers/_builtin/extension/cline/provider.json +11 -0
- package/providers/_builtin/extension/cline/scripts/open_panel.js +1 -1
- package/providers/_builtin/extension/cline/{provider.js → scripts.js} +29 -55
- package/providers/_builtin/extension/roo-code/provider.json +11 -0
- package/providers/_builtin/extension/roo-code/{provider.js → scripts.js} +27 -97
- package/providers/_builtin/ide/antigravity/provider.json +32 -0
- package/providers/_builtin/ide/antigravity/scripts.js +73 -0
- package/providers/_builtin/ide/cursor/provider.json +35 -0
- package/providers/_builtin/ide/cursor/{provider.js → scripts.js} +31 -69
- package/providers/_builtin/ide/kiro/provider.json +36 -0
- package/providers/_builtin/ide/kiro/scripts/webview_send_message.js +72 -0
- package/providers/_builtin/ide/kiro/scripts.js +62 -0
- package/providers/_builtin/ide/pearai/provider.json +36 -0
- package/providers/_builtin/ide/pearai/scripts/list_sessions.js +38 -0
- package/providers/_builtin/ide/pearai/scripts/new_session.js +55 -0
- package/providers/_builtin/ide/pearai/scripts/webview_list_sessions.js +62 -0
- package/providers/_builtin/ide/pearai/scripts/webview_new_session.js +32 -4
- package/providers/_builtin/ide/pearai/scripts/webview_send_message.js +72 -0
- package/providers/_builtin/ide/pearai/scripts/webview_switch_session.js +34 -0
- package/providers/_builtin/ide/pearai/scripts.js +74 -0
- package/providers/_builtin/ide/trae/provider.json +35 -0
- package/providers/_builtin/ide/trae/scripts/send_message.js +53 -3
- package/providers/_builtin/ide/trae/scripts.js +57 -0
- package/providers/_builtin/ide/vscode/provider.json +33 -0
- package/providers/_builtin/ide/vscode-insiders/provider.json +31 -0
- package/providers/_builtin/ide/vscodium/provider.json +32 -0
- package/providers/_builtin/ide/windsurf/provider.json +22 -0
- package/providers/_builtin/ide/windsurf/scripts.js +57 -0
- package/providers/_builtin/validate.js +156 -0
- package/README.md +0 -43
- package/dist/dev-console-monaco.js +0 -176
- package/dist/dev-console.css +0 -326
- package/dist/dev-console.html +0 -148
- package/dist/dev-console.js +0 -1165
- package/dist/index.d.ts +0 -2
- package/dist/node_datachannel-LPY6EJH5.node +0 -0
- package/providers/_builtin/acp/codex-cli/provider.js +0 -54
- package/providers/_builtin/acp/goose/provider.js +0 -32
- package/providers/_builtin/acp/opencode/provider.js +0 -32
- package/providers/_builtin/cli/claude-cli/provider.js +0 -125
- package/providers/_builtin/cli/codex-cli/provider.js +0 -77
- package/providers/_builtin/cli/gemini-cli/provider.js +0 -121
- package/providers/_builtin/ide/antigravity/provider.js +0 -114
- package/providers/_builtin/ide/cursor/provider.js.backup +0 -116
- package/providers/_builtin/ide/cursor/provider.js.bak +0 -127
- package/providers/_builtin/ide/cursor/scripts_backup/focus_editor.js +0 -20
- package/providers/_builtin/ide/cursor/scripts_backup/list_chats.js +0 -111
- package/providers/_builtin/ide/cursor/scripts_backup/new_session.js +0 -62
- package/providers/_builtin/ide/cursor/scripts_backup/open_panel.js +0 -31
- package/providers/_builtin/ide/cursor/scripts_backup/read_chat.js +0 -433
- package/providers/_builtin/ide/cursor/scripts_backup/resolve_action.js +0 -90
- package/providers/_builtin/ide/cursor/scripts_backup/send_message.js +0 -86
- package/providers/_builtin/ide/cursor/scripts_backup/switch_session.js +0 -63
- package/providers/_builtin/ide/kiro/provider.js +0 -86
- package/providers/_builtin/ide/pearai/provider.js +0 -88
- package/providers/_builtin/ide/trae/provider.js +0 -83
- package/providers/_builtin/ide/vscode/provider.js +0 -36
- package/providers/_builtin/ide/vscode-insiders/provider.js +0 -27
- package/providers/_builtin/ide/vscodium/provider.js +0 -27
- package/providers/_builtin/ide/windsurf/provider.js +0 -76
- /package/providers/{_helpers → _builtin/_helpers}/index.js +0 -0
|
@@ -1,36 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Category: extension (webview CDP session)
|
|
5
|
-
* 구조: iframe → contentDocument, Fiber 기반 데이터 추출
|
|
6
|
-
*
|
|
7
|
-
* Output Contract: ReadChatResult, SendMessageResult, etc.
|
|
8
|
-
* 각 scripts 함수는 CDP evaluate에 넣을 JS 코드 문자열을 반환.
|
|
9
|
-
*
|
|
10
|
-
* @type {import('../../../src/providers/contracts').ProviderModule}
|
|
2
|
+
* CDP Scripts for Roo Code
|
|
11
3
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
type: 'roo-code',
|
|
15
|
-
name: 'Roo Code',
|
|
16
|
-
category: 'extension',
|
|
17
|
-
|
|
18
|
-
// ─── Extension 식별 ───
|
|
19
|
-
extensionId: 'RooVeterinaryInc.roo-cline',
|
|
20
|
-
extensionIdPattern: /extensionId=RooVeterinaryInc\.roo-cline/i,
|
|
21
|
-
|
|
22
|
-
// ─── VS Code Commands ───
|
|
23
|
-
vscodeCommands: {
|
|
24
|
-
focusPanel: 'roo-cline.SidebarProvider.focus',
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
// ─── CDP 스크립트 ───
|
|
28
|
-
scripts: {
|
|
29
|
-
/**
|
|
30
|
-
* readChat → ReadChatResult
|
|
31
|
-
* Fiber 기반 역할 판별 + DOM fallback
|
|
32
|
-
*/
|
|
33
|
-
readChat() {
|
|
4
|
+
|
|
5
|
+
module.exports.readChat = function readChat() {
|
|
34
6
|
return `(() => {
|
|
35
7
|
try {
|
|
36
8
|
const inner = document.querySelector('iframe');
|
|
@@ -203,13 +175,9 @@ module.exports = {
|
|
|
203
175
|
return JSON.stringify({ error: e.message || String(e) });
|
|
204
176
|
}
|
|
205
177
|
})()`;
|
|
206
|
-
}
|
|
178
|
+
};
|
|
207
179
|
|
|
208
|
-
|
|
209
|
-
* sendMessage(text) → 'sent' | 'error: ...'
|
|
210
|
-
* Fiber onSend 직접 호출 방식
|
|
211
|
-
*/
|
|
212
|
-
sendMessage(text) {
|
|
180
|
+
module.exports.sendMessage = function sendMessage(text) {
|
|
213
181
|
const escaped = JSON.stringify(text);
|
|
214
182
|
return `(async () => {
|
|
215
183
|
try {
|
|
@@ -262,13 +230,9 @@ module.exports = {
|
|
|
262
230
|
return JSON.stringify({ sent: true });
|
|
263
231
|
} catch (e) { return JSON.stringify({ sent: false, error: e.message }); }
|
|
264
232
|
})()`;
|
|
265
|
-
}
|
|
233
|
+
};
|
|
266
234
|
|
|
267
|
-
|
|
268
|
-
* listSessions → SessionInfo[]
|
|
269
|
-
* Fiber taskHistory 기반
|
|
270
|
-
*/
|
|
271
|
-
listSessions() {
|
|
235
|
+
module.exports.listSessions = function listSessions() {
|
|
272
236
|
return `(() => {
|
|
273
237
|
try {
|
|
274
238
|
const inner = document.querySelector('iframe');
|
|
@@ -347,13 +311,9 @@ module.exports = {
|
|
|
347
311
|
return JSON.stringify({ sessions: [], error: e.message });
|
|
348
312
|
}
|
|
349
313
|
})()`;
|
|
350
|
-
}
|
|
314
|
+
};
|
|
351
315
|
|
|
352
|
-
|
|
353
|
-
* switchSession(sessionId) → SwitchSessionResult
|
|
354
|
-
* postMessage → showTaskWithId
|
|
355
|
-
*/
|
|
356
|
-
switchSession(sessionId) {
|
|
316
|
+
module.exports.switchSession = function switchSession(sessionId) {
|
|
357
317
|
const escaped = JSON.stringify(sessionId);
|
|
358
318
|
return `(async () => {
|
|
359
319
|
try {
|
|
@@ -422,12 +382,9 @@ module.exports = {
|
|
|
422
382
|
return JSON.stringify({ switched: true });
|
|
423
383
|
} catch (e) { return JSON.stringify({ switched: false, error: e.message }); }
|
|
424
384
|
})()`;
|
|
425
|
-
}
|
|
385
|
+
};
|
|
426
386
|
|
|
427
|
-
|
|
428
|
-
* newSession → string
|
|
429
|
-
*/
|
|
430
|
-
newSession() {
|
|
387
|
+
module.exports.newSession = function newSession() {
|
|
431
388
|
return `(() => {
|
|
432
389
|
try {
|
|
433
390
|
const inner = document.querySelector('iframe');
|
|
@@ -470,13 +427,9 @@ module.exports = {
|
|
|
470
427
|
return 'no button found';
|
|
471
428
|
} catch (e) { return 'error: ' + e.message; }
|
|
472
429
|
})()`;
|
|
473
|
-
}
|
|
430
|
+
};
|
|
474
431
|
|
|
475
|
-
|
|
476
|
-
* resolveAction(action) → boolean
|
|
477
|
-
* action: 'approve' | 'reject'
|
|
478
|
-
*/
|
|
479
|
-
resolveAction(action) {
|
|
432
|
+
module.exports.resolveAction = function resolveAction(action) {
|
|
480
433
|
const escaped = JSON.stringify(action);
|
|
481
434
|
return `(() => {
|
|
482
435
|
try {
|
|
@@ -536,12 +489,9 @@ module.exports = {
|
|
|
536
489
|
return false;
|
|
537
490
|
} catch { return false; }
|
|
538
491
|
})()`;
|
|
539
|
-
}
|
|
492
|
+
};
|
|
540
493
|
|
|
541
|
-
|
|
542
|
-
* focusEditor → string
|
|
543
|
-
*/
|
|
544
|
-
focusEditor() {
|
|
494
|
+
module.exports.focusEditor = function focusEditor() {
|
|
545
495
|
return `(() => {
|
|
546
496
|
try {
|
|
547
497
|
const inner = document.querySelector('iframe');
|
|
@@ -557,12 +507,9 @@ module.exports = {
|
|
|
557
507
|
return 'no textarea found';
|
|
558
508
|
} catch (e) { return 'error: ' + e.message; }
|
|
559
509
|
})()`;
|
|
560
|
-
}
|
|
510
|
+
};
|
|
561
511
|
|
|
562
|
-
|
|
563
|
-
* openPanel → 'visible' | 'panel_hidden'
|
|
564
|
-
*/
|
|
565
|
-
openPanel() {
|
|
512
|
+
module.exports.openPanel = function openPanel() {
|
|
566
513
|
return `(() => {
|
|
567
514
|
try {
|
|
568
515
|
const inner = document.querySelector('iframe');
|
|
@@ -573,13 +520,9 @@ module.exports = {
|
|
|
573
520
|
return 'panel_hidden';
|
|
574
521
|
} catch (e) { return 'error: ' + e.message; }
|
|
575
522
|
})()`;
|
|
576
|
-
}
|
|
523
|
+
};
|
|
577
524
|
|
|
578
|
-
|
|
579
|
-
* listModels → { models: string[], current: string }
|
|
580
|
-
* dropdown-trigger 클릭 → 옵션 읽기 → Escape로 닫기
|
|
581
|
-
*/
|
|
582
|
-
listModels() {
|
|
525
|
+
module.exports.listModels = function listModels() {
|
|
583
526
|
return `(async () => {
|
|
584
527
|
try {
|
|
585
528
|
const inner = document.querySelector('iframe');
|
|
@@ -610,13 +553,9 @@ module.exports = {
|
|
|
610
553
|
return JSON.stringify({ models: [...new Set(models)], current });
|
|
611
554
|
} catch (e) { return JSON.stringify({ models: [], current: '', error: e.message }); }
|
|
612
555
|
})()`;
|
|
613
|
-
}
|
|
556
|
+
};
|
|
614
557
|
|
|
615
|
-
|
|
616
|
-
* setModel(params) → { success: boolean }
|
|
617
|
-
* params.model: 선택할 모델 이름
|
|
618
|
-
*/
|
|
619
|
-
setModel(params) {
|
|
558
|
+
module.exports.setModel = function setModel(params) {
|
|
620
559
|
const model = params?.model || params;
|
|
621
560
|
const escaped = JSON.stringify(model);
|
|
622
561
|
return `(async () => {
|
|
@@ -649,13 +588,9 @@ module.exports = {
|
|
|
649
588
|
return JSON.stringify({ success: false, error: 'model not found: ' + target });
|
|
650
589
|
} catch (e) { return JSON.stringify({ success: false, error: e.message }); }
|
|
651
590
|
})()`;
|
|
652
|
-
}
|
|
591
|
+
};
|
|
653
592
|
|
|
654
|
-
|
|
655
|
-
* listModes → { modes: string[], current: string }
|
|
656
|
-
* mode-selector-trigger 클릭 → 옵션 읽기
|
|
657
|
-
*/
|
|
658
|
-
listModes() {
|
|
593
|
+
module.exports.listModes = function listModes() {
|
|
659
594
|
return `(async () => {
|
|
660
595
|
try {
|
|
661
596
|
const inner = document.querySelector('iframe');
|
|
@@ -685,13 +620,9 @@ module.exports = {
|
|
|
685
620
|
return JSON.stringify({ modes: [...new Set(modes)], current });
|
|
686
621
|
} catch (e) { return JSON.stringify({ modes: [], current: '', error: e.message }); }
|
|
687
622
|
})()`;
|
|
688
|
-
}
|
|
623
|
+
};
|
|
689
624
|
|
|
690
|
-
|
|
691
|
-
* setMode(params) → { success: boolean }
|
|
692
|
-
* params.mode: 선택할 모드 이름
|
|
693
|
-
*/
|
|
694
|
-
setMode(params) {
|
|
625
|
+
module.exports.setMode = function setMode(params) {
|
|
695
626
|
const mode = params?.mode || params;
|
|
696
627
|
const escaped = JSON.stringify(mode);
|
|
697
628
|
return `(async () => {
|
|
@@ -724,6 +655,5 @@ module.exports = {
|
|
|
724
655
|
return JSON.stringify({ success: false, error: 'mode not found: ' + target });
|
|
725
656
|
} catch (e) { return JSON.stringify({ success: false, error: e.message }); }
|
|
726
657
|
})()`;
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
};
|
|
658
|
+
};
|
|
659
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "antigravity",
|
|
3
|
+
"name": "Antigravity",
|
|
4
|
+
"category": "ide",
|
|
5
|
+
"displayName": "Antigravity",
|
|
6
|
+
"icon": "🚀",
|
|
7
|
+
"cli": "antigravity",
|
|
8
|
+
"cdpPorts": [
|
|
9
|
+
9335,
|
|
10
|
+
9336
|
|
11
|
+
],
|
|
12
|
+
"processNames": {
|
|
13
|
+
"darwin": "Antigravity",
|
|
14
|
+
"win32": [
|
|
15
|
+
"Antigravity.exe"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"paths": {
|
|
19
|
+
"darwin": [
|
|
20
|
+
"/Applications/Antigravity.app"
|
|
21
|
+
],
|
|
22
|
+
"win32": [
|
|
23
|
+
"C:\\Users\\*\\AppData\\Local\\Programs\\antigravity\\Antigravity.exe"
|
|
24
|
+
],
|
|
25
|
+
"linux": [
|
|
26
|
+
"/opt/Antigravity",
|
|
27
|
+
"/usr/share/antigravity"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"inputMethod": "cdp-type-and-send",
|
|
31
|
+
"inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]"
|
|
32
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CDP Scripts for Antigravity
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const SCRIPTS_DIR = path.join(__dirname, 'scripts');
|
|
8
|
+
function loadScript(name) {
|
|
9
|
+
try { return fs.readFileSync(path.join(SCRIPTS_DIR, name), 'utf8'); }
|
|
10
|
+
catch { return null; }
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
module.exports.readChat = function readChat() {
|
|
15
|
+
return loadScript('read_chat.js');
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
module.exports.sendMessage = function sendMessage(text) {
|
|
19
|
+
const script = loadScript('send_message.js');
|
|
20
|
+
if (!script) return null;
|
|
21
|
+
// ${ MESSAGE } 템플릿 변수 치환
|
|
22
|
+
return script.replace(/\$\{\s*MESSAGE\s*\}/g, JSON.stringify(text));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
module.exports.listSessions = function listSessions() {
|
|
26
|
+
return loadScript('list_chats.js');
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
module.exports.switchSession = function switchSession(sessionId) {
|
|
30
|
+
const script = loadScript('switch_session.js');
|
|
31
|
+
if (!script) return null;
|
|
32
|
+
return script.replace(/\$\{\s*SESSION_ID\s*\}/g, JSON.stringify(sessionId));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
module.exports.newSession = function newSession() {
|
|
36
|
+
return loadScript('new_session.js');
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
module.exports.resolveAction = function resolveAction(params) {
|
|
40
|
+
const action = typeof params === 'string' ? params : params?.action || 'approve';
|
|
41
|
+
const buttonText = params?.button || params?.buttonText
|
|
42
|
+
|| (action === 'approve' ? 'Accept' : action === 'reject' ? 'Reject' : action);
|
|
43
|
+
const script = loadScript('resolve_action.js');
|
|
44
|
+
if (!script) return null;
|
|
45
|
+
return script.replace(/\$\{\s*BUTTON_TEXT\s*\}/g, JSON.stringify(buttonText));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
module.exports.focusEditor = function focusEditor() {
|
|
49
|
+
return loadScript('focus_editor.js');
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
module.exports.listModels = function listModels() {
|
|
53
|
+
return loadScript('list_models.js');
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
module.exports.setModel = function setModel(params) {
|
|
57
|
+
const model = typeof params === 'string' ? params : params?.model;
|
|
58
|
+
const script = loadScript('set_model.js');
|
|
59
|
+
if (!script) return null;
|
|
60
|
+
return script.replace(/\$\{\s*MODEL\s*\}/g, JSON.stringify(model));
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
module.exports.listModes = function listModes() {
|
|
64
|
+
return loadScript('list_modes.js');
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
module.exports.setMode = function setMode(params) {
|
|
68
|
+
const mode = typeof params === 'string' ? params : params?.mode;
|
|
69
|
+
const script = loadScript('set_mode.js');
|
|
70
|
+
if (!script) return null;
|
|
71
|
+
return script.replace(/\$\{\s*MODE\s*\}/g, JSON.stringify(mode));
|
|
72
|
+
};
|
|
73
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "cursor",
|
|
3
|
+
"name": "Cursor",
|
|
4
|
+
"category": "ide",
|
|
5
|
+
"displayName": "Cursor",
|
|
6
|
+
"icon": "⚡",
|
|
7
|
+
"cli": "cursor",
|
|
8
|
+
"cdpPorts": [
|
|
9
|
+
9333,
|
|
10
|
+
9334
|
|
11
|
+
],
|
|
12
|
+
"processNames": {
|
|
13
|
+
"darwin": "Cursor",
|
|
14
|
+
"win32": [
|
|
15
|
+
"Cursor.exe"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"paths": {
|
|
19
|
+
"darwin": [
|
|
20
|
+
"/Applications/Cursor.app"
|
|
21
|
+
],
|
|
22
|
+
"win32": [
|
|
23
|
+
"C:\\Users\\*\\AppData\\Local\\Programs\\cursor\\Cursor.exe"
|
|
24
|
+
],
|
|
25
|
+
"linux": [
|
|
26
|
+
"/opt/Cursor",
|
|
27
|
+
"/usr/share/cursor"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"inputMethod": "cdp-type-and-send",
|
|
31
|
+
"inputSelector": ".aislash-editor-input[contenteditable=\"true\"]",
|
|
32
|
+
"vscodeCommands": {
|
|
33
|
+
"changeModel": "cursor.model"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @type {import('../../../src/providers/contracts').ProviderModule}
|
|
2
|
+
* CDP Scripts for Cursor
|
|
4
3
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
name: 'Cursor',
|
|
8
|
-
category: 'ide',
|
|
9
|
-
displayName: 'Cursor',
|
|
10
|
-
icon: '⚡',
|
|
11
|
-
cli: 'cursor',
|
|
12
|
-
cdpPorts: [9333, 9334],
|
|
13
|
-
processNames: { darwin: 'Cursor', win32: ['Cursor.exe'] },
|
|
14
|
-
paths: {
|
|
15
|
-
darwin: ['/Applications/Cursor.app'],
|
|
16
|
-
win32: ['C:\\Users\\*\\AppData\\Local\\Programs\\cursor\\Cursor.exe'],
|
|
17
|
-
linux: ['/opt/Cursor', '/usr/share/cursor'],
|
|
18
|
-
},
|
|
19
|
-
inputMethod: 'cdp-type-and-send',
|
|
20
|
-
inputSelector: '.aislash-editor-input[contenteditable="true"]',
|
|
21
|
-
vscodeCommands: {
|
|
22
|
-
changeModel: 'cursor.model',
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
scripts: {
|
|
26
|
-
readChat(params) {
|
|
4
|
+
|
|
5
|
+
module.exports.readChat = function readChat(params) {
|
|
27
6
|
return `(() => {
|
|
28
7
|
try {
|
|
29
8
|
const c = document.querySelector('[data-composer-id]');
|
|
@@ -81,9 +60,9 @@ module.exports = {
|
|
|
81
60
|
return JSON.stringify({ id: '', status: 'error', messages: [] });
|
|
82
61
|
}
|
|
83
62
|
})()`;
|
|
84
|
-
}
|
|
63
|
+
};
|
|
85
64
|
|
|
86
|
-
|
|
65
|
+
module.exports.sendMessage = function sendMessage(params) {
|
|
87
66
|
const text = typeof params === 'string' ? params : params?.text;
|
|
88
67
|
return `(() => {
|
|
89
68
|
try {
|
|
@@ -98,9 +77,9 @@ module.exports = {
|
|
|
98
77
|
return JSON.stringify({ sent: false, error: e.message });
|
|
99
78
|
}
|
|
100
79
|
})()`;
|
|
101
|
-
}
|
|
80
|
+
};
|
|
102
81
|
|
|
103
|
-
|
|
82
|
+
module.exports.listSessions = function listSessions(params) {
|
|
104
83
|
return `(() => {
|
|
105
84
|
try {
|
|
106
85
|
const sessions = [];
|
|
@@ -132,9 +111,9 @@ module.exports = {
|
|
|
132
111
|
return JSON.stringify({ sessions: [], error: e.message });
|
|
133
112
|
}
|
|
134
113
|
})()`;
|
|
135
|
-
}
|
|
114
|
+
};
|
|
136
115
|
|
|
137
|
-
|
|
116
|
+
module.exports.switchSession = function switchSession(params) {
|
|
138
117
|
const index = typeof params === 'number' ? params : params?.index;
|
|
139
118
|
const title = typeof params === 'string' ? params : params?.title;
|
|
140
119
|
return `(() => {
|
|
@@ -156,9 +135,9 @@ module.exports = {
|
|
|
156
135
|
return JSON.stringify({ switched: false, error: e.message });
|
|
157
136
|
}
|
|
158
137
|
})()`;
|
|
159
|
-
}
|
|
138
|
+
};
|
|
160
139
|
|
|
161
|
-
|
|
140
|
+
module.exports.newSession = function newSession(params) {
|
|
162
141
|
return `(() => {
|
|
163
142
|
try {
|
|
164
143
|
const newBtn = [...document.querySelectorAll('a.action-label.codicon-add-two, [aria-label*="New Chat"], [aria-label*="New Composer"]')]
|
|
@@ -169,9 +148,9 @@ module.exports = {
|
|
|
169
148
|
return JSON.stringify({ created: false, error: e.message });
|
|
170
149
|
}
|
|
171
150
|
})()`;
|
|
172
|
-
}
|
|
151
|
+
};
|
|
173
152
|
|
|
174
|
-
|
|
153
|
+
module.exports.focusEditor = function focusEditor(params) {
|
|
175
154
|
return `(() => {
|
|
176
155
|
try {
|
|
177
156
|
const input = document.querySelector('.aislash-editor-input[contenteditable="true"]');
|
|
@@ -179,9 +158,9 @@ module.exports = {
|
|
|
179
158
|
return 'not_found';
|
|
180
159
|
} catch(e) { return 'error'; }
|
|
181
160
|
})()`;
|
|
182
|
-
}
|
|
161
|
+
};
|
|
183
162
|
|
|
184
|
-
|
|
163
|
+
module.exports.openPanel = function openPanel(params) {
|
|
185
164
|
return `(() => {
|
|
186
165
|
try {
|
|
187
166
|
const sidebar = document.getElementById('workbench.parts.auxiliarybar');
|
|
@@ -198,9 +177,9 @@ module.exports = {
|
|
|
198
177
|
return 'not_found';
|
|
199
178
|
} catch (e) { return 'error'; }
|
|
200
179
|
})()`;
|
|
201
|
-
}
|
|
180
|
+
};
|
|
202
181
|
|
|
203
|
-
|
|
182
|
+
module.exports.resolveAction = function resolveAction(params) {
|
|
204
183
|
const action = typeof params === 'string' ? params : params?.action || 'approve';
|
|
205
184
|
const buttonText = params?.button || params?.buttonText
|
|
206
185
|
|| (action === 'approve' ? 'Run' : action === 'reject' ? 'Skip' : action);
|
|
@@ -213,9 +192,9 @@ module.exports = {
|
|
|
213
192
|
return JSON.stringify({ resolved: false, available: btns.map(b => b.textContent.trim()).filter(Boolean).slice(0, 15) });
|
|
214
193
|
} catch(e) { return JSON.stringify({ resolved: false, error: e.message }); }
|
|
215
194
|
})()`;
|
|
216
|
-
}
|
|
195
|
+
};
|
|
217
196
|
|
|
218
|
-
|
|
197
|
+
module.exports.listNotifications = function listNotifications(params) {
|
|
219
198
|
const filter = typeof params === 'string' ? params : params?.message;
|
|
220
199
|
return `(() => {
|
|
221
200
|
try {
|
|
@@ -230,9 +209,9 @@ module.exports = {
|
|
|
230
209
|
return JSON.stringify(f ? visible.filter(n => n.message.toLowerCase().includes(f.toLowerCase())) : visible);
|
|
231
210
|
} catch(e) { return JSON.stringify([]); }
|
|
232
211
|
})()`;
|
|
233
|
-
}
|
|
212
|
+
};
|
|
234
213
|
|
|
235
|
-
|
|
214
|
+
module.exports.dismissNotification = function dismissNotification(params) {
|
|
236
215
|
const index = typeof params === 'number' ? params : params?.index;
|
|
237
216
|
const button = typeof params === 'string' ? params : params?.button;
|
|
238
217
|
const message = params?.message;
|
|
@@ -256,13 +235,9 @@ module.exports = {
|
|
|
256
235
|
return JSON.stringify({ dismissed: false, error: 'Close button not found' });
|
|
257
236
|
} catch(e) { return JSON.stringify({ dismissed: false, error: e.message }); }
|
|
258
237
|
})()`;
|
|
259
|
-
}
|
|
238
|
+
};
|
|
260
239
|
|
|
261
|
-
|
|
262
|
-
* listModels → { models: string[], current: string }
|
|
263
|
-
* .composer-unified-dropdown-model 클릭 → Auto 토글 끄기 → 전체 모델 목록
|
|
264
|
-
*/
|
|
265
|
-
listModels(params) {
|
|
240
|
+
module.exports.listModels = function listModels(params) {
|
|
266
241
|
return `(async () => {
|
|
267
242
|
try {
|
|
268
243
|
let current = '';
|
|
@@ -330,13 +305,9 @@ module.exports = {
|
|
|
330
305
|
return JSON.stringify({ models, current });
|
|
331
306
|
} catch(e) { return JSON.stringify({ models: [], current: '', error: e.message }); }
|
|
332
307
|
})()`;
|
|
333
|
-
}
|
|
308
|
+
};
|
|
334
309
|
|
|
335
|
-
|
|
336
|
-
* setModel → { success: boolean }
|
|
337
|
-
* .composer-unified-dropdown-model 클릭 → 검색 → 선택
|
|
338
|
-
*/
|
|
339
|
-
setModel(params) {
|
|
310
|
+
module.exports.setModel = function setModel(params) {
|
|
340
311
|
const model = typeof params === 'string' ? params : params?.model;
|
|
341
312
|
const escaped = JSON.stringify(model);
|
|
342
313
|
return `(async () => {
|
|
@@ -409,13 +380,9 @@ module.exports = {
|
|
|
409
380
|
return JSON.stringify({ success: false, error: 'model not found: ' + target });
|
|
410
381
|
} catch(e) { return JSON.stringify({ success: false, error: e.message }); }
|
|
411
382
|
})()`;
|
|
412
|
-
}
|
|
383
|
+
};
|
|
413
384
|
|
|
414
|
-
|
|
415
|
-
* listModes → { modes: string[], current: string }
|
|
416
|
-
* .composer-unified-dropdown (모드 아이콘) 클릭 → Agent/Plan/Debug/Ask
|
|
417
|
-
*/
|
|
418
|
-
listModes(params) {
|
|
385
|
+
module.exports.listModes = function listModes(params) {
|
|
419
386
|
return `(async () => {
|
|
420
387
|
try {
|
|
421
388
|
const modes = [];
|
|
@@ -448,13 +415,9 @@ module.exports = {
|
|
|
448
415
|
return JSON.stringify({ modes, current });
|
|
449
416
|
} catch(e) { return JSON.stringify({ modes: [], current: '', error: e.message }); }
|
|
450
417
|
})()`;
|
|
451
|
-
}
|
|
418
|
+
};
|
|
452
419
|
|
|
453
|
-
|
|
454
|
-
* setMode → { success: boolean }
|
|
455
|
-
* 모드 드롭다운 열기 → 항목 클릭
|
|
456
|
-
*/
|
|
457
|
-
setMode(params) {
|
|
420
|
+
module.exports.setMode = function setMode(params) {
|
|
458
421
|
const mode = typeof params === 'string' ? params : params?.mode;
|
|
459
422
|
const escaped = JSON.stringify(mode);
|
|
460
423
|
return `(async () => {
|
|
@@ -485,6 +448,5 @@ module.exports = {
|
|
|
485
448
|
return JSON.stringify({ success: false, error: 'mode not found: ' + target });
|
|
486
449
|
} catch(e) { return JSON.stringify({ success: false, error: e.message }); }
|
|
487
450
|
})()`;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
};
|
|
451
|
+
};
|
|
452
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "kiro",
|
|
3
|
+
"name": "Kiro",
|
|
4
|
+
"category": "ide",
|
|
5
|
+
"displayName": "Kiro",
|
|
6
|
+
"icon": "🪁",
|
|
7
|
+
"cli": "kiro",
|
|
8
|
+
"cdpPorts": [
|
|
9
|
+
9351,
|
|
10
|
+
9352
|
|
11
|
+
],
|
|
12
|
+
"processNames": {
|
|
13
|
+
"darwin": "Kiro",
|
|
14
|
+
"win32": [
|
|
15
|
+
"Kiro.exe"
|
|
16
|
+
],
|
|
17
|
+
"linux": [
|
|
18
|
+
"kiro"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"paths": {
|
|
22
|
+
"darwin": [
|
|
23
|
+
"/Applications/Kiro.app"
|
|
24
|
+
],
|
|
25
|
+
"win32": [
|
|
26
|
+
"C:\\Users\\*\\AppData\\Local\\Programs\\kiro\\Kiro.exe"
|
|
27
|
+
],
|
|
28
|
+
"linux": [
|
|
29
|
+
"/opt/kiro",
|
|
30
|
+
"/usr/share/kiro"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"inputMethod": "cdp-type-and-send",
|
|
34
|
+
"inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]",
|
|
35
|
+
"webviewMatchText": "kiro"
|
|
36
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kiro — webview_send_message (webview iframe 내부에서 실행)
|
|
3
|
+
*
|
|
4
|
+
* Kiro의 채팅 입력은 webview iframe 안의 ProseMirror/tiptap 에디터.
|
|
5
|
+
* execCommand('insertText') + Enter 키 이벤트로 메시지 전송.
|
|
6
|
+
*
|
|
7
|
+
* 파라미터: ${ MESSAGE }
|
|
8
|
+
*/
|
|
9
|
+
(async () => {
|
|
10
|
+
try {
|
|
11
|
+
const msg = ${ MESSAGE };
|
|
12
|
+
|
|
13
|
+
// ─── 1. 입력 필드 찾기 ───
|
|
14
|
+
const editor =
|
|
15
|
+
document.querySelector('.tiptap.ProseMirror') ||
|
|
16
|
+
document.querySelector('[contenteditable="true"]') ||
|
|
17
|
+
document.querySelector('textarea');
|
|
18
|
+
|
|
19
|
+
if (!editor) return JSON.stringify({ sent: false, error: 'no input found in webview' });
|
|
20
|
+
|
|
21
|
+
const isTextarea = editor.tagName === 'TEXTAREA';
|
|
22
|
+
|
|
23
|
+
if (isTextarea) {
|
|
24
|
+
editor.focus();
|
|
25
|
+
const nativeSetter = Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, 'value')?.set;
|
|
26
|
+
if (nativeSetter) nativeSetter.call(editor, msg);
|
|
27
|
+
else editor.value = msg;
|
|
28
|
+
editor.dispatchEvent(new Event('input', { bubbles: true }));
|
|
29
|
+
await new Promise(r => setTimeout(r, 300));
|
|
30
|
+
|
|
31
|
+
const enterOpts = { key: 'Enter', code: 'Enter', keyCode: 13, which: 13, bubbles: true, cancelable: true, composed: true };
|
|
32
|
+
editor.dispatchEvent(new KeyboardEvent('keydown', enterOpts));
|
|
33
|
+
editor.dispatchEvent(new KeyboardEvent('keypress', enterOpts));
|
|
34
|
+
editor.dispatchEvent(new KeyboardEvent('keyup', enterOpts));
|
|
35
|
+
return JSON.stringify({ sent: true });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// ─── 2. contenteditable (ProseMirror / tiptap) ───
|
|
39
|
+
editor.focus();
|
|
40
|
+
await new Promise(r => setTimeout(r, 100));
|
|
41
|
+
|
|
42
|
+
// 전체 선택 + 삭제 + 삽입
|
|
43
|
+
const sel = window.getSelection();
|
|
44
|
+
const range = document.createRange();
|
|
45
|
+
range.selectNodeContents(editor);
|
|
46
|
+
sel.removeAllRanges();
|
|
47
|
+
sel.addRange(range);
|
|
48
|
+
await new Promise(r => setTimeout(r, 50));
|
|
49
|
+
|
|
50
|
+
document.execCommand('delete', false, null);
|
|
51
|
+
await new Promise(r => setTimeout(r, 50));
|
|
52
|
+
document.execCommand('insertText', false, msg);
|
|
53
|
+
|
|
54
|
+
editor.dispatchEvent(new Event('input', { bubbles: true }));
|
|
55
|
+
await new Promise(r => setTimeout(r, 400));
|
|
56
|
+
|
|
57
|
+
// ─── 3. Enter 키 전송 ───
|
|
58
|
+
const enterOpts = {
|
|
59
|
+
key: 'Enter', code: 'Enter',
|
|
60
|
+
keyCode: 13, which: 13,
|
|
61
|
+
bubbles: true, cancelable: true, composed: true,
|
|
62
|
+
};
|
|
63
|
+
editor.dispatchEvent(new KeyboardEvent('keydown', enterOpts));
|
|
64
|
+
await new Promise(r => setTimeout(r, 50));
|
|
65
|
+
editor.dispatchEvent(new KeyboardEvent('keypress', enterOpts));
|
|
66
|
+
editor.dispatchEvent(new KeyboardEvent('keyup', enterOpts));
|
|
67
|
+
|
|
68
|
+
return JSON.stringify({ sent: true });
|
|
69
|
+
} catch (e) {
|
|
70
|
+
return JSON.stringify({ sent: false, error: e.message });
|
|
71
|
+
}
|
|
72
|
+
})()
|