/** Agents: one conversation running in a workspace, its transcript and its activity. */ import { type Static } from "@sinclair/typebox"; import type { Cuid2, Effort, EventCursor, MessageMode, PermissionMode, ServiceTier, Timestamp } from "./common.js"; import type { BackgroundProcess } from "./processes.js"; import type { CompactionMessage, Run } from "./messages.js"; import type { SlashCommandCatalog } from "./slashCommands.js"; export declare const MAX_AGENT_PROFILES = 256; export declare const MAX_AGENT_PROFILE_ID_LENGTH = 512; export declare const MAX_AGENT_PROFILE_NAME_LENGTH = 128; export declare const MAX_AGENT_PROFILE_DESCRIPTION_LENGTH = 1024; /** One request profile offered by one focused agent. */ export declare const agentProfileSchema: import("@sinclair/typebox").TObject<{ /** The opaque value sent in a message's `profile` field. */ id: import("@sinclair/typebox").TString; /** A short human-readable label. */ name: import("@sinclair/typebox").TString; /** A concise explanation of when to use the profile. */ description: import("@sinclair/typebox").TString; }>; export type AgentProfile = Static; /** A focused agent's complete ordered request-profile catalog. */ export declare const agentProfileCatalogSchema: import("@sinclair/typebox").TArray>; /** A response shape carrying one agent's complete current profile catalog. */ export interface AgentProfileCatalog { /** Absent only when talking to an older compatible daemon. */ profiles?: AgentProfile[]; } /** What the agent is doing right now. */ export declare const agentStatusSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"idle">, import("@sinclair/typebox").TLiteral<"thinking">, import("@sinclair/typebox").TLiteral<"working">, import("@sinclair/typebox").TLiteral<"generating_tools">, import("@sinclair/typebox").TLiteral<"running_tools">]>; export type AgentStatus = Static; /** Why the agent has something the person has not looked at. */ export declare const agentUnreadSchema: import("@sinclair/typebox").TObject<{ reason: import("@sinclair/typebox").TString; since: import("@sinclair/typebox").TInteger; }>; export type AgentUnread = Static; /** The whole composer state, so a message can be finished on another device. */ export interface AgentDraft { text: string; providerId: string; modelId: string; effort: Effort; serviceTier: ServiceTier | null; permissionMode: PermissionMode; } /** The agent object. */ export declare const agentSchema: import("@sinclair/typebox").TRecursive; /** Whether the user-facing send route accepts messages for this agent. */ canSendMessages: import("@sinclair/typebox").TOptional; createdAt: import("@sinclair/typebox").TInteger; id: import("@sinclair/typebox").TString; /** The newest event cursor for this agent, so a stream opens where this left off. */ lastCursor: import("@sinclair/typebox").TString; /** Whether another agent owns this agent's Agent Base ancestry. */ managedByAnotherAgent: import("@sinclair/typebox").TOptional; /** Owner-local order for a user-visible root; `null` on an ordinary hidden subagent. */ orderKey: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>; /** `null` when no agent manages this one; otherwise the managing parent. */ parentAgentId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>; /** The open question when the run is waiting on the person. */ pendingQuestionId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>; /** How many background processes started by this agent are running now. */ processes: import("@sinclair/typebox").TObject<{ running: import("@sinclair/typebox").TInteger; }>; status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"idle">, import("@sinclair/typebox").TLiteral<"thinking">, import("@sinclair/typebox").TLiteral<"working">, import("@sinclair/typebox").TLiteral<"generating_tools">, import("@sinclair/typebox").TLiteral<"running_tools">]>; /** How many subagents this agent spawned over its life, and how many run now. */ subagents: import("@sinclair/typebox").TObject<{ running: import("@sinclair/typebox").TInteger; total: import("@sinclair/typebox").TInteger; }>; /** A user-interactive, parent-managed subtask. Absent means false on older daemons. */ subtask: import("@sinclair/typebox").TOptional; /** Direct non-archived subtasks, recursively. Absent on older compatible daemons. */ subtasks: import("@sinclair/typebox").TOptional>; title: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>; /** `"idle"` while no title has been generated yet. */ titleStatus: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"idle">, import("@sinclair/typebox").TLiteral<"ready">]>; unread: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{ reason: import("@sinclair/typebox").TString; since: import("@sinclair/typebox").TInteger; }>, import("@sinclair/typebox").TNull]>; updatedAt: import("@sinclair/typebox").TInteger; /** Whether this agent belongs to a project or workspace's visible root-agent series. */ userVisible: import("@sinclair/typebox").TOptional; version: import("@sinclair/typebox").TString; /** The workspace the agent runs in; its commands and edits land there. */ workspaceId: import("@sinclair/typebox").TString; }>>; export type Agent = Static; /** Every single-agent route answers with this. */ export interface AgentResponse extends SlashCommandCatalog, AgentProfileCatalog { agent: Agent; } /** `GET /v0/agents/:agentId/mode` */ export interface AgentModeResponse { /** Everything the last submitted message used; `null` before the first message. */ mode: MessageMode | null; } /** Draft state is separate from agent lifecycle state and keeps clears ordered across clients. */ export interface AgentDraftSnapshot { value: AgentDraft | null; updatedAt: Timestamp | null; } /** `GET|PUT /v0/agents/:agentId/draft` */ export interface AgentDraftResponse { draft: AgentDraftSnapshot; } /** `POST /v0/agents/:agentId/abort` */ export interface AgentAbortResponse extends SlashCommandCatalog, AgentProfileCatalog { agent: Agent; /** The run winding down arrives through events from here. */ cursor: EventCursor; } /** `POST /v0/agents/:agentId/compact` */ export interface AgentCompactResponse extends SlashCommandCatalog, AgentProfileCatalog { agent: Agent; /** The standalone maintenance run created for explicit compaction. */ run: Run; /** The durable service message, normally carrying a running compaction block. */ message: CompactionMessage; /** The run and message lifecycle arrive through events from here. */ cursor: EventCursor; } /** `GET /v0/agents/:agentId/activity` — everything the agent set in motion. */ export interface AgentActivityResponse { /** Full agent objects, newest first, finished ones included. */ subagents: Agent[]; /** Full process objects, newest first, exited ones included. */ processes: BackgroundProcess[]; } /** `POST /v0/agents` — creates a parentless, user-controlled workspace root. */ export interface CreateAgentRequest { /** The workspace the agent will run in. Must be active. */ workspaceId: Cuid2; /** A titled agent keeps its title; the daemon never generates one over it. */ title?: string; /** Optional client-supplied ID, which makes creation safely retryable. */ id?: Cuid2; mutationId?: string; } /** `POST /v0/agents/:agentId/abort` */ export interface AbortAgentRequest { /** Abort only if this run is still the one running. */ expectedRunId?: Cuid2; mutationId?: string; } /** `POST /v0/agents/:agentId/reorder` */ export interface ReorderAgentRequest { /** The agent to place this one after, or `null` to move it first. */ afterId: Cuid2 | null; mutationId?: string; } /** `PUT /v0/agents/:agentId/draft` */ export interface SaveAgentDraftRequest { /** The composer state, or `null` to clear it. */ draft: AgentDraft | null; /** * When the client last touched this draft. Drafts are last-write-wins: a * write carrying an older stamp than the stored draft is ignored. Omitted, * the write always applies. */ updatedAt?: Timestamp; mutationId?: string; } /** A body carrying nothing but the optional mutation echo. */ export interface MutationOnlyRequest { mutationId?: string; } //# sourceMappingURL=agents.d.ts.map