Skip to content

feat: implement core runtime (all 8 phases)#3

Merged
jbold merged 3 commits into
mainfrom
001-implement
Feb 8, 2026
Merged

feat: implement core runtime (all 8 phases)#3
jbold merged 3 commits into
mainfrom
001-implement

Conversation

@jbold
Copy link
Copy Markdown
Owner

@jbold jbold commented Feb 8, 2026

Summary

Full implementation of the core runtime specification (specs/001-core-runtime/), covering all 8 phases and 5 user stories:

  • Phase 1-2 (Setup/Foundation): TOML config with zero-config defaults, type definitions, CLI integration
  • Phase 3 (US1 - MVP): WebSocket chat.send → router → LLM streaming → response pipeline
  • Phase 4 (US2 - Tools): WASM sandbox tool execution with capability grants, tool-use loop
  • Phase 5 (US3 - Metering): Token budget enforcement, usage recording, cost estimation
  • Phase 6 (US4 - Memory): Episodic (sliding window), semantic (entity graph), soul (personality doc)
  • Phase 7 (US5 - Channels): Webhook endpoint, channel adapter WASM plugins, host-side HTTP proxy
  • Phase 8 (Polish): 111 tests, clippy clean, 22MB release binary

Key Stats

Metric Value
Tests 111 passing
Test suites 8 (auth, router, sandbox, metering, memory, channel, config, unit)
Release binary 22MB (target: <25MB)
Clippy Clean (only expected dead_code)
New files 15 source files, 7 test files, 1 example plugin

Test plan

  • cargo test — 111 tests passing
  • cargo clippy — no non-dead-code warnings
  • cargo fmt --check — clean
  • cargo build --release — 22MB binary with LTO+strip
  • End-to-end quickstart with live API key (manual)

🤖 Generated with Claude Code

jbold and others added 3 commits February 8, 2026 02:07
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>
@jbold jbold merged commit 09eff6d into main Feb 8, 2026
1 check passed
@jbold jbold deleted the 001-implement branch February 8, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant