import { RPCProtocol } from './rpc-protocol'; import * as theia from '@theia/plugin'; import { PluginLifecycle, PluginModel, PluginMetadata, PluginPackage, IconUrl, PluginJsonValidationContribution } from './plugin-protocol'; import { QueryParameters } from './env'; import { TextEditorCursorStyle } from './editor-options'; import { ConfigurationTarget, TextEditorLineNumbersStyle, EndOfLine, OverviewRulerLane, FileOperationOptions, TextDocumentChangeReason, IndentAction, NotebookRendererScript } from '../plugin/types-impl'; import { UriComponents } from './uri-components'; import { SerializedDocumentFilter, CompletionContext, MarkdownString, Range, Completion, CompletionResultDto, MarkerData, SignatureHelp, Hover, EvaluatableExpression, InlineValue, InlineValueContext, DocumentHighlight, FormattingOptions, ChainedCacheId, Definition, DocumentLink, CodeLensSymbol, Command, TextEdit, DocumentSymbol, ReferenceContext, TextDocumentShowOptions, WorkspaceRootsChangeEvent, Location, Breakpoint, ColorPresentation, RenameLocation, SignatureHelpContext, CodeAction, CodeActionContext, FoldingContext, FoldingRange, SelectionRange, SearchInWorkspaceResult, CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall, Comment, CommentOptions, CommentThreadState, CommentThreadCollapsibleState, CommentThread, CommentThreadChangedEvent, CodeActionProviderDocumentation, LinkedEditingRanges, ProvidedTerminalLink, InlayHint, CachedSession, CachedSessionItem, TypeHierarchyItem, InlineCompletion, InlineCompletions, InlineCompletionContext, DocumentDropEdit, DataTransferDTO, DocumentDropEditProviderMetadata, DebugStackFrameDTO, DebugThreadDTO, HoverContext } from './plugin-api-rpc-model'; import { ExtPluginApi } from './plugin-ext-api-contribution'; import { KeysToAnyValues, KeysToKeysToAnyValue } from './types'; import { AuthenticationProviderAuthenticationSessionsChangeEvent, CancellationToken, Progress, ProgressOptions } from '@theia/plugin'; import { DebuggerDescription } from '@theia/debug/lib/common/debug-service'; import { DebugProtocol } from '@vscode/debugprotocol'; import { SymbolInformation } from '@theia/core/shared/vscode-languageserver-protocol'; import * as files from '@theia/filesystem/lib/common/files'; import { BinaryBuffer } from '@theia/core/lib/common/buffer'; import { ResourceLabelFormatter } from '@theia/core/lib/common/label-protocol'; import type { InternalTimelineOptions, Timeline, TimelineChangeEvent, TimelineProviderDescriptor } from '@theia/timeline/lib/common/timeline-model'; import { SerializableEnvironmentVariableCollection } from '@theia/terminal/lib/common/shell-terminal-protocol'; import { ThemeType } from '@theia/core/lib/common/theme'; import { Disposable } from '@theia/core/lib/common/disposable'; import { QuickInputButtonHandle } from '@theia/core/lib/common'; import { Severity } from '@theia/core/lib/common/severity'; import { DebugConfiguration, DebugSessionOptions } from '@theia/debug/lib/common/debug-configuration'; import * as notebookCommon from '@theia/notebook/lib/common'; import { CellExecutionUpdateType, CellRange, NotebookCellExecutionState } from '@theia/notebook/lib/common'; import { LanguagePackBundle } from './language-pack-service'; import { AccessibilityInformation } from '@theia/core/lib/common/accessibility'; import { TreeDelta } from '@theia/test/lib/common/tree-delta'; import { TestItemDTO, TestOutputDTO, TestRunDTO, TestRunProfileDTO, TestRunRequestDTO, TestStateChangeDTO } from './test-types'; import { ArgumentProcessor } from './commands'; import { McpServerDefinitionRegistryMain, McpServerDefinitionRegistryExt } from './lm-protocol'; export interface PreferenceData { [scope: number]: any; } export interface Plugin { pluginPath: string | undefined; pluginFolder: string; pluginUri: string; model: PluginModel; rawModel: PluginPackage; lifecycle: PluginLifecycle; isUnderDevelopment: boolean; } export interface ConfigStorage { hostLogPath: string; hostStoragePath?: string; hostGlobalStoragePath: string; } export declare enum UIKind { /** * Extensions are accessed from a desktop application. */ Desktop = 1, /** * Extensions are accessed from a web browser. */ Web = 2 } export declare enum ExtensionKind { /** * Extension runs where the UI runs. */ UI = 1, /** * Extension runs where the remote extension host runs. */ Workspace = 2 } export interface EnvInit { queryParams: QueryParameters; language: string; shell: string; uiKind: UIKind; appName: string; appHost: string; appRoot: string; appUriScheme: string; } export interface PluginAPI { } export declare const PluginManager: unique symbol; export interface PluginManager { getAllPlugins(): Plugin[]; getPluginById(pluginId: string): Plugin | undefined; getPluginExport(pluginId: string): PluginAPI | undefined; getPluginKind(): theia.ExtensionKind; isRunning(pluginId: string): boolean; isActive(pluginId: string): boolean; activatePlugin(pluginId: string): PromiseLike; onDidChange: theia.Event; } export interface PluginAPIFactory { (plugin: Plugin): typeof theia; } export declare const emptyPlugin: Plugin; export interface PluginManagerInitializeParams { preferences: PreferenceData; globalState: KeysToKeysToAnyValue; workspaceState: KeysToKeysToAnyValue; env: EnvInit; pluginKind: ExtensionKind; extApi?: ExtPluginApi[]; webview: WebviewInitData; jsonValidation: PluginJsonValidationContribution[]; supportedActivationEvents?: string[]; } export interface PluginManagerStartParams { plugins: PluginMetadata[]; configStorage: ConfigStorage; activationEvents: string[]; } export interface AbstractPluginManagerExt

