Documentation
¶
Overview ¶
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Agentic Control's multi-agent workflow engine.
Court owns workflow semantics, catalog resolution, persisted SQLite state, worker orchestration, artifacts, requests, and verdict generation. It runs in process and reuses the shared runtime control-plane layer from pkg/controlplane.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Package court provides Court runtime functionality.
Index ¶
- Constants
- func DefaultConfigDir() (string, error)
- func DefaultConfigTOML(backend string, model string) string
- func DefaultDataDir() (string, error)
- func DiscoverProjectConfigDirs(workspace string) ([]string, error)
- func LoadAgentModel(rootDir string, id string) (string, bool, error)
- func ValidWorkerResultConfidence(value string) bool
- func WorkerResultConfidenceValues() []string
- func WorkerResultRequiredFields() []string
- func WorkerResultSchemaExample() string
- type AgentConfig
- type Artifact
- type CatalogDiagnostic
- type CatalogDiagnosticSeverity
- type CatalogGetResult
- type CatalogListResult
- type CatalogRoleDescriptor
- type CatalogRuntimeTarget
- type CatalogSource
- type CatalogSourceKind
- type CatalogStatus
- type CatalogValidateResult
- type CatalogWorkflowDescriptor
- type CatalogWorkflowSummary
- type ClerkDelegationDecision
- type ClerkDelegationRoute
- type Config
- type ConfigAgent
- type ConfigDefaults
- type ConfigJury
- type ConfigPreset
- type ConfigRole
- type DelegationManifest
- type DelegationScope
- type DocketArtifact
- type DocketAssignment
- type DocketSource
- type DocketTargetKind
- type Engine
- func (e *Engine) BestPromotableWorkerID(ctx context.Context, runID string) (string, error)
- func (e *Engine) CancelWorker(ctx context.Context, workerID string) (WorkerControlResult, error)
- func (e *Engine) CatalogGet(workspace string, presetID string, backend string) (CatalogGetResult, error)
- func (e *Engine) CatalogList(workspace string, backend string) (CatalogListResult, error)
- func (e *Engine) CatalogValidate(workspace string, presetID string, backend string) (CatalogValidateResult, error)
- func (e *Engine) Close() error
- func (e *Engine) CompletedVerdict(ctx context.Context, runID string) (string, error)
- func (e *Engine) ConfigDir() string
- func (e *Engine) DBPath() string
- func (e *Engine) DataDir() string
- func (e *Engine) GetRun(ctx context.Context, runID string) (Run, error)
- func (e *Engine) InterruptWorker(ctx context.Context, workerID string) (WorkerControlResult, error)
- func (e *Engine) ListArtifacts(ctx context.Context, runID string) ([]Artifact, error)
- func (e *Engine) ListAvailablePresets(workspace string) ([]Preset, error)
- func (e *Engine) ListEvents(ctx context.Context, runID string, after int64) ([]Event, error)
- func (e *Engine) ListRuns(ctx context.Context) ([]Run, error)
- func (e *Engine) ListRuntimeRequests(ctx context.Context, runID string, status RuntimeRequestStatus) ([]RuntimeRequest, error)
- func (e *Engine) ListWorkers(ctx context.Context, runID string) ([]Worker, error)
- func (e *Engine) MonitorSnapshot(ctx context.Context, runID string, eventLimit int) (MonitorSnapshot, error)
- func (e *Engine) PromoteWorkerThread(ctx context.Context, runID string, workerID string) (PromotedThreadResult, error)
- func (e *Engine) ReconcileAndGetRun(ctx context.Context, runID string) (Run, error)
- func (e *Engine) ReconcileRun(ctx context.Context, runID string) error
- func (e *Engine) RespondToRuntimeRequest(ctx context.Context, id int64, response RuntimeRequestResponse) (RuntimeRequestResponseResult, error)
- func (e *Engine) ResumeWorker(ctx context.Context, workerID string) (WorkerControlResult, error)
- func (e *Engine) RetryWorker(ctx context.Context, workerID string) (WorkerControlResult, error)
- func (e *Engine) RootDir() string
- func (e *Engine) RunStatus(ctx context.Context, runID string) (RunStatusView, error)
- func (e *Engine) RunWorker(ctx context.Context, workerID string) error
- func (e *Engine) RuntimeDescriptors() []contract.RuntimeDescriptor
- func (e *Engine) StartRun(ctx context.Context, req StartRunRequest) (Run, error)
- func (e *Engine) StartRunWithOptions(ctx context.Context, opts StartRunOptions) (Run, error)
- func (e *Engine) TraceRun(ctx context.Context, runID string) (RunTrace, error)
- func (e *Engine) UsageSummary(ctx context.Context, runID string) (UsageSummary, error)
- func (e *Engine) WatchRun(ctx context.Context, runID string, opts WatchOptions) error
- type EngineOptions
- type Event
- type InitDefaultsRequest
- type InitDefaultsResult
- type Jury
- type JurySummary
- type MonitorSnapshot
- type ParticipantState
- type Phase
- type PhaseInput
- type PhaseResult
- type PlanArtifact
- type PlanElement
- type Preset
- func ListConfigPresetsFromRoots(rootDirs []string) ([]Preset, error)
- func ListMarkdownPresets(rootDir string) ([]Preset, error)
- func ListMarkdownPresetsFromRoots(rootDirs []string) ([]Preset, error)
- func ListPresets() []Preset
- func LoadConfigPresetFromRoots(rootDirs []string, id string) (Preset, bool, error)
- func LoadPreset(rootDir string, id string) (Preset, bool, error)
- func LoadPresetFromRoots(rootDirs []string, id string) (Preset, bool, error)
- func ResolvePreset(id string) (Preset, error)
- type PromotedThreadResult
- type Role
- type RoleKind
- type RoleSummary
- type Run
- type RunStatus
- type RunStatusView
- type RunTrace
- type RuntimeBackendConfig
- type RuntimeControlPlane
- type RuntimeIdentity
- type RuntimeModelOptions
- type RuntimeRequest
- type RuntimeRequestAnswer
- type RuntimeRequestResponse
- type RuntimeRequestResponseResult
- type RuntimeRequestStatus
- type RuntimeResponseStatus
- type SetupDefaultsRequest
- type SetupDefaultsResult
- type SetupFileAction
- type SetupFileResult
- type SetupScope
- type StartRunOptions
- type StartRunRequest
- type Store
- func (s *Store) AddArtifact(ctx context.Context, artifact Artifact) error
- func (s *Store) AddEvent(ctx context.Context, event Event) error
- func (s *Store) AddWorkerControl(ctx context.Context, runID string, workerID string, action WorkerControlAction) (WorkerControlRequest, error)
- func (s *Store) ArchiveWorkerAttempt(ctx context.Context, worker Worker) error
- func (s *Store) Close() error
- func (s *Store) CompletePendingWorkerControls(ctx context.Context, workerID string, status WorkerControlStatus, ...) error
- func (s *Store) CompleteRuntimeRequestResponse(ctx context.Context, id int64, status RuntimeResponseStatus, ...) error
- func (s *Store) CompleteWorker(ctx context.Context, workerID string, status WorkerStatus, result string, ...) error
- func (s *Store) CompleteWorkerControl(ctx context.Context, id int64, status WorkerControlStatus, errText string) error
- func (s *Store) CreateRun(ctx context.Context, run Run) error
- func (s *Store) CreateWorker(ctx context.Context, worker Worker) error
- func (s *Store) GetRun(ctx context.Context, id string) (Run, error)
- func (s *Store) GetRuntimeRequest(ctx context.Context, id int64) (RuntimeRequest, error)
- func (s *Store) GetWorker(ctx context.Context, id string) (Worker, error)
- func (s *Store) ListArtifacts(ctx context.Context, runID string) ([]Artifact, error)
- func (s *Store) ListEvents(ctx context.Context, runID string, after int64) ([]Event, error)
- func (s *Store) ListPendingWorkerControls(ctx context.Context, workerID string) ([]WorkerControlRequest, error)
- func (s *Store) ListQueuedRuntimeRequestResponses(ctx context.Context, workerID string) ([]RuntimeRequest, error)
- func (s *Store) ListRuns(ctx context.Context) ([]Run, error)
- func (s *Store) ListRuntimeRequests(ctx context.Context, runID string, status RuntimeRequestStatus) ([]RuntimeRequest, error)
- func (s *Store) ListWorkerAttempts(ctx context.Context, runID string) ([]WorkerAttempt, error)
- func (s *Store) ListWorkerControls(ctx context.Context, runID string) ([]WorkerControlRequest, error)
- func (s *Store) ListWorkers(ctx context.Context, runID string) ([]Worker, error)
- func (s *Store) QueueRuntimeRequestResponse(ctx context.Context, id int64, response RuntimeRequestResponse) error
- func (s *Store) ReactivateRun(ctx context.Context, runID string, phase Phase) error
- func (s *Store) ResetWorkerForRetry(ctx context.Context, workerID string, launchID string) error
- func (s *Store) UpdateRunPhase(ctx context.Context, runID string, phase Phase) error
- func (s *Store) UpdateRunStatus(ctx context.Context, runID string, status RunStatus, verdict string) error
- func (s *Store) UpdateWorkerRunning(ctx context.Context, workerID string) error
- func (s *Store) UpdateWorkerRuntimeIdentity(ctx context.Context, workerID string, identity RuntimeIdentity) error
- func (s *Store) UpsertRuntimeRequest(ctx context.Context, request RuntimeRequest) error
- type UsageSummary
- type WatchOptions
- type WatchUpdate
- type Worker
- type WorkerAttempt
- type WorkerControlAction
- type WorkerControlRequest
- type WorkerControlResult
- type WorkerControlStatus
- type WorkerResult
- type WorkerStatus
- type WorkerTrace
- type WorkerUsage
- type WorkflowMode
Constants ¶
const ( RunQueued = orchestration.RunQueued RunRunning = orchestration.RunRunning RunCompleted = orchestration.RunCompleted RunFailed = orchestration.RunFailed RunCancelled = orchestration.RunCancelled )
const ( WorkerQueued = orchestration.WorkerQueued WorkerRunning = orchestration.WorkerRunning WorkerCompleted = orchestration.WorkerCompleted WorkerFailed = orchestration.WorkerFailed WorkerCancelled = orchestration.WorkerCancelled )
const ( WorkerControlCancel = orchestration.WorkerControlCancel WorkerControlInterrupt = orchestration.WorkerControlInterrupt WorkerControlRetry = orchestration.WorkerControlRetry WorkerControlResume = orchestration.WorkerControlResume )
const ( WorkerControlPending = orchestration.WorkerControlPending WorkerControlCompleted = orchestration.WorkerControlCompleted WorkerControlFailed = orchestration.WorkerControlFailed )
const ( RuntimeRequestOpen = orchestration.RuntimeRequestOpen RuntimeRequestResponded = orchestration.RuntimeRequestResponded RuntimeRequestResolved = orchestration.RuntimeRequestResolved RuntimeRequestClosed = orchestration.RuntimeRequestClosed )
const ( RuntimeResponseNone = orchestration.RuntimeResponseNone RuntimeResponseQueued = orchestration.RuntimeResponseQueued RuntimeResponseCompleted = orchestration.RuntimeResponseCompleted RuntimeResponseFailed = orchestration.RuntimeResponseFailed )
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigDir ¶
DefaultConfigDir provides Court runtime functionality.
func DefaultConfigTOML ¶
DefaultConfigTOML provides Court runtime functionality.
func DefaultDataDir ¶
DefaultDataDir provides Court runtime functionality.
func DiscoverProjectConfigDirs ¶
DiscoverProjectConfigDirs provides Court runtime functionality.
func LoadAgentModel ¶
LoadAgentModel provides Court runtime functionality.
func ValidWorkerResultConfidence ¶
ValidWorkerResultConfidence provides Court runtime functionality.
func WorkerResultConfidenceValues ¶
func WorkerResultConfidenceValues() []string
WorkerResultConfidenceValues provides Court runtime functionality.
func WorkerResultRequiredFields ¶
func WorkerResultRequiredFields() []string
WorkerResultRequiredFields provides Court runtime functionality.
func WorkerResultSchemaExample ¶
func WorkerResultSchemaExample() string
WorkerResultSchemaExample provides Court runtime functionality.
Types ¶
type AgentConfig ¶
type AgentConfig struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
Backend string `json:"backend,omitempty"`
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
ModelOptions RuntimeModelOptions `json:"model_options,omitempty"`
Backends map[string]RuntimeBackendConfig `json:"backends,omitempty"`
}
AgentConfig defines Court runtime data.
func LoadAgentConfig ¶
func LoadAgentConfig(rootDir string, id string) (AgentConfig, bool, error)
LoadAgentConfig provides Court runtime functionality.
func LoadAgentConfigFromRoots ¶
func LoadAgentConfigFromRoots(rootDirs []string, id string) (AgentConfig, bool, error)
LoadAgentConfigFromRoots provides Court runtime functionality.
func LoadConfigAgentFromRoots ¶
func LoadConfigAgentFromRoots(rootDirs []string, id string) (AgentConfig, bool, error)
LoadConfigAgentFromRoots provides Court runtime functionality.
type Artifact ¶
type Artifact = orchestration.ArtifactRecord
type CatalogDiagnostic ¶
type CatalogDiagnostic struct {
Severity CatalogDiagnosticSeverity `json:"severity"`
Code string `json:"code"`
Message string `json:"message"`
ResourceType string `json:"resource_type,omitempty"`
ResourceID string `json:"resource_id,omitempty"`
Backend string `json:"backend,omitempty"`
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
Path string `json:"path,omitempty"`
}
type CatalogDiagnosticSeverity ¶
type CatalogDiagnosticSeverity string
const ( CatalogDiagnosticWarning CatalogDiagnosticSeverity = "warning" CatalogDiagnosticError CatalogDiagnosticSeverity = "error" )
type CatalogGetResult ¶
type CatalogGetResult struct {
Workspace string `json:"workspace"`
Roots []string `json:"roots"`
SelectedBackend string `json:"selected_backend"`
DefaultBackend string `json:"default_backend"`
Workflow CatalogWorkflowDescriptor `json:"workflow"`
}
type CatalogListResult ¶
type CatalogListResult struct {
Workspace string `json:"workspace"`
Roots []string `json:"roots"`
SelectedBackend string `json:"selected_backend"`
DefaultBackend string `json:"default_backend"`
Workflows []CatalogWorkflowSummary `json:"workflows"`
}
type CatalogRoleDescriptor ¶
type CatalogRoleDescriptor struct {
ID string `json:"id"`
Kind RoleKind `json:"kind"`
Title string `json:"title"`
Brief string `json:"brief"`
Agent string `json:"agent,omitempty"`
Source CatalogSource `json:"source"`
Target CatalogRuntimeTarget `json:"target"`
Status CatalogStatus `json:"status"`
Diagnostics []CatalogDiagnostic `json:"diagnostics,omitempty"`
}
type CatalogRuntimeTarget ¶
type CatalogRuntimeTarget struct {
Backend string `json:"backend"`
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
ModelOptions RuntimeModelOptions `json:"model_options,omitempty"`
Status CatalogStatus `json:"status"`
Diagnostics []CatalogDiagnostic `json:"diagnostics,omitempty"`
}
type CatalogSource ¶
type CatalogSource struct {
Kind CatalogSourceKind `json:"kind"`
Root string `json:"root,omitempty"`
Path string `json:"path,omitempty"`
}
type CatalogSourceKind ¶
type CatalogSourceKind string
const ( CatalogSourceBuiltin CatalogSourceKind = "builtin" CatalogSourceConfig CatalogSourceKind = "config" CatalogSourceMarkdown CatalogSourceKind = "markdown" )
type CatalogStatus ¶
type CatalogStatus string
const ( CatalogStatusSupported CatalogStatus = "supported" CatalogStatusWarning CatalogStatus = "warning" CatalogStatusBlocked CatalogStatus = "blocked" )
type CatalogValidateResult ¶
type CatalogValidateResult struct {
Workspace string `json:"workspace"`
Roots []string `json:"roots"`
SelectedBackend string `json:"selected_backend"`
DefaultBackend string `json:"default_backend"`
Workflows []CatalogWorkflowDescriptor `json:"workflows"`
Diagnostics []CatalogDiagnostic `json:"diagnostics,omitempty"`
}
type CatalogWorkflowDescriptor ¶
type CatalogWorkflowDescriptor struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
Workflow WorkflowMode `json:"workflow"`
Source CatalogSource `json:"source"`
SelectedBackend string `json:"selected_backend"`
DefaultBackend string `json:"default_backend"`
Status CatalogStatus `json:"status"`
Roles []CatalogRoleDescriptor `json:"roles,omitempty"`
Diagnostics []CatalogDiagnostic `json:"diagnostics,omitempty"`
}
type CatalogWorkflowSummary ¶
type CatalogWorkflowSummary struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
Workflow WorkflowMode `json:"workflow"`
Source CatalogSource `json:"source"`
SelectedBackend string `json:"selected_backend"`
DefaultBackend string `json:"default_backend"`
Status CatalogStatus `json:"status"`
DiagnosticCount int `json:"diagnostic_count,omitempty"`
}
type ClerkDelegationDecision ¶
type ClerkDelegationDecision struct {
SchemaVersion int `json:"schema_version"`
Scope DelegationScope `json:"scope,omitempty"`
JuryIDs []string `json:"jury_ids,omitempty"`
JurorIDs []string `json:"juror_ids,omitempty"`
JudgeIDs []string `json:"judge_ids,omitempty"`
Assignments []ClerkDelegationRoute `json:"assignments,omitempty"`
Rationale string `json:"rationale,omitempty"`
}
ClerkDelegationDecision defines Court runtime data.
type ClerkDelegationRoute ¶
type ClerkDelegationRoute struct {
TargetID string `json:"target_id,omitempty"`
TargetIDs []string `json:"target_ids,omitempty"`
Instructions string `json:"instructions"`
ExpectedDeliverable string `json:"expected_deliverable,omitempty"`
Rationale string `json:"rationale,omitempty"`
}
ClerkDelegationRoute defines Court runtime data.
type Config ¶
type Config struct {
Features map[string]bool
Defaults ConfigDefaults
Agents map[string]ConfigAgent
Roles map[string]ConfigRole
Juries map[string]ConfigJury
Presets map[string]ConfigPreset
}
Config defines Court runtime data.
func LoadCourtConfig ¶
LoadCourtConfig provides Court runtime functionality.
func LoadCourtConfigFromRoots ¶
LoadCourtConfigFromRoots provides Court runtime functionality.
type ConfigAgent ¶
type ConfigAgent struct {
ID string
Title string
Backend string
Provider string
Model string
ModelOptions RuntimeModelOptions
Backends map[string]RuntimeBackendConfig
}
ConfigAgent defines Court runtime data.
type ConfigDefaults ¶
type ConfigDefaults struct {
Preset string
Workflow string
DelegationScope string
Backend string
Provider string
Model string
ModelOptions RuntimeModelOptions
Backends map[string]RuntimeBackendConfig
}
ConfigDefaults defines Court runtime data.
func (ConfigDefaults) BackendDefaults ¶
func (d ConfigDefaults) BackendDefaults(backend string) RuntimeBackendConfig
BackendDefaults provides Court runtime functionality.
type ConfigJury ¶
type ConfigJury struct {
ID string
Title string
Description string
JurorIDs []string
ClerkID string
JudgeID string
}
ConfigJury defines Court runtime data.
type ConfigPreset ¶
type ConfigPreset struct {
ID string
Title string
Description string
Workflow string
JuryID string
JurorIDs []string
ClerkID string
JudgeID string
}
ConfigPreset defines Court runtime data.
type ConfigRole ¶
type ConfigRole struct {
ID string
Kind RoleKind
Title string
Prompt string
Agent string
Backend string
Provider string
Model string
ModelOptions RuntimeModelOptions
Backends map[string]RuntimeBackendConfig
}
ConfigRole defines Court runtime data.
type DelegationManifest ¶
type DelegationManifest struct {
Scope DelegationScope `json:"scope"`
Juries []JurySummary `json:"juries"`
Jurors []RoleSummary `json:"jurors"`
Judges []RoleSummary `json:"judges"`
}
DelegationManifest defines Court runtime data.
type DelegationScope ¶
type DelegationScope string
DelegationScope defines Court runtime data.
const ( // DelegationScopePreset defines a Court runtime value. DelegationScopePreset DelegationScope = "preset" // DelegationScopeWorkspace defines a Court runtime value. DelegationScopeWorkspace DelegationScope = "workspace" // DelegationScopeGlobal defines a Court runtime value. DelegationScopeGlobal DelegationScope = "global" )
func ParseDelegationScope ¶
func ParseDelegationScope(value string) (DelegationScope, bool)
ParseDelegationScope provides Court runtime functionality.
func ResolveDelegationScope ¶
func ResolveDelegationScope(value string, fallback DelegationScope) DelegationScope
ResolveDelegationScope provides Court runtime functionality.
type DocketArtifact ¶
type DocketArtifact struct {
WorkflowMode WorkflowMode `json:"workflow_mode"`
DelegationScope DelegationScope `json:"delegation_scope,omitempty"`
Source DocketSource `json:"source"`
Summary string `json:"summary"`
ClerkNotes string `json:"clerk_notes,omitempty"`
JuryIDs []string `json:"jury_ids,omitempty"`
JudgeIDs []string `json:"judge_ids,omitempty"`
Assignments []DocketAssignment `json:"assignments"`
}
DocketArtifact defines Court runtime data.
func BuildDocket ¶
func BuildDocket(plan PlanArtifact, preset Preset, workflow WorkflowMode) DocketArtifact
BuildDocket provides Court runtime functionality.
type DocketAssignment ¶
type DocketAssignment struct {
ID string `json:"id"`
Title string `json:"title"`
Instructions string `json:"instructions"`
TargetKind DocketTargetKind `json:"target_kind"`
TargetIDs []string `json:"target_ids"`
PlanElementIDs []string `json:"plan_element_ids"`
ExpectedDeliverable string `json:"expected_deliverable,omitempty"`
Rationale string `json:"rationale,omitempty"`
}
DocketAssignment defines Court runtime data.
type DocketSource ¶
type DocketSource string
DocketSource defines Court runtime data.
const ( // DocketClerkHeuristic defines a Court runtime value. DocketClerkHeuristic DocketSource = "clerk_heuristic" // DocketClerkDelegated defines a Court runtime value. DocketClerkDelegated DocketSource = "clerk_delegated" // DocketDeterministicLocal defines a Court runtime value. DocketDeterministicLocal DocketSource = "deterministic_fallback" )
type DocketTargetKind ¶
type DocketTargetKind string
DocketTargetKind defines Court runtime data.
const ( // DocketTargetJuror defines a Court runtime value. DocketTargetJuror DocketTargetKind = "juror" // DocketTargetJury defines a Court runtime value. DocketTargetJury DocketTargetKind = "jury" // DocketTargetJudge defines a Court runtime value. DocketTargetJudge DocketTargetKind = "judge" // DocketTargetCourt defines a Court runtime value. DocketTargetCourt DocketTargetKind = "court" )
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine defines Court runtime data.
func NewEngine ¶
func NewEngine(opts EngineOptions) (*Engine, error)
NewEngine provides Court runtime functionality.
func (*Engine) BestPromotableWorkerID ¶
func (*Engine) CancelWorker ¶
CancelWorker provides Court runtime functionality.
func (*Engine) CatalogGet ¶
func (*Engine) CatalogList ¶
func (e *Engine) CatalogList(workspace string, backend string) (CatalogListResult, error)
func (*Engine) CatalogValidate ¶
func (*Engine) CompletedVerdict ¶
CompletedVerdict provides Court runtime functionality.
func (*Engine) InterruptWorker ¶
InterruptWorker provides Court runtime functionality.
func (*Engine) ListArtifacts ¶
ListArtifacts provides Court runtime functionality.
func (*Engine) ListAvailablePresets ¶
ListAvailablePresets provides Court runtime functionality.
func (*Engine) ListEvents ¶
ListEvents provides Court runtime functionality.
func (*Engine) ListRuntimeRequests ¶
func (e *Engine) ListRuntimeRequests(ctx context.Context, runID string, status RuntimeRequestStatus) ([]RuntimeRequest, error)
ListRuntimeRequests provides Court runtime functionality.
func (*Engine) ListWorkers ¶
ListWorkers provides Court runtime functionality.
func (*Engine) MonitorSnapshot ¶
func (e *Engine) MonitorSnapshot(ctx context.Context, runID string, eventLimit int) (MonitorSnapshot, error)
MonitorSnapshot provides Court runtime functionality.
func (*Engine) PromoteWorkerThread ¶
func (*Engine) ReconcileAndGetRun ¶
ReconcileAndGetRun provides Court runtime functionality.
func (*Engine) ReconcileRun ¶
ReconcileRun provides Court runtime functionality.
func (*Engine) RespondToRuntimeRequest ¶
func (e *Engine) RespondToRuntimeRequest(ctx context.Context, id int64, response RuntimeRequestResponse) (RuntimeRequestResponseResult, error)
RespondToRuntimeRequest provides Court runtime functionality.
func (*Engine) ResumeWorker ¶
ResumeWorker provides Court runtime functionality.
func (*Engine) RetryWorker ¶
RetryWorker provides Court runtime functionality.
func (*Engine) RuntimeDescriptors ¶
func (e *Engine) RuntimeDescriptors() []contract.RuntimeDescriptor
RuntimeDescriptors returns the current agentic-control runtime descriptors.
func (*Engine) StartRunWithOptions ¶
StartRunWithOptions provides Court runtime functionality.
func (*Engine) UsageSummary ¶
type EngineOptions ¶
type EngineOptions struct {
ConfigDir string
DataDir string
RootDir string
DBPath string
WorkerCommand string
ControlPlane RuntimeControlPlane
}
EngineOptions defines Court runtime data.
func EngineOptionsFromEnvironment ¶
func EngineOptionsFromEnvironment() EngineOptions
EngineOptionsFromEnvironment provides Court runtime functionality.
type Event ¶
type Event = orchestration.EventRecord
type InitDefaultsRequest ¶
type InitDefaultsRequest struct {
Scope SetupScope
TargetDir string
Workspace string
Backend string
Model string
Force bool
DryRun bool
}
InitDefaultsRequest defines Court runtime data.
type InitDefaultsResult ¶
type InitDefaultsResult struct {
Setup SetupDefaultsResult `json:"setup"`
Config SetupFileResult `json:"config"`
}
InitDefaultsResult defines Court runtime data.
func InitDefaults ¶
func InitDefaults(req InitDefaultsRequest) (InitDefaultsResult, error)
InitDefaults provides Court runtime functionality.
type Jury ¶
type Jury struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
JurorIDs []string `json:"juror_ids"`
ClerkID string `json:"clerk_id,omitempty"`
JudgeID string `json:"judge_id,omitempty"`
}
Jury defines Court runtime data.
func ListJuriesFromRoots ¶
ListJuriesFromRoots provides Court runtime functionality.
func LoadConfigJuryFromRoots ¶
LoadConfigJuryFromRoots provides Court runtime functionality.
type JurySummary ¶
type JurySummary struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
JurorIDs []string `json:"juror_ids"`
JudgeID string `json:"judge_id,omitempty"`
}
JurySummary defines Court runtime data.
type MonitorSnapshot ¶
type MonitorSnapshot = orchestration.MonitorSnapshot[Run, Worker, RuntimeRequest, Event]
type ParticipantState ¶
type ParticipantState struct {
Role RoleKind
Present bool
Required bool
PromptReady bool
AttentionRequested bool
BlockedOnUser bool
CommandRunning bool
Unhealthy bool
}
ParticipantState defines Court runtime data.
func ParticipantStatesFromWorkers ¶
func ParticipantStatesFromWorkers(workers []Worker) []ParticipantState
ParticipantStatesFromWorkers provides Court runtime functionality.
type Phase ¶
type Phase string
Phase defines Court runtime data.
const ( // PhaseIdle defines a Court runtime value. PhaseIdle Phase = "idle" // PhaseBlocked defines a Court runtime value. PhaseBlocked Phase = "blocked" // PhaseClerk defines a Court runtime value. PhaseClerk Phase = "clerk" // PhaseJurors defines a Court runtime value. PhaseJurors Phase = "jurors" // PhaseInlineJudge defines a Court runtime value. PhaseInlineJudge Phase = "inline_judge" // PhaseCorrections defines a Court runtime value. PhaseCorrections Phase = "corrections" // PhaseVerdict defines a Court runtime value. PhaseVerdict Phase = "verdict" // PhaseComplete defines a Court runtime value. PhaseComplete Phase = "complete" )
type PhaseInput ¶
type PhaseInput struct {
RequireClerk bool
InlineReviewEnabled bool
VerdictEnabled bool
VerdictDisabled bool
DocketReady bool
InlineReviewReady bool
VerdictReady bool
CorrectionTargetCount int
CorrectionAppliedCount int
}
PhaseInput defines Court runtime data.
type PhaseResult ¶
type PhaseResult struct {
Phase Phase `json:"phase"`
Blocked bool `json:"blocked"`
BlockedRequiredCount int `json:"blocked_required_count"`
JurorTotalCount int `json:"juror_total_count"`
JurorReadyCount int `json:"juror_ready_count"`
JurorRunningCount int `json:"juror_running_count"`
ClerkPresent bool `json:"clerk_present"`
JudgePresent bool `json:"judge_present"`
CanInlineReview bool `json:"can_inline_review"`
CanFinalizeVerdict bool `json:"can_finalize_verdict"`
}
PhaseResult defines Court runtime data.
func EvaluatePhase ¶
func EvaluatePhase(input PhaseInput, participants []ParticipantState) PhaseResult
EvaluatePhase provides Court runtime functionality.
type PlanArtifact ¶
type PlanArtifact struct {
Headline string `json:"headline"`
Summary string `json:"summary"`
OperatorPrompt string `json:"operator_prompt"`
CreatedAt time.Time `json:"created_at"`
Elements []PlanElement `json:"elements"`
}
PlanArtifact defines Court runtime data.
func BuildPlan ¶
func BuildPlan(task string) PlanArtifact
BuildPlan provides Court runtime functionality.
type PlanElement ¶
type PlanElement struct {
ID string `json:"id"`
Title string `json:"title"`
Detail string `json:"detail"`
Keywords []string `json:"keywords,omitempty"`
}
PlanElement defines Court runtime data.
type Preset ¶
type Preset struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Workflow WorkflowMode `json:"workflow"`
Roles []Role `json:"roles"`
}
Preset defines Court runtime data.
func ListConfigPresetsFromRoots ¶
ListConfigPresetsFromRoots provides Court runtime functionality.
func ListMarkdownPresets ¶
ListMarkdownPresets provides Court runtime functionality.
func ListMarkdownPresetsFromRoots ¶
ListMarkdownPresetsFromRoots provides Court runtime functionality.
func LoadConfigPresetFromRoots ¶
LoadConfigPresetFromRoots provides Court runtime functionality.
func LoadPreset ¶
LoadPreset provides Court runtime functionality.
func LoadPresetFromRoots ¶
LoadPresetFromRoots provides Court runtime functionality.
func ResolvePreset ¶
ResolvePreset provides Court runtime functionality.
type PromotedThreadResult ¶
type PromotedThreadResult struct {
RunID string `json:"run_id"`
WorkerID string `json:"worker_id"`
Thread contract.TrackedThread `json:"thread"`
}
type Role ¶
type Role struct {
ID string `json:"id"`
Kind RoleKind `json:"kind"`
Title string `json:"title"`
Brief string `json:"brief"`
Backend string `json:"backend,omitempty"`
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
ModelOptions RuntimeModelOptions `json:"model_options,omitempty"`
Agent string `json:"agent,omitempty"`
Backends map[string]RuntimeBackendConfig `json:"backends,omitempty"`
}
Role defines Court runtime data.
func ListRolesFromRoots ¶
ListRolesFromRoots provides Court runtime functionality.
func LoadConfigRoleFromRoots ¶
LoadConfigRoleFromRoots provides Court runtime functionality.
type RoleSummary ¶
type RoleSummary struct {
ID string `json:"id"`
Kind RoleKind `json:"kind"`
Title string `json:"title"`
Brief string `json:"brief,omitempty"`
Backend string `json:"backend,omitempty"`
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
}
RoleSummary defines Court runtime data.
type Run ¶
type Run struct {
ID string `json:"id"`
CourtID string `json:"court_id,omitempty"`
Task string `json:"task"`
Preset string `json:"preset"`
Workflow WorkflowMode `json:"workflow"`
DelegationScope DelegationScope `json:"delegation_scope"`
Backend string `json:"backend"`
Model string `json:"model,omitempty"`
ModelOptions RuntimeModelOptions `json:"model_options,omitempty"`
DefaultProvider string `json:"default_provider,omitempty"`
DefaultModel string `json:"default_model,omitempty"`
DefaultModelOptions RuntimeModelOptions `json:"default_model_options,omitempty"`
Workspace string `json:"workspace"`
Status RunStatus `json:"status"`
Phase Phase `json:"phase"`
Verdict string `json:"verdict,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
CompletedAt time.Time `json:"completed_at,omitempty"`
}
Run defines Court runtime data.
type RunStatus ¶
type RunStatus = orchestration.RunStatus
type RunStatusView ¶
type RunStatusView = orchestration.RunStatusView[Run, Worker]
type RunTrace ¶
type RunTrace = orchestration.RunTrace[Run, WorkerTrace, Event, Artifact]
type RuntimeBackendConfig ¶
type RuntimeBackendConfig struct {
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
ModelOptions RuntimeModelOptions `json:"model_options,omitempty"`
}
RuntimeBackendConfig defines Court runtime data.
type RuntimeControlPlane ¶
type RuntimeControlPlane interface {
Describe() contract.SystemDescriptor
SubscribeEvents(buffer int) (<-chan contract.RuntimeEvent, func())
StartSession(context.Context, string, api.StartSessionRequest) (*contract.RuntimeSession, error)
ResumeSession(context.Context, string, api.ResumeSessionRequest) (*contract.RuntimeSession, error)
SendInput(context.Context, api.SendInputRequest) (*contract.RuntimeEvent, error)
Interrupt(context.Context, string) (*contract.RuntimeEvent, error)
Respond(context.Context, api.RespondRequest) (*contract.RuntimeEvent, error)
StopSession(context.Context, string) (*contract.RuntimeEvent, error)
ListSessions(context.Context, string) ([]contract.RuntimeSession, error)
GetTrackedSession(context.Context, string, string) (*contract.TrackedSession, error)
GetThread(context.Context, string, string) (*contract.TrackedThread, error)
SetThreadMetadata(context.Context, string, contract.ThreadMetadata) error
}
RuntimeControlPlane defines the runtime boundary Court depends on.
type RuntimeIdentity ¶
type RuntimeIdentity = orchestration.RuntimeIdentity
type RuntimeModelOptions ¶
type RuntimeModelOptions = api.ModelOptions
type RuntimeRequest ¶
type RuntimeRequest = orchestration.RuntimeRequestRecord
type RuntimeRequestAnswer ¶
type RuntimeRequestAnswer = orchestration.RuntimeRequestAnswer
func RuntimeRequestAnswersFromJSON ¶
func RuntimeRequestAnswersFromJSON(raw string) ([]RuntimeRequestAnswer, error)
RuntimeRequestAnswersFromJSON provides Court runtime functionality.
type RuntimeRequestResponse ¶
type RuntimeRequestResponse = orchestration.RuntimeRequestResponse
type RuntimeRequestResponseResult ¶
type RuntimeRequestResponseResult struct {
Request RuntimeRequest `json:"request"`
Message string `json:"message,omitempty"`
}
RuntimeRequestResponseResult defines Court runtime data.
type RuntimeRequestStatus ¶
type RuntimeRequestStatus = orchestration.RuntimeRequestStatus
type RuntimeResponseStatus ¶
type RuntimeResponseStatus = orchestration.RuntimeResponseStatus
type SetupDefaultsRequest ¶
type SetupDefaultsRequest struct {
Scope SetupScope `json:"scope,omitempty"`
TargetDir string `json:"target_dir,omitempty"`
Workspace string `json:"workspace,omitempty"`
Force bool `json:"force,omitempty"`
DryRun bool `json:"dry_run,omitempty"`
}
SetupDefaultsRequest defines Court runtime data.
type SetupDefaultsResult ¶
type SetupDefaultsResult struct {
Scope SetupScope `json:"scope"`
TargetDir string `json:"target_dir"`
Files []SetupFileResult `json:"files"`
PresetCount int `json:"preset_count"`
JuryCount int `json:"jury_count"`
RoleCount int `json:"role_count"`
AgentCount int `json:"agent_count"`
CreatedCount int `json:"created_count"`
UpdatedCount int `json:"updated_count"`
SkippedCount int `json:"skipped_count"`
DryRun bool `json:"dry_run,omitempty"`
}
SetupDefaultsResult defines Court runtime data.
func SetupDefaults ¶
func SetupDefaults(req SetupDefaultsRequest) (SetupDefaultsResult, error)
SetupDefaults provides Court runtime functionality.
type SetupFileAction ¶
type SetupFileAction string
SetupFileAction defines Court runtime data.
const ( // SetupFileCreated defines a Court runtime value. SetupFileCreated SetupFileAction = "created" // SetupFileOverwritten defines a Court runtime value. SetupFileOverwritten SetupFileAction = "overwritten" // SetupFileSkipped defines a Court runtime value. SetupFileSkipped SetupFileAction = "skipped" // SetupFileWouldCreate defines a Court runtime value. SetupFileWouldCreate SetupFileAction = "would_create" // SetupFileWouldOverwrite defines a Court runtime value. SetupFileWouldOverwrite SetupFileAction = "would_overwrite" // SetupFileWouldSkip defines a Court runtime value. SetupFileWouldSkip SetupFileAction = "would_skip" )
type SetupFileResult ¶
type SetupFileResult struct {
Path string `json:"path"`
Action SetupFileAction `json:"action"`
}
SetupFileResult defines Court runtime data.
func WriteDefaultConfig ¶
func WriteDefaultConfig(scope SetupScope, targetDir string, workspace string, backend string, model string, force bool, dryRun bool) (SetupFileResult, error)
WriteDefaultConfig provides Court runtime functionality.
type SetupScope ¶
type SetupScope string
SetupScope defines Court runtime data.
const ( // SetupScopeGlobal defines a Court runtime value. SetupScopeGlobal SetupScope = "global" // SetupScopeProject defines a Court runtime value. SetupScopeProject SetupScope = "project" )
type StartRunOptions ¶
type StartRunOptions struct {
Task string
Preset string
Workflow string
DelegationScope string
Backend string
Workspace string
Model string
ModelOptions RuntimeModelOptions
Selection *contract.ModelSelection
}
StartRunOptions defines Court runtime data.
type StartRunRequest ¶
type StartRunRequest struct {
Task string
Preset string
CourtID string
Workflow WorkflowMode
DelegationScope DelegationScope
Backend string
Workspace string
Model string
ModelOptions RuntimeModelOptions
Selection *contract.ModelSelection
}
StartRunRequest defines Court runtime data.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store defines Court runtime data.
func (*Store) AddArtifact ¶
AddArtifact provides Court runtime functionality.
func (*Store) AddWorkerControl ¶
func (s *Store) AddWorkerControl(ctx context.Context, runID string, workerID string, action WorkerControlAction) (WorkerControlRequest, error)
AddWorkerControl provides Court runtime functionality.
func (*Store) ArchiveWorkerAttempt ¶
ArchiveWorkerAttempt provides Court runtime functionality.
func (*Store) CompletePendingWorkerControls ¶
func (s *Store) CompletePendingWorkerControls(ctx context.Context, workerID string, status WorkerControlStatus, errText string) error
CompletePendingWorkerControls provides Court runtime functionality.
func (*Store) CompleteRuntimeRequestResponse ¶
func (s *Store) CompleteRuntimeRequestResponse(ctx context.Context, id int64, status RuntimeResponseStatus, responseJSON string, errText string) error
CompleteRuntimeRequestResponse provides Court runtime functionality.
func (*Store) CompleteWorker ¶
func (s *Store) CompleteWorker(ctx context.Context, workerID string, status WorkerStatus, result string, resultJSON string, errText string) error
CompleteWorker provides Court runtime functionality.
func (*Store) CompleteWorkerControl ¶
func (s *Store) CompleteWorkerControl(ctx context.Context, id int64, status WorkerControlStatus, errText string) error
CompleteWorkerControl provides Court runtime functionality.
func (*Store) CreateWorker ¶
CreateWorker provides Court runtime functionality.
func (*Store) GetRuntimeRequest ¶
GetRuntimeRequest provides Court runtime functionality.
func (*Store) ListArtifacts ¶
ListArtifacts provides Court runtime functionality.
func (*Store) ListEvents ¶
ListEvents provides Court runtime functionality.
func (*Store) ListPendingWorkerControls ¶
func (s *Store) ListPendingWorkerControls(ctx context.Context, workerID string) ([]WorkerControlRequest, error)
ListPendingWorkerControls provides Court runtime functionality.
func (*Store) ListQueuedRuntimeRequestResponses ¶
func (s *Store) ListQueuedRuntimeRequestResponses(ctx context.Context, workerID string) ([]RuntimeRequest, error)
ListQueuedRuntimeRequestResponses provides Court runtime functionality.
func (*Store) ListRuntimeRequests ¶
func (s *Store) ListRuntimeRequests(ctx context.Context, runID string, status RuntimeRequestStatus) ([]RuntimeRequest, error)
ListRuntimeRequests provides Court runtime functionality.
func (*Store) ListWorkerAttempts ¶
ListWorkerAttempts provides Court runtime functionality.
func (*Store) ListWorkerControls ¶
func (s *Store) ListWorkerControls(ctx context.Context, runID string) ([]WorkerControlRequest, error)
ListWorkerControls provides Court runtime functionality.
func (*Store) ListWorkers ¶
ListWorkers provides Court runtime functionality.
func (*Store) QueueRuntimeRequestResponse ¶
func (s *Store) QueueRuntimeRequestResponse(ctx context.Context, id int64, response RuntimeRequestResponse) error
QueueRuntimeRequestResponse provides Court runtime functionality.
func (*Store) ReactivateRun ¶
ReactivateRun provides Court runtime functionality.
func (*Store) ResetWorkerForRetry ¶
ResetWorkerForRetry provides Court runtime functionality.
func (*Store) UpdateRunPhase ¶
UpdateRunPhase provides Court runtime functionality.
func (*Store) UpdateRunStatus ¶
func (s *Store) UpdateRunStatus(ctx context.Context, runID string, status RunStatus, verdict string) error
UpdateRunStatus provides Court runtime functionality.
func (*Store) UpdateWorkerRunning ¶
UpdateWorkerRunning provides Court runtime functionality.
func (*Store) UpdateWorkerRuntimeIdentity ¶
func (s *Store) UpdateWorkerRuntimeIdentity(ctx context.Context, workerID string, identity RuntimeIdentity) error
UpdateWorkerRuntimeIdentity provides Court runtime functionality.
func (*Store) UpsertRuntimeRequest ¶
func (s *Store) UpsertRuntimeRequest(ctx context.Context, request RuntimeRequest) error
UpsertRuntimeRequest provides Court runtime functionality.
type UsageSummary ¶
type UsageSummary struct {
TotalUsage contract.TokenUsage `json:"total_usage,omitempty"`
TotalCostUSD float64 `json:"total_cost_usd,omitempty"`
ByModel []contract.TokenUsageBreakdown `json:"by_model,omitempty"`
ByMode []contract.TokenUsageBreakdown `json:"by_mode,omitempty"`
CostByModel []contract.CostBreakdown `json:"cost_by_model,omitempty"`
CostByMode []contract.CostBreakdown `json:"cost_by_mode,omitempty"`
ByWorker []WorkerUsage `json:"by_worker,omitempty"`
}
func UsageSummaryFromTrace ¶
func UsageSummaryFromTrace(trace RunTrace) UsageSummary
type WatchOptions ¶
type WatchOptions = orchestration.WatchOptions[Run, Event]
type WatchUpdate ¶
type WatchUpdate = orchestration.WatchUpdate[Run, Event]
type Worker ¶
type Worker struct {
ID string `json:"id"`
RunID string `json:"run_id"`
LaunchID string `json:"launch_id"`
Attempt int `json:"attempt"`
RoleID string `json:"role_id"`
RoleKind RoleKind `json:"role_kind"`
RoleTitle string `json:"role_title"`
Backend string `json:"backend"`
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
ModelOptions RuntimeModelOptions `json:"model_options,omitempty"`
Agent string `json:"agent,omitempty"`
Status WorkerStatus `json:"status"`
RuntimeSessionID string `json:"runtime_session_id,omitempty"`
RuntimeProviderSessionID string `json:"runtime_provider_session_id,omitempty"`
RuntimeTranscriptPath string `json:"runtime_transcript_path,omitempty"`
RuntimePID int `json:"runtime_pid,omitempty"`
Result string `json:"result,omitempty"`
ResultJSON string `json:"result_json,omitempty"`
Error string `json:"error,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
CompletedAt time.Time `json:"completed_at,omitempty"`
}
Worker defines Court runtime data.
type WorkerAttempt ¶
type WorkerAttempt struct {
ID int64 `json:"id"`
WorkerID string `json:"worker_id"`
RunID string `json:"run_id"`
Attempt int `json:"attempt"`
LaunchID string `json:"launch_id"`
RoleID string `json:"role_id"`
RoleKind RoleKind `json:"role_kind"`
RoleTitle string `json:"role_title"`
Backend string `json:"backend"`
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
ModelOptions RuntimeModelOptions `json:"model_options,omitempty"`
Agent string `json:"agent,omitempty"`
Status WorkerStatus `json:"status"`
RuntimeSessionID string `json:"runtime_session_id,omitempty"`
RuntimeProviderSessionID string `json:"runtime_provider_session_id,omitempty"`
RuntimeTranscriptPath string `json:"runtime_transcript_path,omitempty"`
RuntimePID int `json:"runtime_pid,omitempty"`
Result string `json:"result,omitempty"`
ResultJSON string `json:"result_json,omitempty"`
Error string `json:"error,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
CompletedAt time.Time `json:"completed_at,omitempty"`
ArchivedAt time.Time `json:"archived_at"`
}
type WorkerControlAction ¶
type WorkerControlAction = orchestration.WorkerControlAction
type WorkerControlRequest ¶
type WorkerControlRequest = orchestration.WorkerControlRequest
WorkerControlRequest defines Court runtime data.
type WorkerControlResult ¶
type WorkerControlResult struct {
Worker Worker `json:"worker"`
Action WorkerControlAction `json:"action"`
Status WorkerControlStatus `json:"status"`
RuntimeSessionID string `json:"runtime_session_id,omitempty"`
RuntimeProviderSessionID string `json:"runtime_provider_session_id,omitempty"`
Message string `json:"message,omitempty"`
Error string `json:"error,omitempty"`
}
WorkerControlResult defines Court runtime data.
type WorkerControlStatus ¶
type WorkerControlStatus = orchestration.WorkerControlStatus
type WorkerResult ¶
type WorkerResult struct {
SchemaVersion int `json:"schema_version"`
Summary string `json:"summary"`
Findings []string `json:"findings"`
Risks []string `json:"risks"`
NextActions []string `json:"next_actions"`
Verdict string `json:"verdict"`
Confidence string `json:"confidence"`
}
WorkerResult defines Court runtime data.
type WorkerStatus ¶
type WorkerStatus = orchestration.WorkerStatus
type WorkerTrace ¶
type WorkerTrace = orchestration.WorkerTrace[Worker, WorkerAttempt, WorkerResult, WorkerControlRequest, RuntimeRequest, Event, Artifact, contract.TrackedSession]
type WorkerUsage ¶
type WorkerUsage struct {
WorkerID string `json:"worker_id"`
RoleID string `json:"role_id"`
RoleTitle string `json:"role_title"`
Backend string `json:"backend"`
Model string `json:"model,omitempty"`
RuntimeSessionID string `json:"runtime_session_id,omitempty"`
ProviderSessionID string `json:"provider_session_id,omitempty"`
Usage contract.TokenUsage `json:"usage,omitempty"`
CostUSD float64 `json:"cost_usd,omitempty"`
UsageByModel []contract.TokenUsageBreakdown `json:"usage_by_model,omitempty"`
UsageByMode []contract.TokenUsageBreakdown `json:"usage_by_mode,omitempty"`
CostByModel []contract.CostBreakdown `json:"cost_by_model,omitempty"`
CostByMode []contract.CostBreakdown `json:"cost_by_mode,omitempty"`
}
type WorkflowMode ¶
type WorkflowMode string
WorkflowMode defines Court runtime data.
const ( // WorkflowParallelConsensus defines a Court runtime value. WorkflowParallelConsensus WorkflowMode = "parallel_consensus" // WorkflowRouted defines a Court runtime value. WorkflowRouted WorkflowMode = "routed" // WorkflowRoleScoped defines a Court runtime value. WorkflowRoleScoped WorkflowMode = "role_scoped" // WorkflowBoundedCorrection defines a Court runtime value. WorkflowBoundedCorrection WorkflowMode = "bounded_correction" // WorkflowReviewOnly defines a Court runtime value. WorkflowReviewOnly WorkflowMode = "review_only" )
func ParseWorkflowMode ¶
func ParseWorkflowMode(value string) (WorkflowMode, bool)
ParseWorkflowMode provides Court runtime functionality.
func ResolveWorkflowMode ¶
func ResolveWorkflowMode(value string, fallback WorkflowMode) WorkflowMode
ResolveWorkflowMode provides Court runtime functionality.