BEEOS CLOUD / DEVELOPER REFERENCE
Appendix: types and enumerations
Every shared type structure and enumeration of the Harness SDK
The appendix describes every shared structure and enumeration the module pages refer to. Type names in the field tables link here; each type and enumeration has a stable anchor (its lower-cased name).
Enumerations
MSConnectionStatus
TypeScript
State of the harness's realtime connection to Cloud. The harness reports it in the heartbeat.
| Value | Meaning |
|---|---|
unknown | The state is not known. |
connecting | The harness is connecting. |
connected | The connection is established. |
reconnecting | The connection was lost and the harness is reconnecting. |
disconnected | The connection is closed. |
failed | The connection failed. |
RuntimeCapability
TypeScript
Capability that a harness can declare in its registration.
| Value | Meaning |
|---|---|
transport | Receives runtime methods from Cloud. |
agents.lifecycle | Creates, updates and deletes agents. |
skills | Manages the skills of an agent. |
models | Lists the available models. |
cron | Manages scheduled tasks. |
mcp | Manages MCP servers. |
conversation.control | Controls conversations: prompt, cancel, clear, mode and model. |
terminal | Provides a terminal. |
canvas | Provides a canvas. |
subagents | Runs sub-agents. |
RuntimeChatConnectionState
TypeScript
State of the realtime connection of the chat client.
| Value | Meaning |
|---|---|
connected | The connection is established. |
connecting | The client is connecting. |
disconnected | The connection is closed. |
failed | The connection failed. |
RuntimeMethod
TypeScript and Python
The runtime methods that Cloud may deliver to a harness. Every user chat prompt arrives as session/prompt.
| Value | Constant name | Meaning |
|---|---|---|
agent/create | AGENT_CREATE | Creates an agent (capability agents.lifecycle). |
agent/update | AGENT_UPDATE | Updates an agent (capability agents.lifecycle). |
agent/delete | AGENT_DELETE | Deletes an agent (capability agents.lifecycle). |
agent/applyTemplate | AGENT_APPLY_TEMPLATE | Applies a template to an agent (capability agents.lifecycle). |
skills/list | SKILLS_LIST | Lists the skills of an agent (capability skills). |
skills/install | SKILLS_INSTALL | Installs a skill (capability skills). |
skills/update | SKILLS_UPDATE | Enables or disables a skill (capability skills). |
skills/uninstall | SKILLS_UNINSTALL | Uninstalls a skill (capability skills). |
models/list | MODELS_LIST | Lists the available models (capability models). |
cron/list | CRON_LIST | Lists the scheduled tasks of an agent (capability cron). |
cron/status | CRON_STATUS | Reads the status of the scheduler (capability cron). |
cron/add | CRON_ADD | Adds a scheduled task (capability cron). |
cron/update | CRON_UPDATE | Updates a scheduled task (capability cron). |
cron/remove | CRON_REMOVE | Removes a scheduled task (capability cron). |
cron/run | CRON_RUN | Runs a scheduled task now (capability cron). |
cron/runs | CRON_RUNS | Lists the runs of a scheduled task (capability cron). |
mcp/list | MCP_LIST | Lists the MCP servers (capability mcp). |
mcp/prepare | MCP_PREPARE | Prepares an MCP server configuration (capability mcp). |
mcp/set | MCP_SET | Sets an MCP server (capability mcp). |
mcp/unset | MCP_UNSET | Removes an MCP server (capability mcp). |
session/set_mode | SESSION_SET_MODE | Sets the mode of a session (capability conversation.control). |
session/set_model | SESSION_SET_MODEL | Sets the model of a session (capability conversation.control). |
session/clear | SESSION_CLEAR | Clears the history of a session (capability conversation.control). |
session/cancel | SESSION_CANCEL | Cancels the running prompt of a session (capability conversation.control). |
session/prompt | SESSION_PROMPT | Delivers a user chat prompt (capability conversation.control). Every chat prompt arrives as this method. |
canvas/toggle | CANVAS_TOGGLE | Toggles the canvas (capability canvas). |
canvas/clear | CANVAS_CLEAR | Clears the canvas (capability canvas). |
canvas/reference | CANVAS_REFERENCE | Canvas method canvas/reference (capability canvas). |
canvas/dimensions | CANVAS_DIMENSIONS | Canvas method canvas/dimensions (capability canvas). |
Structures
AgentGatewayClientOptions
TypeScript · TypeScript only
Options of the Agent Gateway client.
| Field | Type | Required | Description |
|---|---|---|---|
baseUrl | string | yes | Base URL of Agent Gateway. |
identity | AgentRequestIdentity | yes | Identity that signs every request. |
retry? | BackoffPolicy | false | no | Default retry for idempotent calls; false disables. Defaults to TRANSIENT_BACKOFF. |
onRetry? | (info: { method: string; path: string; attempt: number; delayMs: number; error: unknown }) => void | no | Called before each retry with the method, path, attempt number, delay in milliseconds and the error. |
AgentKeyPair
TypeScript and Python
Raw Ed25519 key material of a harness instance (32-byte public + 32-byte seed).
| Field | Type | Required | Description |
|---|---|---|---|
publicKey / public_key | Uint8Array / bytes | yes | Raw 32-byte Ed25519 public key. |
privateKey / private_key | Uint8Array / bytes | yes | 32-byte Ed25519 seed (the private key). |
AnyRuntimeExecutionGrantClaims
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Claims of an execution grant. The shape depends on the method that the grant authorizes.
Alternatives
| # | Type |
|---|---|
| 1 | { [TMethod in ServiceRuntimeMethod]: RuntimeExecutionGrantClaims<TMethod>; }[ServiceRuntimeMethod] |
| 2 | { [TMethod in keyof ConversationRuntimeInvocationResultMap]: ConversationRuntimeExecutionGrantClaims<TMethod>; }[keyof ConversationRuntimeInvocationResultMap] |
| 3 | { [TMethod in keyof InstanceRuntimeInvocationResultMap]: InstanceRuntimeExecutionGrantClaims<TMethod>; }[keyof InstanceRuntimeInvocationResultMap] |
BackoffPolicy
TypeScript and Python
Backoff schedule for retries: attempt limit, delays and total budget.
| Field | Type | Required | Description |
|---|---|---|---|
readonly maxAttempts / max_attempts | number / float | yes | Total attempts including the first one. Infinity retries until budgetMs/signal. |
readonly initialDelayMs / initial_delay_ms | number / int | yes | Delay before the second attempt, in milliseconds. |
readonly maxDelayMs / max_delay_ms | number / int | yes | Upper limit of a single delay, in milliseconds. |
readonly factor | number / float | yes | Multiplier applied to the delay after each attempt. |
readonly budgetMs? / budget_ms | number / int | None | no | Total wall-clock budget; the last attempt may start before it, never after. |
Base64Url
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
A string in base64url encoding (characters A–Z a–z 0–9 - _).
type Base64Url = string
CanvasRelayClientOptions
TypeScript · TypeScript only
Options of the canvas relay client.
| Field | Type | Required | Description |
|---|---|---|---|
relayUrl | string | yes | Relay URL from the canvas token. |
keys | AgentKeyPair | yes | Ed25519 key pair of the harness instance. |
agentId? | string | no | Agent id to put into the connection query. Optional. |
token? | string | no | Canvas token to put into the connection query. Optional. |
socketFactory? | (url: string, headers: Record<string, string>) => CanvasRelaySocket | no | Creates the WebSocket. Replace it in tests; the default uses ws. |
CanvasRelayConnect
Python · Python only
Connection description for the canvas relay: the fixed path and the optional query values.
| Field | Type | Required | Description |
|---|---|---|---|
path | Literal['/ws/agent'] | yes | Always /ws/agent. |
agentIdQuery | NotRequired[str] | yes | Value of the agentId query parameter. |
tokenQuery | NotRequired[str] | yes | Value of the token query parameter. |
CentrifugeRealtimePortOptions
TypeScript · TypeScript only
Options of the Centrifuge realtime port.
| Field | Type | Required | Description |
|---|---|---|---|
factory? | CentrifugeRealtimeFactory | no | Creates the Centrifuge client. Replace it in tests. |
ConversationHistoryGeneration
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Generation number of a conversation history, as a decimal string.
type ConversationHistoryGeneration = DecimalUInt64
ConversationRuntimeBoundaryFinishRequest
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Request that reports the end of a run to the history boundary.
| Field | Type | Required | Description |
|---|---|---|---|
activeRunRegistrationId | string | yes | Registration id of the run that finished. |
operationId | OperationId | yes | Identifier of the operation. |
requestMessageId | RuntimeControlMessageId | yes | Identifier of the message that carried the request. |
conversationId | PlatformConversationId | yes | Identifier of the conversation. |
historyGeneration | ConversationHistoryGeneration | yes | Generation of the conversation history. It changes when the history is cleared. |
runtimeRunId | string | yes | Identifier of the run in the harness. |
terminalState | "completed" | "failed" | "cancelled" | yes | How the run ended: completed, failed or cancelled. |
source | "runtime" | "recovery" | yes | Who reports the end: runtime for a normal finish, recovery when it is reported during recovery. |
lease | RuntimeBoundaryLeaseAuthority | yes | Lease authority of the reporting harness. |
ConversationRuntimeBoundaryStartRequest
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Request that reports the start of a run to the history boundary.
| Field | Type | Required | Description |
|---|---|---|---|
operationId | OperationId | yes | Identifier of the operation. |
requestMessageId | RuntimeControlMessageId | yes | Identifier of the message that carried the request. |
conversationId | PlatformConversationId | yes | Identifier of the conversation. |
historyGeneration | ConversationHistoryGeneration | yes | Generation of the conversation history. It changes when the history is cleared. |
runtimeRunId | string | yes | Identifier of the run in the harness. |
lease | RuntimeBoundaryLeaseAuthority | yes | Lease authority of the reporting harness. |
CoreExecutionAuthorization
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
The pair of signed documents that authorize one execution: the grant and the boundary assertion.
| Field | Type | Required | Description |
|---|---|---|---|
grant | RuntimeExecutionGrantEnvelope | yes | The execution grant. |
boundary | RuntimeExecutionBoundaryAssertion | yes | The execution boundary assertion. |
DecimalUInt64
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Canonical unsigned uint64 decimal.
type DecimalUInt64 = `${bigint}`
GatewayA2aRpcResult
TypeScript · TypeScript only
Result of an agent-to-agent JSON-RPC call.
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | yes | true when the HTTP status is a success. |
status | number | yes | HTTP status code of the answer. |
body | string | yes | Raw response body. |
rpc | Record<string, unknown> | yes | The response body parsed as a JSON-RPC object. |
GatewayBridgeConfig
TypeScript · TypeScript only
Terminal bridge location returned by Agent Gateway.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | URL of the terminal bridge. |
region? | string | no | Region of the bridge, when Agent Gateway reports one. |
GatewayCanvasToken
TypeScript · TypeScript only
Canvas token and the relay it belongs to.
| Field | Type | Required | Description |
|---|---|---|---|
token | string | yes | The canvas token. |
relayUrl | string | yes | URL of the canvas relay. |
expiresAt | number | yes | Expiry time of the token, as a Unix timestamp. |
GatewayFileRef
TypeScript · TypeScript only
Reference to a file that is attached to an agent.
| Field | Type | Required | Description |
|---|---|---|---|
fileId | string | yes | Identifier of the file. |
fileName | string | yes | Name of the file. |
mimeType? | string | no | MIME type of the file. |
size? | number | no | Size in bytes. |
source? | string | no | Where the file comes from. |
GatewayFileResolve
TypeScript · TypeScript only
Details of a file, as returned when a file id is resolved.
| Field | Type | Required | Description |
|---|---|---|---|
fileId? | string | no | Identifier of the file. |
fileName? | string | no | Name of the file. |
mimeType? | string | no | MIME type of the file. |
size? | number | no | Size in bytes. |
downloadUrl? | string | no | URL that the file can be downloaded from. |
[key: string] | unknown | yes | Further fields that Agent Gateway returns. |
GatewayPresign
TypeScript · TypeScript only
Upload location for a new file.
| Field | Type | Required | Description |
|---|---|---|---|
fileId | string | yes | Identifier of the new file. Pass it to the confirm call after the upload. |
uploadUrl | string | yes | URL that the file content must be uploaded to. |
GatewayRequestInit
TypeScript · TypeScript only
Per-call options for Agent Gateway requests, based on the standard RequestInit.
Extends: Omit<RequestInit, "body">
| Field | Type | Required | Description |
|---|---|---|---|
body? | string | Uint8Array | no | Request body. |
retry? | BackoffPolicy | false | no | Overrides the client default; false disables retries for this call. |
idempotent? | boolean | no | Allows retries of a non-GET call that Agent Gateway deduplicates. |
GatewayUploadedFile
TypeScript · TypeScript only
Result of a completed file upload.
| Field | Type | Required | Description |
|---|---|---|---|
fileId | string | yes | Identifier of the file. |
uri | string | yes | URI of the uploaded file. |
fileName | string | yes | Name of the file. |
mimeType | string | yes | MIME type of the file. |
HistoryBoundaryAction
TypeScript · TypeScript only
Name of a history-boundary action: prepare, resetting, reset_done, commit, abort or reconcile.
type HistoryBoundaryAction = keyof typeof HISTORY_BOUNDARY_OPERATIONS
JsonValue
TypeScript · TypeScript only
Any JSON value: null, a boolean, a number, a string, an array or an object.
Alternatives
| # | Type |
|---|---|
| 1 | null |
| 2 | boolean |
| 3 | number |
| 4 | string |
| 5 | JsonValue[] |
| 6 | { [key: string]: JsonValue } |
Alternatives 6
| Field | Type | Required | Description |
|---|---|---|---|
[key: string] | JsonValue | yes | Values of the object, by key. |
MessageServiceMessageId
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Message Service caller/runtime idempotency key; opaque, bounded, and never a platform UUID.
type MessageServiceMessageId = string
OperationId
TypeScript · TypeScript only
Identifier of an operation: a key of HARNESS_OPERATIONS.
type OperationId = keyof typeof OPERATIONS
OperationPathParams
TypeScript · TypeScript only
Path parameters of every operation, by operation id.
| Field | Type | Required | Description |
|---|---|---|---|
runtimeRegister | Record<never, never> | yes | Path parameters of runtimeRegister: none. |
runtimeHeartbeat | { registrationId: string } | yes | Path parameters of runtimeHeartbeat: registrationId. |
runtimeRealtimeTokenCreate | Record<never, never> | yes | Path parameters of runtimeRealtimeTokenCreate: none. |
runtimeConversationSync | Record<never, never> | yes | Path parameters of runtimeConversationSync: none. |
runtimeConversationMessagesList | { conversationId: string } | yes | Path parameters of runtimeConversationMessagesList: conversationId. |
runtimeConversationMessageCreate | { conversationId: string } | yes | Path parameters of runtimeConversationMessageCreate: conversationId. |
runtimeConversationMessageGet | { conversationId: string; messageId: string } | yes | Path parameters of runtimeConversationMessageGet: conversationId, messageId. |
runtimeConversationMessagePatch | { conversationId: string; messageId: string } | yes | Path parameters of runtimeConversationMessagePatch: conversationId, messageId. |
runtimeConversationRunStart | { conversationId: string } | yes | Path parameters of runtimeConversationRunStart: conversationId. |
runtimeConversationRunFinish | { conversationId: string } | yes | Path parameters of runtimeConversationRunFinish: conversationId. |
runtimeDeliveriesRead | Record<never, never> | yes | Path parameters of runtimeDeliveriesRead: none. |
runtimeDeliveriesRenew | Record<never, never> | yes | Path parameters of runtimeDeliveriesRenew: none. |
runtimeDeliveriesAck | Record<never, never> | yes | Path parameters of runtimeDeliveriesAck: none. |
runtimeOperationHistoryGet | { operationId: string } | yes | Path parameters of runtimeOperationHistoryGet: operationId. |
runtimeOperationMessageAppend | { operationId: string } | yes | Path parameters of runtimeOperationMessageAppend: operationId. |
conversationMessagesList | { conversationId: string } | yes | Path parameters of conversationMessagesList: conversationId. |
conversationMessageSend | { conversationId: string } | yes | Path parameters of conversationMessageSend: conversationId. |
agentGet | { agentId: string } | yes | Path parameters of agentGet: agentId. |
agentUpdate | { agentId: string } | yes | Path parameters of agentUpdate: agentId. |
agentSync | Record<never, never> | yes | Path parameters of agentSync: none. |
agentFilesList | Record<never, never> | yes | Path parameters of agentFilesList: none. |
agentFilePresign | Record<never, never> | yes | Path parameters of agentFilePresign: none. |
agentFileConfirm | Record<never, never> | yes | Path parameters of agentFileConfirm: none. |
agentFileResolve | { fileId: string } | yes | Path parameters of agentFileResolve: fileId. |
canvasTokenCreate | Record<never, never> | yes | Path parameters of canvasTokenCreate: none. |
a2aDiscover | Record<never, never> | yes | Path parameters of a2aDiscover: none. |
a2aJsonRpc | { agentId: string } | yes | Path parameters of a2aJsonRpc: agentId. |
a2aTaskGet | { taskId: string } | yes | Path parameters of a2aTaskGet: taskId. |
messagingTokenCreate | Record<never, never> | yes | Path parameters of messagingTokenCreate: none. |
runtimeHistoryBoundaryPrepare | { conversationId: string } | yes | Path parameters of runtimeHistoryBoundaryPrepare: conversationId. |
runtimeHistoryBoundaryResetting | { conversationId: string } | yes | Path parameters of runtimeHistoryBoundaryResetting: conversationId. |
runtimeHistoryBoundaryResetDone | { conversationId: string } | yes | Path parameters of runtimeHistoryBoundaryResetDone: conversationId. |
runtimeHistoryBoundaryCommit | { conversationId: string } | yes | Path parameters of runtimeHistoryBoundaryCommit: conversationId. |
runtimeHistoryBoundaryAbort | { conversationId: string } | yes | Path parameters of runtimeHistoryBoundaryAbort: conversationId. |
runtimeHistoryBoundaryReconcile | { conversationId: string } | yes | Path parameters of runtimeHistoryBoundaryReconcile: conversationId. |
runtimeConversationMetadataModel | { conversationId: string } | yes | Path parameters of runtimeConversationMetadataModel: conversationId. |
runtimeConversationCronDelivery | { conversationId: string } | yes | Path parameters of runtimeConversationCronDelivery: conversationId. |
runtimeClaimNext | Record<never, never> | yes | Path parameters of runtimeClaimNext: none. |
runtimeClaimExact | { operationId: string } | yes | Path parameters of runtimeClaimExact: operationId. |
runtimeClaimRenew | { operationId: string } | yes | Path parameters of runtimeClaimRenew: operationId. |
runtimeClaimRelease | { operationId: string } | yes | Path parameters of runtimeClaimRelease: operationId. |
runtimeResourceRedeem | { operationId: string; kind: string; resourceRef: string } | yes | Path parameters of runtimeResourceRedeem: operationId, kind, resourceRef. |
runtimeOutputFilePresign | { operationId: string } | yes | Path parameters of runtimeOutputFilePresign: operationId. |
runtimeOutputFileConfirm | { operationId: string } | yes | Path parameters of runtimeOutputFileConfirm: operationId. |
runtimeInputFilesResolve | { operationId: string } | yes | Path parameters of runtimeInputFilesResolve: operationId. |
agentTemplateOriginReport | { agentId: string } | yes | Path parameters of agentTemplateOriginReport: agentId. |
channelCreate | Record<never, never> | yes | Path parameters of channelCreate: none. |
a2aTaskComplete | { taskId: string } | yes | Path parameters of a2aTaskComplete: taskId. |
agentEventPublish | Record<never, never> | yes | Path parameters of agentEventPublish: none. |
bridgeConfigGet | Record<never, never> | yes | Path parameters of bridgeConfigGet: none. |
agentConnectorMcp | Record<never, never> | yes | Path parameters of agentConnectorMcp: none. |
automationList | Record<never, never> | yes | Path parameters of automationList: none. |
automationCreate | Record<never, never> | yes | Path parameters of automationCreate: none. |
automationWebhookCreate | Record<never, never> | yes | Path parameters of automationWebhookCreate: none. |
automationGet | { automationId: string } | yes | Path parameters of automationGet: automationId. |
automationRunsList | { automationId: string } | yes | Path parameters of automationRunsList: automationId. |
automationRunCreate | { automationId: string } | yes | Path parameters of automationRunCreate: automationId. |
automationRunGet | { automationId: string; runId: string } | yes | Path parameters of automationRunGet: automationId, runId. |
PlatformAgentId
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Identifier of an agent: a UUID string.
type PlatformAgentId = PlatformResourceId
PlatformConversationId
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Identifier of a conversation: a UUID string.
type PlatformConversationId = PlatformResourceId
PlatformInstanceId
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Identifier of a Cloud instance: inst_ followed by 24 lowercase hex characters.
type PlatformInstanceId = string
PlatformResourceId
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Identifier of a Cloud resource: a UUID string.
type PlatformResourceId = string
RetryOptions
TypeScript · TypeScript only
Options of retryWithBackoff.
| Field | Type | Required | Description |
|---|---|---|---|
policy | BackoffPolicy | yes | Backoff schedule to use. |
isRetryable? | (error: unknown) => boolean | no | Decides whether an error is worth retrying. Defaults to retrying every error. |
signal? | AbortSignal | no | Aborts the waiting and stops retrying. |
onRetry? | (info: { attempt: number; delayMs: number; error: unknown }) => void | no | Called before each retry with the attempt number, the delay in milliseconds and the error. |
sleep? | (ms: number, signal?: AbortSignal) => Promise<void> | no | Waits for the given milliseconds. Replace it in tests. |
now? | () => number | no | Clock in milliseconds. Replace it in tests. |
RFC3339Timestamp
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
A timestamp string in RFC 3339 format.
type RFC3339Timestamp = string
RuntimeActiveLease
TypeScript and Python
The active lease as the registration coordinator reports it.
| Field | Type | Required | Description |
|---|---|---|---|
instanceId / instance_id | string / str | yes | Identifier of the Cloud instance that the harness is registered to. |
leaseId / lease_id | string / str | yes | Identifier of the runtime lease. |
runtimeEpoch / runtime_epoch | ${bigint} / str | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
runtimeLeaseCredential / runtime_lease_credential | string / str | yes | Credential that was issued with the lease. It is sent as a Bearer token on lease calls. Treat it as a secret and never log it. |
leaseExpiresAt / lease_expires_at | string / str | yes | When the lease expires, as an RFC 3339 timestamp. |
heartbeat_interval_ms | int | no | Interval at which the lease must be renewed, in milliseconds. |
registration_id | str | no | Identifier of the registration. |
handler_identity | str | no | Identity of the handler that holds the lease. |
RuntimeBoundaryLeaseAuthority
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Lease details that prove the authority of the harness when it reports to the history boundary.
| Field | Type | Required | Description |
|---|---|---|---|
leaseId | string | yes | Identifier of the runtime lease. |
handlerIdentity | string | yes | Identity of the handler, the harness process that registered and holds the lease. |
runtimeEpoch | RuntimeEpoch | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
runtimeLeaseCredential | string | yes | Credential that was issued with the lease. It is sent as a Bearer token on lease calls. Treat it as a secret and never log it. |
RuntimeChatClientOptions
TypeScript · TypeScript only
Options of the runtime chat client.
| Field | Type | Required | Description |
|---|---|---|---|
authority | RuntimeChatAuthorityPort | yes | Supplies the current lease. |
http | RuntimeChatHttpPort | yes | HTTP port used for chat calls. |
realtime | RuntimeChatRealtimePort | yes | Realtime port used to receive new messages. |
now? | () => number | no | Clock in milliseconds; replace it in tests. Defaults to Date.now. |
reconnectDelayMs? | (attempt: number) => number | no | Bounded reconnect backoff; attempt is 1-based. |
logger? | RuntimeChatLogger | no | Receives log messages. Optional. |
RuntimeChatHistoryInput
TypeScript · TypeScript only
Paging options for reading conversation history.
| Field | Type | Required | Description |
|---|---|---|---|
cursor? | string | no | Cursor returned by the previous page. |
limit? | number | no | Maximum number of items to return. |
RuntimeChatHistoryMessage
TypeScript · TypeScript only
One message in a history page.
Extends: RuntimeChatMessage
| Field | Type | Required | Description |
|---|---|---|---|
offset? | string | no | Position of the message in the conversation, as a decimal string. |
historyGeneration? | string | no | History generation that the message belongs to. |
state? | string | no | State of the message, for example streaming or completed. |
stopReason? | string | no | Why the message stopped. |
body? | string | no | Text of the message. |
parts? | readonly unknown[] | no | Structured parts of the message. |
RuntimeChatHistoryPage
TypeScript · TypeScript only
One page of conversation history.
| Field | Type | Required | Description |
|---|---|---|---|
messages | RuntimeChatHistoryMessage[] | yes | Messages of the page. |
nextCursor? | string | no | Cursor of the next page. Absent on the last page. |
hasMore | boolean | yes | true when there are further pages. |
latestOffset | string | yes | Offset of the newest message in the conversation. |
historyGeneration | string | yes | Current generation of the history. |
historyBoundaryOffset | string | yes | Offset where the current history generation starts. |
RuntimeChatHttpPortOptions
TypeScript · TypeScript only
Options of the HTTP port used by the chat client.
| Field | Type | Required | Description |
|---|---|---|---|
baseUrl | string | yes | Message Service origin, e.g. https://message.example. |
fetchImpl? | typeof fetch | no | Function used for HTTP calls. Defaults to the global fetch. |
now? | () => number | no | Clock in milliseconds; replace it in tests. Defaults to Date.now. |
RuntimeChatLease
TypeScript · TypeScript only
Lease details that the chat client needs.
| Field | Type | Required | Description |
|---|---|---|---|
instanceId | string | yes | Identifier of the Cloud instance that the harness is registered to. |
handlerIdentity | string | yes | Identity of the handler, the harness process that registered and holds the lease. |
runtimeEpoch | string | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
leaseId | string | yes | Identifier of the runtime lease. |
runtimeLeaseCredential | string | yes | Credential that was issued with the lease. It is sent as a Bearer token on lease calls. Treat it as a secret and never log it. |
leaseExpiresAt | string | yes | When the lease expires, as an RFC 3339 timestamp. |
RuntimeChatLogger
TypeScript · TypeScript only
Logger of the chat client. Every method is optional.
| Field | Type | Required | Description |
|---|---|---|---|
debug? | (...args: unknown[]) => void | no | Receives debug messages. |
info? | (...args: unknown[]) => void | no | Receives informational messages. |
warn? | (...args: unknown[]) => void | no | Receives warnings. |
error? | (...args: unknown[]) => void | no | Receives errors. |
RuntimeChatMessage
TypeScript · TypeScript only
A conversation message.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Identifier of the message. |
conversationId | string | yes | Identifier of the conversation. |
type | string | yes | Type of the message, for example agent_reply. |
content | unknown | yes | Content of the message. |
senderId? | string | no | Identifier of the sender. |
replyTo? | string | no | Identifier of the message that this one replies to. |
createdAt? | string | no | When the message was created. |
[key: string] | unknown | yes | Further fields that Cloud returns. |
RuntimeChatPreparedClearProof
TypeScript · TypeScript only
Proof that a history clear was prepared. It is checked before a retained reply is changed.
| Field | Type | Required | Description |
|---|---|---|---|
clearIntentId | string | yes | Identifier of the clear intent. |
activeRunRegistrationId | string | yes | Registration id of the active run. |
historyGeneration | ${bigint} | yes | Generation of the conversation history. It changes when the history is cleared. |
runtimeEpoch | ${bigint} | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
RuntimeChatRetainedBinding
TypeScript · TypeScript only
Binds a retained reply to its conversation and message, and to the checks that apply when it is changed.
| Field | Type | Required | Description |
|---|---|---|---|
conversationId | string | yes | Identifier of the conversation. |
messageId | string | yes | Identifier of the reply message. |
taskRequestMessageId | string | yes | Original task request, distinct from the operation RPC request message. |
assertAttempt | () => void | yes | Supplied by the trusted journal owner, never inferred from prompt content. |
mutationKey | (sequence: number) => string | yes | Stable idempotency key from the owning attempt for each serialized mutation. |
assertPreparedClear? | (proof: RuntimeChatPreparedClearProof) => void | no | Called with the proof of a prepared clear; throw to refuse the change. |
RuntimeChatRetainedSnapshot
TypeScript · TypeScript only
Stored copy of a reply message.
| Field | Type | Required | Description |
|---|---|---|---|
rawText | string | yes | Raw JSON text of the message as it was read. |
messageId | string | yes | Identifier of the message. |
conversationId | string | yes | Identifier of the conversation. |
type | string | yes | Type of the message. |
sender | string | yes | Identifier of the sender. |
createdAt | string | yes | When the message was created. |
updatedAt? | string | no | When the message was last updated. |
replyTo? | string | no | Identifier of the message that this one replies to. |
body | string | yes | Text of the message. |
state | string | yes | State of the message: streaming, completed, failed, refused or cancelled. |
stopReason? | string | no | Why the message stopped. |
RuntimeChatSendInput
TypeScript · TypeScript only
Input for sending a message.
| Field | Type | Required | Description |
|---|---|---|---|
conversationId | string | yes | Identifier of the conversation. |
id? | string | no | Identifier for the new message. Cloud generates one when omitted. |
type | string | yes | Type of the message, for example agent_reply. |
content | unknown | yes | Content of the message. |
replyTo? | string | no | Identifier of the message that this one replies to. |
RuntimeClaimExactRequest
TypeScript · TypeScript only
Request to claim one specific operation.
Extends: RuntimeClaimNextRequest
| Field | Type | Required | Description |
|---|---|---|---|
operationId | string | yes | Identifier of the operation. |
requestMessageId | string | yes | Identifier of the message that carried the request. |
dispatchEpoch | string | yes | Epoch at which Cloud dispatched the operation. |
RuntimeClaimFence
TypeScript · TypeScript only
Fence of a claim: it proves that the harness still owns the operation.
| Field | Type | Required | Description |
|---|---|---|---|
claimId | string | yes | Identifier of the claim. |
handlerIdentity | string | yes | Identity of the handler, the harness process that registered and holds the lease. |
runtimeEpoch | string | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
fencingToken | string | yes | Fencing token of the claim, as a decimal string. A lower token than the current one is stale. |
journalStoreId | string | yes | Identifier of the durable journal store of the harness. |
journalGeneration | string | yes | Generation of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes. |
operationId | string | yes | Identifier of the operation. |
requestMessageId | string | yes | Identifier of the message that carried the request. |
runtimeLeaseCredential | string | yes | Credential that was issued with the lease. It is sent as a Bearer token on lease calls. Treat it as a secret and never log it. |
RuntimeClaimNextRequest
TypeScript · TypeScript only
Request to claim the next pending operation.
| Field | Type | Required | Description |
|---|---|---|---|
claimRequestId | string | yes | Identifier of this claim request, for deduplication. |
instanceId | string | yes | Identifier of the Cloud instance that the harness is registered to. |
handlerIdentity | string | yes | Identity of the handler, the harness process that registered and holds the lease. |
runtimeEpoch | string | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
journalStoreId | string | yes | Identifier of the durable journal store of the harness. |
journalGeneration | string | yes | Generation of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes. |
runtimeLeaseCredential | string | yes | Credential that was issued with the lease. It is sent as a Bearer token on lease calls. Treat it as a secret and never log it. |
RuntimeClaimReleaseRequest
TypeScript · TypeScript only
Request to release the claim of an operation.
Extends: RuntimeClaimFence
| Field | Type | Required | Description |
|---|---|---|---|
reason | "completed" | "cancelled" | "worker_shutdown" | "claim_rejected" | yes | Why the claim is released: completed, cancelled, worker_shutdown or claim_rejected. |
RuntimeClaimRenewRequest
TypeScript · TypeScript only
Request to renew the claim of an operation.
Extends: RuntimeClaimFence
No fields.
RuntimeControlMessageId
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Runtime control-plane Message Service id with the same bounded opaque wire rules.
type RuntimeControlMessageId = string
RuntimeConversationSyncRequest
Python · Python only
Request to create or update the conversation of an operation.
| Field | Type | Required | Description |
|---|---|---|---|
schemaVersion | Literal[1] | yes | Version of the request schema. Always 1. |
operationId | str | yes | Identifier of the operation. |
runtimeSessionId | str | yes | Identifier of the session in the harness. |
runtimeSessionKey | NotRequired[str] | yes | Key of the session in the harness. |
title | NotRequired[str] | yes | Title of the conversation. |
RuntimeDeliveriesReadRequest
Python · Python only
Request to read pending deliveries.
| Field | Type | Required | Description |
|---|---|---|---|
schemaVersion | Literal[1] | yes | Version of the request schema. Always 1. |
maxCount | int | yes | Maximum number of deliveries to return. |
blockMs | int | yes | How long to wait for a delivery when none is pending, in milliseconds. |
RuntimeDeliveryAppendReceipt
TypeScript · TypeScript only
Outcome of appending a message to an operation.
Alternatives
| # | Type |
|---|---|
| 1 | { readonly outcome: "created" | "duplicate" | "reconciled"; readonly message?: JsonValue; readonly history?: JsonValue } |
| 2 | { readonly outcome: "outcome_unknown"; readonly history?: JsonValue } |
Alternatives 1
| Field | Type | Required | Description |
|---|---|---|---|
readonly outcome | "created" | "duplicate" | "reconciled" | yes | created for a new message, duplicate when it was already stored, reconciled when an earlier uncertain append was resolved. |
readonly message? | JsonValue | no | The stored message. |
readonly history? | JsonValue | no | The history of the operation, when Cloud returns it. |
Alternatives 2
| Field | Type | Required | Description |
|---|---|---|---|
readonly outcome | "outcome_unknown" | yes | outcome_unknown: the append may or may not have been stored. |
readonly history? | JsonValue | no | The history of the operation, when Cloud returns it. |
RuntimeDeliveryAuthorityLease
TypeScript · TypeScript only
Lease credential that the delivery port needs.
Extends: RuntimeDeliveryLease
| Field | Type | Required | Description |
|---|---|---|---|
readonly runtimeLeaseCredential | string | yes | Credential that was issued with the lease. It is sent as a Bearer token on lease calls. Treat it as a secret and never log it. |
RuntimeDeliveryConsumeOptions
TypeScript · TypeScript only
Options of the delivery consumer loop.
| Field | Type | Required | Description |
|---|---|---|---|
readonly onDelivery | (delivery: RuntimeMethodDelivery, context: { readonly lease: RuntimeDeliveryLease; readonly signal: AbortSignal }) => Promise<void> | yes | Handles one delivery. The delivery is acknowledged when the handler returns and left for redelivery when it throws. |
readonly onError? | (error: unknown) => void | no | Called with errors that the loop handles itself. |
readonly onLeaseStarvation? | (input: { readonly starvedForMs: number; readonly recovered: boolean }) => void | no | Called when no valid lease has been available for a while. |
readonly readCount? | number | no | Maximum number of deliveries to read at once. |
readonly blockMs? | number | no | How long one read waits for a delivery, in milliseconds. |
readonly idleDelayMs? | number | no | Pause before reading again when nothing was delivered, in milliseconds. |
readonly renewIntervalMs? | number | no | How often deliveries that are still being handled are renewed, in milliseconds. |
RuntimeDeliveryHistory
TypeScript · TypeScript only
History of an operation: found, not found or expired.
Alternatives
| # | Type |
|---|---|
| 1 | { readonly status: "not_found" | "expired" } |
| 2 | { readonly status: "found"; readonly snapshot: JsonValue } |
Alternatives 1
| Field | Type | Required | Description |
|---|---|---|---|
readonly status | "not_found" | "expired" | yes | not_found when the operation is unknown, expired when its history is no longer kept. |
Alternatives 2
| Field | Type | Required | Description |
|---|---|---|---|
readonly status | "found" | yes | found: the history is in snapshot. |
readonly snapshot | JsonValue | yes | The stored history. |
RuntimeDeliveryIdsRequest
Python · Python only
Request that names deliveries by id.
| Field | Type | Required | Description |
|---|---|---|---|
schemaVersion | Literal[1] | yes | Version of the request schema. Always 1. |
deliveryIds | list[str] | yes | Identifiers of the deliveries. |
RuntimeDeliveryLease
TypeScript · TypeScript only
Lease that a delivery is handled under, including the journal it belongs to.
| Field | Type | Required | Description |
|---|---|---|---|
readonly instanceId | string | yes | Identifier of the Cloud instance that the harness is registered to. |
readonly handlerIdentity | string | yes | Identity of the handler, the harness process that registered and holds the lease. |
readonly runtimeEpoch | string | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
readonly leaseId | string | yes | Identifier of the runtime lease. |
readonly leaseExpiresAt | string | yes | When the lease expires, as an RFC 3339 timestamp. |
readonly journalStoreId | string | yes | Identifier of the durable journal store of the harness. |
readonly journalGeneration | string | yes | Generation of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes. |
RuntimeEpoch
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Epoch of a runtime registration, as a decimal string.
type RuntimeEpoch = DecimalUInt64
RuntimeExecutionBoundaryAssertionClaims
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Claims of an execution boundary assertion: a signed statement from Cloud that one execution may start or resume.
| Field | Type | Required | Description |
|---|---|---|---|
iss | string | yes | Issuer of the token (JWT iss). |
aud | typeof RUNTIME_EXECUTION_BOUNDARY_AUDIENCE | yes | Audience of the token (JWT aud). |
sub | string | yes | Subject of the token (JWT sub). |
jti | string | yes | Unique id of the token (JWT jti). |
iat | number | yes | Issue time as Unix seconds (JWT iat). |
exp | number | yes | Expiry time as Unix seconds (JWT exp). |
executionMode | "start" | "resume" | yes | start for a new execution, resume for the continuation of an earlier one. |
executionBoundaryId | string | yes | Identifier of the execution boundary. |
predecessorExecutionBoundaryId? | string | no | Boundary id of the execution that this one continues. Absent for start, required for resume, and signed into the assertion. |
handoffId? | string | no | Identifier of the handoff, for a resumed execution. |
operationId | OperationId | yes | Identifier of the operation. |
requestMessageId | RuntimeControlMessageId | yes | Identifier of the message that carried the request. |
commandHash | Sha256HexDigest | yes | SHA-256 digest of the command, as 64 lowercase hex characters. |
executionGrantHash | Sha256HexDigest | yes | SHA-256 digest of the execution grant, as 64 lowercase hex characters. |
claimId | string | yes | Identifier of the claim. |
handlerIdentity | string | yes | Identity of the handler, the harness process that registered and holds the lease. |
runtimeEpoch | RuntimeEpoch | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
fencingToken | RuntimeFencingToken | yes | Fencing token of the claim, as a decimal string. A lower token than the current one is stale. |
journalStoreId | string | yes | Identifier of the durable journal store of the harness. |
journalGeneration | RuntimeRevision | yes | Generation of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes. |
journalRevisionBeforeAttempt | RuntimeRevision | yes | Revision of the journal before this attempt began. |
preparedEntryHash | Sha256HexDigest | yes | SHA-256 digest of the journal entry that was prepared for this attempt. |
RuntimeFencingToken
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Fencing token, as a decimal string.
type RuntimeFencingToken = DecimalUInt64
RuntimeHeartbeatRequest
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Heartbeat request that renews the lease.
Extends: RuntimeIdentityProof<"runtime.heartbeat">
| Field | Type | Required | Description |
|---|---|---|---|
targetInstanceId? | string | no | Cloud instance that the registration must belong to. |
leaseId | string | yes | Identifier of the runtime lease. |
handlerIdentity | string | yes | Identity of the handler, the harness process that registered and holds the lease. |
runtimeEpoch | RuntimeEpoch | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
msConnectionStatus? | MSConnectionStatus | no | State of the realtime connection of the harness, as observed by the harness. |
RuntimeHeartbeatResult
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Answer to a heartbeat: renewed, fenced or expired.
Alternatives
| # | Type |
|---|---|
| 1 | { status: "renewed"; leaseExpiresAt: RFC3339Timestamp; runtimeLeaseCredential: string; } |
| 2 | { status: "fenced"; activeRuntimeEpoch: RuntimeEpoch; } |
| 3 | { status: "expired"; } |
Alternatives 1
| Field | Type | Required | Description |
|---|---|---|---|
status | "renewed" | yes | renewed: the lease continues. |
leaseExpiresAt | RFC3339Timestamp | yes | New expiry time of the lease. |
runtimeLeaseCredential | string | yes | Credential for the renewed lease. Use it from now on. |
Alternatives 2
| Field | Type | Required | Description |
|---|---|---|---|
status | "fenced" | yes | fenced: another registration is active. |
activeRuntimeEpoch | RuntimeEpoch | yes | Epoch of the registration that is active now. |
Alternatives 3
| Field | Type | Required | Description |
|---|---|---|---|
status | "expired" | yes | expired: the lease has expired and the harness must register again. |
RuntimeIdentityProof
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Signed proof that a registration or heartbeat comes from the holder of the instance identity key.
| Field | Type | Required | Description |
|---|---|---|---|
signaturePurpose | TPurpose | yes | What the signature is for: the registration or the heartbeat proof domain. |
instanceIdentityKeyId | RuntimeIdentityKeyId | yes | Identifier of the key that signed. |
nonce | Base64Url | yes | Single-use random value. |
signedAt | RFC3339Timestamp | yes | When the proof was signed, as an RFC 3339 timestamp. |
payloadHash | Sha256HexDigest | yes | SHA-256 digest of the signed payload, as 64 lowercase hex characters. |
signature | Base64Url | yes | Ed25519 signature. |
RuntimeInvocationExpectedTarget
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
What a runtime method acts on. Its scope is instance, agent or conversation, and each scope allows different fields.
Alternatives
| # | Type |
|---|---|
| 1 | { scope: "instance"; platformAgentId?: never; runtimeAgentUid?: string; runtimeLocalKey?: never; platformConversationId?: never; runtimeConversationUid?: nev... |
| 2 | { scope: "agent"; platformAgentId: PlatformAgentId; runtimeAgentUid: string; runtimeLocalKey: string; platformConversationId?: never; runtimeConversationUid?... |
| 3 | { scope: "conversation"; platformAgentId: PlatformAgentId; runtimeAgentUid: string; runtimeLocalKey?: never; platformConversationId: PlatformConversationId; ... |
Alternatives 1
| Field | Type | Required | Description |
|---|---|---|---|
scope | "instance" | yes | instance: the whole instance. |
platformAgentId? | never | no | Not allowed for this scope; it must be absent. |
runtimeAgentUid? | string | no | Identifier of the agent inside the harness. |
runtimeLocalKey? | never | no | Not allowed for this scope; it must be absent. |
platformConversationId? | never | no | Not allowed for this scope; it must be absent. |
runtimeConversationUid? | never | no | Not allowed for this scope; it must be absent. |
runtimeSessionKey? | never | no | Not allowed for this scope; it must be absent. |
Alternatives 2
| Field | Type | Required | Description |
|---|---|---|---|
scope | "agent" | yes | agent: one agent. |
platformAgentId | PlatformAgentId | yes | Identifier of the agent in Cloud. |
runtimeAgentUid | string | yes | Identifier of the agent inside the harness. |
runtimeLocalKey | string | yes | Local key of the agent inside the harness. |
platformConversationId? | never | no | Not allowed for this scope; it must be absent. |
runtimeConversationUid? | never | no | Not allowed for this scope; it must be absent. |
runtimeSessionKey? | never | no | Not allowed for this scope; it must be absent. |
Alternatives 3
| Field | Type | Required | Description |
|---|---|---|---|
scope | "conversation" | yes | conversation: one conversation of an agent. |
platformAgentId | PlatformAgentId | yes | Identifier of the agent in Cloud. |
runtimeAgentUid | string | yes | Identifier of the agent inside the harness. |
runtimeLocalKey? | never | no | Not allowed for this scope; it must be absent. |
platformConversationId | PlatformConversationId | yes | Identifier of the conversation in Cloud. |
runtimeConversationUid | string | yes | Identifier of the conversation inside the harness. |
runtimeSessionKey | string | yes | Key of the session inside the harness. |
RuntimeInvocationFence
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Fence of the active claim that an execution must match.
| Field | Type | Required | Description |
|---|---|---|---|
claimId | string | yes | Identifier of the claim. |
handlerIdentity | string | yes | Identity of the handler, the harness process that registered and holds the lease. |
runtimeEpoch | RuntimeEpoch | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
fencingToken | RuntimeFencingToken | yes | Fencing token of the claim, as a decimal string. A lower token than the current one is stale. |
journalStoreId | string | yes | Identifier of the journal store that the claim was first made against. It does not change afterwards. |
journalGeneration | RuntimeRevision | yes | Generation of the journal store. |
RuntimeInvocationMethod
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Name of a runtime method that can be invoked, for example session/prompt.
Alternatives
| # | Type |
|---|---|
| 1 | ServiceRuntimeMethod |
| 2 | InstanceRuntimeInvocationMethod |
| 3 | ConversationRuntimeInvocationMethod |
| 4 | InternalRuntimeInvocationMethod |
RuntimeInvocationValidationContext
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
The context that an execution grant is validated against: the persisted invocation and its target.
type RuntimeInvocationValidationContext = RuntimeInvocationValidationContextBase & RuntimeInvocationExpectedTarget & ({ method: "session/cancel"; scope: "conversation"; historyGeneration: ConversationHistoryGeneration; targetMessageId: MessageServiceMessageId; } | { method: Exclude<RuntimeInvocationMethod, "session/cancel">; historyGeneration?: never; targetMessageId?: never; })
RuntimeJwksDocumentProvenance
TypeScript · TypeScript only
Where a JWKS document came from and what it says about itself.
| Field | Type | Required | Description |
|---|---|---|---|
sourceUrl | string | yes | URL that the document was loaded from. |
etag | string | yes | ETag of the response. |
issuer | string | yes | Issuer that the document declares. |
audience | string | yes | Audience that the document declares. |
purpose | string | yes | Purpose that the document declares. |
maxClaimTtlSeconds | number | yes | Longest lifetime of a signed claim, in seconds. NaN when the document does not declare one. |
RuntimeJwksFetch
TypeScript · TypeScript only
Function that downloads a URL, with the signature of fetch.
type RuntimeJwksFetch = (url: string | URL, init?: RequestInit) => Promise<Response>
RuntimeJwksKeyMaterial
TypeScript · TypeScript only
Fingerprints of one trusted public key.
| Field | Type | Required | Description |
|---|---|---|---|
jwkThumbprint | string | yes | SHA-256 thumbprint of the public key in JWK form. |
spkiSha256 | string | yes | SHA-256 digest of the public key in SPKI DER form, as hex. |
RuntimeLeaseCredential
TypeScript and Python
A lease credential on its own.
| Field | Type | Required | Description |
|---|---|---|---|
runtimeLeaseCredential / runtime_lease_credential | string / str | yes | Credential that was issued with the lease. It is sent as a Bearer token on lease calls. Treat it as a secret and never log it. |
executionGrant? / execution_grant | string / str | None | no | Execution grant for the operation, when the route requires one. Sent as X-BeeOS-Execution-Grant. |
scopedDeliveryKey? / scoped_delivery_key | string / str | None | no | Delivery key sent as X-Runtime-Delivery-Key. Required on the session-model and cron routes. |
RuntimeLeaseHttpOptions
TypeScript · TypeScript only
Options of the lease HTTP client.
| Field | Type | Required | Description |
|---|---|---|---|
origin | string | yes | Fixed origin that the lease may be sent to (Message Service or Agent Gateway). |
retry? | BackoffPolicy | false | no | Per-call retry. Defaults to none because the outcome of an append or acknowledge can be ambiguous. |
fetch? | typeof fetch | no | Function used for HTTP calls. Defaults to the global fetch. |
RuntimeMessagePatch
Python · Python only
Change to a message that is being streamed.
| Field | Type | Required | Description |
|---|---|---|---|
body | NotRequired[str] | yes | Replaces the whole text. |
body_append | NotRequired[str] | yes | Text to append. |
body_from | NotRequired[int] | yes | Position in the text from which body_append applies. |
parts | NotRequired[list[JsonObject]] | yes | Replaces the structured parts. |
state | NotRequired[str] | yes | New state: streaming, completed, failed, refused or cancelled. |
stop_reason | NotRequired[str] | yes | Why the message stopped. |
RuntimeMethodDelivery
TypeScript and Python
One runtime-method delivery read from Cloud.
| Field | Type | Required | Description |
|---|---|---|---|
readonly deliveryId / delivery_id | string / str | yes | Identifier of the delivery. Use it to renew and acknowledge. |
readonly redelivered | boolean / bool | yes | true when this delivery was handed out before. |
readonly idleMs / idle_ms | number / int | yes | How long the delivery waited before it was read, in milliseconds. |
readonly message | JsonValue / Any | yes | The message of the delivery. |
readonly executionGrant? / execution_grant | string / str | None | no | Execution grant of the operation, when there is one. |
RuntimeNativeConversationSyncRequest
TypeScript · TypeScript only
Request that creates or updates the conversation of a native session.
| Field | Type | Required | Description |
|---|---|---|---|
schemaVersion | 1 | yes | Version of the request schema. Always 1. |
operationId | string | yes | Identifier of the operation. |
runtimeSessionId | string | yes | Identifier of the session in the harness. |
runtimeSessionKey? | string | no | Key of the session in the harness. |
title? | string | no | Title of the conversation. |
RuntimeNativeConversationSyncResponse
TypeScript · TypeScript only
The conversation that Cloud returns for a sync.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Identifier of the conversation. |
participants | readonly string[] | yes | Identifiers of the participants. |
metadata? | Readonly<Record<string, string>> | no | Metadata of the conversation. |
owner_identity_id? | string | no | Identity that owns the conversation. |
target_identity_id? | string | no | Identity of the agent that the conversation is with. |
target_kind? | string | no | Kind of the target. |
title? | string | no | Title of the conversation. |
metadata_version | number | yes | Version of the metadata; it grows with every change. |
history_generation | number | yes | Generation of the conversation history. |
last_activity_at? | string | no | When the conversation was last active. |
state | "open" | "closed" | yes | open or closed. |
closed_reason? | string | no | Why the conversation was closed. |
single_shot? | boolean | no | true for a conversation that takes one prompt only. |
deadline_at? | string | no | Deadline of the conversation. |
created_at | string | yes | When the conversation was created. |
closed_at? | string | no | When the conversation was closed. |
RuntimeOperationAppendRequest
Python · Python only
Request that appends a message to an operation.
| Field | Type | Required | Description |
|---|---|---|---|
schemaVersion | Literal[1] | yes | Version of the request schema. Always 1. |
type | str | yes | Type of the message. |
payload | Any | yes | Content of the message. |
RuntimeRealtimeToken
TypeScript and Python
Realtime connection token and where to use it.
| Field | Type | Required | Description |
|---|---|---|---|
token | string / str | yes | The connection token. |
centrifugoUrl / centrifugo_url | string / str | yes | URL of the realtime service. |
channels | readonly string[] / tuple[str, ...] | yes | Channels that the token allows. |
principalId / principal_id | string / str | yes | Identifier of the principal that the token was issued to. |
expiresAt / expires_at | number / int | yes | Expiry time of the token, as a Unix timestamp. The chat client reads values below 10^12 as seconds and larger values as milliseconds. |
RuntimeRegistrationActiveResult
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Registration answer active: the lease is granted.
| Field | Type | Required | Description |
|---|---|---|---|
status | "active" | yes | active. |
instanceId | PlatformInstanceId | yes | Identifier of the Cloud instance that the harness is registered to. |
runtimeEpoch | RuntimeEpoch | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
journalStoreId | string | yes | Identifier of the durable journal store of the harness. |
journalGeneration | RuntimeRevision | yes | Generation of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes. |
leaseId | string | yes | Identifier of the runtime lease. |
issuedAt | RFC3339Timestamp | yes | When the lease was issued, as an RFC 3339 timestamp. |
leaseExpiresAt | RFC3339Timestamp | yes | When the lease expires, as an RFC 3339 timestamp. |
heartbeatIntervalMs | typeof RUNTIME_LEASE_HEARTBEAT_INTERVAL_MS | yes | Interval at which the lease must be renewed, in milliseconds. |
runtimeLeaseCredential | string | yes | Credential that was issued with the lease. It is sent as a Bearer token on lease calls. Treat it as a secret and never log it. |
RuntimeRegistrationAuthorityLease
TypeScript · TypeScript only
Ephemeral authority view for lease-bound data planes. Credentials must never be journaled or logged.
Extends: RuntimeActiveLease
| Field | Type | Required | Description |
|---|---|---|---|
handlerIdentity | string | yes | Identity of the handler, the harness process that registered and holds the lease. |
RuntimeRegistrationConfig
TypeScript · TypeScript only
Configuration of a registration: what the harness is and what it can do.
| Field | Type | Required | Description |
|---|---|---|---|
registrationId | string | yes | Identifier of the registration. |
handlerIdentity | string | yes | Identity of the handler, the harness process that registered and holds the lease. |
contractRevision | string | yes | Revision of the runtime contract that the harness implements. |
runtimeMethods | readonly RuntimeInvocationMethod[] | yes | Runtime methods that the harness can handle. |
capabilities | readonly RuntimeCapability[] | yes | Capabilities that the harness provides. |
manifestDigest | RuntimeRegistrationHashPayload["manifestDigest"] | yes | Digest of the harness manifest. |
journalStoreId | string | yes | Identifier of the durable journal store of the harness. |
journalGeneration | ${bigint} | yes | Generation of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes. |
instanceIdentityKeyId | string | yes | Identifier of the instance identity key that signs the proofs. |
targetInstanceId? | string | no | Cloud instance that the registration must belong to. |
signIdentityProof | (message: Uint8Array) => Uint8Array | yes | Key custody stays with the host; sign the canonical Ed25519 proof bytes. |
fencedRetry? | BackoffPolicy | false | no | A fenced answer is recoverable: the authority may fence a registration while a predecessor or the control plane settles, so the coordinator keeps re-registering the same intent on this backoff. false restores a terminal fence. Default: 30 s doubling to 5 min, unbounded. |
getMSConnectionStatus? | (lease: RuntimeActiveLease) => MSConnectionStatus | no | Returns the state of the realtime connection for the heartbeat. Optional. |
RuntimeRegistrationFencedResult
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Registration answer fenced: another registration is active.
| Field | Type | Required | Description |
|---|---|---|---|
status | "fenced" | yes | fenced. |
activationId | string | yes | Identifier of the pending activation. |
runtimeEpoch | RuntimeEpoch | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
activeRuntimeEpoch | RuntimeEpoch | yes | Epoch of the registration that is currently active. |
RuntimeRegistrationHashPayload
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
The registration request without its signature fields. Its hash is what the identity proof signs.
type RuntimeRegistrationHashPayload = Omit<RuntimeRegistrationRequest, "signaturePurpose" | "instanceIdentityKeyId" | "nonce" | "signedAt" | "payloadHash" | "signature">
RuntimeRegistrationIdentity
Python · Python only
Durable identity of a registration.
| Field | Type | Required | Description |
|---|---|---|---|
registration_id | str | yes | Identifier of the registration. |
handler_identity | str | yes | Identity of the handler. |
journal_store_id | str | yes | Identifier of the journal store. |
journal_generation | str | yes | Generation of the journal store, as a decimal string. |
RuntimeRegistrationPendingResult
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Registration answer pending_activation: the registration waits for a predecessor to hand off.
| Field | Type | Required | Description |
|---|---|---|---|
status | "pending_activation" | yes | pending_activation. |
activationId | string | yes | Identifier of the pending activation. |
runtimeEpoch | RuntimeEpoch | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
journalStoreId | string | yes | Identifier of the durable journal store of the harness. |
journalGeneration | RuntimeRevision | yes | Generation of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes. |
retryAfterMs | number | yes | How long to wait before registering again, in milliseconds. |
RuntimeRegistrationRequest
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Signed registration request.
Extends: RuntimeIdentityProof<"runtime.register">
| Field | Type | Required | Description |
|---|---|---|---|
targetInstanceId? | string | no | Cloud instance that the registration must belong to. |
registrationId | string | yes | Identifier of the registration. |
handlerIdentity | string | yes | Identity of the handler, the harness process that registered and holds the lease. |
contractRevision | string | yes | Revision of the runtime contract that the harness implements. |
manifestDigest | Sha256HexDigest | yes | Digest of the harness manifest. |
runtimeRpcProtocolVersion | typeof RUNTIME_RPC_PROTOCOL_VERSION | yes | Version of the runtime RPC protocol that the harness speaks. |
runtimeMethods | readonly RuntimeInvocationMethod[] | yes | Runtime methods that the harness can handle. |
capabilities | readonly RuntimeCapability[] | yes | Capabilities that the harness provides. |
journalStoreId | string | yes | Identifier of the durable journal store of the harness. |
journalGeneration | RuntimeRevision | yes | Generation of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes. |
RuntimeRegistrationResult
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Answer to a registration: pending_activation, active or fenced.
Alternatives
| # | Type |
|---|---|
| 1 | RuntimeRegistrationPendingResult |
| 2 | RuntimeRegistrationActiveResult |
| 3 | RuntimeRegistrationFencedResult |
RuntimeRevision
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
Revision number, as a decimal string.
type RuntimeRevision = DecimalUInt64
Sha256HexDigest
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
A SHA-256 digest as 64 lowercase hex characters.
type Sha256HexDigest = string
TerminalAgentAuthFrame
TypeScript and Python
The first frame that the harness sends to the terminal bridge to authenticate.
| Field | Type | Required | Description |
|---|---|---|---|
type | 'agent_auth' / Literal['agent_auth'] | yes | Always agent_auth. |
instance_id | string / str | yes | Identifier of the Cloud instance. |
service | 'terminal' / Literal['terminal'] | yes | Always terminal. |
public_key | string / str | yes | Standard base64 Ed25519 public key. |
timestamp | number / int | yes | Unix time in seconds. |
nonce | string / str | yes | Single-use random value. |
signature | string / str | yes | Standard base64 Ed25519 signature. |
runtimeLeaseCredential | string / str | yes | Credential that was issued with the lease. It is sent as a Bearer token on lease calls. Treat it as a secret and never log it. |
handlerIdentity | string / str | yes | Identity of the handler, the harness process that registered and holds the lease. |
runtimeEpoch | string / str | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
leaseId | string / str | yes | Identifier of the runtime lease. |
TerminalAuthLease
TypeScript and Python
Lease details that go into the terminal authentication frame.
| Field | Type | Required | Description |
|---|---|---|---|
instanceId / instance_id | string / str | yes | Identifier of the Cloud instance that the harness is registered to. |
leaseId / lease_id | string / str | yes | Identifier of the runtime lease. |
runtimeEpoch / runtime_epoch | string / str | yes | Epoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced. |
runtimeLeaseCredential / runtime_lease_credential | string / str | yes | Credential that was issued with the lease. It is sent as a Bearer token on lease calls. Treat it as a secret and never log it. |
handlerIdentity / handler_identity | string / str | yes | Identity of the handler, the harness process that registered and holds the lease. |
TerminalBridgeClientOptions
TypeScript · TypeScript only
Options of the terminal bridge client.
| Field | Type | Required | Description |
|---|---|---|---|
bridgeUrl | string | yes | URL of the terminal bridge. |
keys | AgentKeyPair | yes | Ed25519 key pair of the harness instance. |
lease | TerminalAuthLease | yes | Lease that authenticates the harness. |
now? | () => number | no | Clock in milliseconds; replace it in tests. Defaults to Date.now. |
nonce? | () => string | no | Nonce generator. Replace it in tests. |
authTimeoutMs? | number | no | How long to wait for auth_ok, in milliseconds. Defaults to 10000. |
socketFactory? | (url: string) => TerminalSocket | no | Creates the WebSocket. Replace it in tests; the default uses ws. |
VerifiedDecodedExecutionBoundary
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
A boundary assertion whose signature was verified.
| Field | Type | Required | Description |
|---|---|---|---|
header | CoreExecutionAuthorization["boundary"]["header"] | yes | JWT header of the assertion. |
claims | RuntimeExecutionBoundaryAssertionClaims | yes | Claims of the assertion. |
compactHash | Sha256HexDigest | yes | SHA-256 digest of the compact JWT, as 64 lowercase hex characters. |
VerifiedDecodedExecutionGrant
TypeScript · TypeScript only · Source: @beeos-ai/beeos-types
An execution grant whose signature was verified.
| Field | Type | Required | Description |
|---|---|---|---|
header | CoreExecutionAuthorization["grant"]["header"] | yes | JWT header of the grant. |
claims | AnyRuntimeExecutionGrantClaims | yes | Claims of the grant. |
compactHash | Sha256HexDigest | yes | SHA-256 digest of the compact JWT, as 64 lowercase hex characters. |
Types defined by @beeos-ai/beeos-types
These types are only referenced indirectly by the structures above. They are defined by the runtime entry point of @beeos-ai/beeos-types and are not expanded here:
ConversationRuntimeExecutionGrantClaimsConversationRuntimeInvocationMethodConversationRuntimeInvocationResultMapInstanceRuntimeExecutionGrantClaimsInstanceRuntimeInvocationMethodInstanceRuntimeInvocationResultMapInternalRuntimeInvocationMethodRuntimeExecutionBoundaryAssertionRuntimeExecutionGrantClaimsRuntimeExecutionGrantEnvelopeRuntimeIdentityKeyIdRuntimeInvocationValidationContextBaseServiceRuntimeMethod