Skip to content

Commit 7b009a2

Browse files
authored
Merge branch 'main' into ci/improve-dockerfile
2 parents 2867965 + 944b4a1 commit 7b009a2

21 files changed

Lines changed: 2071 additions & 375 deletions

File tree

.github/workflows/release.yml

Lines changed: 60 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ env:
1616

1717
jobs:
1818
build-and-push:
19-
runs-on: ubuntu-latest
19+
runs-on: ${{ matrix.runner }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- arch: amd64
25+
runner: ubuntu-latest
26+
- arch: arm64
27+
runner: ubuntu-24.04-arm
2028
permissions:
2129
contents: write
2230
packages: write
@@ -52,9 +60,11 @@ jobs:
5260
context: .
5361
target: slim
5462
push: true
63+
platforms: linux/${{ matrix.arch }}
5564
tags: |
56-
${{ env.IMAGE }}:${{ steps.version.outputs.version }}-slim
57-
${{ env.IMAGE }}:slim
65+
66+
${{ env.IMAGE }}:${{ steps.version.outputs.version }}-slim-${{ matrix.arch }}
67+
${{ env.IMAGE }}:slim-${{ matrix.arch }}
5868
cache-from: type=gha,scope=release-slim
5969
cache-to: type=gha,mode=max,scope=release-slim
6070

@@ -64,13 +74,55 @@ jobs:
6474
context: .
6575
target: full
6676
push: true
77+
platforms: linux/${{ matrix.arch }}
6778
tags: |
68-
${{ env.IMAGE }}:${{ steps.version.outputs.version }}-full
69-
${{ env.IMAGE }}:full
70-
${{ env.IMAGE }}:latest
79+
${{ env.IMAGE }}:${{ steps.version.outputs.version }}-full-${{ matrix.arch }}
80+
${{ env.IMAGE }}:full-${{ matrix.arch }}
7181
cache-from: type=gha,scope=release-full
7282
cache-to: type=gha,mode=max,scope=release-full
7383

84+
85+
publish-manifests:
86+
runs-on: ubuntu-latest
87+
needs: build-and-push
88+
permissions:
89+
contents: write
90+
packages: write
91+
steps:
92+
- name: Determine version tag
93+
id: version
94+
run: |
95+
if [ -n "${{ github.event.inputs.tag }}" ]; then
96+
VERSION="${{ github.event.inputs.tag }}"
97+
elif [[ "$GITHUB_REF" == refs/tags/v* ]]; then
98+
VERSION="${GITHUB_REF#refs/tags/}"
99+
else
100+
VERSION="dev-$(echo $GITHUB_SHA | head -c 7)"
101+
fi
102+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
103+
104+
- name: Log in to GHCR
105+
uses: docker/login-action@v3
106+
with:
107+
registry: ${{ env.REGISTRY }}
108+
username: ${{ github.actor }}
109+
password: ${{ secrets.GITHUB_TOKEN }}
110+
111+
- name: Create multi-arch manifests
112+
run: |
113+
VERSION="${{ steps.version.outputs.version }}"
114+
docker buildx imagetools create \
115+
--tag ${{ env.IMAGE }}:${VERSION}-slim \
116+
--tag ${{ env.IMAGE }}:slim \
117+
${{ env.IMAGE }}:${VERSION}-slim-amd64 \
118+
${{ env.IMAGE }}:${VERSION}-slim-arm64
119+
docker buildx imagetools create \
120+
--tag ${{ env.IMAGE }}:${VERSION}-full \
121+
--tag ${{ env.IMAGE }}:full \
122+
--tag ${{ env.IMAGE }}:latest \
123+
${{ env.IMAGE }}:${VERSION}-full-amd64 \
124+
${{ env.IMAGE }}:${VERSION}-full-arm64
125+
74126
- name: Log in to Fly registry
75127
uses: docker/login-action@v3
76128
with:
@@ -80,8 +132,9 @@ jobs:
80132

81133
- name: Push to Fly registry
82134
run: |
135+
VERSION="${{ steps.version.outputs.version }}"
83136
docker buildx imagetools create \
84-
--tag registry.fly.io/spacebot-image:${{ steps.version.outputs.version }} \
137+
--tag registry.fly.io/spacebot-image:${VERSION} \
85138
--tag registry.fly.io/spacebot-image:latest \
86139
${{ env.IMAGE }}:latest
87140

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "spacebot"
3-
version = "0.1.2"
3+
version = "0.1.4"
44
edition = "2024"
55

66
[dependencies]

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ Read the full vision in [docs/spacedrive.md](docs/spacedrive.md).
311311
### Prerequisites
312312

313313
- **Rust** 1.85+ ([rustup](https://rustup.rs/))
314-
- An LLM API key (OpenRouter, Anthropic, OpenAI, Z.ai, etc.)
314+
- An LLM API key from any supported provider (Anthropic, OpenAI, OpenRouter, Z.ai, Groq, Together, Fireworks, DeepSeek, xAI, Mistral, or OpenCode Zen)
315315

316316
### Build and Run
317317

@@ -326,22 +326,23 @@ cargo build --release
326326
Create `config.toml`:
327327

328328
```toml
329-
[providers.openrouter]
330-
api_key = "env:OPENROUTER_API_KEY"
329+
[llm]
330+
openrouter_key = "env:OPENROUTER_API_KEY"
331331

332332
[defaults.routing]
333-
default_model = "anthropic/claude-sonnet-4"
334-
worker_model = "anthropic/claude-sonnet-4"
333+
channel = "anthropic/claude-sonnet-4"
334+
worker = "anthropic/claude-sonnet-4"
335335

336-
[agents.my-agent]
336+
[[agents]]
337+
id = "my-agent"
337338

338339
[messaging.discord]
339-
bot_token = "env:DISCORD_BOT_TOKEN"
340+
token = "env:DISCORD_BOT_TOKEN"
340341

341342
[[bindings]]
342-
platform = "discord"
343-
channel_id = "your-discord-channel-id"
344-
agent = "my-agent"
343+
agent_id = "my-agent"
344+
channel = "discord"
345+
guild_id = "your-discord-guild-id"
345346
```
346347

347348
```bash

docs/content/docs/(deployment)/roadmap.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The full message-in → LLM → response-out pipeline is wired end-to-end across
1818
- **Config** — hierarchical TOML with `Config`, `AgentConfig`, `ResolvedAgentConfig`, `Binding`, `MessagingConfig`. File watcher with event filtering and content hash debounce for hot-reload.
1919
- **Multi-agent** — per-agent database isolation, `Agent` struct bundles all dependencies
2020
- **Database connections** — SQLite + LanceDB + redb per-agent, migrations for all tables
21-
- **LLM**`SpacebotModel` implements Rig's `CompletionModel`, routes through `LlmManager` via HTTP with retries and fallback chains across 4 providers (Anthropic, OpenAI, OpenRouter, Zhipu)
21+
- **LLM**`SpacebotModel` implements Rig's `CompletionModel`, routes through `LlmManager` via HTTP with retries and fallback chains across 11 providers (Anthropic, OpenAI, OpenRouter, Z.ai, Groq, Together, Fireworks, DeepSeek, xAI, Mistral, OpenCode Zen)
2222
- **Model routing**`RoutingConfig` with process-type defaults, task overrides, fallback chains
2323
- **Memory** — full stack: types, SQLite store (CRUD + graph), LanceDB (embeddings + vector + FTS), fastembed, hybrid search (RRF fusion). `memory_type` filter wired end-to-end through SearchConfig. `total_cmp` for safe sorting.
2424
- **Memory maintenance** — decay + prune implemented
@@ -35,7 +35,7 @@ The full message-in → LLM → response-out pipeline is wired end-to-end across
3535
- **Discord adapter** — full Serenity implementation (message handling, streaming via edit, typing indicators, guild/channel/DM filtering)
3636
- **Telegram adapter** — full teloxide implementation (long polling, typing indicators, attachment extraction, chat/DM filtering, 4096 char splitting)
3737
- **Slack adapter** — full slack-morphism implementation (Socket Mode, thread replies, file upload v2, reactions, streaming via edit, workspace/channel/DM filtering via hot-reloadable permissions)
38-
- **Webhook adapter** — Axum HTTP server (POST /send, GET /poll/{id}, GET /health)
38+
- **Webhook adapter** — Axum HTTP server (POST /send, GET `/poll/{id}`, GET /health)
3939
- **Tools** — 16 tools implement Rig's `Tool` trait with real logic (reply, branch, spawn_worker, route, cancel, skip, react, memory_save, memory_recall, set_status, shell, file, exec, browser, cron, web_search)
4040
- **Workspace containment** — file tool validates paths stay within workspace boundary, shell/exec tools block instance directory traversal, sensitive file access, and secret env var leakage
4141
- **Conversation persistence**`ConversationLogger` with fire-and-forget SQLite writes, compaction archiving

interface/bun.lock

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)