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
@@ -0,0 +1,35 @@
1
+ {
2
+ "type": "cline",
3
+ "name": "Cline",
4
+ "category": "extension",
5
+ "extensionId": "saoudrizwan.claude-dev",
6
+ "extensionIdPattern": "extensionId=saoudrizwan\\.claude-dev",
7
+ "extensionIdPattern_flags": "i",
8
+ "vscodeCommands": {
9
+ "focusPanel": "claude-dev.SidebarProvider.focus"
10
+ },
11
+ "settings": {
12
+ "approvalAlert": {
13
+ "type": "boolean",
14
+ "default": true,
15
+ "public": true,
16
+ "label": "Approval Notifications",
17
+ "description": "Show notification when approval is needed"
18
+ },
19
+ "longGeneratingAlert": {
20
+ "type": "boolean",
21
+ "default": true,
22
+ "public": true,
23
+ "label": "Long Generation Alert",
24
+ "description": "Alert when generation takes too long"
25
+ },
26
+ "longGeneratingThresholdSec": {
27
+ "type": "number",
28
+ "default": 180,
29
+ "public": true,
30
+ "label": "Long Generation Threshold (sec)",
31
+ "min": 30,
32
+ "max": 600
33
+ }
34
+ }
35
+ }
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * iframe 컨텍스트에서는 VS Code API 접근이 제한적이므로,
7
7
  * 패널이 숨겨져 있을 때는 'panel_hidden' 상태를 반환.
8
- * → bridge extensionensureAgentPanelOpen() 또는
8
+ * → daemonAgentStreamManager 또는
9
9
  * agent_stream_focus 메시지를 통해 열어야 함.
10
10
  *
11
11
  * 반환: 'visible' | 'panel_hidden'
@@ -1,99 +1,73 @@
1
1
  /**
2
- * Cline Extension Provider
3
- *
4
- * Category: extension (webview CDP session)
5
- * Roo Code의 원본 fork — 구조 거의 동일 (Fiber 기반)
6
- *
7
- * 차이점:
8
- * - extensionId: 'saoudrizwan.claude-dev'
9
- * - resolve_action 사용 (Roo Code와 동일 패턴)
10
- *
11
- * @type {import('../../../src/providers/contracts').ProviderModule}
2
+ * CDP Scripts for Cline
12
3
  */
4
+
13
5
  const fs = require('fs');
14
6
  const path = require('path');
15
-
16
7
  const SCRIPTS_DIR = path.join(__dirname, 'scripts');
17
-
18
8
  function loadScript(name) {
19
- try {
20
- return fs.readFileSync(path.join(SCRIPTS_DIR, name), 'utf8');
21
- } catch {
22
- return null;
23
- }
9
+ try { return fs.readFileSync(path.join(SCRIPTS_DIR, name), 'utf8'); }
10
+ catch { return null; }
24
11
  }
25
12
 
