@poolzin/pool-bot 2026.3.9 → 2026.3.11
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/CHANGELOG.md +35 -0
- package/README.md +147 -69
- package/dist/.buildstamp +1 -1
- package/dist/agents/error-classifier.js +26 -77
- package/dist/agents/skills/security.js +1 -7
- package/dist/build-info.json +3 -3
- package/dist/cli/cron-cli/register.cron-dashboard.js +339 -0
- package/dist/cli/cron-cli/register.js +2 -0
- package/dist/cli/errors.js +187 -0
- package/dist/cli/program/command-registry.js +13 -0
- package/dist/cli/program/register.maintenance.js +21 -0
- package/dist/cli/program/register.subclis.js +9 -0
- package/dist/cli/swarm-cli/register.js +8 -0
- package/dist/cli/swarm-cli/register.swarm-status.js +488 -0
- package/dist/cli/telemetry-cli/register.js +10 -0
- package/dist/cli/telemetry-cli/register.telemetry-alerts.js +176 -0
- package/dist/cli/telemetry-cli/register.telemetry-metrics.js +323 -0
- package/dist/cli/telemetry-cli/register.telemetry-status.js +179 -0
- package/dist/commands/doctor-checks.js +498 -0
- package/dist/context-engine/index.js +1 -1
- package/dist/context-engine/legacy.js +1 -3
- package/dist/context-engine/summarizing.js +5 -8
- package/dist/cron/service/timer.js +18 -0
- package/dist/gateway/protocol/index.js +5 -2
- package/dist/gateway/protocol/schema/error-codes.js +1 -0
- package/dist/gateway/protocol/schema/swarm.js +80 -0
- package/dist/gateway/protocol/schema.js +1 -0
- package/dist/gateway/server-close.js +4 -0
- package/dist/gateway/server-constants.js +1 -0
- package/dist/gateway/server-cron.js +29 -0
- package/dist/gateway/server-maintenance.js +35 -2
- package/dist/gateway/server-methods/swarm.js +58 -0
- package/dist/gateway/server-methods/telemetry.js +71 -0
- package/dist/gateway/server-methods-list.js +8 -0
- package/dist/gateway/server-methods.js +9 -2
- package/dist/gateway/server.impl.js +33 -16
- package/dist/infra/abort-pattern.js +4 -4
- package/dist/infra/retry.js +3 -1
- package/dist/skills/commands.js +7 -25
- package/dist/skills/index.js +14 -17
- package/dist/skills/parser.js +12 -27
- package/dist/skills/registry.js +3 -6
- package/dist/skills/security.js +2 -8
- package/dist/swarm/service.js +247 -0
- package/dist/telemetry/alert-engine.js +258 -0
- package/dist/telemetry/cron-instrumentation.js +49 -0
- package/dist/telemetry/gateway-instrumentation.js +80 -0
- package/dist/telemetry/instrumentation.js +66 -0
- package/dist/telemetry/service.js +345 -0
- package/dist/tui/components/assistant-message.js +6 -2
- package/dist/tui/components/hyperlink-markdown.js +32 -0
- package/dist/tui/components/searchable-select-list.js +12 -1
- package/dist/tui/components/user-message.js +6 -2
- package/dist/tui/index.js +22 -6
- package/dist/tui/theme/theme-detection.js +226 -0
- package/dist/tui/tui-command-handlers.js +20 -0
- package/dist/tui/tui-formatters.js +4 -3
- package/dist/tui/utils/ctrl-c-handler.js +67 -0
- package/dist/tui/utils/osc8-hyperlinks.js +208 -0
- package/dist/tui/utils/safe-stop.js +180 -0
- package/dist/tui/utils/session-key-utils.js +81 -0
- package/dist/tui/utils/text-sanitization.js +284 -0
- package/dist/utils/lru-cache.js +116 -0
- package/dist/utils/performance.js +199 -0
- package/dist/utils/retry.js +240 -0
- package/docs/MELHORIAS_IMPLEMENTADAS.md +228 -0
- package/docs/MELHORIAS_PROFISSIONAIS.md +282 -0
- package/docs/PLANO_ACAO_TUI.md +357 -0
- package/docs/PROGRESSO_TUI.md +66 -0
- package/docs/RELATORIO_FINAL.md +217 -0
- package/docs/diagnostico-shell-completion.md +265 -0
- package/docs/features/advanced-memory.md +585 -0
- package/docs/features/discord-components-v2.md +277 -0
- package/docs/features/swarm.md +100 -0
- package/docs/features/telemetry.md +284 -0
- package/docs/integrations/INTEGRATION_PLAN.md +665 -345
- package/docs/models/provider-infrastructure.md +400 -0
- package/docs/security/exec-approvals.md +294 -0
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/hexstrike-bridge/README.md +119 -0
- package/extensions/hexstrike-bridge/index.test.ts +247 -0
- package/extensions/hexstrike-bridge/index.ts +487 -0
- package/extensions/hexstrike-bridge/package.json +17 -0
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +10 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/mavalie/README.md +97 -0
- package/extensions/mavalie/package.json +15 -0
- package/extensions/mavalie/src/index.ts +62 -0
- package/extensions/mcp-server/index.ts +14 -0
- package/extensions/mcp-server/package.json +11 -0
- package/extensions/mcp-server/src/service.ts +540 -0
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +10 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +10 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/openai-codex-auth/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +10 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +10 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +10 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +10 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
## v2026.3.11 (2026-03-11)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
- **Mavalie Plugin Template:** new example plugin `extensions/mavalie/` demonstrating proper PoolBot plugin structure
|
|
5
|
+
- Minimal valid plugin using `poolbot/plugin-sdk` with `emptyPluginConfigSchema()`
|
|
6
|
+
- TypeScript entry point with jiti transpilation support
|
|
7
|
+
- Provider registration example with API key authentication pattern
|
|
8
|
+
- Comprehensive README with plugin development guidelines
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## v2026.3.10 (2026-03-10)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
- **Telemetry Alert System:** intelligent alerting engine for proactive monitoring
|
|
16
|
+
- Real-time alert evaluation with configurable thresholds
|
|
17
|
+
- Built-in rules for cron failures, security scans, swarm tasks, gateway health
|
|
18
|
+
- Webhook and announce channel notifications
|
|
19
|
+
- Alert history tracking with automatic cleanup
|
|
20
|
+
- **Swarm State Persistence:** swarm task state now persisted to `~/.poolbot/swarm-state.json`
|
|
21
|
+
- Survives gateway restarts without losing task queue
|
|
22
|
+
- Automatic state recovery on startup
|
|
23
|
+
- **HexStrike Bridge Telemetry:** comprehensive metrics for HexStrike AI integration
|
|
24
|
+
- Request latency tracking with histograms
|
|
25
|
+
- Rate limiting with configurable thresholds
|
|
26
|
+
- Health check monitoring with automatic failover
|
|
27
|
+
- **Critical Bug Fix:** telemetry service now properly starts with gateway (was missing `await`)
|
|
28
|
+
|
|
29
|
+
### Improvements
|
|
30
|
+
- Optimized alert thresholds for production workloads
|
|
31
|
+
- Enhanced gateway instrumentation with memory and CPU metrics
|
|
32
|
+
- Improved error handling in telemetry pipeline
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
1
36
|
## v2026.3.9 (2026-03-09)
|
|
2
37
|
|
|
3
38
|
### Features
|
package/README.md
CHANGED
|
@@ -1,123 +1,201 @@
|
|
|
1
1
|
# 🎱 Pool Bot
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> **The AI Gateway for Teams That Need More Than Chatbots**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Pool Bot transforms your messaging apps into a powerful AI command center. Connect Claude, GPT, Gemini, and local models to WhatsApp, Telegram, Discord, Slack, Signal, and 15+ other channels—then extend with custom skills for your specific workflows.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@poolzin/pool-bot)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](https://docs.poolbot.dev)
|
|
6
10
|
|
|
7
11
|

|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
---
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
- 🧠 **Enhanced Memory** - Advanced context management
|
|
13
|
-
- 🛠️ **Developer Tools** - Built for development teams
|
|
14
|
-
- 🔒 **Private & Secure** - Your data, your control
|
|
15
|
-
- 🌐 **Multi-Channel Support** - WhatsApp, Telegram, Discord, Slack, Signal, and more
|
|
15
|
+
## ✨ What Makes Pool Bot Different
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
| Feature | What It Means For You |
|
|
18
|
+
|---------|----------------------|
|
|
19
|
+
| **🧩 Modular Skills System** | Add capabilities via YAML-based skills—no coding required for most extensions |
|
|
20
|
+
| **🌐 Universal Gateway** | One AI backend, unlimited channels. Add new messaging platforms without reconfiguration |
|
|
21
|
+
| **🧠 Advanced Memory** | MMR reranking, temporal decay, hybrid search—conversations that actually remember context |
|
|
22
|
+
| **⚡ Provider Infrastructure** | Multi-key pools, intelligent rate limiting, automatic failover across 10+ LLM providers |
|
|
23
|
+
| **🔒 Security-First** | Command approval workflows, audit logging, PII detection, configurable guardrails |
|
|
24
|
+
| **📱 Device Control** | Pair iOS/Android devices for remote automation, screenshots, and notifications |
|
|
18
25
|
|
|
19
|
-
|
|
20
|
-
npm install -g @poolzin/pool-bot
|
|
21
|
-
poolbot --help
|
|
22
|
-
```
|
|
26
|
+
---
|
|
23
27
|
|
|
24
|
-
## Quick Start
|
|
28
|
+
## 🚀 Quick Start
|
|
25
29
|
|
|
26
30
|
```bash
|
|
31
|
+
# Install globally
|
|
32
|
+
npm install -g @poolzin/pool-bot
|
|
33
|
+
|
|
27
34
|
# Start the gateway
|
|
28
35
|
poolbot gateway start
|
|
29
36
|
|
|
30
|
-
# Connect
|
|
31
|
-
poolbot channels login
|
|
37
|
+
# Connect your first channel
|
|
38
|
+
poolbot channels login whatsapp
|
|
32
39
|
|
|
33
|
-
# Check
|
|
40
|
+
# Check everything is running
|
|
34
41
|
poolbot status
|
|
35
42
|
```
|
|
36
43
|
|
|
37
|
-
|
|
44
|
+
**That's it.** Your AI assistant is now available on WhatsApp. Add more channels anytime.
|
|
38
45
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- 📱 **Node Pairing** - Control iOS/Android devices remotely
|
|
43
|
-
- 🎨 **Canvas** - Visual browser automation
|
|
44
|
-
- 🔧 **Skills System** - Extensible plugin architecture
|
|
45
|
-
- 📊 **PLCODE Dashboard** - Real-time development metrics
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 📡 Supported Channels
|
|
46
49
|
|
|
47
|
-
|
|
50
|
+
**Messaging Platforms:**
|
|
51
|
+
WhatsApp • Telegram • Discord • Slack • Signal • iMessage • Facebook Messenger • Instagram • LINE • Matrix • Mattermost • Zalo • Microsoft Teams
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
**Voice & Web:**
|
|
54
|
+
Web Interface • WebRTC • Voice Calls
|
|
50
55
|
|
|
51
|
-
|
|
56
|
+
**Custom:**
|
|
57
|
+
Webhooks • API • Custom integrations via skills
|
|
52
58
|
|
|
53
|
-
|
|
59
|
+
---
|
|
54
60
|
|
|
55
|
-
|
|
56
|
-
- 🔍 **GitHub Integration** - Issues, PRs, and CI management
|
|
57
|
-
- 🌦️ **Weather** - Current weather and forecasts
|
|
58
|
-
- 📧 **Notion** - Database and page management
|
|
59
|
-
- 🐦 **X/Twitter** - Social media engagement
|
|
60
|
-
- And more...
|
|
61
|
+
## 🤖 Supported AI Providers
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
| Provider | Models | Features |
|
|
64
|
+
|----------|--------|----------|
|
|
65
|
+
| **Anthropic** | Claude 3.5/3 Opus/Sonnet/Haiku | Full tool use, vision, extended thinking |
|
|
66
|
+
| **OpenAI** | GPT-4o, GPT-4, GPT-3.5 | Function calling, vision, DALL-E |
|
|
67
|
+
| **Google** | Gemini 1.5 Pro/Flash | Multimodal, 1M+ context window |
|
|
68
|
+
| **Groq** | Llama 3, Mixtral | Ultra-fast inference |
|
|
69
|
+
| **Ollama** | Local models | Privacy-first, offline capable |
|
|
70
|
+
| **Together** | 50+ open models | Mixtral, Llama, Qwen, and more |
|
|
71
|
+
| **OpenRouter** | 100+ models | Unified API for multiple providers |
|
|
72
|
+
| **Mistral** | Mistral Large/Medium/Small | European AI, GDPR compliant |
|
|
73
|
+
| **Cohere** | Command R/R+ | Enterprise-focused |
|
|
74
|
+
| **AI21** | Jamba/Jurassic | Long context specialist |
|
|
63
75
|
|
|
64
|
-
|
|
76
|
+
---
|
|
65
77
|
|
|
66
|
-
|
|
78
|
+
## 🛠️ Skills System
|
|
67
79
|
|
|
68
|
-
|
|
69
|
-
- 🪟 **Windows Node v2** (Python) - Local LLM, STT/TTS, automation
|
|
70
|
-
- 📱 **Android** - Native mobile app
|
|
71
|
-
- 🍎 **iOS/macOS** - Apple ecosystem apps
|
|
80
|
+
Pool Bot's unique skill system lets you add capabilities without touching core code:
|
|
72
81
|
|
|
73
|
-
|
|
82
|
+
```yaml
|
|
83
|
+
# Example: Weather Skill (skills/weather/SKILL.md)
|
|
84
|
+
---
|
|
85
|
+
name: weather
|
|
86
|
+
description: Get weather forecasts
|
|
87
|
+
tools:
|
|
88
|
+
- name: get_weather
|
|
89
|
+
description: Get current weather for a location
|
|
90
|
+
parameters:
|
|
91
|
+
location: string
|
|
92
|
+
units: enum[celsius, fahrenheit]
|
|
93
|
+
---
|
|
94
|
+
```
|
|
74
95
|
|
|
75
|
-
|
|
96
|
+
**Built-in Skills:**
|
|
97
|
+
- 🎮 **WebGPU Three.js** - 3D development and visualization
|
|
98
|
+
- 🔍 **GitHub** - Issues, PRs, CI/CD management
|
|
99
|
+
- 🌦️ **Weather** - Current conditions and forecasts
|
|
100
|
+
- 📝 **Notion** - Database and page management
|
|
101
|
+
- 🐦 **X/Twitter** - Social media automation
|
|
102
|
+
- 📧 **Gmail** - Email management
|
|
103
|
+
- 📅 **Calendar** - Schedule management
|
|
104
|
+
- 🔐 **1Password** - Secure credential access
|
|
105
|
+
- 🎨 **Canvas** - Visual browser automation
|
|
106
|
+
- 🖼️ **Image Generation** - DALL-E, Stable Diffusion integration
|
|
76
107
|
|
|
77
|
-
|
|
78
|
-
# Use default profile
|
|
79
|
-
poolbot gateway start
|
|
108
|
+
**Create your own:** See [Creating Skills](https://docs.poolbot.dev/skills/creating)
|
|
80
109
|
|
|
81
|
-
|
|
82
|
-
poolbot --profile production gateway start
|
|
110
|
+
---
|
|
83
111
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
112
|
+
## 🏗️ Architecture Highlights
|
|
113
|
+
|
|
114
|
+
### Provider Infrastructure
|
|
115
|
+
- **Multi-key pools** - Rotate across multiple API keys for higher rate limits
|
|
116
|
+
- **Intelligent routing** - Route by model capability, cost, or latency
|
|
117
|
+
- **Automatic failover** - Seamless fallback when providers degrade
|
|
118
|
+
- **Usage tracking** - Per-key, per-model cost analytics
|
|
119
|
+
|
|
120
|
+
### Memory System
|
|
121
|
+
- **Semantic search** - Find relevant context across conversation history
|
|
122
|
+
- **MMR reranking** - Diverse, non-redundant context retrieval
|
|
123
|
+
- **Temporal decay** - Recent conversations weighted higher
|
|
124
|
+
- **Hybrid search** - Combine vector similarity with keyword matching
|
|
125
|
+
|
|
126
|
+
---
|
|
87
127
|
|
|
88
|
-
##
|
|
128
|
+
## 📱 Companion Apps
|
|
129
|
+
|
|
130
|
+
Extend Pool Bot to your devices:
|
|
131
|
+
|
|
132
|
+
| Platform | Features | Repository |
|
|
133
|
+
|----------|----------|------------|
|
|
134
|
+
| **Windows** | Local LLM, STT/TTS, automation, system control | [pool-apps](https://github.com/plcunha/pool-apps) |
|
|
135
|
+
| **Android** | Native messaging, notifications, device automation | [pool-apps](https://github.com/plcunha/pool-apps) |
|
|
136
|
+
| **iOS/macOS** | Apple ecosystem integration, Shortcuts support | [pool-apps](https://github.com/plcunha/pool-apps) |
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 💻 Development
|
|
89
141
|
|
|
90
142
|
```bash
|
|
91
|
-
# Clone
|
|
143
|
+
# Clone and setup
|
|
92
144
|
git clone https://github.com/plcunha/pool-bot.git
|
|
93
145
|
cd pool-bot
|
|
94
|
-
|
|
95
|
-
# Install dependencies
|
|
96
146
|
pnpm install
|
|
97
147
|
|
|
148
|
+
# Development mode
|
|
149
|
+
pnpm dev
|
|
150
|
+
|
|
98
151
|
# Build
|
|
99
152
|
pnpm build
|
|
100
153
|
|
|
101
154
|
# Run tests
|
|
102
155
|
pnpm test
|
|
103
156
|
|
|
104
|
-
#
|
|
105
|
-
|
|
157
|
+
# Lint and format
|
|
158
|
+
pnpm lint
|
|
159
|
+
pnpm format
|
|
106
160
|
```
|
|
107
161
|
|
|
108
|
-
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## 📚 Documentation
|
|
165
|
+
|
|
166
|
+
- **[Getting Started](https://docs.poolbot.dev/getting-started)** - Installation and first steps
|
|
167
|
+
- **[Configuration](https://docs.poolbot.dev/configuration)** - Profiles, channels, and providers
|
|
168
|
+
- **[Skills](https://docs.poolbot.dev/skills)** - Built-in and custom skills
|
|
169
|
+
- **[Architecture](https://docs.poolbot.dev/architecture)** - Mesh networking, memory, security
|
|
170
|
+
- **[API Reference](https://docs.poolbot.dev/api)** - REST API and webhooks
|
|
171
|
+
- **[Deployment](https://docs.poolbot.dev/deployment)** - Docker, cloud, and self-hosting
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## 🔐 Security
|
|
176
|
+
|
|
177
|
+
- **Command Approval** - Require human approval for destructive operations
|
|
178
|
+
- **Audit Logging** - Complete trace of all AI actions
|
|
179
|
+
- **PII Detection** - Automatic redaction of sensitive data
|
|
180
|
+
- **Sandboxed Execution** - Isolated environment for untrusted skills
|
|
181
|
+
- **End-to-End Encryption** - For supported channels
|
|
182
|
+
|
|
183
|
+
See [Security Documentation](https://docs.poolbot.dev/security)
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## 🤝 Community
|
|
188
|
+
|
|
189
|
+
- **Discord:** [discord.gg/poolbot](https://discord.gg/poolbot)
|
|
190
|
+
- **GitHub Issues:** [Report bugs, request features](https://github.com/plcunha/pool-bot/issues)
|
|
191
|
+
- **Discussions:** [Q&A, show and tell](https://github.com/plcunha/pool-bot/discussions)
|
|
109
192
|
|
|
110
|
-
|
|
111
|
-
- **GitHub Issues**: https://github.com/plcunha/pool-bot/issues
|
|
112
|
-
- **Community**: https://discord.com/discord.gg/poolbot
|
|
193
|
+
---
|
|
113
194
|
|
|
114
|
-
##
|
|
195
|
+
## 📄 License
|
|
115
196
|
|
|
116
|
-
|
|
117
|
-
- Email: jvsantos.cunha@gmail.com
|
|
118
|
-
- GitHub: @plcunha
|
|
119
|
-
- Telegram: @poolzin
|
|
197
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
120
198
|
|
|
121
|
-
|
|
199
|
+
---
|
|
122
200
|
|
|
123
|
-
|
|
201
|
+
**Made with 🎱 by [João Vitor Cunha](https://github.com/plcunha)**
|
package/dist/.buildstamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1773140740628
|
|
@@ -13,38 +13,15 @@ const OPENAI_PATTERNS = {
|
|
|
13
13
|
/too many tokens/i,
|
|
14
14
|
/rate_limit_exceeded.*context/i,
|
|
15
15
|
],
|
|
16
|
-
rate_limit: [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/ratelimit/i,
|
|
20
|
-
],
|
|
21
|
-
authentication: [
|
|
22
|
-
/invalid api key/i,
|
|
23
|
-
/incorrect api key/i,
|
|
24
|
-
/authentication/i,
|
|
25
|
-
/unauthorized/i,
|
|
26
|
-
],
|
|
27
|
-
invalid_request: [
|
|
28
|
-
/invalid_request_error/i,
|
|
29
|
-
/bad request/i,
|
|
30
|
-
/invalid parameter/i,
|
|
31
|
-
],
|
|
16
|
+
rate_limit: [/rate limit exceeded/i, /too many requests/i, /ratelimit/i],
|
|
17
|
+
authentication: [/invalid api key/i, /incorrect api key/i, /authentication/i, /unauthorized/i],
|
|
18
|
+
invalid_request: [/invalid_request_error/i, /bad request/i, /invalid parameter/i],
|
|
32
19
|
};
|
|
33
20
|
// Anthropic error patterns
|
|
34
21
|
const ANTHROPIC_PATTERNS = {
|
|
35
|
-
context_overflow: [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/too many tokens/i,
|
|
39
|
-
],
|
|
40
|
-
rate_limit: [
|
|
41
|
-
/rate limit/i,
|
|
42
|
-
/too many requests/i,
|
|
43
|
-
],
|
|
44
|
-
authentication: [
|
|
45
|
-
/invalid api key/i,
|
|
46
|
-
/authentication failed/i,
|
|
47
|
-
],
|
|
22
|
+
context_overflow: [/context window exceeded/i, /maximum token count/i, /too many tokens/i],
|
|
23
|
+
rate_limit: [/rate limit/i, /too many requests/i],
|
|
24
|
+
authentication: [/invalid api key/i, /authentication failed/i],
|
|
48
25
|
authorization: [
|
|
49
26
|
/forbidden/i,
|
|
50
27
|
/access denied/i,
|
|
@@ -54,21 +31,9 @@ const ANTHROPIC_PATTERNS = {
|
|
|
54
31
|
};
|
|
55
32
|
// Google/Gemini error patterns
|
|
56
33
|
const GEMINI_PATTERNS = {
|
|
57
|
-
context_overflow: [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
/context too long/i,
|
|
61
|
-
],
|
|
62
|
-
rate_limit: [
|
|
63
|
-
/rate limit exceeded/i,
|
|
64
|
-
/quota exceeded/i,
|
|
65
|
-
/too many requests/i,
|
|
66
|
-
],
|
|
67
|
-
quota_exceeded: [
|
|
68
|
-
/quota exceeded/i,
|
|
69
|
-
/billing limit/i,
|
|
70
|
-
/project quota/i,
|
|
71
|
-
],
|
|
34
|
+
context_overflow: [/token limit exceeded/i, /maximum input size/i, /context too long/i],
|
|
35
|
+
rate_limit: [/rate limit exceeded/i, /quota exceeded/i, /too many requests/i],
|
|
36
|
+
quota_exceeded: [/quota exceeded/i, /billing limit/i, /project quota/i],
|
|
72
37
|
};
|
|
73
38
|
// Generic patterns
|
|
74
39
|
const GENERIC_PATTERNS = {
|
|
@@ -80,37 +45,11 @@ const GENERIC_PATTERNS = {
|
|
|
80
45
|
/message too long/i,
|
|
81
46
|
/input too long/i,
|
|
82
47
|
],
|
|
83
|
-
rate_limit: [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
],
|
|
89
|
-
timeout: [
|
|
90
|
-
/timeout/i,
|
|
91
|
-
/timed out/i,
|
|
92
|
-
/etimedout/i,
|
|
93
|
-
],
|
|
94
|
-
network_error: [
|
|
95
|
-
/network error/i,
|
|
96
|
-
/econnreset/i,
|
|
97
|
-
/econnrefused/i,
|
|
98
|
-
/enotfound/i,
|
|
99
|
-
/network/i,
|
|
100
|
-
],
|
|
101
|
-
server_error: [
|
|
102
|
-
/server error/i,
|
|
103
|
-
/internal error/i,
|
|
104
|
-
/500/i,
|
|
105
|
-
/502/i,
|
|
106
|
-
/503/i,
|
|
107
|
-
/504/i,
|
|
108
|
-
],
|
|
109
|
-
compaction_failure: [
|
|
110
|
-
/compaction failed/i,
|
|
111
|
-
/summarization failed/i,
|
|
112
|
-
/failed to compact/i,
|
|
113
|
-
],
|
|
48
|
+
rate_limit: [/rate.?limit/i, /too many requests/i, /throttled/i, /429/i],
|
|
49
|
+
timeout: [/timeout/i, /timed out/i, /etimedout/i],
|
|
50
|
+
network_error: [/network error/i, /econnreset/i, /econnrefused/i, /enotfound/i, /network/i],
|
|
51
|
+
server_error: [/server error/i, /internal error/i, /500/i, /502/i, /503/i, /504/i],
|
|
52
|
+
compaction_failure: [/compaction failed/i, /summarization failed/i, /failed to compact/i],
|
|
114
53
|
};
|
|
115
54
|
/**
|
|
116
55
|
* Classify an error based on message patterns
|
|
@@ -125,7 +64,12 @@ export function classifyError(error) {
|
|
|
125
64
|
}
|
|
126
65
|
const message = error.message.toLowerCase();
|
|
127
66
|
// Check context overflow first (highest priority for LLM errors)
|
|
128
|
-
for (const pattern of [
|
|
67
|
+
for (const pattern of [
|
|
68
|
+
...OPENAI_PATTERNS.context_overflow,
|
|
69
|
+
...ANTHROPIC_PATTERNS.context_overflow,
|
|
70
|
+
...GEMINI_PATTERNS.context_overflow,
|
|
71
|
+
...GENERIC_PATTERNS.context_overflow,
|
|
72
|
+
]) {
|
|
129
73
|
if (pattern.test(message)) {
|
|
130
74
|
return {
|
|
131
75
|
type: "context_overflow",
|
|
@@ -145,7 +89,12 @@ export function classifyError(error) {
|
|
|
145
89
|
}
|
|
146
90
|
}
|
|
147
91
|
// Check rate limit
|
|
148
|
-
for (const pattern of [
|
|
92
|
+
for (const pattern of [
|
|
93
|
+
...OPENAI_PATTERNS.rate_limit,
|
|
94
|
+
...ANTHROPIC_PATTERNS.rate_limit,
|
|
95
|
+
...GEMINI_PATTERNS.rate_limit,
|
|
96
|
+
...GENERIC_PATTERNS.rate_limit,
|
|
97
|
+
]) {
|
|
149
98
|
if (pattern.test(message)) {
|
|
150
99
|
return {
|
|
151
100
|
type: "rate_limit",
|
|
@@ -111,13 +111,7 @@ export function scanSkill(skillName, content) {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
// Sort by severity
|
|
114
|
-
const severityOrder = [
|
|
115
|
-
"critical",
|
|
116
|
-
"high",
|
|
117
|
-
"medium",
|
|
118
|
-
"low",
|
|
119
|
-
"info",
|
|
120
|
-
];
|
|
114
|
+
const severityOrder = ["critical", "high", "medium", "low", "info"];
|
|
121
115
|
findings.sort((a, b) => severityOrder.indexOf(a.severity) - severityOrder.indexOf(b.severity));
|
|
122
116
|
return {
|
|
123
117
|
skillName,
|
package/dist/build-info.json
CHANGED