Documentation
¶
Overview ¶
Code generated by scripts/generate-public-api.py; DO NOT EDIT.
Index ¶
- func CanonicalPaths(next http.Handler) http.Handler
- func NewHandler(deps Dependencies) (http.Handler, func(context.Context) (*int64, int64, error), error)
- func ValidateCredentialSeparation(ctx context.Context, admin *DeploymentAuthenticator, keys projectKeyDigests) error
- type Admin
- type AdminAudit
- type AdminRuntimeObservation
- type AdminRuntimeObservationDetail
- type AdminRuntimeObservationList
- type AdminSessionArchiveRequest
- type AdminSessionCounts
- type AdminSummaryResponse
- type AdminSummaryRow
- type AdminUsageCoverage
- type Agents
- type AgentsReader
- type Artifacts
- type ArtifactsReader
- type Automations
- type ConfigurationDiscovery
- type CoreAPIError
- type CoreErrorDetail
- type CoreErrorDetails
- type CoreErrorResponse
- type CoreHarness
- type CoreHarnessList
- type Dependencies
- type Deployment
- type DeploymentAuthenticator
- type DeploymentChanges
- type DeploymentReset
- type DiagnosticFailure
- type DiagnosticSource
- type EnvironmentExecutorCredentialRequest
- type EnvironmentTemplates
- type EnvironmentTemplatesReader
- type EnvironmentWorkspaces
- type Environments
- type EnvironmentsReader
- type Execution
- type ExecutorConnection
- type ExecutorConnectionStatus
- type ExecutorConnections
- type ExecutorCredentialList
- type Files
- type FilesReader
- type Handler
- type HarnessModelConfiguration
- type InitializationStepTiming
- type InputAdmission
- type Installation
- type InstallationBindings
- type InstallationConfiguration
- type InstallationService
- type InstallationSetting
- type ItemDiagnosticTiming
- type Items
- type Metrics
- type ModelProviders
- type ModelProvidersReader
- type NativeInstaller
- type NodeAllocations
- type ProjectAPIKeyRequest
- type ProjectRequest
- type Projects
- type ProjectsReader
- type RequestLogEntry
- type RequestLogList
- type ResourceOwnerList
- type RuntimeDiskObservation
- type RuntimeHistory
- type RuntimeObservations
- type SandboxAllocationList
- type SandboxDeploymentChangeInput
- type SandboxDeploymentInput
- type SandboxEnrollmentToken
- type SandboxEnrollmentTokenRequest
- type SandboxIdlePolicyInput
- type SandboxMutationResponse
- type SandboxNodeList
- type Sandboxes
- type SessionAdmin
- type SessionAdmission
- type SessionArchive
- type SessionCreation
- type SessionDiagnosticFailure
- type SessionDiagnostics
- type SessionEvents
- type Sessions
- type SessionsReader
- type Skills
- type SkillsReader
- type Subagents
- type TurnDiagnostics
- type Turns
- type Vaults
- type VaultsReader
- type WorkspaceStorage
- type WorkspaceStorageInput
- type WriteAudit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalPaths ¶
CanonicalPaths serves each request on its canonical path, as the official service does (HP-17/HP-18), instead of the ServeMux redirect, which made clients resend a POST as a GET. It must wrap the complete server handler so that every routing, authentication and middleware decision sees only the rewritten path. The canonical path is built from the raw request path: bytes that are not valid in an escaped path are percent-encoded, percent-encoded unreserved characters (RFC 3986 section 2.3) are decoded, so an encoded dot segment resolves like a literal one, and empty and dot segments are resolved with ServeMux cleanPath semantics, keeping a trailing slash. Other escapes, such as %2F and %5C, stay encoded and never become separators. Path and RawPath are then set consistently, so chi (which prefers RawPath), the ServeMux (which uses EscapedPath) and every middleware see the same path, and every spelling reaches exactly the route and authentication of its canonical form written literally. It is idempotent.
func NewHandler ¶
func NewHandler(deps Dependencies) (http.Handler, func(context.Context) (*int64, int64, error), error)
NewHandler builds the HTTP handler and the pass that records due Automation occurrences and delivers queued invocations through the handler's Session create and input paths.
func ValidateCredentialSeparation ¶
func ValidateCredentialSeparation(ctx context.Context, admin *DeploymentAuthenticator, keys projectKeyDigests) error
ValidateCredentialSeparation rejects Core key collisions with persisted API keys.
Types ¶
type Admin ¶
type Admin interface {
ReadAdminSummary(context.Context, string, sessions.AdminSummaryFilter, func(sessions.Session, *string) error) (sessions.AdminAssetCounts, error)
ListAdminRuntimeTargets(context.Context, []string, string, int, bool) (sessions.AdminRuntimeTargetPage, error)
}
Admin reads the administrator's cross-Project Session views.
type AdminAudit ¶
type AdminAudit interface {
ListAdminAudit(context.Context, adminaudit.Filter) (adminaudit.Page, error)
}
AdminAudit reads the administrator audit log.
type AdminRuntimeObservation ¶
type AdminRuntimeObservation struct {
ProjectID string `json:"project_id" binding:"required"`
Observation AdminRuntimeObservationDetail `json:"observation" binding:"required"`
}
type AdminRuntimeObservationDetail ¶
type AdminRuntimeObservationDetail struct {
v1.RuntimeObservation
// Current Runtime disk usage and capacity. Providers that cannot report
// them return null.
Disk *RuntimeDiskObservation `json:"disk" extensions:"x-nullable" binding:"required"`
}
AdminRuntimeObservationDetail adds administrator-only measurements to the project observation shape, which stays unchanged.
type AdminRuntimeObservationList ¶
type AdminRuntimeObservationList struct {
Object string `json:"object" enums:"list" binding:"required"`
Data []AdminRuntimeObservation `json:"data" binding:"required"`
HasMore bool `json:"has_more" binding:"required"`
FirstID *string `json:"first_id" extensions:"x-nullable" binding:"required"`
LastID *string `json:"last_id" extensions:"x-nullable" binding:"required"`
}
type AdminSessionArchiveRequest ¶
type AdminSessionArchiveRequest struct {
ExpectedGeneration uint64 `json:"expected_generation" binding:"required"`
}
type AdminSessionCounts ¶
type AdminSummaryResponse ¶
type AdminSummaryResponse struct {
Data []AdminSummaryRow `json:"data" binding:"required"`
HasMore bool `json:"has_more" binding:"required"`
NextCursor string `json:"next_cursor" binding:"required"`
}
type AdminSummaryRow ¶
type AdminSummaryRow struct {
ProjectID string `json:"project_id" binding:"required"`
KeyID *string `json:"key_id" extensions:"x-nullable" binding:"required"`
AgentID *string `json:"agent_id" extensions:"x-nullable" binding:"required"`
Assets *sessions.AdminAssetCounts `json:"assets" extensions:"x-nullable" binding:"required"`
Sessions AdminSessionCounts `json:"sessions" binding:"required"`
Usage v1.TokenUsage `json:"usage" binding:"required"`
Coverage AdminUsageCoverage `json:"coverage" binding:"required"`
LastActiveAt *int64 `json:"last_active_at" extensions:"x-nullable" binding:"required"`
}
type AdminUsageCoverage ¶
type Agents ¶
type Agents interface {
Create(context.Context, agents.CreateCommand) (agents.Agent, error)
Update(context.Context, agents.UpdateCommand) (agents.Agent, error)
Delete(context.Context, agents.DeleteCommand) (string, error)
}
Agents runs the saved Agent writes.
type AgentsReader ¶
type AgentsReader interface {
GetAgent(ctx context.Context, tenantID, agentID string) (agents.Agent, error)
ListAgents(context.Context, agents.ListQuery) (agents.Page, error)
GetAgentWithModelProvider(ctx context.Context, tenantID, agentID string) (agents.Agent, *v1.ModelProviderInput, error)
}
AgentsReader reads saved Agents. Session creation reads an Agent with GetAgentWithModelProvider when the Session inherits its model provider.
type Artifacts ¶
type Artifacts interface {
DeleteSessionArtifact(context.Context, sessions.DeleteSessionArtifactCommand) error
}
Artifacts deletes a Session's published Artifacts.
type ArtifactsReader ¶
type ArtifactsReader interface {
GetSessionArtifact(context.Context, string, string, string) (sessions.Artifact, error)
ListSessionArtifacts(context.Context, string, string, string, string, int, bool) (sessions.ArtifactPage, error)
ReadSessionArtifact(context.Context, string, string, string, func(sessions.Artifact, io.Reader) error) error
}
ArtifactsReader reads and streams a Session's published Artifacts.
type Automations ¶ added in v0.0.14
type Automations interface {
Create(context.Context, automations.Automation) (automations.Automation, error)
Update(ctx context.Context, tenantID, id string, patch automations.Patch) (automations.Automation, error)
Pause(ctx context.Context, tenantID, id string) (automations.Automation, error)
Resume(ctx context.Context, tenantID, id string) (automations.Automation, error)
Delete(ctx context.Context, tenantID, id string) (string, error)
Invoke(ctx context.Context, tenantID, id string) (automations.Invocation, error)
Record(context.Context, time.Time) (int, error)
Deliverable(ctx context.Context, limit int) ([]automations.Delivery, error)
Settle(context.Context, automations.Outcome) error
}
Automations runs the Automation use cases and the delivery pass.
type ConfigurationDiscovery ¶
type ConfigurationDiscovery interface {
DiscoverConfiguration(ctx context.Context, provider string, input sandbox.ConfigurationDiscoveryInput) (sandbox.ConfigurationOptions, error)
}
ConfigurationDiscovery asks a Sandbox Provider which configuration values its credential can use.
type CoreAPIError ¶
type CoreAPIError struct {
Message string `json:"message" binding:"required"`
Type string `json:"type" binding:"required"`
Code *string `json:"code" binding:"required" extensions:"x-nullable"`
Param *string `json:"param" binding:"required" extensions:"x-nullable"`
// Details contains only documented, Core-owned facts: string, finite number,
// boolean, null or string array values. Never include request echoes, secrets
// or native/provider error text. Empty or invalid details are omitted.
Details CoreErrorDetails `json:"details,omitempty" swaggertype:"object"`
}
type CoreErrorDetail ¶
type CoreErrorDetail struct {
// contains filtered or unexported fields
}
CoreErrorDetail has a closed set of constructors so nested objects, arbitrary errors and provider responses cannot be passed as detail values. The zero value represents JSON null. Callers must choose documented fixed keys and safe facts; a string constructor is not a redaction mechanism.
func CoreErrorNull ¶
func CoreErrorNull() CoreErrorDetail
func CoreErrorNumber ¶
func CoreErrorNumber(value float64) CoreErrorDetail
func CoreErrorString ¶
func CoreErrorString(value string) CoreErrorDetail
func CoreErrorStrings ¶
func CoreErrorStrings(values ...string) CoreErrorDetail
func (CoreErrorDetail) MarshalJSON ¶
func (value CoreErrorDetail) MarshalJSON() ([]byte, error)
type CoreErrorDetails ¶
type CoreErrorDetails map[string]CoreErrorDetail
type CoreErrorResponse ¶
type CoreErrorResponse struct {
Error CoreAPIError `json:"error" binding:"required"`
}
CoreErrorResponse is the administration error envelope. Public and machine routes retain v1.ErrorResponse and never emit Details.
type CoreHarness ¶
type CoreHarness struct {
ModelConfigurationSupport v1.ModelConfigurationSupport `json:"model_configuration_support" binding:"required"`
Object string `json:"object" enums:"core.harness" binding:"required"`
ID string `json:"id" binding:"required"`
Enabled bool `json:"enabled" binding:"required"`
Default bool `json:"default" binding:"required"`
ModelConfiguration *HarnessModelConfiguration `json:"model_configuration" extensions:"x-nullable" binding:"required"`
}
CoreHarness describes one harness this build supports. Enabled and default come from the process configuration; the model provider is the deployment default stored in Core, or null.
type CoreHarnessList ¶
type CoreHarnessList struct {
Object string `json:"object" enums:"list" binding:"required"`
Data []CoreHarness `json:"data" binding:"required"`
}
type Dependencies ¶
type Dependencies struct {
// Engine is the default Harness. Harnesses lists the other Harnesses this
// deployment enables for explicit selection.
Engine string
Harnesses []string
// Policy is the immutable qualification shared with the execution
// Dispatcher. The zero value uses the built-in engine registrations.
Policy execution.Policy
// CoreKeys authenticates /core/v1 and keeps Core keys out of Project key
// authentication.
CoreKeys *DeploymentAuthenticator
// Installation holds the facts GET /core/v1/installation reports;
// InstallationBindings counts what is bound to the current public URL.
Installation Installation
InstallationBindings InstallationBindings
WorkspaceStorage WorkspaceStorage
Projects Projects
ProjectsReader ProjectsReader
Vaults Vaults
VaultsReader VaultsReader
ModelProviders ModelProviders
ModelProvidersReader ModelProvidersReader
Files Files
FilesReader FilesReader
Skills Skills
SkillsReader SkillsReader
EnvironmentTemplates EnvironmentTemplates
Agents Agents
AgentsReader AgentsReader
Automations Automations
AutomationsReader automations.Reader
Sessions Sessions
SessionsReader SessionsReader
SessionCreation SessionCreation
SessionEvents SessionEvents
Turns Turns
Items Items
Subagents Subagents
Artifacts Artifacts
ArtifactsReader ArtifactsReader
SessionAdmin SessionAdmin
Environments Environments
EnvironmentsReader EnvironmentsReader
ExecutorConnections ExecutorConnections
Admin Admin
AdminAudit AdminAudit
WriteAudit WriteAudit
Metrics Metrics
RuntimeObservations RuntimeObservations
RuntimeHistory RuntimeHistory
EnvironmentTemplatesReader EnvironmentTemplatesReader
Execution Execution
Sandboxes Sandboxes
}
Dependencies is everything the handler uses. Each application area is one field typed as an interface declared next to the area's handlers, listing exactly the methods they call. Every field is required unless its comment says what nil means; NewHandler rejects a missing one.
type Deployment ¶
type Deployment interface {
View(ctx context.Context) (deployment.View, error)
UpdateIdleSeconds(context.Context, int64) (deployment.View, error)
ListNodes(ctx context.Context) ([]deployment.Node, error)
NodeDetail(ctx context.Context, id, window string) (deployment.NodeDetail, error)
UpdateNode(ctx context.Context, id string, update deployment.NodeUpdate) error
RemoveNode(ctx context.Context, id string) error
CreateEnrollment(ctx context.Context, limits deployment.EnrollmentLimits) (deployment.EnrollmentToken, error)
Enroll(ctx context.Context, token string, input machineapi.NodeEnrollment) (deployment.NodeIdentity, error)
NodeConfiguration(ctx context.Context, nodeID, token string, generation uint64) (deployment.NodeConfiguration, error)
NodeStatus(ctx context.Context, nodeID, credential string) (machineapi.NodeStatus, error)
// DecodeConfiguration decodes a submitted provider configuration and
// credential with the provider's declared codec.
DecodeConfiguration(provider string, public, credential json.RawMessage) (sandbox.Configuration, error)
}
Deployment reads the sandbox deployment and manages its nodes: enrollment, identity, generation configuration, capacity and removal.
type DeploymentAuthenticator ¶
type DeploymentAuthenticator struct {
// contains filtered or unexported fields
}
DeploymentAuthenticator checks the Core key. It is deliberately separate from project API principals.
func NewDeploymentAuthenticator ¶
func NewDeploymentAuthenticator(digests []string) (*DeploymentAuthenticator, error)
type DeploymentChanges ¶
type DeploymentChanges interface {
InitializeSandboxDeployment(ctx context.Context, input sandbox.Selection) (deployment.View, error)
UpdateSandboxDeployment(ctx context.Context, input sandbox.Selection) (deployment.View, error)
}
DeploymentChanges sets up and updates the sandbox deployment through the execution owner.
type DeploymentReset ¶
type DeploymentReset interface {
StartSandboxReset(ctx context.Context, input deployment.ResetRequest) (deployment.View, error)
CancelSandboxReset(ctx context.Context, generation uint64) (deployment.View, error)
}
DeploymentReset starts and cancels a sandbox deployment reset through the execution owner.
type DiagnosticFailure ¶
type DiagnosticFailure struct {
Code string `` /* 547-byte string literal not displayed */
Params CoreErrorDetails `json:"params" swaggertype:"object" binding:"required"`
FailedAt *time.Time `json:"failed_at" extensions:"x-nullable" binding:"required"`
}
type DiagnosticSource ¶ added in v0.0.10
type DiagnosticSource string
const ( DiagnosticTurn DiagnosticSource = "turn" DiagnosticEnvironment DiagnosticSource = "environment" DiagnosticEnvironmentInput DiagnosticSource = "environment_input" )
type EnvironmentTemplates ¶
type EnvironmentTemplates interface {
Create(context.Context, environmenttemplates.CreateCommand) (environmenttemplates.Template, error)
Update(context.Context, environmenttemplates.UpdateCommand) (environmenttemplates.Template, error)
Delete(context.Context, environmenttemplates.DeleteCommand) (string, error)
}
EnvironmentTemplates runs the Environment Template write use cases.
type EnvironmentTemplatesReader ¶
type EnvironmentTemplatesReader interface {
Get(ctx context.Context, tenantID, templateID string) (environmenttemplates.Template, error)
List(ctx context.Context, tenantID string, query environmenttemplates.ListQuery) (environmenttemplates.Page, error)
Resolve(ctx context.Context, tenantID, templateID string) (environmenttemplates.Resolved, error)
}
EnvironmentTemplatesReader reads Environment Templates. Resolve also returns the decrypted configuration that Session creation composes.
type EnvironmentWorkspaces ¶
type EnvironmentWorkspaces interface {
ReadEnvironmentDirectory(context.Context, sessions.Environment, string) (proto.WorkspaceDirectoryResult, error)
WriteEnvironmentFile(context.Context, sessions.Environment, string, []byte) (int64, error)
}
EnvironmentWorkspaces reads and writes a connected Environment's live workspace through its Runtime.
type Environments ¶
type Environments interface {
AuthorizeEnvironmentInstallation(context.Context, identity.Principal, string, string) (string, int64, error)
ValidateEnvironmentInstallation(context.Context, string, string) (sessions.InstallationAuthorization, error)
ClaimEnvironmentInstallation(context.Context, string, string, string) error
IssueProjectExecutorCredential(context.Context, identity.Principal, string, string, bool) (sessions.IssuedExecutorCredential, error)
RevokeProjectExecutorCredential(context.Context, identity.Principal, string, string) error
}
Environments grants and claims native installations, and manages the executor credentials of a Project's self_hosted Environments. The Project's principal is an executor credential's execution principal; the Core key that authorizes the request is not.
type EnvironmentsReader ¶
type EnvironmentsReader interface {
GetEnvironment(context.Context, string, string) (sessions.Environment, error)
ListEnvironments(ctx context.Context, tenant string, creator identity.Subject, after string, limit int, ascending bool) ([]sessions.Environment, bool, error)
ProjectExecutorCredentialState(context.Context, identity.Principal, string) (sessions.ExecutorCredentialState, error)
}
EnvironmentsReader reads Environments and the executor credentials of a Project's self_hosted Environments.
type Execution ¶
type Execution struct {
// ExecutorURL is the validated daemon WebSocket URL that self-hosted
// Sessions report and executors connect to.
ExecutorURL string
SessionAdmission SessionAdmission
InputAdmission InputAdmission
SessionArchive SessionArchive
Workspaces EnvironmentWorkspaces
// NativeInstaller is nil for a build without a source revision: the native
// installation routes are then absent and Sessions carry no installation.
NativeInstaller *NativeInstaller
}
Execution is the execution Worker's surface. Every field is required unless its comment says what nil means.
type ExecutorConnection ¶
type ExecutorConnection struct {
Status ExecutorConnectionStatus `json:"status" binding:"required"`
BoundKeyID *string `json:"bound_key_id" binding:"required" extensions:"x-nullable" format:"uuid"`
EnrolledAt *time.Time `json:"enrolled_at" binding:"required" format:"date-time" extensions:"x-nullable"`
LastSeenAt *time.Time `json:"last_seen_at" binding:"required" format:"date-time" extensions:"x-nullable"`
}
ExecutorConnection reports binding history and current Core-observed connectivity. Heartbeat times are observations, not execution or native readiness.
type ExecutorConnectionStatus ¶ added in v0.0.10
type ExecutorConnectionStatus string
const ( ExecutorNeverEnrolled ExecutorConnectionStatus = "never_enrolled" ExecutorConnected ExecutorConnectionStatus = "connected" ExecutorDisconnected ExecutorConnectionStatus = "disconnected" )
type ExecutorConnections ¶
type ExecutorConnections interface {
ExecutorConnected(ctx context.Context, environmentID, credentialDigest string) (bool, error)
}
ExecutorConnections observes current executor authority and its actual gateway peer. The observer runs after the Environments snapshot closes and must recheck authority after inspecting the peer. Without a gateway peer, no binding is connected.
type ExecutorCredentialList ¶
type ExecutorCredentialList struct {
Data []sessions.ExecutorCredential `json:"data" binding:"required"`
Connection ExecutorConnection `json:"connection" binding:"required"`
}
ExecutorCredentialList holds credential metadata only, never a secret.
type Files ¶
type Files interface {
Create(context.Context, files.CreateCommand) (files.File, error)
Delete(context.Context, files.DeleteCommand) error
}
Files creates and deletes project-owned source Files.
type FilesReader ¶
type FilesReader interface {
Get(ctx context.Context, tenantID, fileID string) (files.File, error)
List(ctx context.Context, tenantID string, query files.ListQuery) (files.Page, error)
Read(ctx context.Context, tenantID, fileID string, consume func(files.File, io.Reader) error) error
}
FilesReader reads source File metadata and streams their bytes.
type Handler ¶
type Handler struct {
Dependencies
// contains filtered or unexported fields
}
type HarnessModelConfiguration ¶
type HarnessModelConfiguration struct {
Object string `json:"object" enums:"core.model_configuration" binding:"required"`
Harness string `json:"harness" binding:"required"`
v1.ModelConfigurationView
LastUsedAt *time.Time `json:"last_used_at" format:"date-time" extensions:"x-nullable" binding:"required"`
LastErrorCode *modelconfiguration.ProviderErrorCode `json:"last_error_code" extensions:"x-nullable" binding:"required"`
LastErrorAt *time.Time `json:"last_error_at" format:"date-time" extensions:"x-nullable" binding:"required"`
UpdatedAt time.Time `json:"updated_at" binding:"required"`
}
HarnessModelConfiguration is a harness's deployment default model provider. It never contains the API key, only whether one is configured.
type InitializationStepTiming ¶ added in v0.0.13
type InitializationStepTiming struct {
Step string `json:"step" enums:"file,skill,plugin,configure,npm,python,setup,finalize" binding:"required"`
Index *int `json:"index" extensions:"x-nullable" binding:"required"`
DurationMS int64 `json:"duration_ms" binding:"required"`
}
InitializationStepTiming is the Runtime-measured duration of one Environment initialization operation that ran.
type InputAdmission ¶
type InputAdmission interface {
SubmitInputs(context.Context, string, string, string, []sessions.Input) ([]sessions.InputReceipt, error)
}
InputAdmission submits Session input through the execution Worker, which validates execution support first.
type Installation ¶
type Installation struct {
Object string `json:"object" enums:"core.installation" binding:"required"`
// The ID in OAC_INSTALLATION_ID_FILE.
InstallationID string `json:"installation_id" binding:"required"`
// OAC_PUBLIC_URL: the origin applications, nodes, sandboxes and self-hosted executors use.
PublicURL string `json:"public_url" binding:"required"`
// public_url followed by /v1.
APIBaseURL string `json:"api_base_url" binding:"required"`
// True when public_url names a loopback host, reachable only from the Core host.
LocalOnly bool `json:"local_only" binding:"required"`
// Full source commit Core was built from; null for development builds.
SourceCommit *string `json:"source_commit" extensions:"x-nullable" binding:"required"`
// The process settings Core loaded.
Configuration InstallationConfiguration `json:"configuration" binding:"required"`
AddressBindings deployment.AddressBindings `json:"address_bindings" binding:"required"`
}
Installation reports Core's installation facts. Core reads them from its environment and build; configuration is the process settings it loaded.
type InstallationBindings ¶
type InstallationBindings interface {
AddressBindings(context.Context) (deployment.AddressBindings, error)
}
InstallationBindings counts what is bound to the current public URL.
type InstallationConfiguration ¶
type InstallationConfiguration struct {
Settings []InstallationSetting `json:"settings" binding:"required"`
}
InstallationConfiguration is the process settings Core loaded.
type InstallationService ¶ added in v0.0.10
type InstallationService string
const ( InstallationCore InstallationService = "core" InstallationWeb InstallationService = "web" )
type InstallationSetting ¶
type InstallationSetting struct {
// The environment variable that sets it, such as OAC_LOG_LEVEL.
Key string `json:"key" binding:"required"`
// Applied value; always null for a sensitive setting.
Value any `json:"value" extensions:"x-nullable" binding:"required"`
Default any `json:"default" extensions:"x-nullable" binding:"required"`
// Present only for a sensitive setting: whether it has a value.
Configured *bool `json:"configured,omitempty"`
Sensitive bool `json:"sensitive" binding:"required"`
// Services that restart when the setting changes.
Restarts []InstallationService `json:"restarts" binding:"required"`
}
type ItemDiagnosticTiming ¶
type ItemDiagnosticTiming struct {
ItemID string `json:"item_id" binding:"required"`
StartedAt time.Time `json:"started_at" binding:"required"`
CompletedAt *time.Time `json:"completed_at" extensions:"x-nullable" binding:"required"`
ObservedDurationMS *int64 `json:"observed_duration_ms" extensions:"x-nullable" binding:"required"`
}
type Items ¶
type Items interface {
ListItems(context.Context, string, string, string, int, bool) (sessions.ItemPage, error)
ListTurnItems(context.Context, string, string, string, string, int, bool) (sessions.ItemPage, error)
}
Items reads a Session's root Items, or those of one root Turn.
type ModelProviders ¶
type ModelProviders interface {
Replace(context.Context, modelconfiguration.Replacement) (modelconfiguration.Configuration, error)
Delete(context.Context, string) error
Resolve(context.Context, string) (*modelconfiguration.Snapshot, error)
}
ModelProviders replaces and removes each harness's deployment default model configuration. Resolve opens a harness's default at Session creation, before the encrypted Session snapshot is committed; it returns nil when the harness has none.
type ModelProvidersReader ¶
type ModelProvidersReader interface {
List(context.Context) ([]modelconfiguration.Configuration, error)
}
ModelProvidersReader lists the deployment defaults' safe views.
type NativeInstaller ¶
type NativeInstaller struct {
// Version is the build revision executors install and claim.
Version string
// Base is the public URL prefix of the versioned installer downloads.
Base string
// Catalog holds the matching installation artifacts. It is nil when the
// operator installed none: installations then report unavailable and the
// grant routes answer 503 installation_unavailable.
Catalog *nativeinstaller.Catalog
}
NativeInstaller serves the self-hosted native installation of this build.
type NodeAllocations ¶
type NodeAllocations interface {
NodeAllocations(ctx context.Context, nodeID string) ([]deployment.NodeAllocation, error)
}
NodeAllocations lists the allocations a sandbox node holds.
type ProjectAPIKeyRequest ¶
type ProjectAPIKeyRequest struct {
Name string `json:"name" binding:"required"`
}
type ProjectRequest ¶
type ProjectRequest struct {
Name string `json:"name" binding:"required"`
}
type Projects ¶
type Projects interface {
CreateProject(context.Context, projects.CreateProject) (projects.Project, error)
RenameProject(context.Context, projects.RenameProject) (projects.Project, error)
ArchiveProject(context.Context, projects.ArchiveProject) (projects.Project, error)
CreateAPIKey(context.Context, projects.CreateAPIKey) (projects.IssuedAPIKey, error)
RevokeAPIKey(context.Context, projects.RevokeAPIKey) error
}
Projects runs the Project and API key administration use cases.
type ProjectsReader ¶
type ProjectsReader interface {
GetProject(context.Context, string) (projects.Binding, error)
ListProjects(context.Context, projects.ListQuery) (projects.Page, error)
ListAPIKeys(context.Context, string, projects.ListQuery) (projects.KeyPage, error)
ResolveAPIKey(context.Context, [sha256.Size]byte) (projects.KeyBinding, error)
}
ProjectsReader reads Projects and their API keys, and resolves a Project API key digest to its current binding for authentication.
type RequestLogEntry ¶ added in v0.0.12
type RequestLogEntry struct {
RequestID string `json:"request_id" binding:"required"`
TraceID string `json:"trace_id" binding:"required"`
StartedAt time.Time `json:"started_at" binding:"required"`
Method string `json:"method" binding:"required"`
Route string `json:"route" binding:"required"`
State string `json:"state" binding:"required" enums:"active,completed,aborted"`
Status *int `json:"status" binding:"required" extensions:"x-nullable"`
DurationMS float64 `json:"duration_ms" binding:"required"`
ResponseBytes int64 `json:"response_bytes" binding:"required"`
ErrorCode *string `json:"error_code" binding:"required" extensions:"x-nullable"`
}
RequestLogEntry contains HTTP transport metadata, never request content.
type RequestLogList ¶ added in v0.0.12
type RequestLogList struct {
Object string `json:"object" binding:"required"`
Surface string `json:"surface" binding:"required" enums:"public,admin"`
InstanceID string `json:"instance_id" binding:"required"`
InstanceStartedAt time.Time `json:"instance_started_at" binding:"required"`
Capacity int `json:"capacity" binding:"required"`
RetainedCount int `json:"retained_count" binding:"required"`
TotalMatching int `json:"total_matching" binding:"required"`
HasMore bool `json:"has_more" binding:"required"`
Data []RequestLogEntry `json:"data" binding:"required"`
}
type ResourceOwnerList ¶
type ResourceOwnerList struct {
Data []writeaudit.ResourceOwner `json:"data" binding:"required"`
}
type RuntimeDiskObservation ¶
type RuntimeDiskObservation struct {
UsageBytes *uint64 `json:"usage_bytes" extensions:"x-nullable" binding:"required" minimum:"0"`
LimitBytes *uint64 `json:"limit_bytes" extensions:"x-nullable" binding:"required" minimum:"1"`
}
RuntimeDiskObservation has the memory observation's shape and null rules.
type RuntimeHistory ¶
type RuntimeHistory interface {
Capabilities() runtimehistory.Capabilities
QuerySession(context.Context, string, string, runtimehistory.Range) (runtimehistory.Response, error)
}
RuntimeHistory queries the durable Runtime history Core samples periodically.
type RuntimeObservations ¶
type RuntimeObservations interface {
ObserveSession(context.Context, string, string) (runtimeobs.Observation, error)
ObserveSessions(context.Context, []runtimeobs.SessionIdentity, runtimeobs.PageOptions) ([]runtimeobs.Observation, []error)
}
RuntimeObservations samples the current Runtime of one or more Sessions.
type SandboxAllocationList ¶
type SandboxAllocationList struct {
Data []deployment.NodeAllocation `json:"data" binding:"required"`
}
type SandboxDeploymentChangeInput ¶
type SandboxDeploymentChangeInput struct {
SandboxDeploymentInput
}
type SandboxDeploymentInput ¶
type SandboxDeploymentInput struct {
ExpectedGeneration *uint64 `json:"expected_generation" binding:"required"`
// Per-sandbox limits, required for a Provider that declares default
// resources. Another Provider may omit them; Core then uses the cpus and
// memory_mib of the configuration it validated.
Resources sandbox.Resources `json:"resources"`
// The network cap. Omitted, it is the public internet only on setup and the
// current cap on a change.
Network *sandbox.Network `json:"network,omitempty"`
Provider string `json:"provider"`
Configuration json.RawMessage `json:"configuration" swaggertype:"object"`
Credential json.RawMessage `json:"credential,omitempty" swaggertype:"object"`
}
type SandboxEnrollmentToken ¶
type SandboxEnrollmentToken struct {
Token string `json:"token" binding:"required"`
ExpiresAt time.Time `json:"expires_at" binding:"required"`
// Public, non-secret handle of this command; never a credential. The node it registers reports the same value as enrollment_id.
EnrollmentID string `json:"enrollment_id" binding:"required"`
}
type SandboxEnrollmentTokenRequest ¶
type SandboxEnrollmentTokenRequest struct {
// An omitted limit is derived from the node's host when it enrolls.
MaxActive *int `json:"max_active,omitempty"`
// Providers without checkpoint support never suspend, so Core replaces this with max_active; the others use both limits.
MaxRetained *int `json:"max_retained,omitempty"`
}
type SandboxIdlePolicyInput ¶ added in v0.0.12
type SandboxIdlePolicyInput struct {
IdleSeconds *int64 `json:"idle_seconds" binding:"required" minimum:"30" maximum:"86400"`
}
SandboxIdlePolicyInput changes the deployment-wide idle timeout independently of its generation.
type SandboxMutationResponse ¶
type SandboxNodeList ¶
type SandboxNodeList struct {
Data []deployment.Node `json:"data" binding:"required"`
}
type Sandboxes ¶
type Sandboxes struct {
Deployment Deployment
NodeAllocations NodeAllocations
DeploymentChanges DeploymentChanges
DeploymentReset DeploymentReset
ConfigurationDiscovery ConfigurationDiscovery
}
Sandboxes is the managed sandbox deployment's surface. Every field is required.
type SessionAdmin ¶
type SessionAdmin interface {
GetTurnDiagnosticsSnapshot(context.Context, string, string, string) (sessions.TurnDiagnosticsSnapshot, error)
GetSessionExecutionConfiguration(context.Context, string, string) (v1.SessionExecutionConfiguration, error)
GetManagedSessionArchive(context.Context, string, string) (sessions.ManagedArchive, error)
}
SessionAdmin serves the administrator's per-Session reads: Turn diagnostics snapshots, the execution configuration and the managed archive state.
type SessionAdmission ¶
type SessionAdmission interface {
CreateSession(context.Context, string, sessions.CreateSession) (sessions.Creation, error)
CreateEnvironment(context.Context, string, sessions.CreateEnvironment) (string, error)
// ReplayEnvironment returns the Environment a retry's key already created.
ReplayEnvironment(ctx context.Context, tenant string, creator identity.Subject, key string, request json.RawMessage) (string, bool, error)
}
SessionAdmission creates Sessions that admit work, and standalone Environments, through the execution Worker, which validates execution support first.
type SessionArchive ¶
type SessionArchive interface {
ArchiveSession(context.Context, string, string, uint64) (sessions.ManagedArchive, error)
}
SessionArchive archives a managed Session through the execution owner; SessionAdmin reads its archive state.
type SessionCreation ¶
type SessionCreation interface {
CreateSession(context.Context, string, sessions.CreateSession) (sessions.Creation, error)
FindSessionCreation(context.Context, string, string, json.RawMessage, identity.Subject) (sessions.Creation, error)
}
SessionCreation creates Sessions without execution work and finds an earlier creation by its retry identity. Creation that admits work goes through Execution.SessionAdmission.
type SessionDiagnosticFailure ¶
type SessionDiagnosticFailure struct {
DiagnosticFailure
Source DiagnosticSource `json:"source" binding:"required"`
TurnID string `json:"turn_id,omitempty"`
}
type SessionDiagnostics ¶
type SessionDiagnostics struct {
Object string `json:"object" enums:"core.session_diagnostics" binding:"required"`
SessionID string `json:"session_id" binding:"required"`
Status string `json:"status" enums:"idle,in_progress,requires_action,failed" binding:"required"`
Failure *SessionDiagnosticFailure `json:"failure" extensions:"x-nullable" binding:"required"`
// InitializationSteps lists the operations the Environment's initialization ran, in order.
InitializationSteps []InitializationStepTiming `json:"initialization_steps" binding:"required"`
}
type SessionEvents ¶
type SessionEvents interface {
SessionEventCursor(context.Context, string, string) (int64, error)
ListSessionEvents(context.Context, string, string, int64) ([]sessions.SessionChange, error)
SessionStreamSnapshot(context.Context, string, string) (sessions.Session, int64, error)
}
SessionEvents reads a Session's committed event journal, and the Session projection with its event cursor from one snapshot.
type Sessions ¶
type Sessions interface {
UpdateSession(context.Context, sessions.UpdateSessionCommand) (sessions.Session, error)
DeleteSession(context.Context, sessions.DeleteSessionCommand) error
AuditSessionOperation(context.Context, sessions.AuditSessionOperationCommand) error
}
Sessions updates and deletes Sessions, and records their public write audit.
type SessionsReader ¶ added in v0.0.10
type SessionsReader interface {
GetSession(context.Context, string, string) (sessions.Session, error)
ListSessions(context.Context, string, string, int, bool, *string, map[string]string) (sessions.Page, error)
}
SessionsReader reads Sessions.
type Skills ¶
type Skills interface {
CreateSkill(context.Context, skills.CreateSkill) (skills.Skill, error)
CreateVersion(context.Context, skills.CreateVersion) (skills.Version, error)
SetDefaultVersion(context.Context, skills.SetDefaultVersion) (skills.Skill, error)
DeleteSkill(context.Context, skills.DeleteSkill) error
DeleteVersion(context.Context, skills.DeleteVersion) (skills.Version, error)
ListSkills(context.Context, skills.ListSkills) (skills.Page, error)
ListVersions(context.Context, skills.ListVersions) (skills.VersionPage, error)
ReadVersion(context.Context, skills.ReadVersion) (skills.Content, error)
ReadDefaultVersion(context.Context, skills.ReadDefaultVersion) (skills.Content, error)
}
Skills runs the Skill use cases: uploads, the default pointer, deletion, lists and content reads.
type SkillsReader ¶
type SkillsReader interface {
Skill(ctx context.Context, tenantID string, id uuid.UUID) (skills.Skill, error)
Version(ctx context.Context, tenantID string, skillID uuid.UUID, version int64) (skills.Version, error)
}
SkillsReader reads Skill and version metadata.
type Subagents ¶
type Subagents interface {
GetSubagent(context.Context, string, string, string) (v1.Subagent, error)
ListSubagents(context.Context, string, string, string, int, bool) (v1.SubagentList, error)
ListSubagentItems(context.Context, string, string, string, string, int, bool) (v1.ItemList, error)
GetSubagentTurn(context.Context, string, string, string, string) (v1.Turn, error)
ListSubagentTurns(context.Context, string, string, string, string, int, bool) (v1.TurnList, error)
ListSubagentTurnItems(context.Context, string, string, string, string, string, int, bool) (v1.ItemList, error)
}
Subagents reads tenant-authorized, persisted public resources. Implementations must enforce every supplied parent scope, including the pagination cursor.
type TurnDiagnostics ¶
type TurnDiagnostics struct {
Object string `json:"object" enums:"core.turn_diagnostics" binding:"required"`
SessionID string `json:"session_id" binding:"required"`
TurnID string `json:"turn_id" binding:"required"`
Status string `json:"status" binding:"required"`
Failure *DiagnosticFailure `json:"failure" extensions:"x-nullable" binding:"required"`
Items []ItemDiagnosticTiming `json:"items" binding:"required"`
ItemsTruncated bool `json:"items_truncated" binding:"required"`
}
type Turns ¶
type Turns interface {
GetTurn(context.Context, string, string, string) (sessions.Turn, error)
ListTurns(context.Context, string, string, string, int, bool) (sessions.TurnPage, error)
}
Turns reads a Session's root Turns.
type Vaults ¶
type Vaults interface {
CreateVault(context.Context, vaults.CreateVault) (vaults.Vault, error)
UpdateVault(context.Context, vaults.UpdateVault) (vaults.Vault, error)
DeleteVault(context.Context, vaults.DeleteVault) (string, error)
CreateStaticCredential(context.Context, vaults.CreateStaticCredential) (vaults.Credential, error)
UpdateStaticCredential(context.Context, vaults.UpdateStaticCredential) (vaults.Credential, error)
UpdateCredentialMetadata(context.Context, vaults.UpdateCredentialMetadata) (vaults.Credential, error)
CreateOAuthCredential(context.Context, vaults.CreateOAuthCredential) (vaults.Credential, error)
UpdateOAuthCredential(context.Context, vaults.UpdateOAuthCredential) (vaults.Credential, error)
DeleteCredential(context.Context, vaults.DeleteCredential) (string, error)
ResolveMCPCredentials(context.Context, vaults.ResolveMCPCredentials) ([]vaults.MCPCredentialBinding, error)
}
Vaults runs the Vault and Credential use cases, and selects the Credentials a Session's MCP servers use at creation.
type VaultsReader ¶
type VaultsReader interface {
GetVault(ctx context.Context, tenantID, vaultID string) (vaults.Vault, error)
ListVaults(ctx context.Context, tenantID string, query vaults.PageQuery) (vaults.VaultPage, error)
GetCredential(ctx context.Context, tenantID, vaultID, credentialID string) (vaults.Credential, error)
ListCredentials(ctx context.Context, tenantID, vaultID string, query vaults.PageQuery) (vaults.CredentialPage, error)
}
VaultsReader reads Vaults and the public metadata of their Credentials.
type WorkspaceStorage ¶ added in v0.0.10
type WorkspaceStorage interface {
Selection(context.Context) (workspaces.Selection, error)
Configure(context.Context, workspaces.SelectionInput) (workspaces.Selection, error)
}
WorkspaceStorage reads and changes the independent filesystem selection and tenant capacity policy. Configure serializes selection changes and records the admin audit source.
type WorkspaceStorageInput ¶ added in v0.0.10
type WorkspaceStorageInput struct {
ID string `json:"id" format:"uuid" binding:"required"`
Adapter string `json:"adapter" binding:"required"`
Parameters json.RawMessage `json:"parameters" swaggertype:"object" binding:"required"`
Credential json.RawMessage `json:"credential,omitempty" swaggertype:"object"`
TenantCapacityMiB *uint32 `json:"tenant_capacity_mib" binding:"required"`
}
WorkspaceStorageInput selects an immutable configuration and the tenant capacity policy together. Credential is write-only and adapter-owned.
type WriteAudit ¶
type WriteAudit interface {
GetResourceOwners(context.Context, string, string, []string) ([]writeaudit.ResourceOwner, error)
ListWriteOperations(context.Context, string, writeaudit.Filter) (writeaudit.Page, error)
}
WriteAudit reads public write provenance as safe read models, never request bodies or credentials.
Source Files
¶
- admin_agents_routes.go
- admin_environment_templates_routes.go
- admin_files_routes.go
- admin_history.go
- admin_resources.go
- admin_runtime.go
- admin_session_archive.go
- admin_sessions_routes.go
- admin_skills_routes.go
- admin_summary.go
- admin_vaults_routes.go
- agents.go
- agents_delete.go
- agents_list.go
- agents_update.go
- auth.go
- automation_delivery.go
- automations.go
- capability_archive.go
- configuration.go
- configuration_validation.go
- core_errors.go
- core_metrics.go
- core_routes.go
- core_validation_errors.go
- credentials.go
- credentials_delete.go
- credentials_list.go
- credentials_oauth.go
- credentials_update.go
- dependencies.go
- environment_attach.go
- environment_create.go
- environment_executor_management.go
- environment_files.go
- environment_files_create.go
- environment_files_cursor.go
- environment_files_query.go
- environment_input.go
- environment_installation.go
- environment_plugins.go
- environment_preparation_input.go
- environment_request.go
- environment_setup.go
- environment_skills.go
- environment_templates.go
- environments.go
- errors.go
- errors_agents.go
- errors_audit.go
- errors_automations.go
- errors_deployment.go
- errors_environmenttemplates.go
- errors_files.go
- errors_modelconfiguration.go
- errors_projects.go
- errors_sessions.go
- errors_skills.go
- errors_vaults.go
- function_configuration.go
- function_inputs.go
- handler.go
- harness.go
- harness_model_providers.go
- history_pages.go
- hosted_environment.go
- initial_files.go
- inputs.go
- installation.go
- items.go
- json_members.go
- json_request.go
- list_query_errors.go
- mcp_configuration.go
- official_shapes.gen.go
- openapi_docs.go
- pagination.go
- project_api_key_configuration.go
- project_api_keys.go
- request_logs.go
- routing.go
- runtime_history.go
- runtime_observations.go
- sandbox_configuration_discovery.go
- sandbox_deployment_setup.go
- sandbox_manager.go
- sandbox_manager_auth.go
- sandbox_node_configuration.go
- sandbox_node_detail.go
- saved_configuration.go
- saved_core_input.go
- saved_tools.go
- session_agent.go
- session_artifacts.go
- session_creation_identity.go
- session_creation_stream.go
- session_credentials.go
- session_deletion.go
- session_diagnostics.go
- session_execution_configuration.go
- session_initial_input.go
- session_metadata.go
- session_model_configuration.go
- session_model_defaults.go
- session_plan.go
- session_request.go
- session_response.go
- session_template.go
- session_tools.go
- session_write_audit.go
- skills.go
- skills_list.go
- skills_transfer.go
- skills_upload.go
- source_files.go
- source_files_content.go
- source_files_list.go
- source_files_upload.go
- stream.go
- subagent_turns.go
- subagents.go
- tool_controls.go
- turn_diagnostic_failure.go
- turns.go
- usage.go
- vault_pagination.go
- vaults.go
- vaults_delete.go
- vaults_list.go
- workspace_storage.go
- write_audit.go