engine/

directory
v0.6.1-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2026 License: Apache-2.0

Directories

Path Synopsis
Package calc holds the pure token and cost arithmetic that runs between an OpenRouter response and a persisted assistant message: it normalises the provider usage block, prices a call from the model catalog, and derives the compaction budget and its watermarks from the model limits and the compaction config.
Package calc holds the pure token and cost arithmetic that runs between an OpenRouter response and a persisted assistant message: it normalises the provider usage block, prices a call from the model catalog, and derives the compaction budget and its watermarks from the model limits and the compaction config.
Cursor encoding: a pagination cursor is `{id, time}` encoded as unpadded RFC 4648 URL-safe base64.
Cursor encoding: a pagination cursor is `{id, time}` encoded as unpadded RFC 4648 URL-safe base64.
Package orclient is the OpenRouter streaming client: it assembles the chat-completions request body and headers, decodes the SSE response into stream parts (text, reasoning, tool calls, usage, finish), validates and repairs tool calls against the registered tool set, and registers the outcome of each call with the adaptive router.
Package orclient is the OpenRouter streaming client: it assembles the chat-completions request body and headers, decodes the SSE response into stream parts (text, reasoning, tool calls, usage, finish), validates and repairs tool calls against the registered tool set, and registers the outcome of each call with the adaptive router.
Package retrysched classifies the errors a model call can end in: the parsed Err shape, the timeout and context-overflow predicates the step loop consults, and the StatusError a failed provider response becomes.
Package retrysched classifies the errors a model call can end in: the parsed Err shape, the timeout and context-overflow predicates the step loop consults, and the StatusError a failed provider response becomes.
Package steploop drives one turn of the agent.
Package steploop drives one turn of the agent.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL