@silo-code/sdk 0.22.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dnd-service.d.ts +1 -1
- package/dist/editor-service.d.ts +3 -3
- package/dist/event.d.ts +1 -1
- package/dist/extension-storage.d.ts +1 -1
- package/dist/file-service.d.ts +1 -1
- package/dist/index.d.ts +29 -29
- package/dist/index.js +7 -7
- package/dist/layout-service.d.ts +1 -1
- package/dist/process-service.d.ts +1 -1
- package/dist/processes-service.d.ts +1 -1
- package/dist/terminal-service.d.ts +32 -3
- package/dist/terminal-service.d.ts.map +1 -1
- package/dist/theme-service.d.ts +3 -3
- package/dist/types.d.ts +16 -16
- package/dist/use-service-state.d.ts +1 -1
- package/dist/workspace-service.d.ts +3 -3
- package/package.json +2 -2
- package/src/terminal-service.ts +33 -0
package/dist/dnd-service.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
|
-
import type { Disposable } from "./types";
|
|
2
|
+
import type { Disposable } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* Well-known MIME types for Silo drag payloads. Use these constants (rather than
|
|
5
5
|
* raw strings) so drags interoperate across extensions and built-ins.
|
package/dist/editor-service.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Disposable } from "./types";
|
|
2
|
-
import type { Event } from "./event";
|
|
3
|
-
import type { EditorMode } from "./domain-types";
|
|
1
|
+
import type { Disposable } from "./types.js";
|
|
2
|
+
import type { Event } from "./event.js";
|
|
3
|
+
import type { EditorMode } from "./domain-types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Options for the editor open methods.
|
|
6
6
|
*
|
package/dist/event.d.ts
CHANGED
package/dist/file-service.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -15,33 +15,33 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @packageDocumentation
|
|
17
17
|
*/
|
|
18
|
-
export type { Disposable, DockPanelApi, DockPanelProps, EditorProps, EditorCapabilities, Editor, NewFileTemplate, FileType, Command, MenuId, MenuItemContribution, Keybinding, SidePanelProps, SidePanel, DockPanelKind, StatusItem, SettingsPage, ExtensionContext, Extension, ExtensionManifest, ExtensionHandle, } from "./types";
|
|
19
|
-
export type { Workspace, EditorMode, EditorRecord, SidePanelSlot, } from "./domain-types";
|
|
20
|
-
export type { WorkspaceService, WorkspaceState, CreateWorkspaceInput, WorkspaceStatusRow, WorkspaceStatusProvider, WorkspaceSectionProps, WorkspaceSectionProvider, WorkspaceBadge, WorkspaceBadgeProvider, } from "./workspace-service";
|
|
21
|
-
export type { EditorService, EditorSaveHandlers, OpenFileOptions, EditorViewInfo, OpenDiffSpec, DiffContent, DiffContentRequest, DiffContentProvider, ActiveEditorInfo, EditorsState, EditorSaveEvent, } from "./editor-service";
|
|
22
|
-
export type { LayoutService, LayoutState, SidePanelColumnState, SideLocation, } from "./layout-service";
|
|
23
|
-
export type { ProcessService, ProcessSession, ProcessSpawnOptions, ProcessExecOptions, ProcessExecResult, } from "./process-service";
|
|
24
|
-
export type { ProcessesService, ProcessInfo, ProcessStats, } from "./processes-service";
|
|
25
|
-
export type { TerminalService, CreateTerminalInput, TerminalKind, TerminalRecord, TerminalTabDecoration, TerminalTabDecorationProvider, OscEvent, } from "./terminal-service";
|
|
26
|
-
export type { FileService, FileMeta, FileChangeKind, FileChangeEvent, } from "./file-service";
|
|
27
|
-
export type { SearchService, SearchOptions, SearchMatch, SearchFileResult, SearchResponse, } from "./search-service";
|
|
28
|
-
export type { Permission } from "./permissions";
|
|
29
|
-
export { PathDeniedError } from "./permissions";
|
|
30
|
-
export type { ThemeService, ThemeState, ThemePreset, ResolvedTheme, ThemeBase, ThemeVars, CustomTheme, ThemeExport, } from "./theme-service";
|
|
31
|
-
export type { ExtensionStorage, ExtensionStorageScopes, } from "./extension-storage";
|
|
32
|
-
export type { DndService, DndItem, DndMime, DragInit, DndMode, DropContext, DropTargetHandlers, } from "./dnd-service";
|
|
33
|
-
export { DND_MIME } from "./dnd-service";
|
|
34
|
-
export type { UiService, FileFilter, MenuItem, MenuItemTrailing, MenuSeparator, MenuHeader, MenuEntry, ShowMenuOptions, ConfirmOptions, PromptOptions, ModalOptions, NotifyAction, NotifyOptions, } from "./ui-service";
|
|
35
|
-
export { NetworkError } from "./network-service";
|
|
36
|
-
export type { NetworkService, NetworkRequestOptions, NetworkResponse, NetworkBytesResponse, } from "./network-service";
|
|
37
|
-
export type { SystemService, SystemInfo } from "./system-service";
|
|
38
|
-
export type { LogService, LogLevel } from "./output-service";
|
|
39
|
-
export type { ContextKeys } from "./context-keys";
|
|
40
|
-
export type { Event } from "./event";
|
|
41
|
-
export { path } from "./path";
|
|
42
|
-
export { Tooltip } from "./Tooltip";
|
|
43
|
-
export { useServiceState } from "./use-service-state";
|
|
44
|
-
export type { ReactiveService } from "./use-service-state";
|
|
45
|
-
export { useFocusGroup, focusGroupNextIndex } from "./use-focus-group";
|
|
46
|
-
export type { FocusGroup, FocusGroupOptions, FocusGroupContainerProps, FocusGroupItemProps, FocusGroupOrientation, FocusGroupNavQuery, } from "./use-focus-group";
|
|
18
|
+
export type { Disposable, DockPanelApi, DockPanelProps, EditorProps, EditorCapabilities, Editor, NewFileTemplate, FileType, Command, MenuId, MenuItemContribution, Keybinding, SidePanelProps, SidePanel, DockPanelKind, StatusItem, SettingsPage, ExtensionContext, Extension, ExtensionManifest, ExtensionHandle, } from "./types.js";
|
|
19
|
+
export type { Workspace, EditorMode, EditorRecord, SidePanelSlot, } from "./domain-types.js";
|
|
20
|
+
export type { WorkspaceService, WorkspaceState, CreateWorkspaceInput, WorkspaceStatusRow, WorkspaceStatusProvider, WorkspaceSectionProps, WorkspaceSectionProvider, WorkspaceBadge, WorkspaceBadgeProvider, } from "./workspace-service.js";
|
|
21
|
+
export type { EditorService, EditorSaveHandlers, OpenFileOptions, EditorViewInfo, OpenDiffSpec, DiffContent, DiffContentRequest, DiffContentProvider, ActiveEditorInfo, EditorsState, EditorSaveEvent, } from "./editor-service.js";
|
|
22
|
+
export type { LayoutService, LayoutState, SidePanelColumnState, SideLocation, } from "./layout-service.js";
|
|
23
|
+
export type { ProcessService, ProcessSession, ProcessSpawnOptions, ProcessExecOptions, ProcessExecResult, } from "./process-service.js";
|
|
24
|
+
export type { ProcessesService, ProcessInfo, ProcessStats, } from "./processes-service.js";
|
|
25
|
+
export type { TerminalService, CreateTerminalInput, TerminalKind, TerminalRecord, TerminalTabDecoration, TerminalTabDecorationProvider, OscEvent, } from "./terminal-service.js";
|
|
26
|
+
export type { FileService, FileMeta, FileChangeKind, FileChangeEvent, } from "./file-service.js";
|
|
27
|
+
export type { SearchService, SearchOptions, SearchMatch, SearchFileResult, SearchResponse, } from "./search-service.js";
|
|
28
|
+
export type { Permission } from "./permissions.js";
|
|
29
|
+
export { PathDeniedError } from "./permissions.js";
|
|
30
|
+
export type { ThemeService, ThemeState, ThemePreset, ResolvedTheme, ThemeBase, ThemeVars, CustomTheme, ThemeExport, } from "./theme-service.js";
|
|
31
|
+
export type { ExtensionStorage, ExtensionStorageScopes, } from "./extension-storage.js";
|
|
32
|
+
export type { DndService, DndItem, DndMime, DragInit, DndMode, DropContext, DropTargetHandlers, } from "./dnd-service.js";
|
|
33
|
+
export { DND_MIME } from "./dnd-service.js";
|
|
34
|
+
export type { UiService, FileFilter, MenuItem, MenuItemTrailing, MenuSeparator, MenuHeader, MenuEntry, ShowMenuOptions, ConfirmOptions, PromptOptions, ModalOptions, NotifyAction, NotifyOptions, } from "./ui-service.js";
|
|
35
|
+
export { NetworkError } from "./network-service.js";
|
|
36
|
+
export type { NetworkService, NetworkRequestOptions, NetworkResponse, NetworkBytesResponse, } from "./network-service.js";
|
|
37
|
+
export type { SystemService, SystemInfo } from "./system-service.js";
|
|
38
|
+
export type { LogService, LogLevel } from "./output-service.js";
|
|
39
|
+
export type { ContextKeys } from "./context-keys.js";
|
|
40
|
+
export type { Event } from "./event.js";
|
|
41
|
+
export { path } from "./path.js";
|
|
42
|
+
export { Tooltip } from "./Tooltip.js";
|
|
43
|
+
export { useServiceState } from "./use-service-state.js";
|
|
44
|
+
export type { ReactiveService } from "./use-service-state.js";
|
|
45
|
+
export { useFocusGroup, focusGroupNextIndex } from "./use-focus-group.js";
|
|
46
|
+
export type { FocusGroup, FocusGroupOptions, FocusGroupContainerProps, FocusGroupItemProps, FocusGroupOrientation, FocusGroupNavQuery, } from "./use-focus-group.js";
|
|
47
47
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -15,23 +15,23 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @packageDocumentation
|
|
17
17
|
*/
|
|
18
|
-
export { PathDeniedError } from "./permissions";
|
|
19
|
-
export { DND_MIME } from "./dnd-service";
|
|
18
|
+
export { PathDeniedError } from "./permissions.js";
|
|
19
|
+
export { DND_MIME } from "./dnd-service.js";
|
|
20
20
|
// Server-side HTTP client — bypasses CORS, readable response headers.
|
|
21
|
-
export { NetworkError } from "./network-service";
|
|
21
|
+
export { NetworkError } from "./network-service.js";
|
|
22
22
|
// Pure path utilities — cross-platform replacement for `node:path` (banned in
|
|
23
23
|
// extensions). All outputs use forward-slash separators. Both "/" and "\" are
|
|
24
24
|
// accepted as input. Exported as a namespaced `path` object.
|
|
25
|
-
export { path } from "./path";
|
|
25
|
+
export { path } from "./path.js";
|
|
26
26
|
// Tooltip — the same styled hover popup the host uses in the status bar.
|
|
27
27
|
// Extensions use this instead of native `title` attributes to match host chrome.
|
|
28
|
-
export { Tooltip } from "./Tooltip";
|
|
28
|
+
export { Tooltip } from "./Tooltip.js";
|
|
29
29
|
// Runtime helpers. The one blessed way for an extension to read a `ctx`
|
|
30
30
|
// service's reactive state in React — replaces hand-rolled useSyncExternalStore.
|
|
31
|
-
export { useServiceState } from "./use-service-state";
|
|
31
|
+
export { useServiceState } from "./use-service-state.js";
|
|
32
32
|
// Headless keyboard navigation for a focus group (list / menu / toolbar / …):
|
|
33
33
|
// one tab stop, arrow/Home/End movement, the WebKit-safe keyboard ring. The
|
|
34
34
|
// `focusGroupNextIndex` helper is the pure roving-index core for widgets that
|
|
35
35
|
// can't use the focus-driven hook (e.g. menus driven by a document listener).
|
|
36
|
-
export { useFocusGroup, focusGroupNextIndex } from "./use-focus-group";
|
|
36
|
+
export { useFocusGroup, focusGroupNextIndex } from "./use-focus-group.js";
|
|
37
37
|
//# sourceMappingURL=index.js.map
|
package/dist/layout-service.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
|
-
import type { Disposable } from "./types";
|
|
3
|
-
import type { TerminalKind, TerminalRecord } from "./domain-types";
|
|
2
|
+
import type { Disposable } from "./types.js";
|
|
3
|
+
import type { TerminalKind, TerminalRecord } from "./domain-types.js";
|
|
4
4
|
/**
|
|
5
5
|
* A parsed OSC (Operating System Command) escape sequence emitted by a
|
|
6
6
|
* terminal program. Delivered by {@link TerminalService.subscribeOsc}.
|
|
@@ -20,7 +20,7 @@ export interface OscEvent {
|
|
|
20
20
|
/** The raw payload string after the code and its separating semicolon. */
|
|
21
21
|
payload: string;
|
|
22
22
|
}
|
|
23
|
-
export type { TerminalKind, TerminalRecord } from "./domain-types";
|
|
23
|
+
export type { TerminalKind, TerminalRecord } from "./domain-types.js";
|
|
24
24
|
/**
|
|
25
25
|
* A decoration that an extension can attach to a terminal tab — a small icon
|
|
26
26
|
* with an optional tooltip and semantic color. Registered via
|
|
@@ -189,6 +189,35 @@ export interface TerminalService {
|
|
|
189
189
|
* ```
|
|
190
190
|
*/
|
|
191
191
|
subscribeOsc(terminalId: string, handler: (event: OscEvent) => void): Disposable;
|
|
192
|
+
/**
|
|
193
|
+
* Subscribe to the raw PTY output stream of the terminal identified by
|
|
194
|
+
* `terminalId`. The `handler` is called with every chunk of bytes the PTY
|
|
195
|
+
* produces — including ANSI escape sequences, OSC sequences, and all other
|
|
196
|
+
* control characters — exactly as they arrive, with no parsing or filtering.
|
|
197
|
+
*
|
|
198
|
+
* This fires even when the terminal's panel is not visible, so it is suitable
|
|
199
|
+
* for background monitoring (e.g. detecting output activity to confirm an
|
|
200
|
+
* agent is still running). Keep handlers lightweight: they execute
|
|
201
|
+
* synchronously on every PTY chunk, which can be multiple times per second
|
|
202
|
+
* while a program is active.
|
|
203
|
+
*
|
|
204
|
+
* The subscription is keyed to the **terminal record id** (e.g. `"term_…"`),
|
|
205
|
+
* not the underlying PTY session id, so it survives terminal recreation within
|
|
206
|
+
* the same record.
|
|
207
|
+
*
|
|
208
|
+
* Returns a {@link Disposable} that cancels the subscription.
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* ```ts
|
|
212
|
+
* // Track the last time any output arrived to confirm agent activity.
|
|
213
|
+
* let lastOutputAt = 0;
|
|
214
|
+
* const sub = ctx.terminals.subscribeOutput(terminalId, () => {
|
|
215
|
+
* lastOutputAt = Date.now();
|
|
216
|
+
* });
|
|
217
|
+
* ctx.subscriptions.push(sub);
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
subscribeOutput(terminalId: string, handler: (data: string) => void): Disposable;
|
|
192
221
|
/**
|
|
193
222
|
* The record id of the terminal tab that is currently active in the active
|
|
194
223
|
* workspace's center dock, or `null` when an editor tab (or nothing) is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminal-service.d.ts","sourceRoot":"","sources":["../src/terminal-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,QAAQ;IACvB,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB;AAGD,YAAY,EAAE,YAAY,EAAE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AAM,GAAG,qBAAqB,GAAG,IAAI,CAAC;IAEnE;;;;OAIG;IACH,wBAAwB,IAAI,IAAI,CAAC;IAEjC;;;OAGG;IACH,uBAAuB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC;IAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,YAAY,CACV,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GACjC,UAAU,CAAC;IAEd;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,eAAe,CACb,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC9B,UAAU,CAAC;IAEd;;;;;;OAMG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI,CAAC;IAE3B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAAe,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,UAAU,CAAC;CAC5E"}
|
package/dist/theme-service.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Disposable } from "./types";
|
|
2
|
-
import type { ThemeBase, ThemeVars, CustomTheme, ThemeExport } from "./domain-types";
|
|
3
|
-
export type { ThemeBase, ThemeVars, CustomTheme, ThemeExport, } from "./domain-types";
|
|
1
|
+
import type { Disposable } from "./types.js";
|
|
2
|
+
import type { ThemeBase, ThemeVars, CustomTheme, ThemeExport } from "./domain-types.js";
|
|
3
|
+
export type { ThemeBase, ThemeVars, CustomTheme, ThemeExport, } from "./domain-types.js";
|
|
4
4
|
/**
|
|
5
5
|
* A selectable theme contributed via {@link ThemeService.registerPreset}.
|
|
6
6
|
* Built-in presets (Tokyo Night, Solarized Light, Gruvbox Dark, …) are
|
package/dist/types.d.ts
CHANGED
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
* @packageDocumentation
|
|
26
26
|
*/
|
|
27
27
|
import type React from "react";
|
|
28
|
-
import type { ContextKeys } from "./context-keys";
|
|
29
|
-
import type { WorkspaceService } from "./workspace-service";
|
|
30
|
-
import type { EditorService } from "./editor-service";
|
|
31
|
-
import type { LayoutService } from "./layout-service";
|
|
32
|
-
import type { ProcessService } from "./process-service";
|
|
33
|
-
import type { ProcessesService } from "./processes-service";
|
|
34
|
-
import type { TerminalService } from "./terminal-service";
|
|
35
|
-
import type { FileService } from "./file-service";
|
|
36
|
-
import type { SearchService } from "./search-service";
|
|
37
|
-
import type { ThemeService, ThemePreset } from "./theme-service";
|
|
38
|
-
import type { DndService } from "./dnd-service";
|
|
39
|
-
import type { UiService } from "./ui-service";
|
|
40
|
-
import type { NetworkService } from "./network-service";
|
|
41
|
-
import type { SystemService } from "./system-service";
|
|
42
|
-
import type { LogService } from "./output-service";
|
|
43
|
-
import type { ExtensionStorage, ExtensionStorageScopes } from "./extension-storage";
|
|
28
|
+
import type { ContextKeys } from "./context-keys.js";
|
|
29
|
+
import type { WorkspaceService } from "./workspace-service.js";
|
|
30
|
+
import type { EditorService } from "./editor-service.js";
|
|
31
|
+
import type { LayoutService } from "./layout-service.js";
|
|
32
|
+
import type { ProcessService } from "./process-service.js";
|
|
33
|
+
import type { ProcessesService } from "./processes-service.js";
|
|
34
|
+
import type { TerminalService } from "./terminal-service.js";
|
|
35
|
+
import type { FileService } from "./file-service.js";
|
|
36
|
+
import type { SearchService } from "./search-service.js";
|
|
37
|
+
import type { ThemeService, ThemePreset } from "./theme-service.js";
|
|
38
|
+
import type { DndService } from "./dnd-service.js";
|
|
39
|
+
import type { UiService } from "./ui-service.js";
|
|
40
|
+
import type { NetworkService } from "./network-service.js";
|
|
41
|
+
import type { SystemService } from "./system-service.js";
|
|
42
|
+
import type { LogService } from "./output-service.js";
|
|
43
|
+
import type { ExtensionStorage, ExtensionStorageScopes } from "./extension-storage.js";
|
|
44
44
|
/**
|
|
45
45
|
* The teardown handle returned by every `register*` call on
|
|
46
46
|
* {@link ExtensionContext}. Calling {@link Disposable.dispose | dispose}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Disposable } from "./types";
|
|
2
|
-
import type { Workspace } from "./domain-types";
|
|
3
|
-
export type { Workspace, TerminalRecord } from "./domain-types";
|
|
1
|
+
import type { Disposable } from "./types.js";
|
|
2
|
+
import type { Workspace } from "./domain-types.js";
|
|
3
|
+
export type { Workspace, TerminalRecord } from "./domain-types.js";
|
|
4
4
|
/**
|
|
5
5
|
* A single status row contributed by a {@link WorkspaceStatusProvider}.
|
|
6
6
|
* Rows appear below the path line in the Workspaces side panel.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silo-code/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"description": "The public, types-first SDK for building Silo extensions — the only surface third-party extensions import.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Dave Weaver",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"vitest": "^4.1.7"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
|
-
"build": "tsc -p tsconfig.build.json",
|
|
47
|
+
"build": "tsc -p tsconfig.build.json && node scripts/fix-esm-extensions.mjs",
|
|
48
48
|
"test": "vitest run",
|
|
49
49
|
"test:watch": "vitest"
|
|
50
50
|
},
|
package/src/terminal-service.ts
CHANGED
|
@@ -209,6 +209,39 @@ export interface TerminalService {
|
|
|
209
209
|
handler: (event: OscEvent) => void,
|
|
210
210
|
): Disposable;
|
|
211
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Subscribe to the raw PTY output stream of the terminal identified by
|
|
214
|
+
* `terminalId`. The `handler` is called with every chunk of bytes the PTY
|
|
215
|
+
* produces — including ANSI escape sequences, OSC sequences, and all other
|
|
216
|
+
* control characters — exactly as they arrive, with no parsing or filtering.
|
|
217
|
+
*
|
|
218
|
+
* This fires even when the terminal's panel is not visible, so it is suitable
|
|
219
|
+
* for background monitoring (e.g. detecting output activity to confirm an
|
|
220
|
+
* agent is still running). Keep handlers lightweight: they execute
|
|
221
|
+
* synchronously on every PTY chunk, which can be multiple times per second
|
|
222
|
+
* while a program is active.
|
|
223
|
+
*
|
|
224
|
+
* The subscription is keyed to the **terminal record id** (e.g. `"term_…"`),
|
|
225
|
+
* not the underlying PTY session id, so it survives terminal recreation within
|
|
226
|
+
* the same record.
|
|
227
|
+
*
|
|
228
|
+
* Returns a {@link Disposable} that cancels the subscription.
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* ```ts
|
|
232
|
+
* // Track the last time any output arrived to confirm agent activity.
|
|
233
|
+
* let lastOutputAt = 0;
|
|
234
|
+
* const sub = ctx.terminals.subscribeOutput(terminalId, () => {
|
|
235
|
+
* lastOutputAt = Date.now();
|
|
236
|
+
* });
|
|
237
|
+
* ctx.subscriptions.push(sub);
|
|
238
|
+
* ```
|
|
239
|
+
*/
|
|
240
|
+
subscribeOutput(
|
|
241
|
+
terminalId: string,
|
|
242
|
+
handler: (data: string) => void,
|
|
243
|
+
): Disposable;
|
|
244
|
+
|
|
212
245
|
/**
|
|
213
246
|
* The record id of the terminal tab that is currently active in the active
|
|
214
247
|
* workspace's center dock, or `null` when an editor tab (or nothing) is
|