@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.
Files changed (74) hide show
  1. package/dist/index.js +16 -0
  2. package/dist/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/providers/_builtin/.github/workflows/generate-registry.yml +19 -0
  5. package/providers/_builtin/cli/claude-cli/provider.json +1 -4
  6. package/providers/_builtin/{ide/cursor/scripts/0.49 → extension/cline/scripts/1.0}/scripts.js +27 -23
  7. package/providers/_builtin/extension/roo-code/scripts/1.0/scripts.js +74 -651
  8. package/providers/_builtin/ide/antigravity/provider.json +2 -3
  9. package/providers/_builtin/ide/cursor/provider.json +2 -2
  10. package/providers/_builtin/ide/pearai/provider.json +7 -3
  11. package/providers/_builtin/ide/pearai/scripts/1.0/scripts.js +82 -0
  12. package/providers/_builtin/ide/trae/provider.json +7 -3
  13. package/providers/_builtin/ide/trae/scripts/1.0/scripts.js +82 -0
  14. package/providers/_builtin/ide/vscode/provider.json +6 -0
  15. package/providers/_builtin/ide/vscode-insiders/provider.json +6 -0
  16. package/providers/_builtin/ide/vscodium/provider.json +6 -0
  17. package/providers/_builtin/ide/windsurf/provider.json +7 -5
  18. package/providers/_builtin/ide/windsurf/scripts/1.0/scripts.js +82 -0
  19. package/providers/_builtin/registry.json +44 -8
  20. package/src/boot/daemon-lifecycle.ts +19 -0
  21. package/src/daemon/scaffold-template.ts +1 -0
  22. package/providers/_builtin/ide/antigravity/scripts/1.106/list_models.js +0 -38
  23. package/providers/_builtin/ide/antigravity/scripts/1.106/list_modes.js +0 -48
  24. package/providers/_builtin/ide/antigravity/scripts/1.106/read_chat.js +0 -290
  25. package/providers/_builtin/ide/antigravity/scripts/1.106/scripts.js +0 -57
  26. package/providers/_builtin/ide/antigravity/scripts/1.106/set_mode.js +0 -34
  27. package/providers/_builtin/ide/antigravity/scripts/1.106/set_model.js +0 -47
  28. package/providers/_builtin/ide/antigravity/scripts/1.107/focus_editor.js +0 -20
  29. package/providers/_builtin/ide/antigravity/scripts/1.107/list_chats.js +0 -137
  30. package/providers/_builtin/ide/antigravity/scripts/1.107/new_session.js +0 -75
  31. package/providers/_builtin/ide/antigravity/scripts/1.107/resolve_action.js +0 -63
  32. package/providers/_builtin/ide/antigravity/scripts/1.107/send_message.js +0 -56
  33. package/providers/_builtin/ide/antigravity/scripts/1.107/switch_session.js +0 -114
  34. package/providers/_builtin/ide/cursor/scripts/0.49/dismiss_notification.js +0 -30
  35. package/providers/_builtin/ide/cursor/scripts/0.49/focus_editor.js +0 -13
  36. package/providers/_builtin/ide/cursor/scripts/0.49/list_models.js +0 -78
  37. package/providers/_builtin/ide/cursor/scripts/0.49/list_modes.js +0 -40
  38. package/providers/_builtin/ide/cursor/scripts/0.49/list_notifications.js +0 -23
  39. package/providers/_builtin/ide/cursor/scripts/0.49/new_session.js +0 -20
  40. package/providers/_builtin/ide/cursor/scripts/0.49/open_panel.js +0 -23
  41. package/providers/_builtin/ide/cursor/scripts/0.49/resolve_action.js +0 -19
  42. package/providers/_builtin/ide/cursor/scripts/0.49/send_message.js +0 -23
  43. package/providers/_builtin/ide/cursor/scripts/0.49/set_mode.js +0 -38
  44. package/providers/_builtin/ide/cursor/scripts/0.49/set_model.js +0 -81
  45. package/providers/_builtin/ide/cursor/scripts/0.49/switch_session.js +0 -28
  46. package/providers/_builtin/ide/cursor/scripts/0.49.bak/list_sessions.js +0 -42
  47. package/providers/_builtin/ide/cursor/scripts/0.49.bak/read_chat.js +0 -79
  48. /package/providers/_builtin/ide/antigravity/scripts/{1.106 → 1.0}/focus_editor.js +0 -0
  49. /package/providers/_builtin/ide/antigravity/scripts/{1.106 → 1.0}/list_chats.js +0 -0
  50. /package/providers/_builtin/ide/antigravity/scripts/{1.107 → 1.0}/list_models.js +0 -0
  51. /package/providers/_builtin/ide/antigravity/scripts/{1.107 → 1.0}/list_modes.js +0 -0
  52. /package/providers/_builtin/ide/antigravity/scripts/{1.106 → 1.0}/new_session.js +0 -0
  53. /package/providers/_builtin/ide/antigravity/scripts/{1.107 → 1.0}/read_chat.js +0 -0
  54. /package/providers/_builtin/ide/antigravity/scripts/{1.106 → 1.0}/resolve_action.js +0 -0
  55. /package/providers/_builtin/ide/antigravity/scripts/{1.107 → 1.0}/scripts.js +0 -0
  56. /package/providers/_builtin/ide/antigravity/scripts/{1.106 → 1.0}/send_message.js +0 -0
  57. /package/providers/_builtin/ide/antigravity/scripts/{1.107 → 1.0}/set_mode.js +0 -0
  58. /package/providers/_builtin/ide/antigravity/scripts/{1.107 → 1.0}/set_model.js +0 -0
  59. /package/providers/_builtin/ide/antigravity/scripts/{1.106 → 1.0}/switch_session.js +0 -0
  60. /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/dismiss_notification.js +0 -0
  61. /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/focus_editor.js +0 -0
  62. /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/list_models.js +0 -0
  63. /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/list_modes.js +0 -0
  64. /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/list_notifications.js +0 -0
  65. /package/providers/_builtin/ide/cursor/scripts/{0.49 → 1.0}/list_sessions.js +0 -0
  66. /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/new_session.js +0 -0
  67. /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/open_panel.js +0 -0
  68. /package/providers/_builtin/ide/cursor/scripts/{0.49 → 1.0}/read_chat.js +0 -0
  69. /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/resolve_action.js +0 -0
  70. /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/scripts.js +0 -0
  71. /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/send_message.js +0 -0
  72. /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/set_mode.js +0 -0
  73. /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/set_model.js +0 -0
  74. /package/providers/_builtin/ide/cursor/scripts/{0.49.bak → 1.0}/switch_session.js +0 -0
