Initial CodeCraft: web-based coding harness for AI models
Rust backend (axum/tokio): agent loop with streaming, tools (fs, bash, web_fetch, todo, ask_user, subagents, skills, craft snapshots/compare), permissions with modes and rules, Anthropic + OpenAI-compatible providers, MCP client (stdio/HTTP, elicitation), SQLite sessions, usage statistics, compaction, commented TOML config editable via toml_edit. React PWA: chat with live streaming, permission/question cards, modes (build/plan/craft), settings for providers/models/prices/MCP/permissions, raw config editor, statistics dashboard, i18n (en/de). Docker setup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
f3a2fe3816
62 files changed
+21835
No files matched your search
+41
@@ -0,0 +1,41 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
# --- web UI (PWA) -------------------------------------------------------------
|
||||
FROM node:22-alpine AS web
|
||||
WORKDIR /web
|
||||
COPY web/package.json web/package-lock.json ./
|
||||
RUN npm ci --no-audit --no-fund
|
||||
COPY web/ ./
|
||||
RUN npm run build
|
||||
|
||||
# --- server -------------------------------------------------------------------
|
||||
FROM rust:1-bookworm AS server
|
||||
WORKDIR /src
|
||||
COPY config.example.toml ./
|
||||
COPY server/Cargo.toml server/Cargo.lock ./server/
|
||||
# Cache dependencies separately from the sources.
|
||||
RUN mkdir -p server/src && echo 'fn main(){}' > server/src/main.rs \
|
||||
&& cd server && cargo build --release && rm -rf src
|
||||
COPY server/src ./server/src
|
||||
RUN cd server && touch src/main.rs && cargo build --release
|
||||
|
||||
# --- runtime ------------------------------------------------------------------
|
||||
# Node is included so agents can work on JS projects and run npx-based MCP servers.
|
||||
FROM node:22-bookworm-slim
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates bash git curl ripgrep jq less procps \
|
||||
python3 python3-venv build-essential \
|
||||
chromium fonts-dejavu-core fonts-noto-color-emoji \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=server /src/server/target/release/codecraft /usr/local/bin/codecraft
|
||||
COPY --from=web /web/dist /app/web
|
||||
ENV CODECRAFT_WEB=/app/web \
|
||||
CODECRAFT_CONFIG=/data/config.toml \
|
||||
HOME=/data/home \
|
||||
RUST_LOG=info
|
||||
RUN mkdir -p /data /workspace && chmod 777 /data /workspace
|
||||
VOLUME ["/data"]
|
||||
EXPOSE 8787
|
||||
# Run as the host user (see docker-compose.yml) so files in /workspace keep their owner.
|
||||
USER 1000:1000
|
||||
ENTRYPOINT ["codecraft"]
|
||||
Reference in new issue
Block a user