alvin-bot 5.7.0 → 5.8.0

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 (136) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/claude.js +1 -102
  3. package/dist/config.js +1 -96
  4. package/dist/engine.js +1 -90
  5. package/dist/find-claude-binary.js +1 -98
  6. package/dist/handlers/async-agent-chunk-handler.js +1 -50
  7. package/dist/handlers/background-bypass.js +1 -75
  8. package/dist/handlers/commands.js +1 -2336
  9. package/dist/handlers/cron-progress.js +1 -52
  10. package/dist/handlers/document.js +1 -194
  11. package/dist/handlers/message.js +1 -959
  12. package/dist/handlers/photo.js +1 -154
  13. package/dist/handlers/platform-message.js +1 -360
  14. package/dist/handlers/stuck-timer.js +1 -54
  15. package/dist/handlers/video.js +1 -237
  16. package/dist/handlers/voice.js +1 -148
  17. package/dist/i18n.js +1 -805
  18. package/dist/index.js +1 -697
  19. package/dist/init-data-dir.js +1 -98
  20. package/dist/middleware/auth.js +1 -233
  21. package/dist/migrate.js +1 -162
  22. package/dist/paths.js +1 -146
  23. package/dist/platforms/discord.js +1 -175
  24. package/dist/platforms/index.js +1 -130
  25. package/dist/platforms/signal.js +1 -205
  26. package/dist/platforms/slack-slash-parser.js +1 -32
  27. package/dist/platforms/slack.js +1 -501
  28. package/dist/platforms/telegram.js +1 -111
  29. package/dist/platforms/types.js +1 -8
  30. package/dist/platforms/whatsapp-auth-helpers.js +1 -53
  31. package/dist/platforms/whatsapp.js +1 -707
  32. package/dist/providers/claude-sdk-provider.js +1 -565
  33. package/dist/providers/codex-cli-provider.js +1 -134
  34. package/dist/providers/index.js +1 -7
  35. package/dist/providers/ollama-provider.js +1 -32
  36. package/dist/providers/openai-compatible.js +1 -406
  37. package/dist/providers/registry.js +1 -352
  38. package/dist/providers/runtime-header.js +1 -45
  39. package/dist/providers/tool-executor.js +1 -475
  40. package/dist/providers/types.js +1 -227
  41. package/dist/services/access.js +1 -144
  42. package/dist/services/allowed-users-gate.js +1 -56
  43. package/dist/services/alvin-dispatch.js +1 -174
  44. package/dist/services/alvin-mcp-tools.js +1 -104
  45. package/dist/services/asset-index.js +1 -224
  46. package/dist/services/async-agent-parser.js +1 -418
  47. package/dist/services/async-agent-watcher.js +1 -583
  48. package/dist/services/auto-diagnostic.js +1 -228
  49. package/dist/services/broadcast.js +1 -52
  50. package/dist/services/browser-manager.js +1 -562
  51. package/dist/services/browser-webfetch.js +1 -127
  52. package/dist/services/browser.js +1 -121
  53. package/dist/services/cdp-bootstrap.js +1 -357
  54. package/dist/services/compaction.js +1 -144
  55. package/dist/services/critical-notify.js +1 -203
  56. package/dist/services/cron-resolver.js +1 -58
  57. package/dist/services/cron-scheduling.js +1 -310
  58. package/dist/services/cron.js +1 -861
  59. package/dist/services/custom-tools.js +1 -317
  60. package/dist/services/delivery-queue.js +1 -173
  61. package/dist/services/delivery-registry.js +1 -21
  62. package/dist/services/disk-cleanup.js +1 -203
  63. package/dist/services/elevenlabs.js +1 -58
  64. package/dist/services/embeddings/auto-detect.js +1 -74
  65. package/dist/services/embeddings/fts5.js +1 -108
  66. package/dist/services/embeddings/gemini.js +1 -65
  67. package/dist/services/embeddings/index.js +1 -496
  68. package/dist/services/embeddings/ollama.js +1 -78
  69. package/dist/services/embeddings/openai.js +1 -49
  70. package/dist/services/embeddings/provider.js +1 -22
  71. package/dist/services/embeddings/vector-base.js +1 -113
  72. package/dist/services/embeddings-migration.js +1 -193
  73. package/dist/services/embeddings.js +1 -9
  74. package/dist/services/env-file.js +1 -50
  75. package/dist/services/exec-guard.js +1 -71
  76. package/dist/services/fallback-order.js +1 -154
  77. package/dist/services/file-permissions.js +1 -93
  78. package/dist/services/heartbeat-file.js +1 -65
  79. package/dist/services/heartbeat.js +1 -313
  80. package/dist/services/hooks.js +1 -44
  81. package/dist/services/imagegen.js +1 -72
  82. package/dist/services/language-detect.js +1 -154
  83. package/dist/services/markdown.js +1 -63
  84. package/dist/services/mcp.js +1 -263
  85. package/dist/services/memory-extractor.js +1 -178
  86. package/dist/services/memory-inject-mode.js +1 -43
  87. package/dist/services/memory-layers.js +1 -156
  88. package/dist/services/memory.js +1 -146
  89. package/dist/services/ollama-manager.js +1 -339
  90. package/dist/services/permissions-wizard.js +1 -291
  91. package/dist/services/personality.js +1 -376
  92. package/dist/services/plugins.js +1 -171
  93. package/dist/services/preflight.js +1 -292
  94. package/dist/services/process-manager.js +1 -291
  95. package/dist/services/release-highlights.js +1 -79
  96. package/dist/services/reminders.js +1 -97
  97. package/dist/services/restart.js +1 -48
  98. package/dist/services/security-audit.js +1 -74
  99. package/dist/services/self-diagnosis.js +1 -272
  100. package/dist/services/self-search.js +1 -129
  101. package/dist/services/session-persistence.js +1 -237
  102. package/dist/services/session.js +1 -282
  103. package/dist/services/skills.js +1 -290
  104. package/dist/services/ssrf-guard.js +1 -162
  105. package/dist/services/standing-orders.js +1 -29
  106. package/dist/services/steer-channel.js +1 -46
  107. package/dist/services/stop-controller.js +1 -52
  108. package/dist/services/subagent-dedup.js +1 -86
  109. package/dist/services/subagent-delivery.js +1 -452
  110. package/dist/services/subagent-stats.js +1 -123
  111. package/dist/services/subagents.js +1 -814
  112. package/dist/services/sudo.js +1 -329
  113. package/dist/services/telegram.js +1 -158
  114. package/dist/services/timing-safe-bearer.js +1 -51
  115. package/dist/services/tool-discovery.js +1 -214
  116. package/dist/services/trends.js +1 -580
  117. package/dist/services/updater.js +1 -291
  118. package/dist/services/usage-tracker.js +1 -144
  119. package/dist/services/users.js +1 -271
  120. package/dist/services/voice.js +1 -104
  121. package/dist/services/watchdog-brake.js +1 -154
  122. package/dist/services/watchdog.js +1 -311
  123. package/dist/services/workspaces.js +1 -276
  124. package/dist/tui/index.js +1 -667
  125. package/dist/util/console-formatter.js +1 -109
  126. package/dist/util/debounce.js +1 -24
  127. package/dist/util/telegram-error-filter.js +1 -62
  128. package/dist/version.js +1 -24
  129. package/dist/web/bind-strategy.js +1 -42
  130. package/dist/web/canvas.js +1 -30
  131. package/dist/web/doctor-api.js +1 -604
  132. package/dist/web/openai-compat.js +1 -252
  133. package/dist/web/server.js +1 -1902
  134. package/dist/web/setup-api.js +1 -1101
  135. package/package.json +5 -2
  136. package/dist/.metadata_never_index +0 -0
