@adhdev/daemon-core 0.6.53 → 0.6.56

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 (164) hide show
  1. package/dist/index.d.ts +84 -34
  2. package/dist/index.js +631 -305
  3. package/dist/index.js.map +1 -1
  4. package/package.json +2 -1
  5. package/providers/_builtin/_helpers/index.js +26 -26
  6. package/providers/_builtin/cli/aider-cli/provider.json +37 -0
  7. package/providers/_builtin/cli/aider-cli/scripts/1.0/detect_status.js +20 -0
  8. package/providers/_builtin/cli/aider-cli/scripts/1.0/parse_approval.js +10 -0
  9. package/providers/_builtin/cli/aider-cli/scripts/1.0/parse_output.js +49 -0
  10. package/providers/_builtin/cli/aider-cli/scripts/1.0/scripts.js +7 -0
  11. package/providers/_builtin/cli/claude-cli/provider.json +9 -2
  12. package/providers/_builtin/cli/claude-cli/scripts/1.0/detect_status.js +31 -0
  13. package/providers/_builtin/cli/claude-cli/scripts/1.0/parse_approval.js +38 -0
  14. package/providers/_builtin/cli/claude-cli/scripts/1.0/parse_output.js +164 -0
  15. package/providers/_builtin/cli/claude-cli/scripts/1.0/scripts.js +42 -0
  16. package/providers/_builtin/cli/codex-cli/provider.json +9 -2
  17. package/providers/_builtin/cli/codex-cli/scripts/1.0/detect_status.js +20 -0
  18. package/providers/_builtin/cli/codex-cli/scripts/1.0/parse_approval.js +15 -0
  19. package/providers/_builtin/cli/codex-cli/scripts/1.0/parse_output.js +68 -0
  20. package/providers/_builtin/cli/codex-cli/scripts/1.0/scripts.js +11 -0
  21. package/providers/_builtin/cli/cursor-cli/provider.json +37 -0
  22. package/providers/_builtin/cli/cursor-cli/scripts/1.0/detect_status.js +19 -0
  23. package/providers/_builtin/cli/cursor-cli/scripts/1.0/parse_approval.js +10 -0
  24. package/providers/_builtin/cli/cursor-cli/scripts/1.0/parse_output.js +48 -0
  25. package/providers/_builtin/cli/cursor-cli/scripts/1.0/scripts.js +7 -0
  26. package/providers/_builtin/cli/gemini-cli/provider.json +9 -2
  27. package/providers/_builtin/cli/gemini-cli/scripts/1.0/detect_status.js +26 -0
  28. package/providers/_builtin/cli/gemini-cli/scripts/1.0/parse_approval.js +22 -0
  29. package/providers/_builtin/cli/gemini-cli/scripts/1.0/parse_output.js +71 -0
  30. package/providers/_builtin/cli/gemini-cli/scripts/1.0/scripts.js +12 -0
  31. package/providers/_builtin/cli/github-copilot-cli/provider.json +37 -0
  32. package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/detect_status.js +19 -0
  33. package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/parse_approval.js +9 -0
  34. package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/parse_output.js +48 -0
  35. package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/scripts.js +7 -0
  36. package/providers/_builtin/cli/goose-cli/provider.json +37 -0
  37. package/providers/_builtin/cli/goose-cli/scripts/1.0/detect_status.js +20 -0
  38. package/providers/_builtin/cli/goose-cli/scripts/1.0/parse_approval.js +10 -0
  39. package/providers/_builtin/cli/goose-cli/scripts/1.0/parse_output.js +48 -0
  40. package/providers/_builtin/cli/goose-cli/scripts/1.0/scripts.js +7 -0
  41. package/providers/_builtin/cli/opencode-cli/provider.json +37 -0
  42. package/providers/_builtin/cli/opencode-cli/scripts/1.0/detect_status.js +15 -0
  43. package/providers/_builtin/cli/opencode-cli/scripts/1.0/parse_approval.js +9 -0
  44. package/providers/_builtin/cli/opencode-cli/scripts/1.0/parse_output.js +48 -0
  45. package/providers/_builtin/cli/opencode-cli/scripts/1.0/scripts.js +7 -0
  46. package/providers/_builtin/extension/cline/scripts/1.0/focus_editor.js +5 -5
  47. package/providers/_builtin/extension/cline/scripts/1.0/list_chats.js +11 -11
  48. package/providers/_builtin/extension/cline/scripts/1.0/list_models.js +6 -6
  49. package/providers/_builtin/extension/cline/scripts/1.0/list_modes.js +5 -5
  50. package/providers/_builtin/extension/cline/scripts/1.0/new_session.js +12 -12
  51. package/providers/_builtin/extension/cline/scripts/1.0/open_panel.js +7 -7
  52. package/providers/_builtin/extension/cline/scripts/1.0/read_chat.js +29 -29
  53. package/providers/_builtin/extension/cline/scripts/1.0/resolve_action.js +19 -19
  54. package/providers/_builtin/extension/cline/scripts/1.0/send_message.js +15 -15
  55. package/providers/_builtin/extension/cline/scripts/1.0/set_mode.js +4 -4
  56. package/providers/_builtin/extension/cline/scripts/1.0/set_model.js +4 -4
  57. package/providers/_builtin/extension/cline/scripts/1.0/switch_session.js +21 -21
  58. package/providers/_builtin/extension/codex/scripts/1.0/explore_controls_webview.js +2 -2
  59. package/providers/_builtin/extension/codex/scripts/1.0/list_models.js +1 -1
  60. package/providers/_builtin/extension/codex/scripts/1.0/list_modes.js +1 -1
  61. package/providers/_builtin/extension/codex/scripts/1.0/new_session.js +2 -2
  62. package/providers/_builtin/extension/codex/scripts/1.0/read_chat.js +6 -6
  63. package/providers/_builtin/extension/codex/scripts/1.0/resolve_action.js +3 -3
  64. package/providers/_builtin/extension/codex/scripts/1.0/set_model.js +1 -1
  65. package/providers/_builtin/ide/antigravity/scripts/1.0/focus_editor.js +2 -2
  66. package/providers/_builtin/ide/antigravity/scripts/1.0/list_chats.js +19 -19
  67. package/providers/_builtin/ide/antigravity/scripts/1.0/list_models.js +1 -1
  68. package/providers/_builtin/ide/antigravity/scripts/1.0/list_modes.js +1 -1
  69. package/providers/_builtin/ide/antigravity/scripts/1.0/new_session.js +17 -17
  70. package/providers/_builtin/ide/antigravity/scripts/1.0/read_chat.js +41 -41
  71. package/providers/_builtin/ide/antigravity/scripts/1.0/resolve_action.js +6 -6
  72. package/providers/_builtin/ide/antigravity/scripts/1.0/send_message.js +13 -13
  73. package/providers/_builtin/ide/antigravity/scripts/1.0/set_model.js +1 -1
  74. package/providers/_builtin/ide/antigravity/scripts/1.0/switch_session.js +13 -13
  75. package/providers/_builtin/ide/cursor/scripts/1.0/dismiss_notification.js +3 -3
  76. package/providers/_builtin/ide/cursor/scripts/1.0/focus_editor.js +1 -1
  77. package/providers/_builtin/ide/cursor/scripts/1.0/list_models.js +12 -12
  78. package/providers/_builtin/ide/cursor/scripts/1.0/list_modes.js +5 -5
  79. package/providers/_builtin/ide/cursor/scripts/1.0/list_notifications.js +2 -2
  80. package/providers/_builtin/ide/cursor/scripts/1.0/list_sessions.js +5 -5
  81. package/providers/_builtin/ide/cursor/scripts/1.0/new_session.js +1 -1
  82. package/providers/_builtin/ide/cursor/scripts/1.0/open_panel.js +3 -3
  83. package/providers/_builtin/ide/cursor/scripts/1.0/read_chat.js +9 -9
  84. package/providers/_builtin/ide/cursor/scripts/1.0/resolve_action.js +4 -4
  85. package/providers/_builtin/ide/cursor/scripts/1.0/send_message.js +5 -5
  86. package/providers/_builtin/ide/cursor/scripts/1.0/set_mode.js +4 -4
  87. package/providers/_builtin/ide/cursor/scripts/1.0/set_model.js +12 -12
  88. package/providers/_builtin/ide/cursor/scripts/1.0/switch_session.js +2 -2
  89. package/providers/_builtin/ide/kiro/scripts/1.0/focus_editor.js +2 -2
  90. package/providers/_builtin/ide/kiro/scripts/1.0/open_panel.js +7 -7
  91. package/providers/_builtin/ide/kiro/scripts/1.0/resolve_action.js +3 -3
  92. package/providers/_builtin/ide/kiro/scripts/1.0/send_message.js +4 -4
  93. package/providers/_builtin/ide/kiro/scripts/1.0/webview_list_sessions.js +2 -2
  94. package/providers/_builtin/ide/kiro/scripts/1.0/webview_new_session.js +5 -5
  95. package/providers/_builtin/ide/kiro/scripts/1.0/webview_read_chat.js +13 -13
  96. package/providers/_builtin/ide/kiro/scripts/1.0/webview_resolve_action.js +1 -1
  97. package/providers/_builtin/ide/kiro/scripts/1.0/webview_send_message.js +8 -8
  98. package/providers/_builtin/ide/kiro/scripts/1.0/webview_set_mode.js +1 -1
  99. package/providers/_builtin/ide/kiro/scripts/1.0/webview_set_model.js +1 -1
  100. package/providers/_builtin/ide/kiro/scripts/1.0/webview_switch_session.js +3 -3
  101. package/providers/_builtin/ide/pearai/.tmp/after_rich.json +157 -0
  102. package/providers/_builtin/ide/pearai/.tmp/after_rich_raw.json +161 -0
  103. package/providers/_builtin/ide/pearai/.tmp/after_switch.json +592 -0
  104. package/providers/_builtin/ide/pearai/.tmp/after_switch_raw.json +596 -0
  105. package/providers/_builtin/ide/pearai/.tmp/home_dump_raw.json +176 -0
  106. package/providers/_builtin/ide/pearai/.tmp/items_raw.json +778 -0
  107. package/providers/_builtin/ide/pearai/.tmp/webview_dump.json +157 -0
  108. package/providers/_builtin/ide/pearai/.tmp/webview_dump_raw.json +161 -0
  109. package/providers/_builtin/ide/pearai/provider.json +1 -3
  110. package/providers/_builtin/ide/pearai/scripts/1.0/focus_editor.js +12 -16
  111. package/providers/_builtin/ide/pearai/scripts/1.0/list_models.js +45 -0
  112. package/providers/_builtin/ide/pearai/scripts/1.0/list_modes.js +44 -0
  113. package/providers/_builtin/ide/pearai/scripts/1.0/list_sessions.js +82 -27
  114. package/providers/_builtin/ide/pearai/scripts/1.0/new_session.js +26 -43
  115. package/providers/_builtin/ide/pearai/scripts/1.0/open_panel.js +10 -33
  116. package/providers/_builtin/ide/pearai/scripts/1.0/read_chat.js +169 -0
  117. package/providers/_builtin/ide/pearai/scripts/1.0/resolve_action.js +47 -41
  118. package/providers/_builtin/ide/pearai/scripts/1.0/scripts.js +36 -7
  119. package/providers/_builtin/ide/pearai/scripts/1.0/send_message.js +97 -22
  120. package/providers/_builtin/ide/pearai/scripts/1.0/set_mode.js +51 -0
  121. package/providers/_builtin/ide/pearai/scripts/1.0/set_model.js +54 -0
  122. package/providers/_builtin/ide/pearai/scripts/1.0/switch_session.js +81 -0
  123. package/providers/_builtin/ide/trae/scripts/1.0/focus_editor.js +2 -2
  124. package/providers/_builtin/ide/trae/scripts/1.0/list_chats.js +2 -2
  125. package/providers/_builtin/ide/trae/scripts/1.0/new_session.js +4 -4
  126. package/providers/_builtin/ide/trae/scripts/1.0/open_panel.js +6 -6
  127. package/providers/_builtin/ide/trae/scripts/1.0/read_chat.js +13 -13
  128. package/providers/_builtin/ide/trae/scripts/1.0/resolve_action.js +3 -3
  129. package/providers/_builtin/ide/trae/scripts/1.0/send_message.js +11 -11
  130. package/providers/_builtin/ide/trae/scripts/1.0/switch_session.js +2 -2
  131. package/providers/_builtin/ide/windsurf/scripts/1.0/focus_editor.js +6 -6
  132. package/providers/_builtin/ide/windsurf/scripts/1.0/list_chats.js +4 -4
  133. package/providers/_builtin/ide/windsurf/scripts/1.0/list_sessions.js +6 -6
  134. package/providers/_builtin/ide/windsurf/scripts/1.0/new_session.js +9 -9
  135. package/providers/_builtin/ide/windsurf/scripts/1.0/open_panel.js +6 -6
  136. package/providers/_builtin/ide/windsurf/scripts/1.0/resolve_action.js +8 -8
  137. package/providers/_builtin/ide/windsurf/scripts/1.0/switch_session.js +8 -8
  138. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/focus_editor.js +6 -6
  139. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/list_chats.js +12 -12
  140. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/new_session.js +15 -15
  141. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/open_panel.js +10 -10
  142. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/read_chat.js +33 -33
  143. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/resolve_action.js +6 -6
  144. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/send_message.js +16 -16
  145. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/switch_session.js +7 -7
  146. package/providers/_builtin/registry.json +76 -3
  147. package/src/cli-adapters/provider-cli-adapter.ts +312 -258
  148. package/src/cli-adapters/terminal-screen.ts +95 -0
  149. package/src/commands/chat-commands.ts +41 -15
  150. package/src/commands/cli-manager.ts +4 -2
  151. package/src/daemon/dev-server.ts +306 -62
  152. package/src/providers/acp-provider-instance.ts +1 -1
  153. package/src/providers/cli-provider-instance.ts +23 -9
  154. package/src/providers/provider-loader.ts +3 -2
  155. package/providers/_builtin/ide/pearai/scripts/1.0/webview_list_models.js +0 -43
  156. package/providers/_builtin/ide/pearai/scripts/1.0/webview_list_modes.js +0 -35
  157. package/providers/_builtin/ide/pearai/scripts/1.0/webview_list_sessions.js +0 -62
  158. package/providers/_builtin/ide/pearai/scripts/1.0/webview_new_session.js +0 -49
  159. package/providers/_builtin/ide/pearai/scripts/1.0/webview_read_chat.js +0 -92
  160. package/providers/_builtin/ide/pearai/scripts/1.0/webview_resolve_action.js +0 -59
  161. package/providers/_builtin/ide/pearai/scripts/1.0/webview_send_message.js +0 -72
  162. package/providers/_builtin/ide/pearai/scripts/1.0/webview_set_mode.js +0 -36
  163. package/providers/_builtin/ide/pearai/scripts/1.0/webview_set_model.js +0 -36
  164. package/providers/_builtin/ide/pearai/scripts/1.0/webview_switch_session.js +0 -34
