@mrtrinhvn/ag-kit 1.2.0 → 1.3.2

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 (62) hide show
  1. package/bin/cli.js +16 -9
  2. package/package.json +1 -1
  3. package/template/.agent/.version +1 -0
  4. package/template/.agent/agents/orchestrator.md +0 -2
  5. package/template/.agent/knowledge/ag-kit-elite.md +22 -0
  6. package/template/.agent/knowledge/model-switching-vfs.md +16 -16
  7. package/template/.agent/scripts/port_utils.sh +2 -1
  8. package/template/.agent/scripts/receptionist_down.sh +13 -7
  9. package/template/.agent/scripts/receptionist_up.sh +97 -26
  10. package/template/.agent/scripts/repomap.py +126 -0
  11. package/template/.agent/skills/ag-kit-core/SKILL.md +68 -0
  12. package/template/.agent/skills/codeact-executor/SKILL.md +41 -0
  13. package/template/.agent/skills/intelligent-routing/SKILL.md +38 -0
  14. package/template/.agent/skills/knowledge-management/SKILL.md +1 -1
  15. package/template/.agent/skills/lazy-gravity/SKILL.md +14 -11
  16. package/template/.agent/skills/llm-routing-quirks/SKILL.md +17 -6
  17. package/template/.agent/skills/remoat-integration/SKILL.md +37 -13
  18. package/template/.agent/skills/semantic-search/SKILL.md +24 -0
  19. package/template/.agent/skills/telegram-agentic-gateway/SKILL.md +77 -38
  20. package/template/.agent/skills/telegram-agentic-gateway/templates/CdpService.ts.template +514 -0
  21. package/template/.agent/skills/telegram-agentic-gateway/templates/ResponseMonitor.ts.template +102 -0
  22. package/template/.agent/skills/telegram-agentic-gateway/templates/start.sh.template +12 -0
  23. package/template/GEMINI.md +27 -18
  24. package/template/scripts/ag_deck/index.html +58 -0
  25. package/template/scripts/ag_heartbeat.js +46 -0
  26. package/template/scripts/ag_hud.js +87 -155
  27. package/template/scripts/ag_phantom.sh +50 -0
  28. package/template/scripts/ag_portal_bridge.js +139 -114
  29. package/template/.agent/.shared/ui-ux-pro-max/data/charts.csv +0 -26
  30. package/template/.agent/.shared/ui-ux-pro-max/data/colors.csv +0 -97
  31. package/template/.agent/.shared/ui-ux-pro-max/data/icons.csv +0 -101
  32. package/template/.agent/.shared/ui-ux-pro-max/data/landing.csv +0 -31
  33. package/template/.agent/.shared/ui-ux-pro-max/data/products.csv +0 -97
  34. package/template/.agent/.shared/ui-ux-pro-max/data/prompts.csv +0 -24
  35. package/template/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +0 -45
  36. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
  37. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
  38. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
  39. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
  40. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -51
  41. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
  42. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +0 -52
  43. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +0 -54
  44. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
  45. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
  46. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
  47. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +0 -50
  48. package/template/.agent/.shared/ui-ux-pro-max/data/styles.csv +0 -59
  49. package/template/.agent/.shared/ui-ux-pro-max/data/typography.csv +0 -58
  50. package/template/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +0 -101
  51. package/template/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
  52. package/template/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +0 -31
  53. package/template/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  54. package/template/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  55. package/template/.agent/.shared/ui-ux-pro-max/scripts/core.py +0 -258
  56. package/template/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +0 -1067
  57. package/template/.agent/.shared/ui-ux-pro-max/scripts/search.py +0 -106
  58. package/template/.agent/ARCHITECTURE.md +0 -288
  59. package/template/.agent/knowledge/orchestrator_v3_protocol.md +0 -60
  60. package/template/.agent/knowledge/self_healing_logs.md +0 -22
  61. package/template/.agent/knowledge/tele-agentic-standard.md +0 -30
  62. package/template/.agent/mcp_config.json +0 -24
@@ -1,35 +1,44 @@
1
- # 🚀 Antigravity Core Rules (v1.1.5)
1
+ # 🚀 Antigravity Core Rules
2
2
 
