DocsHarness SDK

This reference is currently available in English. The Cloud console remains in your selected language.

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.

ValueMeaning
unknownThe state is not known.
connectingThe harness is connecting.
connectedThe connection is established.
reconnectingThe connection was lost and the harness is reconnecting.
disconnectedThe connection is closed.
failedThe connection failed.

RuntimeCapability

TypeScript

Capability that a harness can declare in its registration.

ValueMeaning
transportReceives runtime methods from Cloud.
agents.lifecycleCreates, updates and deletes agents.
skillsManages the skills of an agent.
modelsLists the available models.
cronManages scheduled tasks.
mcpManages MCP servers.
conversation.controlControls conversations: prompt, cancel, clear, mode and model.
terminalProvides a terminal.
canvasProvides a canvas.
subagentsRuns sub-agents.

RuntimeChatConnectionState

TypeScript

State of the realtime connection of the chat client.

ValueMeaning
connectedThe connection is established.
connectingThe client is connecting.
disconnectedThe connection is closed.
failedThe connection failed.

RuntimeMethod

TypeScript and Python

The runtime methods that Cloud may deliver to a harness. Every user chat prompt arrives as session/prompt.

ValueConstant nameMeaning
agent/createAGENT_CREATECreates an agent (capability agents.lifecycle).
agent/updateAGENT_UPDATEUpdates an agent (capability agents.lifecycle).
agent/deleteAGENT_DELETEDeletes an agent (capability agents.lifecycle).
agent/applyTemplateAGENT_APPLY_TEMPLATEApplies a template to an agent (capability agents.lifecycle).
skills/listSKILLS_LISTLists the skills of an agent (capability skills).
skills/installSKILLS_INSTALLInstalls a skill (capability skills).
skills/updateSKILLS_UPDATEEnables or disables a skill (capability skills).
skills/uninstallSKILLS_UNINSTALLUninstalls a skill (capability skills).
models/listMODELS_LISTLists the available models (capability models).
cron/listCRON_LISTLists the scheduled tasks of an agent (capability cron).
cron/statusCRON_STATUSReads the status of the scheduler (capability cron).
cron/addCRON_ADDAdds a scheduled task (capability cron).
cron/updateCRON_UPDATEUpdates a scheduled task (capability cron).
cron/removeCRON_REMOVERemoves a scheduled task (capability cron).
cron/runCRON_RUNRuns a scheduled task now (capability cron).
cron/runsCRON_RUNSLists the runs of a scheduled task (capability cron).
mcp/listMCP_LISTLists the MCP servers (capability mcp).
mcp/prepareMCP_PREPAREPrepares an MCP server configuration (capability mcp).
mcp/setMCP_SETSets an MCP server (capability mcp).
mcp/unsetMCP_UNSETRemoves an MCP server (capability mcp).
session/set_modeSESSION_SET_MODESets the mode of a session (capability conversation.control).
session/set_modelSESSION_SET_MODELSets the model of a session (capability conversation.control).
session/clearSESSION_CLEARClears the history of a session (capability conversation.control).
session/cancelSESSION_CANCELCancels the running prompt of a session (capability conversation.control).
session/promptSESSION_PROMPTDelivers a user chat prompt (capability conversation.control). Every chat prompt arrives as this method.
canvas/toggleCANVAS_TOGGLEToggles the canvas (capability canvas).
canvas/clearCANVAS_CLEARClears the canvas (capability canvas).
canvas/referenceCANVAS_REFERENCECanvas method canvas/reference (capability canvas).
canvas/dimensionsCANVAS_DIMENSIONSCanvas method canvas/dimensions (capability canvas).

Structures

AgentGatewayClientOptions

TypeScript · TypeScript only

Options of the Agent Gateway client.

FieldTypeRequiredDescription
baseUrlstringyesBase URL of Agent Gateway.
identityAgentRequestIdentityyesIdentity that signs every request.
retry?BackoffPolicy | falsenoDefault retry for idempotent calls; false disables. Defaults to TRANSIENT_BACKOFF.
onRetry?(info: { method: string; path: string; attempt: number; delayMs: number; error: unknown }) => voidnoCalled 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).

FieldTypeRequiredDescription
publicKey / public_keyUint8Array / bytesyesRaw 32-byte Ed25519 public key.
privateKey / private_keyUint8Array / bytesyes32-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.

FieldTypeRequiredDescription
readonly maxAttempts / max_attemptsnumber / floatyesTotal attempts including the first one. Infinity retries until budgetMs/signal.
readonly initialDelayMs / initial_delay_msnumber / intyesDelay before the second attempt, in milliseconds.
readonly maxDelayMs / max_delay_msnumber / intyesUpper limit of a single delay, in milliseconds.
readonly factornumber / floatyesMultiplier applied to the delay after each attempt.
readonly budgetMs? / budget_msnumber / int | NonenoTotal 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.

FieldTypeRequiredDescription
relayUrlstringyesRelay URL from the canvas token.
keysAgentKeyPairyesEd25519 key pair of the harness instance.
agentId?stringnoAgent id to put into the connection query. Optional.
token?stringnoCanvas token to put into the connection query. Optional.
socketFactory?(url: string, headers: Record<string, string>) => CanvasRelaySocketnoCreates 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.

FieldTypeRequiredDescription
pathLiteral['/ws/agent']yesAlways /ws/agent.
agentIdQueryNotRequired[str]yesValue of the agentId query parameter.
tokenQueryNotRequired[str]yesValue of the token query parameter.

CentrifugeRealtimePortOptions

TypeScript · TypeScript only

Options of the Centrifuge realtime port.

FieldTypeRequiredDescription
factory?CentrifugeRealtimeFactorynoCreates 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.

