Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/**
* A service that communicates with a pty host.
*/
export
interface
IPtyService
{
readonly
:
undefined
;
readonly
:
<
{
:
number
;
:
|
string
}
>
;
readonly
:
<
{
:
number
;
:
}
>
;
readonly
:
<
{
:
number
;
:
}
>
;
readonly
:
<
{
:
number
}
>
;
readonly
:
<
{
:
number
;
:
string
;
:
number
}
>
;
readonly
:
<
{
:
number
;
:
}
>
;
readonly
:
<
{
:
number
;
:
number
|
undefined
}
>
;
createProcess
(
:
,
:
string
,
:
number
,
:
number
,
:
'6'
|
'11'
,
:
,
:
,
:
,
:
boolean
,
:
string
,
:
string
)
:
Promise
<
number
>
;
attachToProcess
(
:
number
)
:
Promise
<
void
>
;
detachFromProcess
(
:
number
,
?
:
boolean
)
:
Promise
<
void
>
;
shutdownAll
(
)
:
Promise
<
void
>
;
/**
* Lists all orphaned processes, ie. those without a connected frontend.
*/
listProcesses
(
)
:
Promise
<
[
]
>
;
getPerformanceMarks
(
)
:
Promise
<
.
[
]
>
;
/**
* Measures and returns the latency of the current and all other processes to the pty host.
*/
getLatency
(
)
:
Promise
<
[
]
>
;
start
(
:
number
)
:
Promise
<
|
|
undefined
>
;
shutdown
(
:
number
,
:
boolean
)
:
Promise
<
void
>
;
input
(
:
number
,
:
string
)
:
Promise
<
void
>
;
sendSignal
(
:
number
,
:
string
)
:
Promise
<
void
>
;
resize
(
:
number
,
:
number
,
:
number
,
?
:
number
,
?
:
number
)
:
Promise
<
void
>
;
clearBuffer
(
:
number
)
:
Promise
<
void
>
;
getInitialCwd
(
:
number
)
:
Promise
<
string
>
;
getCwd
(
:
number
)
:
Promise
<
string
>
;
acknowledgeDataEvent
(
:
number
,
:
number
)
:
Promise
<
void
>
;
setNextCommandId
(
:
number
,
:
string
,
:
string
)
:
Promise
<
void
>
;
setUnicodeVersion
(
:
number
,
:
'6'
|
'11'
)
:
Promise
<
void
>
;
processBinary
(
:
number
,
:
string
)
:
Promise
<
void
>
;
/** Confirm the process is _not_ an orphan. */
orphanQuestionReply
(
:
number
)
:
Promise
<
void
>
;
updateTitle
(
:
number
,
:
string
,
:
)
:
Promise
<
void
>
;
updateIcon
(
:
number
,
:
boolean
,
:
,
?
:
string
)
:
Promise
<
void
>
;
getDefaultSystemShell
(
?
:
)
:
Promise
<
string
>
;
getEnvironment
(
)
:
Promise
<
>
;
getWslPath
(
:
string
,
:
'unix-to-win'
|
'win-to-unix'
)
:
Promise
<
string
>
;
getRevivedPtyNewId
(
:
string
,
:
number
)
:
Promise
<
number
|
undefined
>
;
setTerminalLayoutInfo
(
:
)
:
Promise
<
void
>
;
getTerminalLayoutInfo
(
:
)
:
Promise
<
|
undefined
>
;
reduceConnectionGraceTime
(
)
:
Promise
<
void
>
;
requestDetachInstance
(
:
string
,
:
number
)
:
Promise
<
|
undefined
>
;
acceptDetachInstanceReply
(
:
number
,
?
:
number
)
:
Promise
<
void
>
;
freePortKillProcess
(
:
string
)
:
Promise
<
{
:
string
;
:
string
}
>
;
/**
* Serializes and returns terminal state.
* @paramids The persistent terminal IDs to serialize.
*/
serializeTerminalState
(
:
number
[
]
)
:
Promise
<
string
>
;
/**
* Revives a workspaces terminal processes, these can then be reconnected to using the normal
* flow for restoring terminals after reloading.
*/
reviveTerminalProcesses
(
:
string
,
:
[
]
,
:
string
)
:
Promise
<
void
>
;
refreshProperty<Textends ProcessPropertyType>
(
:
number
,
:
T
)
:
Promise
<
[
T
]
>
;
updateProperty<Textends ProcessPropertyType>
(
:
number
,
:
T
,
:
[
T
]
)
:
Promise
<
void
>
;
// TODO: Make mandatory and remove impl from pty host service
?
(
:
string
[
]
)
:
Promise
<
void
>
;
// #region Pty service contribution RPC calls
installAutoReply
(
:
string
,
:
string
)
:
Promise
<
void
>
;
uninstallAllAutoReplies
(
)
:
Promise
<
void
>
;
// #endregion
}
export
const
=
createDecorator<IPtyService>
(
'ptyService'
)
;
export
interface
IPtyServiceContribution
{
handleProcessReady
(
:
number
,
:
)
:
void
;
handleProcessDispose
(
:
number
)
:
void
;
handleProcessInput
(
:
number
,
:
string
)
:
void
;
handleProcessResize
(
:
number
,
:
number
,
:
number
,
?
:
number
,
?
:
number
)
:
void
;
}
export
interface
IPtyHostController
{
readonly
:
<
number
>
;
readonly
:
<
void
>
;
readonly
:
<
void
>
;
readonly
:
<
void
>
;
readonly
:
<
>
;
restartPtyHost
(
)
:
Promise
<
void
>
;
acceptPtyHostResolvedVariables
(
:
number
,
:
string
[
]
)
:
Promise
<
void
>
;
getProfiles
(
:
string
,
:
unknown
,
:
unknown
,
?
:
boolean
)
:
Promise
<
[
]
>
;
}
/**
* A service that communicates with a pty host controller (eg. main or server
* process) and is able to launch and forward requests to the pty host.
*/
export
interface
IPtyHostService
extends
IPtyService
,
{
}
export
interface
IPtyHostLatencyMeasurement
{
:
string
;
:
number
;
}
/**
* Serialized terminal state matching the interface that can be used across versions, the version
* should be verified before using the state payload.
*/
export
interface
ICrossVersionSerializedTerminalState
{
:
number
;
:
unknown
;
}
export
interface
ISerializedTerminalState
{
:
number
;
:
;
:
;
:
;
:
'6'
|
'11'
;
:
;
:
number
;
}
export
interface
IPersistentTerminalProcessLaunchConfig
{
:
;
:
;
:
;
}
export
interface
IRequestResolveVariablesEvent
{
:
number
;
:
string
;
:
string
[
]
;
}
export
enum
{
/**
* The duration between heartbeats
*/
=
5000
,
/**
* The duration of the first heartbeat while the pty host is starting up. This is much larger
* than the regular BeatInterval to accommodate slow machines, we still want to warn about the
* pty host's unresponsiveness eventually though.
*/
=
20000
,
/**
* Defines a multiplier for BeatInterval for how long to wait before starting the second wait
* timer.
*/
=
1.2
,
/**
* Defines a multiplier for BeatInterval for how long to wait before telling the user about
* non-responsiveness. The second timer is to avoid informing the user incorrectly when waking
* the computer up from sleep
*/
=
1
,
/**
* How long to wait before telling the user about non-responsiveness when they try to create a
* process. This short circuits the standard wait timeouts to tell the user sooner and only
* create process is handled to avoid additional perf overhead.
*/
=
5000
}
export
interface
IHeartbeatService
{
readonly
:
<
void
>
;
}
export
const
=
Symbol
(
'remoteResolverTerminal'
)
;
export
interface
IShellLaunchConfig
{
/**
* The name of the terminal, if this is not set the name of the process will be used.
*/
?
:
string
;
/**
* A string to follow the name of the terminal with, indicating the type of terminal
*/
?
:
'Task'
|
'Local'
;
/**
* The shell executable (bash, cmd, etc.).
*/
?
:
string
;
/**
* The CLI arguments to use with executable, a string[] is in argv format and will be escaped,
* a string is in "CommandLine" pre-escaped format and will be used as is. The string option is
* only supported on Windows and will throw an exception if used on macOS or Linux.
*/
?
:
string
[
]
|
string
;
/**
* The current working directory of the terminal, this overrides the `terminal.integrated.cwd`
* settings key.
*/
?
:
string
|
URI
;
/**
* A custom environment for the terminal, if this is not set the environment will be inherited
* from the VS Code process.
*/
?
:
;
/**
* Whether to ignore a custom cwd from the `terminal.integrated.cwd` settings key (e.g. if the
* shell is being launched by an extension).
*/
?
:
boolean
;
/**
* The reconnection properties for this terminal
*/
?
:
;
/** Whether to wait for a key press before closing the terminal. */
?
:
;
/**
* A string including ANSI escape sequences that will be written to the terminal emulator
* _before_ the terminal process has launched, when a string is specified, a trailing \n is
* added at the end. This allows for example the terminal instance to display a styled message
* as the first line of the terminal. Use \x1b over \033 or \e for the escape control character.
*/
?
:
string
|
{
:
string
;
:
boolean
}
;
/**
* Custom PTY/pseudoterminal process to use.
*/
?
:
(
:
number
,
:
number
,
:
number
)
=>
;
/**
* A UUID generated by the extension host process for terminals created on the extension host process.
*/
?
:
string
;
/**
* This is a terminal that attaches to an already running terminal.
*/
?
:
{
:
number
;
?
:
boolean
;
:
number
;
:
string
;
:
;
:
string
;
?
:
;
?
:
string
;
?
:
boolean
;
?
:
;
?
:
;
?
:
;
?
:
;
?
:
;
?
:
boolean
;
?
:
boolean
;
:
string
;
?
:
[
]
;
}
;
/**
* Whether the terminal process environment should be exactly as provided in
* `TerminalOptions.env`. When this is false (default), the environment will be based on the
* window's environment and also apply configured platform settings like
* `terminal.integrated.env.windows` on top. When this is true, the complete environment must be
* provided as nothing will be inherited from the process or any configuration.
*/
?
:
boolean
;
/**
* Whether the terminal process environment will inherit VS Code's "shell environment" that may
* get sourced from running a login shell depnding on how the application was launched.
* Consumers that rely on development tools being present in the $PATH should set this to true.
* This will overwrite the value of the inheritEnv setting.
*/
?
:
boolean
;
/**
* When enabled the terminal will run the process as normal but not be surfaced to the user
* until `Terminal.show` is called. The typical usage for this is when you need to run
* something that may need interactivity but only want to tell the user about it when
* interaction is needed. Note that the terminals will still be exposed to all extensions
* as normal. The hidden terminals will not be restored when the workspace is next opened.
*/
?
:
boolean
;
/**
* Whether to force the terminal to persist across sessions regardless of the other
* launch config, like `hideFromUser`.
*/
?
:
boolean
;
/**
* Whether this terminal is not a terminal that the user directly created and uses, but rather
* a terminal used to drive some VS Code feature.
*/
?
:
boolean
;
/**
* Whether this terminal was created by an extension.
*/
?
:
boolean
;
/** Whether this terminal is used to bootstrap a remote authority resolver. */
[
]
?
:
true
;
/**
* The icon for the terminal, used primarily in the terminal tab.
*/
?
:
;
/**
* The color ID to use for this terminal. If not specified it will use the default fallback
*/
?
:
string
;
/**
* When a parent terminal is provided via API, the group needs
* to find the index in order to place the child
* directly to the right of its parent.
*/
?
:
number
;
/**
* The dimensions for the instance as set by the user
* or via Size to Content Width
*/
?
:
;
/**
* Opt-out of the default terminal persistence on restart and reload
*/
?
:
boolean
;
/**
* Attempt to force shell integration to be enabled by bypassing the {@link isFeatureTerminal}
* equals false requirement.
*/
?
:
boolean
;
/**
* Create a terminal without shell integration even when it's enabled
*/
?
:
boolean
;
/**
* Actions to include inline on hover of the terminal tab. E.g. the "Rerun task" action
*/
?
:
[
]
;
/**
* Report terminal's shell environment variables to VS Code and extensions
*/
?
:
boolean
;
/**
* A custom nonce to use for shell integration when provided by an extension.
* This allows extensions to control shell integration for terminals they create.
*/
?
:
string
;
/**
* A title template string that supports the same variables as the
* `terminal.integrated.tabs.title` setting. When set, this overrides the config-based
* title template for this terminal instance.
*/
?
:
string
;
}
export
interface
ITerminalTabAction
{
:
string
;
:
string
;
?
:
;
}
export
type
WaitOnExitValue
=
boolean
|
string
|
(
(
:
number
)
=>
string
)
;
export
interface
ICreateContributedTerminalProfileOptions
{
?
:
URI
|
string
|
{
:
URI
;
:
URI
}
;
?
:
string
;
?
:
|
{
:
number
;
?
:
boolean
}
|
{
:
boolean
}
;
?
:
string
|
URI
;
?
:
string
;
}
export
enum
{
=
1
,
=
2
}
export
const
enum
{
=
'view'
,
=
'editor'
}
export
type
TerminalIcon
=
|
URI
|
{
:
URI
;
:
URI
}
;
export
interface
IShellLaunchConfigDto
{
?
:
string
;
?
:
string
;
?
:
string
[
]
|
string
;
?
:
string
|
;
?
:
;
?
:
boolean
;
?
:
boolean
;
?
:
;
?
:
'Task'
|
'Local'
;
?
:
boolean
;
?
:
boolean
;
?
:
[
]
;
?
:
boolean
;
?
:
string
;
}
/**
* A set of options for the terminal process. These differ from the shell launch config in that they
* are set internally to the terminal component, not from the outside.
*/
export
interface
ITerminalProcessOptions
{
:
{
:
boolean
;
:
boolean
;
:
string
;
}
;
:
boolean
;
:
|
undefined
;
:
|
undefined
;
:
boolean
;
}
export
interface
ITerminalEnvironment
{
[
:
string
]
:
string
|
null
|
undefined
;
}
export
interface
ITerminalLaunchError
{
:
string
;
?
:
number
;
}
export
interface
IProcessReadyEvent
{
:
number
;
:
string
;
:
|
undefined
;
}
export
interface
IProcessReadyWindowsPty
{
/**
* What pty emulation backend is being used.
*/
:
'conpty'
;
/**
* The Windows build version (eg. 19045)
*/
:
number
;
}
/**
* An interface representing a raw terminal child process, this contains a subset of the
* child_process.ChildProcess node.js interface.
*/
export
interface
ITerminalChildProcess
{
/**
* A unique identifier for the terminal process. Note that the uniqueness only applies to a
* given pty service connection, IDs will be duplicated for remote and local terminals for
* example. The ID will be 0 if it does not support reconnection.
*/
:
number
;
/**
* Whether the process should be persisted across reloads.
*/
:
boolean
;
readonly
:
<
|
string
>
;
readonly
:
<
>
;
readonly
?
:
<
void
>
;
readonly
:
<
>
;
readonly
:
<
number
|
undefined
>
;
readonly
?
:
<
>
;
/**
* Starts the process.
*
* @returns undefined when the process was successfully started, otherwise an object containing
* information on what went wrong.
*/
start
(
)
:
Promise
<
|
|
undefined
>
;
/**
* Detach the process from the UI and await reconnect.
* @paramforcePersist Whether to force the process to persist if it supports persistence.
*/
?
(
?
:
boolean
)
:
Promise
<
void
>
;
/**
* Frees the port and kills the process
*/
?
(
:
string
)
:
Promise
<
{
:
string
;
:
string
}
>
;
/**
* Shutdown the terminal process.
*
* @paramimmediate When true the process will be killed immediately, otherwise the process will
* be given some time to make sure no additional data comes through.
*/
shutdown
(
:
boolean
)
:
void
;
input
(
:
string
)
:
void
;
sendSignal
(
:
string
)
:
void
;
processBinary
(
:
string
)
:
Promise
<
void
>
;
resize
(
:
number
,
:
number
,
?
:
number
,
?
:
number
)
:
void
;
clearBuffer
(
)
:
void
|
Promise
<
void
>
;
/**
* Acknowledge a data event has been parsed by the terminal, this is used to implement flow
* control to ensure remote processes to not get too far ahead of the client and flood the
* connection.
* @paramcharCount The number of characters being acknowledged.
*/
acknowledgeDataEvent
(
:
number
)
:
void
;
/**
* Sets the unicode version for the process, this drives the size of some characters in the
* xterm-headless instance.
*/
setUnicodeVersion
(
:
'6'
|
'11'
)
:
Promise
<
void
>
;
getInitialCwd
(
)
:
Promise
<
string
>
;
getCwd
(
)
:
Promise
<
string
>
;
refreshProperty<Textends ProcessPropertyType>
(
:
T
)
:
Promise
<
[
T
]
>
;
updateProperty<Textends ProcessPropertyType>
(
:
T
,
:
[
T
]
)
:
Promise
<
void
>
;
}
export
interface
IReconnectConstants
{
:
number
;
:
number
;
:
number
;
}
export
const
enum
{
/**
* If there is no reconnection within this time-frame, consider the connection permanently closed...
*/
=
60000
,
// 60 seconds
/**
* Maximal grace time between the first and the last reconnection...
*/
=
6000
,
// 6 seconds
}
export
const
enum
{
/**
* The number of _unacknowledged_ chars to have been sent before the pty is paused in order for
* the client to catch up.
*/
=
100000
,
/**
* After flow control pauses the pty for the client the catch up, this is the number of
* _unacknowledged_ chars to have been caught up to on the client before resuming the pty again.
* This is used to attempt to prevent pauses in the flowing data; ideally while the pty is
* paused the number of unacknowledged chars would always be greater than 0 or the client will
* appear to stutter. In reality this balance is hard to accomplish though so heavy commands
* will likely pause as latency grows, not flooding the connection is the important thing as
* it's shared with other core functionality.
*/
=
5000
,
/**
* The number characters that are accumulated on the client side before sending an ack event.
* This must be less than or equal to LowWatermarkChars or the terminal max never unpause.
*/
=
5000
}
export
interface
IProcessDataEvent
{
:
string
;
:
boolean
;
/**
* When trackCommit is set, this will be set to a promise that resolves when the data is parsed.
*/
?
:
Promise
<
void
>
;
}
export
interface
ITerminalDimensions
{
/**
* The columns of the terminal.
*/
:
number
;
/**
* The rows of the terminal.
*/
:
number
;
}
export
interface
ITerminalProfile
{
:
string
;
:
string
;
:
boolean
;
/**
* Whether the terminal profile contains a potentially unsafe {@link path}. For example, the path
* `C:\Cygwin` is the default install for Cygwin on Windows, but it could be created by any
* user in a multi-user environment. As such, we don't want to blindly present it as a profile
* without a warning.
*/
?
:
boolean
;
/**
* An additional unsafe path that must exist, for example a script that appears in {@link args}.
*/
?
:
string
;
?
:
boolean
;
/**
* Whether the profile path was found on the `$PATH` environment variable, if so it will be
* cleaner to display this profile in the UI using only `basename(path)`.
*/
?
:
boolean
;
?
:
<
string
>
|
undefined
;
?
:
;
?
:
boolean
;
?
:
string
;
?
:
|
URI
|
{
:
URI
;
:
URI
}
;
}
export
interface
ITerminalDimensionsOverride
extends
Readonly<ITerminalDimensions>
{
/**
* indicate that xterm must receive these exact dimensions, even if they overflow the ui!
*/
?
:
boolean
;
}
export
const
enum
{
=
'Git Bash'
,
=
'PowerShell'
}
export
interface
IBaseUnresolvedTerminalProfile
{
?
:
<
string
>
|
undefined
;
?
:
boolean
;
?
:
boolean
;
?
:
string
|
|
URI
|
{
:
URI
;
:
URI
}
;
?
:
string
;
?
:
;
?
:
string
|
;
}
export
interface
ITerminalUnsafePath
{
:
string
;
:
true
;
}
export
interface
ITerminalExecutable
extends
IBaseUnresolvedTerminalProfile
{
:
<
string
|
>
;
}
export
interface
ITerminalProfileSource
extends
IBaseUnresolvedTerminalProfile
{
:
;
}
export
interface
ITerminalProfileContribution
{
:
string
;
:
string
;
?
:
URI
|
{
:
URI
;
:
URI
}
|
string
;
?
:
string
;
?
:
string
;
}
export
interface
IExtensionTerminalProfile
extends
ITerminalProfileContribution
{
:
string
;
}
export
type
ITerminalProfileObject
=
|
|
|
null
;
export
interface
IShellIntegration
{
readonly
:
;
readonly
:
<
string
>
;
readonly
:
;
readonly
:
<
>
;
readonly
:
<
<
string
>>
;
deserialize
(
:
)
:
void
;
setNextCommandId
(
:
string
,
:
string
)
:
void
;
}
export
interface
IDecorationAddon
{
registerMenuItems
(
:
,
:
[
]
)
:
;
}
export
interface
ITerminalCompletionProviderContribution
{
?
:
string
;
}
export
interface
ITerminalContributions
{
?
:
[
]
;
?
:
[
]
;
}
export
const
enum
{
/** No shell integration sequences have been encountered. */
,
/** Final term shell integration sequences have been encountered. */
,
/** VS Code shell integration sequences have been encountered. Supercedes FinalTerm. */
}
export
const
enum
{
/**
* The setting is disabled.
*/
=
'injectionSettingDisabled'
,
/**
* There is no executable (so there's no way to determine how to inject).
*/
=
'noExecutable'
,
/**
* It's a feature terminal (tasks, debug), unless it's explicitly being forced.
*/
=
'featureTerminal'
,
/**
* The ignoreShellIntegration flag is passed (eg. relaunching without shell integration).
*/
=
'ignoreShellIntegrationFlag'
,
/**
* Shell integration doesn't work on older Windows builds that don't support ConPTY.
*/
=
'unsupportedWindowsBuild'
,
/**
* We're conservative whether we inject when we don't recognize the arguments used for the
* shell as we would prefer launching one without shell integration than breaking their profile.
*/
=
'unsupportedArgs'
,
/**
* The shell doesn't have built-in shell integration. Note that this doesn't mean the shell
* won't have shell integration in the end.
*/
=
'unsupportedShell'
,
/**
* For zsh, we failed to set the sticky bit on the shell integration script folder.
*/
=
'failedToSetStickyBit'
,
/**
* For zsh, we failed to create a temp directory for the shell integration script.
*/
=
'failedToCreateTmpDir'
,
}
export
const
enum
{
=
-
2
}
export
enum
{
=
0
,
=
1
,
=
2
,
=
3
,
=
4
,
}
export
interface
ITerminalOutputMatch
{
:
;
:
string
[
]
;
}
/**
* A matcher that runs on a sub-section of a terminal command's output
*/
export
interface
ITerminalOutputMatcher
{
/**
* A string or regex to match against the unwrapped line. If this is a regex with the multiline
* flag, it will scan an amount of lines equal to `\n` instances in the regex + 1.
*/
:
string
|
;
/**
* Which side of the output to anchor the {@link offset} and {@link length} against.
*/
:
'top'
|
'bottom'
;
/**
* The number of rows above or below the {@link anchor} to start matching against.
*/
:
number
;
/**
* The number of rows to match against, this should be as small as possible for performance
* reasons. This is capped at 40.
*/
:
number
;
/**
* If multiple matches are expected - this will result in {@link outputLines} being returned
* when there's a {@link regexMatch} from {@link offset} to {@link length}
*/
?
:
boolean
;
}
export
interface
ITerminalCommandSelector
{
:
string
;
:
string
|
;
?
:
;
:
boolean
;
:
'success'
|
'error'
;
?
:
'fix'
|
'explain'
;
}
export
interface
ITerminalBackend
extends
ITerminalBackendPtyServiceContributions
{
readonly
:
string
|
undefined
;
readonly
:
boolean
;
/**
* A promise that resolves when the backend is ready to be used, ie. after terminal persistence
* has been actioned.
*/
readonly
:
Promise
<
void
>
;
/**
* Signal to the backend that persistence has been actioned and is ready for use.
*/
setReady
(
)
:
void
;
/**
* Fired when the ptyHost process becomes non-responsive, this should disable stdin for all
* terminals using this pty host connection and mark them as disconnected.
*/
readonly
:
<
void
>
;
/**
* Fired when the ptyHost process becomes responsive after being non-responsive. Allowing
* previously disconnected terminals to reconnect.
*/
readonly
:
<
void
>
;
/**
* Fired when the ptyHost has been restarted, this is used as a signal for listening terminals
* that its pty has been lost and will remain disconnected.
*/
readonly
:
<
void
>
;
readonly
:
<
{
:
number
;
:
string
;
:
number
}
>
;
attachToProcess
(
:
number
)
:
Promise
<
|
undefined
>
;
attachToRevivedProcess
(
:
number
)
:
Promise
<
|
undefined
>
;
listProcesses
(
)
:
Promise
<
[
]
>
;
getLatency
(
)
:
Promise
<
[
]
>
;
getDefaultSystemShell
(
?
:
)
:
Promise
<
string
>
;
getProfiles
(
:
unknown
,
:
unknown
,
?
:
boolean
)
:
Promise
<
[
]
>
;
getWslPath
(
:
string
,
:
'unix-to-win'
|
'win-to-unix'
)
:
Promise
<
string
>
;
getEnvironment
(
)
:
Promise
<
>
;
getShellEnvironment
(
)
:
Promise
<
|
undefined
>
;
setTerminalLayoutInfo
(
?
:
)
:
Promise
<
void
>
;
updateTitle
(
:
number
,
:
string
,
:
)
:
Promise
<
void
>
;
updateIcon
(
:
number
,
:
boolean
,
:
,
?
:
string
)
:
Promise
<
void
>
;
setNextCommandId
(
:
number
,
:
string
,
:
string
)
:
Promise
<
void
>
;
getTerminalLayoutInfo
(
)
:
Promise
<
|
undefined
>
;
getPerformanceMarks
(
)
:
Promise
<
.
[
]
>
;
reduceConnectionGraceTime
(
)
:
Promise
<
void
>
;
requestDetachInstance
(
:
string
,
:
number
)
:
Promise
<
|
undefined
>
;
acceptDetachInstanceReply
(
:
number
,
?
:
number
)
:
Promise
<
void
>
;
persistTerminalState
(
)
:
Promise
<
void
>
;
createProcess
(
:
,
:
string
,
:
number
,
:
number
,
:
'6'
|
'11'
,
:
,
:
,
:
boolean
)
:
Promise
<
>
;
restartPtyHost
(
)
:
void
;
}
export
interface
ITerminalBackendPtyServiceContributions
{
installAutoReply
(
:
string
,
:
string
)
:
Promise
<
void
>
;
uninstallAllAutoReplies
(
)
:
Promise
<
void
>
;
}
export
const
=
{
:
'workbench.contributions.terminal.processBackend'
}
;
export
interface
ITerminalBackendRegistry
{
/**
* Gets all backends in the registry.
*/
:
<
string
,
>
;
/**
* Registers a terminal backend for a remote authority.
*/
registerTerminalBackend
(
:
)
:
void
;
/**
* Returns the registered terminal backend for a remote authority.
*/
getTerminalBackend
(
?
:
string
)
:
|
undefined
;
}
class
TerminalBackendRegistry
implements
ITerminalBackendRegistry
{
private
readonly
=
new
Map<string, ITerminalBackend>
(
)
;
get
backends
(
)
:
<
string
,
>
{
return
this
.
;
}
registerTerminalBackend
(
:
)
:
void
{
const
=
this
.
_sanitizeRemoteAuthority
(
.
)
;
if
(
this
.
.
has
(
)
)
{
throw
new
Error
(
`A terminal backend with remote authority '${key}' was already registered.`
)
;
}
this
.
.
set
(
,
)
;
}
getTerminalBackend
(
:
string
|
undefined
)
:
|
undefined
{
return
this
.
.
get
(
this
.
_sanitizeRemoteAuthority
(
)
)
;
}
private
_sanitizeRemoteAuthority
(
:
string
|
undefined
)
{
// Normalize the key to lowercase as the authority is case-insensitive
return
?.
toLowerCase
(
)
??
''
;
}
}
.
add
(
.
,
new
TerminalBackendRegistry
(
)
)
;
export
const
=
createDecorator<ILocalPtyService>
(
'localPtyService'
)
;
/**
* A service responsible for communicating with the pty host process on Electron.
*
* **This service should only be used within the terminal component.**
*/
export
interface
ILocalPtyService
extends
IPtyHostService
{
}
export
const
=
createDecorator<ITerminalLogService>
(
'terminalLogService'
)
;
export
interface
ITerminalLogService
extends
ILogService
{
/**
* Similar to _serviceBrand but used to differentiate this service at compile time from
* ILogService; ITerminalLogService is an ILogService, but ILogService is not an
* ITerminalLogService.
*/