@@ -37,10 +37,9 @@
37
37
  "versionCommand": "antigravity --version",
38
38
  "providerVersion": "1.0.0",
39
39
  "compatibility": [
40
- { "ideVersion": ">=1.107.0", "scriptDir": "scripts/1.107" },
41
- { "ideVersion": ">=1.105.0", "scriptDir": "scripts/1.106" }
40
+ { "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" }
42
41
  ],
43
- "defaultScriptDir": "scripts/1.107",
42
+ "defaultScriptDir": "scripts/1.0",
44
43
  "settings": {
45
44
  "approvalAlert": {
46
45
  "type": "boolean",
@@ -37,9 +37,9 @@
37
37
  "versionCommand": "cursor --version",
38
38
  "providerVersion": "1.0.0",
39
39
  "compatibility": [
40
- { "ideVersion": ">=0.49.0", "scriptDir": "scripts/0.49" }
40
+ { "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" }
41
41
  ],
42
- "defaultScriptDir": "scripts/0.49",
42
+ "defaultScriptDir": "scripts/1.0",
43
43
  "vscodeCommands": {
44
44
  "changeModel": "cursor.model"
45
45
  },
@@ -40,6 +40,12 @@
40
40
  "inputMethod": "cdp-type-and-send",
41
41
  "inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]",
42
42
  "webviewMatchText": "chat-text-area",
43
+ "versionCommand": "pearai --version",
44
+ "providerVersion": "0.0.0",
45
+ "compatibility": [
46
+ { "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" }
47
+ ],
48
+ "defaultScriptDir": "scripts/1.0",
43
49
  "settings": {
44
50
  "approvalAlert": {
45
51
  "type": "boolean",
@@ -63,7 +69,5 @@
63
69
  "min": 30,
64
70
  "max": 600
65
71
  }
66
- },
67
- "defaultScriptDir": "scripts/1.0",
68
- "compatibility": []
72
+ }
69
73
  }