@@ -1,32 +1,32 @@
1
1
  /**
2
2
  * Antigravity v1 — new_session
3
3
  *
4
- * Antigravity Agent 패널 상단의 + 아이콘 클릭으로 대화 시작.
4
+ * Antigravity Agent panel + icon by clicking new conversation start.
5
5
  *
6
- * DOM 구조:
7
- * .antigravity-agent-side-panel 상단 아이콘
8
- * [0] <a> + (Plus) → 대화 이것을 클릭
9
- * [1] <a> 히스토리 (data-past-conversations-toggle)
10
- * [2] <div> 더보기 (⋯)
11
- * [3] <a> 닫기 (✕)
6
+ * DOM structure:
7
+ * .antigravity-agent-side-panel top icon bar
8
+ * [0] <a> + (Plus) → new conversation click
9
+ * [1] <a> history (data-past-conversations-toggle)
10
+ * [2] <div> more (⋯)
11
+ * [3] <a> close (✕)
12
12
  *
13
- * 전략:
14
- * 1. 히스토리 토글의 이전 형제 <a> 클릭 (Plus 아이콘)
15
- * 2. SVG path "M12 4.5v15m7.5-7.5h-15" (+ 모양) 찾기
16
- * 3. 패널 상단 첫 번째 <a> 클릭 폴백
13
+ * strategy:
14
+ * 1. Previous sibling of history toggle <a> click (Plus icon)
15
+ * 2. Find SVG path "M12 4.5v15m7.5-7.5h-15" (+ shape)
16
+ * 3. panel <a> click fallback
17
17
  *
18
- * 최종 확인: 2026-03-11
18
+ * final Check: 2026-03-11
19
19
  */
