Documentation
¶
Overview ¶
Package nativeagent runs bounded text-only roles through an isolated native Codex process backed by already-installed local Ollama weights. It does not use a user's Codex account, credentials, settings, hooks, or project files.
Index ¶
- Constants
- func DecodeEvents(data []byte, model string) (inference.Response, error)
- type Provider
- func (p *Provider) CountInputTokens(ctx context.Context, req inference.Request) (int64, error)
- func (p *Provider) Generate(ctx context.Context, req inference.Request) (inference.Response, error)
- func (p *Provider) Identity() string
- func (p *Provider) ModelDigest() string
- func (p *Provider) RefreshIdentity(ctx context.Context) error
- func (p *Provider) RuntimeVersion() string
Constants ¶
const ( // HarnessReserve is a conservative admission estimate for native instructions // and tool schemas, not an exact tokenizer count or a generation-time ceiling. HarnessReserve int64 = 16_384 )
Variables ¶
This section is empty.
Functions ¶
func DecodeEvents ¶
DecodeEvents validates one completed native text-only turn and its reported token usage without performing inference. It can also validate separately authorized Codex baseline receipts. It does not establish model identity, completeness of a captured stream, or the number of underlying HTTP calls.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider binds the local model snapshot and a particular native executable. Recreate it after changing weights or upgrading the native client.
func New ¶
New inspects local weights and the executable without performing inference. executable must be absolute; all process state is confined to a fresh private home and empty workspace. There is no remote endpoint or paid fallback option.
func (*Provider) CountInputTokens ¶
CountInputTokens is a byte-based local estimate plus HarnessReserve, not a native tokenizer API. Native tool-turn totals are checked after generation by inference.Runner; the harness does not expose a hard output-token ceiling.
func (*Provider) ModelDigest ¶
func (*Provider) RefreshIdentity ¶
RefreshIdentity prevents stale accepted results from bypassing a changed executable or changed local model snapshot. It never updates the pinned value.