@adhdev/daemon-core 0.5.3
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 +2662 -0
- package/dist/index.js +11341 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -0
- package/providers/_builtin/.github/workflows/generate-registry.yml +57 -0
- package/providers/_builtin/COMPATIBILITY.md +217 -0
- package/providers/_builtin/CONTRIBUTING.md +200 -0
- package/providers/_builtin/README.md +119 -0
- package/providers/_builtin/_helpers/index.js +188 -0
- package/providers/_builtin/acp/agentpool/provider.json +54 -0
- package/providers/_builtin/acp/amp/provider.json +52 -0
- package/providers/_builtin/acp/auggie/provider.json +57 -0
- package/providers/_builtin/acp/autodev/provider.json +54 -0
- package/providers/_builtin/acp/autohand/provider.json +52 -0
- package/providers/_builtin/acp/blackbox-ai/provider.json +54 -0
- package/providers/_builtin/acp/claude-agent/provider.json +57 -0
- package/providers/_builtin/acp/cline-acp/provider.json +54 -0
- package/providers/_builtin/acp/codebuddy/provider.json +54 -0
- package/providers/_builtin/acp/codex-cli/provider.json +57 -0
- package/providers/_builtin/acp/corust-agent/provider.json +52 -0
- package/providers/_builtin/acp/crow-cli/provider.json +54 -0
- package/providers/_builtin/acp/cursor-acp/provider.json +54 -0
- package/providers/_builtin/acp/deepagents/provider.json +52 -0
- package/providers/_builtin/acp/dimcode/provider.json +54 -0
- package/providers/_builtin/acp/docker-cagent/provider.json +57 -0
- package/providers/_builtin/acp/factory-droid/provider.json +60 -0
- package/providers/_builtin/acp/fast-agent/provider.json +52 -0
- package/providers/_builtin/acp/gemini-cli/provider.json +114 -0
- package/providers/_builtin/acp/github-copilot/provider.json +54 -0
- package/providers/_builtin/acp/goose/provider.json +57 -0
- package/providers/_builtin/acp/junie/provider.json +52 -0
- package/providers/_builtin/acp/kilo/provider.json +54 -0
- package/providers/_builtin/acp/kimi-cli/provider.json +57 -0
- package/providers/_builtin/acp/minion-code/provider.json +52 -0
- package/providers/_builtin/acp/mistral-vibe/provider.json +57 -0
- package/providers/_builtin/acp/nova/provider.json +54 -0
- package/providers/_builtin/acp/openclaw/provider.json +54 -0
- package/providers/_builtin/acp/opencode/provider.json +52 -0
- package/providers/_builtin/acp/openhands/provider.json +54 -0
- package/providers/_builtin/acp/pi-acp/provider.json +52 -0
- package/providers/_builtin/acp/qoder/provider.json +54 -0
- package/providers/_builtin/acp/qwen-code/provider.json +60 -0
- package/providers/_builtin/acp/stakpak/provider.json +54 -0
- package/providers/_builtin/acp/vtcode/provider.json +54 -0
- package/providers/_builtin/cli/claude-cli/provider.json +100 -0
- package/providers/_builtin/cli/codex-cli/provider.json +89 -0
- package/providers/_builtin/cli/gemini-cli/provider.json +93 -0
- package/providers/_builtin/docs/CDP_SELECTOR_GUIDE.md +370 -0
- package/providers/_builtin/docs/PROVIDER_GUIDE.md +916 -0
- package/providers/_builtin/extension/cline/provider.json +35 -0
- package/providers/_builtin/extension/cline/scripts/focus_editor.js +48 -0
- package/providers/_builtin/extension/cline/scripts/list_chats.js +100 -0
- package/providers/_builtin/extension/cline/scripts/list_models.js +43 -0
- package/providers/_builtin/extension/cline/scripts/list_modes.js +35 -0
- package/providers/_builtin/extension/cline/scripts/new_session.js +85 -0
- package/providers/_builtin/extension/cline/scripts/open_panel.js +25 -0
- package/providers/_builtin/extension/cline/scripts/read_chat.js +257 -0
- package/providers/_builtin/extension/cline/scripts/resolve_action.js +83 -0
- package/providers/_builtin/extension/cline/scripts/send_message.js +95 -0
- package/providers/_builtin/extension/cline/scripts/set_mode.js +36 -0
- package/providers/_builtin/extension/cline/scripts/set_model.js +36 -0
- package/providers/_builtin/extension/cline/scripts/switch_session.js +206 -0
- package/providers/_builtin/extension/cline/scripts.js +73 -0
- package/providers/_builtin/extension/roo-code/provider.json +35 -0
- package/providers/_builtin/extension/roo-code/scripts.js +659 -0
- package/providers/_builtin/ide/antigravity/provider.json +68 -0
- package/providers/_builtin/ide/antigravity/scripts/1.106/focus_editor.js +20 -0
- package/providers/_builtin/ide/antigravity/scripts/1.106/list_chats.js +137 -0
- package/providers/_builtin/ide/antigravity/scripts/1.106/list_models.js +38 -0
- package/providers/_builtin/ide/antigravity/scripts/1.106/list_modes.js +48 -0
- package/providers/_builtin/ide/antigravity/scripts/1.106/new_session.js +75 -0
- package/providers/_builtin/ide/antigravity/scripts/1.106/read_chat.js +262 -0
- package/providers/_builtin/ide/antigravity/scripts/1.106/resolve_action.js +68 -0
- package/providers/_builtin/ide/antigravity/scripts/1.106/scripts.js +57 -0
- package/providers/_builtin/ide/antigravity/scripts/1.106/send_message.js +56 -0
- package/providers/_builtin/ide/antigravity/scripts/1.106/set_mode.js +34 -0
- package/providers/_builtin/ide/antigravity/scripts/1.106/set_model.js +47 -0
- package/providers/_builtin/ide/antigravity/scripts/1.106/switch_session.js +114 -0
- package/providers/_builtin/ide/antigravity/scripts/1.107/focus_editor.js +20 -0
- package/providers/_builtin/ide/antigravity/scripts/1.107/list_chats.js +137 -0
- package/providers/_builtin/ide/antigravity/scripts/1.107/list_models.js +61 -0
- package/providers/_builtin/ide/antigravity/scripts/1.107/list_modes.js +72 -0
- package/providers/_builtin/ide/antigravity/scripts/1.107/new_session.js +75 -0
- package/providers/_builtin/ide/antigravity/scripts/1.107/read_chat.js +262 -0
- package/providers/_builtin/ide/antigravity/scripts/1.107/resolve_action.js +68 -0
- package/providers/_builtin/ide/antigravity/scripts/1.107/scripts.js +67 -0
- package/providers/_builtin/ide/antigravity/scripts/1.107/send_message.js +56 -0
- package/providers/_builtin/ide/antigravity/scripts/1.107/set_mode.js +67 -0
- package/providers/_builtin/ide/antigravity/scripts/1.107/set_model.js +72 -0
- package/providers/_builtin/ide/antigravity/scripts/1.107/switch_session.js +114 -0
- package/providers/_builtin/ide/cursor/provider.json +70 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/dismiss_notification.js +30 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/focus_editor.js +13 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/list_models.js +78 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/list_modes.js +40 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/list_notifications.js +23 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/list_sessions.js +42 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/new_session.js +20 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/open_panel.js +23 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/read_chat.js +75 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/resolve_action.js +19 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/scripts.js +78 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/send_message.js +23 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/set_mode.js +38 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/set_model.js +81 -0
- package/providers/_builtin/ide/cursor/scripts/0.49/switch_session.js +28 -0
- package/providers/_builtin/ide/kiro/provider.json +67 -0
- package/providers/_builtin/ide/kiro/scripts/focus_editor.js +20 -0
- package/providers/_builtin/ide/kiro/scripts/open_panel.js +47 -0
- package/providers/_builtin/ide/kiro/scripts/resolve_action.js +54 -0
- package/providers/_builtin/ide/kiro/scripts/send_message.js +29 -0
- package/providers/_builtin/ide/kiro/scripts/webview_list_models.js +39 -0
- package/providers/_builtin/ide/kiro/scripts/webview_list_modes.js +39 -0
- package/providers/_builtin/ide/kiro/scripts/webview_list_sessions.js +21 -0
- package/providers/_builtin/ide/kiro/scripts/webview_new_session.js +34 -0
- package/providers/_builtin/ide/kiro/scripts/webview_read_chat.js +68 -0
- package/providers/_builtin/ide/kiro/scripts/webview_send_message.js +72 -0
- package/providers/_builtin/ide/kiro/scripts/webview_set_mode.js +15 -0
- package/providers/_builtin/ide/kiro/scripts/webview_set_model.js +15 -0
- package/providers/_builtin/ide/kiro/scripts/webview_switch_session.js +26 -0
- package/providers/_builtin/ide/kiro/scripts.js +62 -0
- package/providers/_builtin/ide/pearai/provider.json +67 -0
- package/providers/_builtin/ide/pearai/scripts/focus_editor.js +20 -0
- package/providers/_builtin/ide/pearai/scripts/list_sessions.js +38 -0
- package/providers/_builtin/ide/pearai/scripts/new_session.js +55 -0
- package/providers/_builtin/ide/pearai/scripts/open_panel.js +46 -0
- package/providers/_builtin/ide/pearai/scripts/resolve_action.js +54 -0
- package/providers/_builtin/ide/pearai/scripts/send_message.js +29 -0
- package/providers/_builtin/ide/pearai/scripts/webview_list_models.js +43 -0
- package/providers/_builtin/ide/pearai/scripts/webview_list_modes.js +35 -0
- package/providers/_builtin/ide/pearai/scripts/webview_list_sessions.js +62 -0
- package/providers/_builtin/ide/pearai/scripts/webview_new_session.js +49 -0
- package/providers/_builtin/ide/pearai/scripts/webview_read_chat.js +92 -0
- package/providers/_builtin/ide/pearai/scripts/webview_resolve_action.js +59 -0
- package/providers/_builtin/ide/pearai/scripts/webview_send_message.js +72 -0
- package/providers/_builtin/ide/pearai/scripts/webview_set_mode.js +36 -0
- package/providers/_builtin/ide/pearai/scripts/webview_set_model.js +36 -0
- package/providers/_builtin/ide/pearai/scripts/webview_switch_session.js +34 -0
- package/providers/_builtin/ide/pearai/scripts.js +74 -0
- package/providers/_builtin/ide/trae/provider.json +66 -0
- package/providers/_builtin/ide/trae/scripts/focus_editor.js +20 -0
- package/providers/_builtin/ide/trae/scripts/list_chats.js +24 -0
- package/providers/_builtin/ide/trae/scripts/list_models.js +39 -0
- package/providers/_builtin/ide/trae/scripts/list_modes.js +39 -0
- package/providers/_builtin/ide/trae/scripts/new_session.js +30 -0
- package/providers/_builtin/ide/trae/scripts/open_panel.js +44 -0
- package/providers/_builtin/ide/trae/scripts/read_chat.js +113 -0
- package/providers/_builtin/ide/trae/scripts/resolve_action.js +54 -0
- package/providers/_builtin/ide/trae/scripts/send_message.js +69 -0
- package/providers/_builtin/ide/trae/scripts/set_mode.js +15 -0
- package/providers/_builtin/ide/trae/scripts/set_model.js +15 -0
- package/providers/_builtin/ide/trae/scripts/switch_session.js +23 -0
- package/providers/_builtin/ide/trae/scripts.js +57 -0
- package/providers/_builtin/ide/vscode/provider.json +64 -0
- package/providers/_builtin/ide/vscode-insiders/provider.json +62 -0
- package/providers/_builtin/ide/vscodium/provider.json +63 -0
- package/providers/_builtin/ide/windsurf/provider.json +53 -0
- package/providers/_builtin/ide/windsurf/scripts/focus_editor.js +30 -0
- package/providers/_builtin/ide/windsurf/scripts/list_chats.js +117 -0
- package/providers/_builtin/ide/windsurf/scripts/list_models.js +39 -0
- package/providers/_builtin/ide/windsurf/scripts/list_modes.js +39 -0
- package/providers/_builtin/ide/windsurf/scripts/new_session.js +69 -0
- package/providers/_builtin/ide/windsurf/scripts/open_panel.js +58 -0
- package/providers/_builtin/ide/windsurf/scripts/read_chat.js +297 -0
- package/providers/_builtin/ide/windsurf/scripts/resolve_action.js +68 -0
- package/providers/_builtin/ide/windsurf/scripts/send_message.js +87 -0
- package/providers/_builtin/ide/windsurf/scripts/set_mode.js +15 -0
- package/providers/_builtin/ide/windsurf/scripts/set_model.js +15 -0
- package/providers/_builtin/ide/windsurf/scripts/switch_session.js +58 -0
- package/providers/_builtin/ide/windsurf/scripts.js +57 -0
- package/providers/_builtin/registry.json +266 -0
- package/providers/_builtin/validate.js +156 -0
- package/src/agent-stream/index.ts +6 -0
- package/src/agent-stream/manager.ts +286 -0
- package/src/agent-stream/poller.ts +154 -0
- package/src/agent-stream/provider-adapter.ts +138 -0
- package/src/agent-stream/types.ts +61 -0
- package/src/boot/daemon-lifecycle.ts +252 -0
- package/src/cdp/devtools.ts +335 -0
- package/src/cdp/initializer.ts +191 -0
- package/src/cdp/manager.ts +897 -0
- package/src/cdp/scanner.ts +185 -0
- package/src/cdp/setup.ts +150 -0
- package/src/cli-adapter-types.ts +25 -0
- package/src/cli-adapters/provider-cli-adapter.ts +448 -0
- package/src/commands/cdp-commands.ts +208 -0
- package/src/commands/chat-commands.ts +675 -0
- package/src/commands/cli-manager.ts +353 -0
- package/src/commands/handler.ts +328 -0
- package/src/commands/router.ts +258 -0
- package/src/commands/stream-commands.ts +325 -0
- package/src/config/chat-history.ts +211 -0
- package/src/config/config.ts +219 -0
- package/src/daemon/dev-server.ts +2378 -0
- package/src/daemon/scaffold-template.ts +394 -0
- package/src/daemon-core.ts +50 -0
- package/src/detection/cli-detector.ts +89 -0
- package/src/detection/ide-detector.ts +157 -0
- package/src/index.ts +103 -0
- package/src/installer.ts +263 -0
- package/src/ipc-protocol.ts +133 -0
- package/src/launch.ts +433 -0
- package/src/logging/command-log.ts +180 -0
- package/src/logging/logger.ts +316 -0
- package/src/providers/acp-provider-instance.ts +1140 -0
- package/src/providers/cli-provider-instance.ts +207 -0
- package/src/providers/contracts.ts +524 -0
- package/src/providers/extension-provider-instance.ts +156 -0
- package/src/providers/ide-provider-instance.ts +377 -0
- package/src/providers/index.ts +18 -0
- package/src/providers/provider-instance-manager.ts +182 -0
- package/src/providers/provider-instance.ts +112 -0
- package/src/providers/provider-loader.ts +1031 -0
- package/src/providers/status-monitor.ts +125 -0
- package/src/providers/version-archive.ts +266 -0
- package/src/status/reporter.ts +294 -0
- package/src/types.ts +206 -0
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adhdev/daemon-core",
|
|
3
|
+
"version": "0.5.3",
|
|
4
|
+
"description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsup",
|
|
15
|
+
"dev": "tsup --watch"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"src",
|
|
20
|
+
"providers"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"adhdev",
|
|
24
|
+
"daemon",
|
|
25
|
+
"cdp",
|
|
26
|
+
"ide-detection"
|
|
27
|
+
],
|
|
28
|
+
"author": "vilmire",
|
|
29
|
+
"license": "AGPL-3.0-or-later",
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@agentclientprotocol/sdk": "^0.16.1",
|
|
32
|
+
"chalk": "^5.3.0",
|
|
33
|
+
"conf": "^13.0.0",
|
|
34
|
+
"ws": "^8.19.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^22.0.0",
|
|
38
|
+
"@types/ws": "^8.18.1",
|
|
39
|
+
"tsup": "^8.2.0",
|
|
40
|
+
"typescript": "^5.5.0"
|
|
41
|
+
},
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "https://github.com/vilmire/adhdev.git",
|
|
45
|
+
"directory": "packages/daemon-core"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/vilmire/adhdev#readme"
|
|
48
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Generate Registry
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
paths:
|
|
6
|
+
- '**/provider.json'
|
|
7
|
+
- '**/scripts.js'
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
generate-registry:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Generate registry.json
|
|
18
|
+
run: |
|
|
19
|
+
python3 -c "
|
|
20
|
+
import json, glob
|
|
21
|
+
|
|
22
|
+
registry = {'version': '$(date +%Y.%m.%d)', 'providers': {}}
|
|
23
|
+
|
|
24
|
+
for pj in sorted(glob.glob('**/provider.json', recursive=True)):
|
|
25
|
+
parts = pj.split('/')
|
|
26
|
+
# Skip version subdirs (1.107/, 0.48/ etc)
|
|
27
|
+
if any(p[0].isdigit() and '.' in p for p in parts):
|
|
28
|
+
continue
|
|
29
|
+
if 'legacy' in parts:
|
|
30
|
+
continue
|
|
31
|
+
try:
|
|
32
|
+
with open(pj) as f:
|
|
33
|
+
d = json.load(f)
|
|
34
|
+
if 'type' not in d or 'category' not in d:
|
|
35
|
+
continue
|
|
36
|
+
entry = {
|
|
37
|
+
'providerVersion': d.get('providerVersion', '0.0.0'),
|
|
38
|
+
'category': d['category'],
|
|
39
|
+
'name': d.get('name', d['type']),
|
|
40
|
+
}
|
|
41
|
+
if d.get('compatibility'):
|
|
42
|
+
entry['compatibility'] = d['compatibility']
|
|
43
|
+
registry['providers'][d['type']] = entry
|
|
44
|
+
except: pass
|
|
45
|
+
|
|
46
|
+
with open('registry.json', 'w') as f:
|
|
47
|
+
json.dump(registry, f, indent=2, ensure_ascii=False)
|
|
48
|
+
print(f'Generated registry.json with {len(registry[\"providers\"])} providers')
|
|
49
|
+
"
|
|
50
|
+
|
|
51
|
+
- name: Commit registry.json
|
|
52
|
+
run: |
|
|
53
|
+
git config user.name "github-actions[bot]"
|
|
54
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
55
|
+
git add registry.json
|
|
56
|
+
git diff --cached --quiet || git commit -m "chore: auto-generate registry.json"
|
|
57
|
+
git push
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# ADHDev Provider Compatibility Matrix
|
|
2
|
+
|
|
3
|
+
> **Last updated:** 2026-03-18
|
|
4
|
+
> **How to contribute:** Submit a PR updating the status for your OS/version. See [Status Legend](#status-legend) below.
|
|
5
|
+
|
|
6
|
+
## Status Legend
|
|
7
|
+
|
|
8
|
+
| Symbol | Meaning |
|
|
9
|
+
|--------|---------|
|
|
10
|
+
| ✅ | Tested & working |
|
|
11
|
+
| ⚠️ | Partial — works with known issues (add note) |
|
|
12
|
+
| ❌ | Tested & not working |
|
|
13
|
+
| ➖ | Not applicable (tool doesn't exist on this OS) |
|
|
14
|
+
| ❓ | Untested — **needs volunteer** |
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## IDE Providers
|
|
19
|
+
|
|
20
|
+
> Detected via process scanning + controlled via CDP (Chrome DevTools Protocol).
|
|
21
|
+
|
|
22
|
+
### OS Compatibility
|
|
23
|
+
|
|
24
|
+
| Provider | Display Name | macOS | Windows | Linux | Tested Versions | Notes |
|
|
25
|
+
|----------|-------------|-------|---------|-------|-----------------|-------|
|
|
26
|
+
| `antigravity` | Antigravity | ❓ | ❓ | ❓ | | |
|
|
27
|
+
| `cursor` | Cursor | ❓ | ❓ | ❓ | | |
|
|
28
|
+
| `kiro` | Kiro | ❓ | ❓ | ❓ | | |
|
|
29
|
+
| `pearai` | PearAI | ❓ | ❓ | ❓ | | |
|
|
30
|
+
| `trae` | Trae | ❓ | ❓ | ❓ | | |
|
|
31
|
+
| `vscode` | Visual Studio Code | ❓ | ❓ | ❓ | | Detection only (no scripts) |
|
|
32
|
+
| `vscode-insiders` | VS Code Insiders | ❓ | ❓ | ❓ | | Detection only (no scripts) |
|
|
33
|
+
| `vscodium` | VSCodium | ❓ | ❓ | ❓ | | Detection only (no scripts) |
|
|
34
|
+
| `windsurf` | Windsurf | ❓ | ❓ | ❓ | | |
|
|
35
|
+
|
|
36
|
+
### Script Methods — IDE
|
|
37
|
+
|
|
38
|
+
| Provider | readChat | sendMessage | openPanel | listSessions | switchSession | newSession | listModels | setModel | listModes | setMode | resolveAction | focusEditor |
|
|
39
|
+
|----------|----------|-------------|-----------|--------------|---------------|------------|------------|----------|-----------|---------|---------------|-------------|
|
|
40
|
+
| `antigravity` | ✅ | ✅ | ➖ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
41
|
+
| `cursor` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
42
|
+
| `kiro` | webview | webview | ✅ | webview | webview¹ | webview | webview | webview | webview | webview | ✅ | ✅ |
|
|
43
|
+
| `pearai` | webview | webview | ✅ | ✅/webview | webview¹ | ✅ | webview | webview | webview | webview | webview | ✅ |
|
|
44
|
+
| `trae` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
45
|
+
| `vscode` | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ |
|
|
46
|
+
| `vscode-insiders` | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ |
|
|
47
|
+
| `vscodium` | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ | ➖ |
|
|
48
|
+
| `windsurf` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
49
|
+
|
|
50
|
+
> ¹ `webview` = method operates via webview bridge (internal iframe communication), not direct DOM.
|
|
51
|
+
> `➖` = detection only, no AI chat integration scripts.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Extension Providers
|
|
56
|
+
|
|
57
|
+
> VS Code extensions detected inside IDE instances, controlled via CDP within the host IDE.
|
|
58
|
+
|
|
59
|
+
### OS Compatibility
|
|
60
|
+
|
|
61
|
+
| Provider | Display Name | macOS | Windows | Linux | Tested Versions | Notes |
|
|
62
|
+
|----------|-------------|-------|---------|-------|-----------------|-------|
|
|
63
|
+
| `cline` | Cline | ❓ | ❓ | ❓ | | |
|
|
64
|
+
| `roo-code` | Roo Code | ❓ | ❓ | ❓ | | |
|
|
65
|
+
|
|
66
|
+
### Script Methods — Extension
|
|
67
|
+
|
|
68
|
+
| Provider | readChat | sendMessage | openPanel | listSessions | switchSession | newSession | listModels | setModel | listModes | setMode | resolveAction | focusEditor |
|
|
69
|
+
|----------|----------|-------------|-----------|--------------|---------------|------------|------------|----------|-----------|---------|---------------|-------------|
|
|
70
|
+
| `cline` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
71
|
+
| `roo-code` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## CLI Providers
|
|
76
|
+
|
|
77
|
+
> Terminal-based agents spawned as child processes, controlled via PTY.
|
|
78
|
+
|
|
79
|
+
### OS Compatibility
|
|
80
|
+
|
|
81
|
+
| Provider | Display Name | macOS | Windows | Linux | Tested Versions | Notes |
|
|
82
|
+
|----------|-------------|-------|---------|-------|-----------------|-------|
|
|
83
|
+
| `claude-cli` | Claude Code | ❓ | ❓ | ❓ | | |
|
|
84
|
+
| `codex-cli` | Codex CLI | ❓ | ❓ | ❓ | | |
|
|
85
|
+
| `gemini-cli` | Gemini CLI | ❓ | ❓ | ❓ | | |
|
|
86
|
+
|
|
87
|
+
### Supported Operations — CLI
|
|
88
|
+
|
|
89
|
+
| Operation | Description | All CLI Providers |
|
|
90
|
+
|-----------|-------------|-------------------|
|
|
91
|
+
| `spawn` | Start agent process in PTY | ✅ |
|
|
92
|
+
| `input` | Send text/command to stdin | ✅ |
|
|
93
|
+
| `output` | Read stdout/stderr stream | ✅ |
|
|
94
|
+
| `resize` | Resize terminal (cols/rows) | ✅ |
|
|
95
|
+
| `kill` | Terminate process | ✅ |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## ACP Providers
|
|
100
|
+
|
|
101
|
+
> Agent Client Protocol agents spawned as subprocesses, communicating via JSON-RPC over stdio.
|
|
102
|
+
|
|
103
|
+
### OS Compatibility
|
|
104
|
+
|
|
105
|
+
| Provider | Display Name | macOS | Windows | Linux | Tested Versions | Notes |
|
|
106
|
+
|----------|-------------|-------|---------|-------|-----------------|-------|
|
|
107
|
+
| `agentpool` | AgentPool | ❓ | ❓ | ❓ | | |
|
|
108
|
+
| `amp` | Amp (Sourcegraph) | ❓ | ❓ | ❓ | | |
|
|
109
|
+
| `auggie` | Auggie (Augment Code) | ❓ | ❓ | ❓ | | |
|
|
110
|
+
| `autodev` | AutoDev | ❓ | ❓ | ❓ | | |
|
|
111
|
+
| `blackbox-ai` | Blackbox AI | ❓ | ❓ | ❓ | | |
|
|
112
|
+
| `claude-agent` | Claude Code (ACP) | ❓ | ❓ | ❓ | | |
|
|
113
|
+
| `cline-acp` | Cline (ACP) | ❓ | ❓ | ❓ | | |
|
|
114
|
+
| `codex-cli` | Codex CLI (ACP) | ❓ | ❓ | ❓ | | |
|
|
115
|
+
| `corust-agent` | Corust Agent | ❓ | ❓ | ❓ | | |
|
|
116
|
+
| `cursor-acp` | Cursor (ACP) | ❓ | ❓ | ❓ | | |
|
|
117
|
+
| `deepagents` | Deep Agents | ❓ | ❓ | ❓ | | |
|
|
118
|
+
| `docker-cagent` | Docker cagent | ❓ | ❓ | ❓ | | |
|
|
119
|
+
| `factory-droid` | Factory AI Droids | ❓ | ❓ | ❓ | | |
|
|
120
|
+
| `fast-agent` | fast-agent | ❓ | ❓ | ❓ | | |
|
|
121
|
+
| `gemini-cli` | Gemini CLI (ACP) | ❓ | ❓ | ❓ | | |
|
|
122
|
+
| `github-copilot` | GitHub Copilot | ❓ | ❓ | ❓ | | |
|
|
123
|
+
| `goose` | Goose | ❓ | ❓ | ❓ | | |
|
|
124
|
+
| `junie` | Junie (JetBrains) | ❓ | ❓ | ❓ | | |
|
|
125
|
+
| `kilo` | Kilo Code | ❓ | ❓ | ❓ | | |
|
|
126
|
+
| `kimi-cli` | Kimi Code CLI | ❓ | ❓ | ❓ | | |
|
|
127
|
+
| `mistral-vibe` | Mistral Vibe CLI | ❓ | ❓ | ❓ | | |
|
|
128
|
+
| `openclaw` | OpenClaw | ❓ | ❓ | ❓ | | Requires running Gateway |
|
|
129
|
+
| `opencode` | OpenCode | ❓ | ❓ | ❓ | | |
|
|
130
|
+
| `openhands` | OpenHands | ❓ | ❓ | ❓ | | |
|
|
131
|
+
| `pi-acp` | pi | ❓ | ❓ | ❓ | | |
|
|
132
|
+
| `qoder` | Qoder CLI | ❓ | ❓ | ❓ | | |
|
|
133
|
+
| `qwen-code` | Qwen Code | ❓ | ❓ | ❓ | | |
|
|
134
|
+
| `stakpak` | Stakpak | ❓ | ❓ | ❓ | | |
|
|
135
|
+
| `vtcode` | VT Code | ❓ | ❓ | ❓ | | |
|
|
136
|
+
|
|
137
|
+
### Supported Operations — ACP
|
|
138
|
+
|
|
139
|
+
**Client → Agent (Editor sends to Agent)**
|
|
140
|
+
|
|
141
|
+
| Method | Description | Required |
|
|
142
|
+
|--------|-------------|----------|
|
|
143
|
+
| `initialize` | Handshake, version negotiation, capability exchange | ✅ Required |
|
|
144
|
+
| `authenticate` | Token/password auth if agent requires it | Optional |
|
|
145
|
+
| `session/new` | Create a new conversation session | ✅ Required |
|
|
146
|
+
| `session/prompt` | Send user message with context (files, images) | ✅ Required |
|
|
147
|
+
| `session/load` | Resume an existing session | Optional |
|
|
148
|
+
| `session/set_mode` | Switch agent operating mode | Optional |
|
|
149
|
+
| `session/cancel` | Abort an in-progress prompt (notification) | ✅ Required |
|
|
150
|
+
|
|
151
|
+
**Agent → Client (Agent requests from Editor)**
|
|
152
|
+
|
|
153
|
+
| Method | Description | Required |
|
|
154
|
+
|--------|-------------|----------|
|
|
155
|
+
| `session/update` | Stream progress, messages, tool calls (notification) | ✅ Required |
|
|
156
|
+
| `session/request_permission` | Ask user approval for an action | Optional |
|
|
157
|
+
| `fs/read_text_file` | Read file content including unsaved edits | Optional |
|
|
158
|
+
| `fs/write_text_file` | Write or create a file | Optional |
|
|
159
|
+
| `terminal/create` | Start a shell command | Optional |
|
|
160
|
+
| `terminal/output` | Provide command output | Optional |
|
|
161
|
+
| `terminal/wait_for_exit` | Wait for command completion | Optional |
|
|
162
|
+
| `terminal/kill` | Terminate a running command | Optional |
|
|
163
|
+
| `terminal/release` | Clean up a terminal | Optional |
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## How to Test & Report
|
|
168
|
+
|
|
169
|
+
### 1. Run the test
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Start the daemon
|
|
173
|
+
adhdev daemon
|
|
174
|
+
|
|
175
|
+
# Or standalone mode
|
|
176
|
+
node packages/daemon-standalone/dist/index.js
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### 2. Verify in the dashboard
|
|
180
|
+
- Open `http://localhost:3847`
|
|
181
|
+
- Check if the provider is detected
|
|
182
|
+
- Test: read_chat, send_chat, screenshot (IDE/Extension)
|
|
183
|
+
- Test: spawn, input, output (CLI/ACP)
|
|
184
|
+
|
|
185
|
+
### 3. Submit your result
|
|
186
|
+
Fork this repo, update the table above with your result, and submit a PR with:
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
Provider: <provider-id>
|
|
190
|
+
OS: <macOS 15.x / Windows 11 / Ubuntu 24.04 / etc>
|
|
191
|
+
Provider Version: <e.g. Cursor 0.48>
|
|
192
|
+
Status: ✅ / ⚠️ / ❌
|
|
193
|
+
Notes: <any issues encountered>
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### PR Title Format
|
|
197
|
+
```
|
|
198
|
+
compat: <provider-id> <os> <status>
|
|
199
|
+
```
|
|
200
|
+
Example: `compat: cursor macOS ✅`
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Version-Specific Notes
|
|
205
|
+
|
|
206
|
+
<!--
|
|
207
|
+
Add version-specific compatibility notes here as they are discovered.
|
|
208
|
+
Example:
|
|
209
|
+
|
|
210
|
+
### Cursor
|
|
211
|
+
| Version | macOS | Windows | Linux | Notes |
|
|
212
|
+
|---------|-------|---------|-------|-------|
|
|
213
|
+
| 0.48.x | ✅ | ❓ | ❓ | |
|
|
214
|
+
| 0.47.x | ⚠️ | ❓ | ❓ | CDP port changed |
|
|
215
|
+
-->
|
|
216
|
+
|
|
217
|
+
_No version-specific notes yet. Submit a PR to add yours!_
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Contributing to ADHDev Providers
|
|
2
|
+
|
|
3
|
+
> How to add new providers or improve existing ones for ADHDev.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
### 1. Fork & Clone
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git clone https://github.com/YOUR_USERNAME/adhdev-providers.git
|
|
11
|
+
cd adhdev-providers
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### 2. Create a Provider
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# IDE provider
|
|
18
|
+
mkdir -p ide/my-ide/scripts/1.0
|
|
19
|
+
touch ide/my-ide/provider.json
|
|
20
|
+
|
|
21
|
+
# CLI agent
|
|
22
|
+
mkdir -p cli/my-cli
|
|
23
|
+
touch cli/my-cli/provider.json
|
|
24
|
+
|
|
25
|
+
# ACP agent
|
|
26
|
+
mkdir -p acp/my-agent
|
|
27
|
+
touch acp/my-agent/provider.json
|
|
28
|
+
|
|
29
|
+
# VS Code extension
|
|
30
|
+
mkdir -p extension/my-ext/scripts/1.0
|
|
31
|
+
touch extension/my-ext/provider.json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 3. Provider Structure
|
|
35
|
+
|
|
36
|
+
#### provider.json (required)
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"type": "my-ide",
|
|
41
|
+
"name": "My IDE",
|
|
42
|
+
"category": "ide",
|
|
43
|
+
"displayName": "My IDE",
|
|
44
|
+
"icon": "🔧",
|
|
45
|
+
"providerVersion": "1.0.0",
|
|
46
|
+
"versionCommand": "my-ide --version",
|
|
47
|
+
"compatibility": [
|
|
48
|
+
{ "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" }
|
|
49
|
+
],
|
|
50
|
+
"defaultScriptDir": "scripts/1.0",
|
|
51
|
+
"cdpPorts": [9357, 9358],
|
|
52
|
+
"cli": "my-ide",
|
|
53
|
+
"processNames": { "darwin": "My IDE" },
|
|
54
|
+
"paths": { "darwin": ["/Applications/My IDE.app"] }
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
#### scripts/1.0/scripts.js (IDE/Extension)
|
|
59
|
+
|
|
60
|
+
```javascript
|
|
61
|
+
module.exports = {
|
|
62
|
+
readChat() { return `(() => { /* DOM scraping */ })()`; },
|
|
63
|
+
sendMessage(text) { return `(() => { /* type + send */ })()`; },
|
|
64
|
+
listModels() { return `(() => { /* list available models */ })()`; },
|
|
65
|
+
setModel(model) { return `(() => { /* select model */ })()`; },
|
|
66
|
+
// ... more scripts
|
|
67
|
+
};
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
#### Alternative: Individual Script Files
|
|
71
|
+
|
|
72
|
+
Instead of one `scripts.js`, you can create individual files:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
scripts/1.0/
|
|
76
|
+
read_chat.js → exports single function, auto-mapped to readChat
|
|
77
|
+
send_message.js → sendMessage
|
|
78
|
+
list_models.js → listModels
|
|
79
|
+
set_model.js → setModel
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Both approaches work. `scripts.js` takes priority if both exist.
|
|
83
|
+
|
|
84
|
+
> 📖 Full guide: [PROVIDER_GUIDE.md](https://github.com/vilmire/adhdev/blob/main/docs/PROVIDER_GUIDE.md)
|
|
85
|
+
|
|
86
|
+
### 4. Version Compatibility
|
|
87
|
+
|
|
88
|
+
The `compatibility` array maps IDE versions to script directories:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
"compatibility": [
|
|
92
|
+
{ "ideVersion": ">=1.1.0", "scriptDir": "scripts/1.1" },
|
|
93
|
+
{ "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" }
|
|
94
|
+
]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Rules:**
|
|
98
|
+
- Order matters: first match wins (most recent version first)
|
|
99
|
+
- Version ranges use semver syntax: `>=1.0.0`, `<2.0.0`, `>=1.0.0 <1.5.0`
|
|
100
|
+
- `defaultScriptDir`: used when IDE version is unknown or doesn't match any range
|
|
101
|
+
- Each script directory should be self-contained (all scripts for that version)
|
|
102
|
+
|
|
103
|
+
**When to create a new version directory:**
|
|
104
|
+
- IDE DOM structure changed (selectors broke)
|
|
105
|
+
- New UI elements to interact with
|
|
106
|
+
- Major API changes
|
|
107
|
+
|
|
108
|
+
**When NOT to create a new version:**
|
|
109
|
+
- Minor visual changes that don't affect selectors
|
|
110
|
+
- Backend-only updates
|
|
111
|
+
- Same DOM structure with new features (extend existing scripts)
|
|
112
|
+
|
|
113
|
+
### 5. Validate
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Syntax check
|
|
117
|
+
node -c ide/my-ide/scripts/1.0/scripts.js
|
|
118
|
+
|
|
119
|
+
# Schema validation (required fields, port conflicts, etc.)
|
|
120
|
+
node validate.js ide/my-ide/provider.json
|
|
121
|
+
|
|
122
|
+
# Validate all providers
|
|
123
|
+
node validate.js
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### 6. Local Testing
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Copy your provider to the user directory for instant loading
|
|
130
|
+
mkdir -p ~/.adhdev/providers/ide/my-ide
|
|
131
|
+
cp -r ide/my-ide/* ~/.adhdev/providers/ide/my-ide/
|
|
132
|
+
|
|
133
|
+
# Restart daemon to pick up changes
|
|
134
|
+
adhdev daemon:restart
|
|
135
|
+
|
|
136
|
+
# Test scripts via DevConsole
|
|
137
|
+
# Open http://127.0.0.1:19280 → IDE tab → Scripts → Run
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 7. Submit PR
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
git checkout -b feat/add-my-ide
|
|
144
|
+
git add -A
|
|
145
|
+
git commit -m "feat: add My IDE provider"
|
|
146
|
+
git push origin feat/add-my-ide
|
|
147
|
+
# Open a Pull Request on GitHub
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
`registry.json` is auto-regenerated by GitHub Actions — **do not edit manually**.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## PR Checklist
|
|
155
|
+
|
|
156
|
+
- [ ] `node validate.js` passes with no errors
|
|
157
|
+
- [ ] `type` does not conflict with existing providers
|
|
158
|
+
- [ ] CDP ports do not overlap (for IDE providers)
|
|
159
|
+
- [ ] `provider.json` has `providerVersion`, `compatibility`, `defaultScriptDir`
|
|
160
|
+
- [ ] At least `readChat` + `sendMessage` scripts implemented
|
|
161
|
+
- [ ] Tested via DevConsole (if ADHDev is available)
|
|
162
|
+
- [ ] `registry.json` NOT manually edited
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Reference Implementations
|
|
167
|
+
|
|
168
|
+
| Category | Reference | Key Features |
|
|
169
|
+
|----------|-----------|-------------|
|
|
170
|
+
| **IDE** | `ide/antigravity/` | `compatibility` matrix, versioned scripts |
|
|
171
|
+
| **IDE (webview)** | `ide/kiro/` | `webviewMatchText`, `webview*` scripts |
|
|
172
|
+
| **CLI** | `cli/gemini-cli/` | `aliases`, spawn config |
|
|
173
|
+
| **ACP** | `acp/gemini-cli/` | `auth`, `spawn`, `settings` |
|
|
174
|
+
| **Extension** | `extension/cline/` | `extensionIdPattern`, webview |
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## CDP Port Registry
|
|
179
|
+
|
|
180
|
+
| Port | Provider |
|
|
181
|
+
|------|----------|
|
|
182
|
+
| 9333–9334 | Cursor |
|
|
183
|
+
| 9335–9336 | Antigravity |
|
|
184
|
+
| 9337–9338 | Windsurf |
|
|
185
|
+
| 9339–9340 | VS Code |
|
|
186
|
+
| 9341–9342 | VS Code Insiders |
|
|
187
|
+
| 9343–9344 | VSCodium |
|
|
188
|
+
| 9351–9352 | Kiro |
|
|
189
|
+
| 9353–9354 | Trae |
|
|
190
|
+
| 9355–9356 | PearAI |
|
|
191
|
+
|
|
192
|
+
**Next available: 9357+**
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Need Help?
|
|
197
|
+
|
|
198
|
+
- Full provider guide: [PROVIDER_GUIDE.md](https://github.com/vilmire/adhdev/blob/main/docs/PROVIDER_GUIDE.md)
|
|
199
|
+
- DOM exploration tips: PROVIDER_GUIDE.md §6
|
|
200
|
+
- DevConsole usage: PROVIDER_GUIDE.md §4
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# ADHDev Providers
|
|
2
|
+
|
|
3
|
+
> IDE, CLI, Extension, and ACP provider definitions for [ADHDev](https://github.com/vilmire/adhdev).
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
├── ide/ — IDE providers (Cursor, Antigravity, Windsurf, Kiro, etc.)
|
|
9
|
+
├── cli/ — CLI agent providers (Gemini CLI, Claude Code, Codex CLI)
|
|
10
|
+
├── extension/ — VS Code extension providers (Cline, Roo Code)
|
|
11
|
+
├── acp/ — ACP agent providers (40+ agents)
|
|
12
|
+
├── registry.json — Auto-generated provider index (used by daemon)
|
|
13
|
+
├── validate.js — Provider schema validator
|
|
14
|
+
├── CONTRIBUTING.md — How to add a new provider
|
|
15
|
+
└── COMPATIBILITY.md — OS/version compatibility matrix
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Provider Format
|
|
19
|
+
|
|
20
|
+
Each provider consists of:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
ide/my-ide/
|
|
24
|
+
provider.json ← Metadata + version compatibility
|
|
25
|
+
scripts/
|
|
26
|
+
1.0/ ← Scripts for IDE version 1.0.x
|
|
27
|
+
scripts.js ← Main scripts entry point
|
|
28
|
+
set_model.js ← Individual script files
|
|
29
|
+
set_mode.js
|
|
30
|
+
0.9/ ← Scripts for IDE version 0.9.x
|
|
31
|
+
scripts.js
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### provider.json
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"type": "my-ide",
|
|
39
|
+
"name": "My IDE",
|
|
40
|
+
"category": "ide",
|
|
41
|
+
"providerVersion": "1.0.0",
|
|
42
|
+
"versionCommand": "my-ide --version",
|
|
43
|
+
"compatibility": [
|
|
44
|
+
{ "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" },
|
|
45
|
+
{ "ideVersion": ">=0.9.0", "scriptDir": "scripts/0.9" }
|
|
46
|
+
],
|
|
47
|
+
"defaultScriptDir": "scripts/1.0",
|
|
48
|
+
"cdpPorts": [9357, 9358],
|
|
49
|
+
"processNames": { "darwin": "My IDE" }
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Version Resolution
|
|
54
|
+
|
|
55
|
+
When the daemon starts:
|
|
56
|
+
1. Detects installed IDE version (`versionCommand`)
|
|
57
|
+
2. Matches against `compatibility` array (first match wins)
|
|
58
|
+
3. Loads scripts from the matched `scriptDir`
|
|
59
|
+
4. If no match → uses `defaultScriptDir` + shows warning
|
|
60
|
+
|
|
61
|
+
## Adding a New Provider
|
|
62
|
+
|
|
63
|
+
1. Create `provider.json` in the appropriate category
|
|
64
|
+
2. Create version-specific script directories
|
|
65
|
+
3. Validate: `node validate.js ide/my-ide/provider.json`
|
|
66
|
+
4. Submit a PR
|
|
67
|
+
|
|
68
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full workflow.
|
|
69
|
+
|
|
70
|
+
## How It Works
|
|
71
|
+
|
|
72
|
+
This repository is consumed by ADHDev in three ways:
|
|
73
|
+
|
|
74
|
+
| Method | When | Directory |
|
|
75
|
+
|--------|------|-----------|
|
|
76
|
+
| **Bundled** | `npm install -g adhdev` | `_builtin/` (offline fallback) |
|
|
77
|
+
| **Auto-updated** | Every daemon start | `~/.adhdev/providers/.upstream/` |
|
|
78
|
+
| **User custom** | Manual | `~/.adhdev/providers/` (never overwritten) |
|
|
79
|
+
|
|
80
|
+
Loading priority: **User custom > Auto-updated > Bundled**
|
|
81
|
+
|
|
82
|
+
### registry.json
|
|
83
|
+
|
|
84
|
+
Auto-generated index of all providers. Contains:
|
|
85
|
+
- Provider type, name, category
|
|
86
|
+
- `providerVersion` (for incremental update checks)
|
|
87
|
+
- `compatibility` matrix (which IDE versions → which scripts)
|
|
88
|
+
|
|
89
|
+
Updated automatically by GitHub Actions on every push.
|
|
90
|
+
|
|
91
|
+
## Supporting a New IDE Version
|
|
92
|
+
|
|
93
|
+
When an IDE releases a new version with DOM changes:
|
|
94
|
+
|
|
95
|
+
1. Create a new script directory:
|
|
96
|
+
```bash
|
|
97
|
+
mkdir -p ide/my-ide/scripts/1.1
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
2. Copy from the previous version and modify:
|
|
101
|
+
```bash
|
|
102
|
+
cp -r ide/my-ide/scripts/1.0/* ide/my-ide/scripts/1.1/
|
|
103
|
+
# Edit scripts to match new DOM structure
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
3. Update `provider.json`:
|
|
107
|
+
```json
|
|
108
|
+
"compatibility": [
|
|
109
|
+
{ "ideVersion": ">=1.1.0", "scriptDir": "scripts/1.1" },
|
|
110
|
+
{ "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" }
|
|
111
|
+
],
|
|
112
|
+
"defaultScriptDir": "scripts/1.1"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
4. Submit a PR. `registry.json` is auto-regenerated.
|
|
116
|
+
|
|
117
|
+
## License
|
|
118
|
+
|
|
119
|
+
MIT
|