adhdev 0.1.54 → 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 +9721 -10847
- package/dist/index.js.map +1 -0
- package/package.json +19 -16
- 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.js +62 -0
- package/providers/_builtin/ide/pearai/provider.json +36 -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.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/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/providers/_builtin/acp/agentpool/provider.js +0 -59
- package/providers/_builtin/acp/amp/provider.js +0 -61
- package/providers/_builtin/acp/auggie/provider.js +0 -60
- package/providers/_builtin/acp/autodev/provider.js +0 -59
- package/providers/_builtin/acp/autohand/provider.js +0 -59
- package/providers/_builtin/acp/blackbox-ai/provider.js +0 -59
- package/providers/_builtin/acp/claude-agent/provider.js +0 -61
- package/providers/_builtin/acp/cline-acp/provider.js +0 -62
- package/providers/_builtin/acp/code-assistant/provider.js +0 -59
- package/providers/_builtin/acp/codebuddy/provider.js +0 -59
- package/providers/_builtin/acp/codex-cli/provider.js +0 -64
- package/providers/_builtin/acp/corust-agent/provider.js +0 -59
- package/providers/_builtin/acp/crow-cli/provider.js +0 -59
- package/providers/_builtin/acp/cursor-acp/provider.js +0 -59
- package/providers/_builtin/acp/deepagents/provider.js +0 -59
- package/providers/_builtin/acp/dimcode/provider.js +0 -58
- package/providers/_builtin/acp/docker-cagent/provider.js +0 -59
- package/providers/_builtin/acp/factory-droid/provider.js +0 -59
- package/providers/_builtin/acp/fast-agent/provider.js +0 -59
- package/providers/_builtin/acp/fount/provider.js +0 -59
- package/providers/_builtin/acp/gemini-cli/provider.js +0 -104
- package/providers/_builtin/acp/github-copilot/provider.js +0 -60
- package/providers/_builtin/acp/goose/provider.js +0 -64
- package/providers/_builtin/acp/junie/provider.js +0 -62
- package/providers/_builtin/acp/kilo/provider.js +0 -59
- package/providers/_builtin/acp/kimi-cli/provider.js +0 -63
- package/providers/_builtin/acp/kiro-cli/provider.js +0 -59
- package/providers/_builtin/acp/minion-code/provider.js +0 -59
- package/providers/_builtin/acp/mistral-vibe/provider.js +0 -63
- package/providers/_builtin/acp/nova/provider.js +0 -59
- package/providers/_builtin/acp/openclaw/provider.js +0 -59
- package/providers/_builtin/acp/opencode/provider.js +0 -60
- package/providers/_builtin/acp/openhands/provider.js +0 -59
- package/providers/_builtin/acp/pi-acp/provider.js +0 -59
- package/providers/_builtin/acp/qoder/provider.js +0 -58
- package/providers/_builtin/acp/qwen-code/provider.js +0 -61
- package/providers/_builtin/acp/stakpak/provider.js +0 -59
- package/providers/_builtin/acp/vtcode/provider.js +0 -59
- package/providers/_builtin/cli/claude-cli/provider.js +0 -128
- package/providers/_builtin/cli/codex-cli/provider.js +0 -80
- package/providers/_builtin/cli/gemini-cli/provider.js +0 -124
- package/providers/_builtin/ide/antigravity/provider.js +0 -114
- package/providers/_builtin/ide/kiro/provider.js +0 -90
- package/providers/_builtin/ide/pearai/provider.js +0 -100
- 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/index.js +0 -188
|
@@ -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,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CDP Scripts for Kiro
|
|
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.webviewReadChat = function webviewReadChat() { return loadScript('webview_read_chat.js'); };
|
|
15
|
+
|
|
16
|
+
module.exports.webviewSendMessage = function webviewSendMessage(text) {
|
|
17
|
+
const s = loadScript('webview_send_message.js');
|
|
18
|
+
return s ? s.replace(/\$\{\s*MESSAGE\s*\}/g, JSON.stringify(text)) : null;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
module.exports.sendMessage = function sendMessage(text) {
|
|
22
|
+
const s = loadScript('send_message.js');
|
|
23
|
+
return s ? s.replace(/\$\{\s*MESSAGE\s*\}/g, JSON.stringify(text)) : null;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
module.exports.resolveAction = function resolveAction(params) {
|
|
27
|
+
const action = typeof params === 'string' ? params : params?.action || 'approve';
|
|
28
|
+
const buttonText = params?.button || params?.buttonText
|
|
29
|
+
|| (action === 'approve' ? 'Accept' : action === 'reject' ? 'Reject' : action);
|
|
30
|
+
const s = loadScript('resolve_action.js');
|
|
31
|
+
return s ? s.replace(/\$\{\s*BUTTON_TEXT\s*\}/g, JSON.stringify(buttonText)) : null;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
module.exports.openPanel = function openPanel() { return loadScript('open_panel.js'); };
|
|
35
|
+
|
|
36
|
+
module.exports.focusEditor = function focusEditor() { return loadScript('focus_editor.js'); };
|
|
37
|
+
|
|
38
|
+
module.exports.webviewListSessions = function webviewListSessions() { return loadScript('webview_list_sessions.js'); };
|
|
39
|
+
|
|
40
|
+
module.exports.webviewNewSession = function webviewNewSession() { return loadScript('webview_new_session.js'); };
|
|
41
|
+
|
|
42
|
+
module.exports.webviewSwitchSession = function webviewSwitchSession(sessionId) {
|
|
43
|
+
const s = loadScript('webview_switch_session.js');
|
|
44
|
+
return s ? s.replace(/\$\{\s*SESSION_ID\s*\}/g, JSON.stringify(sessionId)) : null;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
module.exports.webviewListModels = function webviewListModels() { return loadScript('webview_list_models.js'); };
|
|
48
|
+
|
|
49
|
+
module.exports.webviewSetModel = function webviewSetModel(params) {
|
|
50
|
+
const model = typeof params === 'string' ? params : params?.model;
|
|
51
|
+
const s = loadScript('webview_set_model.js');
|
|
52
|
+
return s ? s.replace(/\$\{\s*MODEL\s*\}/g, JSON.stringify(model)) : null;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
module.exports.webviewListModes = function webviewListModes() { return loadScript('webview_list_modes.js'); };
|
|
56
|
+
|
|
57
|
+
module.exports.webviewSetMode = function webviewSetMode(params) {
|
|
58
|
+
const mode = typeof params === 'string' ? params : params?.mode;
|
|
59
|
+
const s = loadScript('webview_set_mode.js');
|
|
60
|
+
return s ? s.replace(/\$\{\s*MODE\s*\}/g, JSON.stringify(mode)) : null;
|
|
61
|
+
};
|
|
62
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "pearai",
|
|
3
|
+
"name": "PearAI",
|
|
4
|
+
"category": "ide",
|
|
5
|
+
"displayName": "PearAI",
|
|
6
|
+
"icon": "🍐",
|
|
7
|
+
"cli": "pearai",
|
|
8
|
+
"cdpPorts": [
|
|
9
|
+
9355,
|
|
10
|
+
9356
|
|
11
|
+
],
|
|
12
|
+
"processNames": {
|
|
13
|
+
"darwin": "PearAI",
|
|
14
|
+
"win32": [
|
|
15
|
+
"PearAI.exe"
|
|
16
|
+
],
|
|
17
|
+
"linux": [
|
|
18
|
+
"pearai"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"paths": {
|
|
22
|
+
"darwin": [
|
|
23
|
+
"/Applications/PearAI.app"
|
|
24
|
+
],
|
|
25
|
+
"win32": [
|
|
26
|
+
"C:\\Users\\*\\AppData\\Local\\Programs\\pearai\\PearAI.exe"
|
|
27
|
+
],
|
|
28
|
+
"linux": [
|
|
29
|
+
"/opt/pearai",
|
|
30
|
+
"/usr/share/pearai"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"inputMethod": "cdp-type-and-send",
|
|
34
|
+
"inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]",
|
|
35
|
+
"webviewMatchText": "chat-text-area"
|
|
36
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CDP Scripts for PearAI
|
|
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.webviewReadChat = function webviewReadChat() { return loadScript('webview_read_chat.js'); };
|
|
15
|
+
|
|
16
|
+
module.exports.webviewSendMessage = function webviewSendMessage(text) {
|
|
17
|
+
const s = loadScript('webview_send_message.js');
|
|
18
|
+
return s ? s.replace(/\$\{\s*MESSAGE\s*\}/g, JSON.stringify(text)) : null;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
module.exports.sendMessage = function sendMessage(text) {
|
|
22
|
+
const s = loadScript('send_message.js');
|
|
23
|
+
return s ? s.replace(/\$\{\s*MESSAGE\s*\}/g, JSON.stringify(text)) : null;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
module.exports.resolveAction = function resolveAction(params) {
|
|
27
|
+
const action = typeof params === 'string' ? params : params?.action || 'approve';
|
|
28
|
+
const buttonText = params?.button || params?.buttonText
|
|
29
|
+
|| (action === 'approve' ? 'Accept' : action === 'reject' ? 'Reject' : action);
|
|
30
|
+
const s = loadScript('resolve_action.js');
|
|
31
|
+
return s ? s.replace(/\$\{\s*BUTTON_TEXT\s*\}/g, JSON.stringify(buttonText)) : null;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
module.exports.webviewResolveAction = function webviewResolveAction(params) {
|
|
35
|
+
const action = typeof params === 'string' ? params : params?.action || 'approve';
|
|
36
|
+
const buttonText = params?.button || params?.buttonText
|
|
37
|
+
|| (action === 'approve' ? 'Accept' : action === 'reject' ? 'Reject' : action);
|
|
38
|
+
const s = loadScript('webview_resolve_action.js');
|
|
39
|
+
return s ? s.replace(/\$\{\s*BUTTON_TEXT\s*\}/g, JSON.stringify(buttonText)) : null;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
module.exports.openPanel = function openPanel() { return loadScript('open_panel.js'); };
|
|
43
|
+
|
|
44
|
+
module.exports.focusEditor = function focusEditor() { return loadScript('focus_editor.js'); };
|
|
45
|
+
|
|
46
|
+
module.exports.newSession = function newSession() { return loadScript('new_session.js'); };
|
|
47
|
+
|
|
48
|
+
module.exports.listSessions = function listSessions() { return loadScript('list_sessions.js'); };
|
|
49
|
+
|
|
50
|
+
module.exports.webviewNewSession = function webviewNewSession() { return loadScript('webview_new_session.js'); };
|
|
51
|
+
|
|
52
|
+
module.exports.webviewListSessions = function webviewListSessions() { return loadScript('webview_list_sessions.js'); };
|
|
53
|
+
|
|
54
|
+
module.exports.webviewSwitchSession = function webviewSwitchSession(sessionId) {
|
|
55
|
+
const s = loadScript('webview_switch_session.js');
|
|
56
|
+
return s ? s.replace(/\$\{\s*SESSION_ID\s*\}/g, JSON.stringify(sessionId)) : null;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
module.exports.webviewListModels = function webviewListModels() { return loadScript('webview_list_models.js'); };
|
|
60
|
+
|
|
61
|
+
module.exports.webviewSetModel = function webviewSetModel(params) {
|
|
62
|
+
const model = typeof params === 'string' ? params : params?.model;
|
|
63
|
+
const s = loadScript('webview_set_model.js');
|
|
64
|
+
return s ? s.replace(/\$\{\s*MODEL\s*\}/g, JSON.stringify(model)) : null;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
module.exports.webviewListModes = function webviewListModes() { return loadScript('webview_list_modes.js'); };
|
|
68
|
+
|
|
69
|
+
module.exports.webviewSetMode = function webviewSetMode(params) {
|
|
70
|
+
const mode = typeof params === 'string' ? params : params?.mode;
|
|
71
|
+
const s = loadScript('webview_set_mode.js');
|
|
72
|
+
return s ? s.replace(/\$\{\s*MODE\s*\}/g, JSON.stringify(mode)) : null;
|
|
73
|
+
};
|
|
74
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "trae",
|
|
3
|
+
"name": "Trae",
|
|
4
|
+
"category": "ide",
|
|
5
|
+
"displayName": "Trae",
|
|
6
|
+
"icon": "🔮",
|
|
7
|
+
"cli": "trae",
|
|
8
|
+
"cdpPorts": [
|
|
9
|
+
9353,
|
|
10
|
+
9354
|
|
11
|
+
],
|
|
12
|
+
"processNames": {
|
|
13
|
+
"darwin": "Trae",
|
|
14
|
+
"win32": [
|
|
15
|
+
"Trae.exe"
|
|
16
|
+
],
|
|
17
|
+
"linux": [
|
|
18
|
+
"trae"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"paths": {
|
|
22
|
+
"darwin": [
|
|
23
|
+
"/Applications/Trae.app"
|
|
24
|
+
],
|
|
25
|
+
"win32": [
|
|
26
|
+
"C:\\Users\\*\\AppData\\Local\\Programs\\trae\\Trae.exe"
|
|
27
|
+
],
|
|
28
|
+
"linux": [
|
|
29
|
+
"/opt/trae",
|
|
30
|
+
"/usr/share/trae"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"inputMethod": "cdp-type-and-send",
|
|
34
|
+
"inputSelector": ".chat-input-v2-input-box-editable, [contenteditable=\"true\"][role=\"textbox\"]"
|
|
35
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CDP Scripts for Trae
|
|
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() { return loadScript('read_chat.js'); };
|
|
15
|
+
|
|
16
|
+
module.exports.sendMessage = function sendMessage(text) {
|
|
17
|
+
const s = loadScript('send_message.js');
|
|
18
|
+
return s ? s.replace(/\$\{\s*MESSAGE\s*\}/g, JSON.stringify(text)) : null;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
module.exports.resolveAction = function resolveAction(params) {
|
|
22
|
+
const action = typeof params === 'string' ? params : params?.action || 'approve';
|
|
23
|
+
const buttonText = params?.button || params?.buttonText
|
|
24
|
+
|| (action === 'approve' ? 'Accept' : action === 'reject' ? 'Reject' : action);
|
|
25
|
+
const s = loadScript('resolve_action.js');
|
|
26
|
+
return s ? s.replace(/\$\{\s*BUTTON_TEXT\s*\}/g, JSON.stringify(buttonText)) : null;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
module.exports.openPanel = function openPanel() { return loadScript('open_panel.js'); };
|
|
30
|
+
|
|
31
|
+
module.exports.focusEditor = function focusEditor() { return loadScript('focus_editor.js'); };
|
|
32
|
+
|
|
33
|
+
module.exports.newSession = function newSession() { return loadScript('new_session.js'); };
|
|
34
|
+
|
|
35
|
+
module.exports.listSessions = function listSessions() { return loadScript('list_chats.js'); };
|
|
36
|
+
|
|
37
|
+
module.exports.switchSession = function switchSession(sessionId) {
|
|
38
|
+
const s = loadScript('switch_session.js');
|
|
39
|
+
return s ? s.replace(/\$\{\s*SESSION_ID\s*\}/g, JSON.stringify(sessionId)) : null;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
module.exports.listModels = function listModels() { return loadScript('list_models.js'); };
|
|
43
|
+
|
|
44
|
+
module.exports.setModel = function setModel(params) {
|
|
45
|
+
const model = typeof params === 'string' ? params : params?.model;
|
|
46
|
+
const s = loadScript('set_model.js');
|
|
47
|
+
return s ? s.replace(/\$\{\s*MODEL\s*\}/g, JSON.stringify(model)) : null;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
module.exports.listModes = function listModes() { return loadScript('list_modes.js'); };
|
|
51
|
+
|
|
52
|
+
module.exports.setMode = function setMode(params) {
|
|
53
|
+
const mode = typeof params === 'string' ? params : params?.mode;
|
|
54
|
+
const s = loadScript('set_mode.js');
|
|
55
|
+
return s ? s.replace(/\$\{\s*MODE\s*\}/g, JSON.stringify(mode)) : null;
|
|
56
|
+
};
|
|
57
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "vscode",
|
|
3
|
+
"name": "Visual Studio Code",
|
|
4
|
+
"category": "ide",
|
|
5
|
+
"displayName": "VS Code",
|
|
6
|
+
"icon": "💙",
|
|
7
|
+
"cli": "code",
|
|
8
|
+
"cdpPorts": [
|
|
9
|
+
9339,
|
|
10
|
+
9340
|
|
11
|
+
],
|
|
12
|
+
"processNames": {
|
|
13
|
+
"darwin": "Visual Studio Code",
|
|
14
|
+
"win32": [
|
|
15
|
+
"Code.exe"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"paths": {
|
|
19
|
+
"darwin": [
|
|
20
|
+
"/Applications/Visual Studio Code.app"
|
|
21
|
+
],
|
|
22
|
+
"win32": [
|
|
23
|
+
"C:\\Program Files\\Microsoft VS Code\\Code.exe",
|
|
24
|
+
"C:\\Users\\*\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
|
|
25
|
+
],
|
|
26
|
+
"linux": [
|
|
27
|
+
"/usr/share/code",
|
|
28
|
+
"/snap/code/current"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"inputMethod": "cdp-type-and-send",
|
|
32
|
+
"inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]"
|
|
33
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "vscode-insiders",
|
|
3
|
+
"name": "Visual Studio Code - Insiders",
|
|
4
|
+
"category": "ide",
|
|
5
|
+
"displayName": "VS Code Insiders",
|
|
6
|
+
"icon": "💚",
|
|
7
|
+
"cli": "code-insiders",
|
|
8
|
+
"cdpPorts": [
|
|
9
|
+
9341,
|
|
10
|
+
9342
|
|
11
|
+
],
|
|
12
|
+
"processNames": {
|
|
13
|
+
"darwin": "Visual Studio Code - Insiders",
|
|
14
|
+
"win32": [
|
|
15
|
+
"Code - Insiders.exe"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"paths": {
|
|
19
|
+
"darwin": [
|
|
20
|
+
"/Applications/Visual Studio Code - Insiders.app"
|
|
21
|
+
],
|
|
22
|
+
"win32": [
|
|
23
|
+
"C:\\Program Files\\Microsoft VS Code Insiders\\Code - Insiders.exe"
|
|
24
|
+
],
|
|
25
|
+
"linux": [
|
|
26
|
+
"/usr/share/code-insiders"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"inputMethod": "cdp-type-and-send",
|
|
30
|
+
"inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]"
|
|
31
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "vscodium",
|
|
3
|
+
"name": "VSCodium",
|
|
4
|
+
"category": "ide",
|
|
5
|
+
"displayName": "VSCodium",
|
|
6
|
+
"icon": "💚",
|
|
7
|
+
"cli": "codium",
|
|
8
|
+
"cdpPorts": [
|
|
9
|
+
9343,
|
|
10
|
+
9344
|
|
11
|
+
],
|
|
12
|
+
"processNames": {
|
|
13
|
+
"darwin": "VSCodium",
|
|
14
|
+
"win32": [
|
|
15
|
+
"VSCodium.exe"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"paths": {
|
|
19
|
+
"darwin": [
|
|
20
|
+
"/Applications/VSCodium.app"
|
|
21
|
+
],
|
|
22
|
+
"win32": [
|
|
23
|
+
"C:\\Program Files\\VSCodium\\VSCodium.exe"
|
|
24
|
+
],
|
|
25
|
+
"linux": [
|
|
26
|
+
"/usr/share/codium",
|
|
27
|
+
"/snap/codium/current"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"inputMethod": "cdp-type-and-send",
|
|
31
|
+
"inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]"
|
|
32
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "windsurf",
|
|
3
|
+
"name": "Windsurf",
|
|
4
|
+
"category": "ide",
|
|
5
|
+
"displayName": "Windsurf",
|
|
6
|
+
"icon": "🏄",
|
|
7
|
+
"cli": "windsurf",
|
|
8
|
+
"cdpPorts": [
|
|
9
|
+
9337,
|
|
10
|
+
9338
|
|
11
|
+
],
|
|
12
|
+
"processNames": {
|
|
13
|
+
"darwin": "Windsurf"
|
|
14
|
+
},
|
|
15
|
+
"paths": {
|
|
16
|
+
"darwin": [
|
|
17
|
+
"/Applications/Windsurf.app"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"inputMethod": "cdp-type-and-send",
|
|
21
|
+
"inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]"
|
|
22
|
+
}
|