import type * as Raw from '@relaycast/types'; import type { Camelize } from './casing.js'; /** * Any JSON value — scalars, arrays, objects, or `null` — exactly mirroring the * runtime wire contract (`FleetWireJsonValue`). Action invocation outputs are * unconstrained JSON, so this is intentionally wider than `Record`. */ export type JsonValue = Raw.FleetWireJsonValue; /** * A capability advertised by a fleet node on the roster. The runtime emits and * stores structured capability objects (`{ name, kind?, metadata? }`), never bare * capability-name strings, so the SDK roster type must match. */ export type NodeCapability = Raw.FleetCapability; export interface A2aAgentCardSkill { id?: string; name: string; description?: string; tags?: string[]; } export interface A2aAgentCard { name: string; description?: string; url: string; version: string; skills: A2aAgentCardSkill[]; provider?: Record; capabilities?: Record; defaultInputModes?: string[]; defaultOutputModes?: string[]; documentationUrl?: string; } export interface RegisterA2aOptions { agentCardUrl?: string; agentCard?: A2aAgentCard; authScheme?: string; authCredential?: string; } export interface RegisterA2aResponse { relayName: string; relayToken: string; webhookUrl: string; certification: 'level_0' | 'level_1'; } export interface A2aAgentRecord { id: string; workspaceId: string; relayAgentId: string; relayName: string; relayStatus: string; relayPersona: string | null; relayMetadata: Record | null; agentCard: A2aAgentCard; externalUrl: string; authScheme: string | null; authCredential: string | null; status: string; messagesSent: number; messagesRecv: number; lastHealth: string | null; healthFailures: number; createdAt: string; updatedAt: string; } export interface RemoveA2aAgentResponse { name: string; removed: true; } export interface DirectorySkillInput { id?: string; name: string; description?: string; tags?: string[]; metadata?: Record; } export interface DirectorySkill { id: string; skillId: string | null; name: string; description: string | null; tags: string[]; metadata: Record; } export interface DirectoryAgent { id: string; sourceAgentId: string | null; slug: string; name: string; description: string | null; provider: string | null; endpointUrl: string | null; documentationUrl: string | null; version: string | null; tags: string[]; capabilities: Record; metadata: Record; status: string; ratingAvg: number; ratingCount: number; skills: DirectorySkill[]; createdAt: string; updatedAt: string; } export interface SearchDirectoryQuery { q?: string; tags?: string[]; status?: string; limit?: number; } export interface DirectorySearchResult extends DirectoryAgent { relevanceScore: number; } export interface PublishToDirectoryRequest { sourceAgentName?: string; slug?: string; name: string; description?: string; provider?: string; endpointUrl?: string; documentationUrl?: string; version?: string; tags?: string[]; capabilities?: Record; metadata?: Record; status?: string; skills?: DirectorySkillInput[]; } export interface ImportSkillsRequest { agentName: string; metadata?: Record; status?: string; skills?: DirectorySkillInput[]; } export interface RouteResult { agentName: string; score: number; fallback: boolean; } export interface RoutingWeights { skillMatch: number; messageMatch: number; tagMatch: number; rating: number; availability: number; } export interface RoutingConfig { weights: RoutingWeights; circuitBreakerThreshold: number; circuitBreakerCooldownSeconds: number; updatedAt: string | null; } export interface UpdateRoutingConfigRequest { weights?: Partial; circuitBreakerThreshold?: number; circuitBreakerCooldownSeconds?: number; } export interface ListDirectoryQuery { status?: string; limit?: number; } export interface UpdateDirectoryAgentRequest { sourceAgentName?: string | null; slug?: string; name?: string; description?: string | null; provider?: string | null; endpointUrl?: string | null; documentationUrl?: string | null; version?: string | null; tags?: string[]; capabilities?: Record; metadata?: Record; status?: string; skills?: DirectorySkillInput[]; } export interface DirectoryRating { id: string; score: number; review: string | null; raterAgentId: string; raterAgentName: string; createdAt: string; updatedAt?: string; } export interface RateDirectoryAgentRequest { score: number; review?: string; } export interface RouteFeedbackRequest { agentName: string; success: boolean; error?: string; } export interface RouteFeedbackResult { ok: boolean; } export interface SkillSearchQuery { q?: string; limit?: number; } export interface SkillSearchResult { agentName: string; skillName: string; description: string | null; tags: string[]; relevanceScore: number; } export interface ActionDefinition { id: string; name: string; description: string; handlerAgent: string | null; handlerNode: string | null; handlerNodeId: string | null; inputSchema: Record; outputSchema: Record; availableTo: string[] | null; isActive: boolean; createdAt: string; } export interface RegisterActionRequest { name: string; description: string; handlerAgent?: string; handlerNode?: string; inputSchema?: Record; outputSchema?: Record; availableTo?: string[]; } export interface InvokeActionResult { invocationId: string; actionName: string; handlerAgentId: string | null; handlerNodeId?: string | null; dispatchedNodeId?: string | null; input: Record; status: string; createdAt: string; } export interface CompleteInvocationRequest { output?: JsonValue; error?: string; durationMs?: number; } export interface ActionInvocation { invocationId: string; actionName: string; callerId: string | null; callerName?: string | null; input?: Record; output: JsonValue; status: string; error: string | null; durationMs: number | null; dispatchedNodeId?: string | null; dispatchedAt?: string | null; createdAt?: string; completedAt: string | null; } export type NodeKind = 'ws' | 'http_push' | 'poll'; export type NodeRole = 'direct' | 'broker'; export type NodeAckMode = 'manual' | 'on_2xx' | 'response'; export type NodeDeliveryAuth = { type: 'none'; } | { type: 'bearer'; token: string; } | { type: 'static_headers'; headers: Record; } | { type: 'hmac_sha256'; secret: string; signatureHeader?: string; timestampHeader?: string; signedPayload?: 'body' | 'timestamp.body'; encoding?: 'hex'; prefix?: string; }; export interface HttpPushNodeDelivery { url: string; ackMode?: NodeAckMode; auth?: NodeDeliveryAuth; /** * Route this node's webhook POST through the deployment's configured egress * proxy (wire field `use_proxy`) instead of hitting `url` directly. For * receivers that block the server's network origin; fails if no proxy is * configured server-side. */ useProxy?: boolean; } export interface NodeRosterEntry { id: string; name: string; kind: NodeKind | string; role: NodeRole | string; deliveryAdapter: string; delivery: Record | null; capabilities: NodeCapability[]; tags: string[]; version: string; status: 'online' | 'offline' | string; live: boolean; handlersLive: boolean; /** Managed-agent capacity utilization in [0,1], or null when unreported. */ load: number | null; activeAgents: number; maxAgents: number; lastHeartbeatAt: string | null; createdAt: string; } export interface CreateNodeRequest { nodeId?: string; name: string; kind?: NodeKind; role?: NodeRole; deliveryAdapter?: string; delivery?: HttpPushNodeDelivery | Record | null; capabilities?: string[]; maxAgents?: number; tags?: string[]; version?: string; } export interface CreateNodeResponse extends NodeRosterEntry { token: string; } export interface NodeAgentBinding { id: string; agentId: string; agentName: string; nodeId: string; nodeName: string; nodeKind: NodeKind | string; nodeRole: NodeRole | string; status: string; sessionRef: string | null; priority: number; createdAt: string; updatedAt: string | null; } export interface BindAgentToNodeRequest { agentName: string; sessionRef?: string | null; priority?: number; } export interface NodeListQuery { capability?: string; name?: string; } export interface Trigger { id: string; channel: string | null; pattern: string | null; mention: boolean | null; actionName: string; enabled: boolean; lastTriggeredAt: string | null; createdAt: string; updatedAt: string | null; } export interface CreateTriggerRequest { channel?: string | null; pattern?: string | null; mention?: boolean | null; actionName: string; enabled?: boolean; } export type UpdateTriggerRequest = Partial; export interface SessionEvent { id: string; agentId: string; type: string; payload: Record; sequence?: number; createdAt: string; } export interface EmitSessionEventRequest { type: string; payload?: Record; } export interface ListSessionEventsQuery { type?: string; limit?: number; } export interface CertificationTestResult { name?: string; passed?: boolean; [key: string]: unknown; } export interface CertificationRun { id: string; agentUrl: string; level: number; source?: string; status?: string; passed: boolean; passedTests: number; totalTests: number; monitorEnabled?: boolean; monitorIntervalMinutes?: number | null; lastRunAt?: string | null; startedAt?: string; completedAt?: string | null; createdAt?: string; updatedAt?: string; tests: CertificationTestResult[]; } export interface SubmitCertificationRequest { agentUrl: string; level?: 1 | 2 | 3; } export interface MonitorCertificationRequest { agentUrl: string; level?: 1 | 2 | 3; intervalMinutes?: number; } export interface ConsoleMessagesQuery { limit?: number; before?: string; agentId?: string; channelId?: string; conversationId?: string; deliveryKind?: 'channel' | 'dm'; } export interface ConsoleMessageLog { id: string; messageId: string | null; channelId: string | null; channelName: string | null; agentId: string | null; agentName: string | null; conversationId: string | null; deliveryKind: string; text: string | null; contentType: string | null; metadata: Record; attachmentCount: number; mentionCount: number; latencyMs: number | null; createdAt: string; } export interface ConsoleWindowQuery { days?: number; } export interface ConsoleAgentStatsQuery { days?: number; limit?: number; } export interface ConsoleOverview { windowDays: number; since: string; totalMessages: number; channelMessages: number; dmMessages: number; uniqueAgents: number; avgLatencyMs: number; maxLatencyMs: number; attachmentCount: number; mentionCount: number; } export interface ConsoleAgentStat { agentId: string; agentName: string; messageCount: number; channelCount: number; dmCount: number; avgLatencyMs: number; lastMessageAt: string | null; } export interface ConsoleCostAgent { agentId: string; agentName: string; messageCount: number; totalCostUsd: number; promptTokens: number; completionTokens: number; totalTokens: number; } export interface ConsoleCostStats { windowDays: number; totals: { totalCostUsd: number; promptTokens: number; completionTokens: number; totalTokens: number; }; agents: ConsoleCostAgent[]; } export type ActivityItem = Camelize; export type Agent = Camelize; export type AgentListQuery = Camelize; export type AgentStatusActiveEvent = Camelize; export type AgentStatusBlockedEvent = Camelize; export type AgentStatusChangedEvent = Camelize; export type AgentStatusEvent = Camelize; export type AgentStatusIdleEvent = Camelize; export type AgentStatusOfflineEvent = Camelize; export type AgentStatusWaitingEvent = Camelize; export type AgentPresenceInfo = Camelize; export type Channel = Camelize; export type ChannelArchivedEvent = Camelize; export type ChannelCreatedEvent = Camelize; export type ChannelMemberInfo = Camelize; export type JoinChannelResponse = Camelize; export type InviteChannelResponse = Camelize; export type ChannelReadStatus = Camelize; export type ChannelUpdatedEvent = Camelize; export type CreateAgentRequest = Camelize; export type CreateAgentResponse = Camelize; export type CreateChannelRequest = Camelize; export type CreateGroupDmRequest = Camelize; export type DmConversation = Camelize; export type CreateGroupDmResponse = Camelize; export type CreateSubscriptionRequest = Camelize; export type CreateSubscriptionResponse = Camelize; export type CreateWebhookRequest = Camelize; export type CreateWebhookResponse = Camelize; export type CreateWorkspaceResponse = Camelize; export type WorkspaceLookup = Camelize; export type SendDmResponse = Camelize; export type DmMessage = Camelize; export type DmConversationSummary = Camelize; export type DmConversationParticipant = Camelize; export type DmLastMessage = Camelize; export type DmReceivedEvent = Camelize; export type EventSubscription = Camelize; export type FileInfo = Camelize; export type CompleteUploadResponse = Camelize; export type FileUploadedEvent = Camelize; export type GroupDmMessageResponse = Camelize; export type GroupDmParticipantResponse = Camelize; export type GroupDmReceivedEvent = Camelize; export type InboxResponse = Camelize; export type MemberJoinedEvent = Camelize; export type MemberLeftEvent = Camelize; export type ChannelMutedEvent = Camelize; export type ChannelUnmutedEvent = Camelize; export type MuteChannelResponse = Camelize; export type MessageBlock = Camelize; export type MessageCreatedEvent = Camelize; export type MessageListQuery = Camelize; export type MessageReadEvent = Camelize; export type MessageReactedEvent = Camelize; export type SearchMessageResult = Camelize; export type MessageUpdatedEvent = Camelize; export type MessageWithMeta = Camelize; export type SessionMessagesResult = Camelize; export type PostMessageRequest = Camelize; export type AddedReaction = Camelize; export type ReactionGroup = Camelize; export type ReadReceipt = Camelize; export type ReaderInfo = Camelize; export type RelaycastMessageEvent = Camelize; export type ReleaseAgentRequest = Camelize; export type ReleaseAgentResponse = Camelize; export type SendDmRequest = Camelize; export type SetSystemPromptRequest = Camelize; export type SpawnAgentRequest = Camelize; export type SpawnAgentResponse = Camelize; export type SystemPrompt = Camelize; export type ThreadReplyEvent = Camelize; export type ThreadReplyRequest = Camelize; export type TokenRotateResponse = Camelize; export type UpdateAgentRequest = Camelize; export type UpdateChannelRequest = Camelize; export type UpdateWorkspaceRequest = Camelize; export type UploadRequest = Camelize; export type UploadResponse = Camelize; export type ObserverScope = Raw.ObserverScope; export type ObserverTokenFilters = Camelize; export type CreateObserverTokenRequest = Camelize; export type UpdateObserverTokenRequest = Camelize; export type ObserverToken = Camelize; export type ActionInvokedEvent = Camelize; export type ActionCompletedEvent = Camelize; export type ActionDeniedEvent = Camelize; export type ActionFailedEvent = Camelize; export type Delivery = Camelize; export type DeliveryItem = Camelize; export type DeliveryMessage = Camelize; export type DeliveryStatus = Raw.DeliveryStatus; export type FailDeliveryRequest = Camelize; export type DeferDeliveryRequest = Camelize; export type DeliveryAcceptedEvent = Camelize; export type DeliveryDeliveredEvent = Camelize; export type DeliveryDeferredEvent = Camelize; export type DeliveryFailedEvent = Camelize; export type Webhook = Camelize; export type WebhookReceivedEvent = Camelize; export type WebhookTriggerRequest = Camelize; export type WebhookTriggerResponse = Camelize; export type Workspace = Camelize; export type WorkspaceDmConversation = Camelize; export type ResyncAckEvent = Camelize; export type SearchResult = SearchMessageResult; export type WsClientEvent = Camelize; export type WsCloseEvent = Camelize; export type WsErrorEvent = Camelize; export type WsOpenEvent = Camelize; export type WsPermanentlyDisconnectedEvent = Camelize; export type WsReconnectingEvent = Camelize; export type WsResyncedEvent = Camelize; //# sourceMappingURL=types.d.ts.map