apexbot 1.0.5 β†’ 1.0.7

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 (49) hide show
  1. package/README.md +176 -206
  2. package/dist/agent/agentManager.js +165 -26
  3. package/dist/agent/orchestrator.js +303 -0
  4. package/dist/agent/toolExecutor.js +68 -12
  5. package/dist/brain/brainManager.js +346 -0
  6. package/dist/brain/index.js +16 -0
  7. package/dist/channels/exports.js +11 -0
  8. package/dist/channels/unifiedInbox.js +248 -0
  9. package/dist/cli/chat.js +492 -0
  10. package/dist/cli/exports.js +8 -0
  11. package/dist/cli/index.js +165 -11
  12. package/dist/cli/onboard.js +515 -0
  13. package/dist/gateway/dashboard.js +235 -0
  14. package/dist/lobster/index.js +15 -0
  15. package/dist/lobster/lobsterEngine.js +361 -0
  16. package/dist/memory/index.js +13 -0
  17. package/dist/memory/vectorStore.js +401 -0
  18. package/dist/safety/allowlist.js +406 -0
  19. package/dist/safety/index.js +9 -0
  20. package/dist/sessions/index.js +11 -0
  21. package/dist/sessions/jsonlStore.js +310 -0
  22. package/dist/skills/applenotes.js +194 -0
  23. package/dist/skills/browser.js +557 -0
  24. package/dist/skills/calendar.js +570 -0
  25. package/dist/skills/canvas.js +277 -0
  26. package/dist/skills/cron.js +245 -0
  27. package/dist/skills/discord.js +343 -0
  28. package/dist/skills/gifsearch.js +208 -0
  29. package/dist/skills/git.js +706 -0
  30. package/dist/skills/gmail.js +415 -0
  31. package/dist/skills/homeassistant.js +405 -0
  32. package/dist/skills/hue.js +256 -0
  33. package/dist/skills/imagegen.js +294 -0
  34. package/dist/skills/imessage.js +168 -0
  35. package/dist/skills/matrix.js +200 -0
  36. package/dist/skills/notion.js +205 -0
  37. package/dist/skills/onepassword.js +220 -0
  38. package/dist/skills/search.js +686 -0
  39. package/dist/skills/signal.js +177 -0
  40. package/dist/skills/slack.js +270 -0
  41. package/dist/skills/sonos.js +190 -0
  42. package/dist/skills/trello.js +194 -0
  43. package/dist/skills/twitter.js +184 -0
  44. package/dist/skills/voice.js +269 -0
  45. package/dist/skills/webhooks.js +209 -0
  46. package/dist/skills/whatsapp.js +255 -0
  47. package/dist/test-agent.js +45 -0
  48. package/dist/tools/loader.js +79 -2
  49. package/package.json +9 -3
package/README.md CHANGED
@@ -1,119 +1,95 @@
1
- # ApexBot
1
+ # 🦊 ApexBot
2
2
 
3
- Personal AI assistant you run on your own devices. Free with Ollama (local AI).
3
+ **Personal AI assistant you run on your own devices. 100% Free with Ollama.**
4
4
 
5
5
  ```
6
- ___ ____ _______ ______ ____ ______
7
- / | / __ \/ ____/ |/ / __ )/ __ \/_ __/
8
- / /| | / /_/ / __/ | / __ / / / / / /
9
- / ___ |/ ____/ /___ / / /_/ / /_/ / / /
10
- /_/ |_/_/ /_____//_/|_/_____/\____/ /_/
11
-
12
- Your Free AI Assistant
6
+ /\ /\
7
+ //\\_//\\ ✦ ApexBot
8
+ \_β—• β—•_/ Local AI Assistant
9
+ / \
13
10
  ```
14
11
 
