| /* | |
| * Licensed to the Apache Software Foundation (ASF) under one | |
| * or more contributor license agreements. See the NOTICE file | |
| * distributed with this work for additional information | |
| * regarding copyright ownership. The ASF licenses this file | |
| * to you under the Apache License, Version 2.0 (the | |
| * "License"); you may not use this file except in compliance | |
| * with the License. You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, | |
| * software distributed under the License is distributed on an | |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| * KIND, either express or implied. See the License for the | |
| * specific language governing permissions and limitations | |
| * under the License. | |
| */ | |
| // Generated from Rust runtime schemas. Run npm run schema:generate -w @maka-agent/plugin-sdk. | |
| export type RuntimeProtocol = | |
| | ClientDraft | |
| | ClientDraftEdit | |
| | ClientDraftAttachment | |
| | ClientDraftKey | |
| | ClientDraftReference | |
| | ClientUploadReference | |
| | ClientOperation | |
| | HostLogRequest | |
| | HostLogPage | |
| | UiAuthoringCommand | |
| | UiAuthoringClaim | |
| | UiAuthoringState | |
| | CompositionInput | |
| | Deployment | |
| | DeploymentRead | |
| | PackageInstall | |
| | PackageInstalled | |
| | DeploymentReplace | |
| | ManagedDeployment | |
| | DeploymentInstances | |
| | ManagedInstancesPage | |
| | InstanceSetEnabled | |
| | DeploymentDocument | |
| | DeploymentDocumentRead | |
| | InstanceSettingsRead | |
| | InstanceSettingsPage | |
| | InstanceConfigure | |
| | BindingCandidatesRead | |
| | BindingCandidatesPage | |
| | PackageSettingsRead | |
| | PackageSettingsPage | |
| | CompositionEdit | |
| | DeploymentDocumentChunk | |
| | ManagementResultForPackageInstalled | |
| | ManagementResultForDeploymentRef | |
| | PackageDeclaration | |
| | PackageRef | |
| | Contract | |
| | Import | |
| | Export | |
| | UiExport | |
| | ValueBindings | |
| | ComponentInput | |
| | ComponentOutput | |
| | ComponentSlot | |
| | TerminalScene | |
| | CapturePlan | |
| | ActionOutcome | |
| | CallerHistoryPage | |
| | CallerIntent | |
| | LabelProps | |
| | TextareaProps | |
| | FilePasteObservation | |
| | MarkdownProps | |
| | DiffProps | |
| | MarkdownLink | |
| | FilePickerProps | |
| | FileObservation | |
| | FileCapture | |
| | SourceTextProps | |
| | TerminalViewProps | |
| | TerminalViewObservation | |
| | TerminalInputBatch | |
| | TerminalInputAcknowledgement | |
| | SelectionMenuProps | |
| | ReadingProps | |
| | ReadingObservation | |
| | RowsProps | |
| | ValueCheckpointProps | |
| | TextFileProps | |
| | TextFileObservation | |
| | MorphMarkProps | |
| | MorphMarkConfiguration | |
| | ValueCheckpointObservation | |
| | RowActivated | |
| | InputProps | |
| | EditorObservation | |
| | EditorCheckpointObservation | |
| | EditorCapture | |
| | ReadText | |
| | TextChunk | |
| | AgentConfiguration | |
| | WorkspaceJevConfiguration | |
| | JevSet | |
| | JevCredential | |
| | JevUpdate | |
| | JevEvaluation | |
| | JevResult | |
| | WorkspaceWebConfiguration | |
| | WebCapture | |
| | WebCall_WebFetch | |
| | WebCall_WebQuery | |
| | WebSet | |
| | WebKey | |
| | WebUpdate | |
| | WebResult | |
| | WebProbe | |
| | WebEndpoint | |
| | AgentExecute | |
| | AgentGlobalInstructionsRead | |
| | AgentGlobalInstructionsView | |
| | AgentGlobalInstructionsUpdate | |
| | AgentGlobalInstructionsUpdated | |
| | AgentExecutorsRead | |
| | AgentExecutors | |
| | ExecutorExecute | |
| | AgentExecutorSetup | |
| | ExecutorSetupAction | |
| | ExecutorSetupResult | |
| | ExecutorSetupProgress | |
| | ComputerConfiguration | |
| | ComputerEvaluate | |
| | ComputerReplState | |
| | ComputerResult | |
| | ProtocolProcessLaunch | |
| | AcpExecutorConfiguration | |
| | ExecutorOutcome | |
| | ExecutorOutput | |
| | ProtocolProcessRun | |
| | ProtocolProcessInput | |
| | ProtocolProcessProgress | |
| | ProtocolProcessCompletion | |
| | ProtocolProcessWritten | |
| | AgentToolNames | |
| | WorkHubPresets | |
| | WorkHubPresetsResult | |
| | WorkHubGraphRead | |
| | WorkHubGraphView | |
| | WorkHubGraphWorkRead | |
| | GraphWorkDefinition | |
| | WorkHubGraphResultRead | |
| | WorkHubGraphResult | |
| | WorkHubGraphHistoryRead | |
| | WorkHubGraphHistory | |
| | WorkHubGraphChange | |
| | WorkHubGraphChanged | |
| | WorkHubGraphReceiptRead | |
| | WorkHubResolve | |
| | WorkHubCoordinator | |
| | WorkHubConfiguration | |
| | WorkHubTaskRead | |
| | WorkHubTask | |
| | WorkHubControlRead | |
| | WorkHubControl | |
| | WorkHubControlsRead | |
| | WorkHubControls | |
| | WorkHubTasksRead | |
| | WorkHubTasks | |
| | AgentWorkRead | |
| | AgentWork | |
| | ModelSelection | |
| | SettingsModelsRead | |
| | SettingsUsageRead | |
| | SettingsUsagePage | |
| | SettingsUsageSummary | |
| | SettingsUsageSummaryRead | |
| | SettingsPricingResult | |
| | PricingQuery | |
| | PricingPage | |
| | PricingUpdate | |
| | SettingsAssistantPreferences | |
| | SettingsNetworkSnapshot | |
| | SettingsNetworkUpdate | |
| | SettingsNetworkUpdated | |
| | SettingsPreferencesUpdate | |
| | SettingsPreferencesUpdated | |
| | SettingsModelsPage | |
| | SettingsUpdateModelSettings | |
| | SettingsConnectionsRead | |
| | SettingsConnectionsPage | |
| | SettingsConnectionDetail | |
| | SettingsProvidersRead | |
| | SettingsProvidersPage | |
| | SettingsProvider | |
| | SettingsCredentialLogin | |
| | SettingsLoginPrompt | |
| | SettingsCredentialLoginResult | |
| | SettingsSaveCredential | |
| | SettingsCredentialSaveResult | |
| | CreateCatalogConnectionInput | |
| | UpdateCatalogConnectionInput | |
| | RemoveCatalogConnectionInput | |
| | CredentialVaultQueryInput | |
| | CredentialVaultQueryResult | |
| | DeleteCredentialInput | |
| | CredentialMutationResult | |
| | SetDefaultConnectionTargetInput | |
| | CatalogMutationResult | |
| | SkillLibraryConfiguration | |
| | SkillLibraryList | |
| | SkillLibraryPage | |
| | SkillLibraryRead | |
| | SkillLibraryDocument | |
| | SkillLibraryChange | |
| | SkillLibraryReview | |
| | SkillLibraryPreview | |
| | SkillLibraryChangeResult | |
| | SkillLibraryOutcome | |
| | SkillLibrarySetPreference | |
| | SkillLibraryPreferenceResult | |
| | SkillModelSearch | |
| | SkillModelLoad | |
| | SkillModelSearchResult | |
| | SkillModelLoadResult | |
| | SkillPrepare | |
| | SkillPreparation | |
| | SkillPreparationRecord | |
| | AgentList | |
| | AgentCreate | |
| | AgentPlanRead | |
| | AgentPlanView | |
| | AgentPlanHistoryRead | |
| | AgentPlanHistory | |
| | AgentPlanChange | |
| | AgentPlanResult | |
| | AgentPlanReceiptRead | |
| | AgentGoalRead | |
| | AgentGoalView | |
| | AgentGoalChange | |
| | AgentGoalResult | |
| | AgentGoalReceiptRead | |
| | AgentChecklistRead | |
| | AgentChecklist | |
| | AgentRecapRead | |
| | AgentRecapGenerate | |
| | AgentRecapReceipt | |
| | AgentScheduleRead | |
| | AgentSchedules | |
| | AgentScheduleChange | |
| | AgentScheduleResult | |
| | AgentScheduleAlerts | |
| | RecallQuery | |
| | AgentRecallPage | |
| | AgentImportsRead | |
| | AgentImportsPage | |
| | AgentImportChange | |
| | AgentImportResult | |
| | AgentProjectsRead | |
| | AgentProjectsPage | |
| | AgentProjectChange | |
| | AgentProjectResult | |
| | AgentCreated | |
| | AgentFork | |
| | AgentForkResult | |
| | AgentForkReceipt | |
| | AgentForkReceiptResult | |
| | AgentSessionBranch | |
| | AgentDirectories | |
| | AgentDirectoryPage | |
| | AgentMetadata | |
| | AgentMetadataResult | |
| | AgentSelectBackend | |
| | AgentChangeSession | |
| | AgentSessionChanged | |
| | AgentSend | |
| | AgentStop | |
| | AgentExecutionRead | |
| | AgentExecutionResult | |
| | AgentResume | |
| | AgentResumeResult | |
| | AgentUploadAttachment | |
| | AgentAttachment | |
| | AgentAttachmentUploadResult | |
| | AgentMarkRead | |
| | AgentMarkReadResult | |
| | AgentWatch | |
| | AgentPendingInteractions | |
| | AgentInteractionRead | |
| | AgentInteractionRespond | |
| | AgentInteractionResult | |
| | QuestionAsk | |
| | FormAsk | |
| | FormResponse | |
| | WorkspaceProcessConfiguration | |
| | WorkspacePath | |
| | AgentContextRead | |
| | AgentContextReport | |
| | AgentContextRequest | |
| | AgentContextRequestState | |
| | PreparedContextBreakdown | |
| | ContextBucket | |
| | ContextCounts | |
| | AgentFileListRead | |
| | AgentFileWatch | |
| | AgentFileCursor | |
| | AgentFilePage | |
| | AgentFileEntry | |
| | AgentFileKind | |
| | AgentFileChange | |
| | AgentFileUnavailable | |
| | GitArea | |
| | GitChangeKind | |
| | GitStatusEntry | |
| | GitStatus | |
| | GitDiff | |
| | AgentGitDiffRead | |
| | TerminalList | |
| | TerminalTarget | |
| | TerminalOutputRequest | |
| | TerminalOutputEvent | |
| | TerminalOutputUnavailable | |
| | TerminalOutcome_TerminalOutputEvent | |
| | TerminalStart | |
| | TerminalController | |
| | TerminalControl | |
| | TerminalPage | |
| | TerminalLeaseUpdate | |
| | TerminalControlReceipt | |
| | TerminalReleased | |
| | TerminalStopped | |
| | TerminalOutcome_TerminalPage | |
| | TerminalOutcome_ResourceUpdate | |
| | TerminalOutcome_TerminalLeaseUpdate | |
| | TerminalOutcome_TerminalControlReceipt | |
| | TerminalOutcome_TerminalReleased | |
| | TerminalOutcome_TerminalStopped | |
| | QuestionResult | |
| | InteractionRecord | |
| | AgentSession | |
| | AgentSessionPage | |
| | AgentSendResult | |
| | AgentStopped | |
| | AgentDelivery | |
| | AgentDeliveryFact | |
| | AgentContentKind | |
| | AgentObservation | |
| | AgentDiagnostics | |
| | AgentDiagnosticPage | |
| | AgentDiagnosticChange | |
| | AgentSessionRead | |
| | AgentHistoryRead | |
| | AgentHistoryLandmarksRead | |
| | AgentHistoryLandmarks | |
| | AgentHistoryLandmark | |
| | AgentHistoryPromptRead | |
| | AgentHistoryPrompt | |
| | AgentDeliveryPage | |
| | AgentQueue | |
| | AgentQueueMessage | |
| | AgentQueueMessageResult | |
| | AgentQueueMutation | |
| | AgentQueueMutationResult | |
| | AgentHistoryChunk | |
| | AgentHistoryPage | |
| | AgentHistorySearch | |
| | AgentHistorySearchPage | |
| | AgentHistorySourceRead | |
| | AgentHistorySourcePage | |
| | AgentToolImageFrame | |
| | AgentToolImageRead | |
| | AgentToolImagePage | |
| | AgentAttachmentImageRead | |
| | AgentAttachmentImageSource | |
| | AgentAttachmentImagePage | |
| | Read | |
| | HostActivation | |
| | HostRequest | |
| | HostObservation | |
| | OperationObservation | |
| | OperationReply | |
| | ResourceMetadata | |
| | MarkdownTextInput | |
| | MarkdownTextResult; | |
| /** | |
| * Hierarchical, stable source keys. Display aliases never become data identities. | |
| */ | |
| export type InstanceId = string[]; | |
| export type Transport = 'local' | 'remote'; | |
| export type RecoveryProtocol = 'journal_v1'; | |
| /** | |
| * A caller's receipt observation, never an execution grant. Unavailable makes | |
| * no claim about the journal's contents or physical cleanup. | |
| */ | |
| export type Receipt = | |
| | { | |
| kind: 'not_recorded'; | |
| } | |
| | { | |
| outcome: OperationOutcome; | |
| cleanup: OperationCleanup; | |
| kind: 'recorded'; | |
| } | |
| | { | |
| diagnostic: string; | |
| kind: 'unavailable'; | |
| }; | |
| /** | |
| * Unresolved means no durable result is known, including after process loss. | |
| */ | |
| export type OperationOutcome = | |
| | { | |
| kind: 'unresolved'; | |
| } | |
| | { | |
| value: unknown; | |
| kind: 'returned'; | |
| } | |
| | { | |
| diagnostic: string; | |
| kind: 'unknown'; | |
| }; | |
| export type OperationCleanup = | |
| | { | |
| kind: 'unconfirmed'; | |
| } | |
| | { | |
| kind: 'confirmed'; | |
| } | |
| | { | |
| diagnostic: string; | |
| kind: 'failed'; | |
| }; | |
| export type HostLogPosition = | |
| | { | |
| kind: 'tail'; | |
| } | |
| | { | |
| cursor: HostLogCursor; | |
| kind: 'after'; | |
| }; | |
| export type HostLogCursor = string; | |
| export type HostLogPage = | |
| | { | |
| kind: 'missing'; | |
| } | |
| | { | |
| cursor: HostLogCursor; | |
| bytes: string; | |
| reset?: HostLogReset | null; | |
| truncated: boolean; | |
| hasMore: boolean; | |
| kind: 'data'; | |
| }; | |
| export type HostLogReset = 'replaced' | 'truncated'; | |
| export type UiAuthoringCommand = | |
| | { | |
| method: 'instances'; | |
| input: DeploymentInstances; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| method: 'readDocument'; | |
| input: DeploymentDocumentRead; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| method: 'readPackage'; | |
| input: PackageSourceRead; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| method: 'installSource'; | |
| input: PackageSourceInstall; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| method: 'installUrl'; | |
| input: PackageUrlInstall; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| method: 'replaceSource'; | |
| input: DeploymentSourceReplace; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| method: 'editComposition'; | |
| input: CompositionEdit; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| method: 'configure'; | |
| input: InstanceConfigure; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| method: 'bindingCandidates'; | |
| input: BindingCandidatesRead; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| method: 'packageSettings'; | |
| input: PackageSettingsRead; | |
| [k: string]: unknown | undefined; | |
| }; | |
| /** | |
| * A fixed committed source for continuation; no runtime or permission claim. | |
| */ | |
| export type DeploymentInstances = | |
| | { | |
| kind: 'start'; | |
| } | |
| | { | |
| source: DeploymentRef; | |
| after?: InstanceId | null; | |
| kind: 'continue'; | |
| }; | |
| export type ExecutionLocation = 'host' | 'ui'; | |
| export type PresentationTarget = 'tui'; | |
| /** | |
| * Templates can select an entry in their own immutable package without a | |
| * self-referential content hash. Deployment roots must select a pinned revision. | |
| */ | |
| export type PackageSelection = | |
| | { | |
| package: PackageRef; | |
| source: 'pinned'; | |
| } | |
| | { | |
| source: 'current'; | |
| }; | |
| export type PackageUse = 'entry' | 'composition'; | |
| export type Target = | |
| | { | |
| path: string[]; | |
| export: string; | |
| kind: 'instance'; | |
| } | |
| | { | |
| name: string; | |
| kind: 'import'; | |
| } | |
| | { | |
| deployment: string; | |
| instance: InstanceId; | |
| export: string; | |
| kind: 'remote'; | |
| }; | |
| export type Interface = | |
| | { | |
| methods: { | |
| [k: string]: Method | undefined; | |
| }; | |
| kind: 'service'; | |
| } | |
| | { | |
| props: unknown; | |
| events: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| captures: { | |
| [k: string]: Capture | undefined; | |
| }; | |
| kind: 'component'; | |
| } | |
| | { | |
| schema: unknown; | |
| kind: 'value'; | |
| } | |
| | { | |
| resource: string; | |
| schema: unknown; | |
| kind: 'resource'; | |
| }; | |
| export type MethodMode = 'query' | 'mutation' | 'subscription'; | |
| /** | |
| * Resource captures enter checked service slots; continuations remain in the | |
| * original presentation owner and only decide admission of query feedback. | |
| */ | |
| export type CaptureOutput = | |
| | { | |
| resource: ResourceType; | |
| kind: 'resource'; | |
| } | |
| | { | |
| kind: 'continuation'; | |
| }; | |
| export type Availability = 'required' | 'optional'; | |
| /** | |
| * One atomic patch to the original source, not a saved plan or draft registry. | |
| */ | |
| export type CompositionChange = | |
| | { | |
| name: string; | |
| package: PackageRef; | |
| settings: SettingChange[]; | |
| bindings: { | |
| [k: string]: Target[] | undefined; | |
| }; | |
| kind: 'insert'; | |
| } | |
| | { | |
| name: string; | |
| configuration: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| bindings: { | |
| [k: string]: Target[] | undefined; | |
| }; | |
| kind: 'update'; | |
| } | |
| | { | |
| name: string; | |
| kind: 'remove'; | |
| }; | |
| export type SettingValue = | |
| | { | |
| text: string; | |
| kind: 'text'; | |
| } | |
| | { | |
| text: string; | |
| kind: 'number'; | |
| } | |
| | { | |
| value: boolean; | |
| kind: 'boolean'; | |
| } | |
| | { | |
| kind: 'null'; | |
| }; | |
| export type BindingConsumer = | |
| | { | |
| name: string; | |
| kind: 'root'; | |
| } | |
| | { | |
| package: PackageRef; | |
| kind: 'package'; | |
| }; | |
| export type UiAuthoringState = | |
| | { | |
| status: 'queued'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| status: 'claimed'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| outcome: unknown; | |
| status: 'completed'; | |
| [k: string]: unknown | undefined; | |
| }; | |
| export type SettingKind = | |
| | 'text' | |
| | 'number' | |
| | 'boolean' | |
| | 'object' | |
| | 'array' | |
| | 'null' | |
| | 'unsupported'; | |
| export type BindingCandidate = | |
| | { | |
| key: string; | |
| label: string; | |
| presentation?: PackagePresentation; | |
| target: Target; | |
| kind: 'bound'; | |
| } | |
| | { | |
| key: string; | |
| label: string; | |
| presentation?: PackagePresentation; | |
| package: PackageRef; | |
| export: string; | |
| kind: 'package'; | |
| }; | |
| export type Cardinality = | |
| | { | |
| kind: 'one'; | |
| } | |
| | { | |
| kind: 'optional'; | |
| } | |
| | { | |
| min: number; | |
| max: number; | |
| kind: 'many'; | |
| }; | |
| /** | |
| * A deterministic refusal is a recorded business result. Uncertain SQL/worker | |
| * failures remain in the original operation journal's Unknown outcome. | |
| */ | |
| export type ManagementResultForPackageInstalled = | |
| | { | |
| value: PackageInstalled; | |
| status: 'committed'; | |
| } | |
| | { | |
| currentRevision: number; | |
| status: 'conflict'; | |
| } | |
| | { | |
| reason: ManagementRejection; | |
| diagnostic?: string | null; | |
| status: 'rejected'; | |
| }; | |
| export type ManagementRejection = | |
| | 'invalid_bundle' | |
| | 'download_failed' | |
| | 'invalid_document' | |
| | 'invalid_source' | |
| | 'package_unavailable' | |
| | 'execution_environment' | |
| | 'instance_unavailable' | |
| | 'parent_disabled'; | |
| /** | |
| * A deterministic refusal is a recorded business result. Uncertain SQL/worker | |
| * failures remain in the original operation journal's Unknown outcome. | |
| */ | |
| export type ManagementResultForDeploymentRef = | |
| | { | |
| value: DeploymentRef; | |
| status: 'committed'; | |
| } | |
| | { | |
| currentRevision: number; | |
| status: 'conflict'; | |
| } | |
| | { | |
| reason: ManagementRejection; | |
| diagnostic?: string | null; | |
| status: 'rejected'; | |
| }; | |
| export type Implementation = | |
| | { | |
| module: string; | |
| realm: Realm; | |
| kind: 'javascript'; | |
| } | |
| | { | |
| implementation: string; | |
| kind: 'native'; | |
| }; | |
| export type Realm = 'shared' | 'dedicated'; | |
| /** | |
| * Actual exports from a local JavaScript entry. Values are immutable for this | |
| * activation; component paths are captured before publication. | |
| */ | |
| export type UiExport = | |
| | { | |
| contract: Contract; | |
| component: string[]; | |
| kind: 'component'; | |
| } | |
| | { | |
| contract: Contract; | |
| value: unknown; | |
| kind: 'value'; | |
| }; | |
| /** | |
| * Input origin is assigned by the application, never by plugin event payloads. | |
| */ | |
| export type ComponentInput = | |
| | { | |
| key: string; | |
| event: unknown; | |
| kind: 'raw'; | |
| } | |
| | { | |
| key: string; | |
| event: unknown; | |
| kind: 'action'; | |
| } | |
| | { | |
| key: string; | |
| child: string; | |
| name: string; | |
| event: unknown; | |
| kind: 'component'; | |
| }; | |
| export type Surface = { | |
| binding: string; | |
| kind: 'terminal'; | |
| }; | |
| export type TerminalScene = | |
| | { | |
| key: string; | |
| direction: TerminalDirection; | |
| color: TerminalColor; | |
| ascii: boolean; | |
| kind: 'rule'; | |
| } | |
| | { | |
| key: string; | |
| label: string; | |
| options: TerminalChoiceOption[]; | |
| current?: string | null; | |
| disabled?: boolean; | |
| ascii?: boolean; | |
| foreground: TerminalColor; | |
| background: TerminalColor; | |
| border: TerminalColor; | |
| selected: TerminalColor; | |
| accent: TerminalColor; | |
| kind: 'choice'; | |
| } | |
| | { | |
| key: string; | |
| content: TerminalScene; | |
| disabled?: boolean; | |
| current?: boolean; | |
| /** | |
| * Current-row fill; absent uses the terminal's reverse-video selection. | |
| */ | |
| selected_color?: TerminalColor | null; | |
| selected_foreground?: TerminalColor | null; | |
| follow_focus?: boolean; | |
| submit?: boolean; | |
| /** | |
| * Emit submit for physical Space; focus and pointer activation stay separate. | |
| */ | |
| submit_space?: boolean; | |
| kind: 'item'; | |
| } | |
| | { | |
| key: string; | |
| /** | |
| * Native Copy selection entry; absent omits selection capture. | |
| */ | |
| copy_selection_label?: string | null; | |
| background: TerminalScene; | |
| content: TerminalScene; | |
| /** | |
| * Place a controlled dialog next to its background, preferring above it. | |
| * The viewport bounds remain authoritative on small terminals. | |
| */ | |
| anchor_to_background?: boolean; | |
| ascii?: boolean; | |
| label: string; | |
| /** | |
| * Maximum foreground body dimensions, in terminal cells. | |
| */ | |
| width: number; | |
| height: number; | |
| background_color: TerminalColor; | |
| border_color: TerminalColor; | |
| title_color?: TerminalColor | null; | |
| padding?: number; | |
| kind: 'context_menu'; | |
| } | |
| | { | |
| key: string; | |
| background: TerminalScene; | |
| content: TerminalScene; | |
| open: boolean; | |
| /** | |
| * Place a controlled dialog next to its background, preferring above it. | |
| * The viewport bounds remain authoritative on small terminals. | |
| */ | |
| anchor_to_background?: boolean; | |
| ascii?: boolean; | |
| label: string; | |
| /** | |
| * Maximum foreground body dimensions, in terminal cells. | |
| */ | |
| width: number; | |
| height: number; | |
| background_color: TerminalColor; | |
| border_color: TerminalColor; | |
| title_color?: TerminalColor | null; | |
| padding?: number; | |
| kind: 'dialog'; | |
| } | |
| | { | |
| key: string; | |
| background: TerminalScene; | |
| content: TerminalScene; | |
| pane_width: number; | |
| inline_min_width: number; | |
| auto_inline_min_width: number; | |
| overlay: TerminalDialogAppearance; | |
| motion: boolean; | |
| command?: TerminalPaneCommand | null; | |
| kind: 'adaptive_pane'; | |
| } | |
| | { | |
| key: string; | |
| direction: TerminalDirection; | |
| wide?: TerminalResponsiveStack | null; | |
| gap: number; | |
| padding: number; | |
| /** | |
| * Layout-only stacks inherit their parent; an explicit color fills the area. | |
| */ | |
| background?: TerminalColor | null; | |
| children: TerminalScene[]; | |
| /** | |
| * One cell outside padding; absent means no border or border inset. | |
| */ | |
| border?: TerminalBorder | null; | |
| /** | |
| * Establish the allocated inner size as the descendants' layout viewport. | |
| * Children do not contribute intrinsic size; use grow/basis or an | |
| * externally allocated root area to supply this container's size. | |
| */ | |
| viewport?: boolean; | |
| /** | |
| * One Tab stop; arrows navigate its items in declaration order. | |
| */ | |
| focus_group?: boolean; | |
| /** | |
| * On structural reveal, focus the first visible enabled tab stop; | |
| * a scrollable container without tab stops receives focus itself. | |
| */ | |
| auto_focus?: boolean; | |
| wheel?: TerminalWheelCommands | null; | |
| shortcuts?: Shortcut[]; | |
| focus_shortcuts?: FocusShortcut[]; | |
| layout?: TerminalLayout; | |
| scroll?: TerminalScrollPolicy & string; | |
| visible?: boolean; | |
| kind: 'stack'; | |
| } | |
| | { | |
| key: string; | |
| text: string; | |
| /** | |
| * Passive hover description; never participates in focus or activation. | |
| */ | |
| hint?: string; | |
| color: TerminalColor; | |
| /** | |
| * Render a single line, eliding overflow at a complete grapheme. | |
| */ | |
| truncate?: boolean; | |
| animation?: TerminalAnimationFrame[]; | |
| align?: TerminalAlign & string; | |
| bold?: boolean; | |
| kind: 'text'; | |
| } | |
| | { | |
| key: string; | |
| label: string; | |
| /** | |
| * Label alignment within the button hit area; absent centers it. | |
| */ | |
| align?: TerminalAlign | null; | |
| hint?: string; | |
| /** | |
| * Enter a declared child's native focus target instead of emitting a click. | |
| */ | |
| focus_child?: string | null; | |
| /** | |
| * Copy this committed text as the physical button's default action. | |
| * No clipboard access occurs from a synthetic component dispatch. | |
| */ | |
| copy_text?: string | null; | |
| disabled?: boolean; | |
| /** | |
| * Absent foreground uses the terminal's default text color. | |
| */ | |
| color?: TerminalColor | null; | |
| /** | |
| * Fill the whole button hit area at rest; absent inherits its parent. | |
| */ | |
| background?: TerminalColor | null; | |
| /** | |
| * Hover lifts the fill without selecting or focusing the button. | |
| */ | |
| hover_background?: TerminalColor | null; | |
| /** | |
| * Emphasize the label and hit area independently of keyboard focus. | |
| */ | |
| bold?: boolean; | |
| kind: 'button'; | |
| } | |
| | { | |
| key: string; | |
| binding: string; | |
| member: number; | |
| props: unknown; | |
| on: { | |
| [k: string]: string | undefined; | |
| }; | |
| kind: 'component'; | |
| }; | |
| export type TerminalDirection = 'row' | 'column'; | |
| /** | |
| * Terminal colors retain the user's ANSI palette and default background. | |
| * Numeric values are RGB; named values are emitted as terminal attributes. | |
| */ | |
| export type TerminalColor = number | TerminalNamedColor; | |
| export type TerminalNamedColor = | |
| | 'reset' | |
| | 'black' | |
| | 'red' | |
| | 'green' | |
| | 'yellow' | |
| | 'blue' | |
| | 'magenta' | |
| | 'cyan' | |
| | 'gray' | |
| | 'dark_gray' | |
| | 'light_red' | |
| | 'light_green' | |
| | 'light_yellow' | |
| | 'light_blue' | |
| | 'light_magenta' | |
| | 'light_cyan' | |
| | 'white'; | |
| export type TerminalPaneOperation = 'toggle' | 'dismiss_transient'; | |
| /** | |
| * Native scroll policy; offsets and accepted viewport geometry remain native. | |
| */ | |
| export type TerminalScrollPolicy = 'none' | 'manual' | 'anchor' | 'follow_end'; | |
| export type TerminalBorderStyle = 'rounded' | 'square' | 'ascii'; | |
| export type Modifier = 'control' | 'primary' | 'alt' | 'shift' | 'super'; | |
| export type TerminalAlign = 'start' | 'center' | 'end'; | |
| export type CapturePlan = | |
| | { | |
| source: CaptureSource; | |
| kind: 'forward'; | |
| } | |
| | { | |
| kind: 'native'; | |
| }; | |
| export type ActionOutcome = | |
| | { | |
| reason: string; | |
| status: 'not_accepted'; | |
| } | |
| | { | |
| value: unknown; | |
| status: 'succeeded'; | |
| } | |
| | { | |
| value: unknown; | |
| status: 'updated'; | |
| } | |
| | { | |
| reason: string; | |
| status: 'failed'; | |
| } | |
| | { | |
| status: 'stale'; | |
| } | |
| | { | |
| reply: OperationReply; | |
| /** | |
| * Position of the original confirmed caller commit, independent of the | |
| * business outcome. A missing commit never authorizes advancing recovery. | |
| */ | |
| caller: CallerConfirmation | null; | |
| status: 'operation'; | |
| }; | |
| export type FontFamily = string; | |
| /** | |
| * Packed RGBA, including explicit alpha zero. | |
| */ | |
| export type Color = number; | |
| export type ScrollbarMode = 'scrolling' | 'hover' | 'always'; | |
| export type ScrollbarEntrance = 'fade' | 'slide_and_fade'; | |
| /** | |
| * Product-selected native submit gesture. PrimaryEnter uses the platform | |
| * Control+Enter gesture in a terminal. | |
| */ | |
| export type SubmitKey = 'enter' | 'primary_enter' | 'control_enter'; | |
| export type EditorEdit = | |
| | { | |
| range: TextRange; | |
| text: string; | |
| kind: 'replace_range'; | |
| } | |
| | { | |
| text: string; | |
| kind: 'replace'; | |
| } | |
| | { | |
| text: string; | |
| kind: 'reset'; | |
| } | |
| | { | |
| text: string; | |
| kind: 'append'; | |
| }; | |
| export type FilePasteAction = 'next' | 'retry' | 'cancel'; | |
| export type FilePhase = 'empty' | 'choosing' | 'ready' | 'failed'; | |
| export type FileError = | |
| | 'invalid_file' | |
| | 'read_failed' | |
| | 'limit_exceeded' | |
| | 'budget_exhausted' | |
| | 'worker_failed' | |
| | 'clipboard_unavailable' | |
| | 'paste_rejected'; | |
| /** | |
| * Complete comparisons and structured patches reuse native parsers. | |
| */ | |
| export type DiffContent = | |
| | { | |
| source: string; | |
| rows: DiffRow[]; | |
| kind: 'annotated'; | |
| } | |
| | { | |
| before: string; | |
| after: string; | |
| language?: string | null; | |
| kind: 'comparison'; | |
| } | |
| | { | |
| source: string; | |
| operation: DiffPatch; | |
| language?: string | null; | |
| kind: 'patch'; | |
| }; | |
| export type DiffKind = 'removed' | 'added' | 'context' | 'content'; | |
| export type DiffPatch = 'create' | 'update'; | |
| export type ShellOutput = | |
| | { | |
| stdout: string; | |
| stderr: string; | |
| latestStream?: PipeStream; | |
| stdoutTruncated: boolean; | |
| stderrTruncated: boolean; | |
| redacted: boolean; | |
| mode: 'pipes'; | |
| } | |
| | { | |
| screen: string; | |
| scrollback: string; | |
| lastAlternateScreen?: string; | |
| cols: number; | |
| rows: number; | |
| cursor: TerminalCursor; | |
| alternateScreen: boolean; | |
| truncated: boolean; | |
| redacted: boolean; | |
| mode: 'pty'; | |
| }; | |
| export type PipeStream = 'stdout' | 'stderr'; | |
| export type RawAction = | |
| | { | |
| text: string; | |
| type: 'text'; | |
| } | |
| | { | |
| text: string; | |
| type: 'paste'; | |
| } | |
| | { | |
| key: string; | |
| modifiers?: TerminalModifiers; | |
| type: 'key'; | |
| } | |
| | { | |
| event: RawEvent; | |
| x: number; | |
| y: number; | |
| button?: MouseButton; | |
| direction?: ScrollDirection; | |
| modifiers?: TerminalModifiers; | |
| type: 'mouse'; | |
| }; | |
| /** | |
| * @maxItems 3 | |
| */ | |
| export type TerminalModifiers = | |
| | [] | |
| | [Modifier2] | |
| | [Modifier2, Modifier2] | |
| | [Modifier2, Modifier2, Modifier2]; | |
| export type Modifier2 = 'ctrl' | 'alt' | 'shift'; | |
| export type RawEvent = 'click' | 'press' | 'release' | 'move' | 'scroll'; | |
| export type MouseButton = 'left' | 'middle' | 'right'; | |
| export type ScrollDirection = 'up' | 'down'; | |
| export type TerminalViewError = 'input_full' | 'input_failed' | 'budget_exhausted'; | |
| export type ReadingTarget = | |
| | { | |
| kind: 'start'; | |
| } | |
| | { | |
| kind: 'end'; | |
| } | |
| | { | |
| query: string; | |
| step: FindStep; | |
| kind: 'find'; | |
| } | |
| | { | |
| kind: 'clear_find'; | |
| } | |
| | { | |
| rows: number; | |
| kind: 'scroll_rows'; | |
| } | |
| | { | |
| /** | |
| * @minItems 1 | |
| */ | |
| path: [string, ...string[]]; | |
| offset: number; | |
| /** | |
| * If supplied, reveal only while this accepted find retains its original physical intent. | |
| */ | |
| find_sequence?: number | null; | |
| kind: 'reveal_source'; | |
| } | |
| | { | |
| key: string; | |
| kind: 'focus_item'; | |
| } | |
| | { | |
| key: string; | |
| kind: 'reveal_child'; | |
| }; | |
| export type FindStep = 'first' | 'next' | 'previous'; | |
| export type ReadingScrollDirection = 'up' | 'down'; | |
| export type ReadingStatus = 'applied' | 'cancelled' | 'rejected'; | |
| export type ValueCheckpointCommand = | |
| | { | |
| sequence: number; | |
| kind: 'read'; | |
| } | |
| | { | |
| sequence: number; | |
| expectedRevision?: number | null; | |
| value: unknown; | |
| kind: 'write'; | |
| }; | |
| export type TextFileOperation = | |
| | { | |
| kind: 'read'; | |
| } | |
| | { | |
| expectedDigest?: string | null; | |
| text: string; | |
| kind: 'write'; | |
| }; | |
| export type TextFileState = | |
| | { | |
| kind: 'unavailable'; | |
| } | |
| | { | |
| kind: 'idle'; | |
| } | |
| | { | |
| kind: 'loading'; | |
| } | |
| | { | |
| kind: 'saving'; | |
| } | |
| | { | |
| digest?: string | null; | |
| text?: string | null; | |
| kind: 'ready'; | |
| } | |
| | { | |
| error: TextFileError; | |
| kind: 'failed'; | |
| }; | |
| export type TextFileError = | |
| | 'read_failed' | |
| | 'write_failed' | |
| | 'invalid_file' | |
| | 'invalid_utf8' | |
| | 'conflict' | |
| | 'worker_failed'; | |
| export type ValueCheckpointState = | |
| | { | |
| kind: 'loading'; | |
| } | |
| | { | |
| kind: 'saving'; | |
| } | |
| | { | |
| revision?: number | null; | |
| value?: unknown; | |
| kind: 'ready'; | |
| } | |
| | { | |
| diagnostic: string; | |
| kind: 'failed'; | |
| }; | |
| export type TerminalPaste = 'reject_controls' | 'spaces'; | |
| export type EditorOutcome = | |
| | { | |
| status: 'applied'; | |
| } | |
| | { | |
| reason: EditorConflict; | |
| status: 'conflict'; | |
| }; | |
| export type EditorConflict = | |
| | 'persistence' | |
| | 'owner' | |
| | 'representation' | |
| | 'revision' | |
| | 'composition' | |
| | 'sequence'; | |
| export type EditorCheckpointState = | |
| | { | |
| kind: 'loading'; | |
| } | |
| | { | |
| version: number; | |
| snapshot: EditorSnapshot; | |
| metadata: unknown; | |
| kind: 'restore'; | |
| } | |
| | { | |
| saved: boolean; | |
| initialized: boolean; | |
| kind: 'ready'; | |
| } | |
| | { | |
| diagnostic: string; | |
| kind: 'failed'; | |
| }; | |
| export type EditorCapture = | |
| | { | |
| kind: 'current'; | |
| } | |
| | { | |
| owner: string; | |
| revision: number; | |
| kind: 'at_revision'; | |
| }; | |
| /** | |
| * Session sandbox policy. Full access explicitly disables filesystem and process isolation. | |
| */ | |
| export type AgentWorkspaceAccess = 'read_only' | 'workspace_write' | 'danger_full_access'; | |
| export type AgentToolInput = ('json' | 'skill' | 'web') | 'shell'; | |
| export type AgentToolResult = ('json' | 'image') | 'computer'; | |
| export type AgentToolConfirmation = 'required' | 'preapproved'; | |
| export type Network = | |
| | ('denied' | 'allowed') | |
| | { | |
| restricted: { | |
| destinations: Destination[]; | |
| }; | |
| }; | |
| export type JevCredentialTarget = | |
| | { | |
| kind: 'api_key'; | |
| } | |
| | { | |
| name: string; | |
| kind: 'header'; | |
| }; | |
| export type JevCredentialChange = 'replace' | 'remove'; | |
| export type JevUpdate = | |
| | { | |
| snapshot: JevSnapshot; | |
| kind: 'updated'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| kind: 'invalid'; | |
| }; | |
| export type JevQuestion = | |
| | { | |
| instructions: unknown; | |
| criteria?: { | |
| [k: string]: unknown | undefined; | |
| } | null; | |
| type: 'noul'; | |
| } | |
| | { | |
| instructions: unknown; | |
| criteria: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| type: 'choice'; | |
| } | |
| | { | |
| instructions: unknown; | |
| criteria: unknown[]; | |
| type: 'score'; | |
| }; | |
| export type JevResult = | |
| | { | |
| value: JevEvaluationResult; | |
| kind: 'completed'; | |
| } | |
| | { | |
| message: string; | |
| kind: 'failed'; | |
| }; | |
| export type JevAnswer = | |
| | { | |
| noul: number; | |
| type: 'noul'; | |
| } | |
| | { | |
| choice: string; | |
| confidence: number; | |
| probabilities: { | |
| [k: string]: number | undefined; | |
| }; | |
| type: 'choice'; | |
| } | |
| | { | |
| score: number; | |
| confidence: number; | |
| probabilities: { | |
| [k: string]: number | undefined; | |
| }; | |
| legend: { | |
| [k: string]: string | undefined; | |
| }; | |
| type: 'score'; | |
| }; | |
| export type WebSource = 'model' | 'tavily'; | |
| export type WebUpdate = | |
| | { | |
| snapshot: WebSnapshot; | |
| kind: 'updated'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| kind: 'invalid_key'; | |
| } | |
| | { | |
| kind: 'check_unavailable'; | |
| }; | |
| export type WebCheckOutcome = | |
| | 'valid' | |
| | 'invalid_credentials' | |
| | 'rate_limited' | |
| | 'network_error' | |
| | 'timeout'; | |
| export type WebResult = | |
| | { | |
| value: unknown; | |
| kind: 'completed'; | |
| } | |
| | { | |
| message: string; | |
| kind: 'failed'; | |
| }; | |
| export type WebEndpoint = | |
| | { | |
| state: 'not_checked'; | |
| } | |
| | { | |
| target: string; | |
| error: string; | |
| state: 'unknown'; | |
| } | |
| | { | |
| target: string; | |
| httpStatus: number; | |
| elapsedMs: number; | |
| health: WebReadiness; | |
| state: 'checked'; | |
| }; | |
| export type WebReadiness = 'healthy' | 'unknown' | 'unhealthy'; | |
| export type ThinkingLevel = | |
| | 'off' | |
| | 'minimal' | |
| | 'low' | |
| | 'medium' | |
| | 'high' | |
| | 'xhigh' | |
| | 'max' | |
| | 'ultra'; | |
| export type AgentGlobalInstructionsView = | |
| | { | |
| source: AgentGlobalInstructionSource; | |
| path: string; | |
| revision: string; | |
| content: string; | |
| exists: boolean; | |
| kind: 'available'; | |
| } | |
| | { | |
| kind: 'unavailable'; | |
| }; | |
| export type AgentGlobalInstructionSource = 'maka' | 'agents'; | |
| export type AgentGlobalInstructionsUpdated = | |
| | { | |
| kind: 'saved'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| kind: 'unavailable'; | |
| }; | |
| export type Language = 'en' | 'zh-CN' | 'zh-TW'; | |
| export type ExecutorSetupAction = | |
| | { | |
| kind: 'check'; | |
| } | |
| | { | |
| methodId: string; | |
| kind: 'authenticate'; | |
| }; | |
| export type ExecutorSetupResult = | |
| | { | |
| info?: ExecutorSetupInfo | null; | |
| methods: ExecutorAuthenticationMethod[]; | |
| kind: 'checked'; | |
| } | |
| | { | |
| kind: 'authenticated'; | |
| } | |
| | { | |
| diagnostic: string; | |
| kind: 'unresolved'; | |
| }; | |
| export type ExecutorSetupProgress = { | |
| url: string; | |
| kind: 'authorization_url'; | |
| }; | |
| /** | |
| * Selects the Host's local desktop or its Windows host when running in WSL. | |
| * Executables and transport addresses are exclusively Host configuration. | |
| */ | |
| export type Desktop = 'auto' | 'local' | 'windows'; | |
| export type ComputerReplState = 'fresh' | 'ready' | 'reset_required'; | |
| export type ComputerResult = | |
| | { | |
| artifact: string; | |
| state: ComputerReplState; | |
| kind: 'completed'; | |
| } | |
| | { | |
| message: string; | |
| state: ComputerReplState; | |
| kind: 'failed'; | |
| }; | |
| export type Scope = 'subtree' | 'exact'; | |
| /** | |
| * Equal-path conflict priority is different from authority breadth: deny wins. | |
| */ | |
| export type Access = 'read' | 'write' | 'deny'; | |
| export type ExecutorOutcome = | |
| | { | |
| text: string; | |
| status: 'completed'; | |
| } | |
| | { | |
| reason?: string | null; | |
| status: 'cancelled'; | |
| } | |
| | { | |
| message: string; | |
| code?: string | null; | |
| recoverable?: boolean; | |
| status: 'failed'; | |
| }; | |
| /** | |
| * External tool activity is observation, never a request to dispatch a Host tool. | |
| */ | |
| export type ExecutorOutput = | |
| | { | |
| text: string; | |
| type: 'output_delta'; | |
| } | |
| | { | |
| text: string; | |
| type: 'thinking_delta'; | |
| } | |
| | { | |
| toolCallId: string; | |
| name: string; | |
| input: unknown; | |
| type: 'tool_start'; | |
| } | |
| | { | |
| toolCallId: string; | |
| text: string; | |
| type: 'tool_progress'; | |
| } | |
| | { | |
| toolCallId: string; | |
| text: string; | |
| isError?: boolean; | |
| type: 'tool_result'; | |
| }; | |
| export type ProtocolProcessProgress = | |
| | { | |
| id: string; | |
| kind: 'started'; | |
| } | |
| | { | |
| stream: ProtocolProcessStream; | |
| /** | |
| * @maxItems 8192 | |
| */ | |
| bytes: number[]; | |
| kind: 'output'; | |
| }; | |
| export type ProtocolProcessStream = 'stdout' | 'stderr'; | |
| export type ProtocolProcessCompletion = | |
| | { | |
| code?: number | null; | |
| success: boolean; | |
| stopped: boolean; | |
| error?: string | null; | |
| kind: 'exited'; | |
| } | |
| | { | |
| message: string; | |
| kind: 'failed'; | |
| }; | |
| export type WorkHubPresetsResult = | |
| | { | |
| snapshot: WorkHubPresets; | |
| kind: 'saved'; | |
| } | |
| | { | |
| snapshot: WorkHubPresets; | |
| kind: 'conflict'; | |
| } | |
| | { | |
| kind: 'invalid'; | |
| }; | |
| export type GraphId = string; | |
| export type WorkId = string; | |
| export type GraphMode = 'graph' | 'swarm'; | |
| export type GraphStatus = | |
| | 'empty' | |
| | 'active' | |
| | 'waiting' | |
| | 'closing' | |
| | 'stopped' | |
| | 'completed' | |
| | 'failed'; | |
| export type GraphTarget = | |
| | { | |
| agentId: string; | |
| kind: 'agent'; | |
| } | |
| | { | |
| presetId: string; | |
| kind: 'preset'; | |
| } | |
| | { | |
| executorId: string; | |
| kind: 'executor'; | |
| } | |
| | { | |
| operatorId: OperatorId; | |
| kind: 'operator'; | |
| }; | |
| export type OperatorId = string; | |
| export type GraphWorkState = | |
| | 'requested' | |
| | 'waiting' | |
| | 'running' | |
| | 'blocked' | |
| | 'completed' | |
| | 'failed' | |
| | 'cancelled' | |
| | 'stopped' | |
| | 'superseded'; | |
| export type AgentExecutionState = | |
| | 'admitted' | |
| | 'running' | |
| | 'waiting' | |
| | 'paused' | |
| | 'completed' | |
| | 'failed' | |
| | 'cancelled'; | |
| export type WorkHubGraphAction = | |
| | { | |
| mode: GraphMode; | |
| kind: 'start'; | |
| } | |
| | { | |
| kind: 'stop'; | |
| } | |
| | { | |
| kind: 'leave'; | |
| }; | |
| export type WorkHubGraphChanged = | |
| | { | |
| epoch: GraphEpoch; | |
| kind: 'committed'; | |
| } | |
| | { | |
| current?: GraphEpoch | null; | |
| kind: 'conflict'; | |
| } | |
| | { | |
| reason: string; | |
| kind: 'rejected'; | |
| }; | |
| export type WorkHubCoordinator = | |
| | { | |
| kind: 'missing'; | |
| } | |
| | { | |
| workspace: AgentDirectorySelection; | |
| kind: 'pending'; | |
| } | |
| | { | |
| session: AgentSession; | |
| kind: 'ready'; | |
| } | |
| | { | |
| reason: AgentRejection; | |
| kind: 'rejected'; | |
| }; | |
| /** | |
| * The next turn's choice, independent of an already admitted execution. | |
| * Model revisions are resolved afresh; preferences never grant execution authority. | |
| */ | |
| export type AgentBackendPreference = | |
| | { | |
| connectionId: string; | |
| modelId: string; | |
| thinkingLevel?: ThinkingLevel | null; | |
| kind: 'model'; | |
| } | |
| | { | |
| selection: AgentExecutorSelection; | |
| kind: 'executor'; | |
| }; | |
| export type CollaborationMode = 'agent' | 'plan'; | |
| export type AgentSessionActivity = 'idle' | 'working' | 'waiting'; | |
| export type AgentRejection = | |
| | 'title_invalid' | |
| | 'labels_invalid' | |
| | 'tools_unavailable' | |
| | 'busy' | |
| | 'workspace_unavailable' | |
| | 'session_unavailable' | |
| | 'history_unavailable' | |
| | 'managed_session' | |
| | 'closed'; | |
| export type WorkHubTaskStatus = | |
| | { | |
| dependencies: string[]; | |
| kind: 'blocked'; | |
| } | |
| | { | |
| kind: 'cancelled'; | |
| } | |
| | { | |
| stage: WorkHubPreparationStage; | |
| operation: string; | |
| sessionId?: string | null; | |
| state: WorkHubPreparationState; | |
| kind: 'preparing'; | |
| } | |
| | { | |
| kind: 'pending'; | |
| } | |
| | { | |
| kind: 'uncertain'; | |
| } | |
| | { | |
| kind: 'unavailable'; | |
| } | |
| | { | |
| reason: string; | |
| kind: 'rejected'; | |
| } | |
| | { | |
| sessionId: string; | |
| invocationId: string; | |
| progress?: AgentWork | null; | |
| kind: 'started'; | |
| } | |
| | { | |
| sessionId: string; | |
| messageId: string; | |
| progress?: AgentWork | null; | |
| kind: 'queued'; | |
| }; | |
| export type WorkHubPreparationStage = | |
| | { | |
| kind: 'create'; | |
| } | |
| | { | |
| index: number; | |
| total: number; | |
| kind: 'attachment'; | |
| } | |
| | { | |
| kind: 'delivery'; | |
| }; | |
| export type WorkHubPreparationState = | |
| | { | |
| kind: 'pending'; | |
| } | |
| | { | |
| kind: 'unavailable'; | |
| } | |
| | { | |
| kind: 'uncertain'; | |
| } | |
| | { | |
| kind: 'original_capture_required'; | |
| } | |
| | { | |
| reason: string; | |
| kind: 'rejected'; | |
| }; | |
| export type AgentWork = | |
| | { | |
| kind: 'missing'; | |
| } | |
| | { | |
| kind: 'pending'; | |
| } | |
| | { | |
| kind: 'cancelled'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| shared: boolean; | |
| execution: AgentExecution; | |
| answer?: AgentAnswerPage | null; | |
| /** | |
| * Count for this exact Run; original Session interactions retain all authority. | |
| */ | |
| pendingInteractions: number; | |
| kind: 'delivered'; | |
| }; | |
| export type WorkHubControlStatus = | |
| | { | |
| kind: 'pending'; | |
| } | |
| | { | |
| kind: 'unavailable'; | |
| } | |
| | { | |
| kind: 'uncertain'; | |
| } | |
| | { | |
| outcome: WorkHubControlOutcome; | |
| kind: 'returned'; | |
| }; | |
| export type WorkHubControlOutcome = | |
| | { | |
| result: AgentPatchResult; | |
| kind: 'patch'; | |
| } | |
| | { | |
| result: AgentStopped; | |
| kind: 'stop'; | |
| } | |
| | { | |
| result: AgentResumeResult; | |
| kind: 'resume'; | |
| } | |
| | { | |
| result: AgentQueueMutationResult; | |
| kind: 'retract'; | |
| }; | |
| export type AgentPatchResult = | |
| | { | |
| kind: 'unavailable'; | |
| } | |
| | { | |
| kind: 'busy'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| patch: AgentWorkspacePatch; | |
| kind: 'ready'; | |
| }; | |
| export type AgentResumeResult = | |
| | { | |
| execution: AgentExecution; | |
| kind: 'started'; | |
| } | |
| | { | |
| reason: AgentResumeParkReason; | |
| kind: 'parked'; | |
| }; | |
| export type AgentResumeParkReason = | |
| | 'closed' | |
| | 'archived' | |
| | 'busy' | |
| | 'source_missing' | |
| | 'source_changed' | |
| | 'source_not_resumable' | |
| | 'already_continued' | |
| | 'workspace_changed' | |
| | 'safety_check_failed'; | |
| export type AgentQueueMutationResult = | |
| | { | |
| revision: number; | |
| kind: 'committed'; | |
| } | |
| | { | |
| expected: number; | |
| actual: number; | |
| kind: 'revision_conflict'; | |
| } | |
| | { | |
| reason: AgentQueueRejection; | |
| kind: 'rejected'; | |
| }; | |
| export type AgentQueueRejection = | |
| | 'closed' | |
| | 'missing' | |
| | 'in_flight' | |
| | 'invalid_edit' | |
| | 'execution_changed' | |
| | 'not_running'; | |
| export type AgentWorkTarget = | |
| | { | |
| invocationId: string; | |
| kind: 'invocation'; | |
| } | |
| | { | |
| messageId: string; | |
| kind: 'message'; | |
| }; | |
| export type SettingsModelsRead = | |
| | { | |
| query?: string; | |
| kind: 'start'; | |
| } | |
| | { | |
| revision: number; | |
| cursor: SettingsModelCursor; | |
| kind: 'continue'; | |
| }; | |
| export type UsageActivityKind = 'model' | 'tool'; | |
| export type UsageActivityStatus = 'success' | 'error' | 'aborted' | 'unknown' | 'rejected'; | |
| /** | |
| * A physical model call or tool attempt, never copied conversation membership. | |
| */ | |
| export type UsageActivity = | |
| | { | |
| kind: 'model'; | |
| attempt: UsageModelAttempt; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| kind: 'tool'; | |
| attempt: UsageToolAttempt; | |
| [k: string]: unknown | undefined; | |
| }; | |
| export type UsageOrigin = | |
| | { | |
| invocation: Invocation; | |
| purpose: ModelPurpose; | |
| kind: 'agent'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| source: UsageAuxiliarySource; | |
| kind: 'auxiliary'; | |
| [k: string]: unknown | undefined; | |
| }; | |
| export type ModelPurpose = 'main' | 'summary'; | |
| export type UsageAuxiliarySource = | |
| | { | |
| source: DeploymentRef; | |
| namespace: InstanceId; | |
| operation: string; | |
| fingerprint: string; | |
| kind: 'application_operation'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| invocation: Invocation; | |
| kind: 'session_title'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| invocation: Invocation; | |
| operation_id: string; | |
| kind: 'agent'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| id: string; | |
| kind: 'host_effect'; | |
| [k: string]: unknown | undefined; | |
| }; | |
| export type UsageOutcome = ('success' | 'error' | 'aborted') | 'unknown'; | |
| export type ToolOrigin = | |
| | { | |
| step_id: string; | |
| kind: 'provider'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| parent_operation_id: string; | |
| parent_tool_call_id: string; | |
| kind: 'code_mode'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| parent_operation_id: string; | |
| parent_tool_call_id: string; | |
| kind: 'code_cell'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| kind: 'standalone'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| package_id: string; | |
| entry_id: string; | |
| activation: string; | |
| parent_operation_id?: string | null; | |
| kind: 'host_sdk'; | |
| [k: string]: unknown | undefined; | |
| }; | |
| export type UsageToolResult = | |
| | { | |
| reason: RejectionKind; | |
| kind: 'rejected'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| startedAt: number; | |
| outcome: UsageToolStatus; | |
| kind: 'settled'; | |
| [k: string]: unknown | undefined; | |
| }; | |
| /** | |
| * Refusal category without input-derived explanation text. | |
| */ | |
| export type RejectionKind = | |
| | 'unavailable' | |
| | 'invalid_input' | |
| | 'policy_denied' | |
| | 'preparation_failed' | |
| | 'exclusive_conflict' | |
| | 'cancelled'; | |
| export type UsageToolStatus = 'success' | 'error' | 'unknown'; | |
| /** | |
| * Breakdown selected for a bounded summary page. | |
| */ | |
| export type UsageGroup = 'byProvider' | 'byModel' | 'byTool'; | |
| export type SettingsPricingResult = | |
| | { | |
| result: PricingUpdated; | |
| kind: 'updated'; | |
| } | |
| | { | |
| kind: 'rejected'; | |
| }; | |
| export type PricingUpdated = | |
| | { | |
| revision: number; | |
| kind: 'committed'; | |
| } | |
| | { | |
| revision: number; | |
| kind: 'unchanged'; | |
| } | |
| | { | |
| expectedRevision: number; | |
| actualRevision: number; | |
| kind: 'revision_conflict'; | |
| }; | |
| export type PricingQuery = | |
| | { | |
| kind: 'start'; | |
| } | |
| | { | |
| revision: number; | |
| offset: number; | |
| kind: 'continue'; | |
| }; | |
| export type PricingPage = | |
| | { | |
| revision: number; | |
| offset: number; | |
| entries: PricingEntry[]; | |
| nextOffset?: number | null; | |
| kind: 'page'; | |
| } | |
| | { | |
| expectedRevision: number; | |
| actualRevision: number; | |
| kind: 'revision_changed'; | |
| }; | |
| export type PricingEntry = | |
| | { | |
| pricing: Pricing; | |
| source: 'builtin'; | |
| } | |
| | { | |
| pricing: Pricing; | |
| resetEffect: PricingResetEffect; | |
| source: 'custom'; | |
| }; | |
| export type PricingResetEffect = 'restore_builtin' | 'become_unpriced'; | |
| export type PricingMutation = | |
| | { | |
| pricing: Pricing; | |
| kind: 'upsert'; | |
| } | |
| | { | |
| modelKey: string; | |
| kind: 'delete'; | |
| }; | |
| export type LanguagePreference = 'auto' | 'en' | 'zh-CN' | 'zh-TW'; | |
| export type ProxyProtocol = 'http' | 'https' | 'socks5'; | |
| export type CredentialLocator = | |
| | { | |
| connectionId: string; | |
| kind: ConnectionCredentialKind; | |
| scope: 'connection'; | |
| } | |
| | { | |
| kind: PasswordKind; | |
| scope: 'network_proxy'; | |
| }; | |
| export type ConnectionCredentialKind = 'provider' | 'request_headers'; | |
| export type PasswordKind = 'password'; | |
| export type SettingsNetworkCredentialAction = 'keep' | 'delete' | 'replace'; | |
| export type SettingsNetworkUpdated = | |
| | { | |
| result: NetworkProxyUpdateResult; | |
| kind: 'applied'; | |
| } | |
| | { | |
| kind: 'rejected'; | |
| }; | |
| export type NetworkProxyUpdateResult = | |
| | { | |
| revision: number; | |
| credentialStatus: CredentialStatus; | |
| kind: 'committed'; | |
| } | |
| | { | |
| expectedRevision: number; | |
| actualRevision: number; | |
| kind: 'revision_conflict'; | |
| } | |
| | { | |
| expected: CredentialTarget; | |
| actual: CredentialTarget; | |
| kind: 'proxy_target_mismatch'; | |
| } | |
| | { | |
| expected: CredentialVersionBasis | null; | |
| actual: CredentialVersionBasis | null; | |
| kind: 'credential_stale'; | |
| }; | |
| export type SettingsPreferencesMutation = | |
| | { | |
| preference: LanguagePreference; | |
| kind: 'language'; | |
| } | |
| | { | |
| prompt?: string | null; | |
| kind: 'compaction_prompt'; | |
| } | |
| | { | |
| displayName: string; | |
| kind: 'personalization'; | |
| } | |
| | { | |
| enabled: boolean; | |
| kind: 'workspace_instructions'; | |
| } | |
| | { | |
| incognitoActive: boolean; | |
| kind: 'privacy'; | |
| } | |
| | { | |
| enabled: boolean; | |
| kind: 'shell_titles'; | |
| }; | |
| export type SettingsPreferencesUpdated = | |
| | { | |
| revision: number; | |
| kind: 'committed'; | |
| } | |
| | { | |
| expectedRevision: number; | |
| actualRevision: number; | |
| kind: 'revision_conflict'; | |
| } | |
| | { | |
| kind: 'rejected'; | |
| }; | |
| export type SettingsModelsPage = | |
| | { | |
| revision: number; | |
| kind: 'changed'; | |
| } | |
| | { | |
| revision: number; | |
| /** | |
| * @maxItems 16 | |
| */ | |
| choices: | |
| | [] | |
| | [SettingsModelChoice] | |
| | [SettingsModelChoice, SettingsModelChoice] | |
| | [SettingsModelChoice, SettingsModelChoice, SettingsModelChoice] | |
| | [SettingsModelChoice, SettingsModelChoice, SettingsModelChoice, SettingsModelChoice] | |
| | [ | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| ] | |
| | [ | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| ] | |
| | [ | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| ] | |
| | [ | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| ] | |
| | [ | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| ] | |
| | [ | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| ] | |
| | [ | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| ] | |
| | [ | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| ] | |
| | [ | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| ] | |
| | [ | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| ] | |
| | [ | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| ] | |
| | [ | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| SettingsModelChoice, | |
| ]; | |
| defaultModel: SettingsDefaultModel; | |
| next: SettingsModelCursor | null; | |
| kind: 'ready'; | |
| }; | |
| /** | |
| * Interpreter used only for model-facing Code Mode cells. | |
| */ | |
| export type CodeLanguage = 'javascript' | 'python'; | |
| export type SettingsDefaultModel = | |
| | { | |
| kind: 'none'; | |
| } | |
| | { | |
| target: ConnectionTarget; | |
| kind: 'unavailable'; | |
| } | |
| | { | |
| choice: SettingsModelChoice; | |
| kind: 'ready'; | |
| }; | |
| export type SettingsConnectionsRead = | |
| | { | |
| kind: 'start'; | |
| } | |
| | { | |
| revision: number; | |
| offset: number; | |
| kind: 'continue'; | |
| }; | |
| export type SettingsConnectionsPage = | |
| | { | |
| revision: number; | |
| kind: 'changed'; | |
| } | |
| | { | |
| revision: number; | |
| defaultTarget: ConnectionTarget | null; | |
| /** | |
| * @maxItems 16 | |
| */ | |
| connections: | |
| | [] | |
| | [SettingsConnectionSummary] | |
| | [SettingsConnectionSummary, SettingsConnectionSummary] | |
| | [SettingsConnectionSummary, SettingsConnectionSummary, SettingsConnectionSummary] | |
| | [ | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| ] | |
| | [ | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| ] | |
| | [ | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| ] | |
| | [ | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| ] | |
| | [ | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| ] | |
| | [ | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| ] | |
| | [ | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| ] | |
| | [ | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| ] | |
| | [ | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| ] | |
| | [ | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| ] | |
| | [ | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| ] | |
| | [ | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| ] | |
| | [ | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| SettingsConnectionSummary, | |
| ]; | |
| next: number | null; | |
| kind: 'ready'; | |
| }; | |
| export type SettingsConnectionDetail = | |
| | { | |
| actual: ConnectionVersionBasis | null; | |
| kind: 'stale'; | |
| } | |
| | { | |
| target: ConnectionCredentialTarget; | |
| name: string; | |
| enabled: boolean; | |
| enabledModelCount: number; | |
| editing?: SettingsConnectionEditingFacts; | |
| kind: 'ready'; | |
| }; | |
| export type ApiProtocol = 'openai-chat-completions' | 'openai-responses' | 'anthropic-messages'; | |
| export type ModelModality = 'text' | 'image' | 'audio' | 'pdf' | 'video'; | |
| export type RelayServiceTier = 'fast'; | |
| export type SettingsCredentialLoginResult = | |
| | { | |
| connection: ConnectionIdentity; | |
| kind: 'saved'; | |
| } | |
| | { | |
| reason: SettingsCredentialRejection; | |
| kind: 'rejected'; | |
| } | |
| | { | |
| reason: SettingsLoginFailure; | |
| message: string; | |
| kind: 'failed'; | |
| }; | |
| export type SettingsCredentialRejection = | |
| | 'invalid_input' | |
| | 'invalid_secret' | |
| | 'secret_unavailable' | |
| | 'provider_unavailable' | |
| | 'authentication_unavailable' | |
| | 'attempt_conflict' | |
| | 'connection_changed' | |
| | 'credential_changed' | |
| | 'slug_taken' | |
| | 'authentication'; | |
| export type SettingsLoginFailure = 'cancelled' | 'expired' | 'transport' | 'authentication'; | |
| export type SettingsCredentialSaveResult = | |
| | { | |
| connection: ConnectionIdentity; | |
| kind: 'saved'; | |
| } | |
| | { | |
| reason: SettingsCredentialRejection; | |
| kind: 'rejected'; | |
| }; | |
| export type Nullable_MapOf_ModelOverride = { | |
| [k: string]: ModelOverride | undefined; | |
| } | null; | |
| export type CredentialVaultQueryResult = | |
| | { | |
| status: CredentialStatus; | |
| kind: 'status'; | |
| } | |
| | { | |
| kind: 'connection_not_found'; | |
| }; | |
| export type CredentialMutationResult = | |
| | { | |
| reason: ConfigurationRejection; | |
| kind: 'rejected'; | |
| } | |
| | { | |
| vaultRevision: number; | |
| status: CredentialStatus; | |
| kind: 'committed'; | |
| } | |
| | { | |
| kind: 'connection_not_found'; | |
| } | |
| | { | |
| expected: ConnectionVersionBasis; | |
| actual: ConnectionVersionBasis | null; | |
| kind: 'connection_stale'; | |
| } | |
| | { | |
| expected: CredentialVersionBasis | null; | |
| actual: CredentialVersionBasis | null; | |
| kind: 'credential_stale'; | |
| }; | |
| /** | |
| * A confirmed rejection contains no provider diagnostics or user input. | |
| */ | |
| export type ConfigurationRejection = | |
| | 'invalid_input' | |
| | 'invalid_configuration' | |
| | 'provider_unavailable'; | |
| export type CatalogMutationResult = | |
| | { | |
| reason: ConfigurationRejection; | |
| kind: 'rejected'; | |
| } | |
| | { | |
| catalogRevision: number; | |
| connection?: ConnectionVersionBasis | null; | |
| kind: 'committed'; | |
| } | |
| | { | |
| expectedRevision: number; | |
| actualRevision: number; | |
| kind: 'revision_conflict'; | |
| } | |
| | { | |
| slug: string; | |
| kind: 'connection_exists'; | |
| } | |
| | { | |
| expected: ConnectionVersionBasis; | |
| actual: ConnectionVersionBasis | null; | |
| kind: 'connection_stale'; | |
| } | |
| | { | |
| target: ConnectionTarget; | |
| kind: 'invalid_default_target'; | |
| }; | |
| export type SkillLibraryPage = | |
| | { | |
| writable: boolean; | |
| preferencesWritable: boolean; | |
| preferenceRevision: number; | |
| revision: string; | |
| entries: SkillLibraryEntry[]; | |
| after?: SkillLibraryCursor | null; | |
| diagnostics: string[]; | |
| kind: 'page'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| }; | |
| export type SkillLibraryDocument = | |
| | { | |
| writable: boolean; | |
| preferencesWritable: boolean; | |
| preferenceRevision: number; | |
| entry: SkillLibraryEntry; | |
| revision: string; | |
| text: string; | |
| offset: number; | |
| before?: number | null; | |
| after?: number | null; | |
| totalBytes: number; | |
| kind: 'page'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| kind: 'unavailable'; | |
| }; | |
| export type SkillLibraryChangeKind = 'install' | 'update' | 'delete'; | |
| export type SkillLibraryPreview = | |
| | { | |
| review: SkillLibraryReview; | |
| target: string; | |
| entries: number; | |
| paths: string[]; | |
| pathsTruncated: boolean; | |
| locallyModified: boolean; | |
| kind: 'ready'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| reason: string; | |
| kind: 'rejected'; | |
| }; | |
| export type SkillLibraryChangeResult = | |
| | { | |
| reference: string; | |
| kind: 'applied'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| reason: string; | |
| kind: 'rejected'; | |
| }; | |
| export type SkillLibraryPreferenceResult = | |
| | { | |
| revision: number; | |
| kind: 'applied'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| reason: string; | |
| kind: 'rejected'; | |
| }; | |
| export type SkillScope = 'project' | 'workspace' | 'user' | 'custom'; | |
| export type SkillSource = 'maka' | 'agents' | 'legacy' | 'custom'; | |
| export type SkillModelLoadResult = | |
| | { | |
| revision: string; | |
| metadata: SkillMetadata; | |
| instructions: string; | |
| instructionOffset: number; | |
| next?: SkillModelLoad | null; | |
| relativePath: string; | |
| declaredTools: string[]; | |
| declaredToolsTruncated: boolean; | |
| truncated: boolean; | |
| receipt: SkillInvocationReceipt; | |
| kind: 'loaded'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| revision: string; | |
| reference: string; | |
| path: string; | |
| content: string; | |
| offset: number; | |
| returnedLines: number; | |
| totalLines: number; | |
| partialLine: boolean; | |
| next?: SkillModelLoad | null; | |
| receipt: SkillInvocationReceipt; | |
| kind: 'resource'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| kind: 'changed'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| reason: SkillFailureReason; | |
| receipt: SkillInvocationReceipt; | |
| kind: 'unavailable'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| reason: string; | |
| kind: 'resource_unavailable'; | |
| [k: string]: unknown | undefined; | |
| }; | |
| /** | |
| * Boolean wire discriminants are validated here, not retained as mutable | |
| * business fields beside a contradictory enum variant. | |
| */ | |
| export type SkillInvocationReceipt = | |
| | { | |
| invocation: SkillInvocationMode; | |
| request: string; | |
| success: true; | |
| ref: string; | |
| id: string; | |
| name: string; | |
| scope: SkillScope; | |
| source: SkillSource; | |
| truncated: boolean; | |
| } | |
| | { | |
| invocation: SkillInvocationMode; | |
| request: string; | |
| success: false; | |
| reason: SkillFailureReason; | |
| }; | |
| export type SkillInvocationMode = 'explicit' | 'model_tool'; | |
| export type SkillFailureReason = | |
| | 'invalid_name' | |
| | 'not_found' | |
| | 'disabled' | |
| | 'host_incompatible' | |
| | 'resolution_failed'; | |
| export type SkillPreparation = | |
| | { | |
| /** | |
| * None preserves the original message exactly. | |
| */ | |
| text?: string | null; | |
| record: SkillPreparationRecord; | |
| requiredTools: string[]; | |
| kind: 'ready'; | |
| } | |
| | { | |
| invocation: SkillInvocationResult; | |
| kind: 'blocked'; | |
| }; | |
| export type SkillInvocationFailure = SkillRequestFailure; | |
| export type AgentSessionFilter = 'all' | 'archived' | 'needs_you'; | |
| export type AgentSessionPosition = | |
| | { | |
| kind: 'start'; | |
| } | |
| | { | |
| cursor: string; | |
| kind: 'at'; | |
| } | |
| | { | |
| revision: string; | |
| cursor: string; | |
| kind: 'after'; | |
| } | |
| | { | |
| revision: string; | |
| cursor: string; | |
| kind: 'before'; | |
| }; | |
| export type AgentSessionListScope = | |
| | { | |
| kind: 'all'; | |
| } | |
| | { | |
| projectId: string; | |
| kind: 'project'; | |
| } | |
| | { | |
| sessionId: string; | |
| kind: 'workspace'; | |
| }; | |
| export type AgentWorkspaceSelection = | |
| | { | |
| selection: AgentDirectorySelection; | |
| kind: 'isolated_git'; | |
| } | |
| | { | |
| project: AgentProjectRef; | |
| selection: AgentDirectorySelection; | |
| kind: 'project'; | |
| } | |
| | { | |
| selection: AgentDirectorySelection; | |
| kind: 'directory'; | |
| } | |
| | { | |
| sessionId: string; | |
| kind: 'session'; | |
| }; | |
| export type PlanComplexity = 'low' | 'medium' | 'high'; | |
| export type PlanProposalStatus = | |
| | 'pending_approval' | |
| | 'revision_requested' | |
| | 'abandoned' | |
| | 'approved'; | |
| export type PlanStepStatus = 'pending' | 'in_progress' | 'completed' | 'skipped'; | |
| export type AgentPlanPhase = | |
| | 'awaiting_admission' | |
| | 'active' | |
| | 'interrupted' | |
| | 'completed' | |
| | 'cancelled'; | |
| export type AgentPlanAction = | |
| | { | |
| proposalId: string; | |
| proposalRevision: number; | |
| approval: AgentPlanApproval; | |
| kind: 'approve'; | |
| } | |
| | { | |
| proposalId: string; | |
| kind: 'revise'; | |
| } | |
| | { | |
| proposalId: string; | |
| kind: 'abandon'; | |
| } | |
| | { | |
| executionId: string; | |
| approval: AgentPlanApproval; | |
| kind: 'resume'; | |
| } | |
| | { | |
| executionId: string; | |
| reason: string; | |
| kind: 'cancel'; | |
| }; | |
| export type AgentPlanResult = | |
| | { | |
| revision: number; | |
| kind: 'committed'; | |
| } | |
| | { | |
| actual: number; | |
| kind: 'conflict'; | |
| } | |
| | { | |
| reason: string; | |
| kind: 'rejected'; | |
| }; | |
| export type GoalStatus = | |
| | 'armed' | |
| | 'active' | |
| | 'paused' | |
| | 'waiting' | |
| | 'achieved' | |
| | 'impossible' | |
| | 'cancelled' | |
| | 'cancellation_unknown' | |
| | 'max_iterations' | |
| | 'budget_limited' | |
| | 'budget_unknown' | |
| | 'blocked'; | |
| export type GoalReportKind = 'progress' | 'achieved' | 'waiting' | 'impossible'; | |
| export type AgentGoalChange = | |
| | { | |
| sessionId: string; | |
| objective: string; | |
| maxIterations: number; | |
| tokenBudget?: number | null; | |
| start: boolean; | |
| approval: AgentGoalApproval; | |
| kind: 'create'; | |
| } | |
| | { | |
| sessionId: string; | |
| goalId: string; | |
| revision: number; | |
| action: GoalControl; | |
| /** | |
| * Explicit renewed model and session authority, only for Resume without a pending iteration. | |
| */ | |
| approval?: AgentGoalApproval | null; | |
| kind: 'control'; | |
| }; | |
| export type GoalControl = 'pause' | 'resume' | 'cancel' | 'complete'; | |
| export type AgentGoalResult = | |
| | { | |
| goalId: string; | |
| revision: number; | |
| kind: 'committed'; | |
| } | |
| | { | |
| actual?: number | null; | |
| kind: 'conflict'; | |
| } | |
| | { | |
| reason: string; | |
| kind: 'rejected'; | |
| }; | |
| export type AgentTodoStatus = 'pending' | 'in_progress' | 'completed'; | |
| export type AgentRecapReceipt = | |
| | { | |
| operationId: string; | |
| through: number; | |
| kind: 'pending'; | |
| } | |
| | { | |
| operationId: string; | |
| through: number; | |
| text: string; | |
| modelId: string; | |
| kind: 'ready'; | |
| } | |
| | { | |
| operationId: string; | |
| through: number; | |
| reason: AgentRecapFailure; | |
| kind: 'failed'; | |
| }; | |
| export type AgentRecapFailure = | |
| | 'empty_or_oversized_output' | |
| | 'incomplete_output' | |
| | 'model_unavailable'; | |
| export type AgentScheduleRead = | |
| | { | |
| cursor?: string | null; | |
| expectedRevision?: number | null; | |
| kind: 'list'; | |
| } | |
| | { | |
| taskId: string; | |
| kind: 'get'; | |
| } | |
| | { | |
| reference: RecoveryRef; | |
| kind: 'receipt'; | |
| }; | |
| export type AgentSchedules = | |
| | { | |
| revision: number; | |
| tasks: AgentScheduledSummary[]; | |
| nextCursor?: string | null; | |
| kind: 'page'; | |
| } | |
| | { | |
| detail?: AgentScheduledDetail | null; | |
| kind: 'task'; | |
| } | |
| | { | |
| revision: number; | |
| kind: 'changed'; | |
| } | |
| | { | |
| result?: AgentScheduleResult | null; | |
| kind: 'receipt'; | |
| }; | |
| export type Status = 'active' | 'paused' | 'completed' | 'expired'; | |
| export type Intent = { | |
| body: string; | |
| kind: 'text'; | |
| }; | |
| export type Schedule = | |
| | { | |
| runAt: number; | |
| kind: 'once'; | |
| } | |
| | { | |
| everySeconds: number; | |
| startAt: number; | |
| kind: 'interval'; | |
| } | |
| | { | |
| recurrence: Recurrence; | |
| anchorAt: number; | |
| kind: 'calendar'; | |
| } | |
| | { | |
| expression: string; | |
| startAt: number; | |
| kind: 'cron'; | |
| }; | |
| export type Recurrence = 'daily' | 'weekly' | 'monthly'; | |
| export type AgentScheduledEffect = | |
| | { | |
| kind: 'reminder'; | |
| } | |
| | { | |
| target: AgentScheduledTarget; | |
| model: ModelSelection; | |
| thinkingLevel?: ThinkingLevel | null; | |
| kind: 'session'; | |
| } | |
| | { | |
| target: AgentScheduledTarget; | |
| model: ModelSelection; | |
| thinkingLevel?: ThinkingLevel | null; | |
| kind: 'agent_run'; | |
| }; | |
| export type Creator = | |
| | { | |
| kind: 'user'; | |
| } | |
| | { | |
| sessionId: string; | |
| kind: 'agent'; | |
| } | |
| | { | |
| kind: 'system'; | |
| }; | |
| export type Outcome = 'ok' | 'failed' | 'blocked'; | |
| export type Misfire = 'skip' | 'latest'; | |
| export type AgentScheduleResult = | |
| | { | |
| taskId: string; | |
| revision: number; | |
| kind: 'committed'; | |
| } | |
| | { | |
| actual?: number | null; | |
| kind: 'conflict'; | |
| } | |
| | { | |
| reason: string; | |
| kind: 'rejected'; | |
| }; | |
| export type AgentScheduleChange = | |
| | { | |
| input: AgentScheduledInput; | |
| kind: 'create'; | |
| } | |
| | { | |
| taskId: string; | |
| revision: number; | |
| input: AgentScheduledInput; | |
| kind: 'update'; | |
| } | |
| | { | |
| taskId: string; | |
| revision: number; | |
| kind: 'approve'; | |
| } | |
| | { | |
| taskId: string; | |
| revision: number; | |
| kind: 'pause'; | |
| } | |
| | { | |
| taskId: string; | |
| revision: number; | |
| kind: 'resume'; | |
| } | |
| | { | |
| taskId: string; | |
| revision: number; | |
| kind: 'trigger_now'; | |
| } | |
| | { | |
| taskId: string; | |
| revision: number; | |
| delayMs: number; | |
| kind: 'snooze'; | |
| } | |
| | { | |
| taskId: string; | |
| revision: number; | |
| fireId: string; | |
| kind: 'acknowledge'; | |
| } | |
| | { | |
| taskId: string; | |
| revision: number; | |
| kind: 'clear_history'; | |
| } | |
| | { | |
| taskId: string; | |
| revision: number; | |
| kind: 'delete'; | |
| }; | |
| export type AgentImportsRead = | |
| | { | |
| kind: 'sources'; | |
| } | |
| | { | |
| source: AgentImportSourceRef; | |
| query: AgentImportQuery; | |
| kind: 'catalog'; | |
| } | |
| | { | |
| source: AgentImportSourceRef; | |
| entry: AgentImportEntryRef; | |
| digest: string | null; | |
| after: number; | |
| kind: 'preview'; | |
| } | |
| | { | |
| after: string | null; | |
| kind: 'copies'; | |
| }; | |
| export type AgentImportsPage = | |
| | { | |
| revision: number; | |
| sources: AgentImportSource[]; | |
| kind: 'sources'; | |
| } | |
| | { | |
| source: AgentImportSourceRef; | |
| /** | |
| * @maxItems 16 | |
| */ | |
| entries: | |
| | [] | |
| | [AgentImportEntry] | |
| | [AgentImportEntry, AgentImportEntry] | |
| | [AgentImportEntry, AgentImportEntry, AgentImportEntry] | |
| | [AgentImportEntry, AgentImportEntry, AgentImportEntry, AgentImportEntry] | |
| | [AgentImportEntry, AgentImportEntry, AgentImportEntry, AgentImportEntry, AgentImportEntry] | |
| | [ | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| ] | |
| | [ | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| ] | |
| | [ | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| ] | |
| | [ | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| ] | |
| | [ | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| ] | |
| | [ | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| ] | |
| | [ | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| ] | |
| | [ | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| ] | |
| | [ | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| ] | |
| | [ | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| ] | |
| | [ | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| AgentImportEntry, | |
| ]; | |
| next: string | null; | |
| kind: 'catalog'; | |
| } | |
| | { | |
| preview: AgentImportPreview; | |
| kind: 'preview'; | |
| } | |
| | { | |
| /** | |
| * @maxItems 16 | |
| */ | |
| sessions: | |
| | [] | |
| | [AgentSession] | |
| | [AgentSession, AgentSession] | |
| | [AgentSession, AgentSession, AgentSession] | |
| | [AgentSession, AgentSession, AgentSession, AgentSession] | |
| | [AgentSession, AgentSession, AgentSession, AgentSession, AgentSession] | |
| | [AgentSession, AgentSession, AgentSession, AgentSession, AgentSession, AgentSession] | |
| | [ | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| ] | |
| | [ | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| ] | |
| | [ | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| ] | |
| | [ | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| ] | |
| | [ | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| ] | |
| | [ | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| ] | |
| | [ | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| ] | |
| | [ | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| ] | |
| | [ | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| ] | |
| | [ | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| AgentSession, | |
| ]; | |
| next: string | null; | |
| kind: 'copies'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| kind: 'unavailable'; | |
| } | |
| | { | |
| kind: 'invalid'; | |
| } | |
| | { | |
| kind: 'limit'; | |
| }; | |
| export type AgentImportLocation = | |
| | { | |
| directory: AgentDirectorySelection; | |
| kind: 'codex'; | |
| } | |
| | { | |
| directory: AgentDirectorySelection; | |
| kind: 'claude_code'; | |
| } | |
| | { | |
| directory: AgentDirectorySelection; | |
| database: string; | |
| kind: 'open_code'; | |
| }; | |
| export type AgentImportRecordKind = 'user' | 'assistant' | 'tool_call' | 'tool_result' | 'note'; | |
| export type AgentImportChange = | |
| | { | |
| revision: number; | |
| id: string | null; | |
| name: string; | |
| location: AgentImportLocation; | |
| kind: 'save_source'; | |
| } | |
| | { | |
| revision: number; | |
| id: string; | |
| kind: 'remove_source'; | |
| } | |
| | { | |
| selection: AgentImportSelection; | |
| directory: AgentDirectorySelection; | |
| title: string; | |
| kind: 'copy'; | |
| }; | |
| export type AgentImportResult = | |
| | { | |
| revision: number; | |
| sources: AgentImportSource[]; | |
| kind: 'sources'; | |
| } | |
| | { | |
| session: AgentSession; | |
| kind: 'imported'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| kind: 'unavailable'; | |
| } | |
| | { | |
| kind: 'invalid'; | |
| } | |
| | { | |
| kind: 'limit'; | |
| }; | |
| export type AgentProjectsRead = | |
| | { | |
| cursor: AgentProjectCursor | null; | |
| kind: 'list'; | |
| } | |
| | { | |
| selection: AgentDirectorySelection; | |
| kind: 'directory'; | |
| }; | |
| export type AgentProjectsPage = | |
| | { | |
| revision: string; | |
| /** | |
| * @maxItems 16 | |
| */ | |
| projects: | |
| | [] | |
| | [AgentProject] | |
| | [AgentProject, AgentProject] | |
| | [AgentProject, AgentProject, AgentProject] | |
| | [AgentProject, AgentProject, AgentProject, AgentProject] | |
| | [AgentProject, AgentProject, AgentProject, AgentProject, AgentProject] | |
| | [AgentProject, AgentProject, AgentProject, AgentProject, AgentProject, AgentProject] | |
| | [ | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| ] | |
| | [ | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| ] | |
| | [ | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| ] | |
| | [ | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| ] | |
| | [ | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| ] | |
| | [ | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| ] | |
| | [ | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| ] | |
| | [ | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| ] | |
| | [ | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| ] | |
| | [ | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| AgentProject, | |
| ]; | |
| next: AgentProjectCursor | null; | |
| kind: 'projects'; | |
| } | |
| | { | |
| location: AgentProjectLocation; | |
| kind: 'directory'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| kind: 'unavailable'; | |
| }; | |
| export type AgentProjectChange = | |
| | { | |
| selection: AgentDirectorySelection; | |
| expected: AgentProjectRef | null; | |
| kind: 'register'; | |
| } | |
| | { | |
| project: AgentProjectRef; | |
| name: string; | |
| kind: 'rename'; | |
| } | |
| | { | |
| project: AgentProjectRef; | |
| kind: 'archive'; | |
| } | |
| | { | |
| project: AgentProjectRef; | |
| kind: 'restore'; | |
| } | |
| | { | |
| project: AgentProjectRef; | |
| selection: AgentDirectorySelection; | |
| destination: AgentProjectRef | null; | |
| kind: 'relocate'; | |
| }; | |
| export type AgentProjectResult = | |
| | { | |
| project: AgentProject; | |
| kind: 'committed'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| kind: 'unavailable'; | |
| } | |
| | { | |
| kind: 'busy'; | |
| } | |
| | { | |
| kind: 'invalid'; | |
| }; | |
| export type AgentCreated = | |
| | { | |
| session: AgentSession; | |
| kind: 'created'; | |
| } | |
| | { | |
| reason: AgentRejection; | |
| kind: 'rejected'; | |
| }; | |
| export type AgentForkResult = | |
| | { | |
| session: AgentSession; | |
| kind: 'forked'; | |
| } | |
| | { | |
| expected: number; | |
| actual: number; | |
| kind: 'revision_conflict'; | |
| } | |
| | { | |
| reason: AgentRejection; | |
| kind: 'rejected'; | |
| }; | |
| export type AgentDirectories = | |
| | { | |
| kind: 'roots'; | |
| } | |
| | { | |
| selection: AgentDirectorySelection; | |
| after: string | null; | |
| kind: 'children'; | |
| }; | |
| export type AgentDirectoryPage = | |
| | { | |
| roots: AgentDirectory[]; | |
| kind: 'roots'; | |
| } | |
| | { | |
| directory: AgentDirectory; | |
| /** | |
| * @maxItems 32 | |
| */ | |
| children: AgentDirectory[]; | |
| after: string | null; | |
| kind: 'children'; | |
| }; | |
| export type AgentMetadataResult = | |
| | { | |
| session: AgentSession; | |
| kind: 'committed'; | |
| } | |
| | { | |
| expected: number; | |
| actual: number; | |
| kind: 'revision_conflict'; | |
| } | |
| | { | |
| reason: AgentRejection; | |
| kind: 'rejected'; | |
| }; | |
| export type AgentSessionAction = 'archive' | 'restore' | 'remove'; | |
| export type AgentSessionChanged = | |
| | { | |
| session: AgentSession; | |
| kind: 'changed'; | |
| } | |
| | { | |
| sessionId: string; | |
| kind: 'removed'; | |
| } | |
| | { | |
| expected: number; | |
| actual: number; | |
| kind: 'revision_conflict'; | |
| } | |
| | { | |
| reason: AgentRejection; | |
| kind: 'rejected'; | |
| }; | |
| export type AgentExecutionResult = | |
| | { | |
| kind: 'missing'; | |
| } | |
| | { | |
| execution: AgentExecution; | |
| kind: 'found'; | |
| }; | |
| export type AgentAttachmentUploadResult = | |
| | { | |
| attachment: AgentAttachment; | |
| kind: 'uploaded'; | |
| } | |
| | { | |
| reason: AgentAttachmentRejection; | |
| kind: 'rejected'; | |
| }; | |
| export type AgentAttachmentRejection = 'invalid_file' | 'closed' | 'archived'; | |
| export type AgentMarkReadResult = | |
| | { | |
| session: AgentSession; | |
| kind: 'observed'; | |
| } | |
| | { | |
| reason: AgentRejection; | |
| kind: 'rejected'; | |
| }; | |
| export type AgentInteractionKind = | |
| | 'service_approval' | |
| | 'question' | |
| | 'permissions' | |
| | 'form' | |
| | 'client_capability'; | |
| export type InteractionAnswer = | |
| | { | |
| decision: Decision; | |
| kind: 'service_approval'; | |
| } | |
| | { | |
| decision: Decision2; | |
| kind: 'permissions'; | |
| } | |
| | { | |
| answers: (string | null)[]; | |
| kind: 'question'; | |
| } | |
| | (( | |
| | { | |
| values: { | |
| [k: string]: FormValue | undefined; | |
| }; | |
| action: 'accept'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| action: 'decline'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| action: 'cancel'; | |
| [k: string]: unknown | undefined; | |
| } | |
| ) & { | |
| kind: 'form'; | |
| [k: string]: unknown | undefined; | |
| }) | |
| | { | |
| decision: Decision; | |
| kind: 'client_capability'; | |
| }; | |
| export type Decision = 'allow' | 'deny'; | |
| export type Decision2 = | |
| | { | |
| decision: 'deny'; | |
| } | |
| | { | |
| permissions: Permissions; | |
| scope: Scope2; | |
| decision: 'allow'; | |
| }; | |
| export type Scope2 = 'once' | 'turn' | 'session'; | |
| export type FormValue = string | number | boolean | string[]; | |
| export type AgentInteractionResult = | |
| | { | |
| record: InteractionRecord; | |
| kind: 'recorded'; | |
| } | |
| | { | |
| reason: AgentInteractionRejection; | |
| kind: 'rejected'; | |
| }; | |
| export type InteractionRequest = | |
| | { | |
| toolUseId: string; | |
| toolName: string; | |
| service: string; | |
| method: string; | |
| binding: string; | |
| through: number; | |
| kind: 'service_approval'; | |
| } | |
| | { | |
| toolUseId: string | null; | |
| baseRevision: number; | |
| request: PermissionRequest; | |
| kind: 'permissions'; | |
| } | |
| | { | |
| toolUseId: string; | |
| questions: InteractionQuestion[]; | |
| kind: 'question'; | |
| } | |
| | { | |
| toolUseId: string; | |
| message: string; | |
| requester: FormRequester; | |
| fields: FormField[]; | |
| kind: 'form'; | |
| } | |
| | { | |
| toolUseId: string; | |
| target: GrantTarget; | |
| /** | |
| * Agent-owned approvals expire with this original permission boundary. | |
| * Older capability records without a boundary remain readable. | |
| */ | |
| baseRevision?: number | null; | |
| kind: 'client_capability'; | |
| }; | |
| export type FormField = { | |
| name: string; | |
| label: string; | |
| required: boolean; | |
| description?: string | null; | |
| [k: string]: unknown | undefined; | |
| } & FormField1; | |
| export type FormField1 = | |
| | { | |
| default?: string | null; | |
| minLength?: number | null; | |
| maxLength?: number | null; | |
| format?: FormFormat | null; | |
| kind: 'string'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| default?: number | null; | |
| minimum?: number | null; | |
| maximum?: number | null; | |
| kind: 'number'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| default?: number | null; | |
| minimum?: number | null; | |
| maximum?: number | null; | |
| kind: 'integer'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| default?: boolean | null; | |
| kind: 'boolean'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| options: FormOption[]; | |
| default?: string | null; | |
| kind: 'single_select'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| options: FormOption[]; | |
| default?: string[] | null; | |
| minItems?: number | null; | |
| maxItems?: number | null; | |
| kind: 'multi_select'; | |
| [k: string]: unknown | undefined; | |
| }; | |
| export type FormFormat = 'email' | 'uri' | 'date' | 'date-time'; | |
| export type GrantCapability = 'browser' | 'computer_use' | 'desktop_mcp' | 'mcp'; | |
| export type GrantScope = | |
| | { | |
| origin: string; | |
| kind: 'browser_origin'; | |
| } | |
| | { | |
| kind: 'capability'; | |
| } | |
| | { | |
| serverId: string; | |
| toolName: string; | |
| kind: 'mcp_tool'; | |
| }; | |
| export type InteractionOutcome = | |
| | { | |
| decision: Decision; | |
| committedAt: number; | |
| kind: 'service_approval_decision'; | |
| } | |
| | { | |
| decision: Decision2; | |
| committedAt: number; | |
| kind: 'permissions_decision'; | |
| } | |
| | { | |
| answers: (string | null)[]; | |
| committedAt: number; | |
| kind: 'question_answer'; | |
| } | |
| | (( | |
| | { | |
| values: { | |
| [k: string]: FormValue | undefined; | |
| }; | |
| action: 'accept'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| action: 'decline'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| action: 'cancel'; | |
| [k: string]: unknown | undefined; | |
| } | |
| ) & { | |
| committedAt: number; | |
| kind: 'form_answer'; | |
| [k: string]: unknown | undefined; | |
| }) | |
| | { | |
| decision: Decision; | |
| committedAt: number; | |
| kind: 'client_capability_decision'; | |
| } | |
| | { | |
| reason: ClosureReason; | |
| committedAt: number; | |
| kind: 'closure'; | |
| }; | |
| export type ClosureReason = | |
| | 'turn_stopped' | |
| | 'turn_terminal' | |
| | 'producer_cancelled' | |
| | 'timed_out' | |
| | 'host_restarted' | |
| | 'provider_disconnected'; | |
| export type AgentInteractionRejection = 'closed' | 'unavailable' | 'invalid_answer' | 'unsupported'; | |
| export type FormResponse = | |
| | { | |
| result: FormResult; | |
| kind: 'answered'; | |
| } | |
| | { | |
| reason: ClosureReason; | |
| kind: 'closed'; | |
| } | |
| | { | |
| reason: QuestionRejection; | |
| kind: 'rejected'; | |
| }; | |
| export type FormResult = | |
| | { | |
| values: { | |
| [k: string]: FormValue | undefined; | |
| }; | |
| action: 'accept'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| action: 'decline'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| action: 'cancel'; | |
| [k: string]: unknown | undefined; | |
| }; | |
| export type QuestionRejection = 'invalid_input' | 'unavailable'; | |
| export type WorkspaceProcessSessionKind = 'agent' | 'workhub'; | |
| export type AgentContextRequestState = 'requested' | 'completed' | 'interrupted'; | |
| export type AgentFileKind = 'file' | 'directory' | 'symlink' | 'other'; | |
| export type AgentFileChange = | |
| | { | |
| directoryIdentity: string; | |
| kind: 'ready'; | |
| } | |
| | { | |
| kind: 'changed'; | |
| } | |
| | { | |
| reason: AgentFileUnavailable; | |
| kind: 'unavailable'; | |
| }; | |
| export type AgentFileUnavailable = 'directory_changed'; | |
| export type GitArea = 'staged' | 'worktree' | 'untracked'; | |
| export type GitChangeKind = 'added' | 'modified' | 'deleted' | 'type_changed' | 'conflicted'; | |
| export type GitDiff = | |
| | { | |
| patch: string; | |
| kind: 'text'; | |
| } | |
| | { | |
| kind: 'binary'; | |
| } | |
| | { | |
| kind: 'unchanged'; | |
| } | |
| | { | |
| kind: 'unsupported'; | |
| }; | |
| /** | |
| * Ephemeral output observation; Closed is not a process cleanup receipt. | |
| */ | |
| export type TerminalOutputEvent = | |
| | { | |
| sequence: number; | |
| size: TerminalSize; | |
| initialSize: TerminalSize; | |
| dataBase64: string; | |
| kind: 'data'; | |
| } | |
| | { | |
| sequence: number; | |
| size: TerminalSize; | |
| initialSize: TerminalSize; | |
| kind: 'resize'; | |
| } | |
| | { | |
| after: number; | |
| size: TerminalSize; | |
| initialSize: TerminalSize; | |
| kind: 'pending'; | |
| } | |
| | { | |
| after: number; | |
| size: TerminalSize; | |
| initialSize: TerminalSize; | |
| kind: 'closed'; | |
| } | |
| | { | |
| reason: TerminalOutputUnavailable; | |
| kind: 'unavailable'; | |
| }; | |
| export type TerminalOutputUnavailable = 'not_retained'; | |
| export type TerminalOutcome_TerminalOutputEvent = | |
| | { | |
| value: TerminalOutputEvent; | |
| kind: 'completed'; | |
| } | |
| | { | |
| message: string; | |
| kind: 'failed'; | |
| }; | |
| export type Ownership = | |
| | { | |
| kind: 'local'; | |
| } | |
| | { | |
| sourceSessionId: string; | |
| ownerSessionId: string; | |
| kind: 'source_owned'; | |
| } | |
| | { | |
| sourceSessionId: string; | |
| kind: 'source_unavailable'; | |
| }; | |
| export type SnapshotKind = 'shell_run'; | |
| export type ShellMode = 'pipes' | 'pty'; | |
| export type ShellStatus = | |
| | 'starting' | |
| | 'running' | |
| | 'completed' | |
| | 'failed' | |
| | 'timed_out' | |
| | 'cancelled' | |
| | 'orphaned'; | |
| export type TerminalOutcome_TerminalPage = | |
| | { | |
| value: TerminalPage; | |
| kind: 'completed'; | |
| } | |
| | { | |
| message: string; | |
| kind: 'failed'; | |
| }; | |
| export type TerminalOutcome_ResourceUpdate = | |
| | { | |
| value: ResourceUpdate; | |
| kind: 'completed'; | |
| } | |
| | { | |
| message: string; | |
| kind: 'failed'; | |
| }; | |
| export type TerminalOutcome_TerminalLeaseUpdate = | |
| | { | |
| value: TerminalLeaseUpdate; | |
| kind: 'completed'; | |
| } | |
| | { | |
| message: string; | |
| kind: 'failed'; | |
| }; | |
| export type TerminalOutcome_TerminalControlReceipt = | |
| | { | |
| value: TerminalControlReceipt; | |
| kind: 'completed'; | |
| } | |
| | { | |
| message: string; | |
| kind: 'failed'; | |
| }; | |
| export type TerminalOutcome_TerminalReleased = | |
| | { | |
| value: TerminalReleased; | |
| kind: 'completed'; | |
| } | |
| | { | |
| message: string; | |
| kind: 'failed'; | |
| }; | |
| export type TerminalOutcome_TerminalStopped = | |
| | { | |
| value: TerminalStopped; | |
| kind: 'completed'; | |
| } | |
| | { | |
| message: string; | |
| kind: 'failed'; | |
| }; | |
| export type QuestionResult = | |
| | { | |
| answers: QuestionResponse[]; | |
| kind: 'answered'; | |
| } | |
| | { | |
| reason: ClosureReason; | |
| kind: 'closed'; | |
| } | |
| | { | |
| reason: QuestionRejection; | |
| kind: 'rejected'; | |
| }; | |
| export type AgentSendResult = | |
| | { | |
| sessionId: string; | |
| reason: AgentSkillInputRejection; | |
| skills?: SkillInvocationResult | null; | |
| kind: 'rejected'; | |
| } | |
| | { | |
| sessionId: string; | |
| invocationId: string; | |
| messageId: string; | |
| kind: 'started'; | |
| } | |
| | { | |
| sessionId: string; | |
| messageId: string; | |
| revision: number; | |
| kind: 'queued'; | |
| }; | |
| export type AgentSkillInputRejection = 'skills_unavailable'; | |
| export type AgentDeliveryFact = | |
| | { | |
| kind: 'opened'; | |
| } | |
| | { | |
| messageId: string; | |
| kind: 'executor_started'; | |
| } | |
| | { | |
| kind: 'transcript_changed'; | |
| } | |
| | { | |
| stepId: string; | |
| /** | |
| * The model/executor completed; this says nothing about tool business success. | |
| */ | |
| completed: boolean; | |
| kind: 'step_ended'; | |
| } | |
| | { | |
| messageId: string; | |
| stepId: string; | |
| partId: string; | |
| textKind: AgentContentKind; | |
| kind: 'part_started'; | |
| } | |
| | { | |
| stepId: string; | |
| partId: string; | |
| text: string; | |
| kind: 'delta'; | |
| } | |
| | { | |
| stepId: string; | |
| partId: string; | |
| kind: 'part_finished'; | |
| } | |
| | { | |
| toolUseId: string; | |
| stepId: string; | |
| name: string; | |
| providerExecuted: boolean; | |
| kind: 'tool_input_started'; | |
| } | |
| | { | |
| toolUseId: string; | |
| text: string; | |
| kind: 'tool_input_delta'; | |
| } | |
| | { | |
| toolUseId: string; | |
| stepId: string; | |
| name: string; | |
| providerExecuted: boolean; | |
| kind: 'tool_input_ready'; | |
| } | |
| | { | |
| toolUseId: string; | |
| name: string; | |
| title?: DisplayText | null; | |
| kind: 'tool_dispatched'; | |
| } | |
| | { | |
| toolUseId: string; | |
| kind: 'tool_rejected'; | |
| } | |
| | { | |
| toolUseId: string; | |
| settlement: ToolSettlement; | |
| kind: 'tool_settled'; | |
| } | |
| | { | |
| toolUseId: string; | |
| isError: boolean; | |
| kind: 'provider_tool_result'; | |
| } | |
| | { | |
| toolUseId: string; | |
| name: string; | |
| kind: 'executor_tool_start'; | |
| } | |
| | { | |
| toolUseId: string; | |
| /** | |
| * The most recent at most 2048 codepoints of reported progress, not the complete result. | |
| */ | |
| text: string; | |
| kind: 'executor_tool_progress'; | |
| } | |
| | { | |
| toolUseId: string; | |
| isError: boolean; | |
| kind: 'executor_tool_result'; | |
| } | |
| | { | |
| failed: boolean; | |
| kind: 'ended'; | |
| }; | |
| export type AgentContentKind = 'text' | 'thinking'; | |
| /** | |
| * Recorded Host settlement for presentation; returned is not business success. | |
| * Foreign/provider results do not establish this Host evidence. | |
| */ | |
| export type ToolSettlement = 'returned' | 'failed' | 'unknown' | 'rejected'; | |
| export type AgentRunState = 'admitted' | 'running' | 'waiting_for_user'; | |
| export type AgentDiagnosticPosition = | |
| | { | |
| kind: 'latest'; | |
| } | |
| | { | |
| through: number; | |
| sequence: number; | |
| kind: 'before'; | |
| }; | |
| export type DiagnosticDetail = | |
| | { | |
| invocation: Invocation; | |
| reason: ExecutionFailureReason; | |
| modelFailure?: ModelFailureCause | null; | |
| kind: 'execution'; | |
| } | |
| | { | |
| invocation: Invocation; | |
| stepId: string; | |
| status: ModelInterruption; | |
| modelFailure?: ModelFailureCause | null; | |
| kind: 'model_step'; | |
| } | |
| | { | |
| invocation: Invocation; | |
| cause: TitleFailureCause; | |
| kind: 'session_title'; | |
| }; | |
| export type ExecutionFailureReason = | |
| | 'session_busy' | |
| | 'continuation_changed' | |
| | 'reconciliation_required' | |
| | 'invalid_input' | |
| | 'cancelled' | |
| | 'model_incomplete' | |
| | 'event_commit' | |
| | 'event_store' | |
| | 'model_timeout' | |
| | 'model_http' | |
| | 'model_adapter' | |
| | 'model_provider' | |
| | 'context_overflow' | |
| | 'tool_execution' | |
| | 'runtime_internal' | |
| | 'cleanup_unconfirmed' | |
| | 'executor' | |
| | 'message_preparation_failed' | |
| | 'host_interrupted' | |
| | 'outcome_unknown' | |
| | 'execution_failed'; | |
| /** | |
| * Safe failure evidence, separate from provider-owned diagnostic text. | |
| */ | |
| export type ModelFailureCause = | |
| | { | |
| status: number; | |
| kind: 'http'; | |
| } | |
| | { | |
| kind: 'timed_out'; | |
| } | |
| | { | |
| kind: 'context_overflow'; | |
| } | |
| | { | |
| reason: ProviderFailureReason; | |
| kind: 'provider'; | |
| } | |
| | { | |
| kind: 'adapter'; | |
| }; | |
| export type ProviderFailureReason = | |
| | 'network' | |
| | 'timed_out' | |
| | 'rate_limit' | |
| | 'provider_unavailable' | |
| | 'stream_truncated'; | |
| export type ModelInterruption = ('cancelled' | 'timed_out' | 'failed') | 'retryable_failure'; | |
| export type TitleFailureCause = | |
| | { | |
| kind: 'preparation'; | |
| } | |
| | { | |
| cause: ModelFailureCause; | |
| kind: 'model'; | |
| } | |
| | { | |
| kind: 'invalid_output'; | |
| } | |
| | { | |
| kind: 'output_limit'; | |
| } | |
| | { | |
| kind: 'empty_output'; | |
| }; | |
| /** | |
| * Row reveals an exact field; Before/After continue at byte boundaries and | |
| * Event addresses the raw event log. Returned chunks retain ascending source | |
| * order, including a reverse window. | |
| */ | |
| export type HistoryPosition = | |
| | { | |
| kind: 'start'; | |
| } | |
| | { | |
| kind: 'tail'; | |
| } | |
| | { | |
| position: HistoryRowPosition; | |
| field: HistoryField; | |
| kind: 'row'; | |
| } | |
| | { | |
| cursor: Cursor; | |
| kind: 'before'; | |
| } | |
| | { | |
| cursor: Cursor; | |
| kind: 'after'; | |
| } | |
| | { | |
| sequence: number; | |
| kind: 'event'; | |
| }; | |
| /** | |
| * A readable field in a conversation window, in presentation order. | |
| */ | |
| export type HistoryField = 'thinking' | 'body'; | |
| /** | |
| * Tool output is available through source reads in both views. Conversation | |
| * windows carry tool metadata only, keeping large results out of chat paging. | |
| */ | |
| export type HistoryView = 'text' | 'conversation'; | |
| export type AgentDeliveryPage = | |
| | { | |
| through: number; | |
| nextAfter: number; | |
| events: AgentDelivery[]; | |
| kind: 'events'; | |
| } | |
| | { | |
| queue: AgentQueue; | |
| kind: 'queue'; | |
| } | |
| | { | |
| pending: AgentPendingInteractions; | |
| kind: 'interactions'; | |
| }; | |
| /** | |
| * Trusted producer attribution, preserved independently of editable content. | |
| */ | |
| export type MessageOrigin = | |
| | { | |
| taskId: string; | |
| kind: 'workhub_task'; | |
| } | |
| | { | |
| graphId: string; | |
| kind: 'workhub_graph'; | |
| }; | |
| export type AgentQueueKind = 'in_flight' | 'steering' | 'followup'; | |
| export type AgentQueueMessageResult = | |
| | { | |
| revision: number; | |
| hasAttachments: boolean; | |
| message: string; | |
| kind: 'ready'; | |
| } | |
| | { | |
| expected: number; | |
| actual: number; | |
| kind: 'revision_conflict'; | |
| } | |
| | { | |
| kind: 'missing'; | |
| }; | |
| export type AgentQueueAction = | |
| | { | |
| messageId: string; | |
| kind: 'retract'; | |
| } | |
| | { | |
| messageId: string; | |
| kind: 'promote'; | |
| } | |
| | { | |
| messageId: string; | |
| message: string; | |
| kind: 'update'; | |
| } | |
| | { | |
| /** | |
| * @minItems 1 | |
| */ | |
| messageIds: [string, ...string[]]; | |
| kind: 'reorder'; | |
| }; | |
| /** | |
| * Model identity recorded for the exact historical assistant step. | |
| */ | |
| export type HistoryModel = | |
| | { | |
| requestedModelId: string; | |
| reportedModelId: string | null; | |
| kind: 'native'; | |
| } | |
| | { | |
| modelId: string; | |
| kind: 'imported'; | |
| }; | |
| export type AttachmentKind = 'image' | 'pdf' | 'doc' | 'code' | 'other'; | |
| export type HistoryTurnOutcome = 'completed' | 'failed' | 'aborted'; | |
| /** | |
| * Canonical message author/kind; the field identifies body versus thinking. | |
| * Tool body JSON contributes string values, never its keys. | |
| */ | |
| export type Role = 'compaction' | 'failure' | 'user' | 'assistant' | 'tool_call' | 'tool_result'; | |
| export type AgentHistoryPage = { | |
| through: number; | |
| chunks: AgentHistoryChunk[]; | |
| before: Cursor | null; | |
| after: Cursor | null; | |
| kind: 'ready'; | |
| }; | |
| export type AgentHistorySearchPage = { | |
| through: number; | |
| /** | |
| * @maxItems 16 | |
| */ | |
| matches: | |
| | [] | |
| | [AgentHistoryMatch] | |
| | [AgentHistoryMatch, AgentHistoryMatch] | |
| | [AgentHistoryMatch, AgentHistoryMatch, AgentHistoryMatch] | |
| | [AgentHistoryMatch, AgentHistoryMatch, AgentHistoryMatch, AgentHistoryMatch] | |
| | [ | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| ] | |
| | [ | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| ] | |
| | [ | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| ] | |
| | [ | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| ] | |
| | [ | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| ] | |
| | [ | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| ] | |
| | [ | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| ] | |
| | [ | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| ] | |
| | [ | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| ] | |
| | [ | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| ] | |
| | [ | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| ] | |
| | [ | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| AgentHistoryMatch, | |
| ]; | |
| /** | |
| * Continue even when this batch has no matches. Null is the end of the scan. | |
| */ | |
| nextAfter: HistoryRowPosition | null; | |
| kind: 'ready'; | |
| }; | |
| /** | |
| * An explicitly selected canonical transcript field, never an execution grant. | |
| */ | |
| export type SourceField = | |
| | ('body' | 'thinking' | 'tool_name' | 'failure_message' | 'error_class' | 'arguments' | 'result') | |
| | 'receipt'; | |
| export type AgentHistorySourceReference = | |
| | { | |
| position: HistoryRowPosition; | |
| kind: 'row'; | |
| } | |
| | { | |
| toolUseId: string; | |
| kind: 'tool_use'; | |
| }; | |
| /** | |
| * A structural selector into an original JSON field. Keys and array indices | |
| * remain distinct; neither locates a filesystem resource nor grants access. | |
| */ | |
| export type HistorySourceSegment = string | number; | |
| export type SourcePosition = | |
| | { | |
| kind: 'start'; | |
| } | |
| | { | |
| kind: 'tail'; | |
| } | |
| | { | |
| offset: number; | |
| kind: 'before'; | |
| } | |
| | { | |
| offset: number; | |
| kind: 'after'; | |
| }; | |
| export type AgentHistorySourcePage = { | |
| through: number; | |
| source: HistorySource; | |
| /** | |
| * Complete file-path evidence resolved on the Host for copying only. | |
| * This is display text, never a filesystem capability or open command. | |
| */ | |
| filePath?: string | null; | |
| kind: 'ready'; | |
| }; | |
| /** | |
| * Presentation role of the exact row. This carries no execution authority. | |
| */ | |
| export type HistorySourceRole = 'user' | 'assistant' | 'tool_call' | 'tool_result' | 'failure'; | |
| export type SourceFormat = 'text' | 'json' | 'image_descriptor'; | |
| /** | |
| * Bounded image bytes from a selected subscription. Complete is a producer | |
| * return value, never an emitted item or an executor-cleanup acknowledgement. | |
| */ | |
| export type AgentToolImageFrame = | |
| | { | |
| mimeType: string; | |
| totalBytes: number; | |
| offset: number; | |
| data: string; | |
| kind: 'chunk'; | |
| } | |
| | { | |
| kind: 'complete'; | |
| }; | |
| export type AgentToolImagePage = { | |
| through: number; | |
| position: HistoryRowPosition; | |
| offset: number; | |
| totalBytes: number; | |
| mimeType: string; | |
| digest: string; | |
| /** | |
| * Standard padded Base64 of at most 32KiB of encoded image bytes. | |
| */ | |
| data: string; | |
| kind: 'ready'; | |
| }; | |
| export type AgentAttachmentImageSource = | |
| | { | |
| id: string; | |
| kind: 'uploaded'; | |
| } | |
| | { | |
| through: number; | |
| position: HistoryRowPosition; | |
| attachmentIndex: number; | |
| kind: 'history'; | |
| }; | |
| export type AgentAttachmentImagePage = { | |
| source: AgentAttachmentImageSource; | |
| offset: number; | |
| totalBytes: number; | |
| mimeType: string; | |
| digest: string; | |
| /** | |
| * Standard padded Base64 of at most 32KiB of encoded image bytes. | |
| */ | |
| data: string; | |
| kind: 'ready'; | |
| }; | |
| /** | |
| * Resource names select slots in the current request, not durable grants. | |
| */ | |
| export type HostRequest = | |
| | { | |
| value: unknown; | |
| operation: 'emit'; | |
| } | |
| | { | |
| import: string; | |
| provider: number; | |
| method: string; | |
| input: unknown; | |
| attachments: { | |
| [k: string]: string | undefined; | |
| }; | |
| operation: 'call'; | |
| } | |
| | { | |
| import: string; | |
| provider: number; | |
| method: string; | |
| input: unknown; | |
| operationId: string; | |
| attachments: { | |
| [k: string]: string | undefined; | |
| }; | |
| operation: 'mutate'; | |
| } | |
| | { | |
| reference: RecoveryRef; | |
| operation: 'recover'; | |
| } | |
| | { | |
| slot: string; | |
| operation: 'metadata'; | |
| } | |
| | { | |
| slot: string; | |
| start: number; | |
| end: number; | |
| operation: 'read'; | |
| }; | |
| export type Identity2 = | |
| | { | |
| invocation: Invocation; | |
| operationId?: string | null; | |
| kind: 'agent'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| requestId: string; | |
| kind: 'remote'; | |
| [k: string]: unknown | undefined; | |
| } | |
| | { | |
| grant: Id; | |
| kind: 'background'; | |
| [k: string]: unknown | undefined; | |
| }; | |
| /** | |
| * Resolving a reference requires the original package/scope, a live activation, | |
| * an unrevoked Host record and the issuing principal's current authorization. | |
| */ | |
| export type Id = string; | |
| export type MarkdownTextResult = { | |
| text: string; | |
| kind: 'ready'; | |
| }; | |
| export interface ClientDraft { | |
| revision: number; | |
| text: string; | |
| attachments?: ClientDraftAttachment[]; | |
| } | |
| /** | |
| * Display metadata for an immutable Host upload in this exact draft owner. | |
| */ | |
| export interface ClientDraftAttachment { | |
| id: string; | |
| name: string; | |
| mimeType: string; | |
| bytes: number; | |
| } | |
| /** | |
| * One complete editor revision, including the upload receipts it has handled. | |
| */ | |
| export interface ClientDraftEdit { | |
| text: string; | |
| attachments?: ClientDraftAttachment[]; | |
| settledUploads?: string[]; | |
| } | |
| /** | |
| * Stable product owner, independent of endpoint aliases, VM instances and UI nodes. | |
| */ | |
| export interface ClientDraftKey { | |
| stateDomain: string; | |
| deployment: string; | |
| namespace: InstanceId; | |
| export: string; | |
| sessionId: string; | |
| editorId: string; | |
| } | |
| export interface ClientDraftReference { | |
| key: ClientDraftKey; | |
| revision: number; | |
| } | |
| export interface ClientUploadReference { | |
| key: ClientDraftKey; | |
| name: string; | |
| bytes: number; | |
| digest: string; | |
| } | |
| /** | |
| * One user attempt. Neither this observation nor its original reference grants access. | |
| */ | |
| export interface ClientOperation { | |
| id: string; | |
| host: DeploymentRef; | |
| endpoint: string; | |
| method: string; | |
| sessionId?: string | null; | |
| correlation: unknown; | |
| draft?: ClientDraftReference | null; | |
| upload?: ClientUploadReference | null; | |
| /** | |
| * Durable fence proving that this attempt did not dispatch. | |
| */ | |
| abandoned?: boolean; | |
| /** | |
| * Present only after original preparation has been durably recorded. | |
| */ | |
| reference?: RecoveryRef | null; | |
| /** | |
| * A known returned business outcome; absent is never proof that it did not run. | |
| */ | |
| receipt?: Receipt | null; | |
| } | |
| export interface DeploymentRef { | |
| stateDomain: string; | |
| deployment: string; | |
| revision: number; | |
| } | |
| export interface RecoveryRef { | |
| source: DeploymentRef; | |
| namespace: InstanceId; | |
| export: string; | |
| method: string; | |
| operation: string; | |
| fingerprint: string; | |
| contract: RecoveryContract; | |
| recovery: RecoveryProtocol; | |
| } | |
| /** | |
| * Contract identity for a journal lookup. The original request retains the | |
| * complete contract; a receipt carries only its digest. | |
| */ | |
| export interface RecoveryContract { | |
| name: string; | |
| version: number; | |
| transport: Transport; | |
| digest: string; | |
| } | |
| export interface HostLogRequest { | |
| position: HostLogPosition; | |
| } | |
| export interface DeploymentDocumentRead { | |
| source: DeploymentRef; | |
| offset: number; | |
| } | |
| export interface PackageSourceRead { | |
| source: DeploymentRef; | |
| package: PackageRef; | |
| path?: string | null; | |
| offset: number; | |
| } | |
| export interface PackageRef { | |
| id: string; | |
| revision: string; | |
| } | |
| export interface PackageSourceInstall { | |
| expectedRevision: number; | |
| /** | |
| * UTF-8 package files, including maka.extension.json. Bytes determine identity. | |
| */ | |
| files: { | |
| [k: string]: string | undefined; | |
| }; | |
| } | |
| export interface PackageUrlInstall { | |
| expectedRevision: number; | |
| url: string; | |
| /** | |
| * Optional SHA-256 of the downloaded bundle bytes, from a trusted publisher. | |
| */ | |
| sha256?: string | null; | |
| } | |
| export interface DeploymentSourceReplace { | |
| expectedRevision: number; | |
| document: DeploymentDocument; | |
| } | |
| /** | |
| * Source document edited by one native buffer, never a second desired plan. | |
| */ | |
| export interface DeploymentDocument { | |
| input: CompositionInput; | |
| remoteExports: RemoteObservation[]; | |
| packages: PackageRef[]; | |
| } | |
| /** | |
| * Durable deployment input. Plans are derived and never persisted as overrides. | |
| */ | |
| export interface CompositionInput { | |
| environment: Environment; | |
| instances: { | |
| [k: string]: CompositionNode | undefined; | |
| }; | |
| launch?: Target | null; | |
| /** | |
| * Explicit ordinary fallback. Selection grants no extra capabilities. | |
| */ | |
| recovery?: Target | null; | |
| } | |
| export interface Environment { | |
| location: ExecutionLocation; | |
| presentation?: PresentationTarget | null; | |
| } | |
| export interface CompositionNode { | |
| key: string; | |
| package: PackageSelection; | |
| usePackage: PackageUse; | |
| configuration?: Configuration; | |
| parameters?: Configuration; | |
| bindings?: { | |
| [k: string]: Target[] | undefined; | |
| }; | |
| disabled?: boolean; | |
| overrides?: Override[]; | |
| } | |
| export interface Configuration { | |
| values?: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| /** | |
| * Configuration field -> parameter name of the containing template. | |
| */ | |
| parameters?: { | |
| [k: string]: string | undefined; | |
| }; | |
| } | |
| /** | |
| * An override belongs to its containing structural instance. Missing paths fail; | |
| * removal/upgrade never guesses how to discard independent user intent. | |
| */ | |
| export interface Override { | |
| path: string[]; | |
| package?: PackageRef | null; | |
| usePackage?: PackageUse | null; | |
| parameters?: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| configuration?: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| bindings?: { | |
| [k: string]: Target[] | undefined; | |
| }; | |
| disabled?: boolean | null; | |
| } | |
| /** | |
| * A static compatibility observation, never a remote registration or grant. | |
| */ | |
| export interface RemoteObservation { | |
| capability: RemoteCapability; | |
| declaration: Export; | |
| } | |
| export interface RemoteCapability { | |
| deployment: string; | |
| instance: InstanceId; | |
| export: string; | |
| } | |
| export interface Export { | |
| contract: Contract; | |
| availability: Availability; | |
| } | |
| /** | |
| * Public contract definitions are package data, not live registration records. | |
| */ | |
| export interface Contract { | |
| name: string; | |
| version: number; | |
| transport: Transport; | |
| interface: Interface; | |
| } | |
| export interface Method { | |
| mode: MethodMode; | |
| input: unknown; | |
| output: unknown; | |
| /** | |
| * Bounded transient observations from this mutation, separate from its | |
| * original final receipt. Only mutation methods may declare progress. | |
| */ | |
| progress?: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| resources: { | |
| [k: string]: ResourceSlot | undefined; | |
| }; | |
| } | |
| /** | |
| * One declared input slot: its nominal type and whether the caller may omit it. | |
| */ | |
| export interface ResourceSlot { | |
| type: ResourceType; | |
| optional: boolean; | |
| } | |
| /** | |
| * Nominal read-only resource shape, not a resource id or authorization token. | |
| */ | |
| export interface ResourceType { | |
| name: string; | |
| version: number; | |
| } | |
| export interface Capture { | |
| input: unknown; | |
| output: CaptureOutput; | |
| } | |
| export interface CompositionEdit { | |
| expectedRevision: number; | |
| edits: CompositionChange[]; | |
| } | |
| export interface SettingChange { | |
| /** | |
| * @minItems 1 | |
| */ | |
| path: [string, ...string[]]; | |
| /** | |
| * None removes the field; all other fields retain their original source. | |
| */ | |
| value?: SettingValue | null; | |
| } | |
| export interface InstanceConfigure { | |
| expectedRevision: number; | |
| instance: InstanceId; | |
| /** | |
| * @minItems 1 | |
| */ | |
| changes: [SettingChange, ...SettingChange[]]; | |
| } | |
| export interface BindingCandidatesRead { | |
| source?: DeploymentRef | null; | |
| consumer: BindingConsumer; | |
| import: string; | |
| includePackages: boolean; | |
| after?: string | null; | |
| } | |
| export interface PackageSettingsRead { | |
| source: DeploymentRef; | |
| package: PackageRef; | |
| path: string[]; | |
| after?: string | null; | |
| changes: SettingChange[]; | |
| } | |
| export interface UiAuthoringClaim { | |
| request?: UiAuthoringRequest | null; | |
| } | |
| export interface UiAuthoringRequest { | |
| id: string; | |
| command: UiAuthoringCommand; | |
| } | |
| export interface Deployment { | |
| reference: DeploymentRef; | |
| input: CompositionInput; | |
| remoteExports: RemoteObservation[]; | |
| } | |
| export interface DeploymentRead {} | |
| export interface PackageInstall { | |
| expectedRevision: number; | |
| } | |
| export interface PackageInstalled { | |
| source: DeploymentRef; | |
| package: PackageRef; | |
| } | |
| export interface DeploymentReplace { | |
| expectedRevision: number; | |
| } | |
| /** | |
| * Committed desired source and available immutable packages, not runtime readiness. | |
| */ | |
| export interface ManagedDeployment { | |
| source: Deployment; | |
| packages: PackageRef[]; | |
| } | |
| export interface ManagedInstancesPage { | |
| source: DeploymentRef; | |
| /** | |
| * @maxItems 8 | |
| */ | |
| instances: | |
| | [] | |
| | [ManagedInstance] | |
| | [ManagedInstance, ManagedInstance] | |
| | [ManagedInstance, ManagedInstance, ManagedInstance] | |
| | [ManagedInstance, ManagedInstance, ManagedInstance, ManagedInstance] | |
| | [ManagedInstance, ManagedInstance, ManagedInstance, ManagedInstance, ManagedInstance] | |
| | [ | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ] | |
| | [ | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ] | |
| | [ | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ManagedInstance, | |
| ]; | |
| next?: InstanceId | null; | |
| } | |
| export interface ManagedInstance { | |
| instance: InstanceId; | |
| path: string[]; | |
| package: PackageRef; | |
| presentation?: PackagePresentation; | |
| structural: boolean; | |
| disabled: boolean; | |
| parentDisabled: boolean; | |
| } | |
| export interface PackagePresentation { | |
| displayName: string; | |
| description: string; | |
| localizations?: { | |
| [k: string]: PackageDescription | undefined; | |
| }; | |
| } | |
| /** | |
| * Author-provided copy for plugin discovery; never an authority declaration. | |
| */ | |
| export interface PackageDescription { | |
| displayName: string; | |
| description: string; | |
| } | |
| export interface InstanceSetEnabled { | |
| expectedRevision: number; | |
| instance: InstanceId; | |
| enabled: boolean; | |
| } | |
| export interface InstanceSettingsRead { | |
| source: DeploymentRef; | |
| instance: InstanceId; | |
| path: string[]; | |
| after?: string | null; | |
| } | |
| export interface InstanceSettingsPage { | |
| source: DeploymentRef; | |
| instance: InstanceId; | |
| path: string[]; | |
| /** | |
| * @maxItems 8 | |
| */ | |
| fields: | |
| | [] | |
| | [SettingField] | |
| | [SettingField, SettingField] | |
| | [SettingField, SettingField, SettingField] | |
| | [SettingField, SettingField, SettingField, SettingField] | |
| | [SettingField, SettingField, SettingField, SettingField, SettingField] | |
| | [SettingField, SettingField, SettingField, SettingField, SettingField, SettingField] | |
| | [ | |
| SettingField, | |
| SettingField, | |
| SettingField, | |
| SettingField, | |
| SettingField, | |
| SettingField, | |
| SettingField, | |
| ] | |
| | [ | |
| SettingField, | |
| SettingField, | |
| SettingField, | |
| SettingField, | |
| SettingField, | |
| SettingField, | |
| SettingField, | |
| SettingField, | |
| ]; | |
| next?: string | null; | |
| } | |
| export interface SettingField { | |
| key: string; | |
| label: string; | |
| description: string; | |
| kind: SettingKind; | |
| present: boolean; | |
| required: boolean; | |
| nullable: boolean; | |
| editable: boolean; | |
| value?: SettingValue | null; | |
| options: SettingValue[]; | |
| } | |
| export interface BindingCandidatesPage { | |
| source: DeploymentRef; | |
| configuration: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| current: Target[]; | |
| candidates: BindingCandidate[]; | |
| next?: string | null; | |
| } | |
| export interface PackageSettingsPage { | |
| source: DeploymentRef; | |
| package: PackageRef; | |
| path: string[]; | |
| fields: SettingField[]; | |
| next?: string | null; | |
| imports: ManagedImport[]; | |
| } | |
| export interface ManagedImport { | |
| name: string; | |
| contract: string; | |
| cardinality: Cardinality; | |
| } | |
| export interface DeploymentDocumentChunk { | |
| source: DeploymentRef; | |
| offset: number; | |
| totalBytes: number; | |
| text: string; | |
| next?: number | null; | |
| } | |
| export interface PackageDeclaration { | |
| entries?: { | |
| host?: EntryDeclaration; | |
| tui?: EntryDeclaration; | |
| }; | |
| composition?: Template | null; | |
| } | |
| export interface EntryDeclaration { | |
| implementation: Implementation; | |
| /** | |
| * Nominal ABI of this JavaScript entry's component scenes. Native recipes | |
| * are checked through their compiled implementation availability instead. | |
| */ | |
| scene?: SceneLanguage | null; | |
| configuration: unknown; | |
| imports?: { | |
| [k: string]: Import | undefined; | |
| }; | |
| exports?: { | |
| [k: string]: Export | undefined; | |
| }; | |
| } | |
| /** | |
| * Presenter-owned language identity. The kernel does not interpret its syntax. | |
| */ | |
| export interface SceneLanguage { | |
| name: string; | |
| version: number; | |
| } | |
| export interface Import { | |
| contract: Contract; | |
| cardinality: Cardinality; | |
| } | |
| export interface Template { | |
| parameters?: { | |
| [k: string]: Parameter | undefined; | |
| }; | |
| imports?: { | |
| [k: string]: Import | undefined; | |
| }; | |
| exports?: { | |
| [k: string]: Target | undefined; | |
| }; | |
| children: { | |
| [k: string]: CompositionNode | undefined; | |
| }; | |
| } | |
| export interface Parameter { | |
| schema: unknown; | |
| default?: unknown; | |
| } | |
| /** | |
| * Read-only data copied from this activation's captured value imports. | |
| * The keys and member order come from its checked plan, never guest routing. | |
| */ | |
| export interface ValueBindings { | |
| [k: string]: unknown[] | undefined; | |
| } | |
| /** | |
| * One callback's result. Events are finite transaction intents, never retained | |
| * in a committed Frame or replayed during rendering. | |
| */ | |
| export interface ComponentOutput { | |
| frame: Frame; | |
| events: Emission[]; | |
| actions: Action[]; | |
| /** | |
| * Request cancellation of this component's original mutation keys. | |
| * This does not acknowledge business completion or physical cleanup. | |
| */ | |
| cancel?: string[]; | |
| /** | |
| * Complete current subscription demand. Empty removes previous demand. | |
| */ | |
| subscriptions?: Action[]; | |
| } | |
| export interface Frame { | |
| revision: number; | |
| state: unknown; | |
| surface?: Surface | null; | |
| view: unknown; | |
| } | |
| export interface Emission { | |
| name: string; | |
| value: unknown; | |
| } | |
| /** | |
| * An inert intent. Resource slots name capture requests, never bearer handles. | |
| */ | |
| export interface Action { | |
| key: string; | |
| binding: string; | |
| member: number; | |
| method: string; | |
| input: unknown; | |
| resources: { | |
| [k: string]: CaptureSource | undefined; | |
| }; | |
| recovery?: unknown; | |
| continuations?: CaptureSource[]; | |
| } | |
| export interface CaptureSource { | |
| child: string; | |
| method: string; | |
| input: unknown; | |
| } | |
| /** | |
| * One child of a committed component, owned by a committed native presentation. | |
| * Binding resolution belongs to the parent activation and the common mount kernel. | |
| */ | |
| export interface ComponentSlot { | |
| key: string; | |
| binding: string; | |
| member: number; | |
| props: unknown; | |
| on: { | |
| [k: string]: string | undefined; | |
| }; | |
| } | |
| export interface TerminalChoiceOption { | |
| key: string; | |
| label: string; | |
| } | |
| /** | |
| * Appearance shared by controlled dialogs and transient adaptive panes. | |
| */ | |
| export interface TerminalDialogAppearance { | |
| /** | |
| * Place a controlled dialog next to its background, preferring above it. | |
| * The viewport bounds remain authoritative on small terminals. | |
| */ | |
| anchor_to_background?: boolean; | |
| ascii?: boolean; | |
| label: string; | |
| /** | |
| * Maximum foreground body dimensions, in terminal cells. | |
| */ | |
| width: number; | |
| height: number; | |
| background_color: TerminalColor; | |
| border_color: TerminalColor; | |
| title_color?: TerminalColor | null; | |
| padding?: number; | |
| } | |
| /** | |
| * A one-shot mechanical command. Repeated or older sequences are ignored. | |
| * Toggle uses the last successfully placed viewport; before first placement it | |
| * is consumed without changing state. Dismiss never changes inline preference. | |
| */ | |
| export interface TerminalPaneCommand { | |
| sequence: number; | |
| op: TerminalPaneOperation; | |
| } | |
| /** | |
| * Rearrange the same direct children at an allocated inner-width breakpoint. | |
| * Child overrides affect allocation in this stack, not a child's own wrapping. | |
| */ | |
| export interface TerminalResponsiveStack { | |
| min_width: number; | |
| direction: TerminalDirection; | |
| /** | |
| * Scrolling can follow the same allocated-width breakpoint as the layout. | |
| */ | |
| scroll?: TerminalScrollPolicy | null; | |
| children?: { | |
| [k: string]: TerminalLayout | undefined; | |
| }; | |
| } | |
| /** | |
| * Native terminal cell constraints on a child in its parent's main axis. | |
| * `grow` distributes remaining cells after fixed/intrinsic siblings; `basis` | |
| * supplies an explicit base instead of intrinsic length. `shrink` allows that | |
| * base to shrink proportionally when siblings exceed the available cells. | |
| * Row wrap preserves | |
| * source order and measures its rows before allocating the parent viewport. | |
| */ | |
| export interface TerminalLayout { | |
| grow?: number; | |
| basis?: number | null; | |
| basis_fraction?: TerminalFractionalBasis | null; | |
| shrink?: boolean; | |
| wrap?: boolean; | |
| } | |
| /** | |
| * Fraction of the allocated main axis, rounded down and clamped before growth | |
| * or shrinking. An unbounded axis uses the intrinsic length with the same bounds. | |
| */ | |
| export interface TerminalFractionalBasis { | |
| numerator: number; | |
| denominator: number; | |
| min?: number; | |
| max?: number | null; | |
| } | |
| /** | |
| * A one-cell frame. Colors follow the same RGB convention as terminal text. | |
| * Focus color follows any focused native target inside this stack. | |
| */ | |
| export interface TerminalBorder { | |
| breathing?: boolean; | |
| color: TerminalColor; | |
| focused_color: TerminalColor; | |
| style: TerminalBorderStyle; | |
| } | |
| /** | |
| * Explicit wheel actions in an original scrolling viewport. Offsets remain native. | |
| */ | |
| export interface TerminalWheelCommands { | |
| up: string; | |
| down: string; | |
| } | |
| export interface Shortcut { | |
| key: string; | |
| /** | |
| * @maxItems 4 | |
| */ | |
| modifiers: | |
| | [] | |
| | [Modifier] | |
| | [Modifier, Modifier] | |
| | [Modifier, Modifier, Modifier] | |
| | [Modifier, Modifier, Modifier, Modifier]; | |
| input: string; | |
| enabled: boolean; | |
| } | |
| /** | |
| * Route navigation yielded by a native editor to a declared child component. | |
| * Ordinary unhandled button keys do not activate this binding. | |
| */ | |
| export interface FocusShortcut { | |
| key: string; | |
| modifiers: Modifier[]; | |
| child: string; | |
| enabled: boolean; | |
| } | |
| export interface TerminalAnimationFrame { | |
| text: string; | |
| millis: number; | |
| } | |
| export interface OperationReply { | |
| reference: RecoveryRef; | |
| receipt: Receipt; | |
| } | |
| /** | |
| * Peer attestation excludes caller-local recovery data. The receiving Host | |
| * still requires its private admission evidence; this is not a commit token. | |
| */ | |
| export interface CallerConfirmation { | |
| cursor: number; | |
| caller: DeploymentRef; | |
| consumer: InstanceId; | |
| reference: RecoveryRef; | |
| } | |
| export interface CallerHistoryPage { | |
| after: number; | |
| limit: number; | |
| } | |
| export interface CallerIntent { | |
| cursor: number; | |
| caller: DeploymentRef; | |
| consumer: InstanceId; | |
| reference: RecoveryRef; | |
| recovery?: unknown; | |
| } | |
| export interface LabelProps { | |
| text: string; | |
| appearance: TextAppearance; | |
| terminalForeground?: TerminalColor | null; | |
| elapsed?: Elapsed | null; | |
| } | |
| export interface TextAppearance { | |
| font: FontAppearance; | |
| foreground: Color; | |
| } | |
| export interface FontAppearance { | |
| family: FontFamily; | |
| fallbacks: FontFamily[]; | |
| size: number; | |
| /** | |
| * Line height relative to this font size. | |
| */ | |
| lineHeight: number; | |
| weight: number; | |
| } | |
| export interface Elapsed { | |
| from: number; | |
| to: number | null; | |
| } | |
| export interface TextareaProps { | |
| appearance: TextareaAppearance; | |
| /** | |
| * Exact whitespace-delimited literals rendered and edited as atomic inline tokens. | |
| */ | |
| inlineTokens?: string[]; | |
| menu?: TextareaMenu | null; | |
| accessibilityLabel: string; | |
| readOnly: boolean; | |
| disabled: boolean; | |
| softWrap: boolean; | |
| /** | |
| * Preferred terminal text rows, excluding native padding. A constrained | |
| * viewport may shrink further. | |
| */ | |
| terminalRows?: TerminalTextareaRows; | |
| /** | |
| * None preserves native multiline editing without a submit shortcut. | |
| */ | |
| submit?: SubmitKey | null; | |
| /** | |
| * Yield suggestion navigation only for the original observed editor state. | |
| */ | |
| navigation?: EditorNavigation | null; | |
| tabIndex: number; | |
| /** | |
| * Offer native focus once when this original input becomes visible and | |
| * enabled. Stable updates and viewport scrolling do not repeat the offer. | |
| */ | |
| autoFocus?: boolean; | |
| initialText?: string; | |
| placeholder?: string; | |
| /** | |
| * None issues no new command; an accepted command remains pending until | |
| * its matching receipt commits. Clearing props is not cancellation. | |
| */ | |
| command?: EditorCommand | null; | |
| /** | |
| * Opt-in local file-path paste. The context is returned unchanged; it is | |
| * correlation, never a filesystem path or an authorization grant. | |
| */ | |
| filePaste?: FilePastePolicy | null; | |
| fileCommand?: FilePasteCommand | null; | |
| persistence?: EditorPersistence | null; | |
| } | |
| export interface TextareaAppearance { | |
| ascii?: boolean; | |
| terminal?: TerminalPalette | null; | |
| text: TextAppearance; | |
| mutedForeground: Color; | |
| background: Color; | |
| selection: Color; | |
| caret: Color; | |
| border: Color; | |
| focusedBorder: Color; | |
| /** | |
| * In TUI inputs, a positive width draws a one-cell border; zero has no inset. | |
| */ | |
| borderWidth: number; | |
| radius: number; | |
| padding: Insets; | |
| scrollbar: ScrollbarAppearance; | |
| } | |
| /** | |
| * Semantic terminal colors for rich text and editors, supplied by the product. | |
| */ | |
| export interface TerminalPalette { | |
| background: TerminalColor; | |
| foreground: TerminalColor; | |
| surface: TerminalColor; | |
| accent: TerminalColor; | |
| thinking: TerminalColor; | |
| success: TerminalColor; | |
| warning: TerminalColor; | |
| error: TerminalColor; | |
| muted: TerminalColor; | |
| subtle: TerminalColor; | |
| border: TerminalColor; | |
| scrollbar: TerminalColor; | |
| selection: TerminalColor; | |
| selectionText: TerminalColor; | |
| search: TerminalColor; | |
| searchActive: TerminalColor; | |
| searchText: TerminalColor; | |
| /** | |
| * @minItems 7 | |
| * @maxItems 7 | |
| */ | |
| syntax: [ | |
| TerminalColor, | |
| TerminalColor, | |
| TerminalColor, | |
| TerminalColor, | |
| TerminalColor, | |
| TerminalColor, | |
| TerminalColor, | |
| ]; | |
| terminal: boolean; | |
| } | |
| export interface Insets { | |
| top: number; | |
| right: number; | |
| bottom: number; | |
| left: number; | |
| } | |
| export interface ScrollbarAppearance { | |
| mode: ScrollbarMode; | |
| entrance: ScrollbarEntrance; | |
| idleMillis: number; | |
| enterMillis: number; | |
| exitMillis: number; | |
| expandMillis: number; | |
| trackWidth: number; | |
| track: Color; | |
| trackHover: Color; | |
| trackActive: Color; | |
| thumb: ScrollbarThumb; | |
| thumbHover: ScrollbarThumb; | |
| thumbActive: ScrollbarThumb; | |
| } | |
| export interface ScrollbarThumb { | |
| color: Color; | |
| width: number; | |
| inset: number; | |
| radius: number; | |
| minLength: number; | |
| } | |
| /** | |
| * Local presentation for user-initiated native editing actions. This is not | |
| * a command interface: clipboard access still requires native activation. | |
| */ | |
| export interface TextareaMenu { | |
| appearance: MenuAppearance; | |
| labels: TextareaMenuLabels; | |
| } | |
| export interface MenuAppearance { | |
| text: TextAppearance; | |
| background: Color; | |
| border: Color; | |
| activeBackground: Color; | |
| activeForeground: Color; | |
| disabledForeground: Color; | |
| borderWidth: number; | |
| radius: number; | |
| padding: Insets; | |
| rowPadding: Insets; | |
| width: number; | |
| windowMargin: number; | |
| } | |
| export interface TextareaMenuLabels { | |
| title: string; | |
| undo: string; | |
| redo: string; | |
| cut: string; | |
| copy: string; | |
| paste: string; | |
| selectAll: string; | |
| } | |
| export interface TerminalTextareaRows { | |
| min: number; | |
| max: number; | |
| /** | |
| * Allow dragging the lower-right grip to override preferred rows, up to | |
| * the containing viewport height. The minimum still applies. | |
| */ | |
| resizable?: boolean; | |
| /** | |
| * Optional cap relative to the nearest declared layout viewport's height, | |
| * or the surface when none is declared. The minimum still applies. | |
| */ | |
| maxViewportFraction?: number | null; | |
| } | |
| export interface EditorNavigation { | |
| owner: string; | |
| basedOn: number; | |
| } | |
| export interface EditorCommand { | |
| /** | |
| * Correlation with the original native editor, never a resource grant. | |
| */ | |
| owner: string; | |
| sequence: number; | |
| basedOn: number; | |
| edit: EditorEdit; | |
| } | |
| /** | |
| * Ordered UTF-16 code-unit offsets, shared by selections and range edits. | |
| */ | |
| export interface TextRange { | |
| start: number; | |
| end: number; | |
| } | |
| export interface FilePastePolicy { | |
| context: string; | |
| /** | |
| * Clipboard text remains available when file attachments are disabled. | |
| */ | |
| allowFiles: boolean; | |
| } | |
| export interface FilePasteCommand { | |
| selection: FileCapture; | |
| action: FilePasteAction; | |
| } | |
| export interface FileCapture { | |
| owner: string; | |
| revision: number; | |
| } | |
| export interface EditorPersistence { | |
| key: string; | |
| format: string; | |
| dataSource: unknown; | |
| metadata: unknown; | |
| restore?: EditorRestoration | null; | |
| retry?: number; | |
| } | |
| export interface EditorRestoration { | |
| owner: string; | |
| version: number; | |
| clearText: boolean; | |
| } | |
| export interface FilePasteObservation { | |
| context: string; | |
| selection: FileObservation; | |
| /** | |
| * Includes the currently reading, ready or failed item. | |
| */ | |
| remaining: number; | |
| /** | |
| * A failed original path can be reread. Clipboard reads require a new gesture. | |
| */ | |
| retryable: boolean; | |
| } | |
| export interface FileObservation { | |
| owner: string; | |
| revision: number; | |
| phase: FilePhase; | |
| file?: FileDescriptor | null; | |
| error?: FileError | null; | |
| } | |
| export interface FileDescriptor { | |
| name: string; | |
| bytes: number; | |
| digest: string; | |
| } | |
| export interface MarkdownProps { | |
| ascii?: boolean; | |
| animate?: boolean; | |
| source: string; | |
| appearance: MarkdownAppearance; | |
| selectable: boolean; | |
| disabled: boolean; | |
| /** | |
| * Whether pointer selection also moves keyboard focus to this document. | |
| */ | |
| focusOnPointer?: boolean; | |
| /** | |
| * The committed document decides native URL opening before guest work. | |
| */ | |
| openWebLinks?: boolean; | |
| bubbleLinks?: boolean; | |
| } | |
| export interface MarkdownAppearance { | |
| terminal?: TerminalPalette | null; | |
| body: TextAppearance; | |
| code: TextAppearance; | |
| /** | |
| * Typography for heading levels 1 through 6, in source order. | |
| * | |
| * @minItems 6 | |
| * @maxItems 6 | |
| */ | |
| headings: [ | |
| TextAppearance, | |
| TextAppearance, | |
| TextAppearance, | |
| TextAppearance, | |
| TextAppearance, | |
| TextAppearance, | |
| ]; | |
| muted: Color; | |
| link: Color; | |
| selection: Color; | |
| codeBackground: Color; | |
| tableBackground: Color; | |
| border: Color; | |
| dark: boolean; | |
| /** | |
| * Paragraph spacing in logical pixels. | |
| */ | |
| paragraphGap: number; | |
| } | |
| export interface DiffProps { | |
| content: DiffContent; | |
| appearance: DiffAppearance; | |
| ascii: boolean; | |
| disabled: boolean; | |
| focusOnPointer: boolean; | |
| } | |
| export interface DiffRow { | |
| /** | |
| * Half-open UTF-8 byte range in source. Rows are ordered and disjoint. | |
| */ | |
| start: number; | |
| end: number; | |
| kind: DiffKind; | |
| language?: string | null; | |
| } | |
| export interface DiffAppearance { | |
| terminal?: TerminalPalette | null; | |
| text: TextAppearance; | |
| background: Color; | |
| added: Color; | |
| removed: Color; | |
| selection: Color; | |
| dark: boolean; | |
| } | |
| export interface MarkdownLink { | |
| url: string; | |
| } | |
| export interface FilePickerProps { | |
| appearance: InputAppearance; | |
| label: string; | |
| pathLabel: string; | |
| browseLabel: string; | |
| parentLabel: string; | |
| emptyLabel: string; | |
| truncatedLabel: string; | |
| placeholder: string; | |
| disabled: boolean; | |
| tabIndex: number; | |
| } | |
| export interface InputAppearance { | |
| ascii?: boolean; | |
| terminal?: TerminalPalette | null; | |
| text: TextAppearance; | |
| mutedForeground: Color; | |
| background: Color; | |
| selection: Color; | |
| caret: Color; | |
| border: Color; | |
| focusedBorder: Color; | |
| /** | |
| * In TUI inputs, a positive width draws a one-cell border; zero has no inset. | |
| */ | |
| borderWidth: number; | |
| radius: number; | |
| padding: Insets; | |
| } | |
| export interface SourceTextProps { | |
| animate?: boolean; | |
| terminal?: TerminalPalette | null; | |
| source: string; | |
| appearance: TextAppearance; | |
| selection: Color; | |
| disabled: boolean; | |
| /** | |
| * Whether pointer selection also moves keyboard focus to this source. | |
| */ | |
| focusOnPointer?: boolean; | |
| } | |
| export interface TerminalViewProps { | |
| /** | |
| * Changed when the selected canonical resource changes, including read-only views. | |
| */ | |
| source: string; | |
| accessibilityLabel: string; | |
| output?: ShellOutput | null; | |
| controller?: string | null; | |
| acknowledgement?: TerminalInputAcknowledgement | null; | |
| appearance: TextAppearance; | |
| background: Color; | |
| caret: Color; | |
| rows: number; | |
| tabIndex: number; | |
| } | |
| export interface TerminalCursor { | |
| x: number; | |
| y: number; | |
| visible: boolean; | |
| } | |
| export interface TerminalInputAcknowledgement { | |
| owner: string; | |
| controller: string; | |
| sequence: number; | |
| /** | |
| * True only after the exact original mutation has a successful result. | |
| */ | |
| accepted: boolean; | |
| } | |
| export interface TerminalViewObservation { | |
| owner: string; | |
| revision: number; | |
| source: string; | |
| controller?: string | null; | |
| captured: boolean; | |
| batch?: TerminalInputBatch | null; | |
| error?: TerminalViewError | null; | |
| } | |
| export interface TerminalInputBatch { | |
| controller: string; | |
| sequence: number; | |
| /** | |
| * @maxItems 64 | |
| */ | |
| actions: RawAction[]; | |
| size?: TerminalSize | null; | |
| } | |
| /** | |
| * Shared by native PTY allocation, input validation and screen rendering. | |
| */ | |
| export interface TerminalSize { | |
| cols: number; | |
| rows: number; | |
| } | |
| export interface SelectionMenuProps { | |
| appearance: MenuAppearance; | |
| labels: SelectionMenuLabels; | |
| disabled: boolean; | |
| } | |
| export interface SelectionMenuLabels { | |
| title: string; | |
| copy: string; | |
| selectAll: string; | |
| } | |
| export interface ReadingProps { | |
| /** | |
| * The presenter's scene language; each requires a scrolling column Stack. | |
| * Its scroll policy and layout are the only presentation authority. | |
| */ | |
| content: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| /** | |
| * Omission retains an accepted command; numbers increase per original mount. | |
| */ | |
| command?: ReadingCommand | null; | |
| } | |
| export interface ReadingCommand { | |
| sequence: number; | |
| target: ReadingTarget; | |
| } | |
| export interface ReadingObservation { | |
| /** | |
| * Immediate native intent; can be newer than the painted viewport. | |
| */ | |
| readingRevision: number; | |
| viewport?: ReadingViewport | null; | |
| scroll?: ReadingScroll | null; | |
| /** | |
| * Direct content child containing the native selection focus. Renderers | |
| * without this observation return null. This key conveys no read authority. | |
| */ | |
| selectedChildKey?: string | null; | |
| pendingCommand?: number | null; | |
| /** | |
| * Only the most recently settled command is retained, without a ledger. | |
| */ | |
| receipt?: ReadingReceipt | null; | |
| find?: ReadingFind | null; | |
| } | |
| export interface ReadingViewport { | |
| /** | |
| * Explicit reading intent used by the actually painted children. | |
| */ | |
| readingRevision: number; | |
| atStart?: boolean; | |
| atEnd: boolean; | |
| visibleChildKeys: string[]; | |
| } | |
| /** | |
| * Most recent physical scroll. Layout changes and programmatic landings do not | |
| * create a new request, so a product can load adjacent content without loops. | |
| */ | |
| export interface ReadingScroll { | |
| readingRevision: number; | |
| direction: ReadingScrollDirection; | |
| } | |
| export interface ReadingReceipt { | |
| sequence: number; | |
| status: ReadingStatus; | |
| } | |
| export interface ReadingFind { | |
| sequence: number; | |
| count: number; | |
| limited: boolean; | |
| /** | |
| * One-based current match, or null when no match remains. | |
| */ | |
| index?: number | null; | |
| active?: ReadingMatch | null; | |
| } | |
| export interface ReadingMatch { | |
| /** | |
| * @minItems 1 | |
| */ | |
| path: [string, ...string[]]; | |
| offset: number; | |
| } | |
| export interface RowsProps { | |
| terminal?: TerminalPalette | null; | |
| revision: number; | |
| /** | |
| * Select this row on keyboard entry. None retains the current selection, | |
| * or selects the first row when there is no current selection. | |
| */ | |
| entry?: string | null; | |
| rows: Row[]; | |
| shortcuts: Shortcut[]; | |
| maxRows: number; | |
| /** | |
| * Optional smaller row cap below the nearest declared layout viewport's | |
| * height, in cells; defaults to the surface when no viewport is declared. | |
| */ | |
| compactBelow?: CompactRows | null; | |
| tabIndex: number; | |
| foreground: Color; | |
| muted: Color; | |
| selected: Color; | |
| hovered: Color; | |
| scrollbar: RowScrollbar; | |
| } | |
| export interface Row { | |
| key: string; | |
| text: string; | |
| actions: RowAction[]; | |
| } | |
| export interface RowAction { | |
| key: string; | |
| label: string; | |
| enabled: boolean; | |
| } | |
| export interface CompactRows { | |
| height: number; | |
| maxRows: number; | |
| } | |
| export interface RowScrollbar { | |
| thumb: string; | |
| track: string; | |
| thumbColor: Color; | |
| trackColor: Color; | |
| } | |
| export interface ValueCheckpointProps { | |
| key: string; | |
| format: string; | |
| command?: ValueCheckpointCommand | null; | |
| } | |
| export interface TextFileProps { | |
| command?: TextFileCommand | null; | |
| } | |
| export interface TextFileCommand { | |
| owner: string; | |
| sequence: number; | |
| operation: TextFileOperation; | |
| } | |
| export interface TextFileObservation { | |
| owner: string; | |
| path?: string | null; | |
| sequence: number; | |
| state: TextFileState; | |
| } | |
| export interface MorphMarkProps { | |
| background: TerminalColor; | |
| foreground: TerminalColor; | |
| motion: boolean; | |
| ascii: boolean; | |
| } | |
| export interface MorphMarkConfiguration { | |
| /** | |
| * @minItems 2 | |
| * @maxItems 2 | |
| */ | |
| shapes: [MorphShape, MorphShape]; | |
| color: TerminalColor; | |
| period: number; | |
| } | |
| export interface MorphShape { | |
| /** | |
| * @minItems 1 | |
| */ | |
| paths: [[number, number][], ...[number, number][][]]; | |
| radius: number; | |
| miters: number[]; | |
| columns: number; | |
| } | |
| export interface ValueCheckpointObservation { | |
| sequence: number; | |
| state: ValueCheckpointState; | |
| } | |
| export interface RowActivated { | |
| revision: number; | |
| row: string; | |
| action: string; | |
| } | |
| export interface InputProps { | |
| appearance: InputAppearance; | |
| menu?: TextareaMenu | null; | |
| accessibilityLabel: string; | |
| readOnly: boolean; | |
| disabled: boolean; | |
| tabIndex: number; | |
| /** | |
| * Offer native focus once when this original input becomes visible and | |
| * enabled. Stable updates and viewport scrolling do not repeat the offer. | |
| */ | |
| autoFocus?: boolean; | |
| /** | |
| * UTF-8 byte capacity, fixed for this original native editor mount. | |
| */ | |
| maxBytes?: number; | |
| /** | |
| * Terminal bracketed-paste policy. Other native insertion remains literal. | |
| */ | |
| terminalPaste?: TerminalPaste & string; | |
| placeholder?: string; | |
| command?: EditorCommand | null; | |
| /** | |
| * Clipboard default for physical Enter at this original editor revision. | |
| * Programmatic submitted events never execute this native default. | |
| */ | |
| submitCopy?: SubmitCopy | null; | |
| } | |
| export interface SubmitCopy { | |
| basis: EditorTextRef; | |
| text: string; | |
| } | |
| export interface EditorTextRef { | |
| owner: string; | |
| revision: number; | |
| bytes: number; | |
| } | |
| export interface EditorObservation { | |
| revision: number; | |
| snapshot: EditorSnapshot; | |
| receipt: EditorReceipt | null; | |
| } | |
| export interface EditorSnapshot { | |
| text: EditorTextRef; | |
| selection: TextRange; | |
| reversed: boolean; | |
| marked: TextRange | null; | |
| } | |
| export interface EditorReceipt { | |
| owner: string; | |
| sequence: number; | |
| revision: number; | |
| outcome: EditorOutcome; | |
| } | |
| export interface EditorCheckpointObservation { | |
| owner: string; | |
| state: EditorCheckpointState; | |
| } | |
| export interface ReadText { | |
| start: number; | |
| end: number; | |
| } | |
| export interface TextChunk { | |
| text: string; | |
| metadata: unknown; | |
| } | |
| export interface AgentConfiguration { | |
| /** | |
| * Deployment locale fallback; saved Root preference takes precedence. | |
| */ | |
| locale?: string; | |
| /** | |
| * Defer optional tool schemas until the model discovers them. This affects | |
| * presentation only; every call still uses its current authorized binding. | |
| */ | |
| toolDiscovery?: boolean; | |
| /** | |
| * Permit creation of Host-owned Git worktrees from published directories. | |
| */ | |
| isolatedWorkspaces?: boolean; | |
| /** | |
| * Select Maka's assistant policy and workspace guidance explicitly. | |
| */ | |
| assistant?: AgentAssistantConfiguration | null; | |
| /** | |
| * Enable model proposals and approved scheduled work for this Agent. | |
| */ | |
| scheduledTasks?: boolean; | |
| /** | |
| * Enable explicitly approved, bounded Goal continuation. | |
| */ | |
| goals?: boolean; | |
| /** | |
| * Enable planning, reviewed approval and execution progress. | |
| */ | |
| plans?: boolean; | |
| /** | |
| * Enable the session-scoped, model-maintained checklist. | |
| */ | |
| todo?: boolean; | |
| /** | |
| * Generate a bounded auxiliary title for automatically named conversations. | |
| */ | |
| automaticTitles?: boolean; | |
| /** | |
| * Enable explicit, bounded session recap requests and cached reads. | |
| */ | |
| recaps?: boolean; | |
| /** | |
| * Explicit access to this Agent’s earlier conversations for model tools. | |
| */ | |
| recall?: boolean; | |
| /** | |
| * Explicit service backends; discovery does not authorize execution. | |
| */ | |
| executors?: AgentServiceExecutor[]; | |
| /** | |
| * Explicit Library import for immutable skill input preparation and metadata. | |
| * This does not select model tools or confer a service grant. | |
| */ | |
| skillLibrary?: string | null; | |
| /** | |
| * Initial policy within the selected workspace capability. | |
| */ | |
| permissions: AgentWorkspacePermissions; | |
| /** | |
| * Installation-published directories, captured without creating workspace markers. | |
| */ | |
| workspaceRoots: DirectoryRootSpec[]; | |
| /** | |
| * Explicit read-only roots for user-selected conversation sources. | |
| */ | |
| importRoots?: DirectoryRootSpec[]; | |
| /** | |
| * Explicitly selected, frozen application service tools, alongside configured native tools. | |
| */ | |
| tools: AgentServiceTool[]; | |
| } | |
| export interface AgentAssistantConfiguration { | |
| /** | |
| * Select this home for global instructions and explicit AGENTS.md editing. | |
| */ | |
| home?: string | null; | |
| } | |
| export interface AgentServiceExecutor { | |
| name: string; | |
| import: string; | |
| /** | |
| * Exact member of the explicitly bound import, never a discovery index. | |
| */ | |
| member?: number; | |
| setup?: ExecutorSetupBinding | null; | |
| } | |
| export interface ExecutorSetupBinding { | |
| import: string; | |
| member?: number; | |
| } | |
| export interface AgentWorkspacePermissions { | |
| access: AgentWorkspaceAccess; | |
| requestPermissions: boolean; | |
| } | |
| export interface DirectoryRootSpec { | |
| label: string; | |
| path: string; | |
| } | |
| export interface AgentServiceTool { | |
| /** | |
| * Allow this selected service inside Code Mode. Binding and permission | |
| * checks are identical to a direct call; omitted keeps direct-only behavior. | |
| */ | |
| nestable?: boolean; | |
| /** | |
| * Explicit input projection. Skill tools receive the actual Agent tool names, | |
| * outside model-controlled arguments; this is compatibility data, not authority. | |
| */ | |
| input?: AgentToolInput & string; | |
| /** | |
| * Explicit versioned renderer key, frozen with the call; never inferred from its name. | |
| */ | |
| presentation?: string | null; | |
| /** | |
| * Display only; the selected name, contract and binding still identify execution. | |
| */ | |
| title?: DisplayText | null; | |
| /** | |
| * Explicit model projection; JSON data never implicitly grants image access. | |
| */ | |
| result: AgentToolResult; | |
| /** | |
| * Additional user consent for this exact call; service grants remain independent. | |
| */ | |
| confirmation: AgentToolConfirmation; | |
| name: string; | |
| description: string; | |
| import: string; | |
| method: string; | |
| } | |
| /** | |
| * Presentation text is distinct from the stable identity used for navigation. | |
| */ | |
| export interface DisplayText { | |
| fallback: string; | |
| translations?: { | |
| [k: string]: string | undefined; | |
| }; | |
| } | |
| export interface WorkspaceJevConfiguration { | |
| network: Network; | |
| } | |
| /** | |
| * Destination authority, independent of the upstream proxy used to reach it. | |
| * A domain grant does not authorize its subdomains or other ports. | |
| */ | |
| export interface Destination { | |
| host: string; | |
| port: number; | |
| } | |
| export interface JevSet { | |
| revision?: number | null; | |
| settings: JevSettings; | |
| } | |
| export interface JevSettings { | |
| enabled: boolean; | |
| url: string; | |
| model: string; | |
| timeoutMs: number; | |
| } | |
| export interface JevCredential { | |
| url: string; | |
| revision?: number | null; | |
| target: JevCredentialTarget; | |
| change: JevCredentialChange; | |
| } | |
| export interface JevSnapshot { | |
| revision?: number | null; | |
| settings: JevSettings; | |
| credentialRevision?: number | null; | |
| configured: boolean; | |
| apiKeyConfigured: boolean; | |
| headerNames: string[]; | |
| [k: string]: unknown | undefined; | |
| } | |
| export interface JevEvaluation { | |
| state: unknown; | |
| questions: { | |
| [k: string]: JevQuestion | undefined; | |
| }; | |
| } | |
| export interface JevEvaluationResult { | |
| model: string; | |
| answers: { | |
| [k: string]: JevAnswer | undefined; | |
| }; | |
| usage: JevUsage; | |
| } | |
| export interface JevUsage { | |
| input_tokens: number; | |
| output_tokens: number; | |
| } | |
| export interface WorkspaceWebConfiguration { | |
| network: Network; | |
| } | |
| export interface WebCapture { | |
| basis: WebBasis; | |
| available: boolean; | |
| source: WebSource; | |
| credentialConfigured: boolean; | |
| } | |
| export interface WebBasis { | |
| revision?: number | null; | |
| credentialRevision?: number | null; | |
| } | |
| export interface WebCall_WebFetch { | |
| basis: WebBasis; | |
| input: WebFetch; | |
| } | |
| export interface WebFetch { | |
| url: string; | |
| } | |
| export interface WebCall_WebQuery { | |
| basis: WebBasis; | |
| input: WebQuery; | |
| } | |
| export interface WebQuery { | |
| query: string; | |
| limit?: number; | |
| } | |
| export interface WebSet { | |
| revision?: number | null; | |
| settings: WebSettings; | |
| } | |
| export interface WebSettings { | |
| enabled: boolean; | |
| source: WebSource; | |
| } | |
| export interface WebKey { | |
| revision?: number | null; | |
| } | |
| export interface WebSnapshot { | |
| revision?: number | null; | |
| settings: WebSettings; | |
| credential: WebCredential; | |
| [k: string]: unknown | undefined; | |
| } | |
| export interface WebCredential { | |
| revision?: number | null; | |
| configured: boolean; | |
| check?: WebCheck | null; | |
| [k: string]: unknown | undefined; | |
| } | |
| export interface WebCheck { | |
| credential_revision: number; | |
| outcome: WebCheckOutcome; | |
| } | |
| export interface WebProbe { | |
| url: string; | |
| } | |
| export interface AgentExecute { | |
| /** | |
| * IDs of immutable user uploads in this Session, resolved by the Agent owner. | |
| */ | |
| attachments?: string[]; | |
| sessionId: string; | |
| message: string; | |
| executor: AgentExecutorSelection; | |
| } | |
| export interface AgentExecutorSelection { | |
| executor: string; | |
| settings: ExecutorSettings; | |
| } | |
| /** | |
| * Executor-owned model selection, independent of Host model connections. | |
| */ | |
| export interface ExecutorSettings { | |
| model?: string | null; | |
| thinkingLevel?: ThinkingLevel | null; | |
| } | |
| export interface AgentGlobalInstructionsRead {} | |
| export interface AgentGlobalInstructionsUpdate { | |
| source: AgentGlobalInstructionSource; | |
| revision: string; | |
| content: string; | |
| } | |
| export interface AgentExecutorsRead {} | |
| export interface AgentExecutors { | |
| executors: string[]; | |
| setup: string[]; | |
| } | |
| /** | |
| * Observations and text; immutable attachments travel in the actual request resources. | |
| * No path, invocation or conversation key is authority. | |
| */ | |
| export interface ExecutorExecute { | |
| language?: Language; | |
| invocation: Invocation; | |
| conversationKey: string; | |
| message: string; | |
| cwd: string; | |
| instructions?: string | null; | |
| settings: ExecutorSettings; | |
| } | |
| export interface Invocation { | |
| session_id: string; | |
| turn_id: string; | |
| run_id: string; | |
| invocation_id: string; | |
| [k: string]: unknown | undefined; | |
| } | |
| export interface AgentExecutorSetup { | |
| executor: string; | |
| action: ExecutorSetupAction; | |
| } | |
| export interface ExecutorSetupInfo { | |
| title?: string | null; | |
| name: string; | |
| version: string; | |
| } | |
| export interface ExecutorAuthenticationMethod { | |
| id: string; | |
| name: string; | |
| description?: string | null; | |
| supported: boolean; | |
| } | |
| export interface ComputerConfiguration { | |
| desktop?: Desktop & string; | |
| browsers?: BrowserConnection[]; | |
| } | |
| /** | |
| * An explicitly configured browser provider. The REPL cannot supply endpoints, | |
| * restart a browser, switch profiles or enable remote debugging by itself. | |
| */ | |
| export interface BrowserConnection { | |
| id: string; | |
| endpoint: string; | |
| } | |
| export interface ComputerEvaluate { | |
| code: string; | |
| /** | |
| * Wall-clock limit including asynchronous waits. Interrupted REPLs require reset. | |
| */ | |
| timeout_ms?: number; | |
| /** | |
| * Short, user-facing description of this call, in the user’s language. | |
| */ | |
| title?: string | null; | |
| } | |
| export interface ProtocolProcessLaunch { | |
| executable: string; | |
| args?: string[]; | |
| env?: { | |
| [k: string]: string | undefined; | |
| }; | |
| } | |
| export interface AcpExecutorConfiguration { | |
| agent: AcpAgent; | |
| /** | |
| * Requested launch access, still subject to installation limits and consent. | |
| */ | |
| permissions?: Permissions | null; | |
| } | |
| export interface AcpAgent { | |
| id: string; | |
| displayName: string; | |
| executable: string; | |
| args?: string[]; | |
| /** | |
| * Ordinary launch settings only. Credentials belong to the agent's login store. | |
| */ | |
| env?: { | |
| [k: string]: string | undefined; | |
| }; | |
| } | |
| export interface Permissions { | |
| filesystem: Rule[]; | |
| network: Network; | |
| } | |
| /** | |
| * Paths have executor-native meaning. Validate and materialize them on the | |
| * execution host, never on a remote Desktop. This document alone grants nothing. | |
| */ | |
| export interface Rule { | |
| path: string; | |
| scope: Scope; | |
| access: Access; | |
| } | |
| export interface ProtocolProcessRun { | |
| executable: string; | |
| args?: string[]; | |
| env?: { | |
| [k: string]: string | undefined; | |
| }; | |
| additionalPermissions?: Permissions | null; | |
| justification?: string | null; | |
| } | |
| export interface ProtocolProcessInput { | |
| id: string; | |
| additionalPermissions?: Permissions | null; | |
| justification?: string | null; | |
| /** | |
| * Null closes stdin. Empty data is a successful zero-byte write. | |
| * | |
| * @maxItems 8192 | |
| */ | |
| bytes?: number[] | null; | |
| } | |
| export interface ProtocolProcessWritten { | |
| bytes: number; | |
| closed: boolean; | |
| } | |
| export interface AgentToolNames { | |
| names: string[]; | |
| } | |
| export interface WorkHubPresets { | |
| revision: number | null; | |
| entries: WorkHubPreset[]; | |
| } | |
| export interface WorkHubPreset { | |
| isolatedWorkspace?: boolean; | |
| id: string; | |
| name: string; | |
| description: string; | |
| worker: string; | |
| /** | |
| * Exact installed names; an empty list permits reasoning without tools. | |
| */ | |
| tools: string[]; | |
| model: ConnectionTarget; | |
| thinkingLevel?: ThinkingLevel | null; | |
| enabled: boolean; | |
| } | |
| export interface ConnectionTarget { | |
| connectionId: string; | |
| modelId: string; | |
| } | |
| export interface WorkHubGraphRead { | |
| sessionId: string; | |
| graphId?: GraphId | null; | |
| after?: WorkId | null; | |
| } | |
| export interface WorkHubGraphView { | |
| enabled: boolean; | |
| currentEpoch?: GraphEpoch | null; | |
| selectedMode?: GraphMode | null; | |
| epoch?: GraphEpoch | null; | |
| revision: number; | |
| status: GraphStatus; | |
| quiescent: boolean; | |
| /** | |
| * @maxItems 16 | |
| */ | |
| work: | |
| | [] | |
| | [WorkHubGraphWork] | |
| | [WorkHubGraphWork, WorkHubGraphWork] | |
| | [WorkHubGraphWork, WorkHubGraphWork, WorkHubGraphWork] | |
| | [WorkHubGraphWork, WorkHubGraphWork, WorkHubGraphWork, WorkHubGraphWork] | |
| | [WorkHubGraphWork, WorkHubGraphWork, WorkHubGraphWork, WorkHubGraphWork, WorkHubGraphWork] | |
| | [ | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| ] | |
| | [ | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| ] | |
| | [ | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| ] | |
| | [ | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| ] | |
| | [ | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| ] | |
| | [ | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| ] | |
| | [ | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| ] | |
| | [ | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| ] | |
| | [ | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| ] | |
| | [ | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| ] | |
| | [ | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| WorkHubGraphWork, | |
| ]; | |
| after?: WorkId | null; | |
| finish?: GraphFinish | null; | |
| } | |
| export interface GraphEpoch { | |
| rootSessionId: string; | |
| epoch: number; | |
| graphId: GraphId; | |
| createdAt: number; | |
| mode: GraphMode; | |
| } | |
| export interface WorkHubGraphWork { | |
| workId: WorkId; | |
| taskId: string; | |
| target: GraphTarget; | |
| status: GraphWorkState; | |
| instructionExcerpt: string; | |
| instructionTruncated: boolean; | |
| resultId?: string | null; | |
| failure?: string | null; | |
| } | |
| export interface GraphFinish { | |
| resultIds: string[]; | |
| reason: string; | |
| } | |
| export interface WorkHubGraphWorkRead { | |
| sessionId: string; | |
| graphId: GraphId; | |
| workId: WorkId; | |
| } | |
| export interface GraphWorkDefinition { | |
| workId: WorkId; | |
| target: GraphTarget; | |
| instruction: string; | |
| inputIds: string[]; | |
| selectedResultInputs?: HistoricalInput[]; | |
| replaces?: string | null; | |
| } | |
| export interface HistoricalInput { | |
| sourceGraphId: GraphId; | |
| resultId: string; | |
| } | |
| export interface WorkHubGraphResultRead { | |
| sessionId: string; | |
| graphId: GraphId; | |
| workId: WorkId; | |
| resultId: string; | |
| offset: number; | |
| } | |
| export interface WorkHubGraphResult { | |
| workId: WorkId; | |
| resultId: string; | |
| execution: AgentExecution; | |
| text: string; | |
| nextOffset?: number | null; | |
| } | |
| /** | |
| * Canonical physical execution receipt, independent of the current Session tip. | |
| */ | |
| export interface AgentExecution { | |
| sessionId: string; | |
| turnId: string; | |
| runId: string; | |
| invocationId: string; | |
| /** | |
| * Run-local event count, not the root-global transcript cursor. | |
| */ | |
| highWater: number; | |
| state: AgentExecutionState; | |
| } | |
| export interface WorkHubGraphHistoryRead { | |
| sessionId: string; | |
| before?: number | null; | |
| } | |
| export interface WorkHubGraphHistory { | |
| /** | |
| * @maxItems 32 | |
| */ | |
| epochs: GraphEpoch[]; | |
| currentEpoch?: number | null; | |
| nextBefore?: number | null; | |
| } | |
| export interface WorkHubGraphChange { | |
| sessionId: string; | |
| expectedGraphId?: GraphId | null; | |
| action: WorkHubGraphAction; | |
| } | |
| export interface WorkHubGraphReceiptRead { | |
| reference: RecoveryRef; | |
| } | |
| export interface WorkHubResolve { | |
| /** | |
| * Used only when freezing the first coordinator creation intent. | |
| */ | |
| workspace: AgentDirectorySelection; | |
| } | |
| export interface AgentDirectorySelection { | |
| rootId: string; | |
| segments: string[]; | |
| directoryIdentity: string; | |
| } | |
| export interface AgentSession { | |
| branch: AgentSessionBranch | null; | |
| backend?: AgentBackendPreference | null; | |
| collaborationMode?: CollaborationMode & string; | |
| tools?: string[] | null; | |
| dataSource: AgentDataSource; | |
| permissions: AgentWorkspacePermissions; | |
| boundaryRevision: number; | |
| id: string; | |
| title: string; | |
| labels: string[]; | |
| workspace: AgentWorkspace; | |
| revision: number; | |
| updatedAt: number; | |
| archived: boolean; | |
| hasUnread: boolean; | |
| activity: AgentSessionActivity; | |
| } | |
| /** | |
| * Frozen conversation ancestry for presentation, not authority over the source. | |
| */ | |
| export interface AgentSessionBranch { | |
| sessionId: string; | |
| turnId: string | null; | |
| } | |
| /** | |
| * Stable business-data origin, independent of package or activation revisions. | |
| */ | |
| export interface AgentDataSource { | |
| stateDomain: string; | |
| deployment: string; | |
| namespace: InstanceId; | |
| } | |
| export interface AgentWorkspace { | |
| /** | |
| * Native owner allocation; never accepted from a caller as workspace authority. | |
| */ | |
| worktree?: Binding | null; | |
| /** | |
| * Optional membership in this Agent's canonical Project catalog. | |
| */ | |
| projectId?: string | null; | |
| path: string; | |
| directoryIdentity: string; | |
| identity: string; | |
| } | |
| /** | |
| * Immutable allocation intent, not the current child branch or HEAD. | |
| */ | |
| export interface Binding { | |
| id: string; | |
| common_dir: string; | |
| source: string; | |
| source_identity: string; | |
| base_commit: string; | |
| directory: string; | |
| } | |
| export interface WorkHubConfiguration { | |
| agent: AgentConfiguration; | |
| /** | |
| * Exactly selected imports of Agent services. Native grants are independent. | |
| */ | |
| workers: string[]; | |
| } | |
| export interface WorkHubTaskRead { | |
| taskId: string; | |
| cursor?: AgentAnswerCursor | null; | |
| } | |
| export interface AgentAnswerCursor { | |
| invocationId: string; | |
| offset: number; | |
| } | |
| export interface WorkHubTask { | |
| dependencies?: string[]; | |
| taskId: string; | |
| worker: string; | |
| title: string; | |
| /** | |
| * Frozen task acceptance time in Unix milliseconds. | |
| */ | |
| acceptedAt: number; | |
| operation: string; | |
| status: WorkHubTaskStatus; | |
| } | |
| export interface AgentAnswerPage { | |
| text: string; | |
| next?: AgentAnswerCursor | null; | |
| } | |
| export interface WorkHubControlRead { | |
| controlId: string; | |
| } | |
| export interface WorkHubControl { | |
| taskId: string; | |
| controlId: string; | |
| operation: string; | |
| status: WorkHubControlStatus; | |
| } | |
| export interface AgentWorkspacePatch { | |
| artifactId: string; | |
| sessionId: string; | |
| turnId: string; | |
| baseCommit: string; | |
| bytes: number; | |
| } | |
| export interface AgentStopped { | |
| requested: boolean; | |
| } | |
| export interface WorkHubControlsRead { | |
| after?: string | null; | |
| } | |
| export interface WorkHubControls { | |
| /** | |
| * @maxItems 16 | |
| */ | |
| entries: | |
| | [] | |
| | [WorkHubControlEntry] | |
| | [WorkHubControlEntry, WorkHubControlEntry] | |
| | [WorkHubControlEntry, WorkHubControlEntry, WorkHubControlEntry] | |
| | [WorkHubControlEntry, WorkHubControlEntry, WorkHubControlEntry, WorkHubControlEntry] | |
| | [ | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| ] | |
| | [ | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| ] | |
| | [ | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| ] | |
| | [ | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| ] | |
| | [ | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| ] | |
| | [ | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| ] | |
| | [ | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| ] | |
| | [ | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| ] | |
| | [ | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| ] | |
| | [ | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| ] | |
| | [ | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| ] | |
| | [ | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| WorkHubControlEntry, | |
| ]; | |
| after?: string | null; | |
| } | |
| export interface WorkHubControlEntry { | |
| taskId: string; | |
| controlId: string; | |
| } | |
| export interface WorkHubTasksRead { | |
| /** | |
| * Opaque continuation for newest accepted tasks first, with stable identity ties. | |
| * This is live keyset pagination, not a frozen snapshot; pass it unchanged. | |
| */ | |
| after?: string | null; | |
| } | |
| export interface WorkHubTasks { | |
| /** | |
| * @maxItems 16 | |
| */ | |
| entries: | |
| | [] | |
| | [WorkHubTaskEntry] | |
| | [WorkHubTaskEntry, WorkHubTaskEntry] | |
| | [WorkHubTaskEntry, WorkHubTaskEntry, WorkHubTaskEntry] | |
| | [WorkHubTaskEntry, WorkHubTaskEntry, WorkHubTaskEntry, WorkHubTaskEntry] | |
| | [WorkHubTaskEntry, WorkHubTaskEntry, WorkHubTaskEntry, WorkHubTaskEntry, WorkHubTaskEntry] | |
| | [ | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| ] | |
| | [ | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| ] | |
| | [ | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| ] | |
| | [ | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| ] | |
| | [ | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| ] | |
| | [ | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| ] | |
| | [ | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| ] | |
| | [ | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| ] | |
| | [ | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| ] | |
| | [ | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| ] | |
| | [ | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| WorkHubTaskEntry, | |
| ]; | |
| /** | |
| * Opaque live continuation in accepted-time descending order. Null ends the page sequence. | |
| */ | |
| after?: string | null; | |
| } | |
| export interface WorkHubTaskEntry { | |
| taskId: string; | |
| worker: string; | |
| title: string; | |
| /** | |
| * Frozen task acceptance time in Unix milliseconds. | |
| */ | |
| acceptedAt: number; | |
| } | |
| export interface AgentWorkRead { | |
| sessionId: string; | |
| target: AgentWorkTarget; | |
| cursor?: AgentAnswerCursor | null; | |
| } | |
| /** | |
| * Exact public selection observed by a caller, checked once at run admission. | |
| */ | |
| export interface ModelSelection { | |
| connectionId: string; | |
| revision: number; | |
| modelId: string; | |
| } | |
| export interface SettingsModelCursor { | |
| query: string; | |
| connection: number; | |
| model: number; | |
| } | |
| export interface SettingsUsageRead { | |
| range: SettingsUsageRange; | |
| selection: UsageSelection; | |
| offset: number; | |
| } | |
| export interface SettingsUsageRange { | |
| from: number; | |
| to: number; | |
| sessionId: string | null; | |
| through: number | null; | |
| } | |
| /** | |
| * Filters only the activity list, never headline accounting for the range. | |
| */ | |
| export interface UsageSelection { | |
| kind?: UsageActivityKind | null; | |
| status?: UsageActivityStatus | null; | |
| search?: string; | |
| } | |
| export interface SettingsUsagePage { | |
| through: number; | |
| /** | |
| * @maxItems 32 | |
| */ | |
| attempts: UsageActivity[]; | |
| total: number; | |
| nextOffset?: number | null; | |
| } | |
| export interface UsageModelAttempt { | |
| requestId: string; | |
| origin: UsageOrigin; | |
| sessionId?: string | null; | |
| binding?: ModelBinding | null; | |
| modelId: string; | |
| startedAt: number; | |
| completedAt: number; | |
| outcome: UsageOutcome; | |
| usage: ModelUsage; | |
| quote?: Quote | null; | |
| costUsd?: number | null; | |
| } | |
| /** | |
| * Public model identity. Credentials and provider handles never belong here. | |
| */ | |
| export interface ModelBinding { | |
| connection_id: string; | |
| connection_slug: string; | |
| model: string; | |
| [k: string]: unknown | undefined; | |
| } | |
| export interface ModelUsage { | |
| input_tokens?: number | null; | |
| output_tokens?: number | null; | |
| cache_read_tokens?: number | null; | |
| cache_write_tokens?: number | null; | |
| reasoning_tokens?: number | null; | |
| [k: string]: unknown | undefined; | |
| } | |
| export interface Quote { | |
| providerId: string; | |
| revision: number; | |
| pricing?: Pricing | null; | |
| } | |
| export interface Pricing { | |
| modelKey: string; | |
| inputUsdPer1M: number; | |
| outputUsdPer1M: number; | |
| cacheReadUsdPer1M?: number; | |
| cacheWriteUsdPer1M?: number; | |
| } | |
| export interface UsageToolAttempt { | |
| requestId: string; | |
| invocation: Invocation; | |
| call: ToolCallIdentity; | |
| name: string; | |
| binding?: ModelBinding | null; | |
| completedAt: number; | |
| result: UsageToolResult; | |
| } | |
| /** | |
| * A Tool Call is distinct from its durable host operation. Origin determines | |
| * model visibility; it is not an independent flag that can contradict ancestry. | |
| */ | |
| export interface ToolCallIdentity { | |
| tool_call_id: string; | |
| origin: ToolOrigin; | |
| [k: string]: unknown | undefined; | |
| } | |
| export interface SettingsUsageSummary { | |
| through: number; | |
| summary: SettingsUsageTotals; | |
| nextOffset?: number | null; | |
| } | |
| export interface SettingsUsageTotals { | |
| models: UsageModelTotals; | |
| tools: UsageToolTotals; | |
| pending: UsagePending; | |
| /** | |
| * @maxItems 32 | |
| */ | |
| byProvider: UsageProviderSummary[]; | |
| /** | |
| * @maxItems 32 | |
| */ | |
| byModel: UsageModelSummary[]; | |
| /** | |
| * @maxItems 32 | |
| */ | |
| byTool: UsageToolSummary[]; | |
| } | |
| export interface UsageModelTotals { | |
| calls: number; | |
| success: number; | |
| error: number; | |
| aborted: number; | |
| unknown: number; | |
| /** | |
| * Sum of observed durations; unknown outcomes are excluded. Not wall-clock time. | |
| */ | |
| durationMs: number; | |
| input: UsageTokens; | |
| output: UsageTokens; | |
| cacheRead: UsageTokens; | |
| cacheWrite: UsageTokens; | |
| reasoning: UsageTokens; | |
| cost: UsageCost; | |
| } | |
| /** | |
| * Sum of reported counters, qualified by calls that omitted this counter. | |
| */ | |
| export interface UsageTokens { | |
| known: number; | |
| missing: number; | |
| } | |
| export interface UsageCost { | |
| knownUsd: number; | |
| /** | |
| * Calls without a persisted valuation; includes unpriced calls. | |
| */ | |
| unvalued: number; | |
| unpriced: number; | |
| } | |
| export interface UsageToolTotals { | |
| /** | |
| * Includes pre-dispatch refusals, which are counted separately below. | |
| */ | |
| calls: number; | |
| success: number; | |
| error: number; | |
| unknown: number; | |
| rejected: number; | |
| /** | |
| * Known success/error durations; refusals and unknown effects contribute no time. | |
| */ | |
| durationMs: number; | |
| /** | |
| * Only known success/error settlements contribute to observed execution latency. | |
| */ | |
| meanLatencyMs?: number | null; | |
| } | |
| export interface UsagePending { | |
| models: number; | |
| tools: number; | |
| } | |
| export interface UsageProviderSummary { | |
| /** | |
| * Unknown identity is not inferred from a transport protocol or current settings. | |
| */ | |
| providerId?: string | null; | |
| totals: UsageModelTotals; | |
| } | |
| export interface UsageModelSummary { | |
| modelId: string; | |
| totals: UsageModelTotals; | |
| } | |
| export interface UsageToolSummary { | |
| name: string; | |
| totals: UsageToolTotals; | |
| } | |
| export interface SettingsUsageSummaryRead { | |
| range: SettingsUsageRange; | |
| group: UsageGroup; | |
| offset: number; | |
| } | |
| export interface PricingUpdate { | |
| expectedRevision: number; | |
| mutation: PricingMutation; | |
| } | |
| export interface SettingsAssistantPreferences { | |
| language?: LanguagePreference | null; | |
| resolvedLanguage: Language; | |
| compactionPrompt: string; | |
| defaultCompactionPrompt: string; | |
| revision: number; | |
| displayName: string; | |
| workspaceInstructions: boolean; | |
| incognitoActive: boolean; | |
| shellTitles: boolean; | |
| } | |
| export interface SettingsNetworkSnapshot { | |
| revision: number; | |
| proxy: NetworkProxy; | |
| credential: CredentialStatus; | |
| rootId: string; | |
| rootPath: string; | |
| } | |
| export interface NetworkProxy { | |
| enabled: boolean; | |
| protocol: ProxyProtocol; | |
| host: string; | |
| port: number; | |
| authEnabled: boolean; | |
| username: string; | |
| bypassList: string[]; | |
| autoBypassDomains: string[]; | |
| } | |
| export interface CredentialStatus { | |
| locator: CredentialLocator; | |
| configured: boolean; | |
| credentialId: string | null; | |
| revision: number | null; | |
| updatedAt: number | null; | |
| } | |
| export interface SettingsNetworkUpdate { | |
| expectedPolicyRevision: number; | |
| expectedCredential: CredentialVersionBasis | null; | |
| networkProxy: NetworkProxy; | |
| credential: SettingsNetworkCredentialAction; | |
| } | |
| export interface CredentialVersionBasis { | |
| locator: CredentialLocator; | |
| credentialId: string; | |
| revision: number; | |
| } | |
| export interface CredentialTarget { | |
| protocol: ProxyProtocol; | |
| host: string; | |
| port: number; | |
| username: string; | |
| } | |
| export interface SettingsPreferencesUpdate { | |
| expectedRevision: number; | |
| mutation: SettingsPreferencesMutation; | |
| } | |
| export interface SettingsModelChoice { | |
| tools?: SettingsModelToolPreferences | null; | |
| limits?: SettingsModelLimitSettings | null; | |
| selection: ModelSelection; | |
| connectionName: string; | |
| label: string; | |
| /** | |
| * @maxItems 8 | |
| */ | |
| thinkingLevels: | |
| | [] | |
| | [ThinkingLevel] | |
| | [ThinkingLevel, ThinkingLevel] | |
| | [ThinkingLevel, ThinkingLevel, ThinkingLevel] | |
| | [ThinkingLevel, ThinkingLevel, ThinkingLevel, ThinkingLevel] | |
| | [ThinkingLevel, ThinkingLevel, ThinkingLevel, ThinkingLevel, ThinkingLevel] | |
| | [ThinkingLevel, ThinkingLevel, ThinkingLevel, ThinkingLevel, ThinkingLevel, ThinkingLevel] | |
| | [ | |
| ThinkingLevel, | |
| ThinkingLevel, | |
| ThinkingLevel, | |
| ThinkingLevel, | |
| ThinkingLevel, | |
| ThinkingLevel, | |
| ThinkingLevel, | |
| ] | |
| | [ | |
| ThinkingLevel, | |
| ThinkingLevel, | |
| ThinkingLevel, | |
| ThinkingLevel, | |
| ThinkingLevel, | |
| ThinkingLevel, | |
| ThinkingLevel, | |
| ThinkingLevel, | |
| ]; | |
| defaultThinkingLevel: ThinkingLevel | null; | |
| } | |
| export interface SettingsModelToolPreferences { | |
| codeMode: boolean | null; | |
| codeModeLanguage: CodeLanguage | null; | |
| applyPatch: boolean | null; | |
| } | |
| export interface SettingsModelLimitSettings { | |
| overrides: SettingsModelLimits; | |
| contextWindow: number | null; | |
| inputLimit: number | null; | |
| maxOutputTokens: number | null; | |
| } | |
| export interface SettingsModelLimits { | |
| contextWindow: number | null; | |
| inputLimit: number | null; | |
| maxOutputTokens: number | null; | |
| compactionThreshold: number | null; | |
| } | |
| export interface SettingsUpdateModelSettings { | |
| selection: ModelSelection; | |
| tools: SettingsModelToolPreferences; | |
| limits: SettingsModelLimits; | |
| } | |
| export interface SettingsConnectionSummary { | |
| /** | |
| * Editing controls implemented by this Settings service for the provider. | |
| */ | |
| editable: boolean; | |
| basis: ConnectionVersionBasis; | |
| slug: string; | |
| name: string; | |
| provider: Identity; | |
| enabled: boolean; | |
| enabledModelCount: number; | |
| } | |
| export interface ConnectionVersionBasis { | |
| connectionId: string; | |
| revision: number; | |
| } | |
| /** | |
| * Durable recipient, not a registration lease. Re-loading the same package can | |
| * restore it; another package, Entry or scope cannot inherit its credentials. | |
| */ | |
| export interface Identity { | |
| packageId: string; | |
| entryId: string; | |
| scope: string; | |
| name: string; | |
| } | |
| export interface ConnectionCredentialTarget { | |
| connectionId: string; | |
| revision: number; | |
| slug: string; | |
| provider: Identity; | |
| configuration: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| } | |
| export interface SettingsConnectionEditingFacts { | |
| enabledModelIds: string[]; | |
| modelOverrides: { | |
| [k: string]: ModelOverride | undefined; | |
| } | null; | |
| requestBodyOverlay: { | |
| [k: string]: unknown | undefined; | |
| } | null; | |
| } | |
| export interface ModelOverride { | |
| /** | |
| * Public adapter contribution name; omitted selects the wire's default. | |
| */ | |
| adapter?: string; | |
| /** | |
| * Omitted means model-specific defaults; false is an explicit opt-out. | |
| */ | |
| codeMode?: boolean; | |
| /** | |
| * Code Mode interpreter; omitted selects JavaScript. | |
| */ | |
| codeModeLanguage?: CodeLanguage; | |
| /** | |
| * Independent of Code Mode: select patch editing or structured Edit/Write. | |
| */ | |
| applyPatch?: boolean; | |
| thinkingLevels?: ThinkingLevel[]; | |
| defaultThinkingLevel?: ThinkingLevel; | |
| vision?: boolean; | |
| /** | |
| * Override total input-plus-output capacity, without subtracting a reply budget. | |
| */ | |
| contextWindow?: number; | |
| /** | |
| * Optional override of the automatic compaction threshold, in retained tokens. | |
| * By default Host uses 85% of the smaller total window/input ceiling. | |
| */ | |
| compactionThreshold?: number; | |
| /** | |
| * Independent input ceiling; also caps the default compaction input budget. | |
| */ | |
| inputLimit?: number; | |
| /** | |
| * Requested per-step output budget, subject to provider and remaining-capacity caps. | |
| */ | |
| maxOutputTokens?: number; | |
| displayName?: string; | |
| description?: string; | |
| apiProtocol?: ApiProtocol; | |
| knowledgeCutoff?: string; | |
| capabilities?: ModelOverrideCapabilities; | |
| modalities?: ModelModalities; | |
| serviceTier?: RelayServiceTier; | |
| } | |
| /** | |
| * Vision has one declaration owner: ModelOverride::vision. | |
| */ | |
| export interface ModelOverrideCapabilities { | |
| chat?: boolean; | |
| reasoning?: boolean; | |
| functionCalling?: boolean; | |
| parallelToolCalls?: boolean; | |
| imageGeneration?: boolean; | |
| webSearch?: boolean; | |
| } | |
| export interface ModelModalities { | |
| input: ModelModality[]; | |
| output: ModelModality[]; | |
| } | |
| export interface SettingsProvidersRead { | |
| offset: number; | |
| } | |
| export interface SettingsProvidersPage { | |
| providers: SettingsProviderSummary[]; | |
| next: number | null; | |
| } | |
| export interface SettingsProviderSummary { | |
| identity: Identity; | |
| label: string; | |
| authentication: SettingsProviderAuthenticationSummary[]; | |
| } | |
| export interface SettingsProviderAuthenticationSummary { | |
| label: string; | |
| interactive: boolean; | |
| } | |
| export interface SettingsProvider { | |
| identity: Identity; | |
| descriptor: Descriptor; | |
| } | |
| export interface Descriptor { | |
| label: string; | |
| /** | |
| * Offers a user-selected endpoint instead of a named service. | |
| */ | |
| customEndpoint?: boolean; | |
| configurationSchema: unknown; | |
| configurationDefaults: unknown; | |
| authentication: Method2[]; | |
| /** | |
| * Whether the provider supports a connection without a stored credential. | |
| * Presentation metadata; authorization remains the provider's decision. | |
| */ | |
| anonymous: boolean; | |
| discovery: boolean; | |
| } | |
| export interface Method2 { | |
| id: string; | |
| label: string; | |
| /** | |
| * Secret-bearing form input never enters the connection configuration. | |
| */ | |
| inputSchema: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| interactive: boolean; | |
| } | |
| export interface SettingsCredentialLogin { | |
| expected: ConnectionCredentialTarget; | |
| expectedCredential: CredentialVersionBasis | null; | |
| method: string; | |
| } | |
| export interface SettingsLoginPrompt { | |
| url: string; | |
| userCode: string; | |
| } | |
| export interface ConnectionIdentity { | |
| connectionId: string; | |
| slug: string; | |
| provider: Identity; | |
| } | |
| export interface SettingsSaveCredential { | |
| expected: ConnectionCredentialTarget; | |
| expectedCredential: CredentialVersionBasis | null; | |
| } | |
| export interface CreateCatalogConnectionInput { | |
| expectedCatalogRevision: number; | |
| connection: ConnectionCatalogEntryDraft; | |
| } | |
| export interface ConnectionCatalogEntryDraft { | |
| slug: string; | |
| name: string; | |
| provider: Identity; | |
| configuration: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| enabled: boolean; | |
| enabledModelIds: string[]; | |
| modelOverrides?: { | |
| [k: string]: ModelOverride | undefined; | |
| }; | |
| requestBodyOverlay?: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| } | |
| export interface UpdateCatalogConnectionInput { | |
| expected: ConnectionVersionBasis; | |
| changes: ConnectionCatalogEntryUpdate; | |
| } | |
| export interface ConnectionCatalogEntryUpdate { | |
| name?: string; | |
| configuration?: { | |
| [k: string]: unknown | undefined; | |
| }; | |
| enabled?: boolean; | |
| enabledModelIds?: string[]; | |
| modelOverrides?: Nullable_MapOf_ModelOverride; | |
| requestBodyOverlay?: { | |
| [k: string]: unknown | undefined; | |
| } | null; | |
| } | |
| export interface RemoveCatalogConnectionInput { | |
| expected: ConnectionVersionBasis; | |
| } | |
| export interface CredentialVaultQueryInput { | |
| locator: CredentialLocator; | |
| } | |
| export interface DeleteCredentialInput { | |
| expected: CredentialVersionBasis; | |
| /** | |
| * Required for connection credentials; null for network credentials. | |
| */ | |
| expectedConnection: ConnectionCredentialTarget | null; | |
| } | |
| export interface SetDefaultConnectionTargetInput { | |
| expectedCatalogRevision: number; | |
| target: ConnectionTarget | null; | |
| } | |
| /** | |
| * Installation-selected skill collections. No ambient home or workspace scan. | |
| */ | |
| export interface SkillLibraryConfiguration { | |
| /** | |
| * Explicit user root; only its standard .maka/skills and .agents/skills collections are scanned. | |
| */ | |
| home?: string | null; | |
| /** | |
| * Explicit ceilings for a request's selected project. An observation grants no access. | |
| */ | |
| projectRoots?: DirectoryRootSpec[]; | |
| /** | |
| * Include the immutable skill instructions and resources shipped with this build. | |
| */ | |
| bundled?: boolean; | |
| /** | |
| * Enable installation into this instance's own private collection. | |
| */ | |
| manage?: boolean; | |
| /** | |
| * Allow edits to enabled/pinned preferences, independently of file management. | |
| */ | |
| preferences?: boolean; | |
| sources: SkillLibrarySource[]; | |
| } | |
| export interface SkillLibrarySource { | |
| id: string; | |
| label: string; | |
| /** | |
| * Absolute directory containing skill directories. Captured at activation. | |
| */ | |
| path: string; | |
| } | |
| export interface SkillLibraryList { | |
| workspace?: AgentWorkspace | null; | |
| query: string; | |
| cursor?: SkillLibraryCursor | null; | |
| } | |
| export interface SkillLibraryCursor { | |
| revision: string; | |
| query: string; | |
| offset: number; | |
| } | |
| export interface SkillLibraryEntry { | |
| bundled: boolean; | |
| installed: boolean; | |
| /** | |
| * Imported authoring source; unavailable to the model until explicitly installed. | |
| */ | |
| imported: boolean; | |
| preference: SkillPreference; | |
| reference: string; | |
| source: string; | |
| name: string; | |
| description: string; | |
| valid: boolean; | |
| shadowedBy?: string | null; | |
| metadataTruncated: boolean; | |
| issues: string[]; | |
| } | |
| export interface SkillPreference { | |
| enabled: boolean; | |
| pinned: boolean; | |
| } | |
| export interface SkillLibraryRead { | |
| workspace?: AgentWorkspace | null; | |
| reference: string; | |
| /** | |
| * Complete catalog revision from the list/read response. | |
| */ | |
| revision: string; | |
| offset: number; | |
| } | |
| export interface SkillLibraryChange { | |
| workspace?: AgentWorkspace | null; | |
| kind: SkillLibraryChangeKind; | |
| reference: string; | |
| revision: string; | |
| } | |
| export interface SkillLibraryReview { | |
| change: SkillLibraryChange; | |
| digest: string; | |
| } | |
| /** | |
| * Canonical publication evidence alongside the unmodified original Host facts. | |
| */ | |
| export interface SkillLibraryOutcome { | |
| original: OperationReply; | |
| published?: SkillLibraryChangeResult | null; | |
| } | |
| export interface SkillLibrarySetPreference { | |
| reference: string; | |
| revision: number; | |
| preference: SkillPreference; | |
| } | |
| export interface SkillModelSearch { | |
| query: string; | |
| limit?: number | null; | |
| } | |
| export interface SkillModelLoad { | |
| /** | |
| * Exact ref from search, or a skill id/name resolved before eligibility checks. | |
| */ | |
| name: string; | |
| /** | |
| * Catalog revision from search or a previous load/resource response. | |
| */ | |
| revision: string; | |
| /** | |
| * UTF-8 resource path relative to this skill, or its exact continuation. | |
| */ | |
| resource?: ReadInput | null; | |
| /** | |
| * UTF-8 byte offset from a returned instruction continuation; omit initially. | |
| */ | |
| instructionOffset?: number | null; | |
| } | |
| export interface ReadInput { | |
| path: string; | |
| offset?: number; | |
| limit?: number; | |
| } | |
| export interface SkillModelSearchResult { | |
| revision: string; | |
| query: string; | |
| queryTruncated: boolean; | |
| matches: SearchMatch[]; | |
| totalEligible: number; | |
| matchedCount: number; | |
| truncated: boolean; | |
| [k: string]: unknown | undefined; | |
| } | |
| export interface SearchMatch { | |
| ref: string; | |
| id: string; | |
| name: string; | |
| description: string; | |
| scope: SkillScope; | |
| source: SkillSource; | |
| metadataTruncated: boolean; | |
| score: number; | |
| [k: string]: unknown | undefined; | |
| } | |
| export interface SkillMetadata { | |
| ref: string; | |
| id: string; | |
| name: string; | |
| description: string; | |
| scope: SkillScope; | |
| source: SkillSource; | |
| metadataTruncated: boolean; | |
| [k: string]: unknown | undefined; | |
| } | |
| export interface SkillPrepare { | |
| language: Language; | |
| message: string; | |
| /** | |
| * Actual selected tools bound to this Library; these names grant no access. | |
| */ | |
| loadTool?: string | null; | |
| searchTool?: string | null; | |
| } | |
| export interface SkillPreparationRecord { | |
| revision: string; | |
| metadataPrompt: string; | |
| invocation: SkillInvocationResult; | |
| } | |
| export interface SkillInvocationResult { | |
| loaded: LoadedSkill[]; | |
| failed: SkillInvocationFailure[]; | |
| receipts: SkillInvocationReceipt[]; | |
| } | |
| export interface LoadedSkill { | |
| id: string; | |
| name: string; | |
| } | |
| export interface SkillRequestFailure { | |
| request: string; | |
| reason: SkillFailureReason; | |
| } | |
| export interface AgentList { | |
| filter: AgentSessionFilter; | |
| position: AgentSessionPosition; | |
| scope?: AgentSessionListScope; | |
| /** | |
| * Literal, case-sensitive title substring; an empty query matches all titles. | |
| */ | |
| titleQuery?: string; | |
| } | |
| export interface AgentCreate { | |
| /** | |
| * Treat title as a placeholder for one title derived from the first user message. | |
| */ | |
| automaticTitle?: boolean; | |
| /** | |
| * Immutable narrowing of this Agent's installed tools. None uses the installation; | |
| * an empty list permits no model tools. External executors cannot enforce this. | |
| */ | |
| tools?: string[] | null; | |
| title: string; | |
| labels: string[]; | |
| workspace: AgentWorkspaceSelection; | |
| } | |
| export interface AgentProjectRef { | |
| id: string; | |
| revision: string; | |
| } | |
| export interface AgentPlanRead { | |
| sessionId: string; | |
| } | |
| export interface AgentPlanView { | |
| enabled: boolean; | |
| current: AgentPlanSnapshot; | |
| } | |
| /** | |
| * Public business data only; frozen execution authority remains with the owner. | |
| */ | |
| export interface AgentPlanSnapshot { | |
| revision: number; | |
| proposal?: PlanProposal | null; | |
| execution?: AgentPlanExecution | null; | |
| } | |
| export interface PlanProposal { | |
| id: string; | |
| planId: string; | |
| revision: number; | |
| turnId: string; | |
| artifact: PlanArtifact; | |
| status: PlanProposalStatus; | |
| supersedes?: string | null; | |
| sourceExecutionId?: string | null; | |
| submittedAt: number; | |
| } | |
| export interface PlanArtifact { | |
| title: string; | |
| overview?: string | null; | |
| /** | |
| * @minItems 1 | |
| */ | |
| steps: [PlanStep, ...PlanStep[]]; | |
| risks?: string[]; | |
| } | |
| export interface PlanStep { | |
| id: string; | |
| title: string; | |
| description: string; | |
| files?: string[]; | |
| complexity?: PlanComplexity | null; | |
| } | |
| export interface AgentPlanExecution { | |
| id: string; | |
| proposalId: string; | |
| artifact: PlanArtifact; | |
| steps: PlanProgress[]; | |
| phase: AgentPlanPhase; | |
| invocation?: Invocation | null; | |
| reason?: string | null; | |
| cancellation?: string | null; | |
| updatedAt: number; | |
| } | |
| export interface PlanProgress { | |
| id: string; | |
| status: PlanStepStatus; | |
| note?: string | null; | |
| } | |
| export interface AgentPlanHistoryRead { | |
| sessionId: string; | |
| throughRevision?: number | null; | |
| after?: number; | |
| } | |
| export interface AgentPlanHistory { | |
| throughRevision: number; | |
| snapshots: AgentPlanSnapshot[]; | |
| nextAfter?: number | null; | |
| } | |
| export interface AgentPlanChange { | |
| sessionId: string; | |
| revision: number; | |
| action: AgentPlanAction; | |
| } | |
| export interface AgentPlanApproval { | |
| target: AgentScheduledTarget; | |
| model: ModelSelection; | |
| thinkingLevel?: ThinkingLevel | null; | |
| } | |
| /** | |
| * Exact observed source boundary. This data is checked against the original | |
| * Session; passing it never grants execution by itself. | |
| */ | |
| export interface AgentScheduledTarget { | |
| sessionId: string; | |
| workspace: AgentWorkspace; | |
| permissions: AgentWorkspacePermissions; | |
| boundaryRevision: number; | |
| } | |
| export interface AgentPlanReceiptRead { | |
| reference: RecoveryRef; | |
| } | |
| export interface AgentGoalRead { | |
| sessionId: string; | |
| } | |
| export interface AgentGoalView { | |
| enabled: boolean; | |
| current?: AgentGoalDetail | null; | |
| } | |
| export interface AgentGoalDetail { | |
| id: string; | |
| revision: number; | |
| objective: string; | |
| status: GoalStatus; | |
| iterations: number; | |
| maxIterations: number; | |
| tokenBudget?: number | null; | |
| consumed: GoalMeter; | |
| pending: boolean; | |
| report?: GoalReport | null; | |
| note: string; | |
| } | |
| export interface GoalMeter { | |
| known: number; | |
| missing: number; | |
| [k: string]: unknown | undefined; | |
| } | |
| export interface GoalReport { | |
| status: GoalReportKind; | |
| note: string; | |
| } | |
| export interface AgentGoalApproval { | |
| target: AgentScheduledTarget; | |
| model: ModelSelection; | |
| thinkingLevel?: ThinkingLevel | null; | |
| } | |
| export interface AgentGoalReceiptRead { | |
| reference: RecoveryRef; | |
| } | |
| export interface AgentChecklistRead { | |
| sessionId: string; | |
| offset?: number; | |
| } | |
| export interface AgentChecklist { | |
| enabled: boolean; | |
| revision?: number | null; | |
| total: number; | |
| completed: number; | |
| current?: AgentTodoItem | null; | |
| offset: number; | |
| /** | |
| * @maxItems 20 | |
| */ | |
| items: | |
| | [] | |
| | [AgentTodoItem] | |
| | [AgentTodoItem, AgentTodoItem] | |
| | [AgentTodoItem, AgentTodoItem, AgentTodoItem] | |
| | [AgentTodoItem, AgentTodoItem, AgentTodoItem, AgentTodoItem] | |
| | [AgentTodoItem, AgentTodoItem, AgentTodoItem, AgentTodoItem, AgentTodoItem] | |
| | [AgentTodoItem, AgentTodoItem, AgentTodoItem, AgentTodoItem, AgentTodoItem, AgentTodoItem] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ] | |
| | [ | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| AgentTodoItem, | |
| ]; | |
| nextOffset?: number | null; | |
| } | |
| export interface AgentTodoItem { | |
| content: string; | |
| status: AgentTodoStatus; | |
| } | |
| export interface AgentRecapRead { | |
| sessionId: string; | |
| operationId?: string | null; | |
| } | |
| export interface AgentRecapGenerate { | |
| sessionId: string; | |
| model: ModelSelection; | |
| } | |
| export interface AgentScheduledSummary { | |
| id: string; | |
| revision: number; | |
| title: string; | |
| status: Status; | |
| approved: boolean; | |
| nextFireAt?: number | null; | |
| pendingFire?: string | null; | |
| reminder: boolean; | |
| lastError?: string | null; | |
| } | |
| export interface AgentScheduledDetail { | |
| revision: number; | |
| task: Task; | |
| timezone: string; | |
| misfire: Misfire; | |
| approved: boolean; | |
| pendingFire?: string | null; | |
| } | |
| export interface Task { | |
| id: string; | |
| title: string; | |
| intent: Intent; | |
| schedule: Schedule; | |
| effect: AgentScheduledEffect; | |
| status: Status; | |
| nextFireAt?: number | null; | |
| lastFireAt?: number | null; | |
| fireCount: number; | |
| maxFires?: number | null; | |
| expiresAt?: number | null; | |
| createdBy: Creator; | |
| createdAt: number; | |
| updatedAt: number; | |
| runs: Run[]; | |
| lastError?: string | null; | |
| } | |
| export interface Run { | |
| id: string; | |
| at: number; | |
| outcome: Outcome; | |
| message: string; | |
| sessionId?: string | null; | |
| runId?: string | null; | |
| } | |
| export interface AgentScheduledInput { | |
| task: Create; | |
| timezone: string; | |
| misfire: Misfire; | |
| } | |
| export interface Create { | |
| title: string; | |
| intentBody: string; | |
| schedule: Schedule; | |
| effect: AgentScheduledEffect; | |
| maxFires?: number | null; | |
| expiresAt?: number | null; | |
| } | |
| export interface AgentScheduleAlerts { | |
| pending: number; | |
| reminders: AgentScheduledReminder[]; | |
| } | |
| export interface AgentScheduledReminder { | |
| taskId: string; | |
| fireId: string; | |
| title: string; | |
| body: string; | |
| } | |
| export interface RecallQuery { | |
| /** | |
| * @minItems 1 | |
| */ | |
| terms: [string, ...string[]]; | |
| question?: string | null; | |
| limit?: number | null; | |
| session_id?: string | null; | |
| since?: number | null; | |
| until?: number | null; | |
| } | |
| export interface AgentRecallPage { | |
| titles: AgentSession[]; | |
| passages: AgentRecallPassage[]; | |
| complete: boolean; | |
| gaps: string[]; | |
| } | |
| export interface AgentRecallPassage { | |
| session: AgentSession; | |
| anchorMessageId: string; | |
| anchorPosition: HistoryRowPosition; | |
| excerpt: string; | |
| matchedTerms: string[]; | |
| } | |
| /** | |
| * Disposable presentation locator, never authority or a canonical execution fact. | |
| * The source is the original emitting fact; the index precedes UI filtering. | |
| */ | |
| export interface HistoryRowPosition { | |
| sourceSequence: number; | |
| itemIndex: number; | |
| } | |
| export interface AgentImportSourceRef { | |
| id: string; | |
| revision: number; | |
| } | |
| export interface AgentImportQuery { | |
| text: string; | |
| includeArchived: boolean; | |
| cursor: string | null; | |
| } | |
| export interface AgentImportEntryRef { | |
| sessionId: string; | |
| path: string; | |
| } | |
| export interface AgentImportSource { | |
| id: string; | |
| name: string; | |
| location: AgentImportLocation; | |
| path: string; | |
| } | |
| export interface AgentImportEntry { | |
| id: string; | |
| path: string; | |
| title: string; | |
| cwd: string | null; | |
| updatedAt: number | null; | |
| archived: boolean; | |
| } | |
| export interface AgentImportPreview { | |
| selection: AgentImportSelection; | |
| title: string; | |
| cwd: string | null; | |
| records: number; | |
| bytes: number; | |
| incompleteTail: boolean; | |
| /** | |
| * @maxItems 8 | |
| */ | |
| items: | |
| | [] | |
| | [AgentImportPreviewItem] | |
| | [AgentImportPreviewItem, AgentImportPreviewItem] | |
| | [AgentImportPreviewItem, AgentImportPreviewItem, AgentImportPreviewItem] | |
| | [ | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| ] | |
| | [ | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| ] | |
| | [ | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| ] | |
| | [ | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| ] | |
| | [ | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| AgentImportPreviewItem, | |
| ]; | |
| next: number | null; | |
| } | |
| export interface AgentImportSelection { | |
| source: AgentImportSourceRef; | |
| entry: AgentImportEntryRef; | |
| digest: string; | |
| } | |
| export interface AgentImportPreviewItem { | |
| index: number; | |
| kind: AgentImportRecordKind; | |
| text: string; | |
| truncated: boolean; | |
| } | |
| export interface AgentProjectCursor { | |
| revision: string; | |
| after: string; | |
| } | |
| export interface AgentProject { | |
| reference: AgentProjectRef; | |
| name: string; | |
| archived: boolean; | |
| available: boolean; | |
| selection: AgentDirectorySelection | null; | |
| path: string | null; | |
| } | |
| export interface AgentProjectLocation { | |
| selection: AgentDirectorySelection; | |
| path: string; | |
| name: string; | |
| project: AgentProject | null; | |
| } | |
| export interface AgentFork { | |
| sessionId: string; | |
| expectedRevision: number; | |
| /** | |
| * Include history through a complete logical Turn, or all current history when null. | |
| */ | |
| turnId: string | null; | |
| title: string; | |
| labels: string[]; | |
| } | |
| export interface AgentForkReceipt { | |
| /** | |
| * The complete original fork operation reference, including its fingerprint. | |
| */ | |
| reference: RecoveryRef; | |
| } | |
| export interface AgentForkReceiptResult { | |
| /** | |
| * A currently readable published fork. Null neither proves no effect nor | |
| * authorizes replacing or redispatching the original operation. | |
| */ | |
| session: AgentSession | null; | |
| } | |
| export interface AgentDirectory { | |
| name: string; | |
| path: string; | |
| selection: AgentDirectorySelection; | |
| } | |
| export interface AgentMetadata { | |
| /** | |
| * Changing collaboration is only allowed while the Session is idle. | |
| */ | |
| collaborationMode?: CollaborationMode | null; | |
| /** | |
| * Omission leaves the permission boundary and its approvals unchanged. | |
| */ | |
| permissions?: AgentPermissionChange | null; | |
| sessionId: string; | |
| expectedRevision: number; | |
| title: string; | |
| labels: string[]; | |
| } | |
| export interface AgentPermissionChange { | |
| settings: AgentWorkspacePermissions; | |
| /** | |
| * Invalidate additive approvals even when the base policy is unchanged. | |
| */ | |
| revokeGrants: boolean; | |
| } | |
| export interface AgentSelectBackend { | |
| sessionId: string; | |
| backend: AgentBackendPreference; | |
| } | |
| export interface AgentChangeSession { | |
| sessionId: string; | |
| expectedRevision: number; | |
| action: AgentSessionAction; | |
| } | |
| export interface AgentSend { | |
| /** | |
| * IDs of immutable user uploads in this Session; metadata is resolved by the owner. | |
| */ | |
| attachments?: string[]; | |
| model: ModelSelection; | |
| /** | |
| * Omission/null uses the configured model default; `off` is explicit. | |
| */ | |
| thinkingLevel?: ThinkingLevel | null; | |
| sessionId: string; | |
| message: string; | |
| } | |
| export interface AgentStop { | |
| sessionId: string; | |
| invocationId: string; | |
| } | |
| export interface AgentExecutionRead { | |
| sessionId: string; | |
| invocationId: string; | |
| } | |
| export interface AgentResume { | |
| sessionId: string; | |
| sourceInvocationId: string; | |
| /** | |
| * Exact Run-local count returned by execution. | |
| */ | |
| sourceHighWater: number; | |
| /** | |
| * Explicit model selection for this new continuation; original input is replayed. | |
| */ | |
| model: ModelSelection; | |
| thinkingLevel?: ThinkingLevel | null; | |
| } | |
| export interface AgentUploadAttachment { | |
| sessionId: string; | |
| name: string; | |
| bytes: number; | |
| digest: string; | |
| } | |
| export interface AgentAttachment { | |
| sessionId: string; | |
| id: string; | |
| name: string; | |
| mimeType: string; | |
| bytes: number; | |
| } | |
| export interface AgentMarkRead { | |
| sessionId: string; | |
| messageId: string; | |
| } | |
| export interface AgentWatch { | |
| sessionId: string; | |
| after: number; | |
| } | |
| export interface AgentPendingInteractions { | |
| revision: number; | |
| entries: AgentInteractionSummary[]; | |
| } | |
| export interface AgentInteractionSummary { | |
| requestId: string; | |
| kind: AgentInteractionKind; | |
| toolUseId: string | null; | |
| } | |
| export interface AgentInteractionRead { | |
| sessionId: string; | |
| requestId: string; | |
| } | |
| export interface AgentInteractionRespond { | |
| sessionId: string; | |
| requestId: string; | |
| answer: InteractionAnswer; | |
| } | |
| export interface InteractionRecord { | |
| sessionId: string; | |
| turnId: string; | |
| runId: string; | |
| requestId: string; | |
| createdAt: number; | |
| request: InteractionRequest; | |
| outcome: InteractionOutcome | null; | |
| } | |
| /** | |
| * The Host supplies the real operation description; it is display information, | |
| * not authority inferred from a command string or a plugin-supplied Session ID. | |
| */ | |
| export interface PermissionRequest { | |
| reason: string; | |
| command?: PermissionCommand | null; | |
| permissions: Permissions; | |
| } | |
| export interface PermissionCommand { | |
| command: string; | |
| cwd: string; | |
| } | |
| export interface InteractionQuestion { | |
| question: string; | |
| /** | |
| * @minItems 2 | |
| * @maxItems 3 | |
| */ | |
| options: [QuestionOption, QuestionOption] | [QuestionOption, QuestionOption, QuestionOption]; | |
| } | |
| export interface QuestionOption { | |
| label: string; | |
| description?: string; | |
| } | |
| export interface FormRequester { | |
| name: string; | |
| source?: string | null; | |
| } | |
| export interface FormOption { | |
| value: string; | |
| label: string; | |
| } | |
| export interface GrantTarget { | |
| providerId: string; | |
| contractId: string; | |
| serverId: string; | |
| toolName: string; | |
| capability: GrantCapability; | |
| scope: GrantScope; | |
| [k: string]: unknown | undefined; | |
| } | |
| export interface QuestionAsk { | |
| /** | |
| * @minItems 1 | |
| * @maxItems 3 | |
| */ | |
| questions: | |
| | [InteractionQuestion] | |
| | [InteractionQuestion, InteractionQuestion] | |
| | [InteractionQuestion, InteractionQuestion, InteractionQuestion]; | |
| } | |
| export interface FormAsk { | |
| message: string; | |
| fields: FormField[]; | |
| } | |
| /** | |
| * Immutable installation ceiling selected by trusted native composition. | |
| */ | |
| export interface WorkspaceProcessConfiguration { | |
| /** | |
| * Allow the selected native Session's verified owned worktree, within its | |
| * own access policy. Other Host-private paths remain denied. | |
| */ | |
| isolatedWorkspaces?: boolean; | |
| filesystem: Policy; | |
| network: Network; | |
| /** | |
| * Trusted CLI supporting the original platform sandbox bootstrap. | |
| */ | |
| helper?: string | null; | |
| /** | |
| * Explicit directory for application setup processes. Launch still needs | |
| * its own grant and uses only the installation filesystem/network ceiling. | |
| */ | |
| setupDirectory?: string | null; | |
| /** | |
| * Trusted Agent Session owner in this Root/deployment. This selects a data | |
| * namespace only; Terminal endpoints still require their own explicit grants. | |
| */ | |
| sessionOwner?: InstanceId | null; | |
| /** | |
| * Explicit data namespace of the selected Session owner. | |
| */ | |
| sessionKind?: WorkspaceProcessSessionKind & string; | |
| } | |
| /** | |
| * Longest path wins; at the same path exact wins over subtree, then deny wins | |
| * over write over read. Deny globs are absolute and cannot be reopened by paths. | |
| * Matching directories deny their descendants. | |
| * Host file operations match at access time. Linux and Windows subprocesses | |
| * snapshot existing glob matches during preparation; macOS enforces them live. | |
| * Empty restricted policy denies all access, rather than falling back to defaults. | |
| */ | |
| export interface Policy { | |
| default: Access; | |
| rules: Rule[]; | |
| denyGlobs: string[]; | |
| } | |
| export interface WorkspacePath { | |
| bytesBase64: string; | |
| } | |
| export interface AgentContextRead { | |
| sessionId: string; | |
| /** | |
| * Null captures the committed head; a supplied fence must not exceed it. | |
| */ | |
| through: number | null; | |
| } | |
| export interface AgentContextReport { | |
| through: number; | |
| /** | |
| * Latest Main request made by this Session, excluding copied source requests. | |
| */ | |
| request: AgentContextRequest | null; | |
| } | |
| export interface AgentContextRequest { | |
| invocationId: string; | |
| stepId: string; | |
| sequence: number; | |
| /** | |
| * Original request timestamp in milliseconds since the Unix epoch. | |
| */ | |
| recordedAt: number; | |
| /** | |
| * Original input history fence, before this request was recorded. | |
| */ | |
| sourceThrough: number; | |
| modelId: string; | |
| contextWindow: number | null; | |
| inputLimit: number | null; | |
| state: AgentContextRequestState; | |
| /** | |
| * Original Host prepared-input measurements, not provider wire sizes or exact tokenization. | |
| */ | |
| breakdown: PreparedContextBreakdown | null; | |
| /** | |
| * Provider-reported input tokens from this exact completed step, if available. | |
| */ | |
| reportedInputTokens: number | null; | |
| } | |
| /** | |
| * Host-prepared adapter input, not provider tokenization or HTTP wire bytes. | |
| */ | |
| export interface PreparedContextBreakdown { | |
| system: ContextBucket; | |
| user: ContextBucket; | |
| assistant: ContextBucket; | |
| /** | |
| * Messages with the tool role; assistant-embedded results stay in assistant. | |
| */ | |
| tool: ContextBucket; | |
| toolSchemas: ContextBucket; | |
| counts: ContextCounts; | |
| } | |
| export interface ContextBucket { | |
| /** | |
| * UTF-8 text and compact JSON payload bytes counted by the Host heuristic. | |
| * Excludes file encodings, message metadata, request-level provider options | |
| * and synthetic framing overhead. Tool definitions are counted in full. | |
| */ | |
| contentBytes: number; | |
| /** | |
| * Heuristic: separately rounded text/JSON bytes / 3, plus message/tool | |
| * framing and 1024 per media part. Never provider-measured tokens. | |
| */ | |
| estimatedTokens: number; | |
| } | |
| export interface ContextCounts { | |
| messages: number; | |
| media: number; | |
| toolCalls: number; | |
| /** | |
| * Result parts across both tool and assistant roles. | |
| */ | |
| toolResults: number; | |
| tools: number; | |
| } | |
| export interface AgentFileListRead { | |
| sessionId: string; | |
| path: WorkspacePath | null; | |
| after: AgentFileCursor | null; | |
| } | |
| export interface AgentFileCursor { | |
| directoryIdentity: string; | |
| after: WorkspacePath; | |
| } | |
| export interface AgentFileWatch { | |
| sessionId: string; | |
| path: WorkspacePath | null; | |
| } | |
| export interface AgentFilePage { | |
| directoryIdentity: string; | |
| entries: AgentFileEntry[]; | |
| next: AgentFileCursor | null; | |
| } | |
| export interface AgentFileEntry { | |
| path: WorkspacePath; | |
| kind: AgentFileKind; | |
| } | |
| export interface GitStatusEntry { | |
| area: GitArea; | |
| path: WorkspacePath; | |
| kind: GitChangeKind; | |
| } | |
| export interface GitStatus { | |
| head: string | null; | |
| entries: GitStatusEntry[]; | |
| } | |
| export interface AgentGitDiffRead { | |
| sessionId: string; | |
| area: GitArea; | |
| path: WorkspacePath; | |
| } | |
| export interface TerminalList { | |
| sessionId: string; | |
| offset?: number; | |
| } | |
| export interface TerminalTarget { | |
| sessionId: string; | |
| ref: string; | |
| } | |
| /** | |
| * Exclusive cursor in this original target's native Data/Resize log. A Data | |
| * delivery can combine adjacent records; its sequence is the last consumed | |
| * native record. Any original cursor remains valid, including inside a batch. | |
| */ | |
| export interface TerminalOutputRequest { | |
| target: TerminalTarget; | |
| after?: number; | |
| } | |
| export interface TerminalStart { | |
| sessionId: string; | |
| /** | |
| * Omit for an interactive shell; an explicit command runs with bounded pipes. | |
| */ | |
| command?: string | null; | |
| size?: TerminalSize | null; | |
| } | |
| export interface TerminalController { | |
| target: TerminalTarget; | |
| controllerId: string; | |
| } | |
| export interface TerminalControl { | |
| controller: TerminalController; | |
| sequence: number; | |
| actions?: RawAction[]; | |
| size?: TerminalSize | null; | |
| } | |
| export interface TerminalPage { | |
| resources: ResourceUpdate[]; | |
| revision: string; | |
| total: number; | |
| nextOffset?: number | null; | |
| } | |
| export interface ResourceUpdate { | |
| sessionId: string; | |
| ownership: Ownership; | |
| sourceTurnId: string; | |
| sourceToolCallId: string; | |
| result: ShellSnapshot; | |
| } | |
| export interface ShellSnapshot { | |
| kind: SnapshotKind; | |
| ref: string; | |
| mode: ShellMode; | |
| status: ShellStatus; | |
| cwd: string; | |
| cmd: string; | |
| startedAt: number; | |
| updatedAt: number; | |
| completedAt?: number; | |
| timeoutMs?: number; | |
| exitCode?: number; | |
| failureMessage?: string; | |
| revision: number; | |
| output?: ShellOutput; | |
| } | |
| export interface TerminalLeaseUpdate { | |
| controllerId: string; | |
| nextSequence?: number | null; | |
| held: boolean; | |
| resource: ResourceUpdate; | |
| } | |
| export interface TerminalControlReceipt { | |
| controllerId: string; | |
| sequence: number; | |
| acceptedBytes: number; | |
| resized: boolean; | |
| resizeChanged: boolean; | |
| } | |
| export interface TerminalReleased { | |
| controllerId: string; | |
| released: boolean; | |
| } | |
| export interface TerminalStopped { | |
| applied: boolean; | |
| resource: ResourceUpdate; | |
| } | |
| export interface QuestionResponse { | |
| question: string; | |
| answer: string | null; | |
| } | |
| export interface AgentSessionPage { | |
| revision: string; | |
| needsYouCount: number; | |
| /** | |
| * @maxItems 32 | |
| */ | |
| sessions: AgentSession[]; | |
| before: string | null; | |
| after: string | null; | |
| } | |
| export interface AgentDelivery { | |
| sequence: number; | |
| invocationId: string; | |
| turnId: string; | |
| fact: AgentDeliveryFact; | |
| } | |
| export interface AgentObservation { | |
| session: AgentSession; | |
| compacting?: boolean; | |
| rememberedBackend?: AgentBackendPreference | null; | |
| metrics?: AgentSessionMetrics | null; | |
| through: number; | |
| run?: AgentRun | null; | |
| parts: AgentPart[]; | |
| /** | |
| * Replay starts for active tool display, read at the same fence as the run. | |
| */ | |
| toolSeeds: AgentToolSeed[]; | |
| } | |
| /** | |
| * Display-only readings from the latest completed main-model request. | |
| */ | |
| export interface AgentSessionMetrics { | |
| modelId: string; | |
| connectionId?: string | null; | |
| contextTokens?: number | null; | |
| contextWindow?: number | null; | |
| approximate: boolean; | |
| /** | |
| * The context count is the last completed request's baseline; newer additions are unknown. | |
| */ | |
| contextLastKnown: boolean; | |
| /** | |
| * Provider output tokens divided by the model request's wall time. | |
| * Includes reasoning and time to first token; excludes tool/user waits. | |
| */ | |
| outputTokensPerSecond?: number | null; | |
| } | |
| export interface AgentRun { | |
| invocationId: string; | |
| turnId: string; | |
| state: AgentRunState; | |
| } | |
| export interface AgentPart { | |
| startSequence: number; | |
| messageId: string; | |
| stepId: string; | |
| partId: string; | |
| textKind: AgentContentKind; | |
| } | |
| export interface AgentToolSeed { | |
| toolUseId: string; | |
| startSequence: number; | |
| } | |
| export interface AgentDiagnostics { | |
| sessionId: string; | |
| position: AgentDiagnosticPosition; | |
| } | |
| export interface AgentDiagnosticPage { | |
| through: number; | |
| entries: AgentDiagnostic[]; | |
| nextBefore?: number | null; | |
| } | |
| export interface AgentDiagnostic { | |
| sequence: number; | |
| eventId: string; | |
| recordedAt: number; | |
| detail: DiagnosticDetail; | |
| } | |
| export interface AgentDiagnosticChange { | |
| /** | |
| * Latest diagnostic event sequence, independently of transcript progress. | |
| */ | |
| revision: number; | |
| } | |
| export interface AgentSessionRead { | |
| sessionId: string; | |
| } | |
| export interface AgentHistoryRead { | |
| sessionId: string; | |
| through?: number | null; | |
| position: HistoryPosition; | |
| includeThinking?: boolean; | |
| view?: HistoryView & string; | |
| } | |
| /** | |
| * Byte offset in one message field's UTF-8 text, not a bearer capability. | |
| */ | |
| export interface Cursor { | |
| field?: HistoryField & string; | |
| position: HistoryRowPosition; | |
| offset: number; | |
| } | |
| export interface AgentHistoryLandmarksRead { | |
| sessionId: string; | |
| through: number; | |
| } | |
| /** | |
| * Sampled canonical display positions, not a complete Turn outline or an | |
| * execution grant. | |
| */ | |
| export interface AgentHistoryLandmarks { | |
| through: number; | |
| /** | |
| * @maxItems 64 | |
| */ | |
| landmarks: AgentHistoryLandmark[]; | |
| } | |
| export interface AgentHistoryLandmark { | |
| turnId: string; | |
| position: HistoryRowPosition; | |
| lastPosition: HistoryRowPosition; | |
| label: string; | |
| } | |
| export interface AgentHistoryPromptRead { | |
| sessionId: string; | |
| through: number; | |
| position: HistoryRowPosition; | |
| } | |
| /** | |
| * A bounded presentation preview; the original message remains in history. | |
| */ | |
| export interface AgentHistoryPrompt { | |
| position: HistoryRowPosition; | |
| text: string; | |
| } | |
| export interface AgentQueue { | |
| revision: number; | |
| entries: AgentQueueEntry[]; | |
| } | |
| export interface AgentQueueEntry { | |
| origin?: MessageOrigin | null; | |
| messageId: string; | |
| kind: AgentQueueKind; | |
| preview: string; | |
| } | |
| export interface AgentQueueMessage { | |
| sessionId: string; | |
| messageId: string; | |
| expectedRevision: number; | |
| } | |
| export interface AgentQueueMutation { | |
| sessionId: string; | |
| expectedRevision: number; | |
| edit: AgentQueueAction; | |
| } | |
| export interface AgentHistoryChunk { | |
| /** | |
| * Part of the successfully completed native Turn's final output at `through`. | |
| * Includes all body parts and source citations; never a Thinking field. | |
| */ | |
| finalOutput?: boolean; | |
| model?: HistoryModel | null; | |
| origin?: MessageOrigin | null; | |
| compaction?: HistoryCompaction | null; | |
| /** | |
| * Display metadata only, on the first user-message fragment; no storage capability. | |
| */ | |
| attachments?: AgentHistoryAttachment[]; | |
| timing?: HistoryTurnTiming | null; | |
| field: HistoryField; | |
| messageId: string; | |
| turnId: string; | |
| timestamp: number; | |
| role: Role; | |
| position: HistoryRowPosition; | |
| offset: number; | |
| totalBytes: number; | |
| text: string; | |
| tool: HistoryTool | null; | |
| } | |
| /** | |
| * Duration of a successfully adopted context checkpoint, in recorded milliseconds. | |
| */ | |
| export interface HistoryCompaction { | |
| durationMs: number; | |
| } | |
| export interface AgentHistoryAttachment { | |
| name: string; | |
| mimeType: string; | |
| bytes: number; | |
| kind: AttachmentKind; | |
| } | |
| /** | |
| * Recorded logical Turn boundaries at the same history fence. An unfinished | |
| * historical boundary alone does not establish that execution is still live. | |
| */ | |
| export interface HistoryTurnTiming { | |
| startedAt: number; | |
| finished: HistoryTurnFinished | null; | |
| } | |
| export interface HistoryTurnFinished { | |
| at: number; | |
| outcome: HistoryTurnOutcome; | |
| } | |
| /** | |
| * Canonical references at the requested fence, never execution authority. | |
| * Both references are present only for a unique same-Turn call/result pair | |
| * with matching origin and parentage. An unpaired row retains its own reference. | |
| */ | |
| export interface HistoryTool { | |
| toolUseId: string; | |
| call: HistoryToolCall | null; | |
| result: HistoryToolResult | null; | |
| } | |
| export interface HistoryToolCall { | |
| /** | |
| * Recorded ancestors in this Turn, nearest first; display references only. | |
| */ | |
| ancestorToolUseIds: string[]; | |
| /** | |
| * Opaque display contract captured at dispatch; no execution authority. | |
| */ | |
| presentation?: string | null; | |
| position: HistoryRowPosition; | |
| name: string; | |
| title: DisplayText | null; | |
| /** | |
| * This native Turn is still open at the history fence; not execution authority. | |
| */ | |
| pending: boolean; | |
| /** | |
| * A unique original Host dispatch is recorded at this fence; not liveness. | |
| */ | |
| dispatched: boolean; | |
| } | |
| export interface HistoryToolResult { | |
| settlement: ToolSettlement | null; | |
| position: HistoryRowPosition; | |
| /** | |
| * Does not distinguish failed from unknown effects. | |
| */ | |
| isError: boolean; | |
| /** | |
| * Canonical content is an image; this does not grant artifact reads. | |
| */ | |
| image: boolean; | |
| } | |
| export interface AgentHistorySearch { | |
| sessionId: string; | |
| /** | |
| * Original raw-event fence, shared with history reads. | |
| */ | |
| through: number; | |
| /** | |
| * Exclusive transcript-row position; null starts a scan. | |
| */ | |
| after?: HistoryRowPosition | null; | |
| /** | |
| * Literal query; no normalization. | |
| */ | |
| query: string; | |
| /** | |
| * False uses Unicode simple case folding, without locale or multi-character folding. | |
| */ | |
| caseSensitive: boolean; | |
| /** | |
| * Require no adjacent Unicode word character (Alphabetic, marks, decimal | |
| * digits, connector punctuation or join controls); not dictionary segmentation. | |
| */ | |
| wholeWord: boolean; | |
| includeInternal: boolean; | |
| } | |
| export interface AgentHistoryMatch { | |
| /** | |
| * Exact canonical field to read through the source query; history body may omit it. | |
| */ | |
| field: SourceField; | |
| /** | |
| * Exact transcript row. Open with HistoryPosition::Row at the same raw-event | |
| * fence: Thinking for a thinking match, Body for every other source field. | |
| */ | |
| position: HistoryRowPosition; | |
| preview: string; | |
| } | |
| export interface AgentHistorySourceRead { | |
| sessionId: string; | |
| through: number; | |
| source: AgentHistorySourceReference; | |
| field: SourceField; | |
| /** | |
| * Optional JSON keys/array indices within arguments, result or receipt. | |
| */ | |
| path?: HistorySourceSegment[] | null; | |
| position: SourcePosition; | |
| } | |
| /** | |
| * One literal UTF-8 excerpt of an immutable field. JSON excerpts need not be | |
| * standalone JSON. Image descriptors carry no artifact read authorization. | |
| */ | |
| export interface HistorySource { | |
| model?: HistoryModel | null; | |
| origin?: MessageOrigin | null; | |
| position: HistoryRowPosition; | |
| /** | |
| * Host-recorded milliseconds of this immutable row; not a client clock. | |
| */ | |
| timestamp: number; | |
| role: HistorySourceRole; | |
| /** | |
| * Readable canonical fields of this same immutable row, in display order. | |
| * | |
| * @minItems 1 | |
| * @maxItems 7 | |
| */ | |
| fields: | |
| | [SourceField] | |
| | [SourceField, SourceField] | |
| | [SourceField, SourceField, SourceField] | |
| | [SourceField, SourceField, SourceField, SourceField] | |
| | [SourceField, SourceField, SourceField, SourceField, SourceField] | |
| | [SourceField, SourceField, SourceField, SourceField, SourceField, SourceField] | |
| | [SourceField, SourceField, SourceField, SourceField, SourceField, SourceField, SourceField]; | |
| field: SourceField; | |
| /** | |
| * Omission reads the encoded field. A selected JSON string is literal text. | |
| */ | |
| path?: HistorySourceSegment[] | null; | |
| format: SourceFormat; | |
| offset: number; | |
| totalBytes: number; | |
| text: string; | |
| tool: HistoryTool | null; | |
| } | |
| export interface AgentToolImageRead { | |
| sessionId: string; | |
| through: number; | |
| position: HistoryRowPosition; | |
| offset: number; | |
| } | |
| export interface AgentAttachmentImageRead { | |
| sessionId: string; | |
| source: AgentAttachmentImageSource; | |
| offset: number; | |
| } | |
| /** | |
| * A stable raw-event fence prevents a window from chasing appended messages. | |
| */ | |
| export interface Read { | |
| sessionId: string; | |
| through?: number | null; | |
| position: HistoryPosition; | |
| includeThinking?: boolean; | |
| } | |
| export interface HostActivation { | |
| contract: Contract; | |
| service: string[]; | |
| } | |
| /** | |
| * Actual callback observation. Neither the source nor receipt is a grant. | |
| */ | |
| export interface HostObservation { | |
| source: Identity2; | |
| operation?: RecoveryRef | null; | |
| } | |
| export interface OperationObservation { | |
| reference: RecoveryRef; | |
| outcome: OperationOutcome; | |
| cleanup: OperationCleanup; | |
| } | |
| export interface ResourceMetadata { | |
| type: ResourceType; | |
| bytes: number; | |
| metadata: unknown; | |
| } | |
| /** | |
| * Complete source-to-readable-text conversion using the presenter's Markdown semantics. | |
| */ | |
| export interface MarkdownTextInput { | |
| source: string; | |
| } |