Documentation
¶
Index ¶
- Variables
- func EncodeBlocks(blocks []Block) (string, error)
- func EncodeText(content string) (string, error)
- func EncodeToolResults(results []ToolResult) (string, error)
- type Account
- type AccountID
- type Block
- type BlockType
- type CatalogSummary
- type ContextEntity
- type ContextSource
- type Conversation
- type ConversationID
- type DatadogAccountID
- type DatadogRegion
- type DatadogSite
- type LogEventStatus
- type Message
- type MessageID
- type Organization
- type OrganizationID
- type PolicyCategoryStatus
- type PolicyLogStatus
- type PolicySummary
- type RiskLevel
- type Role
- type ServiceLogStatus
- type ServiceStatus
- type TextBlock
- type Thinking
- type ToolInputDelta
- type ToolResult
- type ToolUse
- type WorkosOrganizationID
- type Workspace
- type WorkspaceID
Constants ¶
This section is empty.
Variables ¶
var DatadogRegions = []DatadogRegion{ {DatadogSiteUS1, "US1 (datadoghq.com)", "United States"}, {DatadogSiteUS3, "US3 (us3.datadoghq.com)", "United States"}, {DatadogSiteUS5, "US5 (us5.datadoghq.com)", "United States"}, {DatadogSiteEU1, "EU1 (datadoghq.eu)", "Europe"}, {DatadogSiteAP1, "AP1 (ap1.datadoghq.com)", "Asia Pacific"}, {DatadogSiteUS1Fed, "US1-FED (ddog-gov.com)", "US Government"}, }
DatadogRegions is the list of available Datadog regions.
Functions ¶
func EncodeBlocks ¶
EncodeBlocks serializes blocks to JSON string for storage.
func EncodeText ¶
EncodeText is a convenience function to encode a single text block.
func EncodeToolResults ¶
func EncodeToolResults(results []ToolResult) (string, error)
EncodeToolResults encodes tool results as blocks for storage.
Types ¶
type Account ¶
Account represents a billing/Datadog account within an organization.
func (Account) FilterValue ¶
FilterValue returns the string used for filtering/searching.
type Block ¶
type Block struct {
Index int `json:"index"`
Type BlockType `json:"type"`
Text *TextBlock `json:"text,omitempty"`
Thinking *Thinking `json:"thinking,omitempty"`
ToolUse *ToolUse `json:"tool_use,omitempty"`
ToolResult *ToolResult `json:"tool_result,omitempty"`
}
Block is one element in a message's content array. Exactly one of the typed fields is populated, determined by Type.
func ParseBlocks ¶
ParseBlocks parses a JSON string into content blocks.
type CatalogSummary ¶
type CatalogSummary struct {
ReadyForUse bool
ServiceCount int64
ActiveServices int64
EventCount int64
AnalyzedCount int64
AnalyzingCount int64
DiscoveringCount int64
BrokenServices int64
StaleServices int64
PercentComplete float64
WorstStatus ServiceLogStatus
LogError string
}
CatalogSummary is the aggregated catalog health across all Datadog accounts.
type ContextEntity ¶
type ContextEntity struct {
EntityType string `json:"entity_type"` // "service", "log_event", "policy", etc.
EntityID string `json:"entity_id"`
}
ContextEntity is an entity attached to a conversation for the AI to reference. The client sends entity IDs; the server loads full entity data for the system prompt.
type ContextSource ¶
type ContextSource string
ContextSource indicates who added an entity to context.
const ( ContextSourceUser ContextSource = "user" ContextSourceAssistant ContextSource = "assistant" )
type Conversation ¶
type Conversation struct {
ID ConversationID `json:"id"`
WorkspaceID WorkspaceID `json:"workspace_id"`
Title string `json:"title"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Conversation represents a chat conversation.
type ConversationID ¶
type ConversationID string
ConversationID is a typed identifier for conversations.
func NewConversationID ¶
func NewConversationID() ConversationID
NewConversationID generates a new unique ConversationID.
func (ConversationID) String ¶
func (id ConversationID) String() string
String returns the string representation of the ConversationID.
type DatadogAccountID ¶
type DatadogAccountID string
DatadogAccountID is a unique identifier for a Datadog account integration.
func (DatadogAccountID) String ¶
func (id DatadogAccountID) String() string
type DatadogRegion ¶
type DatadogRegion struct {
Site DatadogSite
Name string
Desc string
}
DatadogRegion contains display information for a Datadog site.
type DatadogSite ¶
type DatadogSite string
DatadogSite represents a Datadog datacenter region.
const ( DatadogSiteUS1 DatadogSite = "US1" DatadogSiteUS3 DatadogSite = "US3" DatadogSiteUS5 DatadogSite = "US5" DatadogSiteEU1 DatadogSite = "EU1" DatadogSiteAP1 DatadogSite = "AP1" DatadogSiteUS1Fed DatadogSite = "US1_FED" )
func (DatadogSite) String ¶
func (s DatadogSite) String() string
type LogEventStatus ¶
type LogEventStatus string
LogEventStatus is the pipeline status for a log event.
const ( LogEventStatusBroken LogEventStatus = "BROKEN" LogEventStatusQuarantined LogEventStatus = "QUARANTINED" LogEventStatusResolved LogEventStatus = "RESOLVED" LogEventStatusClean LogEventStatus = "CLEAN" LogEventStatusPending LogEventStatus = "PENDING" LogEventStatusAnalyzing LogEventStatus = "ANALYZING" LogEventStatusDiscovering LogEventStatus = "DISCOVERING" )
func (LogEventStatus) String ¶
func (s LogEventStatus) String() string
type Message ¶
type Message struct {
ID MessageID `json:"id"`
ConversationID ConversationID `json:"conversation_id"`
Role Role `json:"role"`
Content []Block `json:"content"`
Model string `json:"model,omitempty"`
StopReason string `json:"stop_reason,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
Message represents a chat message.
type Organization ¶
type Organization struct {
ID OrganizationID `json:"id"`
Name string `json:"name"`
WorkosOrganizationID WorkosOrganizationID `json:"workos_organization_id,omitempty"`
}
Organization represents a customer organization.
func (Organization) FilterValue ¶
func (o Organization) FilterValue() string
FilterValue returns the string used for filtering/searching.
type OrganizationID ¶
type OrganizationID string
OrganizationID is a unique identifier for an organization.
func NewOrganizationID ¶
func NewOrganizationID() OrganizationID
NewOrganizationID generates a new unique OrganizationID.
func (OrganizationID) String ¶
func (id OrganizationID) String() string
type PolicyCategoryStatus ¶
type PolicyCategoryStatus struct {
Category string
PendingCount int64
ApprovedCount int64
DismissedCount int64
EstimatedVolumePerHour float64
EstimatedBytesPerHour float64
EstimatedCostPerHour float64
RiskLevel RiskLevel
Benefit string
}
PolicyCategoryStatus is the per-category policy breakdown.
type PolicyLogStatus ¶
type PolicyLogStatus string
PolicyLogStatus is the lifecycle status for a policy.
const ( PolicyLogStatusPending PolicyLogStatus = "PENDING" PolicyLogStatusApproved PolicyLogStatus = "APPROVED" PolicyLogStatusDismissed PolicyLogStatus = "DISMISSED" )
func (PolicyLogStatus) String ¶
func (s PolicyLogStatus) String() string
type PolicySummary ¶
type PolicySummary struct {
ReadyForUse bool
PendingPolicyCount int64
PolicyCount int64
ApprovedPolicyCount int64
EstimatedCostPerHour *float64 // nil when pricing unavailable
EstimatedVolumePerHour float64
EstimatedBytesPerHour float64
ObservedCostBefore *float64 // nil when pricing unavailable
ObservedCostAfter *float64 // nil when pricing unavailable
ObservedVolumeBefore float64
ObservedVolumeAfter float64
TotalCostPerHour *float64 // nil when pricing unavailable
TotalVolumePerHour float64
TotalBytesPerHour float64
}
PolicySummary is the aggregated policy impact across all Datadog accounts.
type ServiceLogStatus ¶
type ServiceLogStatus string
ServiceLogStatus is the catalog health status for a service or account.
const ( ServiceLogStatusDisabled ServiceLogStatus = "DISABLED" ServiceLogStatusInactive ServiceLogStatus = "INACTIVE" ServiceLogStatusBroken ServiceLogStatus = "BROKEN" ServiceLogStatusStale ServiceLogStatus = "STALE" ServiceLogStatusDiscovering ServiceLogStatus = "DISCOVERING" ServiceLogStatusAnalyzing ServiceLogStatus = "ANALYZING" ServiceLogStatusReady ServiceLogStatus = "READY" )
func (ServiceLogStatus) String ¶
func (s ServiceLogStatus) String() string
type ServiceStatus ¶
type ServiceStatus struct {
Name string
Status ServiceLogStatus
Error string
PercentComplete float64
EventCount int64
AnalyzedCount int64
VolumePerHour float64
BytesPerHour float64
CostPerHourUSD float64
}
ServiceStatus is a service's catalog health with throughput metrics.
type TextBlock ¶
type TextBlock struct {
Content string `json:"content"`
}
TextBlock is prose content.
type Thinking ¶
type Thinking struct {
Content string `json:"content"`
}
Thinking is the AI's internal reasoning.
type ToolInputDelta ¶
ToolInputDelta is a streaming fragment of tool input JSON.
type ToolResult ¶
type ToolResult struct {
ToolUseID string `json:"tool_use_id"`
IsError bool `json:"is_error,omitempty"`
Error string `json:"error,omitempty"`
Content map[string]any `json:"content,omitempty"`
}
ToolResult is the outcome of a tool call (wire/storage format).
type ToolUse ¶
type ToolUse struct {
ID string `json:"id"`
Name string `json:"name"`
Input json.RawMessage `json:"input"`
InputComplete bool `json:"-"` // True when input is fully received (after content_block_stop)
}
ToolUse represents the AI calling a tool.
type WorkosOrganizationID ¶
type WorkosOrganizationID string
WorkosOrganizationID is the external ID from WorkOS.
func (WorkosOrganizationID) String ¶
func (id WorkosOrganizationID) String() string
type Workspace ¶
type Workspace struct {
ID WorkspaceID `json:"id"`
Name string `json:"name"`
}
Workspace represents a workspace within an account.
func (Workspace) FilterValue ¶
FilterValue returns the string used for filtering/searching.
type WorkspaceID ¶
type WorkspaceID string
WorkspaceID is a unique identifier for a workspace.
func NewWorkspaceID ¶
func NewWorkspaceID() WorkspaceID
NewWorkspaceID generates a new unique WorkspaceID.
func (WorkspaceID) String ¶
func (id WorkspaceID) String() string
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package domaintest provides factories for creating domain objects in tests.
|
Package domaintest provides factories for creating domain objects in tests. |
|
Package tools defines tool input/output types and the execution interface.
|
Package tools defines tool input/output types and the execution interface. |