FieldTypeRequiredDescription
activeRunRegistrationIdstringyesRegistration id of the run that finished.
operationIdOperationIdyesIdentifier of the operation.
requestMessageIdRuntimeControlMessageIdyesIdentifier of the message that carried the request.
conversationIdPlatformConversationIdyesIdentifier of the conversation.
historyGenerationConversationHistoryGenerationyesGeneration of the conversation history. It changes when the history is cleared.
runtimeRunIdstringyesIdentifier of the run in the harness.
terminalState"completed" | "failed" | "cancelled"yesHow the run ended: completed, failed or cancelled.
source"runtime" | "recovery"yesWho reports the end: runtime for a normal finish, recovery when it is reported during recovery.
leaseRuntimeBoundaryLeaseAuthorityyesLease 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.

FieldTypeRequiredDescription
operationIdOperationIdyesIdentifier of the operation.
requestMessageIdRuntimeControlMessageIdyesIdentifier of the message that carried the request.
conversationIdPlatformConversationIdyesIdentifier of the conversation.
historyGenerationConversationHistoryGenerationyesGeneration of the conversation history. It changes when the history is cleared.
runtimeRunIdstringyesIdentifier of the run in the harness.
leaseRuntimeBoundaryLeaseAuthorityyesLease 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.

FieldTypeRequiredDescription
grantRuntimeExecutionGrantEnvelopeyesThe execution grant.
boundaryRuntimeExecutionBoundaryAssertionyesThe 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.

FieldTypeRequiredDescription
okbooleanyestrue when the HTTP status is a success.
statusnumberyesHTTP status code of the answer.
bodystringyesRaw response body.
rpcRecord<string, unknown>yesThe response body parsed as a JSON-RPC object.

GatewayBridgeConfig

TypeScript · TypeScript only

Terminal bridge location returned by Agent Gateway.

FieldTypeRequiredDescription
urlstringyesURL of the terminal bridge.
region?stringnoRegion of the bridge, when Agent Gateway reports one.

GatewayCanvasToken

TypeScript · TypeScript only

Canvas token and the relay it belongs to.

FieldTypeRequiredDescription
tokenstringyesThe canvas token.
relayUrlstringyesURL of the canvas relay.
expiresAtnumberyesExpiry time of the token, as a Unix timestamp.

GatewayFileRef

TypeScript · TypeScript only

Reference to a file that is attached to an agent.

FieldTypeRequiredDescription
fileIdstringyesIdentifier of the file.
fileNamestringyesName of the file.
mimeType?stringnoMIME type of the file.
size?numbernoSize in bytes.
source?stringnoWhere the file comes from.

GatewayFileResolve

TypeScript · TypeScript only

Details of a file, as returned when a file id is resolved.

FieldTypeRequiredDescription
fileId?stringnoIdentifier of the file.
fileName?stringnoName of the file.
mimeType?stringnoMIME type of the file.
size?numbernoSize in bytes.
downloadUrl?stringnoURL that the file can be downloaded from.
[key: string]unknownyesFurther fields that Agent Gateway returns.

GatewayPresign

TypeScript · TypeScript only

Upload location for a new file.

FieldTypeRequiredDescription
fileIdstringyesIdentifier of the new file. Pass it to the confirm call after the upload.
uploadUrlstringyesURL 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">

FieldTypeRequiredDescription
body?string | Uint8ArraynoRequest body.
retry?BackoffPolicy | falsenoOverrides the client default; false disables retries for this call.
idempotent?booleannoAllows retries of a non-GET call that Agent Gateway deduplicates.

GatewayUploadedFile

TypeScript · TypeScript only

Result of a completed file upload.

FieldTypeRequiredDescription
fileIdstringyesIdentifier of the file.
uristringyesURI of the uploaded file.
fileNamestringyesName of the file.
mimeTypestringyesMIME 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
1null
2boolean
3number
4string
5JsonValue[]
6{ [key: string]: JsonValue }

Alternatives 6

FieldTypeRequiredDescription
[key: string]JsonValueyesValues 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.

