eclipse-core 0.13.1

Core library for eclipse: providers, tools, sessions, config, runtime
Documentation
# eclipse-core

The library under Eclipse: configuration, sessions, an OpenAI-compatible provider, the tool surface,
and the agent loop that ties them together.

Everything the terminal, the web dashboard and the gateway do goes through this crate — there is no
second implementation of "what a turn is" anywhere in the workspace.

## What is in it

| module | what it owns |
| --- | --- |
| `config` | `config.toml` and `.env` loading, the key catalogue, provider profiles |
| `session` | the SQLite store: messages, titles, the archive flag, search |
| `provider` | the HTTP client for an OpenAI-compatible API, streaming, retries, reasoning policy |
| `tools` | the tool registry, the approval contract, and every built-in tool |
| `runtime` | `Agent` — one turn: prompt, tool calls, approvals, compaction, the events a front draws |
| `reasoning` | the effort ladder and each backend's own vocabulary for it |

## A turn, without a front end

```rust
use std::sync::Arc;
use eclipse_core::config::ProviderConfig;
use eclipse_core::provider::OpenAiProvider;
use eclipse_core::runtime::Agent;
use eclipse_core::session::SessionStore;
use eclipse_core::tools::{DenyAll, ToolRegistry};

# async fn example() -> eclipse_core::Result<()> {
let cfg = ProviderConfig {
    base_url: "http://127.0.0.1:8080/v1".into(),
    model: "local-model".into(),
    ..Default::default()
};

let agent = Agent::new(
    Arc::new(OpenAiProvider::new(&cfg)?),
    Arc::new(ToolRegistry::default()),
    SessionStore::new("/home/you/.eclipse/sessions".into()),
    "You are a careful assistant.".into(),
    8, // tool round-trips per turn
);

// `DenyAll` refuses every tool call; the terminal and the dashboard pass a real approver here.
let result = agent.run(None, "hello", &DenyAll, &|_event| {}).await?;
println!("{}", result.reply);
# Ok(())
# }
```

`run` with `None` starts a new session and returns its id in `RunResult::session_id`; pass that id
next time to continue it. `RunResult` also carries the route hops taken and any subagent runs, kept
apart from the parent's own usage.

## What it is not

No CLI, no HTTP server, no rendering. Those are `eclipse-cli`, `eclipse-web` and `eclipse-gateway`,
which are thin against this crate on purpose: a behaviour added here is a behaviour all three get.

## Licence

Apache-2.0. The full text is in `LICENSE` in this package.