Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
b132e9a
Simplify bot template with Slack listener pattern
tyom Jan 17, 2026
8e2f2af
Fix WebSocket registration timing and AI error handling
tyom Jan 17, 2026
28ee4a0
Fix app_mention routing to target only mentioned bot
tyom Jan 17, 2026
545ccd4
Add dynamic port allocation for multi-bot support
tyom Jan 17, 2026
bec87a9
Fix WebSocket disconnection after 30 seconds
tyom Jan 17, 2026
4e9ccf7
Update code-workspace electron task
tyom Jan 17, 2026
9aceb6d
Add thinking/done reaction indicators to bot responses
tyom Jan 17, 2026
cb6b785
Reorganize Slack emulator types
tyom Jan 17, 2026
ceef26c
Add multi-bot support with settings injection
tyom Jan 18, 2026
84247a7
Add bot reconnection and config port discovery
tyom Jan 18, 2026
7587754
Use random ports for bot config servers
tyom Jan 18, 2026
e3ded31
Remove hardcoded config port from UI client
tyom Jan 18, 2026
b081470
Simplify bot config: replace bots.yaml with bots.json
tyom Jan 18, 2026
d4c4edf
Update root dependencies
tyom Jan 18, 2026
9988a48
Add README to apps/electron
tyom Jan 18, 2026
adebd08
Fix bot template reactions, name display, and settings fetch
tyom Jan 18, 2026
ab4e704
Update default AI models in slack-bot template
tyom Jan 18, 2026
3781edd
Remove PORT+1 assumption for bot config ports
tyom Jan 18, 2026
09fe596
Guard simulator registration when config server port is missing
tyom Jan 18, 2026
c305b66
Redact message content from socket-mode debug logs
tyom Jan 18, 2026
b5e6a3b
Fix Google model API identifier in slack-bot template
tyom Jan 18, 2026
e1e2809
Add error handling for malformed JSON in compile-bots
tyom Jan 18, 2026
de2d86f
Add early return and error logging in fetchBotConfig
tyom Jan 18, 2026
29e3863
Skip OpenAI API key validation for non-OpenAI providers
tyom Jan 18, 2026
f3fa919
Fix streamer cleanup on error in userMessage handler
tyom Jan 18, 2026
a545463
Add error handling for fetchBotConfig in DynamicSettings
tyom Jan 19, 2026
456cce1
Fix getBotInfoById returning U_undefined for legacy bots
tyom Jan 19, 2026
ce22440
Add duplicate bot name detection in compile-bots script
tyom Jan 19, 2026
6c70539
Fix streamAIResponse to yield chunks immediately for real-time streaming
tyom Jan 19, 2026
78216b4
Clean up stale bot artifacts when bots.json is empty
tyom Jan 19, 2026
3b57d62
Add error handling for YAML parsing in getBotNameFromConfig
tyom Jan 19, 2026
8b51811
Prevent stale binaries in manifest after failed compile
tyom Jan 19, 2026
74fde3e
Refactor settings UI with inheritance indicators and model tiers
tyom Jan 19, 2026
042a782
Fix bot logging for direct terminal execution and simulator UI
tyom Jan 19, 2026
b17f837
Escape regex special characters in app mention handler
tyom Jan 19, 2026
ab3ada9
Add catch handler for fire-and-forget processMessage call
tyom Jan 19, 2026
c565301
Add catch handler for fire-and-forget processMention call
tyom Jan 19, 2026
b30bb7d
Add dynamic model fetching from provider APIs
tyom Jan 19, 2026
7d78baf
Support runtime provider/model settings changes
tyom Jan 19, 2026
fbb8617
Fix bot reconnection race condition
tyom Jan 20, 2026
2133c65
Sync bot templates with my-bot changes
tyom Jan 20, 2026
fcfac3a
Move logger from standalone package to bot template
tyom Jan 20, 2026
3303594
Fix bot-specific settings not applying correctly
tyom Jan 20, 2026
0d66b84
Add OpenRouter support to create-bot template
tyom Jan 20, 2026
2b3e242
Filter bot-specific fields from global env vars
tyom Jan 20, 2026
9f5cf75
Fix o1 models being miscategorized as fast instead of thinking
tyom Jan 20, 2026
4490113
Format code (prettier)
tyom Jan 20, 2026
d75aae5
Fix ESLint issues
tyom Jan 20, 2026
27c0dec
Add keys to Svelte {#each} blocks
tyom Jan 20, 2026
f2c03a3
Address code review feedback
tyom Jan 20, 2026
8774f73
Fix Google API auth and DynamicSettings config handling
tyom Jan 20, 2026
aeb243d
Fix API key handling and error reply thread context
tyom Jan 20, 2026
1a0039b
Upgrade to AI SDK v6
tyom Jan 20, 2026
ab9fb0b
Fix race condition in DynamicSettings config fetch
tyom Jan 20, 2026
384afd9
Upgrade zod to v4 in create-bot template
tyom Jan 20, 2026
eb21d98
Refactor create-bot package for better maintainability
tyom Jan 20, 2026
87993b1
Add tests for create-bot core functions
tyom Jan 20, 2026
c0b0c91
Add validatedValue to invalid API key validation states
tyom Jan 20, 2026
1f52a2c
Remove unused test scaffolding from slack-bot template
tyom Jan 20, 2026
6e50867
Refactor slack-bot template to extract shared utilities
tyom Jan 20, 2026
1c4c5ec
Fix race condition in API key validation flow
tyom Jan 20, 2026
932a704
Remove provider selection from create-bot CLI
tyom Jan 20, 2026
6493f40
Reset model to provider default when switching AI providers
tyom Jan 20, 2026
224955f
Fix env override detection for emulator-injected settings
tyom Jan 21, 2026
5d123c7
Fix API key showing in UI when not actually set in bot's .env
tyom Jan 23, 2026
de539ad
Improve bot settings save logic and emulator var tracking
tyom Jan 23, 2026
2deb866
Fix log level setting not persisting to settings.json
tyom Jan 23, 2026
eb7bba5
Fix health check to detect this bot's connection specifically
tyom Jan 24, 2026
52753d4
Fix error reply to send in assistant thread instead of channel
tyom Jan 24, 2026
45cf5ae
Add fallback for empty AI responses in app-mention handler
tyom Jan 24, 2026
ac60291
Update default AI models to latest families
tyom Jan 24, 2026
9463b56
Fix edge cases in create-bot package
tyom Jan 24, 2026
738d0e9
Fix config server not being closed on shutdown
tyom Jan 24, 2026
10aea8e
Filter current message from thread history to prevent duplication
tyom Jan 24, 2026
2679b80
Fix mention stripping when app name or id is empty
tyom Jan 24, 2026
2b39fed
Add API key validation and fix default model IDs
tyom Jan 24, 2026
5113662
Fix API keys persisting after removal from emulator settings
tyom Jan 24, 2026
bc82eb3
Add GitHub CI workflow for format, lint, and test checks
tyom Jan 24, 2026
746d836
Update bun.lock
tyom Jan 24, 2026
5353e27
Format code
tyom Jan 24, 2026
25ce8c0
Fix type errors in templates and UI components
tyom Jan 24, 2026
ed2db13
Fix o1-mini and o3-mini model tier classification
tyom Jan 24, 2026
40c3241
Sync OpenAI model tiers between model-fetcher.js and simulator-settin…
tyom Jan 24, 2026
5368041
Add OpenRouter categorization for Meta-Llama and Mistral models
tyom Jan 24, 2026
a215c0a
Include thinking tier in empty tiers fallback check
tyom Jan 24, 2026
d2c7bfa
Add AI memory feature to create-bot templates
tyom Jan 24, 2026
f944c75
Sync create-bot template with grubba's single-table memory schema
tyom Jan 24, 2026
ea4441c
Format code
tyom Jan 24, 2026
f3e9d8a
Guard saveMemory against empty or whitespace-only content
tyom Jan 24, 2026
92bfa87
Handle extractAndSaveMemory promise rejection
tyom Jan 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Check formatting
run: bun run format:check

- name: Lint
run: bun run lint

- name: Typecheck
run: bun run typecheck

- name: Test
run: bun run test
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tmp/
packages/create-bot/templates/
104 changes: 104 additions & 0 deletions apps/electron/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Botarium Electron App

Desktop application that bundles the Slack emulator and optionally pre-compiled bots.

## Bot Configuration

Bots are configured in `bots.json`:

```json
{
"bots": [
"../../bot1",
"../../bot2",
{ "source": "../../custom-bot", "name": "renamed", "entry": "src/main.ts" }
]
}
```

### Entry formats

**Simple** - just the path to bot directory:

```json
"../../my-bot"
```

The bot name is read from the bot's `config.yaml` (`simulator.id` field).

**Advanced** - object with overrides:

```json
{
"source": "../../my-bot",
"name": "custom-name", // optional - overrides simulator.id
"entry": "src/custom.ts" // optional - defaults to src/app.ts
}
```

## Build Process

### Scripts

| Script | Description |
| ----------------- | --------------------------------------- |
| `bun run dev` | Development mode with Vite hot reload |
| `bun run build` | Build everything (preload + bots + UI) |
| `bun run package` | Build and package with electron-builder |

### How bot compilation works

1. `scripts/compile-bots.ts` reads `bots.json`
2. For each entry, resolves the bot name from `config.yaml` (or uses override)
3. Compiles each bot to a standalone binary in `dist/bots/{name}`
4. Generates `dist/bots/manifest.json` listing compiled bots

```
dist/bots/
├── manifest.json # Generated manifest
├── my-bot # Compiled binary
└── simple # Compiled binary
```

### Manifest format

```json
{
"bots": [{ "name": "bot1" }, { "name": "bot2" }]
}
```

## Runtime Modes

### Bundled bots (recommended for distribution)

When `dist/bots/manifest.json` exists, the app launches pre-compiled bot binaries. This is the mode used for packaged releases.

```
bun run build # Compiles bots and generates manifest
bun run package # Creates distributable app
```

### Discovery mode (development without bundled bots)

When no manifest exists, the app runs in discovery mode - it starts only the emulator and waits for external bots to connect. Useful for development when running bots separately.

```
# Terminal 1: Run Electron (no bots)
bun run dev

# Terminal 2: Run bot separately
cd ../my-bot && bun run dev
```

## Packaging

The packaged app includes:

- Electron runtime
- Preload script (`dist/preload.cjs`)
- UI (`dist/` from @botarium/ui)
- Slack emulator binary (`dist/slack-emulator`)
- Compiled bots and manifest (`dist/bots/`)

Configured in `package.json` under the `build` key (electron-builder config).
3 changes: 3 additions & 0 deletions apps/electron/bots.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"bots": []
}
15 changes: 0 additions & 15 deletions apps/electron/bots.yaml

This file was deleted.

Loading