FieldTypeRequiredDescription
runtimeRegisterRecord<never, never>yesPath parameters of runtimeRegister: none.
runtimeHeartbeat{ registrationId: string }yesPath parameters of runtimeHeartbeat: registrationId.
runtimeRealtimeTokenCreateRecord<never, never>yesPath parameters of runtimeRealtimeTokenCreate: none.
runtimeConversationSyncRecord<never, never>yesPath parameters of runtimeConversationSync: none.
runtimeConversationMessagesList{ conversationId: string }yesPath parameters of runtimeConversationMessagesList: conversationId.
runtimeConversationMessageCreate{ conversationId: string }yesPath parameters of runtimeConversationMessageCreate: conversationId.
runtimeConversationMessageGet{ conversationId: string; messageId: string }yesPath parameters of runtimeConversationMessageGet: conversationId, messageId.
runtimeConversationMessagePatch{ conversationId: string; messageId: string }yesPath parameters of runtimeConversationMessagePatch: conversationId, messageId.
runtimeConversationRunStart{ conversationId: string }yesPath parameters of runtimeConversationRunStart: conversationId.
runtimeConversationRunFinish{ conversationId: string }yesPath parameters of runtimeConversationRunFinish: conversationId.
runtimeDeliveriesReadRecord<never, never>yesPath parameters of runtimeDeliveriesRead: none.
runtimeDeliveriesRenewRecord<never, never>yesPath parameters of runtimeDeliveriesRenew: none.
runtimeDeliveriesAckRecord<never, never>yesPath parameters of runtimeDeliveriesAck: none.
runtimeOperationHistoryGet{ operationId: string }yesPath parameters of runtimeOperationHistoryGet: operationId.
runtimeOperationMessageAppend{ operationId: string }yesPath parameters of runtimeOperationMessageAppend: operationId.
conversationMessagesList{ conversationId: string }yesPath parameters of conversationMessagesList: conversationId.
conversationMessageSend{ conversationId: string }yesPath parameters of conversationMessageSend: conversationId.
agentGet{ agentId: string }yesPath parameters of agentGet: agentId.
agentUpdate{ agentId: string }yesPath parameters of agentUpdate: agentId.
agentSyncRecord<never, never>yesPath parameters of agentSync: none.
agentFilesListRecord<never, never>yesPath parameters of agentFilesList: none.
agentFilePresignRecord<never, never>yesPath parameters of agentFilePresign: none.
agentFileConfirmRecord<never, never>yesPath parameters of agentFileConfirm: none.
agentFileResolve{ fileId: string }yesPath parameters of agentFileResolve: fileId.
canvasTokenCreateRecord<never, never>yesPath parameters of canvasTokenCreate: none.
a2aDiscoverRecord<never, never>yesPath parameters of a2aDiscover: none.
a2aJsonRpc{ agentId: string }yesPath parameters of a2aJsonRpc: agentId.
a2aTaskGet{ taskId: string }yesPath parameters of a2aTaskGet: taskId.
messagingTokenCreateRecord<never, never>yesPath parameters of messagingTokenCreate: none.
runtimeHistoryBoundaryPrepare{ conversationId: string }yesPath parameters of runtimeHistoryBoundaryPrepare: conversationId.
runtimeHistoryBoundaryResetting{ conversationId: string }yesPath parameters of runtimeHistoryBoundaryResetting: conversationId.
runtimeHistoryBoundaryResetDone{ conversationId: string }yesPath parameters of runtimeHistoryBoundaryResetDone: conversationId.
runtimeHistoryBoundaryCommit{ conversationId: string }yesPath parameters of runtimeHistoryBoundaryCommit: conversationId.
runtimeHistoryBoundaryAbort{ conversationId: string }yesPath parameters of runtimeHistoryBoundaryAbort: conversationId.
runtimeHistoryBoundaryReconcile{ conversationId: string }yesPath parameters of runtimeHistoryBoundaryReconcile: conversationId.
runtimeConversationMetadataModel{ conversationId: string }yesPath parameters of runtimeConversationMetadataModel: conversationId.
runtimeConversationCronDelivery{ conversationId: string }yesPath parameters of runtimeConversationCronDelivery: conversationId.
runtimeClaimNextRecord<never, never>yesPath parameters of runtimeClaimNext: none.
runtimeClaimExact{ operationId: string }yesPath parameters of runtimeClaimExact: operationId.
runtimeClaimRenew{ operationId: string }yesPath parameters of runtimeClaimRenew: operationId.
runtimeClaimRelease{ operationId: string }yesPath parameters of runtimeClaimRelease: operationId.
runtimeResourceRedeem{ operationId: string; kind: string; resourceRef: string }yesPath parameters of runtimeResourceRedeem: operationId, kind, resourceRef.
runtimeOutputFilePresign{ operationId: string }yesPath parameters of runtimeOutputFilePresign: operationId.
runtimeOutputFileConfirm{ operationId: string }yesPath parameters of runtimeOutputFileConfirm: operationId.
runtimeInputFilesResolve{ operationId: string }yesPath parameters of runtimeInputFilesResolve: operationId.
agentTemplateOriginReport{ agentId: string }yesPath parameters of agentTemplateOriginReport: agentId.
channelCreateRecord<never, never>yesPath parameters of channelCreate: none.
a2aTaskComplete{ taskId: string }yesPath parameters of a2aTaskComplete: taskId.
agentEventPublishRecord<never, never>yesPath parameters of agentEventPublish: none.
bridgeConfigGetRecord<never, never>yesPath parameters of bridgeConfigGet: none.
agentConnectorMcpRecord<never, never>yesPath parameters of agentConnectorMcp: none.
automationListRecord<never, never>yesPath parameters of automationList: none.
automationCreateRecord<never, never>yesPath parameters of automationCreate: none.
automationWebhookCreateRecord<never, never>yesPath parameters of automationWebhookCreate: none.
automationGet{ automationId: string }yesPath parameters of automationGet: automationId.
automationRunsList{ automationId: string }yesPath parameters of automationRunsList: automationId.
automationRunCreate{ automationId: string }yesPath parameters of automationRunCreate: automationId.
automationRunGet{ automationId: string; runId: string }yesPath 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.

FieldTypeRequiredDescription
policyBackoffPolicyyesBackoff schedule to use.
isRetryable?(error: unknown) => booleannoDecides whether an error is worth retrying. Defaults to retrying every error.
signal?AbortSignalnoAborts the waiting and stops retrying.
onRetry?(info: { attempt: number; delayMs: number; error: unknown }) => voidnoCalled before each retry with the attempt number, the delay in milliseconds and the error.
sleep?(ms: number, signal?: AbortSignal) => Promise<void>noWaits for the given milliseconds. Replace it in tests.
now?() => numbernoClock 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.

FieldTypeRequiredDescription
instanceId / instance_idstring / stryesIdentifier of the Cloud instance that the harness is registered to.
leaseId / lease_idstring / stryesIdentifier of the runtime lease.
runtimeEpoch / runtime_epoch${bigint} / stryesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
runtimeLeaseCredential / runtime_lease_credentialstring / stryesCredential 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_atstring / stryesWhen the lease expires, as an RFC 3339 timestamp.
heartbeat_interval_msintnoInterval at which the lease must be renewed, in milliseconds.
registration_idstrnoIdentifier of the registration.
handler_identitystrnoIdentity 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.

