@adhdev/daemon-core 0.6.57 → 0.6.59
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 +18 -1
- package/dist/index.js +339 -167
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/cli-adapters/provider-cli-adapter.ts +223 -48
- package/src/commands/chat-commands.ts +7 -1
- package/src/config/chat-history.ts +53 -1
- package/src/daemon/dev-server.ts +7 -9
- package/src/detection/ide-detector.ts +1 -1
- package/src/providers/cli-provider-instance.ts +10 -23
- package/src/providers/provider-instance.ts +1 -0
- package/src/providers/provider-loader.ts +3 -6
- package/src/providers/version-archive.ts +4 -1
- 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 -49
- package/providers/_builtin/cli/aider-cli/scripts/1.0/scripts.js +0 -7
- package/providers/_builtin/cli/claude-cli/provider.json +0 -109
- package/providers/_builtin/cli/claude-cli/scripts/1.0/detect_status.js +0 -31
- package/providers/_builtin/cli/claude-cli/scripts/1.0/parse_approval.js +0 -38
- package/providers/_builtin/cli/claude-cli/scripts/1.0/parse_output.js +0 -164
- package/providers/_builtin/cli/claude-cli/scripts/1.0/scripts.js +0 -42
- package/providers/_builtin/cli/codex-cli/provider.json +0 -88
- package/providers/_builtin/cli/codex-cli/scripts/1.0/detect_status.js +0 -20
- package/providers/_builtin/cli/codex-cli/scripts/1.0/parse_approval.js +0 -15
- package/providers/_builtin/cli/codex-cli/scripts/1.0/parse_output.js +0 -68
- 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 -70
- 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,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub Copilot CLI — detect_status
|
|
3
|
-
* `gh copilot` uses a conversational interface.
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
module.exports = function detectStatus(input) {
|
|
7
|
-
const { tail } = input;
|
|
8
|
-
if (!tail) return 'idle';
|
|
9
|
-
// waiting_approval
|
|
10
|
-
if (/execute\s*command/i.test(tail) && /\[Y\/n\]/i.test(tail)) return 'waiting_approval';
|
|
11
|
-
if (/approve|confirm/i.test(tail) && /\(y\/n\)/i.test(tail)) return 'waiting_approval';
|
|
12
|
-
if (/Run\s*this/i.test(tail) && /deny|cancel|no/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|generating|processing/i.test(tail)) return 'generating';
|
|
17
|
-
if (/\.{3,}$/.test(tail.trim())) return 'generating';
|
|
18
|
-
return 'idle';
|
|
19
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = function parseApproval(input) {
|
|
3
|
-
const { tail } = input;
|
|
4
|
-
if (!tail) return null;
|
|
5
|
-
const hasApproval = /execute\s*command/i.test(tail) || /\(y\/n\)/i.test(tail) || /\[Y\/n\]/i.test(tail);
|
|
6
|
-
if (!hasApproval) return null;
|
|
7
|
-
const lines = tail.split('\n').map(l => l.trim()).filter(l => l && !/^[─═╭╮╰╯│]+$/.test(l));
|
|
8
|
-
return { message: lines.slice(-5).join(' ').slice(0, 200) || 'Execute command?', buttons: ['Yes', 'No'] };
|
|
9
|
-
};
|
|
@@ -1,48 +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
|
-
const userMatch = trimmed.match(/^[❯›>$?]\s+(.+)$/);
|
|
13
|
-
if (userMatch && userMatch[1].length > 1) {
|
|
14
|
-
started = true;
|
|
15
|
-
if (currentRole && currentContent.length > 0) {
|
|
16
|
-
const text = currentContent.join('\n').trim();
|
|
17
|
-
if (text.length > 1) { messages.push({ id: `msg_${msgIndex}`, role: currentRole, content: text.slice(0, 6000), index: msgIndex, kind: 'standard' }); msgIndex++; }
|
|
18
|
-
}
|
|
19
|
-
currentRole = 'user'; currentContent = [userMatch[1]]; continue;
|
|
20
|
-
}
|
|
21
|
-
if (!started) continue;
|
|
22
|
-
if (currentRole === 'user' && trimmed && !userMatch) {
|
|
23
|
-
const text = currentContent.join('\n').trim();
|
|
24
|
-
if (text.length > 1) { messages.push({ id: `msg_${msgIndex}`, role: 'user', content: text, index: msgIndex, kind: 'standard' }); msgIndex++; }
|
|
25
|
-
currentRole = 'assistant'; currentContent = [];
|
|
26
|
-
}
|
|
27
|
-
if (!trimmed || /^[─═╭╮╰╯│]+$/.test(trimmed) || /^[\u2800-\u28ff]+$/.test(trimmed)) continue;
|
|
28
|
-
if (currentRole) currentContent.push(trimmed);
|
|
29
|
-
}
|
|
30
|
-
if (currentRole && currentContent.length > 0) {
|
|
31
|
-
const text = currentContent.join('\n').trim();
|
|
32
|
-
if (text.length > 1) messages.push({ id: `msg_${msgIndex}`, role: currentRole, content: text.slice(0, 6000), index: msgIndex, kind: 'standard' });
|
|
33
|
-
}
|
|
34
|
-
return messages.length > 50 ? messages.slice(-50) : messages;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
module.exports = function parseOutput(input) {
|
|
38
|
-
const { buffer, recentBuffer, partialResponse, screenText } = input;
|
|
39
|
-
const transcript = screenText || buffer;
|
|
40
|
-
const tail = recentBuffer || (transcript || '').slice(-500);
|
|
41
|
-
const status = detectStatus({ tail });
|
|
42
|
-
const activeModal = status === 'waiting_approval' ? parseApproval({ buffer: transcript, tail }) : null;
|
|
43
|
-
const messages = splitTurns(transcript);
|
|
44
|
-
if (status === 'generating' && partialResponse && partialResponse.trim().length > 2) {
|
|
45
|
-
messages.push({ id: 'msg_partial', role: 'assistant', content: partialResponse.trim().slice(0, 6000), index: messages.length, kind: 'standard', meta: { streaming: true } });
|
|
46
|
-
}
|
|
47
|
-
return { id: 'cli_session', status, title: 'GitHub Copilot CLI', messages, activeModal };
|
|
48
|
-
};
|
|
@@ -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,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "goose-cli",
|
|
3
|
-
"name": "Goose",
|
|
4
|
-
"category": "cli",
|
|
5
|
-
"aliases": [
|
|
6
|
-
"goose"
|
|
7
|
-
],
|
|
8
|
-
"icon": "🤖",
|
|
9
|
-
"displayName": "Goose",
|
|
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": "goose",
|
|
24
|
-
"spawn": {
|
|
25
|
-
"command": "goose",
|
|
26
|
-
"args": [],
|
|
27
|
-
"shell": true,
|
|
28
|
-
"env": {}
|
|
29
|
-
},
|
|
30
|
-
"compatibility": [
|
|
31
|
-
{
|
|
32
|
-
"ideVersion": ">=3.20.0",
|
|
33
|
-
"scriptDir": "scripts/1.0"
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"defaultScriptDir": "scripts/1.0"
|
|
37
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Goose — detect_status
|
|
3
|
-
* Goose is an autonomous AI agent that uses MCP and tools.
|
|
4
|
-
* It typically shows 'thinking...' and uses tool calls.
|
|
5
|
-
*/
|
|
6
|
-
'use strict';
|
|
7
|
-
module.exports = function detectStatus(input) {
|
|
8
|
-
const { tail } = input;
|
|
9
|
-
if (!tail) return 'idle';
|
|
10
|
-
// Goose approval
|
|
11
|
-
if (/approve|confirm/i.test(tail) && /deny|cancel/i.test(tail)) return 'waiting_approval';
|
|
12
|
-
if (/\(y\/n\)/i.test(tail)) return 'waiting_approval';
|
|
13
|
-
if (/Allow.*tool/i.test(tail)) return 'waiting_approval';
|
|
14
|
-
// generating
|
|
15
|
-
if (/[\u2800-\u28ff]/.test(tail)) return 'generating';
|
|
16
|
-
if (/[⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]/.test(tail)) return 'generating';
|
|
17
|
-
if (/thinking|processing|working|running/i.test(tail)) return 'generating';
|
|
18
|
-
if (/─.*tool.*─/i.test(tail)) return 'generating';
|
|
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 = (/approve|confirm/i.test(tail) && /deny|cancel/i.test(tail)) ||
|
|
6
|
-
/\(y\/n\)/i.test(tail) || /Allow.*tool/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: ['Approve', 'Deny'] };
|
|
10
|
-
};
|
|
@@ -1,48 +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
|
-
const userMatch = trimmed.match(/^[❯›>$]\s+(.+)$/);
|
|
13
|
-
if (userMatch && userMatch[1].length > 1) {
|
|
14
|
-
started = true;
|
|
15
|
-
if (currentRole && currentContent.length > 0) {
|
|
16
|
-
const text = currentContent.join('\n').trim();
|
|
17
|
-
if (text.length > 1) { messages.push({ id: `msg_${msgIndex}`, role: currentRole, content: text.slice(0, 6000), index: msgIndex, kind: 'standard' }); msgIndex++; }
|
|
18
|
-
}
|
|
19
|
-
currentRole = 'user'; currentContent = [userMatch[1]]; continue;
|
|
20
|
-
}
|
|
21
|
-
if (!started) continue;
|
|
22
|
-
if (currentRole === 'user' && trimmed && !userMatch) {
|
|
23
|
-
const text = currentContent.join('\n').trim();
|
|
24
|
-
if (text.length > 1) { messages.push({ id: `msg_${msgIndex}`, role: 'user', content: text, index: msgIndex, kind: 'standard' }); msgIndex++; }
|
|
25
|
-
currentRole = 'assistant'; currentContent = [];
|
|
26
|
-
}
|
|
27
|
-
if (!trimmed || /^[─═╭╮╰╯│]+$/.test(trimmed) || /^[\u2800-\u28ff]+$/.test(trimmed)) continue;
|
|
28
|
-
if (currentRole) currentContent.push(trimmed);
|
|
29
|
-
}
|
|
30
|
-
if (currentRole && currentContent.length > 0) {
|
|
31
|
-
const text = currentContent.join('\n').trim();
|
|
32
|
-
if (text.length > 1) messages.push({ id: `msg_${msgIndex}`, role: currentRole, content: text.slice(0, 6000), index: msgIndex, kind: 'standard' });
|
|
33
|
-
}
|
|
34
|
-
return messages.length > 50 ? messages.slice(-50) : messages;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
module.exports = function parseOutput(input) {
|
|
38
|
-
const { buffer, recentBuffer, partialResponse, screenText } = input;
|
|
39
|
-
const transcript = screenText || buffer;
|
|
40
|
-
const tail = recentBuffer || (transcript || '').slice(-500);
|
|
41
|
-
const status = detectStatus({ tail });
|
|
42
|
-
const activeModal = status === 'waiting_approval' ? parseApproval({ buffer: transcript, tail }) : null;
|
|
43
|
-
const messages = splitTurns(transcript);
|
|
44
|
-
if (status === 'generating' && partialResponse && partialResponse.trim().length > 2) {
|
|
45
|
-
messages.push({ id: 'msg_partial', role: 'assistant', content: partialResponse.trim().slice(0, 6000), index: messages.length, kind: 'standard', meta: { streaming: true } });
|
|
46
|
-
}
|
|
47
|
-
return { id: 'cli_session', status, title: 'Goose', messages, activeModal };
|
|
48
|
-
};
|
|
@@ -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,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "opencode-cli",
|
|
3
|
-
"name": "OpenCode CLI",
|
|
4
|
-
"category": "cli",
|
|
5
|
-
"aliases": [
|
|
6
|
-
"opencode"
|
|
7
|
-
],
|
|
8
|
-
"icon": "🤖",
|
|
9
|
-
"displayName": "OpenCode CLI",
|
|
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": "opencode",
|
|
24
|
-
"spawn": {
|
|
25
|
-
"command": "opencode",
|
|
26
|
-
"args": [],
|
|
27
|
-
"shell": true,
|
|
28
|
-
"env": {}
|
|
29
|
-
},
|
|
30
|
-
"compatibility": [
|
|
31
|
-
{
|
|
32
|
-
"ideVersion": ">=1.3.0",
|
|
33
|
-
"scriptDir": "scripts/1.0"
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"defaultScriptDir": "scripts/1.0"
|
|
37
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OpenCode CLI — detect_status
|
|
3
|
-
* OpenCode uses a TUI that resembles a chat interface.
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
module.exports = function detectStatus(input) {
|
|
7
|
-
const { tail } = input;
|
|
8
|
-
if (!tail) return 'idle';
|
|
9
|
-
if (/Allow|Deny|approve|reject/i.test(tail) && /\(y\/n\)|confirm/i.test(tail)) return 'waiting_approval';
|
|
10
|
-
if (/[\u2800-\u28ff]/.test(tail)) return 'generating';
|
|
11
|
-
if (/[⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]/.test(tail)) return 'generating';
|
|
12
|
-
if (/thinking|generating|processing|running/i.test(tail)) return 'generating';
|
|
13
|
-
if (/esc to (cancel|stop)/i.test(tail)) return 'generating';
|
|
14
|
-
return 'idle';
|
|
15
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = function parseApproval(input) {
|
|
3
|
-
const { tail } = input;
|
|
4
|
-
if (!tail) return null;
|
|
5
|
-
const hasApproval = /Allow|approve/i.test(tail) && /Deny|reject/i.test(tail);
|
|
6
|
-
if (!hasApproval && !/\(y\/n\)/i.test(tail)) return null;
|
|
7
|
-
const lines = tail.split('\n').map(l => l.trim()).filter(l => l && !/^[─═╭╮╰╯│]+$/.test(l));
|
|
8
|
-
return { message: lines.slice(-5).join(' ').slice(0, 200) || 'Approval required', buttons: ['Allow', 'Deny'] };
|
|
9
|
-
};
|
|
@@ -1,48 +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
|
-
const userMatch = trimmed.match(/^[❯›>$]\s+(.+)$/);
|
|
13
|
-
if (userMatch && userMatch[1].length > 1) {
|
|
14
|
-
started = true;
|
|
15
|
-
if (currentRole && currentContent.length > 0) {
|
|
16
|
-
const text = currentContent.join('\n').trim();
|
|
17
|
-
if (text.length > 1) { messages.push({ id: `msg_${msgIndex}`, role: currentRole, content: text.slice(0, 6000), index: msgIndex, kind: 'standard' }); msgIndex++; }
|
|
18
|
-
}
|
|
19
|
-
currentRole = 'user'; currentContent = [userMatch[1]]; continue;
|
|
20
|
-
}
|
|
21
|
-
if (!started) continue;
|
|
22
|
-
if (currentRole === 'user' && trimmed && !userMatch) {
|
|
23
|
-
const text = currentContent.join('\n').trim();
|
|
24
|
-
if (text.length > 1) { messages.push({ id: `msg_${msgIndex}`, role: 'user', content: text, index: msgIndex, kind: 'standard' }); msgIndex++; }
|
|
25
|
-
currentRole = 'assistant'; currentContent = [];
|
|
26
|
-
}
|
|
27
|
-
if (!trimmed || /^[─═╭╮╰╯│]+$/.test(trimmed) || /^[\u2800-\u28ff]+$/.test(trimmed)) continue;
|
|
28
|
-
if (currentRole) currentContent.push(trimmed);
|
|
29
|
-
}
|
|
30
|
-
if (currentRole && currentContent.length > 0) {
|
|
31
|
-
const text = currentContent.join('\n').trim();
|
|
32
|
-
if (text.length > 1) messages.push({ id: `msg_${msgIndex}`, role: currentRole, content: text.slice(0, 6000), index: msgIndex, kind: 'standard' });
|
|
33
|
-
}
|
|
34
|
-
return messages.length > 50 ? messages.slice(-50) : messages;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
module.exports = function parseOutput(input) {
|
|
38
|
-
const { buffer, recentBuffer, partialResponse, screenText } = input;
|
|
39
|
-
const transcript = screenText || buffer;
|
|
40
|
-
const tail = recentBuffer || (transcript || '').slice(-500);
|
|
41
|
-
const status = detectStatus({ tail });
|
|
42
|
-
const activeModal = status === 'waiting_approval' ? parseApproval({ buffer: transcript, tail }) : null;
|
|
43
|
-
const messages = splitTurns(transcript);
|
|
44
|
-
if (status === 'generating' && partialResponse && partialResponse.trim().length > 2) {
|
|
45
|
-
messages.push({ id: 'msg_partial', role: 'assistant', content: partialResponse.trim().slice(0, 6000), index: messages.length, kind: 'standard', meta: { streaming: true } });
|
|
46
|
-
}
|
|
47
|
-
return { id: 'cli_session', status, title: 'OpenCode CLI', messages, activeModal };
|
|
48
|
-
};
|
|
@@ -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; };
|