Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
0640af2
feat: OpenRouter integration with cleanup fix, storia orchestrator skill
PetrAnto Feb 1, 2026
80ed15b
Merge upstream/main: arm64 support, Telegram allowlist, Discord dm fix
claude Feb 2, 2026
978dba4
Merge pull request #1 from PetrAnto/claude/resolve-merge-conflicts-AJ7JZ
PetrAnto Feb 2, 2026
7e39740
feat: expand OpenRouter model catalog with 16 models + descriptions
claude Feb 2, 2026
e715191
Merge pull request #2 from PetrAnto/claude/resolve-merge-conflicts-AJ7JZ
PetrAnto Feb 2, 2026
1d7f54e
chore: remove private skill from public repo
claude Feb 3, 2026
712c0cf
Merge pull request #3 from PetrAnto/claude/resolve-merge-conflicts-AJ7JZ
PetrAnto Feb 3, 2026
1602e8b
feat: add direct OpenRouter API integration for Telegram bot
claude Feb 3, 2026
1b9469c
Merge pull request #4 from PetrAnto/claude/resolve-merge-conflicts-AJ7JZ
PetrAnto Feb 3, 2026
9410ec1
ci: add deploy workflow for Cloudflare Workers
claude Feb 3, 2026
1b6e21f
Merge pull request #5 from PetrAnto/claude/resolve-merge-conflicts-AJ7JZ
PetrAnto Feb 3, 2026
2be690c
fix: correct secrets check syntax in deploy workflow
claude Feb 3, 2026
151cd14
Merge pull request #6 from PetrAnto/claude/resolve-merge-conflicts-AJ7JZ
PetrAnto Feb 3, 2026
fb18c19
fix: add build step before deploy
claude Feb 3, 2026
741e34b
Merge pull request #7 from PetrAnto/claude/resolve-merge-conflicts-AJ7JZ
PetrAnto Feb 3, 2026
b228b84
fix: remove unsupported description field from clawdbot config
claude Feb 3, 2026
16cd951
Merge pull request #8 from PetrAnto/claude/resolve-merge-conflicts-AJ7JZ
PetrAnto Feb 3, 2026
f24215e
fix: skip auth middleware for telegram webhook routes
claude Feb 3, 2026
7a10a70
Merge pull request #9 from PetrAnto/claude/resolve-merge-conflicts-AJ7JZ
PetrAnto Feb 3, 2026
49c7c18
feat: add skill loading from R2 for Telegram bot
claude Feb 3, 2026
5f36922
Merge pull request #10 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 3, 2026
57cb35b
feat: add user allowlist for Telegram bot security
claude Feb 3, 2026
365c88d
Merge pull request #11 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 3, 2026
0e299ea
fix: use chat completions endpoint for FLUX image generation
claude Feb 3, 2026
ed82ae6
feat: add model selection to /img command
claude Feb 3, 2026
1037530
Merge pull request #12 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 3, 2026
8e504a9
fix: correct FLUX model IDs and add image modalities support
claude Feb 3, 2026
a298c78
fix: correct Qwen model IDs and add qwen3-coder-next
claude Feb 4, 2026
1321c25
Merge pull request #13 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 4, 2026
9bc30f4
fix: correct Kimi model ID to moonshotai/kimi-k2.5
claude Feb 4, 2026
1942201
feat: add tool calling support for agentic models
claude Feb 4, 2026
91a36fd
fix: update model IDs and fix image generation endpoint
claude Feb 4, 2026
c26bc01
Merge pull request #14 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 4, 2026
a116ca7
feat: add status message updates during tool execution
claude Feb 4, 2026
5256ab4
feat: fix image generation, add GITHUB_TOKEN, improve commands
claude Feb 4, 2026
570cd9f
Merge pull request #15 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 4, 2026
2747ec0
feat: add timeout handling and improved progress for complex tasks
claude Feb 4, 2026
fb2af7d
chore: increase timeout to 2 minutes for paid Workers plan
claude Feb 4, 2026
ba702bc
feat: add TaskProcessor Durable Object for unlimited task time
claude Feb 4, 2026
19b5b4a
Merge pull request #16 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 4, 2026
7a93625
docs: add brainstorming file for future integrations
claude Feb 4, 2026
32b639e
feat: add browse_url tool, inline buttons, and Discord announcements
claude Feb 4, 2026
5bb5b3c
fix: add /cancel command and timeout handling for stuck tasks
claude Feb 4, 2026
a226f95
feat: add context compression and tool result truncation
claude Feb 4, 2026
e7fb0fe
Merge pull request #17 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 4, 2026
656596e
feat: add R2 checkpointing for task resumption
claude Feb 4, 2026
a4608e8
feat: add Resume button for failed tasks
claude Feb 4, 2026
c7d9cb4
Merge pull request #18 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 4, 2026
58d272c
fix: aggressive checkpointing and better error handling
claude Feb 4, 2026
e63fd08
fix: increase API timeout to 5 minutes for complex tasks
claude Feb 4, 2026
e63f785
Merge pull request #19 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 4, 2026
87e1413
fix: prevent broken tool_call/result pairing in compressed context
claude Feb 4, 2026
78bc0f2
fix: catch uncaught errors in background task processing
claude Feb 4, 2026
197bc02
fix: wrap progress update in try-catch to prevent crashes
claude Feb 4, 2026
2489a22
Merge pull request #20 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 4, 2026
553c5b0
feat: add alarm-based watchdog to detect DO crashes
claude Feb 4, 2026
0381faa
Merge pull request #21 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 4, 2026
4f71f68
fix: set usage_model to standard for higher CPU limits
claude Feb 4, 2026
897f4d4
perf: reduce CPU usage in task processor
claude Feb 4, 2026
2e37999
Merge pull request #22 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 4, 2026
23488ed
feat: add direct API support for Qwen, Kimi, DeepSeek
claude Feb 4, 2026
daf7b54
Merge pull request #23 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 4, 2026
2a9c803
fix: make modelSupportsTools use model info from models.ts
claude Feb 4, 2026
d06d386
fix: update image generation to use /images/generations endpoint
claude Feb 4, 2026
8d683e0
fix: correct image generation response parsing
claude Feb 4, 2026
9c64458
Merge pull request #24 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 4, 2026
fba1ffe
perf: more aggressive CPU optimizations
claude Feb 4, 2026
ef3a255
debug: add timing logs to diagnose CPU vs other issues
claude Feb 4, 2026
9d75a6c
Merge pull request #25 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 4, 2026
40f50b4
debug: add heartbeat during API calls to diagnose DO stopping
claude Feb 4, 2026
af7d54c
Merge pull request #26 from PetrAnto/claude/resolve-merge-conflicts-A…
PetrAnto Feb 5, 2026
bb77e74
debug: add granular logging around response parsing
claude Feb 5, 2026
5251bb7
fix: add heartbeat during response.text() to prevent DO death
claude Feb 5, 2026
254b066
fix: more aggressive heartbeat and timeout during response.text()
claude Feb 5, 2026
69c7711
fix: add retry logic for DeepSeek API timeouts
claude Feb 5, 2026
cee86a8
feat: update /deep to DeepSeek V3.2 via OpenRouter
claude Feb 5, 2026
ee77c05
feat: implement SSE streaming for OpenRouter API calls
claude Feb 5, 2026
847036e
fix: add 60s timeout on initial fetch for streaming
claude Feb 5, 2026
989d70b
fix: add unique query param to bypass stale connection pooling
claude Feb 5, 2026
f25564b
fix: increase streaming idle timeout to 45s for network resilience
claude Feb 5, 2026
70ee692
fix: use Promise.race timeout on reader.read() for mid-stream hangs
claude Feb 5, 2026
dc8ee30
fix: update error message - not CPU, it's API/network timeouts
claude Feb 5, 2026
a2a80e0
feat: add /automode command for automatic task resume
claude Feb 5, 2026
928ffc8
fix: add resume instruction to break re-acknowledgment loop
claude Feb 5, 2026
1332022
fix: store direct API keys for auto-resume recovery
claude Feb 5, 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
53 changes: 53 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy to Cloudflare Workers

