Documentation
¶
Index ¶
- func CopyRawJSON(src json.RawMessage) json.RawMessage
- type Conversation
- func (c *Conversation) AfterScanRow(ctx context.Context) error
- func (c *Conversation) Delete(ctx context.Context, db bun.IDB) error
- func (c Conversation) GetCursor() string
- func (c Conversation) GetSortField() string
- func (c Conversation) GetSortValue() interface{}
- func (c Conversation) GetUniqueField() string
- func (c Conversation) GetUniqueValue() interface{}
- func (c *Conversation) Insert(ctx context.Context, db bun.IDB) error
- func (c *Conversation) Update(ctx context.Context, db bun.IDB) error
- func (c *Conversation) Validate() error
- type ConversationStatus
- type Harness
- type Spec
- func (pt *Spec) AfterScanRow(ctx context.Context) error
- func (pt *Spec) Delete(ctx context.Context, db bun.IDB) error
- func (pt Spec) GetCursor() string
- func (pt Spec) GetSortField() string
- func (pt Spec) GetSortValue() interface{}
- func (pt Spec) GetUniqueField() string
- func (pt Spec) GetUniqueValue() interface{}
- func (pt *Spec) Insert(ctx context.Context, db bun.IDB) error
- func (pt *Spec) Update(ctx context.Context, db bun.IDB) error
- func (pt *Spec) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyRawJSON ¶ added in v0.3.0
func CopyRawJSON(src json.RawMessage) json.RawMessage
Types ¶
type Conversation ¶
type Conversation struct {
bun.BaseModel `bun:"table:conversations"`
ID uuid.UUID `bun:",pk,type:uuid" json:"id"`
NodeExecutionID uuid.UUID `bun:"type:uuid,nullzero" json:"node_execution_id,omitempty"`
SessionID string `json:"session_id,omitempty"`
AgentName string `json:"agent_name"`
Harness Harness `json:"harness"`
Model string `bun:"model" json:"model"`
HarnessConfig json.RawMessage `bun:"type:jsonb,nullzero" json:"harness_config,omitempty"`
HarnessSessionRef string `json:"harness_session_ref,omitempty"`
HarnessState json.RawMessage `bun:"type:jsonb,nullzero" json:"harness_state,omitempty"`
RawHarnessOutput string `json:"raw_harness_output,omitempty"`
HarnessExitCode int `json:"harness_exit_code"`
HarnessError string `json:"harness_error,omitempty"`
ReasoningEffort types.ReasoningEffort `json:"reasoning_effort"`
Instructions string `json:"instructions"`
Tools []types.ToolDefinition `bun:"type:jsonb,nullzero" json:"-"`
Messages []types.Message `bun:"type:jsonb,nullzero" json:"messages"`
InputSnapshot map[string]any `bun:"type:jsonb,nullzero" json:"input_snapshot,omitempty"`
OutputSnapshot map[string]any `bun:"type:jsonb,nullzero" json:"output_snapshot,omitempty"`
Metadata map[string]any `bun:"type:jsonb,nullzero" json:"metadata"`
Status ConversationStatus `json:"status"`
InputTokens int64 `json:"input_tokens"`
OutputTokens int64 `json:"output_tokens"`
CachedTokens int64 `json:"cached_tokens"`
Cost int64 `json:"cost"`
CreatedAt time.Time `json:"created_at"`
AutoCompact bool `json:"auto_compact"`
CompactAtPercent int `json:"compact_at_percent"`
CompactionPrompt string `json:"compaction_prompt"`
CompactCount int `json:"compact_count"`
ProjectDir string `json:"project_dir,omitempty"`
ShellAccess bool `json:"shell_access"`
WebSearch bool `json:"web_search"`
StructuredOutput bool `json:"structured_output"`
StructuredOutputSchema json.RawMessage `bun:"type:json,nullzero" json:"structured_output_schema"`
}
func GetConversationByID ¶
func GetConversationsByNodeExecutionID ¶ added in v0.3.0
func (*Conversation) AfterScanRow ¶ added in v0.2.11
func (c *Conversation) AfterScanRow(ctx context.Context) error
func (Conversation) GetCursor ¶
func (c Conversation) GetCursor() string
func (Conversation) GetSortField ¶
func (c Conversation) GetSortField() string
func (Conversation) GetSortValue ¶
func (c Conversation) GetSortValue() interface{}
func (Conversation) GetUniqueField ¶
func (c Conversation) GetUniqueField() string
func (Conversation) GetUniqueValue ¶
func (c Conversation) GetUniqueValue() interface{}
func (*Conversation) Validate ¶
func (c *Conversation) Validate() error
type ConversationStatus ¶
type ConversationStatus string
const ( ConversationStatusQueued ConversationStatus = "queued" ConversationStatusRunning ConversationStatus = "running" ConversationStatusSucceeded ConversationStatus = "succeeded" ConversationStatusFailed ConversationStatus = "failed" ConversationStatusCanceled ConversationStatus = "canceled" )
func (ConversationStatus) MarshalJSON ¶
func (s ConversationStatus) MarshalJSON() ([]byte, error)
func (*ConversationStatus) UnmarshalJSON ¶
func (s *ConversationStatus) UnmarshalJSON(b []byte) error
func (ConversationStatus) Validate ¶
func (s ConversationStatus) Validate() error
type Harness ¶ added in v0.3.0
type Harness string
func (Harness) MarshalJSON ¶ added in v0.3.0
func (*Harness) UnmarshalJSON ¶ added in v0.3.0
type Spec ¶
type Spec struct {
bun.BaseModel `bun:"table:agent_specs"`
ID uuid.UUID `bun:",pk,type:uuid" json:"id"`
Name string `json:"name"`
Harness Harness `json:"harness"`
Model string `bun:"model" json:"model"`
HarnessConfig json.RawMessage `bun:"type:jsonb,nullzero" json:"harness_config,omitempty"`
ReasoningEffort runtimetypes.ReasoningEffort `json:"reasoning_effort"`
Instructions string `json:"instructions"`
AutoCompact bool `json:"auto_compact"`
CompactAtPercent int `json:"compact_at_percent"`
CompactionPrompt string `json:"compaction_prompt"`
ShellAccess bool `json:"shell_access"`
WebSearch bool `json:"web_search"`
StructuredOutput bool `json:"structured_output"`
StructuredOutputSchema json.RawMessage `bun:"type:json,nullzero" json:"structured_output_schema"`
Version int `json:"version"`
}
func GetAgentSpecByID ¶
func NewAgentSpec ¶
func NewAgentSpec(name string, harness Harness, model string, harnessConfig json.RawMessage, instructions string, reasoningEffort runtimetypes.ReasoningEffort, version int) (*Spec, error)
func (*Spec) AfterScanRow ¶ added in v0.2.11
func (Spec) GetSortField ¶
func (Spec) GetSortValue ¶
func (pt Spec) GetSortValue() interface{}
func (Spec) GetUniqueField ¶
func (Spec) GetUniqueValue ¶
func (pt Spec) GetUniqueValue() interface{}
Click to show internal directories.
Click to hide internal directories.