Skip to content
Embedding

Embedding (Go library)

This page is a curated guided tour. The authoritative API reference lives at pkg.go.dev.

Overview

Fizeau is a Go library that implements a coding agent runtime. The root package github.com/easel/fizeau is a thin facade: it exports the FizeauService interface, request/response/event types, and the New constructor. All concrete execution, transcript, routing health, and quota mechanics live behind internal/ packages.

Quick start

package main

import (
    "context"
    "fmt"

    "github.com/easel/fizeau"
    _ "github.com/easel/fizeau/configinit"
)

func main() {
    svc, err := fizeau.New(fizeau.ServiceOptions{})
    if err != nil {
        panic(err)
    }
    events, err := svc.Execute(context.Background(), fizeau.ServiceExecuteRequest{
        Prompt:  "Read main.go and tell me the package name",
        Policy:  "cheap",
        WorkDir: ".",
    })
    if err != nil {
        panic(err)
    }
    for event := range events {
        fmt.Println(event.Type)
    }
}

The blank import of github.com/easel/fizeau/configinit registers the default YAML config loader via RegisterConfigLoader; without it, New starts with no provider config and ListProviders/HealthCheck will error until config is injected explicitly.

Core types

FizeauService

FizeauService is the entire public Go surface of the fizeau module.

type FizeauService interface {
    Execute(ctx context.Context, req ServiceExecuteRequest) (<-chan ServiceEvent, error)
    TailSessionLog(ctx context.Context, sessionID string) (<-chan ServiceEvent, error)
    ListHarnesses(ctx context.Context) ([]HarnessInfo, error)
    ListProviders(ctx context.Context) ([]ProviderInfo, error)
    ListModels(ctx context.Context, filter ModelFilter) ([]ModelInfo, error)
    ListPolicies(ctx context.Context) ([]PolicyInfo, error)
    HealthCheck(ctx context.Context, health HealthTarget) error
    ResolveRoute(ctx context.Context, req RouteRequest) (*RouteDecision, error)
    RecordRouteAttempt(ctx context.Context, attempt RouteAttempt) error
    RouteStatus(ctx context.Context) (*RouteStatusReport, error)

    // Historical session-log projections. CONTRACT-003 owns these so CLI
    // subcommands such as log/replay/usage do not need to read the
    // internal session-log JSONL schema.
    UsageReport(ctx context.Context, opts UsageReportOptions) (*UsageReport, error)
    ListSessionLogs(ctx context.Context) ([]SessionLogEntry, error)
    WriteSessionLog(ctx context.Context, sessionID string, w io.Writer) error
    ReplaySession(ctx context.Context, sessionID string, w io.Writer) error
}

ServiceOptions

ServiceOptions configures a FizeauService instance.

type ServiceOptions struct {
    seamOptions

    ConfigPath string    // optional override; default $XDG_CONFIG_HOME/fizeau/config.yaml
    Logger     io.Writer // optional; agent writes structured session logs internally regardless

    // ServiceConfig, when non-nil, supplies provider and routing data for
    // ListProviders and HealthCheck. Pass a value wrapping the loaded config.
    // When nil, those methods return an error.
    ServiceConfig ServiceConfig

    // QuotaRefreshDebounce is the minimum interval between live quota probes for
    // a primary subscription harness. Zero uses the service default.
    QuotaRefreshDebounce time.Duration
    // QuotaRefreshStartupWait bounds startup waiting when the durable quota
    // cache is missing, stale, or incomplete. Zero uses the service default.
    QuotaRefreshStartupWait time.Duration
    // QuotaRefreshInterval enables periodic refresh for long-running server
    // processes. Zero disables the timer; cache refresh still happens on startup
    // and service activity.
    QuotaRefreshInterval time.Duration
    // QuotaRefreshContext optionally cancels the periodic server refresh worker.
    // When nil, the worker uses context.Background().
    QuotaRefreshContext context.Context

    // CatalogProbeTimeout bounds live /v1/models discovery during routing.
    // Zero uses the service default of 2s.
    CatalogProbeTimeout time.Duration
    // CatalogReloadTimeout bounds stale-while-revalidate catalog reloads.
    // Zero uses the service default of 30s.
    CatalogReloadTimeout time.Duration

    // LocalCostUSDPer1kTokens is the operator-supplied electricity/operations
    // estimate for local endpoint providers under the embedded agent harness.
    // Zero means local endpoint cost is unknown.
    LocalCostUSDPer1kTokens float64
    // SubscriptionCostCurve optionally overrides the default subscription
    // effective-cost curve used by routing.
    SubscriptionCostCurve *SubscriptionCostCurve

    // SessionLogDir overrides the directory used by historical session-log
    // projections (UsageReport, ListSessionLogs, WriteSessionLog,
    // ReplaySession). Empty falls back to ServiceConfig.SessionLogDir().
    // Per-Execute requests still set their own
    // ServiceExecuteRequest.SessionLogDir.
    SessionLogDir string

    // StaleHarnessReaperGrace is the minimum age before a startup reaper may
    // terminate an owned subprocess record. Zero uses the default grace window.
    StaleHarnessReaperGrace time.Duration

    // HealthProbeInterval is the interval between background aliveness probes
    // for configured non-cloud providers. Zero uses the default (60s).
    HealthProbeInterval time.Duration
    // HealthSignalTTL is the maximum age of a probe result before it expires
    // for routing purposes. Zero uses the default (10 min).
    HealthSignalTTL time.Duration
    // PersistRouteHealth, when non-empty, is the file path where probe results
    // are persisted across processes so a fresh process skips redundant probing.
    PersistRouteHealth string
    // AlivenessProber, when non-nil, overrides the default TCP-connect prober
    // used during startup and periodic aliveness probing. Nil uses the default.
    AlivenessProber ProviderAlivenessProber
}

ServiceExecuteRequest

ServiceExecuteRequest is the public ExecuteRequest type per CONTRACT-003.

