adhdev 0.1.54 → 0.4.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 (131) hide show
  1. package/dist/cli-entrypoint.js +29083 -0
  2. package/dist/cli-entrypoint.js.map +1 -0
  3. package/dist/index.js +26970 -11054
  4. package/dist/index.js.map +1 -0
  5. package/package.json +19 -16
  6. package/providers/_builtin/COMPATIBILITY.md +217 -0
  7. package/providers/_builtin/acp/agentpool/provider.json +54 -0
  8. package/providers/_builtin/acp/amp/provider.json +52 -0
  9. package/providers/_builtin/acp/auggie/provider.json +57 -0
  10. package/providers/_builtin/acp/autodev/provider.json +54 -0
  11. package/providers/_builtin/acp/autohand/provider.json +52 -0
  12. package/providers/_builtin/acp/blackbox-ai/provider.json +54 -0
  13. package/providers/_builtin/acp/claude-agent/provider.json +57 -0
  14. package/providers/_builtin/acp/cline-acp/provider.json +54 -0
  15. package/providers/_builtin/acp/codebuddy/provider.json +54 -0
  16. package/providers/_builtin/acp/codex-cli/provider.json +57 -0
  17. package/providers/_builtin/acp/corust-agent/provider.json +52 -0
  18. package/providers/_builtin/acp/crow-cli/provider.json +54 -0
  19. package/providers/_builtin/acp/cursor-acp/provider.json +54 -0
  20. package/providers/_builtin/acp/deepagents/provider.json +52 -0
  21. package/providers/_builtin/acp/dimcode/provider.json +54 -0
  22. package/providers/_builtin/acp/docker-cagent/provider.json +57 -0
  23. package/providers/_builtin/acp/factory-droid/provider.json +60 -0
  24. package/providers/_builtin/acp/fast-agent/provider.json +52 -0
  25. package/providers/_builtin/acp/gemini-cli/provider.json +114 -0
  26. package/providers/_builtin/acp/github-copilot/provider.json +54 -0
  27. package/providers/_builtin/acp/goose/provider.json +57 -0
  28. package/providers/_builtin/acp/junie/provider.json +52 -0
  29. package/providers/_builtin/acp/kilo/provider.json +54 -0
  30. package/providers/_builtin/acp/kimi-cli/provider.json +57 -0
  31. package/providers/_builtin/acp/minion-code/provider.json +52 -0
  32. package/providers/_builtin/acp/mistral-vibe/provider.json +57 -0
  33. package/providers/_builtin/acp/nova/provider.json +54 -0
  34. package/providers/_builtin/acp/openclaw/provider.json +54 -0
  35. package/providers/_builtin/acp/opencode/provider.json +52 -0
  36. package/providers/_builtin/acp/openhands/provider.json +54 -0
  37. package/providers/_builtin/acp/pi-acp/provider.json +52 -0
  38. package/providers/_builtin/acp/qoder/provider.json +54 -0
  39. package/providers/_builtin/acp/qwen-code/provider.json +60 -0
  40. package/providers/_builtin/acp/stakpak/provider.json +54 -0
  41. package/providers/_builtin/acp/vtcode/provider.json +54 -0
  42. package/providers/_builtin/cli/claude-cli/provider.json +100 -0
  43. package/providers/_builtin/cli/codex-cli/provider.json +89 -0
  44. package/providers/_builtin/cli/gemini-cli/provider.json +93 -0
  45. package/providers/_builtin/docs/CDP_SELECTOR_GUIDE.md +370 -0
  46. package/providers/_builtin/docs/PROVIDER_GUIDE.md +916 -0
  47. package/providers/_builtin/extension/cline/provider.json +35 -0
  48. package/providers/_builtin/extension/cline/scripts/open_panel.js +1 -1
  49. package/providers/_builtin/extension/cline/{provider.js → scripts.js} +29 -55
  50. package/providers/_builtin/extension/roo-code/provider.json +35 -0
  51. package/providers/_builtin/extension/roo-code/{provider.js → scripts.js} +27 -97
  52. package/providers/_builtin/ide/antigravity/provider.json +63 -0
  53. package/providers/_builtin/ide/antigravity/scripts/legacy/list_models.js +38 -0
  54. package/providers/_builtin/ide/antigravity/scripts/legacy/list_modes.js +48 -0
  55. package/providers/_builtin/ide/antigravity/scripts/legacy/scripts.js +64 -0
  56. package/providers/_builtin/ide/antigravity/scripts/legacy/set_mode.js +34 -0
  57. package/providers/_builtin/ide/antigravity/scripts/legacy/set_model.js +47 -0
  58. package/providers/_builtin/ide/antigravity/scripts/list_models.js +31 -8
  59. package/providers/_builtin/ide/antigravity/scripts/list_modes.js +37 -13
  60. package/providers/_builtin/ide/antigravity/scripts/set_mode.js +49 -16
  61. package/providers/_builtin/ide/antigravity/scripts/set_model.js +47 -22
  62. package/providers/_builtin/ide/antigravity/scripts.js +67 -0
  63. package/providers/_builtin/ide/cursor/provider.json +59 -0
  64. package/providers/_builtin/ide/cursor/{provider.js → scripts.js} +47 -79
  65. package/providers/_builtin/ide/kiro/provider.json +60 -0
  66. package/providers/_builtin/ide/kiro/scripts.js +62 -0
  67. package/providers/_builtin/ide/pearai/provider.json +60 -0
  68. package/providers/_builtin/ide/pearai/scripts.js +74 -0
  69. package/providers/_builtin/ide/trae/provider.json +59 -0
  70. package/providers/_builtin/ide/trae/scripts.js +57 -0
  71. package/providers/_builtin/ide/vscode/provider.json +57 -0
  72. package/providers/_builtin/ide/vscode-insiders/provider.json +55 -0
  73. package/providers/_builtin/ide/vscodium/provider.json +56 -0
  74. package/providers/_builtin/ide/windsurf/provider.json +46 -0
  75. package/providers/_builtin/ide/windsurf/scripts.js +57 -0
  76. package/README.md +0 -43
  77. package/dist/dev-console-monaco.js +0 -176
  78. package/dist/dev-console.css +0 -326
  79. package/dist/dev-console.html +0 -148
  80. package/dist/dev-console.js +0 -1165
  81. package/dist/index.d.ts +0 -2
  82. package/providers/_builtin/acp/agentpool/provider.js +0 -59
  83. package/providers/_builtin/acp/amp/provider.js +0 -61
  84. package/providers/_builtin/acp/auggie/provider.js +0 -60
  85. package/providers/_builtin/acp/autodev/provider.js +0 -59
  86. package/providers/_builtin/acp/autohand/provider.js +0 -59
  87. package/providers/_builtin/acp/blackbox-ai/provider.js +0 -59
  88. package/providers/_builtin/acp/claude-agent/provider.js +0 -61
  89. package/providers/_builtin/acp/cline-acp/provider.js +0 -62
  90. package/providers/_builtin/acp/code-assistant/provider.js +0 -59
  91. package/providers/_builtin/acp/codebuddy/provider.js +0 -59
  92. package/providers/_builtin/acp/codex-cli/provider.js +0 -64
  93. package/providers/_builtin/acp/corust-agent/provider.js +0 -59
  94. package/providers/_builtin/acp/crow-cli/provider.js +0 -59
  95. package/providers/_builtin/acp/cursor-acp/provider.js +0 -59
  96. package/providers/_builtin/acp/deepagents/provider.js +0 -59
  97. package/providers/_builtin/acp/dimcode/provider.js +0 -58
  98. package/providers/_builtin/acp/docker-cagent/provider.js +0 -59
  99. package/providers/_builtin/acp/factory-droid/provider.js +0 -59
  100. package/providers/_builtin/acp/fast-agent/provider.js +0 -59
  101. package/providers/_builtin/acp/fount/provider.js +0 -59
  102. package/providers/_builtin/acp/gemini-cli/provider.js +0 -104
  103. package/providers/_builtin/acp/github-copilot/provider.js +0 -60
  104. package/providers/_builtin/acp/goose/provider.js +0 -64
  105. package/providers/_builtin/acp/junie/provider.js +0 -62
  106. package/providers/_builtin/acp/kilo/provider.js +0 -59
  107. package/providers/_builtin/acp/kimi-cli/provider.js +0 -63
  108. package/providers/_builtin/acp/kiro-cli/provider.js +0 -59
  109. package/providers/_builtin/acp/minion-code/provider.js +0 -59
  110. package/providers/_builtin/acp/mistral-vibe/provider.js +0 -63
  111. package/providers/_builtin/acp/nova/provider.js +0 -59
  112. package/providers/_builtin/acp/openclaw/provider.js +0 -59
  113. package/providers/_builtin/acp/opencode/provider.js +0 -60
  114. package/providers/_builtin/acp/openhands/provider.js +0 -59
  115. package/providers/_builtin/acp/pi-acp/provider.js +0 -59
  116. package/providers/_builtin/acp/qoder/provider.js +0 -58
  117. package/providers/_builtin/acp/qwen-code/provider.js +0 -61
  118. package/providers/_builtin/acp/stakpak/provider.js +0 -59
  119. package/providers/_builtin/acp/vtcode/provider.js +0 -59
  120. package/providers/_builtin/cli/claude-cli/provider.js +0 -128
  121. package/providers/_builtin/cli/codex-cli/provider.js +0 -80
  122. package/providers/_builtin/cli/gemini-cli/provider.js +0 -124
  123. package/providers/_builtin/ide/antigravity/provider.js +0 -114
  124. package/providers/_builtin/ide/kiro/provider.js +0 -90
  125. package/providers/_builtin/ide/pearai/provider.js +0 -100
  126. package/providers/_builtin/ide/trae/provider.js +0 -83
  127. package/providers/_builtin/ide/vscode/provider.js +0 -36
  128. package/providers/_builtin/ide/vscode-insiders/provider.js +0 -27
  129. package/providers/_builtin/ide/vscodium/provider.js +0 -27
  130. package/providers/_builtin/ide/windsurf/provider.js +0 -76
  131. package/providers/_helpers/index.js +0 -188
