Documentation
¶
Overview ¶
Package runtimeapi defines the wire contract of the platform runtime API (design §13.2). Three callers use separate authentication paths:
- Seats (seat-runner, steadmesh-tools, harnesses) call /v1/* with a projected ServiceAccount token whose only audience is steadmesh-gateway. The platform resolves the token to a seat with a TokenReview; clients cannot select a different principal. Mutating calls carry HeaderGeneration and are fenced.
- The controller calls /internal/v1/* with its own ServiceAccount token.
- Operators use orgctl, which reads Kubernetes status and calls /internal/v1 through the controller's verify flow.
Index ¶
- Constants
- type AccessResponse
- type Bootstrap
- type CheckResult
- type Checkpoint
- type ConnectionInfo
- type ConsoleActivity
- type ConsoleActivityItem
- type ConsoleArtifact
- type ConsoleArtifactList
- type ConsoleCapability
- type ConsoleChannelBinding
- type ConsoleCheck
- type ConsoleConnection
- type ConsoleConversation
- type ConsoleConversationDetail
- type ConsoleConversationList
- type ConsoleDelivery
- type ConsoleEvent
- type ConsoleExecution
- type ConsoleExecutionDetail
- type ConsoleExecutionList
- type ConsoleMemoryStore
- type ConsoleMessage
- type ConsoleOperation
- type ConsoleOperationList
- type ConsoleOrganization
- type ConsoleSeatConfig
- type ConsoleSeatDetail
- type ConsoleSeatList
- type ConsoleSeatStatus
- type ConsoleWorkItem
- type ConsoleWorkList
- type ConsoleWorkPublication
- type ConsoleWorkStep
- type CredentialResponse
- type CredentialStatus
- type Envelope
- type Error
- type ExecutionEvent
- type FenceRequest
- type GitHubSandbox
- type Handoff
- type InboxAckRequest
- type InboxDelivery
- type InstructionInfo
- type LeaseAcquireRequest
- type LeaseRenewRequest
- type LeaseResponse
- type MemoryStoreInfo
- type ModelRequest
- type Operation
- type ProbeResponse
- type ProbeResult
- type RecipientInfo
- type Recovery
- type RetiringSeat
- type RuntimeResponse
- type SeatIdentity
- type SeatRuntime
- type Self
- type StateRequest
- type SyncRequest
- type SyncResponse
- type ToolCallRequest
- type ToolCallResult
- type ToolDescriptor
- type ToolList
- type VerifyResponse
- type WorkSummary
Constants ¶
const ( PathConsoleOrgs = "/console/v1/organizations" // GET list; /{id}/{seats,conversations,operations,artifacts,activity} PathConsoleSeats = "/console/v1/seats/" // {id}, {id}/executions PathConsoleExecutions = "/console/v1/executions/" // {id} PathConsoleConversations = "/console/v1/conversations/" // {id} )
const ( ActivityMessage = "message" ActivityRunStarted = "run_started" ActivityRunFinished = "run_finished" ActivityToolRequest = "tool_request" ActivityToolResult = "tool_result" ActivityError = "error" ActivityOperation = "operation" )
Activity item kinds.
const ( // HeaderGeneration carries the caller's execution lease generation. HeaderGeneration = "X-Steadmesh-Generation" // HeaderExecution carries the current execution id, for event correlation. HeaderExecution = "X-Steadmesh-Execution" // Seat-facing paths. PathLeaseAcquire = "/v1/lease/acquire" PathLeaseRenew = "/v1/lease/renew" PathLeaseRelease = "/v1/lease/release" PathState = "/v1/state" PathSelf = "/v1/self" PathBootstrap = "/v1/bootstrap" PathTools = "/v1/tools" // GET: list descriptors PathToolCall = "/v1/tools/" // POST /v1/tools/{name} PathInboxNext = "/v1/inbox/next" // GET ?wait=<seconds> PathInboxAck = "/v1/inbox/" // POST /v1/inbox/{delivery_id}/ack PathExecEvents = "/v1/executions/" // POST /v1/executions/{id}/events PathCheckpoint = "/v1/checkpoint" // PUT PathModelProxy = "/v1/model/" // /v1/model/{connection}/... (Anthropic-compatible) PathAccess = "/v1/access" // GET: the seat's current sandbox access (egress gateway, runner) PathCredentials = "/v1/credentials/" // POST /v1/credentials/{connection}: a sandbox-delivered credential PathChannels = "/v1/channels/" // /v1/channels/{organization}/{connection}/...: humans reaching a dial-in communication adapter // Controller-facing paths. PathInternalSync = "/internal/v1/organizations:sync" // POST PathInternalOrgs = "/internal/v1/organizations/" // {id}/runtime, {id}/verify, {id} DELETE PathInternalSeats = "/internal/v1/seats/" // {id}/fence, {id}/probe, {id}/probe/{probe_id} PathHealthz = "/healthz" PathReadyz = "/readyz" )
const ( // CredentialCurrent: the latest secret content is in use. CredentialCurrent = "current" // CredentialNone: the connection has no secret reference. CredentialNone = "none" // CredentialReplacementRejected: the secret changed, the new credential // failed validation, and the previous one stays in use until // PreviousUntil. CredentialReplacementRejected = "replacement_rejected" // CredentialSecretMissing: the secret was deleted; the previous // credential stays in use until PreviousUntil. CredentialSecretMissing = "secret_missing" // CredentialRefreshFailing: the secret store or the new credential's // validation is failing transiently; the current credential stays in use. CredentialRefreshFailing = "refresh_failing" CredentialUnavailable = "unavailable" )
Credential refresh states.
const ( EventEgressDenied = "egress_denied" EventEgressRevoked = "egress_revoked" EventCredentialIssued = "credential_issued" EventCredentialDenied = "credential_denied" )
Sandbox access event kinds, recorded on the seat's execution.
const EventModelRequest = "model_request"
EventModelRequest is the ExecutionEvent.Kind the platform records for each model request a seat makes through the model proxy. Data is a ModelRequest.
const EventProbeResult = "probe_result"
EventProbeResult is the ExecutionEvent.Kind the runner posts for an origin=probe delivery before acking it (outcome=completed). Data is a ProbeResult; the platform reads data.checks from any event kind.
const MaxEventDataBytes = 8 * 1024
MaxEventDataBytes is the largest ExecutionEvent.Data the platform stores. POST /v1/executions/{id}/events accepts one ExecutionEvent or a JSON array of them. The runner replaces larger payloads with {"truncated":true,"bytes":N,"preview":"..."}.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessResponse ¶ added in v0.2.0
type AccessResponse struct {
SeatID string `json:"seat_id"`
SeatKey string `json:"seat_key"`
Egress []access.EgressRule `json:"egress"`
// Browser is true while the seat may use its browser.
Browser bool `json:"browser"`
// BrowserSession is the browser_session connection to load, if any.
BrowserSession string `json:"browser_session,omitempty"`
// GitHub lists the seat's github connections with sandbox delivery.
GitHub []GitHubSandbox `json:"github,omitempty"`
}
AccessResponse is a seat's current sandbox access. The egress gateway and the seat runner poll it, so live changes apply without a restart.
type CheckResult ¶
type Checkpoint ¶
type ConnectionInfo ¶
type ConsoleActivity ¶
type ConsoleActivity struct {
Items []ConsoleActivityItem `json:"items"`
}
ConsoleActivity is a page of activity after a cursor time, oldest first. Callers poll with after set slightly before the newest At they have seen and de-duplicate by Key, so late-committing rows are not missed.
type ConsoleActivityItem ¶
type ConsoleActivityItem struct {
// Key identifies the item for de-duplication across overlapping polls.
Key string `json:"key"`
Kind string `json:"kind"`
At time.Time `json:"at"`
SeatKey string `json:"seat_key,omitempty"`
PeerSeat string `json:"peer_seat,omitempty"`
Peer string `json:"peer,omitempty"` // binding or connection for non-seat peers
ExecutionID string `json:"execution_id,omitempty"`
MessageID string `json:"message_id,omitempty"`
ConversationID string `json:"conversation_id,omitempty"`
Status string `json:"status,omitempty"`
Summary string `json:"summary"`
}
ConsoleActivityItem is one entry of the organisation's activity feed.
type ConsoleArtifact ¶
type ConsoleArtifactList ¶
type ConsoleArtifactList struct {
Artifacts []ConsoleArtifact `json:"artifacts"`
}
type ConsoleCapability ¶
type ConsoleCapability struct {
Resource string `json:"resource"`
Operations []string `json:"operations"`
Sources []string `json:"sources,omitempty"`
}
ConsoleCapability is one resolved grant of a seat.
type ConsoleChannelBinding ¶
type ConsoleCheck ¶
type ConsoleCheck struct {
OK bool `json:"ok"`
Detail string `json:"detail,omitempty"`
CheckedAt time.Time `json:"checked_at"`
// Credential is the credential refresh state at the last check.
Credential CredentialStatus `json:"credential"`
}
type ConsoleConnection ¶
type ConsoleConnection struct {
Key string `json:"key"`
Adapter string `json:"adapter"`
Required bool `json:"required"`
SecretKind string `json:"secret_kind,omitempty"`
SecretPath string `json:"secret_path,omitempty"`
Check *ConsoleCheck `json:"check,omitempty"`
}
ConsoleConnection describes a connection and its last verification. The secret reference is reported as kind (vault, k8s) and path only.
type ConsoleConversation ¶
type ConsoleConversationDetail ¶
type ConsoleConversationDetail struct {
Conversation ConsoleConversation `json:"conversation"`
Messages []ConsoleMessage `json:"messages"`
}
type ConsoleConversationList ¶
type ConsoleConversationList struct {
Conversations []ConsoleConversation `json:"conversations"`
}
type ConsoleDelivery ¶
type ConsoleEvent ¶
type ConsoleExecution ¶
type ConsoleExecution struct {
ID string `json:"id"`
SeatID string `json:"seat_id"`
SeatKey string `json:"seat_key"`
LeaseGeneration int64 `json:"lease_generation"`
ConfigRevision string `json:"config_revision"`
HarnessAdapter string `json:"harness_adapter"`
TriggerMessageID string `json:"trigger_message_id,omitempty"`
TriggerSummary string `json:"trigger_summary,omitempty"`
TriggerOrigin string `json:"trigger_origin,omitempty"`
State string `json:"state"`
Error string `json:"error,omitempty"`
StartedAt time.Time `json:"started_at"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
Events int `json:"events"`
}
ConsoleExecution is one run of a seat. A seat keeps its id across Pod replacements; each run has its own id and the lease generation it ran under.
type ConsoleExecutionDetail ¶
type ConsoleExecutionDetail struct {
Execution ConsoleExecution `json:"execution"`
Trigger *ConsoleMessage `json:"trigger,omitempty"`
Events []ConsoleEvent `json:"events"`
Operations []ConsoleOperation `json:"operations"`
Sent []ConsoleMessage `json:"sent"`
}
ConsoleExecutionDetail is a run with its trigger, events, connector operations and the messages its seat sent while it ran.
type ConsoleExecutionList ¶
type ConsoleExecutionList struct {
Executions []ConsoleExecution `json:"executions"`
}
type ConsoleMemoryStore ¶
type ConsoleMemoryStore struct {
Key string `json:"key"`
Personal bool `json:"personal"`
Records int `json:"records"`
LastUpdatedAt *time.Time `json:"last_updated_at,omitempty"`
}
ConsoleMemoryStore is memory metadata only; record bodies are not exposed.
type ConsoleMessage ¶
type ConsoleMessage struct {
ID string `json:"id"`
ConversationID string `json:"conversation_id"`
ConversationKind string `json:"conversation_kind"`
Origin string `json:"origin"`
SenderSeat string `json:"sender_seat,omitempty"`
RecipientSeat string `json:"recipient_seat,omitempty"`
RecipientBinding string `json:"recipient_binding,omitempty"`
Route string `json:"route,omitempty"`
ParentID string `json:"parent_id,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
Body string `json:"body"`
CreatedAt time.Time `json:"created_at"`
Deliveries []ConsoleDelivery `json:"deliveries,omitempty"`
// Outbox is the external delivery state of a reply to a human.
Outbox string `json:"outbox,omitempty"`
}
ConsoleMessage is a message with its delivery to each recipient seat.
type ConsoleOperation ¶
type ConsoleOperationList ¶
type ConsoleOperationList struct {
Operations []ConsoleOperation `json:"operations"`
}
type ConsoleOrganization ¶
type ConsoleOrganization struct {
ID string `json:"id"`
Key string `json:"key"`
Namespace string `json:"namespace"`
DisplayName string `json:"display_name"`
Revision string `json:"revision"`
Teams []string `json:"teams"`
Seats []ConsoleSeatConfig `json:"seats"`
Connections []ConsoleConnection `json:"connections"`
Bindings []ConsoleChannelBinding `json:"channel_bindings,omitempty"`
}
ConsoleOrganization is an organisation's committed configuration as the platform holds it.
type ConsoleSeatConfig ¶
type ConsoleSeatConfig struct {
SeatID string `json:"seat_id"`
OrganizationID string `json:"organization_id"`
Key string `json:"key"`
DisplayName string `json:"display_name"`
RoleRef string `json:"role_ref"`
Teams []string `json:"teams,omitempty"`
IsRepresentative bool `json:"is_representative"`
HarnessAdapter string `json:"harness_adapter"`
Model string `json:"model,omitempty"`
ConfigRevision string `json:"config_revision"`
PolicyRevision int64 `json:"policy_revision"`
PersistentWorkspace bool `json:"persistent_workspace"`
PersonalMemory string `json:"personal_memory,omitempty"`
SendTo []string `json:"send_to,omitempty"`
ChannelBindings []string `json:"channel_bindings,omitempty"`
Capabilities []ConsoleCapability `json:"capabilities,omitempty"`
CreatedAt time.Time `json:"created_at"`
AdoptedFrom string `json:"adopted_from,omitempty"`
// RetiredAt is set for a retired seat, whose history stays readable.
RetiredAt *time.Time `json:"retired_at,omitempty"`
}
ConsoleSeatConfig is a seat's committed configuration.
type ConsoleSeatDetail ¶
type ConsoleSeatDetail struct {
Config ConsoleSeatConfig `json:"config"`
Status ConsoleSeatStatus `json:"status"`
Handoff *Handoff `json:"handoff,omitempty"`
Checkpoint *Checkpoint `json:"checkpoint,omitempty"`
Memory []ConsoleMemoryStore `json:"memory,omitempty"`
Executions []ConsoleExecution `json:"executions"`
}
ConsoleSeatDetail is everything the platform records about one seat.
type ConsoleSeatList ¶
type ConsoleSeatList struct {
Seats []ConsoleSeatStatus `json:"seats"`
}
type ConsoleSeatStatus ¶
type ConsoleSeatStatus struct {
SeatRuntime
// Current is the running execution, if any.
Current *ConsoleExecution `json:"current,omitempty"`
// LastProgressAt is the time of the seat's latest tool result or output,
// as distinct from lease liveness.
LastProgressAt *time.Time `json:"last_progress_at,omitempty"`
// Unknown counts the seat's connector operations with unknown outcome.
UnknownOperations int `json:"unknown_operations"`
}
ConsoleSeatStatus is the live state of a seat from the platform's records.
type ConsoleWorkItem ¶ added in v0.2.0
type ConsoleWorkItem struct {
RecordID string `json:"record_id"`
Store string `json:"store"`
Revision int `json:"revision"`
ID string `json:"id"`
Objective string `json:"objective"`
Creator string `json:"creator"`
Owner string `json:"owner,omitempty"`
Status string `json:"status"`
Blocker string `json:"blocker,omitempty"`
Plan []ConsoleWorkStep `json:"plan,omitempty"`
DependsOn []string `json:"depends_on,omitempty"`
Acceptance []string `json:"acceptance,omitempty"`
Evidence []string `json:"evidence,omitempty"`
Links []string `json:"links,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
Publications []ConsoleWorkPublication `json:"publications,omitempty"`
}
ConsoleWorkItem is a work item from a shared store: its schema fields and publication state, never free-form note text.
type ConsoleWorkList ¶ added in v0.2.0
type ConsoleWorkList struct {
Work []ConsoleWorkItem `json:"work"`
}
type ConsoleWorkPublication ¶ added in v0.2.0
type ConsoleWorkPublication struct {
Connection string `json:"connection"`
State string `json:"state"`
ExternalID string `json:"external_id,omitempty"`
ExternalURL string `json:"external_url,omitempty"`
PublishedRevision int `json:"published_revision"`
LastError string `json:"last_error,omitempty"`
}
ConsoleWorkPublication is a work item's state in an optional tracker.
type ConsoleWorkStep ¶ added in v0.2.0
type CredentialResponse ¶ added in v0.2.0
type CredentialResponse struct {
Connection string `json:"connection"`
// Username for git (x-access-token for GitHub).
Username string `json:"username"`
Token string `json:"token"`
// ExpiresAt is zero for credentials that do not expire (a PAT).
ExpiresAt time.Time `json:"expires_at,omitzero"`
// Revocable reports whether Steadmesh can invalidate the credential.
Revocable bool `json:"revocable"`
// Data carries non-token credentials, e.g. a browser storage state.
Data json.RawMessage `json:"data,omitempty"`
}
CredentialResponse is a credential delivered to the sandbox.
type CredentialStatus ¶ added in v0.2.0
type CredentialStatus struct {
State string `json:"state"`
// SecretVersion is the store's version of the secret in use
// (Kubernetes resourceVersion or Vault KV version).
SecretVersion string `json:"secret_version,omitempty"`
RefreshedAt *time.Time `json:"refreshed_at,omitempty"`
// Error explains a degraded or unavailable state.
Error string `json:"error,omitempty"`
// PreviousUntil is when a previous credential stops being used.
PreviousUntil *time.Time `json:"previous_until,omitempty"`
// FailingSince is when refresh started failing.
FailingSince *time.Time `json:"failing_since,omitempty"`
}
CredentialStatus is the non-secret refresh state of a connection's credential.
func (CredentialStatus) Degraded ¶ added in v0.2.0
func (s CredentialStatus) Degraded() bool
Degraded reports whether the credential works now but needs attention.
type Envelope ¶
type Envelope struct {
MessageID string `json:"message_id"`
OrganizationID string `json:"organization_id"`
ConversationID string `json:"conversation_id"`
Origin string `json:"origin"` // human, seat, system, schedule, probe
// For human origin: the binding key and verified external user.
Binding string `json:"binding,omitempty"`
ExternalUserID string `json:"external_user_id,omitempty"`
SenderSeat string `json:"sender_seat,omitempty"`
SenderSeatID string `json:"sender_seat_id,omitempty"`
RecipientSeat string `json:"recipient_seat"`
ParentID string `json:"parent_id,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
Body string `json:"body"`
CreatedAt time.Time `json:"created_at"`
// ReplyRoute describes how to reply: "binding:<key>" or "seat:<key>".
ReplyRoute string `json:"reply_route,omitempty"`
}
Envelope is the durable message envelope. Origin fields are assigned by trusted ingress; agent-authored text cannot overwrite them.
type Error ¶
type Error struct {
Code string `json:"code"` // unauthenticated, forbidden, fenced, conflict, not_found, invalid, blocked, unavailable
Message string `json:"message"`
}
Error is the JSON body of every non-2xx response.
type ExecutionEvent ¶
type FenceRequest ¶
type FenceRequest struct {
// ExpectedGeneration must match the current generation; the platform then
// increments it so the previous holder's calls are rejected.
ExpectedGeneration int64 `json:"expected_generation"`
}
type GitHubSandbox ¶ added in v0.2.0
type GitHubSandbox struct {
Connection string `json:"connection"`
// Host is the git host the credential is for.
Host string `json:"host"`
}
GitHubSandbox is a github connection whose credential the sandbox may fetch.
type Handoff ¶
type Handoff struct {
Objective string `json:"objective"`
Unresolved []string `json:"unresolved,omitempty"`
RecordIDs []string `json:"record_ids,omitempty"`
PendingMessageIDs []string `json:"pending_message_ids,omitempty"`
OperationIDs []string `json:"operation_ids,omitempty"`
Notes string `json:"notes,omitempty"`
}
type InboxAckRequest ¶
type InboxDelivery ¶
type InboxDelivery struct {
DeliveryID int64 `json:"delivery_id"`
ExecutionID string `json:"execution_id"`
Attempt int `json:"attempt"`
Message Envelope `json:"message"`
// Passive are messages sent with wake=false that were waiting for this
// seat's next turn. They are delivered with this turn and need no ack.
Passive []Envelope `json:"passive,omitempty"`
}
type InstructionInfo ¶
type LeaseAcquireRequest ¶
type LeaseAcquireRequest struct {
// Holder is informational; the platform records the Pod UID from the token.
Holder string `json:"holder,omitempty"`
}
type LeaseRenewRequest ¶
type LeaseRenewRequest struct {
Generation int64 `json:"generation"`
}
type LeaseResponse ¶
type MemoryStoreInfo ¶
type ModelRequest ¶ added in v0.2.0
type ModelRequest struct {
Connection string `json:"connection"`
API string `json:"api"`
Model string `json:"model,omitempty"`
UpstreamHost string `json:"upstream_host"`
Status int `json:"status"`
Stream bool `json:"stream,omitempty"`
DurationMS int64 `json:"duration_ms"`
// Usage is the token usage the endpoint reported, when it did.
Usage map[string]int64 `json:"usage,omitempty"`
// Rejected is why the platform refused the request before sending it.
Rejected string `json:"rejected,omitempty"`
// CredentialRefreshed is true when the request was retried after the
// connection's credential was refreshed.
CredentialRefreshed bool `json:"credential_refreshed,omitempty"`
}
ModelRequest records what a seat actually asked of which endpoint.
type Operation ¶
type Operation struct {
ID string `json:"id"`
Connection string `json:"connection"`
Operation string `json:"operation"`
Target string `json:"target,omitempty"`
IdempotencyKey string `json:"idempotency_key"`
Status string `json:"status"` // pending, succeeded, failed, unknown
ExternalReceipt string `json:"external_receipt,omitempty"`
Result json.RawMessage `json:"result,omitempty"`
Error string `json:"error,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
type ProbeResponse ¶
type ProbeResult ¶
ProbeResult is the Data of an EventProbeResult event. Checks maps a check name (tool, workspace, model) to "ok" or "fail: <reason>"; a value starting with "fail" or equal to "false" fails the probe.
type RecipientInfo ¶
type Recovery ¶
type Recovery struct {
// Session is the harness checkpoint, if any.
Session *Checkpoint `json:"session,omitempty"`
Handoff *Handoff `json:"handoff,omitempty"`
// PendingMessages is the number of undelivered inbox messages.
PendingMessages int `json:"pending_messages"`
// UnknownOperations are external operations whose outcome is unknown and
// must be reconciled by the agent before being reissued (§6.3).
UnknownOperations []Operation `json:"unknown_operations,omitempty"`
// Work lists the unfinished work items this seat owns, so it can pick
// them up again after a restart.
Work []WorkSummary `json:"work,omitempty"`
// Note explains the recovery state, e.g. "native session not convertible;
// resumed from portable handoff" (§6.4).
Note string `json:"note,omitempty"`
}
type RetiringSeat ¶ added in v0.3.0
RetiringSeat is a seat winding down before retirement.
type RuntimeResponse ¶
type RuntimeResponse struct {
Seats map[string]SeatRuntime `json:"seats"`
}
type SeatIdentity ¶
type SeatRuntime ¶
type SeatRuntime struct {
SeatID string `json:"seat_id"`
SeatKey string `json:"seat_key"`
PendingDeliveries int `json:"pending_deliveries"`
OldestPendingAge float64 `json:"oldest_pending_age_seconds"`
LeaseGeneration int64 `json:"lease_generation"`
LeaseHolder string `json:"lease_holder,omitempty"`
LeaseExpiresAt time.Time `json:"lease_expires_at"`
State string `json:"state"`
StateDetail string `json:"state_detail,omitempty"`
AdoptedRevision string `json:"adopted_revision,omitempty"`
LastActivity *time.Time `json:"last_activity,omitempty"`
LatestCheckpoint string `json:"latest_checkpoint,omitempty"`
DeadDeliveries int `json:"dead_deliveries"`
// RetireBy is set while the seat is retiring: removed from the
// declaration and winding down until then.
RetireBy *time.Time `json:"retire_by,omitempty"`
}
SeatRuntime is the platform's view of one seat, used for wake and idle decisions.
type Self ¶
type Self struct {
OrganizationID string `json:"organization_id"`
OrganizationKey string `json:"organization_key"`
OrganizationName string `json:"organization_name"`
SeatID string `json:"seat_id"`
SeatKey string `json:"seat_key"`
DisplayName string `json:"display_name"`
Teams []string `json:"teams,omitempty"`
IsRepresentative bool `json:"is_representative"`
ConfigRevision string `json:"config_revision"`
PolicyRevision int64 `json:"policy_revision"`
Instructions []InstructionInfo `json:"instructions"`
MemoryStores []MemoryStoreInfo `json:"memory_stores"`
Recipients []RecipientInfo `json:"recipients"`
Connections []ConnectionInfo `json:"connections"`
ChannelBindings []string `json:"channel_bindings,omitempty"`
// RetiringUntil is set while the seat is retiring: it was removed from
// the declaration, takes no new messages and stops at this time.
RetiringUntil *time.Time `json:"retiring_until,omitempty"`
}
type StateRequest ¶
type StateRequest struct {
Generation int64 `json:"generation"`
State string `json:"state"` // Warm, Executing, Quiescing, Stopped
Detail string `json:"detail,omitempty"`
// AdoptedRevision is the config revision the runner is executing with.
AdoptedRevision string `json:"adopted_revision,omitempty"`
}
type SyncRequest ¶
type SyncRequest struct {
Namespace string `json:"namespace"`
Key string `json:"key"`
SourceUID string `json:"source_uid"`
// Manifest is a compile.Manifest serialised as JSON.
Manifest json.RawMessage `json:"manifest"`
}
SyncRequest establishes durable identities for an organisation's resolved manifest. It is idempotent.
type SyncResponse ¶
type SyncResponse struct {
OrganizationID string `json:"organization_id"`
Seats map[string]SeatIdentity `json:"seats"`
// Retiring lists seats removed from the declaration that are winding
// down: they take no new messages, get one retirement notice turn and
// are retired at RetireBy at the latest.
Retiring map[string]RetiringSeat `json:"retiring,omitempty"`
}
type ToolCallRequest ¶
type ToolCallRequest struct {
Arguments json.RawMessage `json:"arguments"`
}
type ToolCallResult ¶
type ToolCallResult struct {
// Content is the bounded JSON result.
Content json.RawMessage `json:"content"`
// IsError marks a tool-level failure the agent should see (denied,
// conflict, invalid). Transport errors use HTTP status codes instead.
IsError bool `json:"is_error,omitempty"`
}
type ToolDescriptor ¶
type ToolDescriptor struct {
Name string `json:"name"` // dotted, e.g. memory.search
Description string `json:"description"`
InputSchema json.RawMessage `json:"input_schema"`
}
type ToolList ¶
type ToolList struct {
Tools []ToolDescriptor `json:"tools"`
}
ToolList is the body of GET /v1/tools.
type VerifyResponse ¶
type VerifyResponse struct {
Connections map[string]CheckResult `json:"connections"`
Ingress map[string]CheckResult `json:"ingress"`
Bindings map[string]CheckResult `json:"bindings"`
// Credentials reports the refresh state of each connection's secret.
Credentials map[string]CredentialStatus `json:"credentials,omitempty"`
}
type WorkSummary ¶ added in v0.2.0
type WorkSummary struct {
WorkID string `json:"work_id"`
Objective string `json:"objective"`
Status string `json:"status"`
Revision int `json:"revision"`
CurrentStep string `json:"current_step,omitempty"`
LastNote string `json:"last_note,omitempty"`
}
WorkSummary is a work item in a seat's recovery context.