feat: implement core runtime (all 8 phases)#3
Merged
Merged
Conversation
Phase 1 (Setup): config.rs with TOML loading, types.rs with shared message types, complete examples/config.toml, config integration in main.rs with CLI override support. Phase 2 (Foundational): LLM provider trait with Anthropic/OpenAI implementations, ChatSendParams parsing, auth and router tests (18 passing), lib.rs for integration test support. Phase 3 (US1 MVP): Wire chat.send end-to-end through router -> session -> LLM provider -> streaming WebSocket response. RpcResult enum for single vs streaming responses. Per-session message history. Assistant response collection and session persistence. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 4 (US2 - WASM Tool Execution): - Capability parsing module (sandbox/capabilities.rs) - PluginHost updated with capability grants, PluginType, tool schemas - Tool schema builders for Anthropic/OpenAI formats in providers.rs - Plugin loading from config with capability validation - 14 sandbox tests passing Phase 5 (US3 - Token Metering): - Token metering module (agent/metering.rs) with budget enforcement - Pre-call budget checking and post-call usage recording - Cost estimation with per-model pricing lookup - Metering relay in protocol.rs intercepts usage events - 15 metering tests passing Phase 6 (US4 - Multi-Layer Memory): - Memory engine (memory/mod.rs) with context assembly - Episodic memory with sliding window (default 5 turns) - Soul document loader with token estimation and hot-reload - Semantic memory with entity storage, query, and supersession - Pattern-based entity extraction from LLM responses - MemoryConfig added to config.rs - 25 memory tests passing All three phases implemented by parallel agents modifying separate file sets. 86 total tests passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 7 (US5 - Channel Adapters):
- Channel adapter plugin interface (call_channel_parse, call_channel_format)
- POST /webhook/{channel} endpoint with full pipeline
- Host-side HTTP proxy with allowed_hosts capability validation
- Mock-channel example WASM plugin (parse_incoming, format_outgoing)
- 11 channel adapter integration tests
Phase 8 (Polish):
- 14 config validation tests
- clippy clean (only expected dead_code), rustfmt pass
- Default derive for ExoclawConfig, Default impl for SessionRouter
- Release binary 22MB (under 25MB target)
- url crate added for proxy host validation
111 tests passing across 8 test suites.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full implementation of the core runtime specification (
specs/001-core-runtime/), covering all 8 phases and 5 user stories:Key Stats
Test plan
cargo test— 111 tests passingcargo clippy— no non-dead-code warningscargo fmt --check— cleancargo build --release— 22MB binary with LTO+strip🤖 Generated with Claude Code