@adhdev/daemon-core 0.6.58 → 0.6.60
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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +87 -89
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/detection/ide-detector.ts +1 -1
- package/src/providers/provider-loader.ts +3 -6
- package/providers/_builtin/.github/workflows/generate-registry.yml +0 -76
- package/providers/_builtin/COMPATIBILITY.md +0 -217
- package/providers/_builtin/CONTRIBUTING.md +0 -200
- package/providers/_builtin/README.md +0 -119
- package/providers/_builtin/_helpers/index.js +0 -188
- package/providers/_builtin/acp/agentpool/provider.json +0 -54
- package/providers/_builtin/acp/amp/provider.json +0 -52
- package/providers/_builtin/acp/auggie/provider.json +0 -57
- package/providers/_builtin/acp/autodev/provider.json +0 -54
- package/providers/_builtin/acp/autohand/provider.json +0 -52
- package/providers/_builtin/acp/blackbox-ai/provider.json +0 -54
- package/providers/_builtin/acp/claude-agent/provider.json +0 -57
- package/providers/_builtin/acp/cline-acp/provider.json +0 -54
- package/providers/_builtin/acp/codebuddy/provider.json +0 -54
- package/providers/_builtin/acp/codex-cli/provider.json +0 -57
- package/providers/_builtin/acp/corust-agent/provider.json +0 -52
- package/providers/_builtin/acp/crow-cli/provider.json +0 -54
- package/providers/_builtin/acp/cursor-acp/provider.json +0 -54
- package/providers/_builtin/acp/deepagents/provider.json +0 -52
- package/providers/_builtin/acp/dimcode/provider.json +0 -54
- package/providers/_builtin/acp/docker-cagent/provider.json +0 -57
- package/providers/_builtin/acp/factory-droid/provider.json +0 -60
- package/providers/_builtin/acp/fast-agent/provider.json +0 -52
- package/providers/_builtin/acp/gemini-cli/provider.json +0 -114
- package/providers/_builtin/acp/github-copilot/provider.json +0 -54
- package/providers/_builtin/acp/goose/provider.json +0 -57
- package/providers/_builtin/acp/junie/provider.json +0 -52
- package/providers/_builtin/acp/kilo/provider.json +0 -54
- package/providers/_builtin/acp/kimi-cli/provider.json +0 -57
- package/providers/_builtin/acp/minion-code/provider.json +0 -52
- package/providers/_builtin/acp/mistral-vibe/provider.json +0 -57
- package/providers/_builtin/acp/nova/provider.json +0 -54
- package/providers/_builtin/acp/openclaw/provider.json +0 -54
- package/providers/_builtin/acp/opencode/provider.json +0 -52
- package/providers/_builtin/acp/openhands/provider.json +0 -54
- package/providers/_builtin/acp/pi-acp/provider.json +0 -52
- package/providers/_builtin/acp/qoder/provider.json +0 -54
- package/providers/_builtin/acp/qwen-code/provider.json +0 -60
- package/providers/_builtin/acp/stakpak/provider.json +0 -54
- package/providers/_builtin/acp/vtcode/provider.json +0 -54
- package/providers/_builtin/cli/aider-cli/provider.json +0 -37
- package/providers/_builtin/cli/aider-cli/scripts/1.0/detect_status.js +0 -20
- package/providers/_builtin/cli/aider-cli/scripts/1.0/parse_approval.js +0 -10
- package/providers/_builtin/cli/aider-cli/scripts/1.0/parse_output.js +0 -97
- package/providers/_builtin/cli/aider-cli/scripts/1.0/scripts.js +0 -7
- package/providers/_builtin/cli/claude-cli/provider.json +0 -121
- package/providers/_builtin/cli/claude-cli/scripts/1.0/detect_status.js +0 -83
- package/providers/_builtin/cli/claude-cli/scripts/1.0/parse_approval.js +0 -97
- package/providers/_builtin/cli/claude-cli/scripts/1.0/parse_output.js +0 -417
- package/providers/_builtin/cli/claude-cli/scripts/1.0/scripts.js +0 -42
- package/providers/_builtin/cli/codex-cli/provider.json +0 -90
- package/providers/_builtin/cli/codex-cli/scripts/1.0/detect_status.js +0 -54
- package/providers/_builtin/cli/codex-cli/scripts/1.0/parse_approval.js +0 -91
- package/providers/_builtin/cli/codex-cli/scripts/1.0/parse_output.js +0 -522
- package/providers/_builtin/cli/codex-cli/scripts/1.0/scripts.js +0 -11
- package/providers/_builtin/cli/cursor-cli/provider.json +0 -37
- package/providers/_builtin/cli/cursor-cli/scripts/1.0/detect_status.js +0 -19
- package/providers/_builtin/cli/cursor-cli/scripts/1.0/parse_approval.js +0 -10
- package/providers/_builtin/cli/cursor-cli/scripts/1.0/parse_output.js +0 -48
- package/providers/_builtin/cli/cursor-cli/scripts/1.0/scripts.js +0 -7
- package/providers/_builtin/cli/gemini-cli/provider.json +0 -109
- package/providers/_builtin/cli/gemini-cli/scripts/1.0/detect_status.js +0 -26
- package/providers/_builtin/cli/gemini-cli/scripts/1.0/parse_approval.js +0 -22
- package/providers/_builtin/cli/gemini-cli/scripts/1.0/parse_output.js +0 -71
- package/providers/_builtin/cli/gemini-cli/scripts/1.0/scripts.js +0 -12
- package/providers/_builtin/cli/github-copilot-cli/provider.json +0 -37
- package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/detect_status.js +0 -19
- package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/parse_approval.js +0 -9
- package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/parse_output.js +0 -48
- package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/scripts.js +0 -7
- package/providers/_builtin/cli/goose-cli/provider.json +0 -37
- package/providers/_builtin/cli/goose-cli/scripts/1.0/detect_status.js +0 -20
- package/providers/_builtin/cli/goose-cli/scripts/1.0/parse_approval.js +0 -10
- package/providers/_builtin/cli/goose-cli/scripts/1.0/parse_output.js +0 -48
- package/providers/_builtin/cli/goose-cli/scripts/1.0/scripts.js +0 -7
- package/providers/_builtin/cli/opencode-cli/provider.json +0 -37
- package/providers/_builtin/cli/opencode-cli/scripts/1.0/detect_status.js +0 -15
- package/providers/_builtin/cli/opencode-cli/scripts/1.0/parse_approval.js +0 -9
- package/providers/_builtin/cli/opencode-cli/scripts/1.0/parse_output.js +0 -48
- package/providers/_builtin/cli/opencode-cli/scripts/1.0/scripts.js +0 -7
- package/providers/_builtin/docs/CDP_SELECTOR_GUIDE.md +0 -370
- package/providers/_builtin/docs/PROVIDER_GUIDE.md +0 -916
- package/providers/_builtin/extension/cline/provider.json +0 -37
- package/providers/_builtin/extension/cline/scripts/1.0/focus_editor.js +0 -48
- package/providers/_builtin/extension/cline/scripts/1.0/list_chats.js +0 -100
- package/providers/_builtin/extension/cline/scripts/1.0/list_models.js +0 -43
- package/providers/_builtin/extension/cline/scripts/1.0/list_modes.js +0 -35
- package/providers/_builtin/extension/cline/scripts/1.0/new_session.js +0 -85
- package/providers/_builtin/extension/cline/scripts/1.0/open_panel.js +0 -25
- package/providers/_builtin/extension/cline/scripts/1.0/read_chat.js +0 -270
- package/providers/_builtin/extension/cline/scripts/1.0/resolve_action.js +0 -83
- package/providers/_builtin/extension/cline/scripts/1.0/scripts.js +0 -82
- package/providers/_builtin/extension/cline/scripts/1.0/send_message.js +0 -95
- package/providers/_builtin/extension/cline/scripts/1.0/set_mode.js +0 -36
- package/providers/_builtin/extension/cline/scripts/1.0/set_model.js +0 -36
- package/providers/_builtin/extension/cline/scripts/1.0/switch_session.js +0 -206
- package/providers/_builtin/extension/codex/provider.json +0 -38
- package/providers/_builtin/extension/codex/scripts/1.0/click_conversation_webview.js +0 -24
- package/providers/_builtin/extension/codex/scripts/1.0/explore_chat_webview.js +0 -110
- package/providers/_builtin/extension/codex/scripts/1.0/explore_controls_webview.js +0 -75
- package/providers/_builtin/extension/codex/scripts/1.0/explore_dom.js +0 -58
- package/providers/_builtin/extension/codex/scripts/1.0/explore_dropdown_webview.js +0 -64
- package/providers/_builtin/extension/codex/scripts/1.0/inspect_code_webview.js +0 -55
- package/providers/_builtin/extension/codex/scripts/1.0/list_models.js +0 -63
- package/providers/_builtin/extension/codex/scripts/1.0/list_modes.js +0 -140
- package/providers/_builtin/extension/codex/scripts/1.0/message_structure_webview.js +0 -79
- package/providers/_builtin/extension/codex/scripts/1.0/new_session.js +0 -26
- package/providers/_builtin/extension/codex/scripts/1.0/read_chat.js +0 -516
- package/providers/_builtin/extension/codex/scripts/1.0/resolve_action.js +0 -82
- package/providers/_builtin/extension/codex/scripts/1.0/send_message.js +0 -42
- package/providers/_builtin/extension/codex/scripts/1.0/set_mode.js +0 -165
- package/providers/_builtin/extension/codex/scripts/1.0/set_model.js +0 -86
- package/providers/_builtin/extension/roo-code/provider.json +0 -37
- package/providers/_builtin/extension/roo-code/scripts/1.0/scripts.js +0 -82
- package/providers/_builtin/ide/antigravity/provider.json +0 -88
- package/providers/_builtin/ide/antigravity/scripts/1.0/focus_editor.js +0 -20
- package/providers/_builtin/ide/antigravity/scripts/1.0/list_chats.js +0 -137
- package/providers/_builtin/ide/antigravity/scripts/1.0/list_models.js +0 -61
- package/providers/_builtin/ide/antigravity/scripts/1.0/list_modes.js +0 -72
- package/providers/_builtin/ide/antigravity/scripts/1.0/new_session.js +0 -75
- package/providers/_builtin/ide/antigravity/scripts/1.0/read_chat.js +0 -352
- package/providers/_builtin/ide/antigravity/scripts/1.0/resolve_action.js +0 -63
- package/providers/_builtin/ide/antigravity/scripts/1.0/scripts.js +0 -67
- package/providers/_builtin/ide/antigravity/scripts/1.0/send_message.js +0 -56
- package/providers/_builtin/ide/antigravity/scripts/1.0/set_mode.js +0 -67
- package/providers/_builtin/ide/antigravity/scripts/1.0/set_model.js +0 -72
- package/providers/_builtin/ide/antigravity/scripts/1.0/switch_session.js +0 -114
- package/providers/_builtin/ide/cursor/provider.json +0 -70
- package/providers/_builtin/ide/cursor/scripts/1.0/dismiss_notification.js +0 -30
- package/providers/_builtin/ide/cursor/scripts/1.0/focus_editor.js +0 -13
- package/providers/_builtin/ide/cursor/scripts/1.0/list_models.js +0 -78
- package/providers/_builtin/ide/cursor/scripts/1.0/list_modes.js +0 -40
- package/providers/_builtin/ide/cursor/scripts/1.0/list_notifications.js +0 -23
- package/providers/_builtin/ide/cursor/scripts/1.0/list_sessions.js +0 -42
- package/providers/_builtin/ide/cursor/scripts/1.0/new_session.js +0 -20
- package/providers/_builtin/ide/cursor/scripts/1.0/open_panel.js +0 -23
- package/providers/_builtin/ide/cursor/scripts/1.0/read_chat.js +0 -318
- package/providers/_builtin/ide/cursor/scripts/1.0/resolve_action.js +0 -19
- package/providers/_builtin/ide/cursor/scripts/1.0/scripts.js +0 -78
- package/providers/_builtin/ide/cursor/scripts/1.0/send_message.js +0 -23
- package/providers/_builtin/ide/cursor/scripts/1.0/set_mode.js +0 -38
- package/providers/_builtin/ide/cursor/scripts/1.0/set_model.js +0 -81
- package/providers/_builtin/ide/cursor/scripts/1.0/switch_session.js +0 -28
- package/providers/_builtin/ide/kiro/provider.json +0 -68
- package/providers/_builtin/ide/kiro/scripts/1.0/focus_editor.js +0 -20
- package/providers/_builtin/ide/kiro/scripts/1.0/open_panel.js +0 -47
- package/providers/_builtin/ide/kiro/scripts/1.0/resolve_action.js +0 -54
- package/providers/_builtin/ide/kiro/scripts/1.0/send_message.js +0 -29
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_dump_html.js +0 -1
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_list_models.js +0 -42
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_list_modes.js +0 -22
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_list_sessions.js +0 -21
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_new_session.js +0 -34
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_read_chat.js +0 -161
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_resolve_action.js +0 -62
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_send_message.js +0 -94
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_set_mode.js +0 -34
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_set_model.js +0 -47
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_switch_session.js +0 -26
- package/providers/_builtin/ide/pearai/.tmp/after_rich.json +0 -157
- package/providers/_builtin/ide/pearai/.tmp/after_rich_raw.json +0 -161
- package/providers/_builtin/ide/pearai/.tmp/after_switch.json +0 -592
- package/providers/_builtin/ide/pearai/.tmp/after_switch_raw.json +0 -596
- package/providers/_builtin/ide/pearai/.tmp/home_dump_raw.json +0 -176
- package/providers/_builtin/ide/pearai/.tmp/items_raw.json +0 -778
- package/providers/_builtin/ide/pearai/.tmp/webview_dump.json +0 -157
- package/providers/_builtin/ide/pearai/.tmp/webview_dump_raw.json +0 -161
- package/providers/_builtin/ide/pearai/provider.json +0 -71
- package/providers/_builtin/ide/pearai/scripts/1.0/focus_editor.js +0 -16
- package/providers/_builtin/ide/pearai/scripts/1.0/list_models.js +0 -45
- package/providers/_builtin/ide/pearai/scripts/1.0/list_modes.js +0 -44
- package/providers/_builtin/ide/pearai/scripts/1.0/list_sessions.js +0 -93
- package/providers/_builtin/ide/pearai/scripts/1.0/new_session.js +0 -38
- package/providers/_builtin/ide/pearai/scripts/1.0/open_panel.js +0 -23
- package/providers/_builtin/ide/pearai/scripts/1.0/read_chat.js +0 -169
- package/providers/_builtin/ide/pearai/scripts/1.0/resolve_action.js +0 -60
- package/providers/_builtin/ide/pearai/scripts/1.0/scripts.js +0 -111
- package/providers/_builtin/ide/pearai/scripts/1.0/send_message.js +0 -104
- package/providers/_builtin/ide/pearai/scripts/1.0/set_mode.js +0 -51
- package/providers/_builtin/ide/pearai/scripts/1.0/set_model.js +0 -54
- package/providers/_builtin/ide/pearai/scripts/1.0/switch_session.js +0 -81
- package/providers/_builtin/ide/trae/provider.json +0 -72
- package/providers/_builtin/ide/trae/scripts/1.0/focus_editor.js +0 -20
- package/providers/_builtin/ide/trae/scripts/1.0/list_chats.js +0 -24
- package/providers/_builtin/ide/trae/scripts/1.0/list_models.js +0 -39
- package/providers/_builtin/ide/trae/scripts/1.0/list_modes.js +0 -39
- package/providers/_builtin/ide/trae/scripts/1.0/new_session.js +0 -30
- package/providers/_builtin/ide/trae/scripts/1.0/open_panel.js +0 -44
- package/providers/_builtin/ide/trae/scripts/1.0/read_chat.js +0 -113
- package/providers/_builtin/ide/trae/scripts/1.0/resolve_action.js +0 -54
- package/providers/_builtin/ide/trae/scripts/1.0/scripts.js +0 -82
- package/providers/_builtin/ide/trae/scripts/1.0/send_message.js +0 -69
- package/providers/_builtin/ide/trae/scripts/1.0/set_mode.js +0 -15
- package/providers/_builtin/ide/trae/scripts/1.0/set_model.js +0 -15
- package/providers/_builtin/ide/trae/scripts/1.0/switch_session.js +0 -23
- package/providers/_builtin/ide/vscode/provider.json +0 -74
- package/providers/_builtin/ide/vscode/scripts/1.0/focus_editor.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/list_models.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/list_sessions.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/new_session.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/open_panel.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/read_chat.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/resolve_action.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/scripts.js +0 -25
- package/providers/_builtin/ide/vscode/scripts/1.0/send_message.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/set_model.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/switch_session.js +0 -1
- package/providers/_builtin/ide/vscode-insiders/provider.json +0 -68
- package/providers/_builtin/ide/vscodium/provider.json +0 -69
- package/providers/_builtin/ide/windsurf/provider.json +0 -57
- package/providers/_builtin/ide/windsurf/scripts/1.0/focus_editor.js +0 -36
- package/providers/_builtin/ide/windsurf/scripts/1.0/list_chats.js +0 -23
- package/providers/_builtin/ide/windsurf/scripts/1.0/list_models.js +0 -56
- package/providers/_builtin/ide/windsurf/scripts/1.0/list_modes.js +0 -63
- package/providers/_builtin/ide/windsurf/scripts/1.0/list_sessions.js +0 -79
- package/providers/_builtin/ide/windsurf/scripts/1.0/new_session.js +0 -58
- package/providers/_builtin/ide/windsurf/scripts/1.0/open_panel.js +0 -67
- package/providers/_builtin/ide/windsurf/scripts/1.0/read_chat.js +0 -253
- package/providers/_builtin/ide/windsurf/scripts/1.0/resolve_action.js +0 -82
- package/providers/_builtin/ide/windsurf/scripts/1.0/scripts.js +0 -82
- package/providers/_builtin/ide/windsurf/scripts/1.0/send_message.js +0 -20
- package/providers/_builtin/ide/windsurf/scripts/1.0/set_mode.js +0 -43
- package/providers/_builtin/ide/windsurf/scripts/1.0/set_model.js +0 -49
- package/providers/_builtin/ide/windsurf/scripts/1.0/switch_session.js +0 -82
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/focus_editor.js +0 -30
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/list_chats.js +0 -117
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/list_models.js +0 -39
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/list_modes.js +0 -39
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/new_session.js +0 -69
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/open_panel.js +0 -58
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/read_chat.js +0 -315
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/resolve_action.js +0 -68
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/scripts.js +0 -82
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/send_message.js +0 -87
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/set_mode.js +0 -15
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/set_model.js +0 -15
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/switch_session.js +0 -58
- package/providers/_builtin/registry.json +0 -376
- package/providers/_builtin/validate.js +0 -156
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "qwen-code-acp",
|
|
3
|
-
"name": "Qwen Code (ACP)",
|
|
4
|
-
"category": "acp",
|
|
5
|
-
"displayName": "Qwen Code",
|
|
6
|
-
"icon": "🟦",
|
|
7
|
-
"install": "npm install -g @qwen-code/qwen-code (requires DASHSCOPE_API_KEY)",
|
|
8
|
-
"spawn": {
|
|
9
|
-
"command": "qwen-code",
|
|
10
|
-
"args": [
|
|
11
|
-
"--acp",
|
|
12
|
-
"--experimental-skills"
|
|
13
|
-
],
|
|
14
|
-
"shell": false
|
|
15
|
-
},
|
|
16
|
-
"auth": [
|
|
17
|
-
{
|
|
18
|
-
"type": "env_var",
|
|
19
|
-
"id": "dashscope",
|
|
20
|
-
"name": "DashScope API Key",
|
|
21
|
-
"vars": [
|
|
22
|
-
{
|
|
23
|
-
"name": "DASHSCOPE_API_KEY"
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"link": "https://dashscope.console.aliyun.com/apiKey"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"settings": {
|
|
30
|
-
"autoApprove": {
|
|
31
|
-
"type": "boolean",
|
|
32
|
-
"default": false,
|
|
33
|
-
"public": true,
|
|
34
|
-
"label": "Auto Approve",
|
|
35
|
-
"description": "Automatically approve all tool calls without user confirmation"
|
|
36
|
-
},
|
|
37
|
-
"approvalAlert": {
|
|
38
|
-
"type": "boolean",
|
|
39
|
-
"default": true,
|
|
40
|
-
"public": true,
|
|
41
|
-
"label": "Approval Alerts",
|
|
42
|
-
"description": "Show notification when Qwen Code requires approval"
|
|
43
|
-
},
|
|
44
|
-
"longGeneratingAlert": {
|
|
45
|
-
"type": "boolean",
|
|
46
|
-
"default": true,
|
|
47
|
-
"public": true,
|
|
48
|
-
"label": "Long Generation Alert",
|
|
49
|
-
"description": "Alert when generation takes too long"
|
|
50
|
-
},
|
|
51
|
-
"longGeneratingThresholdSec": {
|
|
52
|
-
"type": "number",
|
|
53
|
-
"default": 180,
|
|
54
|
-
"public": true,
|
|
55
|
-
"label": "Long Generation Threshold (sec)",
|
|
56
|
-
"min": 30,
|
|
57
|
-
"max": 600
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "stakpak-acp",
|
|
3
|
-
"name": "Stakpak (ACP)",
|
|
4
|
-
"category": "acp",
|
|
5
|
-
"displayName": "Stakpak",
|
|
6
|
-
"icon": "🛡️",
|
|
7
|
-
"install": "Download from https://github.com/stakpak/agent/releases",
|
|
8
|
-
"spawn": {
|
|
9
|
-
"command": "stakpak",
|
|
10
|
-
"args": [
|
|
11
|
-
"acp"
|
|
12
|
-
],
|
|
13
|
-
"shell": false
|
|
14
|
-
},
|
|
15
|
-
"auth": [
|
|
16
|
-
{
|
|
17
|
-
"type": "agent",
|
|
18
|
-
"id": "stakpak",
|
|
19
|
-
"name": "Stakpak Auth",
|
|
20
|
-
"description": "Configure provider through Stakpak setup"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"settings": {
|
|
24
|
-
"autoApprove": {
|
|
25
|
-
"type": "boolean",
|
|
26
|
-
"default": false,
|
|
27
|
-
"public": true,
|
|
28
|
-
"label": "Auto Approve",
|
|
29
|
-
"description": "Automatically approve all tool calls without user confirmation"
|
|
30
|
-
},
|
|
31
|
-
"approvalAlert": {
|
|
32
|
-
"type": "boolean",
|
|
33
|
-
"default": true,
|
|
34
|
-
"public": true,
|
|
35
|
-
"label": "Approval Alerts",
|
|
36
|
-
"description": "Show notification when agent requires approval"
|
|
37
|
-
},
|
|
38
|
-
"longGeneratingAlert": {
|
|
39
|
-
"type": "boolean",
|
|
40
|
-
"default": true,
|
|
41
|
-
"public": true,
|
|
42
|
-
"label": "Long Generation Alert",
|
|
43
|
-
"description": "Alert when generation takes too long"
|
|
44
|
-
},
|
|
45
|
-
"longGeneratingThresholdSec": {
|
|
46
|
-
"type": "number",
|
|
47
|
-
"default": 180,
|
|
48
|
-
"public": true,
|
|
49
|
-
"label": "Long Generation Threshold (sec)",
|
|
50
|
-
"min": 30,
|
|
51
|
-
"max": 600
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "vtcode-acp",
|
|
3
|
-
"name": "VT Code (ACP)",
|
|
4
|
-
"category": "acp",
|
|
5
|
-
"displayName": "VT Code",
|
|
6
|
-
"icon": "🟣",
|
|
7
|
-
"install": "npm install -g vtcode",
|
|
8
|
-
"spawn": {
|
|
9
|
-
"command": "vtcode",
|
|
10
|
-
"args": [
|
|
11
|
-
"acp"
|
|
12
|
-
],
|
|
13
|
-
"shell": false
|
|
14
|
-
},
|
|
15
|
-
"auth": [
|
|
16
|
-
{
|
|
17
|
-
"type": "agent",
|
|
18
|
-
"id": "vtcode",
|
|
19
|
-
"name": "VT Code Auth",
|
|
20
|
-
"description": "Configure provider through VT Code setup"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"settings": {
|
|
24
|
-
"autoApprove": {
|
|
25
|
-
"type": "boolean",
|
|
26
|
-
"default": false,
|
|
27
|
-
"public": true,
|
|
28
|
-
"label": "Auto Approve",
|
|
29
|
-
"description": "Automatically approve all tool calls without user confirmation"
|
|
30
|
-
},
|
|
31
|
-
"approvalAlert": {
|
|
32
|
-
"type": "boolean",
|
|
33
|
-
"default": true,
|
|
34
|
-
"public": true,
|
|
35
|
-
"label": "Approval Alerts",
|
|
36
|
-
"description": "Show notification when agent requires approval"
|
|
37
|
-
},
|
|
38
|
-
"longGeneratingAlert": {
|
|
39
|
-
"type": "boolean",
|
|
40
|
-
"default": true,
|
|
41
|
-
"public": true,
|
|
42
|
-
"label": "Long Generation Alert",
|
|
43
|
-
"description": "Alert when generation takes too long"
|
|
44
|
-
},
|
|
45
|
-
"longGeneratingThresholdSec": {
|
|
46
|
-
"type": "number",
|
|
47
|
-
"default": 180,
|
|
48
|
-
"public": true,
|
|
49
|
-
"label": "Long Generation Threshold (sec)",
|
|
50
|
-
"min": 30,
|
|
51
|
-
"max": 600
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "aider-cli",
|
|
3
|
-
"name": "Aider",
|
|
4
|
-
"category": "cli",
|
|
5
|
-
"aliases": [
|
|
6
|
-
"aider"
|
|
7
|
-
],
|
|
8
|
-
"icon": "🤖",
|
|
9
|
-
"displayName": "Aider",
|
|
10
|
-
"settings": {
|
|
11
|
-
"mode": {
|
|
12
|
-
"type": "select",
|
|
13
|
-
"default": "chat",
|
|
14
|
-
"public": true,
|
|
15
|
-
"label": "Display Mode",
|
|
16
|
-
"description": "terminal: Native PTY view, chat: Parsed message view",
|
|
17
|
-
"options": [
|
|
18
|
-
"terminal",
|
|
19
|
-
"chat"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"binary": "aider",
|
|
24
|
-
"spawn": {
|
|
25
|
-
"command": "aider",
|
|
26
|
-
"args": [],
|
|
27
|
-
"shell": true,
|
|
28
|
-
"env": {}
|
|
29
|
-
},
|
|
30
|
-
"compatibility": [
|
|
31
|
-
{
|
|
32
|
-
"ideVersion": ">=0.86.0",
|
|
33
|
-
"scriptDir": "scripts/1.0"
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"defaultScriptDir": "scripts/1.0"
|
|
37
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Aider — detect_status
|
|
3
|
-
* Aider uses a simpler TUI with '>' prompts and tool output markers.
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
module.exports = function detectStatus(input) {
|
|
7
|
-
const { tail } = input;
|
|
8
|
-
if (!tail) return 'idle';
|
|
9
|
-
// Aider approval: "Allow creation of new file" / "Run shell command?"
|
|
10
|
-
if (/Allow\s*creation/i.test(tail) && /\(y\/n\)/i.test(tail)) return 'waiting_approval';
|
|
11
|
-
if (/Run\s*shell\s*command/i.test(tail)) return 'waiting_approval';
|
|
12
|
-
if (/Apply\s*(edit|change)/i.test(tail) && /\(y\/n\)/i.test(tail)) return 'waiting_approval';
|
|
13
|
-
// generating
|
|
14
|
-
if (/[\u2800-\u28ff]/.test(tail)) return 'generating';
|
|
15
|
-
if (/[⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]/.test(tail)) return 'generating';
|
|
16
|
-
if (/Thinking|Sending|Streaming/i.test(tail)) return 'generating';
|
|
17
|
-
// Aider shows "Tokens:" after completion — if we see that, it's idle
|
|
18
|
-
if (/Tokens:/i.test(tail)) return 'idle';
|
|
19
|
-
return 'idle';
|
|
20
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = function parseApproval(input) {
|
|
3
|
-
const { tail } = input;
|
|
4
|
-
if (!tail) return null;
|
|
5
|
-
const hasApproval = /Allow\s*creation/i.test(tail) || /Run\s*shell\s*command/i.test(tail) ||
|
|
6
|
-
/Apply\s*(edit|change)/i.test(tail) || /\(y\/n\)/i.test(tail);
|
|
7
|
-
if (!hasApproval) return null;
|
|
8
|
-
const lines = tail.split('\n').map(l => l.trim()).filter(l => l && l.length > 2);
|
|
9
|
-
return { message: lines.slice(-5).join(' ').slice(0, 200) || 'Approval required', buttons: ['Yes (y)', 'No (n)'] };
|
|
10
|
-
};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const detectStatus = require('./detect_status.js');
|
|
3
|
-
const parseApproval = require('./parse_approval.js');
|
|
4
|
-
|
|
5
|
-
function splitTurns(buffer) {
|
|
6
|
-
const messages = [];
|
|
7
|
-
if (!buffer || buffer.length < 5) return messages;
|
|
8
|
-
const lines = buffer.split('\n');
|
|
9
|
-
let currentRole = null, currentContent = [], msgIndex = 0, started = false;
|
|
10
|
-
for (const line of lines) {
|
|
11
|
-
const trimmed = line.trim();
|
|
12
|
-
// Aider prompt is just '>' at start of line
|
|
13
|
-
const userMatch = trimmed.match(/^[❯›>]\s+(.+)$/);
|
|
14
|
-
if (userMatch && userMatch[1].length > 1) {
|
|
15
|
-
started = true;
|
|
16
|
-
if (currentRole && currentContent.length > 0) {
|
|
17
|
-
const text = currentContent.join('\n').trim();
|
|
18
|
-
if (text.length > 1) { messages.push({ id: `msg_${msgIndex}`, role: currentRole, content: text.slice(0, 6000), index: msgIndex, kind: 'standard' }); msgIndex++; }
|
|
19
|
-
}
|
|
20
|
-
currentRole = 'user'; currentContent = [userMatch[1]]; continue;
|
|
21
|
-
}
|
|
22
|
-
if (!started) continue;
|
|
23
|
-
if (currentRole === 'user' && trimmed && !userMatch) {
|
|
24
|
-
const text = currentContent.join('\n').trim();
|
|
25
|
-
if (text.length > 1) { messages.push({ id: `msg_${msgIndex}`, role: 'user', content: text, index: msgIndex, kind: 'standard' }); msgIndex++; }
|
|
26
|
-
currentRole = 'assistant'; currentContent = [];
|
|
27
|
-
}
|
|
28
|
-
if (!trimmed || /^[\u2800-\u28ff]+$/.test(trimmed)) continue;
|
|
29
|
-
if (currentRole) currentContent.push(trimmed);
|
|
30
|
-
}
|
|
31
|
-
if (currentRole && currentContent.length > 0) {
|
|
32
|
-
const text = currentContent.join('\n').trim();
|
|
33
|
-
if (text.length > 1) messages.push({ id: `msg_${msgIndex}`, role: currentRole, content: text.slice(0, 6000), index: msgIndex, kind: 'standard' });
|
|
34
|
-
}
|
|
35
|
-
return messages.length > 50 ? messages.slice(-50) : messages;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function mergeMessages(priorMessages, parsedMessages, status) {
|
|
39
|
-
const base = Array.isArray(priorMessages)
|
|
40
|
-
? priorMessages
|
|
41
|
-
.filter(message => message && (message.role === 'user' || message.role === 'assistant'))
|
|
42
|
-
.map(message => ({
|
|
43
|
-
role: message.role,
|
|
44
|
-
content: typeof message.content === 'string' ? message.content : String(message.content || ''),
|
|
45
|
-
timestamp: message.timestamp,
|
|
46
|
-
}))
|
|
47
|
-
: [];
|
|
48
|
-
if (!parsedMessages.length) return base.map((message, index) => ({
|
|
49
|
-
id: `msg_${index}`,
|
|
50
|
-
role: message.role,
|
|
51
|
-
content: message.content,
|
|
52
|
-
index,
|
|
53
|
-
kind: 'standard',
|
|
54
|
-
}));
|
|
55
|
-
|
|
56
|
-
const latestAssistant = [...parsedMessages].reverse().find(message => message.role === 'assistant' && message.content);
|
|
57
|
-
if (!latestAssistant) {
|
|
58
|
-
return base.map((message, index) => ({
|
|
59
|
-
id: `msg_${index}`,
|
|
60
|
-
role: message.role,
|
|
61
|
-
content: message.content,
|
|
62
|
-
index,
|
|
63
|
-
kind: 'standard',
|
|
64
|
-
}));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const last = base[base.length - 1];
|
|
68
|
-
if (last && last.role === 'assistant') {
|
|
69
|
-
last.content = latestAssistant.content;
|
|
70
|
-
} else {
|
|
71
|
-
base.push({ role: 'assistant', content: latestAssistant.content });
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return base.slice(-50).map((message, index, slice) => ({
|
|
75
|
-
id: `msg_${index}`,
|
|
76
|
-
role: message.role,
|
|
77
|
-
content: typeof message.content === 'string' ? message.content.slice(0, 6000) : '',
|
|
78
|
-
index,
|
|
79
|
-
kind: 'standard',
|
|
80
|
-
...(status === 'generating' && index === slice.length - 1 && message.role === 'assistant'
|
|
81
|
-
? { meta: { streaming: true } }
|
|
82
|
-
: {}),
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
module.exports = function parseOutput(input) {
|
|
87
|
-
const { buffer, recentBuffer, partialResponse, screenText, messages: priorMessages } = input;
|
|
88
|
-
const transcript = buffer || screenText;
|
|
89
|
-
const tail = recentBuffer || (transcript || '').slice(-500);
|
|
90
|
-
const status = detectStatus({ tail });
|
|
91
|
-
const activeModal = status === 'waiting_approval' ? parseApproval({ buffer: transcript, tail }) : null;
|
|
92
|
-
const messages = mergeMessages(priorMessages, splitTurns(transcript), status);
|
|
93
|
-
if (status === 'generating' && partialResponse && partialResponse.trim().length > 2) {
|
|
94
|
-
messages.push({ id: 'msg_partial', role: 'assistant', content: partialResponse.trim().slice(0, 6000), index: messages.length, kind: 'standard', meta: { streaming: true } });
|
|
95
|
-
}
|
|
96
|
-
return { id: 'cli_session', status, title: 'Aider', messages, activeModal };
|
|
97
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const DIR = __dirname;
|
|
4
|
-
function loadModule(name) { try { return require(path.join(DIR, name)); } catch { return null; } }
|
|
5
|
-
module.exports.parseOutput = (input) => { const m = loadModule('parse_output.js'); return m ? m(input) : null; };
|
|
6
|
-
module.exports.detectStatus = (input) => { const m = loadModule('detect_status.js'); return m ? m(input) : null; };
|
|
7
|
-
module.exports.parseApproval = (input) => { const m = loadModule('parse_approval.js'); return m ? m(input) : null; };
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "claude-cli",
|
|
3
|
-
"name": "Claude Code",
|
|
4
|
-
"category": "cli",
|
|
5
|
-
"aliases": [
|
|
6
|
-
"claude",
|
|
7
|
-
"claude-code"
|
|
8
|
-
],
|
|
9
|
-
"icon": "🤖",
|
|
10
|
-
"displayName": "Claude Code",
|
|
11
|
-
"settings": {
|
|
12
|
-
"mode": {
|
|
13
|
-
"type": "select",
|
|
14
|
-
"default": "chat",
|
|
15
|
-
"public": true,
|
|
16
|
-
"label": "Display Mode",
|
|
17
|
-
"description": "terminal: Native PTY view, chat: Parsed message view",
|
|
18
|
-
"options": [
|
|
19
|
-
"terminal",
|
|
20
|
-
"chat"
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
|
-
"notifications": {
|
|
24
|
-
"type": "boolean",
|
|
25
|
-
"default": true,
|
|
26
|
-
"public": true,
|
|
27
|
-
"label": "Notifications",
|
|
28
|
-
"description": "Display notifications on state changes"
|
|
29
|
-
},
|
|
30
|
-
"autoApprove": {
|
|
31
|
-
"type": "boolean",
|
|
32
|
-
"default": false,
|
|
33
|
-
"public": true,
|
|
34
|
-
"label": "Auto Approve",
|
|
35
|
-
"description": "Automatically approve tool execution without prompt"
|
|
36
|
-
},
|
|
37
|
-
"approvalAlert": {
|
|
38
|
-
"type": "boolean",
|
|
39
|
-
"default": true,
|
|
40
|
-
"public": true,
|
|
41
|
-
"label": "Approval Notifications",
|
|
42
|
-
"description": "Show notification when approval is needed"
|
|
43
|
-
},
|
|
44
|
-
"longGeneratingAlert": {
|
|
45
|
-
"type": "boolean",
|
|
46
|
-
"default": true,
|
|
47
|
-
"public": true,
|
|
48
|
-
"label": "Long Generation Alert",
|
|
49
|
-
"description": "Alert when generation takes too long"
|
|
50
|
-
},
|
|
51
|
-
"longGeneratingThresholdSec": {
|
|
52
|
-
"type": "number",
|
|
53
|
-
"default": 180,
|
|
54
|
-
"public": true,
|
|
55
|
-
"label": "Long Generation Threshold (sec)",
|
|
56
|
-
"min": 30,
|
|
57
|
-
"max": 600
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"binary": "claude",
|
|
61
|
-
"sendDelayMs": 700,
|
|
62
|
-
"submitStrategy": "immediate",
|
|
63
|
-
"spawn": {
|
|
64
|
-
"command": "claude",
|
|
65
|
-
"args": [
|
|
66
|
-
"--permission-mode",
|
|
67
|
-
"acceptEdits"
|
|
68
|
-
],
|
|
69
|
-
"shell": true,
|
|
70
|
-
"env": {}
|
|
71
|
-
},
|
|
72
|
-
"patterns": {
|
|
73
|
-
"prompt": [
|
|
74
|
-
{ "source": "Type your message", "flags": "i" },
|
|
75
|
-
{ "source": "for\\s*shortcuts", "flags": "i" },
|
|
76
|
-
{ "source": "\\?\\s*for\\s*help", "flags": "i" },
|
|
77
|
-
{ "source": "Press enter", "flags": "i" },
|
|
78
|
-
{ "source": "[›❯]\\s*$", "flags": "m" },
|
|
79
|
-
{ "source": "medium\\s+·\\s+/effort", "flags": "i" }
|
|
80
|
-
],
|
|
81
|
-
"generating": [
|
|
82
|
-
{ "source": "[\\u2800-\\u28ff]", "flags": "" },
|
|
83
|
-
{ "source": "esc to (cancel|interrupt|stop)", "flags": "i" },
|
|
84
|
-
{ "source": "generating\\.\\.\\.", "flags": "i" },
|
|
85
|
-
{ "source": "Claude is (?:thinking|processing|working)", "flags": "i" },
|
|
86
|
-
{ "source": "Flummoxing", "flags": "i" },
|
|
87
|
-
{ "source": "Finagling", "flags": "i" },
|
|
88
|
-
{ "source": "Scurrying", "flags": "i" },
|
|
89
|
-
{ "source": "Bloviating", "flags": "i" },
|
|
90
|
-
{ "source": "Whatchamacallit(?:ing)?", "flags": "i" },
|
|
91
|
-
{ "source": "(Thinking|Processing|Working|Analyzing|Planning|Drafting|Synthesizing|Inspecting|Reading|Searching)…?", "flags": "i" }
|
|
92
|
-
],
|
|
93
|
-
"approval": [
|
|
94
|
-
{ "source": "Allow\\s*once", "flags": "i" },
|
|
95
|
-
{ "source": "Always\\s*allow", "flags": "i" },
|
|
96
|
-
{ "source": "\\(y/n\\)", "flags": "i" },
|
|
97
|
-
{ "source": "\\[Y/n\\]", "flags": "i" }
|
|
98
|
-
],
|
|
99
|
-
"ready": [
|
|
100
|
-
{ "source": "for\\s*shortcuts", "flags": "i" },
|
|
101
|
-
{ "source": "[›❯]\\s*$", "flags": "m" }
|
|
102
|
-
],
|
|
103
|
-
"dialog": [
|
|
104
|
-
{ "source": "Quick safety check", "flags": "i" },
|
|
105
|
-
{ "source": "Is this a project", "flags": "i" },
|
|
106
|
-
{ "source": "Enter to confirm", "flags": "i" }
|
|
107
|
-
]
|
|
108
|
-
},
|
|
109
|
-
"approvalKeys": {
|
|
110
|
-
"0": "\r",
|
|
111
|
-
"1": "\u001b[B\r",
|
|
112
|
-
"2": "\u001b[B\u001b[B\r"
|
|
113
|
-
},
|
|
114
|
-
"compatibility": [
|
|
115
|
-
{
|
|
116
|
-
"ideVersion": ">=2.1.0",
|
|
117
|
-
"scriptDir": "scripts/1.0"
|
|
118
|
-
}
|
|
119
|
-
],
|
|
120
|
-
"defaultScriptDir": "scripts/1.0"
|
|
121
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Claude Code — detect_status
|
|
3
|
-
*
|
|
4
|
-
* Uses the current visible PTY screen when available.
|
|
5
|
-
* `tail` is still used as a fallback for older runtimes.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
function splitLines(text) {
|
|
11
|
-
return String(text || '')
|
|
12
|
-
.replace(/\u0007/g, '')
|
|
13
|
-
.split(/\r\n|\n|\r/g)
|
|
14
|
-
.map(line => line.replace(/\s+$/, ''));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function normalize(line) {
|
|
18
|
-
return String(line || '')
|
|
19
|
-
.replace(/\u0007/g, '')
|
|
20
|
-
.replace(/^\d+;/, '')
|
|
21
|
-
.trim();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function isVisiblePrompt(line) {
|
|
25
|
-
return /^❯\s*$/.test(normalize(line));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function isVisibleApproval(line) {
|
|
29
|
-
const trimmed = normalize(line);
|
|
30
|
-
return /Allow\s*once/i.test(trimmed)
|
|
31
|
-
|| /Always\s*allow/i.test(trimmed)
|
|
32
|
-
|| /This command requires approval/i.test(trimmed)
|
|
33
|
-
|| /Do you want to (?:proceed|allow|run)/i.test(trimmed)
|
|
34
|
-
|| /Deny|Reject|Cancel/i.test(trimmed)
|
|
35
|
-
|| /\(y\/n\)/i.test(trimmed)
|
|
36
|
-
|| /\[Y\/n\]/i.test(trimmed)
|
|
37
|
-
|| /^([❯›>]\s*)?\d+[.)]\s+/.test(trimmed);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function isVisibleSpinner(line) {
|
|
41
|
-
const trimmed = normalize(line);
|
|
42
|
-
if (!trimmed) return false;
|
|
43
|
-
if (/^[✻✶✳✢✽⠂⠐⠒⠓⠦⠴⠶⠷⠿]+$/.test(trimmed)) return true;
|
|
44
|
-
if (/esc to (cancel|interrupt|stop)/i.test(trimmed)) return true;
|
|
45
|
-
if (/Running(?:\u2026|\.{3})?$/i.test(trimmed)) return true;
|
|
46
|
-
if (/(?:Finagling|Scurrying|Bloviating|Whatchamacallit(?:ing)?|Hatching|Thinking|Processing|Working|Analyzing|Planning|Drafting|Synthesizing|Inspecting|Reading|Searching|Tinkering|Canoodling|Whirring|Infusing|Accomplishing|Deliberating)\u2026?$/i.test(trimmed)) return true;
|
|
47
|
-
if (/^[A-Z][a-z]+ing\u2026?$/.test(trimmed)) return true;
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
module.exports = function detectStatus(input) {
|
|
52
|
-
const tail = String(input?.tail || '');
|
|
53
|
-
const screenText = String(input?.screenText || '');
|
|
54
|
-
const visibleLines = splitLines(screenText);
|
|
55
|
-
const visibleText = visibleLines.map(normalize).filter(Boolean).join('\n');
|
|
56
|
-
if (visibleText) {
|
|
57
|
-
if (visibleLines.some(isVisibleApproval)) return 'waiting_approval';
|
|
58
|
-
} else if (tail) {
|
|
59
|
-
const hasApproval = /Allow\s*once/i.test(tail)
|
|
60
|
-
|| /Always\s*allow/i.test(tail)
|
|
61
|
-
|| /This command requires approval/i.test(tail)
|
|
62
|
-
|| /Do you want to (?:proceed|allow|run)/i.test(tail)
|
|
63
|
-
|| /\(y\/n\)|\[Y\/n\]/i.test(tail)
|
|
64
|
-
|| /^([❯›>]\s*)?\d+[.)]\s+/m.test(tail);
|
|
65
|
-
if (hasApproval) return 'waiting_approval';
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (visibleLines.length > 0) {
|
|
69
|
-
const hasSpinner = visibleLines.some(isVisibleSpinner);
|
|
70
|
-
if (hasSpinner) return 'generating';
|
|
71
|
-
|
|
72
|
-
const hasPrompt = visibleLines.some(isVisiblePrompt);
|
|
73
|
-
if (hasPrompt) return 'idle';
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (/[\u2800-\u28ff]/.test(tail)) return 'generating';
|
|
77
|
-
if (/esc to (cancel|interrupt|stop)/i.test(tail)) return 'generating';
|
|
78
|
-
if (/Running(?:\u2026|\.{3})?$/im.test(tail)) return 'generating';
|
|
79
|
-
if (/(?:Finagling|Scurrying|Bloviating|Whatchamacallit(?:ing)?|Hatching|Thinking|Processing|Working|Analyzing|Planning|Drafting|Synthesizing|Inspecting|Reading|Searching|Tinkering|Canoodling|Whirring|Infusing|Accomplishing|Deliberating)\u2026?$/i.test(tail)) return 'generating';
|
|
80
|
-
if (/^[A-Z][a-z]+ing\u2026?$/m.test(tail)) return 'generating';
|
|
81
|
-
|
|
82
|
-
return 'idle';
|
|
83
|
-
};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Claude Code — parse_approval
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
function splitLines(text) {
|
|
8
|
-
return String(text || '')
|
|
9
|
-
.replace(/\u0007/g, '')
|
|
10
|
-
.split(/\r\n|\n|\r/g)
|
|
11
|
-
.map(line => line.replace(/\s+$/, ''));
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function normalize(line) {
|
|
15
|
-
return String(line || '')
|
|
16
|
-
.replace(/\u0007/g, '')
|
|
17
|
-
.replace(/^\d+;/, '')
|
|
18
|
-
.trim();
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function isNoise(line) {
|
|
22
|
-
const trimmed = normalize(line);
|
|
23
|
-
if (!trimmed) return true;
|
|
24
|
-
if (/^[─═╭╮╰╯│┌┐└┘├┤┬┴┼]+$/.test(trimmed)) return true;
|
|
25
|
-
if (/^❯\s*$/.test(trimmed)) return true;
|
|
26
|
-
if (/^➜\s+\S+/.test(trimmed)) return true;
|
|
27
|
-
if (/^Update available!/i.test(trimmed)) return true;
|
|
28
|
-
if (/^Claude Code v\d/i.test(trimmed)) return true;
|
|
29
|
-
if (/^(Sonnet|Opus|Haiku)\b/i.test(trimmed)) return true;
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function normalizeButtonLabel(line) {
|
|
34
|
-
return normalize(line)
|
|
35
|
-
.replace(/^[❯›>]\s*/, '')
|
|
36
|
-
.replace(/^[([{]?\d+[)\].:\]-]?\s*/, '')
|
|
37
|
-
.replace(/\s+/g, ' ')
|
|
38
|
-
.trim();
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function isButtonLine(line) {
|
|
42
|
-
const raw = normalize(line);
|
|
43
|
-
const trimmed = normalizeButtonLabel(line);
|
|
44
|
-
if (/^Esc to cancel/i.test(raw)) return false;
|
|
45
|
-
return /^([❯›>]\s*)?\d+[.)]\s+/.test(raw)
|
|
46
|
-
|| /^(Allow\s*once|Always\s*allow.*|Deny|Reject|Yes|No)$/i.test(trimmed);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function stripContextPrefix(line) {
|
|
50
|
-
return normalize(line)
|
|
51
|
-
.replace(/^[⏺•]\s+/, '')
|
|
52
|
-
.replace(/\s+/g, ' ')
|
|
53
|
-
.trim();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function findLastIndex(lines, predicate) {
|
|
57
|
-
for (let i = lines.length - 1; i >= 0; i--) {
|
|
58
|
-
if (predicate(lines[i])) return i;
|
|
59
|
-
}
|
|
60
|
-
return -1;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
module.exports = function parseApproval(input) {
|
|
64
|
-
const primary = String(input?.buffer || '');
|
|
65
|
-
const fallback = String(input?.tail || '');
|
|
66
|
-
const lines = splitLines(primary || fallback);
|
|
67
|
-
if (lines.length === 0) return null;
|
|
68
|
-
|
|
69
|
-
const buttons = [];
|
|
70
|
-
for (const line of lines.slice(-40)) {
|
|
71
|
-
if (!isButtonLine(line)) continue;
|
|
72
|
-
const label = normalizeButtonLabel(line);
|
|
73
|
-
if (label && !buttons.includes(label)) buttons.push(label);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const hasApproval = buttons.length > 0
|
|
77
|
-
|| /Allow\s*once|Always\s*allow|\(y\/n\)|\[Y\/n\]/i.test(primary || fallback);
|
|
78
|
-
if (!hasApproval) return null;
|
|
79
|
-
|
|
80
|
-
const questionIndex = findLastIndex(lines, line => /Do you want to (?:proceed|make this edit|run this command|allow)/i.test(normalize(line)));
|
|
81
|
-
const actionIndex = findLastIndex(lines, line => /^(?:[⏺•]\s+)?(?:Bash|Write|Edit|MultiEdit|Read|Task|Glob|Grep|LS|NotebookEdit)\(/.test(stripContextPrefix(line)));
|
|
82
|
-
const startIndex = Math.max(0, (actionIndex >= 0 ? actionIndex : questionIndex >= 0 ? questionIndex - 4 : lines.length - 8));
|
|
83
|
-
const endIndex = questionIndex >= 0 ? questionIndex + 1 : lines.length;
|
|
84
|
-
|
|
85
|
-
const context = [];
|
|
86
|
-
for (const line of lines.slice(startIndex, endIndex)) {
|
|
87
|
-
if (isNoise(line) || isButtonLine(line)) continue;
|
|
88
|
-
const trimmed = stripContextPrefix(line);
|
|
89
|
-
if (!trimmed) continue;
|
|
90
|
-
if (context[context.length - 1] !== trimmed) context.push(trimmed);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
return {
|
|
94
|
-
message: context.slice(-3).join(' ').slice(0, 240) || 'Claude Code approval required',
|
|
95
|
-
buttons: buttons.length > 0 ? buttons : ['Allow once', 'Always allow', 'Deny'],
|
|
96
|
-
};
|
|
97
|
-
};
|