@modular/sdk
511 exports in 5 groups.
Interfaces251
- AgentinterfaceA declared agent, as returned by agent.
- AgentInputinterfaceWhat agent needs to describe an agent.
- AiAgentHandleinterfaceid, config(), metadata(), run(), spawn()
- AiAgentMetadatainterfacedescription, id, model, name, tools
- AiAgentsApiinterfacefind(), get(), list(), observe()
- AiAsyncIterableStreaminterfacecancel()
- AiAttachmentBaseinterfacedisplayKind, label
- AiBinaryAttachmentinterfacecontentType, data, displayKind, kind, label
- AiErrorSignalinterfacekind, message
- AiHookRunSignalinterfacehookType, kind, status, stopReason, systemMessage, toolName, turnId
- AiInputRequestSignalinterfacekind, prompt, requestId, turnId
- AiModelInfointerfaceid, name, vendor
- AiModelsApiinterfacelist()
- AiNotificationMessageinterfaceA system event delivered into a session.
- AiPendingConfirmationSignalinterfacecallId, kind, message, title, turnId
- AiPromptMessageinterfaceA prompt for the model to act on.
- AiReasoningSignalinterfacekind, text
- AiResourceAttachmentinterfacecontentType, displayKind, kind, label, uri
- AiRunResultinterfaceThe finished answer from AiSessionHandle.run.
- AiRuntimeApiinterfaceThe AI surface available to a mod: one-shot questions, durable sessions, declared agents, model routes, and transcription.
- AiSendOptionsinterfaceExtra input for a single prompt.
- AiSessionConfiginterfaceOverrides applied when creating a session.
- AiSessionForkConfiginterfaceforeground, metadata
- AiSessionHandleinterfaceA live handle to one durable AI session. A session owns a conversation: its history, its model, its working directory, and its place in the session tree.
- AiSessionMetadatainterfaceid, isArchived, lineage, metadata, model, resource, status, title, updatedAt, workingDirectory
- AiSessionsApiinterfaceThe workspace's session catalog: create sessions, look them up, and manage their lifecycle. Reach for this when you need a session that is not the one you are running in.
- AiStreamTranscriptionRequestinterfaceaudio, model, options, signal
- AiStreamTranscriptionResultinterfacefinal, fullStream, segments, text, cancel(), stop()
- AiTextAttachmentinterfacedisplayKind, kind, label, modelRepresentation
- AiTextDeltaSignalinterfacekind, text
- AiToolCallCompleteSignalinterfacecallId, kind, ok, turnId
- AiToolCallStartSignalinterfacecallId, kind, toolName, turnId
- AiToolDeclarationinterfacedescription, inputSchema, name
- AiToolInputSchemainterface$id, $schema, additionalProperties, default, description, enum, format, id, items, properties, required, title, type
- AiToolOutputinterfacecontent, mimeType
- AiToolResultinterfaceoutput, text
- AiTranscriptionApiinterfaceproviders, stream()
- AiTranscriptionProvidersApiinterfacelist()
- AiTurnCancelledSignalinterfacekind, turnId
- AiTurnCompleteSignalinterfacekind, turnId
- AiTurnHandleinterfaceA handle to one in-flight or finished turn. Returned by AiSessionHandle.send when you need to watch a turn as it runs or cancel it.
- AiViewApiinterfaceThe AI surface available to a mod: one-shot questions, durable sessions, declared agents, model routes, and transcription.
- AiViewToolsApiinterfaceregister()
- AuthConfigurationinterfaceRead-only view of user settings, for the parts of a sign-in flow the user configures: a tenant, a host name, a port.
- AuthenticationAccountinterfaceid, label
- AuthenticationSessioninterfaceaccessToken, account, id, scopes
- AuthGetSessionOptionsinterfacecreateIfNone
- AuthInputRequestinterfaceOne question to put to the user during sign-in.
- AuthPromptinterfaceAsks the user for a value during sign-in.
- AuthProviderinterfaceAn authentication provider a mod contributes, as returned by authProvider.
- AuthProviderContextinterfaceWhat a provider's three callbacks are handed to do their work.
- AuthProviderSessionOptionsinterfaceNarrows a session lookup to one account when the user has several signed in.
- AuthViewApiinterfacegetSession()
- BeforeActionHookinterfaceaction, id, kind, title, when
- BeforeActionHookInputinterfaceWhat hook.beforeAction needs in order to declare an interception.
- CanvasElementinterfacedescription, id, kind, module, name, tag, tool
- CanvasTemplateinterfaceelement, group, icon, id, kind, label, order
- CanvasTemplateElementinterfaceattrs, content, tag
- CanvasToolDeclarationinterfacegroup, icon, label, order
- CheckContextinterfaceWhat a check body gets to inspect the half-built mod with. Deliberately narrow.
- CheckDeclarationinterfacekind, name, run
- Commandinterfacecategory, id, kind, run, title, when
- CommandExecuteInputinterfaceargs, commandId
- CommandExecuteResultinterfacekind, value
- CommandInvocationinterfaceThe call that started the current command run.
- CommandInvokeInputinterfaceargs
- CommandsViewApiinterfaceRuns a registered command by id, including commands the host and other mods own. This is the escape hatch for behaviour that has no host action behind it. The command id and its arguments are untyped, so when an action exists for what you want, `ctx.action(...)` is the better call: it checks the input and the result against the action's schema.
- ComponentViewinterfacecomponent, container, icon, id, kind, persistent, title, when
- ConditioninterfaceA named yes/no rule the host re-evaluates as state changes. Pass one to a command's or keybinding's `when` to control whether it is enabled and visible.
- ConditionContextinterfaceWhat a predicate is allowed to look at. Reads only.
- ConditionContributionDescriptorinterfaceHow a condition appears in a mod's manifest once the host has folded it. Produced by the build, not written by authors.
- ConditionInputinterfaceFields accepted by condition.
- ContextBaseinterfaceEverything every handler in a mod can reach. The shape is a split: state and events are how you read the app, actions are how you change it.
- ControlledTerminalinterfaceA borrowed terminal with explicit input and presentation authority.
- Disposableinterfacedispose()
- EditorApiinterfaceactiveDocumentTarget(), document(), insertNodeAtActiveSelection(), streamText()
- EditorExtensioninterfacedescription, exportName, id, module, name
- EditorSelectionChangedEventinterfacechangedAt, current, previous
- EditorTextStreaminterfacefinal, cancel(), dispose()
- EditorTextStreamInputinterfaceparts, placement, signal, target
- Effectinterfacebody, id, kind, title
- EffectContextinterfaceEverything every handler in a mod can reach. The shape is a split: state and events are how you read the app, actions are how you change it.
- EffectMetadatainterfaceid, title
- EventinterfaceAn event your mod publishes, declared at author time. This is the declaration, not an occurrence.
- EventEmitInputinterfaceeventId, payload
- EventEmitResultinterfaceeventId, kind
- EventInputinterfaceFields accepted by event. `sensitivity` defaults to `private`.
- EventOccurrenceinterfaceOne delivery of an event to your listener. Dispatch through `occurrence.action(...)` rather than `ctx.action(...)` when you react to an event.
- HostActionAbortSignalinterfaceaborted, reason, addEventListener(), removeEventListener()
- HostActionBlockReasoninterfacecode, message
- HostActionClientRunOptionsinterfacesignal
- HostActionDescriptorDtointerfaceWhat `ctx.describeAction(...)` returns: an action's title, parameters, and stability, keyed by its canonical id.
- HostActionDidCommitEventinterfaceaction, actionId, afterRevision, beforeRevision, completedAt, result, traceId
- HostActionEnvelopeDtointerfaceactionId, actor, id, parentActionId, parentSpanId, scope, source, startedAt, traceId, workflowId
- HostActionInterceptorRegistrationSnapshotinterfaceactionId, activationOrdinal, actor, hook, id, phase, priority, registrationOrdinal, scope, source
- HostActionParameterDtointerfacedescription, name, optional, schema
- HostActionRunnerinterfaceDispatches actions from inside an interceptor, where `ctx.action(...)` of the outer context is not in reach.
- HostActionSchemaDtointerfacename, schema
- HostActionTraceinterfaceactionId, actionRunId, actor, descriptor, events, id, parentSpanId, scope, source, workflowId
- HostClipboardCapabilitiesinterfaceClipboard writes available to an interceptor.
- HostContextinterfaceThe context for code the host runs inside the renderer itself: editor extensions, canvas elements, and React UI reached through `useMod()`. It carries the same capabilities as a view minus the panel.
- HostEventCapabilitiesinterfaceCommit notifications available to an interceptor.
- HostEventDescriptorDtointerfaceWhat `ctx.describeEvent(...)` returns: the shape and documentation of one host event.
- HostHookClientinterfaceRegisters interceptors at runtime. Use this when the decision needs code.
- HostTraceContextinterfaceThe trace the current action is being recorded under.
- KeybindinginterfaceA keyboard shortcut bound to one command.
- KeybindingInputinterfaceFields accepted by keybinding.
- LoggerinterfaceYour mod's log channel in the host. Use it instead of `console`, which is forbidden at module top level.
- MediaApiinterfacecapture(), listSources(), mixAudio(), observeAudioLevel()
- MediaAudioMixRequestinterfacegain, input, onEnd
- MediaCaptureOperationinterfaceresult, state, cancel(), subscribe()
- MediaCaptureRequestinterfaceaudio, signal, video
- MediaCaptureSessioninterfaceaudioTracks, id, state, videoTracks, audio(), cancel(), record(), stop(), subscribe()
- MediaRecordinginterfaceid, snapshot, cancel(), stop()
- MediaSourceListRequestinterfacekinds, signal
- Modinterfaceagents, auth, canvas, checks, commands, conditions, editor, effects, events, hooks, keybindings, metadata, prompts, state, system, theme, tools, ui, views, walkthroughs, widgets
- ModBugsinterfaceemail, url
- ModMetadatainterfacebugs, categories, description, displayName, homepage, icon, keywords, license, preview, repository
- ModRepositoryinterfacetype, url
- ModularActionDescriptorDtointerfacedefaultScope, effects, id, input, owner, parameters, result, stability, title
- ModularActionMapinterfaceThe catalog of host owned actions, each mapped to its input and result shapes.
- ModularEventDescriptorDtointerfaceid, owner, schema, sensitivity, stability
- ModularEventMapinterfaceeditor.selectionChanged, host.action.didCommit, multiplayer.presenceChanged
- ModularThemeinterfacetokens
- OwnedTerminalinterfaceA terminal owned by the current mod.
- PermissionClientinterfaceReads what the user has granted, denied, and is being asked right now. This is an observation surface.
- PermissionDecisionRecordDtointerfacecapability, createdAt, decision, grantId, id, powers, reason, requestId, scope, subject, target
- PermissionGrantDtointerfacecapability, createdAt, decision, declarationHash, duration, expiresAt, id, powers, reason, scope, subject, target
- PermissionIdentityDtointerfacekind
- PermissionPendingRequestDtointerfacecreatedAt, id, reason, request
- PermissionPreferenceFactDtointerfaceid, reason, scope, source, value
- PermissionSnapshotDtointerfacegrants, pendingRequests, preferenceFacts, recentDecisions
- PlainToolinterface[runtimeContractCompilerValue], [toolRuntimeContractType], description, kind, name, view, run()
- PromptinterfaceA named block of prompt text, as returned by prompt.
- PromptInputinterfaceWhat prompt needs: a name, a one-line description, and the text.
- ReadonlySignalinterfaceA value you can read now and be told about later. The host hands these out for state it owns, so a mod never polls.
- RenderedToolinterface[runtimeContractCompilerValue], [toolRuntimeContractType], description, kind, name, view, run()
- SecretStorageinterfaceEncrypted per-mod storage for tokens and refresh tokens. The only correct home for a credential.
- SlashCommandinterfaceargumentHint, description, id, kind, run, when
- StateDescriptorinterfaceid, owner, schema, scope, sensitivity, stability, title
- StateSetActionResultinterfaceaccessScope, capturedAt, previous, revision, stateId, value
- StateSetInputinterfacestateId, value
- StateSnapshotinterfaceaccessScope, capturedAt, descriptor, id, kind, previous, revision, value
- StateVersioninterfacecapturedAt, revision, value
- SystemCapabilitiesinterface`ctx.system`: browse the host's event sources and subscribe to them at runtime. Sources are things outside the editor that emit, and which ones exist depends on the host build.
- SystemEventSubscriptionRequestinterfacedeclarationHash, event, listenerId, source, title
- SystemListenerinterfaceA subscription to a host event source, declared at author time. Built by `system.on(...)` and listed in `defineMod`'s `system` slot.
- SystemListenerContextinterfaceThe context a declared system listener runs with. Everything on the base context plus `ui`, so a listener can raise a notification or ask a question when the event warrants it.
- SystemListenerInputinterfaceFields accepted by `system.on(...)`.
- SystemSnapshotRequestinterfacedeclarationHash, source, state
- SystemSourceEventinterfaceemittedAt, event, id, payload, scope, source, traceId
- TerminalAgentinterfaceA provider-native coding agent bound to one integrated terminal.
- TerminalAgentApiinterfaceLaunch, acquire, and orchestrate provider-native terminal agents.
- TerminalAgentCatalogSnapshotinterfaceagents, providers
- TerminalAgentClaudeStartOptionsinterfaceargs, model, permissionMode, prompt, provider, terminal
- TerminalAgentCodexStartOptionsinterfaceapproval, args, display, model, projectTrust, prompt, provider, sandbox, terminal
- TerminalAgentDescriptorinterfaceidentity, state, terminalId
- TerminalAgentProviderDescriptorinterfacedescription, features, id, name
- TerminalAgentRunResultinterfacecompletedAt, response
- TerminalAgentStartResultinterfaceagent, completedAt, response
- TerminalAgentTranscriptinterfaceidentity, messages
- TerminalAgentTranscriptMessageinterfaceat, role, text
- TerminalApiinterfaceTop-level terminal catalog, borrowing, and ownership capability.
- TerminalCatalogSnapshotinterfaceAtomic catalog of all panel, editor, and background terminals.
- TerminalCommandResultinterfacecommand, durationMs, exitCode, output
- TerminalCreateOptionsinterfacePlacement, presentation, and working-directory options used only when creating.
- TerminalDescriptorinterfaceCurrent host-owned facts about one integrated terminal.
- TerminalOperationOptionsinterfacesignal
- TerminalReferenceinterfaceStable reference to a terminal whose host-owned facts can change.
- Themeinterfacedescription, id, label, module
- ThemeInputinterfaceWhat a mod says about one theme it ships.
- ThemeSDKinterfaceThe main theme interface returned by defineTheme. Provides access to resolved tokens, generated CSS, and extension capabilities.
- ToolContributioninterfacedescription, kind, name
- ToolInvocationinterfaceactivity, name, toolCallId
- ToolViewRenderContextinterfacecancellationSignal, webview
- ToolViewWebviewinterfacehtml, onDidReceiveMessage(), postMessage()
- TranscriptToEditorPartsOptionsinterfaceincludeSpeaker, includeTimestamps
- TreeContextinterfaceEverything every handler in a mod can reach. The shape is a split: state and events are how you read the app, actions are how you change it.
- TreeDataProviderinterfacegetChildren(), getTreeItem()
- TreeInlineActioninterfaceappliesTo, icon, id, title, run()
- TreeInvocationinterfaceviewId, reveal()
- TreeIteminterfacecollapsible, contextValue, description, icon, id, label, resource, tooltip
- TreeViewinterfacecontainer, icon, id, inlineActions, kind, provider, title, when, onDidChangeTreeData(), onSelect()
- TreeViewControllerinterfacecontainer, icon, id, inlineActions, kind, provider, title, when, onDidChangeTreeData(), onSelect(), refresh()
- UiActioninterfaceid, label, role
- UiCancellationTokeninterfaceisCancellationRequested, onCancellationRequested()
- UiCapabilityinterfacedialog, notification, progress, quickInput
- UiConfirmDialogRequestinterfacecancelAction, detail, message, primaryAction, secondaryAction, title
- UiDialogCapabilityinterfaceconfirm()
- UiInputRequestinterfaceplaceholder, prompt, title, value
- UiNotificationCapabilityinterfaceerror(), info(), warning()
- UiNotificationRequestinterfaceactions, detail, message, modal
- UiProgressCapabilityinterfacewithProgress()
- UiProgressOptionsinterfacecancellable, location, title
- UiProgressReportinterfaceincrement, message
- UiProgressReporterinterfacereport()
- UiQuickInputCapabilityinterfaceinput(), pick()
- UiQuickPickIteminterfacedescription, detail, id, label
- UiQuickPickRequestinterfaceitems, placeholder, title
- ViewComponentReferenceinterfaceexportName, module
- ViewContextinterfaceThe context a panel declared with `view(...)` receives, through `useViewContext()`. The two members that only exist here are `viewId` and `diagnostics`: a view is a panel the host mounts, so it has an identity in the layout and it owes the host a report on whether it rendered.
- ViewDiagnosticsinterfaceHow a view tells the host whether it actually rendered. The runtime graph and the eval harness read only this channel.
- ViewPlacementinterfacecontainer, icon, id, title, when
- Walkthroughinterfacedescription, featuredFor, icon, id, steps, title, when
- WalkthroughStepinterfacecompletionEvents, description, doneOn, id, media, title, when
- WebviewWidgetLayoutOptionsinterfacebottom, height, left, maxSize, minSize, right, slot, top, width
- WebviewWidgetShowOptionsinterfacelayout, preserveFocus
- WebviewWidgetWindowOptionsinterfacealwaysOnTop, escapeToClose, frame, resizable, transparent
- WidgetinterfacealwaysOnTop, backgroundOpacity, clickOutsideToClose, command, component, defaultSize, defaultSlot, description, detached, escapeToClose, extras, frame, icon, id, maxSize, minSize, persistent, resizable, title, transparent, triggers, when
- WidgetCommandinterfacecategory, id, title
- WidgetSizeinterfaceheight, width
- WidgetsViewApiinterfaceControls the floating surfaces your mod declared with `widget(...)`. Widgets are declared once and shown on demand.
- WidgetTriggersinterfacecommand, socket
- WorkbenchApiinterfaceapplyLayout(), createStatusBarItem(), open()
- WorkbenchColorThemeinterfacekind
- WorkbenchEditorLayoutGroupPlaninterfacegroups, size
- WorkbenchEditorLayoutPlaninterfacegroups, orientation
- WorkbenchEditorLayoutStateinterfacegroupCount, orientation
- WorkbenchLayoutinterfaceeditor, zones
- WorkbenchLayoutApplyResultinterfaceapplied, changed, warnings
- WorkbenchLayoutApplyWarninginterfacecode, message
- WorkbenchLayoutContainerTargetinterfacefocus, id, kind
- WorkbenchLayoutPlaninterfaceeditor, zones
- WorkbenchLayoutViewTargetinterfacefocus, id, kind
- WorkbenchOpenResultinterfaceopened
- WorkbenchOpenUriTargetinterfaceallowContributedOpeners, external, fromUserGesture, kind, openToSide, uri
- WorkbenchOpenViewContainerTargetinterfacefocus, id, kind
- WorkbenchOpenViewTargetinterfacefocus, id, kind
- WorkbenchOpenWalkthroughCategoryTargetinterfacecategory, inactive, kind, openToSide, step
- WorkbenchOpenWalkthroughHomeTargetinterfacecategory, inactive, kind, openToSide, step
- WorkbenchStatusBarIteminterfaceid, dispose(), hide(), show(), update()
- WorkbenchStatusBarItemOptionsinterfacealignment, command, priority, text, tooltip
- WorkbenchViewPlacementPlaninterfaceactive, id, visible
- WorkbenchWindowStateinterfaceactive, focused
- WorkbenchZoneLayoutPlaninterfaceactive, size, views, visible
- WorkbenchZoneSizePlaninterfaceheight, width
- WorkbenchZoneStateinterfacevisible
- WorkspaceApiinterfacefs, getConfiguration(), getFolders(), onDidChangeConfiguration(), onDidChangeFolders(), updateConfiguration()
- WorkspaceConfigurationChangeinterfaceaffectsConfiguration()
- WorkspaceDirEntryinterfacename, type
- WorkspaceFileStatinterfacectime, mtime, size, type
- WorkspaceFileSysteminterfacecreateDirectory(), delete(), readDirectory(), readFile(), rename(), stat(), writeFile()
- WorkspaceFolderinterfaceindex, name, uri
- HostActionContextinterfaceThe context an interceptor runs in, not the one a handler runs in. It is deliberately narrower than ContextBase.
- HostActionEnvelopeinterfaceOne action in flight, with everything an interceptor needs to judge it. The envelope answers who asked, from where, in what scope, and with what input.
- OwnedStateinterfaceA writable handle to state your own mod declared. Returned by `ctx.state(declaration)` when you pass the value you built with state.
- StateinterfaceA read-only handle to one state value. Returned by `ctx.state('editor.selection')` and the other built-in state names.
- StateDeclarationinterfaceOne piece of state your mod owns, declared at author time. This is the declaration, not the data.
- StateDeclarationInputinterfaceFields accepted by state. `sensitivity` defaults to `private`.
- StateFactoryinterfaceCall signature of state.
- StateSetOptionsinterfaceOptions for OwnedState.set.
Types210
- AgentSessionConditiontypetypeof AGENT_SESSION_CONDITIONS[number]
- AiAttachmenttypeAiTextAttachment | AiBinaryAttachment | AiResourceAttachment
- AiAutoApproveLeveltype'default' | 'autoApprove' | 'autopilot'
- AiHookRunStatustype'completed' | 'failed' | 'blocked' | 'timedOut'
- AiHookTypetype'SessionStart' | 'SessionEnd' | 'UserPromptSubmit' | 'PreToolUse' | 'PostToolUse' | 'PreCompact' | 'SubagentStart' | 'SubagentStop' | 'Stop' | 'ErrorOccurred'
- AiJsonSchemaTypetype'string' | 'number' | 'integer' | 'boolean' | 'null' | 'array' | 'object'
- AiMessagetypeWhat a mod puts into a session.
- AiRunnerIdtype'graph' | 'codex' | 'claude-sdk'
- AiSessionDeleteResulttype{ kind: 'deleted' } | { kind: 'cancelled' }
- AiSessionDisplayMetadatatypeImmutable presentation metadata for a session. At least one field is required.
- AiSessionLineagetype{ kind: 'root' } | { depth: number; forkedAt: string; kind: 'fork'; parentRunnerId: AiRunnerId; parentSessionId: SessionId; parentTurnOrdinal: number; parentUserMessageId?: string } | { depth: number; kind: 'spawn'; parentChatUri: string; parentSessionId: SessionId; spawnedAt: string; trigger: AiSpawnTrigger }
- AiSessionSignaltypeAiTextDeltaSignal | AiReasoningSignal | AiToolCallStartSignal | AiToolCallCompleteSignal | AiPendingConfirmationSignal | AiInputRequestSignal | AiTurnCompleteSignal | AiTurnCancelledSignal | AiErrorSignal | AiHookRunSignal
- AiSessionStatustype'idle' | 'inProgress' | 'needsInput' | 'completed' | 'error'
- AiSpawnTriggertype{ commandId: string; kind: 'command' } | { kind: 'tool'; toolCallId: ToolCallId }
- AiToolHandlertype(input: AiToolInput) => Promise<AiToolHandlerResult>
- AiToolHandlerResulttypestring | AiToolResult
- AiToolInputtypeRecord<string, unknown>
- AiTranscriptionErrorCodetypez.infer<typeof aiTranscriptionErrorCodeSchema>
- AiTranscriptionFinalResulttypez.infer<typeof aiTranscriptionFinalResultSchema>
- AiTranscriptionModelDescriptortypez.infer<typeof aiTranscriptionModelDescriptorSchema>
- AiTranscriptionModelFeaturetypez.infer<typeof aiTranscriptionModelFeatureSchema>
- AiTranscriptionModelIdtypez.infer<typeof aiTranscriptionModelIdSchema>
- AiTranscriptionModelSelectiontype{ kind: 'configured' } | { kind: 'model'; modelId: string; providerId: string }
- AiTranscriptionOptionstypez.infer<typeof aiTranscriptionOptionsSchema>
- AiTranscriptionPreparingStagetypez.infer<typeof aiTranscriptionPreparingStageSchema>
- AiTranscriptionProgresstypez.infer<typeof aiTranscriptionProgressSchema>
- AiTranscriptionProviderCatalogEntrytypez.infer<typeof aiTranscriptionProviderCatalogEntrySchema>
- AiTranscriptionProviderDescriptortypez.infer<typeof aiTranscriptionProviderDescriptorSchema>
- AiTranscriptionProviderIdtypez.infer<typeof aiTranscriptionProviderIdSchema>
- AiTranscriptionProviderStatustypez.infer<typeof aiTranscriptionProviderStatusSchema>
- AiTranscriptionRoutetypez.infer<typeof aiTranscriptionRouteSchema>
- AiTranscriptionSegmenttypez.infer<typeof aiTranscriptionSegmentSchema>
- AiTranscriptionSegmentIdtypez.infer<typeof aiTranscriptionSegmentIdSchema>
- AiTranscriptionSpeakertypez.infer<typeof aiTranscriptionSpeakerSchema>
- AiTranscriptionSpeakerIdtypez.infer<typeof aiTranscriptionSpeakerIdSchema>
- AiTranscriptionStreamIdtypez.infer<typeof aiTranscriptionStreamIdSchema>
- AiTranscriptionStreamParttypeAiTranscriptionNonTerminalPart | { error: AiTranscriptionError; type: 'error' } | { reason: 'stopped' | 'input-closed' | 'provider-ended' | 'cancelled'; type: 'finish' }
- AiTranscriptionTerminaltypez.infer<typeof aiTranscriptionTerminalSchema>
- AiTranscriptionWarningtypez.infer<typeof aiTranscriptionWarningSchema>
- AiTranscriptionWarningCodetypez.infer<typeof aiTranscriptionWarningCodeSchema>
- AiTranscriptionWordtypez.infer<typeof aiTranscriptionWordSchema>
- AiTurnDeliverytype{ kind: 'delivered'; value: unknown } | { kind: 'none' }
- AiTurnPendingSnapshottype{ kind: 'queued'; sessionId: SessionId; submissionId: SubmissionId } | { kind: 'running'; sessionId: SessionId; submissionId: SubmissionId; turnId: TurnId } | { kind: 'needsInput'; sessionId: SessionId; submissionId: SubmissionId; turnId: TurnId }
- AiTurnSnapshottypeAiTurnPendingSnapshot | AiTurnTerminalSnapshot
- AiTurnTargettype{ kind: 'queued' } | { kind: 'turn'; turnId: TurnId }
- AiTurnTerminalSnapshottype{ delivery: AiTurnDelivery; kind: 'completed'; result: AiRunResult; sessionId: SessionId; submissionId: SubmissionId; turnId: TurnId } | { error: { message: string }; kind: 'failed'; sessionId: SessionId; submissionId: SubmissionId; target: AiTurnTarget } | { kind: 'cancelled'; sessionId: SessionId; submissionId: SubmissionId; target: AiTurnTarget }
- AuthProviderInputtypeWhat authProvider needs: everything on AuthProvider except the `kind` tag, which it adds.
- AuthSessionResulttype{ kind: 'session'; session: AuthenticationSession } | { kind: 'no-session' } | { kind: 'permission-required'; providerId: string } | { kind: 'permission-denied'; providerId: string; reason: string } | { kind: 'scopes-unsatisfied'; missing: readonly string[] }
- AwaitabletypeT | Promise<T>
- CanvasContributiontypeCanvasElement | CanvasTemplate
- CanvasTemplateAttrValuetypenull | boolean | number | string | readonly CanvasTemplateAttrValue[] | {}
- CheckInputtypeWhat check needs: a name and the body that does the asserting.
- Cleanuptype() => void
- CommandContexttypeThe context a `command(...)` handler receives. `command` is what it adds: the id that ran and the arguments it was given, which is how one handler can serve a palette entry, a keybinding, and a programmatic call.
- CommandHostActionIdtypeA command id in host action form, `command:notes.copy-upper`.
- CommandIdtypeThe id you gave a command in `command({ id })`, for example `'notes.copy-upper'`.
- CommandIdsOftypeTExtension extends { commands: readonly ModCommand<infer TCommandId>[] } ? TCommandId & string : never
- CommandInputtypeThe fields you write for a palette command.
- CommandInvokeResulttypeCommandExecuteResult
- ComponentViewInputtypeOmit<ComponentView, 'kind'>
- ConditionPredicatetypeThe body of a condition. Synchronous on purpose: it runs whenever the host recomputes enablement, so it must read state and return, never await or call an action.
- DataSensitivitytypez.infer<typeof dataSensitivitySchema>
- DataStabilitytypez.infer<typeof dataStabilitySchema>
- EditorActiveDocumentTargettypez.infer<typeof editorActiveDocumentTargetSchema>
- EditorDocumentBlockIdtypez.infer<typeof editorDocumentBlockIdSchema>
- EditorDocumentIdtypez.infer<typeof editorDocumentIdSchema>
- EditorDocumentTargettypez.infer<typeof editorDocumentTargetSchema>
- EditorInsertNodeResulttypez.infer<typeof editorInsertNodeResultSchema>
- EditorNodeInsertiontypez.infer<typeof editorNodeInsertionSchema>
- EditorOperationErrorCodetypez.infer<typeof editorOperationErrorCodeSchema>
- EditorSelectiontypeLexicalEditorSelection | MonacoEditorSelection
- EditorSelectionBasetypez.infer<typeof editorSelectionBaseSchema>
- EditorTextPlacementtypez.infer<typeof editorTextPlacementSchema>
- EditorTextStreamFinalResulttypez.infer<typeof editorTextStreamFinalResultSchema>
- EditorTextStreamIdtypez.infer<typeof editorTextStreamIdSchema>
- EditorTextStreamParttypez.infer<typeof editorTextStreamPartSchema>
- EditorTextStreamUpdateResulttypez.infer<typeof editorTextStreamUpdateResultSchema>
- EffectBodytype(ctx: EffectContext) => void | Disposable | Cleanup
- FocusedEditorGroupTabStatetypez.infer<typeof focusedEditorGroupTabStateSchema>
- HooktypeBeforeActionHook<string>
- HookActionsOftypeTExtension extends { hooks: readonly BeforeActionHook<infer TAction>[] } ? TAction & string : never
- HostActionIdtypeThe canonical id of any action, host owned or command backed. Canonical means commands carry the `command:` prefix.
- HostActionInputtypeAlias of ModularActionInput.
- HostActionInterceptorPhasetype'host-policy' | 'workspace-policy' | 'mod' | 'mod-view' | 'agent'
- HostActionReferencetypeAlias of ModularActionReference, used where the surrounding API is spelled in host action terms.
- HostActionResulttypeAlias of ModularActionResult.
- HostActionSourcetype{ commandId: string; kind: 'command' } | { commandId: string; kind: 'keybinding' } | { componentId: string; kind: 'ui' } | { kind: 'agent-tool'; toolName: string } | { kind: 'mod-api'; modId: ModId } | { callbackId: string; kind: 'callback' } | { kind: 'host' }
- HostActionStabilitytype'internal' | 'experimental' | 'stable'
- HostActionTraceEventtype{ actionId: string; actionRunId: string; actor: HostActor; kind: 'action-started'; source: HostActionSource } | { kind: 'interceptor-started'; registration: HostActionInterceptorRegistrationSnapshot } | { changedInput: boolean; kind: 'interceptor-continued'; registration: HostActionInterceptorRegistrationSnapshot } | { kind: 'interceptor-replaced'; registration: HostActionInterceptorRegistrationSnapshot } | { kind: 'interceptor-completed'; registration: HostActionInterceptorRegistrationSnapshot } | { kind: 'interceptor-timed-out'; registration: HostActionInterceptorRegistrationSnapshot; timeoutMs: number } | { kind: 'action-aborted'; message: string; registration?: HostActionInterceptorRegistrationSnapshot } | { kind: 'owner-started' } | { kind: 'owner-completed' } | { kind: 'action-blocked'; reason: HostActionBlockReason; registration?: HostActionInterceptorRegistrationSnapshot } | { kind: 'action-failed'; message: string; registration?: HostActionInterceptorRegistrationSnapshot } | { afterRevision: number; beforeRevision: number; kind: 'action-committed' }
- HostActortype{ kind: 'user' } | { kind: 'agent'; runner: 'codex' | 'claude' } | { kind: 'mod'; modId: ModId } | { kind: 'mod-view'; modId: ModId; viewId: string } | { kind: 'host' }
- HostEffecttype'read-state' | 'write-state' | 'mutate-editor' | 'mutate-workspace' | 'send-terminal-text' | 'write-clipboard' | 'write-filesystem' | 'network' | 'capture-audio' | 'ui'
- HostEventIdtypestring
- HostScopetype{ kind: 'root' } | { kind: 'workspace'; workspaceId: string } | { editorId: string; kind: 'editor'; workspaceId?: string } | { kind: 'session'; sessionId: string; workspaceId?: string } | { kind: 'agent-panel'; panelId: string; sessionId?: string; workspaceId?: string } | { kind: 'view'; modId: ModId; viewId: string; workspaceId?: string }
- InvalidHookActionsFortypeExclude<HookActionsOf<TExtension>, ValidHookActionFor<TExtension>>
- JsonValuetypenull | boolean | number | string | readonly JsonValue[] | {}
- LexicalEditorSelectiontypez.infer<typeof lexicalEditorSelectionSchema>
- MediaAudioCaptureReftypez.infer<typeof mediaAudioCaptureRefSchema>
- MediaAudioCaptureRefIdtypez.infer<typeof mediaAudioCaptureRefIdSchema>
- MediaAudioChunktypez.infer<typeof mediaAudioChunkSchema>
- MediaAudioFormattypez.infer<typeof mediaAudioFormatSchema>
- MediaAudioInputtypeMediaAudioCaptureRef | { format: MediaAudioFormat; kind: 'stream'; stream: MediaAudioStreamSource }
- MediaAudioLeveltypez.infer<typeof mediaAudioLevelSchema>
- MediaAudioMixInputtypez.infer<typeof mediaAudioMixInputSchema>
- MediaAudioSourceRequesttypez.infer<typeof mediaAudioSourceRequestSchema>
- MediaAudioStreamSourcetypeAsyncIterable<MediaAudioStreamValue> | ReadableStream<MediaAudioStreamValue>
- MediaAudioStreamValuetypeUint8Array | MediaAudioChunk
- MediaAudioTracktypez.infer<typeof mediaAudioTrackSchema>
- MediaCaptureErrorCodetypez.infer<typeof mediaCaptureErrorCodeSchema>
- MediaCaptureOperationStatetypez.infer<typeof mediaCaptureOperationStateSchema>
- MediaCaptureSessionIdtypez.infer<typeof mediaCaptureSessionIdSchema>
- MediaCaptureSessionStatetypez.infer<typeof mediaCaptureSessionStateSchema>
- MediaCaptureTracktypez.infer<typeof mediaCaptureTrackSchema>
- MediaCaptureTrackIdtypez.infer<typeof mediaCaptureTrackIdSchema>
- MediaRecordingActiveSnapshottypez.infer<typeof mediaRecordingActiveSnapshotSchema>
- MediaRecordingCancelledSnapshottypez.infer<typeof mediaRecordingCancelledSnapshotSchema>
- MediaRecordingIdtypez.infer<typeof mediaRecordingIdSchema>
- MediaRecordingRequesttypez.infer<typeof mediaRecordingRequestSchema>
- MediaRecordingSnapshottypez.infer<typeof mediaRecordingSnapshotSchema>
- MediaRecordingStoppedSnapshottypez.infer<typeof mediaRecordingStoppedSnapshotSchema>
- MediaSourceDescriptortypez.infer<typeof mediaSourceDescriptorSchema>
- MediaSourceHandletypez.infer<typeof mediaSourceHandleSchema>
- MediaSourceHandleIdtypez.infer<typeof mediaSourceHandleIdSchema>
- MediaSourceStatustypez.infer<typeof mediaSourceStatusSchema>
- MediaVideoSourceRequesttypez.infer<typeof mediaVideoSourceRequestSchema>
- MediaVideoTracktypez.infer<typeof mediaVideoTrackSchema>
- ModCategorytype'AI' | 'Azure' | 'Chat' | 'Data Science' | 'Debuggers' | 'Extension Packs' | 'Education' | 'Formatters' | 'Keymaps' | 'Language Packs' | 'Linters' | 'Machine Learning' | 'Notebooks' | 'Programming Languages' | 'SCM Providers' | 'Snippets' | 'Testing' | 'Themes' | 'Visualization' | 'Other'
- ModCommandtypeCommand<TId> | SlashCommand<TId>
- ModDefinitiontypeEverything a mod contributes, in one object literal. `metadata` is the only required field.
- ModIconPathtype`${string}.png` | `${string}.svg` | `${string}.jpg` | `${string}.jpeg` | `${string}.webp` | `${string}.gif`
- ModIdtypez.infer<typeof modIdSchema>
- ModStateScopetypez.infer<typeof modStateScopeSchema>
- ModularCommandReferencetypeA command named in author-facing code, without the `command:` prefix.
- ModularEventIdtypeThe id of a host event you can subscribe to with `ctx.on(...)`, for example `'editor.selectionChanged'`.
- ModularStaticActionReferencetypeA host owned action named in author-facing code.
- ModularThemeDefinitiontype{ readonly [Category in keyof ModularThemeTokens]?: { readonly [Token in keyof ModularThemeTokens[Category]]?: ModularThemeTokens[Category][Token] } }
- ModularThemeTokenstypeOmit<SemanticTokenContract, 'surface'> & { color: { readonly [Token in PaletteTokenName]: string }; surface: Omit<SemanticTokenContract['surface'], 'material'> & { material: SurfaceMaterial } }
- MonacoEditorSelectiontypez.infer<typeof monacoEditorSelectionSchema>
- NormalizeModularActionReferencetypeMaps a written reference to the canonical id it dispatches to. A host action id passes through unchanged.
- ObservedTerminaltypeA borrowed terminal that can be observed but not controlled.
- PublicHookActionReferencetypeRejects an already prefixed command id where an author is meant to write the plain one. Resolves to `never` for `command:foo`, which turns the mistake into a compile error at the call site instead of a silent `command:command:foo`.
- ResolvedTokenstypeRepresents a fully resolved token structure where all categories and tokens are readonly. This is the shape of tokens after all references and computed functions have been resolved.
- SlashCommandContexttypeThe context a `slashCommand(...)` handler receives. `session` is what it adds: the conversation the user typed the slash command into.
- SlashCommandInputtypeThe fields you write for a chat slash command.
- StaticHostActionIdtypeThe id of an action the host itself owns, for example `'clipboard.writeText'`. These are fixed by the host and fully typed: their input and result shapes live in ModularActionMap.
- SystemListenerHandlertypeThe body of a declared system listener. May be async.
- SystemSourceEventNametypestring
- SystemSourceIdtype`system.${string}`
- SystemSourceListenerIdtypestring
- SystemSourceStateNametypestring
- TabCloseInputtypez.infer<typeof tabCloseInputSchema>
- TabCloseResulttypez.infer<typeof tabCloseResultSchema>
- TerminalAgentClaudePermissionModetype'acceptEdits' | 'auto' | 'bypassPermissions' | 'manual' | 'dontAsk' | 'plan'
- TerminalAgentCodexApprovalPolicytype'untrusted' | 'on-request' | 'never'
- TerminalAgentCodexDisplayModetype'inline' | 'alternate-screen'
- TerminalAgentCodexProjectTrusttype'configured' | 'untrusted'
- TerminalAgentCodexSandboxtype'read-only' | 'workspace-write' | 'danger-full-access'
- TerminalAgentIdentitytype{ provider: 'claude'; sessionId: string } | { provider: 'codex'; threadId: string }
- TerminalAgentProvidertype'claude' | 'codex'
- TerminalAgentProviderFeaturetype'model-selection' | 'custom-arguments' | 'durable-transcript' | 'sandboxing' | 'approval-policy' | 'alternate-screen' | 'permission-mode'
- TerminalAgentStartOptionstypeTerminalAgentClaudeStartOptions | TerminalAgentCodexStartOptions
- TerminalAgentStatetype{ kind: 'ready' } | { kind: 'working'; startedAt: string } | { completedAt: string; kind: 'waiting' } | { kind: 'closed' }
- TerminalAuthoritytypeAccess requested when borrowing a terminal the current mod does not own.
- TerminalErrorCodetypeStable machine-readable category for a recoverable terminal failure.
- TerminalIdtypeOpaque address of one live integrated terminal.
- TerminalOwnershiptypeWhether the current mod owns the terminal and may close it.
- TerminalReferenceStatetype{ descriptor: TerminalDescriptor; kind: 'open' } | { kind: 'closed' }
- ThemeDefinitiontypeDefines the complete structure for a theme definition input. Maps each category and token to accept any valid TokenDef.
- TooltypePlainTool<TName, TInput> | RenderedTool<TName, TInput, TResult>
- ToolArgumentstypeRecord<string, unknown>
- ToolContexttypeContextBase & { cancellationSignal: AbortSignal; session: AiSessionHandle; tool: ToolInvocation }
- ToolInputtypeEither tool shape: plain text, or typed result with a view.
- ToolResultTexttype(result: TResult) => string
- ToolViewtype{ render?: never; text: ToolResultText<TResult> } | { render: ToolViewRenderer<TInput, TResult>; text: ToolResultText<TResult> }
- ToolViewRenderertype(state: ToolViewRenderState<TInput, TResult>, context: ToolViewRenderContext) => Awaitable<void>
- ToolViewRenderStatetype{ input: unknown; phase: 'preparing' } | { input: TInput; phase: 'running' } | { input: TInput; phase: 'completed'; result: TResult } | { input: unknown; message: string; phase: 'failed' }
- TreeDataChangetypereadonly TElement[] | null
- TreeViewInputtypeOmit<TreeView<TElement, TContextValue>, 'kind' | 'onDidChangeTreeData'>
- UiActionResulttype{ actionId: string; kind: 'action' } | { kind: 'dismissed' } | { kind: 'cancelled' }
- UiInputResulttype{ kind: 'submitted'; value: string } | { kind: 'cancelled' }
- UiQuickPickResulttype{ itemId: string; kind: 'picked' } | { kind: 'cancelled' }
- UiSeveritytype'info' | 'warning' | 'error'
- ValidateModHookstypeInvalidHookActionsFor<TExtension> extends never ? unknown : { __invalidHookActions__: InvalidHookActionsFor<TExtension> }
- ValidHookActionFortypeHostActionId | `command:${CommandIdsOf<TExtension>}`
- ViewtypeComponentView | TreeView
- ViewMoveInputtypez.infer<typeof viewMoveInputSchema>
- ViewMoveResulttypez.infer<typeof viewMoveResultSchema>
- ViewRevealInputtypez.infer<typeof viewRevealInputSchema>
- ViewRevealResulttypez.infer<typeof viewRevealResultSchema>
- ViewToggleVisibilityInputtypez.infer<typeof viewToggleVisibilityInputSchema>
- ViewToggleVisibilityResulttypez.infer<typeof viewToggleVisibilityResultSchema>
- WalkthroughInputtypeThe shape you pass to walkthrough.
- WalkthroughMediatype{ altText: string; image: WalkthroughMediaPath; markdown?: never; poster?: never; svg?: never; video?: never } | { altText?: never; image?: never; markdown: string; poster?: never; svg?: never; video?: never } | { altText: string; image?: never; markdown?: never; poster?: never; svg: string; video?: never } | { altText: string; image?: never; markdown?: never; poster: WalkthroughMediaPath; svg?: never; video: WalkthroughMediaPath }
- WalkthroughMediaPathtypestring | { dark: string; hc: string; hcLight?: string; light: string }
- WebviewWidgetSlottype'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center'
- WorkbenchColorThemeKindtype'light' | 'dark' | 'high-contrast' | 'high-contrast-light'
- WorkbenchEditorLayoutOrientationtype'horizontal' | 'vertical'
- WorkbenchLayoutZoneIdtype'panel-left' | 'panel-right' | 'panel-bottom'
- WorkbenchOpenTargettypeWorkbenchOpenUriTarget | WorkbenchOpenViewTarget | WorkbenchOpenViewContainerTarget | WorkbenchOpenWalkthroughTarget
- WorkbenchOpenWalkthroughTargettypeWorkbenchOpenWalkthroughHomeTarget | WorkbenchOpenWalkthroughCategoryTarget
- WorkbenchStatusBarAlignmenttype'left' | 'right'
- WorkbenchViewActivationPlantypeWorkbenchLayoutViewTarget | WorkbenchLayoutContainerTarget
- WorkspaceFileTypetype'unknown' | 'file' | 'directory' | 'symlink'
- CanonicalHostActionInputtypeThe input shape of an action addressed by its canonical id. Same resolution as ModularActionInput, minus the bare command id case.
- CanonicalHostActionResulttypeThe result shape of an action addressed by its canonical id.
- HostActionInterceptortypeMiddleware around one action. Call `next(action.input)` to let it run untouched.
- HostActionNexttypeHands control to the rest of the interceptor chain and then to the action owner. Pass the input through unchanged to observe, or pass a rewritten input to change what actually runs.
- ModularActionInputtypeThe payload an action accepts, resolved from the reference you name.
- ModularActionReferencetypeWhat you may pass to `ctx.action(...)` and friends. Either a host action id or a bare command id.
- ModularActionResulttypeWhat an action resolves to, resolved from the reference you name.
- NormalizeHostActionReferencetypeAlias of NormalizeModularActionReference.
Functions41
- adjustHuefunctionAdjust the hue of a color. Rotates the hue on the color wheel.
- agentfunctionDeclare a reusable agent: a name, a system prompt, and optionally a model. This describes an agent, it does not run one.
- alphafunctionSet the alpha/opacity of a color.
- authProviderfunctionDeclare a sign-in provider for a service this mod talks to. Put the result in the mod's `auth` array.
- canvasElementfunctionDeclare a new kind of element the user can place on a document canvas. Renderer-native, like `editorExtension`.
- canvasTemplatefunctionDeclare a ready-made canvas element, filled in and named, for the insert menu. A template carries no renderer of its own.
- checkfunctionDeclare a self-verification the host runs before it activates the mod. Checks are a gate, not a report.
- commandfunctionDeclare an action the user runs from the command palette or a keybinding. Reach for this when a person triggers the behavior.
- commandActionIdfunctionTurns a command id into its host action id by adding the `command:` prefix.
- commandIdFromActionIdfunctionRecovers the command id from a host action id. Returns `undefined` for a host owned action, which is how you tell the two kinds of id apart.
- conditionfunctionDefine a rule that gates whether something is enabled and visible. Declare it once, list it in `defineMod`'s `conditions` slot, and reference the same value from every `when` that needs it.
- conditionContextKeyfunctionBuild the workbench context key a mod's condition is published under. The host calls this while registering contributions so `when` clauses in the manifest can name the condition.
- contrastfunctionGet a contrasting color (black or white) for text readability. Uses WCAG relative luminance calculation to determine the best contrast.
- darkenfunctionDarken a color by a percentage. Works in HSL space for perceptually uniform results.
- defineModfunctionThe entry point of the SDK.
- defineThemefunctionDefine a theme with full type safety. Creates a theme from a definition where tokens can be: - Literal values (`'#007bff'`, `16`) - References to other tokens (`'$color.brand'`) - Computed functions (`(t) => t.spacing.base * 4`) The returned Theme object provides: - `tokens`: Fully resolved token values with autocomplete - `css`: Generated CSS custom properties string - `extend()`: Method to create derived themes with overrides
- editorExtensionfunctionDeclare a node that lives inside the document editor. This is the renderer-native lane.
- effectfunctionDeclare background behavior that starts when the mod activates. The body runs once at activation, then again whenever any state or signal it read has changed.
- eventfunctionDeclare an event your mod can publish. The payload type is read off `TPayload` by the authoring compiler, so the host validates every emit and every subscriber sees the shape it expects. Use this when your mod is the thing that happened.
- eventSchemaNamefunctionName of the generated payload contract behind a declaration. The host reads this when folding a mod's events into its manifest.
- eventStabilityfunctionEffective stability of a declaration, falling back to `experimental` when the author left it unset. Registration machinery uses this, not mod code.
- keybindingfunctionBind a keyboard shortcut to a command. Pass the `command` value itself when the command lives in the same mod, so the id is written once and a rename cannot break the binding.
- keybindingCommandIdfunctionResolve the command id a binding points at, whether it was given a command value or a bare id. Registration machinery uses this while folding the mod.
- lightenfunctionLighten a color by a percentage. Works in HSL space for perceptually uniform results.
- mixfunctionMix two colors together. Uses linear interpolation in RGB space.
- normalizeHostActionIdfunctionResolves a written reference to the canonical id the host dispatches on. A known host action id is returned as is.
- promptfunctionDeclare reusable prompt text the user can drop into the composer. Put the result in the mod's top-level `prompts` array.
- readModfunction(value: unknown) => Mod
- saturatefunctionAdjust the saturation of a color. Works in HSL space.
- slashCommandfunctionDeclare a command the user types inside a chat session. The `id` is the name typed after the slash, `description` is the line shown in the typeahead, and `argumentHint` is the placeholder for whatever the user types after the name.
- themefunctionRegister a theme so it appears in the workbench theme picker. Purely declarative.
- tokenAccessorfunctionCreate a typed token accessor helper for computed functions. This enables autocomplete on the `t` parameter in callbacks. The accessor returns an identity function that preserves the callback type while providing full type inference for the tokens parameter.
- toolfunctionDeclare a capability the AI agent can call during a turn. This is the one member of the trio the user does not trigger.
- transcriptToEditorPartsfunction(stream: AsyncIterable<AiTranscriptionStreamPart>, options: TranscriptToEditorPartsOptions) => AsyncIterable<{ text: string; type: 'replace' } | { delta: string; type: 'append' } | { text: string; type: 'commit' }>
- treeViewfunctionDeclare a panel whose content is a tree the host renders. You supply a data provider, `getChildren` and `getTreeItem`, and the host draws the rows, handles selection, and places any inline actions.
- viewfunctionDeclare a panel that docks into a workbench container. You hand the host a module reference, not a mount callback.
- walkthroughfunctionDeclare a guided set of onboarding steps the host presents. Declarative, like `theme`: no handler, no code path of yours runs.
- widgetfunctionDeclare a floating surface: a heads-up panel, an overlay, or a detached window of its own. Same runtime as `view`.
- defineModularThemefunction(definition: ModularThemeDefinition) => ModularTheme
- stateSchemaNamefunctionName of the generated type contract behind a declaration. The host reads this when folding a mod's state into its manifest.
- stateStabilityfunctionEffective stability of a declaration, falling back to `experimental` when the author left it unset. Registration machinery uses this, not mod code.
Classes4
- AiTranscriptionErrorclasscode, operation, providerId, recoverable, [hasInstance](), toDto()
- EditorOperationErrorclasscode, documentId, modId, operation, recoverable, streamId
- MediaCaptureErrorclasscode, operation, sessionId, [hasInstance](), toDto()
- TerminalErrorclassRecoverable terminal failure shared by every runtime projection.
Values5
- COMMAND_HOST_ACTION_PREFIXconstThe prefix that turns a command id into a host action id.
- hookconstDeclares that this mod wants to step in front of a host action. Interception is two halves.
- MOD_BRANDconstunique symbol
- systemconstDeclare a listener on a host event source. `system.on` builds a value you list in `defineMod`; it does not subscribe by itself.
- stateconstDeclare a piece of state your mod owns and persists. The value type is read off `TValue` by the authoring compiler, so the host can validate every write.