chore: updated PLAN
This commit is contained in:
98
README.md
98
README.md
@@ -1,58 +1,48 @@
|
||||
# DS4Server
|
||||
|
||||
DS4Server is a native macOS coding-agent application that rewrites the
|
||||
DwarfStar (`ds4`) inference engine in Rust. It uses Rust and Iced and will combine local model loading, an
|
||||
OpenAI-compatible localhost endpoint, and project-scoped agent chat in one app.
|
||||
DS4Server is a native macOS application for running DwarfStar models as a local
|
||||
coding agent and as a localhost inference server. The inference engine, model
|
||||
lifecycle, agent loop, and application UI are implemented in Rust with Iced;
|
||||
the Metal kernels and small native integration layers are adapted from
|
||||
[DwarfStar (`ds4`)](https://github.com/antirez/ds4).
|
||||
|
||||
DS4Server vendors and adapts the Metal kernels, Objective-C Metal glue, and
|
||||
visible-Chrome web tool runtime from
|
||||
[DwarfStar (`ds4`)](https://github.com/antirez/ds4). Their copyright and license
|
||||
notices are retained in [`native/metal/LICENSE`](native/metal/LICENSE) and
|
||||
[`native/web/LICENSE`](native/web/LICENSE).
|
||||
## Capabilities
|
||||
|
||||
The current milestone provides a Codex-inspired project/session layout. A native
|
||||
macOS folder picker selects each workspace, then the app asks for its display
|
||||
name. Projects and sessions are persisted through Diesel in SQLite, while
|
||||
settings live in a YAML file beside it that lists only the values you changed
|
||||
and can be edited by hand. Open Preferences with `Command-,` to configure model,
|
||||
generation, runtime, local endpoint, and idle-unload settings. The separate Model Manager
|
||||
(`Shift-Command-M`)
|
||||
lists local main and DSpark artifacts, their on-disk sizes and state, and lets
|
||||
you download, resume, validate, or delete them. Rust-native background work
|
||||
shows live byte progress, speed, and ETA in Model Manager and the app status
|
||||
bar. Stopping or quitting keeps the partial file; the next Download/Resume
|
||||
action continues from that exact byte after relaunch. Exact size and SHA-256
|
||||
verification happen before an artifact becomes usable.
|
||||
- **Project-based coding chat.** Add local project folders, keep multiple
|
||||
persistent sessions per project, and rename, retitle, pin, archive, compact,
|
||||
rebuild, or delete sessions. Chats stream Markdown, reasoning, tool activity,
|
||||
context use, and generation speed.
|
||||
- **Local coding tools.** The agent can read, search, list, write, and edit
|
||||
project files; run and monitor asynchronous shell commands; search Google;
|
||||
and visit rendered web pages. File access is confined to the project, output
|
||||
is bounded, and risky shell or visible-browser actions require approval.
|
||||
- **Long-running sessions.** Transcripts and summaries are stored in SQLite.
|
||||
Automatic and manual context compaction preserve the complete visible chat,
|
||||
while durable KV checkpoints make follow-up turns and relaunches resumable.
|
||||
- **Native Metal inference.** DeepSeek V4 Flash, DeepSeek V4 Pro, and GLM 5.2
|
||||
run through model-specific Rust/Metal executors with long-context prefill,
|
||||
sampling, cancellation, idle unload, and a bounded resident session pool.
|
||||
Supported acceleration includes SSD expert streaming, DeepSeek legacy MTP,
|
||||
DSpark, GLM MTP, directional steering, and model-specific memory admission.
|
||||
- **Local HTTP APIs.** A configurable listener on `127.0.0.1:4000` exposes
|
||||
Models, Chat Completions, Completions, Anthropic Messages, and Responses APIs
|
||||
with streaming, tool calls, usage accounting, cancellation, and prefix-aware
|
||||
KV reuse. Endpoint conversations remain client-owned and are not added to
|
||||
project history.
|
||||
- **Model and runtime management.** Model Manager downloads, resumes, verifies,
|
||||
and deletes supported GGUF artifacts with byte progress, speed, and ETA.
|
||||
Preferences cover generation, runtime, SSD, speculative decoding, steering,
|
||||
KV storage, the local endpoint, and idle unload. The Stats view reports model,
|
||||
cache, SSD, speculative, session, and HTTP activity.
|
||||
|
||||
The selected DeepSeek V4 Flash model can run directly from a project session.
|
||||
The model, KV/compressor state, 43-layer graph, sampling, and lifecycle are
|
||||
owned by Rust; a fixed snapshot of the Objective-C Metal boundary and unchanged
|
||||
Metal kernels is vendored and built inside this repository. Tokens stream into the chat UI, Stop cancels generation,
|
||||
follow-up turns reuse durable transcript and KV state, and the model unloads
|
||||
after the idle timeout. The graph uses the full configured context with the
|
||||
ratio-4 sparse indexer.
|
||||
Projects, sessions, and transcripts use SQLite. Settings use a compact YAML file
|
||||
that contains only values changed from their defaults and can also be edited by
|
||||
hand.
|
||||
|
||||
Project chat includes the native `ds4_agent.c` starting tool set: bounded file
|
||||
read/continuation, write, anchored edit, search, directory listing, asynchronous
|
||||
shell jobs, Google search, and rendered page visits. Tool calls and results are
|
||||
persisted as transcript roles and automatically continue the same model turn.
|
||||
File tools stay inside the selected project. Web tools ask before starting a
|
||||
visible Chrome profile.
|
||||
## Build and run
|
||||
|
||||
Long sessions compact automatically while retaining the complete scrollable
|
||||
chat. Each compaction appears in history with its durable summary, and a missing
|
||||
or incompatible KV checkpoint rebuilds from the latest summary and subsequent
|
||||
chat. An idle session's `…` menu can force compaction after new chat has been
|
||||
added since the latest marker, or discard its checkpoint for a clean rebuild.
|
||||
|
||||
The app also listens on `127.0.0.1:4000` by default for Models, Chat
|
||||
Completions, Completions, Anthropic Messages, and Responses APIs. The listener,
|
||||
port, and opt-in CORS are configurable in Preferences. The
|
||||
endpoint and local chat share the single model owner. External conversations
|
||||
are client-managed and never enter the project, session, message, or transcript
|
||||
database; only opaque content-addressed KV cache files are retained. Model
|
||||
discovery advertises only supported main artifacts that are fully downloaded
|
||||
and verified on disk.
|
||||
DS4Server targets macOS 13 or newer and requires Rust 1.97 plus
|
||||
`cargo-packager` 0.11.8.
|
||||
|
||||
```sh
|
||||
cargo install cargo-packager --locked --version 0.11.8
|
||||
@@ -60,7 +50,7 @@ make bundle
|
||||
open target/release/DS4Server.app
|
||||
```
|
||||
|
||||
State is stored at:
|
||||
## Application data
|
||||
|
||||
```text
|
||||
~/Library/Application Support/DS4Server.rfc1437.de/data.sqlite3
|
||||
@@ -68,6 +58,10 @@ State is stored at:
|
||||
~/Library/Application Support/DS4Server.rfc1437.de/kv-cache/
|
||||
```
|
||||
|
||||
Deleting a project or session removes only DS4Server metadata. It never deletes
|
||||
the referenced project directory. See [PLAN.md](PLAN.md) for the implementation
|
||||
roadmap.
|
||||
Deleting a project or session removes DS4Server metadata and its associated
|
||||
checkpoint; it never deletes the referenced project directory. See
|
||||
[PLAN.md](PLAN.md) for the remaining implementation work.
|
||||
|
||||
The adapted Metal and browser sources retain their upstream notices in
|
||||
[`native/metal/LICENSE`](native/metal/LICENSE) and
|
||||
[`native/web/LICENSE`](native/web/LICENSE).
|
||||
|
||||
Reference in New Issue
Block a user