@mcp-b/extension-tools 0.0.1
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/LICENSE +21 -0
- package/README.md +399 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/index.d.ts +1255 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/package.json +61 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1255 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
interface ApiToolOptions {
|
|
6
|
+
[toolName: string]: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface ApiAvailability {
|
|
9
|
+
available: boolean;
|
|
10
|
+
message: string;
|
|
11
|
+
details?: string;
|
|
12
|
+
}
|
|
13
|
+
declare abstract class BaseApiTools {
|
|
14
|
+
protected server: McpServer;
|
|
15
|
+
protected options: ApiToolOptions;
|
|
16
|
+
protected abstract apiName: string;
|
|
17
|
+
constructor(server: McpServer, options?: ApiToolOptions);
|
|
18
|
+
abstract checkAvailability(): ApiAvailability;
|
|
19
|
+
abstract registerTools(): void;
|
|
20
|
+
protected shouldRegisterTool(toolName: string): boolean;
|
|
21
|
+
protected formatError(error: unknown): CallToolResult;
|
|
22
|
+
protected formatSuccess(message: string, data?: any): CallToolResult;
|
|
23
|
+
protected formatJson(data: any): CallToolResult;
|
|
24
|
+
register(): void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare class TabsApiTools extends BaseApiTools {
|
|
28
|
+
protected apiName: string;
|
|
29
|
+
constructor(server: McpServer, options?: {
|
|
30
|
+
listActiveTabs?: boolean;
|
|
31
|
+
createTab?: boolean;
|
|
32
|
+
updateTab?: boolean;
|
|
33
|
+
closeTabs?: boolean;
|
|
34
|
+
getAllTabs?: boolean;
|
|
35
|
+
navigateHistory?: boolean;
|
|
36
|
+
reloadTab?: boolean;
|
|
37
|
+
captureVisibleTab?: boolean;
|
|
38
|
+
detectLanguage?: boolean;
|
|
39
|
+
discardTab?: boolean;
|
|
40
|
+
duplicateTab?: boolean;
|
|
41
|
+
getTab?: boolean;
|
|
42
|
+
getZoom?: boolean;
|
|
43
|
+
setZoom?: boolean;
|
|
44
|
+
groupTabs?: boolean;
|
|
45
|
+
ungroupTabs?: boolean;
|
|
46
|
+
highlightTabs?: boolean;
|
|
47
|
+
moveTabs?: boolean;
|
|
48
|
+
sendMessage?: boolean;
|
|
49
|
+
});
|
|
50
|
+
checkAvailability(): ApiAvailability;
|
|
51
|
+
registerTools(): void;
|
|
52
|
+
private checkAndRegisterNavigationTools;
|
|
53
|
+
private checkAndRegisterScreenshotTool;
|
|
54
|
+
private registerListActiveTabs;
|
|
55
|
+
private registerCreateTab;
|
|
56
|
+
private registerUpdateTab;
|
|
57
|
+
private registerCloseTabs;
|
|
58
|
+
private registerGetAllTabs;
|
|
59
|
+
private registerNavigateHistory;
|
|
60
|
+
private registerReloadTab;
|
|
61
|
+
private registerCaptureVisibleTab;
|
|
62
|
+
private registerDetectLanguage;
|
|
63
|
+
private registerDiscardTab;
|
|
64
|
+
private registerDuplicateTab;
|
|
65
|
+
private registerGetTab;
|
|
66
|
+
private registerGetZoom;
|
|
67
|
+
private registerSetZoom;
|
|
68
|
+
private registerGetZoomSettings;
|
|
69
|
+
private registerSetZoomSettings;
|
|
70
|
+
private registerGroupTabs;
|
|
71
|
+
private registerUngroupTabs;
|
|
72
|
+
private registerHighlightTabs;
|
|
73
|
+
private registerMoveTabs;
|
|
74
|
+
private registerSendMessage;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
declare class WindowsApiTools extends BaseApiTools {
|
|
78
|
+
protected apiName: string;
|
|
79
|
+
constructor(server: McpServer, options?: {
|
|
80
|
+
getAllWindows?: boolean;
|
|
81
|
+
createWindow?: boolean;
|
|
82
|
+
updateWindow?: boolean;
|
|
83
|
+
removeWindow?: boolean;
|
|
84
|
+
});
|
|
85
|
+
checkAvailability(): ApiAvailability;
|
|
86
|
+
registerTools(): void;
|
|
87
|
+
private registerGetAllWindows;
|
|
88
|
+
private registerCreateWindow;
|
|
89
|
+
private registerUpdateWindow;
|
|
90
|
+
private registerRemoveWindow;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
declare class BookmarksApiTools extends BaseApiTools {
|
|
94
|
+
protected apiName: string;
|
|
95
|
+
constructor(server: McpServer, options?: {
|
|
96
|
+
getBookmarks?: boolean;
|
|
97
|
+
createBookmark?: boolean;
|
|
98
|
+
updateBookmark?: boolean;
|
|
99
|
+
removeBookmark?: boolean;
|
|
100
|
+
moveBookmark?: boolean;
|
|
101
|
+
});
|
|
102
|
+
checkAvailability(): ApiAvailability;
|
|
103
|
+
registerTools(): void;
|
|
104
|
+
private registerGetBookmarks;
|
|
105
|
+
private registerCreateBookmark;
|
|
106
|
+
private registerUpdateBookmark;
|
|
107
|
+
private registerRemoveBookmark;
|
|
108
|
+
private registerMoveBookmark;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
declare class StorageApiTools extends BaseApiTools {
|
|
112
|
+
protected apiName: string;
|
|
113
|
+
constructor(server: McpServer, options?: {
|
|
114
|
+
getStorage?: boolean;
|
|
115
|
+
setStorage?: boolean;
|
|
116
|
+
removeStorage?: boolean;
|
|
117
|
+
clearStorage?: boolean;
|
|
118
|
+
getBytesInUse?: boolean;
|
|
119
|
+
});
|
|
120
|
+
checkAvailability(): ApiAvailability;
|
|
121
|
+
registerTools(): void;
|
|
122
|
+
private getAvailableAreas;
|
|
123
|
+
private registerGetStorage;
|
|
124
|
+
private registerSetStorage;
|
|
125
|
+
private registerRemoveStorage;
|
|
126
|
+
private registerClearStorage;
|
|
127
|
+
private registerGetBytesInUse;
|
|
128
|
+
private formatBytes;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare class HistoryApiTools extends BaseApiTools {
|
|
132
|
+
protected apiName: string;
|
|
133
|
+
constructor(server: McpServer, options?: {
|
|
134
|
+
searchHistory?: boolean;
|
|
135
|
+
addToHistory?: boolean;
|
|
136
|
+
deleteFromHistory?: boolean;
|
|
137
|
+
deleteHistoryRange?: boolean;
|
|
138
|
+
getVisits?: boolean;
|
|
139
|
+
});
|
|
140
|
+
checkAvailability(): ApiAvailability;
|
|
141
|
+
registerTools(): void;
|
|
142
|
+
private registerSearchHistory;
|
|
143
|
+
private registerAddToHistory;
|
|
144
|
+
private registerDeleteFromHistory;
|
|
145
|
+
private registerDeleteHistoryRange;
|
|
146
|
+
private registerGetVisits;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
declare class NotificationsApiTools extends BaseApiTools {
|
|
150
|
+
protected apiName: string;
|
|
151
|
+
constructor(server: McpServer, options?: {
|
|
152
|
+
createNotification?: boolean;
|
|
153
|
+
updateNotification?: boolean;
|
|
154
|
+
clearNotification?: boolean;
|
|
155
|
+
getAll?: boolean;
|
|
156
|
+
});
|
|
157
|
+
checkAvailability(): ApiAvailability;
|
|
158
|
+
registerTools(): void;
|
|
159
|
+
private registerCreateNotification;
|
|
160
|
+
private registerUpdateNotification;
|
|
161
|
+
private registerClearNotification;
|
|
162
|
+
private registerGetAll;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
declare class ScriptingApiTools extends BaseApiTools {
|
|
166
|
+
protected apiName: string;
|
|
167
|
+
constructor(server: McpServer, options?: {
|
|
168
|
+
executeScript?: boolean;
|
|
169
|
+
executeUserScript?: boolean;
|
|
170
|
+
insertCSS?: boolean;
|
|
171
|
+
removeCSS?: boolean;
|
|
172
|
+
});
|
|
173
|
+
checkAvailability(): ApiAvailability;
|
|
174
|
+
registerTools(): void;
|
|
175
|
+
private checkAndRegisterUserScripts;
|
|
176
|
+
private getChromeVersion;
|
|
177
|
+
private registerExecuteScript;
|
|
178
|
+
private registerUserScriptExecute;
|
|
179
|
+
private registerUserScriptLegacy;
|
|
180
|
+
private registerInsertCSS;
|
|
181
|
+
private registerRemoveCSS;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
declare class CookiesApiTools extends BaseApiTools {
|
|
185
|
+
protected apiName: string;
|
|
186
|
+
constructor(server: McpServer, options?: {
|
|
187
|
+
getCookies?: boolean;
|
|
188
|
+
setCookie?: boolean;
|
|
189
|
+
removeCookie?: boolean;
|
|
190
|
+
getAllCookieStores?: boolean;
|
|
191
|
+
});
|
|
192
|
+
checkAvailability(): ApiAvailability;
|
|
193
|
+
registerTools(): void;
|
|
194
|
+
private registerGetCookies;
|
|
195
|
+
private registerSetCookie;
|
|
196
|
+
private registerRemoveCookie;
|
|
197
|
+
private registerGetAllCookieStores;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
declare class AlarmsApiTools extends BaseApiTools {
|
|
201
|
+
protected apiName: string;
|
|
202
|
+
constructor(server: McpServer, options?: {
|
|
203
|
+
createAlarm?: boolean;
|
|
204
|
+
getAlarm?: boolean;
|
|
205
|
+
getAllAlarms?: boolean;
|
|
206
|
+
clearAlarm?: boolean;
|
|
207
|
+
clearAllAlarms?: boolean;
|
|
208
|
+
});
|
|
209
|
+
checkAvailability(): ApiAvailability;
|
|
210
|
+
registerTools(): void;
|
|
211
|
+
private registerCreateAlarm;
|
|
212
|
+
private registerGetAlarm;
|
|
213
|
+
private registerGetAllAlarms;
|
|
214
|
+
private registerClearAlarm;
|
|
215
|
+
private registerClearAllAlarms;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
declare class DownloadsApiTools extends BaseApiTools {
|
|
219
|
+
protected apiName: string;
|
|
220
|
+
constructor(server: McpServer, options?: {
|
|
221
|
+
download?: boolean;
|
|
222
|
+
search?: boolean;
|
|
223
|
+
pause?: boolean;
|
|
224
|
+
resume?: boolean;
|
|
225
|
+
cancel?: boolean;
|
|
226
|
+
getFileIcon?: boolean;
|
|
227
|
+
open?: boolean;
|
|
228
|
+
show?: boolean;
|
|
229
|
+
erase?: boolean;
|
|
230
|
+
removeFile?: boolean;
|
|
231
|
+
acceptDanger?: boolean;
|
|
232
|
+
});
|
|
233
|
+
checkAvailability(): ApiAvailability;
|
|
234
|
+
registerTools(): void;
|
|
235
|
+
private checkAndRegisterOpen;
|
|
236
|
+
private registerDownload;
|
|
237
|
+
private registerSearch;
|
|
238
|
+
private registerPause;
|
|
239
|
+
private registerResume;
|
|
240
|
+
private registerCancel;
|
|
241
|
+
private registerGetFileIcon;
|
|
242
|
+
private registerOpen;
|
|
243
|
+
private registerShow;
|
|
244
|
+
private registerErase;
|
|
245
|
+
private registerRemoveFile;
|
|
246
|
+
private registerAcceptDanger;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
declare class RuntimeApiTools extends BaseApiTools {
|
|
250
|
+
protected apiName: string;
|
|
251
|
+
constructor(server: McpServer, options?: {
|
|
252
|
+
getExtensionInfo?: boolean;
|
|
253
|
+
sendMessage?: boolean;
|
|
254
|
+
connect?: boolean;
|
|
255
|
+
openOptionsPage?: boolean;
|
|
256
|
+
reload?: boolean;
|
|
257
|
+
setUninstallURL?: boolean;
|
|
258
|
+
getContexts?: boolean;
|
|
259
|
+
getPlatformInfo?: boolean;
|
|
260
|
+
});
|
|
261
|
+
checkAvailability(): ApiAvailability;
|
|
262
|
+
registerTools(): void;
|
|
263
|
+
private checkAndRegisterGetContexts;
|
|
264
|
+
private registerGetExtensionInfo;
|
|
265
|
+
private registerSendMessage;
|
|
266
|
+
private registerConnect;
|
|
267
|
+
private registerOpenOptionsPage;
|
|
268
|
+
private registerReload;
|
|
269
|
+
private registerSetUninstallURL;
|
|
270
|
+
private registerGetContexts;
|
|
271
|
+
private registerGetPlatformInfo;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
declare class CommandsApiTools extends BaseApiTools {
|
|
275
|
+
protected apiName: string;
|
|
276
|
+
constructor(server: McpServer, options?: {
|
|
277
|
+
getAllCommands?: boolean;
|
|
278
|
+
getCommand?: boolean;
|
|
279
|
+
updateCommandShortcut?: boolean;
|
|
280
|
+
resetCommandShortcut?: boolean;
|
|
281
|
+
onCommandListener?: boolean;
|
|
282
|
+
});
|
|
283
|
+
checkAvailability(): ApiAvailability;
|
|
284
|
+
registerTools(): void;
|
|
285
|
+
private registerGetAllCommands;
|
|
286
|
+
private registerGetCommand;
|
|
287
|
+
private registerUpdateCommandShortcut;
|
|
288
|
+
private registerResetCommandShortcut;
|
|
289
|
+
private registerOnCommandListener;
|
|
290
|
+
private isValidShortcut;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
declare class TtsApiTools extends BaseApiTools {
|
|
294
|
+
protected apiName: string;
|
|
295
|
+
constructor(server: McpServer, options?: {
|
|
296
|
+
speak?: boolean;
|
|
297
|
+
stop?: boolean;
|
|
298
|
+
pause?: boolean;
|
|
299
|
+
resume?: boolean;
|
|
300
|
+
isSpeaking?: boolean;
|
|
301
|
+
getVoices?: boolean;
|
|
302
|
+
});
|
|
303
|
+
checkAvailability(): ApiAvailability;
|
|
304
|
+
registerTools(): void;
|
|
305
|
+
private registerSpeak;
|
|
306
|
+
private registerStop;
|
|
307
|
+
private registerPause;
|
|
308
|
+
private registerResume;
|
|
309
|
+
private registerIsSpeaking;
|
|
310
|
+
private registerGetVoices;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
declare class TabGroupsApiTools extends BaseApiTools {
|
|
314
|
+
protected apiName: string;
|
|
315
|
+
constructor(server: McpServer, options?: {
|
|
316
|
+
get?: boolean;
|
|
317
|
+
query?: boolean;
|
|
318
|
+
update?: boolean;
|
|
319
|
+
move?: boolean;
|
|
320
|
+
});
|
|
321
|
+
checkAvailability(): ApiAvailability;
|
|
322
|
+
registerTools(): void;
|
|
323
|
+
private registerGet;
|
|
324
|
+
private registerQuery;
|
|
325
|
+
private registerUpdate;
|
|
326
|
+
private registerMove;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Enum of all Chrome Extension APIs
|
|
331
|
+
*/
|
|
332
|
+
declare enum ChromeApi {
|
|
333
|
+
ACCESSIBILITY_FEATURES = "accessibilityFeatures",
|
|
334
|
+
ACTION = "action",
|
|
335
|
+
ALARMS = "alarms",
|
|
336
|
+
AUDIO = "audio",
|
|
337
|
+
BOOKMARKS = "bookmarks",
|
|
338
|
+
BROWSING_DATA = "browsingData",
|
|
339
|
+
CERTIFICATE_PROVIDER = "certificateProvider",
|
|
340
|
+
COMMANDS = "commands",
|
|
341
|
+
CONTENT_SETTINGS = "contentSettings",
|
|
342
|
+
CONTEXT_MENUS = "contextMenus",
|
|
343
|
+
COOKIES = "cookies",
|
|
344
|
+
DEBUGGER = "debugger",
|
|
345
|
+
DECLARATIVE_CONTENT = "declarativeContent",
|
|
346
|
+
DECLARATIVE_NET_REQUEST = "declarativeNetRequest",
|
|
347
|
+
DESKTOP_CAPTURE = "desktopCapture",
|
|
348
|
+
DEVTOOLS_INSPECTED_WINDOW = "devtools.inspectedWindow",
|
|
349
|
+
DEVTOOLS_NETWORK = "devtools.network",
|
|
350
|
+
DEVTOOLS_PANELS = "devtools.panels",
|
|
351
|
+
DEVTOOLS_PERFORMANCE = "devtools.performance",
|
|
352
|
+
DEVTOOLS_RECORDER = "devtools.recorder",
|
|
353
|
+
DNS = "dns",
|
|
354
|
+
DOCUMENT_SCAN = "documentScan",
|
|
355
|
+
DOM = "dom",
|
|
356
|
+
DOWNLOADS = "downloads",
|
|
357
|
+
ENTERPRISE_DEVICE_ATTRIBUTES = "enterprise.deviceAttributes",
|
|
358
|
+
ENTERPRISE_HARDWARE_PLATFORM = "enterprise.hardwarePlatform",
|
|
359
|
+
ENTERPRISE_NETWORKING_ATTRIBUTES = "enterprise.networkingAttributes",
|
|
360
|
+
ENTERPRISE_PLATFORM_KEYS = "enterprise.platformKeys",
|
|
361
|
+
EVENTS = "events",
|
|
362
|
+
EXTENSION = "extension",
|
|
363
|
+
EXTENSION_TYPES = "extensionTypes",
|
|
364
|
+
FILE_BROWSER_HANDLER = "fileBrowserHandler",
|
|
365
|
+
FILE_SYSTEM_PROVIDER = "fileSystemProvider",
|
|
366
|
+
FONT_SETTINGS = "fontSettings",
|
|
367
|
+
GCM = "gcm",
|
|
368
|
+
HISTORY = "history",
|
|
369
|
+
I18N = "i18n",
|
|
370
|
+
IDENTITY = "identity",
|
|
371
|
+
IDLE = "idle",
|
|
372
|
+
INPUT_IME = "input.ime",
|
|
373
|
+
INSTANCE_ID = "instanceID",
|
|
374
|
+
LOGIN_STATE = "loginState",
|
|
375
|
+
MANAGEMENT = "management",
|
|
376
|
+
NOTIFICATIONS = "notifications",
|
|
377
|
+
OFFSCREEN = "offscreen",
|
|
378
|
+
OMNIBOX = "omnibox",
|
|
379
|
+
PAGE_CAPTURE = "pageCapture",
|
|
380
|
+
PERMISSIONS = "permissions",
|
|
381
|
+
PLATFORM_KEYS = "platformKeys",
|
|
382
|
+
POWER = "power",
|
|
383
|
+
PRINTER_PROVIDER = "printerProvider",
|
|
384
|
+
PRINTING = "printing",
|
|
385
|
+
PRINTING_METRICS = "printingMetrics",
|
|
386
|
+
PRIVACY = "privacy",
|
|
387
|
+
PROCESSES = "processes",
|
|
388
|
+
PROXY = "proxy",
|
|
389
|
+
READING_LIST = "readingList",
|
|
390
|
+
RUNTIME = "runtime",
|
|
391
|
+
SCRIPTING = "scripting",
|
|
392
|
+
SEARCH = "search",
|
|
393
|
+
SESSIONS = "sessions",
|
|
394
|
+
SIDE_PANEL = "sidePanel",
|
|
395
|
+
STORAGE = "storage",
|
|
396
|
+
SYSTEM_CPU = "system.cpu",
|
|
397
|
+
SYSTEM_DISPLAY = "system.display",
|
|
398
|
+
SYSTEM_MEMORY = "system.memory",
|
|
399
|
+
SYSTEM_STORAGE = "system.storage",
|
|
400
|
+
SYSTEM_LOG = "systemLog",
|
|
401
|
+
TAB_CAPTURE = "tabCapture",
|
|
402
|
+
TAB_GROUPS = "tabGroups",
|
|
403
|
+
TABS = "tabs",
|
|
404
|
+
TOP_SITES = "topSites",
|
|
405
|
+
TTS = "tts",
|
|
406
|
+
TTS_ENGINE = "ttsEngine",
|
|
407
|
+
TYPES = "types",
|
|
408
|
+
USER_SCRIPTS = "userScripts",
|
|
409
|
+
VPN_PROVIDER = "vpnProvider",
|
|
410
|
+
WALLPAPER = "wallpaper",
|
|
411
|
+
WEB_AUTHENTICATION_PROXY = "webAuthenticationProxy",
|
|
412
|
+
WEB_NAVIGATION = "webNavigation",
|
|
413
|
+
WEB_REQUEST = "webRequest",
|
|
414
|
+
WINDOWS = "windows"
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Supported platforms for Chrome APIs
|
|
418
|
+
*/
|
|
419
|
+
declare const ChromePlatformSchema: z.ZodEnum<["all", "chromeos"]>;
|
|
420
|
+
type ChromePlatform = z.infer<typeof ChromePlatformSchema>;
|
|
421
|
+
/**
|
|
422
|
+
* Channel requirements for Chrome APIs
|
|
423
|
+
*/
|
|
424
|
+
declare const ChromeChannelSchema: z.ZodEnum<["stable", "dev"]>;
|
|
425
|
+
type ChromeChannel = z.infer<typeof ChromeChannelSchema>;
|
|
426
|
+
/**
|
|
427
|
+
* Context where the API can run
|
|
428
|
+
*/
|
|
429
|
+
declare const ChromeContextSchema: z.ZodEnum<["background", "content", "devtools", "all"]>;
|
|
430
|
+
type ChromeContext = z.infer<typeof ChromeContextSchema>;
|
|
431
|
+
/**
|
|
432
|
+
* Metadata for each Chrome API
|
|
433
|
+
*/
|
|
434
|
+
declare const ChromeApiMetadataSchema: z.ZodObject<{
|
|
435
|
+
/** Minimum Chrome version required */
|
|
436
|
+
minChromeVersion: z.ZodOptional<z.ZodNumber>;
|
|
437
|
+
/** Platform restrictions */
|
|
438
|
+
platform: z.ZodEnum<["all", "chromeos"]>;
|
|
439
|
+
/** Channel requirement */
|
|
440
|
+
channel: z.ZodEnum<["stable", "dev"]>;
|
|
441
|
+
/** Manifest version requirement (2, 3, or both) */
|
|
442
|
+
manifestVersions: z.ZodArray<z.ZodUnion<[z.ZodLiteral<2>, z.ZodLiteral<3>]>, "many">;
|
|
443
|
+
/** Whether this API requires enterprise policy */
|
|
444
|
+
requiresPolicy: z.ZodBoolean;
|
|
445
|
+
/** Whether this API is foreground only */
|
|
446
|
+
foregroundOnly: z.ZodBoolean;
|
|
447
|
+
/** Contexts where this API can run */
|
|
448
|
+
contexts: z.ZodArray<z.ZodEnum<["background", "content", "devtools", "all"]>, "many">;
|
|
449
|
+
/** API namespace in chrome object */
|
|
450
|
+
namespace: z.ZodString;
|
|
451
|
+
}, "strip", z.ZodTypeAny, {
|
|
452
|
+
platform: "all" | "chromeos";
|
|
453
|
+
channel: "stable" | "dev";
|
|
454
|
+
manifestVersions: (2 | 3)[];
|
|
455
|
+
requiresPolicy: boolean;
|
|
456
|
+
foregroundOnly: boolean;
|
|
457
|
+
contexts: ("content" | "devtools" | "background" | "all")[];
|
|
458
|
+
namespace: string;
|
|
459
|
+
minChromeVersion?: number | undefined;
|
|
460
|
+
}, {
|
|
461
|
+
platform: "all" | "chromeos";
|
|
462
|
+
channel: "stable" | "dev";
|
|
463
|
+
manifestVersions: (2 | 3)[];
|
|
464
|
+
requiresPolicy: boolean;
|
|
465
|
+
foregroundOnly: boolean;
|
|
466
|
+
contexts: ("content" | "devtools" | "background" | "all")[];
|
|
467
|
+
namespace: string;
|
|
468
|
+
minChromeVersion?: number | undefined;
|
|
469
|
+
}>;
|
|
470
|
+
type ChromeApiMetadata = z.infer<typeof ChromeApiMetadataSchema>;
|
|
471
|
+
/**
|
|
472
|
+
* Registry of all Chrome APIs with their metadata
|
|
473
|
+
*/
|
|
474
|
+
declare const CHROME_API_REGISTRY: {
|
|
475
|
+
readonly accessibilityFeatures: {
|
|
476
|
+
readonly platform: "all";
|
|
477
|
+
readonly channel: "stable";
|
|
478
|
+
readonly manifestVersions: [2, 3];
|
|
479
|
+
readonly requiresPolicy: false;
|
|
480
|
+
readonly foregroundOnly: false;
|
|
481
|
+
readonly contexts: ["background"];
|
|
482
|
+
readonly namespace: "accessibilityFeatures";
|
|
483
|
+
};
|
|
484
|
+
readonly action: {
|
|
485
|
+
readonly minChromeVersion: 88;
|
|
486
|
+
readonly platform: "all";
|
|
487
|
+
readonly channel: "stable";
|
|
488
|
+
readonly manifestVersions: [3];
|
|
489
|
+
readonly requiresPolicy: false;
|
|
490
|
+
readonly foregroundOnly: false;
|
|
491
|
+
readonly contexts: ["background"];
|
|
492
|
+
readonly namespace: "action";
|
|
493
|
+
};
|
|
494
|
+
readonly alarms: {
|
|
495
|
+
readonly platform: "all";
|
|
496
|
+
readonly channel: "stable";
|
|
497
|
+
readonly manifestVersions: [2, 3];
|
|
498
|
+
readonly requiresPolicy: false;
|
|
499
|
+
readonly foregroundOnly: false;
|
|
500
|
+
readonly contexts: ["background"];
|
|
501
|
+
readonly namespace: "alarms";
|
|
502
|
+
};
|
|
503
|
+
readonly audio: {
|
|
504
|
+
readonly minChromeVersion: 59;
|
|
505
|
+
readonly platform: "chromeos";
|
|
506
|
+
readonly channel: "stable";
|
|
507
|
+
readonly manifestVersions: [2, 3];
|
|
508
|
+
readonly requiresPolicy: false;
|
|
509
|
+
readonly foregroundOnly: false;
|
|
510
|
+
readonly contexts: ["background"];
|
|
511
|
+
readonly namespace: "audio";
|
|
512
|
+
};
|
|
513
|
+
readonly bookmarks: {
|
|
514
|
+
readonly platform: "all";
|
|
515
|
+
readonly channel: "stable";
|
|
516
|
+
readonly manifestVersions: [2, 3];
|
|
517
|
+
readonly requiresPolicy: false;
|
|
518
|
+
readonly foregroundOnly: false;
|
|
519
|
+
readonly contexts: ["background", "content"];
|
|
520
|
+
readonly namespace: "bookmarks";
|
|
521
|
+
};
|
|
522
|
+
readonly browsingData: {
|
|
523
|
+
readonly platform: "all";
|
|
524
|
+
readonly channel: "stable";
|
|
525
|
+
readonly manifestVersions: [2, 3];
|
|
526
|
+
readonly requiresPolicy: false;
|
|
527
|
+
readonly foregroundOnly: false;
|
|
528
|
+
readonly contexts: ["background"];
|
|
529
|
+
readonly namespace: "browsingData";
|
|
530
|
+
};
|
|
531
|
+
readonly certificateProvider: {
|
|
532
|
+
readonly minChromeVersion: 46;
|
|
533
|
+
readonly platform: "chromeos";
|
|
534
|
+
readonly channel: "stable";
|
|
535
|
+
readonly manifestVersions: [2, 3];
|
|
536
|
+
readonly requiresPolicy: false;
|
|
537
|
+
readonly foregroundOnly: false;
|
|
538
|
+
readonly contexts: ["background"];
|
|
539
|
+
readonly namespace: "certificateProvider";
|
|
540
|
+
};
|
|
541
|
+
readonly commands: {
|
|
542
|
+
readonly platform: "all";
|
|
543
|
+
readonly channel: "stable";
|
|
544
|
+
readonly manifestVersions: [2, 3];
|
|
545
|
+
readonly requiresPolicy: false;
|
|
546
|
+
readonly foregroundOnly: false;
|
|
547
|
+
readonly contexts: ["background"];
|
|
548
|
+
readonly namespace: "commands";
|
|
549
|
+
};
|
|
550
|
+
readonly contentSettings: {
|
|
551
|
+
readonly platform: "all";
|
|
552
|
+
readonly channel: "stable";
|
|
553
|
+
readonly manifestVersions: [2, 3];
|
|
554
|
+
readonly requiresPolicy: false;
|
|
555
|
+
readonly foregroundOnly: false;
|
|
556
|
+
readonly contexts: ["background"];
|
|
557
|
+
readonly namespace: "contentSettings";
|
|
558
|
+
};
|
|
559
|
+
readonly contextMenus: {
|
|
560
|
+
readonly platform: "all";
|
|
561
|
+
readonly channel: "stable";
|
|
562
|
+
readonly manifestVersions: [2, 3];
|
|
563
|
+
readonly requiresPolicy: false;
|
|
564
|
+
readonly foregroundOnly: false;
|
|
565
|
+
readonly contexts: ["background"];
|
|
566
|
+
readonly namespace: "contextMenus";
|
|
567
|
+
};
|
|
568
|
+
readonly cookies: {
|
|
569
|
+
readonly platform: "all";
|
|
570
|
+
readonly channel: "stable";
|
|
571
|
+
readonly manifestVersions: [2, 3];
|
|
572
|
+
readonly requiresPolicy: false;
|
|
573
|
+
readonly foregroundOnly: false;
|
|
574
|
+
readonly contexts: ["background", "content"];
|
|
575
|
+
readonly namespace: "cookies";
|
|
576
|
+
};
|
|
577
|
+
readonly debugger: {
|
|
578
|
+
readonly platform: "all";
|
|
579
|
+
readonly channel: "stable";
|
|
580
|
+
readonly manifestVersions: [2, 3];
|
|
581
|
+
readonly requiresPolicy: false;
|
|
582
|
+
readonly foregroundOnly: false;
|
|
583
|
+
readonly contexts: ["background"];
|
|
584
|
+
readonly namespace: "debugger";
|
|
585
|
+
};
|
|
586
|
+
readonly declarativeContent: {
|
|
587
|
+
readonly platform: "all";
|
|
588
|
+
readonly channel: "stable";
|
|
589
|
+
readonly manifestVersions: [2, 3];
|
|
590
|
+
readonly requiresPolicy: false;
|
|
591
|
+
readonly foregroundOnly: false;
|
|
592
|
+
readonly contexts: ["background"];
|
|
593
|
+
readonly namespace: "declarativeContent";
|
|
594
|
+
};
|
|
595
|
+
readonly declarativeNetRequest: {
|
|
596
|
+
readonly minChromeVersion: 84;
|
|
597
|
+
readonly platform: "all";
|
|
598
|
+
readonly channel: "stable";
|
|
599
|
+
readonly manifestVersions: [2, 3];
|
|
600
|
+
readonly requiresPolicy: false;
|
|
601
|
+
readonly foregroundOnly: false;
|
|
602
|
+
readonly contexts: ["background"];
|
|
603
|
+
readonly namespace: "declarativeNetRequest";
|
|
604
|
+
};
|
|
605
|
+
readonly desktopCapture: {
|
|
606
|
+
readonly platform: "all";
|
|
607
|
+
readonly channel: "stable";
|
|
608
|
+
readonly manifestVersions: [2, 3];
|
|
609
|
+
readonly requiresPolicy: false;
|
|
610
|
+
readonly foregroundOnly: false;
|
|
611
|
+
readonly contexts: ["background"];
|
|
612
|
+
readonly namespace: "desktopCapture";
|
|
613
|
+
};
|
|
614
|
+
readonly "devtools.inspectedWindow": {
|
|
615
|
+
readonly platform: "all";
|
|
616
|
+
readonly channel: "stable";
|
|
617
|
+
readonly manifestVersions: [2, 3];
|
|
618
|
+
readonly requiresPolicy: false;
|
|
619
|
+
readonly foregroundOnly: false;
|
|
620
|
+
readonly contexts: ["devtools"];
|
|
621
|
+
readonly namespace: "devtools.inspectedWindow";
|
|
622
|
+
};
|
|
623
|
+
readonly "devtools.network": {
|
|
624
|
+
readonly platform: "all";
|
|
625
|
+
readonly channel: "stable";
|
|
626
|
+
readonly manifestVersions: [2, 3];
|
|
627
|
+
readonly requiresPolicy: false;
|
|
628
|
+
readonly foregroundOnly: false;
|
|
629
|
+
readonly contexts: ["devtools"];
|
|
630
|
+
readonly namespace: "devtools.network";
|
|
631
|
+
};
|
|
632
|
+
readonly "devtools.panels": {
|
|
633
|
+
readonly platform: "all";
|
|
634
|
+
readonly channel: "stable";
|
|
635
|
+
readonly manifestVersions: [2, 3];
|
|
636
|
+
readonly requiresPolicy: false;
|
|
637
|
+
readonly foregroundOnly: false;
|
|
638
|
+
readonly contexts: ["devtools"];
|
|
639
|
+
readonly namespace: "devtools.panels";
|
|
640
|
+
};
|
|
641
|
+
readonly "devtools.performance": {
|
|
642
|
+
readonly minChromeVersion: 129;
|
|
643
|
+
readonly platform: "all";
|
|
644
|
+
readonly channel: "stable";
|
|
645
|
+
readonly manifestVersions: [2, 3];
|
|
646
|
+
readonly requiresPolicy: false;
|
|
647
|
+
readonly foregroundOnly: false;
|
|
648
|
+
readonly contexts: ["devtools"];
|
|
649
|
+
readonly namespace: "devtools.performance";
|
|
650
|
+
};
|
|
651
|
+
readonly "devtools.recorder": {
|
|
652
|
+
readonly minChromeVersion: 105;
|
|
653
|
+
readonly platform: "all";
|
|
654
|
+
readonly channel: "stable";
|
|
655
|
+
readonly manifestVersions: [2, 3];
|
|
656
|
+
readonly requiresPolicy: false;
|
|
657
|
+
readonly foregroundOnly: false;
|
|
658
|
+
readonly contexts: ["devtools"];
|
|
659
|
+
readonly namespace: "devtools.recorder";
|
|
660
|
+
};
|
|
661
|
+
readonly dns: {
|
|
662
|
+
readonly platform: "all";
|
|
663
|
+
readonly channel: "dev";
|
|
664
|
+
readonly manifestVersions: [2, 3];
|
|
665
|
+
readonly requiresPolicy: false;
|
|
666
|
+
readonly foregroundOnly: false;
|
|
667
|
+
readonly contexts: ["background"];
|
|
668
|
+
readonly namespace: "dns";
|
|
669
|
+
};
|
|
670
|
+
readonly documentScan: {
|
|
671
|
+
readonly minChromeVersion: 44;
|
|
672
|
+
readonly platform: "chromeos";
|
|
673
|
+
readonly channel: "stable";
|
|
674
|
+
readonly manifestVersions: [2, 3];
|
|
675
|
+
readonly requiresPolicy: false;
|
|
676
|
+
readonly foregroundOnly: false;
|
|
677
|
+
readonly contexts: ["background"];
|
|
678
|
+
readonly namespace: "documentScan";
|
|
679
|
+
};
|
|
680
|
+
readonly dom: {
|
|
681
|
+
readonly minChromeVersion: 88;
|
|
682
|
+
readonly platform: "all";
|
|
683
|
+
readonly channel: "stable";
|
|
684
|
+
readonly manifestVersions: [2, 3];
|
|
685
|
+
readonly requiresPolicy: false;
|
|
686
|
+
readonly foregroundOnly: false;
|
|
687
|
+
readonly contexts: ["content"];
|
|
688
|
+
readonly namespace: "dom";
|
|
689
|
+
};
|
|
690
|
+
readonly downloads: {
|
|
691
|
+
readonly platform: "all";
|
|
692
|
+
readonly channel: "stable";
|
|
693
|
+
readonly manifestVersions: [2, 3];
|
|
694
|
+
readonly requiresPolicy: false;
|
|
695
|
+
readonly foregroundOnly: false;
|
|
696
|
+
readonly contexts: ["background"];
|
|
697
|
+
readonly namespace: "downloads";
|
|
698
|
+
};
|
|
699
|
+
readonly "enterprise.deviceAttributes": {
|
|
700
|
+
readonly minChromeVersion: 46;
|
|
701
|
+
readonly platform: "chromeos";
|
|
702
|
+
readonly channel: "stable";
|
|
703
|
+
readonly manifestVersions: [2, 3];
|
|
704
|
+
readonly requiresPolicy: true;
|
|
705
|
+
readonly foregroundOnly: false;
|
|
706
|
+
readonly contexts: ["background"];
|
|
707
|
+
readonly namespace: "enterprise.deviceAttributes";
|
|
708
|
+
};
|
|
709
|
+
readonly "enterprise.hardwarePlatform": {
|
|
710
|
+
readonly minChromeVersion: 71;
|
|
711
|
+
readonly platform: "all";
|
|
712
|
+
readonly channel: "stable";
|
|
713
|
+
readonly manifestVersions: [2, 3];
|
|
714
|
+
readonly requiresPolicy: true;
|
|
715
|
+
readonly foregroundOnly: false;
|
|
716
|
+
readonly contexts: ["background"];
|
|
717
|
+
readonly namespace: "enterprise.hardwarePlatform";
|
|
718
|
+
};
|
|
719
|
+
readonly "enterprise.networkingAttributes": {
|
|
720
|
+
readonly minChromeVersion: 85;
|
|
721
|
+
readonly platform: "chromeos";
|
|
722
|
+
readonly channel: "stable";
|
|
723
|
+
readonly manifestVersions: [2, 3];
|
|
724
|
+
readonly requiresPolicy: true;
|
|
725
|
+
readonly foregroundOnly: false;
|
|
726
|
+
readonly contexts: ["background"];
|
|
727
|
+
readonly namespace: "enterprise.networkingAttributes";
|
|
728
|
+
};
|
|
729
|
+
readonly "enterprise.platformKeys": {
|
|
730
|
+
readonly platform: "chromeos";
|
|
731
|
+
readonly channel: "stable";
|
|
732
|
+
readonly manifestVersions: [2, 3];
|
|
733
|
+
readonly requiresPolicy: true;
|
|
734
|
+
readonly foregroundOnly: false;
|
|
735
|
+
readonly contexts: ["background"];
|
|
736
|
+
readonly namespace: "enterprise.platformKeys";
|
|
737
|
+
};
|
|
738
|
+
readonly events: {
|
|
739
|
+
readonly platform: "all";
|
|
740
|
+
readonly channel: "stable";
|
|
741
|
+
readonly manifestVersions: [2, 3];
|
|
742
|
+
readonly requiresPolicy: false;
|
|
743
|
+
readonly foregroundOnly: false;
|
|
744
|
+
readonly contexts: ["all"];
|
|
745
|
+
readonly namespace: "events";
|
|
746
|
+
};
|
|
747
|
+
readonly extension: {
|
|
748
|
+
readonly platform: "all";
|
|
749
|
+
readonly channel: "stable";
|
|
750
|
+
readonly manifestVersions: [2, 3];
|
|
751
|
+
readonly requiresPolicy: false;
|
|
752
|
+
readonly foregroundOnly: false;
|
|
753
|
+
readonly contexts: ["all"];
|
|
754
|
+
readonly namespace: "extension";
|
|
755
|
+
};
|
|
756
|
+
readonly extensionTypes: {
|
|
757
|
+
readonly platform: "all";
|
|
758
|
+
readonly channel: "stable";
|
|
759
|
+
readonly manifestVersions: [2, 3];
|
|
760
|
+
readonly requiresPolicy: false;
|
|
761
|
+
readonly foregroundOnly: false;
|
|
762
|
+
readonly contexts: ["all"];
|
|
763
|
+
readonly namespace: "extensionTypes";
|
|
764
|
+
};
|
|
765
|
+
readonly fileBrowserHandler: {
|
|
766
|
+
readonly platform: "chromeos";
|
|
767
|
+
readonly channel: "stable";
|
|
768
|
+
readonly manifestVersions: [2, 3];
|
|
769
|
+
readonly requiresPolicy: false;
|
|
770
|
+
readonly foregroundOnly: true;
|
|
771
|
+
readonly contexts: ["background"];
|
|
772
|
+
readonly namespace: "fileBrowserHandler";
|
|
773
|
+
};
|
|
774
|
+
readonly fileSystemProvider: {
|
|
775
|
+
readonly platform: "chromeos";
|
|
776
|
+
readonly channel: "stable";
|
|
777
|
+
readonly manifestVersions: [2, 3];
|
|
778
|
+
readonly requiresPolicy: false;
|
|
779
|
+
readonly foregroundOnly: false;
|
|
780
|
+
readonly contexts: ["background"];
|
|
781
|
+
readonly namespace: "fileSystemProvider";
|
|
782
|
+
};
|
|
783
|
+
readonly fontSettings: {
|
|
784
|
+
readonly platform: "all";
|
|
785
|
+
readonly channel: "stable";
|
|
786
|
+
readonly manifestVersions: [2, 3];
|
|
787
|
+
readonly requiresPolicy: false;
|
|
788
|
+
readonly foregroundOnly: false;
|
|
789
|
+
readonly contexts: ["background"];
|
|
790
|
+
readonly namespace: "fontSettings";
|
|
791
|
+
};
|
|
792
|
+
readonly gcm: {
|
|
793
|
+
readonly platform: "all";
|
|
794
|
+
readonly channel: "stable";
|
|
795
|
+
readonly manifestVersions: [2, 3];
|
|
796
|
+
readonly requiresPolicy: false;
|
|
797
|
+
readonly foregroundOnly: false;
|
|
798
|
+
readonly contexts: ["background"];
|
|
799
|
+
readonly namespace: "gcm";
|
|
800
|
+
};
|
|
801
|
+
readonly history: {
|
|
802
|
+
readonly platform: "all";
|
|
803
|
+
readonly channel: "stable";
|
|
804
|
+
readonly manifestVersions: [2, 3];
|
|
805
|
+
readonly requiresPolicy: false;
|
|
806
|
+
readonly foregroundOnly: false;
|
|
807
|
+
readonly contexts: ["background", "content"];
|
|
808
|
+
readonly namespace: "history";
|
|
809
|
+
};
|
|
810
|
+
readonly i18n: {
|
|
811
|
+
readonly platform: "all";
|
|
812
|
+
readonly channel: "stable";
|
|
813
|
+
readonly manifestVersions: [2, 3];
|
|
814
|
+
readonly requiresPolicy: false;
|
|
815
|
+
readonly foregroundOnly: false;
|
|
816
|
+
readonly contexts: ["all"];
|
|
817
|
+
readonly namespace: "i18n";
|
|
818
|
+
};
|
|
819
|
+
readonly identity: {
|
|
820
|
+
readonly platform: "all";
|
|
821
|
+
readonly channel: "stable";
|
|
822
|
+
readonly manifestVersions: [2, 3];
|
|
823
|
+
readonly requiresPolicy: false;
|
|
824
|
+
readonly foregroundOnly: false;
|
|
825
|
+
readonly contexts: ["background"];
|
|
826
|
+
readonly namespace: "identity";
|
|
827
|
+
};
|
|
828
|
+
readonly idle: {
|
|
829
|
+
readonly platform: "all";
|
|
830
|
+
readonly channel: "stable";
|
|
831
|
+
readonly manifestVersions: [2, 3];
|
|
832
|
+
readonly requiresPolicy: false;
|
|
833
|
+
readonly foregroundOnly: false;
|
|
834
|
+
readonly contexts: ["background"];
|
|
835
|
+
readonly namespace: "idle";
|
|
836
|
+
};
|
|
837
|
+
readonly "input.ime": {
|
|
838
|
+
readonly platform: "chromeos";
|
|
839
|
+
readonly channel: "stable";
|
|
840
|
+
readonly manifestVersions: [2, 3];
|
|
841
|
+
readonly requiresPolicy: false;
|
|
842
|
+
readonly foregroundOnly: false;
|
|
843
|
+
readonly contexts: ["background"];
|
|
844
|
+
readonly namespace: "input.ime";
|
|
845
|
+
};
|
|
846
|
+
readonly instanceID: {
|
|
847
|
+
readonly minChromeVersion: 44;
|
|
848
|
+
readonly platform: "all";
|
|
849
|
+
readonly channel: "stable";
|
|
850
|
+
readonly manifestVersions: [2, 3];
|
|
851
|
+
readonly requiresPolicy: false;
|
|
852
|
+
readonly foregroundOnly: false;
|
|
853
|
+
readonly contexts: ["background"];
|
|
854
|
+
readonly namespace: "instanceID";
|
|
855
|
+
};
|
|
856
|
+
readonly loginState: {
|
|
857
|
+
readonly minChromeVersion: 78;
|
|
858
|
+
readonly platform: "chromeos";
|
|
859
|
+
readonly channel: "stable";
|
|
860
|
+
readonly manifestVersions: [2, 3];
|
|
861
|
+
readonly requiresPolicy: false;
|
|
862
|
+
readonly foregroundOnly: false;
|
|
863
|
+
readonly contexts: ["background"];
|
|
864
|
+
readonly namespace: "loginState";
|
|
865
|
+
};
|
|
866
|
+
readonly management: {
|
|
867
|
+
readonly platform: "all";
|
|
868
|
+
readonly channel: "stable";
|
|
869
|
+
readonly manifestVersions: [2, 3];
|
|
870
|
+
readonly requiresPolicy: false;
|
|
871
|
+
readonly foregroundOnly: false;
|
|
872
|
+
readonly contexts: ["background"];
|
|
873
|
+
readonly namespace: "management";
|
|
874
|
+
};
|
|
875
|
+
readonly notifications: {
|
|
876
|
+
readonly platform: "all";
|
|
877
|
+
readonly channel: "stable";
|
|
878
|
+
readonly manifestVersions: [2, 3];
|
|
879
|
+
readonly requiresPolicy: false;
|
|
880
|
+
readonly foregroundOnly: false;
|
|
881
|
+
readonly contexts: ["background"];
|
|
882
|
+
readonly namespace: "notifications";
|
|
883
|
+
};
|
|
884
|
+
readonly offscreen: {
|
|
885
|
+
readonly minChromeVersion: 109;
|
|
886
|
+
readonly platform: "all";
|
|
887
|
+
readonly channel: "stable";
|
|
888
|
+
readonly manifestVersions: [3];
|
|
889
|
+
readonly requiresPolicy: false;
|
|
890
|
+
readonly foregroundOnly: false;
|
|
891
|
+
readonly contexts: ["background"];
|
|
892
|
+
readonly namespace: "offscreen";
|
|
893
|
+
};
|
|
894
|
+
readonly omnibox: {
|
|
895
|
+
readonly platform: "all";
|
|
896
|
+
readonly channel: "stable";
|
|
897
|
+
readonly manifestVersions: [2, 3];
|
|
898
|
+
readonly requiresPolicy: false;
|
|
899
|
+
readonly foregroundOnly: false;
|
|
900
|
+
readonly contexts: ["background"];
|
|
901
|
+
readonly namespace: "omnibox";
|
|
902
|
+
};
|
|
903
|
+
readonly pageCapture: {
|
|
904
|
+
readonly platform: "all";
|
|
905
|
+
readonly channel: "stable";
|
|
906
|
+
readonly manifestVersions: [2, 3];
|
|
907
|
+
readonly requiresPolicy: false;
|
|
908
|
+
readonly foregroundOnly: false;
|
|
909
|
+
readonly contexts: ["background"];
|
|
910
|
+
readonly namespace: "pageCapture";
|
|
911
|
+
};
|
|
912
|
+
readonly permissions: {
|
|
913
|
+
readonly platform: "all";
|
|
914
|
+
readonly channel: "stable";
|
|
915
|
+
readonly manifestVersions: [2, 3];
|
|
916
|
+
readonly requiresPolicy: false;
|
|
917
|
+
readonly foregroundOnly: false;
|
|
918
|
+
readonly contexts: ["background", "content"];
|
|
919
|
+
readonly namespace: "permissions";
|
|
920
|
+
};
|
|
921
|
+
readonly platformKeys: {
|
|
922
|
+
readonly minChromeVersion: 45;
|
|
923
|
+
readonly platform: "chromeos";
|
|
924
|
+
readonly channel: "stable";
|
|
925
|
+
readonly manifestVersions: [2, 3];
|
|
926
|
+
readonly requiresPolicy: false;
|
|
927
|
+
readonly foregroundOnly: false;
|
|
928
|
+
readonly contexts: ["background"];
|
|
929
|
+
readonly namespace: "platformKeys";
|
|
930
|
+
};
|
|
931
|
+
readonly power: {
|
|
932
|
+
readonly platform: "all";
|
|
933
|
+
readonly channel: "stable";
|
|
934
|
+
readonly manifestVersions: [2, 3];
|
|
935
|
+
readonly requiresPolicy: false;
|
|
936
|
+
readonly foregroundOnly: false;
|
|
937
|
+
readonly contexts: ["background"];
|
|
938
|
+
readonly namespace: "power";
|
|
939
|
+
};
|
|
940
|
+
readonly printerProvider: {
|
|
941
|
+
readonly minChromeVersion: 44;
|
|
942
|
+
readonly platform: "all";
|
|
943
|
+
readonly channel: "stable";
|
|
944
|
+
readonly manifestVersions: [2, 3];
|
|
945
|
+
readonly requiresPolicy: false;
|
|
946
|
+
readonly foregroundOnly: false;
|
|
947
|
+
readonly contexts: ["background"];
|
|
948
|
+
readonly namespace: "printerProvider";
|
|
949
|
+
};
|
|
950
|
+
readonly printing: {
|
|
951
|
+
readonly minChromeVersion: 81;
|
|
952
|
+
readonly platform: "chromeos";
|
|
953
|
+
readonly channel: "stable";
|
|
954
|
+
readonly manifestVersions: [2, 3];
|
|
955
|
+
readonly requiresPolicy: false;
|
|
956
|
+
readonly foregroundOnly: false;
|
|
957
|
+
readonly contexts: ["background"];
|
|
958
|
+
readonly namespace: "printing";
|
|
959
|
+
};
|
|
960
|
+
readonly printingMetrics: {
|
|
961
|
+
readonly minChromeVersion: 79;
|
|
962
|
+
readonly platform: "chromeos";
|
|
963
|
+
readonly channel: "stable";
|
|
964
|
+
readonly manifestVersions: [2, 3];
|
|
965
|
+
readonly requiresPolicy: true;
|
|
966
|
+
readonly foregroundOnly: false;
|
|
967
|
+
readonly contexts: ["background"];
|
|
968
|
+
readonly namespace: "printingMetrics";
|
|
969
|
+
};
|
|
970
|
+
readonly privacy: {
|
|
971
|
+
readonly platform: "all";
|
|
972
|
+
readonly channel: "stable";
|
|
973
|
+
readonly manifestVersions: [2, 3];
|
|
974
|
+
readonly requiresPolicy: false;
|
|
975
|
+
readonly foregroundOnly: false;
|
|
976
|
+
readonly contexts: ["background"];
|
|
977
|
+
readonly namespace: "privacy";
|
|
978
|
+
};
|
|
979
|
+
readonly processes: {
|
|
980
|
+
readonly platform: "all";
|
|
981
|
+
readonly channel: "dev";
|
|
982
|
+
readonly manifestVersions: [2, 3];
|
|
983
|
+
readonly requiresPolicy: false;
|
|
984
|
+
readonly foregroundOnly: false;
|
|
985
|
+
readonly contexts: ["background"];
|
|
986
|
+
readonly namespace: "processes";
|
|
987
|
+
};
|
|
988
|
+
readonly proxy: {
|
|
989
|
+
readonly platform: "all";
|
|
990
|
+
readonly channel: "stable";
|
|
991
|
+
readonly manifestVersions: [2, 3];
|
|
992
|
+
readonly requiresPolicy: false;
|
|
993
|
+
readonly foregroundOnly: false;
|
|
994
|
+
readonly contexts: ["background"];
|
|
995
|
+
readonly namespace: "proxy";
|
|
996
|
+
};
|
|
997
|
+
readonly readingList: {
|
|
998
|
+
readonly minChromeVersion: 120;
|
|
999
|
+
readonly platform: "all";
|
|
1000
|
+
readonly channel: "stable";
|
|
1001
|
+
readonly manifestVersions: [3];
|
|
1002
|
+
readonly requiresPolicy: false;
|
|
1003
|
+
readonly foregroundOnly: false;
|
|
1004
|
+
readonly contexts: ["background"];
|
|
1005
|
+
readonly namespace: "readingList";
|
|
1006
|
+
};
|
|
1007
|
+
readonly runtime: {
|
|
1008
|
+
readonly platform: "all";
|
|
1009
|
+
readonly channel: "stable";
|
|
1010
|
+
readonly manifestVersions: [2, 3];
|
|
1011
|
+
readonly requiresPolicy: false;
|
|
1012
|
+
readonly foregroundOnly: false;
|
|
1013
|
+
readonly contexts: ["all"];
|
|
1014
|
+
readonly namespace: "runtime";
|
|
1015
|
+
};
|
|
1016
|
+
readonly scripting: {
|
|
1017
|
+
readonly minChromeVersion: 88;
|
|
1018
|
+
readonly platform: "all";
|
|
1019
|
+
readonly channel: "stable";
|
|
1020
|
+
readonly manifestVersions: [3];
|
|
1021
|
+
readonly requiresPolicy: false;
|
|
1022
|
+
readonly foregroundOnly: false;
|
|
1023
|
+
readonly contexts: ["background"];
|
|
1024
|
+
readonly namespace: "scripting";
|
|
1025
|
+
};
|
|
1026
|
+
readonly search: {
|
|
1027
|
+
readonly minChromeVersion: 87;
|
|
1028
|
+
readonly platform: "all";
|
|
1029
|
+
readonly channel: "stable";
|
|
1030
|
+
readonly manifestVersions: [2, 3];
|
|
1031
|
+
readonly requiresPolicy: false;
|
|
1032
|
+
readonly foregroundOnly: false;
|
|
1033
|
+
readonly contexts: ["background"];
|
|
1034
|
+
readonly namespace: "search";
|
|
1035
|
+
};
|
|
1036
|
+
readonly sessions: {
|
|
1037
|
+
readonly platform: "all";
|
|
1038
|
+
readonly channel: "stable";
|
|
1039
|
+
readonly manifestVersions: [2, 3];
|
|
1040
|
+
readonly requiresPolicy: false;
|
|
1041
|
+
readonly foregroundOnly: false;
|
|
1042
|
+
readonly contexts: ["background"];
|
|
1043
|
+
readonly namespace: "sessions";
|
|
1044
|
+
};
|
|
1045
|
+
readonly sidePanel: {
|
|
1046
|
+
readonly minChromeVersion: 114;
|
|
1047
|
+
readonly platform: "all";
|
|
1048
|
+
readonly channel: "stable";
|
|
1049
|
+
readonly manifestVersions: [3];
|
|
1050
|
+
readonly requiresPolicy: false;
|
|
1051
|
+
readonly foregroundOnly: false;
|
|
1052
|
+
readonly contexts: ["background"];
|
|
1053
|
+
readonly namespace: "sidePanel";
|
|
1054
|
+
};
|
|
1055
|
+
readonly storage: {
|
|
1056
|
+
readonly platform: "all";
|
|
1057
|
+
readonly channel: "stable";
|
|
1058
|
+
readonly manifestVersions: [2, 3];
|
|
1059
|
+
readonly requiresPolicy: false;
|
|
1060
|
+
readonly foregroundOnly: false;
|
|
1061
|
+
readonly contexts: ["all"];
|
|
1062
|
+
readonly namespace: "storage";
|
|
1063
|
+
};
|
|
1064
|
+
readonly "system.cpu": {
|
|
1065
|
+
readonly platform: "all";
|
|
1066
|
+
readonly channel: "stable";
|
|
1067
|
+
readonly manifestVersions: [2, 3];
|
|
1068
|
+
readonly requiresPolicy: false;
|
|
1069
|
+
readonly foregroundOnly: false;
|
|
1070
|
+
readonly contexts: ["background"];
|
|
1071
|
+
readonly namespace: "system.cpu";
|
|
1072
|
+
};
|
|
1073
|
+
readonly "system.display": {
|
|
1074
|
+
readonly platform: "all";
|
|
1075
|
+
readonly channel: "stable";
|
|
1076
|
+
readonly manifestVersions: [2, 3];
|
|
1077
|
+
readonly requiresPolicy: false;
|
|
1078
|
+
readonly foregroundOnly: false;
|
|
1079
|
+
readonly contexts: ["background"];
|
|
1080
|
+
readonly namespace: "system.display";
|
|
1081
|
+
};
|
|
1082
|
+
readonly "system.memory": {
|
|
1083
|
+
readonly platform: "all";
|
|
1084
|
+
readonly channel: "stable";
|
|
1085
|
+
readonly manifestVersions: [2, 3];
|
|
1086
|
+
readonly requiresPolicy: false;
|
|
1087
|
+
readonly foregroundOnly: false;
|
|
1088
|
+
readonly contexts: ["background"];
|
|
1089
|
+
readonly namespace: "system.memory";
|
|
1090
|
+
};
|
|
1091
|
+
readonly "system.storage": {
|
|
1092
|
+
readonly platform: "all";
|
|
1093
|
+
readonly channel: "stable";
|
|
1094
|
+
readonly manifestVersions: [2, 3];
|
|
1095
|
+
readonly requiresPolicy: false;
|
|
1096
|
+
readonly foregroundOnly: false;
|
|
1097
|
+
readonly contexts: ["background"];
|
|
1098
|
+
readonly namespace: "system.storage";
|
|
1099
|
+
};
|
|
1100
|
+
readonly systemLog: {
|
|
1101
|
+
readonly minChromeVersion: 125;
|
|
1102
|
+
readonly platform: "chromeos";
|
|
1103
|
+
readonly channel: "stable";
|
|
1104
|
+
readonly manifestVersions: [2, 3];
|
|
1105
|
+
readonly requiresPolicy: true;
|
|
1106
|
+
readonly foregroundOnly: false;
|
|
1107
|
+
readonly contexts: ["background"];
|
|
1108
|
+
readonly namespace: "systemLog";
|
|
1109
|
+
};
|
|
1110
|
+
readonly tabCapture: {
|
|
1111
|
+
readonly platform: "all";
|
|
1112
|
+
readonly channel: "stable";
|
|
1113
|
+
readonly manifestVersions: [2, 3];
|
|
1114
|
+
readonly requiresPolicy: false;
|
|
1115
|
+
readonly foregroundOnly: false;
|
|
1116
|
+
readonly contexts: ["background"];
|
|
1117
|
+
readonly namespace: "tabCapture";
|
|
1118
|
+
};
|
|
1119
|
+
readonly tabGroups: {
|
|
1120
|
+
readonly minChromeVersion: 89;
|
|
1121
|
+
readonly platform: "all";
|
|
1122
|
+
readonly channel: "stable";
|
|
1123
|
+
readonly manifestVersions: [3];
|
|
1124
|
+
readonly requiresPolicy: false;
|
|
1125
|
+
readonly foregroundOnly: false;
|
|
1126
|
+
readonly contexts: ["background"];
|
|
1127
|
+
readonly namespace: "tabGroups";
|
|
1128
|
+
};
|
|
1129
|
+
readonly tabs: {
|
|
1130
|
+
readonly platform: "all";
|
|
1131
|
+
readonly channel: "stable";
|
|
1132
|
+
readonly manifestVersions: [2, 3];
|
|
1133
|
+
readonly requiresPolicy: false;
|
|
1134
|
+
readonly foregroundOnly: false;
|
|
1135
|
+
readonly contexts: ["background", "content"];
|
|
1136
|
+
readonly namespace: "tabs";
|
|
1137
|
+
};
|
|
1138
|
+
readonly topSites: {
|
|
1139
|
+
readonly platform: "all";
|
|
1140
|
+
readonly channel: "stable";
|
|
1141
|
+
readonly manifestVersions: [2, 3];
|
|
1142
|
+
readonly requiresPolicy: false;
|
|
1143
|
+
readonly foregroundOnly: false;
|
|
1144
|
+
readonly contexts: ["background"];
|
|
1145
|
+
readonly namespace: "topSites";
|
|
1146
|
+
};
|
|
1147
|
+
readonly tts: {
|
|
1148
|
+
readonly platform: "all";
|
|
1149
|
+
readonly channel: "stable";
|
|
1150
|
+
readonly manifestVersions: [2, 3];
|
|
1151
|
+
readonly requiresPolicy: false;
|
|
1152
|
+
readonly foregroundOnly: false;
|
|
1153
|
+
readonly contexts: ["background"];
|
|
1154
|
+
readonly namespace: "tts";
|
|
1155
|
+
};
|
|
1156
|
+
readonly ttsEngine: {
|
|
1157
|
+
readonly platform: "all";
|
|
1158
|
+
readonly channel: "stable";
|
|
1159
|
+
readonly manifestVersions: [2, 3];
|
|
1160
|
+
readonly requiresPolicy: false;
|
|
1161
|
+
readonly foregroundOnly: false;
|
|
1162
|
+
readonly contexts: ["background"];
|
|
1163
|
+
readonly namespace: "ttsEngine";
|
|
1164
|
+
};
|
|
1165
|
+
readonly types: {
|
|
1166
|
+
readonly platform: "all";
|
|
1167
|
+
readonly channel: "stable";
|
|
1168
|
+
readonly manifestVersions: [2, 3];
|
|
1169
|
+
readonly requiresPolicy: false;
|
|
1170
|
+
readonly foregroundOnly: false;
|
|
1171
|
+
readonly contexts: ["all"];
|
|
1172
|
+
readonly namespace: "types";
|
|
1173
|
+
};
|
|
1174
|
+
readonly userScripts: {
|
|
1175
|
+
readonly minChromeVersion: 120;
|
|
1176
|
+
readonly platform: "all";
|
|
1177
|
+
readonly channel: "stable";
|
|
1178
|
+
readonly manifestVersions: [3];
|
|
1179
|
+
readonly requiresPolicy: false;
|
|
1180
|
+
readonly foregroundOnly: false;
|
|
1181
|
+
readonly contexts: ["background"];
|
|
1182
|
+
readonly namespace: "userScripts";
|
|
1183
|
+
};
|
|
1184
|
+
readonly vpnProvider: {
|
|
1185
|
+
readonly minChromeVersion: 43;
|
|
1186
|
+
readonly platform: "chromeos";
|
|
1187
|
+
readonly channel: "stable";
|
|
1188
|
+
readonly manifestVersions: [2, 3];
|
|
1189
|
+
readonly requiresPolicy: false;
|
|
1190
|
+
readonly foregroundOnly: false;
|
|
1191
|
+
readonly contexts: ["background"];
|
|
1192
|
+
readonly namespace: "vpnProvider";
|
|
1193
|
+
};
|
|
1194
|
+
readonly wallpaper: {
|
|
1195
|
+
readonly minChromeVersion: 43;
|
|
1196
|
+
readonly platform: "chromeos";
|
|
1197
|
+
readonly channel: "stable";
|
|
1198
|
+
readonly manifestVersions: [2, 3];
|
|
1199
|
+
readonly requiresPolicy: false;
|
|
1200
|
+
readonly foregroundOnly: false;
|
|
1201
|
+
readonly contexts: ["background"];
|
|
1202
|
+
readonly namespace: "wallpaper";
|
|
1203
|
+
};
|
|
1204
|
+
readonly webAuthenticationProxy: {
|
|
1205
|
+
readonly minChromeVersion: 115;
|
|
1206
|
+
readonly platform: "all";
|
|
1207
|
+
readonly channel: "stable";
|
|
1208
|
+
readonly manifestVersions: [3];
|
|
1209
|
+
readonly requiresPolicy: false;
|
|
1210
|
+
readonly foregroundOnly: false;
|
|
1211
|
+
readonly contexts: ["background"];
|
|
1212
|
+
readonly namespace: "webAuthenticationProxy";
|
|
1213
|
+
};
|
|
1214
|
+
readonly webNavigation: {
|
|
1215
|
+
readonly platform: "all";
|
|
1216
|
+
readonly channel: "stable";
|
|
1217
|
+
readonly manifestVersions: [2, 3];
|
|
1218
|
+
readonly requiresPolicy: false;
|
|
1219
|
+
readonly foregroundOnly: false;
|
|
1220
|
+
readonly contexts: ["background"];
|
|
1221
|
+
readonly namespace: "webNavigation";
|
|
1222
|
+
};
|
|
1223
|
+
readonly webRequest: {
|
|
1224
|
+
readonly platform: "all";
|
|
1225
|
+
readonly channel: "stable";
|
|
1226
|
+
readonly manifestVersions: [2, 3];
|
|
1227
|
+
readonly requiresPolicy: false;
|
|
1228
|
+
readonly foregroundOnly: false;
|
|
1229
|
+
readonly contexts: ["background"];
|
|
1230
|
+
readonly namespace: "webRequest";
|
|
1231
|
+
};
|
|
1232
|
+
readonly windows: {
|
|
1233
|
+
readonly platform: "all";
|
|
1234
|
+
readonly channel: "stable";
|
|
1235
|
+
readonly manifestVersions: [2, 3];
|
|
1236
|
+
readonly requiresPolicy: false;
|
|
1237
|
+
readonly foregroundOnly: false;
|
|
1238
|
+
readonly contexts: ["background"];
|
|
1239
|
+
readonly namespace: "windows";
|
|
1240
|
+
};
|
|
1241
|
+
};
|
|
1242
|
+
/**
|
|
1243
|
+
* Helper function to check if an API is available in the current context
|
|
1244
|
+
*/
|
|
1245
|
+
declare function isApiAvailable(api: ChromeApi, context: ChromeContext, manifestVersion: 2 | 3, platform?: ChromePlatform, chromeVersion?: number): boolean;
|
|
1246
|
+
/**
|
|
1247
|
+
* Get the Chrome API object reference by API enum
|
|
1248
|
+
*/
|
|
1249
|
+
declare function getChromeApiReference(api: ChromeApi): any;
|
|
1250
|
+
/**
|
|
1251
|
+
* Get all available APIs for a given context and manifest version
|
|
1252
|
+
*/
|
|
1253
|
+
declare function getAvailableApis(context: ChromeContext, manifestVersion: 2 | 3, platform?: ChromePlatform, chromeVersion?: number): ChromeApi[];
|
|
1254
|
+
|
|
1255
|
+
export { AlarmsApiTools, type ApiAvailability, type ApiToolOptions, BaseApiTools, BookmarksApiTools, CHROME_API_REGISTRY, ChromeApi, type ChromeApiMetadata, ChromeApiMetadataSchema, type ChromeChannel, ChromeChannelSchema, type ChromeContext, ChromeContextSchema, type ChromePlatform, ChromePlatformSchema, CommandsApiTools, CookiesApiTools, DownloadsApiTools, HistoryApiTools, NotificationsApiTools, RuntimeApiTools, ScriptingApiTools, StorageApiTools, TabGroupsApiTools, TabsApiTools, TtsApiTools, WindowsApiTools, getAvailableApis, getChromeApiReference, isApiAvailable };
|