deck-plugin-sdk 0.19.0 → 0.21.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/package.json +1 -1
- package/shim/bridge.js +8 -0
- package/types/components/ConfirmDialog.d.ts +1 -1
- package/types/core/bridge.d.ts +60 -1
- package/types/core/debugtargets.d.ts +38 -0
- package/types/core/editorsettings.d.ts +4 -0
- package/types/core/monaco.d.ts +2 -0
- package/types/core/terminals.d.ts +3 -1
package/package.json
CHANGED
package/shim/bridge.js
CHANGED
|
@@ -34,6 +34,9 @@ export const fsCopy = (...a) => b().fsCopy(...a);
|
|
|
34
34
|
export const fsCreateDir = (...a) => b().fsCreateDir(...a);
|
|
35
35
|
export const fsCreateFile = (...a) => b().fsCreateFile(...a);
|
|
36
36
|
export const fsDelete = (...a) => b().fsDelete(...a);
|
|
37
|
+
export const fsFiles = (...a) => b().fsFiles(...a);
|
|
38
|
+
export const fsFind = (...a) => b().fsFind(...a);
|
|
39
|
+
export const fsHash = (...a) => b().fsHash(...a);
|
|
37
40
|
export const fsHomeDir = (...a) => b().fsHomeDir(...a);
|
|
38
41
|
export const fsList = (...a) => b().fsList(...a);
|
|
39
42
|
export const fsMove = (...a) => b().fsMove(...a);
|
|
@@ -46,6 +49,8 @@ export const fsReveal = (...a) => b().fsReveal(...a);
|
|
|
46
49
|
export const fsSaveUnique = (...a) => b().fsSaveUnique(...a);
|
|
47
50
|
export const fsSearch = (...a) => b().fsSearch(...a);
|
|
48
51
|
export const fsSize = (...a) => b().fsSize(...a);
|
|
52
|
+
export const fsThumbnail = (...a) => b().fsThumbnail(...a);
|
|
53
|
+
export const fsTrash = (...a) => b().fsTrash(...a);
|
|
49
54
|
export const fsWrite = (...a) => b().fsWrite(...a);
|
|
50
55
|
export const fsWriteBytes = (...a) => b().fsWriteBytes(...a);
|
|
51
56
|
export const getAutostart = (...a) => b().getAutostart(...a);
|
|
@@ -140,6 +145,7 @@ export const listApps = (...a) => b().listApps(...a);
|
|
|
140
145
|
export const listInstalled = (...a) => b().listInstalled(...a);
|
|
141
146
|
export const mailCached = (...a) => b().mailCached(...a);
|
|
142
147
|
export const mailRefresh = (...a) => b().mailRefresh(...a);
|
|
148
|
+
export const mediaMeta = (...a) => b().mediaMeta(...a);
|
|
143
149
|
export const mediaSetNowPlaying = (...a) => b().mediaSetNowPlaying(...a);
|
|
144
150
|
export const mediaSetPlayback = (...a) => b().mediaSetPlayback(...a);
|
|
145
151
|
export const memUsage = (...a) => b().memUsage(...a);
|
|
@@ -174,11 +180,13 @@ export const readTermLayout = (...a) => b().readTermLayout(...a);
|
|
|
174
180
|
export const readTrackMeta = (...a) => b().readTrackMeta(...a);
|
|
175
181
|
export const removeClaudeHooks = (...a) => b().removeClaudeHooks(...a);
|
|
176
182
|
export const removeClaudeMcp = (...a) => b().removeClaudeMcp(...a);
|
|
183
|
+
export const removeLanguage = (...a) => b().removeLanguage(...a);
|
|
177
184
|
export const restartApp = (...a) => b().restartApp(...a);
|
|
178
185
|
export const revealInFolder = (...a) => b().revealInFolder(...a);
|
|
179
186
|
export const runScriptNow = (...a) => b().runScriptNow(...a);
|
|
180
187
|
export const sessionList = (...a) => b().sessionList(...a);
|
|
181
188
|
export const setAutostart = (...a) => b().setAutostart(...a);
|
|
189
|
+
export const setDebugTargets = (...a) => b().setDebugTargets(...a);
|
|
182
190
|
export const setVaultRoot = (...a) => b().setVaultRoot(...a);
|
|
183
191
|
export const setWallpaper = (...a) => b().setWallpaper(...a);
|
|
184
192
|
export const setupChecks = (...a) => b().setupChecks(...a);
|
package/types/core/bridge.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// GENERATED by sdk/gen-types.mjs from Deck's source — do not edit.
|
|
2
|
+
import { type DebugTarget } from "./debugtargets";
|
|
2
3
|
import type { AccentColor, BgPreset, Density, TermTheme } from "./theme";
|
|
3
4
|
/** Open a URL in the default browser. */
|
|
4
5
|
export declare const openExternal: (url: string) => Promise<void>;
|
|
@@ -101,6 +102,16 @@ export interface MemServer {
|
|
|
101
102
|
mem: number;
|
|
102
103
|
pid: number;
|
|
103
104
|
}
|
|
105
|
+
/** One process behind the figures, largest first. Only filled when memUsage(true) asks. */
|
|
106
|
+
export interface MemProc {
|
|
107
|
+
pid: number;
|
|
108
|
+
name: string;
|
|
109
|
+
cmd: string;
|
|
110
|
+
mem: number;
|
|
111
|
+
group: "deck" | "server" | "agent" | "pane-agent" | "pane";
|
|
112
|
+
/** The language server's session id, or the terminal pane's id. */
|
|
113
|
+
owner: string;
|
|
114
|
+
}
|
|
104
115
|
export interface MemUsage {
|
|
105
116
|
deck: number;
|
|
106
117
|
agents: number;
|
|
@@ -118,8 +129,10 @@ export interface MemUsage {
|
|
|
118
129
|
/** claude running inside a pane. Also not part of `deck`. */
|
|
119
130
|
pane_agents: number;
|
|
120
131
|
pane_agent_count: number;
|
|
132
|
+
procs: MemProc[];
|
|
121
133
|
}
|
|
122
|
-
|
|
134
|
+
/** `detail` also lists every process with its command line: for the open popover, not the poll. */
|
|
135
|
+
export declare const memUsage: (detail?: boolean) => Promise<MemUsage>;
|
|
123
136
|
export declare const listApps: () => Promise<AppProc[]>;
|
|
124
137
|
export declare const listInstalled: () => Promise<AppProc[]>;
|
|
125
138
|
export declare const closeApp: (target: string) => Promise<string>;
|
|
@@ -422,6 +435,8 @@ export declare const fsList: (dir: string) => Promise<FsEntry[]>;
|
|
|
422
435
|
export declare const pluginsDir: () => Promise<string>;
|
|
423
436
|
/** `%APPDATA%\Deck\languages` (Deck-Dev in a debug build), created on first call. */
|
|
424
437
|
export declare const languagesDir: () => Promise<string>;
|
|
438
|
+
/** Delete a language definition's folder (by its folder name). The server and debugger it names stay installed. */
|
|
439
|
+
export declare const removeLanguage: (folder: string) => Promise<void>;
|
|
425
440
|
export declare const fsRead: (path: string) => Promise<string>;
|
|
426
441
|
/** Raw bytes, for a file that is not text — fsRead decodes as UTF-8 and would corrupt it. */
|
|
427
442
|
export declare const fsReadBytes: (path: string) => Promise<Uint8Array<ArrayBuffer>>;
|
|
@@ -505,6 +520,8 @@ export declare const procKill: (id: string) => Promise<void>;
|
|
|
505
520
|
export declare const fsCreateDir: (dir: string, name: string) => Promise<string>;
|
|
506
521
|
export declare const fsRename: (path: string, newName: string) => Promise<string>;
|
|
507
522
|
export declare const fsDelete: (path: string) => Promise<void>;
|
|
523
|
+
/** Move to the Recycle Bin, so it can be restored (fsDelete removes for good). */
|
|
524
|
+
export declare const fsTrash: (path: string) => Promise<void>;
|
|
508
525
|
export declare const fsCopy: (src: string, dstDir: string) => Promise<string>;
|
|
509
526
|
export declare const fsReveal: (path: string) => Promise<void>;
|
|
510
527
|
export declare const installClaudeHooks: () => Promise<void>;
|
|
@@ -579,11 +596,13 @@ export interface GraphCommit {
|
|
|
579
596
|
refs: string[];
|
|
580
597
|
}
|
|
581
598
|
export declare const gitLogGraph: (dir: string, skip: number, rel?: string, refs?: string[]) => Promise<GraphCommit[]>;
|
|
599
|
+
/** `old`: a rename's or copy's path before the commit, which its parent side is read from. */
|
|
582
600
|
export interface CommitFile {
|
|
583
601
|
rel: string;
|
|
584
602
|
letter: string;
|
|
585
603
|
adds: number;
|
|
586
604
|
dels: number;
|
|
605
|
+
old?: string;
|
|
587
606
|
}
|
|
588
607
|
export declare const gitCommitFiles: (dir: string, hash: string) => Promise<CommitFile[]>;
|
|
589
608
|
export declare const gitShowFile: (dir: string, rev: string, rel: string) => Promise<string>;
|
|
@@ -685,6 +704,38 @@ export interface SearchOpts {
|
|
|
685
704
|
includes: string;
|
|
686
705
|
excludes: string;
|
|
687
706
|
}
|
|
707
|
+
/** Every file under `dir` (absolute paths), .gitignore respected — the editor's Ctrl+P. */
|
|
708
|
+
export declare const fsFiles: (dir: string) => Promise<string[]>;
|
|
709
|
+
/** One file `fsFind` found. `mtime` is milliseconds since the epoch. */
|
|
710
|
+
export interface FoundFile {
|
|
711
|
+
path: string;
|
|
712
|
+
size: number;
|
|
713
|
+
mtime: number;
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Every file with one of `exts` (no dot) under `roots`, or under every fixed drive when roots is
|
|
717
|
+
* null, skipping folders named in `excludeDirs` at any depth and files under `minSize` bytes.
|
|
718
|
+
* A walk of whole drives takes on the order of a minute.
|
|
719
|
+
*/
|
|
720
|
+
export declare const fsFind: (roots: string[] | null, exts: string[], excludeDirs: string[], minSize: number) => Promise<FoundFile[]>;
|
|
721
|
+
/** Windows' own thumbnail of a file (what Explorer shows), as PNG bytes fitting `size` x `size`.
|
|
722
|
+
* Rejects when Windows has none for it. */
|
|
723
|
+
/** What Windows knows about a photo or video (its Properties' Details tab). Absent fields are null. */
|
|
724
|
+
export interface MediaMeta {
|
|
725
|
+
/** Date taken or recorded, ms since the epoch. */
|
|
726
|
+
taken: number | null;
|
|
727
|
+
width: number | null;
|
|
728
|
+
height: number | null;
|
|
729
|
+
camera: string | null;
|
|
730
|
+
lat: number | null;
|
|
731
|
+
lon: number | null;
|
|
732
|
+
duration_ms: number | null;
|
|
733
|
+
}
|
|
734
|
+
/** The properties of each path, in order; one that cannot be read comes back all null. */
|
|
735
|
+
export declare const mediaMeta: (paths: string[]) => Promise<MediaMeta[]>;
|
|
736
|
+
/** SHA-256 of each file's contents, in order; null for one that cannot be read. */
|
|
737
|
+
export declare const fsHash: (paths: string[]) => Promise<(string | null)[]>;
|
|
738
|
+
export declare const fsThumbnail: (path: string, size: number) => Promise<Uint8Array<ArrayBuffer>>;
|
|
688
739
|
export declare const fsSearch: (dir: string, query: string, o: SearchOpts) => Promise<SearchHit[]>;
|
|
689
740
|
export declare const fsReplace: (dir: string, query: string, replacement: string, o: SearchOpts, files?: string[], line?: number) => Promise<number>;
|
|
690
741
|
export interface DbQueryResult {
|
|
@@ -726,3 +777,11 @@ export declare const dbSchema: (handle: number) => Promise<DbSchema>;
|
|
|
726
777
|
export declare const sshTunnelOpen: (host: string, remote: string) => Promise<[number, number]>;
|
|
727
778
|
export declare const sshTunnelClose: (id: number) => Promise<void>;
|
|
728
779
|
export declare const sshTunnelList: () => Promise<[number, number][]>;
|
|
780
|
+
/**
|
|
781
|
+
* Offer programs to the editor's debugger: a plugin that runs something debuggable (the Flutter
|
|
782
|
+
* plugin's runs) publishes them here, and the Run and Debug panel lists them to attach to. Pass
|
|
783
|
+
* the plugin's whole current list each time, under its own `source`; an empty list removes it.
|
|
784
|
+
* See core/debugtargets.ts.
|
|
785
|
+
*/
|
|
786
|
+
export declare const setDebugTargets: (source: string, targets: DebugTarget[]) => void;
|
|
787
|
+
export type { DebugTarget } from "./debugtargets";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// GENERATED by sdk/gen-types.mjs from Deck's source — do not edit.
|
|
2
|
+
export interface DebugTarget {
|
|
3
|
+
/** Unique within its source. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** What the panel shows: "Attach to netapp (Windows)". */
|
|
6
|
+
name: string;
|
|
7
|
+
/** The language whose debug adapter runs it (its language.json `debug` block). */
|
|
8
|
+
languageId: string;
|
|
9
|
+
request: "attach" | "launch";
|
|
10
|
+
/** The adapter's attach or launch arguments, e.g. `{ vmServiceUri }`. */
|
|
11
|
+
args: Record<string, unknown>;
|
|
12
|
+
/** Where the program's source is: the adapter's working directory. */
|
|
13
|
+
cwd: string;
|
|
14
|
+
/**
|
|
15
|
+
* The adapter to use when the language's definition names none (a language.json without a
|
|
16
|
+
* `debug` block). The publisher knows what it runs; Deck does not hardcode any language.
|
|
17
|
+
*/
|
|
18
|
+
adapter?: {
|
|
19
|
+
strategy: string;
|
|
20
|
+
command?: string;
|
|
21
|
+
module?: string;
|
|
22
|
+
args?: string[];
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A language's launch template with the editor's variables filled in, the names VS Code uses in
|
|
27
|
+
* launch.json: `${file}`, `${fileDirname}`, `${fileBasename}`, `${workspaceFolder}`. Every string
|
|
28
|
+
* in the template, at any depth; anything else is kept as it is. An unknown variable is left in
|
|
29
|
+
* place, so a typo shows in what the adapter is sent rather than silently becoming empty.
|
|
30
|
+
*/
|
|
31
|
+
export declare function fillLaunch(template: unknown, vars: {
|
|
32
|
+
file: string;
|
|
33
|
+
workspaceFolder: string;
|
|
34
|
+
}): unknown;
|
|
35
|
+
/** Replace one source's targets (an empty list removes them). */
|
|
36
|
+
export declare function setTargets(source: string, targets: DebugTarget[]): void;
|
|
37
|
+
export declare const getTargets: () => DebugTarget[];
|
|
38
|
+
export declare const subscribeTargets: (fn: () => void) => () => void;
|
|
@@ -17,6 +17,8 @@ export interface EditorSettings {
|
|
|
17
17
|
indentGuides: boolean;
|
|
18
18
|
bracketPairColorization: boolean;
|
|
19
19
|
stickyScroll: boolean;
|
|
20
|
+
/** Greyed-out types and parameter names the language server suggests, drawn inline. */
|
|
21
|
+
inlayHints: "all" | "types" | "parameters" | "off";
|
|
20
22
|
/**
|
|
21
23
|
* Markdown: float the formatting bar over the selection instead of pinning it above the note.
|
|
22
24
|
*
|
|
@@ -61,5 +63,7 @@ export declare const GRAPH_FONT_SIZES: number[];
|
|
|
61
63
|
export declare const DEFAULT_EDITOR_SETTINGS: EditorSettings;
|
|
62
64
|
export declare function updateEditorSettings(patch: Partial<EditorSettings>): void;
|
|
63
65
|
export declare function getEditorSettings(): EditorSettings;
|
|
66
|
+
/** For a store outside React that reacts to a setting (lsp.ts re-asks for inlay hints). */
|
|
67
|
+
export declare function subscribeEditorSettings(cb: () => void): () => void;
|
|
64
68
|
export declare function useEditorSettings(): EditorSettings;
|
|
65
69
|
export declare function monacoOptionsFrom(s: EditorSettings): MonacoNS.editor.IEditorOptions;
|
package/types/core/monaco.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export declare function addSemanticColors(rules: TokenColor[]): void;
|
|
|
26
26
|
* built-in one rather than silently losing to it.
|
|
27
27
|
*/
|
|
28
28
|
export declare function registerExtension(ext: string, languageId: string): void;
|
|
29
|
+
/** Give up every extension a language claimed: its definition was removed. */
|
|
30
|
+
export declare function forgetExtensions(languageId: string): void;
|
|
29
31
|
/**
|
|
30
32
|
* Map a filename to a Monaco language id.
|
|
31
33
|
*
|
|
@@ -225,7 +225,9 @@ export declare function moveLeaf(root: LayoutNode, srcId: string, targetId: stri
|
|
|
225
225
|
* caller wants to type into the pane it just made. Pair it with queueInput: the pane has no PTY
|
|
226
226
|
* until it is attached to a sized element, so anything written before then is dropped.
|
|
227
227
|
*/
|
|
228
|
-
export declare function openTabInWorkspace(wsId: string, title: string
|
|
228
|
+
export declare function openTabInWorkspace(wsId: string, title: string, opts?: {
|
|
229
|
+
besideActive?: boolean;
|
|
230
|
+
}): string | null;
|
|
229
231
|
export declare function applyDtCommand(op: string, args: Record<string, unknown>): string | void;
|
|
230
232
|
interface Instance {
|
|
231
233
|
term: Terminal;
|