FieldTypeRequiredDescription
leaseIdstringyesIdentifier of the runtime lease.
handlerIdentitystringyesIdentity of the handler, the harness process that registered and holds the lease.
runtimeEpochRuntimeEpochyesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
runtimeLeaseCredentialstringyesCredential 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.

FieldTypeRequiredDescription
authorityRuntimeChatAuthorityPortyesSupplies the current lease.
httpRuntimeChatHttpPortyesHTTP port used for chat calls.
realtimeRuntimeChatRealtimePortyesRealtime port used to receive new messages.
now?() => numbernoClock in milliseconds; replace it in tests. Defaults to Date.now.
reconnectDelayMs?(attempt: number) => numbernoBounded reconnect backoff; attempt is 1-based.
logger?RuntimeChatLoggernoReceives log messages. Optional.

RuntimeChatHistoryInput

TypeScript · TypeScript only

Paging options for reading conversation history.

FieldTypeRequiredDescription
cursor?stringnoCursor returned by the previous page.
limit?numbernoMaximum number of items to return.

RuntimeChatHistoryMessage

TypeScript · TypeScript only

One message in a history page.

Extends: RuntimeChatMessage

FieldTypeRequiredDescription
offset?stringnoPosition of the message in the conversation, as a decimal string.
historyGeneration?stringnoHistory generation that the message belongs to.
state?stringnoState of the message, for example streaming or completed.
stopReason?stringnoWhy the message stopped.
body?stringnoText of the message.
parts?readonly unknown[]noStructured parts of the message.

RuntimeChatHistoryPage

TypeScript · TypeScript only

One page of conversation history.

FieldTypeRequiredDescription
messagesRuntimeChatHistoryMessage[]yesMessages of the page.
nextCursor?stringnoCursor of the next page. Absent on the last page.
hasMorebooleanyestrue when there are further pages.
latestOffsetstringyesOffset of the newest message in the conversation.
historyGenerationstringyesCurrent generation of the history.
historyBoundaryOffsetstringyesOffset where the current history generation starts.

RuntimeChatHttpPortOptions

TypeScript · TypeScript only

Options of the HTTP port used by the chat client.

FieldTypeRequiredDescription
baseUrlstringyesMessage Service origin, e.g. https://message.example.
fetchImpl?typeof fetchnoFunction used for HTTP calls. Defaults to the global fetch.
now?() => numbernoClock in milliseconds; replace it in tests. Defaults to Date.now.

RuntimeChatLease

TypeScript · TypeScript only

Lease details that the chat client needs.

FieldTypeRequiredDescription
instanceIdstringyesIdentifier of the Cloud instance that the harness is registered to.
handlerIdentitystringyesIdentity of the handler, the harness process that registered and holds the lease.
runtimeEpochstringyesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
leaseIdstringyesIdentifier of the runtime lease.
runtimeLeaseCredentialstringyesCredential 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.
leaseExpiresAtstringyesWhen the lease expires, as an RFC 3339 timestamp.

RuntimeChatLogger

TypeScript · TypeScript only

Logger of the chat client. Every method is optional.

FieldTypeRequiredDescription
debug?(...args: unknown[]) => voidnoReceives debug messages.
info?(...args: unknown[]) => voidnoReceives informational messages.
warn?(...args: unknown[]) => voidnoReceives warnings.
error?(...args: unknown[]) => voidnoReceives errors.

RuntimeChatMessage

TypeScript · TypeScript only

A conversation message.

FieldTypeRequiredDescription
idstringyesIdentifier of the message.
conversationIdstringyesIdentifier of the conversation.
typestringyesType of the message, for example agent_reply.
contentunknownyesContent of the message.
senderId?stringnoIdentifier of the sender.
replyTo?stringnoIdentifier of the message that this one replies to.
createdAt?stringnoWhen the message was created.
[key: string]unknownyesFurther fields that Cloud returns.

RuntimeChatPreparedClearProof

TypeScript · TypeScript only

Proof that a history clear was prepared. It is checked before a retained reply is changed.

FieldTypeRequiredDescription
clearIntentIdstringyesIdentifier of the clear intent.
activeRunRegistrationIdstringyesRegistration id of the active run.
historyGeneration${bigint}yesGeneration of the conversation history. It changes when the history is cleared.
runtimeEpoch${bigint}yesEpoch 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.

FieldTypeRequiredDescription
conversationIdstringyesIdentifier of the conversation.
messageIdstringyesIdentifier of the reply message.
taskRequestMessageIdstringyesOriginal task request, distinct from the operation RPC request message.
assertAttempt() => voidyesSupplied by the trusted journal owner, never inferred from prompt content.
mutationKey(sequence: number) => stringyesStable idempotency key from the owning attempt for each serialized mutation.
assertPreparedClear?(proof: RuntimeChatPreparedClearProof) => voidnoCalled with the proof of a prepared clear; throw to refuse the change.

RuntimeChatRetainedSnapshot

TypeScript · TypeScript only

Stored copy of a reply message.

FieldTypeRequiredDescription
rawTextstringyesRaw JSON text of the message as it was read.
messageIdstringyesIdentifier of the message.
conversationIdstringyesIdentifier of the conversation.
typestringyesType of the message.
senderstringyesIdentifier of the sender.
createdAtstringyesWhen the message was created.
updatedAt?stringnoWhen the message was last updated.
replyTo?stringnoIdentifier of the message that this one replies to.
bodystringyesText of the message.
statestringyesState of the message: streaming, completed, failed, refused or cancelled.
stopReason?stringnoWhy the message stopped.

RuntimeChatSendInput

TypeScript · TypeScript only

Input for sending a message.