@@ -0,0 +1,82 @@
1
+ /**
2
+ * CDP Scripts — Router
3
+ *
4
+ * Version routing is handled by ProviderLoader:
5
+ * Pattern:
6
+ * - Scripts WITHOUT params: loaded as-is (self-invoking IIFE)
7
+ * - Scripts WITH params: loaded as function expression, invoked with params JSON
8
+ * e.g. `(${script})(${JSON.stringify(params)})`
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ const fs = require('fs');
14
+ const path = require('path');
15
+
16
+ function load(name) {
17
+ try { return fs.readFileSync(path.join(__dirname, name), 'utf-8'); }
18
+ catch { return null; }
19
+ }
20
+
21
+ function withParams(name, params) {
22
+ let script = load(name);
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
+
35
+ return `(${script})(${JSON.stringify(params)})`;
36
+ }
37
+
38
+ // ─── Core (no params — IIFE) ───
39
+
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
+ };
52
+ module.exports.listSessions = () => load('list_sessions.js');
53
+ module.exports.newSession = () => load('new_session.js');
54
+ module.exports.focusEditor = () => load('focus_editor.js');
55
+ module.exports.openPanel = () => load('open_panel.js');
56
+ module.exports.listModels = () => load('list_models.js');
57
+ module.exports.listModes = () => load('list_modes.js');
58
+
59
+ // ─── With params (function expression) ───
60
+
61
+ module.exports.switchSession = (params) => {
62
+ const index = typeof params === 'number' ? params : params?.index ?? 0;
63
+ const title = typeof params === 'string' ? params : params?.title || null;
64
+ return withParams('switch_session.js', { index, title });
65
+ };
66
+
67
+ module.exports.resolveAction = (params) => {
68
+ const action = typeof params === 'string' ? params : params?.action || 'approve';
69
+ const buttonText = params?.button || params?.buttonText
70
+ || (action === 'approve' ? 'Accept' : action === 'reject' ? 'Reject' : action);
71
+ return withParams('resolve_action.js', { buttonText, BUTTON_TEXT: buttonText });
72
+ };
73
+
74
+ module.exports.setModel = (params) => {
75
+ const model = typeof params === 'string' ? params : params?.model;
76
+ return withParams('set_model.js', { model });
77
+ };
78
+
79
+ module.exports.setMode = (params) => {
80
+ const mode = typeof params === 'string' ? params : params?.mode;
81
+ return withParams('set_mode.js', { mode });
82
+ };
@@ -39,6 +39,12 @@
39
39
  },
40
40
  "inputMethod": "cdp-type-and-send",
41
41
  "inputSelector": ".chat-input-v2-input-box-editable, [contenteditable=\"true\"][role=\"textbox\"]",
42
+ "versionCommand": "trae --version",
43
+ "providerVersion": "0.0.0",
44
+ "compatibility": [
45
+ { "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" }
46
+ ],
47
+ "defaultScriptDir": "scripts/1.0",
42
48
  "settings": {
43
49
  "approvalAlert": {
44
50
  "type": "boolean",
@@ -62,7 +68,5 @@
62
68
  "min": 30,
63
69
  "max": 600
64
70
  }
65
- },
66
- "defaultScriptDir": "scripts/1.0",
67
- "compatibility": []
71
+ }
68
72
  }
@@ -0,0 +1,82 @@
1
+ /**
2
+ * CDP Scripts — Router
3
+ *
4
+ * Version routing is handled by ProviderLoader:
5
+ * Pattern:
6
+ * - Scripts WITHOUT params: loaded as-is (self-invoking IIFE)
7
+ * - Scripts WITH params: loaded as function expression, invoked with params JSON
8
+ * e.g. `(${script})(${JSON.stringify(params)})`
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ const fs = require('fs');
14
+ const path = require('path');
15
+
16
+ function load(name) {
17
+ try { return fs.readFileSync(path.join(__dirname, name), 'utf-8'); }
18
+ catch { return null; }
19
+ }
20
+
21
+ function withParams(name, params) {
22
+ let script = load(name);
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
+
35
+ return `(${script})(${JSON.stringify(params)})`;
36
+ }
37
+
38
+ // ─── Core (no params — IIFE) ───
39
+
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
+ };
52
+ module.exports.listSessions = () => load('list_sessions.js');
53
+ module.exports.newSession = () => load('new_session.js');
54
+ module.exports.focusEditor = () => load('focus_editor.js');
55
+ module.exports.openPanel = () => load('open_panel.js');
56
+ module.exports.listModels = () => load('list_models.js');
57
+ module.exports.listModes = () => load('list_modes.js');
58
+
59
+ // ─── With params (function expression) ───
60
+
61
+ module.exports.switchSession = (params) => {
62
+ const index = typeof params === 'number' ? params : params?.index ?? 0;
63
+ const title = typeof params === 'string' ? params : params?.title || null;
64
+ return withParams('switch_session.js', { index, title });
65
+ };
66
+
67
+ module.exports.resolveAction = (params) => {
68
+ const action = typeof params === 'string' ? params : params?.action || 'approve';
69
+ const buttonText = params?.button || params?.buttonText
70
+ || (action === 'approve' ? 'Accept' : action === 'reject' ? 'Reject' : action);
71
+ return withParams('resolve_action.js', { buttonText, BUTTON_TEXT: buttonText });
72
+ };
73
+
74
+ module.exports.setModel = (params) => {
75
+ const model = typeof params === 'string' ? params : params?.model;
76
+ return withParams('set_model.js', { model });
77
+ };
78
+
79
+ module.exports.setMode = (params) => {
80
+ const mode = typeof params === 'string' ? params : params?.mode;
81
+ return withParams('set_mode.js', { mode });
82
+ };
@@ -37,6 +37,12 @@
37
37
  },
38
38
  "inputMethod": "cdp-type-and-send",
39
39
  "inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]",
40
+ "versionCommand": "code --version",
41
+ "providerVersion": "0.0.0",
42
+ "compatibility": [
43
+ { "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" }
44
+ ],
45
+ "defaultScriptDir": "scripts/1.0",
40
46
  "settings": {
41
47
  "approvalAlert": {
42
48
  "type": "boolean",
@@ -35,6 +35,12 @@
35
35
  },
36
36
  "inputMethod": "cdp-type-and-send",
37
37
  "inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]",
38
+ "versionCommand": "code-insiders --version",
39
+ "providerVersion": "0.0.0",
40
+ "compatibility": [
41
+ { "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" }
42
+ ],
43
+ "defaultScriptDir": "scripts/1.0",
38
44
  "settings": {
39
45
  "approvalAlert": {
40
46
  "type": "boolean",
@@ -36,6 +36,12 @@
36
36
  },
37
37
  "inputMethod": "cdp-type-and-send",
38
38
  "inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]",
39
+ "versionCommand": "codium --version",
40
+ "providerVersion": "0.0.0",
41
+ "compatibility": [
42
+ { "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" }
43
+ ],
44
+ "defaultScriptDir": "scripts/1.0",
39
45
  "settings": {
40
46
  "approvalAlert": {
41
47
  "type": "boolean",
@@ -24,8 +24,12 @@
24
24
  "/Applications/Windsurf.app"
25
25
  ]
26
26
  },
27
- "inputMethod": "cdp-type-and-send",
28
- "inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]",
27
+ "versionCommand": "windsurf --version",
28
+ "providerVersion": "1.0.0",
29
+ "compatibility": [
30
+ { "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" }
31
+ ],
32
+ "defaultScriptDir": "scripts/1.0",
29
33
  "settings": {
30
34
  "approvalAlert": {
31
35
  "type": "boolean",
@@ -49,7 +53,5 @@
49
53
  "min": 30,
50
54
  "max": 600
51
55
  }
52
- },
53
- "defaultScriptDir": "scripts/1.0",
54
- "compatibility": []
56
+ }
55
57
  }
@@ -0,0 +1,82 @@
1
+ /**
2
+ * CDP Scripts — Router
3
+ *
4
+ * Version routing is handled by ProviderLoader:
5
+ * Pattern:
6
+ * - Scripts WITHOUT params: loaded as-is (self-invoking IIFE)
7
+ * - Scripts WITH params: loaded as function expression, invoked with params JSON
8
+ * e.g. `(${script})(${JSON.stringify(params)})`
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ const fs = require('fs');
14
+ const path = require('path');
15
+
16
+ function load(name) {
17
+ try { return fs.readFileSync(path.join(__dirname, name), 'utf-8'); }
18
+ catch { return null; }
19
+ }
20
+
21
+ function withParams(name, params) {
22
+ let script = load(name);
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
+
35
+ return `(${script})(${JSON.stringify(params)})`;
36
+ }
37
+
38
+ // ─── Core (no params — IIFE) ───
39
+
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
+ };
52
+ module.exports.listSessions = () => load('list_sessions.js');
53
+ module.exports.newSession = () => load('new_session.js');
54
+ module.exports.focusEditor = () => load('focus_editor.js');
55
+ module.exports.openPanel = () => load('open_panel.js');
56
+ module.exports.listModels = () => load('list_models.js');
57
+ module.exports.listModes = () => load('list_modes.js');
58
+
59
+ // ─── With params (function expression) ───
60
+
61
+ module.exports.switchSession = (params) => {
62
+ const index = typeof params === 'number' ? params : params?.index ?? 0;
63
+ const title = typeof params === 'string' ? params : params?.title || null;
64
+ return withParams('switch_session.js', { index, title });
65
+ };
66
+
67
+ module.exports.resolveAction = (params) => {
68
+ const action = typeof params === 'string' ? params : params?.action || 'approve';
69
+ const buttonText = params?.button || params?.buttonText
70
+ || (action === 'approve' ? 'Accept' : action === 'reject' ? 'Reject' : action);
71
+ return withParams('resolve_action.js', { buttonText, BUTTON_TEXT: buttonText });
72
+ };
73
+
74
+ module.exports.setModel = (params) => {
75
+ const model = typeof params === 'string' ? params : params?.model;
76
+ return withParams('set_model.js', { model });
77
+ };
78
+
79
+ module.exports.setMode = (params) => {
80
+ const mode = typeof params === 'string' ? params : params?.mode;
81
+ return withParams('set_mode.js', { mode });
82
+ };
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2026.03.23",
2
+ "version": "2026.03.26",
3
3
  "providers": {
4
4
  "agentpool-acp": {
5
5
  "providerVersion": "0.0.0",
@@ -240,32 +240,68 @@
240
240
  "pearai": {
241
241
  "providerVersion": "0.0.0",
242
242
  "category": "ide",
243
- "name": "PearAI"
243
+ "name": "PearAI",
244
+ "compatibility": [
245
+ {
246
+ "ideVersion": ">=1.0.0",
247
+ "scriptDir": "scripts/1.0"
248
+ }
249
+ ]
244
250
  },
245
251
  "trae": {
246
252
  "providerVersion": "0.0.0",
247
253
  "category": "ide",
248
- "name": "Trae"
254
+ "name": "Trae",
255
+ "compatibility": [
256
+ {
257
+ "ideVersion": ">=1.0.0",
258
+ "scriptDir": "scripts/1.0"
259
+ }
260
+ ]
249
261
  },
250
262
  "vscode-insiders": {
251
263
  "providerVersion": "0.0.0",
252
264
  "category": "ide",
253
- "name": "Visual Studio Code - Insiders"
265
+ "name": "Visual Studio Code - Insiders",
266
+ "compatibility": [
267
+ {
268
+ "ideVersion": ">=1.0.0",
269
+ "scriptDir": "scripts/1.0"
270
+ }
271
+ ]
254
272
  },
255
273
  "vscode": {
256
274
  "providerVersion": "0.0.0",
257
275
  "category": "ide",
258
- "name": "Visual Studio Code"
276
+ "name": "Visual Studio Code",
277
+ "compatibility": [
278
+ {
279
+ "ideVersion": ">=1.0.0",
280
+ "scriptDir": "scripts/1.0"
281
+ }
282
+ ]
259
283
  },
260
284
  "vscodium": {
261
285
  "providerVersion": "0.0.0",
262
286
  "category": "ide",
263
- "name": "VSCodium"
287
+ "name": "VSCodium",
288
+ "compatibility": [
289
+ {
290
+ "ideVersion": ">=1.0.0",
291
+ "scriptDir": "scripts/1.0"
292
+ }
293
+ ]
264
294
  },
265
295
  "windsurf": {
266
- "providerVersion": "0.0.0",
296
+ "providerVersion": "1.0.0",
267
297
  "category": "ide",
268
- "name": "Windsurf"
298
+ "name": "Windsurf",
299
+ "compatibility": [
300
+ {
301
+ "ideVersion": ">=1.0.0",
302
+ "scriptDir": "scripts/1.0"
303
+ }
304
+ ]
269
305
  }
270
306
  }
271
307
  }
@@ -16,6 +16,7 @@ import { DaemonCliManager } from '../commands/cli-manager.js';
16
16
  import { DaemonAgentStreamManager } from '../agent-stream/manager.js';
17
17
  import { AgentStreamPoller } from '../agent-stream/poller.js';
18
18
  import { ProviderLoader } from '../providers/provider-loader.js';
19
+ import { VersionArchive, detectAllVersions } from '../providers/version-archive.js';
19
20
  import { ProviderInstanceManager } from '../providers/provider-instance-manager.js';
20
21
  import { detectIDEs } from '../detection/ide-detector.js';
21
22
  import { installGlobalInterceptor, LOG } from '../logging/logger.js';
@@ -110,6 +111,24 @@ export async function initDaemonComponents(config: DaemonInitConfig): Promise<Da
110
111
  providerLoader.loadAll();
111
112
  providerLoader.registerToDetector();
112
113
 
114
+ // 2.5 Provider version detection & archive (non-blocking — don't delay startup)
115
+ const versionArchive = new VersionArchive();
116
+ providerLoader.setVersionArchive(versionArchive);
117
+ detectAllVersions(providerLoader, versionArchive)
118
+ .then((versionResults) => {
119
+ const installedProviders = versionResults.filter(v => v.installed);
120
+ const withVersion = installedProviders.filter(v => v.version);
121
+ LOG.info('Init', `Provider versions: ${installedProviders.length} installed, ${withVersion.length} versioned`);
122
+ for (const v of withVersion) {
123
+ LOG.info('Init', ` ${v.type} (${v.category}): v${v.version}${v.warning ? ' ⚠ ' + v.warning : ''}`);
124
+ }
125
+ const noVersion = installedProviders.filter(v => !v.version);
126
+ if (noVersion.length > 0) {
127
+ LOG.warn('Init', ` ${noVersion.length} installed but version unknown: ${noVersion.map(v => v.type).join(', ')}`);
128
+ }
129
+ })
130
+ .catch(() => {});
131
+
113
132
  // 3. Shared state
114
133
  const instanceManager = new ProviderInstanceManager();
115
134
  const cdpManagers = new Map<string, DaemonCdpManager>();
@@ -83,6 +83,7 @@ export function generateFiles(type: string, name: string, category: string, opts
83
83
  } else {
84
84
  meta.inputMethod = 'cdp-type-and-send';
85
85
  meta.inputSelector = '[contenteditable="true"][role="textbox"]';
86
+ if (cli) meta.versionCommand = `${cli} --version`;
86
87
  meta.providerVersion = '1.0.0';
87
88
  meta.compatibility = [
88
89
  { ideVersion: `>=${version}.0`, scriptDir },
@@ -1,38 +0,0 @@
1
- /**
2
- * Antigravity — list_models
3
- * antigravity-agent-side-panel 내부 모델 드롭다운에서 목록 + 현재 모델 추출
4
- * → { models: string[], current: string }
5
- */
6
- (() => {
7
- try {
8
- const models = [];
9
- let current = '';
10
-
11
- // 1. 모델 항목에서 목록 추출
12
- // 셀렉터: .px-2.py-1.flex.items-center.justify-between.cursor-pointer
13
- const items = document.querySelectorAll('.px-2.py-1.flex.items-center.justify-between.cursor-pointer');
14
- for (const item of items) {
15
- const label = item.querySelector('.text-xs.font-medium');
16
- const text = (label || item).textContent?.trim();
17
- if (!text || text.length > 60) continue;
18
- // 모델명 검증 (Claude, Gemini, GPT, etc.)
19
- models.push(text);
20
- // 선택된 항목: bg-gray-500/20
21
- if ((item.className || '').includes('bg-gray-500/20')) {
22
- current = text;
23
- }
24
- }
25
-
26
- // 2. 모델 목록이 없으면 (드롭다운 닫힘) → 트리거 버튼에서 현재 모델만
27
- if (models.length === 0) {
28
- const trigger = document.querySelector('.flex.min-w-0.max-w-full.cursor-pointer.items-center');
29
- if (trigger) {
30
- current = trigger.textContent?.trim() || '';
31
- }
32
- }
33
-
34
- return JSON.stringify({ models, current });
35
- } catch (e) {
36
- return JSON.stringify({ models: [], current: '', error: e.message });
37
- }
38
- })()
@@ -1,48 +0,0 @@
1
- /**
2
- * Antigravity — list_modes
3
- * Conversation mode: Planning / Fast 세그먼트 컨트롤
4
- * inputBox 근처의 "Conversation mode" 패널에서 읽기
5
- * → { modes: string[], current: string }
6
- */
7
- (() => {
8
- try {
9
- const modes = [];
10
- let current = '';
11
-
12
- // "Conversation mode" 헤더를 포함하는 패널 찾기
13
- const headers = document.querySelectorAll('.text-xs.px-2.pb-1.opacity-80');
14
- for (const header of headers) {
15
- if (header.textContent?.trim() === 'Conversation mode') {
16
- // 형제 요소들에서 모드 항목 추출
17
- const parent = header.parentElement;
18
- if (!parent) continue;
19
- const items = parent.querySelectorAll('.font-medium');
20
- for (const item of items) {
21
- const text = item.textContent?.trim();
22
- if (text && text.length < 20) {
23
- modes.push(text);
24
- }
25
- }
26
- break;
27
- }
28
- }
29
-
30
- // 현재 모드: Fast 버튼의 텍스트 (현재 활성 모드 표시)
31
- const modeBtn = [...document.querySelectorAll('button')].find(b => {
32
- const cls = b.className || '';
33
- return cls.includes('py-1') && cls.includes('pl-1') && cls.includes('pr-2') && b.offsetWidth > 0;
34
- });
35
- if (modeBtn) {
36
- current = modeBtn.textContent?.trim() || '';
37
- }
38
-
39
- // modes가 비어있으면 기본값
40
- if (modes.length === 0) {
41
- modes.push('Planning', 'Fast');
42
- }
43
-
44
- return JSON.stringify({ modes, current });
45
- } catch (e) {
46
- return JSON.stringify({ modes: [], current: '', error: e.message });
47
- }
48
- })()