on:
push:
branches:
- main
workflow_dispatch: # Allow manual trigger

jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Deploy to Cloudflare Workers
run: npx wrangler deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

- name: Set OpenRouter API Key
run: |
if [ -n "$OPENROUTER_API_KEY" ]; then
echo "$OPENROUTER_API_KEY" | npx wrangler secret put OPENROUTER_API_KEY
fi
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}

- name: Set Telegram Bot Token
run: |
if [ -n "$TELEGRAM_BOT_TOKEN" ]; then
echo "$TELEGRAM_BOT_TOKEN" | npx wrangler secret put TELEGRAM_BOT_TOKEN
fi
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
34 changes: 22 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
FROM docker.io/cloudflare/sandbox:0.7.0

# Install Node.js 22 (required by clawdbot) and rsync (for R2 backup sync)
# The base image has Node 20, we need to replace it with Node 22
# Using direct binary download for reliability
ENV NODE_VERSION=22.13.1
RUN ARCH="$(dpkg --print-architecture)" \
&& case "${ARCH}" in \
Expand All @@ -17,34 +15,46 @@ RUN ARCH="$(dpkg --print-architecture)" \
&& node --version \
&& npm --version

# Install Git and GitHub CLI for Storia orchestrator
RUN apt-get update && apt-get install -y git \
&& curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt-get update \
&& apt-get install -y gh \
&& git --version \
&& gh --version

# Configure git for Storia Bot
RUN git config --global user.email "bot@storia.digital" \
&& git config --global user.name "Storia Bot" \
&& git config --global init.defaultBranch main

# Create repos directory for cloning
RUN mkdir -p /root/repos

# Install pnpm globally
RUN npm install -g pnpm

# Install moltbot (CLI is still named clawdbot until upstream renames)
# Pin to specific version for reproducible builds
RUN npm install -g clawdbot@2026.1.24-3 \
RUN npm install -g clawdbot@latest \
&& clawdbot --version

# Create moltbot directories (paths still use clawdbot until upstream renames)
# Templates are stored in /root/.clawdbot-templates for initialization
# Create moltbot directories
RUN mkdir -p /root/.clawdbot \
&& mkdir -p /root/.clawdbot-templates \
&& mkdir -p /root/clawd \
&& mkdir -p /root/clawd/skills

# Copy startup script
# Build cache bust: 2026-01-28-v26-browser-skill
# Build cache bust: 1769894798
COPY start-moltbot.sh /usr/local/bin/start-moltbot.sh
RUN chmod +x /usr/local/bin/start-moltbot.sh

# Copy default configuration template
# Rebuilt at 1769883636
COPY moltbot.json.template /root/.clawdbot-templates/moltbot.json.template

# Copy custom skills
COPY skills/ /root/clawd/skills/

# Set working directory
WORKDIR /root/clawd

# Expose the gateway port
EXPOSE 18789
Loading