FieldTypeRequiredDescription
conversationIdstringyesIdentifier of the conversation.
id?stringnoIdentifier for the new message. Cloud generates one when omitted.
typestringyesType of the message, for example agent_reply.
contentunknownyesContent of the message.
replyTo?stringnoIdentifier of the message that this one replies to.

RuntimeClaimExactRequest

TypeScript · TypeScript only

Request to claim one specific operation.

Extends: RuntimeClaimNextRequest

FieldTypeRequiredDescription
operationIdstringyesIdentifier of the operation.
requestMessageIdstringyesIdentifier of the message that carried the request.
dispatchEpochstringyesEpoch at which Cloud dispatched the operation.

RuntimeClaimFence

TypeScript · TypeScript only

Fence of a claim: it proves that the harness still owns the operation.

FieldTypeRequiredDescription
claimIdstringyesIdentifier of the claim.
handlerIdentitystringyesIdentity of the handler, the harness process that registered and holds the lease.
runtimeEpochstringyesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
fencingTokenstringyesFencing token of the claim, as a decimal string. A lower token than the current one is stale.
journalStoreIdstringyesIdentifier of the durable journal store of the harness.
journalGenerationstringyesGeneration of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes.
operationIdstringyesIdentifier of the operation.
requestMessageIdstringyesIdentifier of the message that carried the request.
runtimeLeaseCredentialstringyesCredential 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.

FieldTypeRequiredDescription
claimRequestIdstringyesIdentifier of this claim request, for deduplication.
instanceIdstringyesIdentifier of the Cloud instance that the harness is registered to.
handlerIdentitystringyesIdentity of the handler, the harness process that registered and holds the lease.
runtimeEpochstringyesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
journalStoreIdstringyesIdentifier of the durable journal store of the harness.
journalGenerationstringyesGeneration of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes.
runtimeLeaseCredentialstringyesCredential 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

FieldTypeRequiredDescription
reason"completed" | "cancelled" | "worker_shutdown" | "claim_rejected"yesWhy 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.

FieldTypeRequiredDescription
schemaVersionLiteral[1]yesVersion of the request schema. Always 1.
operationIdstryesIdentifier of the operation.
runtimeSessionIdstryesIdentifier of the session in the harness.
runtimeSessionKeyNotRequired[str]yesKey of the session in the harness.
titleNotRequired[str]yesTitle of the conversation.

RuntimeDeliveriesReadRequest

Python · Python only

Request to read pending deliveries.

FieldTypeRequiredDescription
schemaVersionLiteral[1]yesVersion of the request schema. Always 1.
maxCountintyesMaximum number of deliveries to return.
blockMsintyesHow 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

FieldTypeRequiredDescription
readonly outcome"created" | "duplicate" | "reconciled"yescreated for a new message, duplicate when it was already stored, reconciled when an earlier uncertain append was resolved.
readonly message?JsonValuenoThe stored message.
readonly history?JsonValuenoThe history of the operation, when Cloud returns it.

Alternatives 2

FieldTypeRequiredDescription
readonly outcome"outcome_unknown"yesoutcome_unknown: the append may or may not have been stored.
readonly history?JsonValuenoThe history of the operation, when Cloud returns it.

RuntimeDeliveryAuthorityLease

TypeScript · TypeScript only

Lease credential that the delivery port needs.

Extends: RuntimeDeliveryLease

FieldTypeRequiredDescription
readonly runtimeLeaseCredentialstringyesCredential 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.

FieldTypeRequiredDescription
readonly onDelivery(delivery: RuntimeMethodDelivery, context: { readonly lease: RuntimeDeliveryLease; readonly signal: AbortSignal }) => Promise<void>yesHandles one delivery. The delivery is acknowledged when the handler returns and left for redelivery when it throws.
readonly onError?(error: unknown) => voidnoCalled with errors that the loop handles itself.
readonly onLeaseStarvation?(input: { readonly starvedForMs: number; readonly recovered: boolean }) => voidnoCalled when no valid lease has been available for a while.
readonly readCount?numbernoMaximum number of deliveries to read at once.
readonly blockMs?numbernoHow long one read waits for a delivery, in milliseconds.
readonly idleDelayMs?numbernoPause before reading again when nothing was delivered, in milliseconds.
readonly renewIntervalMs?numbernoHow 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

FieldTypeRequiredDescription
readonly status"not_found" | "expired"yesnot_found when the operation is unknown, expired when its history is no longer kept.

Alternatives 2

FieldTypeRequiredDescription
readonly status"found"yesfound: the history is in snapshot.
readonly snapshotJsonValueyesThe stored history.

RuntimeDeliveryIdsRequest

Python · Python only

Request that names deliveries by id.

FieldTypeRequiredDescription
schemaVersionLiteral[1]yesVersion of the request schema. Always 1.
deliveryIdslist[str]yesIdentifiers of the deliveries.

RuntimeDeliveryLease

TypeScript · TypeScript only

Lease that a delivery is handled under, including the journal it belongs to.

FieldTypeRequiredDescription
readonly instanceIdstringyesIdentifier of the Cloud instance that the harness is registered to.
readonly handlerIdentitystringyesIdentity of the handler, the harness process that registered and holds the lease.
readonly runtimeEpochstringyesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
readonly leaseIdstringyesIdentifier of the runtime lease.
readonly leaseExpiresAtstringyesWhen the lease expires, as an RFC 3339 timestamp.
readonly journalStoreIdstringyesIdentifier of the durable journal store of the harness.
readonly journalGenerationstringyesGeneration 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.

