@silo-code/sdk 0.24.0 → 0.25.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/Tooltip.d.ts CHANGED
@@ -10,6 +10,10 @@ import { type ReactNode } from "react";
10
10
  * The CSS classes (`.silo-tooltip`, `.silo-tooltip-host`) are provided by the
11
11
  * host — no stylesheet import is needed in the extension.
12
12
  *
13
+ * Pass `disabled` to keep the trigger wrapper mounted (so layout stays stable)
14
+ * while suppressing the popup — handy when the tooltip is only useful
15
+ * conditionally, e.g. showing the full label of a tab only once it's truncated.
16
+ *
13
17
  * @example
14
18
  * ```tsx
15
19
  * <Tooltip content="New File">
@@ -22,8 +26,15 @@ import { type ReactNode } from "react";
22
26
  * @category Core Types
23
27
  * @public
24
28
  */
25
- export declare function Tooltip({ content, children, }: {
29
+ export declare function Tooltip({ content, children, disabled, }: {
30
+ /** Text shown in the popup. */
26
31
  content: string;
32
+ /** The trigger element the tooltip is anchored to. */
27
33
  children: ReactNode;
34
+ /**
35
+ * When `true`, the wrapper still renders (layout is unchanged) but the popup
36
+ * never appears. Defaults to `false`.
37
+ */
38
+ disabled?: boolean;
28
39
  }): import("react").JSX.Element;
29
40
  //# sourceMappingURL=Tooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAO1E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,OAAO,CAAC,EACtB,OAAO,EACP,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;CACrB,+BA0CA"}
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAO1E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,OAAO,CAAC,EACtB,OAAO,EACP,QAAQ,EACR,QAAgB,GACjB,EAAE;IACD,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,+BA2CA"}
package/dist/Tooltip.js CHANGED
@@ -15,6 +15,10 @@ const MARGIN_PX = 8;
15
15
  * The CSS classes (`.silo-tooltip`, `.silo-tooltip-host`) are provided by the
16
16
  * host — no stylesheet import is needed in the extension.
17
17
  *
18
+ * Pass `disabled` to keep the trigger wrapper mounted (so layout stays stable)
19
+ * while suppressing the popup — handy when the tooltip is only useful
20
+ * conditionally, e.g. showing the full label of a tab only once it's truncated.
21
+ *
18
22
  * @example
19
23
  * ```tsx
20
24
  * <Tooltip content="New File">
@@ -27,11 +31,13 @@ const MARGIN_PX = 8;
27
31
  * @category Core Types
28
32
  * @public
29
33
  */