26
- module.exports = {
27
- type: 'cline',
28
- name: 'Cline',
29
- category: 'extension',
30
13
 
31
- extensionId: 'saoudrizwan.claude-dev',
32
- extensionIdPattern: /extensionId=saoudrizwan\.claude-dev/i,
33
-
34
- vscodeCommands: {
35
- focusPanel: 'claude-dev.SidebarProvider.focus',
36
- },
37
-
38
- scripts: {
39
- readChat() {
14
+ module.exports.readChat = function readChat() {
40
15
  return loadScript('read_chat.js');
41
- },
16
+ };
42
17
 
43
- sendMessage(text) {
18
+ module.exports.sendMessage = function sendMessage(text) {
44
19
  const script = loadScript('send_message.js');
45
20
  if (!script) return null;
46
21
  return script.replace(/\$\{\s*MESSAGE\s*\}/g, JSON.stringify(text));
47
- },
22
+ };
48
23
 
49
- listSessions() {
24
+ module.exports.listSessions = function listSessions() {
50
25
  return loadScript('list_chats.js');
51
- },
26
+ };
52
27
 
53
- switchSession(sessionId) {
28
+ module.exports.switchSession = function switchSession(sessionId) {
54
29
  const script = loadScript('switch_session.js');
55
30
  if (!script) return null;
56
31
  return script.replace(/\$\{\s*SESSION_ID\s*\}/g, JSON.stringify(sessionId));
57
- },
32
+ };
58
33
 
59
- newSession() {
34
+ module.exports.newSession = function newSession() {
60
35
  return loadScript('new_session.js');
61
- },
36
+ };
62
37
 
63
- resolveAction(action) {
38
+ module.exports.resolveAction = function resolveAction(action) {
64
39
  const script = loadScript('resolve_action.js');
65
40
  if (!script) return null;
66
41
  return script.replace(/\$\{\s*ACTION\s*\}/g, JSON.stringify(action));
67
- },
42
+ };
68
43
 
69
- focusEditor() {
44
+ module.exports.focusEditor = function focusEditor() {
70
45
  return loadScript('focus_editor.js');
71
- },
46
+ };
72
47
 
73
- openPanel() {
48
+ module.exports.openPanel = function openPanel() {
74
49
  return loadScript('open_panel.js');
75
- },
50
+ };
76
51
 
77
- listModels() {
52
+ module.exports.listModels = function listModels() {
78
53
  return loadScript('list_models.js');
79
- },
54
+ };
80
55
 
81
- setModel(params) {
56
+ module.exports.setModel = function setModel(params) {
82
57
  const model = params?.model || params;
83
58
  const script = loadScript('set_model.js');
84
59
  if (!script) return null;
85
60
  return script.replace(/\$\{\s*MODEL\s*\}/g, JSON.stringify(model));
86
- },
61
+ };
87
62
 
88
- listModes() {
63
+ module.exports.listModes = function listModes() {
89
64
  return loadScript('list_modes.js');
90
- },
65
+ };
91
66
 
92
- setMode(params) {
67
+ module.exports.setMode = function setMode(params) {
93
68
  const mode = params?.mode || params;
94
69
  const script = loadScript('set_mode.js');
95
70
  if (!script) return null;
96
71
  return script.replace(/\$\{\s*MODE\s*\}/g, JSON.stringify(mode));
97
- },
98
- },
99
- };
72
+ };
73
+
@@ -0,0 +1,35 @@
1
+ {
2
+ "type": "roo-code",
3
+ "name": "Roo Code",
4
+ "category": "extension",
5
+ "extensionId": "RooVeterinaryInc.roo-cline",
6
+ "extensionIdPattern": "extensionId=RooVeterinaryInc\\.roo-cline",
7
+ "extensionIdPattern_flags": "i",
8
+ "vscodeCommands": {
9
+ "focusPanel": "roo-cline.SidebarProvider.focus"
10
+ },
11
+ "settings": {
12
+ "approvalAlert": {
13
+ "type": "boolean",
14
+ "default": true,
15
+ "public": true,
16
+ "label": "Approval Notifications",
17
+ "description": "Show notification when approval is needed"
18
+ },
19
+ "longGeneratingAlert": {
20
+ "type": "boolean",
21
+ "default": true,
22
+ "public": true,
23
+ "label": "Long Generation Alert",
24
+ "description": "Alert when generation takes too long"
25
+ },
26
+ "longGeneratingThresholdSec": {
27
+ "type": "number",
28
+ "default": 180,
29
+ "public": true,
30
+ "label": "Long Generation Threshold (sec)",
31
+ "min": 30,
32
+ "max": 600
33
+ }
34
+ }
35
+ }
@@ -1,36 +1,8 @@
1
1
  /**
2
- * Roo Code Extension Provider (Reference Implementation)
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
- module.exports = {
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,63 @@
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
+ "versionCommand": "antigravity --version",
33
+ "testedVersions": ["1.107.0"],
34
+ "versions": {
35
+ "< 1.107.0": {
36
+ "__dir": "scripts/legacy"
37
+ }
38
+ },
39
+ "settings": {
40
+ "approvalAlert": {
41
+ "type": "boolean",
42
+ "default": true,
43
+ "public": true,
44
+ "label": "Approval Notifications",
45
+ "description": "Show notification when approval is needed"
46
+ },
47
+ "longGeneratingAlert": {
48
+ "type": "boolean",
49
+ "default": true,
50
+ "public": true,
51
+ "label": "Long Generation Alert",
52
+ "description": "Alert when generation takes too long"
53
+ },
54
+ "longGeneratingThresholdSec": {
55
+ "type": "number",
56
+ "default": 180,
57
+ "public": true,
58
+ "label": "Long Generation Threshold (sec)",
59
+ "min": 30,
60
+ "max": 600
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Antigravity — list_models
3
+ * antigravity-agent-side-panel 내부 모델 드롭다운에서 목록 + 현재 모델 추출
4
+ * → { models: string[], current: string }
5
+ */
6
+ (() => {
7
+ try {
8
+ const models = [];
9
+ let current = '';
10
+
11
+ // 1. 모델 항목에서 목록 추출
12
+ // 셀렉터: .px-2.py-1.flex.items-center.justify-between.cursor-pointer
13
+ const items = document.querySelectorAll('.px-2.py-1.flex.items-center.justify-between.cursor-pointer');
14
+ for (const item of items) {
15
+ const label = item.querySelector('.text-xs.font-medium');
16
+ const text = (label || item).textContent?.trim();
17
+ if (!text || text.length > 60) continue;
18
+ // 모델명 검증 (Claude, Gemini, GPT, etc.)
19
+ models.push(text);
20
+ // 선택된 항목: bg-gray-500/20
21
+ if ((item.className || '').includes('bg-gray-500/20')) {
22
+ current = text;
23
+ }
24
+ }
25
+
26
+ // 2. 모델 목록이 없으면 (드롭다운 닫힘) → 트리거 버튼에서 현재 모델만
27
+ if (models.length === 0) {
28
+ const trigger = document.querySelector('.flex.min-w-0.max-w-full.cursor-pointer.items-center');
29
+ if (trigger) {
30
+ current = trigger.textContent?.trim() || '';
31
+ }
32
+ }
33
+
34
+ return JSON.stringify({ models, current });
35
+ } catch (e) {
36
+ return JSON.stringify({ models: [], current: '', error: e.message });
37
+ }
38
+ })()
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Antigravity — list_modes
3
+ * Conversation mode: Planning / Fast 세그먼트 컨트롤
4
+ * inputBox 근처의 "Conversation mode" 패널에서 읽기
5
+ * → { modes: string[], current: string }
6
+ */
7
+ (() => {
8
+ try {
9
+ const modes = [];
10
+ let current = '';
11
+
12
+ // "Conversation mode" 헤더를 포함하는 패널 찾기
13
+ const headers = document.querySelectorAll('.text-xs.px-2.pb-1.opacity-80');
14
+ for (const header of headers) {
15
+ if (header.textContent?.trim() === 'Conversation mode') {
16
+ // 형제 요소들에서 모드 항목 추출
17
+ const parent = header.parentElement;
18
+ if (!parent) continue;
19
+ const items = parent.querySelectorAll('.font-medium');
20
+ for (const item of items) {
21
+ const text = item.textContent?.trim();
22
+ if (text && text.length < 20) {
23
+ modes.push(text);
24
+ }
25
+ }
26
+ break;
27
+ }
28
+ }
29
+
30
+ // 현재 모드: Fast 버튼의 텍스트 (현재 활성 모드 표시)
31
+ const modeBtn = [...document.querySelectorAll('button')].find(b => {
32
+ const cls = b.className || '';
33
+ return cls.includes('py-1') && cls.includes('pl-1') && cls.includes('pr-2') && b.offsetWidth > 0;
34
+ });
35
+ if (modeBtn) {
36
+ current = modeBtn.textContent?.trim() || '';
37
+ }
38
+
39
+ // modes가 비어있으면 기본값
40
+ if (modes.length === 0) {
41
+ modes.push('Planning', 'Fast');
42
+ }
43
+
44
+ return JSON.stringify({ modes, current });
45
+ } catch (e) {
46
+ return JSON.stringify({ modes: [], current: '', error: e.message });
47
+ }
48
+ })()
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Antigravity CDP Scripts — legacy (< 1.107.0)
3
+ * DOM uses exact CSS class selectors (original Tailwind classes without arbitrary values)
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ const fs = require('fs');
9
+ const path = require('path');
10
+ const DIR = __dirname; // scripts/legacy/
11
+
12
+ function load(name) {
13
+ try { return fs.readFileSync(path.join(DIR, name), 'utf-8'); }
14
+ catch { return null; }
15
+ }
16
+
17
+ // Non-model/mode scripts fall back to parent scripts/
18
+ const PARENT_DIR = path.join(DIR, '..');
19
+ function loadParent(name) {
20
+ try { return fs.readFileSync(path.join(PARENT_DIR, name), 'utf-8'); }
21
+ catch { return null; }
22
+ }
23
+
24
+ module.exports.readChat = () => loadParent('read_chat.js');
25
+ module.exports.focusEditor = () => loadParent('focus_editor.js');
26
+ module.exports.listSessions = () => loadParent('list_chats.js');
27
+ module.exports.newSession = () => loadParent('new_session.js');
28
+ module.exports.listModels = () => load('list_models.js');
29
+ module.exports.listModes = () => load('list_modes.js');
30
+
31
+ module.exports.sendMessage = (text) => {
32
+ const script = loadParent('send_message.js');
33
+ if (!script) return null;
34
+ return script.replace(/\$\{\s*MESSAGE\s*\}/g, JSON.stringify(text));
35
+ };
36
+
37
+ module.exports.switchSession = (sessionId) => {
38
+ const script = loadParent('switch_session.js');
39
+ if (!script) return null;
40
+ return script.replace(/\$\{\s*SESSION_ID\s*\}/g, JSON.stringify(sessionId));
41
+ };
42
+
43
+ module.exports.resolveAction = (params) => {
44
+ const action = typeof params === 'string' ? params : params?.action || 'approve';
45
+ const buttonText = params?.button || params?.buttonText
46
+ || (action === 'approve' ? 'Accept' : action === 'reject' ? 'Reject' : action);
47
+ const script = loadParent('resolve_action.js');
48
+ if (!script) return null;
49
+ return script.replace(/\$\{\s*BUTTON_TEXT\s*\}/g, JSON.stringify(buttonText));
50
+ };
51
+
52
+ module.exports.setModel = (params) => {
53
+ const model = typeof params === 'string' ? params : params?.model;
54
+ const script = load('set_model.js');
55
+ if (!script) return null;
56
+ return script.replace(/\$\{\s*MODEL\s*\}/g, JSON.stringify(model));
57
+ };
58
+
59
+ module.exports.setMode = (params) => {
60
+ const mode = typeof params === 'string' ? params : params?.mode;
61
+ const script = load('set_mode.js');
62
+ if (!script) return null;
63
+ return script.replace(/\$\{\s*MODE\s*\}/g, JSON.stringify(mode));
64
+ };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Antigravity — set_mode
3
+ * Conversation mode 패널에서 Planning/Fast 클릭
4
+ * ${MODE} → JSON.stringify(modeName)
5
+ * → { success: boolean, mode?: string }
6
+ */
7
+ (async () => {
8
+ try {
9
+ const target = ${MODE};
10
+
11
+ // "Conversation mode" 헤더의 부모에서 .font-medium 항목 찾기
12
+ const headers = document.querySelectorAll('.text-xs.px-2.pb-1.opacity-80');
13
+ for (const header of headers) {
14
+ if (header.textContent?.trim() === 'Conversation mode') {
15
+ const parent = header.parentElement;
16
+ if (!parent) continue;
17
+ const items = parent.querySelectorAll('.font-medium');
18
+ for (const item of items) {
19
+ const text = item.textContent?.trim();
20
+ if (text && text.toLowerCase() === target.toLowerCase()) {
21
+ item.click();
22
+ await new Promise(r => setTimeout(r, 300));
23
+ return JSON.stringify({ success: true, mode: text });
24
+ }
25
+ }
26
+ break;
27
+ }
28
+ }
29
+
30
+ return JSON.stringify({ success: false, error: 'mode not found: ' + target });
31
+ } catch (e) {
32
+ return JSON.stringify({ success: false, error: e.message });
33
+ }
34
+ })()