FieldTypeRequiredDescription
issstringyesIssuer of the token (JWT iss).
audtypeof RUNTIME_EXECUTION_BOUNDARY_AUDIENCEyesAudience of the token (JWT aud).
substringyesSubject of the token (JWT sub).
jtistringyesUnique id of the token (JWT jti).
iatnumberyesIssue time as Unix seconds (JWT iat).
expnumberyesExpiry time as Unix seconds (JWT exp).
executionMode"start" | "resume"yesstart for a new execution, resume for the continuation of an earlier one.
executionBoundaryIdstringyesIdentifier of the execution boundary.
predecessorExecutionBoundaryId?stringnoBoundary id of the execution that this one continues. Absent for start, required for resume, and signed into the assertion.
handoffId?stringnoIdentifier of the handoff, for a resumed execution.
operationIdOperationIdyesIdentifier of the operation.
requestMessageIdRuntimeControlMessageIdyesIdentifier of the message that carried the request.
commandHashSha256HexDigestyesSHA-256 digest of the command, as 64 lowercase hex characters.
executionGrantHashSha256HexDigestyesSHA-256 digest of the execution grant, as 64 lowercase hex characters.
claimIdstringyesIdentifier of the claim.
handlerIdentitystringyesIdentity of the handler, the harness process that registered and holds the lease.
runtimeEpochRuntimeEpochyesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
fencingTokenRuntimeFencingTokenyesFencing token of the claim, as a decimal string. A lower token than the current one is stale.
journalStoreIdstringyesIdentifier of the durable journal store of the harness.
journalGenerationRuntimeRevisionyesGeneration of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes.
journalRevisionBeforeAttemptRuntimeRevisionyesRevision of the journal before this attempt began.
preparedEntryHashSha256HexDigestyesSHA-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">

FieldTypeRequiredDescription
targetInstanceId?stringnoCloud instance that the registration must belong to.
leaseIdstringyesIdentifier of the runtime lease.
handlerIdentitystringyesIdentity of the handler, the harness process that registered and holds the lease.
runtimeEpochRuntimeEpochyesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
msConnectionStatus?MSConnectionStatusnoState 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

FieldTypeRequiredDescription
status"renewed"yesrenewed: the lease continues.
leaseExpiresAtRFC3339TimestampyesNew expiry time of the lease.
runtimeLeaseCredentialstringyesCredential for the renewed lease. Use it from now on.

Alternatives 2

FieldTypeRequiredDescription
status"fenced"yesfenced: another registration is active.
activeRuntimeEpochRuntimeEpochyesEpoch of the registration that is active now.

Alternatives 3

FieldTypeRequiredDescription
status"expired"yesexpired: 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.

FieldTypeRequiredDescription
signaturePurposeTPurposeyesWhat the signature is for: the registration or the heartbeat proof domain.
instanceIdentityKeyIdRuntimeIdentityKeyIdyesIdentifier of the key that signed.
nonceBase64UrlyesSingle-use random value.
signedAtRFC3339TimestampyesWhen the proof was signed, as an RFC 3339 timestamp.
payloadHashSha256HexDigestyesSHA-256 digest of the signed payload, as 64 lowercase hex characters.
signatureBase64UrlyesEd25519 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

FieldTypeRequiredDescription
scope"instance"yesinstance: the whole instance.
platformAgentId?nevernoNot allowed for this scope; it must be absent.
runtimeAgentUid?stringnoIdentifier of the agent inside the harness.
runtimeLocalKey?nevernoNot allowed for this scope; it must be absent.
platformConversationId?nevernoNot allowed for this scope; it must be absent.
runtimeConversationUid?nevernoNot allowed for this scope; it must be absent.
runtimeSessionKey?nevernoNot allowed for this scope; it must be absent.

Alternatives 2

FieldTypeRequiredDescription
scope"agent"yesagent: one agent.
platformAgentIdPlatformAgentIdyesIdentifier of the agent in Cloud.
runtimeAgentUidstringyesIdentifier of the agent inside the harness.
runtimeLocalKeystringyesLocal key of the agent inside the harness.
platformConversationId?nevernoNot allowed for this scope; it must be absent.
runtimeConversationUid?nevernoNot allowed for this scope; it must be absent.
runtimeSessionKey?nevernoNot allowed for this scope; it must be absent.

Alternatives 3

FieldTypeRequiredDescription
scope"conversation"yesconversation: one conversation of an agent.
platformAgentIdPlatformAgentIdyesIdentifier of the agent in Cloud.
runtimeAgentUidstringyesIdentifier of the agent inside the harness.
runtimeLocalKey?nevernoNot allowed for this scope; it must be absent.
platformConversationIdPlatformConversationIdyesIdentifier of the conversation in Cloud.
runtimeConversationUidstringyesIdentifier of the conversation inside the harness.
runtimeSessionKeystringyesKey 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.

FieldTypeRequiredDescription
claimIdstringyesIdentifier of the claim.
handlerIdentitystringyesIdentity of the handler, the harness process that registered and holds the lease.
runtimeEpochRuntimeEpochyesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
fencingTokenRuntimeFencingTokenyesFencing token of the claim, as a decimal string. A lower token than the current one is stale.
journalStoreIdstringyesIdentifier of the journal store that the claim was first made against. It does not change afterwards.
journalGenerationRuntimeRevisionyesGeneration 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
1ServiceRuntimeMethod
2InstanceRuntimeInvocationMethod
3ConversationRuntimeInvocationMethod
4InternalRuntimeInvocationMethod

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.

FieldTypeRequiredDescription
sourceUrlstringyesURL that the document was loaded from.
etagstringyesETag of the response.
issuerstringyesIssuer that the document declares.
audiencestringyesAudience that the document declares.
purposestringyesPurpose that the document declares.
maxClaimTtlSecondsnumberyesLongest 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.

FieldTypeRequiredDescription
jwkThumbprintstringyesSHA-256 thumbprint of the public key in JWK form.
spkiSha256stringyesSHA-256 digest of the public key in SPKI DER form, as hex.

