@silo-code/sdk 0.15.0 → 0.17.0

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.
@@ -129,6 +129,9 @@ export interface Workspace {
129
129
  sidePanelOrder?: Record<string, number>;
130
130
  activeSidePanelTabs?: Record<string, string>;
131
131
  sidePanelScrollPositions?: Record<string, number>;
132
+ /** Hidden side panels, keyed by panel id; only an explicit `false` (hidden)
133
+ * is stored, so an absent key means visible (the default). */
134
+ sidePanelVisibility?: Record<string, boolean>;
132
135
  extensionState?: Record<string, Record<string, unknown>>;
133
136
  /** ID of the current preview (temporary) editor, if any. */
134
137
  previewEditorId?: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"domain-types.d.ts","sourceRoot":"","sources":["../src/domain-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAC;AAErD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mGAAmG;IACnG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,kGAAkG;IAClG,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,IA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AC1B,wBAAwB,EAAE,MAAM,CAAC;IACjC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,0BAA0B,EAAE,MAAM,CAAC;IAEnC,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2BAA2B,EAAE,MAAM,CAAC;IACpC,oBAAoB,EAAE,MAAM,CAAC;IAE7B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAE9B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uBAAuB,EAAE,MAAM,CAAC;CACjC;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,OAAO,EAAE,CAAC,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC"}
@@ -1,11 +1,14 @@
1
1
  /**
2
- * Namespaced, persisted key/value storage handed to side-panel components
3
- * via `SidePanelProps.storage`. Each panel id gets its own bag; values are
4
- * persisted alongside the rest of the app state.
2
+ * Namespaced, persisted key/value storage handed to extensions. Two scopes are
3
+ * exposed on {@link ExtensionContext.storage} ({@link ExtensionStorageScopes}):
4
+ * `global` (one bag per extension, shared across every workspace) and
5
+ * `workspace` (one bag per extension × the active workspace). Side panels also
6
+ * receive a workspace-scoped bag keyed by panel id via `SidePanelProps.storage`.
5
7
  *
6
- * The store is hydrated asynchronously after the panels mount, so consumers
7
- * that need to wait for restored values should check `props.hydrated` or
8
- * use `subscribe` to re-read once it flips.
8
+ * Values persist alongside the rest of the app state. The store hydrates
9
+ * asynchronously, and the workspace bag is swapped when the active workspace
10
+ * changes, so consumers that need to react to restored or switched values
11
+ * should {@link ExtensionStorage.subscribe | subscribe} and re-read.
9
12
  *
10
13
  * @category Consumer Services
11
14
  * @public
@@ -16,11 +19,34 @@ export interface ExtensionStorage {
16
19
  get<T>(key: string, fallback: T): T;
17
20
  /** Write a value. `undefined` deletes the key. */
18
21
  set(key: string, value: unknown): void;
22
+ /** The keys currently set in this namespace. */
23
+ keys(): string[];
19
24
  /**
20
- * Subscribe to changes in this namespace. Called on any set within this
21
- * namespace, and also whenever the underlying app state finishes hydrating
22
- * (so callers can re-read after persisted state loads).
25
+ * Subscribe to changes in this namespace. Called when a value in this
26
+ * namespace changes, when the underlying app state finishes hydrating, and
27
+ * (for the workspace scope) when the active workspace changes. Returns an
28
+ * unsubscribe function.
23
29
  */
24
30
  subscribe(listener: () => void): () => void;
25
31
  }
32
+ /**
33
+ * The two persisted-storage scopes available to an extension, exposed as
34
+ * {@link ExtensionContext.storage}.
35
+ *
36
+ * @category Consumer Services
37
+ * @public
38
+ */
39
+ export interface ExtensionStorageScopes {
40
+ /**
41
+ * Per-extension storage shared across **all** workspaces — the place for
42
+ * an extension's own settings (enabled features, layout choices, etc.).
43
+ */
44
+ readonly global: ExtensionStorage;
45
+ /**
46
+ * Per-extension storage scoped to the **active workspace** — the place for
47
+ * state that should differ per workspace (last selection, per-project
48
+ * toggles). The bag is swapped when the active workspace changes.
49
+ */
50
+ readonly workspace: ExtensionStorage;
51
+ }
26
52
  //# sourceMappingURL=extension-storage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extension-storage.d.ts","sourceRoot":"","sources":["../src/extension-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IACnC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;IACpC,kDAAkD;IAClD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACvC;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;CAC7C"}