type ServiceExecuteRequest struct {
    Prompt            string
    SystemPrompt      string
    Model             string
    Provider          string
    Harness           string
    Policy            string
    WorkDir           string
    Temperature       *float32
    TopP              *float64
    TopK              *int
    MinP              *float64
    RepetitionPenalty *float64
    Seed              *int64
    // SamplingSource is the comma-separated layer attribution produced by
    // internal/sampling.Resolve. Plumbed through to the llm.request
    // telemetry event for ADR-007 override-tracking; never on the wire.
    SamplingSource string
    Reasoning      Reasoning
    NoStream       bool
    Permissions    string
    // Tools overrides the built-in native agent tool set when Harness is
    // "fiz". Nil uses the native built-ins for ToolPreset and WorkDir.
    Tools []Tool
    // ToolPreset is passed through to BuiltinToolsForPreset when Tools is nil.
    // Empty uses the default tool set.
    ToolPreset string

    // PlanningMode, when true, performs one no-tool LLM "planning" call
    // before the main native agent loop and injects the response as an
    // assistant message wrapped in <plan> tags. The benchmark tool preset
    // auto-enables planning; this flag is the per-request opt-in for other
    // callers (e.g. the CLI --plan flag). Only honored when Harness=="fiz"
    // (the native loop). See internal/core.Request.PlanningMode.
    PlanningMode bool

    // EstimatedPromptTokens, when > 0, drives auto-selection's
    // context-window gate (filter out candidates whose context window is
    // too small for the prompt + safety margin).
    EstimatedPromptTokens int
    // RequiresTools, when true, drives auto-selection's tool-support gate
    // (filter out candidates that cannot invoke tools).
    RequiresTools bool
    MinPower      int
    MaxPower      int

    // CachePolicy is the public opt-out for prompt caching. Empty (the zero
    // value) and "default" both request the per-provider default caching
    // behavior; "off" disables caching for this request. Any other value is
    // rejected at the service boundary (see ValidateCachePolicy). Providers
    // that do not implement caching ignore the field; this field is read by
    // the Anthropic cache_control writer (bead C) and the cache-aware cost
    // attribution path (bead D).
    CachePolicy string

    // Three independent timeout knobs:
    //   Timeout         — wall-clock cap on the entire request.
    //   IdleTimeout     — streaming-quiet cap; per-stream gap.
    //   ProviderTimeout — per-HTTP-request cap to the provider.
    Timeout         time.Duration
    IdleTimeout     time.Duration
    ProviderTimeout time.Duration

    // Optional native-loop overrides used when Harness == "fiz". These let
    // the CLI and other callers route fully-resolved execution settings through
    // the service path instead of maintaining a divergent direct loop path.
    MaxIterations           int
    MaxTokens               int
    ReasoningByteLimit      int
    CompactionContextWindow int
    CompactionReserveTokens int

    // CostCapUSD is the per-run cost cap in USD, mirrored to
    // internal/core.Request.CostCapUSD. When > 0, the native loop halts
    // before issuing the next llm.request once running known cost plus the
    // projected next-turn cost would meet or exceed the cap; the resulting
    // final event reports Status="budget_halted". Zero means no cap. Per
    // FEAT-005 §28 / AC-FEAT-005-07, the cap requires turn cost to be known;
    // unknown-cost runs proceed past the cap with a stderr warning. Honored
    // only when Harness=="fiz" (the native loop) — subprocess harnesses
    // manage cost externally.
    CostCapUSD float64

    // Optional stall policy. When non-nil agent enforces and ends with
    // Status="stalled" if any limit hits. Default policy applies when nil.
    StallPolicy *StallPolicy

    // SessionLogDir overrides the default session-log directory for this
    // request (e.g. an execute-bead per-bundle evidence directory).
    SessionLogDir string

    // SelectedRoute is the configured model-route name the caller picked
    // (e.g. "code-pool"). Recorded into the service-owned session log so
    // post-hoc routing analytics can correlate logs to route keys without
    // reconstructing attribution from the event stream.
    SelectedRoute string

    // Metadata is bidirectional: echoed back in every Event AND stamped
    // onto every line of the session log so external consumers correlate.
    Metadata map[string]string

    // Role tags the kind of work this call performs (e.g. "implementer",
    // "reviewer", "decomposer", "summarizer"). Observational: echoed into
    // the routing_decision and final event Metadata, plus the session-log
    // header. Per CONTRACT-003 it is NOT part of the selection precedence
    // chain (Day 1) and does NOT affect routing. Empty means unset.
    //
    // Normalization: lowercased, alphanumeric + hyphen only, max 64 chars;
    // invalid values are rejected pre-dispatch with RoleNormalizationError.
    Role string
    // CorrelationID links calls that share work context (e.g.
    // "bead_123:attempt_4") so reviewer/implementer/retry attempts can be
    // joined in logs and aggregations. Observational: echoed into
    // routing_decision and final event Metadata, plus the session-log
    // header. Per CONTRACT-003 it is NOT part of the selection precedence
    // chain (Day 1) and does NOT affect routing. Empty means unset.
    //
    // Normalization: printable ASCII (no control chars, no whitespace
    // except hyphen, colon, underscore), max 256 chars; invalid values
    // are rejected pre-dispatch with CorrelationIDNormalizationError.
    CorrelationID string
}

ServiceEvent