15
- [![CI](https://github.com/YOUR_USERNAME/apexbot/actions/workflows/ci.yml/badge.svg)](https://github.com/YOUR_USERNAME/apexbot/actions)
16
- [![npm package](https://badge.fury.io/js/apexbot.svg)](https://www.npmjs.com/package/apexbot)
17
- [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
18
12
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/)
13
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
14
+ [![Ollama](https://img.shields.io/badge/AI-Ollama-orange.svg)](https://ollama.com)
19
15
 
20
- 100% Free | Open Source | Private | Self-Hosted
21
-
22
- [Installation](#installation) |
23
- [Features](#features) |
24
- [Quick Start](#quick-start) |
25
- [Commands](#commands) |
26
- [Contributing](#contributing)
27
-
28
- ---
29
-
30
- ## Installation
31
-
32
- Runtime: Node 18+
33
-
34
- ### npm (recommended)
35
-
36
- ```bash
37
- npm install -g apexbot
38
- apexbot onboard
39
- ```
40
-
41
- ### One-line install
42
-
43
- Windows (PowerShell):
44
-
45
- ```powershell
46
- iwr -useb https://raw.githubusercontent.com/YOUR_USERNAME/apexbot/main/scripts/install.ps1 | iex
47
- ```
48
-
49
- macOS/Linux:
50
-
51
- ```bash
52
- curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/apexbot/main/scripts/install.sh | bash
53
- ```
54
-
55
- ### From source
56
-
57
- ```bash
58
- git clone https://github.com/YOUR_USERNAME/apexbot.git
59
- cd apexbot
60
- npm install
61
- npm run build
62
- npm run onboard
63
- ```
16
+ **100% Free** | **Open Source** | **Private** | **Local-First**
64
17
 
65
18
  ---
66
19
 
67
- ## Features
68
-
69
- ### Local AI with Ollama
70
-
71
- ApexBot runs AI models locally on your machine using Ollama. No API keys, no cloud costs, complete privacy.
72
-
73
- - **Free**: No subscriptions or usage fees
74
- - **Private**: Conversations never leave your computer
75
- - **Offline**: Works without internet after model download
76
- - **Models**: llama3.2, mistral, codellama, qwen2.5, and more
77
-
78
- ### Multi-channel support
79
-
80
- | Channel | Status | Description |
81
- |------------|----------|------------------------|
82
- | Telegram | Ready | Full bot integration |
83
- | Discord | Ready | Guilds and DMs |
84
- | WebChat | Ready | Built-in web dashboard |
85
- | WhatsApp | Planned | Via Baileys |
86
-
87
- ### AI providers
88
-
89
- | Provider | Cost | Notes |
90
- |------------------|---------|----------------------------|
91
- | **Ollama** | Free | Local AI (recommended) |
92
- | Google Gemini | Free tier | Cloud API |
93
- | Anthropic Claude | Paid | Cloud API |
94
- | OpenAI GPT | Paid | Cloud API |
20
+ ## ✨ Features
21
+
22
+ ### πŸ€– Local AI (Ollama)
23
+ - **Free** - No API costs, no subscriptions
24
+ - **Private** - Data never leaves your machine
25
+ - **Offline** - Works without internet
26
+ - **Models** - llama3.2, mistral, qwen2.5, codellama
27
+
28
+ ### πŸ’¬ Multi-Channel Support
29
+ | Channel | Status | Description |
30
+ |---------|--------|-------------|
31
+ | CLI | βœ… Ready | Terminal chat with shortcuts |
32
+ | Telegram | βœ… Ready | Full bot integration |
33
+ | Discord | βœ… Ready | Guilds and DMs |
34
+ | WhatsApp | βœ… Ready | Via Baileys |
35
+ | WebChat | βœ… Ready | Built-in dashboard |
36
+ | Slack | βœ… Ready | Workspace integration |
37
+ | Signal | βœ… Ready | Secure messaging |
38
+ | Matrix | βœ… Ready | Decentralized chat |
39
+
40
+ ### 🧠 Brain System
41
+ - Personality profiles (SOUL files)
42
+ - Long-term memory with vector store
43
+ - Context-aware responses
44
+ - Lobster Engine for reasoning
45
+
46
+ ### πŸ› οΈ 30+ Skills
47
+
48
+ | Category | Skills |
49
+ |----------|--------|
50
+ | **Communication** | Telegram, WhatsApp, Discord, Slack, Signal, iMessage, Matrix, Twitter, Gmail |
51
+ | **Productivity** | Obsidian, Notion, Trello, GitHub, Calendar, Reminders, Apple Notes |
52
+ | **Media** | Spotify, Sonos, Voice/TTS, Image Gen, GIF Search |
53
+ | **Smart Home** | Home Assistant, Philips Hue |
54
+ | **Automation** | Browser, Cron, 1Password, Weather, Search, System |
55
+
56
+ ### ⌨️ Claude Code Style CLI
57
+
58
+ **Input Prefixes:**
59
+ | Prefix | Action | Example |
60
+ |--------|--------|---------|
61
+ | `!` | Bash command | `!ls -la` |
62
+ | `/` | Bot commands | `/help` |
63
+ | `@` | File reference | `@src/index.ts` |
64
+ | `&` | Background task | `&npm test` |
65
+
66
+ **Keyboard Shortcuts:**
67
+ - `Ctrl+C` - Exit
68
+ - `Ctrl+L` - Clear screen
69
+ - `↑↓` - History navigation
70
+ - `\+Enter` - Multi-line input
71
+
72
+ ### 🌐 Web Dashboard
73
+ - Real-time chat interface
74
+ - **File upload** (images, code, files)
75
+ - Session management
76
+ - Channel status monitoring
77
+ - System logs
95
78
 
96
79
  ---
97
80
 
98
- ## Quick Start
81
+ ## πŸš€ Quick Start
99
82
 
100
83
  ### 1. Install Ollama
101
84
 
102
- Windows:
103
-
104
- ```powershell
85
+ ```bash
86
+ # Windows
105
87
  winget install Ollama.Ollama
106
- ```
107
88
 
108
- macOS:
109
-
110
- ```bash
89
+ # macOS
111
90
  brew install ollama
112
- ```
113
-
114
- Linux:
115
91
 
116
- ```bash
92
+ # Linux
117
93
  curl -fsSL https://ollama.com/install.sh | sh
118
94
  ```
119
95
 
@@ -124,165 +100,159 @@ ollama pull llama3.2
124
100
  ollama serve
125
101
  ```
126
102
 
127
- ### 3. Install ApexBot
128
-
129
- ```bash
130
- npm install -g apexbot
131
- ```
132
-
133
- ### 4. Run setup
134
-
135
- ```bash
136
- apexbot onboard
137
- ```
138
-
139
- The wizard walks you through AI provider selection, channel setup (Telegram/Discord), and configuration.
140
-
141
- ### 5. Start the bot
142
-
143
- ```bash
144
- apexbot daemon start
145
- ```
146
-
147
- Your assistant is now running in the background.
148
-
149
- ---
150
-
151
- ## Commands
152
-
153
- ### CLI
103
+ ### 3. Install & Run ApexBot
154
104
 
155
105
  ```bash
156
- # Setup
157
- apexbot onboard # Interactive setup wizard
158
- apexbot config # Show configuration
159
- apexbot config --reset # Reset configuration
160
-
161
- # Daemon (background)
162
- apexbot daemon start # Start in background
163
- apexbot daemon stop # Stop daemon
164
- apexbot daemon restart # Restart daemon
165
- apexbot daemon status # Check status
166
-
167
- # Gateway (foreground)
168
- apexbot gateway # Start gateway server
169
- apexbot gateway --verbose # With debug output
170
-
171
- # Utilities
172
- apexbot status # Show status
173
- apexbot models # Manage Ollama models
174
- ```
175
-
176
- ### Chat commands
177
-
178
- | Command | Description |
179
- |----------------|--------------------------|
180
- | `/help` | Show available commands |
181
- | `/status` | Show session info |
182
- | `/new` | Start new conversation |
183
- | `/model <name>`| Switch AI model |
106
+ # Clone
107
+ git clone https://github.com/emes789/apexbot.git
108
+ cd apexbot
184
109
 
185
- ---
110
+ # Install
111
+ npm install
186
112
 
187
- ## Architecture
113
+ # Setup (interactive)
114
+ npx ts-node src/cli/index.ts onboard
188
115
 
189
- ```
190
- Messaging Channels
191
- Telegram | Discord | WebChat | WhatsApp
192
- | | |
193
- v v v
194
- +----------------------------------------+
195
- | Gateway Server |
196
- | (HTTP + WebSocket :18789) |
197
- +----------------------------------------+
198
- | Sessions | Event Bus | Rate Limit |
199
- +----------------------------------------+
200
- |
201
- v
202
- +----------------------------------------+
203
- | AI Agent Manager |
204
- | Ollama | Gemini | Claude | OpenAI |
205
- +----------------------------------------+
116
+ # Start chat
117
+ npx ts-node src/cli/index.ts chat
206
118
  ```
207
119
 
208
120
  ---
209
121
 
210
- ## Project Structure
122
+ ## πŸ“ Project Structure
211
123
 
212
124
  ```
213
125
  apexbot/
214
- src/
215
- adapters/ Provider integrations (Manifold, etc.)
216
- agent/ AI agent manager and message handling
217
- backtest/ Backtesting framework
218
- channels/ Channel adapters (Telegram, Discord)
219
- cli/ Command-line interface
220
- core/ Event bus and shared utilities
221
- gateway/ HTTP/WebSocket server and dashboard
222
- math/ Expected value and Kelly criterion
223
- safety/ Rate limiting and content filtering
224
- sessions/ Conversation state management
225
- strategy/ Trading strategies (arbitrage)
226
- scripts/
227
- install.ps1 Windows installer
228
- install.sh Unix installer
126
+ β”œβ”€β”€ src/
127
+ β”‚ β”œβ”€β”€ agent/ # AI agent manager
128
+ β”‚ β”œβ”€β”€ brain/ # Personality & memory
129
+ β”‚ β”œβ”€β”€ channels/ # Telegram, Discord, etc.
130
+ β”‚ β”œβ”€β”€ cli/ # Terminal interface
131
+ β”‚ β”œβ”€β”€ gateway/ # HTTP/WebSocket server
132
+ β”‚ β”œβ”€β”€ lobster/ # Reasoning engine
133
+ β”‚ β”œβ”€β”€ memory/ # Vector store
134
+ β”‚ β”œβ”€β”€ sessions/ # Conversation state
135
+ β”‚ β”œβ”€β”€ skills/ # 30+ integrations
136
+ β”‚ β”œβ”€β”€ safety/ # Rate limiting
137
+ β”‚ └── tools/ # Tool registry
138
+ β”œβ”€β”€ scripts/ # Install scripts
139
+ └── docs/ # Documentation
229
140
  ```
230
141
 
231
142
  ---
232
143
 
233
- ## Configuration
144
+ ## βš™οΈ Configuration
234
145
 
235
- Configuration lives in `~/.apexbot/config.json`:
146
+ Config file: `~/.apexbot/config.json`
236
147
 
237
148
  ```json
238
149
  {
239
- "gateway": {
240
- "port": 18789
241
- },
150
+ "gateway": { "port": 18789 },
242
151
  "agent": {
243
152
  "provider": "ollama",
244
153
  "apiUrl": "http://localhost:11434",
245
- "model": "llama3.2"
154
+ "model": "llama3.2",
155
+ "enableTools": true
246
156
  },
247
157
  "channels": {
248
- "telegram": {
249
- "token": "your-bot-token"
250
- }
158
+ "telegram": { "enabled": true, "token": "..." },
159
+ "discord": { "enabled": true, "token": "..." }
251
160
  }
252
161
  }
253
162
  ```
254
163
 
255
- Environment variables also work:
164
+ ### AI Providers
165
+
166
+ | Provider | Cost | Notes |
167
+ |----------|------|-------|
168
+ | **Ollama** | Free | Local, recommended |
169
+ | Google Gemini | Free tier | Cloud API |
170
+ | Anthropic Claude | Paid | Cloud API |
171
+ | OpenAI GPT | Paid | Cloud API |
172
+ | Kimi | Free tier | Cloud API |
173
+
174
+ ---
175
+
176
+ ## πŸ”§ CLI Commands
256
177
 
257
178
  ```bash
258
- export OLLAMA_URL=http://localhost:11434
259
- export OLLAMA_MODEL=llama3.2
260
- export TELEGRAM_BOT_TOKEN=your-token
179
+ # Interactive setup
180
+ npx ts-node src/cli/index.ts onboard
181
+
182
+ # Terminal chat
183
+ npx ts-node src/cli/index.ts chat
184
+
185
+ # Start gateway server
186
+ npx ts-node src/cli/index.ts gateway
187
+
188
+ # Check status
189
+ npx ts-node src/cli/index.ts status
261
190
  ```
262
191
 
192
+ ### Chat Commands
193
+
194
+ | Command | Description |
195
+ |---------|-------------|
196
+ | `/help` | Show commands |
197
+ | `/status` | Session info |
198
+ | `/reset` | Clear history |
199
+ | `/model <name>` | Switch model |
200
+ | `/skills` | List skills |
201
+ | `/tools` | List tools |
202
+ | `/fox` | Show mascot 🦊 |
203
+
263
204
  ---
264
205
 
265
- ## Contributing
206
+ ## πŸ“Š Architecture
266
207
 
267
- See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
208
+ ```
209
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
210
+ β”‚ Messaging Channels β”‚
211
+ β”‚ Telegram β”‚ Discord β”‚ WhatsApp β”‚ CLI β”‚ Web β”‚
212
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
213
+ β”‚
214
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
215
+ β”‚ Gateway Server (:18789) β”‚
216
+ β”‚ HTTP API β”‚ WebSocket β”‚ Dashboard β”‚
217
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
218
+ β”‚
219
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
220
+ β”‚ Orchestrator β”‚
221
+ β”‚ Sessions β”‚ Event Bus β”‚ Rate Limit β”‚ Safety β”‚
222
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
223
+ β”‚
224
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
225
+ β–Ό β–Ό β–Ό
226
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
227
+ β”‚ Brain β”‚ β”‚ Agent β”‚ β”‚ Skills β”‚
228
+ β”‚ Personalityβ”‚ β”‚ Manager β”‚ β”‚ 30+ APIs β”‚
229
+ β”‚ Memory β”‚ β”‚ Ollama β”‚ β”‚ β”‚
230
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
231
+ ```
232
+
233
+ ---
234
+
235
+ ## 🀝 Contributing
268
236
 
269
237
  ```bash
270
- git clone https://github.com/YOUR_USERNAME/apexbot.git
238
+ git clone https://github.com/emes789/apexbot.git
271
239
  cd apexbot
272
240
  npm install
273
241
  npm run dev
274
242
  ```
275
243
 
244
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
245
+
276
246
  ---
277
247
 
278
- ## License
248
+ ## πŸ“„ License
279
249
 
280
250
  MIT License. See [LICENSE](LICENSE).
281
251
 
282
252
  ---
283
253
 
284
- ## Acknowledgments
254
+ ## πŸ™ Acknowledgments
285
255
 
286
- - Inspired by [Clawdbot](https://github.com/moltbot/moltbot)
287
- - Powered by [Ollama](https://ollama.com) for local AI
256
+ - Inspired by [Clawdbot/Moltbot](https://clawd.bot)
257
+ - Powered by [Ollama](https://ollama.com)
288
258
  - Built with TypeScript, grammy, discord.js