@@ -1,214 +1 @@
1
- /**
2
- * Tool Discovery Service
3
- *
4
- * Scans the system at startup for available CLI tools, configured plugins,
5
- * and custom tools. Injects a summary into the system prompt so the AI
6
- * knows exactly what it can use — instead of guessing or saying "I'd need X".
7
- *
8
- * Philosophy: An agent that doesn't know its own capabilities is useless.
9
- */
10
- import { execSync } from "child_process";
11
- import fs from "fs";
12
- import { resolve } from "path";
13
- import { TOOLS_MD, TOOLS_JSON, PLUGINS_DIR } from "../paths.js";
14
- // Cache the report — only scan once per process lifetime
15
- let cachedReport = null;
16
- /**
17
- * CLI tools to probe for. Grouped by category.
18
- * Each entry: [binary, description]
19
- */
20
- const TOOL_PROBES = {
21
- "📧 Email & Communication": [
22
- ["himalaya", "Email CLI (IMAP/SMTP) — list, read, send, search emails"],
23
- ["wacli", "WhatsApp CLI — send messages, search history"],
24
- ["signal-cli", "Signal messenger CLI"],
25
- ],
26
- "🌐 Web & Network": [
27
- ["curl", "HTTP requests"],
28
- ["wget", "File downloads"],
29
- ["httpie", "Modern HTTP client"],
30
- ["jq", "JSON processor"],
31
- ],
32
- "📄 Document Processing": [
33
- ["pandoc", "Universal document converter (Markdown, HTML, PDF, DOCX, LaTeX)"],
34
- ["pdftotext", "Extract text from PDFs"],
35
- ["pdfinfo", "PDF metadata"],
36
- ["pdftoppm", "PDF to images"],
37
- ["gs", "Ghostscript — PDF manipulation (merge, split, compress)"],
38
- ["wkhtmltopdf", "HTML to PDF renderer"],
39
- ["libreoffice", "Office document conversion"],
40
- ],
41
- "🎨 Image Processing": [
42
- ["sips", "macOS image processing (resize, convert, rotate)"],
43
- ["magick", "ImageMagick — advanced image manipulation"],
44
- ["convert", "ImageMagick convert (legacy)"],
45
- ["ffmpeg", "Audio/Video/Image swiss army knife"],
46
- ],
47
- "🎬 Audio & Video": [
48
- ["ffmpeg", "Audio/Video conversion, extraction, streaming"],
49
- ["ffprobe", "Media file analysis (duration, codecs, bitrate)"],
50
- ["yt-dlp", "Download videos from YouTube and 1000+ sites"],
51
- ["whisper", "OpenAI Whisper — local speech-to-text"],
52
- ],
53
- "💻 Development": [
54
- ["node", "Node.js runtime"],
55
- ["npm", "Node package manager"],
56
- ["npx", "Node package executor"],
57
- ["python3", "Python 3"],
58
- ["pip3", "Python package manager"],
59
- ["git", "Version control"],
60
- ["gh", "GitHub CLI — issues, PRs, repos, actions"],
61
- ["docker", "Container runtime"],
62
- ["pm2", "Process manager"],
63
- ],
64
- "🖥️ macOS Automation": [
65
- ["osascript", "AppleScript / JXA automation"],
66
- ["cliclick", "Mouse/keyboard automation (click, type, key press)"],
67
- ["screencapture", "Take screenshots"],
68
- ["brightness", "Display brightness control"],
69
- ["blueutil", "Bluetooth control"],
70
- ["SwitchAudioSource", "Audio device switching"],
71
- ["mas", "Mac App Store CLI"],
72
- ["pbcopy", "Copy to clipboard"],
73
- ["pbpaste", "Paste from clipboard"],
74
- ],
75
- "📊 Data & Analysis": [
76
- ["sqlite3", "SQLite database CLI"],
77
- ["psql", "PostgreSQL client"],
78
- ["mysql", "MySQL client"],
79
- ["csvtool", "CSV processing"],
80
- ["mlr", "Miller — CSV/JSON/TSV data processor"],
81
- ],
82
- "🔧 System": [
83
- ["ssh", "Remote shell access"],
84
- ["sshpass", "SSH with password (non-interactive)"],
85
- ["rsync", "Fast file sync/transfer"],
86
- ["trash", "Safe file deletion (recoverable)"],
87
- ["htop", "System monitor"],
88
- ["lsof", "Open file/port inspector"],
89
- ],
90
- };
91
- /** Check if a binary exists on the system */
92
- function whichTool(name) {
93
- try {
94
- return execSync(`which ${name} 2>/dev/null`, { encoding: "utf-8", timeout: 3000 }).trim() || null;
95
- }
96
- catch {
97
- return null;
98
- }
99
- }
100
- /** Load custom tool names from TOOLS.md (with legacy tools.json fallback) */
101
- function loadCustomTools() {
102
- // Prefer TOOLS.md — extract tool names from ## headings
103
- if (fs.existsSync(TOOLS_MD)) {
104
- try {
105
- const content = fs.readFileSync(TOOLS_MD, "utf-8");
106
- const names = [];
107
- for (const match of content.matchAll(/^## (.+)$/gm)) {
108
- const name = match[1].trim().replace(/\s+/g, "_").toLowerCase();
109
- if (name)
110
- names.push(name);
111
- }
112
- if (names.length > 0)
113
- return names;
114
- }
115
- catch { /* fall through */ }
116
- }
117
- // Legacy fallback: docs/tools.json
118
- try {
119
- const data = JSON.parse(fs.readFileSync(TOOLS_JSON, "utf-8"));
120
- const tools = data.tools || data.items || (Array.isArray(data) ? data : []);
121
- return tools.map((t) => t.name || t.id || "unknown");
122
- }
123
- catch {
124
- return [];
125
- }
126
- }
127
- /** Get list of loaded plugins (read plugin directory) */
128
- function discoverPlugins() {
129
- try {
130
- return fs.readdirSync(PLUGINS_DIR)
131
- .filter(d => fs.statSync(resolve(PLUGINS_DIR, d)).isDirectory())
132
- .filter(d => fs.existsSync(resolve(PLUGINS_DIR, d, "index.js")));
133
- }
134
- catch {
135
- return [];
136
- }
137
- }
138
- /**
139
- * Scan the system for available tools. Cached after first call.
140
- */
141
- export function discoverTools(forceRescan = false) {
142
- if (cachedReport && !forceRescan)
143
- return cachedReport;
144
- const cliTools = [];
145
- const seen = new Set();
146
- for (const [category, probes] of Object.entries(TOOL_PROBES)) {
147
- for (const [name, description] of probes) {
148
- if (seen.has(name))
149
- continue;
150
- seen.add(name);
151
- const path = whichTool(name);
152
- if (path) {
153
- cliTools.push({ name, path, description, category });
154
- }
155
- }
156
- }
157
- const customTools = loadCustomTools();
158
- const plugins = discoverPlugins();
159
- // Build human-readable summary for the system prompt
160
- const lines = ["## Available Tools & Capabilities\n"];
161
- lines.push("The following tools are installed and ready to use on this system.\n");
162
- lines.push("**IMPORTANT:** Use these tools DIRECTLY. Do NOT say 'I would need X' when X is listed here.\n");
163
- // Group CLI tools by category
164
- const byCategory = new Map();
165
- for (const tool of cliTools) {
166
- const list = byCategory.get(tool.category) || [];
167
- list.push(tool);
168
- byCategory.set(tool.category, list);
169
- }
170
- for (const [category, tools] of byCategory) {
171
- lines.push(`### ${category}`);
172
- for (const t of tools) {
173
- lines.push(`- **${t.name}** — ${t.description}`);
174
- }
175
- lines.push("");
176
- }
177
- // Plugins
178
- if (plugins.length > 0) {
179
- lines.push("### 🔌 Active Plugins");
180
- for (const p of plugins) {
181
- lines.push(`- **${p}** — Use \`/${p}\` or ask directly about ${p} features`);
182
- }
183
- lines.push("");
184
- }
185
- // Custom tools
186
- if (customTools.length > 0) {
187
- lines.push(`### 🛠️ Custom Tools (${customTools.length} defined in TOOLS.md)`);
188
- lines.push(`Available via Web UI or by name. Examples: ${customTools.slice(0, 10).join(", ")}${customTools.length > 10 ? "..." : ""}`);
189
- lines.push("");
190
- }
191
- // Usage guidelines
192
- lines.push("### 💡 Usage Guidelines");
193
- lines.push("- **Act first, ask later.** If a tool is available → use it directly.");
194
- lines.push("- **`which <tool>`** if unsure whether something is installed.");
195
- lines.push("- **Combine tools:** e.g. `curl` + `jq` for APIs, `ffmpeg` + `ffprobe` for media.");
196
- lines.push("- **Missing tools:** Suggest installation, do NOT give up.");
197
- lines.push("");
198
- const summary = lines.join("\n");
199
- cachedReport = { cliTools, customTools, plugins, summary, scannedAt: Date.now() };
200
- console.log(`🔍 Tool discovery: ${cliTools.length} CLI tools, ${plugins.length} plugins, ${customTools.length} custom tools`);
201
- return cachedReport;
202
- }
203
- /**
204
- * Get the tool summary for injection into the system prompt.
205
- */
206
- export function getToolSummary() {
207
- return discoverTools().summary;
208
- }
209
- /**
210
- * Force rescan (e.g., after plugin install).
211
- */
212
- export function rescanTools() {
213
- return discoverTools(true);
214
- }
1
+ const _0x2e77ec=_0x1190,_0x157c3f=_0x1190;(function(_0x421551,_0x37a883){const _0x346ec6=_0x1190,_0x3f8358=_0x1190,_0x3207e5=_0x421551();while(!![]){try{const _0x570a9f=parseInt(_0x346ec6(0x16c))/(-0x14e*-0x7+-0xa*0x2ef+-0x7*-0x2e3)*(-parseInt(_0x346ec6(0x19b))/(-0x15e7+-0x3*0x5e7+-0x279e*-0x1))+parseInt(_0x346ec6(0x153))/(-0x1640+-0x4ca*-0x7+-0xb43)*(parseInt(_0x3f8358(0x14c))/(-0x10d*0xd+-0x171c+0xdb*0x2b))+-parseInt(_0x3f8358(0x1ea))/(-0x5f5+-0x26e4+0x2cde)+-parseInt(_0x346ec6(0x1fb))/(0x179e+0xaab+0x31*-0xb3)+-parseInt(_0x346ec6(0x1cf))/(-0x9ae+-0x24a8+0x2e5d*0x1)*(-parseInt(_0x346ec6(0x1e5))/(0x650+-0x2*0x71b+0x1d*0x46))+parseInt(_0x346ec6(0x163))/(-0x2182+0x25*0x59+-0x2*-0xa57)+parseInt(_0x3f8358(0x14f))/(-0x1fb0+0xd64+0x1256);if(_0x570a9f===_0x37a883)break;else _0x3207e5['push'](_0x3207e5['shift']());}catch(_0x361392){_0x3207e5['push'](_0x3207e5['shift']());}}}(_0x26e8,0xc1010+0x5990c+-0x4656d));const _0x5bad9a=(function(){let _0xb30198=!![];return function(_0xd28573,_0x231562){const _0x30938e=_0xb30198?function(){const _0x54009b=_0x1190;if(_0x231562){const _0x19cbec=_0x231562[_0x54009b(0x1ac)](_0xd28573,arguments);return _0x231562=null,_0x19cbec;}}:function(){};return _0xb30198=![],_0x30938e;};}()),_0x1dc0bf=_0x5bad9a(this,function(){const _0x814e4d=_0x1190,_0xdf6839=_0x1190;return _0x1dc0bf['toString']()['search'](_0x814e4d(0x1ff)+'+$')['toString']()[_0x814e4d(0x1b3)+'r'](_0x1dc0bf)[_0xdf6839(0x156)](_0x814e4d(0x1ff)+'+$');});_0x1dc0bf();import{execSync}from'child_process';import _0x426724 from'fs';function _0x26e8(){const _0x427703=['C3nVCG','uhL0Ag9Uidm','lsaQkG','zYb0B29SCZOQkG','zgLYzwn0BhKU','D2fJBgK','BIbut09muY5Tza','BguGvg9VBhmGjG','CgjWyxn0zq','AM9PBG','C3LUyY90CMfUCW','BMfNzxi','BwfJt1mGAw1HzW','BMfTzq','D2TODg1SDg9Wza','mte5CuPZq2X6','sfruucbYzxf1zq','lcbZzwfYy2GGzq','y3n2Dg9VBa','AxrVCG','z2vZ','tM9Kzs5QCYbYDq','vgfRzsbZy3jLzq','CYbPBNn0ywXSzq','BM93','Cg9YDcbPBNnWzq','ierVie5pvcbZyq','BMCGkhjLC2L6zq','r2HVC3rZy3jPCa','BgvKigfUzcbYzq','lsaQkKfJDcbMAq','CgjJB3b5','zsbWCM9JzxnZAq','DgL2zsK','ywrK','y2uGC3DPDgnOAq','qxzHAwXHyMXLia','nda0oteYCxf2ENH1','zsb0B29SCZOQkG','kgr1CMf0Aw9Ula','vgHLigzVBgXVDW','rgLZCgXHEsbICG','nduZnZa0nvjADMP6tq','DcdIGjqGuergig1H','ifn1z2DLC3qGAq','y2SSihr5CguSia','kgXLz2fJEsK','zgvZy3jPChrPBW','ywr5ihrVihvZzq','BgLICMvVzMzPyW','yxrPB24GkgnSAq','iguUzY4Gygn1CG','CgfYC2u','ignSAwvUDa','q29UDgfPBMvYia','v2HHDhnbChaGqW','ig9Yigj5ig5HBq','CZOG','iokaLcbPC3n1zxmS','nte3ndyWne1IDuP2uq','ycbVCIbHC2SGza','ignVzgvJCYWGyG','icHTzxjNzsWGCW','kcGOlISPkYKRkq','Bg9N','EsaNssb3B3vSza','y29UDMvYDa','ywjHC2uGq0Xj','BIWGzg8GtK9uia','D2DLDa','A2fNzsbTyw5HzW','zM9YiefqsxmSia','uergihrVigLTyq','ygzMBxbLz2aGkW','q29WEsb0BYbJBa','CgXPDcWGy29TCa','yNjPz2H0BMvZCW','rxH0CMfJDcb0zq','A2v5ihbYzxnZkq','yMX1zxv0AwW','BYbJB252zxjZAq','rg93BMXVywqGDG','kIOG4OcuifvZzsbG','AxneAxjLy3rVCG','CMvHzezPBgvtEq','igeGDg9VBcbPCW','y292zxj5oIa','DcaViePyqsbHDq','vdOQkIbvC2uGDa','lcbJB252zxj0la','rMLSzsbKB3DUBa','igfUywX5C2LZia','iYmJipcFM6dVUi8Gq3vZDa','Dg8TDgv4Da','BNrPBwu','vMvYC2LVBIbJBW','vIbKyxrHihbYBW','igf2ywLSywjSzq','sfrntcWGuergla','tw91C2uVA2v5yG','DhjHC2G','ugfZDguGzNjVBq','DhjPBq','AgfZ','BwfW','zg9JDw1LBNqGyW','EhqGzNjVBsbqra','BwXY','u3LZDgvTig1VBG','ChnXBa','AxjLy3rSEsbHyG','zxHPC3rZu3LUyW','Dw5RBM93BG','AgLTywXHEwe','qxvKAw8Gzgv2Aq','C3rZ','u2fMzsbMAwXLia','BwfNAwnR','zMzWCM9Izq','AxnbCNjHEq','ug9ZDgDYzvnrta','BMqGmtaWmcSGCW','twfJiefWCcbtDa','ienmssb0B29SCW','z2uGBwfUywDLCG','C3vTBwfYEq','B24Sigv4DhjHyW','BwfZ','AwDODg5LC3mGyW','nhLjy2rIyG','ierpq1GSieXHva','uhjVy2vZCYbTyq','mJyXode5mZbKDw1qChK','C2LWCW','C3fSAxrLmW','idi+l2rLDI9UDq','ntm5odCXweP1t2TM','BNb4','qxvKAw8VvMLKzq','C2vHCMnO','ig9UihrOAxmGCW','B3jLienmsq','BNrYB2W','BwvZC2fNzxmSia','C2LNBMfSlwnSAq','y2f0zwDVCNK','C2LUzW','BMLWDwXHDgLVBG','D2HPC3bLCG','zgvSzxrPB24Gka','sw1Hz2vnywDPyW','Aw5KzxGUANm','ntm4nZm1nvjIyLfHEq','BhnVzG','DMuGugX1z2LUCW','twvKAweGzMLSzq','yxjLigLUC3rHBa','igzLyxr1CMvZ','BwfPBhm','y29UDhjVBa','tw9KzxjUieHuva','mtnntxPptNm','CNn5BMm','lsaQkK1PC3nPBG','idX0B29SpMaQkG','zwqGAw1Hz2uGBq','BNbT','y3rVCG','ucbJBgLLBNq','z2v0','ig5LzwqGwcCGDW','igrLzMLUzwqGAq','ChvZAa','Dg9VBhm','Dg9YEq','ExqTzgXW','C3bLCIdIGjqGBg9J','C3rHDfn5BMm','iYmJipcFLiWGqwn0Aq','AYdIGjqGywr2yw5J','AxrYyxrLkq','twfYA2rVD24Sia','AxnZigfYBxKGAW','Dg9mB3DLCKnHCW','rw1HAwWGq0Xjia','txLtuuWGy2XPzq','Ahr0CgLL','ywWGC3bLzwnOlq','kIPjtvbpuLrbtG','B2XZ','C2vUz2vYienmsq','igLMihvUC3vYzq','D2HPy2GG','zMLSDgvY','zw50CMLLCW','BMLMzq','ign1C3rVBsb0BW','lI4U','ihDOzxrOzxiGCW','CMvWBgfJzq','BNn0ywXSyxrPBW','CgrMDg90zxH0','BgvUz3rO','u2LNBMfSig1LCW','Dw1LBNqGy29UDG','ierjuKvdveXzlG','CgrMAw5MBW','tM9KzsbWywnRyq','mJq4otmWBNbStwjk','ksdIGjqGBgLZDcWG','CMvZCYK','Bwf0y2HbBgW','ifLVDvr1yMuGyq','B24TAw50zxjHyW','C2XPy2u','B3nHC2nYAxb0','keLnqvaVu01uua','z2L0','BxLZCwW','u1niihDPDgGGCa','r2L0shvIienmsq','zxjZAw9U','sfrntcb0BYbqra','CgLWmW','Exn0zw0UcG','yxbWBhK','Cg0Y','igzVCIbTzwrPyq','z2L2zsb1Cc4','z2uGzxHLy3v0BW','DxrMltG','Axn0zwqGAgvYzq','y29UC3rYDwn0BW','iYmJia','lsaQkMb3AgLJAa','zMzTCgvN','B2fKCW','yxnZD29YzcaOBG','teKG4OcuihnLBMqG','igbMzNbYB2jLya','q1nwihbYB2nLCW','u1fmAxrLigrHDa','yxrLCI4QkIbjzG','uhL0Ag9UihbHyW','AxbIB2fYza'];_0x26e8=function(){return _0x427703;};return _0x26e8();}import{resolve}from'path';import{TOOLS_MD,TOOLS_JSON,PLUGINS_DIR}from'../paths.js';function _0x1190(_0x1f1a40,_0x1ed4d0){_0x1f1a40=_0x1f1a40-(-0x9*0x125+-0x2*0x289+0x1076);const _0x27e551=_0x26e8();let _0x2ddb28=_0x27e551[_0x1f1a40];if(_0x1190['goffYi']===undefined){var _0x2baad1=function(_0x22862b){const _0x4d2484='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x17beaf='',_0x2cd28b='',_0x650976=_0x17beaf+_0x2baad1;for(let _0x267e9c=0xb*-0x335+-0x820+0x2b67,_0x16337a,_0x4c7ba3,_0x1c3bcb=0x1ce7+-0x11df*-0x1+-0x2ec6;_0x4c7ba3=_0x22862b['charAt'](_0x1c3bcb++);~_0x4c7ba3&&(_0x16337a=_0x267e9c%(0x83*0x49+-0x1cf*-0x1+-0x2*0x1393)?_0x16337a*(0xa80+0x10cb+-0x7*0x3dd)+_0x4c7ba3:_0x4c7ba3,_0x267e9c++%(-0x17ef+0x1eb1+-0x6be*0x1))?_0x17beaf+=_0x650976['charCodeAt'](_0x1c3bcb+(-0x1f77+-0xa80+0x2a01))-(-0x2*0x5df+0x17b*-0x14+0xc*0x373)!==-0x15*-0x1d+-0x1286*-0x1+-0x14e7?String['fromCharCode'](0xf55+-0x1de8+-0x2*-0x7c9&_0x16337a>>(-(0xe1a+-0x7e3+-0x635)*_0x267e9c&-0x1e21+-0x9fe*0x1+0x2825)):_0x267e9c:-0x2d*-0xc9+-0x1a3*-0x16+-0x4757){_0x4c7ba3=_0x4d2484['indexOf'](_0x4c7ba3);}for(let _0x2c8fa2=0x1*0x946+-0x19ab*-0x1+-0x22f1,_0x3ad604=_0x17beaf['length'];_0x2c8fa2<_0x3ad604;_0x2c8fa2++){_0x2cd28b+='%'+('00'+_0x17beaf['charCodeAt'](_0x2c8fa2)['toString'](0x236a+0x1dcf+-0x4129*0x1))['slice'](-(0x40b+0x11*-0x133+0x2*0x82d));}return decodeURIComponent(_0x2cd28b);};_0x1190['QFxLQJ']=_0x2baad1,_0x1190['HeYHCc']={},_0x1190['goffYi']=!![];}const _0x260160=_0x27e551[0x9e8+0x1e21+-0x25*0x115],_0x502264=_0x1f1a40+_0x260160,_0x1ee6ab=_0x1190['HeYHCc'][_0x502264];if(!_0x1ee6ab){const _0xbe2a72=function(_0x576714){this['LOxVON']=_0x576714,this['YppKrO']=[0x1*-0x1d4b+-0x1f1b+0x149*0x2f,-0xb59+-0x12c3+-0x1e1c*-0x1,-0xb*-0x152+-0x22db*-0x1+-0x3161],this['oXyuwO']=function(){return'newState';},this['rADHYc']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['MQZagB']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0xbe2a72['prototype']['wzIlnL']=function(){const _0xd1d72c=new RegExp(this['rADHYc']+this['MQZagB']),_0x596aef=_0xd1d72c['test'](this['oXyuwO']['toString']())?--this['YppKrO'][-0x29a+0xc39+-0x99e]:--this['YppKrO'][-0x4*0x911+0x19df+0xa65];return this['iMMLkH'](_0x596aef);},_0xbe2a72['prototype']['iMMLkH']=function(_0x1a887e){if(!Boolean(~_0x1a887e))return _0x1a887e;return this['iqQPKp'](this['LOxVON']);},_0xbe2a72['prototype']['iqQPKp']=function(_0x52fccb){for(let _0x234040=0x12dc+0x1379+-0x1*0x2655,_0x14f439=this['YppKrO']['length'];_0x234040<_0x14f439;_0x234040++){this['YppKrO']['push'](Math['round'](Math['random']())),_0x14f439=this['YppKrO']['length'];}return _0x52fccb(this['YppKrO'][-0x1*-0x1855+-0x79*0x1f+-0x9ae]);},new _0xbe2a72(_0x1190)['wzIlnL'](),_0x2ddb28=_0x1190['QFxLQJ'](_0x2ddb28),_0x1190['HeYHCc'][_0x502264]=_0x2ddb28;}else _0x2ddb28=_0x1ee6ab;return _0x2ddb28;}let cachedReport=null;const TOOL_PROBES={'📧\x20Email\x20&\x20Communication':[[_0x2e77ec(0x13c),_0x157c3f(0x183)+_0x2e77ec(0x1a3)+_0x157c3f(0x19c)+'read,\x20send'+_0x157c3f(0x1d1)+_0x157c3f(0x169)],[_0x2e77ec(0x1c5),_0x157c3f(0x1f7)+_0x157c3f(0x1b9)+_0x157c3f(0x15a)+'search\x20his'+_0x2e77ec(0x179)],[_0x157c3f(0x15b),_0x157c3f(0x196)+_0x157c3f(0x189)]],'🌐\x20Web\x20&\x20Network':[['curl',_0x157c3f(0x1d0)+_0x157c3f(0x13e)],[_0x157c3f(0x205),_0x157c3f(0x125)+_0x2e77ec(0x1b7)],[_0x2e77ec(0x185),_0x2e77ec(0x16b)+_0x2e77ec(0x173)],['jq','JSON\x20proce'+_0x157c3f(0x1c0)]],'📄\x20Document\x20Processing':[['pandoc','Universal\x20'+_0x2e77ec(0x134)+'onverter\x20('+_0x157c3f(0x180)+_0x157c3f(0x12d)+_0x2e77ec(0x14d)+'eX)'],[_0x2e77ec(0x194),_0x2e77ec(0x118)+_0x2e77ec(0x135)+'Fs'],[_0x157c3f(0x199),'PDF\x20metada'+'ta'],['pdftoppm',_0x2e77ec(0x208)+_0x2e77ec(0x1d4)],['gs',_0x157c3f(0x1dc)+_0x2e77ec(0x1eb)+_0x157c3f(0x15e)+_0x157c3f(0x1fe)+_0x157c3f(0x20b)+_0x2e77ec(0x19d)],[_0x2e77ec(0x1ce)+'f',_0x2e77ec(0x1a9)+'F\x20renderer'],[_0x2e77ec(0x1f1)+'e','Office\x20doc'+_0x157c3f(0x197)+_0x157c3f(0x1a8)]],'🎨\x20Image\x20Processing':[[_0x157c3f(0x150),_0x157c3f(0x1cc)+_0x157c3f(0x1e0)+_0x2e77ec(0x1db)+_0x157c3f(0x124)+'\x20rotate)'],[_0x2e77ec(0x140),_0x157c3f(0x161)+_0x2e77ec(0x17e)+_0x157c3f(0x170)+'anipulatio'+'n'],[_0x2e77ec(0x202),_0x2e77ec(0x161)+'k\x20convert\x20'+_0x157c3f(0x1ee)],[_0x2e77ec(0x1b6),_0x2e77ec(0x155)+'o/Image\x20sw'+_0x157c3f(0x181)+_0x157c3f(0x18e)]],'🎬\x20Audio\x20&\x20Video':[[_0x157c3f(0x1b6),'Audio/Vide'+_0x157c3f(0x11b)+_0x157c3f(0x149)+'tion,\x20stre'+'aming'],[_0x2e77ec(0x141),_0x2e77ec(0x166)+_0x157c3f(0x126)+_0x157c3f(0x1e7)+_0x2e77ec(0x1fd)+_0x2e77ec(0x17f)],[_0x2e77ec(0x17a),_0x157c3f(0x11c)+'ideos\x20from'+_0x157c3f(0x19f)+_0x2e77ec(0x144)+'ites'],[_0x2e77ec(0x15f),'OpenAI\x20Whi'+_0x157c3f(0x17b)+_0x157c3f(0x186)+_0x157c3f(0x128)]],'💻\x20Development':[['node',_0x157c3f(0x1d5)+_0x2e77ec(0x129)],[_0x2e77ec(0x171),_0x157c3f(0x19a)+_0x2e77ec(0x147)],[_0x157c3f(0x154),_0x157c3f(0x19a)+_0x157c3f(0x1b0)+'r'],['python3',_0x2e77ec(0x1c1)],[_0x157c3f(0x1aa),_0x2e77ec(0x1be)+_0x2e77ec(0x206)+'er'],[_0x157c3f(0x1a4),_0x157c3f(0x12a)+_0x2e77ec(0x159)],['gh',_0x157c3f(0x1a7)+_0x157c3f(0x1fa)+'\x20PRs,\x20repo'+'s,\x20actions'],['docker',_0x157c3f(0x1f6)+'runtime'],[_0x2e77ec(0x1ad),_0x157c3f(0x14e)+_0x2e77ec(0x1cb)]],'🖥️\x20macOS\x20Automation':[[_0x2e77ec(0x1a2),'AppleScrip'+_0x2e77ec(0x122)+'tomation'],['cliclick',_0x157c3f(0x12e)+'oard\x20autom'+_0x157c3f(0x1f2)+_0x2e77ec(0x1ed)+_0x157c3f(0x119)],['screencapt'+'ure',_0x157c3f(0x1d6)+'nshots'],[_0x157c3f(0x117),_0x2e77ec(0x1e9)+_0x157c3f(0x14b)+'ontrol'],[_0x2e77ec(0x11a),'Bluetooth\x20'+_0x157c3f(0x16a)],['SwitchAudi'+'oSource',_0x157c3f(0x13d)+_0x157c3f(0x1e3)+'ng'],[_0x2e77ec(0x14a),_0x157c3f(0x145)+_0x2e77ec(0x158)],[_0x157c3f(0x1df),_0x2e77ec(0x20a)+_0x2e77ec(0x1bf)],[_0x2e77ec(0x1c8),_0x157c3f(0x130)+'\x20clipboard']],'📊\x20Data\x20&\x20Analysis':[[_0x157c3f(0x151),_0x157c3f(0x1bc)+_0x2e77ec(0x203)],[_0x2e77ec(0x138),_0x157c3f(0x143)+_0x2e77ec(0x1f5)],[_0x2e77ec(0x1a5),_0x2e77ec(0x184)+'nt'],[_0x2e77ec(0x1d2),_0x157c3f(0x1bb)+_0x2e77ec(0x15d)],[_0x157c3f(0x136),'Miller\x20—\x20C'+'SV/JSON/TS'+_0x2e77ec(0x12b)+'cessor']],'🔧\x20System':[['ssh','Remote\x20she'+'ll\x20access'],['sshpass',_0x157c3f(0x1a6)+_0x157c3f(0x1b8)+_0x2e77ec(0x1a0)+_0x2e77ec(0x1e1)],[_0x157c3f(0x16d),'Fast\x20file\x20'+_0x2e77ec(0x1ca)+'fer'],[_0x2e77ec(0x12f),_0x2e77ec(0x13f)+_0x2e77ec(0x160)+'recoverabl'+'e)'],['htop',_0x2e77ec(0x137)+_0x2e77ec(0x1d3)],[_0x157c3f(0x164),'Open\x20file/'+_0x157c3f(0x1d9)+_0x2e77ec(0x172)]]};function whichTool(_0x40e632){const _0x33c13a=_0x157c3f,_0x551952=_0x2e77ec;try{return execSync(_0x33c13a(0x18b)+_0x40e632+(_0x551952(0x152)+'ll'),{'encoding':_0x551952(0x1b1),'timeout':0xbb8})[_0x551952(0x131)]()||null;}catch{return null;}}function loadCustomTools(){const _0x462a9d=_0x2e77ec,_0x409789=_0x2e77ec;if(_0x426724[_0x462a9d(0x13a)](TOOLS_MD))try{const _0x26103c=_0x426724[_0x462a9d(0x11f)+'nc'](TOOLS_MD,'utf-8'),_0x1c1044=[];for(const _0x14caa0 of _0x26103c[_0x409789(0x19e)](/^## (.+)$/gm)){const _0x19ea28=_0x14caa0[0x1ce7+-0x11df*-0x1+-0x2ec5]['trim']()[_0x462a9d(0x192)](/\s+/g,'_')[_0x462a9d(0x182)+'e']();if(_0x19ea28)_0x1c1044[_0x409789(0x177)](_0x19ea28);}if(_0x1c1044[_0x462a9d(0x195)]>0x83*0x49+-0x1cf*-0x1+-0x12*0x22d)return _0x1c1044;}catch{}try{const _0xaea093=JSON[_0x462a9d(0x1f4)](_0x426724[_0x409789(0x11f)+'nc'](TOOLS_JSON,'utf-8')),_0x237dfb=_0xaea093[_0x462a9d(0x178)]||_0xaea093['items']||(Array[_0x409789(0x142)](_0xaea093)?_0xaea093:[]);return _0x237dfb[_0x409789(0x133)](_0x2b8d56=>_0x2b8d56[_0x462a9d(0x1cd)]||_0x2b8d56['id']||_0x462a9d(0x13b));}catch{return[];}}function discoverPlugins(){const _0x3240b0=_0x2e77ec,_0x25ae6c=_0x157c3f;try{return _0x426724['readdirSyn'+'c'](PLUGINS_DIR)[_0x3240b0(0x18c)](_0x40347d=>_0x426724[_0x3240b0(0x17c)](resolve(PLUGINS_DIR,_0x40347d))[_0x3240b0(0x11e)+'y']())[_0x25ae6c(0x18c)](_0x324973=>_0x426724[_0x25ae6c(0x13a)](resolve(PLUGINS_DIR,_0x324973,_0x3240b0(0x162))));}catch{return[];}}export function discoverTools(_0x277d12=![]){const _0x49eb43=_0x157c3f,_0x1f6451=_0x157c3f;if(cachedReport&&!_0x277d12)return cachedReport;const _0x5acf41=[],_0x5ba329=new Set();for(const [_0x3b0205,_0x4f047f]of Object[_0x49eb43(0x18d)](TOOL_PROBES)){for(const [_0x4dc901,_0x30cf45]of _0x4f047f){if(_0x5ba329[_0x1f6451(0x132)](_0x4dc901))continue;_0x5ba329[_0x49eb43(0x1e2)](_0x4dc901);const _0x533804=whichTool(_0x4dc901);_0x533804&&_0x5acf41[_0x1f6451(0x177)]({'name':_0x4dc901,'path':_0x533804,'description':_0x30cf45,'category':_0x3b0205});}}const _0x59c226=loadCustomTools(),_0x1ce535=discoverPlugins(),_0x3b89be=['##\x20Availab'+_0x1f6451(0x1c7)+'\x20Capabilit'+'ies\x0a'];_0x3b89be[_0x1f6451(0x177)](_0x49eb43(0x1e8)+'ing\x20tools\x20'+_0x49eb43(0x167)+_0x1f6451(0x1dd)+_0x49eb43(0x1f0)+_0x49eb43(0x157)+_0x49eb43(0x1ab)),_0x3b89be['push'](_0x1f6451(0x187)+_0x1f6451(0x123)+'hese\x20tools'+_0x1f6451(0x198)+_0x49eb43(0x1da)+_0x49eb43(0x201)+_0x49eb43(0x175)+'hen\x20X\x20is\x20l'+_0x1f6451(0x1b2)+'.\x0a');const _0x15e46b=new Map();for(const _0x565726 of _0x5acf41){const _0x6c4ac4=_0x15e46b[_0x1f6451(0x174)](_0x565726[_0x49eb43(0x15c)])||[];_0x6c4ac4[_0x49eb43(0x177)](_0x565726),_0x15e46b['set'](_0x565726[_0x49eb43(0x15c)],_0x6c4ac4);}for(const [_0x5aea0f,_0x541272]of _0x15e46b){_0x3b89be[_0x1f6451(0x177)](_0x1f6451(0x1b4)+_0x5aea0f);for(const _0x1ab2f1 of _0x541272){_0x3b89be[_0x1f6451(0x177)](_0x1f6451(0x1c2)+_0x1ab2f1['name']+'**\x20—\x20'+_0x1ab2f1[_0x49eb43(0x1ef)+'n']);}_0x3b89be[_0x49eb43(0x177)]('');}if(_0x1ce535['length']>0xa80+0x10cb+-0x3*0x919){_0x3b89be[_0x1f6451(0x177)](_0x49eb43(0x17d)+_0x49eb43(0x165));for(const _0x1cc486 of _0x1ce535){_0x3b89be[_0x1f6451(0x177)]('-\x20**'+_0x1cc486+(_0x49eb43(0x11d)+'/')+_0x1cc486+(_0x1f6451(0x1fc)+_0x49eb43(0x139)+'out\x20')+_0x1cc486+_0x1f6451(0x168));}_0x3b89be[_0x1f6451(0x177)]('');}_0x59c226[_0x1f6451(0x195)]>-0x17ef+0x1eb1+-0x6c2*0x1&&(_0x3b89be['push'](_0x1f6451(0x127)+'om\x20Tools\x20('+_0x59c226[_0x49eb43(0x195)]+(_0x1f6451(0x176)+_0x1f6451(0x1c6)+')')),_0x3b89be['push'](_0x1f6451(0x1e4)+'via\x20Web\x20UI'+_0x1f6451(0x1f8)+'e.\x20Example'+_0x49eb43(0x1f9)+_0x59c226[_0x49eb43(0x1a1)](-0x1f77+-0xa80+0x29f7,-0x2*0x5df+0x17b*-0x14+0xc*0x373)['join'](',\x20')+(_0x59c226[_0x49eb43(0x195)]>-0x15*-0x1d+-0x1286*-0x1+-0x14dd?_0x49eb43(0x190):'')),_0x3b89be[_0x49eb43(0x177)](''));_0x3b89be[_0x1f6451(0x177)]('###\x20💡\x20Usag'+'e\x20Guidelin'+'es'),_0x3b89be[_0x49eb43(0x177)](_0x1f6451(0x1de)+'rst,\x20ask\x20l'+_0x1f6451(0x1bd)+_0x49eb43(0x120)+_0x1f6451(0x12c)+'\x20→\x20use\x20it\x20'+_0x49eb43(0x1c4)),_0x3b89be[_0x49eb43(0x177)](_0x1f6451(0x1b5)+_0x1f6451(0x16f)+_0x1f6451(0x18a)+_0x1f6451(0x191)+'omething\x20i'+_0x1f6451(0x1d7)+'d.'),_0x3b89be['push']('-\x20**Combin'+_0x1f6451(0x1e6)+_0x1f6451(0x1f3)+'l`\x20+\x20`jq`\x20'+_0x1f6451(0x207)+_0x49eb43(0x209)+_0x49eb43(0x1ba)+_0x49eb43(0x1ae)+'.'),_0x3b89be[_0x1f6451(0x177)](_0x49eb43(0x16e)+_0x1f6451(0x1c3)+_0x1f6451(0x1ec)+_0x1f6451(0x193)+_0x49eb43(0x204)+_0x49eb43(0x1af)),_0x3b89be['push']('');const _0x239e5e=_0x3b89be[_0x49eb43(0x1c9)]('\x0a');return cachedReport={'cliTools':_0x5acf41,'customTools':_0x59c226,'plugins':_0x1ce535,'summary':_0x239e5e,'scannedAt':Date[_0x1f6451(0x1d8)]()},console[_0x1f6451(0x200)]('🔍\x20Tool\x20dis'+_0x49eb43(0x121)+_0x5acf41[_0x1f6451(0x195)]+(_0x1f6451(0x146)+',\x20')+_0x1ce535['length']+'\x20plugins,\x20'+_0x59c226[_0x1f6451(0x195)]+(_0x1f6451(0x18f)+_0x1f6451(0x188))),cachedReport;}export function getToolSummary(){const _0x310fe6=_0x157c3f;return discoverTools()[_0x310fe6(0x148)];}export function rescanTools(){return discoverTools(!![]);}