Skip to main content

Module context

Module context 

Source
Expand description

Context-plumbing traits (§4.6). Defined here so downstream crates can depend only on oharness-core when threading observability / budget / approval / cancellation.

Structs§

ApprovalRequest
BudgetAmount
BudgetRequest
A pre-call estimate supplied to BudgetHandle::check. Fields are all optional — callers populate what they can estimate.
BudgetSnapshot
NullApprovalChannel
A default approval channel that allows everything. Suitable for non-interactive contexts; CLI/UI surfaces provide interactive variants.
NullBudget
A no-op budget that always allows. Default in AgentBuilder.
NullSink
A sink that silently discards events. Default for AgentBuilder — a library call must not write to cwd implicitly.
ScopedEmitter
Run-scoped event emitter. Subsystems (tools, memory, middleware) receive one of these so they don’t need to know about run_id or the monotonic seq counter — they just call .emit(span_id, kind).

Enums§

ApprovalResponse
BudgetDecision
NamespaceError
Error returned when event-payload construction rejects an invalid namespace for user.log events (§4.7).

Traits§

ApprovalChannel
Approval channel for tool calls needing human/external OK.
BudgetHandle
Budget state accessible from tools and middleware.
EventSink
Emit events to wherever the harness routes them.

Type Aliases§

Cancellation
Stable alias for the cancellation primitive. Lets us swap the underlying type if tokio-util’s token is ever replaced without churning every use site.
SharedSink
Convenient alias: Arc-wrapped sink, the type every subsystem receives.