deck-plugin-sdk 1.10.2 → 1.11.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/permissions.json +248 -231
- package/shim/bridge.js +249 -232
- package/shim/p2p.js +16 -16
- package/template/plugin.json +1 -1
- package/types/core/bridge.d.ts +1167 -1084
- package/types/core/browser.d.ts +11 -0
- package/types/core/terminals.d.ts +2 -0
package/types/core/bridge.d.ts
CHANGED
|
@@ -1,1084 +1,1167 @@
|
|
|
1
|
-
// GENERATED by sdk/gen-types.mjs from Deck's source — do not edit.
|
|
2
|
-
import { type DebugTarget } from "./debugtargets";
|
|
3
|
-
import type { Accent, Background, Density, Palette, TermCustom, TermTheme } from "./theme";
|
|
4
|
-
import type { SearchEngine } from "./browserurl";
|
|
5
|
-
/** Open a URL in the default browser. */
|
|
6
|
-
export declare const openExternal: (url: string) => Promise<void>;
|
|
7
|
-
/** A box in physical pixels, relative to the window: where a browser pane's webview goes. */
|
|
8
|
-
export interface PhysRect {
|
|
9
|
-
x: number;
|
|
10
|
-
y: number;
|
|
11
|
-
w: number;
|
|
12
|
-
h: number;
|
|
13
|
-
}
|
|
14
|
-
/** Open `url` in the browser pane's own webview (created the first time) at `r`. A private one
|
|
15
|
-
* keeps no cookies, history or cache. */
|
|
16
|
-
export declare const browserOpen: (pane: string, url: string, isPrivate: boolean, r: PhysRect, window?: string) => Promise<void>;
|
|
17
|
-
/** Move the pane's webview, or hide it. */
|
|
18
|
-
export declare const browserBounds: (pane: string, r: PhysRect, visible: boolean, window?: string) => Promise<void>;
|
|
19
|
-
export declare const browserNav: (pane: string, action: "back" | "forward" | "reload" | "go" | "focus", url?: string) => Promise<void>;
|
|
20
|
-
/** The chords Rust takes from a focused page: `deck` moves the keyboard back to Deck, `page` does not. */
|
|
21
|
-
export declare const browserSetKeys: (deck: string[], page: string[]) => Promise<void>;
|
|
22
|
-
export declare const browserClose: (pane: string) => Promise<void>;
|
|
23
|
-
/** Answer a site's sign-in (user and password, or neither to cancel) or its certificate error (proceed). */
|
|
24
|
-
export declare const browserSiteAnswer: (pane: string, id: number, a: {
|
|
25
|
-
user?: string;
|
|
26
|
-
password?: string;
|
|
27
|
-
proceed?: boolean;
|
|
28
|
-
}) => Promise<void>;
|
|
29
|
-
/** The page's print dialog, or its Save as dialog. */
|
|
30
|
-
export declare const browserPrint: (pane: string, action: "print" | "save") => Promise<void>;
|
|
31
|
-
/** Answer a site's request to send notifications (the pane's bar). */
|
|
32
|
-
export declare const browserPermissionAnswer: (pane: string, id: number, allow: boolean) => Promise<void>;
|
|
33
|
-
/** Open the app link (mailto:, zoommtg:) the pane asked for. */
|
|
34
|
-
export declare const browserOpenAppLink: (pane: string, uri: string) => Promise<void>;
|
|
35
|
-
/** A page's notification was clicked in Deck: the page hears of it. */
|
|
36
|
-
export declare const browserNotificationClicked: (pane: string, id: number) => Promise<void>;
|
|
37
|
-
/** Reload a page whose process hangs: that process is ended first. */
|
|
38
|
-
export declare const browserReloadHung: (pane: string) => Promise<void>;
|
|
39
|
-
/** The window fullscreen for a page that went fullscreen, or back as it was. */
|
|
40
|
-
export declare const browserWindowFullscreen: (on: boolean, window?: string) => Promise<void>;
|
|
41
|
-
/** Put a hidden pane's page to sleep, or wake it. */
|
|
42
|
-
export declare const browserSleep: (pane: string, on: boolean) => Promise<void>;
|
|
43
|
-
/** A JPEG of what the pane's webview shows. */
|
|
44
|
-
/** The ad blocker on or off, and the sites it is off for. */
|
|
45
|
-
export declare const adblockConfig: (enabled: boolean, off: string[], youtube: boolean) => Promise<void>;
|
|
46
|
-
/** Whether the ad blocker is ready, how many rules it holds, and when its lists were downloaded. */
|
|
47
|
-
export declare const adblockInfo: () => Promise<{
|
|
48
|
-
ready: boolean;
|
|
49
|
-
rules: number;
|
|
50
|
-
updated: number;
|
|
51
|
-
}>;
|
|
52
|
-
/** Rebuild the ad blocker from its lists and the user's own rules, after those changed. */
|
|
53
|
-
export declare const adblockRebuild: () => Promise<void>;
|
|
54
|
-
/** Download the ad blocker's lists again now. */
|
|
55
|
-
export declare const adblockUpdate: () => Promise<void>;
|
|
56
|
-
/** The browser's privacy settings, for every browser pane. */
|
|
57
|
-
/** `scheme`: the light or dark mode pages are asked for (prefers-color-scheme); "auto" is Windows'. */
|
|
58
|
-
export declare const browserPrivacy: (tracking: string, autofill: boolean, scheme: "light" | "dark" | "auto") => Promise<void>;
|
|
59
|
-
/** Clear the browser's stored data of these kinds (cookies, cache, passwords, autofill) since `since`
|
|
60
|
-
* (seconds since 1970; 0 for all of it). */
|
|
61
|
-
export declare const browserClear: (kinds: string[], since: number) => Promise<void>;
|
|
62
|
-
/** The user's answer to an agent asking to be signed in on a page: the login to fill, or none. */
|
|
63
|
-
export declare const browserAgentFillAnswer: (id: number, login: string | null) => Promise<void>;
|
|
64
|
-
/** A saved login, without its secrets. */
|
|
65
|
-
export interface VaultMeta {
|
|
66
|
-
id: string;
|
|
67
|
-
site: string;
|
|
68
|
-
username: string;
|
|
69
|
-
note: string;
|
|
70
|
-
totp: boolean;
|
|
71
|
-
created: number;
|
|
72
|
-
updated: number;
|
|
73
|
-
used: number;
|
|
74
|
-
}
|
|
75
|
-
/** A login to save: a password or 2FA key left out keeps the saved one; an empty 2FA key removes it. */
|
|
76
|
-
export interface VaultEntryIn {
|
|
77
|
-
id?: string;
|
|
78
|
-
site: string;
|
|
79
|
-
username: string;
|
|
80
|
-
password?: string;
|
|
81
|
-
note?: string;
|
|
82
|
-
totp?: string;
|
|
83
|
-
}
|
|
84
|
-
export declare const vaultStatus: () => Promise<{
|
|
85
|
-
exists: boolean;
|
|
86
|
-
unlocked: boolean;
|
|
87
|
-
}>;
|
|
88
|
-
/** The minutes before the vault locks itself, and whether to offer saving a sign-in. */
|
|
89
|
-
export declare const vaultConfig: (autolockMinutes: number, offer: boolean) => Promise<void>;
|
|
90
|
-
export declare const vaultCreate: (password: string) => Promise<void>;
|
|
91
|
-
export declare const vaultUnlock: (password: string) => Promise<void>;
|
|
92
|
-
export declare const vaultLock: () => Promise<void>;
|
|
93
|
-
export declare const vaultChangePassword: (old: string, next: string) => Promise<void>;
|
|
94
|
-
export declare const vaultList: () => Promise<VaultMeta[]>;
|
|
95
|
-
/** Add or update a login; its id. */
|
|
96
|
-
export declare const vaultSave: (entry: VaultEntryIn) => Promise<string>;
|
|
97
|
-
export declare const vaultDelete: (id: string) => Promise<void>;
|
|
98
|
-
/** One login's password, to show or copy. */
|
|
99
|
-
export declare const vaultSecret: (id: string) => Promise<string>;
|
|
100
|
-
/** One login's 2FA code now, and the seconds it has left. */
|
|
101
|
-
export declare const vaultTotp: (id: string) => Promise<{
|
|
102
|
-
code: string;
|
|
103
|
-
remaining: number;
|
|
104
|
-
}>;
|
|
105
|
-
export declare const vaultGenerate: (length: number, symbols: boolean) => Promise<string>;
|
|
106
|
-
/** The sites never offered saving for. */
|
|
107
|
-
export declare const vaultNeverList: () => Promise<string[]>;
|
|
108
|
-
export declare const vaultNeverRemove: (site: string) => Promise<void>;
|
|
109
|
-
/** The logins saved for the page a pane shows. */
|
|
110
|
-
export declare const vaultMatches: (pane: string) => Promise<VaultMeta[]>;
|
|
111
|
-
/** Fill a login into the pane's page ("ok", or "user" when the page asks for the username first). */
|
|
112
|
-
export declare const vaultFill: (pane: string, id: string) => Promise<string>;
|
|
113
|
-
/** Fill a new generated password into a sign-up page's password fields. */
|
|
114
|
-
export declare const vaultFillNew: (pane: string, length: number, symbols: boolean) => Promise<void>;
|
|
115
|
-
export declare const vaultOfferAnswer: (pane: string, answer: "save" | "never" | "dismiss") => Promise<void>;
|
|
116
|
-
/** Logins from a password export (Chrome, Edge, Brave, Firefox, Bitwarden). */
|
|
117
|
-
export declare const vaultImport: (path: string) => Promise<{
|
|
118
|
-
added: number;
|
|
119
|
-
updated: number;
|
|
120
|
-
skipped: number;
|
|
121
|
-
}>;
|
|
122
|
-
/** Every login to a plain-text CSV file, after the master password again; how many. */
|
|
123
|
-
export declare const vaultExport: (path: string, password: string) => Promise<number>;
|
|
124
|
-
/** A page in the history: its title, how often and when it was last visited (ms). */
|
|
125
|
-
export interface HistoryPage {
|
|
126
|
-
url: string;
|
|
127
|
-
title: string;
|
|
128
|
-
count: number;
|
|
129
|
-
last: number;
|
|
130
|
-
}
|
|
131
|
-
/** One visit to a page. */
|
|
132
|
-
export interface HistoryVisit {
|
|
133
|
-
url: string;
|
|
134
|
-
title: string;
|
|
135
|
-
at: number;
|
|
136
|
-
}
|
|
137
|
-
/** A visit to a web page; `counted` false is only its title arriving. Whether anything changed. */
|
|
138
|
-
export declare const browserHistoryVisit: (url: string, title: string, counted: boolean) => Promise<boolean>;
|
|
139
|
-
export declare const browserHistoryRecent: (limit: number) => Promise<HistoryPage[]>;
|
|
140
|
-
/** Visits newest first, before `before` (ms), whose page matches every word of `q`. */
|
|
141
|
-
export declare const browserHistoryList: (q: string, before: number | null, limit: number) => Promise<HistoryVisit[]>;
|
|
142
|
-
/** The pages the address bar offers for `q`, best first. */
|
|
143
|
-
export declare const browserHistorySuggest: (q: string, limit: number) => Promise<HistoryPage[]>;
|
|
144
|
-
/** How many pages the history holds. */
|
|
145
|
-
export declare const browserHistoryCount: () => Promise<number>;
|
|
146
|
-
export declare const browserHistoryForgetUrl: (url: string) => Promise<void>;
|
|
147
|
-
/** Forget the visits from `from` to `to` (ms); all of them when neither is given. */
|
|
148
|
-
export declare const browserHistoryForgetRange: (from?: number, to?: number) => Promise<void>;
|
|
149
|
-
/** An installed extension. `id` is WebView2's, which chrome-extension:// addresses use. */
|
|
150
|
-
export interface BrowserExtension {
|
|
151
|
-
id: string;
|
|
152
|
-
name: string;
|
|
153
|
-
version: string;
|
|
154
|
-
enabled: boolean;
|
|
155
|
-
storeId?: string;
|
|
156
|
-
popup?: string;
|
|
157
|
-
options?: string;
|
|
158
|
-
icon?: string;
|
|
159
|
-
path: string;
|
|
160
|
-
inPlace: boolean;
|
|
161
|
-
}
|
|
162
|
-
export declare const extensionsList: () => Promise<BrowserExtension[]>;
|
|
163
|
-
/** Install from the Chrome Web Store, by its link or the extension's id; its name. */
|
|
164
|
-
export declare const extensionInstallStore: (link: string) => Promise<string>;
|
|
165
|
-
/** Install an unpacked extension from a folder: copied in, or loaded where it is (`inPlace`, developer mode); its name. */
|
|
166
|
-
export declare const extensionInstallFolder: (path: string, inPlace?: boolean) => Promise<string>;
|
|
167
|
-
/** Load an extension again from its files (an unpacked one's edits); its name. */
|
|
168
|
-
export declare const extensionReload: (id: string) => Promise<string>;
|
|
169
|
-
export declare const extensionSetEnabled: (id: string, enabled: boolean) => Promise<void>;
|
|
170
|
-
export declare const extensionRemove: (id: string) => Promise<void>;
|
|
171
|
-
/** Show an extension's popup page for `pane`, its right edge at `right` and top at `top` (physical pixels). */
|
|
172
|
-
export declare const extensionPopup: (pane: string, id: string, page: string, right: number, top: number) => Promise<void>;
|
|
173
|
-
export declare const extensionPopupClose: (pane: string) => Promise<void>;
|
|
174
|
-
/** The sites agents may use in the browser without asking. */
|
|
175
|
-
export declare const browserAgentConfig: (sites: string[], any?: boolean) => Promise<void>;
|
|
176
|
-
/** The user's answer to an agent's question about a site. */
|
|
177
|
-
export declare const browserAgentAnswer: (id: number, site: string, allow: boolean, forGood: boolean) => Promise<void>;
|
|
178
|
-
/** A DevTools protocol call on a browser pane's page, and its answer. */
|
|
179
|
-
export declare const browserCdp: (pane: string, method: string, params?: unknown) => Promise<unknown>;
|
|
180
|
-
/** Open a browser pane's developer tools. */
|
|
181
|
-
export declare const browserDevtools: (pane: string) => Promise<void>;
|
|
182
|
-
/** What the site in a browser pane keeps and has been allowed: its cookie count and permissions. */
|
|
183
|
-
export declare const browserSite: (pane: string) => Promise<{
|
|
184
|
-
origin: string;
|
|
185
|
-
cookies: number;
|
|
186
|
-
permissions: {
|
|
187
|
-
origin: string;
|
|
188
|
-
kind: number;
|
|
189
|
-
state: number;
|
|
190
|
-
}[];
|
|
191
|
-
}>;
|
|
192
|
-
/** Delete the site's cookies, storage and cache. */
|
|
193
|
-
export declare const browserSiteClear: (pane: string) => Promise<void>;
|
|
194
|
-
/** Every site given or refused a permission. */
|
|
195
|
-
export declare const browserPermissions: () => Promise<{
|
|
196
|
-
origin: string;
|
|
197
|
-
kind: number;
|
|
198
|
-
state: number;
|
|
199
|
-
}[]>;
|
|
200
|
-
/** Set a site's permission: 0 ask again, 1 allow, 2 block. */
|
|
201
|
-
export declare const browserPermissionSet: (origin: string, kind: number, state: number) => Promise<void>;
|
|
202
|
-
/** Mute or unmute a browser pane's page. */
|
|
203
|
-
export declare const browserMute: (pane: string, muted: boolean) => Promise<void>;
|
|
204
|
-
/** Set a browser pane's page zoom (1 = 100%). */
|
|
205
|
-
export declare const browserZoom: (pane: string, factor: number) => Promise<void>;
|
|
206
|
-
/** Pause, resume or cancel one of the browser's downloads. */
|
|
207
|
-
export declare const browserDownload: (id: number, action: "pause" | "resume" | "cancel") => Promise<void>;
|
|
208
|
-
/** Find in the pane's page: start a search, step through its matches, or stop (clearing them). */
|
|
209
|
-
export declare const browserFind: (pane: string, action: "start" | "next" | "prev" | "stop", term?: string, matchCase?: boolean) => Promise<void>;
|
|
210
|
-
export declare const browserCapture: (pane: string) => Promise<ArrayBuffer>;
|
|
211
|
-
/** Cut these boxes, each [x, y, w, h, corner radius] in physical px from the page's corner, out of a pane's page window, `w`×`h` its size; none gives it back whole. */
|
|
212
|
-
export declare const browserCut: (pane: string, w: number, h: number, cuts: number[][]) => Promise<void>;
|
|
213
|
-
export interface AppProc {
|
|
214
|
-
name: string;
|
|
215
|
-
title: string;
|
|
216
|
-
path: string;
|
|
217
|
-
}
|
|
218
|
-
/** A config's JSON text, "" when it does not exist yet. The name is its path in Deck's config folder
|
|
219
|
-
* without `.json`, folders and all: `settings/settings`, `state/term-procs`. A plugin names its
|
|
220
|
-
* own configs plainly (`boards`), and they are kept in `data/<plugin id>/`; one of Deck's own it
|
|
221
|
-
* names in full. `config-changed` names configs the same way, a plugin's own as it names them. */
|
|
222
|
-
export declare const configRead: (name: string) => Promise<string>;
|
|
223
|
-
/** Raw bytes rather than a JSON argument: a 13.8MB pinboard parsed as JSON on Deck's UI thread
|
|
224
|
-
* held every other command up for 200ms per save (see config_write in config.rs). */
|
|
225
|
-
/** The name is percent-encoded: it travels in a header, which is ASCII, and a name can be any text
|
|
226
|
-
* (a note's title). */
|
|
227
|
-
export declare const configWrite: (name: string, json: string) => Promise<void>;
|
|
228
|
-
/** Remove a config or plain file, in order with the writes before it. */
|
|
229
|
-
export declare const configDelete: (name: string) => Promise<void>;
|
|
230
|
-
/** A plugin's own folder in Deck's config folder, `<config dir>\data\<id>`, for listing or
|
|
231
|
-
* renaming the files it keeps there with the fs* calls. A plugin calls it with no argument: its
|
|
232
|
-
* shim knows which plugin it is. */
|
|
233
|
-
export declare const dataDir: (plugin?: string) => Promise<string>;
|
|
234
|
-
/** The optional readouts in the footer status strip. */
|
|
235
|
-
/**
|
|
236
|
-
* A footer readout's id.
|
|
237
|
-
*
|
|
238
|
-
* `string` rather than a closed union because plugins contribute readouts too, and their ids are
|
|
239
|
-
* not known until a folder is read. The built-in ones are still listed in FOOTER_ITEMS below; a
|
|
240
|
-
* plugin's are merged in at run time by `footerItems()`.
|
|
241
|
-
*/
|
|
242
|
-
export type FooterItem = string;
|
|
243
|
-
export declare const FOOTER_ITEMS: {
|
|
244
|
-
id: FooterItem;
|
|
245
|
-
label: string;
|
|
246
|
-
desc: string;
|
|
247
|
-
}[];
|
|
248
|
-
/**
|
|
249
|
-
* Stored order, with any item the stored list predates appended in its declared position.
|
|
250
|
-
*
|
|
251
|
-
* `known` is passed in rather than read from FOOTER_ITEMS so the caller can include the loaded
|
|
252
|
-
* plugins' readouts; without that a plugin's item would be filtered out as unrecognised.
|
|
253
|
-
*/
|
|
254
|
-
export declare function footerOrder(stored: FooterItem[] | undefined, known?: string[]): FooterItem[];
|
|
255
|
-
export interface Settings {
|
|
256
|
-
warningMode: "toast" | "window" | "none";
|
|
257
|
-
warnLeadMin: number;
|
|
258
|
-
autostart: boolean;
|
|
259
|
-
closeToTray: boolean;
|
|
260
|
-
startMinimized: boolean;
|
|
261
|
-
reduceMotion: boolean;
|
|
262
|
-
/** The Servers list (hosts from ~/.ssh/config) under the workspace list. */
|
|
263
|
-
serversList: boolean;
|
|
264
|
-
/** The mouse wheel over a tab bar switches tabs rather than scrolling the bar. */
|
|
265
|
-
tabWheelSwitch: boolean;
|
|
266
|
-
/** When the tabs do not fit, every one but the open tab shrinks to its icon. */
|
|
267
|
-
tabSqueeze?: boolean;
|
|
268
|
-
/** A title-bar tab's full width in px (120 to 320, 160 when unset): its width, or with tabSqueeze the most it narrows from. */
|
|
269
|
-
tabWidth?: number;
|
|
270
|
-
/**
|
|
271
|
-
* Where things that arrive from outside open (Settings → Where things open). A floating window
|
|
272
|
-
* leaves the main window's tab as it was; a tab takes its place, as before floating windows.
|
|
273
|
-
* - openLinksIn: a link another program opens with Deck as the default browser ("float" unset).
|
|
274
|
-
* - openAgentPagesIn: a page an agent opens ("float-background" unset).
|
|
275
|
-
* - openFilesIn: a file opened with Deck from Explorer that opens in a plugin or the browser
|
|
276
|
-
* ("float" unset); one for the Editor goes to the Editor either way.
|
|
277
|
-
*/
|
|
278
|
-
openLinksIn?: "float" | "float-background" | "tab";
|
|
279
|
-
openAgentPagesIn?: "float-background" | "tab";
|
|
280
|
-
openFilesIn?: "float" | "tab";
|
|
281
|
-
/**
|
|
282
|
-
* A file for the Editor opened with Deck from Explorer ("tab" unset: the project's Editor, in the
|
|
283
|
-
* main window brought forward). "float": an Editor of its own in a floating window, as a file
|
|
284
|
-
* Ctrl+clicked in a terminal can open.
|
|
285
|
-
*/
|
|
286
|
-
openCodeFilesIn?: "tab" | "float";
|
|
287
|
-
/**
|
|
288
|
-
* More of the same, for what you open yourself but only look at (Settings → Where things open):
|
|
289
|
-
* - openTerminalLinksIn: an address Ctrl+clicked in a terminal, with browserTerminalLinks "deck"
|
|
290
|
-
* ("float" unset: the "links" window).
|
|
291
|
-
* - openDocsIn: a Docs page opened from Settings ("float" unset; Settings stays open).
|
|
292
|
-
* - openCommitsIn: a commit opened from the Editor's blame ("float" unset).
|
|
293
|
-
* - agentTerminals: a terminal tab or project an agent makes ("background" unset: added without
|
|
294
|
-
* switching to it, its shell started anyway so the agent can use it; "switch" goes to it).
|
|
295
|
-
*/
|
|
296
|
-
openTerminalLinksIn?: "float" | "tab";
|
|
297
|
-
/**
|
|
298
|
-
* A file path Ctrl+clicked in a terminal ("tab" unset: the Editor's tab, or the tab its type
|
|
299
|
-
* opens in). "float": an Editor of its own in a floating window, the project's left where it is;
|
|
300
|
-
* a type that opens elsewhere (a .pdf) in the "links" window.
|
|
301
|
-
*/
|
|
302
|
-
openTerminalFilesIn?: "tab" | "float";
|
|
303
|
-
/** The same, per extension (".md"), over `openTerminalFilesIn`. */
|
|
304
|
-
openTerminalFilesByExt?: Record<string, "tab" | "float">;
|
|
305
|
-
openDocsIn?: "float" | "tab";
|
|
306
|
-
openCommitsIn?: "float" | "tab";
|
|
307
|
-
agentTerminals?: "background" | "switch";
|
|
308
|
-
/** Each project's own colour on the sidebar's collapsed rail. Off, they are all one grey. */
|
|
309
|
-
projectColours?: boolean;
|
|
310
|
-
/** Agents listed under their workspace in the sidebar: under every one (default), only the open one, or none. */
|
|
311
|
-
sidebarAgents?: "all" | "open" | "off";
|
|
312
|
-
/**
|
|
313
|
-
* Closing a tab, a group's tabs or a terminal pane (or restarting or replacing one) asks first:
|
|
314
|
-
* only when something is running in it besides the shell ("running", unset), every time, or
|
|
315
|
-
* never ("Don't ask again" in the question sets this).
|
|
316
|
-
*/
|
|
317
|
-
askBeforeClose?: "running" | "always" | "never";
|
|
318
|
-
/** The workspace sidebar is a button in the title bar that opens it over the panes, rather than a column. */
|
|
319
|
-
sidebarMenu?: boolean;
|
|
320
|
-
/** Pane controls float over the pane's top-right corner on hover, instead of a header row. */
|
|
321
|
-
floatingPaneControls: boolean;
|
|
322
|
-
/** Per notification kind, whether it shows as a card, in the bell, with a sound, and as a Windows
|
|
323
|
-
* notification while Deck is not focused. A missing entry takes the default (notifications.ts). */
|
|
324
|
-
notifPrefs?: Partial<Record<"input" | "done" | "attention" | "activity" | "update" | "error" | "plugin", Partial<Record<"card" | "bell" | "sound" | "os", boolean>>>>;
|
|
325
|
-
/** No cards and no sound; everything still lands in the bell. */
|
|
326
|
-
doNotDisturb?: boolean;
|
|
327
|
-
/** Which corner on the right the notification cards stack in. */
|
|
328
|
-
notifPosition?: "bottom" | "top";
|
|
329
|
-
/** Install plugin and language updates at startup instead of only announcing them. */
|
|
330
|
-
pluginAutoUpdate: boolean;
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
*
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
/**
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
|
|
445
|
-
/**
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
export declare const
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
export declare
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
*/
|
|
470
|
-
export declare
|
|
471
|
-
/**
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
*/
|
|
536
|
-
export declare const
|
|
537
|
-
/**
|
|
538
|
-
export
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
export declare const
|
|
564
|
-
/**
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
*/
|
|
575
|
-
export declare const
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
export declare const
|
|
579
|
-
|
|
580
|
-
export declare const
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
export declare const
|
|
593
|
-
/**
|
|
594
|
-
export
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
export
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
export
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
export declare const
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
export
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
export declare const
|
|
664
|
-
|
|
665
|
-
export interface
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
export
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
export interface
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
export
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
export declare const
|
|
766
|
-
/**
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
/**
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
*/
|
|
831
|
-
export declare const
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
*
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
*
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
export declare const
|
|
862
|
-
|
|
863
|
-
export declare const
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
export declare const
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
*
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
export declare const
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
export
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
/**
|
|
893
|
-
export declare const
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
*
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
export declare const
|
|
945
|
-
|
|
946
|
-
export
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
export declare const
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
export declare const
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
*/
|
|
983
|
-
export declare const
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
export
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
export declare const
|
|
1028
|
-
/**
|
|
1029
|
-
export
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
export
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
export declare const
|
|
1067
|
-
/**
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
export
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
*/
|
|
1083
|
-
export declare const
|
|
1084
|
-
|
|
1
|
+
// GENERATED by sdk/gen-types.mjs from Deck's source — do not edit.
|
|
2
|
+
import { type DebugTarget } from "./debugtargets";
|
|
3
|
+
import type { Accent, Background, Density, Palette, TermCustom, TermTheme } from "./theme";
|
|
4
|
+
import type { SearchEngine } from "./browserurl";
|
|
5
|
+
/** Open a URL in the default browser. */
|
|
6
|
+
export declare const openExternal: (url: string) => Promise<void>;
|
|
7
|
+
/** A box in physical pixels, relative to the window: where a browser pane's webview goes. */
|
|
8
|
+
export interface PhysRect {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
w: number;
|
|
12
|
+
h: number;
|
|
13
|
+
}
|
|
14
|
+
/** Open `url` in the browser pane's own webview (created the first time) at `r`. A private one
|
|
15
|
+
* keeps no cookies, history or cache. */
|
|
16
|
+
export declare const browserOpen: (pane: string, url: string, isPrivate: boolean, r: PhysRect, window?: string) => Promise<void>;
|
|
17
|
+
/** Move the pane's webview, or hide it. */
|
|
18
|
+
export declare const browserBounds: (pane: string, r: PhysRect, visible: boolean, window?: string) => Promise<void>;
|
|
19
|
+
export declare const browserNav: (pane: string, action: "back" | "forward" | "reload" | "go" | "focus", url?: string) => Promise<void>;
|
|
20
|
+
/** The chords Rust takes from a focused page: `deck` moves the keyboard back to Deck, `page` does not. */
|
|
21
|
+
export declare const browserSetKeys: (deck: string[], page: string[]) => Promise<void>;
|
|
22
|
+
export declare const browserClose: (pane: string) => Promise<void>;
|
|
23
|
+
/** Answer a site's sign-in (user and password, or neither to cancel) or its certificate error (proceed). */
|
|
24
|
+
export declare const browserSiteAnswer: (pane: string, id: number, a: {
|
|
25
|
+
user?: string;
|
|
26
|
+
password?: string;
|
|
27
|
+
proceed?: boolean;
|
|
28
|
+
}) => Promise<void>;
|
|
29
|
+
/** The page's print dialog, or its Save as dialog. */
|
|
30
|
+
export declare const browserPrint: (pane: string, action: "print" | "save") => Promise<void>;
|
|
31
|
+
/** Answer a site's request to send notifications (the pane's bar). */
|
|
32
|
+
export declare const browserPermissionAnswer: (pane: string, id: number, allow: boolean) => Promise<void>;
|
|
33
|
+
/** Open the app link (mailto:, zoommtg:) the pane asked for. */
|
|
34
|
+
export declare const browserOpenAppLink: (pane: string, uri: string) => Promise<void>;
|
|
35
|
+
/** A page's notification was clicked in Deck: the page hears of it. */
|
|
36
|
+
export declare const browserNotificationClicked: (pane: string, id: number) => Promise<void>;
|
|
37
|
+
/** Reload a page whose process hangs: that process is ended first. */
|
|
38
|
+
export declare const browserReloadHung: (pane: string) => Promise<void>;
|
|
39
|
+
/** The window fullscreen for a page that went fullscreen, or back as it was. */
|
|
40
|
+
export declare const browserWindowFullscreen: (on: boolean, window?: string) => Promise<void>;
|
|
41
|
+
/** Put a hidden pane's page to sleep, or wake it. */
|
|
42
|
+
export declare const browserSleep: (pane: string, on: boolean) => Promise<void>;
|
|
43
|
+
/** A JPEG of what the pane's webview shows. */
|
|
44
|
+
/** The ad blocker on or off, and the sites it is off for. */
|
|
45
|
+
export declare const adblockConfig: (enabled: boolean, off: string[], youtube: boolean) => Promise<void>;
|
|
46
|
+
/** Whether the ad blocker is ready, how many rules it holds, and when its lists were downloaded. */
|
|
47
|
+
export declare const adblockInfo: () => Promise<{
|
|
48
|
+
ready: boolean;
|
|
49
|
+
rules: number;
|
|
50
|
+
updated: number;
|
|
51
|
+
}>;
|
|
52
|
+
/** Rebuild the ad blocker from its lists and the user's own rules, after those changed. */
|
|
53
|
+
export declare const adblockRebuild: () => Promise<void>;
|
|
54
|
+
/** Download the ad blocker's lists again now. */
|
|
55
|
+
export declare const adblockUpdate: () => Promise<void>;
|
|
56
|
+
/** The browser's privacy settings, for every browser pane. */
|
|
57
|
+
/** `scheme`: the light or dark mode pages are asked for (prefers-color-scheme); "auto" is Windows'. */
|
|
58
|
+
export declare const browserPrivacy: (tracking: string, autofill: boolean, scheme: "light" | "dark" | "auto") => Promise<void>;
|
|
59
|
+
/** Clear the browser's stored data of these kinds (cookies, cache, passwords, autofill) since `since`
|
|
60
|
+
* (seconds since 1970; 0 for all of it). */
|
|
61
|
+
export declare const browserClear: (kinds: string[], since: number) => Promise<void>;
|
|
62
|
+
/** The user's answer to an agent asking to be signed in on a page: the login to fill, or none. */
|
|
63
|
+
export declare const browserAgentFillAnswer: (id: number, login: string | null) => Promise<void>;
|
|
64
|
+
/** A saved login, without its secrets. */
|
|
65
|
+
export interface VaultMeta {
|
|
66
|
+
id: string;
|
|
67
|
+
site: string;
|
|
68
|
+
username: string;
|
|
69
|
+
note: string;
|
|
70
|
+
totp: boolean;
|
|
71
|
+
created: number;
|
|
72
|
+
updated: number;
|
|
73
|
+
used: number;
|
|
74
|
+
}
|
|
75
|
+
/** A login to save: a password or 2FA key left out keeps the saved one; an empty 2FA key removes it. */
|
|
76
|
+
export interface VaultEntryIn {
|
|
77
|
+
id?: string;
|
|
78
|
+
site: string;
|
|
79
|
+
username: string;
|
|
80
|
+
password?: string;
|
|
81
|
+
note?: string;
|
|
82
|
+
totp?: string;
|
|
83
|
+
}
|
|
84
|
+
export declare const vaultStatus: () => Promise<{
|
|
85
|
+
exists: boolean;
|
|
86
|
+
unlocked: boolean;
|
|
87
|
+
}>;
|
|
88
|
+
/** The minutes before the vault locks itself, and whether to offer saving a sign-in. */
|
|
89
|
+
export declare const vaultConfig: (autolockMinutes: number, offer: boolean) => Promise<void>;
|
|
90
|
+
export declare const vaultCreate: (password: string) => Promise<void>;
|
|
91
|
+
export declare const vaultUnlock: (password: string) => Promise<void>;
|
|
92
|
+
export declare const vaultLock: () => Promise<void>;
|
|
93
|
+
export declare const vaultChangePassword: (old: string, next: string) => Promise<void>;
|
|
94
|
+
export declare const vaultList: () => Promise<VaultMeta[]>;
|
|
95
|
+
/** Add or update a login; its id. */
|
|
96
|
+
export declare const vaultSave: (entry: VaultEntryIn) => Promise<string>;
|
|
97
|
+
export declare const vaultDelete: (id: string) => Promise<void>;
|
|
98
|
+
/** One login's password, to show or copy. */
|
|
99
|
+
export declare const vaultSecret: (id: string) => Promise<string>;
|
|
100
|
+
/** One login's 2FA code now, and the seconds it has left. */
|
|
101
|
+
export declare const vaultTotp: (id: string) => Promise<{
|
|
102
|
+
code: string;
|
|
103
|
+
remaining: number;
|
|
104
|
+
}>;
|
|
105
|
+
export declare const vaultGenerate: (length: number, symbols: boolean) => Promise<string>;
|
|
106
|
+
/** The sites never offered saving for. */
|
|
107
|
+
export declare const vaultNeverList: () => Promise<string[]>;
|
|
108
|
+
export declare const vaultNeverRemove: (site: string) => Promise<void>;
|
|
109
|
+
/** The logins saved for the page a pane shows. */
|
|
110
|
+
export declare const vaultMatches: (pane: string) => Promise<VaultMeta[]>;
|
|
111
|
+
/** Fill a login into the pane's page ("ok", or "user" when the page asks for the username first). */
|
|
112
|
+
export declare const vaultFill: (pane: string, id: string) => Promise<string>;
|
|
113
|
+
/** Fill a new generated password into a sign-up page's password fields. */
|
|
114
|
+
export declare const vaultFillNew: (pane: string, length: number, symbols: boolean) => Promise<void>;
|
|
115
|
+
export declare const vaultOfferAnswer: (pane: string, answer: "save" | "never" | "dismiss") => Promise<void>;
|
|
116
|
+
/** Logins from a password export (Chrome, Edge, Brave, Firefox, Bitwarden). */
|
|
117
|
+
export declare const vaultImport: (path: string) => Promise<{
|
|
118
|
+
added: number;
|
|
119
|
+
updated: number;
|
|
120
|
+
skipped: number;
|
|
121
|
+
}>;
|
|
122
|
+
/** Every login to a plain-text CSV file, after the master password again; how many. */
|
|
123
|
+
export declare const vaultExport: (path: string, password: string) => Promise<number>;
|
|
124
|
+
/** A page in the history: its title, how often and when it was last visited (ms). */
|
|
125
|
+
export interface HistoryPage {
|
|
126
|
+
url: string;
|
|
127
|
+
title: string;
|
|
128
|
+
count: number;
|
|
129
|
+
last: number;
|
|
130
|
+
}
|
|
131
|
+
/** One visit to a page. */
|
|
132
|
+
export interface HistoryVisit {
|
|
133
|
+
url: string;
|
|
134
|
+
title: string;
|
|
135
|
+
at: number;
|
|
136
|
+
}
|
|
137
|
+
/** A visit to a web page; `counted` false is only its title arriving. Whether anything changed. */
|
|
138
|
+
export declare const browserHistoryVisit: (url: string, title: string, counted: boolean) => Promise<boolean>;
|
|
139
|
+
export declare const browserHistoryRecent: (limit: number) => Promise<HistoryPage[]>;
|
|
140
|
+
/** Visits newest first, before `before` (ms), whose page matches every word of `q`. */
|
|
141
|
+
export declare const browserHistoryList: (q: string, before: number | null, limit: number) => Promise<HistoryVisit[]>;
|
|
142
|
+
/** The pages the address bar offers for `q`, best first. */
|
|
143
|
+
export declare const browserHistorySuggest: (q: string, limit: number) => Promise<HistoryPage[]>;
|
|
144
|
+
/** How many pages the history holds. */
|
|
145
|
+
export declare const browserHistoryCount: () => Promise<number>;
|
|
146
|
+
export declare const browserHistoryForgetUrl: (url: string) => Promise<void>;
|
|
147
|
+
/** Forget the visits from `from` to `to` (ms); all of them when neither is given. */
|
|
148
|
+
export declare const browserHistoryForgetRange: (from?: number, to?: number) => Promise<void>;
|
|
149
|
+
/** An installed extension. `id` is WebView2's, which chrome-extension:// addresses use. */
|
|
150
|
+
export interface BrowserExtension {
|
|
151
|
+
id: string;
|
|
152
|
+
name: string;
|
|
153
|
+
version: string;
|
|
154
|
+
enabled: boolean;
|
|
155
|
+
storeId?: string;
|
|
156
|
+
popup?: string;
|
|
157
|
+
options?: string;
|
|
158
|
+
icon?: string;
|
|
159
|
+
path: string;
|
|
160
|
+
inPlace: boolean;
|
|
161
|
+
}
|
|
162
|
+
export declare const extensionsList: () => Promise<BrowserExtension[]>;
|
|
163
|
+
/** Install from the Chrome Web Store, by its link or the extension's id; its name. */
|
|
164
|
+
export declare const extensionInstallStore: (link: string) => Promise<string>;
|
|
165
|
+
/** Install an unpacked extension from a folder: copied in, or loaded where it is (`inPlace`, developer mode); its name. */
|
|
166
|
+
export declare const extensionInstallFolder: (path: string, inPlace?: boolean) => Promise<string>;
|
|
167
|
+
/** Load an extension again from its files (an unpacked one's edits); its name. */
|
|
168
|
+
export declare const extensionReload: (id: string) => Promise<string>;
|
|
169
|
+
export declare const extensionSetEnabled: (id: string, enabled: boolean) => Promise<void>;
|
|
170
|
+
export declare const extensionRemove: (id: string) => Promise<void>;
|
|
171
|
+
/** Show an extension's popup page for `pane`, its right edge at `right` and top at `top` (physical pixels). */
|
|
172
|
+
export declare const extensionPopup: (pane: string, id: string, page: string, right: number, top: number) => Promise<void>;
|
|
173
|
+
export declare const extensionPopupClose: (pane: string) => Promise<void>;
|
|
174
|
+
/** The sites agents may use in the browser without asking. */
|
|
175
|
+
export declare const browserAgentConfig: (sites: string[], any?: boolean) => Promise<void>;
|
|
176
|
+
/** The user's answer to an agent's question about a site. */
|
|
177
|
+
export declare const browserAgentAnswer: (id: number, site: string, allow: boolean, forGood: boolean) => Promise<void>;
|
|
178
|
+
/** A DevTools protocol call on a browser pane's page, and its answer. */
|
|
179
|
+
export declare const browserCdp: (pane: string, method: string, params?: unknown) => Promise<unknown>;
|
|
180
|
+
/** Open a browser pane's developer tools. */
|
|
181
|
+
export declare const browserDevtools: (pane: string) => Promise<void>;
|
|
182
|
+
/** What the site in a browser pane keeps and has been allowed: its cookie count and permissions. */
|
|
183
|
+
export declare const browserSite: (pane: string) => Promise<{
|
|
184
|
+
origin: string;
|
|
185
|
+
cookies: number;
|
|
186
|
+
permissions: {
|
|
187
|
+
origin: string;
|
|
188
|
+
kind: number;
|
|
189
|
+
state: number;
|
|
190
|
+
}[];
|
|
191
|
+
}>;
|
|
192
|
+
/** Delete the site's cookies, storage and cache. */
|
|
193
|
+
export declare const browserSiteClear: (pane: string) => Promise<void>;
|
|
194
|
+
/** Every site given or refused a permission. */
|
|
195
|
+
export declare const browserPermissions: () => Promise<{
|
|
196
|
+
origin: string;
|
|
197
|
+
kind: number;
|
|
198
|
+
state: number;
|
|
199
|
+
}[]>;
|
|
200
|
+
/** Set a site's permission: 0 ask again, 1 allow, 2 block. */
|
|
201
|
+
export declare const browserPermissionSet: (origin: string, kind: number, state: number) => Promise<void>;
|
|
202
|
+
/** Mute or unmute a browser pane's page. */
|
|
203
|
+
export declare const browserMute: (pane: string, muted: boolean) => Promise<void>;
|
|
204
|
+
/** Set a browser pane's page zoom (1 = 100%). */
|
|
205
|
+
export declare const browserZoom: (pane: string, factor: number) => Promise<void>;
|
|
206
|
+
/** Pause, resume or cancel one of the browser's downloads. */
|
|
207
|
+
export declare const browserDownload: (id: number, action: "pause" | "resume" | "cancel") => Promise<void>;
|
|
208
|
+
/** Find in the pane's page: start a search, step through its matches, or stop (clearing them). */
|
|
209
|
+
export declare const browserFind: (pane: string, action: "start" | "next" | "prev" | "stop", term?: string, matchCase?: boolean) => Promise<void>;
|
|
210
|
+
export declare const browserCapture: (pane: string) => Promise<ArrayBuffer>;
|
|
211
|
+
/** Cut these boxes, each [x, y, w, h, corner radius] in physical px from the page's corner, out of a pane's page window, `w`×`h` its size; none gives it back whole. */
|
|
212
|
+
export declare const browserCut: (pane: string, w: number, h: number, cuts: number[][]) => Promise<void>;
|
|
213
|
+
export interface AppProc {
|
|
214
|
+
name: string;
|
|
215
|
+
title: string;
|
|
216
|
+
path: string;
|
|
217
|
+
}
|
|
218
|
+
/** A config's JSON text, "" when it does not exist yet. The name is its path in Deck's config folder
|
|
219
|
+
* without `.json`, folders and all: `settings/settings`, `state/term-procs`. A plugin names its
|
|
220
|
+
* own configs plainly (`boards`), and they are kept in `data/<plugin id>/`; one of Deck's own it
|
|
221
|
+
* names in full. `config-changed` names configs the same way, a plugin's own as it names them. */
|
|
222
|
+
export declare const configRead: (name: string) => Promise<string>;
|
|
223
|
+
/** Raw bytes rather than a JSON argument: a 13.8MB pinboard parsed as JSON on Deck's UI thread
|
|
224
|
+
* held every other command up for 200ms per save (see config_write in config.rs). */
|
|
225
|
+
/** The name is percent-encoded: it travels in a header, which is ASCII, and a name can be any text
|
|
226
|
+
* (a note's title). */
|
|
227
|
+
export declare const configWrite: (name: string, json: string) => Promise<void>;
|
|
228
|
+
/** Remove a config or plain file, in order with the writes before it. */
|
|
229
|
+
export declare const configDelete: (name: string) => Promise<void>;
|
|
230
|
+
/** A plugin's own folder in Deck's config folder, `<config dir>\data\<id>`, for listing or
|
|
231
|
+
* renaming the files it keeps there with the fs* calls. A plugin calls it with no argument: its
|
|
232
|
+
* shim knows which plugin it is. */
|
|
233
|
+
export declare const dataDir: (plugin?: string) => Promise<string>;
|
|
234
|
+
/** The optional readouts in the footer status strip. */
|
|
235
|
+
/**
|
|
236
|
+
* A footer readout's id.
|
|
237
|
+
*
|
|
238
|
+
* `string` rather than a closed union because plugins contribute readouts too, and their ids are
|
|
239
|
+
* not known until a folder is read. The built-in ones are still listed in FOOTER_ITEMS below; a
|
|
240
|
+
* plugin's are merged in at run time by `footerItems()`.
|
|
241
|
+
*/
|
|
242
|
+
export type FooterItem = string;
|
|
243
|
+
export declare const FOOTER_ITEMS: {
|
|
244
|
+
id: FooterItem;
|
|
245
|
+
label: string;
|
|
246
|
+
desc: string;
|
|
247
|
+
}[];
|
|
248
|
+
/**
|
|
249
|
+
* Stored order, with any item the stored list predates appended in its declared position.
|
|
250
|
+
*
|
|
251
|
+
* `known` is passed in rather than read from FOOTER_ITEMS so the caller can include the loaded
|
|
252
|
+
* plugins' readouts; without that a plugin's item would be filtered out as unrecognised.
|
|
253
|
+
*/
|
|
254
|
+
export declare function footerOrder(stored: FooterItem[] | undefined, known?: string[]): FooterItem[];
|
|
255
|
+
export interface Settings {
|
|
256
|
+
warningMode: "toast" | "window" | "none";
|
|
257
|
+
warnLeadMin: number;
|
|
258
|
+
autostart: boolean;
|
|
259
|
+
closeToTray: boolean;
|
|
260
|
+
startMinimized: boolean;
|
|
261
|
+
reduceMotion: boolean;
|
|
262
|
+
/** The Servers list (hosts from ~/.ssh/config) under the workspace list. */
|
|
263
|
+
serversList: boolean;
|
|
264
|
+
/** The mouse wheel over a tab bar switches tabs rather than scrolling the bar. */
|
|
265
|
+
tabWheelSwitch: boolean;
|
|
266
|
+
/** When the tabs do not fit, every one but the open tab shrinks to its icon. */
|
|
267
|
+
tabSqueeze?: boolean;
|
|
268
|
+
/** A title-bar tab's full width in px (120 to 320, 160 when unset): its width, or with tabSqueeze the most it narrows from. */
|
|
269
|
+
tabWidth?: number;
|
|
270
|
+
/**
|
|
271
|
+
* Where things that arrive from outside open (Settings → Where things open). A floating window
|
|
272
|
+
* leaves the main window's tab as it was; a tab takes its place, as before floating windows.
|
|
273
|
+
* - openLinksIn: a link another program opens with Deck as the default browser ("float" unset).
|
|
274
|
+
* - openAgentPagesIn: a page an agent opens ("float-background" unset).
|
|
275
|
+
* - openFilesIn: a file opened with Deck from Explorer that opens in a plugin or the browser
|
|
276
|
+
* ("float" unset); one for the Editor goes to the Editor either way.
|
|
277
|
+
*/
|
|
278
|
+
openLinksIn?: "float" | "float-background" | "tab";
|
|
279
|
+
openAgentPagesIn?: "float-background" | "tab";
|
|
280
|
+
openFilesIn?: "float" | "tab";
|
|
281
|
+
/**
|
|
282
|
+
* A file for the Editor opened with Deck from Explorer ("tab" unset: the project's Editor, in the
|
|
283
|
+
* main window brought forward). "float": an Editor of its own in a floating window, as a file
|
|
284
|
+
* Ctrl+clicked in a terminal can open.
|
|
285
|
+
*/
|
|
286
|
+
openCodeFilesIn?: "tab" | "float";
|
|
287
|
+
/**
|
|
288
|
+
* More of the same, for what you open yourself but only look at (Settings → Where things open):
|
|
289
|
+
* - openTerminalLinksIn: an address Ctrl+clicked in a terminal, with browserTerminalLinks "deck"
|
|
290
|
+
* ("float" unset: the "links" window).
|
|
291
|
+
* - openDocsIn: a Docs page opened from Settings ("float" unset; Settings stays open).
|
|
292
|
+
* - openCommitsIn: a commit opened from the Editor's blame ("float" unset).
|
|
293
|
+
* - agentTerminals: a terminal tab or project an agent makes ("background" unset: added without
|
|
294
|
+
* switching to it, its shell started anyway so the agent can use it; "switch" goes to it).
|
|
295
|
+
*/
|
|
296
|
+
openTerminalLinksIn?: "float" | "tab";
|
|
297
|
+
/**
|
|
298
|
+
* A file path Ctrl+clicked in a terminal ("tab" unset: the Editor's tab, or the tab its type
|
|
299
|
+
* opens in). "float": an Editor of its own in a floating window, the project's left where it is;
|
|
300
|
+
* a type that opens elsewhere (a .pdf) in the "links" window.
|
|
301
|
+
*/
|
|
302
|
+
openTerminalFilesIn?: "tab" | "float";
|
|
303
|
+
/** The same, per extension (".md"), over `openTerminalFilesIn`. */
|
|
304
|
+
openTerminalFilesByExt?: Record<string, "tab" | "float">;
|
|
305
|
+
openDocsIn?: "float" | "tab";
|
|
306
|
+
openCommitsIn?: "float" | "tab";
|
|
307
|
+
agentTerminals?: "background" | "switch";
|
|
308
|
+
/** Each project's own colour on the sidebar's collapsed rail. Off, they are all one grey. */
|
|
309
|
+
projectColours?: boolean;
|
|
310
|
+
/** Agents listed under their workspace in the sidebar: under every one (default), only the open one, or none. */
|
|
311
|
+
sidebarAgents?: "all" | "open" | "off";
|
|
312
|
+
/**
|
|
313
|
+
* Closing a tab, a group's tabs or a terminal pane (or restarting or replacing one) asks first:
|
|
314
|
+
* only when something is running in it besides the shell ("running", unset), every time, or
|
|
315
|
+
* never ("Don't ask again" in the question sets this).
|
|
316
|
+
*/
|
|
317
|
+
askBeforeClose?: "running" | "always" | "never";
|
|
318
|
+
/** The workspace sidebar is a button in the title bar that opens it over the panes, rather than a column. */
|
|
319
|
+
sidebarMenu?: boolean;
|
|
320
|
+
/** Pane controls float over the pane's top-right corner on hover, instead of a header row. */
|
|
321
|
+
floatingPaneControls: boolean;
|
|
322
|
+
/** Per notification kind, whether it shows as a card, in the bell, with a sound, and as a Windows
|
|
323
|
+
* notification while Deck is not focused. A missing entry takes the default (notifications.ts). */
|
|
324
|
+
notifPrefs?: Partial<Record<"input" | "done" | "attention" | "activity" | "update" | "error" | "plugin", Partial<Record<"card" | "bell" | "sound" | "os", boolean>>>>;
|
|
325
|
+
/** No cards and no sound; everything still lands in the bell. */
|
|
326
|
+
doNotDisturb?: boolean;
|
|
327
|
+
/** Which corner on the right the notification cards stack in. */
|
|
328
|
+
notifPosition?: "bottom" | "top";
|
|
329
|
+
/** Install plugin and language updates at startup instead of only announcing them. */
|
|
330
|
+
pluginAutoUpdate: boolean;
|
|
331
|
+
/** Download a newer Deck in the background and install it when Deck quits or next starts. Read by Rust too (update.rs). */
|
|
332
|
+
autoUpdate: boolean;
|
|
333
|
+
soundOnFire: boolean;
|
|
334
|
+
playerPlacement: "fixed" | "floating";
|
|
335
|
+
accent: Accent;
|
|
336
|
+
bgPreset: Background;
|
|
337
|
+
/** The colours of the "custom" background, each "#rrggbb". Kept when a preset is picked, so
|
|
338
|
+
* going back to Custom finds them again. */
|
|
339
|
+
customTheme?: Partial<Palette>;
|
|
340
|
+
/** Custom palettes the user saved by name, shown as cards beside the presets. */
|
|
341
|
+
savedThemes?: {
|
|
342
|
+
id: string;
|
|
343
|
+
name: string;
|
|
344
|
+
palette: Partial<Palette>;
|
|
345
|
+
}[];
|
|
346
|
+
/** The saved theme the custom colours came from, which edits are written back to. */
|
|
347
|
+
savedThemeId?: string;
|
|
348
|
+
density: Density;
|
|
349
|
+
uiZoom: number;
|
|
350
|
+
termTheme: TermTheme;
|
|
351
|
+
/** The "custom" terminal theme's colours. Kept when another theme is picked. */
|
|
352
|
+
termCustom?: Partial<TermCustom>;
|
|
353
|
+
termFont: string;
|
|
354
|
+
termFontSize: number;
|
|
355
|
+
termScrollback: number;
|
|
356
|
+
wsSidebar: boolean;
|
|
357
|
+
termGpuRender: boolean;
|
|
358
|
+
wallpaper: string;
|
|
359
|
+
wallpaperDim: number;
|
|
360
|
+
wallpaperBlur: number;
|
|
361
|
+
wallpaperPanel: number;
|
|
362
|
+
footerItems: Record<FooterItem, boolean>;
|
|
363
|
+
footerOrder: FooterItem[];
|
|
364
|
+
footerVisible: boolean;
|
|
365
|
+
/**
|
|
366
|
+
* Drawer tabs the user has switched off, by id ("console", "plugin:flutter", a pinned pane's
|
|
367
|
+
* uuid). A DENY list, not an allow list: the tabs are discovered at run time — a plugin panel
|
|
368
|
+
* appears when its plugin loads, a pinned pane when you pin it — so anything unlisted is on,
|
|
369
|
+
* and a newly added tab shows up rather than being invisible until someone enables it.
|
|
370
|
+
*
|
|
371
|
+
* A plugin's own `panelWhen` still applies on top of this: switching a tab on returns it to the
|
|
372
|
+
* plugin's rule rather than overriding it, so enabling Flutter does not put an empty tab in
|
|
373
|
+
* every non-Flutter project.
|
|
374
|
+
*/
|
|
375
|
+
drawerHidden: string[];
|
|
376
|
+
/** Drawer tabs left-to-right. Ids missing from it keep their discovery order, after the rest. */
|
|
377
|
+
drawerOrder: string[];
|
|
378
|
+
/** Which side of the footer each drawer tab and readout sits on, in order (core/footerlayout.ts).
|
|
379
|
+
* Absent until something is moved: drawer tabs left, readouts right, in the orders above. */
|
|
380
|
+
footerLayout?: {
|
|
381
|
+
left: string[];
|
|
382
|
+
right: string[];
|
|
383
|
+
};
|
|
384
|
+
httpMcpRevealSecrets: boolean;
|
|
385
|
+
/**
|
|
386
|
+
* What to call the user: shown to the others when sharing (a Canvas board's cursor and the
|
|
387
|
+
* host's "wants to join"). "" means work it out: the Google account's name when signed in,
|
|
388
|
+
* else the Windows account's (see `userName` in settingsstore.ts).
|
|
389
|
+
*/
|
|
390
|
+
userName: string;
|
|
391
|
+
/** What a new browser pane opens: Deck's start page, the search engine's own page, or a URL
|
|
392
|
+
* (a site, or a local .html file the user wrote). */
|
|
393
|
+
browserHome: "deck" | "search" | "url";
|
|
394
|
+
browserHomeUrl: string;
|
|
395
|
+
/** Where a search typed into the address bar or the start page goes. */
|
|
396
|
+
browserSearch: SearchEngine;
|
|
397
|
+
/** Which parts of Deck's start page show. */
|
|
398
|
+
browserHomeSections: {
|
|
399
|
+
clock: boolean;
|
|
400
|
+
search: boolean;
|
|
401
|
+
servers: boolean;
|
|
402
|
+
pins: boolean;
|
|
403
|
+
recent: boolean;
|
|
404
|
+
};
|
|
405
|
+
/** Behind the start page: a photo that changes each time it opens, one from a folder of the
|
|
406
|
+
* user's own, or none (Deck's background). */
|
|
407
|
+
browserBackground: "photos" | "folder" | "none";
|
|
408
|
+
browserBackgroundFolder: string;
|
|
409
|
+
/** Where the bookmarks bar shows under a browser's toolbar: on every page, on the start page
|
|
410
|
+
* only, or not at all (and only once something is on it). true and false are what it was saved
|
|
411
|
+
* as before it had three; read it through bookmarksBarMode. */
|
|
412
|
+
browserBookmarksBar: "always" | "home" | "never" | boolean;
|
|
413
|
+
/** WebView2's tracking prevention for the browser: how many trackers it blocks. */
|
|
414
|
+
browserTracking: "none" | "basic" | "balanced" | "strict";
|
|
415
|
+
/** Whether the vault offers to save a sign-in, and the minutes it stays open unused. */
|
|
416
|
+
browserVaultOffer: boolean;
|
|
417
|
+
browserVaultLock: number;
|
|
418
|
+
/** Extensions pinned to the browser's toolbar, by WebView2's id, in order. */
|
|
419
|
+
browserPinnedExtensions: string[];
|
|
420
|
+
/** The Extensions page's developer mode: load unpacked folders in place, reload them, ids and folders shown. */
|
|
421
|
+
browserExtensionsDev: boolean;
|
|
422
|
+
/** Whether the browser fills in forms (addresses, names). */
|
|
423
|
+
browserAutofill: boolean;
|
|
424
|
+
/** The ad blocker (EasyList and EasyPrivacy), and the sites it is switched off for, by host. */
|
|
425
|
+
browserAdblock: boolean;
|
|
426
|
+
browserAdblockOff: string[];
|
|
427
|
+
/** Skip YouTube's video ads: click Skip when it shows, run an unskippable one to its end. */
|
|
428
|
+
browserYoutubeSkip: boolean;
|
|
429
|
+
/** Where Ctrl+click on a web address in a terminal opens it: a browser tab of Deck's, or the system's. */
|
|
430
|
+
browserTerminalLinks: "deck" | "system";
|
|
431
|
+
/** Sleeping tabs: a browser tab out of sight this many minutes stops running until it is shown. */
|
|
432
|
+
browserSleep: boolean;
|
|
433
|
+
browserSleepAfter: number;
|
|
434
|
+
/** Sites whose tabs are never put to sleep (a chat, a call), by host; a host covers its subdomains. */
|
|
435
|
+
browserNeverSleep: string[];
|
|
436
|
+
/** Tabs of a site allowed to send notifications are never put to sleep (unset: on). */
|
|
437
|
+
browserNotifyAwake: boolean;
|
|
438
|
+
/**
|
|
439
|
+
* A page stays live under Deck's menus and cards, which are cut out of its window (unset: on).
|
|
440
|
+
* Off, a covered page is a blurred picture of itself, for a machine where the cut does not show.
|
|
441
|
+
*/
|
|
442
|
+
browserLiveCovers?: boolean;
|
|
443
|
+
/** Whether pages are asked for light or dark to match Deck's theme ("deck") or Windows'. */
|
|
444
|
+
browserPageTheme?: "deck" | "windows";
|
|
445
|
+
/** App links opened without asking, as "<site origin> <scheme>" ("https://zoom.us zoommtg"). */
|
|
446
|
+
browserAppLinks: string[];
|
|
447
|
+
/** The start page offers to make Deck the default browser while it is not. Off: "Don't ask again". */
|
|
448
|
+
browserDefaultAsk?: boolean;
|
|
449
|
+
/** Sites (by host) an agent may use in the browser without asking; localhost and files always. */
|
|
450
|
+
browserAgentSites: string[];
|
|
451
|
+
/** Agents may use any site without being asked (signing in still asks). Off by default. */
|
|
452
|
+
browserAgentAnySite: boolean;
|
|
453
|
+
/**
|
|
454
|
+
* Where a file type opens, by extension (".pdf"): "editor", "browser" or "plugin:<id>". A type
|
|
455
|
+
* not listed is Automatic (see `openerFor` in fileview.ts).
|
|
456
|
+
*/
|
|
457
|
+
openWith?: Record<string, string>;
|
|
458
|
+
}
|
|
459
|
+
/** The bookmarks bar setting, older true/false values included. */
|
|
460
|
+
export declare const bookmarksBarMode: (s: Settings) => "always" | "home" | "never";
|
|
461
|
+
export declare const DEFAULT_SETTINGS: Settings;
|
|
462
|
+
export declare const setAutostart: (on: boolean) => Promise<void>;
|
|
463
|
+
export declare const getAutostart: () => Promise<boolean>;
|
|
464
|
+
export declare const toggleFullscreen: () => Promise<boolean>;
|
|
465
|
+
export declare const isFullscreen: () => Promise<boolean>;
|
|
466
|
+
/** Check a sudo password on the server and hold it until Deck exits (never written anywhere). */
|
|
467
|
+
export declare const remoteSudoPassword: (host: string, password: string) => Promise<void>;
|
|
468
|
+
/** Ask for the sudo password of `host` (SudoPasswordPrompt, mounted in App). True once it has
|
|
469
|
+
* been accepted, false if the prompt was cancelled. */
|
|
470
|
+
export declare function askSudoPassword(host: string): Promise<boolean>;
|
|
471
|
+
/**
|
|
472
|
+
* Watch `paths` for changes made outside Deck (`fs-changed` events, a path each). `owner` names
|
|
473
|
+
* the caller: each owner sets only its own list and the watcher follows every owner's together, so
|
|
474
|
+
* one caller cannot replace or end another's watch. An empty list takes the owner out.
|
|
475
|
+
*/
|
|
476
|
+
export declare const watchFiles: (paths: string[], owner?: string) => Promise<void>;
|
|
477
|
+
/** RAM in bytes: Deck and its WebView2 children, plus every claude.exe. */
|
|
478
|
+
export interface MemServer {
|
|
479
|
+
id: string;
|
|
480
|
+
label: string;
|
|
481
|
+
mem: number;
|
|
482
|
+
cpu: number;
|
|
483
|
+
pid: number;
|
|
484
|
+
}
|
|
485
|
+
/** One process behind the figures, largest first. Only filled when memUsage(true) asks. */
|
|
486
|
+
export interface MemProc {
|
|
487
|
+
pid: number;
|
|
488
|
+
name: string;
|
|
489
|
+
cmd: string;
|
|
490
|
+
mem: number;
|
|
491
|
+
/** Its share of all cores since the reading before. */
|
|
492
|
+
cpu: number;
|
|
493
|
+
group: "deck" | "server" | "browser" | "agent" | "run" | "pane-agent" | "pane";
|
|
494
|
+
/** The language server's session id, the run's id, or the terminal pane's id. */
|
|
495
|
+
owner: string;
|
|
496
|
+
/** An agent, or a process in a terminal pane that is not its shell: memKill may stop it. */
|
|
497
|
+
killable: boolean;
|
|
498
|
+
}
|
|
499
|
+
export interface MemUsage {
|
|
500
|
+
deck: number;
|
|
501
|
+
agents: number;
|
|
502
|
+
agent_count: number;
|
|
503
|
+
/** Percent of all cores, everything below together. -1 on the first reading, before there is anything to difference. */
|
|
504
|
+
cpu: number;
|
|
505
|
+
/** The same split as the memory: the app and WebView2, language servers, the browser's pages,
|
|
506
|
+
* programs tools ran, every agent (Deck's and those in panes), and the terminal panes. */
|
|
507
|
+
cpu_core: number;
|
|
508
|
+
cpu_servers: number;
|
|
509
|
+
cpu_browser: number;
|
|
510
|
+
cpu_runs: number;
|
|
511
|
+
cpu_agents: number;
|
|
512
|
+
cpu_panes: number;
|
|
513
|
+
/** Deck minus its language servers and the browser. Part of `deck`. */
|
|
514
|
+
core: number;
|
|
515
|
+
/** The browser's pages (its own WebView2 profile). Also part of `deck`. */
|
|
516
|
+
browser: number;
|
|
517
|
+
/** Browser panes with a live webview, each with its renderers' memory, largest first. */
|
|
518
|
+
browser_tabs: {
|
|
519
|
+
pane: string;
|
|
520
|
+
mem: number;
|
|
521
|
+
}[];
|
|
522
|
+
/** Running language servers, largest first. Also part of `deck`. */
|
|
523
|
+
servers: MemServer[];
|
|
524
|
+
/** Programs a tool ran through Deck (a Flutter app, a dev server, kubectl). NOT part of `deck`. */
|
|
525
|
+
runs: number;
|
|
526
|
+
run_count: number;
|
|
527
|
+
/** Terminal panes. NOT part of `deck` — informational only. */
|
|
528
|
+
panes: number;
|
|
529
|
+
pane_count: number;
|
|
530
|
+
/** claude running inside a pane. Also not part of `deck`. */
|
|
531
|
+
pane_agents: number;
|
|
532
|
+
pane_agent_count: number;
|
|
533
|
+
procs: MemProc[];
|
|
534
|
+
}
|
|
535
|
+
/** `detail` also lists every process with its command line: for the open popover, not the poll. */
|
|
536
|
+
export declare const memUsage: (detail?: boolean) => Promise<MemUsage>;
|
|
537
|
+
/** Stop a process the memory popover lists, and what it started. Refused unless `killable`. An agent in a pane is asked to quit first: true when it did, false when it was killed. */
|
|
538
|
+
export declare const memKill: (pid: number) => Promise<boolean>;
|
|
539
|
+
/** Stop the claude or codex running in a terminal pane, as memKill does. */
|
|
540
|
+
export declare const agentStop: (pane: string) => Promise<boolean>;
|
|
541
|
+
/** An output ("out") or input ("in") device. `volume` is 0 to 1. */
|
|
542
|
+
export interface AudioDevice {
|
|
543
|
+
id: string;
|
|
544
|
+
name: string;
|
|
545
|
+
flow: "out" | "in";
|
|
546
|
+
/** The default for apps, and for calls. */
|
|
547
|
+
default: boolean;
|
|
548
|
+
default_comms: boolean;
|
|
549
|
+
volume: number;
|
|
550
|
+
muted: boolean;
|
|
551
|
+
}
|
|
552
|
+
/** An app with sound on the default output: its own volume (0 to 1) within the device's, and how loud it plays now. */
|
|
553
|
+
export interface AudioSession {
|
|
554
|
+
pid: number;
|
|
555
|
+
name: string;
|
|
556
|
+
volume: number;
|
|
557
|
+
muted: boolean;
|
|
558
|
+
peak: number;
|
|
559
|
+
}
|
|
560
|
+
/** Every active output and input device. Cheap enough to poll. */
|
|
561
|
+
export declare const audioDevices: () => Promise<AudioDevice[]>;
|
|
562
|
+
export declare const audioSetVolume: (id: string, level: number) => Promise<void>;
|
|
563
|
+
export declare const audioSetMute: (id: string, muted: boolean) => Promise<void>;
|
|
564
|
+
/** Make a device the default for everything: apps and calls. */
|
|
565
|
+
export declare const audioSetDefault: (id: string) => Promise<void>;
|
|
566
|
+
/** How loud a device is playing or hearing right now, 0 to 1. */
|
|
567
|
+
export declare const audioPeak: (id: string) => Promise<number>;
|
|
568
|
+
/** The apps with sound on the default output; a program with several processes comes once per process. */
|
|
569
|
+
export declare const audioSessions: () => Promise<AudioSession[]>;
|
|
570
|
+
/** The icon of the program behind a session (its `pid`), as PNG bytes of `size` px. */
|
|
571
|
+
export declare const audioIcon: (pid: number, size: number) => Promise<Uint8Array<ArrayBuffer>>;
|
|
572
|
+
/** One app's volume and mute, by its process id. */
|
|
573
|
+
export declare const audioSessionSet: (pid: number, level?: number, muted?: boolean) => Promise<void>;
|
|
574
|
+
/** Hold a system-wide shortcut ("ctrl+shift+m") under `id`, heard in every app as a `global-shortcut` event `{ id, chord }`. Refused when another app holds the chord. */
|
|
575
|
+
export declare const shortcutSet: (id: string, chord: string) => Promise<void>;
|
|
576
|
+
/** Free the shortcut `id` holds. */
|
|
577
|
+
export declare const shortcutClear: (id: string) => Promise<void>;
|
|
578
|
+
export declare const listApps: () => Promise<AppProc[]>;
|
|
579
|
+
export declare const listInstalled: () => Promise<AppProc[]>;
|
|
580
|
+
export declare const runScriptNow: (command: string, args: string[], id?: string, name?: string) => Promise<void>;
|
|
581
|
+
export declare const pickScript: () => Promise<string>;
|
|
582
|
+
export interface ExecOut {
|
|
583
|
+
stdout: string;
|
|
584
|
+
stderr: string;
|
|
585
|
+
code: number;
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Run a command to completion and read its output. `runScriptNow` is fire-and-forget; this is
|
|
589
|
+
* for when the output IS the point — asking a tool what it knows rather than telling it to do
|
|
590
|
+
* something. A bare name goes through cmd.exe, so PATH and .bat shims (`flutter`, `npm`) work.
|
|
591
|
+
*/
|
|
592
|
+
export declare const exec: (command: string, args?: string[], cwd?: string) => Promise<ExecOut>;
|
|
593
|
+
/** One header, one value. A list rather than a map: order matters, and repeats are legal. */
|
|
594
|
+
export type HttpHeader = [string, string];
|
|
595
|
+
export interface HttpSendRequest {
|
|
596
|
+
method: string;
|
|
597
|
+
url: string;
|
|
598
|
+
headers?: HttpHeader[];
|
|
599
|
+
body?: string;
|
|
600
|
+
}
|
|
601
|
+
export interface HttpSendResult {
|
|
602
|
+
status: number;
|
|
603
|
+
status_text: string;
|
|
604
|
+
headers: HttpHeader[];
|
|
605
|
+
body: string;
|
|
606
|
+
/** Present only when the body is not valid UTF-8 — an image, a zip. `body` is lossy then. */
|
|
607
|
+
body_b64?: string;
|
|
608
|
+
size: number;
|
|
609
|
+
truncated: boolean;
|
|
610
|
+
elapsed_ms: number;
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* Send one HTTP request and read the whole response.
|
|
614
|
+
*
|
|
615
|
+
* The `id` http.rs wants for cancellation is generated here: it exists so the HTTP module can
|
|
616
|
+
* abort a send in flight, and a caller doing one GET should not have to invent one. A caller
|
|
617
|
+
* that does need to cancel should use core/httpclient.ts, which owns that id.
|
|
618
|
+
*/
|
|
619
|
+
export declare const httpSend: (req: HttpSendRequest) => Promise<HttpSendResult>;
|
|
620
|
+
/**
|
|
621
|
+
* The same send under an id the caller chose, so it can be cancelled with `httpCancel` while in
|
|
622
|
+
* flight. `req` is the full shape http.rs takes; the Requests plugin builds it.
|
|
623
|
+
*/
|
|
624
|
+
export declare const httpSendAs: <T = HttpSendResult>(id: string, req: object) => Promise<T>;
|
|
625
|
+
/** Abort the send started under `id`. A no-op when it has already finished. */
|
|
626
|
+
export declare const httpCancel: (id: string) => Promise<void>;
|
|
627
|
+
/**
|
|
628
|
+
* Answer an `http-send` event: a send the MCP asked for through sessions.rs, which waits on this
|
|
629
|
+
* reply under `job`. The Requests plugin listens for the event and does the send.
|
|
630
|
+
*/
|
|
631
|
+
export declare const httpSendReply: (job: string, body: string) => Promise<void>;
|
|
632
|
+
export declare const pickFolder: () => Promise<string>;
|
|
633
|
+
/** Native "save as" dialog. Returns "" when cancelled. */
|
|
634
|
+
export declare const pickSavePath: (defaultName: string, ext: string) => Promise<string>;
|
|
635
|
+
/** Native "open file" dialog. Returns "" when cancelled. */
|
|
636
|
+
export declare const pickFile: (ext: string) => Promise<string>;
|
|
637
|
+
/** Native "open file" dialog with no type filter, for choosing a file to upload: an endpoint may
|
|
638
|
+
* accept any extension, so a filter would only hide valid choices. "" when cancelled. */
|
|
639
|
+
export declare const pickAnyFile: () => Promise<string>;
|
|
640
|
+
/** Open dialog filtered to the image types a webview can display. */
|
|
641
|
+
export declare const pickImage: () => Promise<string>;
|
|
642
|
+
/** Copy a chosen image into the config dir; returns the path Deck will read it from. */
|
|
643
|
+
export declare const setWallpaper: (src: string) => Promise<string>;
|
|
644
|
+
export declare const clearWallpaper: () => Promise<void>;
|
|
645
|
+
export declare const revealInFolder: (path: string) => Promise<void>;
|
|
646
|
+
/** Deck's newest log file (`<config dir>\logs\deck-YYYY-MM-DD.log`), or the folder when empty. */
|
|
647
|
+
export declare const logLatest: () => Promise<string>;
|
|
648
|
+
export declare const openFile: (path: string) => Promise<void>;
|
|
649
|
+
/** Files Deck was launched with — a double-click through Explorer's "Open with". */
|
|
650
|
+
export declare const launchFiles: () => Promise<string[]>;
|
|
651
|
+
/** Web addresses Deck was launched with: a link opened in another app, Deck being the default browser. */
|
|
652
|
+
export declare const launchUrls: () => Promise<string[]>;
|
|
653
|
+
export interface DefaultBrowserStatus {
|
|
654
|
+
registered: boolean;
|
|
655
|
+
isDefault: boolean;
|
|
656
|
+
name: string;
|
|
657
|
+
}
|
|
658
|
+
/** Whether Deck is offered as a browser in Windows, and whether links open with it. */
|
|
659
|
+
export declare const browserDefaultStatus: () => Promise<DefaultBrowserStatus>;
|
|
660
|
+
/** Register Deck as a browser for this user and open Windows' Default apps page at it: Windows
|
|
661
|
+
* keeps the choice itself to the user. */
|
|
662
|
+
export declare const browserDefaultRegister: () => Promise<DefaultBrowserStatus>;
|
|
663
|
+
export declare const mediaSetNowPlaying: (title: string, artist: string, artPath: string) => Promise<void>;
|
|
664
|
+
export declare const mediaSetPlayback: (playing: boolean) => Promise<void>;
|
|
665
|
+
export interface TrackMeta {
|
|
666
|
+
path: string;
|
|
667
|
+
title: string;
|
|
668
|
+
artist: string;
|
|
669
|
+
album: string;
|
|
670
|
+
duration: number;
|
|
671
|
+
art_path: string;
|
|
672
|
+
}
|
|
673
|
+
export declare const readTrackMeta: (paths: string[]) => Promise<TrackMeta[]>;
|
|
674
|
+
export { convertFileSrc } from "@tauri-apps/api/core";
|
|
675
|
+
/** Start a sign-in. Returns the consent URL to open in the browser. */
|
|
676
|
+
export declare const googleSignIn: () => Promise<string>;
|
|
677
|
+
/** A valid access token, refreshed if needed. Rejects when not connected. */
|
|
678
|
+
export declare const googleToken: () => Promise<string>;
|
|
679
|
+
/** The connected account, or null when not connected. */
|
|
680
|
+
export interface GoogleAccount {
|
|
681
|
+
email: string;
|
|
682
|
+
name: string;
|
|
683
|
+
picture: string;
|
|
684
|
+
}
|
|
685
|
+
export declare const googleAccount: () => Promise<GoogleAccount | null>;
|
|
686
|
+
export declare const googleSignOut: () => Promise<void>;
|
|
687
|
+
export interface UsageBucket {
|
|
688
|
+
tokens: number;
|
|
689
|
+
cost: number;
|
|
690
|
+
}
|
|
691
|
+
export interface UsageSession extends UsageBucket {
|
|
692
|
+
remainingMinutes?: number | null;
|
|
693
|
+
}
|
|
694
|
+
export interface ClaudeUsage {
|
|
695
|
+
today?: UsageBucket;
|
|
696
|
+
week?: UsageBucket;
|
|
697
|
+
month?: UsageBucket;
|
|
698
|
+
session?: UsageSession | null;
|
|
699
|
+
error?: string;
|
|
700
|
+
}
|
|
701
|
+
export declare const claudeUsage: () => Promise<ClaudeUsage>;
|
|
702
|
+
export interface PlanLimit {
|
|
703
|
+
kind: string;
|
|
704
|
+
group: string;
|
|
705
|
+
percent: number;
|
|
706
|
+
severity: string;
|
|
707
|
+
resets_at: string | null;
|
|
708
|
+
is_active: boolean;
|
|
709
|
+
scope?: {
|
|
710
|
+
model?: {
|
|
711
|
+
display_name?: string;
|
|
712
|
+
};
|
|
713
|
+
} | null;
|
|
714
|
+
}
|
|
715
|
+
export interface PlanLimits {
|
|
716
|
+
limits?: PlanLimit[];
|
|
717
|
+
error?: string;
|
|
718
|
+
}
|
|
719
|
+
export declare const claudePlanLimits: () => Promise<PlanLimits>;
|
|
720
|
+
/** An agent pane as the session surface sees it. Status: working | idle | blocked. */
|
|
721
|
+
export interface AgentSession {
|
|
722
|
+
pane_id: string;
|
|
723
|
+
agent: string;
|
|
724
|
+
status: string;
|
|
725
|
+
cwd: string;
|
|
726
|
+
title: string;
|
|
727
|
+
}
|
|
728
|
+
export declare const sessionList: () => Promise<AgentSession[]>;
|
|
729
|
+
export interface ScriptJob {
|
|
730
|
+
id: string;
|
|
731
|
+
name: string;
|
|
732
|
+
command: string;
|
|
733
|
+
args: string[];
|
|
734
|
+
mode: "interval" | "atTime";
|
|
735
|
+
intervalMin: number;
|
|
736
|
+
days: string[];
|
|
737
|
+
timeOfDay: string;
|
|
738
|
+
everyWeeks: number;
|
|
739
|
+
startDate: string;
|
|
740
|
+
enabled: boolean;
|
|
741
|
+
lastRun: number;
|
|
742
|
+
target?: "local" | "vps";
|
|
743
|
+
}
|
|
744
|
+
export interface HistoryEntry {
|
|
745
|
+
module: string;
|
|
746
|
+
label: string;
|
|
747
|
+
payload: any;
|
|
748
|
+
firedAt: number;
|
|
749
|
+
mode?: "delay" | "atTime";
|
|
750
|
+
recurring?: boolean;
|
|
751
|
+
days?: string[];
|
|
752
|
+
timeOfDay?: string;
|
|
753
|
+
delayMin?: number;
|
|
754
|
+
}
|
|
755
|
+
export interface StartupProgram {
|
|
756
|
+
Name: string;
|
|
757
|
+
Path: string;
|
|
758
|
+
Args: string[];
|
|
759
|
+
Days: string[];
|
|
760
|
+
Start: string;
|
|
761
|
+
End: string;
|
|
762
|
+
Enabled: boolean;
|
|
763
|
+
}
|
|
764
|
+
export declare const pickExe: () => Promise<string>;
|
|
765
|
+
export declare const readTermLayout: <T>() => Promise<T | null>;
|
|
766
|
+
/** `mtimeMs` is epoch ms, 0 if unreadable — lets a caller tell a settled file from one still being written. */
|
|
767
|
+
/** One entry of a folder. `size` is bytes (0 for a folder); `hidden` is Windows' hidden attribute,
|
|
768
|
+
* or a dot name on a server. */
|
|
769
|
+
export interface FsEntry {
|
|
770
|
+
name: string;
|
|
771
|
+
path: string;
|
|
772
|
+
dir: boolean;
|
|
773
|
+
mtimeMs: number;
|
|
774
|
+
size: number;
|
|
775
|
+
hidden: boolean;
|
|
776
|
+
}
|
|
777
|
+
export interface GitStatusRow {
|
|
778
|
+
path: string;
|
|
779
|
+
rel: string;
|
|
780
|
+
letter: string;
|
|
781
|
+
staged: boolean;
|
|
782
|
+
}
|
|
783
|
+
/** One folder level, folders first. `all` includes the build folders (node_modules, target, .git…)
|
|
784
|
+
* that a code folder's tree leaves out. */
|
|
785
|
+
export declare const fsList: (dir: string, all?: boolean) => Promise<FsEntry[]>;
|
|
786
|
+
/** A drive of this PC (`C:\`): its label, kind, and size and free space in bytes (0 for a network drive or a disc). */
|
|
787
|
+
export interface Drive {
|
|
788
|
+
path: string;
|
|
789
|
+
label: string;
|
|
790
|
+
kind: "fixed" | "removable" | "network" | "cd";
|
|
791
|
+
total: number;
|
|
792
|
+
free: number;
|
|
793
|
+
}
|
|
794
|
+
/** The drives Windows has. A one-off read, never for a poll. */
|
|
795
|
+
export declare const fsDrives: () => Promise<Drive[]>;
|
|
796
|
+
/**
|
|
797
|
+
* Windows' shell namespace, for what has no drive letter: a phone or camera on USB, which Explorer
|
|
798
|
+
* lists under This PC (shellfs.rs). A path is the item's parsing name; its parts are the device's
|
|
799
|
+
* object ids, so names come from the listing and from shellParents, never from the path.
|
|
800
|
+
*/
|
|
801
|
+
/** `total` and `free`: a device's storage and the space left on it, in bytes (0 when it does not say). */
|
|
802
|
+
export interface ShellPlace {
|
|
803
|
+
name: string;
|
|
804
|
+
path: string;
|
|
805
|
+
total: number;
|
|
806
|
+
free: number;
|
|
807
|
+
}
|
|
808
|
+
/** Phones, cameras and other portable devices under This PC. */
|
|
809
|
+
export declare const shellPlaces: () => Promise<ShellPlace[]>;
|
|
810
|
+
/** A shell folder's items, the shape fsList gives (a device's sizes and times may be 0). */
|
|
811
|
+
export declare const shellList: (path: string) => Promise<FsEntry[]>;
|
|
812
|
+
/** The folders from the device down to `path`, with their names. */
|
|
813
|
+
export declare const shellParents: (path: string) => Promise<ShellPlace[]>;
|
|
814
|
+
/**
|
|
815
|
+
* Copy or move into `dest`, either side a shell path or this PC's, with Windows' own progress and
|
|
816
|
+
* its question when a name is taken. False when cancelled there.
|
|
817
|
+
*/
|
|
818
|
+
export declare const shellTransfer: (sources: string[], dest: string, move: boolean) => Promise<boolean>;
|
|
819
|
+
/** Delete for good (a device has no Recycle Bin); ask before calling. */
|
|
820
|
+
export declare const shellDelete: (paths: string[]) => Promise<boolean>;
|
|
821
|
+
export declare const shellRename: (path: string, name: string) => Promise<boolean>;
|
|
822
|
+
export declare const shellNewFolder: (dir: string, name: string) => Promise<boolean>;
|
|
823
|
+
/** `%APPDATA%\Deck\plugins` (Deck-Dev in a debug build), created on first call. */
|
|
824
|
+
export declare const pluginsDir: () => Promise<string>;
|
|
825
|
+
/** `%APPDATA%\Deck\languages` (Deck-Dev in a debug build), created on first call. */
|
|
826
|
+
export declare const languagesDir: () => Promise<string>;
|
|
827
|
+
/** Delete a language definition's folder (by its folder name). The server and debugger it names stay installed. */
|
|
828
|
+
export declare const removeLanguage: (folder: string) => Promise<void>;
|
|
829
|
+
export declare const fsRead: (path: string) => Promise<string>;
|
|
830
|
+
/** Raw bytes, for a file that is not text — fsRead decodes as UTF-8 and would corrupt it. */
|
|
831
|
+
export declare const fsReadBytes: (path: string) => Promise<Uint8Array<ArrayBuffer>>;
|
|
832
|
+
export declare const fsSize: (path: string) => Promise<number>;
|
|
833
|
+
/** What is at a remote path. A missing one is `exists: false`, not an error. */
|
|
834
|
+
export interface RemoteStat {
|
|
835
|
+
exists: boolean;
|
|
836
|
+
dir: boolean;
|
|
837
|
+
size: number;
|
|
838
|
+
mtimeMs: number;
|
|
839
|
+
}
|
|
840
|
+
export declare const remoteStat: (path: string) => Promise<RemoteStat>;
|
|
841
|
+
/** The server's home folder as host:/home/user (host+sudo: when it runs as root). */
|
|
842
|
+
export declare const remoteHome: (host: string, sudo: boolean) => Promise<string>;
|
|
843
|
+
/** Host names from ~/.ssh/config, without patterns. */
|
|
844
|
+
export declare const sshHosts: () => Promise<string[]>;
|
|
845
|
+
export declare const fsWrite: (path: string, content: string) => Promise<void>;
|
|
846
|
+
/** Raw bytes — a PDF, an image, a response — which a string would corrupt. Sent as the raw body,
|
|
847
|
+
* the path percent-encoded in a header; a remote path writes over SSH. */
|
|
848
|
+
export declare const fsWriteBytes: (path: string, bytes: Uint8Array) => Promise<void>;
|
|
849
|
+
/** Write bytes without ever clobbering: dedupes the name on collision, returns the path used. */
|
|
850
|
+
export declare const fsSaveUnique: (saveTo: string, defaultName: string, bytes: Uint8Array) => Promise<string>;
|
|
851
|
+
export declare const fsHomeDir: () => Promise<string>;
|
|
852
|
+
/**
|
|
853
|
+
* Move into a directory, creating it if missing. Returns the new full path.
|
|
854
|
+
*
|
|
855
|
+
* `onConflict` "rename" deduplicates to "name (1).ext" instead of failing — for an unattended
|
|
856
|
+
* caller with nobody to answer an overwrite prompt. Omit it for the interactive case.
|
|
857
|
+
*/
|
|
858
|
+
export declare const fsMove: (src: string, dstDir: string, onConflict?: "fail" | "rename") => Promise<string>;
|
|
859
|
+
export declare const fsCreateFile: (dir: string, name: string) => Promise<string>;
|
|
860
|
+
/** Open a path with its default application. */
|
|
861
|
+
export declare const fsOpen: (path: string) => Promise<void>;
|
|
862
|
+
/** The user's Downloads folder (home if there isn't one). */
|
|
863
|
+
export declare const dirsDownload: () => Promise<string>;
|
|
864
|
+
/** Relaunch Deck — the same binary, so a dev instance stays dev. Used by the plugin toggle. */
|
|
865
|
+
export declare const restartApp: () => Promise<void>;
|
|
866
|
+
/** Start a test Deck (`deck.exe --test`) beside this one, or bring the running one forward. */
|
|
867
|
+
export declare const openTestDeck: () => Promise<void>;
|
|
868
|
+
/** Fetch the VPS's Script Runner run log over SSH into the local run-log-vps config (vpsjobs.rs). */
|
|
869
|
+
export declare const vpsRunsPull: () => Promise<void>;
|
|
870
|
+
/** What Rust saw of this launch, as Unix ms: process creation and the setup() span. Null until
|
|
871
|
+
* setup() has finished, which is before any page script runs. */
|
|
872
|
+
export interface StartupMarks {
|
|
873
|
+
process: number;
|
|
874
|
+
setupStart: number;
|
|
875
|
+
setupEnd: number;
|
|
876
|
+
}
|
|
877
|
+
export declare const startupMarks: () => Promise<StartupMarks | null>;
|
|
878
|
+
/** The page has drawn: Rust shows the window, hidden until then so it never shows see-through. */
|
|
879
|
+
export declare const deckReady: () => Promise<void>;
|
|
880
|
+
/** What a backup file holds: the Deck that wrote it, when, and how many of each thing. */
|
|
881
|
+
export interface BackupSummary {
|
|
882
|
+
deck: string;
|
|
883
|
+
created: string;
|
|
884
|
+
configs: number;
|
|
885
|
+
plugins: number;
|
|
886
|
+
languages: number;
|
|
887
|
+
notes: number;
|
|
888
|
+
}
|
|
889
|
+
/** Every config, plugin and language to one file, credentials left out (backup.rs). */
|
|
890
|
+
export declare const backupExport: (path: string) => Promise<BackupSummary>;
|
|
891
|
+
export declare const backupInspect: (path: string) => Promise<BackupSummary>;
|
|
892
|
+
/** Writes the backup over this machine's copies. Deck should restart afterwards. */
|
|
893
|
+
export declare const backupRestore: (path: string) => Promise<BackupSummary>;
|
|
894
|
+
/** One file of a plugin, as the registry describes it. */
|
|
895
|
+
export interface RemoteFile {
|
|
896
|
+
url: string;
|
|
897
|
+
sha256: string;
|
|
898
|
+
bytes?: number;
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* Install a plugin or a language definition from the registry.
|
|
902
|
+
*
|
|
903
|
+
* `kind` decides where it lands and what it is allowed to contain: a plugin's three files in
|
|
904
|
+
* `plugins/`, or a language.json and its snippets in `languages/`. Rust refuses anything else,
|
|
905
|
+
* because the file names become paths.
|
|
906
|
+
*
|
|
907
|
+
* Every file's SHA-256 is checked before anything is written. It matters most for a plugin —
|
|
908
|
+
* `plugin.js` runs with this bridge, so unverified bytes would be someone else's code running
|
|
909
|
+
* here — but a corrupted language definition is worth refusing too. Nothing is written unless
|
|
910
|
+
* every file checks out.
|
|
911
|
+
*
|
|
912
|
+
* Resolves to the installed id; both kinds load without a restart.
|
|
913
|
+
*/
|
|
914
|
+
export declare const installFromRegistry: (kind: string, id: string, files: Record<string, RemoteFile>) => Promise<string>;
|
|
915
|
+
/** One line of output from a `procStream` run. `stream` is "stdout" or "stderr". */
|
|
916
|
+
export interface ProcLine {
|
|
917
|
+
id: string;
|
|
918
|
+
stream: string;
|
|
919
|
+
line: string;
|
|
920
|
+
}
|
|
921
|
+
/** How a `procStream` run ended. `cancelled` separates a `procKill` from a real failure. */
|
|
922
|
+
export interface ProcResult {
|
|
923
|
+
id: string;
|
|
924
|
+
code: number;
|
|
925
|
+
cancelled: boolean;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Run a program, emitting a `proc-line` event per output line, and resolve when it exits.
|
|
929
|
+
*
|
|
930
|
+
* `id` is the caller's handle — it tags every event and is what `procKill` takes, so concurrent
|
|
931
|
+
* runs can be told apart. Listen with `listen<ProcLine>("proc-line", …)` and filter on it.
|
|
932
|
+
*
|
|
933
|
+
* `stdin: true` opens the child's input for `procWrite`, which is what turns this from "run a
|
|
934
|
+
* command and read the output" into driving a long-lived tool that takes commands — a daemon
|
|
935
|
+
* speaking one JSON object per line, or a program reading single keypresses.
|
|
936
|
+
*/
|
|
937
|
+
export declare const procStream: (id: string, program: string, args: string[], cwd?: string, stdin?: boolean) => Promise<ProcResult>;
|
|
938
|
+
/**
|
|
939
|
+
* Write to a running `procStream`'s stdin. Only works when it was started with `stdin: true`.
|
|
940
|
+
*
|
|
941
|
+
* Raw — no newline is appended, since whether one terminates a message belongs to the protocol.
|
|
942
|
+
*/
|
|
943
|
+
export declare const procWrite: (id: string, data: string) => Promise<void>;
|
|
944
|
+
export declare const procKill: (id: string) => Promise<void>;
|
|
945
|
+
export declare const fsCreateDir: (dir: string, name: string) => Promise<string>;
|
|
946
|
+
export declare const fsRename: (path: string, newName: string) => Promise<string>;
|
|
947
|
+
export declare const fsDelete: (path: string) => Promise<void>;
|
|
948
|
+
/** Move to the Recycle Bin, so it can be restored (fsDelete removes for good). */
|
|
949
|
+
export declare const fsTrash: (path: string) => Promise<void>;
|
|
950
|
+
export declare const fsCopy: (src: string, dstDir: string) => Promise<string>;
|
|
951
|
+
export declare const fsReveal: (path: string) => Promise<void>;
|
|
952
|
+
/**
|
|
953
|
+
* Deck's MCP server, which lets an agent drive Deck's terminals and HTTP client, registered with
|
|
954
|
+
* an AI coding agent: "claude", "codex", "gemini" or "cursor". The server ships with Deck as a
|
|
955
|
+
* single bundled file. Each agent keeps its MCP servers somewhere else (see agentmcp.rs), a file
|
|
956
|
+
* that belongs to that agent, so Deck backs it up first, merges rather than replaces, and refuses
|
|
957
|
+
* outright if it cannot parse it. The status is "missing", "current", "stale" (an entry pointing
|
|
958
|
+
* somewhere else, as a reinstall to another folder leaves) or "no-node" (nothing could run it).
|
|
959
|
+
*/
|
|
960
|
+
export declare const agentMcpStatus: (agent: string) => Promise<string>;
|
|
961
|
+
export declare const installAgentMcp: (agent: string) => Promise<string>;
|
|
962
|
+
/** Deck's hooks for an agent that has them ("claude", "codex"): what the Agents panel and the
|
|
963
|
+
* agent notifications hear from. Merged into the agent's own settings, backed up first. */
|
|
964
|
+
export declare const installAgentHooks: (agent: string) => Promise<void>;
|
|
965
|
+
/**
|
|
966
|
+
* Deck's skills (how to use its MCP tools) for an agent that reads skills: "claude" or "codex".
|
|
967
|
+
* Each comes back with what happened to it: "installed", "updated", "current", "kept-yours" (a
|
|
968
|
+
* skill of that name that is not Deck's) or "kept-edited" (Deck's, changed since). Deck only
|
|
969
|
+
* replaces a skill folder it wrote and nobody has edited.
|
|
970
|
+
*/
|
|
971
|
+
export declare const installAgentSkills: (agent: string) => Promise<{
|
|
972
|
+
skill: string;
|
|
973
|
+
outcome: string;
|
|
974
|
+
}[]>;
|
|
975
|
+
/** Which agent command-line tools are on PATH: any of claude, codex, gemini, cursor-agent, cursor. */
|
|
976
|
+
export declare const agentClis: () => Promise<string[]>;
|
|
977
|
+
export declare const notifyOs: (title: string, body: string) => Promise<void>;
|
|
978
|
+
/** Run `git -C <dir> <args>`: its stdout, or what git said as the error. Never prompts for
|
|
979
|
+
* credentials. What the Git plugin builds its operations on. */
|
|
980
|
+
export declare const gitRun: (dir: string, args: string[]) => Promise<string>;
|
|
981
|
+
export declare const gitStatus: (dir: string) => Promise<GitStatusRow[]>;
|
|
982
|
+
/** The repos a folder holds: the one it is inside first, then any below it. Each a repo's top level. */
|
|
983
|
+
export declare const gitRepos: (dir: string) => Promise<string[]>;
|
|
984
|
+
export interface BlameLine {
|
|
985
|
+
hash: string;
|
|
986
|
+
author: string;
|
|
987
|
+
time: number;
|
|
988
|
+
summary: string;
|
|
989
|
+
uncommitted: boolean;
|
|
990
|
+
}
|
|
991
|
+
export declare const gitBlameLine: (dir: string, rel: string, line: number, contents: string) => Promise<BlameLine | null>;
|
|
992
|
+
/** A blob's raw bytes. `rev` is "HEAD", or "" for the index. Empty = absent from that revision.
|
|
993
|
+
* For content the text commands would corrupt: an image, a font. */
|
|
994
|
+
export declare const gitFileBytes: (dir: string, rev: string, rel: string) => Promise<Uint8Array<ArrayBuffer>>;
|
|
995
|
+
export interface GitInfo {
|
|
996
|
+
branch: string;
|
|
997
|
+
has_remote: boolean;
|
|
998
|
+
ahead: number;
|
|
999
|
+
behind: number;
|
|
1000
|
+
}
|
|
1001
|
+
export declare const gitInfo: (dir: string) => Promise<GitInfo>;
|
|
1002
|
+
/** gitStatus and gitInfo in one `git status -b`: what the editor's poll asks for every 3s. */
|
|
1003
|
+
export declare const gitPoll: (dir: string) => Promise<{
|
|
1004
|
+
rows: GitStatusRow[];
|
|
1005
|
+
info: GitInfo;
|
|
1006
|
+
}>;
|
|
1007
|
+
export declare const gitFileDiff: (dir: string, rel: string) => Promise<string>;
|
|
1008
|
+
export interface ImportedPack {
|
|
1009
|
+
id: string;
|
|
1010
|
+
label: string;
|
|
1011
|
+
theme_json: string;
|
|
1012
|
+
}
|
|
1013
|
+
export declare const importIconPack: (srcDir: string) => Promise<ImportedPack>;
|
|
1014
|
+
export declare const deleteIconPack: (id: string) => Promise<void>;
|
|
1015
|
+
export declare const readIconPackTheme: (path: string) => Promise<string>;
|
|
1016
|
+
export declare const gitDiscard: (dir: string, paths: string[]) => Promise<void>;
|
|
1017
|
+
export interface GraphCommit {
|
|
1018
|
+
hash: string;
|
|
1019
|
+
parents: string[];
|
|
1020
|
+
author: string;
|
|
1021
|
+
email: string;
|
|
1022
|
+
date: string;
|
|
1023
|
+
subject: string;
|
|
1024
|
+
body: string;
|
|
1025
|
+
refs: string[];
|
|
1026
|
+
}
|
|
1027
|
+
export declare const gitLogGraph: (dir: string, skip: number, rel?: string, refs?: string[]) => Promise<GraphCommit[]>;
|
|
1028
|
+
/** `old`: a rename's or copy's path before the commit, which its parent side is read from. */
|
|
1029
|
+
export interface CommitFile {
|
|
1030
|
+
rel: string;
|
|
1031
|
+
letter: string;
|
|
1032
|
+
adds: number;
|
|
1033
|
+
dels: number;
|
|
1034
|
+
old?: string;
|
|
1035
|
+
}
|
|
1036
|
+
export declare const gitCommitFiles: (dir: string, hash: string) => Promise<CommitFile[]>;
|
|
1037
|
+
export interface GitRef {
|
|
1038
|
+
kind: "local" | "remote" | "tag";
|
|
1039
|
+
name: string;
|
|
1040
|
+
current: boolean;
|
|
1041
|
+
author: string;
|
|
1042
|
+
hash: string;
|
|
1043
|
+
summary: string;
|
|
1044
|
+
time: number;
|
|
1045
|
+
}
|
|
1046
|
+
export declare const gitRefs: (dir: string) => Promise<GitRef[]>;
|
|
1047
|
+
export declare const gitCheckout: (dir: string, name: string) => Promise<string>;
|
|
1048
|
+
export declare const gitCheckoutNew: (dir: string, name: string) => Promise<string>;
|
|
1049
|
+
export declare const gitCheckoutTrack: (dir: string, remote: string) => Promise<string>;
|
|
1050
|
+
export declare const gitCheckoutDetach: (dir: string, rev: string) => Promise<string>;
|
|
1051
|
+
export declare const gitAiCommitMsg: (dir: string, command: string, args: string, model: string) => Promise<string>;
|
|
1052
|
+
/** The GitHub CLI, `gh pr …` or `gh repo view …` only. Rejects with "gh-missing" when gh is not installed. */
|
|
1053
|
+
export declare const ghRun: (dir: string, args: string[]) => Promise<string>;
|
|
1054
|
+
/** Pull request N's review threads, as GitHub's GraphQL JSON (parsed by prs.ts parseThreads). */
|
|
1055
|
+
export declare const ghPrThreads: (dir: string, number: number) => Promise<string>;
|
|
1056
|
+
/** Comment on one line of a PR's diff: side "RIGHT" is the new version, "LEFT" the old. */
|
|
1057
|
+
export declare const ghPrLineComment: (dir: string, number: number, commit: string, path: string, line: number, side: "LEFT" | "RIGHT", body: string) => Promise<string>;
|
|
1058
|
+
export declare const ghThreadReply: (dir: string, thread: string, body: string) => Promise<string>;
|
|
1059
|
+
export declare const ghThreadResolve: (dir: string, thread: string, resolve: boolean) => Promise<string>;
|
|
1060
|
+
/** The GitLab CLI, `glab mr …` only. Rejects with "glab-missing" when glab is not installed. */
|
|
1061
|
+
export declare const glabRun: (dir: string, args: string[]) => Promise<string>;
|
|
1062
|
+
/**
|
|
1063
|
+
* One GitLab REST request about this repo's merge requests (`projects/:id/merge_requests…` or
|
|
1064
|
+
* `user`). `fields` go as strings; `json` values must be objects or arrays.
|
|
1065
|
+
*/
|
|
1066
|
+
export declare const glabApi: (dir: string, method: "GET" | "POST" | "PUT", path: string, fields?: [string, string][], json?: Record<string, object>) => Promise<string>;
|
|
1067
|
+
/** The files that differ between two revisions. */
|
|
1068
|
+
export declare const gitRangeFiles: (dir: string, from: string, to: string) => Promise<CommitFile[]>;
|
|
1069
|
+
export interface SearchHit {
|
|
1070
|
+
path: string;
|
|
1071
|
+
rel: string;
|
|
1072
|
+
line: number;
|
|
1073
|
+
text: string;
|
|
1074
|
+
}
|
|
1075
|
+
export interface SearchOpts {
|
|
1076
|
+
caseSensitive: boolean;
|
|
1077
|
+
isRegex: boolean;
|
|
1078
|
+
wholeWord: boolean;
|
|
1079
|
+
includes: string;
|
|
1080
|
+
excludes: string;
|
|
1081
|
+
}
|
|
1082
|
+
/** Every file under `dir` (absolute paths), .gitignore respected — the editor's Ctrl+P. */
|
|
1083
|
+
export declare const fsFiles: (dir: string) => Promise<string[]>;
|
|
1084
|
+
/** One file `fsFind` found. `mtime` is milliseconds since the epoch. */
|
|
1085
|
+
export interface FoundFile {
|
|
1086
|
+
path: string;
|
|
1087
|
+
size: number;
|
|
1088
|
+
mtime: number;
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* Every file with one of `exts` (no dot) under `roots`, or under every fixed drive when roots is
|
|
1092
|
+
* null, skipping folders named in `excludeDirs` at any depth and files under `minSize` bytes.
|
|
1093
|
+
* A walk of whole drives takes on the order of a minute.
|
|
1094
|
+
*/
|
|
1095
|
+
export declare const fsFind: (roots: string[] | null, exts: string[], excludeDirs: string[], minSize: number) => Promise<FoundFile[]>;
|
|
1096
|
+
/** Windows' own thumbnail of a file (what Explorer shows), as PNG bytes fitting `size` x `size`.
|
|
1097
|
+
* Rejects when Windows has none for it. */
|
|
1098
|
+
/** What Windows knows about a photo or video (its Properties' Details tab). Absent fields are null. */
|
|
1099
|
+
export interface MediaMeta {
|
|
1100
|
+
/** Date taken or recorded, ms since the epoch. */
|
|
1101
|
+
taken: number | null;
|
|
1102
|
+
width: number | null;
|
|
1103
|
+
height: number | null;
|
|
1104
|
+
camera: string | null;
|
|
1105
|
+
lat: number | null;
|
|
1106
|
+
lon: number | null;
|
|
1107
|
+
duration_ms: number | null;
|
|
1108
|
+
}
|
|
1109
|
+
/** The properties of each path, in order; one that cannot be read comes back all null. */
|
|
1110
|
+
export declare const mediaMeta: (paths: string[]) => Promise<MediaMeta[]>;
|
|
1111
|
+
/** SHA-256 of each file's contents, in order; null for one that cannot be read. */
|
|
1112
|
+
export declare const fsHash: (paths: string[]) => Promise<(string | null)[]>;
|
|
1113
|
+
export declare const fsThumbnail: (path: string, size: number) => Promise<Uint8Array<ArrayBuffer>>;
|
|
1114
|
+
export declare const fsSearch: (dir: string, query: string, o: SearchOpts) => Promise<SearchHit[]>;
|
|
1115
|
+
export declare const fsReplace: (dir: string, query: string, replacement: string, o: SearchOpts, files?: string[], line?: number) => Promise<number>;
|
|
1116
|
+
export interface DbQueryResult {
|
|
1117
|
+
columns: string[];
|
|
1118
|
+
/** Cell values, already JSON: null, boolean, number, or a string for everything else. */
|
|
1119
|
+
rows: unknown[][];
|
|
1120
|
+
total: number;
|
|
1121
|
+
truncated: boolean;
|
|
1122
|
+
affected: number;
|
|
1123
|
+
}
|
|
1124
|
+
export interface DbColumn {
|
|
1125
|
+
name: string;
|
|
1126
|
+
type: string;
|
|
1127
|
+
notNull: boolean;
|
|
1128
|
+
pk: boolean;
|
|
1129
|
+
}
|
|
1130
|
+
export interface DbTable {
|
|
1131
|
+
name: string;
|
|
1132
|
+
kind: "table" | "view";
|
|
1133
|
+
columns: DbColumn[];
|
|
1134
|
+
/** The statement that created it, where the engine keeps one (SQLite). */
|
|
1135
|
+
sql?: string;
|
|
1136
|
+
}
|
|
1137
|
+
export interface DbForeignKey {
|
|
1138
|
+
table: string;
|
|
1139
|
+
column: string;
|
|
1140
|
+
refTable: string;
|
|
1141
|
+
refColumn: string;
|
|
1142
|
+
}
|
|
1143
|
+
export interface DbSchema {
|
|
1144
|
+
tables: DbTable[];
|
|
1145
|
+
foreignKeys: DbForeignKey[];
|
|
1146
|
+
}
|
|
1147
|
+
/** Open a connection; the url's scheme picks the engine. The handle outlives the calling component. */
|
|
1148
|
+
export declare const dbConnect: (url: string) => Promise<number>;
|
|
1149
|
+
export declare const dbDisconnect: (handle: number) => Promise<void>;
|
|
1150
|
+
/**
|
|
1151
|
+
* Run a statement and return up to 1000 rows, after skipping the first `skip` (how a grid pages).
|
|
1152
|
+
* `readOnly` refuses writes, by the database itself (a read-only session on Postgres and MySQL,
|
|
1153
|
+
* query_only on SQLite).
|
|
1154
|
+
*/
|
|
1155
|
+
export declare const dbQuery: (handle: number, sql: string, readOnly: boolean, skip?: number) => Promise<DbQueryResult>;
|
|
1156
|
+
export declare const dbSchema: (handle: number) => Promise<DbSchema>;
|
|
1157
|
+
/** Open a tunnel. `remote` is host:port as seen FROM `host`. Returns [id, local port]. */
|
|
1158
|
+
export declare const sshTunnelOpen: (host: string, remote: string) => Promise<[number, number]>;
|
|
1159
|
+
export declare const sshTunnelClose: (id: number) => Promise<void>;
|
|
1160
|
+
/**
|
|
1161
|
+
* Offer programs to the editor's debugger: a plugin that runs something debuggable (the Flutter
|
|
1162
|
+
* plugin's runs) publishes them here, and the Run and Debug panel lists them to attach to. Pass
|
|
1163
|
+
* the plugin's whole current list each time, under its own `source`; an empty list removes it.
|
|
1164
|
+
* See core/debugtargets.ts.
|
|
1165
|
+
*/
|
|
1166
|
+
export declare const setDebugTargets: (source: string, targets: DebugTarget[]) => void;
|
|
1167
|
+
export type { DebugTarget } from "./debugtargets";
|