Documentation
¶
Index ¶
- Constants
- func EventDeltaText(event RuntimeEvent) string
- func EventErrorText(event RuntimeEvent) string
- func EventFinalText(event RuntimeEvent) string
- func EventPayloadString(event RuntimeEvent, key string) string
- func IsRequestEvent(event RuntimeEvent) bool
- func IsTerminalTurnEvent(event RuntimeEvent) bool
- func IsTurnCompletedEvent(event RuntimeEvent) bool
- func IsTurnErroredEvent(event RuntimeEvent) bool
- func PayloadString(payload map[string]any, key string) string
- type AuthProbe
- type HarnessEvent
- type Ownership
- type PendingRequest
- type PlanStep
- type RequestAnswer
- type RequestKind
- type RequestOption
- type RequestQuestion
- type RequestStatus
- type RequestToolContext
- type RespondAction
- type RuntimeCapabilities
- type RuntimeDescriptor
- type RuntimeEvent
- type RuntimeModel
- type RuntimeModelCapabilities
- type RuntimeModelOption
- type RuntimeProbe
- type RuntimeSession
- type SessionState
- type SessionStatus
- type SystemDescriptor
- type TokenUsage
- type Transport
Constants ¶
View Source
const ( ControlPlaneSchemaVersion = "agentic-control.control-plane.v1" HarnessSchemaVersion = "agentic-control.harness.v1" WireProtocolVersion = "agentic-control.rpc.v1" )
View Source
const ( EventAssistantMessageDelta = "assistant.message.delta" EventAssistantThoughtDelta = "assistant.thought.delta" EventTurnStarted = "turn.started" EventTurnCompleted = "turn.completed" EventTurnErrored = "turn.errored" EventTurnInterrupted = "turn.interrupted" EventTurnPlanUpdated = "turn.plan.updated" EventThreadTokenUsageUpdated = "thread.token-usage.updated" EventToolStarted = "tool.started" EventToolProgress = "tool.progress" EventToolCompleted = "tool.completed" EventToolErrored = "tool.errored" EventSessionStarted = "session.started" EventSessionStopped = "session.stopped" EventSessionErrored = "session.errored" EventSessionModeChanged = "session.mode.changed" EventRequestOpened = "request.opened" EventRequestResponded = "request.responded" EventRequestResolved = "request.resolved" EventRequestClosed = "request.closed" EventRuntimeEvent = "runtime.event" EventRuntimeDecodeError = "runtime.decode_error" EventRuntimeStderr = "runtime.stderr" )
Variables ¶
This section is empty.
Functions ¶
func EventDeltaText ¶ added in v0.4.5
func EventDeltaText(event RuntimeEvent) string
func EventErrorText ¶ added in v0.4.5
func EventErrorText(event RuntimeEvent) string
func EventFinalText ¶ added in v0.4.5
func EventFinalText(event RuntimeEvent) string
func EventPayloadString ¶ added in v0.4.5
func EventPayloadString(event RuntimeEvent, key string) string
func IsRequestEvent ¶ added in v0.4.5
func IsRequestEvent(event RuntimeEvent) bool
func IsTerminalTurnEvent ¶ added in v0.4.5
func IsTerminalTurnEvent(event RuntimeEvent) bool
func IsTurnCompletedEvent ¶ added in v0.4.5
func IsTurnCompletedEvent(event RuntimeEvent) bool
func IsTurnErroredEvent ¶ added in v0.4.5
func IsTurnErroredEvent(event RuntimeEvent) bool
Types ¶
type HarnessEvent ¶
type HarnessEvent struct {
SchemaVersion string `json:"schema_version"`
RecordedAtMS int64 `json:"recorded_at_ms"`
Runtime string `json:"runtime"`
Provenance string `json:"provenance"`
NativeEventName string `json:"native_event_name"`
EventType string `json:"event_type"`
Summary string `json:"summary"`
SessionID *string `json:"session_id,omitempty"`
TurnID *string `json:"turn_id,omitempty"`
ToolCallID *string `json:"tool_call_id,omitempty"`
ToolName *string `json:"tool_name,omitempty"`
Command *string `json:"command,omitempty"`
PromptText *string `json:"prompt_text,omitempty"`
CWD *string `json:"cwd,omitempty"`
Model *string `json:"model,omitempty"`
TranscriptPath *string `json:"transcript_path,omitempty"`
SessionSource *string `json:"session_source,omitempty"`
PermissionMode *string `json:"permission_mode,omitempty"`
Reason *string `json:"reason,omitempty"`
ExitCode *int `json:"exit_code,omitempty"`
StopHookActive *bool `json:"stop_hook_active,omitempty"`
RuntimePID *int `json:"runtime_pid,omitempty"`
Bindings map[string]string `json:"bindings,omitempty"`
}
type PendingRequest ¶
type PendingRequest struct {
SchemaVersion string `json:"schema_version"`
RequestID string `json:"request_id"`
SessionID string `json:"session_id"`
Runtime string `json:"runtime"`
Kind RequestKind `json:"kind"`
NativeMethod string `json:"native_method"`
Status RequestStatus `json:"status"`
Summary string `json:"summary,omitempty"`
TurnID string `json:"turn_id,omitempty"`
CreatedAtMS int64 `json:"created_at_ms"`
Tool *RequestToolContext `json:"tool,omitempty"`
Options []RequestOption `json:"options,omitempty"`
Questions []RequestQuestion `json:"questions,omitempty"`
Extensions map[string]any `json:"extensions,omitempty"`
}
type RequestAnswer ¶
type RequestKind ¶
type RequestKind string
const ( RequestApprovalTool RequestKind = "approval.tool" RequestApprovalCommand RequestKind = "approval.command" RequestApprovalFileChange RequestKind = "approval.file_change" RequestApprovalPermissions RequestKind = "approval.permissions" RequestUserInputTool RequestKind = "user_input.tool" RequestUserInputMCP RequestKind = "user_input.mcp" RequestGeneric RequestKind = "request" )
type RequestOption ¶
type RequestQuestion ¶
type RequestQuestion struct {
ID string `json:"id"`
Prompt string `json:"prompt"`
Description string `json:"description,omitempty"`
Required bool `json:"required,omitempty"`
Options []RequestOption `json:"options,omitempty"`
}
type RequestStatus ¶
type RequestStatus string
const ( RequestStatusOpen RequestStatus = "open" RequestStatusResponded RequestStatus = "responded" RequestStatusResolved RequestStatus = "resolved" RequestStatusClosed RequestStatus = "closed" )
func RequestStatusFromEvent ¶ added in v0.4.5
func RequestStatusFromEvent(event RuntimeEvent) RequestStatus
type RequestToolContext ¶
type RespondAction ¶
type RespondAction string
const ( RespondActionAllow RespondAction = "allow" RespondActionDeny RespondAction = "deny" RespondActionSubmit RespondAction = "submit" RespondActionCancel RespondAction = "cancel" RespondActionChoose RespondAction = "choose" )
type RuntimeCapabilities ¶
type RuntimeCapabilities struct {
StartSession bool `json:"start_session"`
ResumeSession bool `json:"resume_session"`
SendInput bool `json:"send_input"`
Interrupt bool `json:"interrupt"`
Respond bool `json:"respond"`
StopSession bool `json:"stop_session"`
ListSessions bool `json:"list_sessions"`
StreamEvents bool `json:"stream_events"`
ApprovalRequests bool `json:"approval_requests"`
UserInputRequests bool `json:"user_input_requests"`
ImmediateProviderSession bool `json:"immediate_provider_session"`
ResumeByProviderID bool `json:"resume_by_provider_id"`
AdoptExternalSessions bool `json:"adopt_external_sessions"`
}
type RuntimeDescriptor ¶
type RuntimeDescriptor struct {
SchemaVersion string `json:"schema_version"`
Runtime string `json:"runtime"`
Ownership Ownership `json:"ownership"`
Transport Transport `json:"transport"`
Capabilities RuntimeCapabilities `json:"capabilities"`
Probe *RuntimeProbe `json:"probe,omitempty"`
}
func NewRuntimeDescriptor ¶
func NewRuntimeDescriptor( runtime string, ownership Ownership, transport Transport, capabilities RuntimeCapabilities, ) RuntimeDescriptor
type RuntimeEvent ¶
type RuntimeEvent struct {
SchemaVersion string `json:"schema_version"`
EventID string `json:"event_id"`
RecordedAtMS int64 `json:"recorded_at_ms"`
Runtime string `json:"runtime"`
SessionID string `json:"session_id"`
ProviderSessionID string `json:"provider_session_id,omitempty"`
Transport Transport `json:"transport"`
Ownership Ownership `json:"ownership"`
EventType string `json:"event_type"`
NativeEventName string `json:"native_event_name,omitempty"`
Summary string `json:"summary"`
TurnID string `json:"turn_id,omitempty"`
RequestID string `json:"request_id,omitempty"`
SessionState *SessionState `json:"session_state,omitempty"`
Payload map[string]any `json:"payload,omitempty"`
Request *PendingRequest `json:"request,omitempty"`
}
func NewRuntimeEvent ¶
func NewRuntimeEvent( session RuntimeSession, eventType string, nativeEventName string, turnID string, summary string, payload map[string]any, ) RuntimeEvent
type RuntimeModel ¶ added in v0.4.7
type RuntimeModelCapabilities ¶ added in v0.4.7
type RuntimeModelCapabilities struct {
ReasoningEffortLevels []RuntimeModelOption `json:"reasoning_effort_levels,omitempty"`
ContextWindowOptions []RuntimeModelOption `json:"context_window_options,omitempty"`
VariantOptions []RuntimeModelOption `json:"variant_options,omitempty"`
AgentOptions []RuntimeModelOption `json:"agent_options,omitempty"`
PromptInjectedEfforts []string `json:"prompt_injected_efforts,omitempty"`
SupportsFastMode bool `json:"supports_fast_mode,omitempty"`
SupportsThinkingToggle bool `json:"supports_thinking_toggle,omitempty"`
SupportsThinkingLevel bool `json:"supports_thinking_level,omitempty"`
SupportsThinkingBudget bool `json:"supports_thinking_budget,omitempty"`
SupportedThinkingLevels []string `json:"supported_thinking_levels,omitempty"`
SupportedThinkingBudgets []int `json:"supported_thinking_budgets,omitempty"`
}
type RuntimeModelOption ¶ added in v0.4.7
type RuntimeProbe ¶ added in v0.4.7
type RuntimeProbe struct {
Installed bool `json:"installed"`
Status string `json:"status"`
Version string `json:"version,omitempty"`
BinaryPath string `json:"binary_path,omitempty"`
Auth AuthProbe `json:"auth,omitempty"`
Models []RuntimeModel `json:"models,omitempty"`
ModelSource string `json:"model_source,omitempty"`
Message string `json:"message,omitempty"`
ProbedAtMS int64 `json:"probed_at_ms,omitempty"`
}
type RuntimeSession ¶
type RuntimeSession struct {
SchemaVersion string `json:"schema_version"`
SessionID string `json:"session_id"`
Runtime string `json:"runtime"`
Ownership Ownership `json:"ownership"`
Transport Transport `json:"transport"`
Status SessionStatus `json:"status"`
ProviderSessionID string `json:"provider_session_id,omitempty"`
ActiveTurnID string `json:"active_turn_id,omitempty"`
CWD string `json:"cwd,omitempty"`
Model string `json:"model,omitempty"`
Title string `json:"title,omitempty"`
CreatedAtMS int64 `json:"created_at_ms"`
UpdatedAtMS int64 `json:"updated_at_ms"`
LastActivityAtMS int64 `json:"last_activity_at_ms,omitempty"`
LastError string `json:"last_error,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
func (RuntimeSession) State ¶
func (session RuntimeSession) State() *SessionState
type SessionState ¶
type SessionStatus ¶
type SessionStatus string
const ( SessionStarting SessionStatus = "starting" SessionIdle SessionStatus = "idle" SessionRunning SessionStatus = "running" SessionWaitingApproval SessionStatus = "waiting_approval" SessionWaitingUserInput SessionStatus = "waiting_user_input" SessionInterrupted SessionStatus = "interrupted" SessionStopped SessionStatus = "stopped" SessionErrored SessionStatus = "errored" )
type SystemDescriptor ¶
type SystemDescriptor struct {
SchemaVersion string `json:"schema_version"`
WireProtocolVersion string `json:"wire_protocol_version"`
Methods []string `json:"methods"`
Runtimes []RuntimeDescriptor `json:"runtimes"`
}
type TokenUsage ¶ added in v0.4.7
Click to show internal directories.
Click to hide internal directories.