30
- export function Tooltip({ content, children, }) {
34
+ export function Tooltip({ content, children, disabled = false, }) {
31
35
  const ref = useRef(null);
32
36
  const [anchor, setAnchor] = useState(null);
33
37
  const timer = useRef(null);
34
38
  const show = () => {
39
+ if (disabled)
40
+ return;
35
41
  timer.current = setTimeout(() => {
36
42
  const r = ref.current?.getBoundingClientRect();
37
43
  if (r)
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,QAAQ,GAAG,GAAG,CAAC;AACrB,MAAM,MAAM,GAAG,CAAC,CAAC;AACjB,MAAM,SAAS,GAAG,CAAC,CAAC;AAEpB;;;;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OAAO,GACJ,CACP,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -21,7 +21,7 @@ export type { WorkspaceService, WorkspaceState, CreateWorkspaceInput, WorkspaceS
21
21
  export type { EditorService, EditorSaveHandlers, OpenFileOptions, EditorViewInfo, OpenDiffSpec, DiffContent, DiffContentRequest, DiffContentProvider, ActiveEditorInfo, EditorsState, EditorSaveEvent, } from "./editor-service.js";
22
22
  export type { LayoutService, LayoutState, SidePanelColumnState, SideLocation, } from "./layout-service.js";
23
23
  export type { ProcessService, ProcessSession, ProcessSpawnOptions, ProcessExecOptions, ProcessExecResult, } from "./process-service.js";
24
- export type { ProcessesService, ProcessInfo, ProcessStats, } from "./processes-service.js";
24
+ export type { ProcessesService, ProcessInfo, ProcessStats, ProcessTreeNode, } from "./processes-service.js";
25
25
  export type { TerminalService, CreateTerminalInput, TerminalKind, TerminalRecord, TerminalTabDecoration, TerminalTabDecorationProvider, OscEvent, } from "./terminal-service.js";
26
26
  export type { FileService, FileMeta, FileChangeKind, FileChangeEvent, } from "./file-service.js";
27
27
  export type { SearchService, SearchOptions, SearchMatch, SearchFileResult, SearchResponse, } from "./search-service.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,YAAY,EACV,UAAU,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,MAAM,EACN,eAAe,EACf,QAAQ,EACR,OAAO,EACP,MAAM,EACN,oBAAoB,EACpB,UAAU,EACV,cAAc,EACd,SAAS,EACT,aAAa,EACb,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,eAAe,GAChB,MAAM,SAAS,CAAC;AAKjB,YAAY,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACV,gBAAgB,EAChB,c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,CAAC;AAI9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACvE,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA2GH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AA6BhD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAoBzC,sEAAsE;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAkCjD,8EAA8E;AAC9E,8EAA8E;AAC9E,6DAA6D;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,yEAAyE;AACzE,iFAAiF;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,wEAAwE;AACxE,iFAAiF;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,8EAA8E;AAC9E,4EAA4E;AAC5E,8EAA8E;AAC9E,8EAA8E;AAC9E,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA4GH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AA6BhD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAoBzC,sEAAsE;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAkCjD,8EAA8E;AAC9E,8EAA8E;AAC9E,6DAA6D;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,yEAAyE;AACzE,iFAAiF;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,wEAAwE;AACxE,iFAAiF;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,8EAA8E;AAC9E,4EAA4E;AAC5E,8EAA8E;AAC9E,8EAA8E;AAC9E,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -18,6 +18,23 @@ export interface ProcessStats {
18
18
  /** Resident memory in megabytes. */
19
19
  memoryMb: number;
20
20
  }
21
+ /**
22
+ * One process in a session's descendant tree. Only produced while an extension
23
+ * holds `enableStats({ trees: true })` — see {@link ProcessInfo.tree}.
24
+ *
25
+ * @category Consumer Services
26
+ * @public
27
+ */
28
+ export interface ProcessTreeNode {
29
+ readonly pid: number;
30
+ /** Executable name (e.g. `"node"`), not a full command line. */
31
+ readonly command: string;
32
+ /** CPU% delta since the previous sample, per-core. 0 on the first sample after the process appears. */
33
+ readonly cpuPercent: number;
34
+ /** Resident memory in megabytes. */
35
+ readonly memoryMb: number;
36
+ readonly children: readonly ProcessTreeNode[];
37
+ }
21
38
  /**
22
39
  * Live view of what is currently running in one PTY session — the foreground
23
40
  * process group as reported by the pty-host daemon every ~750 ms.
@@ -32,6 +49,12 @@ export interface ProcessStats {
32
49
  export interface ProcessInfo {
33
50
  /** The underlying PTY session id — stable across app restarts. */
34
51
  readonly sessionId: string;
52
+ /**
53
+ * The workspace this session belongs to. Use to group entries when
54
+ * requesting {@link ProcessesService.getState} with `{ allWorkspaces: true }`,
55
+ * or to correlate with `ctx.workspaces`.
56
+ */
57
+ readonly workspaceId: string;
35
58
  /**
36
59
  * The terminal tab record id (e.g. `"term_abc"`) when this session is backed
37
60
  * by a visible terminal tab. `undefined` only for headless sessions created
@@ -62,6 +85,13 @@ export interface ProcessInfo {
62
85
  * Absent otherwise (no polling overhead when nobody needs it).
63
86
  */
64
87
  readonly stats?: ProcessStats;
88
+ /**
89
+ * Process tree rooted at the foreground leader (the root node is the leader
90
+ * itself; descendants are found via parent edges, unioned on Unix with
91
+ * orphaned processes sharing the leader's process group). Only present while
92
+ * at least one extension holds `enableStats({ trees: true })`.
93
+ */
94
+ readonly tree?: ProcessTreeNode;
65
95
  }
66
96
  /**
67
97
  * Workspace process observability — a live read-only view of what is running
@@ -93,27 +123,40 @@ export interface ProcessInfo {
93
123
  */
94
124
  export interface ProcessesService {
95
125
  /**
96
- * Current {@link ProcessInfo} for every live session in the active workspace.
97
- * Only includes sessions that have received at least one foreground update
98
- * from the daemon (entries with an unknown leader are omitted).
126
+ * Current {@link ProcessInfo} for every live session in the active
127
+ * workspace. Pass `{ allWorkspaces: true }` to get every live session across
128
+ * every loaded workspace instead — use {@link ProcessInfo.workspaceId} to
129
+ * group or filter the result (e.g. for a sidebar badge per workspace).
130
+ * Sessions appear as soon as their terminal is attached, with placeholder
131
+ * values (`leader: ""`, `pgid: 0`) until the first foreground update
132
+ * arrives from the daemon.
99
133
  */
100
- getState(): ProcessInfo[];
134
+ getState(options?: {
135
+ allWorkspaces?: boolean;
136
+ }): ProcessInfo[];
101
137
  /**
102
138
  * Look up the {@link ProcessInfo} for a specific terminal tab by its record
103
139
  * id (e.g. `"term_abc"`). Returns `undefined` until the first foreground
104
- * event has been received for that terminal's session.
140
+ * event has been received for that terminal's session. Terminal ids are
141
+ * unique across workspaces, so this looks across all loaded workspaces
142
+ * regardless of which one is active.
105
143
  *
106
144
  * Convenience shortcut — avoids scanning {@link ProcessesService.getState}
107
145
  * when the caller already has a `terminalId`.
108
146
  */
109
147
  getByTerminalId(terminalId: string): ProcessInfo | undefined;
110
148
  /**
111
- * Subscribe to changes in the active workspace's process list. The listener
112
- * is called whenever a leader changes, `atPrompt` flips, a terminal is
113
- * added or removed, or a stats tick arrives (if {@link ProcessesService.enableStats}
114
- * is active). Returns a {@link Disposable} that cancels the subscription.
149
+ * Subscribe to changes in the active workspace's process list. Pass
150
+ * `{ allWorkspaces: true }` to be notified about changes across every
151
+ * loaded workspace instead (see {@link ProcessesService.getState}). The
152
+ * listener is called whenever a leader changes, `atPrompt` flips, a
153
+ * terminal is added or removed, or a stats tick arrives (if
154
+ * {@link ProcessesService.enableStats} is active). Returns a
155
+ * {@link Disposable} that cancels the subscription.
115
156
  */
116
- subscribe(listener: (state: ProcessInfo[]) => void): Disposable;
157
+ subscribe(listener: (state: ProcessInfo[]) => void, options?: {
158
+ allWorkspaces?: boolean;
159
+ }): Disposable;
117
160
  /**
118
161
  * Kill a specific foreground process group by pgid — sends `SIGTERM`, then
119
162
  * `SIGKILL` after 3 s if the group is still alive. **Does not destroy the
@@ -129,13 +172,20 @@ export interface ProcessesService {
129
172
  /**
130
173
  * Enable CPU + memory polling for all sessions in the active workspace.
131
174
  * Returns a {@link Disposable} — **dispose it when done** to stop polling and
132
- * remove `stats` from all {@link ProcessInfo} objects.
175
+ * remove `stats` (and `tree`) from all {@link ProcessInfo} objects.
176
+ *
177
+ * With `{ trees: true }`, each {@link ProcessInfo} additionally carries the
178
+ * descendant process tree rooted at its foreground leader (see
179
+ * {@link ProcessInfo.tree}) — built host-side from one shared process-table
180
+ * scan per tick, so it costs the same no matter how many extensions ask.
133
181
  *
134
182
  * Multiple callers share one poll loop (refcounted); the loop stops only when
135
183
  * the last disposable is released. Polling interval is ~1500 ms.
136
184
  *
137
185
  * CPU% is `0` on the first sample; values stabilize after ~3 s.
138
186
  */
139
- enableStats(): Disposable;
187
+ enableStats(options?: {
188
+ trees?: boolean;
189
+ }): Disposable;
140
190
  }
141
191
  //# sourceMappingURL=processes-service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"processes-service.d.ts","sourceRoot":"","sources":["../src/processes-service.ts"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KAAK,CAAC,EAAE,YAAY,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,WAAW,EAAE,CAAC;IAE/D;;;;;;;;;OASG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;IAE7D;;;;;;;;OAQG;IACH,SAAS,CACP,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,IAAI,EACxC,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,GACpC,UAAU,CAAC;IAEd;;;;;;;;;;OAUG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElC;;;;;;;;;;;;;;OAcG;IACH,WAAW,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,UAAU,CAAC;CACxD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silo-code/sdk",
3
- "version": "0.24.0",
3
+ "version": "0.25.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",
package/src/Tooltip.tsx CHANGED
@@ -16,6 +16,10 @@ const MARGIN_PX = 8;
16
16
  * The CSS classes (`.silo-tooltip`, `.silo-tooltip-host`) are provided by the
17
17
  * host — no stylesheet import is needed in the extension.
18
18
  *
19
+ * Pass `disabled` to keep the trigger wrapper mounted (so layout stays stable)
20
+ * while suppressing the popup — handy when the tooltip is only useful
21
+ * conditionally, e.g. showing the full label of a tab only once it's truncated.
22
+ *
19
23
  * @example
20
24
  * ```tsx
21
25
  * <Tooltip content="New File">
@@ -31,9 +35,17 @@ const MARGIN_PX = 8;
31
35
  export function Tooltip({
32
36
  content,
33
37
  children,
38
+ disabled = false,
34
39
  }: {
40
+ /** Text shown in the popup. */
35
41
  content: string;
42
+ /** The trigger element the tooltip is anchored to. */
36
43
  children: ReactNode;
44
+ /**
45
+ * When `true`, the wrapper still renders (layout is unchanged) but the popup
46
+ * never appears. Defaults to `false`.
47
+ */
48
+ disabled?: boolean;
37
49
  }) {
38
50
  const ref = useRef<HTMLSpanElement>(null);
39
51
  const [anchor, setAnchor] = useState<{ cx: number; top: number } | null>(
@@ -42,6 +54,7 @@ export function Tooltip({
42
54
  const timer = useRef<ReturnType<typeof setTimeout> | null>(null);
43
55
 
44
56
  const show = () => {
57
+ if (disabled) return;
45
58
  timer.current = setTimeout(() => {
46
59
  const r = ref.current?.getBoundingClientRect();
47
60
  if (r) setAnchor({ cx: r.left + r.width / 2, top: r.top - GAP_PX });
package/src/index.ts CHANGED
@@ -93,6 +93,7 @@ export type {
93
93
  ProcessesService,
94
94
  ProcessInfo,
95
95
  ProcessStats,
96
+ ProcessTreeNode,
96
97
  } from "./processes-service";
97
98
  export type {
98
99
  TerminalService,
@@ -25,6 +25,24 @@ export interface ProcessStats {
25
25
  memoryMb: number;
26
26
  }
27
27
 
28
+ /**
29
+ * One process in a session's descendant tree. Only produced while an extension
30
+ * holds `enableStats({ trees: true })` — see {@link ProcessInfo.tree}.
31
+ *
32
+ * @category Consumer Services
33
+ * @public
34
+ */
35
+ export interface ProcessTreeNode {
36
+ readonly pid: number;
37
+ /** Executable name (e.g. `"node"`), not a full command line. */
38
+ readonly command: string;
39
+ /** CPU% delta since the previous sample, per-core. 0 on the first sample after the process appears. */
40
+ readonly cpuPercent: number;
41
+ /** Resident memory in megabytes. */
42
+ readonly memoryMb: number;
43
+ readonly children: readonly ProcessTreeNode[];
44
+ }
45
+
28
46
  /**
29
47
  * Live view of what is currently running in one PTY session — the foreground
30
48
  * process group as reported by the pty-host daemon every ~750 ms.
@@ -39,6 +57,12 @@ export interface ProcessStats {
39
57
  export interface ProcessInfo {
40
58
  /** The underlying PTY session id — stable across app restarts. */
41
59
  readonly sessionId: string;
60
+ /**
61
+ * The workspace this session belongs to. Use to group entries when
62
+ * requesting {@link ProcessesService.getState} with `{ allWorkspaces: true }`,
63
+ * or to correlate with `ctx.workspaces`.
64
+ */
65
+ readonly workspaceId: string;
42
66
  /**
43
67
  * The terminal tab record id (e.g. `"term_abc"`) when this session is backed
44
68
  * by a visible terminal tab. `undefined` only for headless sessions created
@@ -69,6 +93,13 @@ export interface ProcessInfo {
69
93
  * Absent otherwise (no polling overhead when nobody needs it).
70
94
  */
71
95
  readonly stats?: ProcessStats;
96
+ /**
97
+ * Process tree rooted at the foreground leader (the root node is the leader
98
+ * itself; descendants are found via parent edges, unioned on Unix with
99
+ * orphaned processes sharing the leader's process group). Only present while
100
+ * at least one extension holds `enableStats({ trees: true })`.
101
+ */
102
+ readonly tree?: ProcessTreeNode;
72
103
  }
73
104
 
74
105
  /**
@@ -101,16 +132,22 @@ export interface ProcessInfo {
101
132
  */
102
133
  export interface ProcessesService {
103
134
  /**
104
- * Current {@link ProcessInfo} for every live session in the active workspace.
105
- * Only includes sessions that have received at least one foreground update
106
- * from the daemon (entries with an unknown leader are omitted).
135
+ * Current {@link ProcessInfo} for every live session in the active
136
+ * workspace. Pass `{ allWorkspaces: true }` to get every live session across
137
+ * every loaded workspace instead — use {@link ProcessInfo.workspaceId} to
138
+ * group or filter the result (e.g. for a sidebar badge per workspace).
139
+ * Sessions appear as soon as their terminal is attached, with placeholder
140
+ * values (`leader: ""`, `pgid: 0`) until the first foreground update
141
+ * arrives from the daemon.
107
142
  */
108
- getState(): ProcessInfo[];
143
+ getState(options?: { allWorkspaces?: boolean }): ProcessInfo[];
109
144
 
110
145
  /**
111
146
  * Look up the {@link ProcessInfo} for a specific terminal tab by its record
112
147
  * id (e.g. `"term_abc"`). Returns `undefined` until the first foreground
113
- * event has been received for that terminal's session.
148
+ * event has been received for that terminal's session. Terminal ids are
149
+ * unique across workspaces, so this looks across all loaded workspaces
150
+ * regardless of which one is active.
114
151
  *
115
152
  * Convenience shortcut — avoids scanning {@link ProcessesService.getState}
116
153
  * when the caller already has a `terminalId`.
@@ -118,12 +155,18 @@ export interface ProcessesService {
118
155
  getByTerminalId(terminalId: string): ProcessInfo | undefined;
119
156
 
120
157
  /**
121
- * Subscribe to changes in the active workspace's process list. The listener
122
- * is called whenever a leader changes, `atPrompt` flips, a terminal is
123
- * added or removed, or a stats tick arrives (if {@link ProcessesService.enableStats}
124
- * is active). Returns a {@link Disposable} that cancels the subscription.
158
+ * Subscribe to changes in the active workspace's process list. Pass
159
+ * `{ allWorkspaces: true }` to be notified about changes across every
160
+ * loaded workspace instead (see {@link ProcessesService.getState}). The
161
+ * listener is called whenever a leader changes, `atPrompt` flips, a
162
+ * terminal is added or removed, or a stats tick arrives (if
163
+ * {@link ProcessesService.enableStats} is active). Returns a
164
+ * {@link Disposable} that cancels the subscription.
125
165
  */
126
- subscribe(listener: (state: ProcessInfo[]) => void): Disposable;
166
+ subscribe(
167
+ listener: (state: ProcessInfo[]) => void,
168
+ options?: { allWorkspaces?: boolean },
169
+ ): Disposable;
127
170
 
128
171
  /**
129
172
  * Kill a specific foreground process group by pgid — sends `SIGTERM`, then
@@ -141,12 +184,17 @@ export interface ProcessesService {
141
184
  /**
142
185
  * Enable CPU + memory polling for all sessions in the active workspace.
143
186
  * Returns a {@link Disposable} — **dispose it when done** to stop polling and
144
- * remove `stats` from all {@link ProcessInfo} objects.
187
+ * remove `stats` (and `tree`) from all {@link ProcessInfo} objects.
188
+ *
189
+ * With `{ trees: true }`, each {@link ProcessInfo} additionally carries the
190
+ * descendant process tree rooted at its foreground leader (see
191
+ * {@link ProcessInfo.tree}) — built host-side from one shared process-table
192
+ * scan per tick, so it costs the same no matter how many extensions ask.
145
193
  *
146
194
  * Multiple callers share one poll loop (refcounted); the loop stops only when
147
195
  * the last disposable is released. Polling interval is ~1500 ms.
148
196
  *
149
197
  * CPU% is `0` on the first sample; values stabilize after ~3 s.
150
198
  */
151
- enableStats(): Disposable;
199
+ enableStats(options?: { trees?: boolean }): Disposable;
152
200
  }