@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,11 +1,11 @@
1
1
  /**
2
2
  * Cursor — list_sessions
3
3
  *
4
- * 사이드바 목록에서 세션 파싱:
5
- * 셀: .agent-sidebar-cell
6
- * 제목: .agent-sidebar-cell-text
7
- * 선택 상태: data-selected="true"
8
- * 활성 ID: [data-composer-id]에서 추출
4
+ * Parse sessions from sidebar cell list:
5
+ * Cell: .agent-sidebar-cell
6
+ * Title: .agent-sidebar-cell-text
7
+ * Selection state: data-selected="true"
8
+ * Active ID: [data-composer-id]extracted from
9
9
  *
10
10
  * → { sessions: [{ id, title, active, index }] }
11
11
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Cursor — new_session
3
3
  *
4
- * 채팅/컴포저 버튼 클릭:
4
+ * New chat/ button click:
5
5
  * a.action-label.codicon-add-two
6
6
  * [aria-label*="New Chat"]
7
7
  * [aria-label*="New Composer"]
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Cursor — open_panel
3
3
  *
4
- * 채팅/컴포저 패널 열기:
5
- * 1. 이미 보이면 'visible' 반환
6
- * 2. Agent/Chat/Composer 탭 찾아서 클릭
4
+ * chat/ panel open:
5
+ * 1. If already visible 'visible' Return
6
+ * 2. Find and click Agent/Chat/Composer tab
7
7
  */