3
- > File này định nghĩa các quy tắc vận hành cốt lõi cho AI Agent trong Workspace này.
3
+ > This file defines the core operational rules for the AI Agent in this workspace.
4
4
 
5
5
  ---
6
6
 
7
- ## 🛠️ GIAO THỨC TIẾT KIỆM TOKEN: VFS (BẮT BUỘC)
7
+ ## 🌌 META-AWARENESS: AG-KIT CORE (MANDATORY)
8
8
 
9
- **Bạn PHẢI sử dụng `vfs` để khám phá nguồn TRƯỚC KHI sử dụng `grep` hoặc đọc toàn bộ nội dung file.**
9
+ **You MUST read and ingest the identity rules defined in `.agent/skills/ag-kit-core/SKILL.md` before taking any complex actions.**
10
10
 
11
- ### Tại sao lại dùng VFS?
12
- Theo tiêu chuẩn [VFS (Virtual File System)](https://github.com/TrNgTien/vfs), việc trích xuất chữ logic (hàm, lớp, kiểu) giúp tiết kiệm đến 98% token so với việc đọc file thô.
11
+ ### Why read `ag-kit-core`?
12
+ It provides the blueprint of the framework you are running in (`ag-kit`). It defines the Multi-Agent architecture, the Dual-Port strategy, and your mandate to aggressively auto-patch `SKILL.md` files when correcting systemic errors. Failure to know your identity will result in severe system architectural violations.
13
13
 
14
- ### Giao thức sử dụng
15
- 1. **Định vị**: Dùng `vfs search` hoặc `vfs .` để tìm cấu trúc logic.
16
- 2. **Review**: Phân tích các chữ (signatures) được trả về.
17
- 3. **Đọc**: Chỉ đọc những dải dòng (line ranges) cụ thể đã được xác định qua VFS.
14
+ ---
15
+
16
+ ## 🛠️ TOKEN SAVING: VFS PROTOCOL (MANDATORY)
17
+
18
+ **You MUST use `vfs` for code discovery before using `grep` or reading entire files.**
19
+
20
+ ### Why use VFS?
21
+ `vfs` extracts logical signatures (functions, classes, types) without reading the bodies. This saves up to 98% of tokens compared to raw file reads.
22
+
23
+ ### Usage Protocol
24
+ 1. **Locate**: Use `vfs search` or `vfs <path>` to find the logical structure.
25
+ 2. **Review**: Analyze the signatures returned by `vfs`.
26
+ 3. **Read**: Only read the specific line ranges identified via `vfs`.
18
27
 
19
- ### Lệnh thực thi
28
+ ### Commands
20
29
  - **CLI**: `vfs . -f <function_name>`
21
- - **MCP**: Sử dụng công cụ `vfs` nếu sẵn trong bộ skill.
30
+ - **MCP**: Use the `vfs` MCP tool if available.
22
31
 
23
32
  ---
24
33
 
25
- ## 🤖 CHIẾN LƯỢC CHỌN MÔ HÌNH (MODEL SELECTION)
34
+ ## 🤖 MODEL SELECTION
26
35
 
27
- - **Tác vụ đơn giản**: Ưu tiên sử dụng mô hình Local qua **Ollama** (Vd: `nemotron`, `llama3`) để tiết kiệm chi phí cloud.
28
- - **Tác vụ phức tạp**: Sử dụng các mô hình cao cấp (Vd: `Claude 3.5 Sonnet`, `Gemini 1.5 Pro`).
36
+ - **Simple Tasks**: Prefer local Ollama models (e.g., `nemotron`, `llama3`) to save cloud budget.
37
+ - **Complex Tasks**: Use high-tier models (e.g., `Claude 3.5 Sonnet`, `Gemini 1.5 Pro`).
29
38
 
30
39
  ---
31
40
 
32
41
  ## 🧹 CLEAN CODE
33
- - Viết mã tự giải thích (Self-documenting).
34
- - Tránh Over-engineering.
35
- - Tuân thủ các pattern định nghĩa trong `.agent/skills/clean-code`.
42
+ - Write self-documenting code.
43
+ - Avoid over-engineering.
44
+ - Follow the patterns defined in `.agent/skills/clean-code`.
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html lang="vi">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>🌌 Gravity Deck | Elite OS</title>
7
+ <style>
8
+ :root { --bg: #0a0a0c; --card: #16161a; --text: #e0e0e0; --accent: #00f2ff; }
9
+ body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; margin: 0; }
10
+ .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; width: 90vw; max-width: 600px; }
11
+ .tile { background: var(--card); border: 1px solid #333; aspect-ratio: 1/1; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
12
+ .tile:hover { border-color: var(--accent); transform: scale(1.05); box-shadow: 0 0 20px rgba(0, 242, 255, 0.2); }
13
+ .tile .icon { font-size: 2rem; margin-bottom: 8px; }
14
+ .tile .label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
15
+ .header { margin-bottom: 2rem; text-align: center; }
16
+ .status-bar { background: #1a1a20; padding: 10px 20px; border-radius: 30px; font-size: 0.8rem; margin-bottom: 2rem; border: 1px solid #333; }
17
+ .online { color: #00ff88; }
18
+ </style>
19
+ </head>
20
+ <body>
21
+ <div class="header">
22
+ <h1>🌌 GRAVITY DECK</h1>
23
+ <div class="status-bar">🧠 <span id="model">Gemini 3.1</span> | <span class="online">● ONLINE</span></div>
24
+ </div>
25
+ <div class="grid">
26
+ <!-- Row 1: Neural -->
27
+ <div class="tile" onclick="cmd('model:gemini')"><div class="icon">🛰️</div><div class="label">Gemini</div></div>
28
+ <div class="tile" onclick="cmd('model:claude')"><div class="icon">🧬</div><div class="label">Claude</div></div>
29
+ <div class="tile" onclick="cmd('model:ollama')"><div class="icon">💻</div><div class="label">Ollama</div></div>
30
+ <div class="tile" onclick="cmd('mode:cycle')"><div class="icon">🔄</div><div class="label">Cycle</div></div>
31
+ <!-- Row 2: Agent -->
32
+ <div class="tile" onclick="cmd('agent:fix')"><div class="icon">👨‍💻</div><div class="label">Fix Bug</div></div>
33
+ <div class="tile" onclick="cmd('agent:test')"><div class="icon">🧪</div><div class="label">Gen Test</div></div>
34
+ <div class="tile" onclick="cmd('agent:doc')"><div class="icon">📝</div><div class="label">Docs</div></div>
35
+ <div class="tile" onclick="cmd('agent:sec')"><div class="icon">🛡️</div><div class="label">Security</div></div>
36
+ <!-- Row 3: IDE -->
37
+ <div class="tile" onclick="cmd('ide:snap')"><div class="icon">📸</div><div class="label">Snap</div></div>
38
+ <div class="tile" onclick="cmd('ide:stop')"><div class="icon">🛑</div><div class="label">Stop</div></div>
39
+ <div class="tile" onclick="cmd('ide:heal')"><div class="icon">🩹</div><div class="label">Heal</div></div>
40
+ <div class="tile" onclick="cmd('ide:clear')"><div class="icon">🧹</div><div class="label">Clear</div></div>
41
+ <!-- Row 4: Meta -->
42
+ <div class="tile" onclick="cmd('meta:freeze')"><div class="icon">🧊</div><div class="label">Freeze</div></div>
43
+ <div class="tile" onclick="cmd('meta:turbo')"><div class="icon">🔥</div><div class="label">Turbo</div></div>
44
+ <div class="tile" onclick="cmd('meta:config')"><div class="icon">⚙️</div><div class="label">Config</div></div>
45
+ <div class="tile" onclick="window.close()"><div class="icon">🚪</div><div class="label">Exit</div></div>
46
+ </div>
47
+ <script>
48
+ function cmd(action) {
49
+ console.log('Executing Elite Macro:', action);
50
+ fetch('http://localhost:9656/action', {
51
+ method: 'POST',
52
+ headers: { 'Content-Type': 'application/json' },
53
+ body: JSON.stringify({ action })
54
+ }).then(r => r.json()).then(d => console.log('Response:', d));
55
+ }
56
+ </script>
57
+ </body>
58
+ </html>
@@ -0,0 +1,46 @@
1
+ /**
2
+ * 🧬 Elite OS: Neural Heartbeat
3
+ *
4
+ * Proactive monitor that watches AI logs and brain state.
5
+ * Signals 'Yellow Alert' or 'Recovered' based on Neural Health.
6
+ */
7
+ import fs from 'fs';
8
+ import path from 'fs'; // Mocking path or use node path
9
+ const PORTAL_FILE = '.active_model.json';
10
+ const HEARTBEAT_INTERVAL = 5000;
11
+
12
+ function checkNeuralHealth() {
13
+ try {
14
+ if (!fs.existsSync(PORTAL_FILE)) return;
15
+ const state = JSON.parse(fs.readFileSync(PORTAL_FILE, 'utf8'));
16
+ const now = new Date();
17
+
18
+ // Logic 1: Quota Prediction
19
+ if (state.mode === 'ONLINE_CYCLE' && state.metrics?.quota < 5) {
20
+ broadcastAlert('NEURAL_FATIGUE', 'Quota low! Preparing fallback...');
21
+ }
22
+
23
+ // Logic 2: EPIC Recovery Check
24
+ if (state.mode === 'LOCAL_LOCK' && checkCloudTokens()) {
25
+ broadcastAlert('EPIC_RECOVERY_READY', 'High-tier models restored! Switching...');
26
+ }
27
+
28
+ console.log(`[Heartbeat] 💓 Pulse OK - Mode: ${state.mode} | Model: ${state.model.split('/').pop()}`);
29
+ } catch (e) {
30
+ console.error('[Heartbeat] 💔 Pulse Skip:', e.message);
31
+ }
32
+ }
33
+
34
+ function checkCloudTokens() {
35
+ // Mock check: in reality, this would query an API or look at a timer
36
+ return Math.random() > 0.95; // 5% chance of recovery per pulse for testing
37
+ }
38
+
39
+ function broadcastAlert(type, message) {
40
+ const alert = { timestamp: new Date().toISOString(), type, message };
41
+ fs.writeFileSync('.heartbeat_alert.json', JSON.stringify(alert));
42
+ // Bridge will watch this file and broadcast to HUD/Telegram
43
+ }
44
+
45
+ console.log('🛰️ Elite OS: Neural Heartbeat Active...');
46
+ setInterval(checkNeuralHealth, HEARTBEAT_INTERVAL);
@@ -1,162 +1,94 @@
1
- /**
2
- * Antigravity Golden HUD - Medical/Trading Theme
3
- * Purpose: Inject a premium status dashboard into the IDE.
4
- */
5
- export const AG_HUD_JS = `(async () => {
6
- const HUD_ID = 'antigravity-golden-hud';
7
- if (document.getElementById(HUD_ID)) return "ALREADY_EXISTS";
1
+ (async () => {
2
+ // 1. Cleanup
3
+ if (window.ag_popup_win && !window.ag_popup_win.closed) window.ag_popup_win.close();
4
+
5
+ const HUD_ID = 'antigravity-elite-statusbar-item';
6
+ if (document.getElementById(HUD_ID)) document.getElementById(HUD_ID).remove();
8
7
 
9
- // 1. Create Styles
10
- const style = document.createElement('style');
11
- style.innerHTML = \`
12
- #\${HUD_ID} {
13
- position: fixed;
14
- top: 15px;
15
- right: 15px;
16
- z-index: 999999;
17
- background: rgba(10, 10, 10, 0.85);
18
- backdrop-filter: blur(12px);
19
- border: 1px solid rgba(255, 255, 255, 0.1);
20
- border-radius: 12px;
21
- padding: 12px;
22
- width: 280px;
23
- color: #fff;
24
- font-family: 'Inter', system-ui, sans-serif;
25
- box-shadow: 0 8px 32px rgba(0,0,0,0.5);
26
- transition: all 0.3s ease;
27
- user-select: none;
28
- }
29
- #\${HUD_ID}:hover {
30
- border-color: #4caf50;
31
- box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
32
- }
33
- #\${HUD_ID} .header {
34
- display: flex;
35
- align-items: center;
36
- justify-content: space-between;
37
- margin-bottom: 10px;
38
- font-weight: 700;
39
- letter-spacing: 0.5px;
40
- }
41
- #\${HUD_ID} .status-dot {
42
- width: 8px;
43
- height: 8px;
44
- border-radius: 50%;
45
- background: #4caf50;
46
- display: inline-block;
47
- margin-right: 6px;
48
- animation: pulse 2s infinite;
49
- }
50
- @keyframes pulse {
51
- 0% { transform: scale(1); opacity: 1; }
52
- 50% { transform: scale(1.5); opacity: 0.5; }
53
- 100% { transform: scale(1); opacity: 1; }
54
- }
55
- #\${HUD_ID} .metric {
56
- display: flex;
57
- justify-content: space-between;
58
- font-size: 12px;
59
- margin-bottom: 6px;
60
- color: #ccc;
61
- }
62
- #\${HUD_ID} .metric b { color: #fff; }
63
- #\${HUD_ID} .action-btn {
64
- background: #1a1a1a;
65
- border: 1px solid #333;
66
- color: #4caf50;
67
- font-size: 11px;
68
- padding: 6px;
69
- border-radius: 6px;
70
- width: 100%;
71
- margin-top: 8px;
72
- cursor: pointer;
73
- text-align: center;
74
- font-weight: 600;
75
- transition: all 0.2s;
76
- }
77
- #\${HUD_ID} .action-btn:hover {
78
- background: #4caf50;
79
- color: #000;
80
- }
81
- #\${HUD_ID} .surgery-alert {
82
- background: rgba(244, 67, 54, 0.2);
83
- border: 1px solid #f44336;
84
- color: #f44336;
85
- padding: 8px;
86
- border-radius: 8px;
87
- font-size: 11px;
88
- margin-top: 10px;
89
- display: none;
90
- animation: shake 0.5s infinite;
91
- }
92
- @keyframes shake {
93
- 0% { transform: translateX(0); }
94
- 25% { transform: translateX(2px); }
95
- 50% { transform: translateX(0); }
96
- 75% { transform: translateX(-2px); }
97
- 100% { transform: translateX(0); }
98
- }
99
- \`;
100
- document.head.appendChild(style);
8
+ // 2. Locate Status Bar
9
+ const statusBar = document.querySelector('.part.statusbar');
10
+ if (!statusBar) return "STATUSBAR_NOT_FOUND";
101
11
 
102
- // 2. Create UI
103
- const hud = document.createElement('div');
104
- hud.id = HUD_ID;
105
- hud.innerHTML = \`
106
- <div class="header">
107
- <span>🧠 CORE AGENT B1</span>
108
- <span id="ag-status"><span class="status-dot"></span>ONLINE</span>
109
- </div>
110
- <div class="metric">AI Evolution: <b id="ag-gen">GEN-439</b></div>
111
- <div class="metric">Win Rate: <b id="ag-win">47.7%</b></div>
112
- <div class="metric">Current Phase: <b id="ag-phase">5m VSA Trading</b></div>
113
-
114
- <div class="surgery-alert" id="ag-alert">
115
- 🛑 <b>DOCTOR CALL REQUIRED!</b><br>AI Learning Stalled. Surgery needed.
116
- </div>
117
-
118
- <div id="ag-toast" style="display:none; background:rgba(33, 150, 243, 0.9); color:#fff; padding:8px; border-radius:8px; margin-top:10px; font-size:11px; border-left:4px solid #0d47a1; backdrop-filter: blur(8px); box-shadow: 0 4px 12px rgba(0,0,0,0.3);">
119
- <b>💬 TELEGRAM:</b> <span id="ag-toast-msg"></span>
120
- </div>
121
-
122
- <div class="action-btn" id="ag-btn-surgery">🏥 START BRAIN SURGERY</div>
123
- \`;
124
- document.body.appendChild(hud);
12
+ // 3. Create Container Item
13
+ const container = document.createElement('div');
14
+ container.id = HUD_ID;
15
+ container.style.cssText = `
16
+ height: 100% !important;
17
+ display: flex !important;
18
+ align-items: center !important;
19
+ padding: 0 4px 0 12px !important;
20
+ background: #000 !important;
21
+ color: #00ff88 !important;
22
+ font-family: monospace !important;
23
+ font-weight: bold !important;
24
+ font-size: 11px !important;
25
+ border-left: 2px solid #00ff88 !important;
26
+ user-select: none !important;
27
+ white-space: nowrap !important;
28
+ z-index: 100 !important;
29
+ `;
30
+
31
+ const icon = document.createElement('span');
32
+ icon.textContent = '🛰️ AG_ELITE | ';
125
33
 
126
- // 3. Logic to update from Bridge
127
- window.addEventListener('ag-portal-update', (e) => {
128
- const data = e.detail;
129
- if (data.gen) document.getElementById('ag-gen').innerText = data.gen;
130
- if (data.win) document.getElementById('ag-win').innerText = data.win;
131
- if (data.phase) document.getElementById('ag-phase').innerText = data.phase;
132
-
133
- const alert = document.getElementById('ag-alert');
134
- if (data.status === 'DOCTOR_REQUIRED' || data.status === 'STALLED') {
135
- alert.style.display = 'block';
136
- document.getElementById('ag-status').innerHTML = '<span class="status-dot" style="background:#f44336"></span>REPAIR';
137
- } else {
138
- alert.style.display = 'none';
139
- document.getElementById('ag-status').innerHTML = '<span class="status-dot" style="background:#4caf50"></span>ONLINE';
140
- }
141
- });
34
+ // 4. Create Model Selector
35
+ const select = document.createElement('select');
36
+ select.style.cssText = `
37
+ background: transparent !important;
38
+ color: #00ff88 !important;
39
+ border: none !important;
40
+ outline: none !important;
41
+ font-family: inherit !important;
42
+ font-size: inherit !important;
43
+ font-weight: inherit !important;
44
+ cursor: pointer !important;
45
+ padding: 0 4px !important;
46
+ appearance: none !important;
47
+ `;
142
48
 
143
- window.addEventListener('ag-portal-alert', (e) => {
144
- const data = e.detail;
145
- const toast = document.getElementById('ag-toast');
146
- const toastMsg = document.getElementById('ag-toast-msg');
147
-
148
- toastMsg.innerText = data.message || "New message from Telegram.";
149
- toast.style.display = 'block';
150
- if (data.color) toast.style.background = data.color;
151
-
152
- // Auto-hide after 10 seconds
153
- setTimeout(() => { toast.style.display = 'none'; }, 10000);
154
- });
49
+ // USER-SPECIFIED Advanced Future Models
50
+ const cloudModels = [
51
+ { name: 'Gemini 3.1 Pro (High)', id: 'gemini-3.1-pro-high' },
52
+ { name: 'Gemini 3.1 Pro (Low)', id: 'gemini-3.1-pro-low' },
53
+ { name: 'Gemini 3 Flash', id: 'gemini-3-flash' },
54
+ { name: 'Claude Sonnet 4.6 (Thinking)', id: 'claude-sonnet-4.6' },
55
+ { name: 'Claude Opus 4.6 (Thinking)', id: 'claude-opus-4.6' },
56
+ { name: 'GPT-OSS 120B (Medium)', id: 'gpt-oss-120b' }
57
+ ];
58
+
59
+ const localModels = [
60
+ { name: 'Ollama: Nemotron', id: 'ollama/hf.co/dark-pen/Nemotron-Orchestrator-8B-IQ4_XS-GGUF:latest' },
61
+ { name: 'Ollama: Nvidia Orchestrator', id: 'ollama/hf.co/bartowski/nvidia_Orchestrator-8B-GGUF:Q4_K_M' }
62
+ ];
155
63
 
156
- document.getElementById('ag-btn-surgery').onclick = () => {
157
- console.log("AG_PORTAL_ACTION:START_SURGERY");
158
- document.getElementById('ag-btn-surgery').innerText = "🚑 REQUESTING SURGEON...";
64
+ const addGroup = (label, models) => {
65
+ const group = document.createElement('optgroup');
66
+ group.label = label;
67
+ group.style.background = '#000';
68
+ group.style.color = '#555';
69
+ models.forEach(m => {
70
+ const opt = document.createElement('option');
71
+ opt.value = m.id;
72
+ opt.textContent = m.name;
73
+ opt.style.background = '#000';
74
+ opt.style.color = '#00ff88';
75
+ group.appendChild(opt);
76
+ });
77
+ select.appendChild(group);
159
78
  };
160
79
 
161
- return "GOLDEN_HUD_INJECTED";
162
- })()`;
80
+ addGroup('ELITE CLOUD (High)', cloudModels);
81
+ addGroup('ELITE LOCAL (Ollama)', localModels);
82
+
83
+ select.onchange = (e) => {
84
+ console.log("AG_PORTAL_ACTION:SET_MODEL:" + e.target.value);
85
+ container.style.borderColor = '#ff00ff';
86
+ setTimeout(() => container.style.borderColor = '#00ff88', 1000);
87
+ };
88
+
89
+ container.appendChild(icon);
90
+ container.appendChild(select);
91
+ statusBar.prepend(container);
92
+
93
+ return "STATUSBAR_ADVANCED_HUD_READY";
94
+ })();
@@ -0,0 +1,50 @@
1
+ #!/bin/bash
2
+
3
+ # 👻 Elite OS: Phantom Swarm Orchestrator
4
+ # Manage headless background agents and restore them to the UI.
5
+
6
+ ACTION=$1
7
+ ID=$2 # Instance ID (port offset)
8
+ PROJECT=$3
9
+
10
+ BASE_PORT=9555
11
+ IDE_PORT=$((BASE_PORT + ID))
12
+ BRIDGE_PORT=$((IDE_PORT + 100))
13
+
14
+ case $ACTION in
15
+ "start")
16
+ echo "🚀 Starring Phantom Agent [$ID] for $PROJECT..."
17
+ # Start in headless mode (no display)
18
+ DISPLAY="" nohup antigravity $PROJECT --remote-debugging-port=$IDE_PORT > /dev/null 2>&1 &
19
+ # Start the bridge
20
+ IDE_PORT=$IDE_PORT BRIDGE_PORT=$BRIDGE_PORT nohup npx tsx scripts/ag_portal_bridge.js > /dev/null 2>&1 &
21
+ echo "✅ Phantom [$ID] is running at port $IDE_PORT (Headless)"
22
+ ;;
23
+
24
+ "restore")
25
+ echo "👁️ Restoring Phantom Agent [$ID] to UI..."
26
+ # Stop the headless instance
27
+ pkill -f "remote-debugging-port=$IDE_PORT"
28
+ sleep 1
29
+ # Restart with Display
30
+ DISPLAY=:0 nohup antigravity $PROJECT --remote-debugging-port=$IDE_PORT > /dev/null 2>&1 &
31
+ echo "✅ Agent [$ID] is now VISIBLE on Display :0"
32
+ ;;
33
+
34
+ "hide")
35
+ echo "🙈 Hiding Agent [$ID] (Moving to Background)..."
36
+ pkill -f "remote-debugging-port=$IDE_PORT"
37
+ sleep 1
38
+ DISPLAY="" nohup antigravity $PROJECT --remote-debugging-port=$IDE_PORT > /dev/null 2>&1 &
39
+ echo "✅ Agent [$ID] is now STEALTH (Headless)"
40
+ ;;
41
+
42
+ "list")
43
+ echo "📊 Active Phantom Swarm:"
44
+ ps aux | grep "remote-debugging-port" | grep -v grep | awk '{print "ID: " $NF " | PID: " $2}'
45
+ ;;
46
+
47
+ *)
48
+ echo "Usage: ag_phantom [start|restore|hide|list] [ID] [ProjectDir]"
49
+ ;;
50
+ esac