@adhdev/daemon-core 0.6.53 → 0.6.55

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 +76 -34
  2. package/dist/index.js +714 -271
  3. package/dist/index.js.map +1 -1
  4. package/package.json +1 -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 +267 -251
  148. package/src/cli-adapters/terminal-screen.ts +268 -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 +245 -35
  152. package/src/providers/acp-provider-instance.ts +1 -1
  153. package/src/providers/cli-provider-instance.ts +21 -8
  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,9 +1,9 @@
1
1
  /**
2
2
  * Windsurf v1 — list_sessions
3
3
  *
4
- * Cascade 세션 리스트를 가져옵니다.
5
- * 1. 상단 ([id^="cascade-tab-"])
6
- * 2. 히스토리 패널 ([data-kb-navigate="true"])
4
+ * Cascade session get list.
5
+ * 1. top tabs ([id^="cascade-tab-"])
6
+ * 2. history panel ([data-kb-navigate="true"])
7
7
  */
8
8
  (async () => {
9
9
  try {
@@ -20,7 +20,7 @@
20
20
  const seenIds = new Set();
21
21
  const seenTitles = new Set();
22
22
 
23
- // 1. 상단
23
+ // 1. top tabs
24
24
  const tabs = Array.from(document.querySelectorAll('[id^="cascade-tab-"]')).filter(isVisible);
25
25
  for (const tab of tabs) {
26
26
  const fullId = tab.id || '';
@@ -28,7 +28,7 @@
28
28
  const title = normalize(tab.textContent);
29
29
  if (!title || title === 'New Cascade') continue;
30
30
 
31
- // 활성 상태 확인: 특정 클래스 or 내부 요소의 클래스 or ARIA 속성
31
+ // Check active status: specific class or internal element class or ARIA attribute
32
32
  const isActive = tab.classList.contains('bg-ide-tab-active-background-color') ||
33
33
  !!tab.querySelector('.bg-ide-tab-active-background-color') ||
34
34
  tab.getAttribute('aria-selected') === 'true';
@@ -43,7 +43,7 @@
43
43
  });
44
44
  }
45
45
 
46
- // 2. 히스토리 패널
46
+ // 2. history panel
47
47
  const historyButton = Array.from(cascade.querySelectorAll('button')).find(el => isVisible(el) && /lucide-history/.test(el.innerHTML || ''));
48
48
  const existingPanel = Array.from(cascade.querySelectorAll('div')).find(el => isVisible(el) && (String(el.className || '').includes('group/panel') || el.hasAttribute('data-kb-navigate')));
49
49
  const wasOpen = !!existingPanel;
@@ -1,18 +1,18 @@
1
1
  /**
2
2
  * Windsurf v1 — new_session
3
3
  *
4
- * Cascade 세션을 시작합니다.
4
+ * new Cascade session start.
5
5
  *
6
- * 전략:
7
- * 1. aria-label 기반 "New" 버튼 탐색
8
- * 2. 텍스트 기반 버튼 탐색
9
- * 3. Codicon 아이콘(+) 기반 탐색
10
- * 4. Cmd+L 단축키 폴백 (Windsurf에서 Cascade 열기)
6
+ * strategy:
7
+ * 1. Search for "New" button based on aria-label
8
+ * 2. text-based button search
9
+ * 3. Codicon icon(+) based search
10
+ * 4. Cmd+L shortcut fallback (Windsurffrom new Cascade open)
11
11
  *
12
- * Windsurf에서는 Cascade가 AI 채팅 패널이며,
13
- * "New Chat" 또는 "+" 버튼으로 세션을 시작합니다.
12
+ * Windsurffrom Cascadeis an AI chat panel,
13
+ * "New Chat" or "+" starts New session via button.
14
14
  *
15
- * 최종 확인: Windsurf 1.108.x (2026-03-10)
15
+ * final Check: Windsurf 1.108.x (2026-03-10)
16
16
  */
17
17
  (async () => {
18
18
  try {
@@ -1,14 +1,14 @@
1
1
  /**
2
2
  * Windsurf v1 — open_panel
3
3
  *
4
- * Cascade(AI 채팅) 패널이 닫혀 있을 열기.
4
+ * Cascade(AI chat) If panel is closed when present open.
5
5
  *
6
- * Windsurf의 Cascade 패널은 Secondary Side Bar (#workbench.parts.auxiliarybar) 위치.
7
- * 닫혀 있으면 offsetWidth === 0.
8
- * Cmd+L 단축키로 있음 (WINDSURF.md §2.5).
6
+ * WindsurfCascade panel of is Secondary Side Bar (#workbench.parts.auxiliarybar)located at.
7
+ * closed offsetWidth === 0.
8
+ * Cmd+L via shortcut can be opened (WINDSURF.md §2.5).
9
9
  *
10
- * 반환: 'visible' | 'opened' | 'error: ...'
11
- * 최종 확인: Windsurf 1.108.x (2026-03-10)
10
+ * Return: 'visible' | 'opened' | 'error: ...'
11
+ * final Check: Windsurf 1.108.x (2026-03-10)
12
12
  */
13
13
  (async () => {
14
14
  try {
@@ -1,24 +1,24 @@
1
1
  /**
2
2
  * Windsurf v1 — resolve_action
3
3
  *
4
- * Cascade 패널 내의 승인/거절 버튼을 찾아 좌표를 반환합니다.
4
+ * Cascade panel approval/ button Return.
5
5
  */
6
6
  (async (params) => {
7
7
  try {
8
8
  const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms));
9
9
  const normalize = (text) => (text || '').replace(/\s+/g, ' ').trim().toLowerCase();
10
10
 
11
- // 검색할 핵심 단어
11
+ //
12
12
  const want = normalize(params?.buttonText || params?.button || params?.action || 'run');
13
13
 
14
14
  const isMatch = (text) => {
15
15
  const t = normalize(text);
16
16
  if (!t) return false;
17
- // 긍정 액션 (Run / Accept)
17
+ // Positive action (Run / Accept)
18
18
  if (want === 'run' || want === 'approve' || want === 'accept') {
19
19
  return /run|allow|approve|accept|apply|ok|yes|proceed|continue|keep/i.test(t);
20
20
  }
21
- // 부정 액션 (Skip / Reject)
21
+ // Negative action (Skip / Reject)
22
22
  if (want === 'skip' || want === 'reject' || want === 'deny') {
23
23
  return /skip|deny|reject|cancel|no|discard/i.test(t);
24
24
  }
@@ -34,11 +34,11 @@
34
34
 
35
35
  const cascade = document.querySelector('#windsurf\\.cascadePanel') || document.querySelector('.chat-client-root') || document;
36
36
 
37
- // 모든 버튼 수집
37
+ // button
38
38
  const buttons = Array.from(cascade.querySelectorAll('button, [role="button"], .monaco-button'))
39
39
  .filter(el => isVisible(el) && !el.disabled && !el.classList.contains('disabled'));
40
40
 
41
- // 가장 아래(최신) 있는 버튼 우선
41
+ // (latest) with button first
42
42
  const target = buttons.reverse().find(el => {
43
43
  const label = el.innerText || el.textContent || el.getAttribute('aria-label') || '';
44
44
  return isMatch(label);
@@ -48,7 +48,7 @@
48
48
  target.focus?.();
49
49
  const rect = target.getBoundingClientRect();
50
50
 
51
- // Synthetic click (DOM 수준)
51
+ // Synthetic click (DOM level)
52
52
  try {
53
53
  const init = { bubbles: true, cancelable: true, view: window, buttons: 1 };
54
54
  target.dispatchEvent(new MouseEvent('mousedown', init));
@@ -64,7 +64,7 @@
64
64
  });
65
65
  }
66
66
 
67
- // 버튼 상호작용 실패 Enter 시도 (긍정 액션인 경우)
67
+ // button On failure Enter ( when)
68
68
  if (want === 'run' || want === 'approve' || want === 'accept') {
69
69
  const cmdEnter = (type) => document.dispatchEvent(new KeyboardEvent(type, { key: 'Enter', code: 'Enter', keyCode: 13, which: 13, metaKey: true, bubbles: true, cancelable: true }));
70
70
  cmdEnter('keydown');
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Windsurf v1 — switch_session
3
3
  *
4
- * Cascade 세션(대화) 탭을 전환합니다.
5
- * 1. 상단 ([id^="cascade-tab-"])
6
- * 2. 히스토리 패널 ([data-kb-navigate="true"])
4
+ * Cascade session(conversation) .
5
+ * 1. top tabs ([id^="cascade-tab-"])
6
+ * 2. history panel ([data-kb-navigate="true"])
7
7
  */
8
8
  (async (params) => {
9
9
  try {
@@ -31,18 +31,18 @@
31
31
 
32
32
  let target = null;
33
33
 
34
- // 1. ID 찾기 (상단 우선)
34
+ // 1. ID search (top tabs first)
35
35
  if (id) {
36
36
  target = document.getElementById(`cascade-tab-${id}`) || document.getElementById(id);
37
37
  }
38
38
 
39
- // 2. 상단 탭에서 타이틀로 찾기
39
+ // 2. top tabsfrom title search
40
40
  if (!target && title) {
41
41
  const tabs = Array.from(document.querySelectorAll('[id^="cascade-tab-"]'));
42
42
  target = tabs.find(tab => normalize(tab.textContent).includes(title));
43
43
  }
44
44
 
45
- // 3. 히스토리 패널에서 찾기
45
+ // 3. history panelfrom search
46
46
  if (!target) {
47
47
  const cascade = document.querySelector('#windsurf\\.cascadePanel') || document.querySelector('.chat-client-root');
48
48
  if (cascade) {
@@ -63,7 +63,7 @@
63
63
  }
64
64
 
65
65
  if (!target) {
66
- // 히스토리 패널 닫기
66
+ // Close history panel
67
67
  document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', code: 'Escape', keyCode: 27, which: 27, bubbles: true, cancelable: true }));
68
68
  return JSON.stringify({ switched: false, error: 'Session not found among visible tabs or history rows' });
69
69
  }
@@ -71,7 +71,7 @@
71
71
  const coords = clickSequence(target.querySelector('.cursor-pointer') || target);
72
72
  await wait(200);
73
73
 
74
- // 히스토리 패널 닫기 (만약 열렸다면)
74
+ // Close history panel ( )
75
75
  document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', code: 'Escape', keyCode: 27, which: 27, bubbles: true, cancelable: true }));
76
76
 
77
77
  return JSON.stringify({ switched: true, coords });
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * Windsurf v1 — focus_editor
3
3
  *
4
- * Cascade(채팅) 입력창에 포커스를 맞춥니다.
5
- * Windsurf VS Code 포크로, 채팅 UI "Cascade"라고 부릅니다.
4
+ * Cascade(chat) focus on input field.
5
+ * Windsurf VS Code fork, chat UI "Cascade"is called.
6
6
  *
7
- * DOM 구조:
7
+ * DOM structure:
8
8
  * #windsurf.cascadePanel → .chat-client-root
9
- * 입력: [contenteditable="true"][role="textbox"]
10
- * 또는 textarea (미로그인)
9
+ * input: [contenteditable="true"][role="textbox"]
10
+ * or textarea ()
11
11
  *
12
- * 최종 확인: Windsurf (2026-03-06)
12
+ * final Check: Windsurf (2026-03-06)
13
13
  */
14
14
  (() => {
15
15
  try {
@@ -1,18 +1,18 @@
1
1
  /**
2
2
  * Windsurf v1 — list_chats
3
3
  *
4
- * Cascade 목록을 가져옵니다.
5
- * 패널이 닫혀 있으면 먼저 열고 탭이 렌더링될 때까지 대기합니다.
6
- * cascade-tab-{uuid} 요소들의 React Fiber에서 제목을 추출합니다.
4
+ * Cascade get tab list.
5
+ * If panel is closed open first and wait until tab is rendered.
6
+ * cascade-tab-{uuid} element React Fiberfrom title extract.
7
7
  *
8
- * 최종 확인: Windsurf 1.108.x (2026-03-10)
8
+ * final Check: Windsurf 1.108.x (2026-03-10)
9
9
  */
10
10
  (async () => {
11
11
  try {
12
- // ─── 1. 패널이 닫혀 있으면 열기 ───
12
+ // ─── 1. If panel is closed open ───
13
13
  let tabs = document.querySelectorAll('[id^="cascade-tab-"]');
14
14
  if (tabs.length === 0) {
15
- // Cascade 패널 보이는지 확인
15
+ // Check if Cascade panel is visible Check
16
16
  const cascade = document.querySelector('#windsurf\\.cascadePanel') ||
17
17
  document.querySelector('.chat-client-root');
18
18
  const sidebar = document.getElementById('workbench.parts.auxiliarybar');
@@ -20,7 +20,7 @@
20
20
  (sidebar && sidebar.offsetWidth > 0 && cascade);
21
21
 
22
22
  if (!panelVisible) {
23
- // Toggle 버튼 클릭 시도
23
+ // Attempt to click toggle button
24
24
  const toggleBtns = Array.from(document.querySelectorAll('li.action-item a, button, [role="button"]'));
25
25
  let toggled = false;
26
26
  for (const btn of toggleBtns) {
@@ -34,7 +34,7 @@
34
34
  }
35
35
  }
36
36
  }
37
- // 버튼 없으면 Cmd+L
37
+ // button Cmd+L
38
38
  if (!toggled) {
39
39
  document.dispatchEvent(new KeyboardEvent('keydown', {
40
40
  key: 'l', code: 'KeyL', keyCode: 76,
@@ -48,7 +48,7 @@
48
48
  }));
49
49
  }
50
50
 
51
- // 패널 렌더링 대기 (최대 3)
51
+ // Wait for panel render (max 3 seconds)
52
52
  for (let i = 0; i < 30; i++) {
53
53
  await new Promise(r => setTimeout(r, 100));
54
54
  tabs = document.querySelectorAll('[id^="cascade-tab-"]');
@@ -57,7 +57,7 @@
57
57
  }
58
58
  }
59
59
 
60
- // ─── 2. 탭 정보 수집 ───
60
+ // ─── 2. ───
61
61
  tabs = document.querySelectorAll('[id^="cascade-tab-"]');
62
62
  if (tabs.length === 0) return [];
63
63
 
@@ -73,7 +73,7 @@
73
73
  let cascadeId = tabId;
74
74
  let status = 'completed';
75
75
 
76
- // React Fiber에서 제목 추출
76
+ // Extract title from React Fiber
77
77
  const fk = Object.keys(tab).find(k => k.startsWith('__reactFiber'));
78
78
  if (fk) {
79
79
  let fiber = tab[fk];
@@ -95,7 +95,7 @@
95
95
  }
96
96
  }
97
97
 
98
- // DOM 폴백
98
+ // DOM fallback
99
99
  if (!title) {
100
100
  title = tab.textContent?.trim().substring(0, 100) || ('Chat ' + (result.length + 1));
101
101
  }
@@ -1,22 +1,22 @@
1
1
  /**
2
2
  * Windsurf v1 — new_session
3
3
  *
4
- * Cascade 세션을 시작합니다.
4
+ * new Cascade session start.
5
5
  *
6
- * 전략:
7
- * 1. aria-label 기반 "New" 버튼 탐색
8
- * 2. 텍스트 기반 버튼 탐색
9
- * 3. Codicon 아이콘(+) 기반 탐색
10
- * 4. Cmd+L 단축키 폴백 (Windsurf에서 Cascade 열기)
6
+ * strategy:
7
+ * 1. Search for "New" button based on aria-label
8
+ * 2. text-based button search
9
+ * 3. Codicon icon(+) based search
10
+ * 4. Cmd+L shortcut fallback (Windsurffrom new Cascade open)
11
11
  *
12
- * Windsurf에서는 Cascade가 AI 채팅 패널이며,
13
- * "New Chat" 또는 "+" 버튼으로 세션을 시작합니다.
12
+ * Windsurffrom Cascadeis an AI chat panel,
13
+ * "New Chat" or "+" starts New session via button.
14
14
  *
15
- * 최종 확인: Windsurf 1.108.x (2026-03-10)
15
+ * final Check: Windsurf 1.108.x (2026-03-10)
16
16
  */
17
17
  (() => {
18
18
  try {
19
- // ─── 1. aria-label 기반 ───
19
+ // ─── 1. Based on aria-label ───
20
20
  const allBtns = Array.from(document.querySelectorAll('button, [role="button"], .action-item'))
21
21
  .filter(b => b.offsetWidth > 0);
22
22
 
@@ -30,7 +30,7 @@
30
30
  }
31
31
  }
32
32
 
33
- // ─── 2. 텍스트 기반 ───
33
+ // ─── 2. text-based ───
34
34
  for (const btn of allBtns) {
35
35
  const text = (btn.textContent || '').trim();
36
36
  if (text === '+' || text === 'New Chat' || text === 'New Cascade' ||
@@ -40,12 +40,12 @@
40
40
  }
41
41
  }
42
42
 
43
- // ─── 3. Codicon 아이콘(+) 기반 ───
43
+ // ─── 3. Codicon icon(+) based ───
44
44
  for (const btn of allBtns) {
45
45
  const hasPlus = btn.querySelector('.codicon-plus, .codicon-add, [class*="plus"]');
46
46
  if (hasPlus) {
47
47
  const label = (btn.getAttribute('aria-label') || btn.getAttribute('title') || '').toLowerCase();
48
- // Cascade 관련 컨텍스트이거나 라벨이 비어있으면 세션 버튼일 가능성
48
+ // Cascade-related context or empty label New session button
49
49
  if (label.includes('chat') || label.includes('cascade') ||
50
50
  label.includes('new') || label === '') {
51
51
  btn.click();
@@ -54,8 +54,8 @@
54
54
  }
55
55
  }
56
56
 
57
- // ─── 4. Cmd+L 단축키 (macOS: metaKey, Windows/Linux: ctrlKey) ───
58
- // Windsurf에서 Cmd+L은 Cascade 패널 토글/새 세션 생성
57
+ // ─── 4. Cmd+L (macOS: metaKey, Windows/Linux: ctrlKey) ───
58
+ // Windsurffrom Cmd+Lis Cascade Toggle panel/New session create
59
59
  document.dispatchEvent(new KeyboardEvent('keydown', {
60
60
  key: 'l', code: 'KeyL', keyCode: 76,
61
61
  metaKey: true, ctrlKey: false,
@@ -1,23 +1,23 @@
1
1
  /**
2
2
  * Windsurf v1 — open_panel
3
3
  *
4
- * Cascade(AI 채팅) 패널이 닫혀 있을 열기.
4
+ * Cascade(AI chat) If panel is closed when present open.
5
5
  *
6
- * Windsurf의 Cascade 패널은 Secondary Side Bar (#workbench.parts.auxiliarybar) 위치.
7
- * 닫혀 있으면 offsetWidth === 0.
8
- * Cmd+L 단축키로 있음 (WINDSURF.md §2.5).
6
+ * WindsurfCascade panel of is Secondary Side Bar (#workbench.parts.auxiliarybar)located at.
7
+ * closed offsetWidth === 0.
8
+ * Cmd+L via shortcut can be opened (WINDSURF.md §2.5).
9
9
  *
10
- * 반환: 'visible' | 'opened' | 'error: ...'
11
- * 최종 확인: Windsurf 1.108.x (2026-03-10)
10
+ * Return: 'visible' | 'opened' | 'error: ...'
11
+ * final Check: Windsurf 1.108.x (2026-03-10)
12
12
  */
13
13
  (() => {
14
14
  try {
15
- // ─── 1. Cascade 패널이 이미 열려 있는지 확인 ───
15
+ // ─── 1. Check if Cascade panel is already open ───
16
16
  const cascade = document.querySelector('#windsurf\\.cascadePanel') ||
17
17
  document.querySelector('.chat-client-root');
18
18
  const sidebar = document.getElementById('workbench.parts.auxiliarybar');
19
19
 
20
- // 패널이 존재하고 보이면 이미 열린 상태
20
+ // panelexists and visible means already open
21
21
  if (cascade && cascade.offsetWidth > 0 && cascade.offsetHeight > 0) {
22
22
  return 'visible';
23
23
  }
@@ -25,7 +25,7 @@
25
25
  return 'visible';
26
26
  }
27
27
 
28
- // ─── 2. Toggle 버튼 클릭 시도 ───
28
+ // ─── 2. Attempt to click toggle button ───
29
29
  const toggleBtns = Array.from(document.querySelectorAll('li.action-item a, button, [role="button"]'));
30
30
  for (const btn of toggleBtns) {
31
31
  const label = (btn.getAttribute('aria-label') || '').toLowerCase();
@@ -38,7 +38,7 @@
38
38
  }
39
39
  }
40
40
 
41
- // ─── 3. Cmd+L 단축키 폴백 (Windsurf 공식 단축키) ───
41
+ // ─── 3. Cmd+L shortcut fallback (Windsurf official shortcut) ───
42
42
  // keyCode: 76, modifiers: 4 (Meta/Cmd)
43
43
  document.dispatchEvent(new KeyboardEvent('keydown', {
44
44
  key: 'l', code: 'KeyL', keyCode: 76,
@@ -1,40 +1,40 @@
1
1
  /**
2
2
  * Windsurf v1 — read_chat (v1 — Cascade DOM + Fiber)
3
3
  *
4
- * Windsurf VS Code 포크, 채팅 UI "Cascade"라고 부릅니다.
4
+ * Windsurf VS Code fork, chat UI is "Cascade"is called.
5
5
  *
6
- * DOM 구조:
6
+ * DOM structure:
7
7
  * #windsurf.cascadePanel → .chat-client-root
8
- * 스크롤: .cascade-scrollbar
9
- * 메시지 리스트: .cascade-scrollbar .pb-20 > .flex.flex-col > .flex.flex-col.gap-2\.5
10
- * 사용자 메시지: hasProse=false, hasWhitespace=true
11
- * AI 메시지: [class*="prose"] (prose-sm)
12
- * 피드백 UI: .mark-js-ignore (무시)
13
- * 입력: [data-lexical-editor="true"]
8
+ * scroll: .cascade-scrollbar
9
+ * list: .cascade-scrollbar .pb-20 > .flex.flex-col > .flex.flex-col.gap-2\.5
10
+ * use : hasProse=false, hasWhitespace=true
11
+ * AI : [class*="prose"] (prose-sm)
12
+ * UI: .mark-js-ignore (ignore)
13
+ * input: [data-lexical-editor="true"]
14
14
  *
15
15
  * Fiber props:
16
- * cascadeId: 세션 ID
17
- * isRunning: 생성 중 여부
18
- * hasPendingTerminalCommand: 승인 대기
19
- * copyableText: AI 응답 마크다운 원본
16
+ * cascadeId: session ID
17
+ * isRunning: create status
18
+ * hasPendingTerminalCommand: approval wait
19
+ * copyableText: AI response source
20
20
  *
21
- * 최종 확인: Windsurf (2026-03-06)
21
+ * final Check: Windsurf (2026-03-06)
22
22
  */
23
23
  (() => {
24
24
  try {
25
- // ─── 1. 컨테이너 ───
25
+ // ─── 1. Container ───
26
26
  const cascade = document.querySelector('#windsurf\\.cascadePanel')
27
27
  || document.querySelector('.chat-client-root');
28
28
  if (!cascade) {
29
29
  return { id: 'no_cascade', status: 'idle', title: 'No Cascade', messages: [], inputContent: '', activeModal: null };
30
30
  }
31
31
 
32
- // ─── 2. Fiber에서 cascadeId, isRunning 추출 ( 요소에서 탐색) ───
32
+ // ─── 2. Extract cascadeId, isRunning from Fiber (search from turn elements) ───
33
33
  let cascadeId = 'cascade';
34
34
  let isRunning = false;
35
35
  let hasPendingCmd = false;
36
36
  try {
37
- // 요소에서 Fiber 탐색 (cascadePanel 루트보다 깊이 6에서 cascadeId 발견)
37
+ // Search Fiber from turn elements (cascadeId found at depth 6 from cascadePanel root)
38
38
  const scrollArea = cascade.querySelector('.cascade-scrollbar');
39
39
  const gapEls = scrollArea ? scrollArea.querySelectorAll('[class*="gap-2"]') : [];
40
40
  let firstTurn = null;
@@ -57,11 +57,11 @@
57
57
  }
58
58
  } catch (_) { }
59
59
 
60
- // ─── 3. 상태 감지 ───
60
+ // ─── 3. status detection ───
61
61
  let status = 'idle';
62
62
  if (isRunning) status = 'generating';
63
63
 
64
- // Signal A: Stop 버튼
64
+ // Signal A: Stop button
65
65
  if (status === 'idle') {
66
66
  const allBtns = Array.from(document.querySelectorAll('button'));
67
67
  const stopBtn = allBtns.find(b => {
@@ -74,7 +74,7 @@
74
74
  if (stopBtn) status = 'generating';
75
75
  }
76
76
 
77
- // Signal B: 입력창 placeholder
77
+ // Signal B: input field placeholder
78
78
  if (status === 'idle') {
79
79
  const editor = cascade.querySelector('[data-lexical-editor="true"]');
80
80
  if (editor) {
@@ -86,7 +86,7 @@
86
86
  const titleParts = document.title.split(' \u2014 ');
87
87
  const title = (titleParts.length >= 2 ? titleParts[titleParts.length - 1] : titleParts[0] || '').trim() || 'Cascade';
88
88
 
89
- // ─── 4. HTML → Markdown 변환기 ───
89
+ // ─── 4. HTML → Markdown converter ───
90
90
  const BLOCK_TAGS = new Set(['DIV', 'P', 'BR', 'LI', 'TR', 'SECTION', 'ARTICLE', 'HEADER', 'FOOTER']);
91
91
  function extractCodeText(node) {
92
92
  if (node.nodeType === 3) return node.textContent || '';
@@ -171,7 +171,7 @@
171
171
  return md;
172
172
  }
173
173
 
174
- // ─── 5. 메시지 수집 ───
174
+ // ─── 5. Collect messages ───
175
175
  const collected = [];
176
176
  const seenHashes = new Set();
177
177
 
@@ -180,7 +180,7 @@
180
180
  return { id: cascadeId, status, title, messages: [], inputContent: '', activeModal: null };
181
181
  }
182
182
 
183
- // 메시지 리스트 컨테이너 찾기: .gap-2.5 자식 2 이상
183
+ // list Container search: .gap-2.5 with 2+ children
184
184
  let msgContainer = null;
185
185
  const gapEls = scrollArea.querySelectorAll('[class*="gap-2"]');
186
186
  for (const el of gapEls) {
@@ -192,17 +192,17 @@
192
192
  if (msgContainer) {
193
193
  const turns = Array.from(msgContainer.children);
194
194
  for (const turn of turns) {
195
- // .mark-js-ignore = 피드백 UI → 무시
195
+ // .mark-js-ignore = feedback UI → skip
196
196
  if ((turn.className || '').includes('mark-js-ignore')) continue;
197
197
  if (turn.offsetHeight < 10) continue;
198
198
 
199
- // 역할 판별: .prose = AI, 아니면 user
199
+ // Determine role: .prose = AI, otherwise user
200
200
  const proseEl = turn.querySelector('[class*="prose"]');
201
201
  const role = proseEl ? 'assistant' : 'user';
202
202
 
203
203
  let text = '';
204
204
  if (role === 'assistant') {
205
- // AI: Fiber copyableText 있으면 사용 (이미 마크다운!)
205
+ // AI: Fiber copyableText use ( !)
206
206
  try {
207
207
  const fk = Object.keys(turn).find(k => k.startsWith('__reactFiber'));
208
208
  if (fk) {
@@ -218,13 +218,13 @@
218
218
  }
219
219
  } catch (_) { }
220
220
 
221
- // Fiber 없으면 HTML→Markdown
221
+ // In Fiber HTML→Markdown
222
222
  if (!text) {
223
223
  const mdRoot = proseEl || turn;
224
224
  text = getCleanMd(mdRoot);
225
225
  }
226
226
  } else {
227
- // 사용자: whitespace-pre-wrap 요소에서 텍스트 추출
227
+ // User: whitespace-pre-wrap elementfrom text extract
228
228
  const whitespace = turn.querySelector('[class*="whitespace"]');
229
229
  text = (whitespace || turn).innerText?.trim() || '';
230
230
  }
@@ -238,7 +238,7 @@
238
238
  }
239
239
  }
240
240
 
241
- // DOM 순서 정렬
241
+ // DOM Order sorting
242
242
  collected.sort((a, b) => {
243
243
  const pos = a.el.compareDocumentPosition(b.el);
244
244
  if (pos & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
@@ -246,7 +246,7 @@
246
246
  return 0;
247
247
  });
248
248
 
249
- // 최신 30개만
249
+ // latest 30only
250
250
  const trimmed = collected.length > 30 ? collected.slice(-30) : collected;
251
251
 
252
252
  const final = trimmed.map((m, i) => ({
@@ -257,13 +257,13 @@
257
257
  kind: 'standard'
258
258
  }));
259
259
 
260
- // ─── 6. 입력창 ───
260
+ // ─── 6. input field ───
261
261
  const editor = cascade.querySelector('[data-lexical-editor="true"]')
262
262
  || cascade.querySelector('[contenteditable="true"][role="textbox"]')
263
263
  || cascade.querySelector('textarea:not(.xterm-helper-textarea)');
264
264
  const inputContent = editor ? (editor.innerText || editor.value || '').trim() : '';
265
265
 
266
- // ─── 7. 모달/승인 감지 ───
266
+ // ─── 7. modal/approval detect ───
267
267
  let activeModal = null;
268
268
  try {
269
269
  // Fiber: hasPendingTerminalCommand
@@ -277,7 +277,7 @@
277
277
  activeModal = { message: 'Terminal command pending', buttons: btnTexts.length > 0 ? btnTexts : ['Run', 'Reject'] };
278
278
  }
279
279
 
280
- // Dialog 폴백
280
+ // Dialog fallback
281
281
  if (!activeModal) {
282
282
  const dialog = document.querySelector('.monaco-dialog-box, [role="dialog"]');
283
283
  if (dialog && dialog.offsetWidth > 80) {
@@ -290,7 +290,7 @@
290
290
  }
291
291
  }
292
292
 
293
- // 인라인 승인 버튼
293
+ // Inline approval buttons
294
294
  if (!activeModal) {
295
295
  const allBtns = Array.from(document.querySelectorAll('button')).filter(b => b.offsetWidth > 0);
296
296
  const approvalBtns = allBtns.filter(b => {