Documentation
¶
Overview ¶
Package proxy supplies transport adapters for the independent Reflow core.
Index ¶
Constants ¶
const MaxRequestBytes = 16 << 20
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Upstream string
Fold core.Config
Client *http.Client
// FullReplay uses known complete history instead of a parent response ID.
// Embedded hosts may open a fresh upstream WebSocket for every HTTP round.
FullReplay bool
EnableMetrics bool
// WebSocketStream supplies stream=true to gateways that reuse HTTP request
// bodies for socket turns. Standard Responses WebSockets omit that field.
WebSocketStream bool
}
type FoldDecisions ¶
type FoldDecisions struct {
Continue int64 `json:"continue"`
RuleNotMatched int64 `json:"rule_not_matched"`
NoEncryptedContent int64 `json:"no_encrypted_content"`
MaxContinue int64 `json:"max_continue"`
UnresolvedParent int64 `json:"unresolved_parent"`
UpstreamToolAlreadyExecuted int64 `json:"upstream_tool_already_executed"`
UpstreamTerminal int64 `json:"upstream_terminal"`
Other int64 `json:"other"`
}
Fixed labels from actual core decisions. These counters do not decide whether to continue, and never copy arbitrary upstream strings or identifiers.
type Metrics ¶
type Metrics struct {
Enabled bool `json:"enabled"`
Scope string `json:"scope"`
Requests int64 `json:"requests"`
Continuations int64 `json:"continuations"`
ContinuedToolResponses int64 `json:"continued_tool_responses"`
ContinuedToolCalls int64 `json:"continued_tool_calls"`
ContinuedToolResults int64 `json:"continued_tool_results"`
ToolTrackingDrops int64 `json:"tool_tracking_drops"`
Warmups int64 `json:"warmups"`
Completed int64 `json:"completed"`
Failed int64 `json:"failed"`
UsageReports int64 `json:"usage_reports"`
ParseErrors int64 `json:"parse_errors"`
UnsupportedResponses int64 `json:"unsupported_responses"`
InputTokens int64 `json:"input_tokens"`
OutputTokens int64 `json:"output_tokens"`
CachedTokens int64 `json:"cached_tokens"`
CacheWriteTokens int64 `json:"cache_write_tokens"`
ReasoningTokens int64 `json:"reasoning_tokens"`
UsageComplete bool `json:"usage_complete"`
DiagnosticsVersion int `json:"diagnostics_version,omitempty"`
FoldDecisions FoldDecisions `json:"fold_decisions"`
ReasoningTokenSamples []int64 `json:"reasoning_token_samples,omitempty"`
ReasoningSampleDrops int64 `json:"reasoning_sample_drops"`
ReasoningMissingReports int64 `json:"reasoning_missing_reports"`
}
Metrics contains process totals only: no models, accounts, identifiers or payloads. Usage is what observed streaming Responses replies reported, not a monetary charge or an estimate of unreported canceled work.
type ReplayCache ¶
type ReplayCache struct {
// contains filtered or unexported fields
}
ReplayCache contains only bounded in-memory state. Scopes include the credential and account fingerprint, never a user-supplied session id alone.
func NewReplayCache ¶
func NewReplayCache() *ReplayCache