8
8
  (() => {
9
9
  try {
@@ -1,16 +1,16 @@
1
1
  /**
2
2
  * Cursor — read_chat (v2 — thoughts, tools, terminal, DOM-ordered)
3
3
  *
4
- * DOM 구조 (v0.49):
5
- * 컴포저: [data-composer-id] + [data-composer-status]
6
- * 메시지 쌍: .composer-human-ai-pair-container
7
- * 사용자: .composer-human-message
8
- * AI 텍스트: .composer-rendered-message (assistant content)
9
- * 사고: .ui-step-group-collapsible → header "Thought briefly"
10
- * 도구: .composer-tool-former-message (file edits, reads)
11
- * 코드블록: .composer-code-block-container (terminal commands)
4
+ * DOM structure (v0.49):
5
+ * Composer: [data-composer-id] + [data-composer-status]
6
+ * Message pair: .composer-human-ai-pair-container
7
+ * User: .composer-human-message
8
+ * AI text: .composer-rendered-message (assistant content)
9
+ * Thinking: .ui-step-group-collapsible → header "Thought briefly"
10
+ * Tool: .composer-tool-former-message (file edits, reads)
11
+ * Code block: .composer-code-block-container (terminal commands)
12
12
  * Diff: .composer-diff-block (code changes)
13
- * 승인: .run-command-review-active + button/cursor-pointer 요소
13
+ * Approval: .run-command-review-active + button/cursor-pointer elements
14
14
  *
15
15
  * → { id, status, title, messages[], inputContent, activeModal }
16
16
  */
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Cursor — resolve_action
3
3
  *
4
- * 승인/거부 버튼 찾기 + 클릭:
5
- * button, [role="button"], .cursor-pointer 텍스트 매칭
6
- * Cursor 단축키 라벨을 붙임 (e.g. "Run⏎", "SkipEsc") → ⏎↵ 제거 비교
4
+ * approval/ button search + click:
5
+ * button, [role="button"], .cursor-pointer text matching
6
+ * Cursor (e.g. "Run⏎", "SkipEsc") → ⏎↵ remove then compare
7
7
  *
8
- * params.buttonText: string — 찾을 버튼 텍스트
8
+ * params.buttonText: string — to find button text
9
9
  * → { resolved: true/false, clicked?, available? }
10
10
  */
11
11
  (params) => {
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Cursor — send_message
3
3
  *
4
- * Cursor cdp-type-and-send 방식:
5
- * 1. 입력 필드 존재 확인
6
- * 2. needsTypeAndSend: true 반환 → daemon CDP로 타이핑 + Enter 처리
4
+ * Cursor uses cdp-type-and-send approach:
5
+ * 1. Verify input field exists
6
+ * 2. Returns needsTypeAndSend: true → daemon handles typing + Enter via CDP
7
7
  *
8
- * 입력 셀렉터: .aislash-editor-input[contenteditable="true"]
9
- * 파라미터: ${ MESSAGE } (사용되지 않음 — daemon 직접 타이핑)
8
+ * Input selector: .aislash-editor-input[contenteditable="true"]
9
+ * Parameter: ${ MESSAGE } (Not used — daemon handles typing directly)
10
10
  */
11
11
  (() => {
12
12
  try {
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Cursor — set_mode
3
3
  *
4
- * 모드 드롭다운에서 대상 모드 선택:
5
- * 1. 드롭다운 열기
6
- * 2. 매칭 아이템 클릭
4
+ * Select target mode from mode dropdown:
5
+ * 1. Open dropdown
6
+ * 2. Click matching item
7
7
  *
8
- * params.mode: string — 모드 이름
8
+ * params.mode: string — Mode name
9
9
  * → { success: true/false, mode? }
10
10
  */
11
11
  async (params) => {
@@ -1,14 +1,14 @@
1
1
  /**
2
2
  * Cursor — set_model
3
3
  *
4
- * 모델 드롭다운에서 대상 모델 선택:
5
- * 1. 드롭다운 열기
6
- * 2. Auto 토글 끄기 (필요 )
7
- * 3. 검색 입력으로 필터
8
- * 4. 매칭 아이템 클릭
9
- * 5. 원래 Auto 상태 복원
4
+ * Select target model from model dropdown:
5
+ * 1. Open dropdown
6
+ * 2. Turn off Auto toggle (if needed)
7
+ * 3. Filter via search input
8
+ * 4. Click matching item
9
+ * 5. Restore original Auto state
10
10
  *
11
- * params.model: string — 모델 이름 (🧠 접미사 가능)
11
+ * params.model: string — Model name (🧠 may have suffix)
12
12
  * → { success: true/false, model? }
13
13
  */
14
14
  async (params) => {
@@ -24,11 +24,11 @@ async (params) => {
24
24
  const menu = document.querySelector('[data-testid="model-picker-menu"]');
25
25
  if (!menu) return JSON.stringify({ success: false, error: 'Model picker menu not found' });
26
26
 
27
- // 🧠 접미사 처리
27
+ // 🧠 Handle suffix
28
28
  const wantBrain = target.includes('🧠');
29
29
  const searchName = target.replace(/\s*🧠\s*$/, '').trim();
30
30
 
31
- // Auto 토글 끄기
31
+ // Auto toggle 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 @@ async (params) => {
41
41
  }
42
42
  }
43
43
 
44
- // 검색 입력으로 필터링
44
+ // Filter via search input
45
45
  const refreshedMenu = document.querySelector('[data-testid="model-picker-menu"]');
46
46
  const searchInput = refreshedMenu?.querySelector('input[placeholder="Search models"]');
47
47
  if (searchInput) {
@@ -51,7 +51,7 @@ async (params) => {
51
51
  await new Promise(r => setTimeout(r, 300));
52
52
  }
53
53
 
54
- // 아이템에서 찾기
54
+ // from search
55
55
  const items = (refreshedMenu || menu).querySelectorAll('.composer-unified-context-menu-item');
56
56
  for (const item of items) {
57
57
  const nameEl = item.querySelector('.monaco-highlighted-label');
@@ -67,7 +67,7 @@ async (params) => {
67
67
  }
68
68
  }
69
69
 
70
- // Auto 복원 + 닫기
70
+ // Auto + close
71
71
  if (wasAutoOn) {
72
72
  const nm = document.querySelector('[data-testid="model-picker-menu"]');
73
73
  const nai = nm?.querySelector('.composer-unified-context-menu-item');
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Cursor — switch_session
3
3
  *
4
- * 사이드바 클릭으로 세션 전환:
5
- * 제목 매칭 (params.title) 또는 인덱스 (params.index)
4
+ * by clicking Switch session:
5
+ * title matching (params.title) or index (params.index)
6
6
  *
7
7
  * params.index: number, params.title: string|null
8
8
  * → { switched: true/false, title?, error? }
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * Cursor v1 — focus_editor
3
3
  *
4
- * CURSOR.md 4-5: 셀렉터 우선순위
4
+ * CURSOR.md 4-5: Selector priority
5
5
  * [contenteditable="true"][role="textbox"]
6
6
  * → .chat-input textarea
7
7
  * → .composer-input
8
8
  * → textarea
9
9
  *
10
- * 최종 확인: 2026-03-06
10
+ * final Check: 2026-03-06
11
11
  */
12
12
  (() => {
13
13
  const editor = document.querySelector('[contenteditable="true"][role="textbox"]')
@@ -1,21 +1,21 @@
1
1
  /**
2
2
  * Kiro — open_panel
3
3
  *
4
- * Kiro AI 채팅 패널 열기.
5
- * Secondary Side Bar (#workbench.parts.auxiliarybar) 위치.
6
- * "Toggle Secondary Side Bar (⌥⌘B)" 또는 "Kiro" 버튼으로 열기.
4
+ * Kiro AI chat panel open.
5
+ * Secondary Side Bar (#workbench.parts.auxiliarybar)located at.
6
+ * "Toggle Secondary Side Bar (⌥⌘B)" or "Kiro" via button open.
7
7
  *
8
- * 반환: 'visible' | 'opened' | 'error: ...'
8
+ * Return: 'visible' | 'opened' | 'error: ...'
9
9
  */
10
10
  (() => {
11
11
  try {
12
- // 1. 이미 열려 있는지 확인
12
+ // 1. if already open Check
13
13
  const sidebar = document.getElementById('workbench.parts.auxiliarybar');
14
14
  if (sidebar && sidebar.offsetWidth > 0 && sidebar.offsetHeight > 0) {
15
15
  return 'visible';
16
16
  }
17
17
 
18
- // 2. Toggle 버튼 클릭 시도
18
+ // 2. Attempt to click toggle button
19
19
  const toggleBtns = Array.from(document.querySelectorAll('li.action-item a, button, [role="button"]'));
20
20
  for (const btn of toggleBtns) {
21
21
  const label = (btn.getAttribute('aria-label') || '').toLowerCase();
@@ -28,7 +28,7 @@
28
28
  }
29
29
  }
30
30
 
31
- // 3. Cmd+Shift+I 단축키 폴백 (Kiro 기본 단축키)
31
+ // 3. Cmd+Shift+I shortcut fallback (Kiro default shortcut)
32
32
  document.dispatchEvent(new KeyboardEvent('keydown', {
33
33
  key: 'b', code: 'KeyB', keyCode: 66,
34
34
  metaKey: true, altKey: true, ctrlKey: false,
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Kiro — resolve_action
3
3
  *
4
- * 승인/거부 버튼 찾기 + 좌표 반환.
5
- * Kiro의 approval 다이얼로그는 메인 DOM에 표시됨.
4
+ * Find approve/reject buttons + coordinates Return.
5
+ * Kiroapproval dialog is displayed in main DOM.
6
6
  *
7
- * 파라미터: ${ BUTTON_TEXT }
7
+ * Parameter: ${ BUTTON_TEXT }
8
8
  */
9
9
  (() => {
10
10
  const want = ${ BUTTON_TEXT };
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Kiro — send_message
3
3
  *
4
- * Kiro 채팅 입력은 webview iframe 안에 있어 메인 DOM에서 직접 접근 불가.
5
- * auxbar 하단의 입력 필드 좌표를 계산하여 clickCoords로 반환.
6
- * 데몬이 CDP Input API 해당 좌표에 클릭+타이핑+Enter 수행.
4
+ * Kiro chat input is inside webview iframe, so direct access from main DOM is not possible.
5
+ * auxbar at the bottom of Input field calculate coordinates and return as clickCoords.
6
+ * CDP Input API click++Enter row.
7
7
  *
8
- * 파라미터: ${ MESSAGE }
8
+ * Parameter: ${ MESSAGE }
9
9
  */
10
10
  (() => {
11
11
  try {
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Kiro — webview_list_sessions (webview iframe 내부에서 실행)
2
+ * Kiro — webview_list_sessions (webview iframe runs inside)
3
3
  *
4
- * Kiro 세션 목록을 반환.
4
+ * Kiro session list Return.
5
5
  * DOM: .kiro-tabs-item
6
6
  */
7
7
  (() => {
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Kiro — webview_new_session (webview iframe 내부에서 실행)
2
+ * Kiro — webview_new_session (webview iframe runs inside)
3
3
  *
4
- * "New Session" 버튼/탭 클릭.
5
- * Kiro 탭 바에 + 버튼 또는 "New Session" 액션이 있음.
4
+ * "New Session" button/ click.
5
+ * Kiro + button or "New Session" .
6
6
  */
7
7
  (() => {
8
8
  try {
9
- // kiro-icon-button (+ 버튼) 찾기
9
+ // kiro-icon-button (+ button) search
10
10
  const addBtns = document.querySelectorAll('.kiro-icon-button, button, [role="button"]');
11
11
  for (const btn of addBtns) {
12
12
  const ariaLabel = (btn.getAttribute('aria-label') || '').toLowerCase();
@@ -18,7 +18,7 @@
18
18
  }
19
19
  }
20
20
 
21
- // Checkpoint > New Session 영역 찾기
21
+ // Checkpoint > New Session area search
22
22
  const allText = document.querySelectorAll('*');
23
23
  for (const el of allText) {
24
24
  if (el.children.length === 0 && (el.textContent || '').trim() === 'New Session') {
@@ -1,16 +1,16 @@
1
1
  /**
2
- * Kiro — webview_read_chat (webview iframe 내부에서 실행)
2
+ * Kiro — webview_read_chat (webview iframe runs inside)
3
3
  *
4
- * Kiro 채팅 UI webview iframe 안에 위치하며,
5
- * 데몬의 evaluateInWebviewFrame 통해 실행됨.
4
+ * Kiro chat UI webview iframe located at,
5
+ * evaluateInWebviewFrame execute.
6
6
  *
7
- * DOM 구조:
7
+ * DOM structure:
8
8
  * .kiro-chat-timeline
9
- * .kiro-chat-message (유저/어시스턴트 메시지)
10
- * .kiro-chat-message-meta → .kiro-chat-message-role (발신자)
11
- * .kiro-chat-message-body → .kiro-chat-message-markdown (내용)
9
+ * .kiro-chat-message (user/assistant messages)
10
+ * .kiro-chat-message-meta → .kiro-chat-message-role (sender)
11
+ * .kiro-chat-message-body → .kiro-chat-message-markdown (content)
12
12
  *
13
- * 반환: ReadChatResult { id, status, messages, inputContent? }
13
+ * Return: ReadChatResult { id, status, messages, inputContent? }
14
14
  */
15
15
  (() => {
16
16
  try {
@@ -104,18 +104,18 @@
104
104
  }
105
105
  });
106
106
 
107
- // 상태 감지 activeModal 추출
107
+ // status detection activeModal extract
108
108
  let status = 'idle';
109
109
  let activeModal = undefined;
110
110
 
111
- // "Working" / "Cancel" 버튼 → generating
111
+ // "Working" / "Cancel" button → generating
112
112
  const snackbar = document.querySelector('.kiro-snackbar');
113
113
  if (snackbar && snackbar.offsetWidth > 0) {
114
114
  const barText = (snackbar.textContent || '').toLowerCase();
115
115
  if (barText.includes('working') || barText.includes('cancel')) {
116
116
  status = 'generating';
117
117
  } else if (barText.includes('waiting') || barText.includes('input')) {
118
- // 승인 대기 (waiting on your input)
118
+ // Waiting for approval (waiting on your input)
119
119
  const titleEl = snackbar.querySelector('.kiro-snackbar-title, .thinking-text');
120
120
  const actionsEl = snackbar.querySelectorAll('.kiro-snackbar-actions button');
121
121
  const buttons = Array.from(actionsEl).map(b => (b.textContent || '').trim());
@@ -139,11 +139,11 @@
139
139
  }
140
140
  }
141
141
 
142
- // 입력 필드 내용
142
+ // Input field content
143
143
  const input = document.querySelector('.tiptap.ProseMirror, [contenteditable="true"]');
144
144
  const inputContent = input ? input.textContent?.trim() : '';
145
145
 
146
- // 세션
146
+ // session
147
147
  const tab = document.querySelector('.kiro-tabs-item.active, .kiro-tabs-item[aria-selected="true"]');
148
148
  const title = tab?.textContent?.trim() || '';
149
149
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Kiro — webview_resolve_action
3
3
  * Kiro's approval dialog uses buttons in the kiro-snackbar.
4
- * 파라미터: ${ BUTTON_TEXT }
4
+ * Parameter: ${ BUTTON_TEXT }
5
5
  */
6
6
  (() => {
7
7
  try {
@@ -1,16 +1,16 @@
1
1
  /**
2
- * Kiro — webview_send_message (webview iframe 내부에서 실행)
2
+ * Kiro — webview_send_message (webview iframe runs inside)
3
3
  *
4
- * Kiro 채팅 입력은 webview iframe 안의 ProseMirror/tiptap 에디터.
5
- * execCommand('insertText') + Enter 이벤트로 메시지 전송.
4
+ * Kiro chat input webview iframe ProseMirror/tiptap editor.
5
+ * execCommand('insertText') + Enter via key event Send message.
6
6
  *
7
- * 파라미터: ${ MESSAGE }
7
+ * Parameter: ${ MESSAGE }
8
8
  */
9
9
  (async () => {
10
10
  try {
11
11
  const msg = ${ MESSAGE };
12
12
 
13
- // ─── 1. 입력 필드 찾기 ───
13
+ // ─── 1. Find input field ───
14
14
  const editor =
15
15
  document.querySelector('.tiptap.ProseMirror') ||
16
16
  document.querySelector('[contenteditable="true"]') ||
@@ -39,7 +39,7 @@
39
39
  editor.focus();
40
40
  await new Promise(r => setTimeout(r, 100));
41
41
 
42
- // 전체 선택 + 삭제 + 삽입
42
+ // all Select + delete + insert
43
43
  const sel = window.getSelection();
44
44
  const range = document.createRange();
45
45
  range.selectNodeContents(editor);
@@ -54,7 +54,7 @@
54
54
  editor.dispatchEvent(new Event('input', { bubbles: true }));
55
55
  await new Promise(r => setTimeout(r, 400));
56
56
 
57
- // ─── 3. 전송 버튼 클릭 (Enter 키가 안 먹힐 때 대비) ───
57
+ // ─── 3. button click (Enter ) ───
58
58
  const sendBtns = Array.from(document.querySelectorAll('button, div[role="button"], span[role="button"]'))
59
59
  .filter(b => {
60
60
  const aria = (b.getAttribute('aria-label') || '').toLowerCase();
@@ -76,7 +76,7 @@
76
76
  await new Promise(r => setTimeout(r, 100));
77
77
  }
78
78
 
79
- // ─── 4. Enter 전송 (Fallback) ───
79
+ // ─── 4. Enter key sending (Fallback) ───
80
80
  const enterOpts = {
81
81
  key: 'Enter', code: 'Enter',
82
82
  keyCode: 13, which: 13,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Kiro — webview_set_mode
3
3
  * Toggles the Autopilot switch based on requested mode.
4
- * 파라미터: ${ MODE }
4
+ * Parameter: ${ MODE }
5
5
  */
6
6
  (() => {
7
7
  try {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Kiro — webview_set_model
3
- * 파라미터: ${ MODEL }
3
+ * Parameter: ${ MODEL }
4
4
  */
5
5
  (async () => {
6
6
  try {
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Kiro — webview_switch_session (webview iframe 내부에서 실행)
2
+ * Kiro — webview_switch_session (webview iframe runs inside)
3
3
  *
4
- * 세션 클릭으로 전환.
5
- * 파라미터: ${ SESSION_ID } ( 인덱스)
4
+ * session by clicking .
5
+ * Parameter: ${ SESSION_ID } ( index)
6
6
  */
7
7
  (() => {
8
8
  try {