20
20
  (() => {
21
21
  try {
22
- // ─── 1. 히스토리 토글의 이전 형제 요소 (Plus 아이콘) ───
22
+ // ─── 1. Previous sibling of history toggle (Plus icon) ───
23
23
  const toggle = document.querySelector('[data-past-conversations-toggle="true"]');
24
24
  if (toggle) {
25
25
  const parent = toggle.parentElement;
26
26
  if (parent) {
27
27
  const children = Array.from(parent.children).filter(c => c.offsetWidth > 0);
28
28
  const toggleIdx = children.indexOf(toggle);
29
- // Plus 아이콘은 히스토리 바로
29
+ // Plus icon is right before history
30
30
  if (toggleIdx > 0) {
31
31
  const plusBtn = children[toggleIdx - 1];
32
32
  plusBtn.click();
@@ -35,7 +35,7 @@
35
35
  }
36
36
  }
37
37
 
38
- // ─── 2. SVG path 기반: Plus(+) 모양 SVG ───
38
+ // ─── 2. SVG path based: Plus(+) shape SVG ───
39
39
  const panel = document.querySelector('.antigravity-agent-side-panel') || document.querySelector('#conversation');
40
40
  if (panel) {
41
41
  const svgs = panel.querySelectorAll('svg');
@@ -43,7 +43,7 @@
43
43
  const path = svg.querySelector('path');
44
44
  if (path) {
45
45
  const d = path.getAttribute('d') || '';
46
- // Plus 아이콘 SVG: 세로선 + 가로선
46
+ // Plus icon SVG: +
47
47
  if (d.includes('v15') && d.includes('h-15')) {
48
48
  const clickable = svg.closest('a') || svg.closest('button') || svg.parentElement;
49
49
  if (clickable) {
@@ -55,7 +55,7 @@
55
55
  }
56
56
  }
57
57
 
58
- // ─── 3. 폴백: 패널 상단 영역의 첫 번째 <a> ───
58
+ // ─── 3. fallback: panel area <a> ───
59
59
  if (panel) {
60
60
  const topLinks = Array.from(panel.querySelectorAll('a')).filter(a => {
61
61
  const r = a.getBoundingClientRect();
@@ -1,30 +1,30 @@
1
1
  /**
2
- * Antigravity v1 — read_chat (v4 — 스크롤 아래만, 가시 영역만 수집)
2
+ * Antigravity v1 — read_chat (v4 — scroll , area )
3
3
  *
4
- * 원칙:
5
- * - 스크롤은 아래로만 (위로 절대 안 감)
6
- * - 가상화로 사라진 과거 사용자 메시지는 무시
7
- * - 현재 보이는 메시지만 수집 (최신 턴 중심)
4
+ * :
5
+ * - scrollis ( )
6
+ * - use ignore
7
+ * - current (latest )
8
8
  *
9
- * DOM 구조:
10
- * 사용자: bg-gray-500/15 + select-text + p-2, 내부 whitespace-pre-wrap
11
- * 어시스턴트: .leading-relaxed.select-text
9
+ * DOM structure:
10
+ * User: bg-gray-500/15 + select-text + p-2, inside whitespace-pre-wrap
11
+ * : .leading-relaxed.select-text
12
12
  */
13
13
  (() => {
14
14
  try {
15
15
  const conv = document.querySelector('#conversation') || document.querySelector('.antigravity-agent-side-panel') || document.body;
16
16
  const scroll = conv.querySelector('.overflow-y-auto') || conv;
17
17
 
18
- // 1. 상태 감지사이드바 하단 Send/Stop 버튼 기반 (오탐 방지)
18
+ // 1. status detectionBased on Send/Stop button at bottom of sidebar (prevent false positives)
19
19
  let status = 'idle';
20
20
 
21
- // 시그널 A (1순위): 사이드바 하단 빨간 Stop 사각형 (.bg-red-500) — generating 중일 표시됨
21
+ // A (1st priority): Red Stop square (.bg-red-500) — generating displayed when generating
22
22
  const stopSquare = conv.querySelector('[class*="bg-red-500"]') || conv.querySelector('button[class*="rounded"] [class*="bg-red"]');
23
23
  if (stopSquare && stopSquare.offsetWidth > 0) {
24
24
  status = 'generating';
25
25
  }
26
26
 
27
- // 시그널 B: conv 내부의 animate-markdown (생성 마크다운 렌더링)
27
+ // Signal B: conv inside animate-markdown (create markdown rendering during creation)
28
28
  if (status === 'idle') {
29
29
  const animMarkdown = scroll.querySelector('.leading-relaxed [class*="animate-markdown"]');
30
30
  if (animMarkdown && animMarkdown.offsetWidth > 0) status = 'generating';
@@ -33,7 +33,7 @@
33
33
  const titleParts = document.title.split(' \u2014 ');
34
34
  const title = (titleParts.length >= 2 ? titleParts[titleParts.length - 1] : titleParts[0] || '').trim() || 'Active Session';
35
35
 
36
- // ─── HTML → Markdown 변환기 (대시보드가 ReactMarkdown+remarkGfm 사용) ───
36
+ // ─── HTML → Markdown converter (Dashboard uses ReactMarkdown+remarkGfm) ───
37
37
  // extractCodeText: layout-independent code text extraction
38
38
  // Works on cloneNode'd (detached) elements where innerText == textContent
39
39
  // Walks child nodes and inserts \n between block-level elements (DIV, P, etc.)
@@ -60,10 +60,10 @@
60
60
  if (node.nodeType !== 1) return '';
61
61
  const tag = node.tagName;
62
62
 
63
- // 스타일/스크립트 제거
63
+ // Remove styles/scripts
64
64
  if (tag === 'STYLE' || tag === 'SCRIPT' || tag === 'SVG') return '';
65
65
 
66
- // 테이블 → GFM
66
+ // Table → GFM
67
67
  if (tag === 'TABLE') {
68
68
  const rows = Array.from(node.querySelectorAll('tr'));
69
69
  if (rows.length === 0) return '';
@@ -122,9 +122,9 @@
122
122
 
123
123
  function getCleanMd(el) {
124
124
  const clone = el.cloneNode(true);
125
- // 노이즈 제거
125
+ // Remove noise
126
126
  clone.querySelectorAll('button, [role="button"], style, script, svg, .codicon, [class*="feedback"], [aria-label*="Good"], [aria-label*="Bad"]').forEach(n => n.remove());
127
- // 상태 텍스트 제거 (leaf만, 60 이하만)
127
+ // Remove status text (leaf only, 60 chars or less)
128
128
  clone.querySelectorAll('*').forEach(child => {
129
129
  if (!child.parentNode) return;
130
130
  const t = (child.textContent || '').trim();
@@ -134,17 +134,17 @@
134
134
  if (/^(mcp|customizationmcp|serversexport)/i.test(low)) child.remove();
135
135
  });
136
136
  let md = htmlToMd(clone);
137
- // "Thought for X seconds" 제거
137
+ // Remove "Thought for X seconds"
138
138
  md = md.replace(/^Thought for\s+[\d.]+\s*(seconds?|s)\s*/i, '');
139
139
  md = md.replace(/\n{3,}/g, '\n\n').trim();
140
140
  return md;
141
141
  }
142
142
 
143
- // 2. 메시지 수집 (스크롤 조작 없음현재 DOM에 있는 것만)
143
+ // 2. Collect messages (scroll No manipulationcurrent DOMonly those in)
144
144
  const collected = [];
145
145
  const seenHashes = new Set();
146
146
 
147
- // 사용자 메시지 (bg-gray-500/15 + select-text + p-2)
147
+ // use (bg-gray-500/15 + select-text + p-2)
148
148
  const allDivs = scroll.querySelectorAll('div');
149
149
  for (const el of allDivs) {
150
150
  const cls = (el.className || '');
@@ -160,12 +160,12 @@
160
160
  }
161
161
  }
162
162
 
163
- // 어시스턴트 메시지 (leading-relaxed.select-text) — HTML→Markdown 변환
163
+ // (leading-relaxed.select-text) — HTML→Markdown conversion
164
164
  const assistantBlocks = scroll.querySelectorAll('.leading-relaxed.select-text');
165
165
  for (const ab of assistantBlocks) {
166
166
  if (ab.offsetHeight < 10) continue;
167
167
  if (ab.closest('[class*="max-h-"][class*="overflow-y-auto"]')) continue;
168
- // Thought 내부의 블록은 제외 (thinking으로 별도 수집)
168
+ // Exclude blocks inside Thought (collected separately as thinking)
169
169
  if (ab.closest('.isolate')?.querySelector('button')?.textContent?.startsWith('Thought for')) continue;
170
170
 
171
171
  let text = getCleanMd(ab);
@@ -178,14 +178,14 @@
178
178
  collected.push({ role: 'assistant', text, el: ab, kind: 'standard' });
179
179
  }
180
180
 
181
- // ─── Thought 수집 (AI 사고 과정) ───
181
+ // ─── Thought collection (AI thought process) ───
182
182
  const thoughtBtns = scroll.querySelectorAll('button');
183
183
  for (const btn of thoughtBtns) {
184
184
  const label = (btn.textContent || '').trim();
185
185
  if (!label.startsWith('Thought for')) continue;
186
186
  const sibling = btn.nextElementSibling;
187
187
  if (!sibling) continue;
188
- // 실제 thinking 텍스트는 sibling 내부의 .leading-relaxed.select-text 있음
188
+ // Actual thinking text is in .leading-relaxed.select-text inside sibling
189
189
  const contentEl = sibling.querySelector('.leading-relaxed.select-text');
190
190
  if (!contentEl) continue;
191
191
  const clone = contentEl.cloneNode(true);
@@ -195,11 +195,11 @@
195
195
  const hash = 'think:' + thinkText.slice(0, 200);
196
196
  if (seenHashes.has(hash)) continue;
197
197
  seenHashes.add(hash);
198
- // 순수 텍스트만 전달 (마크다운 포맷은 프론트엔드에서 처리)
198
+ // Pass plain text only (markdown format handled by frontend)
199
199
  collected.push({ role: 'assistant', text: thinkText.slice(0, 3000), el: btn, kind: 'thought', meta: { label } });
200
200
  }
201
201
 
202
- // ─── Terminal/Tool Call 수집 (명령 실행 결과) ───
202
+ // ─── Terminal/Tool Call collection (command execute result) ───
203
203
  const termHeaders = scroll.querySelectorAll('div.mb-1.px-2.py-1');
204
204
  for (const h of termHeaders) {
205
205
  const spanEl = h.querySelector('span');
@@ -213,17 +213,17 @@
213
213
  const hash = 'term:' + cmdText.slice(0, 200);
214
214
  if (seenHashes.has(hash)) continue;
215
215
  seenHashes.add(hash);
216
- // 순수 텍스트만 전달 (라벨/아이콘은 프론트엔드에서 처리)
216
+ // Pass plain text only (labels/icons handled by frontend)
217
217
  const isRunning = label.startsWith('Running');
218
218
  collected.push({ role: 'assistant', text: cmdText.slice(0, 3000), el: h, kind: 'terminal', meta: { label, isRunning } });
219
219
  }
220
220
 
221
- // ─── Tool Call 요약 수집 (Searched, Analyzed, Edited ) ───
221
+ // ─── Tool Call summary collection (Searched, Analyzed, Edited ) ───
222
222
  const toolDivs = scroll.querySelectorAll('div[data-tooltip-id]');
223
223
  for (const td of toolDivs) {
224
224
  const cls = (td.className || '').toString();
225
225
  if (!cls.includes('cursor-pointer') || !cls.includes('text-sm')) continue;
226
- // span 단위로 읽어서 공백으로 연결 (textContent "SearchedDevServer"처럼 붙음)
226
+ // Read per-span and join with spaces (textContent "SearchedDevServer"attached like)
227
227
  const spans = td.querySelectorAll('span');
228
228
  const text = spans.length > 0
229
229
  ? Array.from(spans).map(s => (s.textContent || '').trim()).filter(Boolean).join(' ')
@@ -233,11 +233,11 @@
233
233
  const hash = 'tool:' + text;
234
234
  if (seenHashes.has(hash)) continue;
235
235
  seenHashes.add(hash);
236
- // 간결하게 줄 요약
236
+ // Concise one-line summary
237
237
  collected.push({ role: 'assistant', text: text, el: td, kind: 'tool' });
238
238
  }
239
239
 
240
- // 3. DOM 순서 정렬
240
+ // 3. DOM Order sorting
241
241
  collected.sort((a, b) => {
242
242
  const pos = a.el.compareDocumentPosition(b.el);
243
243
  if (pos & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
@@ -245,7 +245,7 @@
245
245
  return 0;
246
246
  });
247
247
 
248
- // 최신 50개만 유지 (thinking/tool_use 포함으로 늘림)
248
+ // latest 50only keep (thinking/tool_use increased to include)
249
249
  const trimmed = collected.length > 50 ? collected.slice(-50) : collected;
250
250
 
251
251
  const final = trimmed.map((m, i) => ({
@@ -258,13 +258,13 @@
258
258
  vsc_history: true
259
259
  }));
260
260
 
261
- // 4. 입력창
261
+ // 4. input field
262
262
  const editor = conv.querySelector('[contenteditable="true"][role="textbox"]') ||
263
263
  conv.querySelector('[data-lexical-editor="true"]') ||
264
264
  conv.querySelector('textarea');
265
265
  const inputContent = editor ? (editor.innerText || editor.value || '').trim() : '';
266
266
 
267
- // 5. 모달/승인 감지 — Run⌥⏎/Reject 인라인 + Deny/Allow 브라우저 승인
267
+ // 5. modal/approval detect — Run⌥⏎/Reject + Deny/Allow browser approval
268
268
  let activeModal = null;
269
269
  try {
270
270
  // Strip Mac symbols and Windows shortcut labels (e.g. "RunAlt+⏎" → "Run")
@@ -275,14 +275,14 @@
275
275
  const isApprovalLike = (el) => {
276
276
  const raw = (el.textContent || '').trim();
277
277
  const t = stripShortcut(raw).toLowerCase();
278
- // 드롭다운 옵션 제외
278
+ // Exclude dropdown options
279
279
  if (t === 'ask every time') return false;
280
280
  return /^(run|reject|skip|approve|allow|deny|cancel|accept|yes|no)\b/i.test(t)
281
281
  || t === 'always allow' || t === 'always deny'
282
282
  || t.includes('run ') || t.includes('approve') || t.includes('reject')
283
283
  || t.includes('skip');
284
284
  };
285
- // A: 전통적 모달 다이얼로그
285
+ // A: modal
286
286
  const dialog = document.querySelector('.monaco-dialog-box, [role="dialog"], .monaco-modal-block');
287
287
  if (dialog && dialog.offsetWidth > 80 && dialog.offsetHeight > 40) {
288
288
  const msg = (dialog.querySelector('.dialog-message, .dialog-message-text') || dialog).innerText?.trim() || '';
@@ -293,8 +293,8 @@
293
293
  activeModal = { message: msg.slice(0, 300), buttons, width: dialog.offsetWidth, height: dialog.offsetHeight };
294
294
  }
295
295
  }
296
- // B: 인라인 approval 버튼 (Run⌥⏎, Reject, Deny, Allow )
297
- // ⚠ 사이드바(conv) 내부의 버튼만 검사 — 에디터의 Accept/Reject Changes 제외
296
+ // B: approval button (Run⌥⏎, Reject, Deny, Allow )
297
+ // ⚠ Only check buttons inside sidebar (conv) exclude editor Accept/Reject Changes
298
298
  if (!activeModal) {
299
299
  const panelBtns = Array.from(conv.querySelectorAll('button')).filter(b => b.offsetWidth > 0 && b.offsetHeight > 0);
300
300
  const approvalBtns = panelBtns.filter(isApprovalLike);
@@ -319,14 +319,14 @@
319
319
  }
320
320
  }
321
321
  }
322
- // C: footer 기반 사용량/quota 다이얼로그 (Dismiss / See Plans / Enable Overages )
323
- // <footer> 요소가 conv 안에 존재하고 2 이상 버튼이 있으면 사용자 액션이 필요한 카드로 판단
322
+ // C: footer based usage/quota (Dismiss / See Plans / Enable Overages )
323
+ // <footer> element conv exists 2 button considered a card requiring user action
324
324
  if (!activeModal) {
325
325
  const footers = Array.from(conv.querySelectorAll('footer')).filter(f => f.offsetWidth > 0 && f.offsetHeight > 0);
326
326
  for (const footer of footers) {
327
327
  const footerBtns = Array.from(footer.querySelectorAll('button, a')).filter(b => b.offsetWidth > 0);
328
328
  if (footerBtns.length >= 2) {
329
- // 카드 컨테이너: footer 상위에서 충분한 높이를 가진 번째 요소
329
+ // Card Container: First element with sufficient height above footer
330
330
  let card = footer.parentElement;
331
331
  for (let up = 0; up < 4 && card; up++) {
332
332
  if (card.offsetHeight > 60) break;
@@ -341,7 +341,7 @@
341
341
  }
342
342
  }
343
343
  }
344
- // 모달이 감지되면 status waiting_approval로 변경
344
+ // If modal detected, change status to waiting_approval
345
345
  if (activeModal) status = 'waiting_approval';
346
346
  } catch (e) { activeModal = null; }
347
347
 
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Antigravity v1 — resolve_action
3
3
  *
4
- * 스크롤 최하단 → scrollIntoView → .click()
5
- * 파라미터: ${BUTTON_TEXT}
4
+ * scroll bottom → scrollIntoView → .click()
5
+ * Parameter: ${BUTTON_TEXT}
6
6
  */
7
7
  (() => {
8
8
  const want = ${ BUTTON_TEXT };
@@ -34,16 +34,16 @@
34
34
  return false;
35
35
  }
36
36
 
37
- // 1. 채팅 패널 스크롤을 최하단으로
37
+ // 1. chat panel scroll bottom
38
38
  const conv = document.querySelector('.antigravity-agent-side-panel') || document.querySelector('#conversation');
39
39
  const scrollEl = conv ? (conv.querySelector('.overflow-y-auto') || conv) : null;
40
40
  if (scrollEl) scrollEl.scrollTop = scrollEl.scrollHeight;
41
41
 
42
- // 2. viewport 필터 없이 DOM 있는 모든 visible 버튼 검색
42
+ // 2. viewport all visible in DOM without filter button
43
43
  const sel = 'button, [role="button"]';
44
44
  const allBtns = [...document.querySelectorAll(sel)].filter(b => b.offsetWidth > 0 && b.offsetHeight > 0);
45
45
 
46
- // 마지막(최신) 매칭 우선역순 검색
46
+ // last(latest) matching first
47
47
  let found = null;
48
48
  for (let i = allBtns.length - 1; i >= 0; i--) {
49
49
  if (matches(allBtns[i])) {
@@ -54,7 +54,7 @@
54
54
 
55
55
  if (found) {
56
56
  const text = found.textContent?.trim()?.substring(0, 40);
57
- // 버튼이 화면에 보이도록 스크롤 클릭
57
+ // buttonscroll to make visible then click
58
58
  try { found.scrollIntoView({ block: 'nearest' }); } catch (_) {}
59
59
  try { found.click(); } catch (_) {}
60
60
  return JSON.stringify({ resolved: true, clicked: text });
@@ -1,44 +1,44 @@
1
1
  /**
2
2
  * Antigravity v1 — send_message
3
3
  *
4
- * Antigravity contenteditable div[role="textbox"] 사용.
5
- * 여러 개의 contenteditable이 있을 있으므로 y좌표가 가장 (메인 채팅) 것을 선택.
4
+ * Antigravity contenteditable div[role="textbox"] use.
5
+ * Multiple contenteditablemay exist, so select the one with largest y coordinate (main chat).
6
6
  *
7
- * ⚠️ Enter 이벤트에 composed: true + which 필수 (Shadow DOM 경계 통과 + React 호환)
8
- * ⚠️ keydown + keypress + keyup 전체 시퀀스 필요
7
+ * ⚠️ Enter event composed: true + which (Shadow DOM crossing boundary + React compatibility)
8
+ * ⚠️ keydown + keypress + keyup full sequence needed
9
9
  *
10
- * 파라미터: ${ MESSAGE }
11
- * 최종 확인: 2026-03-10
10
+ * Parameter: ${ MESSAGE }
11
+ * final Check: 2026-03-10
12
12
  */
13
13
  (async () => {
14
14
  try {
15
15
  const msg = ${ MESSAGE };
16
16
 
17
- // ─── 1. 메인 채팅 입력 필드 찾기 ───
17
+ // ─── 1. Find main chat input field ───
18
18
  const editors = document.querySelectorAll('[contenteditable="true"][role="textbox"]');
19
19
  if (!editors.length) return 'error: no contenteditable textbox found';
20
20
 
21
- // y좌표가 가장 (화면 아래쪽 = 메인 채팅) 에디터 선택
21
+ // y (bottom of screen = chat) editor Select
22
22
  const editor = [...editors].reduce((a, b) =>
23
23
  b.getBoundingClientRect().y > a.getBoundingClientRect().y ? b : a
24
24
  );
25
25
 
26
- // ─── 2. 텍스트 삽입 ───
26
+ // ─── 2. text insertion ───
27
27
  editor.focus();
28
28
 
29
- // 기존 내용 삭제
29
+ // content delete
30
30
  document.execCommand('selectAll', false, null);
31
31
  document.execCommand('delete', false, null);
32
32
 
33
- // 텍스트 삽입
33
+ // text insertion
34
34
  document.execCommand('insertText', false, msg);
35
35
 
36
- // React에 변경 알림
36
+ // Reactnotify changes to
37
37
  editor.dispatchEvent(new Event('input', { bubbles: true }));
38
38
 
39
39
  await new Promise(r => setTimeout(r, 300));
40
40
 
41
- // ─── 3. Enter 전송 (full sequence) ───
41
+ // ─── 3. Enter key sending (full sequence) ───
42
42
  const enterOpts = {
43
43
  key: 'Enter', code: 'Enter',
44
44
  keyCode: 13, which: 13,
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Antigravity — set_model
3
- * 모델 드롭다운에서 모델 선택
3
+ * model from Select model
4
4
  *
5
5
  * Version compatibility:
6
6
  * v0 (old): .flex.min-w-0.max-w-full.cursor-pointer.items-center trigger
@@ -1,29 +1,29 @@
1
1
  /**
2
- * Antigravity v1 — switch_session (v7 — CDP 마우스 클릭 좌표 반환)
2
+ * Antigravity v1 — switch_session (v7 — CDP click Return)
3
3
  *
4
- * ⚠️ 삭제 버튼(trash SVG) 절대 접근하지 않음.
4
+ * ⚠️ delete button(trash SVG)never accessed.
5
5
  *
6
- * 가지 모드:
7
- * 1) 히스토리 토글을 열고 좌표를 찾으면 {clickX, clickY} 반환 → daemon CDP 클릭으로 처리
8
- * 2) 워크스페이스 다이얼로그가 뜨면 첫 번째 행 좌표 반환 (자동 선택용)
6
+ * two types mode:
7
+ * 1) Open history toggle and if row coordinates found {clickX, clickY} Return → daemon handles via CDP click
8
+ * 2) workspace row Return ( Select)
9
9
  *
10
- * 파라미터: ${SESSION_ID} — 대화 제목 (문자열)
10
+ * Parameter: ${SESSION_ID} — conversation title ()
11
11
  */
12
12
  (async () => {
13
13
  const sleep = (ms) => new Promise(r => setTimeout(r, ms));
14
14
  const id = ${SESSION_ID};
15
15
 
16
16
  try {
17
- // 1. 히스토리 토글 클릭
17
+ // 1. history toggle click
18
18
  const toggle = document.querySelector('[data-past-conversations-toggle="true"]');
19
19
  if (!toggle) return JSON.stringify({ error: 'no_toggle' });
20
20
  toggle.click();
21
21
  await sleep(1200);
22
22
 
23
- // 2. 컨테이너 찾기 (기존 로직: "Current" 텍스트 또는 "Select a conversation" input)
23
+ // 2. Container search ( : "Current" text or "Select a conversation" input)
24
24
  let container = null;
25
25
 
26
- // 2a. "Current" 텍스트 기반
26
+ // 2a. "Current" text-based
27
27
  const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, null);
28
28
  while (walker.nextNode()) {
29
29
  if (walker.currentNode.textContent.trim() === 'Current') {
@@ -49,7 +49,7 @@
49
49
  }
50
50
  }
51
51
 
52
- // 2b. 폴백: "Select a conversation" input 기반
52
+ // 2b. fallback: "Select a conversation" input based
53
53
  if (!container) {
54
54
  const searchInput = Array.from(document.querySelectorAll('input[type="text"]'))
55
55
  .find(i => i.offsetWidth > 0 && (i.placeholder || '').includes('Select a conversation'));
@@ -72,14 +72,14 @@
72
72
  return JSON.stringify({ error: 'no_container' });
73
73
  }
74
74
 
75
- // 3. 매칭
75
+ // 3. row matching
76
76
  const rows = container.querySelectorAll('[class*="cursor-pointer"][class*="justify-between"][class*="rounded-md"]');
77
77
  const norm = s => (s || '').trim().toLowerCase().replace(/\s+/g, ' ');
78
78
  const idNorm = norm(id);
79
79
  let targetRow = null;
80
80
 
81
81
  for (const row of rows) {
82
- // 현재 활성 대화 스킵
82
+ // Skip currently active conversation
83
83
  if ((row.className || '').includes('focusBackground')) continue;
84
84
  const titleEl = row.querySelector('span span');
85
85
  const title = titleEl ? norm(titleEl.textContent) : '';
@@ -95,7 +95,7 @@
95
95
  return JSON.stringify({ error: 'no_match', rowCount: rows.length });
96
96
  }
97
97
 
98
- // 4. 행의 좌표 계산 → daemon CDP Input.dispatchMouseEvent 클릭
98
+ // 4. row calculation → daemon CDP Input.dispatchMouseEvent click
99
99
  const rect = targetRow.getBoundingClientRect();
100
100
  const clickX = Math.round(rect.left + rect.width * 0.3);
101
101
  const clickY = Math.round(rect.top + rect.height / 2);
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Cursor — dismiss_notification
3
3
  *
4
- * 알림 토스트 닫기/버튼 클릭:
5
- * 인덱스 또는 메시지 매칭으로 대상 선택
6
- * 버튼 텍스트 지정 해당 버튼 클릭, 아니면 닫기
4
+ * Close notification toast / click button:
5
+ * Select target by index or message matching
6
+ * Click specified button text, otherwise close
7
7
  *
8
8
  * params.index: number, params.button: string|null, params.message: string|null
9
9
  * → { dismissed: true/false }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Cursor — focus_editor
3
3
  *
4
- * 채팅 입력 필드에 포커스:
4
+ * Focus chat input field:
5
5
  * .aislash-editor-input[contenteditable="true"]
6
6
  */
7
7
  (() => {
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * Cursor — list_models
3
3
  *
4
- * 모델 드롭다운 목록 추출:
5
- * 버튼: .composer-unified-dropdown-model
6
- * 메뉴: [data-testid="model-picker-menu"]
7
- * 아이템: .composer-unified-context-menu-item
8
- * 모델명: .monaco-highlighted-label
9
- * Think 모드: codicon-br (brain) 아이콘
10
- * Auto 토글: rounded-full 24x14 요소
4
+ * model list extract:
5
+ * button: .composer-unified-dropdown-model
6
+ * : [data-testid="model-picker-menu"]
7
+ * : .composer-unified-context-menu-item
8
+ * model name: .monaco-highlighted-label
9
+ * Think mode: codicon-br (brain) icon
10
+ * Auto toggle: rounded-full 24x14 element
11
11
  *
12
12
  * → { models[], current }
13
13
  */
@@ -21,14 +21,14 @@
21
21
  current = modelBtn.textContent?.trim() || '';
22
22
  }
23
23
 
24
- // 드롭다운 열기
24
+ // Open dropdown
25
25
  if (modelBtn) {
26
26
  modelBtn.click();
27
27
  await new Promise(r => setTimeout(r, 500));
28
28
 
29
29
  const menu = document.querySelector('[data-testid="model-picker-menu"]');
30
30
  if (menu) {
31
- // Auto 토글 확인 끄기
31
+ // Auto toggle Check turn off
32
32
  const autoItem = menu.querySelector('.composer-unified-context-menu-item[data-is-selected="true"]');
33
33
  const autoToggle = autoItem ? [...autoItem.querySelectorAll('[class*="rounded-full"]')].find(el => el.offsetWidth === 24 && el.offsetHeight === 14) : null;
34
34
  let wasAutoOn = false;
@@ -41,7 +41,7 @@
41
41
  }
42
42
  }
43
43
 
44
- // 모델 목록 수집 (Auto 상태)
44
+ // Model list (Auto turned off state)
45
45
  const refreshedMenu = document.querySelector('[data-testid="model-picker-menu"]');
46
46
  if (refreshedMenu) {
47
47
  const items = refreshedMenu.querySelectorAll('.composer-unified-context-menu-item');
@@ -57,7 +57,7 @@
57
57
  }
58
58
  }
59
59
 
60
- // Auto 다시 켜기 (원래 상태 복원)
60
+ // Auto Turn on again (restore original state)
61
61
  if (wasAutoOn) {
62
62
  const newMenu = document.querySelector('[data-testid="model-picker-menu"]');
63
63
  const newAutoItem = newMenu?.querySelector('.composer-unified-context-menu-item');
@@ -69,7 +69,7 @@
69
69
  }
70
70
  }
71
71
 
72
- // 닫기 (Escape)
72
+ // close (Escape)
73
73
  document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
74
74
  }
75
75
 
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Cursor — list_modes
3
3
  *
4
- * 모드 드롭다운 목록 추출:
5
- * 버튼: .composer-unified-dropdown (model 아닌 것)
6
- * 메뉴: [data-testid="model-picker-menu"] 또는 .typeahead-popover
7
- * 아이템: .composer-unified-context-menu-item
4
+ * mode list extract:
5
+ * button: .composer-unified-dropdown (model )
6
+ * : [data-testid="model-picker-menu"] or .typeahead-popover
7
+ * : .composer-unified-context-menu-item
8
8
  *
9
9
  * → { modes[], current }
10
10
  */
@@ -32,7 +32,7 @@
32
32
  }
33
33
  }
34
34
 
35
- // 닫기
35
+ // close
36
36
  document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
37
37
 
38
38
  return JSON.stringify({ modes, current });
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Cursor — list_notifications
3
3
  *
4
- * VS Code 알림 토스트 목록:
4
+ * VS Code notification toast list:
5
5
  * .notifications-toasts .notification-toast
6
6
  * .notification-list-item
7
7
  *
8
- * params.filter: string|null — 메시지 필터
8
+ * params.filter: string|null — Message filter
9
9
  * → [{ index, message, severity, buttons }]
10
10
  */
11
11
  (params) => {