openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
2,822 lines • 125 kB
TypeScript
import "./logs-chat-BF3au30o.js";
import "./approvals-CiGTrkJW.js";
import "./skill-library-DVzEZ7Hi.js";
import "./environments-DPYdVpOD.js";
import "./nodes-Bibk7CGC.js";
import { Static, TSchema, Type } from "typebox";
//#region packages/gateway-protocol/src/schema/session-participant.d.ts
/** Product identity, independent of display metadata and authorization. */
declare const SessionParticipantIdentitySchema: Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>;
declare const SessionParticipantSchema: Type.TObject<{
identity: Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>;
label: Type.TOptional<Type.TString>;
avatarUrl: Type.TOptional<Type.TString>;
}>;
type SessionParticipantIdentity = Static<typeof SessionParticipantIdentitySchema>;
type SessionParticipant = Static<typeof SessionParticipantSchema>;
//#endregion
//#region packages/gateway-protocol/src/gateway-error-details.d.ts
/** Gateway JSON-RPC style error codes shared by clients and server handlers. */
declare const ErrorCodes: {
/** @deprecated Retained for source compatibility; no current server emitter. */
readonly NOT_LINKED: "NOT_LINKED";
/** Device exists but still needs an explicit pairing approval. */
readonly NOT_PAIRED: "NOT_PAIRED";
/** @deprecated Retained for source compatibility; no current server emitter. */
readonly AGENT_TIMEOUT: "AGENT_TIMEOUT";
/** Request payload failed protocol validation or method preconditions. */
readonly INVALID_REQUEST: "INVALID_REQUEST";
/** Authenticated caller lacks permission for the requested operation. */
readonly FORBIDDEN: "FORBIDDEN";
/** Approval resolution referenced a missing or expired approval request. */
readonly APPROVAL_NOT_FOUND: "APPROVAL_NOT_FOUND";
/** Gateway service or required backend is temporarily unavailable. */
readonly UNAVAILABLE: "UNAVAILABLE";
};
/** Closed set of canonical gateway error code strings. */
type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
//#endregion
//#region packages/gateway-protocol/src/schema/frames.d.ts
/** Initial client hello/connect payload sent before the gateway accepts frames. */
declare const ConnectParamsSchema: Type.TObject<{
minProtocol: Type.TInteger;
maxProtocol: Type.TInteger;
client: Type.TObject<{
id: Type.TEnum<["openclaw-android", "openclaw-browser-copilot", "cli", "openclaw-control-ui", "fingerprint", "gateway-client", "openclaw-ios", "openclaw-linux", "openclaw-macos", "node-host", "openclaw-probe", "test", "openclaw-tui", "openclaw-watchos", "webchat", "webchat-ui", "openclaw-worker"]>;
displayName: Type.TOptional<Type.TString>;
version: Type.TString;
buildId: Type.TOptional<Type.TString>;
platform: Type.TString;
deviceFamily: Type.TOptional<Type.TString>;
modelIdentifier: Type.TOptional<Type.TString>;
/** Self-reported IANA zone. Bounded because the longest real name is well under this cap. */
timeZone: Type.TOptional<Type.TString>;
mode: Type.TEnum<["backend", "cli", "node", "probe", "test", "ui", "webchat", "worker"]>;
instanceId: Type.TOptional<Type.TString>;
}>;
caps: Type.TOptional<Type.TArray<Type.TString>>;
commands: Type.TOptional<Type.TArray<Type.TString>>;
/** Additive Computer Use declaration; the owning core contract validates its bounded shape. */
computerUse: Type.TOptional<Type.TUnknown>;
/** @deprecated Accepted for the shipped v1 node-host envelope; current hosts use runner inventory. */
workerRuns: Type.TOptional<Type.TObject<{
bundleHash: Type.TString;
openclawVersion: Type.TString;
protocolFeatures: Type.TArray<Type.TString>;
bundlePrewarm: Type.TOptional<Type.TInteger>;
}>>;
permissions: Type.TOptional<Type.TRecord<"^.*$", Type.TBoolean>>;
pathEnv: Type.TOptional<Type.TString>;
role: Type.TOptional<Type.TString>;
scopes: Type.TOptional<Type.TArray<Type.TString>>;
device: Type.TOptional<Type.TObject<{
id: Type.TString;
publicKey: Type.TString;
signature: Type.TString;
signedAt: Type.TInteger;
nonce: Type.TString;
}>>;
auth: Type.TOptional<Type.TObject<{
token: Type.TOptional<Type.TString>;
bootstrapToken: Type.TOptional<Type.TString>;
deviceToken: Type.TOptional<Type.TString>;
password: Type.TOptional<Type.TString>;
approvalRuntimeToken: Type.TOptional<Type.TString>;
agentRuntimeIdentityToken: Type.TOptional<Type.TString>;
}>>;
locale: Type.TOptional<Type.TString>;
userAgent: Type.TOptional<Type.TString>;
}>;
/** Successful gateway hello response with the server protocol and initial state. */
declare const HelloOkSchema: Type.TObject<{
type: Type.TLiteral<"hello-ok">;
protocol: Type.TInteger;
server: Type.TObject<{
version: Type.TString;
buildId: Type.TOptional<Type.TString>;
bootId: Type.TOptional<Type.TString>;
controlUiBuildSource: Type.TOptional<Type.TUnion<[Type.TLiteral<"bundled">, Type.TLiteral<"configured">]>>;
connId: Type.TString;
}>;
features: Type.TObject<{
methods: Type.TArray<Type.TString>;
events: Type.TArray<Type.TString>;
capabilities: Type.TOptional<Type.TArray<Type.TString>>;
}>;
snapshot: Type.TObject<{
suspension: Type.TOptional<Type.TObject<{
phase: Type.TUnion<[Type.TLiteral<"accepting">, Type.TLiteral<"preparing">, Type.TLiteral<"draining">, Type.TLiteral<"prepared">]>;
}>>;
presence: Type.TArray<Type.TObject<{
host: Type.TOptional<Type.TString>;
ip: Type.TOptional<Type.TString>;
version: Type.TOptional<Type.TString>;
platform: Type.TOptional<Type.TString>;
deviceFamily: Type.TOptional<Type.TString>;
modelIdentifier: Type.TOptional<Type.TString>;
timeZone: Type.TOptional<Type.TString>;
mode: Type.TOptional<Type.TString>;
lastInputSeconds: Type.TOptional<Type.TInteger>;
reason: Type.TOptional<Type.TString>;
tags: Type.TOptional<Type.TArray<Type.TString>>;
text: Type.TOptional<Type.TString>;
ts: Type.TInteger;
onlineSince: Type.TOptional<Type.TInteger>;
lastActivityAt: Type.TOptional<Type.TInteger>;
deviceId: Type.TOptional<Type.TString>;
roles: Type.TOptional<Type.TArray<Type.TString>>;
scopes: Type.TOptional<Type.TArray<Type.TString>>;
instanceId: Type.TOptional<Type.TString>;
user: Type.TOptional<Type.TObject<{
id: Type.TString;
identity: Type.TOptional<Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>>;
email: Type.TOptional<Type.TString>;
name: Type.TOptional<Type.TString>;
avatarUrl: Type.TOptional<Type.TString>;
}>>;
watchedSessions: Type.TOptional<Type.TArray<Type.TString>>;
}>>;
health: Type.TObject<{
ok: Type.TOptional<Type.TLiteral<true>>;
ts: Type.TOptional<Type.TInteger>;
durationMs: Type.TOptional<Type.TInteger>;
eventLoop: Type.TOptional<Type.TObject<{
degraded: Type.TBoolean;
degradedSinceMs: Type.TOptional<Type.TUnion<[Type.TInteger, Type.TNull]>>;
reasons: Type.TArray<Type.TUnion<[Type.TLiteral<"event_loop_delay">, Type.TLiteral<"event_loop_utilization">, Type.TLiteral<"cpu">]>>;
intervalMs: Type.TNumber;
delayP99Ms: Type.TNumber;
delayMaxMs: Type.TNumber;
utilization: Type.TNumber;
cpuCoreRatio: Type.TNumber;
}>>;
plugins: Type.TOptional<Type.TObject<{
loaded: Type.TArray<Type.TString>;
errors: Type.TArray<Type.TObject<{
id: Type.TString;
origin: Type.TString;
activated: Type.TBoolean;
activationSource: Type.TOptional<Type.TString>;
activationReason: Type.TOptional<Type.TString>;
failurePhase: Type.TOptional<Type.TString>;
error: Type.TString;
}>>;
unavailable: Type.TOptional<Type.TArray<Type.TObject<{
id: Type.TString;
state: Type.TLiteral<"configured-unavailable">;
diagnostic: Type.TObject<{
kind: Type.TLiteral<"plugin-verification">;
reason: Type.TString;
detail: Type.TString;
}>;
}>>>;
}>>;
contextEngines: Type.TOptional<Type.TObject<{
quarantined: Type.TArray<Type.TObject<{
engineId: Type.TString;
owner: Type.TOptional<Type.TString>;
operation: Type.TString;
reason: Type.TString;
failedAt: Type.TInteger;
}>>;
}>>;
deliveryQueues: Type.TOptional<Type.TObject<{
failed: Type.TArray<Type.TObject<{
queueName: Type.TString;
count: Type.TInteger;
oldestFailedAt: Type.TOptional<Type.TInteger>;
}>>;
ingressFailed: Type.TOptional<Type.TArray<Type.TObject<{
channelId: Type.TString;
accountId: Type.TString;
count: Type.TInteger;
oldestFailedAt: Type.TOptional<Type.TInteger>;
}>>>;
ingressPressure: Type.TOptional<Type.TArray<Type.TObject<{
channelId: Type.TString;
accountId: Type.TString;
laneCount: Type.TInteger;
pendingCount: Type.TInteger;
claimedCount: Type.TInteger;
blockedCount: Type.TInteger;
oldestReceivedAt: Type.TInteger;
}>>>;
}>>;
modelPricing: Type.TOptional<Type.TObject<{
state: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"degraded">, Type.TLiteral<"disabled">]>;
sources: Type.TArray<Type.TObject<{
source: Type.TUnion<[Type.TLiteral<"openrouter">, Type.TLiteral<"litellm">, Type.TLiteral<"bootstrap">, Type.TLiteral<"refresh">]>;
state: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"degraded">]>;
lastFailureAt: Type.TOptional<Type.TInteger>;
detail: Type.TOptional<Type.TString>;
}>>;
lastFailureAt: Type.TOptional<Type.TInteger>;
detail: Type.TOptional<Type.TString>;
}>>;
configReload: Type.TOptional<Type.TObject<{
hotReloadStatus: Type.TUnion<[Type.TLiteral<"active">, Type.TLiteral<"disabled">]>;
}>>;
channels: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
channelOrder: Type.TOptional<Type.TArray<Type.TString>>;
channelLabels: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>;
heartbeatSeconds: Type.TOptional<Type.TInteger>;
defaultAgentId: Type.TOptional<Type.TString>;
agents: Type.TOptional<Type.TArray<Type.TObject<{
agentId: Type.TString;
name: Type.TOptional<Type.TString>;
isDefault: Type.TBoolean;
heartbeat: Type.TObject<{
enabled: Type.TBoolean;
every: Type.TString;
everyMs: Type.TUnion<[Type.TInteger, Type.TNull]>;
prompt: Type.TString;
target: Type.TString;
model: Type.TOptional<Type.TString>;
session: Type.TOptional<Type.TString>;
ackMaxChars: Type.TInteger;
}>;
sessions: Type.TObject<{
path: Type.TString;
count: Type.TInteger;
recent: Type.TArray<Type.TObject<{
key: Type.TString;
updatedAt: Type.TUnion<[Type.TInteger, Type.TNull]>;
age: Type.TUnion<[Type.TInteger, Type.TNull]>;
}>>;
}>;
}>>>;
sessions: Type.TOptional<Type.TObject<{
path: Type.TString;
count: Type.TInteger;
recent: Type.TArray<Type.TObject<{
key: Type.TString;
updatedAt: Type.TUnion<[Type.TInteger, Type.TNull]>;
age: Type.TUnion<[Type.TInteger, Type.TNull]>;
}>>;
}>>;
}>;
stateVersion: Type.TObject<{
presence: Type.TInteger;
health: Type.TInteger;
}>;
uptimeMs: Type.TInteger;
appliedConfigHash: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
configPath: Type.TOptional<Type.TString>;
stateDir: Type.TOptional<Type.TString>;
sessionDefaults: Type.TOptional<Type.TObject<{
defaultAgentId: Type.TString;
modelConfigured: Type.TOptional<Type.TBoolean>;
ownership: Type.TOptional<Type.TUnion<[Type.TLiteral<"sole">, Type.TLiteral<"legacy">, Type.TLiteral<"explicit">]>>;
selectionRequired: Type.TOptional<Type.TBoolean>;
mainKey: Type.TString;
mainSessionKey: Type.TString;
scope: Type.TOptional<Type.TString>;
}>>;
controlUiIdentityUrl: Type.TOptional<Type.TString>;
authMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"none">, Type.TLiteral<"token">, Type.TLiteral<"password">, Type.TLiteral<"trusted-proxy">]>>;
updateAvailable: Type.TOptional<Type.TObject<{
currentVersion: Type.TString;
latestVersion: Type.TString;
channel: Type.TString;
currentSha: Type.TOptional<Type.TString>;
upstreamRef: Type.TOptional<Type.TString>;
upstreamSha: Type.TOptional<Type.TString>;
commitsBehind: Type.TOptional<Type.TInteger>;
commits: Type.TOptional<Type.TArray<Type.TObject<{
sha: Type.TString;
subject: Type.TString;
}>>>;
}>>;
updateSchedule: Type.TOptional<Type.TObject<{
channel: Type.TString;
autoEnabled: Type.TBoolean;
install: Type.TOptional<Type.TObject<{
kind: Type.TUnion<[Type.TLiteral<"package">, Type.TLiteral<"git">, Type.TLiteral<"unknown">]>;
git: Type.TOptional<Type.TUnion<[Type.TObject<{
currentSha: Type.TOptional<Type.TString>;
commitAtMs: Type.TOptional<Type.TInteger>;
installedAtMs: Type.TOptional<Type.TInteger>;
status: Type.TLiteral<"current">;
}>, Type.TObject<{
currentSha: Type.TOptional<Type.TString>;
commitAtMs: Type.TOptional<Type.TInteger>;
installedAtMs: Type.TOptional<Type.TInteger>;
status: Type.TLiteral<"behind">;
commitsBehind: Type.TInteger;
}>, Type.TObject<{
currentSha: Type.TOptional<Type.TString>;
commitAtMs: Type.TOptional<Type.TInteger>;
installedAtMs: Type.TOptional<Type.TInteger>;
status: Type.TLiteral<"ahead">;
commitsAhead: Type.TInteger;
}>, Type.TObject<{
currentSha: Type.TOptional<Type.TString>;
commitAtMs: Type.TOptional<Type.TInteger>;
installedAtMs: Type.TOptional<Type.TInteger>;
status: Type.TLiteral<"diverged">;
commitsAhead: Type.TInteger;
commitsBehind: Type.TInteger;
}>, Type.TObject<{
currentSha: Type.TOptional<Type.TString>;
commitAtMs: Type.TOptional<Type.TInteger>;
installedAtMs: Type.TOptional<Type.TInteger>;
status: Type.TLiteral<"unavailable">;
reason: Type.TUnion<[Type.TLiteral<"fetch-failed">, Type.TLiteral<"no-upstream">, Type.TLiteral<"no-upstream-sha">, Type.TLiteral<"comparison-failed">, Type.TLiteral<"git-unavailable">]>;
}>]>>;
}>>;
target: Type.TOptional<Type.TUnion<[Type.TObject<{
kind: Type.TLiteral<"package">;
version: Type.TString;
}>, Type.TObject<{
kind: Type.TLiteral<"git">;
upstreamRef: Type.TString;
upstreamSha: Type.TString;
commitsBehind: Type.TInteger;
}>]>>;
campaign: Type.TOptional<Type.TObject<{
id: Type.TString;
state: Type.TUnion<[Type.TLiteral<"waiting-for-idle">, Type.TLiteral<"countdown">, Type.TLiteral<"applying">]>;
announcedAtMs: Type.TInteger;
applyAtMs: Type.TOptional<Type.TInteger>;
holdUntilMs: Type.TOptional<Type.TInteger>;
forceAtMs: Type.TInteger;
updatedAtMs: Type.TInteger;
}>>;
}>>;
}>;
controlUiUrl: Type.TOptional<Type.TString>;
controlUiTabs: Type.TOptional<Type.TArray<Type.TObject<{
pluginId: Type.TString;
id: Type.TString;
label: Type.TString;
description: Type.TOptional<Type.TString>;
icon: Type.TOptional<Type.TString>;
path: Type.TOptional<Type.TString>;
placement: Type.TOptional<Type.TString>;
requiresGatewayAuth: Type.TOptional<Type.TBoolean>;
group: Type.TOptional<Type.TUnion<[Type.TLiteral<"control">, Type.TLiteral<"agent">]>>;
order: Type.TOptional<Type.TNumber>;
}>>>;
controlUiWidgetKinds: Type.TOptional<Type.TArray<Type.TObject<{
pluginId: Type.TString;
kind: Type.TString;
label: Type.TString;
}>>>;
pluginSurfaceUrls: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>;
auth: Type.TObject<{
deviceToken: Type.TOptional<Type.TString>;
recoveryMigrationAllowed: Type.TOptional<Type.TLiteral<true>>;
recoveryScope: Type.TOptional<Type.TString>;
role: Type.TString;
scopes: Type.TArray<Type.TString>;
issuedAtMs: Type.TOptional<Type.TInteger>;
deviceTokens: Type.TOptional<Type.TArray<Type.TObject<{
deviceToken: Type.TString;
role: Type.TString;
scopes: Type.TArray<Type.TString>;
issuedAtMs: Type.TInteger;
}>>>;
}>;
policy: Type.TObject<{
maxPayload: Type.TInteger;
maxBufferedBytes: Type.TInteger;
tickIntervalMs: Type.TInteger;
attachments: Type.TOptional<Type.TObject<{
maxBytes: Type.TInteger;
maxImageBytes: Type.TInteger;
}>>;
allowedSessionVisibilities: Type.TOptional<Type.TArray<Type.TUnion<[Type.TLiteral<"shared">, Type.TLiteral<"read-only">, Type.TLiteral<"suggest">, Type.TLiteral<"draft">]>>>;
hasMultipleSessionSharingIdentities: Type.TOptional<Type.TBoolean>;
}>;
}>;
/** Standard structured error shape used in response frames and connect failures. */
declare const ErrorShapeSchema: Type.TObject<{
code: Type.TString;
message: Type.TString;
details: Type.TOptional<Type.TUnknown>;
retryable: Type.TOptional<Type.TBoolean>;
retryAfterMs: Type.TOptional<Type.TInteger>;
}>;
/** Client request frame envelope; `method` selects the payload validator. */
declare const RequestFrameSchema: Type.TObject<{
type: Type.TLiteral<"req">;
id: Type.TString;
method: Type.TString;
params: Type.TOptional<Type.TUnknown>;
traceparent: Type.TOptional<Type.TString>;
}>;
/** Server event frame envelope; `event` selects the payload validator. */
declare const EventFrameSchema: Type.TObject<{
type: Type.TLiteral<"event">;
event: Type.TString;
payload: Type.TOptional<Type.TUnknown>;
seq: Type.TOptional<Type.TInteger>;
stateVersion: Type.TOptional<Type.TObject<{
presence: Type.TInteger;
health: Type.TInteger;
}>>;
}>;
type ConnectParams = Static<typeof ConnectParamsSchema>;
type HelloOk = Static<typeof HelloOkSchema>;
type ErrorShape = Static<typeof ErrorShapeSchema>;
type RequestFrame = Static<typeof RequestFrameSchema>;
type EventFrame = Static<typeof EventFrameSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/error-codes.d.ts
/** Builds the canonical gateway error payload while preserving optional retry metadata. */
declare function errorShape(code: ErrorCode, message: string, opts?: {
details?: unknown;
retryable?: boolean;
retryAfterMs?: number;
}): ErrorShape;
//#endregion
//#region packages/gateway-protocol/src/schema/session-github-publication.d.ts
declare const GitHubPublicationPublisherSchema: Type.TObject<{
accountId: Type.TInteger;
login: Type.TString;
source: Type.TUnion<[Type.TLiteral<"personal">, Type.TLiteral<"system-detected">, Type.TLiteral<"system-configured">, Type.TLiteral<"agent-override">]>;
}>;
declare const SessionGitHubPublishParamsSchema: Type.TObject<{
sessionKey: Type.TOptional<Type.TString>;
agentId: Type.TOptional<Type.TString>;
idempotencyKey: Type.TString;
title: Type.TOptional<Type.TString>;
body: Type.TOptional<Type.TString>;
selection: Type.TOptional<Type.TUnion<[Type.TObject<{
source: Type.TLiteral<"shared">;
expected: Type.TOptional<Type.TObject<{
accountId: Type.TInteger;
login: Type.TString;
source: Type.TUnion<[Type.TLiteral<"system-detected">, Type.TLiteral<"system-configured">, Type.TLiteral<"agent-override">]>;
}>>;
}>, Type.TObject<{
source: Type.TLiteral<"personal">;
generation: Type.TString;
account: Type.TObject<{
accountId: Type.TInteger;
login: Type.TString;
}>;
}>]>>;
}>;
declare const SessionGitHubPublicationResultSchema: Type.TUnion<[Type.TObject<{
requestId: Type.TString;
publisher: Type.TOptional<Type.TObject<{
accountId: Type.TInteger;
login: Type.TString;
source: Type.TUnion<[Type.TLiteral<"personal">, Type.TLiteral<"system-detected">, Type.TLiteral<"system-configured">, Type.TLiteral<"agent-override">]>;
}>>;
effect: Type.TOptional<Type.TObject<{
kind: Type.TUnion<[Type.TLiteral<"push">, Type.TLiteral<"pull_request">]>;
status: Type.TUnion<[Type.TLiteral<"dispatched">, Type.TLiteral<"observed">]>;
headCommit: Type.TOptional<Type.TString>;
url: Type.TOptional<Type.TString>;
}>>;
status: Type.TLiteral<"requested">;
message: Type.TString;
}>, Type.TObject<{
requestId: Type.TString;
publisher: Type.TOptional<Type.TObject<{
accountId: Type.TInteger;
login: Type.TString;
source: Type.TUnion<[Type.TLiteral<"personal">, Type.TLiteral<"system-detected">, Type.TLiteral<"system-configured">, Type.TLiteral<"agent-override">]>;
}>>;
effect: Type.TOptional<Type.TObject<{
kind: Type.TUnion<[Type.TLiteral<"push">, Type.TLiteral<"pull_request">]>;
status: Type.TUnion<[Type.TLiteral<"dispatched">, Type.TLiteral<"observed">]>;
headCommit: Type.TOptional<Type.TString>;
url: Type.TOptional<Type.TString>;
}>>;
status: Type.TLiteral<"publishing">;
message: Type.TString;
}>, Type.TObject<{
requestId: Type.TString;
publisher: Type.TOptional<Type.TObject<{
accountId: Type.TInteger;
login: Type.TString;
source: Type.TUnion<[Type.TLiteral<"personal">, Type.TLiteral<"system-detected">, Type.TLiteral<"system-configured">, Type.TLiteral<"agent-override">]>;
}>>;
effect: Type.TOptional<Type.TObject<{
kind: Type.TUnion<[Type.TLiteral<"push">, Type.TLiteral<"pull_request">]>;
status: Type.TUnion<[Type.TLiteral<"dispatched">, Type.TLiteral<"observed">]>;
headCommit: Type.TOptional<Type.TString>;
url: Type.TOptional<Type.TString>;
}>>;
status: Type.TLiteral<"published">;
url: Type.TString;
repository: Type.TString;
branch: Type.TString;
headCommit: Type.TString;
}>, Type.TObject<{
requestId: Type.TString;
publisher: Type.TOptional<Type.TObject<{
accountId: Type.TInteger;
login: Type.TString;
source: Type.TUnion<[Type.TLiteral<"personal">, Type.TLiteral<"system-detected">, Type.TLiteral<"system-configured">, Type.TLiteral<"agent-override">]>;
}>>;
effect: Type.TOptional<Type.TObject<{
kind: Type.TUnion<[Type.TLiteral<"push">, Type.TLiteral<"pull_request">]>;
status: Type.TUnion<[Type.TLiteral<"dispatched">, Type.TLiteral<"observed">]>;
headCommit: Type.TOptional<Type.TString>;
url: Type.TOptional<Type.TString>;
}>>;
status: Type.TLiteral<"failed">;
code: Type.TUnion<[Type.TLiteral<"identity_changed">, Type.TLiteral<"identity_unavailable">, Type.TLiteral<"session_changed">, Type.TLiteral<"workspace_changed">, Type.TLiteral<"not_git">, Type.TLiteral<"not_github">, Type.TLiteral<"no_changes">, Type.TLiteral<"push_rejected">, Type.TLiteral<"github_rejected">, Type.TLiteral<"unavailable">]>;
message: Type.TString;
nextAction: Type.TString;
}>, Type.TObject<{
requestId: Type.TString;
publisher: Type.TOptional<Type.TObject<{
accountId: Type.TInteger;
login: Type.TString;
source: Type.TUnion<[Type.TLiteral<"personal">, Type.TLiteral<"system-detected">, Type.TLiteral<"system-configured">, Type.TLiteral<"agent-override">]>;
}>>;
effect: Type.TOptional<Type.TObject<{
kind: Type.TUnion<[Type.TLiteral<"push">, Type.TLiteral<"pull_request">]>;
status: Type.TUnion<[Type.TLiteral<"dispatched">, Type.TLiteral<"observed">]>;
headCommit: Type.TOptional<Type.TString>;
url: Type.TOptional<Type.TString>;
}>>;
status: Type.TLiteral<"needs_confirmation">;
message: Type.TString;
}>]>;
declare const SessionGitHubConfirmParamsSchema: Type.TObject<{
sessionKey: Type.TString;
agentId: Type.TOptional<Type.TString>;
requestId: Type.TString;
generation: Type.TString;
account: Type.TObject<{
accountId: Type.TInteger;
login: Type.TString;
}>;
requestDigest: Type.TString;
}>;
type GitHubPublicationPublisher = Static<typeof GitHubPublicationPublisherSchema>;
type SessionGitHubConfirmParams = Static<typeof SessionGitHubConfirmParamsSchema>;
type SessionGitHubPublishParams = Static<typeof SessionGitHubPublishParamsSchema>;
type SessionGitHubPublicationResult = Static<typeof SessionGitHubPublicationResultSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/worker-inference.d.ts
declare const WorkerInferenceModelRefSchema: Type.TObject<{
readonly provider: Type.TString;
readonly model: Type.TString;
}>;
declare const WorkerInferenceOptionsSchema: Type.TObject<{
readonly temperature: Type.TOptional<Type.TNumber>;
readonly maxTokens: Type.TOptional<Type.TInteger>;
readonly reasoning: Type.TOptional<Type.TUnion<[Type.TLiteral<"off">, Type.TLiteral<"minimal">, Type.TLiteral<"low">, Type.TLiteral<"medium">, Type.TLiteral<"high">, Type.TLiteral<"xhigh">, Type.TLiteral<"adaptive">, Type.TLiteral<"max">]>>;
readonly thinkingBudgets: Type.TOptional<Type.TObject<{
readonly minimal: Type.TOptional<Type.TInteger>;
readonly low: Type.TOptional<Type.TInteger>;
readonly medium: Type.TOptional<Type.TInteger>;
readonly high: Type.TOptional<Type.TInteger>;
readonly max: Type.TOptional<Type.TInteger>;
}>>;
}>;
type WorkerInferenceModelRef = Static<typeof WorkerInferenceModelRefSchema>;
type WorkerInferenceOptions = Static<typeof WorkerInferenceOptionsSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/board.d.ts
declare const BoardGetParamsSchema: Type.TObject<{
sessionKey: Type.TString;
agentId: Type.TOptional<Type.TString>;
}>;
type BoardGetParams = Static<typeof BoardGetParamsSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/sessions-row.d.ts
declare const SessionPermissionModeSchema: Type.TUnion<[Type.TLiteral<"read-only">, Type.TLiteral<"guarded">, Type.TLiteral<"workspace">, Type.TLiteral<"full">]>;
declare const SessionRunStatusSchema: Type.TUnion<[Type.TLiteral<"queued">, Type.TLiteral<"running">, Type.TLiteral<"done">, Type.TLiteral<"failed">, Type.TLiteral<"killed">, Type.TLiteral<"timeout">]>;
declare const SessionEntryArchiveReasonSchema: Type.TUnion<[Type.TLiteral<"manual">, Type.TLiteral<"active-session-cap">, Type.TLiteral<"stale-dashboard">, Type.TLiteral<"restart-recovery">]>;
/** Stable Gateway session row fields; mutation envelopes may add null tombstones. */
declare const SessionRowSchema: Type.TObject<{
key: Type.TString;
sessionId: Type.TOptional<Type.TString>;
incognito: Type.TOptional<Type.TLiteral<true>>;
kind: Type.TUnion<[Type.TLiteral<"direct">, Type.TLiteral<"group">, Type.TLiteral<"global">, Type.TLiteral<"unknown">]>;
label: Type.TOptional<Type.TString>;
icon: Type.TOptional<Type.TString>;
/** Named sidebar tint from SESSION_COLOR_IDS; clients map names to theme hues. */
color: Type.TOptional<Type.TString>;
channelAvatarUrl: Type.TOptional<Type.TString>;
boardFace: Type.TOptional<Type.TUnion<[Type.TLiteral<"chat">, Type.TLiteral<"dashboard">]>>;
displayName: Type.TOptional<Type.TString>;
derivedTitle: Type.TOptional<Type.TString>;
lastMessagePreview: Type.TOptional<Type.TString>;
channel: Type.TOptional<Type.TString>;
/** Stable non-sensitive facts derived from the canonical session route. */
classification: Type.TOptional<Type.TString>;
agentId: Type.TOptional<Type.TString>;
accountId: Type.TOptional<Type.TString>;
peerKind: Type.TOptional<Type.TString>;
isMain: Type.TOptional<Type.TBoolean>;
isBackground: Type.TOptional<Type.TBoolean>;
chatType: Type.TOptional<Type.TUnion<[Type.TLiteral<"direct">, Type.TLiteral<"group">, Type.TLiteral<"channel">]>>;
updatedAt: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
archived: Type.TOptional<Type.TBoolean>;
archivedAt: Type.TOptional<Type.TNumber>;
archivedBy: Type.TOptional<Type.TObject<{
type: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"agent">, Type.TLiteral<"system">]>;
id: Type.TOptional<Type.TString>;
label: Type.TOptional<Type.TString>;
/** Durable profile avatar route; absent for actors without a stored profile avatar. */
avatarUrl: Type.TOptional<Type.TString>;
/** Display identity is separate from the actor fields used by ownership policy. */
identity: Type.TOptional<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>>;
}>>;
archiveReason: Type.TOptional<Type.TUnion<[Type.TLiteral<"manual">, Type.TLiteral<"active-session-cap">, Type.TLiteral<"stale-dashboard">, Type.TLiteral<"restart-recovery">]>>;
pinned: Type.TOptional<Type.TBoolean>;
pinnedAt: Type.TOptional<Type.TNumber>;
unread: Type.TOptional<Type.TBoolean>;
lastReadAt: Type.TOptional<Type.TNumber>;
markedUnreadAt: Type.TOptional<Type.TNumber>;
lastActivityAt: Type.TOptional<Type.TNumber>;
lastInteractionAt: Type.TOptional<Type.TNumber>;
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"queued">, Type.TLiteral<"running">, Type.TLiteral<"done">, Type.TLiteral<"failed">, Type.TLiteral<"killed">, Type.TLiteral<"timeout">]>>;
lastRunError: Type.TOptional<Type.TString>;
/** Exact run that produced the latest terminal lifecycle projection. */
lastRunId: Type.TOptional<Type.TString>;
restartRecoveryStatus: Type.TOptional<Type.TLiteral<"tombstoned">>;
activeLeafEntryId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
spawnedBy: Type.TOptional<Type.TString>;
parentSessionKey: Type.TOptional<Type.TString>;
controlOwnerSessionKey: Type.TOptional<Type.TString>;
childSessions: Type.TOptional<Type.TArray<Type.TString>>;
forkedFromParent: Type.TOptional<Type.TBoolean>;
spawnDepth: Type.TOptional<Type.TNumber>;
subagentRole: Type.TOptional<Type.TUnion<[Type.TLiteral<"orchestrator">, Type.TLiteral<"leaf">]>>;
subagentControlScope: Type.TOptional<Type.TUnion<[Type.TLiteral<"children">, Type.TLiteral<"none">]>>;
swarmGroupId: Type.TOptional<Type.TString>;
worktree: Type.TOptional<Type.TObject<{
id: Type.TString;
branch: Type.TString;
repoRoot: Type.TString;
}>>;
execNode: Type.TOptional<Type.TString>;
execCwd: Type.TOptional<Type.TString>;
spawnedWorkspaceDir: Type.TOptional<Type.TString>;
spawnedCwd: Type.TOptional<Type.TString>;
permissionMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"read-only">, Type.TLiteral<"guarded">, Type.TLiteral<"workspace">, Type.TLiteral<"full">]>>;
permissionModePending: Type.TOptional<Type.TBoolean>;
sessionRoot: Type.TOptional<Type.TString>;
createdVia: Type.TOptional<Type.TUnion<[Type.TLiteral<"operator">, Type.TLiteral<"spawn">, Type.TLiteral<"channel">, Type.TLiteral<"cron">, Type.TLiteral<"talk">, Type.TLiteral<"run">, Type.TLiteral<"plugin">, Type.TLiteral<"internal">]>>;
createdActor: Type.TOptional<Type.TObject<{
type: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"agent">, Type.TLiteral<"system">]>;
id: Type.TOptional<Type.TString>;
label: Type.TOptional<Type.TString>;
/** Durable profile avatar route; absent for actors without a stored profile avatar. */
avatarUrl: Type.TOptional<Type.TString>;
/** Display identity is separate from the actor fields used by ownership policy. */
identity: Type.TOptional<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>>;
}>>;
owner: Type.TOptional<Type.TObject<{
actor: Type.TObject<{
type: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"agent">, Type.TLiteral<"system">]>;
id: Type.TOptional<Type.TString>;
label: Type.TOptional<Type.TString>;
/** Durable profile avatar route; absent for actors without a stored profile avatar. */
avatarUrl: Type.TOptional<Type.TString>;
/** Display identity is separate from the actor fields used by ownership policy. */
identity: Type.TOptional<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>>;
}>;
assignedBy: Type.TOptional<Type.TObject<{
type: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"agent">, Type.TLiteral<"system">]>;
id: Type.TOptional<Type.TString>;
label: Type.TOptional<Type.TString>;
/** Durable profile avatar route; absent for actors without a stored profile avatar. */
avatarUrl: Type.TOptional<Type.TString>;
/** Display identity is separate from the actor fields used by ownership policy. */
identity: Type.TOptional<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>>;
}>>;
assignedAt: Type.TOptional<Type.TNumber>;
}>>;
participants: Type.TOptional<Type.TArray<Type.TObject<{
identity: Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>;
label: Type.TOptional<Type.TString>;
avatarUrl: Type.TOptional<Type.TString>;
}>>>;
expandedParticipants: Type.TOptional<Type.TArray<Type.TObject<{
identity: Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>;
label: Type.TOptional<Type.TString>;
avatarUrl: Type.TOptional<Type.TString>;
}>>>;
participantCount: Type.TOptional<Type.TInteger>;
visibility: Type.TOptional<Type.TUnion<[Type.TLiteral<"shared">, Type.TLiteral<"read-only">, Type.TLiteral<"suggest">, Type.TLiteral<"draft">]>>;
sharingRole: Type.TOptional<Type.TUnion<[Type.TLiteral<"admin">, Type.TLiteral<"owner">, Type.TLiteral<"member">, Type.TLiteral<"viewer">]>>;
createdAt: Type.TOptional<Type.TNumber>;
forkSource: Type.TOptional<Type.TObject<{
sessionKey: Type.TString;
sessionId: Type.TString;
entryId: Type.TOptional<Type.TString>;
}>>;
previousSessionId: Type.TOptional<Type.TString>;
inputTokens: Type.TOptional<Type.TNumber>;
outputTokens: Type.TOptional<Type.TNumber>;
totalTokens: Type.TOptional<Type.TNumber>;
totalTokensFresh: Type.TOptional<Type.TBoolean>;
contextTokens: Type.TOptional<Type.TNumber>;
estimatedCostUsd: Type.TOptional<Type.TNumber>;
model: Type.TOptional<Type.TString>;
modelProvider: Type.TOptional<Type.TString>;
/** Runtime model serving this session while it differs from the selected model. */
activeModel: Type.TOptional<Type.TString>;
activeModelProvider: Type.TOptional<Type.TString>;
/** Persisted override provenance; null means inherited, omission means not projected. */
modelOverrideSource: Type.TOptional<Type.TUnion<[Type.TLiteral<"user">, Type.TLiteral<"auto">, Type.TNull]>>;
toolOverrides: Type.TOptional<Type.TObject<{
mcpServers: Type.TOptional<Type.TRecord<"^.*$", Type.TBoolean>>;
mcpToolsDeny: Type.TOptional<Type.TRecord<"^.*$", Type.TArray<Type.TString>>>;
skills: Type.TOptional<Type.TRecord<"^.*$", Type.TBoolean>>;
webSearch: Type.TOptional<Type.TBoolean>;
}>>;
}>;
type SessionPermissionMode = Static<typeof SessionPermissionModeSchema>;
type SessionRunStatus = Static<typeof SessionRunStatusSchema>;
type SessionRow = Static<typeof SessionRowSchema>;
type SessionEntryArchiveReason = Static<typeof SessionEntryArchiveReasonSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/sessions-goal.d.ts
declare const SessionGoalSchema: Type.TObject<{
schemaVersion: Type.TLiteral<1>;
id: Type.TString;
objective: Type.TString;
status: Type.TUnion<[Type.TLiteral<"active">, Type.TLiteral<"paused">, Type.TLiteral<"blocked">, Type.TLiteral<"usage_limited">, Type.TLiteral<"budget_limited">, Type.TLiteral<"complete">]>;
createdAt: Type.TNumber;
updatedAt: Type.TNumber;
tokenStart: Type.TNumber;
tokenStartFresh: Type.TOptional<Type.TBoolean>;
tokensUsed: Type.TNumber;
tokenBudget: Type.TOptional<Type.TNumber>;
continuationTurns: Type.TNumber;
lastStatusNote: Type.TOptional<Type.TString>;
pausedAt: Type.TOptional<Type.TNumber>;
blockedAt: Type.TOptional<Type.TNumber>;
completedAt: Type.TOptional<Type.TNumber>;
usageLimitedAt: Type.TOptional<Type.TNumber>;
budgetLimitedAt: Type.TOptional<Type.TNumber>;
}>;
type SessionGoal = Static<typeof SessionGoalSchema>;
declare const SessionsGoalMutationResultSchema: Type.TObject<{
operationId: Type.TString;
action: Type.TUnion<[Type.TLiteral<"start">, Type.TLiteral<"edit">, Type.TLiteral<"pause">, Type.TLiteral<"resume">, Type.TLiteral<"complete">, Type.TLiteral<"block">, Type.TLiteral<"clear">]>;
sessionId: Type.TString;
goalId: Type.TString;
goal: Type.TOptional<Type.TObject<{
schemaVersion: Type.TLiteral<1>;
id: Type.TString;
objective: Type.TString;
status: Type.TUnion<[Type.TLiteral<"active">, Type.TLiteral<"paused">, Type.TLiteral<"blocked">, Type.TLiteral<"usage_limited">, Type.TLiteral<"budget_limited">, Type.TLiteral<"complete">]>;
createdAt: Type.TNumber;
updatedAt: Type.TNumber;
tokenStart: Type.TNumber;
tokenStartFresh: Type.TOptional<Type.TBoolean>;
tokensUsed: Type.TNumber;
tokenBudget: Type.TOptional<Type.TNumber>;
continuationTurns: Type.TNumber;
lastStatusNote: Type.TOptional<Type.TString>;
pausedAt: Type.TOptional<Type.TNumber>;
blockedAt: Type.TOptional<Type.TNumber>;
completedAt: Type.TOptional<Type.TNumber>;
usageLimitedAt: Type.TOptional<Type.TNumber>;
budgetLimitedAt: Type.TOptional<Type.TNumber>;
}>>;
runId: Type.TOptional<Type.TString>;
replayed: Type.TOptional<Type.TLiteral<true>>;
status: Type.TUnion<[Type.TLiteral<"started">, Type.TLiteral<"updated">, Type.TLiteral<"cleared">]>;
}>;
type SessionsGoalMutationResult = Static<typeof SessionsGoalMutationResultSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/sessions-catalog.d.ts
declare const SessionCatalogLocatorSchema: Type.TObject<{
catalogId: Type.TString;
hostId: Type.TString;
threadId: Type.TString;
agentId: Type.TOptional<Type.TString>;
sourceHomeId: Type.TOptional<Type.TString>;
}>;
declare const SessionCatalogCapabilitiesSchema: Type.TObject<{
continueSession: Type.TBoolean;
archive: Type.TBoolean;
createSession: Type.TOptional<Type.TObject<{
model: Type.TString;
startTerminal: Type.TOptional<Type.TBoolean>;
}>>;
openTerminal: Type.TOptional<Type.TBoolean>;
startTerminal: Type.TOptional<Type.TBoolean>;
}>;
declare const SessionCatalogShareRouteSchema: Type.TObject<{
kind: Type.TLiteral<"thread-id-prefix">;
routeSegment: Type.TString;
hostId: Type.TString;
identifierAlphabet: Type.TLiteral<"lowercase-hex">;
fullLength: Type.TLiteral<32>;
minPrefixLength: Type.TLiteral<12>;
lookup: Type.TLiteral<"catalog-list-search-by-thread-id-prefix">;
ambiguity: Type.TLiteral<"multiple-results-or-next-cursor">;
}>;
declare const SessionCatalogDescriptorSchema: Type.TObject<{
id: Type.TString;
label: Type.TString;
capabilities: Type.TObject<{
continueSession: Type.TBoolean;
archive: Type.TBoolean;
createSession: Type.TOptional<Type.TObject<{
model: Type.TString;
startTerminal: Type.TOptional<Type.TBoolean>;
}>>;
openTerminal: Type.TOptional<Type.TBoolean>;
startTerminal: Type.TOptional<Type.TBoolean>;
}>;
}>;
declare const SessionCatalogPullRequestSummarySchema: Type.TObject<{
numbers: Type.TArray<Type.TInteger>;
state: Type.TUnion<[Type.TLiteral<"open">, Type.TLiteral<"draft">, Type.TLiteral<"merged">, Type.TLiteral<"closed">]>;
}>;
declare const SessionCatalogSessionSchema: Type.TObject<{
threadId: Type.TString;
sourceHomeId: Type.TOptional<Type.TString>;
name: Type.TOptional<Type.TString>;
/** Named tint imported from the source CLI session (SESSION_COLOR_IDS). */
color: Type.TOptional<Type.TString>;
cwd: Type.TOptional<Type.TString>;
status: Type.TString;
createdAt: Type.TOptional<Type.TNumber>;
updatedAt: Type.TOptional<Type.TNumber>;
recencyAt: Type.TOptional<Type.TNumber>;
source: Type.TOptional<Type.TString>;
modelProvider: Type.TOptional<Type.TString>;
cliVersion: Type.TOptional<Type.TString>;
gitBranch: Type.TOptional<Type.TString>;
customGroup: Type.TOptional<Type.TString>;
pullRequest: Type.TOptional<Type.TObject<{
numbers: Type.TArray<Type.TInteger>;
state: Type.TUnion<[Type.TLiteral<"open">, Type.TLiteral<"draft">, Type.TLiteral<"merged">, Type.TLiteral<"closed">]>;
}>>;
archived: Type.TBoolean;
sessionKey: Type.TOptional<Type.TString>;
createdActor: Type.TOptional<Type.TObject<{
type: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"agent">, Type.TLiteral<"system">]>;
id: Type.TOptional<Type.TString>;
label: Type.TOptional<Type.TString>;
avatarUrl: Type.TOptional<Type.TString>;
identity: Type.TOptional<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>>;
}>>;
canContinue: Type.TBoolean;
canArchive: Type.TBoolean;
canOpenTerminal: Type.TOptional<Type.TBoolean>;
}>;
declare const SessionCatalogHostSchema: Type.TObject<{
hostId: Type.TString;
label: Type.TString;
kind: Type.TUnion<[Type.TLiteral<"gateway">, Type.TLiteral<"node">]>;
connected: Type.TBoolean;
nodeId: Type.TOptional<Type.TString>;
canStartTerminal: Type.TOptional<Type.TBoolean>;
sessions: Type.TArray<Type.TObject<{
threadId: Type.TString;
sourceHomeId: Type.TOptional<Type.TString>;
name: Type.TOptional<Type.TString>;
/** Named tint imported from the source CLI session (SESSION_COLOR_IDS). */
color: Type.TOptional<Type.TString>;
cwd: Type.TOptional<Type.TString>;
status: Type.TString;
createdAt: Type.TOptional<Type.TNumber>;
updatedAt: Type.TOptional<Type.TNumber>;
recencyAt: Type.TOptional<Type.TNumber>;
source: Type.TOptional<Type.TString>;
modelProvider: Type.TOptional<Type.TString>;
cliVersion: Type.TOptional<Type.TString>;
gitBranch: Type.TOptional<Type.TString>;
customGroup: Type.TOptional<Type.TString>;
pullRequest: Type.TOptional<Type.TObject<{
numbers: Type.TArray<Type.TInteger>;
state: Type.TUnion<[Type.TLiteral<"open">, Type.TLiteral<"draft">, Type.TLiteral<"merged">, Type.TLiteral<"closed">]>;
}>>;
archived: Type.TBoolean;
sessionKey: Type.TOptional<Type.TString>;
createdActor: Type.TOptional<Type.TObject<{
type: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"agent">, Type.TLiteral<"system">]>;
id: Type.TOptional<Type.TString>;
label: Type.TOptional<Type.TString>;
avatarUrl: Type.TOptional<Type.TString>;
identity: Type.TOptional<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>>;
}>>;
canContinue: Type.TBoolean;
canArchive: Type.TBoolean;
canOpenTerminal: Type.TOptional<Type.TBoolean>;
}>>;
nextCursor: Type.TOptional<Type.TString>;
error: Type.TOptional<Type.TObject<{
code: Type.TString;
message: Type.TString;
}>>;
}>;
declare const SessionCatalogSchema: Type.TObject<{
id: Type.TString;
label: Type.TString;
capabilities: Type.TObject<{
continueSession: Type.TBoolean;
archive: Type.TBoolean;
createSession: Type.TOptional<Type.TObject<{
model: Type.TString;
startTerminal: Type.TOptional<Type.TBoolean>;
}>>;
openTerminal: Type.TOptional<Type.TBoolean>;
startTerminal: Type.TOptional<Type.TBoolean>;
}>;
shareRoute: Type.TOptional<Type.TObject<{
kind: Type.TLiteral<"thread-id-prefix">;
routeSegment: Type.TString;
hostId: Type.TString;
identifierAlphabet: Type.TLiteral<"lowercase-hex">;
fullLength: Type.TLiteral<32>;
minPrefixLength: Type.TLiteral<12>;
lookup: Type.TLiteral<"catalog-list-search-by-thread-id-prefix">;
ambiguity: Type.TLiteral<"multiple-results-or-next-cursor">;
}>>;
hosts: Type.TArray<Type.TObject<{
hostId: Type.TString;
label: Type.TString;
kind: Type.TUnion<[Type.TLiteral<"gateway">, Type.TLiteral<"node">]>;
connected: Type.TBoolean;
nodeId: Type.TOptional<Type.TString>;
canStartTerminal: Type.TOptional<Type.TBoolean>;
sessions: Type.TArray<Type.TObject<{
threadId: Type.TString;
sourceHomeId: Type.TOptional<Type.TString>;
name: Type.TOptional<Type.TString>;
/** Named tint imported from the source CLI session (SESSION_COLOR_IDS). */
color: Type.TOptional<Type.TString>;
cwd: Type.TOptional<Type.TString>;
status: Type.TString;
createdAt: Type.TOptional<Type.TNumber>;
updatedAt: Type.TOptional<Type.TNumber>;
recencyAt: Type.TOptional<Type.TNumber>;
source: Type.TOptional<Type.TString>;
modelProvider: Type.TOptional<Type.TString>;
cliVersion: Type.TOptional<Type.TString>;
gitBranch: Type.TOptional<Type.TString>;
customGroup: Type.TOptional<Type.TString>;
pullRequest: Type.TOptional<Type.TObject<{
numbers: Type.TArray<Type.TInteger>;
state: Type.TUnion<[Type.TLiteral<"open">, Type.TLiteral<"draft">, Type.TLiteral<"merged">, Type.TLiteral<"closed">]>;
}>>;
archived: Type.TBoolean;
sessionKey: Type.TOptional<Type.TString>;
createdActor: Type.TOptional<Type.TObject<{
type: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"agent">, Type.TLiteral<"system">]>;
id: Type.TOptional<Type.TString>;
label: Type.TOptional<Type.TString>;
avatarUrl: Type.TOptional<Type.TString>;
identity: Type.TOptional<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>>;
}>>;
canContinue: Type.TBoolean;
canArchive: Type.TBoolean;
canOpenTerminal: Type.TOptional<Type.TBoolean>;
}>>;
nextCursor: Type.TOptional<Type.TString>;
error: Type.TOptional<Type.TObject<{
code: Type.TString;
message: Type.TString;
}>>;
}>>;
error: Type.TOptional<Type.TObject<{
code: Type.TString;
message: Type.TString;
}>>;
}>;
declare const SessionsCatalogListParamsSchema: Type.TObject<{
agentId: Type.TOptional<Type.TString>;
progressId: Type.TOptional<Type.TString>;
search: Type.TOptional<Type.TString>;
limitPerHost: Type.TOptional<Type.TInteger>;
hostIds: Type.TOptional<Type.TArray<Type.TString>>;
catalogId: Type.TOptional<Type.TString>;
cursors: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>;
}>;
declare const SessionsCatalogListResultSchema: Type.TObject<{
catalogs: Type.TArray<Type.TObject<{
id: Type.TString;
label: Type.TString;
capabilities: Type.TObject<{
continueSession: Type.TBoolean;
archive: Type.TBoolean;
createSession: Type.TOptional<Type.TObject<{
model: Type.TString;
startTerminal: Type.TOptional<Type.TBoolean>;
}>>;
openTerminal: Type.TOptional<Type.TBoolean>;
startTerminal: Type.TOptional<Type.TBoolean>;
}>;
shareRoute: Type.TOptional<Type.TObject<{
kind: Type.TLiteral<"thread-id-prefix">;
routeSegment: Type.TString;
hostId: Type.TString;
identifierAlphabet: Type.TLiteral<"lowercase-hex">;
fullLength: Type.TLiteral<32>;
minPrefixLength: Type.TLiteral<12>;
lookup: Type.TLiteral<"catalog-list-search-by-thread-id-prefix">;
ambiguity: Type.TLiteral<"multiple-results-or-next-cursor">;
}>>;
hosts: Type.TArray<Type.TObject<{
hostId: Type.TString;
label: Type.TString;
kind: Type.TUnion<[Type.TLiteral<"gateway">, Type.TLiteral<"node">]>;
connected: Type.TBoolean;
nodeId: Type.TOptional<Type.TString>;
canStartTerminal: Type.TOptional<Type.TBoolean>;
sessions: Type.TArray<Type.TObject<{
threadId: Type.TString;
sourceHomeId: Type.TOptional<Type.TString>;
name: Type.TOptional<Type.TString>;
/** Named tint imported from the source CLI session (SESSION_COLOR_IDS). */
color: Type.TOptional<Type.TString>;
cwd: Type.TOptional<Type.TString>;
status: Type.TString;
createdAt: Type.TOptional<Type.TNumber>;
updatedAt: Type.TOptional<Type.TNumber>;
recencyAt: Type.TOptional<Type.TNumber>;
source: Type.TOptional<Type.TString>;
modelProvider: Type.TOptional<Type.TString>;
cliVersion: Type.TOptional<Type.TString>;
gitBranch: Type.TOptional<Type.TString>;
customGroup: Type.TOptional<Type.TString>;
pullRequest: Type.TOptional<Type.TObject<{
numbers: Type.TArray<Type.TInteger>;
state: Type.TUnion<[Type.TLiteral<"open">, Type.TLiteral<"draft">, Type.TLiteral<"merged">, Type.TLiteral<"closed">]>;
}>>;
archived: Type.TBoolean;
sessionKey: Type.TOptional<Type.TString>;
createdActor: Type.TOptional<Type.TObject<{
type: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"agent">, Type.TLiteral<"system">]>;
id: Type.TOptional<Type.TString>;
label: Type.TOptional<Type.TString>;
avatarUrl: Type.TOptional<Type.TString>;
identity: Type.TOptional<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>>;
}>>;
canContinue: Type.TBoolean;
canArchive: Type.TBoolean;
canOpenTerminal: Type.TOptional<Type.TBoolean>;
}>>;
nextCursor: Type.TOptional<Type.TString>;
error: Type.TOptional<Type.TObject<{
code: Type.TString;
message: Type.TString;
}>>;
}>>;
error: Type.TOptional<Type.TObject<{
code: Type.TString;
message: Type.TString;
}>>;
}>>;
}>;
declare const SessionCatalogTranscriptItemSchema: Type.TObject<{
id: Type.TOptional<Type.TString>;
type: Type.TUnion<[Type.TLiteral<"userMessage">, Type.TLiteral<"agentMessage">, Type.TLiteral<"reasoning">, Type.TLiteral<"toolCall">, Type.TLiteral<"toolResult">, Type.TLiteral<"other">]>;
text: Type.TOptional<Type.TString>;
timestamp: Type.TOptional<Type.TString>;
model: Type.TOptional<Type.TString>;
/** Source-supplied attribution, independent of the viewer and session adopter. */
sender: Type.TOptional<Type.TObject<{
identity: Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>;
label: Type.TOptional<Type.TString>;
avatarUrl: Type.TOptional<Type.TString>;
}>>;
truncated: Type.TOptional<Type.TBoolean>;
raw: Type.TOptional<Type.TUnknown>;
}>;
declare const SessionsCatalogReadParamsSchema: Type.TObject<{
catalogId: Type.TString;
hostId: Type.TString;
threadId: Type.TString;
agentId: Type.TOptional<Type.TString>;
sourceHomeId: Type.TOptional<Type.TString>;
limit: Type.TOptional<Type.TInteger>;
cursor: Type.TOptional<Type.TString>;
}>;
declare const SessionsCatalogReadResultSchema: Type.TObject<{
hostId: Type.TString;
label: Type.TOptional<Type.TString>;
threadId: Type.TString;
items: Type.TArray<Type.TObject<{
id: Type.TOptional<Type.TString>;
type: Type.TUnion<[Type.TLiteral<"userMessage">, Type.TLiteral<"agentMessage">, Type.TLiteral<"reasoning">, Type.TLiteral<"toolCall">, Type.TLiteral<"toolResult">, Type.TLiteral<"other">]>;
text: Type.TOptional<Type.TString>;
timestamp: Type.TOptional<Type.TString>;
model: Type.TOptional<Type.TString>;
/** Source-supplied attribution, independent of the viewer and session adopter. */
sender: Type.TOptional<Type.TObject<{
identity: Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"agent">;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"remote">;
pluginId: Type.TString;
domain: Type.TString;
idKind: Type.TString;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"observation">;
pluginId: Type.TUnion<[Type.TString, Type.TNull]>;
accountId: Type.TUnion<[Type.TString, Type.TNull]>;
senderKind: Type.TUnion<[Type.TLiteral<"human">, Type.TLiteral<"bot">, Type.TLiteral<"unknown">]>;
id: Type.TString;
}>, Type.TObject<{
type: Type.TLiteral<"legacy">;
actorType: Type.TString;
source: Type.TUnion<[Type.TString, Type.TNull]>;
id: Type.TString;
}>]>;
label: Type.TOptional<Type.TString>;
avatarUrl: Type.TOptional<Type.TString>;
}>>;
truncated: Type.TOptional<Type.TBoolean>;
raw: Type.TOptional<Type.TUnknown>;
}>>;
nextCursor: Type.TOptional<Type.TString>;
}>;
declare const SessionsCatalogContinueParamsSchema: Type.TObject<{
catalogId: Type.TString;
hostId: Type.TString;
threadId: Type.TString;
agentId: Type.TOptional<Type.TString>;
sourceHomeId: Type.TOptional<Type.TString>;
}>;
declare const SessionsCatalogContinueResultSchema: Type.TObject<{
sessionKey: Type.TString;
}>;
declare const SessionsCatalogArchiveParamsSchema: Type.TObject<{
catalogId: Type.TString;
hostId: Type.TString;
threadId: Type.TString;
agentId: Type.TOptional<Type.TString>;
sourceHomeId: Type.TOptional<Type.TString>;
confirmNoOtherRunner: Type.TLiteral<true>;
}>;
declare const SessionsCatalogArchiveResultSchema: Type.TObject<{
ok: Type.TLiteral<true>;
}>;
declare const SessionsCatalogStartTerminalParamsSchema: Type.TObject<{
catalogId: Type.TString;
hostId: Type.TOptional<Type.TString>;
agentId: Type.TString;
cwd: Type.TString;
initialMessage: Type.TOptional<Type.TString>;
}>;
declare const SessionsCatalogStartTerminalResultSchema: Type.TObject<{
sessionId: Type.TString;
agentId: Type.TString;
shell: Type.TString;
cwd: Type.TString;
confined: Type.TBoolean;
title: Type.TOptional<Type.TString>;
}>;
type SessionCatalogCapabilities = Static<typeof SessionCatalogCapabilitiesSchema>;
type SessionCatalogShareRoute = Static<typeof SessionCatalogShareRouteSchema>;
type SessionCatalogLocator = Static<typeof SessionCatalogLocatorSchema>;
type SessionCatalogDescriptor = Static<typeof SessionCatalogDescriptorSchema>;
type SessionCatalogPullRequestSummary = Static<typeof SessionCatalogPullRequestSummarySchema>;
type SessionCatalogSession = Static<typeof SessionCatalogSessionSchema>;
type SessionCatalogHost = Static<typeof SessionCatalogHostSchema>;
type SessionCatalog = Static<typeof SessionCatalogSchema>;
type SessionsCatalogListParams = Static<typeof SessionsCatalogListParamsSchema>;
type SessionsCatalogListResult = Static<typeof SessionsCatalogListResultSchema>;
type SessionCatalogTranscriptItem = Static<typeof SessionCatalogTranscriptItemSchema>;
type SessionsCatalogReadParams = Static<typeof SessionsCatalogReadParamsSchema>;
type SessionsCatalogReadResult = Static<typeof SessionsCatalogReadResultSchema>;
type SessionsCatalogContinueParams = Static<typeof SessionsCatalogContinueParamsSchema>;
type SessionsCatalogContinueResult = Static<typeof SessionsCatalogContinueResultSchema>;
type SessionsCatalogArchiveParams = Static<typeof SessionsCatalogArchiveParamsSchema>;
type SessionsCatalogArchiveResult = Static<typeof SessionsCatalogArchiveResultSchema>;
type SessionsCatalogStartTerminalParams = Static<typeof SessionsCatalogStartTerminalParamsSchema>;
type SessionsCatalogStartTerminalResult = Static<typeof SessionsCatalogStartTerminalResultSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/agent.d.ts
/** Waits for a submitted agent run to complete or time out. */
declare const AgentWaitParamsSchema: Type.TObject<{
runId: Type.TString;
timeoutMs: Type.TOptional<Type.TInteger>;
}>;
type AgentWaitParams = Static<typeof AgentWaitParamsSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/agents-models-skills.d.ts
/** Condensed agent record returned by list APIs. */
declare const AgentSummarySchema: Type.TObject<{
id: Type.TString;
kind: Type.TOptional<Type.TUnion<[Type.TLiteral<"agent">, Type.TLiteral<"system">]>>;
createdVia: Type.TOptional<Type.TUnion<[Type.TLiteral<"operator">, Type.TLiteral<"agent">, Type.TLiteral<"claw">]>>;
creatorAgentId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
createdAt: Type.TOptional<Type.TInteger>;
name: Type.TOptional<Type.TString>;
identity: Type.TOptional<Type.TObject<{
name: Type.TOptional<Type.TString>;
theme: Type.TOptional<Type.TString>;
emoji: Type.TOptional<Type.TString>;
avatar: Type.TOptional<Type.TString>;
avatarUrl: Type.TOptional<Type.TString>;
}>>;
workspace: Type.TOptional<Type.TString>;
workspaceGit: Type.TOptional<Type.TBoolean>;
model: Type.TOptional<Type.TObject<{
primary: Type.TOptional<Type.TString>;
fallbacks: Type.TOptional<Type.TArray<Type.TString>>;
}>>;
agentRuntime: Type.TOptional<Type.TObject<{
id: Type.TString;
fallback: Type.TOptional<Type.TUnion<[Type.TLiteral<"openclaw">, Type.TLiteral<"none">]>>;
cloudPlacementSupported: Type.TOptional<Type.TBoolean>;
cloudPlacementExecutionMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"worker-turn">, Type.TLiteral<"remote-exec">]>>;
devicePlacement: Type.TOptional<Type.TObject<{
requiredNodeCommands: Type.TArray<Type.TString>;
consumesWorkerSlot: Type.TBoolean;
}>>;
devicePlacementSupported: Type.TOptional<Type.TBoolean>;
source: Type.TUnion<[Type.TLiteral<"env">, Type.TLiteral<"agent">, Type.TLiteral<"defaults">, Type.TLiteral<"model">, Type.TLiteral<"provider">, Type.TLiteral<"implicit">, Type.TLiteral<"session">, Type.TLiteral<"session-key">]>;
}>>;
thinkingLevels: Type.TOptional<Type.TArray<Type.TObject<{
id: Type.TString;
label: Type.TString;
}>>>;
thinkingOptions: Type.TOptional<Type.TArray<Type.TString>>;
thinkingDefault: Type.TOptional<Type.TString>;
defaultPermissionMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"read-only">, Type.TLiteral<"guarded">, Type.TLiteral<"workspace">, Type.TLiteral<"full">]>>;
}>;
declare const ToolsGitHubAuthorizeStartResultSchema: Type.TObject<{
requestId: Type.TString;
userCode: Type.TString;
verificationUri: Type.TLiteral<"https://github.com/login/device">;
expiresInMs: Type.TInteger;
pollAfterMs: Type.TInteger;
}>;
declare const ToolsGitHubAuthorizePollResultSchema: Type.TUnion<[Type.TObject<{
status: Type.TLiteral<"pending">;
retryAfterMs: Type.TInteger;
}>, Type.TObject<{
status: Type.TLiteral<"slow_down">;
retryAfterMs: Type.TInteger;
}>, Type.TObject<{
status: Type.TLiteral<"access_denied">;
}>, Type.TObject<{
status: Type.TLiteral<"expired">;
}>, Type.TObject<{
status: Type.TLiteral<"incorrect_device_code">;
}>, Type.TObject<{
status: Type.TLiteral<"network_error">;
retryAfterMs: Type.TInteger;
}>, Type.TObject<{
status: Type.TLiteral<"failed">;
reason: Type.TUnion<[Type.TLiteral<"identity_changed">, Type.TLiteral<"setup_failed">]>;
}>, Type.TObject<{
status: Type.TLiteral<"success">;
githubStatus: Type.TObject<{
agentId: Type.TString;
selectedScope: Type.TUnion<[Type.TLiteral<"system">, Type.TLiteral<"agent">]>;
selected: Type.TObject<{
scope: Type.TUnion<[Type.TLiteral<"system">, Type.TLiteral<"agent">]>;
configured: Type.TBoolean;
identity: Type.TUnion<[Type.TObject<{
source: Type.TUnion<[Type.TLiteral<"system-detected">, Type.TLiteral<"system-configured">, Type.TLiteral<"agent-override">]>;
credentialKind: Type.TUnion<[Type.TLiteral<"native">, Type.TLiteral<"managed-pat">, Type.TLiteral<"managed-oauth">]>;
credentialState: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"unavailable">, Type.TLiteral<"configured_unavailable">, Type.TLiteral<"unverified">, Type.TLiteral<"rate_limited">]>;
account: Type.TUnion<[Type.TObject<{
login: Type.TString;
}>, Type.TNull]>;
gitAuthor: Type.TObject<{
name: Type.TUnion<[Type.TString, Type.TNull]>;
email: Type.TUnion<[Type.TString, Type.TNull]>;
}>;
evidence: Type.TUnion<[Type.TLiteral<"github-api">, Type.TLiteral<"none">, Type.TLiteral<"unverified">, Type.TLiteral<"rate-limited">]>;
accessExpiresAtMs: Type.TUnion<[Type.TInteger, Type.TNull]>;
refreshState: Type.TUnion<[Type.TLiteral<"not_applicable">, Type.TLiteral<"available">, Type.TLiteral<"expired">, Type.TLiteral<"unavailable">, Type.TLiteral<"refreshing">, Type.TLiteral<"failed">]>;
oauthScopes: Type.TArray<Type.TString>;
repositoryGrants: Type.TLiteral<"unknown">;
}>, Type.TNull]>;
}>;
effective: Type.TObject<{
source: Type.TUnion<[Type.TLiteral<"system-detected">, Type.TLiteral<"system-configured">, Type.TLiteral<"agent-override">]>;
credentialKind: Type.TUnion<[Type.TLiteral<"native">, Type.TLiteral<"managed-pat">, Type.TLiteral<"managed-oauth">]>;
credentialState: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"unavailable">, Type.TLiteral<"configured_unavailable">, Type.TLiteral<"unverified">, Type.TLiteral<"rate_limited">]>;
account: Type.TUnion<[Type.TObject<{
login: Type.TString;
}>, Type.TNull]>;
gitAuthor: Type.TObject<{
name: Type.TUnion<[Type.TString, Type.TNull]>;
email: Type.TUnion<[Type.TString, Type.TNull]>;
}>;
evidence: Type.TUnion<[Type.TLiteral<"github-api">, Type.TLiteral<"none">, Type.TLiteral<"unverified">, Type.TLiteral<"rate-limited">]>;
accessExpiresAtMs: Type.TUnion<[Type.TInteger, Type.TNull]>;
refreshState: Type.TUnion<[Type.TLiteral<"not_applicable">, Type.TLiteral<"available">, Type.TLiteral<"expired">, Type.TLiteral<"unavailable">, Type.TLiteral<"refreshing">, Type.TLiteral<"failed">]>;
oauthScopes: Type.TArray<Type.TString>;
repositoryGrants: Type.TLiteral<"unknown">;
}>;
}>;
}>]>;
type AgentSummary = Static<typeof AgentSummarySchema>;
type ToolsGitHubAuthorizeStartResult = Static<typeof ToolsGitHubAuthorizeStartResultSchema>;
type ToolsGitHubAuthorizePollResult = Static<typeof ToolsGitHubAuthorizePollResultSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/users.d.ts
declare const UsersListModelAccountsResultSchema: Type.TObject<{
profileId: Type.TString;
accounts: Type.TArray<Type.TObject<{
authProfileId: Type.TString;
provider: Type.TString;
label: Type.TString;
authType: Type.TUnion<[Type.TLiteral<"api_key">, Type.TLiteral<"oauth">, Type.TLiteral<"token">]>;
selected: Type.TBoolean;
}>>;
nextCursor: Type.TOptional<Type.TString>;
links: Type.TArray<Type.TObject<{
provider: Type.TString;
authProfileId: Type.TString;
updatedAt: Type.TInteger;
}>>;
}>;
declare const UsersSelectModelAccountResultSchema: Type.TObject<{
links: Type.TArray<Type.TObject<{
provider: Type.TString;
authProfileId: Type.TString;
updatedAt: Type.TInteger;
}>>;
}>;
/** Configured preference only; provider failover can use a different account. */
declare const ChatAccountSelectionSchema: Type.TUnion<[Type.TObject<{
kind: Type.TLiteral<"automatic">;
label: Type.TString;
}>, Type.TObject<{
kind: Type.TLiteral<"personal">;
label: Type.TString;
authProfileId: Type.TOptional<Type.TString>;
source: Type.TOptional<Type.TUnion<[Type.TLiteral<"auto">, Type.TLiteral<"user">, Type.TLiteral<"user-link">]>>;
}>, Type.TObject<{
kind: Type.TLiteral<"shared">;
label: Type.TString;
authProfileId: Type.TString;
source: Type.TOptional<Type.TUnion<[Type.TLiteral<"auto">, Type.TLiteral<"user">, Type.TLiteral<"user-link">]>>;
}>]>;
declare const UsersListAuthLinksResultSchema: Type.TObject<{
links: Type.TArray<Type.TObject<{
provider: Type.TString;
authProfileId: Type.TString;
updatedAt: Type.TInteger;
}>>;
}>;
declare const UsersLinkAuthProfileResultSchema: Type.TObject<{
links: Type.TArray<Type.TObject<{
provider: Type.TString;
authProfileId: Type.TString;
updatedAt: Type.TInteger;
}>>;
}>;
declare const UsersUnlinkAuthProfileResultSchema: Type.TObject<{
links: Type.TArray<Type.TObject<{
provider: Type.TString;
authProfileId: Type.TString;
updatedAt: Type.TInteger;
}>>;
}>;
declare const UsersAuthConnectCatalogResultSchema: Type.TObject<{
providers: Type.TArray<Type.TObject<{
id: Type.TString;
label: Type.TString;
methods: Type.TArray<Type.TObject<{
id: Type.TString;
label: Type.TString;
hint: Type.TOptional<Type.TString>;
}>>;
}>>;
}>;
declare const UsersAuthConnectStartResultSchema: Type.TObject<{
connectId: Type.TString;
expiresAtMs: Type.TInteger;
}>;
declare const UsersAuthConnectStatusResultSchema: Type.TUnion<[Type.TObject<{
status: Type.TLiteral<"pending">;
step: Type.TOptional<Type.TObject<{
id: Type.TString;
type: Type.TUnion<[Type.TLiteral<"note">, Type.TLiteral<"select">, Type.TLiteral<"text">, Type.TLiteral<"confirm">, Type.TLiteral<"multiselect">, Type.TLiteral<"progress">, Type.TLiteral<"action">]>;
title: Type.TOptional<Type.TString>;
message: Type.TOptional<Type.TString>;
format: Type.TOptional<Type.TUnion<[Type.TLiteral<"plain">]>>;
options: Type.TOptional<Type.TArray<Type.TObject<{
value: Type.TUnknown;
label: Type.TString;
hint: Type.TOptional<Type.TString>;
}>>>;
initialValue: Type.TOptional<Type.TUnknown>;
placeholder: Type.TOptional<Type.TString>;
sensitive: Type.TOptional<Type.TBoolean>;
executor: Type.TOptional<Type.TUnion<[Type.TLiteral<"gateway">, Type.TLiteral<"client">]>>;
externalUrl: Type.TOptional<Type.TString>;
deviceCode: Type.TOptional<Type.TObject<{
code: Type.TString;
expiresInMinutes: Type.TOptional<Type.TInteger>;
message: Type.TOptional<Type.TString>;
}>>;
}>>;
error: Type.TOptional<Type.TString>;
}>, Type.TObject<{
status: Type.TLiteral<"connected">;
authProfileId: Type.TString;
links: Type.TArray<Type.TObject<{
provider: Type.TString;
authProfileId: Type.TString;
updatedAt: Type.TInteger;
}>>;
}>, Type.TObject<{
status: Type.TLiteral<"cancelled">;
}>, Type.TObject<{
status: Type.TLiteral<"expired">;
}>, Type.TObject<{
status: Type.TLiteral<"failed">;
reason: Type.TUnion<[Type.TLiteral<"exchange">, Type.TLiteral<"identity">, Type.TLiteral<"authority">, Type.TLiteral<"unavailable">]>;
}>]>;
type UsersListModelAccountsResult = Static<typeof UsersListModelAccountsResultSchema>;
type UsersSelectModelAccountResult = Static<typeof UsersSelectModelAccountResultSchema>;
type ChatAccountSelection = Static<typeof ChatAccountSelectionSchema>;
type UsersAuthConnectStartResult = Static<typeof UsersAuthConnectStartResultSchema>;
type UsersAuthConnectCatalogResult = Static<typeof UsersAuthConnectCatalogResultSchema>;
type UsersAuthConnectStatusResult = Static<typeof UsersAuthConnectStatusResultSchema>;
type UsersListAuthLinksResult = Static<typeof UsersListAuthLinksResultSchema>;
type UsersLinkAuthProfileResult = Static<typeof UsersLinkAuthProfileResultSchema>;
type UsersUnlinkAuthProfileResult = Static<typeof UsersUnlinkAuthProfileResultSchema>;
declare const UsersGitHubAuthorizeStartResultSchema: Type.TObject<{
requestId: Type.TString;
userCode: Type.TString;
verificationUri: Type.TLiteral<"https://github.com/login/device">;
expiresInMs: Type.TInteger;
pollAfterMs: Type.TInteger;
}>;
declare const PersonalGitHubStatusSchema: Type.TObject<{
state: Type.TUnion<[Type.TLiteral<"connected">, Type.TLiteral<"disconnected">, Type.TLiteral<"unavailable">]>;
generation: Type.TUnion<[Type.TString, Type.TNull]>;
account: Type.TUnion<[Type.TObject<{
accountId: Type.TInteger;
login: Type.TString;
}>, Type.TNull]>;
accessExpiresAtMs: Type.TUnion<[Type.TInteger, Type.TNull]>;
refreshState: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"refreshing">, Type.TLiteral<"expired">, Type.TLiteral<"failed">, Type.TLiteral<"not_applicable">]>;
pending: Type.TUnion<[Type.TObject<{
requestId: Type.TString;
userCode: Type.TString;
verificationUri: Type.TLiteral<"https://github.com/login/device">;
expiresInMs: Type.TInteger;
pollAfterMs: Type.TInteger;
}>, Type.TNull]>;
}>;
declare const UsersGitHubAuthorizePollResultSchema: Type.TUnion<[Type.TObject<{
status: Type.TLiteral<"pending">;
retryAfterMs: Type.TInteger;
}>, Type.TObject<{
status: Type.TLiteral<"slow_down">;
retryAfterMs: Type.TInteger;
}>, Type.TObject<{
status: Type.TLiteral<"access_denied">;
}>, Type.TObject<{
status: Type.TLiteral<"expired">;
}>, Type.TObject<{
status: Type.TLiteral<"incorrect_device_code">;
}>, Type.TObject<{
status: Type.TLiteral<"network_error">;
retryAfterMs: Type.TInteger;
}>, Type.TObject<{
status: Type.TLiteral<"failed">;
reason: Type.TUnion<[Type.TLiteral<"identity_changed">, Type.TLiteral<"setup_failed">]>;
}>, Type.TObject<{
status: Type.TLiteral<"success">;
personal: Type.TObject<{
state: Type.TUnion<[Type.TLiteral<"connected">, Type.TLiteral<"disconnected">, Type.TLiteral<"unavailable">]>;
generation: Type.TUnion<[Type.TString, Type.TNull]>;
account: Type.TUnion<[Type.TObject<{
accountId: Type.TInteger;
login: Type.TString;
}>, Type.TNull]>;
accessExpiresAtMs: Type.TUnion<[Type.TInteger, Type.TNull]>;
refreshState: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"refreshing">, Type.TLiteral<"expired">, Type.TLiteral<"failed">, Type.TLiteral<"not_applicable">]>;
pending: Type.TUnion<[Type.TObject<{
requestId: Type.TString;
userCode: Type.TString;
verificationUri: Type.TLiteral<"https://github.com/login/device">;
expiresInMs: Type.TInteger;
pollAfterMs: Type.TInteger;
}>, Type.TNull]>;
}>;
}>]>;
type PersonalGitHubStatus = Static<typeof PersonalGitHubStatusSchema>;
type UsersGitHubAuthorizeStartResult = Static<typeof UsersGitHubAuthorizeStartResultSchema>;
type UsersGitHubAuthorizePollResult = Static<typeof UsersGitHubAuthorizePollResultSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/openclaw.d.ts
declare const SystemAgentWizardCancelSchema: Type.TObject<{
/** The visible step this action belongs to; stale controls must not affect a newer step. */
stepId: Type.TString;
}>;
/**
* Structured choice attached to a chat reply. Card-capable clients render the
* options and send back `reply` (default: `label`) as the next message; text
* clients ignore this and use the reply prose, which always stands alone.
*/
declare const SystemAgentChatQuestionSchema: Type.TObject<{
id: Type.TString;
header: Type.TString;
question: Type.TString;
options: Type.TArray<Type.TObject<{
label: Type.TString;
description: Type.TOptional<Type.TString>;
recommended: Type.TOptional<Type.TBoolean>;
/** Message text a client sends when this option is chosen; defaults to label. */
reply: Type.TOptional<Type.TString>;
}>>;
/** Free-text answers are also accepted for this question. */
isOther: Type.TOptional<Type.TBoolean>;
/** Client-owned action for the visible skip control; omitted means send a reply. */
skipAction: Type.TOptional<Type.TLiteral<"exit">>;
}>;
type SystemAgentWizardCancel = Static<typeof SystemAgentWizardCancelSchema>;
type SystemAgentChatQuestion = Static<typeof SystemAgentChatQuestionSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/cron.d.ts
/** One persisted cron run history entry. */
declare const CronRunLogEntrySchema: Type.TObject<{
ts: Type.TInteger;
jobId: Type.TString;
action: Type.TLiteral<"finished">;
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"error">, Type.TLiteral<"skipped">]>>;
completionStatus: Type.TOptional<Type.TUnion<[Type.TLiteral<"succeeded">, Type.TLiteral<"failed">, Type.TLiteral<"unknown">]>>;
error: Type.TOptional<Type.TString>;
errorReason: Type.TOptional<Type.TUnion<[Type.TLiteral<"auth">, Type.TLiteral<"auth_permanent">, Type.TLiteral<"format">, Type.TLiteral<"rate_limit">, Type.TLiteral<"overloaded">, Type.TLiteral<"billing">, Type.TLiteral<"server_error">, Type.TLiteral<"timeout">, Type.TLiteral<"tls_certificate">, Type.TLiteral<"context_overflow">, Type.TLiteral<"model_not_found">, Type.TLiteral<"session_expired">, Type.TLiteral<"empty_response">, Type.TLiteral<"no_error_details">, Type.TLiteral<"unclassified">, Type.TLiteral<"unknown">]>>;
summary: Type.TOptional<Type.TString>;
diagnostics: Type.TOptional<Type.TObject<{
summary: Type.TOptional<Type.TString>;
entries: Type.TArray<Type.TObject<{
ts: Type.TInteger;
source: Type.TUnion<[Type.TLiteral<"cron-preflight">, Type.TLiteral<"cron-setup">, Type.TLiteral<"model-preflight">, Type.TLiteral<"agent-run">, Type.TLiteral<"tool">, Type.TLiteral<"exec">, Type.TLiteral<"delivery">]>;
severity: Type.TUnion<[Type.TLiteral<"info">, Type.TLiteral<"warn">, Type.TLiteral<"error">]>;
message: Type.TString;
toolName: Type.TOptional<Type.TString>;
exitCode: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
truncated: Type.TOptional<Type.TBoolean>;
}>>;
}>>;
delivered: Type.TOptional<Type.TBoolean>;
deliveryStatus: Type.TOptional<Type.TUnion<[Type.TLiteral<"delivered">, Type.TLiteral<"not-delivered">, Type.TLiteral<"unknown">, Type.TLiteral<"not-requested">]>>;
deliveryError: Type.TOptional<Type.TString>;
deliverySuppressionReason: Type.TOptional<Type.TString>;
failureNotificationDelivery: Type.TOptional<Type.TObject<{
delivered: Type.TOptional<Type.TBoolean>;
status: Type.TUnion<[Type.TLiteral<"delivered">, Type.TLiteral<"not-delivered">, Type.TLiteral<"unknown">, Type.TLiteral<"not-requested">]>;
error: Type.TOptional<Type.TString>;
}>>;
delivery: Type.TOptional<Type.TObject<{
intended: Type.TOptional<Type.TObject<{
channel: Type.TOptional<Type.TString>;
to: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
accountId: Type.TOptional<Type.TString>;
threadId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNumber]>>;
source: Type.TOptional<Type.TUnion<[Type.TLiteral<"explicit">, Type.TLiteral<"last">]>>;
}>>;
resolved: Type.TOptional<Type.TObject<{
channel: Type.TOptional<Type.TString>;
to: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
accountId: Type.TOptional<Type.TString>;
threadId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNumber]>>;
source: Type.TOptional<Type.TUnion<[Type.TLiteral<"explicit">, Type.TLiteral<"last">]>>;
ok: Type.TBoolean;
error: Type.TOptional<Type.TString>;
}>>;
messageToolSentTo: Type.TOptional<Type.TArray<Type.TObject<{
channel: Type.TString;
to: Type.TOptional<Type.TString>;
accountId: Type.TOptional<Type.TString>;
threadId: Type.TOptional<Type.TString>;
}>>>;
fallbackUsed: Type.TOptional<Type.TBoolean>;
delivered: Type.TOptional<Type.TBoolean>;
}>>;
sessionId: Type.TOptional<Type.TString>;
sessionKey: Type.TOptional<Type.TString>;
runId: Type.TOptional<Type.TString>;
runAtMs: Type.TOptional<Type.TInteger>;
durationMs: Type.TOptional<Type.TInteger>;
nextRunAtMs: Type.TOptional<Type.TInteger>;
triggerFired: Type.TOptional<Type.TBoolean>;
model: Type.TOptional<Type.TString>;
provider: Type.TOptional<Type.TString>;
usage: Type.TOptional<Type.TObject<{
input_tokens: Type.TOptional<Type.TNumber>;
output_tokens: Type.TOptional<Type.TNumber>;
total_tokens: Type.TOptional<Type.TNumber>;
cache_read_tokens: Type.TOptional<Type.TNumber>;
cache_write_tokens: Type.TOptional<Type.TNumber>;
}>>;
jobName: Type.TOptional<Type.TString>;
}>;
//#endregion
//#region packages/gateway-protocol/src/schema/cron.types.d.ts
type CronRunLogEntry = Static<typeof CronRunLogEntrySchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/devices.d.ts
/** Returns the terminal scope-upgrade state to the identity-bound waiter. */
declare const ScopeUpgradeResultSchema: Type.TUnion<[Type.TObject<{
status: Type.TLiteral<"approved">;
requestId: Type.TString;
deviceToken: Type.TString;
scopes: Type.TArray<Type.TString>;
}>, Type.TObject<{
status: Type.TLiteral<"rejected">;
requestId: Type.TString;
}>, Type.TObject<{
status: Type.TLiteral<"expired">;
requestId: Type.TString;
}>]>;
type ScopeUpgradeResult = Static<typeof ScopeUpgradeResultSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/human-mentions.d.ts
/** Explicit selections bound to UTF-16 offsets in the submitted message text. */
declare const HumanMentionSchema: Type.TObject<{
profileId: Type.TString;
start: Type.TInteger;
end: Type.TInteger;
}>;
declare const UsersMentionableParamsSchema: Type.TUnion<[Type.TObject<{
sessionKey: Type.TString;
agentId: Type.TOptional<Type.TString>;
query: Type.TOptional<Type.TString>;
}>, Type.TObject<{
agentId: Type.TString;
visibility: Type.TOptional<Type.TUnion<[Type.TLiteral<"shared">, Type.TLiteral<"read-only">, Type.TLiteral<"suggest">, Type.TLiteral<"draft">]>>;
query: Type.TOptional<Type.TString>;
}>]>;
declare const UsersMentionableResultSchema: Type.TObject<{
users: Type.TArray<Type.TObject<{
profileId: Type.TString;
displayName: Type.TString;
avatarUrl: Type.TOptional<Type.TString>;
online: Type.TBoolean;
}>>;
truncated: Type.TBoolean;
}>;
declare const MentionsListResultSchema: Type.TObject<{
gatewayInstanceId: Type.TString;
revision: Type.TInteger;
items: Type.TArray<Type.TObject<{
id: Type.TString;
senderProfileId: Type.TString;
senderLabel: Type.TString;
senderAvatarUrl: Type.TOptional<Type.TString>;
sessionKey: Type.TString;
agentId: Type.TString;
sessionTitle: Type.TString;
messageId: Type.TString;
createdAt: Type.TInteger;
expiresAt: Type.TInteger;
excerpt: Type.TOptional<Type.TString>;
}>>;
}>;
type HumanMention = Static<typeof HumanMentionSchema>;
type UsersMentionableParams = Static<typeof UsersMentionableParamsSchema>;
type UsersMentionableResult = Static<typeof UsersMentionableResultSchema>;
type MentionsListResult = Static<typeof MentionsListResultSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/questions.d.ts
/** Canonical normalized question shown to an operator. */
declare const QuestionSchema: Type.TObject<{
questionId: Type.TString;
header: Type.TString;
question: Type.TString;
options: Type.TArray<Type.TObject<{
label: Type.TString;
description: Type.TOptional<Type.TString>;
}>>;
multiSelect: Type.TOptional<Type.TBoolean>;
isOther: Type.TOptional<Type.TBoolean>;
isSecret: Type.TOptional<Type.TBoolean>;
secretStore: Type.TOptional<Type.TObject<{
name: Type.TString;
kind: Type.TUnion<[Type.TLiteral<"secret">, Type.TLiteral<"env">]>;
allowedHosts: Type.TOptional<Type.TArray<Type.TString>>;
reason: Type.TOptional<Type.TString>;
}>>;
secretStoreExisting: Type.TOptional<Type.TObject<{
updatedAtMs: Type.TInteger;
updatedBy: Type.TOptional<Type.TString>;
}>>;
}>;
declare const QuestionAnswersSchema: Type.TObject<{
answers: Type.TRecord<"^.*$", Type.TArray<Type.TString>>;
}>;
/**
* One pending or recently resolved transient question request. Flat object with
* optional terminal fields (exec-approval record precedent): native protocol
* codegen cannot emit per-status object unions, and the manager owns the
* status/answers invariant (answers present only when status is "answered").
*/
declare const QuestionRecordSchema: Type.TObject<{
id: Type.TString;
questions: Type.TArray<Type.TObject<{
questionId: Type.TString;
header: Type.TString;
question: Type.TString;
options: Type.TArray<Type.TObject<{
label: Type.TString;
description: Type.TOptional<Type.TString>;
}>>;
multiSelect: Type.TOptional<Type.TBoolean>;
isOther: Type.TOptional<Type.TBoolean>;
isSecret: Type.TOptional<Type.TBoolean>;
secretStore: Type.TOptional<Type.TObject<{
name: Type.TString;
kind: Type.TUnion<[Type.TLiteral<"secret">, Type.TLiteral<"env">]>;
allowedHosts: Type.TOptional<Type.TArray<Type.TString>>;
reason: Type.TOptional<Type.TString>;
}>>;
secretStoreExisting: Type.TOptional<Type.TObject<{
updatedAtMs: Type.TInteger;
updatedBy: Type.TOptional<Type.TString>;
}>>;
}>>;
agentId: Type.TOptional<Type.TString>;
sessionKey: Type.TOptional<Type.TString>;
runId: Type.TOptional<Type.TString>;
createdAtMs: Type.TInteger;
expiresAtMs: Type.TInteger;
status: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"answered">, Type.TLiteral<"cancelled">, Type.TLiteral<"expired">]>;
answers: Type.TOptional<Type.TObject<{
answers: Type.TRecord<"^.*$", Type.TArray<Type.TString>>;
}>>;
resolvedBy: Type.TOptional<Type.TString>;
}>;
declare const QuestionWaitAnswerResultSchema: Type.TUnion<[Type.TObject<{
status: Type.TLiteral<"pending">;
}>, Type.TObject<{
status: Type.TLiteral<"answered">;
answers: Type.TObject<{
answers: Type.TRecord<"^.*$", Type.TArray<Type.TString>>;
}>;
resolutionId: Type.TOptional<Type.TString>;
}>, Type.TObject<{
status: Type.TLiteral<"cancelled">;
}>, Type.TObject<{
status: Type.TLiteral<"expired">;
}>]>;
declare const QuestionResolveResultSchema: Type.TUnion<[Type.TObject<{
status: Type.TLiteral<"answered">;
answers: Type.TObject<{
answers: Type.TRecord<"^.*$", Type.TArray<Type.TString>>;
}>;
}>, Type.TObject<{
status: Type.TLiteral<"cancelled">;
}>]>;
declare const QuestionResolvedEventSchema: Type.TUnion<[Type.TObject<{
id: Type.TString;
status: Type.TLiteral<"answered">;
answers: Type.TObject<{
answers: Type.TRecord<"^.*$", Type.TArray<Type.TString>>;
}>;
}>, Type.TObject<{
id: Type.TString;
status: Type.TLiteral<"cancelled">;
}>, Type.TObject<{
id: Type.TString;
status: Type.TLiteral<"expired">;
}>]>;
type Question = Static<typeof QuestionSchema>;
type QuestionAnswers = Static<typeof QuestionAnswersSchema>;
type QuestionRecord = Static<typeof QuestionRecordSchema>;
type QuestionWaitAnswerResult = Static<typeof QuestionWaitAnswerResultSchema>;
type QuestionResolveResult = Static<typeof QuestionResolveResultSchema>;
type QuestionResolvedEvent = Static<typeof QuestionResolvedEventSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/session-placement.d.ts
declare const SessionPlacementDiskSpaceSchema: Type.TObject<{
status: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"warning">, Type.TLiteral<"critical">]>;
availableBytes: Type.TInteger;
totalBytes: Type.TInteger;
observedAtMs: Type.TInteger;
}>;
declare const SessionPlacementRunnerSchema: Type.TObject<{
kind: Type.TLiteral<"device">;
status: Type.TUnion<[Type.TLiteral<"available">, Type.TLiteral<"offline">]>;
deviceId: Type.TOptional<Type.TString>;
}>;
/** Closed destination union for session placement moves. */
declare const SessionMoveTargetSchema: Type.TUnion<[Type.TObject<{
kind: Type.TLiteral<"gateway">;
}>, Type.TObject<{
kind: Type.TLiteral<"profile">;
profileId: Type.TString;
machineClass: Type.TOptional<Type.TString>;
}>, Type.TObject<{
kind: Type.TLiteral<"device">;
deviceId: Type.TString;
}>]>;
type SessionPlacementDiskSpace = Static<typeof SessionPlacementDiskSpaceSchema>;
type SessionPlacementRunner = Static<typeof SessionPlacementRunnerSchema>;
type SessionMoveTarget = Static<typeof SessionMoveTargetSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/sessions-list.d.ts
declare const SessionsListParamsSchema: Type.TObject<{
/** Maximum rows to return; omitted Gateway RPC calls use a bounded default. */
limit: Type.TOptional<Type.TInteger>;
offset: Type.TOptional<Type.TInteger>;
activeMinutes: Type.TOptional<Type.TInteger>;
/** Require a real user/channel interaction; excludes synthetic isolated heartbeat rows. */
requireLastInteraction: Type.TOptional<Type.TBoolean>;
sortBy: Type.TOptional<Type.TUnion<[Type.TLiteral<"updatedAt">, Type.TLiteral<"lastInteractionAt">]>>;
includeGlobal: Type.TOptional<Type.TBoolean>;
includeUnknown: Type.TOptional<Type.TBoolean>;
/** Limit agent-scoped rows to agents currently present in config. */
configuredAgentsOnly: Type.TOptional<Type.TBoolean>;
/**
* Read a bounded transcript head projection to derive a title from the first user message.
* Use `limit` to bound projection work on large stores.
*/
includeDerivedTitles: Type.TOptional<Type.TBoolean>;
/**
* Read a bounded transcript tail projection for the latest visible user or assistant text.
* The returned short preview excludes tool, system, reasoning, and silent rows.
*/
includeLastMessage: Type.TOptional<Type.TBoolean>;
label: Type.TOptional<Type.TString>;
/** Limit rows to sessions with an explicitly stored Control UI face preference. */
boardFace: Type.TOptional<Type.TUnion<[Type.TLiteral<"chat">, Type.TLiteral<"dashboard">]>>;
/** Limit rows by whether a persisted session dashboard exists. */
hasBoard: Type.TOptional<Type.TBoolean>;
/** Filter rows by their immutable creator provenance. */
creatorId: Type.TOptional<Type.TString>;
/** Filter rows by their current assignable owner identity. */
ownerId: Type.TOptional<Type.TString>;
/** Prepend the authenticated viewer's owned rows to the normal first page. */
ownerFirst: Type.TOptional<Type.TBoolean>;
/** Limit rows to sessions owned by or previously prompted by the authenticated viewer. */
involvingMe: Type.TOptional<Type.TBoolean>;
/** Profile association filter, applied to visible retained identities before pagination. */
involvingProfileId: Type.TOptional<Type.TString>;
/** Include a bounded people facet over visible matching sessions before the profile filter. */
includePeople: Type.TOptional<Type.TBoolean>;
spawnedBy: Type.TOptional<Type.TString>;
agentId: Type.TOptional<Type.TString>;
search: Type.TOptional<Type.TString>;
/**
* True lists archived sessions; "all" lists archived and active;
* false or omitted lists active sessions.
*/
archived: Type.TOptional<Type.TUnion<[Type.TBoolean, Type.TLiteral<"all">]>>;
}>;
type SessionsListParams = Static<typeof SessionsListParamsSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/sessions.d.ts
/** Live session status judgment broadcast to subscribed operator clients. */
declare const SessionObserverDigestSchema: Type.TObject<{
sessionKey: Type.TString;
agentId: Type.TOptional<Type.TString>;
runId: Type.TOptional<Type.TString>;
revision: Type.TInteger;
updatedAt: Type.TInteger;
headline: Type.TString;
assessment: Type.TOptional<Type.TString>;
health: Type.TUnion<[Type.TLiteral<"on-track">, Type.TLiteral<"grinding">, Type.TLiteral<"stuck">, Type.TLiteral<"waiting-on-user">, Type.TLiteral<"wrapping-up">, Type.TLiteral<"done">, Type.TLiteral<"failed">]>;
planProgress: Type.TOptional<Type.TObject<{
completed: Type.TInteger;
total: Type.TInteger;
}>>;
}>;
/** Companion answer returned only to the requesting operator. */
declare const SessionsCompanionAskResultSchema: Type.TObject<{
answer: Type.TString;
ts: Type.TInteger;
}>;
/** Current bounded exchanges for one session companion thread. */
declare const SessionsCompanionStateResultSchema: Type.TObject<{
exchanges: Type.TArray<Type.TObject<{
question: Type.TString;
answer: Type.TString;
ts: Type.TInteger;
}>>;
}>;
type SessionObserverDigest = Static<typeof SessionObserverDigestSchema>;
type SessionsCompanionAskResult = Static<typeof SessionsCompanionAskResultSchema>;
type SessionsCompanionStateResult = Static<typeof SessionsCompanionStateResultSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/snapshot.d.ts
/** Initial and incremental gateway state snapshot payload. */
declare const SnapshotSchema: Type.TObject<{
suspension: Type.TOptional<Type.TObject<{
phase: Type.TUnion<[Type.TLiteral<"accepting">, Type.TLiteral<"preparing">, Type.TLiteral<"draining">, Type.TLiteral<"prepared">]>;
}>>;
presence: Type.TArray<Type.TObject<{
host: Type.TOptional<Type.TString>;
ip: Type.TOptional<Type.TString>;
version: Type.TOptional<Type.TString>;
platform: Type.TOptional<Type.TString>;
deviceFamily: Type.TOptional<Type.TString>;
modelIdentifier: Type.TOptional<Type.TString>;
timeZone: Type.TOptional<Type.TString>;
mode: Type.TOptional<Type.TString>;
lastInputSeconds: Type.TOptional<Type.TInteger>;
reason: Type.TOptional<Type.TString>;
tags: Type.TOptional<Type.TArray<Type.TString>>;
text: Type.TOptional<Type.TString>;
/** Heartbeat freshness, not online duration or user activity. */
ts: Type.TInteger;
/** Server timestamps for the person's continuous online interval and last accepted activity. */
onlineSince: Type.TOptional<Type.TInteger>;
lastActivityAt: Type.TOptional<Type.TInteger>;
deviceId: Type.TOptional<Type.TString>;
roles: Type.TOptional<Type.TArray<Type.TString>>;
scopes: Type.TOptional<Type.TArray<Type.TString>>;
instanceId: Type.TOptional<Type.TString>;
user: Type.TOptional<Type.TObject<{
/** Canonical profile id when resolved, otherwise authenticated identity; grouping also uses identity qualification. */
id: Type.TString;
identity: Type.TOptional<Type.TObject<{
type: Type.TLiteral<"profile">;
id: Type.TString;
}>>;
email: Type.TOptional<Type.TString>;
name: Type.TOptional<Type.TString>;
avatarUrl: Type.TOptional<Type.TString>;
}>>;
/** Sessions this connection declares it is viewing, independent of transport subscriptions. Sorted lexicographically. */
watchedSessions: Type.TOptional<Type.TArray<Type.TString>>;
}>>;
health: Type.TObject<{
ok: Type.TOptional<Type.TLiteral<true>>;
ts: Type.TOptional<Type.TInteger>;
durationMs: Type.TOptional<Type.TInteger>;
eventLoop: Type.TOptional<Type.TObject<{
degraded: Type.TBoolean;
degradedSinceMs: Type.TOptional<Type.TUnion<[Type.TInteger, Type.TNull]>>;
reasons: Type.TArray<Type.TUnion<[Type.TLiteral<"event_loop_delay">, Type.TLiteral<"event_loop_utilization">, Type.TLiteral<"cpu">]>>;
intervalMs: Type.TNumber;
delayP99Ms: Type.TNumber;
delayMaxMs: Type.TNumber;
utilization: Type.TNumber;
cpuCoreRatio: Type.TNumber;
}>>;
plugins: Type.TOptional<Type.TObject<{
loaded: Type.TArray<Type.TString>;
errors: Type.TArray<Type.TObject<{
id: Type.TString;
origin: Type.TString;
activated: Type.TBoolean;
activationSource: Type.TOptional<Type.TString>;
activationReason: Type.TOptional<Type.TString>;
failurePhase: Type.TOptional<Type.TString>;
error: Type.TString;
}>>;
unavailable: Type.TOptional<Type.TArray<Type.TObject<{
id: Type.TString;
state: Type.TLiteral<"configured-unavailable">;
diagnostic: Type.TObject<{
kind: Type.TLiteral<"plugin-verification">;
reason: Type.TString;
detail: Type.TString;
}>;
}>>>;
}>>;
contextEngines: Type.TOptional<Type.TObject<{
quarantined: Type.TArray<Type.TObject<{
engineId: Type.TString;
owner: Type.TOptional<Type.TString>;
operation: Type.TString;
reason: Type.TString;
failedAt: Type.TInteger;
}>>;
}>>;
deliveryQueues: Type.TOptional<Type.TObject<{
failed: Type.TArray<Type.TObject<{
queueName: Type.TString;
count: Type.TInteger;
oldestFailedAt: Type.TOptional<Type.TInteger>;
}>>;
ingressFailed: Type.TOptional<Type.TArray<Type.TObject<{
channelId: Type.TString;
accountId: Type.TString;
count: Type.TInteger;
oldestFailedAt: Type.TOptional<Type.TInteger>;
}>>>;
ingressPressure: Type.TOptional<Type.TArray<Type.TObject<{
channelId: Type.TString;
accountId: Type.TString;
laneCount: Type.TInteger;
pendingCount: Type.TInteger;
claimedCount: Type.TInteger;
blockedCount: Type.TInteger;
oldestReceivedAt: Type.TInteger;
}>>>;
}>>;
modelPricing: Type.TOptional<Type.TObject<{
state: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"degraded">, Type.TLiteral<"disabled">]>;
sources: Type.TArray<Type.TObject<{
source: Type.TUnion<[Type.TLiteral<"openrouter">, Type.TLiteral<"litellm">, Type.TLiteral<"bootstrap">, Type.TLiteral<"refresh">]>;
state: Type.TUnion<[Type.TLiteral<"ok">, Type.TLiteral<"degraded">]>;
lastFailureAt: Type.TOptional<Type.TInteger>;
detail: Type.TOptional<Type.TString>;
}>>;
lastFailureAt: Type.TOptional<Type.TInteger>;
detail: Type.TOptional<Type.TString>;
}>>;
configReload: Type.TOptional<Type.TObject<{
hotReloadStatus: Type.TUnion<[Type.TLiteral<"active">, Type.TLiteral<"disabled">]>;
}>>;
channels: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
channelOrder: Type.TOptional<Type.TArray<Type.TString>>;
channelLabels: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>;
heartbeatSeconds: Type.TOptional<Type.TInteger>;
defaultAgentId: Type.TOptional<Type.TString>;
agents: Type.TOptional<Type.TArray<Type.TObject<{
agentId: Type.TString;
name: Type.TOptional<Type.TString>;
isDefault: Type.TBoolean;
heartbeat: Type.TObject<{
enabled: Type.TBoolean;
every: Type.TString;
everyMs: Type.TUnion<[Type.TInteger, Type.TNull]>;
prompt: Type.TString;
target: Type.TString;
model: Type.TOptional<Type.TString>;
session: Type.TOptional<Type.TString>;
ackMaxChars: Type.TInteger;
}>;
sessions: Type.TObject<{
path: Type.TString;
count: Type.TInteger;
recent: Type.TArray<Type.TObject<{
key: Type.TString;
updatedAt: Type.TUnion<[Type.TInteger, Type.TNull]>;
age: Type.TUnion<[Type.TInteger, Type.TNull]>;
}>>;
}>;
}>>>;
sessions: Type.TOptional<Type.TObject<{
path: Type.TString;
count: Type.TInteger;
recent: Type.TArray<Type.TObject<{
key: Type.TString;
updatedAt: Type.TUnion<[Type.TInteger, Type.TNull]>;
age: Type.TUnion<[Type.TInteger, Type.TNull]>;
}>>;
}>>;
}>;
stateVersion: Type.TObject<{
presence: Type.TInteger;
health: Type.TInteger;
}>;
uptimeMs: Type.TInteger;
/** Resolved source-config revision accepted by the active Gateway runtime. */
appliedConfigHash: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
configPath: Type.TOptional<Type.TString>;
stateDir: Type.TOptional<Type.TString>;
sessionDefaults: Type.TOptional<Type.TObject<{
defaultAgentId: Type.TString;
modelConfigured: Type.TOptional<Type.TBoolean>;
ownership: Type.TOptional<Type.TUnion<[Type.TLiteral<"sole">, Type.TLiteral<"legacy">, Type.TLiteral<"explicit">]>>;
selectionRequired: Type.TOptional<Type.TBoolean>;
mainKey: Type.TString;
mainSessionKey: Type.TString;
scope: Type.TOptional<Type.TString>;
}>>;
/** Credential-free browser sign-in endpoint advertised to authenticated operators. */
controlUiIdentityUrl: Type.TOptional<Type.TString>;
authMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"none">, Type.TLiteral<"token">, Type.TLiteral<"password">, Type.TLiteral<"trusted-proxy">]>>;
updateAvailable: Type.TOptional<Type.TObject<{
currentVersion: Type.TString;
latestVersion: Type.TString;
channel: Type.TString;
currentSha: Type.TOptional<Type.TString>;
upstreamRef: Type.TOptional<Type.TString>;
upstreamSha: Type.TOptional<Type.TString>;
commitsBehind: Type.TOptional<Type.TInteger>;
commits: Type.TOptional<Type.TArray<Type.TObject<{
sha: Type.TString;
subject: Type.TString;
}>>>;
}>>;
updateSchedule: Type.TOptional<Type.TObject<{
channel: Type.TString;
autoEnabled: Type.TBoolean;
install: Type.TOptional<Type.TObject<{
kind: Type.TUnion<[Type.TLiteral<"package">, Type.TLiteral<"git">, Type.TLiteral<"unknown">]>;
git: Type.TOptional<Type.TUnion<[Type.TObject<{
currentSha: Type.TOptional<Type.TString>;
commitAtMs: Type.TOptional<Type.TInteger>;
installedAtMs: Type.TOptional<Type.TInteger>;
status: Type.TLiteral<"current">;
}>, Type.TObject<{
currentSha: Type.TOptional<Type.TString>;
commitAtMs: Type.TOptional<Type.TInteger>;
installedAtMs: Type.TOptional<Type.TInteger>;
status: Type.TLiteral<"behind">;
commitsBehind: Type.TInteger;
}>, Type.TObject<{
currentSha: Type.TOptional<Type.TString>;
commitAtMs: Type.TOptional<Type.TInteger>;
installedAtMs: Type.TOptional<Type.TInteger>;
status: Type.TLiteral<"ahead">;
commitsAhead: Type.TInteger;
}>, Type.TObject<{
currentSha: Type.TOptional<Type.TString>;
commitAtMs: Type.TOptional<Type.TInteger>;
installedAtMs: Type.TOptional<Type.TInteger>;
status: Type.TLiteral<"diverged">;
commitsAhead: Type.TInteger;
commitsBehind: Type.TInteger;
}>, Type.TObject<{
currentSha: Type.TOptional<Type.TString>;
commitAtMs: Type.TOptional<Type.TInteger>;
installedAtMs: Type.TOptional<Type.TInteger>;
status: Type.TLiteral<"unavailable">;
reason: Type.TUnion<[Type.TLiteral<"fetch-failed">, Type.TLiteral<"no-upstream">, Type.TLiteral<"no-upstream-sha">, Type.TLiteral<"comparison-failed">, Type.TLiteral<"git-unavailable">]>;
}>]>>;
}>>;
target: Type.TOptional<Type.TUnion<[Type.TObject<{
kind: Type.TLiteral<"package">;
version: Type.TString;
}>, Type.TObject<{
kind: Type.TLiteral<"git">;
upstreamRef: Type.TString;
upstreamSha: Type.TString;
commitsBehind: Type.TInteger;
}>]>>;
campaign: Type.TOptional<Type.TObject<{
id: Type.TString;
state: Type.TUnion<[Type.TLiteral<"waiting-for-idle">, Type.TLiteral<"countdown">, Type.TLiteral<"applying">]>;
announcedAtMs: Type.TInteger;
applyAtMs: Type.TOptional<Type.TInteger>;
holdUntilMs: Type.TOptional<Type.TInteger>;
forceAtMs: Type.TInteger;
updatedAtMs: Type.TInteger;
}>>;
}>>;
}>;
type Snapshot = Static<typeof SnapshotSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/portals.d.ts
declare const PortalSummarySchema: Type.TObject<{
id: Type.TString;
title: Type.TString;
port: Type.TInteger;
listenPort: Type.TInteger;
publicUrl: Type.TString;
path: Type.TOptional<Type.TString>;
description: Type.TOptional<Type.TString>;
origin: Type.TOptional<Type.TString>;
createdAtMs: Type.TInteger;
tokenQuery: Type.TOptional<Type.TString>;
url: Type.TOptional<Type.TString>;
}>;
declare const PortalOpenResultSchema: Type.TObject<{
id: Type.TString;
title: Type.TString;
port: Type.TInteger;
listenPort: Type.TInteger;
publicUrl: Type.TString;
path: Type.TOptional<Type.TString>;
description: Type.TOptional<Type.TString>;
origin: Type.TOptional<Type.TString>;
createdAtMs: Type.TInteger;
tokenQuery: Type.TString;
url: Type.TString;
}>;
type PortalSummary = Static<typeof PortalSummarySchema>;
type PortalOpenResult = Static<typeof PortalOpenResultSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/wizard.d.ts
/** Client answer payload for the current wizard step. */
declare const WizardAnswerSchema: Type.TObject<{
stepId: Type.TString;
value: Type.TOptional<Type.TUnknown>;
}>;
/** UI contract for one wizard step rendered by gateway clients. */
declare const WizardStepSchema: Type.TObject<{
id: Type.TString;
type: Type.TUnion<[Type.TLiteral<"note">, Type.TLiteral<"select">, Type.TLiteral<"text">, Type.TLiteral<"confirm">, Type.TLiteral<"multiselect">, Type.TLiteral<"progress">, Type.TLiteral<"action">]>;
title: Type.TOptional<Type.TString>;
message: Type.TOptional<Type.TString>;
format: Type.TOptional<Type.TUnion<[Type.TLiteral<"plain">]>>;
options: Type.TOptional<Type.TArray<Type.TObject<{
value: Type.TUnknown;
label: Type.TString;
hint: Type.TOptional<Type.TString>;
}>>>;
initialValue: Type.TOptional<Type.TUnknown>;
placeholder: Type.TOptional<Type.TString>;
sensitive: Type.TOptional<Type.TBoolean>;
executor: Type.TOptional<Type.TUnion<[Type.TLiteral<"gateway">, Type.TLiteral<"client">]>>;
externalUrl: Type.TOptional<Type.TString>;
deviceCode: Type.TOptional<Type.TObject<{
code: Type.TString;
expiresInMinutes: Type.TOptional<Type.TInteger>;
message: Type.TOptional<Type.TString>;
}>>;
}>;
/** Result after advancing a wizard session. */
declare const WizardNextResultSchema: Type.TObject<{
done: Type.TBoolean;
step: Type.TOptional<Type.TObject<{
id: Type.TString;
type: Type.TUnion<[Type.TLiteral<"note">, Type.TLiteral<"select">, Type.TLiteral<"text">, Type.TLiteral<"confirm">, Type.TLiteral<"multiselect">, Type.TLiteral<"progress">, Type.TLiteral<"action">]>;
title: Type.TOptional<Type.TString>;
message: Type.TOptional<Type.TString>;
format: Type.TOptional<Type.TUnion<[Type.TLiteral<"plain">]>>;
options: Type.TOptional<Type.TArray<Type.TObject<{
value: Type.TUnknown;
label: Type.TString;
hint: Type.TOptional<Type.TString>;
}>>>;
initialValue: Type.TOptional<Type.TUnknown>;
placeholder: Type.TOptional<Type.TString>;
sensitive: Type.TOptional<Type.TBoolean>;
executor: Type.TOptional<Type.TUnion<[Type.TLiteral<"gateway">, Type.TLiteral<"client">]>>;
externalUrl: Type.TOptional<Type.TString>;
deviceCode: Type.TOptional<Type.TObject<{
code: Type.TString;
expiresInMinutes: Type.TOptional<Type.TInteger>;
message: Type.TOptional<Type.TString>;
}>>;
}>>;
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"running">, Type.TLiteral<"done">, Type.TLiteral<"cancelled">, Type.TLiteral<"error">]>>;
error: Type.TOptional<Type.TString>;
channels: Type.TOptional<Type.TArray<Type.TString>>;
accounts: Type.TOptional<Type.TArray<Type.TObject<{
channel: Type.TString;
accountId: Type.TString;
}>>>;
preparedModelRef: Type.TOptional<Type.TString>;
modelActivation: Type.TOptional<Type.TObject<{
modelRef: Type.TString;
gatewayRestartRequired: Type.TOptional<Type.TLiteral<true>>;
}>>;
activationRejection: Type.TOptional<Type.TObject<{
disposition: Type.TLiteral<"rejected-before-promotion">;
status: Type.TUnion<[Type.TLiteral<"auth">, Type.TLiteral<"rate_limit">, Type.TLiteral<"billing">, Type.TLiteral<"timeout">, Type.TLiteral<"format">, Type.TLiteral<"unavailable">, Type.TLiteral<"unknown">]>;
}>>;
}>;
type WizardAnswer = Static<typeof WizardAnswerSchema>;
type WizardStep = Static<typeof WizardStepSchema>;
type WizardNextResult = Static<typeof WizardNextResultSchema>;
//#endregion
//#region packages/gateway-protocol/src/schema/worker-admission.d.ts
/** Dedicated first-frame payload accepted only on the worker ingress. */
declare const WorkerConnectParamsSchema: Type.TObject<{
minProtocol: Type.TInteger;
maxProtocol: Type.TInteger;
client: Type.TObject<{
id: Type.TLiteral<"openclaw-worker">;
version: Type.TString;
platform: Type.TString;
mode: Type.TLiteral<"worker">;
}>;
role: Type.TLiteral<"worker">;
admission: Type.TUnion<[Type.TObject<{
environmentId: Type.TString;
credential: Type.TString;
ownerEpoch: Type.TInteger;
rpcSetVersion: Type.TInteger;
handshake: Type.TObject<{
bundleHash: Type.TString;
openclawVersion: Type.TString;
protocolFeatures: Type.TArray<Type.TString>;
bundlePrewarm: Type.TOptional<Type.TInteger>;
}>;
sessionId: Type.TNull;
runId: Type.TNull;
}>, Type.TObject<{
environmentId: Type.TString;
credential: Type.TString;
ownerEpoch: Type.TInteger;
rpcSetVersion: Type.TInteger;
handshake: Type.TObject<{
bundleHash: Type.TString;
openclawVersion: Type.TString;
protocolFeatures: Type.TArray<Type.TString>;
bundlePrewarm: Type.TOptional<Type.TInteger>;
}>;
sessionId: Type.TString;
runId: Type.TString;
}>]>;
}>;
declare const WorkerTranscriptMessageSchema: Type.TUnion<[Type.TObject<{
role: Type.TLiteral<"user">;
content: Type.TArray<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"text">;
text: Type.TString;
textSignature: Type.TOptional<Type.TString>;
}>, Type.TObject<{
type: Type.TLiteral<"image">;
data: Type.TString;
mimeType: Type.TString;
}>]>>;
timestamp: Type.TInteger;
}>, Type.TObject<{
role: Type.TLiteral<"assistant">;
content: Type.TArray<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"text">;
text: Type.TString;
textSignature: Type.TOptional<Type.TString>;
}>, Type.TObject<{
type: Type.TLiteral<"thinking">;
thinking: Type.TString;
thinkingSignature: Type.TOptional<Type.TString>;
redacted: Type.TOptional<Type.TBoolean>;
}>, Type.TObject<{
type: Type.TLiteral<"toolCall">;
id: Type.TString;
name: Type.TString;
arguments: Type.TRecord<"^.*$", Type.TUnknown>;
thoughtSignature: Type.TOptional<Type.TString>;
executionMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"sequential">, Type.TLiteral<"parallel">]>>;
}>]>>;
api: Type.TString;
provider: Type.TString;
model: Type.TString;
responseModel: Type.TOptional<Type.TString>;
responseId: Type.TOptional<Type.TString>;
providerReplay: Type.TOptional<Type.TObject<{
v: Type.TLiteral<1>;
type: Type.TString;
id: Type.TOptional<Type.TString>;
data: Type.TString;
replayIndex: Type.TOptional<Type.TInteger>;
provider: Type.TString;
api: Type.TString;
model: Type.TString;
baseUrlHash: Type.TOptional<Type.TString>;
sessionHash: Type.TOptional<Type.TString>;
authProfileHash: Type.TOptional<Type.TString>;
}>>;
diagnostics: Type.TOptional<Type.TArray<Type.TObject<{
type: Type.TString;
timestamp: Type.TInteger;
error: Type.TOptional<Type.TObject<{
name: Type.TOptional<Type.TString>;
message: Type.TString;
stack: Type.TOptional<Type.TString>;
code: Type.TOptional<Type.TUnion<[Type.TString, Type.TNumber]>>;
}>>;
details: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
}>>>;
usage: Type.TObject<{
input: Type.TNumber;
output: Type.TNumber;
cacheRead: Type.TNumber;
cacheWrite: Type.TNumber;
contextUsage: Type.TOptional<Type.TUnion<[Type.TObject<{
state: Type.TLiteral<"available">;
promptTokens: Type.TNumber;
totalTokens: Type.TNumber;
}>, Type.TObject<{
state: Type.TLiteral<"unavailable">;
}>]>>;
totalTokens: Type.TNumber;
cost: Type.TObject<{
input: Type.TNumber;
output: Type.TNumber;
cacheRead: Type.TNumber;
cacheWrite: Type.TNumber;
total: Type.TNumber;
totalOrigin: Type.TOptional<Type.TLiteral<"provider-billed">>;
}>;
}>;
stopReason: Type.TUnion<[Type.TLiteral<"stop">, Type.TLiteral<"length">, Type.TLiteral<"toolUse">, Type.TLiteral<"error">, Type.TLiteral<"aborted">]>;
errorMessage: Type.TOptional<Type.TString>;
errorCode: Type.TOptional<Type.TString>;
errorType: Type.TOptional<Type.TString>;
errorBody: Type.TOptional<Type.TString>;
timestamp: Type.TInteger;
}>, Type.TObject<{
role: Type.TLiteral<"toolResult">;
toolCallId: Type.TString;
toolName: Type.TString;
content: Type.TArray<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"text">;
text: Type.TString;
textSignature: Type.TOptional<Type.TString>;
}>, Type.TObject<{
type: Type.TLiteral<"image">;
data: Type.TString;
mimeType: Type.TString;
}>]>>;
details: Type.TOptional<Type.TUnknown>;
isError: Type.TBoolean;
timestamp: Type.TInteger;
}>]>;
declare const WorkerTranscriptCommitParamsSchema: Type.TObject<{
runEpoch: Type.TInteger;
seq: Type.TInteger;
baseLeafId: Type.TUnion<[Type.TString, Type.TNull]>;
messages: Type.TArray<Type.TUnion<[Type.TObject<{
role: Type.TLiteral<"user">;
content: Type.TArray<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"text">;
text: Type.TString;
textSignature: Type.TOptional<Type.TString>;
}>, Type.TObject<{
type: Type.TLiteral<"image">;
data: Type.TString;
mimeType: Type.TString;
}>]>>;
timestamp: Type.TInteger;
}>, Type.TObject<{
role: Type.TLiteral<"assistant">;
content: Type.TArray<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"text">;
text: Type.TString;
textSignature: Type.TOptional<Type.TString>;
}>, Type.TObject<{
type: Type.TLiteral<"thinking">;
thinking: Type.TString;
thinkingSignature: Type.TOptional<Type.TString>;
redacted: Type.TOptional<Type.TBoolean>;
}>, Type.TObject<{
type: Type.TLiteral<"toolCall">;
id: Type.TString;
name: Type.TString;
arguments: Type.TRecord<"^.*$", Type.TUnknown>;
thoughtSignature: Type.TOptional<Type.TString>;
executionMode: Type.TOptional<Type.TUnion<[Type.TLiteral<"sequential">, Type.TLiteral<"parallel">]>>;
}>]>>;
api: Type.TString;
provider: Type.TString;
model: Type.TString;
responseModel: Type.TOptional<Type.TString>;
responseId: Type.TOptional<Type.TString>;
providerReplay: Type.TOptional<Type.TObject<{
v: Type.TLiteral<1>;
type: Type.TString;
id: Type.TOptional<Type.TString>;
data: Type.TString;
replayIndex: Type.TOptional<Type.TInteger>;
provider: Type.TString;
api: Type.TString;
model: Type.TString;
baseUrlHash: Type.TOptional<Type.TString>;
sessionHash: Type.TOptional<Type.TString>;
authProfileHash: Type.TOptional<Type.TString>;
}>>;
diagnostics: Type.TOptional<Type.TArray<Type.TObject<{
type: Type.TString;
timestamp: Type.TInteger;
error: Type.TOptional<Type.TObject<{
name: Type.TOptional<Type.TString>;
message: Type.TString;
stack: Type.TOptional<Type.TString>;
code: Type.TOptional<Type.TUnion<[Type.TString, Type.TNumber]>>;
}>>;
details: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
}>>>;
usage: Type.TObject<{
input: Type.TNumber;
output: Type.TNumber;
cacheRead: Type.TNumber;
cacheWrite: Type.TNumber;
contextUsage: Type.TOptional<Type.TUnion<[Type.TObject<{
state: Type.TLiteral<"available">;
promptTokens: Type.TNumber;
totalTokens: Type.TNumber;
}>, Type.TObject<{
state: Type.TLiteral<"unavailable">;
}>]>>;
totalTokens: Type.TNumber;
cost: Type.TObject<{
input: Type.TNumber;
output: Type.TNumber;
cacheRead: Type.TNumber;
cacheWrite: Type.TNumber;
total: Type.TNumber;
totalOrigin: Type.TOptional<Type.TLiteral<"provider-billed">>;
}>;
}>;
stopReason: Type.TUnion<[Type.TLiteral<"stop">, Type.TLiteral<"length">, Type.TLiteral<"toolUse">, Type.TLiteral<"error">, Type.TLiteral<"aborted">]>;
errorMessage: Type.TOptional<Type.TString>;
errorCode: Type.TOptional<Type.TString>;
errorType: Type.TOptional<Type.TString>;
errorBody: Type.TOptional<Type.TString>;
timestamp: Type.TInteger;
}>, Type.TObject<{
role: Type.TLiteral<"toolResult">;
toolCallId: Type.TString;
toolName: Type.TString;
content: Type.TArray<Type.TUnion<[Type.TObject<{
type: Type.TLiteral<"text">;
text: Type.TString;
textSignature: Type.TOptional<Type.TString>;
}>, Type.TObject<{
type: Type.TLiteral<"image">;
data: Type.TString;
mimeType: Type.TString;
}>]>>;
details: Type.TOptional<Type.TUnknown>;
isError: Type.TBoolean;
timestamp: Type.TInteger;
}>]>>;
}>;
type WorkerConnectParams = Static<typeof WorkerConnectParamsSchema>;
type WorkerTranscriptMessage = Static<typeof WorkerTranscriptMessageSchema>;
type WorkerTranscriptCommitParams = Static<typeof WorkerTranscriptCommitParamsSchema>;
//#endregion
export { SessionCatalogSession as $, SystemAgentWizardCancel as A, RequestFrame as At, UsersListModelAccountsResult as B, HumanMention as C, SessionGitHubPublicationResult as Ct, ScopeUpgradeResult as D, ErrorShape as Dt, UsersMentionableResult as E, ConnectParams as Et, UsersAuthConnectStatusResult as F, ToolsGitHubAuthorizeStartResult as G, UsersUnlinkAuthProfileResult as H, UsersGitHubAuthorizePollResult as I, SessionCatalogCapabilities as J, AgentWaitParams as K, UsersGitHubAuthorizeStartResult as L, PersonalGitHubStatus as M, SessionParticipant as Mt, UsersAuthConnectCatalogResult as N, SessionParticipantIdentity as Nt, CronRunLogEntry as O, EventFrame as Ot, UsersAuthConnectStartResult as P, SessionCatalogPullRequestSummary as Q, UsersLinkAuthProfileResult as R, QuestionWaitAnswerResult as S, SessionGitHubConfirmParams as St, UsersMentionableParams as T, errorShape as Tt, AgentSummary as U, UsersSelectModelAccountResult as V, ToolsGitHubAuthorizePollResult as W, SessionCatalogHost as X, SessionCatalogDescriptor as Y, SessionCatalogLocator as Z, Question as _, SessionRunStatus as _t, WizardNextResult as a, SessionsCatalogContinueResult as at, QuestionResolveResult as b, WorkerInferenceOptions as bt, PortalSummary as c, SessionsCatalogReadParams as ct, SessionsCompanionAskResult as d, SessionsCatalogStartTerminalResult as dt, SessionCatalogShareRoute as et, SessionsCompanionStateResult as f, SessionGoal as ft, SessionPlacementRunner as g, SessionRow as gt, SessionPlacementDiskSpace as h, SessionPermissionMode as ht, WizardAnswer as i, SessionsCatalogContinueParams as it, ChatAccountSelection as j, ErrorCodes as jt, SystemAgentChatQuestion as k, HelloOk as kt, Snapshot as l, SessionsCatalogReadResult as lt, SessionMoveTarget as m, SessionEntryArchiveReason as mt, WorkerTranscriptCommitParams as n, SessionsCatalogArchiveParams as nt, WizardStep as o, SessionsCatalogListParams as ot, SessionsListParams as p, SessionsGoalMutationResult as pt, SessionCatalog as q, WorkerTranscriptMessage as r, SessionsCatalogArchiveResult as rt, PortalOpenResult as s, SessionsCatalogListResult as st, WorkerConnectParams as t, SessionCatalogTranscriptItem as tt, SessionObserverDigest as u, SessionsCatalogStartTerminalParams as ut, QuestionAnswers as v, BoardGetParams as vt, MentionsListResult as w, SessionGitHubPublishParams as wt, QuestionResolvedEvent as x, GitHubPublicationPublisher as xt, QuestionRecord as y, WorkerInferenceModelRef as yt, UsersListAuthLinksResult as z };