@adhdev/daemon-core 0.6.10 → 0.6.12
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.js +16 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/providers/_builtin/.github/workflows/generate-registry.yml +19 -0
- package/providers/_builtin/cli/claude-cli/provider.json +1 -4
- package/providers/_builtin/{ide/cursor/scripts/0.49 → extension/cline/scripts/1.0}/scripts.js +27 -23
- package/providers/_builtin/extension/roo-code/scripts/1.0/scripts.js +74 -651
- package/providers/_builtin/ide/antigravity/provider.json +2 -3
- package/providers/_builtin/ide/cursor/provider.json +2 -2
- package/providers/_builtin/ide/pearai/provider.json +7 -3
- package/providers/_builtin/ide/pearai/scripts/1.0/scripts.js +82 -0
- package/providers/_builtin/ide/trae/provider.json +7 -3
- package/providers/_builtin/ide/trae/scripts/1.0/scripts.js +82 -0
- package/providers/_builtin/ide/vscode/provider.json +6 -0
- package/providers/_builtin/ide/vscode-insiders/provider.json +6 -0
- package/providers/_builtin/ide/vscodium/provider.json +6 -0
- package/providers/_builtin/ide/windsurf/provider.json +7 -5
- package/providers/_builtin/ide/windsurf/scripts/1.0/scripts.js +82 -0
- package/providers/_builtin/registry.json +44 -8
- package/src/boot/daemon-lifecycle.ts +19 -0
- package/src/daemon/scaffold-template.ts +1 -0
- package/providers/_builtin/ide/antigravity/scripts/1.106/list_models.js +0 -38
- package/providers/_builtin/ide/antigravity/scripts/1.106/list_modes.js +0 -48
- package/providers/_builtin/ide/antigravity/scripts/1.106/read_chat.js +0 -290
- package/providers/_builtin/ide/antigravity/scripts/1.106/scripts.js +0 -57
- package/providers/_builtin/ide/antigravity/scripts/1.106/set_mode.js +0 -34
- package/providers/_builtin/ide/antigravity/scripts/1.106/set_model.js +0 -47
- package/providers/_builtin/ide/antigravity/scripts/1.107/focus_editor.js +0 -20
- package/providers/_builtin/ide/antigravity/scripts/1.107/list_chats.js +0 -137
- package/providers/_builtin/ide/antigravity/scripts/1.107/new_session.js +0 -75
- package/providers/_builtin/ide/antigravity/scripts/1.107/resolve_action.js +0 -63
- package/providers/_builtin/ide/antigravity/scripts/1.107/send_message.js +0 -56
- package/providers/_builtin/ide/antigravity/scripts/1.107/switch_session.js +0 -114
- package/providers/_builtin/ide/cursor/scripts/0.49/dismiss_notification.js +0 -30
- package/providers/_builtin/ide/cursor/scripts/0.49/focus_editor.js +0 -13
- package/providers/_builtin/ide/cursor/scripts/0.49/list_models.js +0 -78
- package/providers/_builtin/ide/cursor/scripts/0.49/list_modes.js +0 -40
- package/providers/_builtin/ide/cursor/scripts/0.49/list_notifications.js +0 -23
- package/providers/_builtin/ide/cursor/scripts/0.49/new_session.js +0 -20
- package/providers/_builtin/ide/cursor/scripts/0.49/open_panel.js +0 -23
- package/providers/_builtin/ide/cursor/scripts/0.49/resolve_action.js +0 -19
- package/providers/_builtin/ide/cursor/scripts/0.49/send_message.js +0 -23
- package/providers/_builtin/ide/cursor/scripts/0.49/set_mode.js +0 -38
- package/providers/_builtin/ide/cursor/scripts/0.49/set_model.js +0 -81
- package/providers/_builtin/ide/cursor/scripts/0.49/switch_session.js +0 -28
- package/providers/_builtin/ide/cursor/scripts/0.49.bak/list_sessions.js +0 -42
- package/providers/_builtin/ide/cursor/scripts/0.49.bak/read_chat.js +0 -79
- /package/providers/_builtin/ide/antigravity/scripts/{1.106 → 1.0}/focus_editor.js +0 -0
- /package/providers/_builtin/ide/antigravity/scripts/{1.106 → 1.0}/list_chats.js +0 -0
- /package/providers/_builtin/ide/antigravity/scripts/{1.107 → 1.0}/list_models.js +0 -0
- /package/providers/_builtin/ide/antigravity/scripts/{1.107 → 1.0}/list_modes.js +0 -0
- /package/providers/_builtin/ide/antigravity/scripts/{1.106 → 1.0}/new_session.js +0 -0
- /package/providers/_builtin/ide/antigravity/scripts/{1.107 → 1.0}/read_chat.js +0 -0
- /package/providers/_builtin/ide/antigravity/scripts/{1.106 → 1.0}/resolve_action.js +0 -0
- /package/providers/_builtin/ide/antigravity/scripts/{1.107 → 1.0}/scripts.js +0 -0
- /package/providers/_builtin/ide/antigravity/scripts/{1.106 → 1.0}/send_message.js +0 -0
- /package/providers/_builtin/ide/antigravity/scripts/{1.107 → 1.0}/set_mode.js +0 -0
- /package/providers/_builtin/ide/antigravity/scripts/{1.107 → 1.0}/set_model.js +0 -0
- /package/providers/_builtin/ide/antigravity/scripts/{1.106 → 1.0}/switch_session.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/dismiss_notification.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/focus_editor.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/list_models.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/list_modes.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/list_notifications.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49 → 1.0}/list_sessions.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/new_session.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/open_panel.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49 → 1.0}/read_chat.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/resolve_action.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/scripts.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/send_message.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/set_mode.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/set_model.js +0 -0
- /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/switch_session.js +0 -0
package/package.json
CHANGED
|
@@ -55,3 +55,22 @@ jobs:
|
|
|
55
55
|
git add registry.json
|
|
56
56
|
git diff --cached --quiet || git commit -m "chore: auto-generate registry.json"
|
|
57
57
|
git push
|
|
58
|
+
|
|
59
|
+
- name: Update submodule pointer in parent repo (adhdev-cloud)
|
|
60
|
+
env:
|
|
61
|
+
PAT: ${{ secrets.PARENT_REPO_PAT }}
|
|
62
|
+
run: |
|
|
63
|
+
SUBMODULE_SHA=$(git rev-parse HEAD)
|
|
64
|
+
git clone --depth=1 https://x-access-token:${PAT}@github.com/vilmire/adhdev-cloud.git /tmp/adhdev-cloud
|
|
65
|
+
cd /tmp/adhdev-cloud
|
|
66
|
+
git config user.name "github-actions[bot]"
|
|
67
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
68
|
+
git submodule update --init packages/daemon-core/providers/_builtin
|
|
69
|
+
cd packages/daemon-core/providers/_builtin
|
|
70
|
+
git fetch origin main
|
|
71
|
+
git checkout main
|
|
72
|
+
git reset --hard ${SUBMODULE_SHA}
|
|
73
|
+
cd /tmp/adhdev-cloud
|
|
74
|
+
git add packages/daemon-core/providers/_builtin
|
|
75
|
+
git diff --cached --quiet || git commit -m "chore: sync _builtin providers submodule [skip ci]"
|
|
76
|
+
git push
|
|
@@ -87,11 +87,8 @@
|
|
|
87
87
|
{ "source": "\\(y/n\\)", "flags": "i" },
|
|
88
88
|
{ "source": "\\[Y/n\\]", "flags": "i" },
|
|
89
89
|
{ "source": "Run\\s+\\w+\\s+command", "flags": "i" },
|
|
90
|
-
{ "source": "Allow\\s*tool", "flags": "i" },
|
|
91
90
|
{ "source": "Yes,?\\s*don'?t\\s*ask", "flags": "i" },
|
|
92
|
-
{ "source": "
|
|
93
|
-
{ "source": "Do you want to proceed", "flags": "i" },
|
|
94
|
-
{ "source": "Esc to cancel", "flags": "i" }
|
|
91
|
+
{ "source": "\\bDeny\\b", "flags": "i" }
|
|
95
92
|
],
|
|
96
93
|
"ready": [
|
|
97
94
|
{ "source": "for\\s*shortcuts", "flags": "i" },
|
package/providers/_builtin/{ide/cursor/scripts/0.49 → extension/cline/scripts/1.0}/scripts.js
RENAMED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* CDP Scripts — Router
|
|
3
3
|
*
|
|
4
4
|
* Version routing is handled by ProviderLoader:
|
|
5
|
-
* - provider.json "compatibility" field declares script directory overrides
|
|
6
|
-
* - VersionArchive detects installed Cursor version at daemon startup
|
|
7
|
-
* - resolve() picks the appropriate scripts/ directory
|
|
8
|
-
*
|
|
9
5
|
* Pattern:
|
|
10
6
|
* - Scripts WITHOUT params: loaded as-is (self-invoking IIFE)
|
|
11
7
|
* - Scripts WITH params: loaded as function expression, invoked with params JSON
|
|
@@ -22,17 +18,37 @@ function load(name) {
|
|
|
22
18
|
catch { return null; }
|
|
23
19
|
}
|
|
24
20
|
|
|
25
|
-
/** Wrap a function-expression script with params invocation */
|
|
26
21
|
function withParams(name, params) {
|
|
27
|
-
|
|
22
|
+
let script = load(name);
|
|
28
23
|
if (!script) return null;
|
|
24
|
+
|
|
25
|
+
// For legacy scripts checking MESSAGE, interpolate them manually
|
|
26
|
+
if (script.includes('${ MESSAGE }')) {
|
|
27
|
+
const msg = params?.MESSAGE || params?.text || '';
|
|
28
|
+
return script.replace(/\$\{ MESSAGE \}/g, JSON.stringify(msg));
|
|
29
|
+
}
|
|
30
|
+
if (script.includes('${ BUTTON_TEXT }')) {
|
|
31
|
+
const btn = params?.BUTTON_TEXT || params?.buttonText || '';
|
|
32
|
+
return script.replace(/\$\{ BUTTON_TEXT \}/g, JSON.stringify(btn));
|
|
33
|
+
}
|
|
34
|
+
|
|
29
35
|
return `(${script})(${JSON.stringify(params)})`;
|
|
30
36
|
}
|
|
31
37
|
|
|
32
38
|
// ─── Core (no params — IIFE) ───
|
|
33
39
|
|
|
34
|
-
module.exports.readChat = () => load('read_chat.js');
|
|
35
|
-
module.exports.sendMessage = () =>
|
|
40
|
+
module.exports.readChat = () => load('read_chat.js') || load('webview_read_chat.js');
|
|
41
|
+
module.exports.sendMessage = (params) => {
|
|
42
|
+
let s = load('send_message.js');
|
|
43
|
+
if (!s) s = load('webview_send_message.js');
|
|
44
|
+
if (!s) return null;
|
|
45
|
+
// Legacy template substitution fallback
|
|
46
|
+
if (s.includes('${ MESSAGE }')) {
|
|
47
|
+
const msg = params?.MESSAGE || params?.text || params || '';
|
|
48
|
+
return s.replace(/\$\{ MESSAGE \}/g, JSON.stringify(msg));
|
|
49
|
+
}
|
|
50
|
+
return withParams('send_message.js', params) || withParams('webview_send_message.js', params);
|
|
51
|
+
};
|
|
36
52
|
module.exports.listSessions = () => load('list_sessions.js');
|
|
37
53
|
module.exports.newSession = () => load('new_session.js');
|
|
38
54
|
module.exports.focusEditor = () => load('focus_editor.js');
|
|
@@ -51,20 +67,8 @@ module.exports.switchSession = (params) => {
|
|
|
51
67
|
module.exports.resolveAction = (params) => {
|
|
52
68
|
const action = typeof params === 'string' ? params : params?.action || 'approve';
|
|
53
69
|
const buttonText = params?.button || params?.buttonText
|
|
54
|
-
|| (action === 'approve' ? '
|
|
55
|
-
return withParams('resolve_action.js', { buttonText });
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
module.exports.listNotifications = (params) => {
|
|
59
|
-
const filter = typeof params === 'string' ? params : params?.message || null;
|
|
60
|
-
return withParams('list_notifications.js', { filter });
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
module.exports.dismissNotification = (params) => {
|
|
64
|
-
const index = typeof params === 'number' ? params : params?.index ?? 0;
|
|
65
|
-
const button = typeof params === 'string' ? params : params?.button || null;
|
|
66
|
-
const message = params?.message || null;
|
|
67
|
-
return withParams('dismiss_notification.js', { index, button, message });
|
|
70
|
+
|| (action === 'approve' ? 'Accept' : action === 'reject' ? 'Reject' : action);
|
|
71
|
+
return withParams('resolve_action.js', { buttonText, BUTTON_TEXT: buttonText });
|
|
68
72
|
};
|
|
69
73
|
|
|
70
74
|
module.exports.setModel = (params) => {
|