RuntimeLeaseCredential

TypeScript and Python

A lease credential on its own.

FieldTypeRequiredDescription
runtimeLeaseCredential / runtime_lease_credentialstring / stryesCredential 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_grantstring / str | NonenoExecution grant for the operation, when the route requires one. Sent as X-BeeOS-Execution-Grant.
scopedDeliveryKey? / scoped_delivery_keystring / str | NonenoDelivery 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.

FieldTypeRequiredDescription
originstringyesFixed origin that the lease may be sent to (Message Service or Agent Gateway).
retry?BackoffPolicy | falsenoPer-call retry. Defaults to none because the outcome of an append or acknowledge can be ambiguous.
fetch?typeof fetchnoFunction used for HTTP calls. Defaults to the global fetch.

RuntimeMessagePatch

Python · Python only

Change to a message that is being streamed.

FieldTypeRequiredDescription
bodyNotRequired[str]yesReplaces the whole text.
body_appendNotRequired[str]yesText to append.
body_fromNotRequired[int]yesPosition in the text from which body_append applies.
partsNotRequired[list[JsonObject]]yesReplaces the structured parts.
stateNotRequired[str]yesNew state: streaming, completed, failed, refused or cancelled.
stop_reasonNotRequired[str]yesWhy the message stopped.

RuntimeMethodDelivery

TypeScript and Python

One runtime-method delivery read from Cloud.

FieldTypeRequiredDescription
readonly deliveryId / delivery_idstring / stryesIdentifier of the delivery. Use it to renew and acknowledge.
readonly redeliveredboolean / boolyestrue when this delivery was handed out before.
readonly idleMs / idle_msnumber / intyesHow long the delivery waited before it was read, in milliseconds.
readonly messageJsonValue / AnyyesThe message of the delivery.
readonly executionGrant? / execution_grantstring / str | NonenoExecution grant of the operation, when there is one.

RuntimeNativeConversationSyncRequest

TypeScript · TypeScript only

Request that creates or updates the conversation of a native session.

FieldTypeRequiredDescription
schemaVersion1yesVersion of the request schema. Always 1.
operationIdstringyesIdentifier of the operation.
runtimeSessionIdstringyesIdentifier of the session in the harness.
runtimeSessionKey?stringnoKey of the session in the harness.
title?stringnoTitle of the conversation.

RuntimeNativeConversationSyncResponse

TypeScript · TypeScript only

The conversation that Cloud returns for a sync.

FieldTypeRequiredDescription
idstringyesIdentifier of the conversation.
participantsreadonly string[]yesIdentifiers of the participants.
metadata?Readonly<Record<string, string>>noMetadata of the conversation.
owner_identity_id?stringnoIdentity that owns the conversation.
target_identity_id?stringnoIdentity of the agent that the conversation is with.
target_kind?stringnoKind of the target.
title?stringnoTitle of the conversation.
metadata_versionnumberyesVersion of the metadata; it grows with every change.
history_generationnumberyesGeneration of the conversation history.
last_activity_at?stringnoWhen the conversation was last active.
state"open" | "closed"yesopen or closed.
closed_reason?stringnoWhy the conversation was closed.
single_shot?booleannotrue for a conversation that takes one prompt only.
deadline_at?stringnoDeadline of the conversation.
created_atstringyesWhen the conversation was created.
closed_at?stringnoWhen the conversation was closed.

RuntimeOperationAppendRequest

Python · Python only

Request that appends a message to an operation.

FieldTypeRequiredDescription
schemaVersionLiteral[1]yesVersion of the request schema. Always 1.
typestryesType of the message.
payloadAnyyesContent of the message.

RuntimeRealtimeToken

TypeScript and Python

Realtime connection token and where to use it.

FieldTypeRequiredDescription
tokenstring / stryesThe connection token.
centrifugoUrl / centrifugo_urlstring / stryesURL of the realtime service.
channelsreadonly string[] / tuple[str, ...]yesChannels that the token allows.
principalId / principal_idstring / stryesIdentifier of the principal that the token was issued to.
expiresAt / expires_atnumber / intyesExpiry 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.

FieldTypeRequiredDescription
status"active"yesactive.
instanceIdPlatformInstanceIdyesIdentifier of the Cloud instance that the harness is registered to.
runtimeEpochRuntimeEpochyesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
journalStoreIdstringyesIdentifier of the durable journal store of the harness.
journalGenerationRuntimeRevisionyesGeneration of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes.
leaseIdstringyesIdentifier of the runtime lease.
issuedAtRFC3339TimestampyesWhen the lease was issued, as an RFC 3339 timestamp.
leaseExpiresAtRFC3339TimestampyesWhen the lease expires, as an RFC 3339 timestamp.
heartbeatIntervalMstypeof RUNTIME_LEASE_HEARTBEAT_INTERVAL_MSyesInterval at which the lease must be renewed, in milliseconds.
runtimeLeaseCredentialstringyesCredential 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

FieldTypeRequiredDescription
handlerIdentitystringyesIdentity 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.

FieldTypeRequiredDescription
registrationIdstringyesIdentifier of the registration.
handlerIdentitystringyesIdentity of the handler, the harness process that registered and holds the lease.
contractRevisionstringyesRevision of the runtime contract that the harness implements.
runtimeMethodsreadonly RuntimeInvocationMethod[]yesRuntime methods that the harness can handle.
capabilitiesreadonly RuntimeCapability[]yesCapabilities that the harness provides.
manifestDigestRuntimeRegistrationHashPayload["manifestDigest"]yesDigest of the harness manifest.
journalStoreIdstringyesIdentifier of the durable journal store of the harness.
journalGeneration${bigint}yesGeneration of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes.
instanceIdentityKeyIdstringyesIdentifier of the instance identity key that signs the proofs.
targetInstanceId?stringnoCloud instance that the registration must belong to.
signIdentityProof(message: Uint8Array) => Uint8ArrayyesKey custody stays with the host; sign the canonical Ed25519 proof bytes.
fencedRetry?BackoffPolicy | falsenoA 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) => MSConnectionStatusnoReturns 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.

