Skip to content

Add the core runtime: providers, agent loop, terminal chat#1

Merged
tamnd merged 1 commit into
mainfrom
m0-core
Jul 6, 2026
Merged

Add the core runtime: providers, agent loop, terminal chat#1
tamnd merged 1 commit into
mainfrom
m0-core

Conversation

@tamnd

@tamnd tamnd commented Jul 6, 2026

Copy link
Copy Markdown
Owner

One binary that holds a streaming, tool-capable conversation with any model from the terminal.

  • pkg/provider: shared message/block types, Anthropic Messages API and OpenAI chat completions backends, both streaming over SSE
  • pkg/agent: turn loop with tool dispatch, a turn cap, and partial-turn recovery on errors
  • pkg/tool: typed registry with capability classes for the policy gate coming in M2
  • pkg/config: ~/.tomo/config.yaml, env expansion, provider/model resolution
  • tomo chat REPL with streaming output

Tested against fixture SSE streams for both dialects and a scripted provider for the loop.

pkg/provider holds the model-neutral message types plus two streaming
backends: the Anthropic Messages API and the OpenAI chat completions
dialect, which covers local llama.cpp, ollama, vllm, and most gateways
through base_url. pkg/agent runs the turn loop: stream the reply, run
whatever tools the model called, feed results back, repeat until
end_turn or the turn cap.

Config is one YAML file at ~/.tomo/config.yaml with ${ENV} expansion
so keys stay out of the file. Models are named provider/model against
the configured providers.

tomo chat is a streaming REPL over all of it. Tools exist as a typed
registry with capability classes (read, net, write, exec); the builtin
set and the policy gate land next.
@tamnd tamnd merged commit eacfcbe into main Jul 6, 2026
5 checks passed
@tamnd tamnd deleted the m0-core branch July 6, 2026 03:53
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