> { /** initialize the manager, should be called only once */ $init(params: P): Promise; /** load and activate plugins */ $start(params: PluginManagerStartParams): Promise; /** deactivate the plugin */ $stop(pluginId: string): Promise; /** deactivate all plugins */ $stop(): Promise; $updateStoragePath(path: string | undefined): Promise; $activateByEvent(event: string): Promise; $activatePlugin(id: string): Promise; } export interface PluginManagerExt extends AbstractPluginManagerExt { } export interface CommandRegistryMain { $registerCommand(command: theia.CommandDescription): void; $unregisterCommand(id: string): void; $registerHandler(id: string): void; $unregisterHandler(id: string): void; $executeCommand(id: string, ...args: any[]): PromiseLike; $getCommands(): PromiseLike; $getKeyBinding(commandId: string): PromiseLike; registerArgumentProcessor(processor: ArgumentProcessor): void; } export interface CommandRegistryExt { $executeCommand(id: string, ...ars: any[]): PromiseLike; registerArgumentProcessor(processor: ArgumentProcessor): void; } export interface TerminalServiceExt { $startProfile(providerId: string, cancellationToken: theia.CancellationToken): Promise; $terminalCreated(id: string, name: string): void; $terminalNameChanged(id: string, name: string): void; $terminalOpened(id: string, processId: number, terminalId: number, cols: number, rows: number): void; $terminalClosed(id: string, exitStatus: theia.TerminalExitStatus | undefined): void; $terminalOnInput(id: string, data: string): void; $terminalSizeChanged(id: string, cols: number, rows: number): void; $currentTerminalChanged(id: string | undefined): void; $terminalOnInteraction(id: string): void; $terminalShellTypeChanged(id: string, newShellType: string): void; $initEnvironmentVariableCollections(collections: [string, string, boolean, SerializableEnvironmentVariableCollection][]): void; $provideTerminalLinks(line: string, terminalId: string, token: theia.CancellationToken): Promise; $handleTerminalLink(link: ProvidedTerminalLink): Promise; getEnvironmentVariableCollection(extensionIdentifier: string): theia.GlobalEnvironmentVariableCollection; $setShell(shell: string): void; $reportOutputMatch(observerId: string, groups: string[]): void; } export interface OutputChannelRegistryExt { createOutputChannel(name: string, pluginInfo: PluginInfo): theia.OutputChannel; createOutputChannel(name: string, pluginInfo: PluginInfo, options: { log: true; }): theia.LogOutputChannel; } export interface ConnectionMain { $createConnection(id: string): Promise; $deleteConnection(id: string): Promise; $sendMessage(id: string, message: string): void; } export interface ConnectionExt { $createConnection(id: string): Promise; $deleteConnection(id: string): Promise; $sendMessage(id: string, message: string): void; } export interface TerminalServiceMain { /** * Create new Terminal with Terminal options. * @param options - object with parameters to create new terminal. */ $createTerminal(id: string, options: TerminalOptions, parentId?: string, isPseudoTerminal?: boolean): Promise; /** * Send text to the terminal by id. * @param id - terminal widget id. * @param text - text content. * @param shouldExecute - in case true - Indicates that the text being sent should be executed rather than just inserted in the terminal. */ $sendText(id: string, text: string, shouldExecute?: boolean): void; /** * Write data to the terminal by id. * @param id - terminal widget id. * @param data - data. */ $write(id: string, data: string): void; /** * Resize the terminal by id. * @param id - terminal widget id. * @param cols - columns. * @param rows - rows. */ $resize(id: string, cols: number, rows: number): void; /** * Show terminal on the UI panel. * @param id - terminal widget id. * @param preserveFocus - set terminal focus in case true value, and don't set focus otherwise. */ $show(id: string, preserveFocus?: boolean): void; /** * Hide UI panel where is located terminal widget. * @param id - terminal widget id. */ $hide(id: string): void; /** * Destroy terminal. * @param id - terminal widget id. */ $dispose(id: string): void; /** * Set the terminal widget name. * @param id terminal widget id. * @param name new terminal widget name. */ $setName(id: string, name: string): void; /** * Send text to the terminal by id. * @param id - terminal id. * @param text - text content. * @param addNewLine - in case true - add new line after the text, otherwise - don't apply new line. */ $sendTextByTerminalId(id: number, text: string, addNewLine?: boolean): void; /** * Write data to the terminal by id. * @param id - terminal id. * @param data - data. */ $writeByTerminalId(id: number, data: string): void; /** * Resize the terminal by id. * @param id - terminal id. * @param cols - columns. * @param rows - rows. */ $resizeByTerminalId(id: number, cols: number, rows: number): void; /** * Show terminal on the UI panel. * @param id - terminal id. * @param preserveFocus - set terminal focus in case true value, and don't set focus otherwise. */ $showByTerminalId(id: number, preserveFocus?: boolean): void; /** * Hide UI panel where is located terminal widget. * @param id - terminal id. */ $hideByTerminalId(id: number): void; /** * Destroy terminal. * @param id - terminal id. * @param waitOnExit - Whether to wait for a key press before closing the terminal. */ $disposeByTerminalId(id: number, waitOnExit?: boolean | string): void; $setEnvironmentVariableCollection(persistent: boolean, extensionIdentifier: string, rootUri: string, collection: SerializableEnvironmentVariableCollection): void; /** * Set the terminal widget name. * @param id terminal id. * @param name new terminal widget name. */ $setNameByTerminalId(id: number, name: string): void; /** * Register a new terminal link provider. * @param providerId id of the terminal link provider to be registered. */ $registerTerminalLinkProvider(providerId: string): Promise; /** * Unregister the terminal link provider with the specified id. * @param providerId id of the terminal link provider to be unregistered. */ $unregisterTerminalLinkProvider(providerId: string): Promise; /** * Register a new terminal observer. * @param providerId id of the terminal link provider to be registered. * @param nrOfLinesToMatch the number of lines to match the outputMatcherRegex against * @param outputMatcherRegex the regex to match the output to */ $registerTerminalObserver(id: string, nrOfLinesToMatch: number, outputMatcherRegex: string): unknown; /** * Unregister the terminal observer with the specified id. * @param providerId id of the terminal observer to be unregistered. */ $unregisterTerminalObserver(id: string): unknown; } export interface TerminalOptions extends theia.TerminalOptions { iconUrl?: string | { light: string; dark: string; } | ThemeIcon; } export interface AutoFocus { autoFocusFirstEntry?: boolean; } export declare enum MainMessageType { Error = 0, Warning = 1, Info = 2 } export interface MainMessageOptions { detail?: string; modal?: boolean; onCloseActionHandle?: number; } export interface MainMessageItem { title: string; isCloseAffordance?: boolean; handle?: number; } export interface MessageRegistryMain { $showMessage(type: MainMessageType, message: string, options: MainMessageOptions, actions: MainMessageItem[]): PromiseLike; } export interface StatusBarMessageRegistryMain { $setMessage(id: string, name: string | undefined, text: string | undefined, priority: number, alignment: theia.StatusBarAlignment, color: string | undefined, backgroundColor: string | undefined, /** Value true indicates that the tooltip can be retrieved asynchronously */ tooltip: string | theia.MarkdownString | true | undefined, command: string | undefined, accessibilityInformation: theia.AccessibilityInformation, args: any[] | undefined): PromiseLike; $dispose(id: string): void; } export interface StatusBarMessageRegistryExt { $getMessage(id: string, cancellation: CancellationToken): theia.ProviderResult; } export interface QuickOpenExt { $onItemSelected(handle: number): void; $validateInput(input: string): Promise; $acceptOnDidAccept(sessionId: number): Promise; $acceptDidChangeValue(sessionId: number, changedValue: string): Promise; $acceptOnDidHide(sessionId: number): Promise; $acceptOnDidTriggerButton(sessionId: number, btn: QuickInputButtonHandle): Promise; $onDidTriggerItemButton(sessionId: number, itemHandle: number, buttonHandle: number): void; $onDidChangeActive(sessionId: number, handles: number[]): void; $onDidChangeSelection(sessionId: number, handles: number[]): void; showQuickPick(plugin: Plugin, itemsOrItemsPromise: Array | Promise>, options: theia.QuickPickOptions & { canPickMany: true; }, token?: theia.CancellationToken): Promise | undefined>; showQuickPick(plugin: Plugin, itemsOrItemsPromise: string[] | Promise, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise; showQuickPick(plugin: Plugin, itemsOrItemsPromise: Array | Promise>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise; showInput(options?: theia.InputBoxOptions, token?: theia.CancellationToken): PromiseLike; createQuickPick(plugin: Plugin): theia.QuickPick; createInputBox(plugin: Plugin): theia.InputBox; } /** * Options to configure the behaviour of a file open dialog. */ export interface OpenDialogOptionsMain { /** * Dialog title. * This parameter might be ignored, as not all operating systems display a title on open dialogs. */ title?: string; /** * The resource the dialog shows when opened. */ defaultUri?: string; /** * A human-readable string for the open button. */ openLabel?: string; /** * Allow to select files, defaults to `true`. */ canSelectFiles?: boolean; /** * Allow to select folders, defaults to `false`. */ canSelectFolders?: boolean; /** * Allow to select many files or folders. */ canSelectMany?: boolean; /** * A set of file filters that are used by the dialog. Each entry is a human readable label, * like "TypeScript", and an array of extensions, e.g. * ```ts * { * 'Images': ['png', 'jpg'] * 'TypeScript': ['ts', 'tsx'] * } * ``` */ filters?: { [name: string]: string[]; }; } /** * Options to configure the behaviour of a file save dialog. */ export interface SaveDialogOptionsMain { /** * Dialog title. * This parameter might be ignored, as not all operating systems display a title on save dialogs. */ title?: string; /** * The resource the dialog shows when opened. */ defaultUri?: string; /** * A human-readable string for the save button. */ saveLabel?: string; /** * A set of file filters that are used by the dialog. Each entry is a human readable label, * like "TypeScript", and an array of extensions, e.g. * ```ts * { * 'Images': ['png', 'jpg'] * 'TypeScript': ['ts', 'tsx'] * } * ``` */ filters?: { [name: string]: string[]; }; } /** * Options to configure the behaviour of a file upload dialog. */ export interface UploadDialogOptionsMain { /** * The resource, where files should be uploaded. */ defaultUri?: string; } export interface FileUploadResultMain { uploaded: string[]; } /** * Options to configure the behaviour of the [workspace folder](#WorkspaceFolder) pick UI. */ export interface WorkspaceFolderPickOptionsMain { /** * An optional string to show as place holder in the input box to guide the user what to pick on. */ placeHolder?: string; /** * Set to `true` to keep the picker open when focus moves to another part of the editor or to another window. */ ignoreFocusOut?: boolean; } export interface TransferQuickPickItem { handle: number; kind: 'item' | 'separator'; label: string; iconUrl?: string | { light: string; dark: string; } | ThemeIcon; description?: string; detail?: string; picked?: boolean; alwaysShow?: boolean; buttons?: readonly TransferQuickInputButton[]; resourceUri?: UriComponents; } export interface TransferQuickPickOptions { title?: string; placeHolder?: string; prompt?: string; matchOnDescription?: boolean; matchOnDetail?: boolean; matchOnLabel?: boolean; autoFocusOnList?: boolean; ignoreFocusLost?: boolean; canPickMany?: boolean; contextKey?: string; activeItem?: Promise | T; onDidFocus?: (entry: T) => void; } export interface TransferQuickInputButton { handle?: number; readonly iconUrl?: string | { light: string; dark: string; } | ThemeIcon; readonly tooltip?: string | undefined; readonly location?: number; readonly toggle?: { checked: boolean; }; } export type TransferQuickInput = TransferQuickPick | TransferInputBox; export interface BaseTransferQuickInput { [key: string]: any; id: number; type?: 'quickPick' | 'inputBox'; enabled?: boolean; busy?: boolean; visible?: boolean; } export interface TransferQuickPick extends BaseTransferQuickInput { type?: 'quickPick'; value?: string; placeholder?: string; prompt?: string; buttons?: TransferQuickInputButton[]; items?: TransferQuickPickItem[]; activeItems?: ReadonlyArray; selectedItems?: ReadonlyArray; canSelectMany?: boolean; ignoreFocusOut?: boolean; matchOnDescription?: boolean; matchOnDetail?: boolean; sortByLabel?: boolean; } export interface TransferInputBox extends BaseTransferQuickInput { type?: 'inputBox'; value?: string; placeholder?: string; password?: boolean; buttons?: TransferQuickInputButton[]; prompt?: string; validationMessage?: string; severity?: Severity; } export interface IInputBoxOptions { value?: string; valueSelection?: [number, number]; prompt?: string; placeHolder?: string; password?: boolean; ignoreFocusOut?: boolean; } export interface QuickOpenMain { $show(instance: number, options: TransferQuickPickOptions, token: CancellationToken): Promise; $setItems(instance: number, items: TransferQuickPickItem[]): Promise; $setError(instance: number, error: Error): Promise; $input(options: theia.InputBoxOptions, validateInput: boolean, token: CancellationToken): Promise; $createOrUpdate(params: TransferQuickInput): Promise; $dispose(id: number): Promise; $hide(): void; $showInputBox(options: TransferInputBox, validateInput: boolean): Promise; } export interface FindFilesOptions { exclude?: string; useDefaultExcludes?: boolean; useDefaultSearchExcludes?: boolean; maxResults?: number; useIgnoreFiles?: boolean; fuzzy?: boolean; } export interface WorkspaceMain { $pickWorkspaceFolder(options: WorkspaceFolderPickOptionsMain): Promise; $startFileSearch(includePattern: string, includeFolder: string | undefined, options: FindFilesOptions, token: theia.CancellationToken): PromiseLike; $findTextInFiles(query: theia.TextSearchQuery, options: theia.FindTextInFilesOptions, searchRequestId: number, token?: theia.CancellationToken): Promise; $registerTextDocumentContentProvider(scheme: string): Promise; $unregisterTextDocumentContentProvider(scheme: string): void; $onTextDocumentContentChange(uri: string, content: string): void; $updateWorkspaceFolders(start: number, deleteCount?: number, ...rootsToAdd: string[]): Promise; $getWorkspace(): Promise; $requestWorkspaceTrust(options?: theia.WorkspaceTrustRequestOptions): Promise; $resolveProxy(url: string): Promise; $registerCanonicalUriProvider(scheme: string): Promise; $unregisterCanonicalUriProvider(scheme: string): void; $getCanonicalUri(uri: string, targetScheme: string, token: theia.CancellationToken): Promise; $resolveDecoding(resource: UriComponents | undefined, options?: { encoding?: string; }): Promise<{ preferredEncoding: string; guessEncoding: boolean; }>; $resolveEncoding(resource: UriComponents | undefined, options?: { encoding?: string; }): Promise<{ encoding: string; hasBOM: boolean; }>; $getValidEncoding(uri: UriComponents | undefined, detectedEncoding: string | undefined, opts: { encoding: string; } | undefined): Promise; } export interface WorkspaceExt { $onWorkspaceFoldersChanged(event: WorkspaceRootsChangeEvent): void; $onWorkspaceLocationChanged(event: files.FileStat | undefined): void; $provideTextDocumentContent(uri: string): Promise; $onTextSearchResult(searchRequestId: number, done: boolean, result?: SearchInWorkspaceResult): void; $onWorkspaceTrustChanged(trust: boolean | undefined): void; $registerEditSessionIdentityProvider(scheme: string, provider: theia.EditSessionIdentityProvider): theia.Disposable; registerCanonicalUriProvider(scheme: string, provider: theia.CanonicalUriProvider): theia.Disposable; $disposeCanonicalUriProvider(scheme: string): void; getCanonicalUri(uri: theia.Uri, options: theia.CanonicalUriRequestOptions, token: CancellationToken): theia.ProviderResult; $provideCanonicalUri(uri: string, targetScheme: string, token: CancellationToken): Promise; } export interface TimelineExt { $getTimeline(source: string, uri: UriComponents, options: theia.TimelineOptions, internalOptions?: InternalTimelineOptions): Promise; } export interface TimelineMain { $registerTimelineProvider(provider: TimelineProviderDescriptor): Promise; $fireTimelineChanged(e: TimelineChangeEvent): Promise; $unregisterTimelineProvider(source: string): Promise; } export interface ThemingExt { $onColorThemeChange(type: ThemeType): void; } export interface ThemingMain extends Disposable { } export interface DialogsMain { $showOpenDialog(options: OpenDialogOptionsMain): Promise; $showSaveDialog(options: SaveDialogOptionsMain): Promise; $showUploadDialog(options: UploadDialogOptionsMain): Promise; } export interface RegisterTreeDataProviderOptions { manageCheckboxStateManually?: boolean; showCollapseAll?: boolean; canSelectMany?: boolean; dragMimeTypes?: string[]; dropMimeTypes?: string[]; } export interface TreeViewRevealOptions { readonly select: boolean; readonly focus: boolean; readonly expand: boolean | number; } export interface TreeViewsMain { $registerTreeDataProvider(treeViewId: string, options?: RegisterTreeDataProviderOptions): void; $readDroppedFile(contentId: string): Promise; $unregisterTreeDataProvider(treeViewId: string): void; $refresh(treeViewId: string, itemIds?: string[]): Promise; $reveal(treeViewId: string, elementParentChain: string[], options: TreeViewRevealOptions): Promise; $setMessage(treeViewId: string, message: string): void; $setTitle(treeViewId: string, title: string): void; $setDescription(treeViewId: string, description: string): void; $setBadge(treeViewId: string, badge: theia.ViewBadge | undefined): void; } export declare class DataTransferFileDTO { readonly name: string; readonly contentId: string; readonly uri?: UriComponents | undefined; constructor(name: string, contentId: string, uri?: UriComponents | undefined); static is(value: string | DataTransferFileDTO): value is DataTransferFileDTO; } export interface TreeViewsExt { $checkStateChanged(treeViewId: string, itemIds: { id: string; checked: boolean; }[]): Promise; $dragStarted(treeViewId: string, treeItemIds: string[], token: CancellationToken): Promise; $dragEnd(treeViewId: string): Promise; $drop(treeViewId: string, treeItemId: string | undefined, dataTransferItems: [string, string | DataTransferFileDTO][], token: CancellationToken): Promise; $getChildren(treeViewId: string, treeItemId: string | undefined): Promise; $hasResolveTreeItem(treeViewId: string): Promise; $resolveTreeItem(treeViewId: string, treeItemId: string, token: CancellationToken): Promise; $setExpanded(treeViewId: string, treeItemId: string, expanded: boolean): Promise; $setSelection(treeViewId: string, treeItemIds: string[]): Promise; $setVisible(treeViewId: string, visible: boolean): Promise; } export interface TreeViewItemCheckboxInfo { checked: boolean; tooltip?: string; accessibilityInformation?: AccessibilityInformation; } export interface TreeViewItem { id: string; label: string; /** Label highlights given as tuples of inclusive start index and exclusive end index. */ highlights?: [number, number][]; description?: string | boolean; icon?: string; iconUrl?: IconUrl; themeIcon?: ThemeIcon; resourceUri?: UriComponents; tooltip?: string | MarkdownString; collapsibleState?: TreeViewItemCollapsibleState; checkboxInfo?: TreeViewItemCheckboxInfo; contextValue?: string; command?: Command; accessibilityInformation?: theia.AccessibilityInformation; } export interface TreeViewItemReference { viewId: string; itemId: string; } export declare namespace TreeViewItemReference { function is(arg: unknown): arg is TreeViewItemReference; } /** * Collapsible state of the tree item */ export declare enum TreeViewItemCollapsibleState { /** * Determines an item can be neither collapsed nor expanded. Implies it has no children. */ None = 0, /** * Determines an item is collapsed */ Collapsed = 1, /** * Determines an item is expanded */ Expanded = 2 } export interface WindowMain { $openUri(uri: UriComponents): Promise; $asExternalUri(uri: UriComponents): Promise; } export interface WindowStateExt { $onDidChangeWindowFocus(focused: boolean): void; $onDidChangeWindowActive(active: boolean): void; } export interface NotificationExt { withProgress(options: ProgressOptions, task: (progress: Progress<{ message?: string; increment?: number; }>, token: CancellationToken) => PromiseLike): PromiseLike; $acceptProgressCanceled(progressId: string): void; } export interface ScmCommandArg { sourceControlHandle: number; resourceGroupHandle?: number; resourceStateHandle?: number; } export declare namespace ScmCommandArg { function is(arg: unknown): arg is ScmCommandArg; } export interface ScmExt { createSourceControl(plugin: Plugin, id: string, label: string, rootUri?: theia.Uri): theia.SourceControl; getLastInputBox(plugin: Plugin): theia.SourceControlInputBox | undefined; $onInputBoxValueChange(sourceControlHandle: number, message: string): Promise; $executeResourceCommand(sourceControlHandle: number, groupHandle: number, resourceHandle: number): Promise; $validateInput(sourceControlHandle: number, value: string, cursorPosition: number): Promise<[string, number] | undefined>; $setSelectedSourceControl(selectedSourceControlHandle: number | undefined): Promise; $provideOriginalResource(sourceControlHandle: number, uri: string, token: theia.CancellationToken): Promise; } export declare namespace TimelineCommandArg { function is(arg: unknown): arg is TimelineCommandArg; } export interface TimelineCommandArg { timelineHandle: string; source: string; uri: string; } export interface DecorationRequest { readonly id: number; readonly uri: UriComponents; } export type DecorationData = [boolean, string, string, ThemeColor]; export interface DecorationReply { [id: number]: DecorationData; } export declare namespace CommentsCommandArg { function is(arg: unknown): arg is CommentsCommandArg; } export interface CommentsCommandArg { commentControlHandle: number; commentThreadHandle: number; text: string; } export declare namespace CommentsContextCommandArg { function is(arg: unknown): arg is CommentsContextCommandArg; } export interface CommentsContextCommandArg { commentControlHandle: number; commentThreadHandle: number; commentUniqueId: number; } export declare namespace CommentsEditCommandArg { function is(arg: unknown): arg is CommentsEditCommandArg; } export interface CommentsEditCommandArg { commentControlHandle: number; commentThreadHandle: number; commentUniqueId: number; text: string; } export interface DecorationsExt { registerFileDecorationProvider(provider: theia.FileDecorationProvider, pluginInfo: PluginInfo): theia.Disposable; $provideDecorations(handle: number, requests: DecorationRequest[], token: CancellationToken): Promise; } export interface DecorationsMain { $registerDecorationProvider(handle: number): Promise; $unregisterDecorationProvider(handle: number): void; $onDidChange(handle: number, resources: UriComponents[] | null): void; } export interface ScmMain { $registerSourceControl(sourceControlHandle: number, id: string, label: string, rootUri?: UriComponents, parentHandle?: number): Promise; $updateSourceControl(sourceControlHandle: number, features: SourceControlProviderFeatures): Promise; $unregisterSourceControl(sourceControlHandle: number): Promise; $registerGroups(sourceControlHandle: number, groups: ScmRawResourceGroup[], splices: ScmRawResourceSplices[]): void; $updateGroup(sourceControlHandle: number, groupHandle: number, features: SourceControlGroupFeatures): void; $updateGroupLabel(sourceControlHandle: number, groupHandle: number, label: string): void; $unregisterGroup(sourceControlHandle: number, groupHandle: number): void; $spliceResourceStates(sourceControlHandle: number, splices: ScmRawResourceSplices[]): void; $setInputBoxValue(sourceControlHandle: number, value: string): void; $setInputBoxPlaceholder(sourceControlHandle: number, placeholder: string): void; $setInputBoxVisible(sourceControlHandle: number, visible: boolean): void; $setInputBoxEnabled(sourceControlHandle: number, enabled: boolean): void; $setActionButton(sourceControlHandle: number, actionButton: ScmActionButton | undefined): void; } export interface SourceControlProviderFeatures { hasQuickDiffProvider?: boolean; count?: number; commitTemplate?: string; acceptInputCommand?: Command; statusBarCommands?: Command[]; contextValue?: string; } export interface SourceControlGroupFeatures { hideWhenEmpty: boolean | undefined; contextValue: string | undefined; } export interface ScmRawResource { handle: number; sourceUri: UriComponents; icons: (IconUrl | ThemeIcon | undefined)[]; tooltip: string; strikeThrough: boolean; faded: boolean; contextValue: string; command: Command | undefined; } export interface ScmRawResourceGroup { handle: number; id: string; label: string; features: SourceControlGroupFeatures; } export interface ScmRawResourceSplice { start: number; deleteCount: number; rawResources: ScmRawResource[]; } export interface ScmRawResourceSplices { handle: number; splices: ScmRawResourceSplice[]; } export interface SourceControlResourceState { readonly handle: number; /** * The uri of the underlying resource inside the workspace. */ readonly resourceUri: string; /** * The command which should be run when the resource * state is open in the Source Control viewlet. */ readonly command?: Command; /** * The decorations for this source control * resource state. */ readonly decorations?: SourceControlResourceDecorations; readonly letter?: string; readonly colorId?: string; } /** * The decorations for a [source control resource state](#SourceControlResourceState). * Can be independently specified for light and dark themes. */ export interface SourceControlResourceDecorations { /** * Whether the source control resource state should be striked-through in the UI. */ readonly strikeThrough?: boolean; /** * Whether the source control resource state should be faded in the UI. */ readonly faded?: boolean; /** * The title for a specific source control resource state. */ readonly tooltip?: string; /** * The icon path for a specific source control resource state. */ readonly iconPath?: string; } export interface ScmActionButton { command: Command; secondaryCommands?: Command[][]; enabled?: boolean; description?: string; } export interface NotificationMain { $startProgress(options: NotificationMain.StartProgressOptions): Promise; $stopProgress(id: string): void; $updateProgress(id: string, report: NotificationMain.ProgressReport): void; } export declare namespace NotificationMain { interface StartProgressOptions { title: string; location?: string; cancellable?: boolean; } interface ProgressReport { message?: string; increment?: number; total?: number; } } export declare enum EditorPosition { ONE = 0, TWO = 1, THREE = 2, FOUR = 3, FIVE = 4, SIX = 5, SEVEN = 6, EIGHT = 7, NINE = 8 } export interface Position { readonly lineNumber: number; readonly column: number; } export interface Selection { /** * The line number on which the selection has started. */ readonly selectionStartLineNumber: number; /** * The column on `selectionStartLineNumber` where the selection has started. */ readonly selectionStartColumn: number; /** * The line number on which the selection has ended. */ readonly positionLineNumber: number; /** * The column on `positionLineNumber` where the selection has ended. */ readonly positionColumn: number; } export interface TextEditorConfiguration { tabSize: number; indentSize: number; insertSpaces: boolean; cursorStyle: TextEditorCursorStyle; lineNumbers: TextEditorLineNumbersStyle; } export interface TextEditorConfigurationUpdate { tabSize?: number | 'auto'; indentSize?: number | 'tabSize'; insertSpaces?: boolean | 'auto'; cursorStyle?: TextEditorCursorStyle; lineNumbers?: TextEditorLineNumbersStyle; } export declare enum TextEditorRevealType { Default = 0, InCenter = 1, InCenterIfOutsideViewport = 2, AtTop = 3 } export interface SelectionChangeEvent { selections: Selection[]; source?: string; } export interface EditorChangedPropertiesData { options?: TextEditorConfiguration; selections?: SelectionChangeEvent; visibleRanges?: Range[]; } export interface TextEditorPositionData { [id: string]: EditorPosition; } export interface TextEditorDiffInformationDto { readonly documentVersion: number; readonly original: UriComponents | undefined; readonly modified: UriComponents; readonly changes: readonly { readonly original: { readonly startLineNumber: number; readonly endLineNumberExclusive: number; }; readonly modified: { readonly startLineNumber: number; readonly endLineNumberExclusive: number; }; readonly kind: number; }[]; readonly isStale: boolean; } export interface TextEditorsExt { $acceptEditorPropertiesChanged(id: string, props: EditorChangedPropertiesData): void; $acceptEditorPositionData(data: TextEditorPositionData): void; $acceptEditorDiffInformation(id: string, diffInformation: TextEditorDiffInformationDto[] | undefined): void; } export interface SingleEditOperation { range?: Range; text?: string; forceMoveMarkers?: boolean; } export interface UndoStopOptions { undoStopBefore: boolean; undoStopAfter: boolean; } export interface ApplyEditsOptions extends UndoStopOptions { setEndOfLine: EndOfLine | undefined; } export interface SnippetEditOptions extends UndoStopOptions { keepWhitespace?: boolean; } export interface ThemeColor { id: string; } export interface ThemeIcon { id: string; color?: ThemeColor; } /** * Describes the behavior of decorations when typing/editing near their edges. */ export declare enum TrackedRangeStickiness { AlwaysGrowsWhenTypingAtEdges = 0, NeverGrowsWhenTypingAtEdges = 1, GrowsOnlyWhenTypingBefore = 2, GrowsOnlyWhenTypingAfter = 3 } export interface ContentDecorationRenderOptions { contentText?: string; contentIconPath?: UriComponents; border?: string; borderColor?: string | ThemeColor; fontStyle?: string; fontWeight?: string; textDecoration?: string; color?: string | ThemeColor; backgroundColor?: string | ThemeColor; margin?: string; width?: string; height?: string; } export interface ThemeDecorationRenderOptions { backgroundColor?: string | ThemeColor; outline?: string; outlineColor?: string | ThemeColor; outlineStyle?: string; outlineWidth?: string; border?: string; borderColor?: string | ThemeColor; borderRadius?: string; borderSpacing?: string; borderStyle?: string; borderWidth?: string; fontStyle?: string; fontWeight?: string; textDecoration?: string; cursor?: string; color?: string | ThemeColor; opacity?: string; letterSpacing?: string; gutterIconPath?: UriComponents; gutterIconSize?: string; overviewRulerColor?: string | ThemeColor; before?: ContentDecorationRenderOptions; after?: ContentDecorationRenderOptions; } export interface DecorationRenderOptions extends ThemeDecorationRenderOptions { isWholeLine?: boolean; rangeBehavior?: TrackedRangeStickiness; overviewRulerLane?: OverviewRulerLane; light?: ThemeDecorationRenderOptions; dark?: ThemeDecorationRenderOptions; } export interface ThemeDecorationInstanceRenderOptions { before?: ContentDecorationRenderOptions; after?: ContentDecorationRenderOptions; } export interface DecorationInstanceRenderOptions extends ThemeDecorationInstanceRenderOptions { light?: ThemeDecorationInstanceRenderOptions; dark?: ThemeDecorationInstanceRenderOptions; } export interface DecorationOptions { range: Range; hoverMessage?: MarkdownString | MarkdownString[]; renderOptions?: DecorationInstanceRenderOptions; } export interface TextEditorsMain { $tryShowTextDocument(uri: UriComponents, options?: TextDocumentShowOptions): Promise; $registerTextEditorDecorationType(key: string, options: DecorationRenderOptions): void; $removeTextEditorDecorationType(key: string): void; $tryHideEditor(id: string): Promise; $trySetOptions(id: string, options: TextEditorConfigurationUpdate): Promise; $trySetDecorations(id: string, key: string, ranges: DecorationOptions[]): Promise; $trySetDecorationsFast(id: string, key: string, ranges: number[]): Promise; $tryRevealRange(id: string, range: Range, revealType: TextEditorRevealType): Promise; $trySetSelections(id: string, selections: Selection[]): Promise; $tryApplyEdits(id: string, modelVersionId: number, edits: SingleEditOperation[], opts: ApplyEditsOptions): Promise; $tryApplyWorkspaceEdit(workspaceEditDto: WorkspaceEditDto, metadata?: WorkspaceEditMetadataDto): Promise; $tryInsertSnippet(id: string, template: string, selections: Range[], opts: SnippetEditOptions): Promise; $save(uri: UriComponents): PromiseLike; $saveAs(uri: UriComponents): PromiseLike; $saveAll(includeUntitled?: boolean): Promise; $getDiffInformation(id: string): Promise; } export interface ModelAddedData { uri: UriComponents; versionId: number; lines: string[]; languageId?: string; EOL: string; modeId: string; isDirty: boolean; encoding: string; } export interface TextEditorAddData { id: string; documentUri: UriComponents; options: TextEditorConfiguration; selections: Selection[]; visibleRanges: Range[]; editorPosition?: EditorPosition; } export interface EditorsAndDocumentsDelta { removedDocuments?: UriComponents[]; addedDocuments?: ModelAddedData[]; removedEditors?: string[]; addedEditors?: TextEditorAddData[]; /** * undefined means no changes * null means no active * string means id of active */ newActiveEditor?: string | null; } export interface EditorsAndDocumentsExt { $acceptEditorsAndDocumentsDelta(delta: EditorsAndDocumentsDelta): void; } export interface ModelContentChange { readonly range: Range; readonly rangeOffset: number; readonly rangeLength: number; readonly text: string; } export interface ModelChangedEvent { readonly changes: ModelContentChange[]; readonly eol: string; readonly versionId: number; readonly reason: TextDocumentChangeReason | undefined; } export interface DocumentsExt { $acceptModelModeChanged(startUrl: UriComponents, oldModeId: string, newModeId: string): void; $acceptModelSaved(strUrl: UriComponents): void; $acceptModelWillSave(strUrl: UriComponents, reason: theia.TextDocumentSaveReason, saveTimeout: number): Promise; $acceptDirtyStateChanged(strUrl: UriComponents, isDirty: boolean): void; $acceptEncodingChanged(strUrl: UriComponents, encoding: string): void; $acceptModelChanged(strUrl: UriComponents, e: ModelChangedEvent, isDirty: boolean): void; } export interface DocumentsMain { $tryCreateDocument(options?: { language?: string; content?: string; encoding?: string; }): Promise; $tryShowDocument(uri: UriComponents, options?: TextDocumentShowOptions): Promise; $tryOpenDocument(uri: UriComponents, encoding?: string): Promise; $trySaveDocument(uri: UriComponents): Promise; } export interface EnvMain { $getEnvVariable(envVarName: string): Promise; $getClientOperatingSystem(): Promise; } export interface PreferenceRegistryMain { $updateConfigurationOption(target: boolean | ConfigurationTarget | undefined, key: string, value: any, resource?: string, withLanguageOverride?: boolean): PromiseLike; $removeConfigurationOption(target: boolean | ConfigurationTarget | undefined, key: string, resource?: string, withLanguageOverride?: boolean): PromiseLike; } export interface PreferenceChangeExt { preferenceName: string; newValue: any; /** * The URI the folder affected, or undefined if User scope. */ scope?: string; } export interface TerminalOptionsExt { attributes?: { [key: string]: string; }; } export interface PreferenceRegistryExt { $acceptConfigurationChanged(data: { [key: string]: any; }, eventData: PreferenceChangeExt[]): void; } export interface OutputChannelRegistryMain { $append(channelName: string, value: string, pluginInfo: PluginInfo): PromiseLike; $clear(channelName: string): PromiseLike; $dispose(channelName: string): PromiseLike; $reveal(channelName: string, preserveFocus: boolean): PromiseLike; $close(channelName: string): PromiseLike; } export type CharacterPair = [string, string]; export interface LineCommentRule { comment: string; noIndent?: boolean; } export interface CommentRule { lineComment?: string | LineCommentRule; blockComment?: CharacterPair; } export interface SerializedRegExp { pattern: string; flags?: string; } export interface SerializedIndentationRule { decreaseIndentPattern?: SerializedRegExp; increaseIndentPattern?: SerializedRegExp; indentNextLinePattern?: SerializedRegExp; unIndentedLinePattern?: SerializedRegExp; } export interface SerializedOnEnterRule { beforeText: SerializedRegExp; afterText?: SerializedRegExp; previousLineText?: SerializedRegExp; action: SerializedEnterAction; } export interface SerializedEnterAction { indentAction: IndentAction; outdentCurrentLine?: boolean; appendText?: string; removeText?: number; } export interface SerializedAutoClosingPair { open: string; close: string; notIn?: string[]; } export interface SerializedLanguageConfiguration { comments?: CommentRule; brackets?: CharacterPair[]; wordPattern?: SerializedRegExp; indentationRules?: SerializedIndentationRule; onEnterRules?: SerializedOnEnterRule[]; autoClosingPairs?: SerializedAutoClosingPair[]; } export interface CodeActionDto { title: string; edit?: WorkspaceEditDto; diagnostics?: MarkerData[]; command?: Command; kind?: string; isPreferred?: boolean; disabled?: string; } export interface WorkspaceEditEntryMetadataDto { needsConfirmation: boolean; label: string; description?: string; iconPath?: UriComponents | ThemeIcon | { light: UriComponents; dark: UriComponents; }; } export interface WorkspaceFileEditDto { oldResource?: UriComponents; newResource?: UriComponents; options?: FileOperationOptions; metadata?: WorkspaceEditEntryMetadataDto; } export interface WorkspaceTextEditDto { resource: UriComponents; modelVersionId?: number; textEdit: TextEdit & { insertAsSnippet?: boolean; keepWhitespace?: boolean; }; metadata?: WorkspaceEditEntryMetadataDto; } export declare namespace WorkspaceTextEditDto { function is(arg: WorkspaceTextEditDto | WorkspaceFileEditDto): arg is WorkspaceTextEditDto; } export interface WorkspaceEditMetadataDto { isRefactoring?: boolean; } export type CellEditOperationDto = { editType: notebookCommon.CellEditType.Metadata; index: number; metadata: Record; } | { editType: notebookCommon.CellEditType.DocumentMetadata; metadata: Record; } | { editType: notebookCommon.CellEditType.Replace; index: number; count: number; cells: NotebookCellDataDto[]; }; export interface NotebookWorkspaceEditMetadataDto { needsConfirmation: boolean; label: string; description?: string; } export interface WorkspaceNotebookCellEditDto { metadata?: NotebookWorkspaceEditMetadataDto; resource: UriComponents; cellEdit: CellEditOperationDto; } export declare namespace WorkspaceNotebookCellEditDto { function is(arg: WorkspaceNotebookCellEditDto | WorkspaceFileEditDto | WorkspaceTextEditDto): arg is WorkspaceNotebookCellEditDto; } export interface WorkspaceEditDto { edits: Array; } export interface CommandProperties { command: string; args?: string[]; options?: { cwd?: string; [key: string]: any; }; } export type TaskGroupKind = 'build' | 'test' | 'rebuild' | 'clean'; export interface TaskDto { type: string; executionType?: 'shell' | 'process' | 'customExecution'; executionId?: string; label: string; source?: string; scope: string | number; problemMatcher?: any; group?: { kind: TaskGroupKind; isDefault: boolean; }; detail?: string; presentation?: TaskPresentationOptionsDTO; runOptions?: RunOptionsDTO; [key: string]: any; } export interface RunOptionsDTO { reevaluateOnRerun?: boolean; } export interface TaskPresentationOptionsDTO { reveal?: number; focus?: boolean; echo?: boolean; panel?: number; showReuseMessage?: boolean; clear?: boolean; close?: boolean; } export interface TaskExecutionDto { id: number; task: TaskDto; } export interface ProcessTaskDto extends TaskDto, CommandProperties { windows?: CommandProperties; } export interface PluginInfo { id: string; name: string; displayName?: string; } export interface HoverWithId extends Hover { id: number; } export interface LanguageStatus { readonly id: string; readonly name: string; readonly selector: SerializedDocumentFilter[]; readonly severity: Severity; readonly label: string; readonly detail: string; readonly busy: boolean; readonly source: string; readonly command: Command | undefined; readonly accessibilityInfo: theia.AccessibilityInformation | undefined; } export interface LanguagesExt { $provideCompletionItems(handle: number, resource: UriComponents, position: Position, context: CompletionContext, token: CancellationToken): Promise; $resolveCompletionItem(handle: number, chainedId: ChainedCacheId, token: CancellationToken): Promise; $releaseCompletionItems(handle: number, id: number): void; $provideImplementation(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise; $provideTypeDefinition(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise; $provideDefinition(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise; $provideDeclaration(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise; $provideReferences(handle: number, resource: UriComponents, position: Position, context: ReferenceContext, token: CancellationToken): Promise; $provideSignatureHelp(handle: number, resource: UriComponents, position: Position, context: SignatureHelpContext, token: CancellationToken): Promise; $releaseSignatureHelp(handle: number, id: number): void; $provideHover(handle: number, resource: UriComponents, position: Position, context: HoverContext<{ id: number; }> | undefined, token: CancellationToken): Promise; $releaseHover(handle: number, id: number): void; $provideEvaluatableExpression(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise; $provideInlineValues(handle: number, resource: UriComponents, range: Range, context: InlineValueContext, token: CancellationToken): Promise; $provideDocumentHighlights(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise; $provideDocumentFormattingEdits(handle: number, resource: UriComponents, options: FormattingOptions, token: CancellationToken): Promise; $provideDocumentRangeFormattingEdits(handle: number, resource: UriComponents, range: Range, options: FormattingOptions, token: CancellationToken): Promise; $provideOnTypeFormattingEdits(handle: number, resource: UriComponents, position: Position, ch: string, options: FormattingOptions, token: CancellationToken): Promise; $provideDocumentDropEdits(handle: number, resource: UriComponents, position: Position, dataTransfer: DataTransferDTO, token: CancellationToken): Promise; $provideDocumentLinks(handle: number, resource: UriComponents, token: CancellationToken): Promise; $resolveDocumentLink(handle: number, link: DocumentLink, token: CancellationToken): Promise; $releaseDocumentLinks(handle: number, ids: number[]): void; $provideCodeLenses(handle: number, resource: UriComponents, token: CancellationToken): Promise; $resolveCodeLens(handle: number, resource: UriComponents, symbol: CodeLensSymbol, token: CancellationToken): Promise; $releaseCodeLenses(handle: number, ids: number[]): void; $provideCodeActions(handle: number, resource: UriComponents, rangeOrSelection: Range | Selection, context: CodeActionContext, token: CancellationToken): Promise; $releaseCodeActions(handle: number, cacheIds: number[]): void; $resolveCodeAction(handle: number, cacheId: number, token: CancellationToken): Promise; $provideDocumentSymbols(handle: number, resource: UriComponents, token: CancellationToken): Promise; $provideWorkspaceSymbols(handle: number, query: string, token: CancellationToken): PromiseLike; $resolveWorkspaceSymbol(handle: number, symbol: SymbolInformation, token: CancellationToken): PromiseLike; $provideFoldingRange(handle: number, resource: UriComponents, context: FoldingContext, token: CancellationToken): PromiseLike; $provideSelectionRanges(handle: number, resource: UriComponents, positions: Position[], token: CancellationToken): PromiseLike; $provideDocumentColors(handle: number, resource: UriComponents, token: CancellationToken): PromiseLike; $provideColorPresentations(handle: number, resource: UriComponents, colorInfo: RawColorInfo, token: CancellationToken): PromiseLike; $provideInlayHints(handle: number, resource: UriComponents, range: Range, token: CancellationToken): Promise; $resolveInlayHint(handle: number, id: ChainedCacheId, token: CancellationToken): Promise; $releaseInlayHints(handle: number, id: number): void; $provideRenameEdits(handle: number, resource: UriComponents, position: Position, newName: string, token: CancellationToken): PromiseLike; $resolveRenameLocation(handle: number, resource: UriComponents, position: Position, token: CancellationToken): PromiseLike; $provideDocumentSemanticTokens(handle: number, resource: UriComponents, previousResultId: number, token: CancellationToken): Promise; $releaseDocumentSemanticTokens(handle: number, semanticColoringResultId: number): void; $provideDocumentRangeSemanticTokens(handle: number, resource: UriComponents, range: Range, token: CancellationToken): Promise; $provideRootDefinition(handle: number, resource: UriComponents, location: Position, token: CancellationToken): Promise; $provideCallers(handle: number, definition: CallHierarchyItem, token: CancellationToken): Promise; $provideCallees(handle: number, definition: CallHierarchyItem, token: CancellationToken): Promise; $provideLinkedEditingRanges(handle: number, resource: UriComponents, position: Position, token: CancellationToken): Promise; $releaseCallHierarchy(handle: number, session?: string): Promise; $prepareTypeHierarchy(handle: number, resource: UriComponents, location: Position, token: theia.CancellationToken): Promise; $provideSuperTypes(handle: number, sessionId: string, itemId: string, token: theia.CancellationToken): Promise; $provideSubTypes(handle: number, sessionId: string, itemId: string, token: theia.CancellationToken): Promise; $releaseTypeHierarchy(handle: number, session?: string): Promise; $provideInlineCompletions(handle: number, resource: UriComponents, position: Position, context: InlineCompletionContext, token: CancellationToken): Promise; $freeInlineCompletionsList(handle: number, pid: number): void; } export declare const LanguagesMainFactory: unique symbol; export interface LanguagesMainFactory { (proxy: RPCProtocol): LanguagesMain; } export declare const OutputChannelRegistryFactory: unique symbol; export interface OutputChannelRegistryFactory { (): OutputChannelRegistryMain; } export interface LanguagesMain { $getLanguages(): Promise; $changeLanguage(resource: UriComponents, languageId: string): Promise; $setLanguageConfiguration(handle: number, languageId: string, configuration: SerializedLanguageConfiguration): void; $unregister(handle: number): void; $registerCompletionSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], triggerCharacters: string[], supportsResolveDetails: boolean): void; $registerImplementationProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $registerTypeDefinitionProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $registerDefinitionProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $registerDeclarationProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $registerReferenceProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $registerSignatureHelpProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], metadata: theia.SignatureHelpProviderMetadata): void; $registerHoverProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $registerEvaluatableExpressionProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $registerInlineValuesProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $emitInlineValuesEvent(eventHandle: number, event?: any): void; $registerDocumentHighlightProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $registerQuickFixProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], codeActionKinds?: string[], documentation?: CodeActionProviderDocumentation): void; $clearDiagnostics(id: string): void; $changeDiagnostics(id: string, delta: [string, MarkerData[]][]): void; $registerDocumentFormattingSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $registerDocumentDropEditProvider(handle: number, selector: SerializedDocumentFilter[], metadata?: DocumentDropEditProviderMetadata): void; $registerRangeFormattingSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $registerOnTypeFormattingProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], autoFormatTriggerCharacters: string[]): void; $registerDocumentLinkProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $registerCodeLensSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], eventHandle?: number): void; $emitCodeLensEvent(eventHandle: number, event?: any): void; $registerOutlineSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], displayName?: string): void; $registerWorkspaceSymbolProvider(handle: number, pluginInfo: PluginInfo): void; $registerFoldingRangeProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], eventHandle?: number): void; $emitFoldingRangeEvent(handle: number, event?: any): void; $registerSelectionRangeProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $registerDocumentColorProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void; $registerInlayHintsProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], displayName?: string, eventHandle?: number): void; $emitInlayHintsEvent(eventHandle: number, event?: any): void; $registerRenameProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], supportsResolveInitialValues: boolean): void; $registerDocumentSemanticTokensProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], legend: theia.SemanticTokensLegend, eventHandle: number | undefined): void; $emitDocumentSemanticTokensEvent(eventHandle: number): void; $registerDocumentRangeSemanticTokensProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], legend: theia.SemanticTokensLegend, eventHandle: number | undefined): void; $registerCallHierarchyProvider(handle: number, selector: SerializedDocumentFilter[]): void; $registerLinkedEditingRangeProvider(handle: number, selector: SerializedDocumentFilter[]): void; $registerTypeHierarchyProvider(handle: number, selector: SerializedDocumentFilter[]): void; $setLanguageStatus(handle: number, status: LanguageStatus): void; $removeLanguageStatus(handle: number): void; $registerInlineCompletionsSupport(handle: number, selector: SerializedDocumentFilter[]): void; } export interface WebviewInitData { webviewResourceRoot: string; webviewCspSource: string; } export interface WebviewPanelViewState { readonly active: boolean; readonly visible: boolean; readonly position: number; } export interface WebviewsExt { $onMessage(handle: string, message: any): void; $onDidChangeWebviewPanelViewState(handle: string, newState: WebviewPanelViewState): void; $onDidDisposeWebviewPanel(handle: string): PromiseLike; $deserializeWebviewPanel(newWebviewHandle: string, viewType: string, title: string, state: any, viewState: WebviewPanelViewState, options: theia.WebviewOptions & theia.WebviewPanelOptions): PromiseLike; } export interface WebviewsMain { $createWebviewPanel(handle: string, viewType: string, title: string, showOptions: theia.WebviewPanelShowOptions, options: theia.WebviewPanelOptions & theia.WebviewOptions): void; $disposeWebview(handle: string): void; $reveal(handle: string, showOptions: theia.WebviewPanelShowOptions): void; $setTitle(handle: string, value: string): void; $setIconPath(handle: string, value: IconUrl | ThemeIcon | undefined): void; $setHtml(handle: string, value: string): void; $setOptions(handle: string, options: theia.WebviewOptions): void; $postMessage(handle: string, value: any): Thenable; $registerSerializer(viewType: string): void; $unregisterSerializer(viewType: string): void; } export interface WebviewViewsExt { $resolveWebviewView(handle: string, viewType: string, title: string | undefined, state: any, cancellation: CancellationToken): Promise; $onDidChangeWebviewViewVisibility(handle: string, visible: boolean): void; $disposeWebviewView(handle: string): void; } export interface WebviewViewsMain extends Disposable { $registerWebviewViewProvider(viewType: string, options: { retainContextWhenHidden?: boolean; serializeBuffersForPostMessage: boolean; }): void; $unregisterWebviewViewProvider(viewType: string): void; $setWebviewViewTitle(handle: string, value: string | undefined): void; $setWebviewViewDescription(handle: string, value: string | undefined): void; $setBadge(handle: string, badge: theia.ViewBadge | undefined): void; $show(handle: string, preserveFocus: boolean): void; } export interface CustomEditorsExt { $resolveWebviewEditor(resource: UriComponents, newWebviewHandle: string, viewType: string, title: string, position: number, options: theia.WebviewPanelOptions, cancellation: CancellationToken): Promise; $createCustomDocument(resource: UriComponents, viewType: string, openContext: theia.CustomDocumentOpenContext, cancellation: CancellationToken): Promise<{ editable: boolean; }>; $disposeCustomDocument(resource: UriComponents, viewType: string): Promise; $undo(resource: UriComponents, viewType: string, editId: number, isDirty: boolean): Promise; $redo(resource: UriComponents, viewType: string, editId: number, isDirty: boolean): Promise; $revert(resource: UriComponents, viewType: string, cancellation: CancellationToken): Promise; $disposeEdits(resourceComponents: UriComponents, viewType: string, editIds: number[]): void; $save(resource: UriComponents, viewType: string, cancellation: CancellationToken): Promise; $saveAs(resource: UriComponents, viewType: string, targetResource: UriComponents, cancellation: CancellationToken): Promise; $onMoveCustomEditor(handle: string, newResource: UriComponents, viewType: string): Promise; } export interface CustomTextEditorCapabilities { readonly supportsMove?: boolean; } export interface CustomEditorsMain { $registerTextEditorProvider(viewType: string, options: theia.WebviewPanelOptions, capabilities: CustomTextEditorCapabilities): void; $registerCustomEditorProvider(viewType: string, options: theia.WebviewPanelOptions, supportsMultipleEditorsPerDocument: boolean): void; $unregisterEditorProvider(viewType: string): void; $onDidEdit(resource: UriComponents, viewType: string, editId: number, label: string | undefined): void; $onContentChange(resource: UriComponents, viewType: string): void; } export interface StorageMain { $set(key: string, value: KeysToAnyValues, isGlobal: boolean): Promise; $get(key: string, isGlobal: boolean): Promise; $getAll(isGlobal: boolean): Promise; } export interface StorageExt { $updatePluginsWorkspaceData(data: KeysToKeysToAnyValue): void; } /** * A DebugConfigurationProviderTriggerKind specifies when the `provideDebugConfigurations` method of a `DebugConfigurationProvider` should be called. * Currently there are two situations: * (1) providing debug configurations to populate a newly created `launch.json` * (2) providing dynamically generated configurations when the user asks for them through the UI (e.g. via the "Select and Start Debugging" command). * A trigger kind is used when registering a `DebugConfigurationProvider` with {@link debug.registerDebugConfigurationProvider}. */ export declare enum DebugConfigurationProviderTriggerKind { /** * `DebugConfigurationProvider.provideDebugConfigurations` is called to provide the initial debug * configurations for a newly created launch.json. */ Initial = 1, /** * `DebugConfigurationProvider.provideDebugConfigurations` is called to provide dynamically generated debug configurations when the user asks for them through the UI * (e.g. via the "Select and Start Debugging" command). */ Dynamic = 2 } export interface DebugConfigurationProvider { readonly handle: number; readonly type: string; readonly triggerKind: DebugConfigurationProviderTriggerKind; provideDebugConfigurations?(folder: string | undefined): Promise; resolveDebugConfiguration?(folder: string | undefined, debugConfiguration: theia.DebugConfiguration): Promise; resolveDebugConfigurationWithSubstitutedVariables?(folder: string | undefined, debugConfiguration: theia.DebugConfiguration): Promise; } export interface DebugConfigurationProviderDescriptor { readonly handle: number; readonly type: string; readonly trigger: DebugConfigurationProviderTriggerKind; readonly provideDebugConfiguration: boolean; readonly resolveDebugConfigurations: boolean; readonly resolveDebugConfigurationWithSubstitutedVariables: boolean; } export interface DebugExt { $onSessionCustomEvent(sessionId: string, event: string, body?: any): void; $breakpointsDidChange(added: Breakpoint[], removed: string[], changed: Breakpoint[]): void; $sessionDidCreate(sessionId: string): void; $sessionDidStart(sessionId: string): void; $sessionDidDestroy(sessionId: string): void; $sessionDidChange(sessionId: string | undefined): void; $provideDebugConfigurationsByHandle(handle: number, workspaceFolder: string | undefined): Promise; $resolveDebugConfigurationByHandle(handle: number, workspaceFolder: string | undefined, debugConfiguration: theia.DebugConfiguration): Promise; $resolveDebugConfigurationWithSubstitutedVariablesByHandle(handle: number, workspaceFolder: string | undefined, debugConfiguration: DebugConfiguration): Promise; $onDidChangeActiveFrame(frame: DebugStackFrameDTO | undefined): void; $onDidChangeActiveThread(thread: DebugThreadDTO | undefined): void; $createDebugSession(debugConfiguration: DebugConfiguration, workspaceFolder: string | undefined): Promise; $terminateDebugSession(sessionId: string): Promise; $getTerminalCreationOptions(debugType: string): Promise; } export interface DebugMain { $appendToDebugConsole(value: string): Promise; $appendLineToDebugConsole(value: string): Promise; $registerDebuggerContribution(description: DebuggerDescription): Promise; $unregisterDebuggerConfiguration(debugType: string): Promise; $registerDebugConfigurationProvider(description: DebugConfigurationProviderDescriptor): void; $unregisterDebugConfigurationProvider(handle: number): Promise; $addBreakpoints(breakpoints: Breakpoint[]): Promise; $removeBreakpoints(breakpoints: string[]): Promise; $startDebugging(folder: theia.WorkspaceFolder | undefined, nameOrConfiguration: string | theia.DebugConfiguration, options: DebugSessionOptions): Promise; $stopDebugging(sessionId?: string): Promise; $customRequest(sessionId: string, command: string, args?: any): Promise; $getDebugProtocolBreakpoint(sessionId: string, breakpointId: string): Promise; } export interface FileSystemExt { $acceptProviderInfos(scheme: string, capabilities?: files.FileSystemProviderCapabilities): void; $stat(handle: number, resource: UriComponents): Promise; $readdir(handle: number, resource: UriComponents): Promise<[string, files.FileType][]>; $readFile(handle: number, resource: UriComponents): Promise; $writeFile(handle: number, resource: UriComponents, content: BinaryBuffer, opts: files.FileWriteOptions): Promise; $rename(handle: number, resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise; $copy(handle: number, resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise; $mkdir(handle: number, resource: UriComponents): Promise; $delete(handle: number, resource: UriComponents, opts: files.FileDeleteOptions): Promise; $watch(handle: number, session: number, resource: UriComponents, opts: files.WatchOptions): void; $unwatch(handle: number, session: number): void; $open(handle: number, resource: UriComponents, opts: files.FileOpenOptions): Promise; $close(handle: number, fd: number): Promise; $read(handle: number, fd: number, pos: number, length: number): Promise; $write(handle: number, fd: number, pos: number, data: BinaryBuffer): Promise; } export interface IFileChangeDto { resource: UriComponents; type: files.FileChangeType; } export interface FileSystemMain { $registerFileSystemProvider(handle: number, scheme: string, capabilities: files.FileSystemProviderCapabilities, readonlyMessage?: MarkdownString): void; $unregisterProvider(handle: number): void; $onFileSystemChange(handle: number, resource: IFileChangeDto[]): void; $stat(uri: UriComponents): Promise; $readdir(resource: UriComponents): Promise<[string, files.FileType][]>; $readFile(resource: UriComponents): Promise; $writeFile(resource: UriComponents, content: BinaryBuffer): Promise; $rename(resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise; $copy(resource: UriComponents, target: UriComponents, opts: files.FileOverwriteOptions): Promise; $mkdir(resource: UriComponents): Promise; $delete(resource: UriComponents, opts: files.FileDeleteOptions): Promise; } export interface FileSystemEvents { created: UriComponents[]; changed: UriComponents[]; deleted: UriComponents[]; } export interface ExtHostFileSystemEventServiceShape { $onFileEvent(events: FileSystemEvents): void; $onWillRunFileOperation(operation: files.FileOperation, target: UriComponents, source: UriComponents | undefined, timeout: number, token: CancellationToken): Promise; $onDidRunFileOperation(operation: files.FileOperation, target: UriComponents, source: UriComponents | undefined): void; } export interface ClipboardMain { $readText(): Promise; $writeText(value: string): Promise; } export interface CommentsExt { $createCommentThreadTemplate(commentControllerHandle: number, uriComponents: UriComponents, range: Range | undefined): void; $updateCommentThreadTemplate(commentControllerHandle: number, threadHandle: number, range: Range): Promise; $deleteCommentThread(commentControllerHandle: number, commentThreadHandle: number): Promise; $provideCommentingRanges(commentControllerHandle: number, uriComponents: UriComponents, token: CancellationToken): Promise<{ ranges: Range[]; fileComments: boolean; } | undefined>; } export interface CommentProviderFeatures { options?: CommentOptions; } export type CommentThreadChanges = Partial<{ range: Range; label: string; contextValue: string; comments: Comment[]; collapseState: CommentThreadCollapsibleState; state: CommentThreadState; canReply: boolean | theia.CommentAuthorInformation; }>; export interface CommentsMain { $registerCommentController(handle: number, id: string, label: string): void; $unregisterCommentController(handle: number): void; $updateCommentControllerFeatures(handle: number, features: CommentProviderFeatures): void; $createCommentThread(handle: number, commentThreadHandle: number, threadId: string, resource: UriComponents, range: Range | undefined, extensionId: string): CommentThread | undefined; $updateCommentThread(handle: number, commentThreadHandle: number, threadId: string, resource: UriComponents, changes: CommentThreadChanges): void; $deleteCommentThread(handle: number, commentThreadHandle: number): void; $onDidCommentThreadsChange(handle: number, event: CommentThreadChangedEvent): void; } export declare const enum TabInputKind { UnknownInput = 0, TextInput = 1, TextDiffInput = 2, TextMergeInput = 3, NotebookInput = 4, NotebookDiffInput = 5, CustomEditorInput = 6, WebviewEditorInput = 7, TerminalEditorInput = 8, InteractiveEditorInput = 9 } export interface UnknownInputDto { kind: TabInputKind.UnknownInput; } export interface TextInputDto { kind: TabInputKind.TextInput; uri: UriComponents; } export interface TextDiffInputDto { kind: TabInputKind.TextDiffInput; original: UriComponents; modified: UriComponents; } export interface TextMergeInputDto { kind: TabInputKind.TextMergeInput; base: UriComponents; input1: UriComponents; input2: UriComponents; result: UriComponents; } export interface NotebookInputDto { kind: TabInputKind.NotebookInput; notebookType: string; uri: UriComponents; } export interface NotebookDiffInputDto { kind: TabInputKind.NotebookDiffInput; notebookType: string; original: UriComponents; modified: UriComponents; } export interface CustomInputDto { kind: TabInputKind.CustomEditorInput; viewType: string; uri: UriComponents; } export interface WebviewInputDto { kind: TabInputKind.WebviewEditorInput; viewType: string; } export interface InteractiveEditorInputDto { kind: TabInputKind.InteractiveEditorInput; uri: UriComponents; inputBoxUri: UriComponents; } export interface TabInputDto { kind: TabInputKind.TerminalEditorInput; } export type EditorGroupColumn = number; export type AnyInputDto = UnknownInputDto | TextInputDto | TextDiffInputDto | TextMergeInputDto | NotebookInputDto | NotebookDiffInputDto | CustomInputDto | WebviewInputDto | InteractiveEditorInputDto | TabInputDto; export interface TabGroupDto { isActive: boolean; viewColumn: EditorGroupColumn; tabs: TabDto[]; groupId: number; } export declare const enum TabModelOperationKind { TAB_OPEN = 0, TAB_CLOSE = 1, TAB_UPDATE = 2, TAB_MOVE = 3 } export interface TabOperation { readonly kind: TabModelOperationKind.TAB_OPEN | TabModelOperationKind.TAB_CLOSE | TabModelOperationKind.TAB_UPDATE | TabModelOperationKind.TAB_MOVE; readonly index: number; readonly tabDto: TabDto; readonly groupId: number; readonly oldIndex?: number; } export interface TabDto { id: string; label: string; input: AnyInputDto; editorId?: string; isActive: boolean; isPinned: boolean; isPreview: boolean; isDirty: boolean; } export interface TabsExt { $acceptEditorTabModel(tabGroups: TabGroupDto[]): void; $acceptTabGroupUpdate(groupDto: TabGroupDto): void; $acceptTabOperation(operation: TabOperation): void; } export interface TabsMain { $moveTab(tabId: string, index: number, viewColumn: EditorGroupColumn, preserveFocus?: boolean): void; $closeTab(tabIds: string[], preserveFocus?: boolean): Promise; $closeGroup(groupIds: number[], preserveFocus?: boolean): Promise; } export interface TelemetryMain { } export interface TelemetryExt { } export declare const enum TestingResourceExt { Workspace = 0, TextDocument = 1 } export interface TestingExt { $onCancelTestRun(controllerId: string, runId: string): void; /** Configures a test run config. */ $onConfigureRunProfile(controllerId: string, profileId: string): void; /** Sets the default on a given run profile */ $onDidChangeDefault(controllerId: string, profileId: string, isDefault: boolean): void; $onRunControllerTests(reqs: TestRunRequestDTO[]): void; /** Asks the controller to refresh its tests */ $refreshTests(controllerId: string, token: CancellationToken): Promise; $onResolveChildren(controllerId: string, path: string[]): void; } export interface UriExt { registerUriHandler(handler: theia.UriHandler, plugin: PluginInfo): theia.Disposable; $handleExternalUri(uri: UriComponents): Promise; } export interface UriMain { $registerUriHandler(extensionId: string, extensionName: string): void; $unregisterUriHandler(extensionId: string): void; } export interface TestControllerUpdate { label: string; canRefresh: boolean; canResolve: boolean; } export interface TestingMain { /** Registers that there's a test controller with the given ID */ $registerTestController(controllerId: string, label: string): void; /** Updates the label of an existing test controller. */ $updateController(controllerId: string, patch: Partial): void; /** Disposes of the test controller with the given ID */ $unregisterTestController(controllerId: string): void; $notifyDelta(controllerId: string, diff: TreeDelta[]): void; /** Called when a new test run profile is available */ $notifyTestRunProfileCreated(controllerId: string, profile: TestRunProfileDTO): void; /** Updates an existing test run profile */ $updateTestRunProfile(controllerId: string, profileId: string, update: Partial): void; /** Removes a previously-published test run profile */ $removeTestRunProfile(controllerId: string, profileId: string): void; $notifyTestRunCreated(controllerId: string, run: TestRunDTO, preserveFocus: boolean): void; $notifyTestStateChanged(controllerId: string, runId: string, stateChanges: TestStateChangeDTO[], outputChanges: TestOutputDTO[]): void; $notifyTestRunEnded(controllerId: string, runId: string): void; } export declare const PLUGIN_RPC_CONTEXT: { LOGGER_MAIN: import("./rpc-protocol").ProxyIdentifier; AUTHENTICATION_MAIN: import("./rpc-protocol").ProxyIdentifier; COMMAND_REGISTRY_MAIN: import("./rpc-protocol").ProxyIdentifier; QUICK_OPEN_MAIN: import("./rpc-protocol").ProxyIdentifier; DIALOGS_MAIN: import("./rpc-protocol").ProxyIdentifier; WORKSPACE_MAIN: import("./rpc-protocol").ProxyIdentifier; MESSAGE_REGISTRY_MAIN: import("./rpc-protocol").ProxyIdentifier; TEXT_EDITORS_MAIN: import("./rpc-protocol").ProxyIdentifier; DOCUMENTS_MAIN: import("./rpc-protocol").ProxyIdentifier; NOTEBOOKS_MAIN: import("./rpc-protocol").ProxyIdentifier; NOTEBOOK_DOCUMENTS_MAIN: import("./rpc-protocol").ProxyIdentifier; NOTEBOOK_EDITORS_MAIN: import("./rpc-protocol").ProxyIdentifier; NOTEBOOK_DOCUMENTS_AND_EDITORS_MAIN: import("./rpc-protocol").ProxyIdentifier; NOTEBOOK_RENDERERS_MAIN: import("./rpc-protocol").ProxyIdentifier; NOTEBOOK_KERNELS_MAIN: import("./rpc-protocol").ProxyIdentifier; STATUS_BAR_MESSAGE_REGISTRY_MAIN: import("./rpc-protocol").ProxyIdentifier; ENV_MAIN: import("./rpc-protocol").ProxyIdentifier; NOTIFICATION_MAIN: import("./rpc-protocol").ProxyIdentifier; TERMINAL_MAIN: import("./rpc-protocol").ProxyIdentifier; TREE_VIEWS_MAIN: import("./rpc-protocol").ProxyIdentifier; PREFERENCE_REGISTRY_MAIN: import("./rpc-protocol").ProxyIdentifier; OUTPUT_CHANNEL_REGISTRY_MAIN: import("./rpc-protocol").ProxyIdentifier; LANGUAGES_MAIN: import("./rpc-protocol").ProxyIdentifier; CONNECTION_MAIN: import("./rpc-protocol").ProxyIdentifier; WEBVIEWS_MAIN: import("./rpc-protocol").ProxyIdentifier; CUSTOM_EDITORS_MAIN: import("./rpc-protocol").ProxyIdentifier; WEBVIEW_VIEWS_MAIN: import("./rpc-protocol").ProxyIdentifier; STORAGE_MAIN: import("./rpc-protocol").ProxyIdentifier; TASKS_MAIN: import("./rpc-protocol").ProxyIdentifier; DEBUG_MAIN: import("./rpc-protocol").ProxyIdentifier; FILE_SYSTEM_MAIN: import("./rpc-protocol").ProxyIdentifier; SCM_MAIN: import("./rpc-protocol").ProxyIdentifier; SECRETS_MAIN: import("./rpc-protocol").ProxyIdentifier; DECORATIONS_MAIN: import("./rpc-protocol").ProxyIdentifier; WINDOW_MAIN: import("./rpc-protocol").ProxyIdentifier; CLIPBOARD_MAIN: import("./rpc-protocol").ProxyIdentifier; LABEL_SERVICE_MAIN: import("./rpc-protocol").ProxyIdentifier; TIMELINE_MAIN: import("./rpc-protocol").ProxyIdentifier; THEMING_MAIN: import("./rpc-protocol").ProxyIdentifier; COMMENTS_MAIN: import("./rpc-protocol").ProxyIdentifier; TABS_MAIN: import("./rpc-protocol").ProxyIdentifier; TELEMETRY_MAIN: import("./rpc-protocol").ProxyIdentifier; LOCALIZATION_MAIN: import("./rpc-protocol").ProxyIdentifier; TESTING_MAIN: import("./rpc-protocol").ProxyIdentifier; URI_MAIN: import("./rpc-protocol").ProxyIdentifier; MCP_SERVER_DEFINITION_REGISTRY_MAIN: import("./rpc-protocol").ProxyIdentifier; }; export declare const MAIN_RPC_CONTEXT: { AUTHENTICATION_EXT: import("./rpc-protocol").ProxyIdentifier; HOSTED_PLUGIN_MANAGER_EXT: import("./rpc-protocol").ProxyIdentifier; COMMAND_REGISTRY_EXT: import("./rpc-protocol").ProxyIdentifier; QUICK_OPEN_EXT: import("./rpc-protocol").ProxyIdentifier; WINDOW_STATE_EXT: import("./rpc-protocol").ProxyIdentifier; NOTIFICATION_EXT: import("./rpc-protocol").ProxyIdentifier; WORKSPACE_EXT: import("./rpc-protocol").ProxyIdentifier; TEXT_EDITORS_EXT: import("./rpc-protocol").ProxyIdentifier; EDITORS_AND_DOCUMENTS_EXT: import("./rpc-protocol").ProxyIdentifier; DOCUMENTS_EXT: import("./rpc-protocol").ProxyIdentifier; NOTEBOOKS_EXT: import("./rpc-protocol").ProxyIdentifier; NOTEBOOK_DOCUMENTS_EXT: import("./rpc-protocol").ProxyIdentifier; NOTEBOOK_EDITORS_EXT: import("./rpc-protocol").ProxyIdentifier; NOTEBOOK_RENDERERS_EXT: import("./rpc-protocol").ProxyIdentifier; NOTEBOOK_KERNELS_EXT: import("./rpc-protocol").ProxyIdentifier; TERMINAL_EXT: import("./rpc-protocol").ProxyIdentifier; OUTPUT_CHANNEL_REGISTRY_EXT: import("./rpc-protocol").ProxyIdentifier; TREE_VIEWS_EXT: import("./rpc-protocol").ProxyIdentifier; PREFERENCE_REGISTRY_EXT: import("./rpc-protocol").ProxyIdentifier; LANGUAGES_EXT: import("./rpc-protocol").ProxyIdentifier; CONNECTION_EXT: import("./rpc-protocol").ProxyIdentifier; WEBVIEWS_EXT: import("./rpc-protocol").ProxyIdentifier; CUSTOM_EDITORS_EXT: import("./rpc-protocol").ProxyIdentifier; WEBVIEW_VIEWS_EXT: import("./rpc-protocol").ProxyIdentifier; STORAGE_EXT: import("./rpc-protocol").ProxyIdentifier; TASKS_EXT: import("./rpc-protocol").ProxyIdentifier; DEBUG_EXT: import("./rpc-protocol").ProxyIdentifier; FILE_SYSTEM_EXT: import("./rpc-protocol").ProxyIdentifier; ExtHostFileSystemEventService: import("./rpc-protocol").ProxyIdentifier; SCM_EXT: import("./rpc-protocol").ProxyIdentifier; SECRETS_EXT: import("./rpc-protocol").ProxyIdentifier; DECORATIONS_EXT: import("./rpc-protocol").ProxyIdentifier; LABEL_SERVICE_EXT: import("./rpc-protocol").ProxyIdentifier; STATUS_BAR_MESSAGE_REGISTRY_EXT: import("./rpc-protocol").ProxyIdentifier; TIMELINE_EXT: import("./rpc-protocol").ProxyIdentifier; THEMING_EXT: import("./rpc-protocol").ProxyIdentifier; COMMENTS_EXT: import("./rpc-protocol").ProxyIdentifier; TABS_EXT: import("./rpc-protocol").ProxyIdentifier; TELEMETRY_EXT: import("./rpc-protocol").ProxyIdentifier; TESTING_EXT: import("./rpc-protocol").ProxyIdentifier; URI_EXT: import("./rpc-protocol").ProxyIdentifier; MCP_SERVER_DEFINITION_REGISTRY_EXT: import("./rpc-protocol").ProxyIdentifier; }; export interface TasksExt { $initLoadedTasks(executions: TaskExecutionDto[]): Promise; $provideTasks(handle: number): Promise; $resolveTask(handle: number, task: TaskDto, token?: CancellationToken): Promise; $onDidStartTask(execution: TaskExecutionDto, terminalId: number): void; $onDidEndTask(id: number): void; $onDidStartTaskProcess(processId: number | undefined, execution: TaskExecutionDto): void; $onDidEndTaskProcess(exitCode: number | undefined, taskId: number): void; } export interface TasksMain { $registerTaskProvider(handle: number, type: string): void; $fetchTasks(taskVersion: string | undefined, taskType: string | undefined): Promise; $executeTask(taskDto: TaskDto): Promise; $taskExecutions(): Promise; $unregister(handle: number): void; $terminateTask(id: number): void; $customExecutionComplete(id: number, exitCode: number | undefined): void; } export interface AuthenticationExt { $getSessions(providerId: string, scopes: string[] | undefined, options: theia.AuthenticationProviderSessionOptions): Promise>; $createSession(id: string, scopes: string[], options: theia.AuthenticationProviderSessionOptions): Promise; $removeSession(id: string, sessionId: string): Promise; $onDidChangeAuthenticationSessions(provider: theia.AuthenticationProviderInformation): Promise; } export interface AuthenticationMain { $getAccounts(providerId: string): Thenable; $registerAuthenticationProvider(id: string, label: string, supportsMultipleAccounts: boolean): void; $unregisterAuthenticationProvider(id: string): void; $onDidChangeSessions(providerId: string, event: AuthenticationProviderAuthenticationSessionsChangeEvent): void; $getSession(providerId: string, scopeListOrRequest: ReadonlyArray | theia.AuthenticationWwwAuthenticateRequest, extensionId: string, extensionName: string, options: theia.AuthenticationGetSessionOptions): Promise; } export interface NotebookOutputItemDto { readonly mime: string; readonly valueBytes: BinaryBuffer; } export interface NotebookOutputDto { outputId: string; items: NotebookOutputItemDto[]; metadata?: Record; } export interface NotebookCellDataDto { source: string; language: string; cellKind: notebookCommon.CellKind; outputs: NotebookOutputDto[]; metadata?: notebookCommon.NotebookCellMetadata; internalMetadata?: notebookCommon.NotebookCellInternalMetadata; } export interface NotebookDataDto { readonly cells: NotebookCellDataDto[]; readonly metadata: notebookCommon.NotebookDocumentMetadata; } export interface NotebookCellDto { handle: number; uri: UriComponents; eol: string; source: string[]; language: string; mime?: string; cellKind: notebookCommon.CellKind; outputs: NotebookOutputDto[]; metadata?: notebookCommon.NotebookCellMetadata; internalMetadata?: notebookCommon.NotebookCellInternalMetadata; } export interface NotebookModelAddedData { uri: UriComponents; versionId: number; cells: NotebookCellDto[]; viewType: string; metadata?: notebookCommon.NotebookDocumentMetadata; } export interface NotebookEditorAddData { id: string; documentUri: UriComponents; selections: CellRange[]; visibleRanges: CellRange[]; viewColumn?: number; } export interface NotebookDocumentsAndEditorsDelta { removedDocuments?: UriComponents[]; addedDocuments?: NotebookModelAddedData[]; removedEditors?: string[]; addedEditors?: NotebookEditorAddData[]; newActiveEditor?: string | null; visibleEditors?: string[]; } export type NotebookCellStatusBarEntryDto = notebookCommon.NotebookCellStatusBarItem; export interface NotebookCellStatusBarListDto { items: NotebookCellStatusBarEntryDto[]; cacheId: number; } export type NotebookRawContentEventDto = { readonly kind: notebookCommon.NotebookCellsChangeType.ModelChange; readonly changes: notebookCommon.NotebookCellTextModelSplice[]; } | { readonly kind: notebookCommon.NotebookCellsChangeType.Move; readonly index: number; readonly length: number; readonly newIdx: number; } | { readonly kind: notebookCommon.NotebookCellsChangeType.Output; readonly index: number; readonly outputs: NotebookOutputDto[]; } | { readonly kind: notebookCommon.NotebookCellsChangeType.OutputItem; readonly index: number; readonly outputId: string; readonly outputItems: NotebookOutputItemDto[]; readonly append: boolean; } | { readonly kind: notebookCommon.NotebookCellsChangeType.ChangeDocumentMetadata; readonly metadata: notebookCommon.NotebookDocumentMetadata; } | notebookCommon.NotebookCellsChangeLanguageEvent | notebookCommon.NotebookCellsChangeMetadataEvent | notebookCommon.NotebookCellsChangeInternalMetadataEvent | notebookCommon.NotebookCellContentChangeEvent; export interface NotebookCellsChangedEventDto { readonly rawEvents: NotebookRawContentEventDto[]; readonly versionId: number; } export interface NotebookSelectionChangeEvent { selections: CellRange[]; } export interface NotebookVisibleRangesEvent { ranges: CellRange[]; } export interface NotebookEditorPropertiesChangeData { visibleRanges?: NotebookVisibleRangesEvent; selections?: NotebookSelectionChangeEvent; } export declare enum NotebookEditorRevealType { Default = 0, InCenter = 1, InCenterIfOutsideViewport = 2, AtTop = 3 } export interface NotebookDocumentShowOptions { position?: EditorGroupColumn; preserveFocus?: boolean; pinned?: boolean; selections?: CellRange[]; } export interface NotebookKernelDto { id: string; notebookType: string; extensionId: string; extensionLocation: UriComponents; label: string; detail?: string; description?: string; supportedLanguages?: string[]; supportsInterrupt?: boolean; supportsExecutionOrder?: boolean; preloads?: { uri: UriComponents; provides: readonly string[]; }[]; rendererScripts?: NotebookRendererScript[]; } export type CellExecuteUpdateDto = CellExecuteOutputEditDto | CellExecuteOutputItemEditDto | CellExecutionStateUpdateDto; export interface CellExecuteOutputEditDto { editType: CellExecutionUpdateType.Output; cellHandle: number; append?: boolean; outputs: NotebookOutputDto[]; } export interface CellExecuteOutputItemEditDto { editType: CellExecutionUpdateType.OutputItems; append?: boolean; outputId: string; items: NotebookOutputItemDto[]; } export interface CellExecutionStateUpdateDto { editType: CellExecutionUpdateType.ExecutionState; executionOrder?: number; runStartTime?: number; didPause?: boolean; isPaused?: boolean; } export interface CellExecutionCompleteDto { runEndTime?: number; lastRunSuccess?: boolean; } export interface NotebookKernelSourceActionDto { readonly label: string; readonly description?: string; readonly detail?: string; readonly command?: string | Command; readonly documentation?: UriComponents | string; } export interface NotebookEditorAddData { id: string; documentUri: UriComponents; selections: CellRange[]; visibleRanges: CellRange[]; viewColumn?: number; } export interface NotebooksExt extends NotebookDocumentsAndEditorsExt { $provideNotebookCellStatusBarItems(handle: number, uri: UriComponents, index: number, token: CancellationToken): Promise; $releaseNotebookCellStatusBarItems(id: number): void; $dataToNotebook(handle: number, data: BinaryBuffer, token: CancellationToken): Promise; $notebookToData(handle: number, data: NotebookDataDto, token: CancellationToken): Promise; } export interface NotebooksMain extends Disposable { $registerNotebookSerializer(handle: number, viewType: string, options: notebookCommon.TransientOptions): void; $unregisterNotebookSerializer(handle: number): void; $registerNotebookCellStatusBarItemProvider(handle: number, eventHandle: number | undefined, viewType: string): Promise; $unregisterNotebookCellStatusBarItemProvider(handle: number, eventHandle: number | undefined): Promise; $emitCellStatusBarEvent(eventHandle: number): void; } export interface NotebookKernelsExt { $acceptNotebookAssociation(handle: number, uri: UriComponents, value: boolean): void; $executeCells(handle: number, uri: UriComponents, handles: number[]): Promise; $cancelCells(handle: number, uri: UriComponents, handles: number[]): Promise; $acceptKernelMessageFromRenderer(handle: number, editorId: string, message: any): void; $cellExecutionChanged(uri: UriComponents, cellHandle: number, state: NotebookCellExecutionState | undefined): void; $provideKernelSourceActions(handle: number, token: CancellationToken): Promise; } export interface NotebookKernelsMain extends Disposable { $postMessage(handle: number, editorId: string | undefined, message: any): Promise; $addKernel(handle: number, data: NotebookKernelDto): Promise; $updateKernel(handle: number, data: Partial): void; $removeKernel(handle: number): void; $updateNotebookPriority(handle: number, uri: UriComponents, value: number | undefined): void; $createExecution(handle: number, controllerId: string, uri: UriComponents, cellHandle: number): void; $updateExecution(handle: number, data: CellExecuteUpdateDto[]): void; $completeExecution(handle: number, data: CellExecutionCompleteDto): void; $createNotebookExecution(handle: number, controllerId: string, uri: UriComponents): void; $beginNotebookExecution(handle: number): void; $completeNotebookExecution(handle: number): void; $addKernelDetectionTask(handle: number, notebookType: string): Promise; $removeKernelDetectionTask(handle: number): void; $addKernelSourceActionProvider(handle: number, eventHandle: number, notebookType: string): Promise; $removeKernelSourceActionProvider(handle: number, eventHandle: number): void; $emitNotebookKernelSourceActionsChangeEvent(eventHandle: number): void; } export interface NotebookDocumentsMain extends Disposable { $tryCreateNotebook(options: { viewType: string; content?: NotebookDataDto; }): Promise; $tryOpenNotebook(uriComponents: UriComponents): Promise; $trySaveNotebook(uri: UriComponents): Promise; } export interface NotebookDocumentsExt { $acceptModelChanged(uriComponents: UriComponents, event: NotebookCellsChangedEventDto, isDirty: boolean, newMetadata?: notebookCommon.NotebookDocumentMetadata): void; $acceptDirtyStateChanged(uriComponents: UriComponents, isDirty: boolean): void; $acceptModelSaved(uriComponents: UriComponents): void; } export interface NotebookDocumentsAndEditorsExt { $acceptDocumentsAndEditorsDelta(delta: NotebookDocumentsAndEditorsDelta): Promise; $acceptActiveCellEditorChange(newActiveEditor: string | null): void; } export interface NotebookDocumentsAndEditorsMain extends Disposable { } export type NotebookEditorViewColumnInfo = Record; export interface NotebookEditorsExt { $acceptEditorPropertiesChanged(id: string, data: NotebookEditorPropertiesChangeData): void; $acceptEditorViewColumns(data: NotebookEditorViewColumnInfo): void; } export interface NotebookEditorsMain extends Disposable { $tryShowNotebookDocument(uriComponents: UriComponents, viewType: string, options: NotebookDocumentShowOptions): Promise; $tryRevealRange(id: string, range: CellRange, revealType: NotebookEditorRevealType): Promise; $trySetSelections(id: string, range: CellRange[]): void; } export interface NotebookRenderersExt { $postRendererMessage(editorId: string, rendererId: string, message: unknown): void; } export interface NotebookRenderersMain extends Disposable { $postMessage(editorId: string | undefined, rendererId: string, message: unknown): Promise; } export interface RawColorInfo { color: [number, number, number, number]; range: Range; } export interface LabelServiceExt { $registerResourceLabelFormatter(formatter: ResourceLabelFormatter): theia.Disposable; } export interface LabelServiceMain { $registerResourceLabelFormatter(handle: number, formatter: ResourceLabelFormatter): void; $unregisterResourceLabelFormatter(handle: number): void; } export interface SecretsExt { $onDidChangePassword(e: { extensionId: string; key: string; }): Promise; } export interface SecretsMain { $getPassword(extensionId: string, key: string): Promise; $setPassword(extensionId: string, key: string, value: string): Promise; $deletePassword(extensionId: string, key: string): Promise; $getKeys(extensionId: string): Promise; } export type InlayHintDto = CachedSessionItem; export type InlayHintsDto = CachedSession<{ hints: InlayHint[]; }>; export interface IdentifiableInlineCompletions extends InlineCompletions { pid: number; } export interface IdentifiableInlineCompletion extends InlineCompletion { idx: number; } export declare const LocalizationExt: unique symbol; export interface LocalizationExt { translateMessage(pluginId: string, details: StringDetails): string; getBundle(pluginId: string): Record | undefined; getBundleUri(pluginId: string): theia.Uri | undefined; initializeLocalizedMessages(plugin: Plugin, currentLanguage: string): Promise; } export interface StringDetails { message: string; args?: Record; comment?: string | string[]; } export interface LocalizationMain { $fetchBundle(id: string): Promise; } export declare enum LogLevel { Trace = 1, Debug = 2, Info = 3, Warn = 4, Error = 5 } export interface LoggerMain { $log(level: LogLevel, name: string | undefined, message: string, params: any[]): void; } //# sourceMappingURL=plugin-api-rpc.d.ts.map