Documentation
¶
Index ¶
- func AgentChat(cfg *config.Config) fiber.Handler
- func CancelRun(cfg *config.Config) fiber.Handler
- func ClearDatabaseTable(cfg *config.Config) fiber.Handler
- func CreateRun(cfg *config.Config) fiber.Handler
- func CreateSchedule(cfg *config.Config, eventReceiver EventReceiverProvider) fiber.Handler
- func CreateVulnerability(cfg *config.Config) fiber.Handler
- func DeleteSchedule(cfg *config.Config) fiber.Handler
- func DeleteSnapshot(cfg *config.Config) fiber.Handler
- func DeleteVulnerability(cfg *config.Config) fiber.Handler
- func DisableSchedule(cfg *config.Config) fiber.Handler
- func DownloadArtifact(c *fiber.Ctx) error
- func DownloadWorkspaceArtifact(cfg *config.Config) fiber.Handler
- func DuplicateRun(cfg *config.Config) fiber.Handler
- func EmitEvent(provider EventReceiverProvider) fiber.Handler
- func EnableSchedule(cfg *config.Config) fiber.Handler
- func FunctionEval(cfg *config.Config) fiber.Handler
- func FunctionList(cfg *config.Config) fiber.Handler
- func GetAllWorkflowTags(cfg *config.Config) fiber.Handler
- func GetAssetDiff(cfg *config.Config) fiber.Handler
- func GetAssetStats(cfg *config.Config) fiber.Handler
- func GetConfigStatus(hotConfig *config.HotReloadableConfig) fiber.Handler
- func GetEventReceiverStatus(provider EventReceiverProvider) fiber.Handler
- func GetJobStatus(cfg *config.Config) fiber.Handler
- func GetRegistryInfo(cfg *config.Config) fiber.Handler
- func GetRun(cfg *config.Config) fiber.Handler
- func GetRunArtifacts(c *fiber.Ctx) error
- func GetRunSteps(c *fiber.Ctx) error
- func GetSchedule(cfg *config.Config) fiber.Handler
- func GetSettings(cfg *config.Config) fiber.Handler
- func GetSettingsYAML(cfg *config.Config) fiber.Handler
- func GetSystemStats(cfg *config.Config) fiber.Handler
- func GetTask(master *distributed.Master) fiber.Handler
- func GetVulnerability(cfg *config.Config) fiber.Handler
- func GetVulnerabilityDiff(cfg *config.Config) fiber.Handler
- func GetVulnerabilitySummary(cfg *config.Config) fiber.Handler
- func GetWorker(master *distributed.Master) fiber.Handler
- func GetWorkflow(cfg *config.Config) fiber.Handler
- func GetWorkflowVerbose(cfg *config.Config) fiber.Handler
- func HealthCheck(c *fiber.Ctx) error
- func LLMChat(cfg *config.Config) fiber.Handler
- func LLMEmbedding(cfg *config.Config) fiber.Handler
- func ListArtifacts(cfg *config.Config) fiber.Handler
- func ListAssetDiffSnapshots(cfg *config.Config) fiber.Handler
- func ListAssets(cfg *config.Config) fiber.Handler
- func ListDatabaseTables(cfg *config.Config) fiber.Handler
- func ListEventLogs(cfg *config.Config) fiber.Handler
- func ListEventReceiverWorkflows(provider EventReceiverProvider) fiber.Handler
- func ListRuns(cfg *config.Config) fiber.Handler
- func ListSchedules(cfg *config.Config) fiber.Handler
- func ListSnapshots(cfg *config.Config) fiber.Handler
- func ListStepResults(cfg *config.Config) fiber.Handler
- func ListTasks(master *distributed.Master) fiber.Handler
- func ListVulnDiffSnapshots(cfg *config.Config) fiber.Handler
- func ListVulnerabilities(cfg *config.Config) fiber.Handler
- func ListWebhookRuns(cfg *config.Config) fiber.Handler
- func ListWorkers(master *distributed.Master) fiber.Handler
- func ListWorkflows(cfg *config.Config) fiber.Handler
- func ListWorkflowsVerbose(cfg *config.Config) fiber.Handler
- func ListWorkspaceNames(cfg *config.Config) fiber.Handler
- func ListWorkspaces(cfg *config.Config) fiber.Handler
- func Login(cfg *config.Config, noAuth bool) fiber.Handler
- func Logout() fiber.Handler
- func ReadinessCheck(c *fiber.Ctx) error
- func RefreshToken(cfg *config.Config) fiber.Handler
- func RefreshWorkflowIndex(cfg *config.Config) fiber.Handler
- func RegistryInstall(cfg *config.Config) fiber.Handler
- func ReloadConfig(hotConfig *config.HotReloadableConfig) fiber.Handler
- func ReloadWorkflows(cfg *config.Config) fiber.Handler
- func Root(cfg *config.Config) fiber.Handler
- func ServerInfo(cfg *config.Config) fiber.Handler
- func SetServerInfo(info *ServerInfoData)
- func SnapshotDownload(cfg *config.Config) fiber.Handler
- func SnapshotExport(cfg *config.Config) fiber.Handler
- func SnapshotImport(cfg *config.Config) fiber.Handler
- func StartRun(cfg *config.Config) fiber.Handler
- func SubmitTask(master *distributed.Master) fiber.Handler
- func TriggerSchedule(cfg *config.Config) fiber.Handler
- func TriggerWebhookRun(cfg *config.Config) fiber.Handler
- func UpdateSchedule(cfg *config.Config) fiber.Handler
- func UploadFile(cfg *config.Config) fiber.Handler
- func UploadWorkflow(cfg *config.Config) fiber.Handler
- func ValidateWorkflow(cfg *config.Config) fiber.Handler
- type AgentChatMessage
- type AgentChatRequest
- type AgentChatResponse
- type AgentChoice
- type BinaryStatusEntry
- type ClearTableRequest
- type ConfigProvider
- type CreateRunRequest
- type CreateScheduleRequest
- type CreateVulnerabilityInput
- type EmitEventRequest
- type EmitEventResponse
- type EventReceiverProvider
- type EventReceiverStatusResponse
- type EventReceiverTriggerInfo
- type EventReceiverTriggerResponse
- type EventReceiverWorkflowResponse
- type EventReceiverWorkflowsResponse
- type FunctionEvalRequest
- type FunctionListResponse
- type HotReloadConfigProvider
- type InstallRequest
- type JobProgress
- type JobStatus
- type LLMChatRequest
- type LLMChatResponse
- type LLMEmbeddingRequest
- type LLMEmbeddingResponse
- type LoginRequest
- type ServerInfoData
- type SnapshotExportRequest
- type SnapshotImportURLRequest
- type StaticConfigProvider
- type SubmitTaskRequest
- type UpdateScheduleRequest
- type WorkflowLoader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentChat ¶ added in v5.0.1
AgentChat handles ACP agent chat completion requests. @Summary Agent Chat Completion @Description Spawn a local ACP agent and return its output in OpenAI-compatible format @Tags Agent @Accept json @Produce json @Param request body AgentChatRequest true "Chat request" @Success 200 {object} AgentChatResponse "Chat response" @Failure 400 {object} map[string]interface{} "Invalid request" @Failure 409 {object} map[string]interface{} "Agent already running" @Failure 500 {object} map[string]interface{} "Agent error" @Security BearerAuth @Router /osm/api/agent/chat/completions [post]
func CancelRun ¶
CancelRun handles cancelling a run @Summary Cancel a run @Description Cancel a running workflow execution. This will terminate all running processes associated with the run. @Tags Runs @Produce json @Param id path string true "Run ID or RunID" @Success 200 {object} map[string]interface{} "Run cancelled" @Failure 404 {object} map[string]interface{} "Run not found" @Failure 400 {object} map[string]interface{} "Run cannot be cancelled" @Security BearerAuth @Router /osm/api/runs/{id} [delete]
func ClearDatabaseTable ¶ added in v5.0.1
ClearDatabaseTable clears all records from a specific table @Summary Clear database table @Description Delete all records from a specific database table (destructive operation) @Tags Database @Accept json @Produce json @Param table path string true "Table name (runs, step_results, event_logs, artifacts, assets, schedules, workspaces, vulnerabilities, asset_diffs, vuln_diffs)" @Param body body ClearTableRequest true "Confirmation with force=true required" @Success 200 {object} map[string]interface{} "Table cleared successfully" @Failure 400 {object} map[string]interface{} "Invalid request or missing force confirmation" @Failure 500 {object} map[string]interface{} "Failed to clear table" @Security BearerAuth @Router /osm/api/database/tables/{table}/clear [post]
func CreateRun ¶
CreateRun handles run creation @Summary Create a new run @Description Execute a workflow against one or more targets. Supports multiple targets via array or file, concurrency control, priority levels, custom timeouts, runner configuration (host/docker/ssh), and scheduling via cron expressions. @Tags Runs @Accept json @Produce json @Param run body CreateRunRequest true "Run configuration with optional priority, timeout, runner config, and scheduling" @Success 202 {object} map[string]interface{} "Run started" @Failure 400 {object} map[string]interface{} "Invalid request" @Failure 404 {object} map[string]interface{} "Workflow not found" @Security BearerAuth @Router /osm/api/runs [post]
func CreateSchedule ¶
func CreateSchedule(cfg *config.Config, eventReceiver EventReceiverProvider) fiber.Handler
CreateSchedule handles creating a new schedule @Summary Create a new schedule @Description Create a scheduled workflow execution with cron expression @Tags Schedules @Accept json @Produce json @Param schedule body CreateScheduleRequest true "Schedule configuration" @Success 201 {object} map[string]interface{} "Schedule created" @Failure 400 {object} map[string]interface{} "Invalid request" @Security BearerAuth @Router /osm/api/schedules [post]
func CreateVulnerability ¶
CreateVulnerability handles creating a new vulnerability @Summary Create vulnerability @Description Create a new vulnerability record @Tags Vulnerabilities @Accept json @Produce json @Param vulnerability body CreateVulnerabilityInput true "Vulnerability data" @Success 201 {object} map[string]interface{} "Created vulnerability" @Failure 400 {object} map[string]interface{} "Invalid input" @Failure 500 {object} map[string]interface{} "Failed to create vulnerability" @Security BearerAuth @Router /osm/api/vulnerabilities [post]
func DeleteSchedule ¶
DeleteSchedule handles deleting a schedule @Summary Delete a schedule @Description Delete a schedule by ID @Tags Schedules @Produce json @Param id path string true "Schedule ID" @Success 200 {object} map[string]interface{} "Schedule deleted" @Failure 404 {object} map[string]interface{} "Schedule not found" @Security BearerAuth @Router /osm/api/schedules/{id} [delete]
func DeleteSnapshot ¶
DeleteSnapshot handles deleting a snapshot file @Summary Delete snapshot @Description Delete a snapshot file by name @Tags Snapshots @Produce json @Param name path string true "Snapshot filename" @Success 200 {object} map[string]interface{} "Snapshot deleted" @Failure 400 {object} map[string]interface{} "Invalid request" @Failure 404 {object} map[string]interface{} "Snapshot not found" @Failure 500 {object} map[string]interface{} "Failed to delete snapshot" @Security BearerAuth @Router /osm/api/snapshots/{name} [delete]
func DeleteVulnerability ¶
DeleteVulnerability handles deleting a vulnerability @Summary Delete vulnerability @Description Delete a vulnerability by ID @Tags Vulnerabilities @Produce json @Param id path int true "Vulnerability ID" @Success 200 {object} map[string]interface{} "Vulnerability deleted" @Failure 400 {object} map[string]interface{} "Invalid ID" @Failure 404 {object} map[string]interface{} "Vulnerability not found" @Failure 500 {object} map[string]interface{} "Failed to delete vulnerability" @Security BearerAuth @Router /osm/api/vulnerabilities/{id} [delete]
func DisableSchedule ¶
DisableSchedule handles disabling a schedule @Summary Disable a schedule @Description Disable an enabled schedule @Tags Schedules @Produce json @Param id path string true "Schedule ID" @Success 200 {object} map[string]interface{} "Schedule disabled" @Security BearerAuth @Router /osm/api/schedules/{id}/disable [post]
func DownloadArtifact ¶
DownloadArtifact handles artifact download
func DownloadWorkspaceArtifact ¶
DownloadWorkspaceArtifact handles downloading a file artifact from a workspace @Summary Download workspace artifact @Description Download a single file under the given workspace by relative artifact path @Tags Artifacts @Produce application/octet-stream @Param workspace_name path string true "Workspace name" @Param artifact_path query string true "Relative path to artifact under workspace" @Success 200 {file} binary "Artifact file" @Failure 400 {object} map[string]interface{} "Invalid request" @Failure 403 {object} map[string]interface{} "Forbidden" @Failure 404 {object} map[string]interface{} "Artifact not found" @Failure 500 {object} map[string]interface{} "Failed to download artifact" @Security BearerAuth @Router /osm/api/artifacts/{workspace_name} [get]
func DuplicateRun ¶ added in v5.0.1
DuplicateRun duplicates an existing run with pending status @Summary Duplicate a run @Description Create a copy of an existing run with pending status. The duplicate will have the same workflow, target, and parameters but a new UUID. @Tags Runs @Produce json @Param id path string true "Run ID or RunUUID" @Success 201 {object} map[string]interface{} "Run duplicated" @Failure 404 {object} map[string]interface{} "Run not found" @Security BearerAuth @Router /osm/api/runs/{id}/duplicate [post]
func EmitEvent ¶
func EmitEvent(provider EventReceiverProvider) fiber.Handler
EmitEvent emits an event to trigger matching workflows @Summary Emit an event @Description Emits an event that can trigger event-triggered workflows @Tags event-receiver @Accept json @Produce json @Param request body EmitEventRequest true "Event to emit" @Success 200 {object} EmitEventResponse @Failure 400 {object} map[string]interface{} @Router /osm/api/events/emit [post]
func EnableSchedule ¶
EnableSchedule handles enabling a schedule @Summary Enable a schedule @Description Enable a disabled schedule @Tags Schedules @Produce json @Param id path string true "Schedule ID" @Success 200 {object} map[string]interface{} "Schedule enabled" @Security BearerAuth @Router /osm/api/schedules/{id}/enable [post]
func FunctionEval ¶
FunctionEval executes a utility function script @Summary Execute utility function @Description Execute a utility function script with template rendering and JavaScript execution @Tags Functions @Accept json @Produce json @Param request body FunctionEvalRequest true "Function evaluation request" @Success 200 {object} map[string]interface{} "Evaluation result" @Failure 400 {object} map[string]interface{} "Invalid request" @Security BearerAuth @Router /osm/api/functions/eval [post]
func FunctionList ¶
FunctionList returns all available utility functions @Summary List utility functions @Description Get a flat list of all available utility functions with metadata @Tags Functions @Produce json @Success 200 {object} map[string]interface{} "List of functions with total count" @Security BearerAuth @Router /osm/api/functions/list [get]
func GetAllWorkflowTags ¶
GetAllWorkflowTags returns all unique tags from indexed workflows @Summary Get all workflow tags @Description Get all unique tags from indexed workflows in database @Tags Workflows @Produce json @Success 200 {object} map[string]interface{} "List of tags" @Failure 500 {object} map[string]interface{} "Failed to get tags" @Security BearerAuth @Router /osm/api/workflows/tags [get]
func GetAssetDiff ¶
GetAssetDiff returns the diff between two time points for assets @Summary Get asset diff @Description Compare assets between two time points to find added, removed, and changed assets @Tags Assets @Produce json @Param workspace query string true "Workspace name" @Param from query string true "Start time (RFC3339 format or Unix timestamp)" @Param to query string false "End time (default: now)" @Success 200 {object} map[string]interface{} "Asset diff result" @Failure 400 {object} map[string]interface{} "Invalid parameters" @Failure 500 {object} map[string]interface{} "Failed to get asset diff" @Security BearerAuth @Router /osm/api/assets/diff [get]
func GetAssetStats ¶ added in v5.0.1
GetAssetStats returns unique lists of technologies, sources, remarks, and asset types @Summary Get asset statistics @Description Get unique values for technologies, sources, remarks, and asset types across all assets or filtered by workspace @Tags Stats @Produce json @Param workspace query string false "Filter by workspace name" @Success 200 {object} database.AssetStatsData "Asset statistics" @Failure 500 {object} map[string]interface{} "Failed to get stats" @Security BearerAuth @Router /osm/api/asset-stats [get]
func GetConfigStatus ¶
func GetConfigStatus(hotConfig *config.HotReloadableConfig) fiber.Handler
GetConfigStatus returns the current configuration status including hot reload info @Summary Get config status @Description Returns the current configuration version and hot reload status @Tags Settings @Produce json @Success 200 {object} map[string]interface{} "Configuration status" @Security BearerAuth @Router /osm/api/settings/status [get]
func GetEventReceiverStatus ¶
func GetEventReceiverStatus(provider EventReceiverProvider) fiber.Handler
GetEventReceiverStatus returns the status of the event receiver @Summary Get event receiver status @Description Returns the status of the event receiver including enabled state and counts @Tags event-receiver @Accept json @Produce json @Success 200 {object} EventReceiverStatusResponse @Router /osm/api/event-receiver/status [get]
func GetJobStatus ¶
GetJobStatus handles getting the status of a job (group of runs) @Summary Get job status @Description Get the aggregated status of a job and its runs @Tags Jobs @Produce json @Param id path string true "Job ID" @Success 200 {object} map[string]interface{} "Job status" @Failure 404 {object} map[string]interface{} "Job not found" @Security BearerAuth @Router /osm/api/jobs/{id} [get]
func GetRegistryInfo ¶
GetRegistryInfo returns binary registry with installation status @Summary Get registry info @Description Get binary registry with mode support (direct-fetch or nix-build) @Tags Install @Produce json @Param registry_mode query string false "Registry mode: direct-fetch or nix-build" default(direct-fetch) @Success 200 {object} map[string]interface{} "Registry data" @Failure 500 {object} map[string]interface{} "Failed to load registry" @Security BearerAuth @Router /osm/api/registry-info [get]
func GetRun ¶
GetRun handles getting a single run @Summary Get run details @Description Get details of a specific run by ID, including steps and artifacts @Tags Runs @Produce json @Param id path string true "Run ID or RunID" @Param include_steps query bool false "Include step results" default(false) @Param include_artifacts query bool false "Include artifacts" default(false) @Success 200 {object} map[string]interface{} "Run details" @Failure 404 {object} map[string]interface{} "Run not found" @Security BearerAuth @Router /osm/api/runs/{id} [get]
func GetRunArtifacts ¶
GetRunArtifacts handles getting run artifacts
func GetSchedule ¶
GetSchedule handles getting a single schedule @Summary Get schedule details @Description Get details of a specific schedule by ID @Tags Schedules @Produce json @Param id path string true "Schedule ID" @Success 200 {object} map[string]interface{} "Schedule details" @Failure 404 {object} map[string]interface{} "Schedule not found" @Security BearerAuth @Router /osm/api/schedules/{id} [get]
func GetSettings ¶
GetSettings returns basic settings
func GetSettingsYAML ¶
GetSettingsYAML returns the entire YAML configuration with sensitive fields redacted @Summary Get YAML configuration @Description Returns the entire configuration file with sensitive fields redacted @Tags Settings @Produce text/yaml @Success 200 {string} string "YAML configuration content" @Failure 500 {object} map[string]interface{} "Internal server error" @Security BearerAuth @Router /osm/api/settings/yaml [get]
func GetSystemStats ¶
GetSystemStats returns aggregated system statistics @Summary Get system statistics @Description Get aggregated counts for workflows, runs, workspaces, assets, vulnerabilities, and schedules @Tags Stats @Produce json @Success 200 {object} database.SystemStats "System statistics" @Failure 500 {object} map[string]interface{} "Failed to get stats" @Security BearerAuth @Router /osm/api/stats [get]
func GetTask ¶
func GetTask(master *distributed.Master) fiber.Handler
GetTask returns details for a specific task @Summary Get task details @Description Get details for a specific task by ID @Tags Distributed @Produce json @Param id path string true "Task ID" @Success 200 {object} map[string]interface{} "Task details" @Failure 404 {object} map[string]interface{} "Task not found" @Security BearerAuth @Router /osm/api/tasks/{id} [get]
func GetVulnerability ¶
GetVulnerability handles getting a single vulnerability by ID @Summary Get vulnerability by ID @Description Get a single vulnerability by its ID @Tags Vulnerabilities @Produce json @Param id path int true "Vulnerability ID" @Success 200 {object} map[string]interface{} "Vulnerability details" @Failure 400 {object} map[string]interface{} "Invalid ID" @Failure 404 {object} map[string]interface{} "Vulnerability not found" @Failure 500 {object} map[string]interface{} "Failed to fetch vulnerability" @Security BearerAuth @Router /osm/api/vulnerabilities/{id} [get]
func GetVulnerabilityDiff ¶
GetVulnerabilityDiff returns the diff between two time points for vulnerabilities @Summary Get vulnerability diff @Description Compare vulnerabilities between two time points to find added, removed, and changed vulnerabilities @Tags Vulnerabilities @Produce json @Param workspace query string true "Workspace name" @Param from query string true "Start time (RFC3339 format or Unix timestamp)" @Param to query string false "End time (default: now)" @Success 200 {object} map[string]interface{} "Vulnerability diff result" @Failure 400 {object} map[string]interface{} "Invalid parameters" @Failure 500 {object} map[string]interface{} "Failed to get vulnerability diff" @Security BearerAuth @Router /osm/api/vulnerabilities/diff [get]
func GetVulnerabilitySummary ¶
GetVulnerabilitySummary returns severity summary for a workspace @Summary Get vulnerability summary @Description Get a summary of vulnerabilities grouped by severity @Tags Vulnerabilities @Produce json @Param workspace query string false "Filter by workspace name" @Success 200 {object} map[string]interface{} "Vulnerability summary by severity" @Failure 500 {object} map[string]interface{} "Failed to get summary" @Security BearerAuth @Router /osm/api/vulnerabilities/summary [get]
func GetWorker ¶
func GetWorker(master *distributed.Master) fiber.Handler
GetWorker returns details for a specific worker @Summary Get worker details @Description Get details for a specific worker by ID @Tags Distributed @Produce json @Param id path string true "Worker ID" @Success 200 {object} map[string]interface{} "Worker details" @Failure 404 {object} map[string]interface{} "Worker not found" @Failure 500 {object} map[string]interface{} "Failed to get worker" @Security BearerAuth @Router /osm/api/workers/{id} [get]
func GetWorkflow ¶
GetWorkflow handles getting a single workflow
func GetWorkflowVerbose ¶
GetWorkflowVerbose handles getting a single workflow with verbose details @Summary Get workflow details @Description Get workflow content. Returns raw YAML by default. Use json=true to get JSON with parsed details. @Tags Workflows @Produce json,text/yaml @Param name path string true "Workflow name" @Param json query bool false "Return JSON with parsed details instead of raw YAML" @Success 200 {object} map[string]interface{} "Workflow details (JSON) or raw YAML content" @Failure 404 {object} map[string]interface{} "Workflow not found" @Security BearerAuth @Router /osm/api/workflows/{name} [get]
func HealthCheck ¶
HealthCheck handles health check requests @Summary Health check @Description Check if the server is running @Tags Health @Produce json @Success 200 {object} map[string]string "status: ok" @Router /health [get]
func LLMChat ¶
LLMChat handles direct LLM chat completion requests @Summary LLM Chat Completion @Description Send a chat completion request to the configured LLM provider (OpenAI-compatible) @Tags LLM @Accept json @Produce json @Param request body LLMChatRequest true "Chat request" @Success 200 {object} LLMChatResponse "Chat response" @Failure 400 {object} map[string]interface{} "Invalid request" @Failure 500 {object} map[string]interface{} "LLM error" @Security BearerAuth @Router /osm/api/llm/v1/chat/completions [post]
func LLMEmbedding ¶
LLMEmbedding handles embedding generation requests @Summary Generate Embeddings @Description Generate embeddings for input text using the configured LLM provider @Tags LLM @Accept json @Produce json @Param request body LLMEmbeddingRequest true "Embedding request" @Success 200 {object} LLMEmbeddingResponse "Embedding response" @Failure 400 {object} map[string]interface{} "Invalid request" @Failure 500 {object} map[string]interface{} "LLM error" @Security BearerAuth @Router /osm/api/llm/v1/embeddings [post]
func ListArtifacts ¶
ListArtifacts handles listing artifacts with pagination and filtering @Summary List artifacts @Description Get a paginated list of artifacts with optional filtering and existence checks @Tags Artifacts @Produce json @Param workspace query string false "Filter by workspace name" @Param search query string false "Search in artifact name/path" @Param status_code query int false "Filter by HTTP status code (also accepts statusCode)" @Param verify_exist query bool false "Annotate results with path_exists and path_is_dir" default(false) @Param offset query int false "Number of records to skip" default(0) @Param limit query int false "Maximum number of records to return" default(20) @Success 200 {object} map[string]interface{} "List of artifacts with pagination" @Failure 500 {object} map[string]interface{} "Failed to fetch artifacts" @Security BearerAuth @Router /osm/api/artifacts [get]
func ListAssetDiffSnapshots ¶
ListAssetDiffSnapshots handles listing stored asset diff snapshots @Summary List asset diff snapshots @Description Get a paginated list of stored asset diff snapshots @Tags Assets @Produce json @Param workspace query string false "Filter by workspace name" @Param offset query int false "Number of records to skip" default(0) @Param limit query int false "Maximum number of records to return" default(20) @Success 200 {object} map[string]interface{} "List of asset diff snapshots with pagination" @Failure 500 {object} map[string]interface{} "Failed to fetch asset diff snapshots" @Security BearerAuth @Router /osm/api/assets/diffs [get]
func ListAssets ¶
ListAssets handles listing assets with pagination and filtering @Summary List assets @Description Get a paginated list of assets with optional filtering @Tags Assets @Produce json @Param workspace query string false "Filter by workspace name" @Param search query string false "Search in asset_value, url, title, host_ip" @Param status_code query int false "Filter by HTTP status code" @Param offset query int false "Number of records to skip" default(0) @Param limit query int false "Maximum number of records to return" default(20) @Success 200 {object} map[string]interface{} "List of assets with pagination" @Failure 500 {object} map[string]interface{} "Failed to fetch assets" @Security BearerAuth @Router /osm/api/assets [get]
func ListDatabaseTables ¶ added in v5.0.1
ListDatabaseTables returns information about all database tables @Summary List database tables @Description Get list of all database tables with row counts @Tags Database @Produce json @Success 200 {object} map[string]interface{} "List of tables with counts" @Failure 500 {object} map[string]interface{} "Internal error" @Security BearerAuth @Router /osm/api/database/tables [get]
func ListEventLogs ¶
ListEventLogs handles listing event logs with filtering and pagination @Summary List event logs @Description Get a paginated list of event logs with optional filtering @Tags EventLogs @Produce json @Param topic query string false "Filter by event topic (e.g., run.started, run.completed)" @Param name query string false "Filter by event name" @Param source query string false "Filter by source (scheduler, api, webhook)" @Param workspace query string false "Filter by workspace" @Param run_uuid query string false "Filter by run UUID" @Param workflow_name query string false "Filter by workflow name" @Param processed query string false "Filter by processed status (true/false)" @Param offset query int false "Number of records to skip" default(0) @Param limit query int false "Maximum number of records to return" default(20) @Success 200 {object} map[string]interface{} "List of event logs with pagination" @Failure 500 {object} map[string]interface{} "Failed to fetch event logs" @Security BearerAuth @Router /osm/api/event-logs [get]
func ListEventReceiverWorkflows ¶
func ListEventReceiverWorkflows(provider EventReceiverProvider) fiber.Handler
ListEventReceiverWorkflows lists all registered event-triggered workflows @Summary List event receiver workflows @Description Returns all workflows registered with the event receiver @Tags event-receiver @Accept json @Produce json @Success 200 {object} EventReceiverWorkflowsResponse @Router /osm/api/event-receiver/workflows [get]
func ListRuns ¶
ListRuns handles listing runs @Summary List runs @Description Get a paginated list of workflow runs with optional filters @Tags Runs @Produce json @Param offset query int false "Number of records to skip" default(0) @Param limit query int false "Maximum number of records to return" default(20) @Param status query string false "Filter by status (pending, running, completed, failed, cancelled)" @Param workflow query string false "Filter by workflow name" @Param target query string false "Filter by target (partial match)" @Param workspace query string false "Filter by workspace name (exact match)" @Success 200 {object} map[string]interface{} "List of runs" @Security BearerAuth @Router /osm/api/runs [get]
func ListSchedules ¶
ListSchedules handles listing all schedules @Summary List all schedules @Description Get a paginated list of all scheduled workflows @Tags Schedules @Produce json @Param offset query int false "Number of records to skip" default(0) @Param limit query int false "Maximum number of records to return" default(20) @Success 200 {object} map[string]interface{} "List of schedules" @Security BearerAuth @Router /osm/api/schedules [get]
func ListSnapshots ¶
ListSnapshots handles listing available snapshots @Summary List snapshots @Description Get a list of available snapshot files in the snapshot directory @Tags Snapshots @Produce json @Success 200 {object} map[string]interface{} "List of snapshots" @Failure 500 {object} map[string]interface{} "Failed to list snapshots" @Security BearerAuth @Router /osm/api/snapshots [get]
func ListStepResults ¶
ListStepResults handles listing all step results with pagination and filtering @Summary List step results @Description Get a paginated list of step results with optional filtering @Tags Steps @Produce json @Param workspace query string false "Filter by workspace name" @Param status query string false "Filter by status (pending, running, completed, failed)" @Param step_type query string false "Filter by step type (bash, function, etc.)" @Param run_uuid query string false "Filter by run UUID" @Param offset query int false "Number of records to skip" default(0) @Param limit query int false "Maximum number of records to return" default(20) @Success 200 {object} map[string]interface{} "List of step results with pagination" @Failure 500 {object} map[string]interface{} "Failed to fetch step results" @Security BearerAuth @Router /osm/api/step-results [get]
func ListTasks ¶
func ListTasks(master *distributed.Master) fiber.Handler
ListTasks returns all tasks (running and completed) @Summary List all tasks @Description Get a list of all running and completed tasks @Tags Distributed @Produce json @Success 200 {object} map[string]interface{} "List of running and completed tasks" @Failure 500 {object} map[string]interface{} "Failed to list tasks" @Security BearerAuth @Router /osm/api/tasks [get]
func ListVulnDiffSnapshots ¶
ListVulnDiffSnapshots handles listing stored vulnerability diff snapshots @Summary List vulnerability diff snapshots @Description Get a paginated list of stored vulnerability diff snapshots @Tags Vulnerabilities @Produce json @Param workspace query string false "Filter by workspace name" @Param offset query int false "Number of records to skip" default(0) @Param limit query int false "Maximum number of records to return" default(20) @Success 200 {object} map[string]interface{} "List of vulnerability diff snapshots with pagination" @Failure 500 {object} map[string]interface{} "Failed to fetch vulnerability diff snapshots" @Security BearerAuth @Router /osm/api/vulnerabilities/diffs [get]
func ListVulnerabilities ¶
ListVulnerabilities handles listing vulnerabilities with pagination and filtering @Summary List vulnerabilities @Description Get a paginated list of vulnerabilities with optional workspace, severity, and confidence filtering @Tags Vulnerabilities @Produce json @Param workspace query string false "Filter by workspace name" @Param severity query string false "Filter by severity (critical, high, medium, low, info)" @Param confidence query string false "Filter by confidence (certain, firm, tentative, manual review required)" @Param asset_value query string false "Filter by asset value (partial match)" @Param offset query int false "Number of records to skip" default(0) @Param limit query int false "Maximum number of records to return" default(20) @Success 200 {object} map[string]interface{} "List of vulnerabilities with pagination" @Failure 500 {object} map[string]interface{} "Failed to fetch vulnerabilities" @Security BearerAuth @Router /osm/api/vulnerabilities [get]
func ListWebhookRuns ¶ added in v5.0.1
ListWebhookRuns returns all runs with a webhook UUID (authenticated)
func ListWorkers ¶
func ListWorkers(master *distributed.Master) fiber.Handler
ListWorkers returns all registered workers with their current status @Summary List all workers @Description Get a list of all registered workers in the distributed pool @Tags Distributed @Produce json @Success 200 {object} map[string]interface{} "List of workers" @Failure 500 {object} map[string]interface{} "Failed to list workers" @Security BearerAuth @Router /osm/api/workers [get]
func ListWorkflows ¶
ListWorkflows handles listing workflows
func ListWorkflowsVerbose ¶
ListWorkflowsVerbose handles listing workflows with verbose details @Summary List all workflows @Description Get a list of all available workflows with details @Tags Workflows @Produce json @Success 200 {object} map[string]interface{} "List of workflows" @Failure 500 {object} map[string]interface{} "Failed to load workflows" @Security BearerAuth @Router /osm/api/workflows [get]
func ListWorkspaceNames ¶
ListWorkspaceNames handles listing workspace names @Summary List workspace names @Description Get a sorted list of workspace names from the database @Tags Workspaces @Produce json @Success 200 {array} string "Workspace names" @Failure 500 {object} map[string]interface{} "Failed to list workspace names" @Security BearerAuth @Router /osm/api/workspace-names [get]
func ListWorkspaces ¶
ListWorkspaces handles listing all workspaces @Summary List all workspaces @Description Get a list of all run workspaces. By default returns full workspace records from database. Use filesystem=true to list workspaces derived from assets. @Tags Workspaces @Produce json @Param filesystem query bool false "List workspaces from filesystem/assets instead of workspaces table" default(false) @Param offset query int false "Number of records to skip" default(0) @Param limit query int false "Maximum number of records to return (max 10000)" default(20) @Success 200 {object} map[string]interface{} "List of workspaces" @Failure 500 {object} map[string]interface{} "Failed to read workspaces" @Security BearerAuth @Router /osm/api/workspaces [get]
func Login ¶
Login handles user authentication @Summary User login @Description Authenticate user and get JWT token @Tags Auth @Accept json @Produce json @Param credentials body LoginRequest true "Login credentials" @Success 200 {object} map[string]string "JWT token" @Failure 400 {object} map[string]interface{} "Invalid request" @Failure 401 {object} map[string]interface{} "Invalid credentials" @Router /osm/api/login [post]
func Logout ¶ added in v5.0.1
Logout handles user logout by clearing the session cookie @Summary User logout @Description Clear the session cookie @Tags Auth @Produce json @Success 200 {object} map[string]string "Logout message" @Router /osm/api/logout [post]
func ReadinessCheck ¶
ReadinessCheck handles readiness check requests @Summary Readiness check @Description Check if the server is ready to accept requests @Tags Health @Produce json @Success 200 {object} map[string]string "status: ready" @Router /health/ready [get]
func RefreshToken ¶
RefreshToken handles token refresh
func RefreshWorkflowIndex ¶
RefreshWorkflowIndex re-indexes workflows from filesystem to database @Summary Refresh workflow index @Description Re-index all workflows from filesystem to database @Tags Workflows @Accept json @Produce json @Param force query bool false "Force re-index all workflows regardless of checksum" @Success 200 {object} map[string]interface{} "Indexing result" @Failure 500 {object} map[string]interface{} "Indexing failed" @Security BearerAuth @Router /osm/api/workflows/refresh [post]
func RegistryInstall ¶
RegistryInstall handles binary or workflow installation via API @Summary Install binaries or workflows @Description Install binaries from registry or workflows from git/zip URL. Supports direct-fetch and nix-build modes. @Tags Install @Accept json @Produce json @Param request body InstallRequest true "Installation configuration" @Success 200 {object} map[string]interface{} "Installation result" @Failure 400 {object} map[string]interface{} "Invalid request" @Failure 500 {object} map[string]interface{} "Installation failed" @Security BearerAuth @Router /osm/api/registry-install [post]
func ReloadConfig ¶
func ReloadConfig(hotConfig *config.HotReloadableConfig) fiber.Handler
ReloadConfig forces a configuration reload (hot reload must be enabled) @Summary Force config reload @Description Forces an immediate reload of the configuration file. Hot reload must be enabled. @Tags Settings @Produce json @Success 200 {object} map[string]interface{} "Configuration reloaded successfully" @Failure 400 {object} map[string]interface{} "Hot reload not enabled" @Failure 500 {object} map[string]interface{} "Failed to reload configuration" @Security BearerAuth @Router /osm/api/settings/reload [post]
func ReloadWorkflows ¶
ReloadWorkflows handles reloading workflows from disk
func Root ¶
Root handles the root endpoint showing version info @Summary Server info @Description Get server version and info @Tags Info @Produce json @Success 200 {object} map[string]string "Server information" @Router / [get]
func ServerInfo ¶
ServerInfo handles the /server-info endpoint @Summary Server info JSON @Description Get server version and info in JSON @Tags Info @Produce json @Success 200 {object} map[string]string "Server information" @Router /server-info [get]
func SetServerInfo ¶
func SetServerInfo(info *ServerInfoData)
SetServerInfo sets the cached server info (called once at server startup)
func SnapshotDownload ¶
SnapshotDownload compresses a workspace and serves it for download @Summary Download workspace snapshot @Description Compress a workspace folder into a zip file and download it @Tags Snapshots @Produce application/zip @Param workspace_name path string true "Workspace name" @Success 200 {file} file "Zip file download" @Failure 404 {object} map[string]interface{} "Workspace not found" @Failure 500 {object} map[string]interface{} "Failed to create snapshot" @Security BearerAuth @Router /osm/api/snapshot-download/{workspace_name} [get]
func SnapshotExport ¶
SnapshotExport handles exporting a workspace to a snapshot @Summary Export workspace snapshot @Description Export a workspace to a compressed zip archive and download it @Tags Snapshots @Accept json @Produce application/zip @Param body body SnapshotExportRequest true "Workspace to export" @Success 200 {file} binary "Snapshot zip file" @Failure 400 {object} map[string]interface{} "Invalid request" @Failure 404 {object} map[string]interface{} "Workspace not found" @Failure 500 {object} map[string]interface{} "Failed to create snapshot" @Security BearerAuth @Router /osm/api/snapshots/export [post]
func SnapshotImport ¶
SnapshotImport handles importing a workspace from a snapshot @Summary Import workspace snapshot @Description Import a workspace from an uploaded zip file or URL @Tags Snapshots @Accept multipart/form-data @Produce json @Param file formData file false "Snapshot zip file to import" @Param url formData string false "URL of snapshot to download and import" @Param force formData bool false "Overwrite existing workspace if present" @Param skip_db formData bool false "Skip database import (files only)" @Success 200 {object} map[string]interface{} "Import result" @Failure 400 {object} map[string]interface{} "Invalid request" @Failure 500 {object} map[string]interface{} "Failed to import snapshot" @Security BearerAuth @Router /osm/api/snapshots/import [post]
func StartRun ¶ added in v5.0.1
StartRun starts a pending run (triggers workflow execution) @Summary Start a pending run @Description Start a run that is in pending status. This triggers the workflow execution. @Tags Runs @Produce json @Param id path string true "Run ID or RunUUID" @Success 202 {object} map[string]interface{} "Run started" @Failure 400 {object} map[string]interface{} "Run cannot be started (not in pending status)" @Failure 404 {object} map[string]interface{} "Run or workflow not found" @Security BearerAuth @Router /osm/api/runs/{id}/start [post]
func SubmitTask ¶
func SubmitTask(master *distributed.Master) fiber.Handler
SubmitTask submits a new task to the distributed queue @Summary Submit a new task @Description Submit a new task to the distributed worker queue @Tags Distributed @Accept json @Produce json @Param task body SubmitTaskRequest true "Task configuration" @Success 202 {object} map[string]interface{} "Task submitted" @Failure 400 {object} map[string]interface{} "Invalid request" @Failure 500 {object} map[string]interface{} "Failed to submit task" @Security BearerAuth @Router /osm/api/tasks [post]
func TriggerSchedule ¶
TriggerSchedule handles manually triggering a scheduled workflow @Summary Trigger a schedule @Description Manually trigger a scheduled workflow execution @Tags Schedules @Produce json @Param id path string true "Schedule ID" @Success 202 {object} map[string]interface{} "Schedule triggered" @Security BearerAuth @Router /osm/api/schedules/{id}/trigger [post]
func TriggerWebhookRun ¶ added in v5.0.1
TriggerWebhookRun triggers a run via its webhook UUID (unauthenticated)
func UpdateSchedule ¶
UpdateSchedule handles updating a schedule @Summary Update a schedule @Description Update an existing schedule @Tags Schedules @Accept json @Produce json @Param id path string true "Schedule ID" @Param schedule body UpdateScheduleRequest true "Schedule update data" @Success 200 {object} map[string]interface{} "Schedule updated" @Failure 404 {object} map[string]interface{} "Schedule not found" @Security BearerAuth @Router /osm/api/schedules/{id} [put]
func UploadFile ¶
UploadFile handles uploading a file containing a list of inputs @Summary Upload input file @Description Upload a file containing a list of inputs (targets, URLs, etc.) for later use in runs @Tags Files @Accept multipart/form-data @Produce json @Param file formData file true "Input file to upload" @Success 200 {object} map[string]interface{} "File uploaded with path" @Failure 400 {object} map[string]interface{} "Invalid request" @Security BearerAuth @Router /osm/api/upload-file [post]
func UploadWorkflow ¶
UploadWorkflow handles uploading a workflow YAML file @Summary Upload workflow file @Description Upload a raw YAML workflow file and save it to the workflows directory @Tags Workflows @Accept multipart/form-data @Produce json @Param file formData file true "Workflow YAML file" @Success 201 {object} map[string]interface{} "Workflow uploaded" @Failure 400 {object} map[string]interface{} "Invalid request or YAML" @Security BearerAuth @Router /osm/api/workflow-upload [post]
Types ¶
type AgentChatMessage ¶ added in v5.0.1
AgentChatMessage represents a single message in a chat conversation.
type AgentChatRequest ¶ added in v5.0.1
type AgentChatRequest struct {
Messages []AgentChatMessage `json:"messages"`
Model string `json:"model,omitempty"` // maps to agent name (default: "claude-code")
}
AgentChatRequest represents an OpenAI-compatible chat completion request for ACP agents.
type AgentChatResponse ¶ added in v5.0.1
type AgentChatResponse struct {
ID string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
Model string `json:"model"`
Choices []AgentChoice `json:"choices"`
}
AgentChatResponse represents an OpenAI-compatible chat completion response.
type AgentChoice ¶ added in v5.0.1
type AgentChoice struct {
Index int `json:"index"`
Message AgentChatMessage `json:"message"`
FinishReason string `json:"finish_reason"`
}
AgentChoice represents a single choice in the chat completion response.
type BinaryStatusEntry ¶
type BinaryStatusEntry struct {
Desc string `json:"desc,omitempty"`
RepoLink string `json:"repo_link,omitempty"`
Version string `json:"version,omitempty"`
Tags []string `json:"tags,omitempty"`
ValidateCommand string `json:"valide-command,omitempty"`
Linux map[string]string `json:"linux,omitempty"`
Darwin map[string]string `json:"darwin,omitempty"`
Windows map[string]string `json:"windows,omitempty"`
CommandLinux map[string]string `json:"command-linux,omitempty"`
CommandDarwin map[string]string `json:"command-darwin,omitempty"`
CommandDual map[string]string `json:"command-dual,omitempty"`
MultiCommandsLinux []string `json:"multi-commands-linux,omitempty"`
MultiCommandsDarwin []string `json:"multi-commands-darwin,omitempty"`
Installed bool `json:"installed"`
Path string `json:"path,omitempty"`
Optional bool `json:"optional"`
}
BinaryStatusEntry represents a binary with its registry info and installation status
type ClearTableRequest ¶ added in v5.0.1
type ClearTableRequest struct {
Force bool `json:"force"` // Must be true to confirm the destructive operation
}
ClearTableRequest represents a request to clear a database table
type ConfigProvider ¶
ConfigProvider provides access to the current configuration. This interface allows handlers to retrieve fresh configuration on each request, supporting hot reload when enabled.
type CreateRunRequest ¶
type CreateRunRequest struct {
// Workflow identification
Flow string `json:"flow"` // Flow workflow name
Module string `json:"module"` // Module workflow name
Target string `json:"target,omitempty"`
Params map[string]string `json:"params"`
// Multi-target support
Targets []string `json:"targets,omitempty"` // Array of targets to run against
TargetFile string `json:"target_file,omitempty"` // Path to file containing targets (one per line)
// Concurrency control
Concurrency int `json:"concurrency,omitempty"` // Number of concurrent runs (default: 1)
// Priority and timeout
Priority string `json:"priority,omitempty"` // low, normal, high, critical (default: high)
RunMode string `json:"run_mode,omitempty"` // local, distributed, cloud (default: local)
Timeout int `json:"timeout,omitempty"` // Timeout in minutes (0 = no timeout)
// Runner configuration
RunnerType string `json:"runner_type,omitempty"` // host, docker, ssh (default: host)
DockerImage string `json:"docker_image,omitempty"` // Docker image to use when runner_type=docker
SSHHost string `json:"ssh_host,omitempty"` // SSH host when runner_type=ssh
// Scheduling options
Schedule string `json:"schedule,omitempty"` // Cron expression for scheduled scans
ScheduleEnabled bool `json:"schedule_enabled,omitempty"` // Enable scheduled execution
NotifyOnComplete bool `json:"notify_on_complete,omitempty"` // Send notification when run completes
// Execution options (mirrors CLI flags)
ThreadsHold int `json:"threads_hold,omitempty"` // Override thread count (0 = use tactic default)
EmptyTarget bool `json:"empty_target,omitempty"` // Run without target (generates placeholder target)
Repeat bool `json:"repeat,omitempty"` // Repeat run after completion
RepeatWaitTime string `json:"repeat_wait_time,omitempty"` // Wait time between repeats (e.g., 30s, 20m, 10h, 1d)
HeuristicsCheck string `json:"heuristics_check,omitempty"` // Heuristics check level: none, basic, advanced
// Validation
SkipValidation bool `json:"skip_validation,omitempty"` // Skip input validation for dangerous shell characters
}
CreateRunRequest represents a run creation request
type CreateScheduleRequest ¶
type CreateScheduleRequest struct {
Name string `json:"name"`
WorkflowName string `json:"workflow_name"`
WorkflowKind string `json:"workflow_kind,omitempty"` // "module" or "flow"
Target string `json:"target,omitempty"`
Workspace string `json:"workspace,omitempty"`
Schedule string `json:"schedule"` // cron expression
Params map[string]interface{} `json:"params,omitempty"`
EventTopic string `json:"event_topic,omitempty"`
WatchPath string `json:"watch_path,omitempty"`
TriggerType string `json:"trigger_type,omitempty"` // cron, event, watch, manual
Enabled bool `json:"enabled"`
RunnerType string `json:"runner_type,omitempty"`
}
CreateScheduleRequest represents a schedule creation request
type CreateVulnerabilityInput ¶
type CreateVulnerabilityInput struct {
Workspace string `json:"workspace"`
VulnInfo string `json:"vuln_info"`
VulnTitle string `json:"vuln_title"`
VulnDesc string `json:"vuln_desc"`
VulnPOC string `json:"vuln_poc"`
Severity string `json:"severity"`
AssetType string `json:"asset_type"`
AssetValue string `json:"asset_value"`
Tags []string `json:"tags"`
DetailHTTPRequest string `json:"detail_http_request"`
DetailHTTPResponse string `json:"detail_http_response"`
RawVulnJSON string `json:"raw_vuln_json"`
}
CreateVulnerabilityInput represents the input for creating a vulnerability
type EmitEventRequest ¶
type EmitEventRequest struct {
Topic string `json:"topic"`
Name string `json:"name,omitempty"`
Source string `json:"source,omitempty"`
Data map[string]interface{} `json:"data,omitempty"`
DataType string `json:"data_type,omitempty"`
}
EmitEventRequest represents the request body for emitting events
type EmitEventResponse ¶
type EmitEventResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
EventID string `json:"event_id,omitempty"`
}
EmitEventResponse represents the response for emitting events
type EventReceiverProvider ¶
type EventReceiverProvider interface {
IsRunning() bool
GetRegisteredWorkflows() []*core.Workflow
GetRegisteredTriggersInfo() []*EventReceiverTriggerInfo
EmitEvent(event *core.Event) error
// RegisterSchedule dynamically registers a trigger with the running scheduler
RegisterSchedule(workflow *core.Workflow, trigger *core.Trigger) error
// GetWorkflowLoader returns the workflow loader for dynamic schedule registration
GetWorkflowLoader() WorkflowLoader
}
EventReceiverProvider is an interface for event receiver operations. This allows handlers to work with the event receiver without importing the server package (avoiding circular dependencies).
type EventReceiverStatusResponse ¶
type EventReceiverStatusResponse struct {
Enabled bool `json:"enabled"`
Running bool `json:"running"`
WorkflowCount int `json:"workflow_count"`
TriggerCount int `json:"trigger_count"`
}
EventReceiverStatusResponse represents the event receiver status
type EventReceiverTriggerInfo ¶
type EventReceiverTriggerInfo struct {
WorkflowName string
TriggerName string
Type string // "event", "cron", "watch", "manual"
Topic string
Enabled bool
}
EventReceiverTriggerInfo holds workflow and trigger info for API responses.
type EventReceiverTriggerResponse ¶
type EventReceiverTriggerResponse struct {
WorkflowName string `json:"workflow_name"`
TriggerName string `json:"trigger_name"`
Topic string `json:"topic"`
Enabled bool `json:"enabled"`
}
EventReceiverTriggerResponse represents a registered event trigger
type EventReceiverWorkflowResponse ¶
type EventReceiverWorkflowResponse struct {
Name string `json:"name"`
Kind string `json:"kind"`
Description string `json:"description"`
Triggers []string `json:"triggers"`
}
EventReceiverWorkflowResponse represents a registered event-triggered workflow
type EventReceiverWorkflowsResponse ¶
type EventReceiverWorkflowsResponse struct {
Workflows []EventReceiverWorkflowResponse `json:"workflows"`
Triggers []EventReceiverTriggerResponse `json:"triggers"`
}
EventReceiverWorkflowsResponse represents the list of registered workflows
type FunctionEvalRequest ¶
type FunctionEvalRequest struct {
Script string `json:"script"`
Target string `json:"target,omitempty"`
Params map[string]string `json:"params,omitempty"`
}
FunctionEvalRequest represents a function evaluation request
type FunctionListResponse ¶
type FunctionListResponse struct {
Name string `json:"name"`
Description string `json:"description"`
ReturnType string `json:"return_type"`
Example string `json:"example,omitempty"`
Tags []string `json:"tags,omitempty"`
}
FunctionListResponse represents a function in the list response
type HotReloadConfigProvider ¶
type HotReloadConfigProvider struct {
// contains filtered or unexported fields
}
HotReloadConfigProvider wraps a HotReloadableConfig. It returns the latest configuration on each call.
func NewHotReloadConfigProvider ¶
func NewHotReloadConfigProvider(hotConfig *config.HotReloadableConfig) *HotReloadConfigProvider
NewHotReloadConfigProvider creates a new HotReloadConfigProvider.
func (*HotReloadConfigProvider) Get ¶
func (p *HotReloadConfigProvider) Get() *config.Config
Get returns the current configuration from the hot reload config.
func (*HotReloadConfigProvider) GetHotConfig ¶
func (p *HotReloadConfigProvider) GetHotConfig() *config.HotReloadableConfig
GetHotConfig returns the underlying HotReloadableConfig. This is useful for accessing hot reload specific functionality like version and reload.
type InstallRequest ¶
type InstallRequest struct {
Type string `json:"type"` // "binary" or "workflow"
Names []string `json:"names,omitempty"` // Binary names to install (for type=binary)
Source string `json:"source,omitempty"` // Git URL, zip URL, or file path (for type=workflow)
RegistryURL string `json:"registry_url,omitempty"` // Custom registry URL (optional, for type=binary)
InstallAll bool `json:"install_all,omitempty"` // Install all binaries from registry (for type=binary)
InstallOptional bool `json:"install_optional,omitempty"` // Include optional binaries (only with install_all)
RegistryMode string `json:"registry_mode,omitempty"` // "direct-fetch" or "nix-build" (default: direct-fetch)
}
InstallRequest represents an installation request
type JobProgress ¶
type JobProgress struct {
Total int `json:"total"`
Pending int `json:"pending"`
Running int `json:"running"`
Completed int `json:"completed"`
Failed int `json:"failed"`
}
JobProgress represents progress statistics for a job
type JobStatus ¶
type JobStatus struct {
RunGroupID string `json:"run_group_id"`
Status string `json:"status"` // pending, running, completed, failed, partial
Runs []*database.Run `json:"runs"`
Progress JobProgress `json:"progress"`
}
JobStatus represents the aggregated status of a job (run group)
type LLMChatRequest ¶
type LLMChatRequest struct {
Messages []core.LLMMessage `json:"messages"`
Model string `json:"model,omitempty"`
MaxTokens int `json:"max_tokens,omitempty"`
Temperature *float64 `json:"temperature,omitempty"`
TopP *float64 `json:"top_p,omitempty"`
TopK *int `json:"top_k,omitempty"`
N int `json:"n,omitempty"`
Stream bool `json:"stream,omitempty"`
Tools []core.LLMTool `json:"tools,omitempty"`
ToolChoice interface{} `json:"tool_choice,omitempty"`
ResponseFormat *core.LLMResponseFormat `json:"response_format,omitempty"`
}
LLMChatRequest represents a direct LLM chat completion request
type LLMChatResponse ¶
type LLMChatResponse struct {
ID string `json:"id"`
Model string `json:"model"`
Content interface{} `json:"content"`
FinishReason string `json:"finish_reason"`
ToolCalls []core.LLMToolCall `json:"tool_calls,omitempty"`
Usage map[string]int `json:"usage"`
}
LLMChatResponse represents the chat completion response
type LLMEmbeddingRequest ¶
type LLMEmbeddingRequest struct {
Input []string `json:"input"`
Model string `json:"model,omitempty"`
}
LLMEmbeddingRequest represents an embedding request
type LLMEmbeddingResponse ¶
type LLMEmbeddingResponse struct {
Model string `json:"model"`
Embeddings [][]float64 `json:"embeddings"`
Usage map[string]int `json:"usage"`
}
LLMEmbeddingResponse represents the embedding response
type LoginRequest ¶
LoginRequest represents login credentials
type ServerInfoData ¶
type ServerInfoData struct {
License string
Version string
Binary string
Repo string
Author string
Docs string
Build string
Commit string
}
ServerInfoData holds cached server info set once at startup
type SnapshotExportRequest ¶
type SnapshotExportRequest struct {
Workspace string `json:"workspace"`
}
SnapshotExportRequest represents the request body for snapshot export
type SnapshotImportURLRequest ¶
type SnapshotImportURLRequest struct {
URL string `json:"url"`
}
SnapshotImportURLRequest represents the request body for import via URL
type StaticConfigProvider ¶
type StaticConfigProvider struct {
// contains filtered or unexported fields
}
StaticConfigProvider wraps a static config for backward compatibility. It always returns the same configuration instance.
func NewStaticConfigProvider ¶
func NewStaticConfigProvider(cfg *config.Config) *StaticConfigProvider
NewStaticConfigProvider creates a new StaticConfigProvider.
func (*StaticConfigProvider) Get ¶
func (p *StaticConfigProvider) Get() *config.Config
Get returns the static configuration.
type SubmitTaskRequest ¶
type SubmitTaskRequest struct {
WorkflowName string `json:"workflow_name"`
WorkflowKind string `json:"workflow_kind"`
Target string `json:"target"`
Params map[string]interface{} `json:"params"`
}
SubmitTaskRequest represents a task submission request
type UpdateScheduleRequest ¶
type UpdateScheduleRequest struct {
Name string `json:"name,omitempty"`
Target string `json:"target,omitempty"`
Workspace string `json:"workspace,omitempty"`
Schedule string `json:"schedule,omitempty"`
Params map[string]interface{} `json:"params,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
}
UpdateScheduleRequest represents a schedule update request
Source Files
¶
- agent_chat.go
- artifacts.go
- asset_diff.go
- assets.go
- auth.go
- common.go
- config_provider.go
- database.go
- distributed.go
- event_receiver.go
- eventlogs.go
- functions.go
- health.go
- install.go
- jobs.go
- llm.go
- runs.go
- schedules.go
- settings.go
- snapshot.go
- stats.go
- steps.go
- uploads.go
- vulnerabilities.go
- webhook_runs.go
- workflows.go
- workspaces.go