FieldTypeRequiredDescription
status"fenced"yesfenced.
activationIdstringyesIdentifier of the pending activation.
runtimeEpochRuntimeEpochyesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
activeRuntimeEpochRuntimeEpochyesEpoch 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.

FieldTypeRequiredDescription
registration_idstryesIdentifier of the registration.
handler_identitystryesIdentity of the handler.
journal_store_idstryesIdentifier of the journal store.
journal_generationstryesGeneration 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.

FieldTypeRequiredDescription
status"pending_activation"yespending_activation.
activationIdstringyesIdentifier of the pending activation.
runtimeEpochRuntimeEpochyesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
journalStoreIdstringyesIdentifier of the durable journal store of the harness.
journalGenerationRuntimeRevisionyesGeneration of the journal store. It is advanced by one when the previous lease has expired or the registration lineage changes.
retryAfterMsnumberyesHow long to wait before registering again, in milliseconds.

RuntimeRegistrationRequest

TypeScript · TypeScript only · Source: @beeos-ai/beeos-types

Signed registration request.

Extends: RuntimeIdentityProof<"runtime.register">

FieldTypeRequiredDescription
targetInstanceId?stringnoCloud instance that the registration must belong to.
registrationIdstringyesIdentifier of the registration.
handlerIdentitystringyesIdentity of the handler, the harness process that registered and holds the lease.
contractRevisionstringyesRevision of the runtime contract that the harness implements.
manifestDigestSha256HexDigestyesDigest of the harness manifest.
runtimeRpcProtocolVersiontypeof RUNTIME_RPC_PROTOCOL_VERSIONyesVersion of the runtime RPC protocol that the harness speaks.
runtimeMethodsreadonly RuntimeInvocationMethod[]yesRuntime methods that the harness can handle.
capabilitiesreadonly RuntimeCapability[]yesCapabilities that the harness provides.
journalStoreIdstringyesIdentifier of the durable journal store of the harness.
journalGenerationRuntimeRevisionyesGeneration 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
1RuntimeRegistrationPendingResult
2RuntimeRegistrationActiveResult
3RuntimeRegistrationFencedResult

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.

FieldTypeRequiredDescription
type'agent_auth' / Literal['agent_auth']yesAlways agent_auth.
instance_idstring / stryesIdentifier of the Cloud instance.
service'terminal' / Literal['terminal']yesAlways terminal.
public_keystring / stryesStandard base64 Ed25519 public key.
timestampnumber / intyesUnix time in seconds.
noncestring / stryesSingle-use random value.
signaturestring / stryesStandard base64 Ed25519 signature.
runtimeLeaseCredentialstring / stryesCredential 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.
handlerIdentitystring / stryesIdentity of the handler, the harness process that registered and holds the lease.
runtimeEpochstring / stryesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
leaseIdstring / stryesIdentifier of the runtime lease.

TerminalAuthLease

TypeScript and Python

Lease details that go into the terminal authentication frame.

FieldTypeRequiredDescription
instanceId / instance_idstring / stryesIdentifier of the Cloud instance that the harness is registered to.
leaseId / lease_idstring / stryesIdentifier of the runtime lease.
runtimeEpoch / runtime_epochstring / stryesEpoch of the runtime registration, as a decimal string. A registration with a lower epoch than the active one is fenced.
runtimeLeaseCredential / runtime_lease_credentialstring / stryesCredential 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_identitystring / stryesIdentity of the handler, the harness process that registered and holds the lease.

TerminalBridgeClientOptions

TypeScript · TypeScript only

Options of the terminal bridge client.

FieldTypeRequiredDescription
bridgeUrlstringyesURL of the terminal bridge.
keysAgentKeyPairyesEd25519 key pair of the harness instance.
leaseTerminalAuthLeaseyesLease that authenticates the harness.
now?() => numbernoClock in milliseconds; replace it in tests. Defaults to Date.now.
nonce?() => stringnoNonce generator. Replace it in tests.
authTimeoutMs?numbernoHow long to wait for auth_ok, in milliseconds. Defaults to 10000.
socketFactory?(url: string) => TerminalSocketnoCreates 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.

FieldTypeRequiredDescription
headerCoreExecutionAuthorization["boundary"]["header"]yesJWT header of the assertion.
claimsRuntimeExecutionBoundaryAssertionClaimsyesClaims of the assertion.
compactHashSha256HexDigestyesSHA-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.

FieldTypeRequiredDescription
headerCoreExecutionAuthorization["grant"]["header"]yesJWT header of the grant.
claimsAnyRuntimeExecutionGrantClaimsyesClaims of the grant.
compactHashSha256HexDigestyesSHA-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:

  • ConversationRuntimeExecutionGrantClaims
  • ConversationRuntimeInvocationMethod
  • ConversationRuntimeInvocationResultMap
  • InstanceRuntimeExecutionGrantClaims
  • InstanceRuntimeInvocationMethod
  • InstanceRuntimeInvocationResultMap
  • InternalRuntimeInvocationMethod
  • RuntimeExecutionBoundaryAssertion
  • RuntimeExecutionGrantClaims
  • RuntimeExecutionGrantEnvelope
  • RuntimeIdentityKeyId
  • RuntimeInvocationValidationContextBase
  • ServiceRuntimeMethod