server Types

This document shows Go type definitions from the codebase.

Generated types:

ChildJobInfo {#childjobinfo}

Source: server/pulse_types.go:71

type ChildJobInfo struct {
	ID string `json:"id"`
	HandlerName string `json:"handler_name"`
	Source string `json:"source"`
	Status string `json:"status"`
	ProgressPct float64 `json:"progress_pct,omitempty"`
	CostEstimate float64 `json:"cost_estimate,omitempty"`
	CostActual float64 `json:"cost_actual,omitempty"`
	Error string `json:"error,omitempty"`
	CreatedAt string `json:"created_at"`
	StartedAt *string `json:"started_at,omitempty"`
	CompletedAt *string `json:"completed_at,omitempty"`
}

CompleteMessage {#completemessage}

Source: server/types.go:113

type CompleteMessage struct {
	Type string `json:"type"`
	Message string `json:"message"`
}

ConsoleFormatter {#consoleformatter}

Source: server/console_formatter.go:10

type ConsoleFormatter struct {
}

ConsoleLog {#consolelog}

Source: server/debug_handler.go:10

type ConsoleLog struct {
	Timestamp time.Time `json:"timestamp"`
	Level string `json:"level"`
	Message string `json:"message"`
	Stack string `json:"stack,omitempty"`
	URL string `json:"url,omitempty"`
}

CreateScheduledJobRequest {#createscheduledjobrequest}

Source: server/pulse_types.go:14

type CreateScheduledJobRequest struct {
	ATSCode string `json:"ats_code"`
	HandlerName string `json:"handler_name,omitempty"`
	IntervalSeconds int `json:"interval_seconds"`
	CreatedFromDoc string `json:"created_from_doc,omitempty"`
	Metadata string `json:"metadata,omitempty"`
	Force bool `json:"force,omitempty"`
}

DaemonStatusMessage {#daemonstatusmessage}

Source: server/types.go:138

type DaemonStatusMessage struct {
	Type string `json:"type"`
	Running bool `json:"running"`
	ActiveJobs int `json:"active_jobs"`
	QueuedJobs int `json:"queued_jobs"`
	LoadPercent float64 `json:"load_percent"`
	BudgetDaily float64 `json:"budget_daily"`
	BudgetWeekly float64 `json:"budget_weekly"`
	BudgetMonthly float64 `json:"budget_monthly"`
	BudgetDailyLimit float64 `json:"budget_daily_limit"`
	BudgetWeeklyLimit float64 `json:"budget_weekly_limit"`
	BudgetMonthlyLimit float64 `json:"budget_monthly_limit"`
	BudgetDailyAggregate float64 `json:"budget_daily_aggregate"`
	BudgetWeeklyAggregate float64 `json:"budget_weekly_aggregate"`
	BudgetMonthlyAggregate float64 `json:"budget_monthly_aggregate"`
	PeerCount int `json:"peer_count"`
	ClusterDailyLimit float64 `json:"cluster_daily_limit"`
	ClusterWeeklyLimit float64 `json:"cluster_weekly_limit"`
	ClusterMonthlyLimit float64 `json:"cluster_monthly_limit"`
	ServerState string `json:"server_state"`
	Timestamp int64 `json:"timestamp"`
}

ErrorResponse {#errorresponse}

Source: server/pulse_types.go:52

type ErrorResponse struct {
	Error string `json:"error"`
	Details []string `json:"details,omitempty"`
}

GlyphFiredMessage {#glyphfiredmessage}

Source: server/types.go:253

type GlyphFiredMessage struct {
	Type string `json:"type"`
	GlyphID string `json:"glyph_id"`
	AttestationID string `json:"attestation_id"`
	Status string `json:"status"`
	Error string `json:"error,omitempty"`
	Result string `json:"result,omitempty"`
	Timestamp int64 `json:"timestamp"`
}

JobChildrenResponse {#jobchildrenresponse}

Source: server/pulse_types.go:86

type JobChildrenResponse struct {
	ParentJobID string `json:"parent_job_id"`
	Children []ChildJobInfo `json:"children"`
}

JobStagesResponse {#jobstagesresponse}

Source: server/pulse_types.go:58

type JobStagesResponse struct {
	JobID string `json:"job_id"`
	Stages []schedule.StageInfo `json:"stages"`
	PluginVersion string `json:"plugin_version,omitempty"`
}

JobUpdateMessage {#jobupdatemessage}

Source: server/types.go:131

type JobUpdateMessage struct {
	Type string `json:"type"`
	Job *async.Job `json:"job" tstype:"Job | null"`
	Metadata map[string]interface{} `json:"metadata"`
}

LLMStreamMessage {#llmstreammessage}

Source: server/types.go:165

type LLMStreamMessage struct {
	Type string `json:"type"`
	JobID string `json:"job_id"`
	TaskID string `json:"task_id,omitempty"`
	Content string `json:"content"`
	Done bool `json:"done"`
	Model string `json:"model,omitempty"`
	Stage string `json:"stage,omitempty"`
	Error string `json:"error,omitempty"`
}

ListExecutionsResponse {#listexecutionsresponse}

Source: server/pulse_execution_handlers.go:16

type ListExecutionsResponse struct {
	Executions []schedule.Execution `json:"executions" tstype:"Execution[]"`
	Count int `json:"count"`
	Total int `json:"total"`
	HasMore bool `json:"has_more"`
}

ListScheduledJobsResponse {#listscheduledjobsresponse}

Source: server/pulse_types.go:46

type ListScheduledJobsResponse struct {
	Jobs []ScheduledJobResponse `json:"jobs"`
	Count int `json:"count,omitempty"`
}

ParsedATSCode {#parsedatscode}

Source: server/ats_parser.go:16

type ParsedATSCode struct {
	HandlerName string
	Payload []byte
	SourceURL string
}

PluginGlyphDef {#pluginglyphdef}

Source: server/handlers.go:720

type PluginGlyphDef struct {
	Plugin string `json:"plugin"`
	Symbol string `json:"symbol"`
	Title string `json:"title"`
	Label string `json:"label"`
	ContentURL string `json:"content_url"`
	CSSURL string `json:"css_url,omitempty"`
	DefaultWidth int `json:"default_width,omitempty"`
	DefaultHeight int `json:"default_height,omitempty"`
}

PluginHealthMessage {#pluginhealthmessage}

Source: server/types.go:232

type PluginHealthMessage struct {
	Type string `json:"type"`
	Name string `json:"name"`
	Healthy bool `json:"healthy"`
	State string `json:"state"`
	Message string `json:"message"`
	Timestamp int64 `json:"timestamp"`
}

PluginInfo {#plugininfo}

Source: server/handlers.go:661

type PluginInfo struct {
	Name string `json:"name"`
	Version string `json:"version"`
	QNTXVersion string `json:"qntx_version,omitempty"`
	Description string `json:"description"`
	Author string `json:"author,omitempty"`
	License string `json:"license,omitempty"`
	Healthy bool `json:"healthy"`
	Message string `json:"message,omitempty"`
	Details map[string]interface{} `json:"details,omitempty"`
	State string `json:"state"`
	Pausable bool `json:"pausable"`
}

PreviewSample {#previewsample}

Source: server/prompt_handlers.go:46

type PreviewSample struct {
	Attestation map[string]interface{} `json:"attestation"`
	InterpolatedPrompt string `json:"interpolated_prompt"`
	Response string `json:"response"`
	PromptTokens int `json:"prompt_tokens,omitempty"`
	CompletionTokens int `json:"completion_tokens,omitempty"`
	TotalTokens int `json:"total_tokens,omitempty"`
	Error string `json:"error,omitempty"`
}

ProgressMessage {#progressmessage}

Source: server/types.go:97

type ProgressMessage struct {
	Type string `json:"type"`
	Current int `json:"current"`
	Total int `json:"total"`
	Message string `json:"message"`
}

PromptDirectRequest {#promptdirectrequest}

Source: server/prompt_handlers.go:76

type PromptDirectRequest struct {
	Template string `json:"template"`
	SystemPrompt string `json:"system_prompt,omitempty"`
	Provider string `json:"provider,omitempty"`
	Model string `json:"model,omitempty"`
	GlyphID string `json:"glyph_id,omitempty"`
	UpstreamAttestation *types.As `json:"upstream_attestation,omitempty"`
	FileIDs []string `json:"file_ids,omitempty"`
}

PromptDirectResponse {#promptdirectresponse}

Source: server/prompt_handlers.go:87

type PromptDirectResponse struct {
	Response string `json:"response"`
	AttestationID string `json:"attestation_id,omitempty"`
	Attestation *protocol.Attestation `json:"attestation,omitempty"`
	PromptTokens int `json:"prompt_tokens,omitempty"`
	CompletionTokens int `json:"completion_tokens,omitempty"`
	TotalTokens int `json:"total_tokens,omitempty"`
	Error string `json:"error,omitempty"`
}

PromptExecuteRequest {#promptexecuterequest}

Source: server/prompt_handlers.go:67

type PromptExecuteRequest struct {
	AxQuery string `json:"ax_query"`
	Template string `json:"template"`
	SystemPrompt string `json:"system_prompt,omitempty"`
	Provider string `json:"provider,omitempty"`
	Model string `json:"model,omitempty"`
}

PromptExecuteResponse {#promptexecuteresponse}

Source: server/prompt_handlers.go:118

type PromptExecuteResponse struct {
	Results []Result `json:"results"`
	AttestationCount int `json:"attestation_count"`
	Error string `json:"error,omitempty"`
}

PromptPreviewRequest {#promptpreviewrequest}

Source: server/prompt_handlers.go:34

type PromptPreviewRequest struct {
	AxQuery string `json:"ax_query"`
	Template string `json:"template"`
	SystemPrompt string `json:"system_prompt,omitempty"`
	SampleSize int `json:"sample_size,omitempty"`
	Provider string `json:"provider,omitempty"`
	Model string `json:"model,omitempty"`
	PromptID string `json:"prompt_id,omitempty"`
	PromptVersion int `json:"prompt_version,omitempty"`
}

PromptPreviewResponse {#promptpreviewresponse}

Source: server/prompt_handlers.go:57

type PromptPreviewResponse struct {
	TotalAttestations int `json:"total_attestations"`
	SampleSize int `json:"sample_size"`
	Samples []PreviewSample `json:"samples"`
	SuccessCount int `json:"success_count"`
	FailureCount int `json:"failure_count"`
	Error string `json:"error,omitempty"`
}

PromptSaveRequest {#promptsaverequest}

Source: server/prompt_handlers.go:614

type PromptSaveRequest struct {
	Name string `json:"name"`
	Template string `json:"template"`
	SystemPrompt string `json:"system_prompt,omitempty"`
	AxPattern string `json:"ax_pattern,omitempty"`
	Provider string `json:"provider,omitempty"`
	Model string `json:"model,omitempty"`
}

ProseEntry {#proseentry}

Source: server/prose_handler.go:16

type ProseEntry struct {
	Name string `json:"name"`
	Path string `json:"path"`
	IsDir bool `json:"isDir"`
	Children []ProseEntry `json:"children,omitempty"`
}

PulseExecutionCompletedMessage {#pulseexecutioncompletedmessage}

Source: server/types.go:198

type PulseExecutionCompletedMessage struct {
	Type string `json:"type"`
	ScheduledJobID string `json:"scheduled_job_id"`
	ExecutionID string `json:"execution_id"`
	ATSCode string `json:"ats_code"`
	AsyncJobID string `json:"async_job_id"`
	ResultSummary string `json:"result_summary"`
	DurationMs int `json:"duration_ms"`
	Timestamp int64 `json:"timestamp"`
}

PulseExecutionFailedMessage {#pulseexecutionfailedmessage}

Source: server/types.go:186

type PulseExecutionFailedMessage struct {
	Type string `json:"type"`
	ScheduledJobID string `json:"scheduled_job_id"`
	ExecutionID string `json:"execution_id"`
	ATSCode string `json:"ats_code"`
	ErrorMessage string `json:"error_message"`
	ErrorDetails []string `json:"error_details"`
	DurationMs int `json:"duration_ms"`
	Timestamp int64 `json:"timestamp"`
}

PulseExecutionLogStreamMessage {#pulseexecutionlogstreammessage}

Source: server/types.go:210

type PulseExecutionLogStreamMessage struct {
	Type string `json:"type"`
	ScheduledJobID string `json:"scheduled_job_id"`
	ExecutionID string `json:"execution_id"`
	LogChunk string `json:"log_chunk"`
	Timestamp int64 `json:"timestamp"`
}

PulseExecutionStartedMessage {#pulseexecutionstartedmessage}

Source: server/types.go:177

type PulseExecutionStartedMessage struct {
	Type string `json:"type"`
	ScheduledJobID string `json:"scheduled_job_id"`
	ExecutionID string `json:"execution_id"`
	ATSCode string `json:"ats_code"`
	Timestamp int64 `json:"timestamp"`
}

QueryMessage {#querymessage}

Source: server/types.go:61

type QueryMessage struct {
	Type string `json:"type"`
	Query string `json:"query"`
	Line int `json:"line"`
	Cursor int `json:"cursor"`
	Verbosity int `json:"verbosity"`
	GraphLimit int `json:"graph_limit"`
	Filename string `json:"filename"`
	FileType string `json:"fileType"`
	Data string `json:"data"`
	Action string `json:"action"`
	DailyBudget float64 `json:"daily_budget"`
	WeeklyBudget float64 `json:"weekly_budget"`
	MonthlyBudget float64 `json:"monthly_budget"`
	JobID string `json:"job_id"`
	NodeType string `json:"node_type"`
	Hidden bool `json:"hidden"`
	ModelPath string `json:"model_path"`
	ConfidenceThreshold float32 `json:"confidence_threshold"`
	NMSThreshold float32 `json:"nms_threshold"`
	FrameData []byte `json:"frame_data"`
	Width int `json:"width"`
	Height int `json:"height"`
	Format string `json:"format"`
	WatcherID string `json:"watcher_id"`
	WatcherQuery string `json:"watcher_query"`
	WatcherName string `json:"watcher_name"`
	Enabled bool `json:"enabled"`
	SemanticQuery string `json:"semantic_query"`
	SemanticThreshold float32 `json:"semantic_threshold"`
	SemanticClusterID *int `json:"semantic_cluster_id"`
}

Result {#result}

Source: server/prompt_handlers.go:98

type Result struct {
	SourceAttestationID string `json:"source_attestation_id"`
	Prompt string `json:"prompt"`
	Response string `json:"response"`
	ResultAttestationID string `json:"result_attestation_id,omitempty"`
	PromptTokens int `json:"prompt_tokens,omitempty"`
	CompletionTokens int `json:"completion_tokens,omitempty"`
	TotalTokens int `json:"total_tokens,omitempty"`
}

ScheduledJobResponse {#scheduledjobresponse}

Source: server/pulse_types.go:30

type ScheduledJobResponse struct {
	ID string `json:"id"`
	ATSCode string `json:"ats_code"`
	HandlerName string `json:"handler_name,omitempty"`
	IntervalSeconds int `json:"interval_seconds,omitempty"`
	NextRunAt string `json:"next_run_at"`
	LastRunAt *string `json:"last_run_at,omitempty"`
	LastExecutionID string `json:"last_execution_id,omitempty"`
	State string `json:"state"`
	CreatedFromDoc string `json:"created_from_doc,omitempty"`
	Metadata string `json:"metadata,omitempty"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

StatsMessage {#statsmessage}

Source: server/types.go:105

type StatsMessage struct {
	Type string `json:"type"`
	Contacts int `json:"contacts"`
	Attestations int `json:"attestations"`
	Companies int `json:"companies"`
}

StorageWarningMessage {#storagewarningmessage}

Source: server/types.go:219

type StorageWarningMessage struct {
	Type string `json:"type"`
	Actor string `json:"actor"`
	Context string `json:"context"`
	Current int `json:"current"`
	Limit int `json:"limit"`
	FillPercent float64 `json:"fill_percent"`
	TimeUntilFull string `json:"time_until_full"`
	Timestamp int64 `json:"timestamp"`
}

TaskLogsResponse {#tasklogsresponse}

Source: server/pulse_types.go:65

type TaskLogsResponse struct {
	TaskID string `json:"task_id"`
	Logs []schedule.LogEntry `json:"logs"`
}

UpdateScheduledJobRequest {#updatescheduledjobrequest}

Source: server/pulse_types.go:24

type UpdateScheduledJobRequest struct {
	State *string `json:"state,omitempty"`
	IntervalSeconds *int `json:"interval_seconds,omitempty"`
}

UsageUpdateMessage {#usageupdatemessage}

Source: server/types.go:119

type UsageUpdateMessage struct {
	Type string `json:"type"`
	TotalCost float64 `json:"total_cost"`
	Requests int `json:"requests"`
	Success int `json:"success"`
	Tokens int `json:"tokens"`
	Models int `json:"models"`
	Since string `json:"since"`
	Timestamp int64 `json:"timestamp"`
}

WatcherCreateRequest {#watchercreaterequest}

Source: server/watcher_handlers.go:19

type WatcherCreateRequest struct {
	ID string `json:"id"`
	Name string `json:"name"`
	Subjects []string `json:"subjects,omitempty"`
	Predicates []string `json:"predicates,omitempty"`
	Contexts []string `json:"contexts,omitempty"`
	Actors []string `json:"actors,omitempty"`
	TimeStart string `json:"time_start,omitempty"`
	TimeEnd string `json:"time_end,omitempty"`
	ActionType string `json:"action_type"`
	ActionData string `json:"action_data"`
	MaxFiresPerMinute int `json:"max_fires_per_minute,omitempty"`
	Enabled *bool `json:"enabled,omitempty"`
	SemanticQuery string `json:"semantic_query,omitempty"`
	SemanticThreshold float32 `json:"semantic_threshold,omitempty"`
}

WatcherErrorMessage {#watchererrormessage}

Source: server/types.go:265

type WatcherErrorMessage struct {
	Type string `json:"type"`
	WatcherID string `json:"watcher_id"`
	Error string `json:"error"`
	Details []string `json:"details,omitempty"`
	Severity string `json:"severity"`
	Timestamp int64 `json:"timestamp"`
}

WatcherMatchMessage {#watchermatchmessage}

Source: server/types.go:243

type WatcherMatchMessage struct {
	Type string `json:"type"`
	WatcherID string `json:"watcher_id"`
	Attestation interface{} `json:"attestation"`
	Score float32 `json:"score,omitempty"`
	TargetGlyphID string `json:"target_glyph_id,omitempty"`
	Timestamp int64 `json:"timestamp"`
}

WatcherResponse {#watcherresponse}

Source: server/watcher_handlers.go:38

type WatcherResponse struct {
	ID string `json:"id"`
	Name string `json:"name"`
	Subjects []string `json:"subjects,omitempty"`
	Predicates []string `json:"predicates,omitempty"`
	Contexts []string `json:"contexts,omitempty"`
	Actors []string `json:"actors,omitempty"`
	TimeStart string `json:"time_start,omitempty"`
	TimeEnd string `json:"time_end,omitempty"`
	ActionType string `json:"action_type"`
	ActionData string `json:"action_data"`
	SemanticQuery string `json:"semantic_query,omitempty"`
	SemanticThreshold float32 `json:"semantic_threshold,omitempty"`
	MaxFiresPerMinute int `json:"max_fires_per_minute"`
	Enabled bool `json:"enabled"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
	LastFiredAt string `json:"last_fired_at,omitempty"`
	FireCount int64 `json:"fire_count"`
	ErrorCount int64 `json:"error_count"`
	LastError string `json:"last_error,omitempty"`
}