Expose structured capacity errors

This commit is contained in:
2026-07-30 23:24:04 +00:00
parent 63c67a4520
commit 7428e50c2c
7 changed files with 139 additions and 16 deletions

13
doc.go
View File

@@ -23,7 +23,8 @@
// InspectProfile return copied inspection values. Returned values and values
// passed to extension interfaces are likewise isolated from engine state.
// Callers own those copies and may mutate them after the call that supplied or
// returned them.
// returned them. Returned structured errors are likewise caller-owned and may
// be mutated without affecting engine state or another error.
//
// # Security and sensitive data
//
@@ -49,12 +50,12 @@
// [GenerateResponse], [ExecutionTargetPresence], and the string value types
// used by those values.
//
// Construction, inspection, and handle values, including [Config], [Backend],
// [RunRequest], [ArtifactRef], [ExecutionTargetOverride], [Profile],
// Construction, inspection, handle, and error values, including [Config],
// [Backend], [RunRequest], [ArtifactRef], [ExecutionTargetOverride], [Profile],
// [OpenAICompatibleProfileConfig], [ProfileInspection],
// [PromptInputDefinition], [PromptInspection], and [PreparedExecution], do
// not have stable JSON representations. Direct API keys are nevertheless
// excluded from JSON for every public value.
// [PromptInputDefinition], [PromptInspection], [PreparedExecution], and
// [CapacityError], do not have stable JSON representations. Direct API keys
// are nevertheless excluded from JSON for every public value.
//
// JSON timestamps use time.Time's RFC 3339 encoding and are omitted when zero.
// PreparedRun and RunResult durations are encoded as integer milliseconds in