@modular/sdk
526 exports in 5 groups.
Interfaces281
- Agentinterfacedescription, kind, model, name, prompt, tools
- AgentInputinterfaceWhat agent needs to describe an agent.
- AgentWorkspaceApiinterfaceacquire(), close(), hide(), open(), reveal()
- AiAgentMetadatainterfacedescription, id, model, name, tools
- AiAgentsApiinterfacefind(), get(), list(), observe()
- AiAskOptionsinterfaceOptions for a one-shot `ask`: the one shape carried from mod to host.
- AiAsyncIterableStreaminterface__@asyncIterator@281474976710871(), cancel()
- AiBinaryAttachmentinterfacecontentType, data, displayKind, kind, label
- AiModDefinitioninterfaceThe AI slot of a mod: what the agent can be, and what it can call.
- AiModelInfointerfaceid, name, vendor
- AiModelsApiinterfacelist()
- AiNotificationinterfaceA system notification a mod puts into a session through `notify`.
- AiPromptMessageinterfaceA prompt for the model to act on.
- AiResourceAttachmentinterfacecontentType, displayKind, kind, label, uri
- AiRunResultinterfacetext
- AiRuntimeApiinterfaceThe AI surface available to a mod: one-shot questions, durable sessions, declared agents, model routes, and transcription.
- AiSendOptionsinterface__@runtimeContractCompilerValue@15542, attachments
- AiSessionConfiginterfaceappendSystemPrompt, autoApprove, effort, foreground, model, title, workingDirectory
- AiSessionForkConfiginterfaceeffort, foreground, model
- AiSessionHandleinterfaceartifacts, history, id, lineage, resource, tasks, children(), fork(), getTurn(), metadata(), notify(), onProgress(), parent(), run(), send(), spawn()
- AiSessionHistoryinterfacelist()
- AiSessionMetadatainterfaceOne AI session as the host describes it: identity, lineage, and status.
- AiSessionResourceMetadatainterfacecolor, declarations, icon, title
- AiSessionsApiinterfacearchive(), create(), delete(), find(), get(), list(), observe(), rename(), unarchive()
- AiSessionSpawnConfiginterfaceappendSystemPrompt, autoApprove, effort, foreground, model, title, workingDirectory
- AiStreamTranscriptionRequestinterfaceaudio, model, options, signal
- AiStreamTranscriptionResultinterfacefinal, fullStream, segments, text, cancel(), stop()
- AiTaskHandleinterfaceOne announced task. `start` posts the kickoff, `complete` or `fail` posts the outcome; each lifecycle event is a system notification at an explicit attention level, so the session's record — and the agent, as much as the caller asked — always knows what ran, when, and how it ended.
- AiTaskReportinterfaceThe finished result of one task, posted into the owning session.
- AiTasksApiinterfaceAnnounce and report tasks in this session.
- AiTextAttachmentinterfacedisplayKind, kind, label, modelRepresentation
- AiToolDeclarationinterfacedescription, inputSchema, name, view
- AiTranscriptionApiinterfaceproviders, stream()
- AiTranscriptionProvidersApiinterfacelist()
- AiTurnHandleinterfacesessionId, submissionId, cancel(), completion(), fork(), get(), observe()
- AiViewApiinterfaceagents, models, sessions, tools, transcription, ask()
- AiViewToolsApiinterfaceregister()
- ArtifactsinterfaceThe artifacts that this mod presents for one AI session.
- 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.
- AuthViewApiinterface`ctx.auth` in a view: resolve an authentication session from a provider this mod (or another) declared.
- BeforeActionHookinterfaceaction, id, kind, title, when
- BeforeActionHookInputinterfaceWhat hook.beforeAction needs in order to declare an interception.
- BoundMetadatainterfacevalue, reset(), set(), subscribe(), update()
- CancellationTokeninterfaceA cancellation token is passed to an asynchronous or long running operation to request cancellation, like cancelling a request for completion items because the user continued to type. To get an instance of a `CancellationToken` use a CancellationTokenSource.
- CanvasElementinterfacedescription, id, kind, module, name, tag, tool
- CanvasTemplateinterfaceelement, group, icon, id, kind, label, order
- CanvasTemplateElementinterfaceattrs, content, tag
- CanvasToolDeclarationinterfacegroup, icon, label, order
- CheckCallinterfacectx
- CheckContextinterfaceWhat a check body gets to inspect the half-built mod with. Deliberately narrow.
- CheckDeclarationinterfacekind, name, run
- Commandinterfacecategory, id, kind, run, title, when
- CommandCallinterfacectx
- CommandExecuteInputinterfaceA command identifier and lossless arguments dispatched by the host.
- CommandExecuteResultinterfaceA completed command and its optional lossless return value.
- CommandInvocationinterfaceThe call that started the current command run.
- CommandInvokeInputinterfaceArguments for one dynamically admitted command-backed action.
- CommandsViewApiinterfaceRuns a command: one of this mod's own declarations, or any registered command by id, including commands the host and other mods own. Pass the `command(...)` value itself and the result is the handler's own return type; the host qualifies the id for you.
- ComponentViewinterfacecomponent, icon, id, kind, persistent, presentation, title, when, window
- 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.
- ConditionInputinterfaceFields accepted by condition.
- ConfigurationChangeEventinterfaceAn event describing the change in Configuration
- 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.
- DataTransferFileinterfaceA file associated with a DataTransferItem. Instances of this type can only be created by the editor and not by extensions.
- DeskCompositioninterfacefloating, regions, segments, windows
- DeskPlacementinterfacepresentation, segment
- DeskSnapshotinterfaceEvery window, the workspaces open in it, and what each one shows.
- DeskWindowinterfacefocused, windowId, workspaces
- DeskWorkspaceinterfaceactive, activity, color, composition, drive, loaded, name, viewId, windowId, workspaceId
- EditorApiinterfaceactiveDocumentTarget(), document(), insertNodeAtActiveSelection(), streamText()
- EditorExtensioninterfacedescription, id, module, name
- EditorTextStreaminterfacefinal, cancel(), dispose()
- EditorTextStreamInputinterfaceparts, placement, signal, target
- Effectinterfacebody, id, kind, title
- EffectContextinterfaceai, completedActionTraces, editor, hooks, logger, media, modId, permissions, system, terminal, ui, workbench, workspace, action(), describeAction(), describeEvent(), emit(), listActions(), listEvents(), on(), state(), subscribeActionTraces()
- EffectMetadatainterfaceid, title
- EventinterfaceRepresents a typed event. A function that represents an event to which you subscribe by calling it with a listener function as argument.
- EventDeclarationinterfaceAn event your mod publishes, declared at author time. This is the declaration, not an occurrence.
- EventEmitResultinterfaceThe host-qualified event identifier that received the payload.
- EventInputinterfaceFields accepted by event.
- EventOccurrenceinterfaceOne delivery of an event to your listener. Dispatch through `occurrence.action(...)` rather than `ctx.action(...)` when you react to an event.
- EventTaskInputinterfaceFields accepted by task for an event-triggered task.
- FileChangeEventinterfaceThe event filesystem providers must use to signal a file change.
- FileCreateEventinterfaceAn event that is fired after files are created.
- FileDeleteEventinterfaceAn event that is fired after files are deleted.
- FileRenameEventinterfaceAn event that is fired after files are renamed.
- FileStatinterfaceThe `FileStat`-type represents metadata about a file
- FileSysteminterfaceThe file system interface exposes the editor's built-in and contributed file system providers.
- FileSystemProviderinterfaceThe filesystem provider defines what the editor needs to read, write, discover, and to manage files and folders.
- FileSystemWatcherinterfaceA file system watcher notifies about changes to files and folders on disk or from other FileSystemProviders. To get an instance of a `FileSystemWatcher` use workspace.createFileSystemWatcher createFileSystemWatcher.
- FileWillCreateEventinterfaceAn event that is fired when files are going to be created. To make modifications to the workspace before the files are created, call the waitUntil-function with a thenable that resolves to a workspace edit.
- FileWillDeleteEventinterfaceAn event that is fired when files are going to be deleted. To make modifications to the workspace before the files are deleted, call the `waitUntil`-function with a thenable that resolves to a workspace edit.
- FileWillRenameEventinterfaceAn event that is fired when files are going to be renamed. To make modifications to the workspace before the files are renamed, call the `waitUntil`-function with a thenable that resolves to a workspace edit.
- GeneratedRuntimeContractinterfacehash, jsonSchema, name
- HostActionAbortSignalinterfaceaborted, reason, addEventListener(), removeEventListener()
- HostActionClientRunOptionsinterfacesignal
- HostActionContextinterfaceThe context an interceptor runs in, not the one a handler runs in. It is deliberately narrower than ContextBase.
- HostActionDidCommitEventinterfaceaction, actionId, afterRevision, beforeRevision, completedAt, result, traceId
- 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.
- HostActionMapinterfaceai.session.archive, ai.session.artifacts.replace, ai.session.create, ai.session.delete, ai.session.fork, ai.session.get, ai.session.metadata.apply, ai.session.record, ai.session.rename, ai.session.send, ai.session.spawn, ai.session.turn.cancel, ai.session.unarchive, clipboard.writeText, command:*, command.execute, links.query, mod.event.emit, mod.state.set, workbench.tab.close, workbench.view.move, workbench.view.reveal, workbench.view.toggleVisibility, workbench.workspace, workbench.workspaces.check, workbench.workspaces.create, workbench.workspaces.current, workbench.workspaces.delete, workbench.workspaces.desk, workbench.workspaces.get, workbench.workspaces.list, workbench.workspaces.open, workbench.workspaces.preview, workbench.workspaces.read, workbench.workspaces.show, workbench.workspaces.templates.create, workbench.workspaces.templates.delete, workbench.workspaces.templates.list, workbench.workspaces.update, workbench.workspaces.validate
- HostActionRunnerinterfaceDispatches actions from inside an interceptor, where `ctx.action(...)` of the outer context is not in reach.
- 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.
- 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
- MetadataDeclarationinterface__@runtimeContractCompilerValue@15542, fork, id, initial, kind
- MetadataDeclarationInputinterfacefork, id, initial
- MetadataHostinterfacemetadata()
- Modinterfaceagents, auth, canvas, checks, commands, conditions, data, editor, effects, events, hooks, keybindings, metadata, prompts, state, system, tasks, theme, tools, ui, views, walkthroughs
- ModBugsinterfaceemail, url
- ModMetadatainterfacebugs, description, displayName, homepage, icon, keywords, license, preview, repository
- ModRepositoryinterfacetype, url
- ModUIBindinginterfacekind, order, provenance, selector, slot, source
- ModularEventMapinterfaceai.session.statusChanged, ai.turn.settled, editor.selectionChanged, host.action.didCommit, multiplayer.presenceChanged
- ModularThemeinterfaceeditor, tokens
- NotebookCellinterfaceRepresents a cell of a notebook, either a code-cell or markup-cell. NotebookCell instances are immutable and are kept in sync for as long as they are part of their notebook.
- NotebookCellExecutionSummaryinterfaceThe summary of a notebook cell execution.
- NotebookDocumentinterfaceRepresents a notebook which itself is a sequence of code or markup cells.
- NotebookDocumentCellChangeinterfaceDescribes a change to a notebook cell.
- NotebookDocumentChangeEventinterfaceAn event describing a transactional notebook change.
- NotebookDocumentContentChangeinterfaceDescribes a structural change to a notebook document, e.g newly added and removed cells.
- NotebookDocumentContentOptionsinterfaceNotebook content options define what parts of a notebook are persisted.
- NotebookDocumentWillSaveEventinterfaceAn event that is fired when a notebook document will be saved. To make modifications to the document before it is being saved, call the waitUntil-function with a thenable that resolves to a workspace edit.
- NotebookSerializerinterfaceThe notebook serializer enables the editor to open notebook files. At its core the editor only knows a notebook data structure but not how that data structure is written to a file, nor how it is read from a file.
- ObservedTerminalinterfaceA borrowed terminal that can be observed but not controlled.
- OwnedStateinterfaceA writable handle to state your own mod declared. Returned by `ctx.state(declaration)` when you pass the value you built with state.
- 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.
- PermissionSnapshotDtointerfacegrants, pendingRequests, preferenceFacts, recentDecisions
- PlaceableSegmentinterfacelabel, presentations, segment
- PlainToolinterface__@runtimeContractInput@15821, description, kind, name, view, run()
- Promptinterfacecontent, description, kind, name
- 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__@runtimeContractInput@15821, description, kind, name, view, run()
- RuntimeContractCompilerInputinterface__@runtimeContractCompilerValue@15542
- RuntimeContractInputinterfaceA phantom carrier for the declared value type.
- ScheduleTaskInputinterfaceFields accepted by task for a scheduled task.
- SecretStorageinterfaceEncrypted per-mod storage for tokens and refresh tokens. The only correct home for a credential.
- SlashCommandCallinterfaceargument, ctx
- 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.
- StateDescriptorinterfaceid, owner, schema, scope, sensitivity, stability, title
- StateFactoryinterfaceCall signature of state.
- StateSetOptionsinterfaceOptions for OwnedState.set.
- 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
- TabCloseInputinterfaceThe semantic workbench tab to close.
- TabCloseResultinterfaceWhether the requested tab was closed.
- TaskinterfaceA declared background task: a trigger the host evaluates durably, and a body that runs when it fires.
- TaskCallinterfaceThe body of a task.
- TaskContextinterfaceThe context a task's `run` receives: everything on the base context plus `ui`, so a task can raise a notification or ask a question when its work warrants it.
- TaskFiringinterfaceOne delivery of a task's trigger. Event firings carry the triggering payload in `value` — the most recent occurrence when the trigger used `settleFor`.
- TerminalAgentinterfaceA provider-native coding agent bound to one integrated terminal.
- TerminalAgentApiinterfaceLaunch, acquire, and orchestrate provider-native terminal agents.
- TerminalAgentCatalogSnapshotinterfaceagents, providers
- TerminalAgentDescriptorinterfaceidentity, state, terminalId
- TerminalAgentProviderDescriptorinterfacedescription, features, id, name
- TerminalAgentRunResultinterfacecompletedAt, response
- TerminalAgentStartResultinterfaceagent, completedAt, response
- TerminalAgentTranscriptinterfaceidentity, messages
- TerminalApiinterfaceTop-level terminal catalog, borrowing, and ownership capability.
- TerminalApiLeaseinterfaceagents, snapshot, borrow(), create(), dispose(), findOwned(), getOrCreate()
- TerminalApiTransportinterfaceWhat every lane hands createTerminalApi: the host's terminal catalog and the requests a mod may make of it.
- TerminalCatalogSnapshotinterfaceactive, terminals
- TerminalCommandRecordinterfaceOne shell command the agent host detected in a terminal.
- TerminalCommandResultinterfacecommand, durationMs, exit, output
- TerminalContentinterfaceA terminal's content as the agent host holds it: bounded scrollback plus its command parts.
- TerminalCreateOptionsinterfacePlacement, presentation, and working-directory options used only when creating.
- TerminalDescriptorinterfaceCurrent host-owned facts about one integrated terminal, projected from its agent-host state.
- TerminalErrorOptionsinterfaceRecoverable terminal failure returned as a value.
- TerminalOperationOptionsinterfacesignal
- TerminalReferenceinterfaceStable reference to a terminal whose host-owned facts can change.
- TextDocumentinterfaceRepresents a text document, such as a source file.
- TextDocumentChangeEventinterfaceAn event describing a transactional document change.
- TextDocumentContentChangeEventinterfaceAn event describing an individual change in the text of a document.
- TextDocumentContentProviderinterfaceA text document content provider allows to add readonly documents to the editor, such as source from a dll or generated html from md. Content providers are workspace.registerTextDocumentContentProvider registered for a uri-scheme.
- TextDocumentWillSaveEventinterfaceAn event that is fired when a document will be saved. To make modifications to the document before it is being saved, call the waitUntil-function with a thenable that resolves to an array of text edits.
- TextLineinterfaceRepresents a line of text, such as a line of source code. TextLine objects are __immutable__.
- Themeinterfacedescription, id, label, module
- ThemeInputinterfaceWhat a mod says about one theme it ships.
- ThenableinterfaceThenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise, and others.
- ToolCallinterfacectx, input
- ToolContributioninterfacedescription, kind, name, view
- ToolInvocationinterfaceactivity, name, toolCallId, workspace
- ToolViewAppearanceinterfaceAppearance of the host-owned tool row.
- ToolViewRenderContextinterfacecancellationSignal, webview
- ToolViewWebviewinterfacecspSource, html, options, asWebviewUri(), onDidDispose(), onDidReceiveMessage(), postMessage()
- ToolViewWebviewOptionsinterfaceenableCommandUris, enableForms, enableScripts, localResourceRoots, portMapping
- ToolViewWebviewPortMappinginterfaceextensionHostPort, webviewPort
- TranscriptToEditorPartsOptionsinterfaceincludeSpeaker, includeTimestamps
- TreeContextinterfaceai, completedActionTraces, hooks, logger, media, modId, permissions, system, terminal, tree, ui, workbench, workspace, action(), describeAction(), describeEvent(), emit(), listActions(), listEvents(), on(), state(), subscribeActionTraces()
- TreeDataProviderinterfacegetChildren(), getTreeItem()
- TreeInlineActioninterfaceappliesTo, icon, id, title, run()
- TreeInvocationinterfaceviewId, reveal()
- TreeIteminterfacecollapsible, contextValue, description, icon, id, label, resource, tooltip
- TreeViewinterfacedensity, icon, id, inlineActions, kind, presentation, provider, rowHeight, title, when, window, onDidChangeTreeData(), onSelect()
- TreeViewControllerinterfacedensity, icon, id, inlineActions, kind, presentation, provider, rowHeight, title, when, window, onDidChangeTreeData(), onSelect(), refresh()
- UiAskRequestinterfaceactions, detail, message, severity
- UiCancellationTokeninterfaceisCancellationRequested, onCancellationRequested()
- UiCapabilityinterfacedialog, notification, progress, quickInput
- UiConfirmDialogRequestinterfacecancelAction, detail, message, primaryAction, secondaryAction, title
- UiDialogCapabilityinterfaceconfirm()
- UiInputRequestinterfaceplaceholder, prompt, title, value
- UiNoticeinterfacedetail, message
- UiNotificationCapabilityinterfaceask(), error(), info(), warning()
- 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.
- ViewMoveInputinterfaceA semantic view occurrence and its destination zone.
- ViewMoveResultinterfaceWhether the requested view move completed.
- ViewPlacementinterfaceicon, id, presentation, title, when, window
- ViewRevealInputinterfaceThe semantic view occurrence to reveal.
- ViewRevealResultinterfaceWhether the requested view was revealed.
- ViewToggleVisibilityInputinterfaceThe semantic view occurrence whose visibility changes.
- ViewToggleVisibilityResultinterfaceThe resulting visibility when the host could change it.
- ViewWindowOptionsinterfacealwaysOnTop, frame, material, maxSize, minSize, resizable, size, transparent
- ViewWindowSizeinterfaceheight, width
- Walkthroughinterfacedescription, featuredFor, icon, id, steps, title, when
- WalkthroughStepinterfacecompletionEvents, description, doneOn, id, media, title, when
- WorkbenchApiinterface`ctx.workbench`: open targets, apply layout plans, own status bar items, and read and change workspaces.
- WorkbenchEditorinterfaceA mounted Studio document.
- WorkbenchLayoutApplyResultinterfaceapplied, changed, warnings
- WorkbenchLayoutPlaninterfaceeditor, zones
- WorkbenchOpenResultinterfaceWhether the target opened.
- WorkbenchScreenshotOptionsinterfacefullPage, timeout
- WorkbenchStatusBarIteminterfaceid, dispose(), hide(), show(), update()
- WorkbenchStatusBarItemOptionsinterfacealignment, command, priority, text, tooltip
- WorkbenchWorkspacesApiinterfacetemplates, create(), current(), desk(), find(), get(), list(), observe()
- WorkspaceActivityEntryinterfacegroupId, id, kind, name, status
- WorkspaceApiinterfaceNamespace for dealing with the current workspace.
- WorkspaceCompositioninterfacelayout, mods
- WorkspaceConfigurationinterfaceRepresents the configuration.
- WorkspaceCreateInputinterfaceA name for the new workspace.
- WorkspaceDocumentinterfacedrive, layout, mods, name, version
- WorkspaceEditEntryMetadatainterfaceAdditional data for entries of a workspace edit.
- WorkspaceEditMetadatainterfaceAdditional data about a workspace edit.
- WorkspaceFolderinterfaceA workspace folder is one of potentially many roots opened by the editor.
- WorkspaceFoldersChangeEventinterfaceAn event describing a change to the set of workspace.workspaceFolders workspace folders.
- WorkspaceHandleinterfaceid, check(), delete(), observe(), open(), preview(), read(), show(), update(), validate()
- WorkspaceSummaryinterfacedrive, id, lastUsedAt, name
- WorkspaceTemplateinterfaceA saved workspace template: a named set of mods and a layout.
- WorkspaceTemplateCreateInputinterfaceThe name, mods and layout of a new template.
- WorkspaceTemplatesApiinterfacecreate(), delete(), list()
- WorkspaceViewPlacementinterfacehidden, view
Types165
- AgentModeltype{ readonly kind: 'inherit'; } | { readonly kind: 'route'; readonly id: string; }
- AgentWorkspaceRequesttypeOne operation on the mod's agent workspace: `acquire` it, `open` a path in it, `reveal` it, `hide` it, or `close` it.
- AgentWorkspaceResulttypeWhat an AgentWorkspaceRequest produced: `ready` names the live workspace and the page showing it, `complete` settles an operation with nothing to name, `closing` reports a teardown already under way, and `unavailable` carries the reason the host served no workspace.
- AiAttachmenttypeAiTextAttachment | AiBinaryAttachment | AiResourceAttachment
- AiAutoApproveLeveltype'default' | 'autoApprove' | 'autopilot'
- AiReasoningEfforttypePublic reasoning depth names accepted by current Modular model routes.
- AiSessionLineagetype{ readonly kind: 'root'; } | { readonly kind: 'fork'; readonly depth: number; readonly forkedAt: string; readonly parentTurnOrdinal: number; readonly parentRunnerId: AiRunnerId; readonly parentSessionId: SessionId; readonly parentUserMessageId?: string; } | { readonly kind: 'spawn'; readonly spawnedAt: string; readonly depth: number; readonly parentSessionId: SessionId; readonly parentChatUri: string; readonly trigger: AiSpawnTrigger; readonly label: string; }
- AiSessionSignaltypeAiTextDeltaSignal | AiReasoningSignal | AiToolCallStartSignal | AiToolCallCompleteSignal | AiPendingConfirmationSignal | AiInputRequestSignal | AiTurnCompleteSignal | AiTurnCancelledSignal | AiErrorSignal | AiHookRunSignal
- AiSessionStatustype'idle' | 'inProgress' | 'needsInput' | 'completed' | 'error'
- AiToolHandlertypeThe SDK-side AI capability surface.
- AiToolHandlerResulttypestring | AiToolResult
- AiToolInputtypeJsonObject
- AiTranscriptionErrorCodetypez.infer<typeof aiTranscriptionErrorCodeSchema>
- AiTranscriptionFinalResulttypez.infer<typeof aiTranscriptionFinalResultSchema>
- AiTranscriptionModelDescriptortypez.infer<typeof aiTranscriptionModelDescriptorSchema>
- AiTranscriptionModelSelectiontypez.infer<typeof aiTranscriptionModelSelectionSchema>
- AiTranscriptionNonTerminalParttypez.infer<typeof aiTranscriptionNonTerminalPartSchema>
- AiTranscriptionOptionstypez.infer<typeof aiTranscriptionOptionsSchema>
- AiTranscriptionProviderCatalogEntrytypez.infer<typeof aiTranscriptionProviderCatalogEntrySchema>
- AiTranscriptionRoutetypez.infer<typeof aiTranscriptionRouteSchema>
- AiTranscriptionSegmenttypez.infer<typeof aiTranscriptionSegmentSchema>
- AiTranscriptionStreamParttypeAiTranscriptionNonTerminalPart | { readonly type: 'error'; readonly error: AiTranscriptionError; } | { readonly type: 'finish'; readonly reason: 'stopped' | 'input-closed' | 'provider-ended' | 'cancelled'; }
- ArtifactErrorCodetypeA stable reason that an artifact replacement failed.
- ArtifactErrorTargettypeThe artifact operation that failed and its session or resource target.
- AuthProviderInputtypeWhat authProvider needs: everything on AuthProvider except the `kind` tag.
- AuthSessionResulttypeThe host's answer to a session request: a session, none, or a permission gate.
- AwaitabletypeT | Promise<T>
- BuiltInStateValuetypez.infer<BuiltInStateContractFor<TName>['schema']>
- CanonicalHostActionInputtypeK extends StaticHostActionId ? HostActionMap[K]['input'] : K extends CommandHostActionId ? HostActionMap['command:*']['input'] : never
- CanonicalHostActionResulttypeK extends StaticHostActionId ? HostActionMap[K]['result'] : K extends CommandHostActionId ? HostActionMap['command:*']['result'] : never
- CanvasContributiontypeCanvasElement | CanvasTemplate
- CanvasTemplateAttrValuetypenull | boolean | number | string | readonly CanvasTemplateAttrValue[] | { readonly [key: string]: 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.
- CommandHostActionIdtype`command:${string}`
- CommandIdtypeThe id you gave a command in `command({ id })`, for example `'notes.copy-upper'`.
- CommandInputtypeThe fields you write for a palette command.
- CommandInvokeResulttypeThe canonical result shared by every command-backed action.
- 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.
- ConfigurationScopetypeThe configuration scope which can be: - a Uri representing a resource - a TextDocument representing an open text document - a WorkspaceFolder representing a workspace folder - an object containing: - `uri`: an optional Uri of a text document - `languageId`: the language identifier of a text document
- ConfigurationTargettypeThe configuration target
- DeskEditortype'studio-document' | 'code' | 'terminal'
- DeskPresentationtype{ readonly kind: 'docked'; readonly region: DeskRegion; } | { readonly kind: 'floating'; } | { readonly kind: 'window'; }
- DeskRegiontype'left' | 'main' | 'right'
- DeskSegmenttype{ readonly kind: 'view'; readonly viewId: string; } | { readonly kind: 'mod'; readonly extensionId: string; } | { readonly kind: 'editor'; readonly editor: DeskEditor; }
- Disposabletypetypes.Disposable
- EffectBodytype(ctx: EffectContext) => void | Disposable | Cleanup
- EndOfLinetypetypes.EndOfLine
- EventEmittertypetypes.EventEmitter<T>
- FileChangeTypetypetypes.FileChangeType
- FilePermissiontypetypes.FilePermission
- FileSystemErrortypetypes.FileSystemError
- FileTypetypetypes.FileType
- GlobPatterntypeA file glob pattern to match file paths against.
- HooktypeBeforeActionHook
- HostActionIdtypeStaticHostActionId | CommandHostActionId
- HostActionIdOftypeTReference extends Command ? CommandHostActionId : TReference extends HostActionId ? TReference : never
- HostActionInputtypeCanonicalHostActionInput<HostActionIdOf<K>>
- 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.
- HostActionReferencetypeHostActionId | Command
- HostActionResulttypeCanonicalHostActionResult<HostActionIdOf<K>>
- HostActionSourcetype{ readonly kind: 'command'; readonly commandId: string; } | { readonly kind: 'keybinding'; readonly commandId: string; } | { readonly kind: 'ui'; readonly componentId: string; } | { readonly kind: 'agent-tool'; readonly toolName: string; readonly invocation: import('./ai-session.ts').AiToolInvocationAddress; } | { readonly kind: 'mod-api'; readonly modId: ModId; } | { readonly kind: 'callback'; readonly callbackId: string; } | { readonly kind: 'host'; }
- HostActionTraceEventtype{ readonly kind: 'action-started'; readonly actionId: string; readonly actionRunId: string; readonly actor: HostActor; readonly source: HostActionSource; } | { readonly kind: 'interceptor-started'; readonly registration: HostActionInterceptorRegistrationSnapshot; } | { readonly kind: 'interceptor-continued'; readonly registration: HostActionInterceptorRegistrationSnapshot; readonly changedInput: boolean; } | { readonly kind: 'interceptor-replaced'; readonly registration: HostActionInterceptorRegistrationSnapshot; } | { readonly kind: 'interceptor-completed'; readonly registration: HostActionInterceptorRegistrationSnapshot; } | { readonly kind: 'interceptor-timed-out'; readonly registration: HostActionInterceptorRegistrationSnapshot; readonly timeoutMs: number; } | { readonly kind: 'action-aborted'; readonly message: string; readonly registration?: HostActionInterceptorRegistrationSnapshot; } | { readonly kind: 'owner-started'; } | { readonly kind: 'owner-completed'; } | { readonly kind: 'action-blocked'; readonly reason: HostActionBlockReason; readonly registration?: HostActionInterceptorRegistrationSnapshot; } | { readonly kind: 'action-failed'; readonly message: string; readonly registration?: HostActionInterceptorRegistrationSnapshot; } | { readonly kind: 'action-committed'; readonly beforeRevision: number; readonly afterRevision: number; }
- HostActortype{ readonly kind: 'user'; } | { readonly kind: 'agent'; readonly runner: 'codex' | 'claude'; } | { readonly kind: 'mod'; readonly modId: ModId; } | { readonly kind: 'mod-view'; readonly modId: ModId; readonly viewId: string; } | { readonly kind: 'host'; }
- HostScopetype{ readonly kind: 'root'; } | { readonly kind: 'workspace'; readonly workspaceId: string; } | { readonly kind: 'editor'; readonly editorId: string; readonly workspaceId?: string; } | { readonly kind: 'session'; readonly sessionId: string; readonly workspaceId?: string; } | { readonly kind: 'agent-panel'; readonly panelId: string; readonly sessionId?: string; readonly workspaceId?: string; } | { readonly kind: 'view'; readonly modId: ModId; readonly viewId: string; readonly workspaceId?: string; }
- IconPathtypeRepresents an icon in the UI.
- JsonValuetypeA JSON-serializable value accepted by SDK contracts. Objects and arrays may contain only other JSON values.
- MarkdownStringtypetypes.MarkdownString
- MediaAudioCaptureReftypez.infer<typeof mediaAudioCaptureRefSchema>
- MediaAudioChunktypez.infer<typeof mediaAudioChunkSchema>
- MediaAudioFormattypez.infer<typeof mediaAudioFormatSchema>
- MediaAudioInputtypeMediaAudioCaptureRef | { readonly kind: 'stream'; readonly stream: MediaAudioStreamSource; readonly format: MediaAudioFormat; }
- MediaAudioMixInputtypez.infer<typeof mediaAudioMixInputSchema>
- MediaAudioSourceRequesttypez.infer<typeof mediaAudioSourceRequestSchema>
- MediaAudioStreamSourcetypeAsyncIterable<MediaAudioStreamValue> | ReadableStream<MediaAudioStreamValue>
- MediaAudioStreamValuetypeUint8Array | MediaAudioChunk
- MediaCaptureErrorCodetypez.infer<typeof mediaCaptureErrorCodeSchema>
- MediaCaptureSessionIdtypez.infer<typeof mediaCaptureSessionIdSchema>
- MediaSourceHandletypez.infer<typeof mediaSourceHandleSchema>
- MediaVideoTracktypez.infer<typeof mediaVideoTrackSchema>
- MetadataForkPolicytype'inherit' | 'reset'
- MetadataUpdatetype(current: TValue) => TValue
- 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`
- ModularEventIdtypekeyof ModularEventMap & string
- ModularThemeDefinitiontype{ readonly [Category in keyof ModularThemeTokens]?: { readonly [Token in keyof ModularThemeTokens[Category]]?: ModularThemeTokens[Category][Token]; }; }
- ModularThemeTokenstypeSemanticTokenContract & { readonly color: { readonly [Token in PaletteTokenName]: string; }; }
- NotebookCellDatatypetypes.NotebookCellData
- NotebookCellKindtypetypes.NotebookCellKind
- NotebookCellOutputtypetypes.NotebookCellOutput
- NotebookCellOutputItemtypetypes.NotebookCellOutputItem
- NotebookDatatypetypes.NotebookData
- NotebookEdittypetypes.NotebookEdit
- NotebookRangetypetypes.NotebookRange
- Positiontypetypes.Position
- ProviderResulttypeA provider result represents the values a provider, like the HoverProvider, may return.
- Rangetypetypes.Range
- RelativePatterntypetypes.RelativePattern
- 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.
- SemanticSelectorPredicatetype{ readonly kind: 'compare'; readonly operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte'; readonly left: SemanticSelectorValue; readonly right: SemanticSelectorValue; } | { readonly kind: 'and' | 'or'; readonly operands: SemanticSelectorPredicate[]; } | { readonly kind: 'not'; readonly operand: SemanticSelectorPredicate; }
- SlashCommandtypeRequiredArgumentSlashCommand<TId, TResult> | OptionalArgumentSlashCommand<TId, TResult> | BareSlashCommand<TId, TResult>
- 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.
- SnippetStringtypetypes.SnippetString
- SnippetTextEdittypetypes.SnippetTextEdit
- StaticHostActionIdtypeExclude<keyof HostActionMap, 'command:*'>
- SystemListenerHandlertypeThe body of a declared system listener. May be async.
- TaskHandlertype(call: TaskCall<TPayload>) => Awaitable<void>
- TerminalActiveStatetypeAtomic catalog of all panel, editor, and background terminals.
- TerminalAgentIdentitytype{ readonly provider: 'claude'; readonly sessionId: string; } | { readonly provider: 'codex'; readonly threadId: string; }
- TerminalAgentProvidertype'claude' | 'codex'
- TerminalAgentProviderFeaturetype'model-selection' | 'custom-arguments' | 'durable-transcript' | 'sandboxing' | 'approval-policy' | 'alternate-screen' | 'permission-mode'
- TerminalAgentStartOptionstypeTerminalAgentClaudeStartOptions | TerminalAgentCodexStartOptions
- TerminalAgentStatetype{ readonly kind: 'ready'; } | { readonly kind: 'working'; readonly startedAt: string; } | { readonly kind: 'waiting'; readonly completedAt: string; } | { readonly kind: 'unavailable'; readonly reason: TerminalAgentUnavailableReason; } | { readonly kind: 'closed'; }
- TerminalAgentUnavailableReasontype'transcript-missing' | 'transcript-invalid' | 'transcript-unreadable'
- TerminalAuthoritytypeAccess requested when borrowing a terminal the current mod does not own.
- TerminalErrorCodetypeStable machine-readable category for a recoverable terminal failure.
- TerminalErrorScopetype{ readonly kind: 'global'; } | { readonly kind: 'terminal'; readonly terminalId: TerminalId; }
- TerminalExitStatetypeWhether the shell behind the terminal is still running.
- TerminalOutputEventtypeOne item of a terminal's output stream as the agent host emits it.
- TerminalOutputSubscriptionResulttypeA live output stream the host granted, or the error that refused it.
- TerminalOwnershipKeytypeWhether the current mod owns the terminal and may close it.
- TerminalReferenceStatetype{ readonly kind: 'open'; readonly descriptor: TerminalDescriptor; } | { readonly kind: 'closed'; }
- TextDocumentChangeReasontypetypes.TextDocumentChangeReason
- TextDocumentSaveReasontypeRepresents reasons why a text document is saved.
- TextEdittypetypes.TextEdit
- ThemeColortypetypes.ThemeColor
- ThemeDefinitiontypeDefines the complete structure for a theme definition input. Maps each category and token to accept any valid TokenDef.
- ThemeIcontypetypes.ThemeIcon
- ThemeSDKtypeReadonly<Record<string, string>>
- TooltypePlainTool<TName, TInput> | RenderedTool<TName, TInput, TResult>
- ToolContexttypeContextBase & { readonly editor: EditorApi; readonly session: AiSessionHandle; readonly tool: ToolInvocation; readonly cancellationSignal: AbortSignal; }
- ToolResultTexttype(result: TResult) => string
- ToolViewtypeToolViewAppearance & ({ readonly text: ToolResultText<TResult>; readonly render?: never; } | { readonly text: ToolResultText<TResult>; readonly render: ToolViewRenderer<TInput, TResult>; })
- ToolViewRenderertype(state: ToolViewRenderState<TInput, TResult>, context: ToolViewRenderContext) => Awaitable<void>
- ToolViewRenderStatetype{ readonly phase: 'preparing'; readonly input: unknown; } | { readonly phase: 'running'; readonly input: TInput; } | { readonly phase: 'completed'; readonly input: TInput; readonly result: TResult; } | { readonly phase: 'failed'; readonly input: unknown; readonly message: string; }
- TreeDataChangetypereadonly TElement[] | null
- TreeDensitytype'compact' | 'default' | 'comfortable'
- TreeViewInputtypeOmit<TreeView<TElement, TContextValue>, 'kind' | 'onDidChangeTreeData'>
- UiActionResulttype{ readonly kind: 'action'; readonly actionId: string; } | { readonly kind: 'dismissed'; } | { readonly kind: 'cancelled'; }
- UiInputResulttype{ readonly kind: 'submitted'; readonly value: string; } | { readonly kind: 'cancelled'; }
- UiQuickPickResulttype{ readonly kind: 'picked'; readonly itemId: string; } | { readonly kind: 'cancelled'; }
- UiSeveritytype'info' | 'warning' | 'error'
- Uritypetypes.Uri
- ViewtypeComponentView | TreeView
- WalkthroughInputtypeThe shape you pass to walkthrough.
- WalkthroughMediatype{ readonly image: WalkthroughMediaPath; readonly altText: string; readonly markdown?: never; readonly svg?: never; readonly video?: never; readonly poster?: never; } | { readonly markdown: string; readonly image?: never; readonly svg?: never; readonly video?: never; readonly poster?: never; readonly altText?: never; } | { readonly svg: string; readonly altText: string; readonly markdown?: never; readonly image?: never; readonly video?: never; readonly poster?: never; } | { readonly video: WalkthroughMediaPath; readonly poster: WalkthroughMediaPath; readonly altText: string; readonly markdown?: never; readonly image?: never; readonly svg?: never; }
- WalkthroughMediaPathtypestring | { readonly dark: string; readonly light: string; readonly hc: string; readonly hcLight?: string; }
- WorkbenchOpenTargettypeWorkbenchOpenUriTarget | WorkbenchOpenViewTarget | WorkbenchOpenViewContainerTarget | WorkbenchOpenWalkthroughTarget
- WorkspaceChecktypeA workspace check: `unknown` names no workspace, `refused` carries the reason its document file failed to parse, and `checked` lists findings against the installed mods and the views the host reported.
- WorkspaceColortype'grey' | 'blue' | 'red' | 'green' | 'pink' | 'purple' | 'cyan' | 'orange'
- WorkspaceDrivetype{ readonly kind: 'folder'; readonly path: string; } | { readonly kind: 'none'; }
- WorkspaceEdittypetypes.WorkspaceEdit
- WorkspaceFailuretype{ readonly kind: 'missing'; readonly workspaceId: string; } | { readonly kind: 'refused'; readonly refusal: WorkspaceRefusal; } | { readonly kind: 'contended'; readonly workspaceId: string; readonly attempts: number; } | { readonly kind: 'unscoped'; readonly reason: string; }
- WorkspaceFindingtype{ readonly kind: 'missing-mod'; readonly mod: string; } | { readonly kind: 'unlisted-mod-view'; readonly view: string; readonly mod: string; } | { readonly kind: 'unknown-view'; readonly view: string; readonly candidates: readonly string[]; } | { readonly kind: 'unbuilt-mod'; readonly mod: string; } | { readonly kind: 'unreadable-mod-build'; readonly mod: string; readonly reason: string; } | { readonly kind: 'conflicting-mod'; readonly mod: string; readonly owner: string; readonly views: readonly string[]; readonly commands: readonly string[]; }
- WorkspaceHostViewsReporttype'reported' | 'unreported'
- WorkspaceLayouttype{ readonly [Region in WorkspaceRegion]: readonly WorkspaceViewPlacement[]; }
- WorkspaceObservationtype{ readonly kind: 'document'; readonly document: WorkspaceDocument; } | { readonly kind: 'missing'; } | { readonly kind: 'failed'; readonly message: string; }
- WorkspaceRefusaltypeWhy the host refused a document: it does not parse, it adds a mod or view the host does not have, its folder drive belongs to another workspace, or the stored file is unreadable.
- WorkspaceRegiontype(typeof WORKSPACE_REGIONS)[number]
- WorkspaceValidationtype{ readonly kind: 'valid'; } | { readonly kind: 'refused'; readonly refusal: WorkspaceRefusal; }
Functions42
- adjustHuefunctionAdjust the hue of a color. Rotates the hue on the color wheel.
- agentfunctionThis 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.
- commandActionIdfunction(commandId: string) => CommandHostActionId
- commandIdFromActionIdfunction(actionId: string) => string | null
- 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.
- defineModularThemefunction(definition: ModularThemeDefinition, editorOptions?: ThemeEditorOptions) => ModularTheme
- 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.
- 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.
- lowerSchedulefunctionLowers a friendly schedule string to the five-field cron expression the scheduler evaluates.
- metadatafunction<TValue>(input: MetadataDeclarationInput<TValue>, ...contracts: readonly [] | readonly [GeneratedRuntimeContract]) => MetadataDeclaration<TValue>
- metadataSchemaNamefunction(declaration: MetadataDeclaration<unknown>) => string
- mixfunctionMix two colors together. Uses linear interpolation in RGB space.
- parseTaskDurationfunctionParses a `'30s' | '15m' | '2h' | '1d'` duration string to milliseconds.
- 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.
- stateSchemaNamefunctionName of the generated type contract behind a declaration. The host reads this when folding a mod's state into its manifest.
- taskfunctionDeclare a background task. A task pairs a trigger with a body.
- 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<EditorTextStreamPart>
- 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 the host docks, floats, or opens in its own window. 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.
Classes6
- AiTranscriptionErrorclasscause, code, message, name, operation, providerId, recoverable, stack, stackTraceLimit, __@hasInstance@281474976710662(), captureStackTrace(), prepareStackTrace(), toDto()
- ArtifactErrorclassA recoverable artifact operation failure.
- EditorOperationErrorclasscause, code, documentId, message, modId, name, operation, recoverable, stack, stackTraceLimit, streamId, captureStackTrace(), prepareStackTrace()
- MediaCaptureErrorclasscause, code, message, name, operation, sessionId, stack, stackTraceLimit, __@hasInstance@281474976710662(), captureStackTrace(), prepareStackTrace(), toDto()
- TerminalErrorclasscause, code, message, name, scope, stack, stackTraceLimit, __@hasInstance@281474976710662(), captureStackTrace(), prepareStackTrace()
- WorkspaceErrorclasscause, failure, message, name, stack, stackTraceLimit, captureStackTrace(), prepareStackTrace()
Values32
- ConfigurationTargetconstThe configuration target
- Disposableconsttypeof types.Disposable
- EndOfLineconsttypeof types.EndOfLine
- EventEmitterconsttypeof types.EventEmitter
- FileChangeTypeconsttypeof types.FileChangeType
- FilePermissionconsttypeof types.FilePermission
- FileSystemErrorconsttypeof types.FileSystemError
- FileTypeconsttypeof types.FileType
- hookconstDeclares that this mod wants to step in front of a host action. Interception is two halves.
- MarkdownStringconsttypeof types.MarkdownString
- MOD_BRANDconstunique symbol
- NotebookCellDataconsttypeof types.NotebookCellData
- NotebookCellKindconsttypeof types.NotebookCellKind
- NotebookCellOutputconsttypeof types.NotebookCellOutput
- NotebookCellOutputItemconsttypeof types.NotebookCellOutputItem
- NotebookDataconsttypeof types.NotebookData
- NotebookEditconsttypeof types.NotebookEdit
- NotebookRangeconsttypeof types.NotebookRange
- Positionconsttypeof types.Position
- Rangeconsttypeof types.Range
- RelativePatternconsttypeof types.RelativePattern
- SnippetStringconsttypeof types.SnippetString
- SnippetTextEditconsttypeof types.SnippetTextEdit
- 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.
- systemconstDeclare listeners on host event sources. Source and event ids come from the host, not from a fixed list in the SDK. Discover them with `ctx.system.listSources()` and `ctx.system.describeSource(source)`.
- TextDocumentChangeReasonconsttypeof types.TextDocumentChangeReason
- TextDocumentSaveReasonconstRepresents reasons why a text document is saved.
- TextEditconsttypeof types.TextEdit
- ThemeColorconsttypeof types.ThemeColor
- ThemeIconconsttypeof types.ThemeIcon
- Uriconsttypeof types.Uri
- WorkspaceEditconsttypeof types.WorkspaceEdit