Documentation
¶
Index ¶
- func NativeCheckpointUsage(ctx context.Context, store agentcore.Store, appID, runID string) (json.RawMessage, error)
- func NativeInterruptedEffects(ctx context.Context, store agentcore.Store, appID, runID string) (json.RawMessage, error)
- type Adapter
- type ArtifactWriter
- type EinoAgenticModelFactory
- type EinoChatModelFactory
- type EinoProviderFactory
- type Event
- type EventSink
- type ExecutionContext
- type InteractionBroker
- type NativeAdapter
- type NativeBlock
- type NativeConfig
- type NativeContextPolicy
- type NativeMessage
- type NativeModel
- type NativeModelFactory
- type NativeModelRequest
- type NativeModelResponse
- type NativeModelStream
- type NativeProviderState
- type NativeStreamingModel
- type NativeSummaryModel
- type NativeUsage
- type ProviderCapability
- type ProviderContinuation
- type Registry
- type Result
- type TypeSafeReviewer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NativeCheckpointUsage ¶
func NativeCheckpointUsage(ctx context.Context, store agentcore.Store, appID, runID string) (json.RawMessage, error)
NativeCheckpointUsage recovers durable usage even if execution returned an error.
func NativeInterruptedEffects ¶ added in v0.11.2
func NativeInterruptedEffects(ctx context.Context, store agentcore.Store, appID, runID string) (json.RawMessage, error)
NativeInterruptedEffects exposes checkpointed uncertainties to cancellation summaries and successor context without returning private provider state.
Types ¶
type Adapter ¶
type Adapter interface {
Kind() string
Execute(ctx *ExecutionContext) (*Result, error)
}
type ArtifactWriter ¶
type ArtifactWriter interface {
WriteArtifact(ctx context.Context, artifact agentcore.AgentRunArtifact) error
}
type EinoAgenticModelFactory ¶
type EinoAgenticModelFactory struct {
Model einomodel.AgenticModel
Provider string
}
func (EinoAgenticModelFactory) ResolveNativeModel ¶
func (f EinoAgenticModelFactory) ResolveNativeModel(ctx context.Context, execCtx *ExecutionContext, definitions []tools.Definition) (NativeModel, error)
type EinoChatModelFactory ¶
type EinoChatModelFactory struct {
Model einomodel.ToolCallingChatModel
}
func (EinoChatModelFactory) ResolveNativeModel ¶
func (f EinoChatModelFactory) ResolveNativeModel(ctx context.Context, execCtx *ExecutionContext, definitions []tools.Definition) (NativeModel, error)
type EinoProviderFactory ¶
type EinoProviderFactory struct {
AnthropicAPIKey string
AnthropicBaseURL string
OpenAIAPIKey string
OpenAIBaseURL string
OpenRouterAPIKey string
OpenRouterBaseURL string
DefaultProvider string
DefaultModel string
MaxTokens int
}
func (EinoProviderFactory) ResolveNativeModel ¶
func (f EinoProviderFactory) ResolveNativeModel(ctx context.Context, execCtx *ExecutionContext, definitions []tools.Definition) (NativeModel, error)
type ExecutionContext ¶
type ExecutionContext struct {
ModelCredentials *modelauth.Manager
Context context.Context
AppID string
Agent *agentcore.Agent
Run *agentcore.AgentRun
Store agentcore.Store
TargetContext *host.TargetContext
WorkspaceLease *agentcore.WorkspaceLease
AllowedTools map[string]bool
Tools *tools.Registry
WorkspaceManager tools.WorkspaceManager
SkillRefs []agentcore.SkillRef
SkillDefinitions []skills.Definition
AvailableSkillRefs []agentcore.SkillRef
AvailableSkillDefinitions []skills.Definition
SkillInstructions string
SkillPolicy skills.Policy
UsesSplitSkills bool
StagedSkillRoot string
ArtifactWriter ArtifactWriter
InteractionBroker InteractionBroker
EventSink EventSink
MCPBrokerURL string
MCPBrokerToken string
}
type InteractionBroker ¶
type InteractionBroker interface {
RequestInteraction(ctx context.Context, interaction agentcore.AgentRunInteraction) error
}
type NativeAdapter ¶
type NativeAdapter struct {
// contains filtered or unexported fields
}
func NewNativeAdapter ¶
func NewNativeAdapter() *NativeAdapter
func NewNativeAdapterWithConfig ¶
func NewNativeAdapterWithConfig(cfg NativeConfig) *NativeAdapter
func (*NativeAdapter) Execute ¶
func (a *NativeAdapter) Execute(execCtx *ExecutionContext) (*Result, error)
func (*NativeAdapter) Kind ¶
func (a *NativeAdapter) Kind() string
type NativeBlock ¶
type NativeBlock struct {
Type string `json:"type"`
Text string `json:"text,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
ToolName string `json:"tool_name,omitempty"`
Input json.RawMessage `json:"input,omitempty"`
Output string `json:"output,omitempty"`
IsError bool `json:"is_error,omitempty"`
FinishRejected bool `json:"-"`
}
type NativeConfig ¶
type NativeConfig struct {
Reviewer *TypeSafeReviewer
ModelFactory NativeModelFactory
MaxToolSteps int
}
func DefaultNativeConfigFromEnv ¶
func DefaultNativeConfigFromEnv() NativeConfig
type NativeContextPolicy ¶
type NativeContextPolicy struct {
Enabled bool `json:"enabled"`
ContextWindow int `json:"context_window,omitempty"`
InputLimit int `json:"input_limit,omitempty"`
MaxOutputTokens int `json:"max_output_tokens,omitempty"`
TriggerTokens int `json:"trigger_tokens,omitempty"`
KeepRecentTokens int `json:"keep_recent_tokens,omitempty"`
UserAnchorTokens int `json:"user_anchor_tokens,omitempty"`
SummaryTokens int `json:"summary_tokens,omitempty"`
SafetyTokens int `json:"safety_tokens,omitempty"`
MaxTotalTokens int64 `json:"max_total_tokens,omitempty"`
}
NativeContextPolicy is opt-in until a provider/model's limits are configured.
type NativeMessage ¶
type NativeMessage struct {
ProviderState *NativeProviderState `json:"provider_state,omitempty"`
Role string `json:"role"`
Content string `json:"content,omitempty"`
ReasoningContent string `json:"reasoning_content,omitempty"`
Blocks []NativeBlock `json:"blocks,omitempty"`
ContextSummary bool `json:"context_summary,omitempty"`
// Provenance is checkpoint metadata; it is not a provider role. Empty is
// retained for old checkpoints and must not be upgraded to known human.
Provenance string `json:"provenance,omitempty"`
}
type NativeModel ¶
type NativeModel interface {
Generate(ctx context.Context, req NativeModelRequest) (*NativeModelResponse, error)
}
type NativeModelFactory ¶
type NativeModelFactory interface {
ResolveNativeModel(ctx context.Context, execCtx *ExecutionContext, definitions []tools.Definition) (NativeModel, error)
}
type NativeModelRequest ¶
type NativeModelRequest struct {
SystemPrompt string `json:"system_prompt,omitempty"`
Messages []NativeMessage `json:"messages"`
Tools []tools.Definition `json:"tools,omitempty"`
Step int `json:"step"`
}
type NativeModelResponse ¶
type NativeModelResponse struct {
Message NativeMessage `json:"message"`
Usage NativeUsage `json:"usage,omitempty"`
Continuation *ProviderContinuation `json:"continuation,omitempty"`
Incomplete bool `json:"incomplete,omitempty"`
}
type NativeModelStream ¶
type NativeModelStream interface {
Recv() (*NativeModelResponse, error)
Close()
}
type NativeProviderState ¶
type NativeProviderState struct {
Provider string `json:"provider"`
Reasoning json.RawMessage `json:"reasoning"`
}
NativeProviderState is internal checkpoint state, not displayable reasoning.
type NativeStreamingModel ¶
type NativeStreamingModel interface {
Stream(ctx context.Context, req NativeModelRequest) (NativeModelStream, error)
}
type NativeSummaryModel ¶
type NativeSummaryModel interface {
Summarize(context.Context, string, int) (*NativeModelResponse, error)
}
NativeSummaryModel generates a bounded summary without exposing tools.
type NativeUsage ¶
type ProviderCapability ¶
type ProviderCapability struct {
Protocols []string `json:"protocols,omitempty"`
Controls []string `json:"controls,omitempty"`
TranscriptContinuation bool `json:"transcript_continuation"`
LosslessResponseReplay bool `json:"lossless_response_replay"`
AuthModes []string `json:"auth_modes"`
RunCredentialsConfigured bool `json:"run_credentials_configured"`
Name string `json:"name"`
Configured bool `json:"configured"`
DefaultModel string `json:"default_model"`
BaseURLOverridden bool `json:"base_url_overridden"`
}
ProviderCapability reports whether a native-SDK model provider is configured (i.e. its API key is present) along with the default model it would use.
func NativeProviderCapabilities ¶
func NativeProviderCapabilities() []ProviderCapability
NativeProviderCapabilities returns the configuration state of each supported native-SDK provider, derived from the environment. It is the single source of truth for which providers/models the runtime would use.
type ProviderContinuation ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
type TypeSafeReviewer ¶ added in v0.11.2
type TypeSafeReviewer struct {
APIKey string
Model string
EvaluatedModel string
AskedThreshold float64
HazardThreshold float64
EscalationThreshold float64
AutoApprove bool
Client *http.Client
}
TypeSafeReviewer is operator-owned configuration, independent of run models. Enabling it discloses selected command/repository context to TypeSafe.
Source Files
¶
- fallback.go
- helpers.go
- native.go
- native_call_marker.go
- native_chatgpt.go
- native_checkpoint.go
- native_context.go
- native_eino_agentic.go
- native_eino_model.go
- native_eino_provider.go
- native_eino_schema.go
- native_exec.go
- native_interaction.go
- native_messages.go
- native_model_controls.go
- native_model_visibility.go
- native_provider_state.go
- native_reconcile.go
- native_recovery.go
- native_repo_instructions.go
- native_resume.go
- native_summary_model.go
- native_tool_names.go
- native_user_anchors.go
- native_workspace_recovery.go
- runtime.go
- turn_answer.go
- turn_completion.go
- typesafe_repository.go
- typesafe_review.go
- workdir.go