ServiceEvent is a contract-level event (mirrors harnesses.

type ServiceEvent = harnesses.Event

ServiceConfig

ServiceConfig provides provider and routing data to the service without.

type ServiceConfig interface {
    // ProviderNames returns provider names in stable order (default first).
    ProviderNames() []string
    // DefaultProviderName returns the name of the configured default provider.
    DefaultProviderName() string
    // Provider returns the raw config values for a named provider.
    Provider(name string) (ServiceProviderEntry, bool)
    // HealthCooldown returns the configured cooldown duration (0 = use default 30s).
    HealthCooldown() time.Duration
    // WorkDir is the base directory for file-backed health state.
    WorkDir() string
    // SessionLogDir returns the configured sessions directory.
    SessionLogDir() string
}

ModelFilter

ModelFilter filters ListModels results.

type ModelFilter struct {
    Harness  string
    Provider string
}

ModelInfo

ModelInfo describes a model with full metadata per CONTRACT-003.

type ModelInfo struct {
    ID                            string
    Provider                      string
    ProviderType                  string
    Harness                       string
    EndpointName                  string
    EndpointBaseURL               string
    ServerInstance                string
    ContextLength                 int
    ContextSource                 string
    Utilization                   RouteUtilizationState
    Capabilities                  []string
    Cost                          CostInfo
    PerfSignal                    PerfSignal
    Power                         int
    AutoRoutable                  bool
    ExactPinOnly                  bool
    Billing                       BillingModel
    ActualCashSpend               bool
    EffectiveCost                 float64
    EffectiveCostSource           string
    SupportsTools                 bool
    DeploymentClass               string
    HealthFreshnessAt             time.Time
    HealthFreshnessSource         string
    QuotaFreshnessAt              time.Time
    QuotaFreshnessSource          string
    ModelDiscoveryFreshnessAt     time.Time
    ModelDiscoveryFreshnessSource string
    Available                     bool
    IsDefault                     bool // matches the configured default model
    RankPosition                  int  // ordinal in latest discovery rank; -1 if unranked
}

ProviderInfo

ProviderInfo describes a provider with live status per CONTRACT-003.

type ProviderInfo struct {
    Name             string
    Type             string // "openai" | "openrouter" | "lmstudio" | "omlx" | "ollama" | "anthropic" | "virtual"
    BaseURL          string
    Endpoints        []ServiceProviderEndpoint
    Status           string // "connected" | "unreachable" | "error: <msg>"
    ModelCount       int
    Capabilities     []string       // e.g. {"tool_use","streaming","json_mode"}
    Billing          BillingModel   // "fixed" | "per_token" | "subscription" | ""
    IncludeByDefault bool           // participates in unpinned/default routing
    IsDefault        bool           // matches the configured default_provider
    DefaultModel     string         // per-provider configured default model, if any
    CooldownState    *CooldownState // nil if not in cooldown
    Auth             AccountStatus
    EndpointStatus   []EndpointStatus
    Quota            *QuotaState
    UsageWindows     []UsageWindow
    LastError        *StatusError
}

HarnessInfo

HarnessInfo describes a registered harness as defined in CONTRACT-003.

type HarnessInfo struct {
    Name                 string
    Type                 string // "native" | "subprocess"
    Available            bool
    Path                 string
    Error                string
    Billing              BillingModel
    AutoRoutingEligible  bool
    TestOnly             bool
    ExactPinSupport      bool
    DefaultModel         string   // built-in default model when no override is supplied
    SupportedPermissions []string // subset of {"safe","supervised","unrestricted"}
    SupportedReasoning   []string // values such as {"low","medium","high","xhigh","max"}
    CostClass            string   // "local" | "cheap" | "medium" | "expensive"
    Quota                *QuotaState
    Account              *AccountStatus
    UsageWindows         []UsageWindow
    LastError            *StatusError
    CapabilityMatrix     HarnessCapabilityMatrix
}

RouteRequest

RouteRequest specifies a routing query.

type RouteRequest struct {
    Policy      string // optional named policy bundle: cheap|default|smart|air-gapped
    Model       string
    Provider    string
    Harness     string
    Reasoning   Reasoning
    Permissions string
    AllowLocal  bool
    Require     []string
    MinPower    int
    MaxPower    int

    // EstimatedPromptTokens, when > 0, filters out candidates whose context
    // window cannot accommodate the prompt (with a safety margin).
    EstimatedPromptTokens int

    // RequiresTools, when true, filters out candidates that do not support
    // tool calling.
    RequiresTools bool

    // CachePolicy mirrors ServiceExecuteRequest.CachePolicy. Routing decisions
    // today do not act on it; it is carried through so callers using
    // ResolveRoute as a public surface can plumb the same opt-out the
    // Execute path honors.
    CachePolicy string

    // Role tags the kind of work this call performs (e.g. "implementer",
    // "reviewer", "decomposer"). Observational only — it does NOT enter the
    // routing precedence chain. Mirrors ServiceExecuteRequest.Role so
    // ResolveRoute previews don't diverge from Execute.
    Role string

    // CorrelationID joins calls that share work context (e.g.
    // "bead_123:attempt_4"). Observational only — it does NOT enter the
    // routing precedence chain. Mirrors ServiceExecuteRequest.CorrelationID.
    CorrelationID string

    // ExcludedRoutes lists (Provider, Model, Endpoint) combinations the caller
    // has determined are currently unavailable. The router skips any candidate
    // matching an entry. Provider is required; Model and Endpoint are optional
    // (empty matches any value for that field).
    //
    // Use this to communicate caller-side health signals across calls without
    // redesigning provider config. The routing engine records excluded
    // candidates with FilterReasonCallerExcluded for observability.
    ExcludedRoutes []ExcludedRoute
}

RouteDecision

RouteDecision is the result of ResolveRoute.

type RouteDecision struct {
    // RequestedPolicy is the caller-supplied policy, when any.
    RequestedPolicy string
    // SnapshotCapturedAt records when the model snapshot used for scoring
    // was assembled.
    SnapshotCapturedAt time.Time
    // PowerPolicy records the effective policy inputs used for this
    // resolution. It stays separate from the chosen model so operator
    // surfaces can explain policy without re-deriving it.
    PowerPolicy RoutePowerPolicy
    // Harness is the selected harness name.
    Harness string
    // Provider is the selected provider for native agent routes.
    Provider string
    // Endpoint is the selected named endpoint when the provider exposes more
    // than one endpoint.
    Endpoint string
    // ServerInstance is the normalized server identity used for sticky
    // affinity and route evidence.
    ServerInstance string
    // Model is the selected concrete model.
    Model string
    // Reason summarizes why the selected candidate won.
    Reason string
    // Sticky captures whether this decision reused an existing sticky lease
    // or created a new one.
    Sticky RouteStickyState
    // Utilization captures the endpoint sample that informed the selected
    // candidate, when known.
    Utilization RouteUtilizationState
    // Power is the catalog-projected power of the selected Model
    // (per CONTRACT-003 § Catalog Power Projection). 0 means
    // unknown/exact-pin-only/no catalog entry. DDx callers read this
    // to compute next-attempt MinPower without importing catalog code.
    Power int
    // Candidates is the full ranked decision trace, including rejected
    // candidates and their rejection reasons.
    Candidates []RouteCandidate
}

Core functions

New

New constructs a FizeauService.

func New(opts ServiceOptions) (FizeauService, error)

RegisterConfigLoader

RegisterConfigLoader is called by the config package’s init() to install the.

func RegisterConfigLoader(fn func(dir string) (ServiceConfig, error))

Full exported surface

Generated from go/doc over the root package. For full doc comments, parameter types, and field-level documentation, follow the pkg.go.dev link.

NameKindSynopsis
AccountStatustype (struct)AccountStatus describes authentication/account state without exposing
AnchorStoretype (alias)
AvailableHarnessesfunc (func AvailableHarnesses() []string)AvailableHarnesses returns the canonical names of every harness whose CLI
BashOutputFilterConfigtype (alias)
BillingModeltype (alias)
BillingModelFixedconst
BillingModelPerTokenconst
BillingModelSubscriptionconst
BillingModelUnknownconst
CachePolicyDefaultconstValid CachePolicy values
CachePolicyOffconstValid CachePolicy values
CatalogProbeFunctype (func)CatalogProbeFunc performs a single /v1/models discovery request against a
CatalogResulttype (struct)CatalogResult is what callers receive from Get
CompactionConfigtype (alias)
ContextSourceCatalogconst
ContextSourceDefaultconst
ContextSourceProviderAPIconst
ContextSourceProviderConfigconst
ContextSourceUnknownconst
CooldownStatetype (struct)CooldownState describes an active routing cooldown for a provider
CorrelationIDNormalizationErrortype (struct)CorrelationIDNormalizationError is returned pre-dispatch when
CostInfotype (struct)CostInfo holds per-token cost metadata for a model
DecisionWithCandidatestype (interface)DecisionWithCandidates is implemented by routing errors that retain the
DecodeServiceEventfunc (func DecodeServiceEvent(ev ServiceEvent) (ServiceDecodedEvent, error))
DiscoverModelsfunc (func DiscoverModels(ctx context.Context, baseURL, apiKey string) ([]string, error))
DrainExecutefunc (func DrainExecute(ctx context.Context, events <-chan ServiceEvent) (*DrainExecuteResult, error))
DrainExecuteResulttype (struct)DrainExecuteResult is a typed aggregate of one Execute event stream
EndpointStatustype (struct)EndpointStatus describes one configured provider endpoint probe
ErrDiscoveryUnsupportedfunc (func ErrDiscoveryUnsupported() error)ErrDiscoveryUnsupported returns the sentinel
ErrHarnessModelIncompatibletype (struct)ErrHarnessModelIncompatible reports an explicit Harness+Model pin that the
ErrModelConstraintAmbiguoustype (struct)ErrModelConstraintAmbiguous reports that an explicit Model pin matched more
ErrModelConstraintNoMatchtype (struct)ErrModelConstraintNoMatch reports that an explicit Model pin matched no
ErrNoLiveProvidertype (struct)ErrNoLiveProvider reports that profile-tier escalation walked the entire
ErrPolicyRequirementUnsatisfiedtype (struct)ErrPolicyRequirementUnsatisfied reports a hard policy requirement that no
ErrRejectedOverridetype (struct)ErrRejectedOverride wraps a pin-rejection error and carries the
ErrUnknownPolicytype (struct)ErrUnknownPolicy reports an explicit policy name that is not present in the
ErrUnknownProvidertype (struct)ErrUnknownProvider reports an explicit Provider pin that is not present in
ErrUnsatisfiablePintype (struct)ErrUnsatisfiablePin reports explicit caller pins that cannot all be true at
EventSessionEndconst
EventSessionStartconst
ExcludedRoutetype (struct)ExcludedRoute identifies a (Provider, Model, optional Endpoint) combination
FilterReasonContextTooSmallconstFilterReason* enumerate the canonical disqualification reasons surfaced
FilterReasonEndpointUnreachableconstFilterReason* enumerate the canonical disqualification reasons surfaced
FilterReasonMeteredOptInRequiredconstFilterReason* enumerate the canonical disqualification reasons surfaced
FilterReasonNoToolSupportconstFilterReason* enumerate the canonical disqualification reasons surfaced
FilterReasonProviderExcludedFromDefaultconstFilterReason* enumerate the canonical disqualification reasons surfaced
FilterReasonReasoningUnsupportedconstFilterReason* enumerate the canonical disqualification reasons surfaced
FilterReasonScoredBelowTopconstFilterReason* enumerate the canonical disqualification reasons surfaced
FilterReasonUnhealthyconstFilterReason* enumerate the canonical disqualification reasons surfaced
FizeauServicetype (interface)FizeauService is the entire public Go surface of the fizeau module
HarnessAvailabilitytype (struct)HarnessAvailability reports the install status of a single harness CLI as
HarnessCapabilitytype (struct)HarnessCapability describes one capability row for one harness
HarnessCapabilityMatrixtype (struct)HarnessCapabilityMatrix is the public, per-harness capability table exposed
HarnessCapabilityStatustypeHarnessCapabilityStatus classifies one harness capability in the public
HarnessInfotype (struct)HarnessInfo describes a registered harness as defined in CONTRACT-003
HealthTargettype (struct)HealthTarget identifies what to health-check
MetadataKeyCorrelationIDconstReserved cross-tool metadata keys (CONTRACT-003 § ExecuteRequest
MetadataKeyRoleconstReserved cross-tool metadata keys (CONTRACT-003 § ExecuteRequest
MetadataWarningCodeKeyCollisionconstMetadataWarningCodeKeyCollision is the ServiceFinalWarning
ModelFiltertype (struct)ModelFilter filters ListModels results
ModelInfotype (struct)ModelInfo describes a model with full metadata per CONTRACT-003
Newfunc (func New(opts ServiceOptions) (FizeauService, error))New constructs a FizeauService
NoViableProviderForNowtype (struct)NoViableProviderForNow reports that every otherwise-eligible routing
NormalizeModelIDfunc (func NormalizeModelID(requested string, catalog []string) (string, error))
OverrideClassBuckettype (struct)OverrideClassBucket is one cell in the override-class pivot
PerfSignaltype (struct)PerfSignal holds observed performance data for a model
PolicyInfotype (struct)
ProviderAlivenessProbertype (func)ProviderAlivenessProber reports whether a provider endpoint is reachable
ProviderBurnRateTrackertype (struct)ProviderBurnRateTracker maintains a per-provider rolling window of token
ProviderInfotype (struct)ProviderInfo describes a provider with live status per CONTRACT-003
ProviderQuotaStatetypeProviderQuotaState is the state of one provider in the quota state machine
ProviderQuotaStateStoretype (struct)ProviderQuotaStateStore is the per-provider quota state machine
QuotaRecoveryProbertype (func)QuotaRecoveryProber reports whether a quota_exhausted provider has recovered
QuotaStatetype (struct)QuotaState is a live quota snapshot for a harness
RankModelsfunc (func RankModels(candidates []string, knownModels map[string]string, pattern string) ([]ScoredModel, error))
ReadSessionEventsfunc (func ReadSessionEvents(path string) ([]SessionEvent, error))
ReadTooltype (alias)
Reasoningtype (alias)
ReasoningAutoconst
ReasoningHighconst
ReasoningLowconst
ReasoningMaxconst
ReasoningMediumconst
ReasoningMinimalconst
ReasoningOffconst
ReasoningXHighconst
RegisterConfigLoaderfunc (func RegisterConfigLoader(fn func(dir string) (ServiceConfig, error)))RegisterConfigLoader is called by the config package’s init() to install the
RoleNormalizationErrortype (struct)RoleNormalizationError is returned pre-dispatch when ServiceExecuteRequest
RouteAttempttype (struct)RouteAttempt is caller feedback about one attempted route candidate
RouteCandidatetype (struct)RouteCandidate is one routing candidate evaluated by ResolveRoute
RouteCandidateComponentstype (struct)RouteCandidateComponents breaks down the inputs that fed a candidate’s
RouteCandidateStatustype (struct)RouteCandidateStatus describes a single live provider/model candidate
RouteDecisiontype (struct)RouteDecision is the result of ResolveRoute
RoutePowerPolicytype (struct)RoutePowerPolicy captures the numeric power-policy inputs associated with
RouteRequesttype (struct)RouteRequest specifies a routing query
RouteStatusEntrytype (struct)RouteStatusEntry describes the live provider candidates serving one model
RouteStatusReporttype (struct)RouteStatusReport is returned by RouteStatus
RouteStatusRoutingQualityWindowconstRouteStatusRoutingQualityWindow caps how many recent Execute calls
RouteStickyStatetype (struct)RouteStickyState describes sticky routing evidence without exposing the
RouteUtilizationStatetype (struct)RouteUtilizationState summarizes the live utilization sample associated
RoutingQualityMetricstype (struct)RoutingQualityMetrics is the bundle of three first-class metrics ADR-006
ScanSkillsDirfunc (func ScanSkillsDir(dir string) (*SkillCatalog, []string, error))ScanSkillsDir walks dir for SKILL
ScoredModeltype (alias)
ServiceCompactionDatatype (struct)
ServiceConfigtype (interface)ServiceConfig provides provider and routing data to the service without
ServiceConfigSourcetype (interface)ServiceConfigSource is the minimal interface providerCooldownsFromSnapshotErrors
ServiceDecodedEventtype (struct)ServiceDecodedEvent is a typed view of one ServiceEvent
ServiceEventtype (alias)ServiceEvent is a contract-level event (mirrors harnesses
ServiceEventTypeCompactionconst
ServiceEventTypeFinalconst
ServiceEventTypeOverrideconst
ServiceEventTypeProgressconst
ServiceEventTypeRejectedOverrideconst
ServiceEventTypeRoutingDecisionconst
ServiceEventTypeStallconst
ServiceEventTypeTextDeltaconst
ServiceEventTypeToolCallconst
ServiceEventTypeToolResultconst
ServiceExecuteRequesttype (struct)ServiceExecuteRequest is the public ExecuteRequest type per CONTRACT-003
ServiceFinalDatatype (struct)
ServiceFinalUsagetype (struct)ServiceFinalUsage is the public token-usage payload emitted on service
ServiceFinalWarningtype (struct)
ServiceOptionstype (struct)ServiceOptions configures a FizeauService instance
ServiceOverrideAutoComponentstype (struct)ServiceOverrideAutoComponents mirrors RouteCandidateComponents for the
ServiceOverrideDatatype (struct)ServiceOverrideData is the payload for both override and rejected_override
ServiceOverrideOutcometype (struct)ServiceOverrideOutcome carries post-execution status mirrored from the
ServiceOverridePintype (struct)ServiceOverridePin captures a (harness, provider, model) tuple, used both
ServiceOverridePromptFeaturestype (struct)ServiceOverridePromptFeatures captures prompt-classification inputs that
ServiceProgressDatatype (struct)ServiceProgressData is the bounded progress payload emitted alongside the
ServiceProviderEndpointtype (struct)ServiceProviderEndpoint is one configured provider serving endpoint
ServiceProviderEntrytype (struct)ServiceProviderEntry carries the minimal provider data the service needs
ServiceRoutingActualtype (struct)
ServiceRoutingDecisionCandidatetype (struct)ServiceRoutingDecisionCandidate is one entry in the routing-decision
ServiceRoutingDecisionComponentstype (struct)ServiceRoutingDecisionComponents exposes the per-axis score inputs
ServiceRoutingDecisionDatatype (struct)
ServiceRoutingStickyStatetype (struct)
ServiceRoutingUtilizationStatetype (struct)
ServiceStallDatatype (struct)
ServiceTextDeltaDatatype (struct)
ServiceToolCallDatatype (struct)
ServiceToolResultDatatype (struct)
ServiceUsageSourceEvidencetype (struct)
ServiceUsageTokenCountstype (struct)
SessionEndDatatype (alias)
SessionEventtype (alias)
SessionEventTypetype (alias)
SessionLogEntrytype (struct)SessionLogEntry describes one historical session log file projected from the
SessionLoggertype (alias)SessionLogger writes session log events
SessionStartDatatype (alias)
SessionStatustype (alias)
SkillCatalogtype (alias)
StallPolicytype (struct)StallPolicy bounds how long the agent will spin without making progress
StatusErrortype (struct)StatusError describes the most recent normalized status error for a harness,
StatusSuccessconst
SubscriptionCostCurvetype (struct)SubscriptionCostCurve tunes effective subscription cost by quota utilization
TokenUsagetype (alias)
Tooltype (alias)
UsageReporttype (struct)UsageReport is the public, service-owned aggregation over historical session
UsageReportOptionstype (struct)UsageReportOptions configures FizeauService
UsageReportRowtype (struct)UsageReportRow aggregates usage for one provider/model pair
UsageReportWindowtype (struct)UsageReportWindow describes the active reporting window
UsageWindowtype (struct)UsageWindow describes normalized usage attribution over a time window
ValidateCachePolicyfunc (func ValidateCachePolicy(v string) error)ValidateCachePolicy returns nil when v is one of the accepted CachePolicy
ValidateCorrelationIDfunc (func ValidateCorrelationID(id string) error)ValidateCorrelationID returns nil when id is empty or normalized, and a
ValidatePowerBoundsfunc (func ValidatePowerBounds(minPower, maxPower int) error)ValidatePowerBounds returns nil when the optional numeric routing power
ValidateRolefunc (func ValidateRole(role string) error)ValidateRole returns nil when role is empty (unset) or already
ValidateUsageSincefunc (func ValidateUsageSince(spec string) error)ValidateUsageSince returns nil when spec is a usage window value accepted by
alivenessEndpointtype (struct)alivenessEndpoint describes one provider endpoint to probe
alivenessLoopSleepfunc (func alivenessLoopSleep(ctx context.Context, d time.Duration) bool)
anyProviderSupportsToolsfunc (func anyProviderSupportsTools(providers []routing.ProviderEntry) bool)
appendUniqueModelIDsfunc (func appendUniqueModelIDs(values []string, additions …string) []string)
applyRouteSnapshotEvidencefunc (func applyRouteSnapshotEvidence(candidate *RouteCandidate, row modelsnapshot.KnownModel))
applyRouteSnapshotEvidenceToStatusfunc (func applyRouteSnapshotEvidenceToStatus(candidate *RouteCandidateStatus, row modelsnapshot.KnownModel))
assembleModelSnapshotFromServiceConfigfunc (func assembleModelSnapshotFromServiceConfig(ctx context.Context, sc ServiceConfig, cat *modelcatalog.Catalog, cacheRoot string) (modelsnapshot.ModelSnapshot, error))
assembleModelSnapshotFromServiceConfigWithOptionsfunc (func assembleModelSnapshotFromServiceConfigWithOptions(ctx context.Context, sc ServiceConfig, cat *modelcatalog.Catalog, cacheRoot string, opts modelsnapshot.AssembleOptions) (modelsnapshot.ModelSnapshot, error))
axesOverriddenfunc (func axesOverridden(req ServiceExecuteRequest) []string)axesOverridden returns the canonical, ordered list of axes the caller
boundedProgressTextfunc (func boundedProgressText(s string, maxRunes int) string)
buildProviderContextWindowsfunc (func buildProviderContextWindows(ctx context.Context, pcfg ServiceProviderEntry, cat *modelcatalog.Catalog, discoveredIDs []string) (map[string]int, map[string]string))buildProviderContextWindows assembles the ContextWindows map for a
candidateProviderIdentityfunc (func candidateProviderIdentity(h routing.HarnessEntry, p routing.ProviderEntry) string)
canonicalHarnessPinfunc (func canonicalHarnessPin(harness string) string)
capabilityScoreForCostClassfunc (func capabilityScoreForCostClass(class string) float64)capabilityScoreForCostClass maps the harness cost class to a coarse
catalogCachetype (struct)catalogCache is the service-scope live-catalog cache with stale-while-
catalogCacheKeytype (struct)catalogCacheKey identifies the cache entry
catalogCacheOptionstype (struct)catalogCacheOptions controls timings + test hooks
catalogCostAndPerffunc (func catalogCostAndPerf(cat *modelcatalog.Catalog, modelID string) (CostInfo, PerfSignal))catalogCostAndPerf extracts CostInfo and PerfSignal for a model from the catalog
catalogCostUSDPer1kTokensfunc (func catalogCostUSDPer1kTokens(cat *modelcatalog.Catalog, modelID string) (float64, bool))
catalogEntrytype (struct)catalogEntry is the per-key cached state
catalogPowerEligibilityfunc (func catalogPowerEligibility(cat *modelcatalog.Catalog, modelID string) (int, bool, bool))
catalogPowerForModelfunc (func catalogPowerForModel(cat *modelcatalog.Catalog, modelID string) int)catalogPowerForModel returns the catalog-projected power for a model
claudeCLIExecutableModelfunc (func claudeCLIExecutableModel(model string) string)
cloneStringMapfunc (func cloneStringMap(src map[string]string) map[string]string)
collectConcreteModelCandidatesfunc (func collectConcreteModelCandidates(reqHarness, reqProvider, reqModel string, in routing.Inputs, cat *modelcatalog.Catalog) []string)
collectDefaultModelCandidatesfunc (func collectDefaultModelCandidates(reqHarness, reqProvider string, in routing.Inputs) []string)
compactProgressIdentityfunc (func compactProgressIdentity(taskID string, round int) string)
compactProgressTaskIDfunc (func compactProgressTaskID(taskID string) string)
compactionAssertionHookFntype (func)
contextWindowSourceForProviderConfigfunc (func contextWindowSourceForProviderConfig(pcfg ServiceProviderEntry) string)
convertUsageWindowfunc (func convertUsageWindow(w *UsageReportWindow) *session.UsageWindow)
correlationIDMaxLenconstCorrelationID normalization bounds (CONTRACT-003)
cryptoRandInt63nfunc (func cryptoRandInt63n(n int64) int64)cryptoRandInt63n uses crypto/rand for the jitter randomization
decodeServicePayloadfunc (func decodeServicePayload(ev ServiceEvent, dst any) error)
defaultCatalogAsyncRefreshTimeoutconstDefault cache timings
defaultCatalogFreshTTLconstDefault cache timings
defaultCatalogProbeTimeoutconst
defaultCatalogReloadTimeoutconst
defaultCatalogStaleTTLconstDefault cache timings
defaultCatalogUnreachableCooldownconstDefault cache timings
defaultCatalogUnreachableJitterconstDefault cache timings
defaultHarnessInstancesfunc (func defaultHarnessInstances() map[string]harnesses.Harness)defaultHarnessInstances returns the production map of registered
defaultHealthProbeIntervalconst
defaultHealthSignalTTLconst
defaultQuotaRecoveryFallbackIntervalconst
defaultQuotaRefreshDebounceconst
defaultQuotaRefreshProbeTimeoutconst
defaultQuotaRefreshStartupWaitconst
defaultRouteHealthPathfunc (func defaultRouteHealthPath(sc ServiceConfig) string)
defaultStaleHarnessReaperGraceconst
derefHarnessIntfunc (func derefHarnessInt(v *int) int)
discoveryUnsupportedErrortype (struct)
earliestQuotaResetAfterfunc (func earliestQuotaResetAfter(windows []harnesses.QuotaWindow, now time.Time) time.Time)
effectiveReasoningStringfunc (func effectiveReasoningString(value Reasoning) string)
emitFatalFinalfunc (func emitFatalFinal(out chan<- ServiceEvent, meta map[string]string, status, errMsg string))emitFatalFinal is used when Execute itself can’t construct a route
emitFinalfunc (func emitFinal(out chan<- ServiceEvent, seq *atomic.Int64, meta map[string]string, final harnesses.FinalData))emitFinal wraps a FinalData into a ServiceEvent and writes it to out
emitJSONfunc (func emitJSON(out chan<- ServiceEvent, seq *atomic.Int64, t harnesses.EventType, meta map[string]string, payload any))emitJSON marshals payload and writes a typed event to out
emitJSONRawfunc (func emitJSONRaw(out chan<- ServiceEvent, seq *atomic.Int64, t harnesses.EventType, meta map[string]string, payload any))emitJSONRaw is the typed-payload variant used inside the loop callback
emitProgressfunc (func emitProgress(out chan<- ServiceEvent, seq *atomic.Int64, sl *serviceSessionLog, sessionID string, meta map[string]string, payload ServiceProgressData))
endpointDisplayNamefunc (func endpointDisplayName(name, baseURL string) string)
endpointProviderReffunc (func endpointProviderRef(providerName, endpointName string) string)
endpointStatusfunc (func endpointStatus(status string) string)
errDialishNetworkErrorvarerrDialishNetworkError is a sentinel for errors
errDiscoveryUnsupportedvarerrDiscoveryUnsupported is the sentinel for “endpoint exists but /v1/models
errHarnessModelIncompatiblevar
errModelConstraintAmbiguousvar
errModelConstraintNoMatchvar
errNoLiveProvidervar
errNoViableProviderForNowvar
errPolicyRequirementUnsatisfiedvar
errUnknownPolicyvar
errUnknownProvidervar
errUnsatisfiablePinvar
escalatePolicyLadderfunc (func escalatePolicyLadder(req routing.Request, in routing.Inputs, origErr error, displayPolicy string) (bool, *routing.Decision, error))escalatePolicyLadder walks routing
executeEventFanouttype (interface)
executeRouteResolvertype (interface)
executeRunContexttype (struct)
executeRunnerInvokertype (interface)
executeRunnerRequestfunc (func executeRunnerRequest(req ServiceExecuteRequest, decision RouteDecision, meta map[string]string, start time.Time) serviceimpl.ExecuteRunnerRequest)
executeSessionLogOpenertype (interface)
explicitPolicyConstraintfunc (func explicitPolicyConstraint(policy string) (string, bool))
explicitQuotaUnavailablefunc (func explicitQuotaUnavailable(name string, windows []harnesses.QuotaWindow, now time.Time) error)
extractHostPortfunc (func extractHostPort(baseURL string) string)extractHostPort extracts host:port from a base URL, adding the scheme’s
extractStatusCodefunc (func extractStatusCode(msg string) int)extractStatusCode pulls the status code out of the “HTTP NNN:” prefix
fillProgressIdentityfunc (func fillProgressIdentity(payload *ServiceProgressData, sessionID string, meta map[string]string))
finalUsageToCoreTokensfunc (func finalUsageToCoreTokens(usage *harnesses.FinalUsage) agentcore.TokenUsage)finalUsageToCoreTokens converts the public FinalUsage pointer form into
finalizeAndEmitfunc (func finalizeAndEmit(out chan<- ServiceEvent, seq *atomic.Int64, meta map[string]string, req ServiceExecuteRequest, sl *serviceSessionLog, final harnesses.FinalData))finalizeAndEmit stamps the service-owned session-log path onto final,
formatByteCountfunc (func formatByteCount(n int) string)
generateSessionIDfunc (func generateSessionID() string)generateSessionID returns a unique session identifier for a new Execute
harnessInstanceHookvarharnessInstanceHook, when non-nil, is applied to the default harness map
harnessRunsInProcessOrHTTPfunc (func harnessRunsInProcessOrHTTP(cfg harnesses.HarnessConfig) bool)
harnessSourcefunc (func harnessSource(req ServiceExecuteRequest) string)
harnessStatusToCoreStatusfunc (func harnessStatusToCoreStatus(status string) agentcore.Status)harnessStatusToCoreStatus maps a public harnesses
harnessTypefunc (func harnessType(cfg harnesses.HarnessConfig) string)harnessType returns “native” for HTTP/embedded harnesses, “subprocess” for CLI-invoked ones
hashHeadersfunc (func hashHeaders(headers map[string]string) [sha256.Size]byte)hashHeaders fingerprints a headers map in a deterministic way so ordering
healthCheckQuotaProbeMuvar
hexDigitfunc (func hexDigit(b byte) byte)
isDiscoveryUnsupportedfunc (func isDiscoveryUnsupported(err error) bool)
isDispatchabilityFailurefunc (func isDispatchabilityFailure(errMsg string) bool)
isExplicitPinErrorfunc (func isExplicitPinError(err error) bool)
isNetworkFailurefunc (func isNetworkFailure(err error) bool)isNetworkFailure returns true when err looks like a transport-level
isReachabilityErrfunc (func isReachabilityErr(err error) bool)isReachabilityErr reports whether err carries the openai
isSensitiveSummaryKeyfunc (func isSensitiveSummaryKey(key string) bool)
isServerErrorfunc (func isServerError(msg string) bool)isServerError returns true when the error message indicates a 5xx
isSnapshotDialFailurefunc (func isSnapshotDialFailure(errMsg string) bool)isSnapshotDialFailure preserved as a back-compat alias for the v0
lastDecisionEntrytype (struct)
loadRoutingCatalogvar
loadServiceConfigvarloadServiceConfig, when non-nil, is called by New to load a ServiceConfig
makeOverrideEventfunc (func makeOverrideEvent(ovr *overrideContext, sessionID string, finalEv ServiceEvent, meta map[string]string) (ServiceEvent, ServiceOverrideData, bool))makeOverrideEvent constructs the wire-level override event, stamping
makeRejectedOverrideEventfunc (func makeRejectedOverrideEvent(ovr *overrideContext, sessionID string, pinErr error, meta map[string]string) (ServiceEvent, ServiceOverrideData, bool))makeRejectedOverrideEvent constructs a rejected_override event from the
maxQuotaWindowUsedPercentfunc (func maxQuotaWindowUsedPercent(windows []harnesses.QuotaWindow) float64)
metaWithRoleAndCorrelationfunc (func metaWithRoleAndCorrelation(meta map[string]string, role, correlationID string) map[string]string)metaWithRoleAndCorrelation overlays the caller-supplied top-level Role
metadataKeyCollisionMessagefunc (func metadataKeyCollisionMessage(keys []string) string)metadataKeyCollisionMessage formats a human-readable message for the
metadataReservedKeyCollisionsfunc (func metadataReservedKeyCollisions(meta map[string]string, role, correlationID string) []string)metadataReservedKeyCollisions returns the reserved metadata keys whose
modelDiscoveryEndpointtype (struct)
modelSnapshotProviderConfigfunc (func modelSnapshotProviderConfig(entry ServiceProviderEntry) modelsnapshot.ProviderConfig)
modelSupportedForHarnessfunc (func modelSupportedForHarness(name string, cfg harnesses.HarnessConfig, model, provider string) bool)
modelSupportsToolsByIDfunc (func modelSupportsToolsByID(cat *modelcatalog.Catalog, modelIDs []string) map[string]bool)
nativeCompactionPayloadtype (alias)
nativeDecisionfunc (func nativeDecision(decision RouteDecision) serviceimpl.NativeDecision)
nativeLLMRequestPayloadtype (alias)
nativeLLMResponsePayloadtype (alias)
nativeModelReasoningWireMapfunc (func nativeModelReasoningWireMap() map[string]string)nativeModelReasoningWireMap returns the catalog reasoning_wire map for use
nativeProgressStatetype (struct)
nativeProviderResolutiontype (struct)
nativeRouteCandidatesfunc (func nativeRouteCandidates(in []RouteCandidate) []serviceimpl.NativeRouteCandidate)
nativeToolCallPayloadtype (alias)
nativeToolsForRequestfunc (func nativeToolsForRequest(req ServiceExecuteRequest) []agentcore.Tool)
newServiceCompactorfunc (func newServiceCompactor(req ServiceExecuteRequest, model string) agentcore.Compactor)
newSessionHubfunc (func newSessionHub() *serviceimpl.SessionHub)
nextQuotaRecoveryBackofffunc (func nextQuotaRecoveryBackoff(prev time.Duration) time.Duration)nextQuotaRecoveryBackoff returns the next bounded backoff value: doubles the
normalizeServiceProviderTypefunc (func normalizeServiceProviderType(t string) string)
normalizeShellCommandfunc (func normalizeShellCommand(command string) string)
overrideAxisHarnessconstoverrideAxis* enumerates the three independently-tracked override axes
overrideAxisModelconstoverrideAxis* enumerates the three independently-tracked override axes
overrideAxisProviderconstoverrideAxis* enumerates the three independently-tracked override axes
overrideContexttype (struct)overrideContext carries the per-Execute override-event payload from the
overrideReasonHintfunc (func overrideReasonHint(req ServiceExecuteRequest) string)overrideReasonHint returns the caller-supplied free-form reason from
policyForNamefunc (func policyForName(cat *modelcatalog.Catalog, name string) (modelcatalog.Policy, string, bool))
positiveScorePartfunc (func positiveScorePart(v float64) float64)
primaryQuotaRefreshvar
probeOpenAIModelsfunc (func probeOpenAIModels(ctx context.Context, baseURL, apiKey string) ([]string, error))probeOpenAIModels calls GET /v1/models against baseURL and classifies
probeServiceProviderfunc (func probeServiceProvider(ctx context.Context, entry ServiceProviderEntry) (status string, modelCount int, caps []string))probeServiceProvider pings a provider and returns (status, modelCount, capabilities)
processGroupAlivefunc (func processGroupAlive(pgid int) bool)
processOutcomeForFinalfunc (func processOutcomeForFinal(status string) string)processOutcomeForFinal returns the FEAT-005 §27 process_outcome label for
progressExceptionalLineLimitconst
progressLineLimitconst
progressMessageLimitfunc (func progressMessageLimit(payload ServiceProgressData) int)
progressStatusLinefunc (func progressStatusLine(payload ServiceProgressData) string)
progressTaskIDfunc (func progressTaskID(sessionID string, meta map[string]string) string)
progressTokenThroughputfunc (func progressTokenThroughput(outputTokens int, durationMS int64) *float64)
promptAssertionHookFntype (func)promptAssertionHookFn / compactionAssertionHookFn / toolWiringHookFn
providerCapabilitiesfunc (func providerCapabilities(entry ServiceProviderEntry) []string)providerCapabilities returns the capability set for a provider entry
providerCooldownsFromSnapshotErrorsfunc (func providerCooldownsFromSnapshotErrors(snapshot modelsnapshot.ModelSnapshot, cfg ServiceConfigSource, now time.Time, ttl time.Duration) map[string]time.Time)providerCooldownsFromSnapshotErrors walks snapshot
providerPreferenceForPolicyfunc (func providerPreferenceForPolicy(cat *modelcatalog.Catalog, policy string) (string, error))
providerPreferenceForPolicyNamefunc (func providerPreferenceForPolicyName(name string) string)
providerProbePriorityfunc (func providerProbePriority(status string) int)
providerProbeResulttype (struct)
providerRoutingCostClassfunc (func providerRoutingCostClass(providerType string) string)
providerSupportsToolsfunc (func providerSupportsTools(cat *modelcatalog.Catalog, defaultModel string, discoveredIDs []string) bool)providerSupportsTools returns whether the provider should be advertised as
providerTypeUsesFixedBillingfunc (func providerTypeUsesFixedBilling(providerType string) bool)
providerUsesLiveDiscoveryfunc (func providerUsesLiveDiscovery(providerType string) bool)
publicFilterReasonfunc (func publicFilterReason(c routing.Candidate) string)publicFilterReason maps the typed FilterReason emitted by the internal
publicRoutingErrorfunc (func publicRoutingError(err error, candidates []RouteCandidate, requestedPolicy …string) error)
publicToRoutingExcludedRoutesfunc (func publicToRoutingExcludedRoutes(in []ExcludedRoute) []routing.ExcludedRoute)
quotaCacheStatustype (struct)
quotaRecoveryBackoffInitialconst
quotaRecoveryBackoffMaxconst
quotaRecoverySleepfunc (func quotaRecoverySleep(ctx context.Context, d time.Duration) bool)quotaRecoverySleep blocks for d or until ctx is cancelled
quotaRefreshCoordinatortype (struct)
quotaRefreshModetype
quotaRefreshPolicytype (struct)
quotaStatusfunc (func quotaStatus(fresh bool, windows []harnesses.QuotaWindow) string)
quotaTrendfunc (func quotaTrend(percentUsed int, fresh bool) string)
reapStaleHarnessRecordsfunc (func reapStaleHarnessRecords(dir string, grace time.Duration, now time.Time) error)
recordRouteTimeProbeFailuresfunc (func recordRouteTimeProbeFailures(store *routehealth.ProbeStore, endpoints []alivenessEndpoint, probeAt time.Time))
requestPrimaryQuotaRefreshfunc (func requestPrimaryQuotaRefresh(ctx context.Context, harnessName string, policy quotaRefreshPolicy, harnessByName func(string) harnesses.Harness) <-chan struct{})
requestedNativeProviderTypefunc (func requestedNativeProviderType(req ServiceExecuteRequest) string)
resolveCatalogCostModelfunc (func resolveCatalogCostModel(cat *modelcatalog.Catalog, ref string) string)
resolveContextEvidencefunc (func resolveContextEvidence(ctx context.Context, entry ServiceProviderEntry, modelID string, cat *modelcatalog.Catalog) (int, string))resolveContextEvidence resolves the context window for a model using the
resolveSingleModelMatchfunc (func resolveSingleModelMatch(reqModel string, candidates []string) (string, error))
resolveSubprocessModelAliasfunc (func resolveSubprocessModelAlias(harness, model string) string)
roleMaxLenconstRole normalization bounds (CONTRACT-003)
routeDecisionErrortype (struct)
routePowerBoundsForRequestfunc (func routePowerBoundsForRequest(req RouteRequest, policy RoutePowerPolicy) (int, int))
routeSnapshotCandidateIndexfunc (func routeSnapshotCandidateIndex(snapshot modelsnapshot.ModelSnapshot) map[routeSnapshotCandidateKey]modelsnapshot.KnownModel)
routeSnapshotCandidateKeytype (struct)
routeSnapshotEvidenceForCandidatefunc (func routeSnapshotEvidenceForCandidate(candidate RouteCandidate, snapshot modelsnapshot.ModelSnapshot) (modelsnapshot.KnownModel, bool))
routeStatusMetricKeyfunc (func routeStatusMetricKey(provider, endpoint, model string) string)
routeStatusMetricValuefunc (func routeStatusMetricValue(values map[string]float64, provider, endpoint, model string) float64)
routeTimeProbeTimeoutconst
routingHarnessEntryFromMetadatafunc (func routingHarnessEntryFromMetadata(name string, cfg harnesses.HarnessConfig, st harnesses.HarnessStatus) routing.HarnessEntry)
routingHarnessUsesAccountBillingfunc (func routingHarnessUsesAccountBilling(entry *routing.HarnessEntry) bool)
routingPolicyForNamefunc (func routingPolicyForName(cat *modelcatalog.Catalog, name string) string)
runAlivenessProbeLoopfunc (func runAlivenessProbeLoop( ctx context.Context, endpoints []alivenessEndpoint, store *routehealth.ProbeStore, prober ProviderAlivenessProber, interval time.Duration, now func() time.Time, sleep func(ctx context.Context, d time.Duration) bool, persistPath string, ))runAlivenessProbeLoop periodically re-probes each endpoint whose last probe
runQuotaRecoveryProbeLoopfunc (func runQuotaRecoveryProbeLoop( ctx context.Context, store *ProviderQuotaStateStore, probe QuotaRecoveryProber, fallback time.Duration, now func() time.Time, sleep func(ctx context.Context, d time.Duration) bool, ))runQuotaRecoveryProbeLoop periodically probes providers that the store
runQuotaRecoveryProbePassfunc (func runQuotaRecoveryProbePass( ctx context.Context, store *ProviderQuotaStateStore, probe QuotaRecoveryProber, fallback time.Duration, now func() time.Time, backoffs map[string]time.Duration, ) time.Duration)runQuotaRecoveryProbePass executes a single sweep over the quota_exhausted
runRouteTimeAlivenessProbesfunc (func runRouteTimeAlivenessProbes( ctx context.Context, endpoints []alivenessEndpoint, store *routehealth.ProbeStore, prober ProviderAlivenessProber, perProbeTimeout time.Duration, ))
runStartupAlivenessProbesfunc (func runStartupAlivenessProbes( ctx context.Context, endpoints []alivenessEndpoint, store *routehealth.ProbeStore, prober ProviderAlivenessProber, totalTimeout time.Duration, ))runStartupAlivenessProbes probes each endpoint sequentially within totalTimeout
scorePowerHintFitfunc (func scorePowerHintFit(power int, policy RoutePowerPolicy) float64)
seamOptionstype (struct)seamOptions is empty in production builds
servicetype (struct)service is the concrete FizeauService implementation
serviceConfigToModelSnapshotConfigfunc (func serviceConfigToModelSnapshotConfig(sc ServiceConfig) *modelsnapshot.Config)
serviceExecuteWiredfunc (func serviceExecuteWired(name string, cfg harnesses.HarnessConfig) bool)
serviceImplProviderEntryfunc (func serviceImplProviderEntry(entry ServiceProviderEntry) serviceimpl.ProviderEntry)
serviceIsUnreachablefunc (func serviceIsUnreachable(msg string) bool)
serviceProviderDefaultInclusionfunc (func serviceProviderDefaultInclusion(entry ServiceProviderEntry) bool)
serviceRoutingCatalogfunc (func serviceRoutingCatalog() *modelcatalog.Catalog)
serviceRoutingCatalogCandidatesResolverfunc (func serviceRoutingCatalogCandidatesResolver(cat *modelcatalog.Catalog) func(ref, surface string) ([]string, bool))
serviceRoutingCatalogResolverfunc (func serviceRoutingCatalogResolver(cat *modelcatalog.Catalog) func(ref, surface string) (string, bool))
serviceRoutingCatalogSurfacefunc (func serviceRoutingCatalogSurface(surface string) (modelcatalog.Surface, bool))
serviceRoutingModelEligibilityfunc (func serviceRoutingModelEligibility(entries []routing.HarnessEntry, cat *modelcatalog.Catalog) func(model string) (routing.ModelEligibility, bool))
serviceRoutingReasoningResolverfunc (func serviceRoutingReasoningResolver(cat *modelcatalog.Catalog) func(policy, surface string) (string, bool))serviceRoutingReasoningResolver returns the catalog’s surface_policy
serviceSessionLogtype (struct)serviceSessionLog is the root-facade adapter over the internal session-log
serviceSnapshotCacheRootfunc (func serviceSnapshotCacheRoot() (string, error))
serviceTrimErrorfunc (func serviceTrimError(msg string) string)
sessionLogPathfunc (func sessionLogPath(sl *serviceSessionLog) string)
shortProgressTextfunc (func shortProgressText(s string) string)
shouldAutoLoadServiceConfigfunc (func shouldAutoLoadServiceConfig(ServiceOptions) bool)
shouldEscalateOnErrorfunc (func shouldEscalateOnError(err error) bool)shouldEscalateOnError gates ladder escalation to “no eligible candidate”
shouldPreferProviderProbefunc (func shouldPreferProviderProbe(candidate, current providerProbeResult) bool)
snapshotContextWindowfunc (func snapshotContextWindow(pcfg ServiceProviderEntry, cat *modelcatalog.Catalog, modelID string, snapshotWindow int) (int, string))
snapshotEndpointNamefunc (func snapshotEndpointName(pcfg ServiceProviderEntry, key snapshotProviderGroupKey) string)
snapshotModelIDsfunc (func snapshotModelIDs(rows []modelsnapshot.KnownModel) []string)
snapshotProviderContextWindowsfunc (func snapshotProviderContextWindows(ctx context.Context, pcfg ServiceProviderEntry, cat *modelcatalog.Catalog, rows []modelsnapshot.KnownModel, discoveredIDs []string) (map[string]int, map[string]string))
snapshotProviderGroupKeytype (struct)
splitEndpointProviderReffunc (func splitEndpointProviderRef(ref string) (string, string, bool))
staleHarnessRecordtype (struct)
startupProbeTotalTimeoutconst
statusErrorTypefunc (func statusErrorType(status string) string)
statusViewProviderfunc (func statusViewProvider(entry ServiceProviderEntry) statusview.ServiceProvider)
stickyRouteAffinityBonusconst
stickyRouteLeaseTTLconst
stringInfunc (func stringIn(xs []string, v string) bool)
subprocessHarnessAutoRoutingModelsfunc (func subprocessHarnessAutoRoutingModels(name string, cfg harnesses.HarnessConfig) []string)
subprocessHarnessModelIDsfunc (func subprocessHarnessModelIDs(name string, cfg harnesses.HarnessConfig) []string)
subprocessProgressStatetype (struct)
subscriptionEffectiveCostUSDPer1kTokensfunc (func subscriptionEffectiveCostUSDPer1kTokens(baseCost float64, quotaPercentUsed int, curve SubscriptionCostCurve) float64)
subscriptionFallbackPolicyfunc (func subscriptionFallbackPolicy(harnessName string) string)
subscriptionQuotaViewtype (alias)
summarizeJSONValuefunc (func summarizeJSONValue(raw json.RawMessage) string)
summarizeToolInputfunc (func summarizeToolInput(toolName string, input json.RawMessage) string)
summarizeToolOutputfunc (func summarizeToolOutput(output string) string)
supportedPermissionsfunc (func supportedPermissions(cfg harnesses.HarnessConfig) []string)supportedPermissions extracts the permission levels from PermissionArgs keys,
supportedReasoningfunc (func supportedReasoning(cfg harnesses.HarnessConfig) []string)
tcpAlivenessProberfunc (func tcpAlivenessProber(ctx context.Context, _, baseURL string) bool)tcpAlivenessProber tests endpoint reachability via a TCP connect probe
terminateOwnedProcessGroupfunc (func terminateOwnedProcessGroup(pgid int))
toRoutingQualityOverridefunc (func toRoutingQualityOverride(ov ServiceOverrideData) *routingquality.OverrideData)
toTranscriptProgressfunc (func toTranscriptProgress(payload ServiceProgressData) transcript.ProgressPayload)
toTranscriptRouteDecisionfunc (func toTranscriptRouteDecision(decision RouteDecision) transcript.RouteProgressDecision)
toolOutputDetailtype (alias)
toolTaskSummarytype (alias)
toolWiringHookFntype (func)
validateExplicitHarnessModelfunc (func validateExplicitHarnessModel(name string, cfg harnesses.HarnessConfig, model, provider string) error)
validateExplicitHarnessPolicyfunc (func validateExplicitHarnessPolicy(name string, cfg harnesses.HarnessConfig, policy string) error)
validateExplicitHarnessQuotafunc (func validateExplicitHarnessQuota(name string, cfg harnesses.HarnessConfig) error)
validateExplicitHarnessReasoningfunc (func validateExplicitHarnessReasoning(name string, cfg harnesses.HarnessConfig, value Reasoning) error)
validateExplicitProviderfunc (func validateExplicitProvider(sc ServiceConfig, cfg harnesses.HarnessConfig, provider string) error)validateExplicitProvider rejects pre-dispatch when the caller pinned a
waitForPrimaryQuotaRefreshesfunc (func waitForPrimaryQuotaRefreshes(waits []<-chan struct{}, timeout time.Duration))
withRouteCandidatesfunc (func withRouteCandidates(err error, candidates []RouteCandidate) error)
wrapExecuteWithHubfunc (func wrapExecuteWithHub(fanout executeEventFanout, sessionID string, outer chan ServiceEvent, ovr *overrideContext, meta map[string]string) chan ServiceEvent)wrapExecuteWithHub wraps the inner out channel so that every event emitted
writeStaleHarnessRecordfunc (func writeStaleHarnessRecord(path string, record staleHarnessRecord) error)

Where to look next

  • github.com/easel/fizeau — the root facade: FizeauService, request and event types, public errors, and compatibility wrappers that keep embedders off internal/.
  • internal/serviceimpl/, internal/transcript/, internal/routehealth/, internal/quota/, and internal/routingquality/ — the concrete runtime owners behind the facade. These are useful for repo orientation but remain intentionally non-importable.
  • AGENTS.md — package layout and the rules about what’s public vs internal/; read this before adding new exports.
  • agentcli/ — mountable command tree backed by the public service facade. Importable from your own CLI binary if you want fiz subcommands.

Sub-packages

Most of the implementation lives under internal/ and is intentionally not importable. The packages a third-party Go consumer can actually use are:

  • github.com/easel/fizeau — the root facade (this page).
  • github.com/easel/fizeau/configinit — blank-import to register the default YAML config loader.
  • github.com/easel/fizeau/agentcli — mountable CLI commands.
  • github.com/easel/fizeau/catalogdist — model catalog distribution helpers.
  • github.com/easel/fizeau/telemetry — runtime telemetry scaffolding for invoke_agent / chat / execute_tool spans.

Regenerating this page

This page is generated by cmd/docgen-embedding from the source code. Regenerate after any change to the public API:

make docs-embedding

The generator is deterministic — running it twice yields byte-identical output.