1
+ {"version":3,"file":"extension-storage.d.ts","sourceRoot":"","sources":["../src/extension-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IACnC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;IACpC,kDAAkD;IAClD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACvC,gDAAgD;IAChD,IAAI,IAAI,MAAM,EAAE,CAAC;IACjB;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;CACtC"}
package/dist/index.d.ts CHANGED
@@ -15,13 +15,14 @@ export type { WorkspaceService, WorkspaceState, CreateWorkspaceInput, WorkspaceS
15
15
  export type { EditorService, EditorSaveHandlers, OpenFileOptions, EditorViewInfo, OpenDiffSpec, DiffContent, DiffContentRequest, DiffContentProvider, } from "./editor-service";
16
16
  export type { LayoutService, LayoutState, SidePanelColumnState, SideLocation, } from "./layout-service";
17
17
  export type { ProcessService, ProcessSession, ProcessSpawnOptions, ProcessExecOptions, ProcessExecResult, } from "./process-service";
18
+ export type { ProcessesService, ProcessInfo, ProcessStats, } from "./processes-service";
18
19
  export type { TerminalService, CreateTerminalInput, TerminalKind, TerminalRecord, TerminalTabDecoration, TerminalTabDecorationProvider, OscEvent, } from "./terminal-service";
19
20
  export type { FileService, FileMeta, FileChangeEvent } from "./file-service";
20
21
  export type { SearchService, SearchOptions, SearchMatch, SearchFileResult, SearchResponse, } from "./search-service";
21
22
  export type { Permission } from "./permissions";
22
23
  export { PathDeniedError } from "./permissions";
23
24
  export type { ThemeService, ThemeState, ThemePreset, ResolvedTheme, ThemeBase, ThemeVars, CustomTheme, ThemeExport, } from "./theme-service";
24
- export type { ExtensionStorage } from "./extension-storage";
25
+ export type { ExtensionStorage, ExtensionStorageScopes, } from "./extension-storage";
25
26
  export type { DndService, DndItem, DndMime, DragInit, DndMode, DropContext, DropTargetHandlers, } from "./dnd-service";
26
27
  export { DND_MIME } from "./dnd-service";
27
28
  export type { UiService, FileFilter, MenuItem, MenuItemTrailing, MenuSeparator, MenuHeader, MenuEntry, ShowMenuOptions, ConfirmOptions, PromptOptions, ModalOptions, NotifyAction, NotifyOptions, } from "./ui-service";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;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,EA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T,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,SAAS,EACT,eAAe,EACf,cAAc,EACd,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,cAAc,EACd,qBAAqB,EACrB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;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,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,2BAA2B,EAC3B,qBAAqB,EACrB,wBAAwB,EACxB,cAAc,EACd,sBAAsB,GACvB,MAAM,qBAAq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B,aAAa,EACb,UAAU,EACV,SAAS,EACT,eAAe,EACf,cAAc,EACd,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,cAAc,EACd,qBAAqB,EACrB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,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;;;;;;;;;;GAUG;AA8FH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AA0BhD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AA8BzC,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;;;;;;;;;;GAUG;AAmGH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AA6BhD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AA8BzC,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"}
@@ -0,0 +1,141 @@
1
+ import type { Disposable } from "./types";
2
+ /**
3
+ * Resource snapshot for the foreground leader of a PTY session. Only present
4
+ * on a {@link ProcessInfo} when an extension has called
5
+ * {@link ProcessesService.enableStats}.
6
+ *
7
+ * CPU% is a delta between consecutive samples (the first sample after calling
8
+ * `enableStats` returns 0%; values stabilize after the second poll ~3 s later).
9
+ *
10
+ * @category Consumer Services
11
+ * @public
12
+ */
13
+ export interface ProcessStats {
14
+ /** The process id of the foreground leader (same as {@link ProcessInfo.pgid} by convention). */
15
+ pid: number;
16
+ /** CPU percentage used since the previous sample, per-core (not system-wide total). */
17
+ cpuPercent: number;
18
+ /** Resident memory in megabytes. */
19
+ memoryMb: number;
20
+ }
21
+ /**
22
+ * Live view of what is currently running in one PTY session — the foreground
23
+ * process group as reported by the pty-host daemon every ~750 ms.
24
+ *
25
+ * Returned by {@link ProcessesService.getState} and
26
+ * {@link ProcessesService.getByTerminalId}; delivered to
27
+ * {@link ProcessesService.subscribe} listeners on every change.
28
+ *
29
+ * @category Consumer Services
30
+ * @public
31
+ */
32
+ export interface ProcessInfo {
33
+ /** The underlying PTY session id — stable across app restarts. */
34
+ readonly sessionId: string;
35
+ /**
36
+ * The terminal tab record id (e.g. `"term_abc"`) when this session is backed
37
+ * by a visible terminal tab. `undefined` only for headless sessions created
38
+ * directly via {@link ProcessService.spawn}. Use to correlate with
39
+ * `ctx.terminals` or to call `ctx.terminals.focus(terminalId)`.
40
+ */
41
+ readonly terminalId?: string;
42
+ /**
43
+ * Display title of the terminal tab — matches the tab label the user sees
44
+ * (`customName ?? title` from the terminal record). Undefined for headless
45
+ * sessions.
46
+ */
47
+ readonly terminalTitle?: string;
48
+ /**
49
+ * Foreground process-group id — the group the PTY is currently routing input
50
+ * to. Equals the PID of the group leader (by Unix convention).
51
+ */
52
+ readonly pgid: number;
53
+ /** Name of the foreground program (e.g. `"node"`, `"vim"`, `"-zsh"`). */
54
+ readonly leader: string;
55
+ /** Working directory of the foreground leader (`""` if unknown). */
56
+ readonly cwd: string;
57
+ /** `true` when the foreground group is the shell itself — i.e. idle at a prompt. */
58
+ readonly atPrompt: boolean;
59
+ /**
60
+ * CPU and memory snapshot. Only present while at least one extension has
61
+ * called {@link ProcessesService.enableStats} and held its {@link Disposable}.
62
+ * Absent otherwise (no polling overhead when nobody needs it).
63
+ */
64
+ readonly stats?: ProcessStats;
65
+ }
66
+ /**
67
+ * Workspace process observability — a live read-only view of what is running
68
+ * in each terminal of the active workspace, with optional resource stats and a
69
+ * surgical kill that leaves the shell intact. Exposed as
70
+ * {@link ExtensionContext.processes}.
71
+ *
72
+ * The foreground leader, cwd, and idle/busy state update continuously
73
+ * (every ~750 ms) via the pty-host daemon — no polling needed for that data.
74
+ * CPU and memory require an explicit opt-in via {@link ProcessesService.enableStats}
75
+ * because sysinfo queries have a cost proportional to the number of active
76
+ * sessions.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * // Notify when all agents in the workspace are idle.
81
+ * const sub = ctx.processes.subscribe((procs) => {
82
+ * const allIdle = procs.every((p) => p.atPrompt);
83
+ * if (allIdle) ctx.ui.notify({ title: "All agents finished" });
84
+ * });
85
+ * ctx.subscriptions.push(sub);
86
+ *
87
+ * // Enable resource stats for a live process-manager panel.
88
+ * ctx.subscriptions.push(ctx.processes.enableStats());
89
+ * ```
90
+ *
91
+ * @category Consumer Services
92
+ * @public
93
+ */
94
+ export interface ProcessesService {
95
+ /**
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).
99
+ */
100
+ getState(): ProcessInfo[];
101
+ /**
102
+ * Look up the {@link ProcessInfo} for a specific terminal tab by its record
103
+ * id (e.g. `"term_abc"`). Returns `undefined` until the first foreground
104
+ * event has been received for that terminal's session.
105
+ *
106
+ * Convenience shortcut — avoids scanning {@link ProcessesService.getState}
107
+ * when the caller already has a `terminalId`.
108
+ */
109
+ getByTerminalId(terminalId: string): ProcessInfo | undefined;
110
+ /**
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.
115
+ */
116
+ subscribe(listener: (state: ProcessInfo[]) => void): Disposable;
117
+ /**
118
+ * Kill a specific foreground process group by pgid — sends `SIGTERM`, then
119
+ * `SIGKILL` after 3 s if the group is still alive. **Does not destroy the
120
+ * PTY session** — the shell remains alive and returns to its prompt.
121
+ *
122
+ * The `pgid` comes from {@link ProcessInfo.pgid}. Killing a shell's own pgid
123
+ * (when `atPrompt` is `true`) would close the terminal; guard against that if
124
+ * needed.
125
+ *
126
+ * Requires the `"process"` {@link Permission} for third-party extensions.
127
+ */
128
+ kill(pgid: number): Promise<void>;
129
+ /**
130
+ * Enable CPU + memory polling for all sessions in the active workspace.
131
+ * Returns a {@link Disposable} — **dispose it when done** to stop polling and
132
+ * remove `stats` from all {@link ProcessInfo} objects.
133
+ *
134
+ * Multiple callers share one poll loop (refcounted); the loop stops only when
135
+ * the last disposable is released. Polling interval is ~1500 ms.
136
+ *
137
+ * CPU% is `0` on the first sample; values stabilize after ~3 s.
138
+ */
139
+ enableStats(): Disposable;
140
+ }
141
+ //# sourceMappingURL=processes-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processes-service.d.ts","sourceRoot":"","sources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;;;;OASG;IACH,WAAW,IAAI,UAAU,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=processes-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processes-service.js","sourceRoot":"","sources":["../src/processes-service.ts"],"names":[],"mappings":""}
package/dist/types.d.ts CHANGED
@@ -24,6 +24,7 @@ import type { WorkspaceService } from "./workspace-service";
24
24
  import type { EditorService } from "./editor-service";
25
25
  import type { LayoutService } from "./layout-service";
26
26
  import type { ProcessService } from "./process-service";
27
+ import type { ProcessesService } from "./processes-service";
27
28
  import type { TerminalService } from "./terminal-service";
28
29
  import type { FileService } from "./file-service";
29
30
  import type { SearchService } from "./search-service";
@@ -31,7 +32,7 @@ import type { ThemeService, ThemePreset } from "./theme-service";
31
32
  import type { DndService } from "./dnd-service";
32
33
  import type { UiService } from "./ui-service";
33
34
  import type { NetworkService } from "./network-service";
34
- import type { ExtensionStorage } from "./extension-storage";
35
+ import type { ExtensionStorage, ExtensionStorageScopes } from "./extension-storage";
35
36
  /**
36
37
  * The teardown handle returned by every `register*` call on
37
38
  * {@link ExtensionContext}. Calling {@link Disposable.dispose | dispose}
@@ -254,9 +255,12 @@ export interface SidePanelProps {
254
255
  /** True when this side panel is currently visible / selected in its column. */
255
256
  active: boolean;
256
257
  /**
257
- * Namespaced, persisted key/value storage scoped to this panel id.
258
- * Use for restoring UI state (scroll positions, selections, expanded
259
- * sections, etc.) across reloads.
258
+ * Namespaced, persisted key/value storage scoped to this panel id (the
259
+ * `workspace` scope of {@link ExtensionStorageScopes}, keyed by panel rather
260
+ * than extension). Use for **panel-local UI state** — scroll positions,
261
+ * selections, expanded sections, etc. — which is kept per workspace. For
262
+ * extension-level settings shared across surfaces and workspaces, use
263
+ * {@link ExtensionContext.storage}`.global` instead.
260
264
  */
261
265
  storage: ExtensionStorage;
262
266
  /**
@@ -321,6 +325,14 @@ export interface DockPanelKind {
321
325
  /**
322
326
  * A widget in the status bar (the strip along the bottom of the window).
323
327
  *
328
+ * @remarks
329
+ * The status bar container sets `font-size` and `color` on itself, so
330
+ * components rendered inside it inherit the correct values automatically —
331
+ * **do not override `font-size` or `font-family`** in status item CSS unless
332
+ * you have a deliberate reason to deviate. You may override `color` using
333
+ * design tokens (e.g. `--silo-color-text-lo` for a label / `--silo-color-text`
334
+ * for a value) to create visual distinctions within an item.
335
+ *
324
336
  * @category Registration
325
337
  * @public
326
338
  */
@@ -380,6 +392,22 @@ export interface ExtensionContext {
380
392
  readonly extensionId: string;
381
393
  /** Disposables tracked for this extension; the host disposes them on teardown. */
382
394
  readonly subscriptions: Disposable[];
395
+ /**
396
+ * Persisted, per-extension key/value storage, in two scopes
397
+ * ({@link ExtensionStorageScopes}): `global` (shared across all workspaces —
398
+ * for the extension's own settings) and `workspace` (scoped to the active
399
+ * workspace). Each is the extension's own bag, shared across all its surfaces
400
+ * — status bar, side panels, and settings page — independent of whether any
401
+ * panel has mounted.
402
+ *
403
+ * `.get()` / `.set()` are safe to call in {@link Extension.activate}. Note the
404
+ * app state hydrates asynchronously and the `workspace` bag is swapped on
405
+ * workspace change, so a value persisted last session may not be present at
406
+ * the instant `activate` runs — `subscribe` and re-read to pick up restored or
407
+ * switched values. (`SidePanelProps.storage` exposes the same `workspace`
408
+ * scope keyed by panel id, for panel-local UI state.)
409
+ */
410
+ readonly storage: ExtensionStorageScopes;
383
411
  /** Register an {@link Editor} (a presenter for a file type's editor tab). */
384
412
  registerEditor(editor: Editor): Disposable;
385
413
  /** Register a {@link FileType} (declarative file metadata). */
@@ -430,6 +458,14 @@ export interface ExtensionContext {
430
458
  * re-attach a session and drive it via the returned `ProcessSession`.
431
459
  */
432
460
  readonly process: ProcessService;
461
+ /**
462
+ * Workspace process observability — a live view of what is running in each
463
+ * terminal, with optional CPU/memory stats and a surgical kill that leaves the
464
+ * shell alive. Complements {@link ExtensionContext.process} (which spawns
465
+ * sessions); this surface is for reading and controlling what's already running.
466
+ * See {@link ProcessesService} for the full API.
467
+ */
468
+ readonly processes: ProcessesService;
433
469
  /**
434
470
  * Consumer API for the terminal domain — open a terminal tab in a workspace
435
471
  * (`create`) or reap a workspace's terminals (`closeWorkspace`). The terminal
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,mBAAmB,CAAC,KAAK,CAA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C,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,SAAS,CAAC;CAC/B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB;IAChC,+EAA+E;IAC/E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,SAAS,CAAC,GAAG,GAAG,OAAO;IACtC;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,EAAE,gBAAgB,GAAG,GAAG,GAAG,IAAI,CAAC;IAC5C,gEAAgE;IAChE,UAAU,CAAC,IAAI,IAAI,CAAC;CACrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silo-code/sdk",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
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",
@@ -132,6 +132,9 @@ export interface Workspace {
132
132
  sidePanelOrder?: Record<string, number>;
133
133
  activeSidePanelTabs?: Record<string, string>;
134
134
  sidePanelScrollPositions?: Record<string, number>;
135
+ /** Hidden side panels, keyed by panel id; only an explicit `false` (hidden)
136
+ * is stored, so an absent key means visible (the default). */
137
+ sidePanelVisibility?: Record<string, boolean>;
135
138
  extensionState?: Record<string, Record<string, unknown>>;
136
139
  /** ID of the current preview (temporary) editor, if any. */
137
140
  previewEditorId?: string | null;
@@ -1,11 +1,14 @@
1
1
  /**
2
- * Namespaced, persisted key/value storage handed to side-panel components
3
- * via `SidePanelProps.storage`. Each panel id gets its own bag; values are
4
- * persisted alongside the rest of the app state.
2
+ * Namespaced, persisted key/value storage handed to extensions. Two scopes are
3
+ * exposed on {@link ExtensionContext.storage} ({@link ExtensionStorageScopes}):
4
+ * `global` (one bag per extension, shared across every workspace) and
5
+ * `workspace` (one bag per extension × the active workspace). Side panels also
6
+ * receive a workspace-scoped bag keyed by panel id via `SidePanelProps.storage`.
5
7
  *
6
- * The store is hydrated asynchronously after the panels mount, so consumers
7
- * that need to wait for restored values should check `props.hydrated` or
8
- * use `subscribe` to re-read once it flips.
8
+ * Values persist alongside the rest of the app state. The store hydrates
9
+ * asynchronously, and the workspace bag is swapped when the active workspace
10
+ * changes, so consumers that need to react to restored or switched values
11
+ * should {@link ExtensionStorage.subscribe | subscribe} and re-read.
9
12
  *
10
13
  * @category Consumer Services
11
14
  * @public
@@ -16,10 +19,34 @@ export interface ExtensionStorage {
16
19
  get<T>(key: string, fallback: T): T;
17
20
  /** Write a value. `undefined` deletes the key. */
18
21
  set(key: string, value: unknown): void;
22
+ /** The keys currently set in this namespace. */
23
+ keys(): string[];
19
24
  /**
20
- * Subscribe to changes in this namespace. Called on any set within this
21
- * namespace, and also whenever the underlying app state finishes hydrating
22
- * (so callers can re-read after persisted state loads).
25
+ * Subscribe to changes in this namespace. Called when a value in this
26
+ * namespace changes, when the underlying app state finishes hydrating, and
27
+ * (for the workspace scope) when the active workspace changes. Returns an
28
+ * unsubscribe function.
23
29
  */
24
30
  subscribe(listener: () => void): () => void;
25
31
  }
32
+
33
+ /**
34
+ * The two persisted-storage scopes available to an extension, exposed as
35
+ * {@link ExtensionContext.storage}.
36
+ *
37
+ * @category Consumer Services
38
+ * @public
39
+ */
40
+ export interface ExtensionStorageScopes {
41
+ /**
42
+ * Per-extension storage shared across **all** workspaces — the place for
43
+ * an extension's own settings (enabled features, layout choices, etc.).
44
+ */
45
+ readonly global: ExtensionStorage;
46
+ /**
47
+ * Per-extension storage scoped to the **active workspace** — the place for
48
+ * state that should differ per workspace (last selection, per-project
49
+ * toggles). The bag is swapped when the active workspace changes.
50
+ */
51
+ readonly workspace: ExtensionStorage;
52
+ }
package/src/index.ts CHANGED
@@ -80,6 +80,11 @@ export type {
80
80
  ProcessExecOptions,
81
81
  ProcessExecResult,
82
82
  } from "./process-service";
83
+ export type {
84
+ ProcessesService,
85
+ ProcessInfo,
86
+ ProcessStats,
87
+ } from "./processes-service";
83
88
  export type {
84
89
  TerminalService,
85
90
  CreateTerminalInput,
@@ -116,7 +121,10 @@ export type {
116
121
  CustomTheme,
117
122
  ThemeExport,
118
123
  } from "./theme-service";
119
- export type { ExtensionStorage } from "./extension-storage";
124
+ export type {
125
+ ExtensionStorage,
126
+ ExtensionStorageScopes,
127
+ } from "./extension-storage";
120
128
  // The drag-and-drop domain: the consumer service + its payload/handler shapes.
121
129
  // DND_MIME is a value (the well-known MIME vocabulary), so it's a runtime export.
122
130
  export type {
@@ -0,0 +1,152 @@
1
+ import type { Disposable } from "./types";
2
+
3
+ // `ctx.processes` — workspace process observability: what's running in each
4
+ // terminal, its resource usage, and surgical kill without destroying the PTY
5
+ // session. The companion to `ctx.process` (which spawns/attaches sessions).
6
+ // The public contract lives here; the host implementation is in the host package.
7
+
8
+ /**
9
+ * Resource snapshot for the foreground leader of a PTY session. Only present
10
+ * on a {@link ProcessInfo} when an extension has called
11
+ * {@link ProcessesService.enableStats}.
12
+ *
13
+ * CPU% is a delta between consecutive samples (the first sample after calling
14
+ * `enableStats` returns 0%; values stabilize after the second poll ~3 s later).
15
+ *
16
+ * @category Consumer Services
17
+ * @public
18
+ */
19
+ export interface ProcessStats {
20
+ /** The process id of the foreground leader (same as {@link ProcessInfo.pgid} by convention). */
21
+ pid: number;
22
+ /** CPU percentage used since the previous sample, per-core (not system-wide total). */
23
+ cpuPercent: number;
24
+ /** Resident memory in megabytes. */
25
+ memoryMb: number;
26
+ }
27
+
28
+ /**
29
+ * Live view of what is currently running in one PTY session — the foreground
30
+ * process group as reported by the pty-host daemon every ~750 ms.
31
+ *
32
+ * Returned by {@link ProcessesService.getState} and
33
+ * {@link ProcessesService.getByTerminalId}; delivered to
34
+ * {@link ProcessesService.subscribe} listeners on every change.
35
+ *
36
+ * @category Consumer Services
37
+ * @public
38
+ */
39
+ export interface ProcessInfo {
40
+ /** The underlying PTY session id — stable across app restarts. */
41
+ readonly sessionId: string;
42
+ /**
43
+ * The terminal tab record id (e.g. `"term_abc"`) when this session is backed
44
+ * by a visible terminal tab. `undefined` only for headless sessions created
45
+ * directly via {@link ProcessService.spawn}. Use to correlate with
46
+ * `ctx.terminals` or to call `ctx.terminals.focus(terminalId)`.
47
+ */
48
+ readonly terminalId?: string;
49
+ /**
50
+ * Display title of the terminal tab — matches the tab label the user sees
51
+ * (`customName ?? title` from the terminal record). Undefined for headless
52
+ * sessions.
53
+ */
54
+ readonly terminalTitle?: string;
55
+ /**
56
+ * Foreground process-group id — the group the PTY is currently routing input
57
+ * to. Equals the PID of the group leader (by Unix convention).
58
+ */
59
+ readonly pgid: number;
60
+ /** Name of the foreground program (e.g. `"node"`, `"vim"`, `"-zsh"`). */
61
+ readonly leader: string;
62
+ /** Working directory of the foreground leader (`""` if unknown). */
63
+ readonly cwd: string;
64
+ /** `true` when the foreground group is the shell itself — i.e. idle at a prompt. */
65
+ readonly atPrompt: boolean;
66
+ /**
67
+ * CPU and memory snapshot. Only present while at least one extension has
68
+ * called {@link ProcessesService.enableStats} and held its {@link Disposable}.
69
+ * Absent otherwise (no polling overhead when nobody needs it).
70
+ */
71
+ readonly stats?: ProcessStats;
72
+ }
73
+
74
+ /**
75
+ * Workspace process observability — a live read-only view of what is running
76
+ * in each terminal of the active workspace, with optional resource stats and a
77
+ * surgical kill that leaves the shell intact. Exposed as
78
+ * {@link ExtensionContext.processes}.
79
+ *
80
+ * The foreground leader, cwd, and idle/busy state update continuously
81
+ * (every ~750 ms) via the pty-host daemon — no polling needed for that data.
82
+ * CPU and memory require an explicit opt-in via {@link ProcessesService.enableStats}
83
+ * because sysinfo queries have a cost proportional to the number of active
84
+ * sessions.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * // Notify when all agents in the workspace are idle.
89
+ * const sub = ctx.processes.subscribe((procs) => {
90
+ * const allIdle = procs.every((p) => p.atPrompt);
91
+ * if (allIdle) ctx.ui.notify({ title: "All agents finished" });
92
+ * });
93
+ * ctx.subscriptions.push(sub);
94
+ *
95
+ * // Enable resource stats for a live process-manager panel.
96
+ * ctx.subscriptions.push(ctx.processes.enableStats());
97
+ * ```
98
+ *
99
+ * @category Consumer Services
100
+ * @public
101
+ */
102
+ export interface ProcessesService {
103
+ /**
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).
107
+ */
108
+ getState(): ProcessInfo[];
109
+
110
+ /**
111
+ * Look up the {@link ProcessInfo} for a specific terminal tab by its record
112
+ * id (e.g. `"term_abc"`). Returns `undefined` until the first foreground
113
+ * event has been received for that terminal's session.
114
+ *
115
+ * Convenience shortcut — avoids scanning {@link ProcessesService.getState}
116
+ * when the caller already has a `terminalId`.
117
+ */
118
+ getByTerminalId(terminalId: string): ProcessInfo | undefined;
119
+
120
+ /**
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.
125
+ */
126
+ subscribe(listener: (state: ProcessInfo[]) => void): Disposable;
127
+
128
+ /**
129
+ * Kill a specific foreground process group by pgid — sends `SIGTERM`, then
130
+ * `SIGKILL` after 3 s if the group is still alive. **Does not destroy the
131
+ * PTY session** — the shell remains alive and returns to its prompt.
132
+ *
133
+ * The `pgid` comes from {@link ProcessInfo.pgid}. Killing a shell's own pgid
134
+ * (when `atPrompt` is `true`) would close the terminal; guard against that if
135
+ * needed.
136
+ *
137
+ * Requires the `"process"` {@link Permission} for third-party extensions.
138
+ */
139
+ kill(pgid: number): Promise<void>;
140
+
141
+ /**
142
+ * Enable CPU + memory polling for all sessions in the active workspace.
143
+ * Returns a {@link Disposable} — **dispose it when done** to stop polling and
144
+ * remove `stats` from all {@link ProcessInfo} objects.
145
+ *
146
+ * Multiple callers share one poll loop (refcounted); the loop stops only when
147
+ * the last disposable is released. Polling interval is ~1500 ms.
148
+ *
149
+ * CPU% is `0` on the first sample; values stabilize after ~3 s.
150
+ */
151
+ enableStats(): Disposable;
152
+ }
package/src/types.ts CHANGED
@@ -24,6 +24,7 @@ import type { WorkspaceService } from "./workspace-service";
24
24
  import type { EditorService } from "./editor-service";
25
25
  import type { LayoutService } from "./layout-service";
26
26
  import type { ProcessService } from "./process-service";
27
+ import type { ProcessesService } from "./processes-service";
27
28
  import type { TerminalService } from "./terminal-service";
28
29
  import type { FileService } from "./file-service";
29
30
  import type { SearchService } from "./search-service";
@@ -31,7 +32,10 @@ import type { ThemeService, ThemePreset } from "./theme-service";
31
32
  import type { DndService } from "./dnd-service";
32
33
  import type { UiService } from "./ui-service";
33
34
  import type { NetworkService } from "./network-service";
34
- import type { ExtensionStorage } from "./extension-storage";
35
+ import type {
36
+ ExtensionStorage,
37
+ ExtensionStorageScopes,
38
+ } from "./extension-storage";
35
39
 
36
40
  /**
37
41
  * The teardown handle returned by every `register*` call on
@@ -268,9 +272,12 @@ export interface SidePanelProps {
268
272
  /** True when this side panel is currently visible / selected in its column. */
269
273
  active: boolean;
270
274
  /**
271
- * Namespaced, persisted key/value storage scoped to this panel id.
272
- * Use for restoring UI state (scroll positions, selections, expanded
273
- * sections, etc.) across reloads.
275
+ * Namespaced, persisted key/value storage scoped to this panel id (the
276
+ * `workspace` scope of {@link ExtensionStorageScopes}, keyed by panel rather
277
+ * than extension). Use for **panel-local UI state** — scroll positions,
278
+ * selections, expanded sections, etc. — which is kept per workspace. For
279
+ * extension-level settings shared across surfaces and workspaces, use
280
+ * {@link ExtensionContext.storage}`.global` instead.
274
281
  */
275
282
  storage: ExtensionStorage;
276
283
  /**
@@ -338,6 +345,14 @@ export interface DockPanelKind {
338
345
  /**
339
346
  * A widget in the status bar (the strip along the bottom of the window).
340
347
  *
348
+ * @remarks
349
+ * The status bar container sets `font-size` and `color` on itself, so
350
+ * components rendered inside it inherit the correct values automatically —
351
+ * **do not override `font-size` or `font-family`** in status item CSS unless
352
+ * you have a deliberate reason to deviate. You may override `color` using
353
+ * design tokens (e.g. `--silo-color-text-lo` for a label / `--silo-color-text`
354
+ * for a value) to create visual distinctions within an item.
355
+ *
341
356
  * @category Registration
342
357
  * @public
343
358
  */
@@ -399,6 +414,22 @@ export interface ExtensionContext {
399
414
  readonly extensionId: string;
400
415
  /** Disposables tracked for this extension; the host disposes them on teardown. */
401
416
  readonly subscriptions: Disposable[];
417
+ /**
418
+ * Persisted, per-extension key/value storage, in two scopes
419
+ * ({@link ExtensionStorageScopes}): `global` (shared across all workspaces —
420
+ * for the extension's own settings) and `workspace` (scoped to the active
421
+ * workspace). Each is the extension's own bag, shared across all its surfaces
422
+ * — status bar, side panels, and settings page — independent of whether any
423
+ * panel has mounted.
424
+ *
425
+ * `.get()` / `.set()` are safe to call in {@link Extension.activate}. Note the
426
+ * app state hydrates asynchronously and the `workspace` bag is swapped on
427
+ * workspace change, so a value persisted last session may not be present at
428
+ * the instant `activate` runs — `subscribe` and re-read to pick up restored or
429
+ * switched values. (`SidePanelProps.storage` exposes the same `workspace`
430
+ * scope keyed by panel id, for panel-local UI state.)
431
+ */
432
+ readonly storage: ExtensionStorageScopes;
402
433
  /** Register an {@link Editor} (a presenter for a file type's editor tab). */
403
434
  registerEditor(editor: Editor): Disposable;
404
435
  /** Register a {@link FileType} (declarative file metadata). */
@@ -449,6 +480,14 @@ export interface ExtensionContext {
449
480
  * re-attach a session and drive it via the returned `ProcessSession`.
450
481
  */
451
482
  readonly process: ProcessService;
483
+ /**
484
+ * Workspace process observability — a live view of what is running in each
485
+ * terminal, with optional CPU/memory stats and a surgical kill that leaves the
486
+ * shell alive. Complements {@link ExtensionContext.process} (which spawns
487
+ * sessions); this surface is for reading and controlling what's already running.
488
+ * See {@link ProcessesService} for the full API.
489
+ */
490
+ readonly processes: ProcessesService;
452
491
  /**
453
492
  * Consumer API for the terminal domain — open a terminal tab in a workspace
454
493
  * (`create`) or reap a workspace's terminals (`closeWorkspace`). The terminal