@voltius/plugin-types 0.23.0 → 0.24.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.
- package/index.d.ts +42 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -277,6 +277,32 @@ export interface PluginHostPing {
|
|
|
277
277
|
latencyMs?: number;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
+
export type PluginPanePosition = "left" | "right" | "top" | "bottom";
|
|
281
|
+
|
|
282
|
+
export interface PluginPane {
|
|
283
|
+
paneId: string;
|
|
284
|
+
sessionId: string;
|
|
285
|
+
connectionName: string;
|
|
286
|
+
active: boolean;
|
|
287
|
+
maximized: boolean;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/** A titlebar item: a split tab with one entry per pane, or a standalone
|
|
291
|
+
* session projected as a single-pane tab so callers read one uniform list. */
|
|
292
|
+
export interface PluginPaneTab {
|
|
293
|
+
tabId: string;
|
|
294
|
+
kind: "split" | "session";
|
|
295
|
+
active: boolean;
|
|
296
|
+
panes: PluginPane[];
|
|
297
|
+
broadcastActive: boolean;
|
|
298
|
+
layout: PaneNode | null;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/** `tab` is null when the write left no tab behind (the last split collapsed). */
|
|
302
|
+
export type PluginPaneResult =
|
|
303
|
+
| { ok: true; tab: PluginPaneTab | null }
|
|
304
|
+
| { ok: false; error: string };
|
|
305
|
+
|
|
280
306
|
/**
|
|
281
307
|
* A SAVED port-forwarding rule: a shape, not a live listener. Opening one is
|
|
282
308
|
* `portForwards.start`, which needs an open session to hang the tunnel on.
|
|
@@ -971,6 +997,22 @@ export interface PluginAPI {
|
|
|
971
997
|
pingStatus(): PluginHostPing[];
|
|
972
998
|
};
|
|
973
999
|
|
|
1000
|
+
/**
|
|
1001
|
+
* The terminal tab and pane layout (requires panes:read / panes:write).
|
|
1002
|
+
*
|
|
1003
|
+
* Ungated deliberately: these rearrange tabs and destroy nothing, which is
|
|
1004
|
+
* strictly less than the ungated sessions:write, and detaching a pane leaves
|
|
1005
|
+
* the session open. Writes never throw — they return a PluginPaneResult whose
|
|
1006
|
+
* `error` says why, because every underlying store method fails silently.
|
|
1007
|
+
*/
|
|
1008
|
+
panes: {
|
|
1009
|
+
list(): PluginPaneTab[];
|
|
1010
|
+
split(input: { sessionId: string; targetSessionId: string; position: PluginPanePosition }): PluginPaneResult;
|
|
1011
|
+
move(input: { sessionId: string; targetSessionId: string; position: PluginPanePosition }): PluginPaneResult;
|
|
1012
|
+
detach(sessionId: string): PluginPaneResult;
|
|
1013
|
+
focus(sessionId: string, maximize?: boolean): PluginPaneResult;
|
|
1014
|
+
};
|
|
1015
|
+
|
|
974
1016
|
/**
|
|
975
1017
|
* The state of the user's own configuration sync (requires sync:read).
|
|
976
1018
|
* Distinct from the plugin-scoped `sync` domain above, which is a plugin's
|