@@ -1,29 +1,8 @@
1
1
  /**
2
- * Cursor IDE Provider
3
- * @type {import('../../../src/providers/contracts').ProviderModule}
2
+ * CDP Scripts for Cursor
4
3
  */
5
- module.exports = {
6
- type: 'cursor',
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]');
@@ -60,17 +39,23 @@ module.exports = {
60
39
 
61
40
  const msgs = [];
62
41
  document.querySelectorAll('.composer-human-ai-pair-container').forEach((p, i) => {
42
+ if (p.children.length === 0) return; // skip virtual-scroll placeholders
63
43
  const h = p.querySelector('.composer-human-message');
64
- const userText = h ? h.textContent.trim().substring(0, 6000) : '';
65
- if (h) msgs.push({ role: 'user', content: userText, index: msgs.length });
66
- // pair의 번째 자식은 사용자 메시지 블록 그 안의 rendered는 건너뜀
67
- const firstChild = p.children[0];
68
- p.querySelectorAll('.composer-rendered-message').forEach(a => {
69
- if (firstChild && firstChild.contains(a)) return;
70
- if (a.closest('.composer-human-message')) return;
71
- const t = a.textContent.trim();
72
- if (t && t !== userText) msgs.push({ role: 'assistant', content: t.substring(0, 6000), index: msgs.length });
73
- });
44
+ if (h) {
45
+ const userText = (h.innerText || '').trim().substring(0, 6000);
46
+ if (userText) msgs.push({ role: 'user', content: userText, index: msgs.length });
47
+ }
48
+ // Iterate direct children after the first (user message block)
49
+ for (let ci = 1; ci < p.children.length; ci++) {
50
+ const b = p.children[ci];
51
+ if ((b.className || '').includes('opacity-50')) continue;
52
+ const t = (b.innerText || '').trim();
53
+ if (t.length < 2) continue;
54
+ // Filter noise: "Thought for Xs", "Explored N files"
55
+ if (/^Thought\\nfor \\d+s?$/i.test(t) || /^Explored\\n/i.test(t)) continue;
56
+ const hasTool = b.querySelector('.composer-tool-former-message, .composer-diff-block, .composer-code-block-container');
57
+ msgs.push({ role: hasTool ? 'tool' : 'assistant', content: t.substring(0, 6000), index: msgs.length });
58
+ }
74
59
  });
75
60
  const inputEl = document.querySelector('.aislash-editor-input[contenteditable="true"]');
76
61
  const inputContent = inputEl?.textContent?.trim() || '';
@@ -81,9 +66,9 @@ module.exports = {
81
66
  return JSON.stringify({ id: '', status: 'error', messages: [] });
82
67
  }
83
68
  })()`;
84
- },
69
+ };
85
70
 
86
- sendMessage(params) {
71
+ module.exports.sendMessage = function sendMessage(params) {
87
72
  const text = typeof params === 'string' ? params : params?.text;
88
73
  return `(() => {
89
74
  try {
@@ -98,9 +83,9 @@ module.exports = {
98
83
  return JSON.stringify({ sent: false, error: e.message });
99
84
  }
100
85
  })()`;
101
- },
86
+ };
102
87
 
103
- listSessions(params) {
88
+ module.exports.listSessions = function listSessions(params) {
104
89
  return `(() => {
105
90
  try {
106
91
  const sessions = [];
@@ -132,9 +117,9 @@ module.exports = {
132
117
  return JSON.stringify({ sessions: [], error: e.message });
133
118
  }
134
119
  })()`;
135
- },
120
+ };
136
121
 
137
- switchSession(params) {
122
+ module.exports.switchSession = function switchSession(params) {
138
123
  const index = typeof params === 'number' ? params : params?.index;
139
124
  const title = typeof params === 'string' ? params : params?.title;
140
125
  return `(() => {
@@ -156,9 +141,9 @@ module.exports = {
156
141
  return JSON.stringify({ switched: false, error: e.message });
157
142
  }
158
143
  })()`;
159
- },
144
+ };
160
145
 
161
- newSession(params) {
146
+ module.exports.newSession = function newSession(params) {
162
147
  return `(() => {
163
148
  try {
164
149
  const newBtn = [...document.querySelectorAll('a.action-label.codicon-add-two, [aria-label*="New Chat"], [aria-label*="New Composer"]')]
@@ -169,9 +154,9 @@ module.exports = {
169
154
  return JSON.stringify({ created: false, error: e.message });
170
155
  }
171
156
  })()`;
172
- },
157
+ };
173
158
 
174
- focusEditor(params) {
159
+ module.exports.focusEditor = function focusEditor(params) {
175
160
  return `(() => {
176
161
  try {
177
162
  const input = document.querySelector('.aislash-editor-input[contenteditable="true"]');
@@ -179,9 +164,9 @@ module.exports = {
179
164
  return 'not_found';
180
165
  } catch(e) { return 'error'; }
181
166
  })()`;
182
- },
167
+ };
183
168
 
184
- openPanel(params) {
169
+ module.exports.openPanel = function openPanel(params) {
185
170
  return `(() => {
186
171
  try {
187
172
  const sidebar = document.getElementById('workbench.parts.auxiliarybar');
@@ -198,9 +183,9 @@ module.exports = {
198
183
  return 'not_found';
199
184
  } catch (e) { return 'error'; }
200
185
  })()`;
201
- },
186
+ };
202
187
 
203
- resolveAction(params) {
188
+ module.exports.resolveAction = function resolveAction(params) {
204
189
  const action = typeof params === 'string' ? params : params?.action || 'approve';
205
190
  const buttonText = params?.button || params?.buttonText
206
191
  || (action === 'approve' ? 'Run' : action === 'reject' ? 'Skip' : action);
@@ -213,9 +198,9 @@ module.exports = {
213
198
  return JSON.stringify({ resolved: false, available: btns.map(b => b.textContent.trim()).filter(Boolean).slice(0, 15) });
214
199
  } catch(e) { return JSON.stringify({ resolved: false, error: e.message }); }
215
200
  })()`;
216
- },
201
+ };
217
202
 
218
- listNotifications(params) {
203
+ module.exports.listNotifications = function listNotifications(params) {
219
204
  const filter = typeof params === 'string' ? params : params?.message;
220
205
  return `(() => {
221
206
  try {
@@ -230,9 +215,9 @@ module.exports = {
230
215
  return JSON.stringify(f ? visible.filter(n => n.message.toLowerCase().includes(f.toLowerCase())) : visible);
231
216
  } catch(e) { return JSON.stringify([]); }
232
217
  })()`;
233
- },
218
+ };
234
219
 
235
- dismissNotification(params) {
220
+ module.exports.dismissNotification = function dismissNotification(params) {
236
221
  const index = typeof params === 'number' ? params : params?.index;
237
222
  const button = typeof params === 'string' ? params : params?.button;
238
223
  const message = params?.message;
@@ -256,13 +241,9 @@ module.exports = {
256
241
  return JSON.stringify({ dismissed: false, error: 'Close button not found' });
257
242
  } catch(e) { return JSON.stringify({ dismissed: false, error: e.message }); }
258
243
  })()`;
259
- },
244
+ };
260
245
 
261
- /**
262
- * listModels → { models: string[], current: string }
263
- * .composer-unified-dropdown-model 클릭 → Auto 토글 끄기 → 전체 모델 목록
264
- */
265
- listModels(params) {
246
+ module.exports.listModels = function listModels(params) {
266
247
  return `(async () => {
267
248
  try {
268
249
  let current = '';
@@ -330,13 +311,9 @@ module.exports = {
330
311
  return JSON.stringify({ models, current });
331
312
  } catch(e) { return JSON.stringify({ models: [], current: '', error: e.message }); }
332
313
  })()`;
333
- },
314
+ };
334
315
 
335
- /**
336
- * setModel → { success: boolean }
337
- * .composer-unified-dropdown-model 클릭 → 검색 → 선택
338
- */
339
- setModel(params) {
316
+ module.exports.setModel = function setModel(params) {
340
317
  const model = typeof params === 'string' ? params : params?.model;
341
318
  const escaped = JSON.stringify(model);
342
319
  return `(async () => {
@@ -409,13 +386,9 @@ module.exports = {
409
386
  return JSON.stringify({ success: false, error: 'model not found: ' + target });
410
387
  } catch(e) { return JSON.stringify({ success: false, error: e.message }); }
411
388
  })()`;
412
- },
389
+ };
413
390
 
414
- /**
415
- * listModes → { modes: string[], current: string }
416
- * .composer-unified-dropdown (모드 아이콘) 클릭 → Agent/Plan/Debug/Ask
417
- */
418
- listModes(params) {
391
+ module.exports.listModes = function listModes(params) {
419
392
  return `(async () => {
420
393
  try {
421
394
  const modes = [];
@@ -448,13 +421,9 @@ module.exports = {
448
421
  return JSON.stringify({ modes, current });
449
422
  } catch(e) { return JSON.stringify({ modes: [], current: '', error: e.message }); }
450
423
  })()`;
451
- },
424
+ };
452
425
 
453
- /**
454
- * setMode → { success: boolean }
455
- * 모드 드롭다운 열기 → 항목 클릭
456
- */
457
- setMode(params) {
426
+ module.exports.setMode = function setMode(params) {
458
427
  const mode = typeof params === 'string' ? params : params?.mode;
459
428
  const escaped = JSON.stringify(mode);
460
429
  return `(async () => {
@@ -485,6 +454,5 @@ module.exports = {
485
454
  return JSON.stringify({ success: false, error: 'mode not found: ' + target });
486
455
  } catch(e) { return JSON.stringify({ success: false, error: e.message }); }
487
456
  })()`;
488
- },
489
- },
490
- };
457
+ };
458
+
@@ -0,0 +1,60 @@
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
+ "settings": {
37
+ "approvalAlert": {
38
+ "type": "boolean",
39
+ "default": true,
40
+ "public": true,
41
+ "label": "Approval Notifications",
42
+ "description": "Show notification when approval is needed"
43
+ },
44
+ "longGeneratingAlert": {
45
+ "type": "boolean",
46
+ "default": true,
47
+ "public": true,
48
+ "label": "Long Generation Alert",
49
+ "description": "Alert when generation takes too long"
50
+ },
51
+ "longGeneratingThresholdSec": {
52
+ "type": "number",
53
+ "default": 180,
54
+ "public": true,
55
+ "label": "Long Generation Threshold (sec)",
56
+ "min": 30,
57
+ "max": 600
58
+ }
59
+ }
60
+ }
@@ -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,60 @@
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
+ "settings": {
37
+ "approvalAlert": {
38
+ "type": "boolean",
39
+ "default": true,
40
+ "public": true,
41
+ "label": "Approval Notifications",
42
+ "description": "Show notification when approval is needed"
43
+ },
44
+ "longGeneratingAlert": {
45
+ "type": "boolean",
46
+ "default": true,
47
+ "public": true,
48
+ "label": "Long Generation Alert",
49
+ "description": "Alert when generation takes too long"
50
+ },
51
+ "longGeneratingThresholdSec": {
52
+ "type": "number",
53
+ "default": 180,
54
+ "public": true,
55
+ "label": "Long Generation Threshold (sec)",
56
+ "min": 30,
57
+ "max": 600
58
+ }
59
+ }
60
+ }
@@ -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,59 @@
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
+ "settings": {
36
+ "approvalAlert": {
37
+ "type": "boolean",
38
+ "default": true,
39
+ "public": true,
40
+ "label": "Approval Notifications",
41
+ "description": "Show notification when approval is needed"
42
+ },
43
+ "longGeneratingAlert": {
44
+ "type": "boolean",
45
+ "default": true,
46
+ "public": true,
47
+ "label": "Long Generation Alert",
48
+ "description": "Alert when generation takes too long"
49
+ },
50
+ "longGeneratingThresholdSec": {
51
+ "type": "number",
52
+ "default": 180,
53
+ "public": true,
54
+ "label": "Long Generation Threshold (sec)",
55
+ "min": 30,
56
+ "max": 600
57
+ }
58
+ }
59
+ }
@@ -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,57 @@
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
+ "settings": {
34
+ "approvalAlert": {
35
+ "type": "boolean",
36
+ "default": true,
37
+ "public": true,
38
+ "label": "Approval Notifications",
39
+ "description": "Show notification when approval is needed"
40
+ },
41
+ "longGeneratingAlert": {
42
+ "type": "boolean",
43
+ "default": true,
44
+ "public": true,
45
+ "label": "Long Generation Alert",
46
+ "description": "Alert when generation takes too long"
47
+ },
48
+ "longGeneratingThresholdSec": {
49
+ "type": "number",
50
+ "default": 180,
51
+ "public": true,
52
+ "label": "Long Generation Threshold (sec)",
53
+ "min": 30,
54
+ "max": 600
55
+ }
56
+ }
57
+ }