@medeo-plugin/sdk 0.0.0-stage → 0.7.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/README.md +27 -2
- package/dist/generated.d.ts +497 -0
- package/dist/generated.js +1 -0
- package/dist/index.d.ts +875 -0
- package/dist/index.js +309 -0
- package/dist/registry.d.ts +1132 -0
- package/dist/registry.js +172 -0
- package/package.json +38 -4
- package/src/generated.ts +158 -0
- package/src/index.ts +393 -0
- package/src/registry.ts +173 -0
package/README.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Plugin SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Browser-only TypeScript helpers. The platform owns identity; a plugin cannot supply an instance ID, private Host command or publisher claim. Paths in directory-consent requests are proposals, not authorization. Direct Node/system imports are unavailable; declared operations are brokered by the Host.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { definePlugin, storage } from '@medeo-plugin/sdk';
|
|
7
|
+
export const { activate, deactivate } = definePlugin({
|
|
8
|
+
activate(context) {
|
|
9
|
+
context.commands.register('counter.increment', async () => {
|
|
10
|
+
const counter = ((await storage.get<number>('counter')) ?? 0) + 1;
|
|
11
|
+
await storage.set('counter', counter);
|
|
12
|
+
return { counter };
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Declare `example.run` and `storage` in the manifest. UI code uses `commands.run('example.run')`. Worker module evaluation must only export its command table; capability access starts inside a command after activation. Commands must finish within 30 seconds. Reads/writes are limited to the plugin's own device-local configuration namespace. The UI window may close without stopping its worker.
|
|
19
|
+
|
|
20
|
+
Protocol DTOs in `src/generated.ts` are generated from `platform-contract`; never edit them directly. See the guide in [docs/index.html](../../docs/index.html).
|
|
21
|
+
|
|
22
|
+
`capabilities.list()` reports available methods separately from granted permissions. `permissions.request(name, reason)` displays trusted confirmation for a declared permission; it cannot expand the manifest's path/origin scopes. Revocation invalidates pending native results and disposes owned windows, shortcuts, menu-bar items and sleep blockers.
|
|
23
|
+
|
|
24
|
+
Initial native helpers are `clipboard`, `system`, `notifications`, `shortcuts`, `appWindows`, `tray`, `external` and `power`. External URLs must match the manifest's `external_open` scopes. The full permission list is in [spec/api-v1.json](../../spec/api-v1.json).
|
|
25
|
+
|
|
26
|
+
## Host-configured Agent API
|
|
27
|
+
|
|
28
|
+
With the `agent_api` grant, `agent.start(messages, model?)` and `agent.models()` return asynchronous job IDs. Use `agent.state(id)`, `agent.jobs()` and `agent.cancel(id)` for progress/lifecycle. Configure the service in the trusted desktop Agent API settings tab; keys and endpoint overrides never enter this SDK. See [provider contract](../../docs/capabilities/agent-api.md) for limits, cancellation and restart semantics.
|
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
export type JsonValue = number | string | boolean | Array<JsonValue> | {
|
|
2
|
+
[key in string]?: JsonValue;
|
|
3
|
+
} | null;
|
|
4
|
+
export type Permission = "storage" | "creation_open" | {
|
|
5
|
+
"file_access": Array<string>;
|
|
6
|
+
} | {
|
|
7
|
+
"file_full_access": Array<string>;
|
|
8
|
+
} | {
|
|
9
|
+
"network": Array<string>;
|
|
10
|
+
} | "agent_api" | "clipboard_read" | "clipboard_write" | "screen_capture" | "camera" | "microphone" | "system_audio" | "applications" | "global_shortcuts" | "notifications" | "tray" | "app_windows" | "accessibility" | "input_method" | {
|
|
11
|
+
"external_open": Array<string>;
|
|
12
|
+
} | {
|
|
13
|
+
"browser_view": Array<string>;
|
|
14
|
+
} | "system_info" | "secrets" | "background_tasks" | "power" | {
|
|
15
|
+
"process_spawn": Array<string>;
|
|
16
|
+
} | "local_server" | "printing" | "contacts" | "calendar" | "location" | "device_access" | {
|
|
17
|
+
"approvals": Array<string>;
|
|
18
|
+
} | "node";
|
|
19
|
+
export type PluginCommand = {
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
};
|
|
23
|
+
export type PluginLocalization = {
|
|
24
|
+
default_locale: string;
|
|
25
|
+
catalogs: {
|
|
26
|
+
[key in string]?: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type Runtime = "sandbox" | "node";
|
|
30
|
+
export type GrantScope = "once" | "run" | "always";
|
|
31
|
+
export type ApprovalRule = {
|
|
32
|
+
action: string;
|
|
33
|
+
/**
|
|
34
|
+
* The rule key, or a prefix ending in `*`.
|
|
35
|
+
*/
|
|
36
|
+
pattern: string;
|
|
37
|
+
allow: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* `run` rules belong to the running instance; `always` rules are stored.
|
|
40
|
+
*/
|
|
41
|
+
scope: GrantScope;
|
|
42
|
+
};
|
|
43
|
+
export type ApprovalRecord = {
|
|
44
|
+
action: string;
|
|
45
|
+
rule_key: string;
|
|
46
|
+
/**
|
|
47
|
+
* `allow` or `deny`.
|
|
48
|
+
*/
|
|
49
|
+
decision: string;
|
|
50
|
+
/**
|
|
51
|
+
* `once`, `run`, `always`, or `rule` when a remembered rule decided.
|
|
52
|
+
*/
|
|
53
|
+
scope: string;
|
|
54
|
+
time_ms: number;
|
|
55
|
+
};
|
|
56
|
+
export type TargetPlatform = "macos" | "windows";
|
|
57
|
+
export type Engines = {
|
|
58
|
+
medeo?: string;
|
|
59
|
+
};
|
|
60
|
+
export type InstallSourceKind = "file" | "folder" | "github" | "npm" | "dev";
|
|
61
|
+
export type InstallSource = {
|
|
62
|
+
kind: InstallSourceKind;
|
|
63
|
+
/**
|
|
64
|
+
* A file path, folder path, `owner/repo[#tag-prefix]` or npm package name.
|
|
65
|
+
*/
|
|
66
|
+
locator: string;
|
|
67
|
+
/**
|
|
68
|
+
* The release tag or npm version the package was taken from.
|
|
69
|
+
*/
|
|
70
|
+
version?: string;
|
|
71
|
+
};
|
|
72
|
+
export type ConfigType = "string" | "number" | "boolean";
|
|
73
|
+
export type ConfigProperty = {
|
|
74
|
+
type: ConfigType;
|
|
75
|
+
default: JsonValue;
|
|
76
|
+
title: string;
|
|
77
|
+
description?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Allowed values; the plugin center shows a choice.
|
|
80
|
+
*/
|
|
81
|
+
enum?: Array<JsonValue>;
|
|
82
|
+
};
|
|
83
|
+
export type Configuration = {
|
|
84
|
+
properties: {
|
|
85
|
+
[key in string]?: ConfigProperty;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
export type Keybinding = {
|
|
89
|
+
command: string;
|
|
90
|
+
key: string;
|
|
91
|
+
};
|
|
92
|
+
export type Menus = {
|
|
93
|
+
/**
|
|
94
|
+
* Command ids shown in the main window's Plugins menu.
|
|
95
|
+
*/
|
|
96
|
+
app?: Array<string>;
|
|
97
|
+
};
|
|
98
|
+
export type Contributes = {
|
|
99
|
+
configuration?: Configuration;
|
|
100
|
+
keybindings?: Array<Keybinding>;
|
|
101
|
+
menus?: Menus;
|
|
102
|
+
};
|
|
103
|
+
export type Manifest = {
|
|
104
|
+
localization?: PluginLocalization;
|
|
105
|
+
id: string;
|
|
106
|
+
name: string;
|
|
107
|
+
/**
|
|
108
|
+
* One sentence the plugin center shows under the name; translated as
|
|
109
|
+
* `plugin.description` in the plugin's catalogs.
|
|
110
|
+
*/
|
|
111
|
+
description?: string;
|
|
112
|
+
/**
|
|
113
|
+
* The plugin's icon, at the package root: `icon.svg` or `icon.png`.
|
|
114
|
+
*/
|
|
115
|
+
icon?: string;
|
|
116
|
+
version: string;
|
|
117
|
+
api_version: number;
|
|
118
|
+
worker: string;
|
|
119
|
+
ui: string | null;
|
|
120
|
+
permissions: Array<Permission>;
|
|
121
|
+
commands: Array<PluginCommand>;
|
|
122
|
+
runtime?: Runtime;
|
|
123
|
+
/**
|
|
124
|
+
* When Medeo starts the plugin: `onStartup`, `onCommand:<id>`,
|
|
125
|
+
* `onSchedule`, `onShortcut`. Without any, it starts when used.
|
|
126
|
+
*/
|
|
127
|
+
activation_events?: Array<string>;
|
|
128
|
+
contributes?: Contributes;
|
|
129
|
+
/**
|
|
130
|
+
* Operating systems the plugin runs on; empty means all.
|
|
131
|
+
*/
|
|
132
|
+
platforms?: Array<TargetPlatform>;
|
|
133
|
+
/**
|
|
134
|
+
* The Medeo versions the plugin needs; absent means any that loads format 2.
|
|
135
|
+
*/
|
|
136
|
+
engines?: Engines;
|
|
137
|
+
};
|
|
138
|
+
export type PackageFile = {
|
|
139
|
+
size: number;
|
|
140
|
+
sha256: string;
|
|
141
|
+
};
|
|
142
|
+
export type PackageIndex = {
|
|
143
|
+
manifest: Manifest;
|
|
144
|
+
files: {
|
|
145
|
+
[key in string]?: PackageFile;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
export type Asset = {
|
|
149
|
+
mime: string;
|
|
150
|
+
path: string;
|
|
151
|
+
size: number;
|
|
152
|
+
sha256: string;
|
|
153
|
+
};
|
|
154
|
+
export type PackageSignature = {
|
|
155
|
+
format: number;
|
|
156
|
+
public_key: string;
|
|
157
|
+
signature: string;
|
|
158
|
+
index: string;
|
|
159
|
+
};
|
|
160
|
+
export type PackageInfo = {
|
|
161
|
+
manifest: Manifest;
|
|
162
|
+
digest: string;
|
|
163
|
+
publisher: string;
|
|
164
|
+
/**
|
|
165
|
+
* Bytes of all signed files, i.e. the installed size. Records written
|
|
166
|
+
* before this field existed are backfilled at start.
|
|
167
|
+
*/
|
|
168
|
+
size: number;
|
|
169
|
+
/**
|
|
170
|
+
* What this build accepted but does not understand (`unknown_contribution:<key>`);
|
|
171
|
+
* shown at install and in the developer log, never a reason to refuse.
|
|
172
|
+
*/
|
|
173
|
+
warnings?: Array<string>;
|
|
174
|
+
};
|
|
175
|
+
export type CapabilityDescriptor = {
|
|
176
|
+
permission: string;
|
|
177
|
+
group: string;
|
|
178
|
+
version: number;
|
|
179
|
+
scoped: boolean;
|
|
180
|
+
methods: Array<string>;
|
|
181
|
+
available_methods: Array<string>;
|
|
182
|
+
granted: boolean;
|
|
183
|
+
declared: boolean;
|
|
184
|
+
os_authorization: string;
|
|
185
|
+
};
|
|
186
|
+
export type DirectoryGrant = {
|
|
187
|
+
id: string;
|
|
188
|
+
name: string;
|
|
189
|
+
available: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Full access: view and move to the Trash without a Host confirmation.
|
|
192
|
+
*/
|
|
193
|
+
full: boolean;
|
|
194
|
+
};
|
|
195
|
+
export type NetworkOrigin = {
|
|
196
|
+
origin: string;
|
|
197
|
+
declared: boolean;
|
|
198
|
+
allowed: boolean;
|
|
199
|
+
};
|
|
200
|
+
export type InstalledPlugin = {
|
|
201
|
+
localization: JsonValue;
|
|
202
|
+
id: string;
|
|
203
|
+
active: string | null;
|
|
204
|
+
versions: Array<PackageInfo>;
|
|
205
|
+
grants: Array<Permission>;
|
|
206
|
+
directories: Array<DirectoryGrant>;
|
|
207
|
+
network_origins: Array<NetworkOrigin>;
|
|
208
|
+
/**
|
|
209
|
+
* For resident (`onStartup`) plugins: whether the user lets it run in
|
|
210
|
+
* the background. Other plugins run only while in use and ignore it.
|
|
211
|
+
*/
|
|
212
|
+
enabled: boolean;
|
|
213
|
+
resident: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* User-owned macOS Dock launcher preference; plugins cannot modify it.
|
|
216
|
+
*/
|
|
217
|
+
dock: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* User-owned: whether the plugin's menu-bar icon (`tray`) is shown; plugins cannot modify it.
|
|
220
|
+
*/
|
|
221
|
+
menu_bar: boolean;
|
|
222
|
+
instance: string | null;
|
|
223
|
+
/**
|
|
224
|
+
* Permission ids granted to the running instance only (`run` scope).
|
|
225
|
+
*/
|
|
226
|
+
session_grants: Array<string>;
|
|
227
|
+
/**
|
|
228
|
+
* Permission ids the user refused with "don't ask again".
|
|
229
|
+
*/
|
|
230
|
+
denied: Array<string>;
|
|
231
|
+
/**
|
|
232
|
+
* Remembered `approvals.request` answers.
|
|
233
|
+
*/
|
|
234
|
+
approval_rules: Array<ApprovalRule>;
|
|
235
|
+
/**
|
|
236
|
+
* The active version's icon as a `data:` URL, when the package has one.
|
|
237
|
+
*/
|
|
238
|
+
icon?: string;
|
|
239
|
+
/**
|
|
240
|
+
* Where the plugin was installed from, when Main recorded it.
|
|
241
|
+
*/
|
|
242
|
+
source?: InstallSource;
|
|
243
|
+
};
|
|
244
|
+
export type Instance = {
|
|
245
|
+
id: string;
|
|
246
|
+
plugin_id: string;
|
|
247
|
+
digest: string;
|
|
248
|
+
manifest: Manifest;
|
|
249
|
+
};
|
|
250
|
+
export type Task = {
|
|
251
|
+
id: string;
|
|
252
|
+
plugin_id: string;
|
|
253
|
+
instance: string;
|
|
254
|
+
command: string;
|
|
255
|
+
status: string;
|
|
256
|
+
result: JsonValue | null;
|
|
257
|
+
/**
|
|
258
|
+
* Unix milliseconds; absent for rows written before times were recorded.
|
|
259
|
+
*/
|
|
260
|
+
created_ms: number | null;
|
|
261
|
+
finished_ms: number | null;
|
|
262
|
+
};
|
|
263
|
+
export type Snapshot = {
|
|
264
|
+
protocol: number;
|
|
265
|
+
plugins: Array<InstalledPlugin>;
|
|
266
|
+
tasks: Array<Task>;
|
|
267
|
+
};
|
|
268
|
+
export type HostEvent = {
|
|
269
|
+
"type": "operation";
|
|
270
|
+
instance: string;
|
|
271
|
+
id: string;
|
|
272
|
+
method: string;
|
|
273
|
+
status: string;
|
|
274
|
+
revision?: number;
|
|
275
|
+
} | {
|
|
276
|
+
"type": "signal";
|
|
277
|
+
instance: string;
|
|
278
|
+
channel: string;
|
|
279
|
+
} | {
|
|
280
|
+
"type": "wake";
|
|
281
|
+
plugin_id: string;
|
|
282
|
+
};
|
|
283
|
+
export type Command = {
|
|
284
|
+
"op": "ping";
|
|
285
|
+
} | {
|
|
286
|
+
"op": "shortcuts_list";
|
|
287
|
+
} | {
|
|
288
|
+
"op": "shortcut_validate";
|
|
289
|
+
target: string;
|
|
290
|
+
accelerator: string;
|
|
291
|
+
} | {
|
|
292
|
+
"op": "shortcut_save";
|
|
293
|
+
target: string;
|
|
294
|
+
accelerator: string;
|
|
295
|
+
} | {
|
|
296
|
+
"op": "shortcut_remove";
|
|
297
|
+
target: string;
|
|
298
|
+
} | {
|
|
299
|
+
"op": "system_locale";
|
|
300
|
+
locale: string;
|
|
301
|
+
} | {
|
|
302
|
+
"op": "plugin_locale";
|
|
303
|
+
plugin_id: string;
|
|
304
|
+
locale: string;
|
|
305
|
+
} | {
|
|
306
|
+
"op": "approve";
|
|
307
|
+
instance: string;
|
|
308
|
+
ticket: string;
|
|
309
|
+
approved: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* Without it an approval is stored (`always`) and a refusal asks again next time.
|
|
312
|
+
*/
|
|
313
|
+
scope?: GrantScope;
|
|
314
|
+
} | {
|
|
315
|
+
"op": "capture_stop";
|
|
316
|
+
id: string;
|
|
317
|
+
} | {
|
|
318
|
+
"op": "capture_asset";
|
|
319
|
+
instance: string;
|
|
320
|
+
id: string;
|
|
321
|
+
} | {
|
|
322
|
+
"op": "media_asset";
|
|
323
|
+
instance: string;
|
|
324
|
+
id: string;
|
|
325
|
+
} | {
|
|
326
|
+
"op": "agent_settings";
|
|
327
|
+
} | {
|
|
328
|
+
"op": "agent_configure";
|
|
329
|
+
endpoint: string;
|
|
330
|
+
model: string;
|
|
331
|
+
encrypted_key: string | null;
|
|
332
|
+
key: string;
|
|
333
|
+
persist: boolean;
|
|
334
|
+
} | {
|
|
335
|
+
"op": "agent_remove";
|
|
336
|
+
} | {
|
|
337
|
+
"op": "agent_test";
|
|
338
|
+
action: string;
|
|
339
|
+
id: string | null;
|
|
340
|
+
} | {
|
|
341
|
+
"op": "snapshot";
|
|
342
|
+
} | {
|
|
343
|
+
"op": "capability_catalog";
|
|
344
|
+
} | {
|
|
345
|
+
"op": "grant_permission";
|
|
346
|
+
plugin_id: string;
|
|
347
|
+
digest: string;
|
|
348
|
+
permission: string;
|
|
349
|
+
} | {
|
|
350
|
+
"op": "forget_approval_rule";
|
|
351
|
+
plugin_id: string;
|
|
352
|
+
action: string;
|
|
353
|
+
pattern: string;
|
|
354
|
+
} | {
|
|
355
|
+
"op": "approval_log";
|
|
356
|
+
plugin_id: string;
|
|
357
|
+
} | {
|
|
358
|
+
"op": "revoke_permission";
|
|
359
|
+
plugin_id: string;
|
|
360
|
+
permission: string;
|
|
361
|
+
} | {
|
|
362
|
+
"op": "network_origin_revoke";
|
|
363
|
+
plugin_id: string;
|
|
364
|
+
origin: string;
|
|
365
|
+
} | {
|
|
366
|
+
"op": "configure_capabilities";
|
|
367
|
+
methods: Array<string>;
|
|
368
|
+
} | {
|
|
369
|
+
"op": "capability_result";
|
|
370
|
+
instance: string;
|
|
371
|
+
ticket: string;
|
|
372
|
+
result: JsonValue | null;
|
|
373
|
+
error: string | null;
|
|
374
|
+
} | {
|
|
375
|
+
"op": "quiesce";
|
|
376
|
+
plugin_id: string;
|
|
377
|
+
} | {
|
|
378
|
+
"op": "resource_grant";
|
|
379
|
+
instance: string;
|
|
380
|
+
directories: Array<string>;
|
|
381
|
+
full: boolean;
|
|
382
|
+
} | {
|
|
383
|
+
"op": "resource_revoke";
|
|
384
|
+
plugin_id: string;
|
|
385
|
+
grant_id: string;
|
|
386
|
+
} | {
|
|
387
|
+
"op": "inspect";
|
|
388
|
+
package_file: string;
|
|
389
|
+
} | {
|
|
390
|
+
"op": "install";
|
|
391
|
+
package_file: string;
|
|
392
|
+
digest: string;
|
|
393
|
+
grants: Array<Permission>;
|
|
394
|
+
/**
|
|
395
|
+
* Recorded with the plugin (plugin center "Source"); absent for older callers.
|
|
396
|
+
*/
|
|
397
|
+
source?: InstallSource;
|
|
398
|
+
} | {
|
|
399
|
+
"op": "pack_dir";
|
|
400
|
+
directory: string;
|
|
401
|
+
key_file: string;
|
|
402
|
+
output: string;
|
|
403
|
+
/**
|
|
404
|
+
* Stamp a content-derived `-dev.h<hash>` version like the toolchain's `dev` does.
|
|
405
|
+
*/
|
|
406
|
+
development: boolean;
|
|
407
|
+
} | {
|
|
408
|
+
"op": "prepare";
|
|
409
|
+
plugin_id: string;
|
|
410
|
+
digest: string;
|
|
411
|
+
} | {
|
|
412
|
+
"op": "commit";
|
|
413
|
+
instance: string;
|
|
414
|
+
} | {
|
|
415
|
+
"op": "abort";
|
|
416
|
+
instance: string;
|
|
417
|
+
} | {
|
|
418
|
+
"op": "stop";
|
|
419
|
+
plugin_id: string;
|
|
420
|
+
} | {
|
|
421
|
+
"op": "busy";
|
|
422
|
+
plugin_id: string;
|
|
423
|
+
} | {
|
|
424
|
+
"op": "deactivate";
|
|
425
|
+
plugin_id: string;
|
|
426
|
+
} | {
|
|
427
|
+
"op": "dock_set";
|
|
428
|
+
plugin_id: string;
|
|
429
|
+
enabled: boolean;
|
|
430
|
+
} | {
|
|
431
|
+
"op": "menu_bar_set";
|
|
432
|
+
plugin_id: string;
|
|
433
|
+
enabled: boolean;
|
|
434
|
+
} | {
|
|
435
|
+
"op": "keep_running";
|
|
436
|
+
plugin_id: string;
|
|
437
|
+
enabled: boolean;
|
|
438
|
+
} | {
|
|
439
|
+
"op": "uninstall";
|
|
440
|
+
plugin_id: string;
|
|
441
|
+
} | {
|
|
442
|
+
"op": "config_state";
|
|
443
|
+
plugin_id: string;
|
|
444
|
+
} | {
|
|
445
|
+
"op": "config_set";
|
|
446
|
+
plugin_id: string;
|
|
447
|
+
key: string;
|
|
448
|
+
value: JsonValue;
|
|
449
|
+
} | {
|
|
450
|
+
"op": "package_dir";
|
|
451
|
+
instance: string;
|
|
452
|
+
} | {
|
|
453
|
+
"op": "remove_version";
|
|
454
|
+
plugin_id: string;
|
|
455
|
+
digest: string;
|
|
456
|
+
} | {
|
|
457
|
+
"op": "grants";
|
|
458
|
+
plugin_id: string;
|
|
459
|
+
grants: Array<Permission>;
|
|
460
|
+
} | {
|
|
461
|
+
"op": "asset";
|
|
462
|
+
instance: string;
|
|
463
|
+
path: string;
|
|
464
|
+
} | {
|
|
465
|
+
"op": "invoke";
|
|
466
|
+
instance: string;
|
|
467
|
+
method: string;
|
|
468
|
+
args: JsonValue;
|
|
469
|
+
/**
|
|
470
|
+
* Main sets this when the caller is one of the plugin's windows rather
|
|
471
|
+
* than its background worker; `ui` methods require it.
|
|
472
|
+
*/
|
|
473
|
+
ui?: boolean;
|
|
474
|
+
} | {
|
|
475
|
+
"op": "task_start";
|
|
476
|
+
instance: string;
|
|
477
|
+
command: string;
|
|
478
|
+
} | {
|
|
479
|
+
"op": "task_finish";
|
|
480
|
+
instance: string;
|
|
481
|
+
task: string;
|
|
482
|
+
result: JsonValue | null;
|
|
483
|
+
failed: boolean;
|
|
484
|
+
} | {
|
|
485
|
+
"op": "labels";
|
|
486
|
+
locale: string;
|
|
487
|
+
};
|
|
488
|
+
export type Request = {
|
|
489
|
+
version: number;
|
|
490
|
+
id: number;
|
|
491
|
+
command: Command;
|
|
492
|
+
};
|
|
493
|
+
export type Response = {
|
|
494
|
+
id: number;
|
|
495
|
+
result: JsonValue | null;
|
|
496
|
+
error: string | null;
|
|
497
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|