Add API tokens, CLI server API and shared core crate
- Personal API tokens (full/read scope, expiry, revoke) and CLI password login - Cargo workspace: codecraft-core (types, providers, permission rules) shared by server and the upcoming terminal client; server re-exports the old paths - CLI server API: /cli/config, /cli/skill, /cli/tool (server MCP tools), /llm/stream model gateway with budgets and usage per user - Theme/language preferences mirrored to the server; personal memory endpoint - Statistics: provider and mode tables stacked; CLI usage labelled - cli/: work in progress (terminal client is being rewritten as a local TUI) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fca1c41087
commit
aa1f8cf016
40 files changed
+2454
-814
No files matched your search
+12
-6
@@ -12,12 +12,18 @@ RUN npm run build
|
||||
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 Cargo.toml Cargo.lock ./
|
||||
COPY core/Cargo.toml ./core/
|
||||
COPY server/Cargo.toml ./server/
|
||||
COPY cli/Cargo.toml ./cli/
|
||||
# Cache dependencies separately from the sources (stub crates first).
|
||||
RUN mkdir -p core/src server/src cli/src \
|
||||
&& echo '' > core/src/lib.rs && echo 'fn main(){}' > server/src/main.rs && echo 'fn main(){}' > cli/src/main.rs \
|
||||
&& cargo build --release -p codecraft && rm -rf core/src server/src cli/src
|
||||
COPY core/src ./core/src
|
||||
COPY server/src ./server/src
|
||||
RUN cd server && touch src/main.rs && cargo build --release
|
||||
COPY cli/src ./cli/src
|
||||
RUN touch core/src/lib.rs server/src/main.rs && cargo build --release -p codecraft
|
||||
|
||||
# --- runtime ------------------------------------------------------------------
|
||||
# Node is included so agents can work on JS projects and run npx-based MCP servers.
|
||||
@@ -34,7 +40,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
# Language servers for diagnostics after edits (rust-analyzer/gopls/clangd can be
|
||||
# installed by agents: rustup component add rust-analyzer, go install …).
|
||||
RUN npm install -g typescript@5 typescript-language-server pyright && npm cache clean --force
|
||||
COPY --from=server /src/server/target/release/codecraft /usr/local/bin/codecraft
|
||||
COPY --from=server /src/target/release/codecraft /usr/local/bin/codecraft
|
||||
COPY --from=web /web/dist /app/web
|
||||
COPY server/ghidra /app/ghidra
|
||||
COPY server/resources /app/resources
|
||||
|
||||
Reference in new issue
Block a user