chrome-devtools-mcp 0.18.1 → 0.20.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 +6 -5
- package/build/src/McpContext.js +242 -266
- package/build/src/McpPage.js +95 -0
- package/build/src/McpResponse.js +124 -48
- package/build/src/bin/chrome-devtools-cli-options.js +651 -0
- package/build/src/{cli.js → bin/chrome-devtools-mcp-cli-options.js} +12 -2
- package/build/src/bin/chrome-devtools-mcp-main.js +35 -0
- package/build/src/bin/chrome-devtools-mcp.js +21 -0
- package/build/src/bin/chrome-devtools.js +185 -0
- package/build/src/bin/cliDefinitions.js +615 -0
- package/build/src/browser.js +13 -12
- package/build/src/daemon/client.js +152 -0
- package/build/src/daemon/daemon.js +56 -17
- package/build/src/daemon/types.js +6 -0
- package/build/src/daemon/utils.js +57 -16
- package/build/src/index.js +204 -16
- package/build/src/telemetry/watchdog/ClearcutSender.js +2 -0
- package/build/src/third_party/THIRD_PARTY_NOTICES +1480 -111
- package/build/src/third_party/bundled-packages.json +4 -3
- package/build/src/third_party/devtools-formatter-worker.js +5 -14
- package/build/src/third_party/index.js +2128 -472
- package/build/src/third_party/issue-descriptions/selectivePermissionsIntervention.md +7 -0
- package/build/src/third_party/lighthouse-devtools-mcp-bundle.js +54183 -0
- package/build/src/tools/ToolDefinition.js +52 -0
- package/build/src/tools/console.js +3 -3
- package/build/src/tools/emulation.js +13 -45
- package/build/src/tools/extensions.js +17 -0
- package/build/src/tools/input.js +33 -33
- package/build/src/tools/lighthouse.js +123 -0
- package/build/src/tools/memory.js +5 -5
- package/build/src/tools/network.js +7 -7
- package/build/src/tools/pages.js +32 -32
- package/build/src/tools/performance.js +16 -14
- package/build/src/tools/screencast.js +5 -5
- package/build/src/tools/screenshot.js +6 -6
- package/build/src/tools/script.js +99 -49
- package/build/src/tools/slim/tools.js +18 -18
- package/build/src/tools/snapshot.js +5 -4
- package/build/src/tools/tools.js +2 -0
- package/build/src/types.js +6 -0
- package/build/src/utils/files.js +19 -0
- package/build/src/version.js +1 -1
- package/package.json +15 -9
- package/build/src/main.js +0 -203
|
@@ -2,34 +2,36 @@ import process$2 from 'node:process';
|
|
|
2
2
|
import readline from 'node:readline';
|
|
3
3
|
import * as WorkerThreads from 'node:worker_threads';
|
|
4
4
|
import require$$2, { strictEqual, notStrictEqual } from 'assert';
|
|
5
|
-
import require$$
|
|
6
|
-
import require$$0$
|
|
5
|
+
import require$$0$4, { resolve as resolve$2, dirname, normalize, join, relative, extname, basename } from 'path';
|
|
6
|
+
import require$$0$3, { statSync, readdirSync, readFileSync, writeFile } from 'fs';
|
|
7
7
|
import require$$0$2, { format as format$5, inspect } from 'util';
|
|
8
8
|
import require$$5, { fileURLToPath } from 'url';
|
|
9
9
|
import { createRequire } from 'node:module';
|
|
10
10
|
import fs, { readdirSync as readdirSync$1, readFileSync as readFileSync$1, accessSync, existsSync } from 'node:fs';
|
|
11
11
|
import require$$1 from 'tty';
|
|
12
12
|
import require$$0$1 from 'os';
|
|
13
|
+
import require$$0$5 from 'child_process';
|
|
14
|
+
import { PassThrough } from 'node:stream';
|
|
13
15
|
import { mkdtemp, unlink, rename, readFile } from 'node:fs/promises';
|
|
14
16
|
import os, { tmpdir } from 'node:os';
|
|
15
17
|
import path$1, { join as join$1, dirname as dirname$1 } from 'node:path';
|
|
16
|
-
import childProcess, { execSync, spawnSync, spawn } from 'node:child_process';
|
|
18
|
+
import childProcess, { execSync, spawnSync, spawn as spawn$1 } from 'node:child_process';
|
|
17
19
|
import { EventEmitter as EventEmitter$1 } from 'node:events';
|
|
18
20
|
import * as http$1 from 'node:http';
|
|
19
21
|
import * as https$1 from 'node:https';
|
|
20
22
|
import { urlToHttpOptions, URL as URL$1 } from 'node:url';
|
|
21
|
-
import require$$0$
|
|
23
|
+
import require$$0$6 from 'http';
|
|
22
24
|
import require$$1$1 from 'https';
|
|
23
|
-
import require$$0$
|
|
25
|
+
import require$$0$7 from 'net';
|
|
24
26
|
import require$$1$2 from 'tls';
|
|
25
|
-
import require$$0$
|
|
26
|
-
import require$$0$
|
|
27
|
+
import require$$0$8 from 'events';
|
|
28
|
+
import require$$0$9 from 'buffer';
|
|
27
29
|
import require$$1$3 from 'stream';
|
|
28
30
|
import require$$3$3 from 'dns';
|
|
29
31
|
import require$$2$1 from 'crypto';
|
|
30
32
|
import 'node:assert';
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
+
import require$$0$a from 'zlib';
|
|
34
|
+
import { generateReport as generateReport$1, navigation as navigation$1, snapshot as snapshot$1 } from './lighthouse-devtools-mcp-bundle.js';
|
|
33
35
|
|
|
34
36
|
function _mergeNamespaces(n, m) {
|
|
35
37
|
m.forEach(function (e) {
|
|
@@ -20966,7 +20968,7 @@ const ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
|
20966
20968
|
method: literal('notifications/tools/list_changed'),
|
|
20967
20969
|
params: NotificationsParamsSchema.optional()
|
|
20968
20970
|
});
|
|
20969
|
-
object({
|
|
20971
|
+
const ListChangedOptionsBaseSchema = object({
|
|
20970
20972
|
autoRefresh: boolean().default(true),
|
|
20971
20973
|
debounceMs: number().int().nonnegative().default(300)
|
|
20972
20974
|
});
|
|
@@ -36675,273 +36677,333 @@ class ExperimentalServerTasks {
|
|
|
36675
36677
|
requestStream(request, resultSchema, options) {
|
|
36676
36678
|
return this._server.requestStream(request, resultSchema, options);
|
|
36677
36679
|
}
|
|
36678
|
-
|
|
36679
|
-
|
|
36680
|
-
|
|
36681
|
-
|
|
36682
|
-
|
|
36683
|
-
|
|
36684
|
-
|
|
36685
|
-
|
|
36686
|
-
|
|
36687
|
-
|
|
36688
|
-
|
|
36689
|
-
|
|
36690
|
-
|
|
36691
|
-
|
|
36692
|
-
|
|
36693
|
-
|
|
36694
|
-
|
|
36695
|
-
|
|
36696
|
-
|
|
36697
|
-
|
|
36698
|
-
|
|
36699
|
-
|
|
36700
|
-
|
|
36701
|
-
|
|
36702
|
-
|
|
36703
|
-
|
|
36704
|
-
|
|
36705
|
-
|
|
36706
|
-
|
|
36707
|
-
|
|
36708
|
-
|
|
36709
|
-
|
|
36710
|
-
|
|
36711
|
-
|
|
36712
|
-
|
|
36713
|
-
|
|
36714
|
-
|
|
36715
|
-
|
|
36716
|
-
|
|
36717
|
-
|
|
36718
|
-
|
|
36719
|
-
|
|
36720
|
-
|
|
36721
|
-
|
|
36722
|
-
|
|
36723
|
-
|
|
36724
|
-
|
|
36725
|
-
|
|
36726
|
-
|
|
36727
|
-
|
|
36728
|
-
|
|
36729
|
-
|
|
36730
|
-
|
|
36731
|
-
}
|
|
36732
|
-
|
|
36733
|
-
this.
|
|
36734
|
-
|
|
36735
|
-
|
|
36736
|
-
|
|
36737
|
-
|
|
36738
|
-
|
|
36739
|
-
|
|
36740
|
-
|
|
36741
|
-
|
|
36742
|
-
|
|
36743
|
-
|
|
36744
|
-
|
|
36745
|
-
|
|
36746
|
-
|
|
36747
|
-
|
|
36748
|
-
|
|
36749
|
-
|
|
36750
|
-
|
|
36751
|
-
|
|
36752
|
-
|
|
36753
|
-
|
|
36754
|
-
}
|
|
36755
|
-
|
|
36756
|
-
|
|
36757
|
-
|
|
36758
|
-
|
|
36759
|
-
|
|
36760
|
-
|
|
36761
|
-
|
|
36762
|
-
}
|
|
36763
|
-
|
|
36764
|
-
|
|
36765
|
-
|
|
36766
|
-
|
|
36767
|
-
|
|
36768
|
-
|
|
36769
|
-
|
|
36770
|
-
|
|
36771
|
-
|
|
36772
|
-
|
|
36773
|
-
|
|
36774
|
-
|
|
36775
|
-
|
|
36776
|
-
|
|
36777
|
-
|
|
36778
|
-
|
|
36779
|
-
|
|
36780
|
-
|
|
36781
|
-
|
|
36782
|
-
|
|
36783
|
-
|
|
36784
|
-
|
|
36785
|
-
|
|
36786
|
-
|
|
36787
|
-
|
|
36788
|
-
|
|
36789
|
-
|
|
36790
|
-
|
|
36791
|
-
|
|
36792
|
-
|
|
36793
|
-
|
|
36794
|
-
|
|
36795
|
-
|
|
36796
|
-
|
|
36797
|
-
|
|
36798
|
-
|
|
36799
|
-
|
|
36800
|
-
|
|
36801
|
-
|
|
36802
|
-
|
|
36803
|
-
|
|
36804
|
-
|
|
36805
|
-
|
|
36806
|
-
|
|
36807
|
-
|
|
36808
|
-
|
|
36809
|
-
|
|
36810
|
-
|
|
36811
|
-
|
|
36812
|
-
|
|
36813
|
-
|
|
36814
|
-
|
|
36815
|
-
|
|
36816
|
-
|
|
36817
|
-
|
|
36818
|
-
|
|
36819
|
-
|
|
36820
|
-
|
|
36821
|
-
|
|
36822
|
-
|
|
36823
|
-
|
|
36824
|
-
|
|
36825
|
-
|
|
36826
|
-
|
|
36827
|
-
|
|
36828
|
-
|
|
36829
|
-
|
|
36830
|
-
|
|
36831
|
-
|
|
36832
|
-
|
|
36833
|
-
|
|
36834
|
-
|
|
36835
|
-
|
|
36836
|
-
|
|
36837
|
-
|
|
36838
|
-
|
|
36839
|
-
|
|
36840
|
-
|
|
36841
|
-
|
|
36842
|
-
|
|
36843
|
-
|
|
36844
|
-
|
|
36845
|
-
|
|
36846
|
-
|
|
36847
|
-
if (!
|
|
36848
|
-
|
|
36849
|
-
|
|
36850
|
-
|
|
36851
|
-
|
|
36852
|
-
|
|
36853
|
-
|
|
36854
|
-
|
|
36855
|
-
|
|
36856
|
-
|
|
36857
|
-
|
|
36858
|
-
|
|
36859
|
-
|
|
36860
|
-
|
|
36861
|
-
|
|
36862
|
-
|
|
36863
|
-
|
|
36864
|
-
|
|
36865
|
-
|
|
36866
|
-
|
|
36867
|
-
|
|
36868
|
-
|
|
36869
|
-
|
|
36870
|
-
|
|
36871
|
-
|
|
36872
|
-
|
|
36873
|
-
|
|
36874
|
-
|
|
36875
|
-
|
|
36876
|
-
|
|
36877
|
-
|
|
36878
|
-
|
|
36879
|
-
|
|
36880
|
-
|
|
36881
|
-
|
|
36882
|
-
|
|
36883
|
-
|
|
36884
|
-
|
|
36885
|
-
|
|
36886
|
-
case '
|
|
36887
|
-
if (!this.
|
|
36888
|
-
throw new Error(`
|
|
36889
|
-
}
|
|
36890
|
-
break;
|
|
36891
|
-
|
|
36892
|
-
|
|
36893
|
-
|
|
36894
|
-
|
|
36895
|
-
|
|
36896
|
-
|
|
36897
|
-
|
|
36898
|
-
|
|
36899
|
-
|
|
36900
|
-
case '
|
|
36901
|
-
|
|
36902
|
-
|
|
36903
|
-
|
|
36904
|
-
|
|
36905
|
-
|
|
36906
|
-
|
|
36907
|
-
|
|
36908
|
-
|
|
36909
|
-
|
|
36910
|
-
|
|
36911
|
-
|
|
36912
|
-
|
|
36913
|
-
|
|
36914
|
-
|
|
36915
|
-
|
|
36916
|
-
|
|
36917
|
-
|
|
36918
|
-
|
|
36919
|
-
|
|
36920
|
-
|
|
36921
|
-
|
|
36922
|
-
|
|
36923
|
-
|
|
36924
|
-
|
|
36925
|
-
|
|
36926
|
-
}
|
|
36927
|
-
|
|
36928
|
-
|
|
36929
|
-
|
|
36930
|
-
|
|
36931
|
-
|
|
36932
|
-
|
|
36933
|
-
|
|
36934
|
-
|
|
36935
|
-
|
|
36936
|
-
|
|
36937
|
-
|
|
36938
|
-
|
|
36939
|
-
|
|
36940
|
-
|
|
36941
|
-
|
|
36942
|
-
|
|
36943
|
-
|
|
36944
|
-
|
|
36680
|
+
createMessageStream(params, options) {
|
|
36681
|
+
const clientCapabilities = this._server.getClientCapabilities();
|
|
36682
|
+
if ((params.tools || params.toolChoice) && !clientCapabilities?.sampling?.tools) {
|
|
36683
|
+
throw new Error('Client does not support sampling tools capability.');
|
|
36684
|
+
}
|
|
36685
|
+
if (params.messages.length > 0) {
|
|
36686
|
+
const lastMessage = params.messages[params.messages.length - 1];
|
|
36687
|
+
const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];
|
|
36688
|
+
const hasToolResults = lastContent.some(c => c.type === 'tool_result');
|
|
36689
|
+
const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : undefined;
|
|
36690
|
+
const previousContent = previousMessage
|
|
36691
|
+
? Array.isArray(previousMessage.content)
|
|
36692
|
+
? previousMessage.content
|
|
36693
|
+
: [previousMessage.content]
|
|
36694
|
+
: [];
|
|
36695
|
+
const hasPreviousToolUse = previousContent.some(c => c.type === 'tool_use');
|
|
36696
|
+
if (hasToolResults) {
|
|
36697
|
+
if (lastContent.some(c => c.type !== 'tool_result')) {
|
|
36698
|
+
throw new Error('The last message must contain only tool_result content if any is present');
|
|
36699
|
+
}
|
|
36700
|
+
if (!hasPreviousToolUse) {
|
|
36701
|
+
throw new Error('tool_result blocks are not matching any tool_use from the previous message');
|
|
36702
|
+
}
|
|
36703
|
+
}
|
|
36704
|
+
if (hasPreviousToolUse) {
|
|
36705
|
+
const toolUseIds = new Set(previousContent.filter(c => c.type === 'tool_use').map(c => c.id));
|
|
36706
|
+
const toolResultIds = new Set(lastContent.filter(c => c.type === 'tool_result').map(c => c.toolUseId));
|
|
36707
|
+
if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every(id => toolResultIds.has(id))) {
|
|
36708
|
+
throw new Error('ids of tool_result blocks and tool_use blocks from previous message do not match');
|
|
36709
|
+
}
|
|
36710
|
+
}
|
|
36711
|
+
}
|
|
36712
|
+
return this.requestStream({
|
|
36713
|
+
method: 'sampling/createMessage',
|
|
36714
|
+
params
|
|
36715
|
+
}, CreateMessageResultSchema, options);
|
|
36716
|
+
}
|
|
36717
|
+
elicitInputStream(params, options) {
|
|
36718
|
+
const clientCapabilities = this._server.getClientCapabilities();
|
|
36719
|
+
const mode = params.mode ?? 'form';
|
|
36720
|
+
switch (mode) {
|
|
36721
|
+
case 'url': {
|
|
36722
|
+
if (!clientCapabilities?.elicitation?.url) {
|
|
36723
|
+
throw new Error('Client does not support url elicitation.');
|
|
36724
|
+
}
|
|
36725
|
+
break;
|
|
36726
|
+
}
|
|
36727
|
+
case 'form': {
|
|
36728
|
+
if (!clientCapabilities?.elicitation?.form) {
|
|
36729
|
+
throw new Error('Client does not support form elicitation.');
|
|
36730
|
+
}
|
|
36731
|
+
break;
|
|
36732
|
+
}
|
|
36733
|
+
}
|
|
36734
|
+
const normalizedParams = mode === 'form' && params.mode === undefined ? { ...params, mode: 'form' } : params;
|
|
36735
|
+
return this.requestStream({
|
|
36736
|
+
method: 'elicitation/create',
|
|
36737
|
+
params: normalizedParams
|
|
36738
|
+
}, ElicitResultSchema, options);
|
|
36739
|
+
}
|
|
36740
|
+
async getTask(taskId, options) {
|
|
36741
|
+
return this._server.getTask({ taskId }, options);
|
|
36742
|
+
}
|
|
36743
|
+
async getTaskResult(taskId, resultSchema, options) {
|
|
36744
|
+
return this._server.getTaskResult({ taskId }, resultSchema, options);
|
|
36745
|
+
}
|
|
36746
|
+
async listTasks(cursor, options) {
|
|
36747
|
+
return this._server.listTasks(cursor ? { cursor } : undefined, options);
|
|
36748
|
+
}
|
|
36749
|
+
async cancelTask(taskId, options) {
|
|
36750
|
+
return this._server.cancelTask({ taskId }, options);
|
|
36751
|
+
}
|
|
36752
|
+
}
|
|
36753
|
+
|
|
36754
|
+
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
36755
|
+
if (!requests) {
|
|
36756
|
+
throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
36757
|
+
}
|
|
36758
|
+
switch (method) {
|
|
36759
|
+
case 'tools/call':
|
|
36760
|
+
if (!requests.tools?.call) {
|
|
36761
|
+
throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
|
|
36762
|
+
}
|
|
36763
|
+
break;
|
|
36764
|
+
}
|
|
36765
|
+
}
|
|
36766
|
+
function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
36767
|
+
if (!requests) {
|
|
36768
|
+
throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
36769
|
+
}
|
|
36770
|
+
switch (method) {
|
|
36771
|
+
case 'sampling/createMessage':
|
|
36772
|
+
if (!requests.sampling?.createMessage) {
|
|
36773
|
+
throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);
|
|
36774
|
+
}
|
|
36775
|
+
break;
|
|
36776
|
+
case 'elicitation/create':
|
|
36777
|
+
if (!requests.elicitation?.create) {
|
|
36778
|
+
throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
|
|
36779
|
+
}
|
|
36780
|
+
break;
|
|
36781
|
+
}
|
|
36782
|
+
}
|
|
36783
|
+
|
|
36784
|
+
class Server extends Protocol {
|
|
36785
|
+
constructor(_serverInfo, options) {
|
|
36786
|
+
super(options);
|
|
36787
|
+
this._serverInfo = _serverInfo;
|
|
36788
|
+
this._loggingLevels = new Map();
|
|
36789
|
+
this.LOG_LEVEL_SEVERITY = new Map(LoggingLevelSchema.options.map((level, index) => [level, index]));
|
|
36790
|
+
this.isMessageIgnored = (level, sessionId) => {
|
|
36791
|
+
const currentLevel = this._loggingLevels.get(sessionId);
|
|
36792
|
+
return currentLevel ? this.LOG_LEVEL_SEVERITY.get(level) < this.LOG_LEVEL_SEVERITY.get(currentLevel) : false;
|
|
36793
|
+
};
|
|
36794
|
+
this._capabilities = options?.capabilities ?? {};
|
|
36795
|
+
this._instructions = options?.instructions;
|
|
36796
|
+
this._jsonSchemaValidator = options?.jsonSchemaValidator ?? new AjvJsonSchemaValidator();
|
|
36797
|
+
this.setRequestHandler(InitializeRequestSchema, request => this._oninitialize(request));
|
|
36798
|
+
this.setNotificationHandler(InitializedNotificationSchema, () => this.oninitialized?.());
|
|
36799
|
+
if (this._capabilities.logging) {
|
|
36800
|
+
this.setRequestHandler(SetLevelRequestSchema, async (request, extra) => {
|
|
36801
|
+
const transportSessionId = extra.sessionId || extra.requestInfo?.headers['mcp-session-id'] || undefined;
|
|
36802
|
+
const { level } = request.params;
|
|
36803
|
+
const parseResult = LoggingLevelSchema.safeParse(level);
|
|
36804
|
+
if (parseResult.success) {
|
|
36805
|
+
this._loggingLevels.set(transportSessionId, parseResult.data);
|
|
36806
|
+
}
|
|
36807
|
+
return {};
|
|
36808
|
+
});
|
|
36809
|
+
}
|
|
36810
|
+
}
|
|
36811
|
+
get experimental() {
|
|
36812
|
+
if (!this._experimental) {
|
|
36813
|
+
this._experimental = {
|
|
36814
|
+
tasks: new ExperimentalServerTasks(this)
|
|
36815
|
+
};
|
|
36816
|
+
}
|
|
36817
|
+
return this._experimental;
|
|
36818
|
+
}
|
|
36819
|
+
registerCapabilities(capabilities) {
|
|
36820
|
+
if (this.transport) {
|
|
36821
|
+
throw new Error('Cannot register capabilities after connecting to transport');
|
|
36822
|
+
}
|
|
36823
|
+
this._capabilities = mergeCapabilities(this._capabilities, capabilities);
|
|
36824
|
+
}
|
|
36825
|
+
setRequestHandler(requestSchema, handler) {
|
|
36826
|
+
const shape = getObjectShape(requestSchema);
|
|
36827
|
+
const methodSchema = shape?.method;
|
|
36828
|
+
if (!methodSchema) {
|
|
36829
|
+
throw new Error('Schema is missing a method literal');
|
|
36830
|
+
}
|
|
36831
|
+
let methodValue;
|
|
36832
|
+
if (isZ4Schema(methodSchema)) {
|
|
36833
|
+
const v4Schema = methodSchema;
|
|
36834
|
+
const v4Def = v4Schema._zod?.def;
|
|
36835
|
+
methodValue = v4Def?.value ?? v4Schema.value;
|
|
36836
|
+
}
|
|
36837
|
+
else {
|
|
36838
|
+
const v3Schema = methodSchema;
|
|
36839
|
+
const legacyDef = v3Schema._def;
|
|
36840
|
+
methodValue = legacyDef?.value ?? v3Schema.value;
|
|
36841
|
+
}
|
|
36842
|
+
if (typeof methodValue !== 'string') {
|
|
36843
|
+
throw new Error('Schema method literal must be a string');
|
|
36844
|
+
}
|
|
36845
|
+
const method = methodValue;
|
|
36846
|
+
if (method === 'tools/call') {
|
|
36847
|
+
const wrappedHandler = async (request, extra) => {
|
|
36848
|
+
const validatedRequest = safeParse$1(CallToolRequestSchema, request);
|
|
36849
|
+
if (!validatedRequest.success) {
|
|
36850
|
+
const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error);
|
|
36851
|
+
throw new McpError(ErrorCode$1.InvalidParams, `Invalid tools/call request: ${errorMessage}`);
|
|
36852
|
+
}
|
|
36853
|
+
const { params } = validatedRequest.data;
|
|
36854
|
+
const result = await Promise.resolve(handler(request, extra));
|
|
36855
|
+
if (params.task) {
|
|
36856
|
+
const taskValidationResult = safeParse$1(CreateTaskResultSchema, result);
|
|
36857
|
+
if (!taskValidationResult.success) {
|
|
36858
|
+
const errorMessage = taskValidationResult.error instanceof Error
|
|
36859
|
+
? taskValidationResult.error.message
|
|
36860
|
+
: String(taskValidationResult.error);
|
|
36861
|
+
throw new McpError(ErrorCode$1.InvalidParams, `Invalid task creation result: ${errorMessage}`);
|
|
36862
|
+
}
|
|
36863
|
+
return taskValidationResult.data;
|
|
36864
|
+
}
|
|
36865
|
+
const validationResult = safeParse$1(CallToolResultSchema, result);
|
|
36866
|
+
if (!validationResult.success) {
|
|
36867
|
+
const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
|
|
36868
|
+
throw new McpError(ErrorCode$1.InvalidParams, `Invalid tools/call result: ${errorMessage}`);
|
|
36869
|
+
}
|
|
36870
|
+
return validationResult.data;
|
|
36871
|
+
};
|
|
36872
|
+
return super.setRequestHandler(requestSchema, wrappedHandler);
|
|
36873
|
+
}
|
|
36874
|
+
return super.setRequestHandler(requestSchema, handler);
|
|
36875
|
+
}
|
|
36876
|
+
assertCapabilityForMethod(method) {
|
|
36877
|
+
switch (method) {
|
|
36878
|
+
case 'sampling/createMessage':
|
|
36879
|
+
if (!this._clientCapabilities?.sampling) {
|
|
36880
|
+
throw new Error(`Client does not support sampling (required for ${method})`);
|
|
36881
|
+
}
|
|
36882
|
+
break;
|
|
36883
|
+
case 'elicitation/create':
|
|
36884
|
+
if (!this._clientCapabilities?.elicitation) {
|
|
36885
|
+
throw new Error(`Client does not support elicitation (required for ${method})`);
|
|
36886
|
+
}
|
|
36887
|
+
break;
|
|
36888
|
+
case 'roots/list':
|
|
36889
|
+
if (!this._clientCapabilities?.roots) {
|
|
36890
|
+
throw new Error(`Client does not support listing roots (required for ${method})`);
|
|
36891
|
+
}
|
|
36892
|
+
break;
|
|
36893
|
+
}
|
|
36894
|
+
}
|
|
36895
|
+
assertNotificationCapability(method) {
|
|
36896
|
+
switch (method) {
|
|
36897
|
+
case 'notifications/message':
|
|
36898
|
+
if (!this._capabilities.logging) {
|
|
36899
|
+
throw new Error(`Server does not support logging (required for ${method})`);
|
|
36900
|
+
}
|
|
36901
|
+
break;
|
|
36902
|
+
case 'notifications/resources/updated':
|
|
36903
|
+
case 'notifications/resources/list_changed':
|
|
36904
|
+
if (!this._capabilities.resources) {
|
|
36905
|
+
throw new Error(`Server does not support notifying about resources (required for ${method})`);
|
|
36906
|
+
}
|
|
36907
|
+
break;
|
|
36908
|
+
case 'notifications/tools/list_changed':
|
|
36909
|
+
if (!this._capabilities.tools) {
|
|
36910
|
+
throw new Error(`Server does not support notifying of tool list changes (required for ${method})`);
|
|
36911
|
+
}
|
|
36912
|
+
break;
|
|
36913
|
+
case 'notifications/prompts/list_changed':
|
|
36914
|
+
if (!this._capabilities.prompts) {
|
|
36915
|
+
throw new Error(`Server does not support notifying of prompt list changes (required for ${method})`);
|
|
36916
|
+
}
|
|
36917
|
+
break;
|
|
36918
|
+
case 'notifications/elicitation/complete':
|
|
36919
|
+
if (!this._clientCapabilities?.elicitation?.url) {
|
|
36920
|
+
throw new Error(`Client does not support URL elicitation (required for ${method})`);
|
|
36921
|
+
}
|
|
36922
|
+
break;
|
|
36923
|
+
}
|
|
36924
|
+
}
|
|
36925
|
+
assertRequestHandlerCapability(method) {
|
|
36926
|
+
if (!this._capabilities) {
|
|
36927
|
+
return;
|
|
36928
|
+
}
|
|
36929
|
+
switch (method) {
|
|
36930
|
+
case 'completion/complete':
|
|
36931
|
+
if (!this._capabilities.completions) {
|
|
36932
|
+
throw new Error(`Server does not support completions (required for ${method})`);
|
|
36933
|
+
}
|
|
36934
|
+
break;
|
|
36935
|
+
case 'logging/setLevel':
|
|
36936
|
+
if (!this._capabilities.logging) {
|
|
36937
|
+
throw new Error(`Server does not support logging (required for ${method})`);
|
|
36938
|
+
}
|
|
36939
|
+
break;
|
|
36940
|
+
case 'prompts/get':
|
|
36941
|
+
case 'prompts/list':
|
|
36942
|
+
if (!this._capabilities.prompts) {
|
|
36943
|
+
throw new Error(`Server does not support prompts (required for ${method})`);
|
|
36944
|
+
}
|
|
36945
|
+
break;
|
|
36946
|
+
case 'resources/list':
|
|
36947
|
+
case 'resources/templates/list':
|
|
36948
|
+
case 'resources/read':
|
|
36949
|
+
if (!this._capabilities.resources) {
|
|
36950
|
+
throw new Error(`Server does not support resources (required for ${method})`);
|
|
36951
|
+
}
|
|
36952
|
+
break;
|
|
36953
|
+
case 'tools/call':
|
|
36954
|
+
case 'tools/list':
|
|
36955
|
+
if (!this._capabilities.tools) {
|
|
36956
|
+
throw new Error(`Server does not support tools (required for ${method})`);
|
|
36957
|
+
}
|
|
36958
|
+
break;
|
|
36959
|
+
case 'tasks/get':
|
|
36960
|
+
case 'tasks/list':
|
|
36961
|
+
case 'tasks/result':
|
|
36962
|
+
case 'tasks/cancel':
|
|
36963
|
+
if (!this._capabilities.tasks) {
|
|
36964
|
+
throw new Error(`Server does not support tasks capability (required for ${method})`);
|
|
36965
|
+
}
|
|
36966
|
+
break;
|
|
36967
|
+
}
|
|
36968
|
+
}
|
|
36969
|
+
assertTaskCapability(method) {
|
|
36970
|
+
assertClientRequestTaskCapability(this._clientCapabilities?.tasks?.requests, method, 'Client');
|
|
36971
|
+
}
|
|
36972
|
+
assertTaskHandlerCapability(method) {
|
|
36973
|
+
if (!this._capabilities) {
|
|
36974
|
+
return;
|
|
36975
|
+
}
|
|
36976
|
+
assertToolsCallTaskCapability(this._capabilities.tasks?.requests, method, 'Server');
|
|
36977
|
+
}
|
|
36978
|
+
async _oninitialize(request) {
|
|
36979
|
+
const requestedVersion = request.params.protocolVersion;
|
|
36980
|
+
this._clientCapabilities = request.params.capabilities;
|
|
36981
|
+
this._clientVersion = request.params.clientInfo;
|
|
36982
|
+
const protocolVersion = SUPPORTED_PROTOCOL_VERSIONS.includes(requestedVersion) ? requestedVersion : LATEST_PROTOCOL_VERSION;
|
|
36983
|
+
return {
|
|
36984
|
+
protocolVersion,
|
|
36985
|
+
capabilities: this.getCapabilities(),
|
|
36986
|
+
serverInfo: this._serverInfo,
|
|
36987
|
+
...(this._instructions && { instructions: this._instructions })
|
|
36988
|
+
};
|
|
36989
|
+
}
|
|
36990
|
+
getClientCapabilities() {
|
|
36991
|
+
return this._clientCapabilities;
|
|
36992
|
+
}
|
|
36993
|
+
getClientVersion() {
|
|
36994
|
+
return this._clientVersion;
|
|
36995
|
+
}
|
|
36996
|
+
getCapabilities() {
|
|
36997
|
+
return this._capabilities;
|
|
36998
|
+
}
|
|
36999
|
+
async ping() {
|
|
37000
|
+
return this.request({ method: 'ping' }, EmptyResultSchema);
|
|
37001
|
+
}
|
|
37002
|
+
async createMessage(params, options) {
|
|
37003
|
+
if (params.tools || params.toolChoice) {
|
|
37004
|
+
if (!this._clientCapabilities?.sampling?.tools) {
|
|
37005
|
+
throw new Error('Client does not support sampling tools capability.');
|
|
37006
|
+
}
|
|
36945
37007
|
}
|
|
36946
37008
|
if (params.messages.length > 0) {
|
|
36947
37009
|
const lastMessage = params.messages[params.messages.length - 1];
|
|
@@ -37965,6 +38027,1238 @@ class StdioServerTransport {
|
|
|
37965
38027
|
}
|
|
37966
38028
|
}
|
|
37967
38029
|
|
|
38030
|
+
var crossSpawn = {exports: {}};
|
|
38031
|
+
|
|
38032
|
+
var windows;
|
|
38033
|
+
var hasRequiredWindows;
|
|
38034
|
+
|
|
38035
|
+
function requireWindows () {
|
|
38036
|
+
if (hasRequiredWindows) return windows;
|
|
38037
|
+
hasRequiredWindows = 1;
|
|
38038
|
+
windows = isexe;
|
|
38039
|
+
isexe.sync = sync;
|
|
38040
|
+
var fs = require$$0$3;
|
|
38041
|
+
function checkPathExt (path, options) {
|
|
38042
|
+
var pathext = options.pathExt !== undefined ?
|
|
38043
|
+
options.pathExt : process.env.PATHEXT;
|
|
38044
|
+
if (!pathext) {
|
|
38045
|
+
return true
|
|
38046
|
+
}
|
|
38047
|
+
pathext = pathext.split(';');
|
|
38048
|
+
if (pathext.indexOf('') !== -1) {
|
|
38049
|
+
return true
|
|
38050
|
+
}
|
|
38051
|
+
for (var i = 0; i < pathext.length; i++) {
|
|
38052
|
+
var p = pathext[i].toLowerCase();
|
|
38053
|
+
if (p && path.substr(-p.length).toLowerCase() === p) {
|
|
38054
|
+
return true
|
|
38055
|
+
}
|
|
38056
|
+
}
|
|
38057
|
+
return false
|
|
38058
|
+
}
|
|
38059
|
+
function checkStat (stat, path, options) {
|
|
38060
|
+
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
38061
|
+
return false
|
|
38062
|
+
}
|
|
38063
|
+
return checkPathExt(path, options)
|
|
38064
|
+
}
|
|
38065
|
+
function isexe (path, options, cb) {
|
|
38066
|
+
fs.stat(path, function (er, stat) {
|
|
38067
|
+
cb(er, er ? false : checkStat(stat, path, options));
|
|
38068
|
+
});
|
|
38069
|
+
}
|
|
38070
|
+
function sync (path, options) {
|
|
38071
|
+
return checkStat(fs.statSync(path), path, options)
|
|
38072
|
+
}
|
|
38073
|
+
return windows;
|
|
38074
|
+
}
|
|
38075
|
+
|
|
38076
|
+
var mode;
|
|
38077
|
+
var hasRequiredMode;
|
|
38078
|
+
|
|
38079
|
+
function requireMode () {
|
|
38080
|
+
if (hasRequiredMode) return mode;
|
|
38081
|
+
hasRequiredMode = 1;
|
|
38082
|
+
mode = isexe;
|
|
38083
|
+
isexe.sync = sync;
|
|
38084
|
+
var fs = require$$0$3;
|
|
38085
|
+
function isexe (path, options, cb) {
|
|
38086
|
+
fs.stat(path, function (er, stat) {
|
|
38087
|
+
cb(er, er ? false : checkStat(stat, options));
|
|
38088
|
+
});
|
|
38089
|
+
}
|
|
38090
|
+
function sync (path, options) {
|
|
38091
|
+
return checkStat(fs.statSync(path), options)
|
|
38092
|
+
}
|
|
38093
|
+
function checkStat (stat, options) {
|
|
38094
|
+
return stat.isFile() && checkMode(stat, options)
|
|
38095
|
+
}
|
|
38096
|
+
function checkMode (stat, options) {
|
|
38097
|
+
var mod = stat.mode;
|
|
38098
|
+
var uid = stat.uid;
|
|
38099
|
+
var gid = stat.gid;
|
|
38100
|
+
var myUid = options.uid !== undefined ?
|
|
38101
|
+
options.uid : process.getuid && process.getuid();
|
|
38102
|
+
var myGid = options.gid !== undefined ?
|
|
38103
|
+
options.gid : process.getgid && process.getgid();
|
|
38104
|
+
var u = parseInt('100', 8);
|
|
38105
|
+
var g = parseInt('010', 8);
|
|
38106
|
+
var o = parseInt('001', 8);
|
|
38107
|
+
var ug = u | g;
|
|
38108
|
+
var ret = (mod & o) ||
|
|
38109
|
+
(mod & g) && gid === myGid ||
|
|
38110
|
+
(mod & u) && uid === myUid ||
|
|
38111
|
+
(mod & ug) && myUid === 0;
|
|
38112
|
+
return ret
|
|
38113
|
+
}
|
|
38114
|
+
return mode;
|
|
38115
|
+
}
|
|
38116
|
+
|
|
38117
|
+
var isexe_1;
|
|
38118
|
+
var hasRequiredIsexe;
|
|
38119
|
+
|
|
38120
|
+
function requireIsexe () {
|
|
38121
|
+
if (hasRequiredIsexe) return isexe_1;
|
|
38122
|
+
hasRequiredIsexe = 1;
|
|
38123
|
+
var core;
|
|
38124
|
+
if (process.platform === 'win32' || commonjsGlobal.TESTING_WINDOWS) {
|
|
38125
|
+
core = requireWindows();
|
|
38126
|
+
} else {
|
|
38127
|
+
core = requireMode();
|
|
38128
|
+
}
|
|
38129
|
+
isexe_1 = isexe;
|
|
38130
|
+
isexe.sync = sync;
|
|
38131
|
+
function isexe (path, options, cb) {
|
|
38132
|
+
if (typeof options === 'function') {
|
|
38133
|
+
cb = options;
|
|
38134
|
+
options = {};
|
|
38135
|
+
}
|
|
38136
|
+
if (!cb) {
|
|
38137
|
+
if (typeof Promise !== 'function') {
|
|
38138
|
+
throw new TypeError('callback not provided')
|
|
38139
|
+
}
|
|
38140
|
+
return new Promise(function (resolve, reject) {
|
|
38141
|
+
isexe(path, options || {}, function (er, is) {
|
|
38142
|
+
if (er) {
|
|
38143
|
+
reject(er);
|
|
38144
|
+
} else {
|
|
38145
|
+
resolve(is);
|
|
38146
|
+
}
|
|
38147
|
+
});
|
|
38148
|
+
})
|
|
38149
|
+
}
|
|
38150
|
+
core(path, options || {}, function (er, is) {
|
|
38151
|
+
if (er) {
|
|
38152
|
+
if (er.code === 'EACCES' || options && options.ignoreErrors) {
|
|
38153
|
+
er = null;
|
|
38154
|
+
is = false;
|
|
38155
|
+
}
|
|
38156
|
+
}
|
|
38157
|
+
cb(er, is);
|
|
38158
|
+
});
|
|
38159
|
+
}
|
|
38160
|
+
function sync (path, options) {
|
|
38161
|
+
try {
|
|
38162
|
+
return core.sync(path, options || {})
|
|
38163
|
+
} catch (er) {
|
|
38164
|
+
if (options && options.ignoreErrors || er.code === 'EACCES') {
|
|
38165
|
+
return false
|
|
38166
|
+
} else {
|
|
38167
|
+
throw er
|
|
38168
|
+
}
|
|
38169
|
+
}
|
|
38170
|
+
}
|
|
38171
|
+
return isexe_1;
|
|
38172
|
+
}
|
|
38173
|
+
|
|
38174
|
+
var which_1;
|
|
38175
|
+
var hasRequiredWhich;
|
|
38176
|
+
|
|
38177
|
+
function requireWhich () {
|
|
38178
|
+
if (hasRequiredWhich) return which_1;
|
|
38179
|
+
hasRequiredWhich = 1;
|
|
38180
|
+
const isWindows = process.platform === 'win32' ||
|
|
38181
|
+
process.env.OSTYPE === 'cygwin' ||
|
|
38182
|
+
process.env.OSTYPE === 'msys';
|
|
38183
|
+
const path = require$$0$4;
|
|
38184
|
+
const COLON = isWindows ? ';' : ':';
|
|
38185
|
+
const isexe = requireIsexe();
|
|
38186
|
+
const getNotFoundError = (cmd) =>
|
|
38187
|
+
Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' });
|
|
38188
|
+
const getPathInfo = (cmd, opt) => {
|
|
38189
|
+
const colon = opt.colon || COLON;
|
|
38190
|
+
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? ['']
|
|
38191
|
+
: (
|
|
38192
|
+
[
|
|
38193
|
+
...(isWindows ? [process.cwd()] : []),
|
|
38194
|
+
...(opt.path || process.env.PATH ||
|
|
38195
|
+
'').split(colon),
|
|
38196
|
+
]
|
|
38197
|
+
);
|
|
38198
|
+
const pathExtExe = isWindows
|
|
38199
|
+
? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'
|
|
38200
|
+
: '';
|
|
38201
|
+
const pathExt = isWindows ? pathExtExe.split(colon) : [''];
|
|
38202
|
+
if (isWindows) {
|
|
38203
|
+
if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
|
|
38204
|
+
pathExt.unshift('');
|
|
38205
|
+
}
|
|
38206
|
+
return {
|
|
38207
|
+
pathEnv,
|
|
38208
|
+
pathExt,
|
|
38209
|
+
pathExtExe,
|
|
38210
|
+
}
|
|
38211
|
+
};
|
|
38212
|
+
const which = (cmd, opt, cb) => {
|
|
38213
|
+
if (typeof opt === 'function') {
|
|
38214
|
+
cb = opt;
|
|
38215
|
+
opt = {};
|
|
38216
|
+
}
|
|
38217
|
+
if (!opt)
|
|
38218
|
+
opt = {};
|
|
38219
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
38220
|
+
const found = [];
|
|
38221
|
+
const step = i => new Promise((resolve, reject) => {
|
|
38222
|
+
if (i === pathEnv.length)
|
|
38223
|
+
return opt.all && found.length ? resolve(found)
|
|
38224
|
+
: reject(getNotFoundError(cmd))
|
|
38225
|
+
const ppRaw = pathEnv[i];
|
|
38226
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
38227
|
+
const pCmd = path.join(pathPart, cmd);
|
|
38228
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
|
|
38229
|
+
: pCmd;
|
|
38230
|
+
resolve(subStep(p, i, 0));
|
|
38231
|
+
});
|
|
38232
|
+
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
38233
|
+
if (ii === pathExt.length)
|
|
38234
|
+
return resolve(step(i + 1))
|
|
38235
|
+
const ext = pathExt[ii];
|
|
38236
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
38237
|
+
if (!er && is) {
|
|
38238
|
+
if (opt.all)
|
|
38239
|
+
found.push(p + ext);
|
|
38240
|
+
else
|
|
38241
|
+
return resolve(p + ext)
|
|
38242
|
+
}
|
|
38243
|
+
return resolve(subStep(p, i, ii + 1))
|
|
38244
|
+
});
|
|
38245
|
+
});
|
|
38246
|
+
return cb ? step(0).then(res => cb(null, res), cb) : step(0)
|
|
38247
|
+
};
|
|
38248
|
+
const whichSync = (cmd, opt) => {
|
|
38249
|
+
opt = opt || {};
|
|
38250
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
38251
|
+
const found = [];
|
|
38252
|
+
for (let i = 0; i < pathEnv.length; i ++) {
|
|
38253
|
+
const ppRaw = pathEnv[i];
|
|
38254
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
38255
|
+
const pCmd = path.join(pathPart, cmd);
|
|
38256
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
|
|
38257
|
+
: pCmd;
|
|
38258
|
+
for (let j = 0; j < pathExt.length; j ++) {
|
|
38259
|
+
const cur = p + pathExt[j];
|
|
38260
|
+
try {
|
|
38261
|
+
const is = isexe.sync(cur, { pathExt: pathExtExe });
|
|
38262
|
+
if (is) {
|
|
38263
|
+
if (opt.all)
|
|
38264
|
+
found.push(cur);
|
|
38265
|
+
else
|
|
38266
|
+
return cur
|
|
38267
|
+
}
|
|
38268
|
+
} catch (ex) {}
|
|
38269
|
+
}
|
|
38270
|
+
}
|
|
38271
|
+
if (opt.all && found.length)
|
|
38272
|
+
return found
|
|
38273
|
+
if (opt.nothrow)
|
|
38274
|
+
return null
|
|
38275
|
+
throw getNotFoundError(cmd)
|
|
38276
|
+
};
|
|
38277
|
+
which_1 = which;
|
|
38278
|
+
which.sync = whichSync;
|
|
38279
|
+
return which_1;
|
|
38280
|
+
}
|
|
38281
|
+
|
|
38282
|
+
var pathKey = {exports: {}};
|
|
38283
|
+
|
|
38284
|
+
var hasRequiredPathKey;
|
|
38285
|
+
|
|
38286
|
+
function requirePathKey () {
|
|
38287
|
+
if (hasRequiredPathKey) return pathKey.exports;
|
|
38288
|
+
hasRequiredPathKey = 1;
|
|
38289
|
+
const pathKey$1 = (options = {}) => {
|
|
38290
|
+
const environment = options.env || process.env;
|
|
38291
|
+
const platform = options.platform || process.platform;
|
|
38292
|
+
if (platform !== 'win32') {
|
|
38293
|
+
return 'PATH';
|
|
38294
|
+
}
|
|
38295
|
+
return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';
|
|
38296
|
+
};
|
|
38297
|
+
pathKey.exports = pathKey$1;
|
|
38298
|
+
pathKey.exports.default = pathKey$1;
|
|
38299
|
+
return pathKey.exports;
|
|
38300
|
+
}
|
|
38301
|
+
|
|
38302
|
+
var resolveCommand_1;
|
|
38303
|
+
var hasRequiredResolveCommand;
|
|
38304
|
+
|
|
38305
|
+
function requireResolveCommand () {
|
|
38306
|
+
if (hasRequiredResolveCommand) return resolveCommand_1;
|
|
38307
|
+
hasRequiredResolveCommand = 1;
|
|
38308
|
+
const path = require$$0$4;
|
|
38309
|
+
const which = requireWhich();
|
|
38310
|
+
const getPathKey = requirePathKey();
|
|
38311
|
+
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
38312
|
+
const env = parsed.options.env || process.env;
|
|
38313
|
+
const cwd = process.cwd();
|
|
38314
|
+
const hasCustomCwd = parsed.options.cwd != null;
|
|
38315
|
+
const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;
|
|
38316
|
+
if (shouldSwitchCwd) {
|
|
38317
|
+
try {
|
|
38318
|
+
process.chdir(parsed.options.cwd);
|
|
38319
|
+
} catch (err) {
|
|
38320
|
+
}
|
|
38321
|
+
}
|
|
38322
|
+
let resolved;
|
|
38323
|
+
try {
|
|
38324
|
+
resolved = which.sync(parsed.command, {
|
|
38325
|
+
path: env[getPathKey({ env })],
|
|
38326
|
+
pathExt: withoutPathExt ? path.delimiter : undefined,
|
|
38327
|
+
});
|
|
38328
|
+
} catch (e) {
|
|
38329
|
+
} finally {
|
|
38330
|
+
if (shouldSwitchCwd) {
|
|
38331
|
+
process.chdir(cwd);
|
|
38332
|
+
}
|
|
38333
|
+
}
|
|
38334
|
+
if (resolved) {
|
|
38335
|
+
resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);
|
|
38336
|
+
}
|
|
38337
|
+
return resolved;
|
|
38338
|
+
}
|
|
38339
|
+
function resolveCommand(parsed) {
|
|
38340
|
+
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
38341
|
+
}
|
|
38342
|
+
resolveCommand_1 = resolveCommand;
|
|
38343
|
+
return resolveCommand_1;
|
|
38344
|
+
}
|
|
38345
|
+
|
|
38346
|
+
var _escape = {};
|
|
38347
|
+
|
|
38348
|
+
var hasRequired_escape;
|
|
38349
|
+
|
|
38350
|
+
function require_escape () {
|
|
38351
|
+
if (hasRequired_escape) return _escape;
|
|
38352
|
+
hasRequired_escape = 1;
|
|
38353
|
+
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
38354
|
+
function escapeCommand(arg) {
|
|
38355
|
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
|
38356
|
+
return arg;
|
|
38357
|
+
}
|
|
38358
|
+
function escapeArgument(arg, doubleEscapeMetaChars) {
|
|
38359
|
+
arg = `${arg}`;
|
|
38360
|
+
arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
|
|
38361
|
+
arg = arg.replace(/(?=(\\+?)?)\1$/, '$1$1');
|
|
38362
|
+
arg = `"${arg}"`;
|
|
38363
|
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
|
38364
|
+
if (doubleEscapeMetaChars) {
|
|
38365
|
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
|
38366
|
+
}
|
|
38367
|
+
return arg;
|
|
38368
|
+
}
|
|
38369
|
+
_escape.command = escapeCommand;
|
|
38370
|
+
_escape.argument = escapeArgument;
|
|
38371
|
+
return _escape;
|
|
38372
|
+
}
|
|
38373
|
+
|
|
38374
|
+
var shebangRegex;
|
|
38375
|
+
var hasRequiredShebangRegex;
|
|
38376
|
+
|
|
38377
|
+
function requireShebangRegex () {
|
|
38378
|
+
if (hasRequiredShebangRegex) return shebangRegex;
|
|
38379
|
+
hasRequiredShebangRegex = 1;
|
|
38380
|
+
shebangRegex = /^#!(.*)/;
|
|
38381
|
+
return shebangRegex;
|
|
38382
|
+
}
|
|
38383
|
+
|
|
38384
|
+
var shebangCommand;
|
|
38385
|
+
var hasRequiredShebangCommand;
|
|
38386
|
+
|
|
38387
|
+
function requireShebangCommand () {
|
|
38388
|
+
if (hasRequiredShebangCommand) return shebangCommand;
|
|
38389
|
+
hasRequiredShebangCommand = 1;
|
|
38390
|
+
const shebangRegex = requireShebangRegex();
|
|
38391
|
+
shebangCommand = (string = '') => {
|
|
38392
|
+
const match = string.match(shebangRegex);
|
|
38393
|
+
if (!match) {
|
|
38394
|
+
return null;
|
|
38395
|
+
}
|
|
38396
|
+
const [path, argument] = match[0].replace(/#! ?/, '').split(' ');
|
|
38397
|
+
const binary = path.split('/').pop();
|
|
38398
|
+
if (binary === 'env') {
|
|
38399
|
+
return argument;
|
|
38400
|
+
}
|
|
38401
|
+
return argument ? `${binary} ${argument}` : binary;
|
|
38402
|
+
};
|
|
38403
|
+
return shebangCommand;
|
|
38404
|
+
}
|
|
38405
|
+
|
|
38406
|
+
var readShebang_1;
|
|
38407
|
+
var hasRequiredReadShebang;
|
|
38408
|
+
|
|
38409
|
+
function requireReadShebang () {
|
|
38410
|
+
if (hasRequiredReadShebang) return readShebang_1;
|
|
38411
|
+
hasRequiredReadShebang = 1;
|
|
38412
|
+
const fs = require$$0$3;
|
|
38413
|
+
const shebangCommand = requireShebangCommand();
|
|
38414
|
+
function readShebang(command) {
|
|
38415
|
+
const size = 150;
|
|
38416
|
+
const buffer = Buffer.alloc(size);
|
|
38417
|
+
let fd;
|
|
38418
|
+
try {
|
|
38419
|
+
fd = fs.openSync(command, 'r');
|
|
38420
|
+
fs.readSync(fd, buffer, 0, size, 0);
|
|
38421
|
+
fs.closeSync(fd);
|
|
38422
|
+
} catch (e) { }
|
|
38423
|
+
return shebangCommand(buffer.toString());
|
|
38424
|
+
}
|
|
38425
|
+
readShebang_1 = readShebang;
|
|
38426
|
+
return readShebang_1;
|
|
38427
|
+
}
|
|
38428
|
+
|
|
38429
|
+
var parse_1$1;
|
|
38430
|
+
var hasRequiredParse$1;
|
|
38431
|
+
|
|
38432
|
+
function requireParse$1 () {
|
|
38433
|
+
if (hasRequiredParse$1) return parse_1$1;
|
|
38434
|
+
hasRequiredParse$1 = 1;
|
|
38435
|
+
const path = require$$0$4;
|
|
38436
|
+
const resolveCommand = requireResolveCommand();
|
|
38437
|
+
const escape = require_escape();
|
|
38438
|
+
const readShebang = requireReadShebang();
|
|
38439
|
+
const isWin = process.platform === 'win32';
|
|
38440
|
+
const isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
38441
|
+
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
38442
|
+
function detectShebang(parsed) {
|
|
38443
|
+
parsed.file = resolveCommand(parsed);
|
|
38444
|
+
const shebang = parsed.file && readShebang(parsed.file);
|
|
38445
|
+
if (shebang) {
|
|
38446
|
+
parsed.args.unshift(parsed.file);
|
|
38447
|
+
parsed.command = shebang;
|
|
38448
|
+
return resolveCommand(parsed);
|
|
38449
|
+
}
|
|
38450
|
+
return parsed.file;
|
|
38451
|
+
}
|
|
38452
|
+
function parseNonShell(parsed) {
|
|
38453
|
+
if (!isWin) {
|
|
38454
|
+
return parsed;
|
|
38455
|
+
}
|
|
38456
|
+
const commandFile = detectShebang(parsed);
|
|
38457
|
+
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
38458
|
+
if (parsed.options.forceShell || needsShell) {
|
|
38459
|
+
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
38460
|
+
parsed.command = path.normalize(parsed.command);
|
|
38461
|
+
parsed.command = escape.command(parsed.command);
|
|
38462
|
+
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
38463
|
+
const shellCommand = [parsed.command].concat(parsed.args).join(' ');
|
|
38464
|
+
parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
|
|
38465
|
+
parsed.command = process.env.comspec || 'cmd.exe';
|
|
38466
|
+
parsed.options.windowsVerbatimArguments = true;
|
|
38467
|
+
}
|
|
38468
|
+
return parsed;
|
|
38469
|
+
}
|
|
38470
|
+
function parse(command, args, options) {
|
|
38471
|
+
if (args && !Array.isArray(args)) {
|
|
38472
|
+
options = args;
|
|
38473
|
+
args = null;
|
|
38474
|
+
}
|
|
38475
|
+
args = args ? args.slice(0) : [];
|
|
38476
|
+
options = Object.assign({}, options);
|
|
38477
|
+
const parsed = {
|
|
38478
|
+
command,
|
|
38479
|
+
args,
|
|
38480
|
+
options,
|
|
38481
|
+
file: undefined,
|
|
38482
|
+
original: {
|
|
38483
|
+
command,
|
|
38484
|
+
args,
|
|
38485
|
+
},
|
|
38486
|
+
};
|
|
38487
|
+
return options.shell ? parsed : parseNonShell(parsed);
|
|
38488
|
+
}
|
|
38489
|
+
parse_1$1 = parse;
|
|
38490
|
+
return parse_1$1;
|
|
38491
|
+
}
|
|
38492
|
+
|
|
38493
|
+
var enoent;
|
|
38494
|
+
var hasRequiredEnoent;
|
|
38495
|
+
|
|
38496
|
+
function requireEnoent () {
|
|
38497
|
+
if (hasRequiredEnoent) return enoent;
|
|
38498
|
+
hasRequiredEnoent = 1;
|
|
38499
|
+
const isWin = process.platform === 'win32';
|
|
38500
|
+
function notFoundError(original, syscall) {
|
|
38501
|
+
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
|
38502
|
+
code: 'ENOENT',
|
|
38503
|
+
errno: 'ENOENT',
|
|
38504
|
+
syscall: `${syscall} ${original.command}`,
|
|
38505
|
+
path: original.command,
|
|
38506
|
+
spawnargs: original.args,
|
|
38507
|
+
});
|
|
38508
|
+
}
|
|
38509
|
+
function hookChildProcess(cp, parsed) {
|
|
38510
|
+
if (!isWin) {
|
|
38511
|
+
return;
|
|
38512
|
+
}
|
|
38513
|
+
const originalEmit = cp.emit;
|
|
38514
|
+
cp.emit = function (name, arg1) {
|
|
38515
|
+
if (name === 'exit') {
|
|
38516
|
+
const err = verifyENOENT(arg1, parsed);
|
|
38517
|
+
if (err) {
|
|
38518
|
+
return originalEmit.call(cp, 'error', err);
|
|
38519
|
+
}
|
|
38520
|
+
}
|
|
38521
|
+
return originalEmit.apply(cp, arguments);
|
|
38522
|
+
};
|
|
38523
|
+
}
|
|
38524
|
+
function verifyENOENT(status, parsed) {
|
|
38525
|
+
if (isWin && status === 1 && !parsed.file) {
|
|
38526
|
+
return notFoundError(parsed.original, 'spawn');
|
|
38527
|
+
}
|
|
38528
|
+
return null;
|
|
38529
|
+
}
|
|
38530
|
+
function verifyENOENTSync(status, parsed) {
|
|
38531
|
+
if (isWin && status === 1 && !parsed.file) {
|
|
38532
|
+
return notFoundError(parsed.original, 'spawnSync');
|
|
38533
|
+
}
|
|
38534
|
+
return null;
|
|
38535
|
+
}
|
|
38536
|
+
enoent = {
|
|
38537
|
+
hookChildProcess,
|
|
38538
|
+
verifyENOENT,
|
|
38539
|
+
verifyENOENTSync,
|
|
38540
|
+
notFoundError,
|
|
38541
|
+
};
|
|
38542
|
+
return enoent;
|
|
38543
|
+
}
|
|
38544
|
+
|
|
38545
|
+
var hasRequiredCrossSpawn;
|
|
38546
|
+
|
|
38547
|
+
function requireCrossSpawn () {
|
|
38548
|
+
if (hasRequiredCrossSpawn) return crossSpawn.exports;
|
|
38549
|
+
hasRequiredCrossSpawn = 1;
|
|
38550
|
+
const cp = require$$0$5;
|
|
38551
|
+
const parse = requireParse$1();
|
|
38552
|
+
const enoent = requireEnoent();
|
|
38553
|
+
function spawn(command, args, options) {
|
|
38554
|
+
const parsed = parse(command, args, options);
|
|
38555
|
+
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
38556
|
+
enoent.hookChildProcess(spawned, parsed);
|
|
38557
|
+
return spawned;
|
|
38558
|
+
}
|
|
38559
|
+
function spawnSync(command, args, options) {
|
|
38560
|
+
const parsed = parse(command, args, options);
|
|
38561
|
+
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
38562
|
+
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
38563
|
+
return result;
|
|
38564
|
+
}
|
|
38565
|
+
crossSpawn.exports = spawn;
|
|
38566
|
+
crossSpawn.exports.spawn = spawn;
|
|
38567
|
+
crossSpawn.exports.sync = spawnSync;
|
|
38568
|
+
crossSpawn.exports._parse = parse;
|
|
38569
|
+
crossSpawn.exports._enoent = enoent;
|
|
38570
|
+
return crossSpawn.exports;
|
|
38571
|
+
}
|
|
38572
|
+
|
|
38573
|
+
var crossSpawnExports = requireCrossSpawn();
|
|
38574
|
+
var spawn = /*@__PURE__*/getDefaultExportFromCjs(crossSpawnExports);
|
|
38575
|
+
|
|
38576
|
+
const DEFAULT_INHERITED_ENV_VARS = process$2.platform === 'win32'
|
|
38577
|
+
? [
|
|
38578
|
+
'APPDATA',
|
|
38579
|
+
'HOMEDRIVE',
|
|
38580
|
+
'HOMEPATH',
|
|
38581
|
+
'LOCALAPPDATA',
|
|
38582
|
+
'PATH',
|
|
38583
|
+
'PROCESSOR_ARCHITECTURE',
|
|
38584
|
+
'SYSTEMDRIVE',
|
|
38585
|
+
'SYSTEMROOT',
|
|
38586
|
+
'TEMP',
|
|
38587
|
+
'USERNAME',
|
|
38588
|
+
'USERPROFILE',
|
|
38589
|
+
'PROGRAMFILES'
|
|
38590
|
+
]
|
|
38591
|
+
:
|
|
38592
|
+
['HOME', 'LOGNAME', 'PATH', 'SHELL', 'TERM', 'USER'];
|
|
38593
|
+
function getDefaultEnvironment() {
|
|
38594
|
+
const env = {};
|
|
38595
|
+
for (const key of DEFAULT_INHERITED_ENV_VARS) {
|
|
38596
|
+
const value = process$2.env[key];
|
|
38597
|
+
if (value === undefined) {
|
|
38598
|
+
continue;
|
|
38599
|
+
}
|
|
38600
|
+
if (value.startsWith('()')) {
|
|
38601
|
+
continue;
|
|
38602
|
+
}
|
|
38603
|
+
env[key] = value;
|
|
38604
|
+
}
|
|
38605
|
+
return env;
|
|
38606
|
+
}
|
|
38607
|
+
class StdioClientTransport {
|
|
38608
|
+
constructor(server) {
|
|
38609
|
+
this._readBuffer = new ReadBuffer();
|
|
38610
|
+
this._stderrStream = null;
|
|
38611
|
+
this._serverParams = server;
|
|
38612
|
+
if (server.stderr === 'pipe' || server.stderr === 'overlapped') {
|
|
38613
|
+
this._stderrStream = new PassThrough();
|
|
38614
|
+
}
|
|
38615
|
+
}
|
|
38616
|
+
async start() {
|
|
38617
|
+
if (this._process) {
|
|
38618
|
+
throw new Error('StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.');
|
|
38619
|
+
}
|
|
38620
|
+
return new Promise((resolve, reject) => {
|
|
38621
|
+
this._process = spawn(this._serverParams.command, this._serverParams.args ?? [], {
|
|
38622
|
+
env: {
|
|
38623
|
+
...getDefaultEnvironment(),
|
|
38624
|
+
...this._serverParams.env
|
|
38625
|
+
},
|
|
38626
|
+
stdio: ['pipe', 'pipe', this._serverParams.stderr ?? 'inherit'],
|
|
38627
|
+
shell: false,
|
|
38628
|
+
windowsHide: process$2.platform === 'win32' && isElectron(),
|
|
38629
|
+
cwd: this._serverParams.cwd
|
|
38630
|
+
});
|
|
38631
|
+
this._process.on('error', error => {
|
|
38632
|
+
reject(error);
|
|
38633
|
+
this.onerror?.(error);
|
|
38634
|
+
});
|
|
38635
|
+
this._process.on('spawn', () => {
|
|
38636
|
+
resolve();
|
|
38637
|
+
});
|
|
38638
|
+
this._process.on('close', _code => {
|
|
38639
|
+
this._process = undefined;
|
|
38640
|
+
this.onclose?.();
|
|
38641
|
+
});
|
|
38642
|
+
this._process.stdin?.on('error', error => {
|
|
38643
|
+
this.onerror?.(error);
|
|
38644
|
+
});
|
|
38645
|
+
this._process.stdout?.on('data', chunk => {
|
|
38646
|
+
this._readBuffer.append(chunk);
|
|
38647
|
+
this.processReadBuffer();
|
|
38648
|
+
});
|
|
38649
|
+
this._process.stdout?.on('error', error => {
|
|
38650
|
+
this.onerror?.(error);
|
|
38651
|
+
});
|
|
38652
|
+
if (this._stderrStream && this._process.stderr) {
|
|
38653
|
+
this._process.stderr.pipe(this._stderrStream);
|
|
38654
|
+
}
|
|
38655
|
+
});
|
|
38656
|
+
}
|
|
38657
|
+
get stderr() {
|
|
38658
|
+
if (this._stderrStream) {
|
|
38659
|
+
return this._stderrStream;
|
|
38660
|
+
}
|
|
38661
|
+
return this._process?.stderr ?? null;
|
|
38662
|
+
}
|
|
38663
|
+
get pid() {
|
|
38664
|
+
return this._process?.pid ?? null;
|
|
38665
|
+
}
|
|
38666
|
+
processReadBuffer() {
|
|
38667
|
+
while (true) {
|
|
38668
|
+
try {
|
|
38669
|
+
const message = this._readBuffer.readMessage();
|
|
38670
|
+
if (message === null) {
|
|
38671
|
+
break;
|
|
38672
|
+
}
|
|
38673
|
+
this.onmessage?.(message);
|
|
38674
|
+
}
|
|
38675
|
+
catch (error) {
|
|
38676
|
+
this.onerror?.(error);
|
|
38677
|
+
}
|
|
38678
|
+
}
|
|
38679
|
+
}
|
|
38680
|
+
async close() {
|
|
38681
|
+
if (this._process) {
|
|
38682
|
+
const processToClose = this._process;
|
|
38683
|
+
this._process = undefined;
|
|
38684
|
+
const closePromise = new Promise(resolve => {
|
|
38685
|
+
processToClose.once('close', () => {
|
|
38686
|
+
resolve();
|
|
38687
|
+
});
|
|
38688
|
+
});
|
|
38689
|
+
try {
|
|
38690
|
+
processToClose.stdin?.end();
|
|
38691
|
+
}
|
|
38692
|
+
catch {
|
|
38693
|
+
}
|
|
38694
|
+
await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);
|
|
38695
|
+
if (processToClose.exitCode === null) {
|
|
38696
|
+
try {
|
|
38697
|
+
processToClose.kill('SIGTERM');
|
|
38698
|
+
}
|
|
38699
|
+
catch {
|
|
38700
|
+
}
|
|
38701
|
+
await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]);
|
|
38702
|
+
}
|
|
38703
|
+
if (processToClose.exitCode === null) {
|
|
38704
|
+
try {
|
|
38705
|
+
processToClose.kill('SIGKILL');
|
|
38706
|
+
}
|
|
38707
|
+
catch {
|
|
38708
|
+
}
|
|
38709
|
+
}
|
|
38710
|
+
}
|
|
38711
|
+
this._readBuffer.clear();
|
|
38712
|
+
}
|
|
38713
|
+
send(message) {
|
|
38714
|
+
return new Promise(resolve => {
|
|
38715
|
+
if (!this._process?.stdin) {
|
|
38716
|
+
throw new Error('Not connected');
|
|
38717
|
+
}
|
|
38718
|
+
const json = serializeMessage(message);
|
|
38719
|
+
if (this._process.stdin.write(json)) {
|
|
38720
|
+
resolve();
|
|
38721
|
+
}
|
|
38722
|
+
else {
|
|
38723
|
+
this._process.stdin.once('drain', resolve);
|
|
38724
|
+
}
|
|
38725
|
+
});
|
|
38726
|
+
}
|
|
38727
|
+
}
|
|
38728
|
+
function isElectron() {
|
|
38729
|
+
return 'type' in process$2;
|
|
38730
|
+
}
|
|
38731
|
+
|
|
38732
|
+
class ExperimentalClientTasks {
|
|
38733
|
+
constructor(_client) {
|
|
38734
|
+
this._client = _client;
|
|
38735
|
+
}
|
|
38736
|
+
async *callToolStream(params, resultSchema = CallToolResultSchema, options) {
|
|
38737
|
+
const clientInternal = this._client;
|
|
38738
|
+
const optionsWithTask = {
|
|
38739
|
+
...options,
|
|
38740
|
+
task: options?.task ?? (clientInternal.isToolTask(params.name) ? {} : undefined)
|
|
38741
|
+
};
|
|
38742
|
+
const stream = clientInternal.requestStream({ method: 'tools/call', params }, resultSchema, optionsWithTask);
|
|
38743
|
+
const validator = clientInternal.getToolOutputValidator(params.name);
|
|
38744
|
+
for await (const message of stream) {
|
|
38745
|
+
if (message.type === 'result' && validator) {
|
|
38746
|
+
const result = message.result;
|
|
38747
|
+
if (!result.structuredContent && !result.isError) {
|
|
38748
|
+
yield {
|
|
38749
|
+
type: 'error',
|
|
38750
|
+
error: new McpError(ErrorCode$1.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`)
|
|
38751
|
+
};
|
|
38752
|
+
return;
|
|
38753
|
+
}
|
|
38754
|
+
if (result.structuredContent) {
|
|
38755
|
+
try {
|
|
38756
|
+
const validationResult = validator(result.structuredContent);
|
|
38757
|
+
if (!validationResult.valid) {
|
|
38758
|
+
yield {
|
|
38759
|
+
type: 'error',
|
|
38760
|
+
error: new McpError(ErrorCode$1.InvalidParams, `Structured content does not match the tool's output schema: ${validationResult.errorMessage}`)
|
|
38761
|
+
};
|
|
38762
|
+
return;
|
|
38763
|
+
}
|
|
38764
|
+
}
|
|
38765
|
+
catch (error) {
|
|
38766
|
+
if (error instanceof McpError) {
|
|
38767
|
+
yield { type: 'error', error };
|
|
38768
|
+
return;
|
|
38769
|
+
}
|
|
38770
|
+
yield {
|
|
38771
|
+
type: 'error',
|
|
38772
|
+
error: new McpError(ErrorCode$1.InvalidParams, `Failed to validate structured content: ${error instanceof Error ? error.message : String(error)}`)
|
|
38773
|
+
};
|
|
38774
|
+
return;
|
|
38775
|
+
}
|
|
38776
|
+
}
|
|
38777
|
+
}
|
|
38778
|
+
yield message;
|
|
38779
|
+
}
|
|
38780
|
+
}
|
|
38781
|
+
async getTask(taskId, options) {
|
|
38782
|
+
return this._client.getTask({ taskId }, options);
|
|
38783
|
+
}
|
|
38784
|
+
async getTaskResult(taskId, resultSchema, options) {
|
|
38785
|
+
return this._client.getTaskResult({ taskId }, resultSchema, options);
|
|
38786
|
+
}
|
|
38787
|
+
async listTasks(cursor, options) {
|
|
38788
|
+
return this._client.listTasks(cursor ? { cursor } : undefined, options);
|
|
38789
|
+
}
|
|
38790
|
+
async cancelTask(taskId, options) {
|
|
38791
|
+
return this._client.cancelTask({ taskId }, options);
|
|
38792
|
+
}
|
|
38793
|
+
requestStream(request, resultSchema, options) {
|
|
38794
|
+
return this._client.requestStream(request, resultSchema, options);
|
|
38795
|
+
}
|
|
38796
|
+
}
|
|
38797
|
+
|
|
38798
|
+
function applyElicitationDefaults(schema, data) {
|
|
38799
|
+
if (!schema || data === null || typeof data !== 'object')
|
|
38800
|
+
return;
|
|
38801
|
+
if (schema.type === 'object' && schema.properties && typeof schema.properties === 'object') {
|
|
38802
|
+
const obj = data;
|
|
38803
|
+
const props = schema.properties;
|
|
38804
|
+
for (const key of Object.keys(props)) {
|
|
38805
|
+
const propSchema = props[key];
|
|
38806
|
+
if (obj[key] === undefined && Object.prototype.hasOwnProperty.call(propSchema, 'default')) {
|
|
38807
|
+
obj[key] = propSchema.default;
|
|
38808
|
+
}
|
|
38809
|
+
if (obj[key] !== undefined) {
|
|
38810
|
+
applyElicitationDefaults(propSchema, obj[key]);
|
|
38811
|
+
}
|
|
38812
|
+
}
|
|
38813
|
+
}
|
|
38814
|
+
if (Array.isArray(schema.anyOf)) {
|
|
38815
|
+
for (const sub of schema.anyOf) {
|
|
38816
|
+
if (typeof sub !== 'boolean') {
|
|
38817
|
+
applyElicitationDefaults(sub, data);
|
|
38818
|
+
}
|
|
38819
|
+
}
|
|
38820
|
+
}
|
|
38821
|
+
if (Array.isArray(schema.oneOf)) {
|
|
38822
|
+
for (const sub of schema.oneOf) {
|
|
38823
|
+
if (typeof sub !== 'boolean') {
|
|
38824
|
+
applyElicitationDefaults(sub, data);
|
|
38825
|
+
}
|
|
38826
|
+
}
|
|
38827
|
+
}
|
|
38828
|
+
}
|
|
38829
|
+
function getSupportedElicitationModes(capabilities) {
|
|
38830
|
+
if (!capabilities) {
|
|
38831
|
+
return { supportsFormMode: false, supportsUrlMode: false };
|
|
38832
|
+
}
|
|
38833
|
+
const hasFormCapability = capabilities.form !== undefined;
|
|
38834
|
+
const hasUrlCapability = capabilities.url !== undefined;
|
|
38835
|
+
const supportsFormMode = hasFormCapability || (!hasFormCapability && !hasUrlCapability);
|
|
38836
|
+
const supportsUrlMode = hasUrlCapability;
|
|
38837
|
+
return { supportsFormMode, supportsUrlMode };
|
|
38838
|
+
}
|
|
38839
|
+
let Client$1 = class Client extends Protocol {
|
|
38840
|
+
constructor(_clientInfo, options) {
|
|
38841
|
+
super(options);
|
|
38842
|
+
this._clientInfo = _clientInfo;
|
|
38843
|
+
this._cachedToolOutputValidators = new Map();
|
|
38844
|
+
this._cachedKnownTaskTools = new Set();
|
|
38845
|
+
this._cachedRequiredTaskTools = new Set();
|
|
38846
|
+
this._listChangedDebounceTimers = new Map();
|
|
38847
|
+
this._capabilities = options?.capabilities ?? {};
|
|
38848
|
+
this._jsonSchemaValidator = options?.jsonSchemaValidator ?? new AjvJsonSchemaValidator();
|
|
38849
|
+
if (options?.listChanged) {
|
|
38850
|
+
this._pendingListChangedConfig = options.listChanged;
|
|
38851
|
+
}
|
|
38852
|
+
}
|
|
38853
|
+
_setupListChangedHandlers(config) {
|
|
38854
|
+
if (config.tools && this._serverCapabilities?.tools?.listChanged) {
|
|
38855
|
+
this._setupListChangedHandler('tools', ToolListChangedNotificationSchema, config.tools, async () => {
|
|
38856
|
+
const result = await this.listTools();
|
|
38857
|
+
return result.tools;
|
|
38858
|
+
});
|
|
38859
|
+
}
|
|
38860
|
+
if (config.prompts && this._serverCapabilities?.prompts?.listChanged) {
|
|
38861
|
+
this._setupListChangedHandler('prompts', PromptListChangedNotificationSchema, config.prompts, async () => {
|
|
38862
|
+
const result = await this.listPrompts();
|
|
38863
|
+
return result.prompts;
|
|
38864
|
+
});
|
|
38865
|
+
}
|
|
38866
|
+
if (config.resources && this._serverCapabilities?.resources?.listChanged) {
|
|
38867
|
+
this._setupListChangedHandler('resources', ResourceListChangedNotificationSchema, config.resources, async () => {
|
|
38868
|
+
const result = await this.listResources();
|
|
38869
|
+
return result.resources;
|
|
38870
|
+
});
|
|
38871
|
+
}
|
|
38872
|
+
}
|
|
38873
|
+
get experimental() {
|
|
38874
|
+
if (!this._experimental) {
|
|
38875
|
+
this._experimental = {
|
|
38876
|
+
tasks: new ExperimentalClientTasks(this)
|
|
38877
|
+
};
|
|
38878
|
+
}
|
|
38879
|
+
return this._experimental;
|
|
38880
|
+
}
|
|
38881
|
+
registerCapabilities(capabilities) {
|
|
38882
|
+
if (this.transport) {
|
|
38883
|
+
throw new Error('Cannot register capabilities after connecting to transport');
|
|
38884
|
+
}
|
|
38885
|
+
this._capabilities = mergeCapabilities(this._capabilities, capabilities);
|
|
38886
|
+
}
|
|
38887
|
+
setRequestHandler(requestSchema, handler) {
|
|
38888
|
+
const shape = getObjectShape(requestSchema);
|
|
38889
|
+
const methodSchema = shape?.method;
|
|
38890
|
+
if (!methodSchema) {
|
|
38891
|
+
throw new Error('Schema is missing a method literal');
|
|
38892
|
+
}
|
|
38893
|
+
let methodValue;
|
|
38894
|
+
if (isZ4Schema(methodSchema)) {
|
|
38895
|
+
const v4Schema = methodSchema;
|
|
38896
|
+
const v4Def = v4Schema._zod?.def;
|
|
38897
|
+
methodValue = v4Def?.value ?? v4Schema.value;
|
|
38898
|
+
}
|
|
38899
|
+
else {
|
|
38900
|
+
const v3Schema = methodSchema;
|
|
38901
|
+
const legacyDef = v3Schema._def;
|
|
38902
|
+
methodValue = legacyDef?.value ?? v3Schema.value;
|
|
38903
|
+
}
|
|
38904
|
+
if (typeof methodValue !== 'string') {
|
|
38905
|
+
throw new Error('Schema method literal must be a string');
|
|
38906
|
+
}
|
|
38907
|
+
const method = methodValue;
|
|
38908
|
+
if (method === 'elicitation/create') {
|
|
38909
|
+
const wrappedHandler = async (request, extra) => {
|
|
38910
|
+
const validatedRequest = safeParse$1(ElicitRequestSchema, request);
|
|
38911
|
+
if (!validatedRequest.success) {
|
|
38912
|
+
const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error);
|
|
38913
|
+
throw new McpError(ErrorCode$1.InvalidParams, `Invalid elicitation request: ${errorMessage}`);
|
|
38914
|
+
}
|
|
38915
|
+
const { params } = validatedRequest.data;
|
|
38916
|
+
params.mode = params.mode ?? 'form';
|
|
38917
|
+
const { supportsFormMode, supportsUrlMode } = getSupportedElicitationModes(this._capabilities.elicitation);
|
|
38918
|
+
if (params.mode === 'form' && !supportsFormMode) {
|
|
38919
|
+
throw new McpError(ErrorCode$1.InvalidParams, 'Client does not support form-mode elicitation requests');
|
|
38920
|
+
}
|
|
38921
|
+
if (params.mode === 'url' && !supportsUrlMode) {
|
|
38922
|
+
throw new McpError(ErrorCode$1.InvalidParams, 'Client does not support URL-mode elicitation requests');
|
|
38923
|
+
}
|
|
38924
|
+
const result = await Promise.resolve(handler(request, extra));
|
|
38925
|
+
if (params.task) {
|
|
38926
|
+
const taskValidationResult = safeParse$1(CreateTaskResultSchema, result);
|
|
38927
|
+
if (!taskValidationResult.success) {
|
|
38928
|
+
const errorMessage = taskValidationResult.error instanceof Error
|
|
38929
|
+
? taskValidationResult.error.message
|
|
38930
|
+
: String(taskValidationResult.error);
|
|
38931
|
+
throw new McpError(ErrorCode$1.InvalidParams, `Invalid task creation result: ${errorMessage}`);
|
|
38932
|
+
}
|
|
38933
|
+
return taskValidationResult.data;
|
|
38934
|
+
}
|
|
38935
|
+
const validationResult = safeParse$1(ElicitResultSchema, result);
|
|
38936
|
+
if (!validationResult.success) {
|
|
38937
|
+
const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
|
|
38938
|
+
throw new McpError(ErrorCode$1.InvalidParams, `Invalid elicitation result: ${errorMessage}`);
|
|
38939
|
+
}
|
|
38940
|
+
const validatedResult = validationResult.data;
|
|
38941
|
+
const requestedSchema = params.mode === 'form' ? params.requestedSchema : undefined;
|
|
38942
|
+
if (params.mode === 'form' && validatedResult.action === 'accept' && validatedResult.content && requestedSchema) {
|
|
38943
|
+
if (this._capabilities.elicitation?.form?.applyDefaults) {
|
|
38944
|
+
try {
|
|
38945
|
+
applyElicitationDefaults(requestedSchema, validatedResult.content);
|
|
38946
|
+
}
|
|
38947
|
+
catch {
|
|
38948
|
+
}
|
|
38949
|
+
}
|
|
38950
|
+
}
|
|
38951
|
+
return validatedResult;
|
|
38952
|
+
};
|
|
38953
|
+
return super.setRequestHandler(requestSchema, wrappedHandler);
|
|
38954
|
+
}
|
|
38955
|
+
if (method === 'sampling/createMessage') {
|
|
38956
|
+
const wrappedHandler = async (request, extra) => {
|
|
38957
|
+
const validatedRequest = safeParse$1(CreateMessageRequestSchema, request);
|
|
38958
|
+
if (!validatedRequest.success) {
|
|
38959
|
+
const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error);
|
|
38960
|
+
throw new McpError(ErrorCode$1.InvalidParams, `Invalid sampling request: ${errorMessage}`);
|
|
38961
|
+
}
|
|
38962
|
+
const { params } = validatedRequest.data;
|
|
38963
|
+
const result = await Promise.resolve(handler(request, extra));
|
|
38964
|
+
if (params.task) {
|
|
38965
|
+
const taskValidationResult = safeParse$1(CreateTaskResultSchema, result);
|
|
38966
|
+
if (!taskValidationResult.success) {
|
|
38967
|
+
const errorMessage = taskValidationResult.error instanceof Error
|
|
38968
|
+
? taskValidationResult.error.message
|
|
38969
|
+
: String(taskValidationResult.error);
|
|
38970
|
+
throw new McpError(ErrorCode$1.InvalidParams, `Invalid task creation result: ${errorMessage}`);
|
|
38971
|
+
}
|
|
38972
|
+
return taskValidationResult.data;
|
|
38973
|
+
}
|
|
38974
|
+
const hasTools = params.tools || params.toolChoice;
|
|
38975
|
+
const resultSchema = hasTools ? CreateMessageResultWithToolsSchema : CreateMessageResultSchema;
|
|
38976
|
+
const validationResult = safeParse$1(resultSchema, result);
|
|
38977
|
+
if (!validationResult.success) {
|
|
38978
|
+
const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
|
|
38979
|
+
throw new McpError(ErrorCode$1.InvalidParams, `Invalid sampling result: ${errorMessage}`);
|
|
38980
|
+
}
|
|
38981
|
+
return validationResult.data;
|
|
38982
|
+
};
|
|
38983
|
+
return super.setRequestHandler(requestSchema, wrappedHandler);
|
|
38984
|
+
}
|
|
38985
|
+
return super.setRequestHandler(requestSchema, handler);
|
|
38986
|
+
}
|
|
38987
|
+
assertCapability(capability, method) {
|
|
38988
|
+
if (!this._serverCapabilities?.[capability]) {
|
|
38989
|
+
throw new Error(`Server does not support ${capability} (required for ${method})`);
|
|
38990
|
+
}
|
|
38991
|
+
}
|
|
38992
|
+
async connect(transport, options) {
|
|
38993
|
+
await super.connect(transport);
|
|
38994
|
+
if (transport.sessionId !== undefined) {
|
|
38995
|
+
return;
|
|
38996
|
+
}
|
|
38997
|
+
try {
|
|
38998
|
+
const result = await this.request({
|
|
38999
|
+
method: 'initialize',
|
|
39000
|
+
params: {
|
|
39001
|
+
protocolVersion: LATEST_PROTOCOL_VERSION,
|
|
39002
|
+
capabilities: this._capabilities,
|
|
39003
|
+
clientInfo: this._clientInfo
|
|
39004
|
+
}
|
|
39005
|
+
}, InitializeResultSchema, options);
|
|
39006
|
+
if (result === undefined) {
|
|
39007
|
+
throw new Error(`Server sent invalid initialize result: ${result}`);
|
|
39008
|
+
}
|
|
39009
|
+
if (!SUPPORTED_PROTOCOL_VERSIONS.includes(result.protocolVersion)) {
|
|
39010
|
+
throw new Error(`Server's protocol version is not supported: ${result.protocolVersion}`);
|
|
39011
|
+
}
|
|
39012
|
+
this._serverCapabilities = result.capabilities;
|
|
39013
|
+
this._serverVersion = result.serverInfo;
|
|
39014
|
+
if (transport.setProtocolVersion) {
|
|
39015
|
+
transport.setProtocolVersion(result.protocolVersion);
|
|
39016
|
+
}
|
|
39017
|
+
this._instructions = result.instructions;
|
|
39018
|
+
await this.notification({
|
|
39019
|
+
method: 'notifications/initialized'
|
|
39020
|
+
});
|
|
39021
|
+
if (this._pendingListChangedConfig) {
|
|
39022
|
+
this._setupListChangedHandlers(this._pendingListChangedConfig);
|
|
39023
|
+
this._pendingListChangedConfig = undefined;
|
|
39024
|
+
}
|
|
39025
|
+
}
|
|
39026
|
+
catch (error) {
|
|
39027
|
+
void this.close();
|
|
39028
|
+
throw error;
|
|
39029
|
+
}
|
|
39030
|
+
}
|
|
39031
|
+
getServerCapabilities() {
|
|
39032
|
+
return this._serverCapabilities;
|
|
39033
|
+
}
|
|
39034
|
+
getServerVersion() {
|
|
39035
|
+
return this._serverVersion;
|
|
39036
|
+
}
|
|
39037
|
+
getInstructions() {
|
|
39038
|
+
return this._instructions;
|
|
39039
|
+
}
|
|
39040
|
+
assertCapabilityForMethod(method) {
|
|
39041
|
+
switch (method) {
|
|
39042
|
+
case 'logging/setLevel':
|
|
39043
|
+
if (!this._serverCapabilities?.logging) {
|
|
39044
|
+
throw new Error(`Server does not support logging (required for ${method})`);
|
|
39045
|
+
}
|
|
39046
|
+
break;
|
|
39047
|
+
case 'prompts/get':
|
|
39048
|
+
case 'prompts/list':
|
|
39049
|
+
if (!this._serverCapabilities?.prompts) {
|
|
39050
|
+
throw new Error(`Server does not support prompts (required for ${method})`);
|
|
39051
|
+
}
|
|
39052
|
+
break;
|
|
39053
|
+
case 'resources/list':
|
|
39054
|
+
case 'resources/templates/list':
|
|
39055
|
+
case 'resources/read':
|
|
39056
|
+
case 'resources/subscribe':
|
|
39057
|
+
case 'resources/unsubscribe':
|
|
39058
|
+
if (!this._serverCapabilities?.resources) {
|
|
39059
|
+
throw new Error(`Server does not support resources (required for ${method})`);
|
|
39060
|
+
}
|
|
39061
|
+
if (method === 'resources/subscribe' && !this._serverCapabilities.resources.subscribe) {
|
|
39062
|
+
throw new Error(`Server does not support resource subscriptions (required for ${method})`);
|
|
39063
|
+
}
|
|
39064
|
+
break;
|
|
39065
|
+
case 'tools/call':
|
|
39066
|
+
case 'tools/list':
|
|
39067
|
+
if (!this._serverCapabilities?.tools) {
|
|
39068
|
+
throw new Error(`Server does not support tools (required for ${method})`);
|
|
39069
|
+
}
|
|
39070
|
+
break;
|
|
39071
|
+
case 'completion/complete':
|
|
39072
|
+
if (!this._serverCapabilities?.completions) {
|
|
39073
|
+
throw new Error(`Server does not support completions (required for ${method})`);
|
|
39074
|
+
}
|
|
39075
|
+
break;
|
|
39076
|
+
}
|
|
39077
|
+
}
|
|
39078
|
+
assertNotificationCapability(method) {
|
|
39079
|
+
switch (method) {
|
|
39080
|
+
case 'notifications/roots/list_changed':
|
|
39081
|
+
if (!this._capabilities.roots?.listChanged) {
|
|
39082
|
+
throw new Error(`Client does not support roots list changed notifications (required for ${method})`);
|
|
39083
|
+
}
|
|
39084
|
+
break;
|
|
39085
|
+
}
|
|
39086
|
+
}
|
|
39087
|
+
assertRequestHandlerCapability(method) {
|
|
39088
|
+
if (!this._capabilities) {
|
|
39089
|
+
return;
|
|
39090
|
+
}
|
|
39091
|
+
switch (method) {
|
|
39092
|
+
case 'sampling/createMessage':
|
|
39093
|
+
if (!this._capabilities.sampling) {
|
|
39094
|
+
throw new Error(`Client does not support sampling capability (required for ${method})`);
|
|
39095
|
+
}
|
|
39096
|
+
break;
|
|
39097
|
+
case 'elicitation/create':
|
|
39098
|
+
if (!this._capabilities.elicitation) {
|
|
39099
|
+
throw new Error(`Client does not support elicitation capability (required for ${method})`);
|
|
39100
|
+
}
|
|
39101
|
+
break;
|
|
39102
|
+
case 'roots/list':
|
|
39103
|
+
if (!this._capabilities.roots) {
|
|
39104
|
+
throw new Error(`Client does not support roots capability (required for ${method})`);
|
|
39105
|
+
}
|
|
39106
|
+
break;
|
|
39107
|
+
case 'tasks/get':
|
|
39108
|
+
case 'tasks/list':
|
|
39109
|
+
case 'tasks/result':
|
|
39110
|
+
case 'tasks/cancel':
|
|
39111
|
+
if (!this._capabilities.tasks) {
|
|
39112
|
+
throw new Error(`Client does not support tasks capability (required for ${method})`);
|
|
39113
|
+
}
|
|
39114
|
+
break;
|
|
39115
|
+
}
|
|
39116
|
+
}
|
|
39117
|
+
assertTaskCapability(method) {
|
|
39118
|
+
assertToolsCallTaskCapability(this._serverCapabilities?.tasks?.requests, method, 'Server');
|
|
39119
|
+
}
|
|
39120
|
+
assertTaskHandlerCapability(method) {
|
|
39121
|
+
if (!this._capabilities) {
|
|
39122
|
+
return;
|
|
39123
|
+
}
|
|
39124
|
+
assertClientRequestTaskCapability(this._capabilities.tasks?.requests, method, 'Client');
|
|
39125
|
+
}
|
|
39126
|
+
async ping(options) {
|
|
39127
|
+
return this.request({ method: 'ping' }, EmptyResultSchema, options);
|
|
39128
|
+
}
|
|
39129
|
+
async complete(params, options) {
|
|
39130
|
+
return this.request({ method: 'completion/complete', params }, CompleteResultSchema, options);
|
|
39131
|
+
}
|
|
39132
|
+
async setLoggingLevel(level, options) {
|
|
39133
|
+
return this.request({ method: 'logging/setLevel', params: { level } }, EmptyResultSchema, options);
|
|
39134
|
+
}
|
|
39135
|
+
async getPrompt(params, options) {
|
|
39136
|
+
return this.request({ method: 'prompts/get', params }, GetPromptResultSchema, options);
|
|
39137
|
+
}
|
|
39138
|
+
async listPrompts(params, options) {
|
|
39139
|
+
return this.request({ method: 'prompts/list', params }, ListPromptsResultSchema, options);
|
|
39140
|
+
}
|
|
39141
|
+
async listResources(params, options) {
|
|
39142
|
+
return this.request({ method: 'resources/list', params }, ListResourcesResultSchema, options);
|
|
39143
|
+
}
|
|
39144
|
+
async listResourceTemplates(params, options) {
|
|
39145
|
+
return this.request({ method: 'resources/templates/list', params }, ListResourceTemplatesResultSchema, options);
|
|
39146
|
+
}
|
|
39147
|
+
async readResource(params, options) {
|
|
39148
|
+
return this.request({ method: 'resources/read', params }, ReadResourceResultSchema, options);
|
|
39149
|
+
}
|
|
39150
|
+
async subscribeResource(params, options) {
|
|
39151
|
+
return this.request({ method: 'resources/subscribe', params }, EmptyResultSchema, options);
|
|
39152
|
+
}
|
|
39153
|
+
async unsubscribeResource(params, options) {
|
|
39154
|
+
return this.request({ method: 'resources/unsubscribe', params }, EmptyResultSchema, options);
|
|
39155
|
+
}
|
|
39156
|
+
async callTool(params, resultSchema = CallToolResultSchema, options) {
|
|
39157
|
+
if (this.isToolTaskRequired(params.name)) {
|
|
39158
|
+
throw new McpError(ErrorCode$1.InvalidRequest, `Tool "${params.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);
|
|
39159
|
+
}
|
|
39160
|
+
const result = await this.request({ method: 'tools/call', params }, resultSchema, options);
|
|
39161
|
+
const validator = this.getToolOutputValidator(params.name);
|
|
39162
|
+
if (validator) {
|
|
39163
|
+
if (!result.structuredContent && !result.isError) {
|
|
39164
|
+
throw new McpError(ErrorCode$1.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`);
|
|
39165
|
+
}
|
|
39166
|
+
if (result.structuredContent) {
|
|
39167
|
+
try {
|
|
39168
|
+
const validationResult = validator(result.structuredContent);
|
|
39169
|
+
if (!validationResult.valid) {
|
|
39170
|
+
throw new McpError(ErrorCode$1.InvalidParams, `Structured content does not match the tool's output schema: ${validationResult.errorMessage}`);
|
|
39171
|
+
}
|
|
39172
|
+
}
|
|
39173
|
+
catch (error) {
|
|
39174
|
+
if (error instanceof McpError) {
|
|
39175
|
+
throw error;
|
|
39176
|
+
}
|
|
39177
|
+
throw new McpError(ErrorCode$1.InvalidParams, `Failed to validate structured content: ${error instanceof Error ? error.message : String(error)}`);
|
|
39178
|
+
}
|
|
39179
|
+
}
|
|
39180
|
+
}
|
|
39181
|
+
return result;
|
|
39182
|
+
}
|
|
39183
|
+
isToolTask(toolName) {
|
|
39184
|
+
if (!this._serverCapabilities?.tasks?.requests?.tools?.call) {
|
|
39185
|
+
return false;
|
|
39186
|
+
}
|
|
39187
|
+
return this._cachedKnownTaskTools.has(toolName);
|
|
39188
|
+
}
|
|
39189
|
+
isToolTaskRequired(toolName) {
|
|
39190
|
+
return this._cachedRequiredTaskTools.has(toolName);
|
|
39191
|
+
}
|
|
39192
|
+
cacheToolMetadata(tools) {
|
|
39193
|
+
this._cachedToolOutputValidators.clear();
|
|
39194
|
+
this._cachedKnownTaskTools.clear();
|
|
39195
|
+
this._cachedRequiredTaskTools.clear();
|
|
39196
|
+
for (const tool of tools) {
|
|
39197
|
+
if (tool.outputSchema) {
|
|
39198
|
+
const toolValidator = this._jsonSchemaValidator.getValidator(tool.outputSchema);
|
|
39199
|
+
this._cachedToolOutputValidators.set(tool.name, toolValidator);
|
|
39200
|
+
}
|
|
39201
|
+
const taskSupport = tool.execution?.taskSupport;
|
|
39202
|
+
if (taskSupport === 'required' || taskSupport === 'optional') {
|
|
39203
|
+
this._cachedKnownTaskTools.add(tool.name);
|
|
39204
|
+
}
|
|
39205
|
+
if (taskSupport === 'required') {
|
|
39206
|
+
this._cachedRequiredTaskTools.add(tool.name);
|
|
39207
|
+
}
|
|
39208
|
+
}
|
|
39209
|
+
}
|
|
39210
|
+
getToolOutputValidator(toolName) {
|
|
39211
|
+
return this._cachedToolOutputValidators.get(toolName);
|
|
39212
|
+
}
|
|
39213
|
+
async listTools(params, options) {
|
|
39214
|
+
const result = await this.request({ method: 'tools/list', params }, ListToolsResultSchema, options);
|
|
39215
|
+
this.cacheToolMetadata(result.tools);
|
|
39216
|
+
return result;
|
|
39217
|
+
}
|
|
39218
|
+
_setupListChangedHandler(listType, notificationSchema, options, fetcher) {
|
|
39219
|
+
const parseResult = ListChangedOptionsBaseSchema.safeParse(options);
|
|
39220
|
+
if (!parseResult.success) {
|
|
39221
|
+
throw new Error(`Invalid ${listType} listChanged options: ${parseResult.error.message}`);
|
|
39222
|
+
}
|
|
39223
|
+
if (typeof options.onChanged !== 'function') {
|
|
39224
|
+
throw new Error(`Invalid ${listType} listChanged options: onChanged must be a function`);
|
|
39225
|
+
}
|
|
39226
|
+
const { autoRefresh, debounceMs } = parseResult.data;
|
|
39227
|
+
const { onChanged } = options;
|
|
39228
|
+
const refresh = async () => {
|
|
39229
|
+
if (!autoRefresh) {
|
|
39230
|
+
onChanged(null, null);
|
|
39231
|
+
return;
|
|
39232
|
+
}
|
|
39233
|
+
try {
|
|
39234
|
+
const items = await fetcher();
|
|
39235
|
+
onChanged(null, items);
|
|
39236
|
+
}
|
|
39237
|
+
catch (e) {
|
|
39238
|
+
const error = e instanceof Error ? e : new Error(String(e));
|
|
39239
|
+
onChanged(error, null);
|
|
39240
|
+
}
|
|
39241
|
+
};
|
|
39242
|
+
const handler = () => {
|
|
39243
|
+
if (debounceMs) {
|
|
39244
|
+
const existingTimer = this._listChangedDebounceTimers.get(listType);
|
|
39245
|
+
if (existingTimer) {
|
|
39246
|
+
clearTimeout(existingTimer);
|
|
39247
|
+
}
|
|
39248
|
+
const timer = setTimeout(refresh, debounceMs);
|
|
39249
|
+
this._listChangedDebounceTimers.set(listType, timer);
|
|
39250
|
+
}
|
|
39251
|
+
else {
|
|
39252
|
+
refresh();
|
|
39253
|
+
}
|
|
39254
|
+
};
|
|
39255
|
+
this.setNotificationHandler(notificationSchema, handler);
|
|
39256
|
+
}
|
|
39257
|
+
async sendRootsListChanged() {
|
|
39258
|
+
return this.notification({ method: 'notifications/roots/list_changed' });
|
|
39259
|
+
}
|
|
39260
|
+
};
|
|
39261
|
+
|
|
37968
39262
|
/**
|
|
37969
39263
|
Apache License
|
|
37970
39264
|
Version 2.0, January 2004
|
|
@@ -40599,7 +41893,7 @@ function mergeUint8Arrays(items) {
|
|
|
40599
41893
|
* Copyright 2025 Google Inc.
|
|
40600
41894
|
* SPDX-License-Identifier: Apache-2.0
|
|
40601
41895
|
*/
|
|
40602
|
-
const packageVersion = '24.
|
|
41896
|
+
const packageVersion = '24.39.0';
|
|
40603
41897
|
|
|
40604
41898
|
/**
|
|
40605
41899
|
* @license
|
|
@@ -52110,6 +53404,11 @@ class CdpPage extends Page {
|
|
|
52110
53404
|
const devtoolsPage = await browser._createDevToolsPage(pageTargetId);
|
|
52111
53405
|
return devtoolsPage;
|
|
52112
53406
|
}
|
|
53407
|
+
async hasDevTools() {
|
|
53408
|
+
const browser = this.browser();
|
|
53409
|
+
const targetId = await browser._hasDevToolsTarget(this.target()._targetId);
|
|
53410
|
+
return Boolean(targetId);
|
|
53411
|
+
}
|
|
52113
53412
|
async waitForFileChooser(options = {}) {
|
|
52114
53413
|
const needsEnable = this.#fileChooserDeferreds.size === 0;
|
|
52115
53414
|
const { timeout = this._timeoutSettings.timeout() } = options;
|
|
@@ -52249,7 +53548,7 @@ class CdpPage extends Page {
|
|
|
52249
53548
|
partitionKey: cookie.partitionKey
|
|
52250
53549
|
? cookie.partitionKey.topLevelSite
|
|
52251
53550
|
: undefined,
|
|
52252
|
-
sameParty:
|
|
53551
|
+
sameParty: false,
|
|
52253
53552
|
};
|
|
52254
53553
|
});
|
|
52255
53554
|
}
|
|
@@ -52863,7 +54162,7 @@ class CdpBrowserContext extends BrowserContext {
|
|
|
52863
54162
|
hasCrossSiteAncestor: cookie.partitionKey.hasCrossSiteAncestor,
|
|
52864
54163
|
}
|
|
52865
54164
|
: undefined,
|
|
52866
|
-
sameParty:
|
|
54165
|
+
sameParty: false,
|
|
52867
54166
|
};
|
|
52868
54167
|
});
|
|
52869
54168
|
}
|
|
@@ -53585,6 +54884,12 @@ class CdpBrowser extends Browser$1 {
|
|
|
53585
54884
|
}
|
|
53586
54885
|
return page;
|
|
53587
54886
|
}
|
|
54887
|
+
async _hasDevToolsTarget(pageTargetId) {
|
|
54888
|
+
const response = await this.#connection.send('Target.getDevToolsTarget', {
|
|
54889
|
+
targetId: pageTargetId,
|
|
54890
|
+
});
|
|
54891
|
+
return response.targetId;
|
|
54892
|
+
}
|
|
53588
54893
|
async installExtension(path) {
|
|
53589
54894
|
const { id } = await this.#connection.send('Extensions.loadUnpacked', { path });
|
|
53590
54895
|
return id;
|
|
@@ -55541,9 +56846,9 @@ class Puppeteer {
|
|
|
55541
56846
|
* SPDX-License-Identifier: Apache-2.0
|
|
55542
56847
|
*/
|
|
55543
56848
|
const PUPPETEER_REVISIONS = Object.freeze({
|
|
55544
|
-
chrome: '
|
|
55545
|
-
'chrome-headless-shell': '
|
|
55546
|
-
firefox: '
|
|
56849
|
+
chrome: '146.0.7680.66',
|
|
56850
|
+
'chrome-headless-shell': '146.0.7680.66',
|
|
56851
|
+
firefox: 'stable_148.0',
|
|
55547
56852
|
});
|
|
55548
56853
|
|
|
55549
56854
|
/**
|
|
@@ -58860,7 +60165,7 @@ function requireHelpers$2 () {
|
|
|
58860
60165
|
};
|
|
58861
60166
|
Object.defineProperty(helpers$4, "__esModule", { value: true });
|
|
58862
60167
|
helpers$4.req = helpers$4.json = helpers$4.toBuffer = void 0;
|
|
58863
|
-
const http = __importStar(require$$0$
|
|
60168
|
+
const http = __importStar(require$$0$6);
|
|
58864
60169
|
const https = __importStar(require$$1$1);
|
|
58865
60170
|
async function toBuffer(stream) {
|
|
58866
60171
|
let length = 0;
|
|
@@ -58935,8 +60240,8 @@ function requireDist$b () {
|
|
|
58935
60240
|
};
|
|
58936
60241
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
58937
60242
|
exports$1.Agent = void 0;
|
|
58938
|
-
const net = __importStar(require$$0$
|
|
58939
|
-
const http = __importStar(require$$0$
|
|
60243
|
+
const net = __importStar(require$$0$7);
|
|
60244
|
+
const http = __importStar(require$$0$6);
|
|
58940
60245
|
const https_1 = require$$1$1;
|
|
58941
60246
|
__exportStar(requireHelpers$2(), exports$1);
|
|
58942
60247
|
const INTERNAL = Symbol('AgentBaseInternalState');
|
|
@@ -59167,10 +60472,10 @@ function requireDist$a () {
|
|
|
59167
60472
|
};
|
|
59168
60473
|
Object.defineProperty(dist$9, "__esModule", { value: true });
|
|
59169
60474
|
dist$9.HttpProxyAgent = void 0;
|
|
59170
|
-
const net = __importStar(require$$0$
|
|
60475
|
+
const net = __importStar(require$$0$7);
|
|
59171
60476
|
const tls = __importStar(require$$1$2);
|
|
59172
60477
|
const debug_1 = __importDefault(requireSrc());
|
|
59173
|
-
const events_1 = require$$0$
|
|
60478
|
+
const events_1 = require$$0$8;
|
|
59174
60479
|
const agent_base_1 = requireDist$b();
|
|
59175
60480
|
const url_1 = require$$5;
|
|
59176
60481
|
const debug = (0, debug_1.default)('http-proxy-agent');
|
|
@@ -59410,7 +60715,7 @@ function requireDist$9 () {
|
|
|
59410
60715
|
};
|
|
59411
60716
|
Object.defineProperty(dist$8, "__esModule", { value: true });
|
|
59412
60717
|
dist$8.HttpsProxyAgent = void 0;
|
|
59413
|
-
const net = __importStar(require$$0$
|
|
60718
|
+
const net = __importStar(require$$0$7);
|
|
59414
60719
|
const tls = __importStar(require$$1$2);
|
|
59415
60720
|
const assert_1 = __importDefault(require$$2);
|
|
59416
60721
|
const debug_1 = __importDefault(requireSrc());
|
|
@@ -59543,7 +60848,7 @@ function requireUtils$1 () {
|
|
|
59543
60848
|
if (hasRequiredUtils$1) return utils$1;
|
|
59544
60849
|
hasRequiredUtils$1 = 1;
|
|
59545
60850
|
Object.defineProperty(utils$1, "__esModule", { value: true });
|
|
59546
|
-
const buffer_1 = require$$0$
|
|
60851
|
+
const buffer_1 = require$$0$9;
|
|
59547
60852
|
const ERRORS = {
|
|
59548
60853
|
INVALID_ENCODING: 'Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.',
|
|
59549
60854
|
INVALID_SMARTBUFFER_SIZE: 'Invalid size provided. Size must be a valid integer greater than zero.',
|
|
@@ -61415,7 +62720,7 @@ function requireHelpers () {
|
|
|
61415
62720
|
const constants_1 = requireConstants$3();
|
|
61416
62721
|
const stream = require$$1$3;
|
|
61417
62722
|
const ip_address_1 = requireIpAddress();
|
|
61418
|
-
const net = require$$0$
|
|
62723
|
+
const net = require$$0$7;
|
|
61419
62724
|
function validateSocksClientOptions(options, acceptedCommands = ['connect', 'bind', 'associate']) {
|
|
61420
62725
|
if (!constants_1.SocksCommand[options.command]) {
|
|
61421
62726
|
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommand, options);
|
|
@@ -61602,8 +62907,8 @@ function requireSocksclient () {
|
|
|
61602
62907
|
};
|
|
61603
62908
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
61604
62909
|
exports$1.SocksClientError = exports$1.SocksClient = void 0;
|
|
61605
|
-
const events_1 = require$$0$
|
|
61606
|
-
const net = require$$0$
|
|
62910
|
+
const events_1 = require$$0$8;
|
|
62911
|
+
const net = require$$0$7;
|
|
61607
62912
|
const smart_buffer_1 = requireSmartbuffer();
|
|
61608
62913
|
const constants_1 = requireConstants$3();
|
|
61609
62914
|
const helpers_1 = requireHelpers();
|
|
@@ -62269,7 +63574,7 @@ function requireDist$8 () {
|
|
|
62269
63574
|
const agent_base_1 = requireDist$b();
|
|
62270
63575
|
const debug_1 = __importDefault(requireSrc());
|
|
62271
63576
|
const dns = __importStar(require$$3$3);
|
|
62272
|
-
const net = __importStar(require$$0$
|
|
63577
|
+
const net = __importStar(require$$0$7);
|
|
62273
63578
|
const tls = __importStar(require$$1$2);
|
|
62274
63579
|
const url_1 = require$$5;
|
|
62275
63580
|
const debug = (0, debug_1.default)('socks-proxy-agent');
|
|
@@ -62616,7 +63921,7 @@ function requireFile () {
|
|
|
62616
63921
|
Object.defineProperty(file, "__esModule", { value: true });
|
|
62617
63922
|
file.file = void 0;
|
|
62618
63923
|
const debug_1 = __importDefault(requireSrc());
|
|
62619
|
-
const fs_1 = require$$0$
|
|
63924
|
+
const fs_1 = require$$0$3;
|
|
62620
63925
|
const notfound_1 = __importDefault(requireNotfound());
|
|
62621
63926
|
const notmodified_1 = __importDefault(requireNotmodified());
|
|
62622
63927
|
const url_1 = require$$5;
|
|
@@ -62728,7 +64033,7 @@ function requireFtpContext () {
|
|
|
62728
64033
|
hasRequiredFtpContext = 1;
|
|
62729
64034
|
Object.defineProperty(FtpContext, "__esModule", { value: true });
|
|
62730
64035
|
FtpContext.FTPContext = FtpContext.FTPError = void 0;
|
|
62731
|
-
const net_1 = require$$0$
|
|
64036
|
+
const net_1 = require$$0$7;
|
|
62732
64037
|
const parseControlResponse_1 = requireParseControlResponse();
|
|
62733
64038
|
class FTPError extends Error {
|
|
62734
64039
|
constructor(res) {
|
|
@@ -63773,8 +65078,8 @@ function requireClient () {
|
|
|
63773
65078
|
hasRequiredClient = 1;
|
|
63774
65079
|
Object.defineProperty(Client, "__esModule", { value: true });
|
|
63775
65080
|
Client.Client = void 0;
|
|
63776
|
-
const fs_1 = require$$0$
|
|
63777
|
-
const path_1 = require$$
|
|
65081
|
+
const fs_1 = require$$0$3;
|
|
65082
|
+
const path_1 = require$$0$4;
|
|
63778
65083
|
const tls_1 = require$$1$2;
|
|
63779
65084
|
const util_1 = require$$0$2;
|
|
63780
65085
|
const FtpContext_1 = requireFtpContext();
|
|
@@ -64169,6 +65474,12 @@ function requireClient () {
|
|
|
64169
65474
|
async _downloadFromWorkingDir(localDirPath) {
|
|
64170
65475
|
await ensureLocalDirectory(localDirPath);
|
|
64171
65476
|
for (const file of await this.list()) {
|
|
65477
|
+
const hasInvalidName = !file.name || (0, path_1.basename)(file.name) !== file.name;
|
|
65478
|
+
if (hasInvalidName) {
|
|
65479
|
+
const safeName = JSON.stringify(file.name);
|
|
65480
|
+
this.ftp.log(`Invalid filename from server listing, will skip file. (${safeName})`);
|
|
65481
|
+
continue;
|
|
65482
|
+
}
|
|
64172
65483
|
const localPath = (0, path_1.join)(localDirPath, file.name);
|
|
64173
65484
|
if (file.isDirectory) {
|
|
64174
65485
|
await this.cd(file.name);
|
|
@@ -64332,7 +65643,7 @@ function requireFtp () {
|
|
|
64332
65643
|
ftp.ftp = void 0;
|
|
64333
65644
|
const basic_ftp_1 = requireDist$6();
|
|
64334
65645
|
const stream_1 = require$$1$3;
|
|
64335
|
-
const path_1 = require$$
|
|
65646
|
+
const path_1 = require$$0$4;
|
|
64336
65647
|
const debug_1 = __importDefault(requireSrc());
|
|
64337
65648
|
const notfound_1 = __importDefault(requireNotfound());
|
|
64338
65649
|
const notmodified_1 = __importDefault(requireNotmodified());
|
|
@@ -64419,7 +65730,7 @@ function requireHttpError () {
|
|
|
64419
65730
|
if (hasRequiredHttpError) return httpError;
|
|
64420
65731
|
hasRequiredHttpError = 1;
|
|
64421
65732
|
Object.defineProperty(httpError, "__esModule", { value: true });
|
|
64422
|
-
const http_1 = require$$0$
|
|
65733
|
+
const http_1 = require$$0$6;
|
|
64423
65734
|
class HTTPError extends Error {
|
|
64424
65735
|
constructor(statusCode, message = http_1.STATUS_CODES[statusCode]) {
|
|
64425
65736
|
super(message);
|
|
@@ -64442,9 +65753,9 @@ function requireHttp () {
|
|
|
64442
65753
|
};
|
|
64443
65754
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
64444
65755
|
exports$1.http = void 0;
|
|
64445
|
-
const http_1 = __importDefault(require$$0$
|
|
65756
|
+
const http_1 = __importDefault(require$$0$6);
|
|
64446
65757
|
const https_1 = __importDefault(require$$1$1);
|
|
64447
|
-
const events_1 = require$$0$
|
|
65758
|
+
const events_1 = require$$0$8;
|
|
64448
65759
|
const debug_1 = __importDefault(requireSrc());
|
|
64449
65760
|
const http_error_1 = __importDefault(requireHttpError());
|
|
64450
65761
|
const notfound_1 = __importDefault(requireNotfound());
|
|
@@ -81470,7 +82781,7 @@ function requireMyIpAddress () {
|
|
|
81470
82781
|
};
|
|
81471
82782
|
Object.defineProperty(myIpAddress, "__esModule", { value: true });
|
|
81472
82783
|
const ip_1 = requireIp();
|
|
81473
|
-
const net_1 = __importDefault(require$$0$
|
|
82784
|
+
const net_1 = __importDefault(require$$0$7);
|
|
81474
82785
|
async function myIpAddress$1() {
|
|
81475
82786
|
return new Promise((resolve, reject) => {
|
|
81476
82787
|
const socket = net_1.default.connect({ host: '8.8.8.8', port: 53 });
|
|
@@ -83349,7 +84660,7 @@ function requireEmscriptenModule_WASM_RELEASE_SYNC () {
|
|
|
83349
84660
|
a.ready = new Promise(function (b, c) { m = b; n = c; });
|
|
83350
84661
|
var p = Object.assign({}, a), t = "./this.program", u = "object" == typeof window, v = "function" == typeof importScripts, w = "object" == typeof process && "object" == typeof process.versions && "string" == typeof process.versions.node, x = "", y, z, A;
|
|
83351
84662
|
if (w) {
|
|
83352
|
-
var fs = require$$0$
|
|
84663
|
+
var fs = require$$0$3, B = require$$0$4;
|
|
83353
84664
|
x = v ? B.dirname(x) + "/" : __dirname + "/";
|
|
83354
84665
|
y = (b, c) => { var d = C(b); if (d)
|
|
83355
84666
|
return c ? d : d.toString(); b = b.startsWith("file://") ? new URL(b) : B.normalize(b); return fs.readFileSync(b, c ? void 0 : "utf8"); };
|
|
@@ -84038,10 +85349,10 @@ function requireDist$1 () {
|
|
|
84038
85349
|
};
|
|
84039
85350
|
Object.defineProperty(dist$6, "__esModule", { value: true });
|
|
84040
85351
|
dist$6.PacProxyAgent = void 0;
|
|
84041
|
-
const net = __importStar(require$$0$
|
|
85352
|
+
const net = __importStar(require$$0$7);
|
|
84042
85353
|
const tls = __importStar(require$$1$2);
|
|
84043
85354
|
const crypto = __importStar(require$$2$1);
|
|
84044
|
-
const events_1 = require$$0$
|
|
85355
|
+
const events_1 = require$$0$8;
|
|
84045
85356
|
const debug_1 = __importDefault(requireSrc());
|
|
84046
85357
|
const url_1 = require$$5;
|
|
84047
85358
|
const agent_base_1 = requireDist$b();
|
|
@@ -84241,7 +85552,7 @@ function requireDist () {
|
|
|
84241
85552
|
};
|
|
84242
85553
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
84243
85554
|
exports$1.ProxyAgent = exports$1.proxies = void 0;
|
|
84244
|
-
const http = __importStar(require$$0$
|
|
85555
|
+
const http = __importStar(require$$0$6);
|
|
84245
85556
|
const https = __importStar(require$$1$1);
|
|
84246
85557
|
const url_1 = require$$5;
|
|
84247
85558
|
const lru_cache_1 = __importDefault(/*@__PURE__*/ requireLruCache());
|
|
@@ -86170,7 +87481,7 @@ var hasRequiredPermessageDeflate;
|
|
|
86170
87481
|
function requirePermessageDeflate () {
|
|
86171
87482
|
if (hasRequiredPermessageDeflate) return permessageDeflate;
|
|
86172
87483
|
hasRequiredPermessageDeflate = 1;
|
|
86173
|
-
const zlib = require$$0$
|
|
87484
|
+
const zlib = require$$0$a;
|
|
86174
87485
|
const bufferUtil = requireBufferUtil();
|
|
86175
87486
|
const Limiter = requireLimiter();
|
|
86176
87487
|
const { kStatusCode } = requireConstants();
|
|
@@ -86495,7 +87806,7 @@ var hasRequiredValidation;
|
|
|
86495
87806
|
function requireValidation () {
|
|
86496
87807
|
if (hasRequiredValidation) return validation.exports;
|
|
86497
87808
|
hasRequiredValidation = 1;
|
|
86498
|
-
const { isUtf8 } = require$$0$
|
|
87809
|
+
const { isUtf8 } = require$$0$9;
|
|
86499
87810
|
const { hasBlob } = requireConstants();
|
|
86500
87811
|
const tokenChars = [
|
|
86501
87812
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
@@ -87792,10 +89103,10 @@ var hasRequiredWebsocket;
|
|
|
87792
89103
|
function requireWebsocket () {
|
|
87793
89104
|
if (hasRequiredWebsocket) return websocket;
|
|
87794
89105
|
hasRequiredWebsocket = 1;
|
|
87795
|
-
const EventEmitter = require$$0$
|
|
89106
|
+
const EventEmitter = require$$0$8;
|
|
87796
89107
|
const https = require$$1$1;
|
|
87797
|
-
const http = require$$0$
|
|
87798
|
-
const net = require$$0$
|
|
89108
|
+
const http = require$$0$6;
|
|
89109
|
+
const net = require$$0$7;
|
|
87799
89110
|
const tls = require$$1$2;
|
|
87800
89111
|
const { randomBytes, createHash } = require$$2$1;
|
|
87801
89112
|
const { Duplex, Readable } = require$$1$3;
|
|
@@ -88759,8 +90070,8 @@ var hasRequiredWebsocketServer;
|
|
|
88759
90070
|
function requireWebsocketServer () {
|
|
88760
90071
|
if (hasRequiredWebsocketServer) return websocketServer;
|
|
88761
90072
|
hasRequiredWebsocketServer = 1;
|
|
88762
|
-
const EventEmitter = require$$0$
|
|
88763
|
-
const http = require$$0$
|
|
90073
|
+
const EventEmitter = require$$0$8;
|
|
90074
|
+
const http = require$$0$6;
|
|
88764
90075
|
const { Duplex } = require$$1$3;
|
|
88765
90076
|
const { createHash } = require$$2$1;
|
|
88766
90077
|
const extension = requireExtension();
|
|
@@ -89603,6 +90914,7 @@ class ChromeLauncher extends BrowserLauncher {
|
|
|
89603
90914
|
'MediaRouter',
|
|
89604
90915
|
'OptimizationHints',
|
|
89605
90916
|
'RenderDocument',
|
|
90917
|
+
'PartitionAllocSchedulerLoopQuarantineTaskControlledPurge',
|
|
89606
90918
|
...(turnOnExperimentalFeaturesForTesting
|
|
89607
90919
|
? []
|
|
89608
90920
|
: [
|
|
@@ -90104,7 +91416,7 @@ let ScreenRecorder = (() => {
|
|
|
90104
91416
|
if (path) {
|
|
90105
91417
|
fs.mkdirSync(dirname$1(path), { recursive: overwrite });
|
|
90106
91418
|
}
|
|
90107
|
-
this.#process = spawn(ffmpegPath,
|
|
91419
|
+
this.#process = spawn$1(ffmpegPath,
|
|
90108
91420
|
[
|
|
90109
91421
|
['-loglevel', 'error'],
|
|
90110
91422
|
['-avioflags', 'direct'],
|
|
@@ -90287,7 +91599,6 @@ var ExperimentName;
|
|
|
90287
91599
|
ExperimentName["APCA"] = "apca";
|
|
90288
91600
|
ExperimentName["FONT_EDITOR"] = "font-editor";
|
|
90289
91601
|
ExperimentName["FULL_ACCESSIBILITY_TREE"] = "full-accessibility-tree";
|
|
90290
|
-
ExperimentName["CONTRAST_ISSUES"] = "contrast-issues";
|
|
90291
91602
|
ExperimentName["EXPERIMENTAL_COOKIE_FEATURES"] = "experimental-cookie-features";
|
|
90292
91603
|
ExperimentName["INSTRUMENTATION_BREAKPOINTS"] = "instrumentation-breakpoints";
|
|
90293
91604
|
ExperimentName["AUTHORED_DEPLOYED_GROUPING"] = "authored-deployed-grouping";
|
|
@@ -90295,6 +91606,8 @@ var ExperimentName;
|
|
|
90295
91606
|
ExperimentName["USE_SOURCE_MAP_SCOPES"] = "use-source-map-scopes";
|
|
90296
91607
|
ExperimentName["TIMELINE_SHOW_POST_MESSAGE_EVENTS"] = "timeline-show-postmessage-events";
|
|
90297
91608
|
ExperimentName["TIMELINE_DEBUG_MODE"] = "timeline-debug-mode";
|
|
91609
|
+
ExperimentName["DURABLE_MESSAGES"] = "durable-messages";
|
|
91610
|
+
ExperimentName["JPEG_XL"] = "jpeg-xl";
|
|
90298
91611
|
})(ExperimentName || (ExperimentName = {}));
|
|
90299
91612
|
|
|
90300
91613
|
function getChromeVersion() { return ''; }const hostConfig = {};
|
|
@@ -90313,7 +91626,7 @@ function registerAppProvider(registration) {
|
|
|
90313
91626
|
}
|
|
90314
91627
|
function getRegisteredAppProviders() {
|
|
90315
91628
|
return registeredAppProvider
|
|
90316
|
-
.filter(provider => Runtime.isDescriptorEnabled({
|
|
91629
|
+
.filter(provider => Runtime.isDescriptorEnabled({ condition: provider.condition }))
|
|
90317
91630
|
.sort((firstProvider, secondProvider) => {
|
|
90318
91631
|
const order1 = firstProvider.order || 0;
|
|
90319
91632
|
const order2 = secondProvider.order || 0;
|
|
@@ -93273,7 +94586,7 @@ class Legacy {
|
|
|
93273
94586
|
}
|
|
93274
94587
|
toProtocolRGBA() {
|
|
93275
94588
|
const rgba = this.canonicalRGBA();
|
|
93276
|
-
const result = { r: rgba[0], g: rgba[1], b: rgba[2]
|
|
94589
|
+
const result = { r: rgba[0], g: rgba[1], b: rgba[2] };
|
|
93277
94590
|
if (rgba[3] !== 1) {
|
|
93278
94591
|
result.a = rgba[3];
|
|
93279
94592
|
}
|
|
@@ -93513,7 +94826,7 @@ class Generator {
|
|
|
93513
94826
|
#alphaSpace;
|
|
93514
94827
|
#colors = new Map();
|
|
93515
94828
|
constructor(hueSpace, satSpace, lightnessSpace, alphaSpace) {
|
|
93516
|
-
this.#hueSpace = hueSpace || { min: 0, max: 360
|
|
94829
|
+
this.#hueSpace = hueSpace || { min: 0, max: 360 };
|
|
93517
94830
|
this.#satSpace = satSpace || 67;
|
|
93518
94831
|
this.#lightnessSpace = lightnessSpace || 80;
|
|
93519
94832
|
this.#alphaSpace = alphaSpace || 1;
|
|
@@ -96140,11 +97453,21 @@ async function fileToString(file) {
|
|
|
96140
97453
|
const str = new TextDecoder('utf-8').decode(arrayBuffer);
|
|
96141
97454
|
return str;
|
|
96142
97455
|
}
|
|
96143
|
-
async function decompress(gzippedBuffer) {
|
|
97456
|
+
async function decompress(gzippedBuffer, charset = 'utf-8') {
|
|
96144
97457
|
const buffer = await gzipCodec(gzippedBuffer, new DecompressionStream('gzip'));
|
|
96145
|
-
const str = new TextDecoder(
|
|
97458
|
+
const str = new TextDecoder(charset).decode(buffer);
|
|
96146
97459
|
return str;
|
|
96147
97460
|
}
|
|
97461
|
+
async function decompressDeflate(buffer, charset = 'utf-8') {
|
|
97462
|
+
let decompressedBuffer;
|
|
97463
|
+
try {
|
|
97464
|
+
decompressedBuffer = await gzipCodec(buffer, new DecompressionStream('deflate'));
|
|
97465
|
+
}
|
|
97466
|
+
catch {
|
|
97467
|
+
decompressedBuffer = await gzipCodec(buffer, new DecompressionStream('deflate-raw'));
|
|
97468
|
+
}
|
|
97469
|
+
return new TextDecoder(charset).decode(decompressedBuffer);
|
|
97470
|
+
}
|
|
96148
97471
|
async function compress(str) {
|
|
96149
97472
|
const encoded = new TextEncoder().encode(str);
|
|
96150
97473
|
const buffer = await gzipCodec(encoded, new CompressionStream('gzip'));
|
|
@@ -96187,6 +97510,7 @@ var Gzip = /*#__PURE__*/Object.freeze({
|
|
|
96187
97510
|
compressStream: compressStream,
|
|
96188
97511
|
createMonitoredStream: createMonitoredStream,
|
|
96189
97512
|
decompress: decompress,
|
|
97513
|
+
decompressDeflate: decompressDeflate,
|
|
96190
97514
|
decompressStream: decompressStream,
|
|
96191
97515
|
fileToString: fileToString,
|
|
96192
97516
|
isGzip: isGzip
|
|
@@ -96724,7 +98048,7 @@ var ParsedURL$1 = /*#__PURE__*/Object.freeze({
|
|
|
96724
98048
|
class Progress {
|
|
96725
98049
|
totalWork = 0;
|
|
96726
98050
|
worked = 0;
|
|
96727
|
-
title
|
|
98051
|
+
title;
|
|
96728
98052
|
canceled = false;
|
|
96729
98053
|
done = false;
|
|
96730
98054
|
}
|
|
@@ -98060,7 +99384,7 @@ class VersionController {
|
|
|
98060
99384
|
static GLOBAL_VERSION_SETTING_NAME = 'inspectorVersion';
|
|
98061
99385
|
static SYNCED_VERSION_SETTING_NAME = 'syncedInspectorVersion';
|
|
98062
99386
|
static LOCAL_VERSION_SETTING_NAME = 'localInspectorVersion';
|
|
98063
|
-
static CURRENT_VERSION =
|
|
99387
|
+
static CURRENT_VERSION = 41;
|
|
98064
99388
|
#settings;
|
|
98065
99389
|
#globalVersionSetting;
|
|
98066
99390
|
#syncedVersionSetting;
|
|
@@ -98631,6 +99955,24 @@ class VersionController {
|
|
|
98631
99955
|
this.#settings.globalStorage.remove(PREFERRED_NETWORK_COND_SETTING);
|
|
98632
99956
|
}
|
|
98633
99957
|
}
|
|
99958
|
+
updateVersionFrom40To41() {
|
|
99959
|
+
if (this.#settings.syncedStorage.has('hide-network-messages')) {
|
|
99960
|
+
const oldNetworkSetting = this.#settings.createSetting('hide-network-messages', false, "Synced" );
|
|
99961
|
+
if (!this.#settings.syncedStorage.has('network-messages')) {
|
|
99962
|
+
const newNetworkSetting = this.#settings.createSetting('network-messages', true, "Synced" );
|
|
99963
|
+
newNetworkSetting.set(!oldNetworkSetting.get());
|
|
99964
|
+
}
|
|
99965
|
+
this.#removeSetting(oldNetworkSetting);
|
|
99966
|
+
}
|
|
99967
|
+
if (this.#settings.syncedStorage.has('frame-viewer-hide-chrome-window')) {
|
|
99968
|
+
const oldChromeFrameSetting = this.#settings.createSetting('frame-viewer-hide-chrome-window', false, "Synced" );
|
|
99969
|
+
if (!this.#settings.syncedStorage.has('frame-viewer-chrome-window')) {
|
|
99970
|
+
const newChromeFrameSetting = this.#settings.createSetting('frame-viewer-chrome-window', true, "Synced" );
|
|
99971
|
+
newChromeFrameSetting.set(!oldChromeFrameSetting.get());
|
|
99972
|
+
}
|
|
99973
|
+
this.#removeSetting(oldChromeFrameSetting);
|
|
99974
|
+
}
|
|
99975
|
+
}
|
|
98634
99976
|
migrateSettingsFromLocalStorage() {
|
|
98635
99977
|
const localSettings = new Set([
|
|
98636
99978
|
'advancedSearchConfig',
|
|
@@ -99152,8 +100494,9 @@ const UIStrings$18 = {
|
|
|
99152
100494
|
disableAsyncStackTraces: 'Disable async stack traces',
|
|
99153
100495
|
doNotCaptureAsyncStackTraces: 'Do not capture async stack traces',
|
|
99154
100496
|
captureAsyncStackTraces: 'Capture async stack traces',
|
|
100497
|
+
rulersOnHover: 'Rulers on hover',
|
|
99155
100498
|
showRulersOnHover: 'Show rulers on hover',
|
|
99156
|
-
doNotShowRulersOnHover: '
|
|
100499
|
+
doNotShowRulersOnHover: 'Don\'t show rulers on hover',
|
|
99157
100500
|
showAreaNames: 'Show area names',
|
|
99158
100501
|
showGridNamedAreas: 'Show grid named areas',
|
|
99159
100502
|
doNotShowGridNamedAreas: 'Do not show grid named areas',
|
|
@@ -99219,6 +100562,8 @@ const UIStrings$18 = {
|
|
|
99219
100562
|
enableLocalFonts: 'Enable local fonts',
|
|
99220
100563
|
disableAvifFormat: 'Disable `AVIF` format',
|
|
99221
100564
|
enableAvifFormat: 'Enable `AVIF` format',
|
|
100565
|
+
disableJpegXlFormat: 'Disable `JPEG XL` format',
|
|
100566
|
+
enableJpegXlFormat: 'Enable `JPEG XL` format',
|
|
99222
100567
|
disableWebpFormat: 'Disable `WebP` format',
|
|
99223
100568
|
enableWebpFormat: 'Enable `WebP` format',
|
|
99224
100569
|
customFormatters: 'Custom formatters',
|
|
@@ -99332,7 +100677,7 @@ registerSettingExtension({
|
|
|
99332
100677
|
registerSettingExtension({
|
|
99333
100678
|
category: "ELEMENTS" ,
|
|
99334
100679
|
storageType: "Synced" ,
|
|
99335
|
-
title: i18nLazyString$f(UIStrings$18.
|
|
100680
|
+
title: i18nLazyString$f(UIStrings$18.rulersOnHover),
|
|
99336
100681
|
settingName: 'show-metrics-rulers',
|
|
99337
100682
|
settingType: "boolean" ,
|
|
99338
100683
|
options: [
|
|
@@ -99887,6 +101232,23 @@ registerSettingExtension({
|
|
|
99887
101232
|
],
|
|
99888
101233
|
defaultValue: false,
|
|
99889
101234
|
});
|
|
101235
|
+
registerSettingExtension({
|
|
101236
|
+
category: "RENDERING" ,
|
|
101237
|
+
settingName: 'jpeg-xl-format-disabled',
|
|
101238
|
+
settingType: "boolean" ,
|
|
101239
|
+
storageType: "Session" ,
|
|
101240
|
+
options: [
|
|
101241
|
+
{
|
|
101242
|
+
value: true,
|
|
101243
|
+
title: i18nLazyString$f(UIStrings$18.disableJpegXlFormat),
|
|
101244
|
+
},
|
|
101245
|
+
{
|
|
101246
|
+
value: false,
|
|
101247
|
+
title: i18nLazyString$f(UIStrings$18.enableJpegXlFormat),
|
|
101248
|
+
},
|
|
101249
|
+
],
|
|
101250
|
+
defaultValue: false,
|
|
101251
|
+
});
|
|
99890
101252
|
registerSettingExtension({
|
|
99891
101253
|
category: "RENDERING" ,
|
|
99892
101254
|
settingName: 'webp-format-disabled',
|
|
@@ -100489,21 +101851,11 @@ class InspectorFrontendHostStub {
|
|
|
100489
101851
|
streamWrite(streamId, text);
|
|
100490
101852
|
callback({
|
|
100491
101853
|
statusCode: 200,
|
|
100492
|
-
headers: undefined,
|
|
100493
|
-
messageOverride: undefined,
|
|
100494
|
-
netError: undefined,
|
|
100495
|
-
netErrorName: undefined,
|
|
100496
|
-
urlValid: undefined,
|
|
100497
101854
|
});
|
|
100498
101855
|
})
|
|
100499
101856
|
.catch(function () {
|
|
100500
101857
|
callback({
|
|
100501
101858
|
statusCode: 404,
|
|
100502
|
-
headers: undefined,
|
|
100503
|
-
messageOverride: undefined,
|
|
100504
|
-
netError: undefined,
|
|
100505
|
-
netErrorName: undefined,
|
|
100506
|
-
urlValid: undefined,
|
|
100507
101859
|
});
|
|
100508
101860
|
});
|
|
100509
101861
|
}
|
|
@@ -101031,7 +102383,7 @@ function registerCommands(inspectorBackend) {
|
|
|
101031
102383
|
inspectorBackend.registerEnum("Audits.SRIMessageSignatureError", { MissingSignatureHeader: "MissingSignatureHeader", MissingSignatureInputHeader: "MissingSignatureInputHeader", InvalidSignatureHeader: "InvalidSignatureHeader", InvalidSignatureInputHeader: "InvalidSignatureInputHeader", SignatureHeaderValueIsNotByteSequence: "SignatureHeaderValueIsNotByteSequence", SignatureHeaderValueIsParameterized: "SignatureHeaderValueIsParameterized", SignatureHeaderValueIsIncorrectLength: "SignatureHeaderValueIsIncorrectLength", SignatureInputHeaderMissingLabel: "SignatureInputHeaderMissingLabel", SignatureInputHeaderValueNotInnerList: "SignatureInputHeaderValueNotInnerList", SignatureInputHeaderValueMissingComponents: "SignatureInputHeaderValueMissingComponents", SignatureInputHeaderInvalidComponentType: "SignatureInputHeaderInvalidComponentType", SignatureInputHeaderInvalidComponentName: "SignatureInputHeaderInvalidComponentName", SignatureInputHeaderInvalidHeaderComponentParameter: "SignatureInputHeaderInvalidHeaderComponentParameter", SignatureInputHeaderInvalidDerivedComponentParameter: "SignatureInputHeaderInvalidDerivedComponentParameter", SignatureInputHeaderKeyIdLength: "SignatureInputHeaderKeyIdLength", SignatureInputHeaderInvalidParameter: "SignatureInputHeaderInvalidParameter", SignatureInputHeaderMissingRequiredParameters: "SignatureInputHeaderMissingRequiredParameters", ValidationFailedSignatureExpired: "ValidationFailedSignatureExpired", ValidationFailedInvalidLength: "ValidationFailedInvalidLength", ValidationFailedSignatureMismatch: "ValidationFailedSignatureMismatch", ValidationFailedIntegrityMismatch: "ValidationFailedIntegrityMismatch" });
|
|
101032
102384
|
inspectorBackend.registerEnum("Audits.UnencodedDigestError", { MalformedDictionary: "MalformedDictionary", UnknownAlgorithm: "UnknownAlgorithm", IncorrectDigestType: "IncorrectDigestType", IncorrectDigestLength: "IncorrectDigestLength" });
|
|
101033
102385
|
inspectorBackend.registerEnum("Audits.ConnectionAllowlistError", { InvalidHeader: "InvalidHeader", MoreThanOneList: "MoreThanOneList", ItemNotInnerList: "ItemNotInnerList", InvalidAllowlistItemType: "InvalidAllowlistItemType", ReportingEndpointNotToken: "ReportingEndpointNotToken", InvalidUrlPattern: "InvalidUrlPattern" });
|
|
101034
|
-
inspectorBackend.registerEnum("Audits.GenericIssueErrorType", { FormLabelForNameError: "FormLabelForNameError", FormDuplicateIdForInputError: "FormDuplicateIdForInputError", FormInputWithNoLabelError: "FormInputWithNoLabelError", FormAutocompleteAttributeEmptyError: "FormAutocompleteAttributeEmptyError", FormEmptyIdAndNameAttributesForInputError: "FormEmptyIdAndNameAttributesForInputError", FormAriaLabelledByToNonExistingIdError: "FormAriaLabelledByToNonExistingIdError", FormInputAssignedAutocompleteValueToIdOrNameAttributeError: "FormInputAssignedAutocompleteValueToIdOrNameAttributeError", FormLabelHasNeitherForNorNestedInputError: "FormLabelHasNeitherForNorNestedInputError", FormLabelForMatchesNonExistingIdError: "FormLabelForMatchesNonExistingIdError", FormInputHasWrongButWellIntendedAutocompleteValueError: "FormInputHasWrongButWellIntendedAutocompleteValueError", ResponseWasBlockedByORB: "ResponseWasBlockedByORB", NavigationEntryMarkedSkippable: "NavigationEntryMarkedSkippable", AutofillAndManualTextPolicyControlledFeaturesInfo: "AutofillAndManualTextPolicyControlledFeaturesInfo", AutofillPolicyControlledFeatureInfo: "AutofillPolicyControlledFeatureInfo", ManualTextPolicyControlledFeatureInfo: "ManualTextPolicyControlledFeatureInfo" });
|
|
102386
|
+
inspectorBackend.registerEnum("Audits.GenericIssueErrorType", { FormLabelForNameError: "FormLabelForNameError", FormDuplicateIdForInputError: "FormDuplicateIdForInputError", FormInputWithNoLabelError: "FormInputWithNoLabelError", FormAutocompleteAttributeEmptyError: "FormAutocompleteAttributeEmptyError", FormEmptyIdAndNameAttributesForInputError: "FormEmptyIdAndNameAttributesForInputError", FormAriaLabelledByToNonExistingIdError: "FormAriaLabelledByToNonExistingIdError", FormInputAssignedAutocompleteValueToIdOrNameAttributeError: "FormInputAssignedAutocompleteValueToIdOrNameAttributeError", FormLabelHasNeitherForNorNestedInputError: "FormLabelHasNeitherForNorNestedInputError", FormLabelForMatchesNonExistingIdError: "FormLabelForMatchesNonExistingIdError", FormInputHasWrongButWellIntendedAutocompleteValueError: "FormInputHasWrongButWellIntendedAutocompleteValueError", ResponseWasBlockedByORB: "ResponseWasBlockedByORB", NavigationEntryMarkedSkippable: "NavigationEntryMarkedSkippable", AutofillAndManualTextPolicyControlledFeaturesInfo: "AutofillAndManualTextPolicyControlledFeaturesInfo", AutofillPolicyControlledFeatureInfo: "AutofillPolicyControlledFeatureInfo", ManualTextPolicyControlledFeatureInfo: "ManualTextPolicyControlledFeatureInfo", FormModelContextParameterMissingTitleAndDescription: "FormModelContextParameterMissingTitleAndDescription" });
|
|
101035
102387
|
inspectorBackend.registerEnum("Audits.ClientHintIssueReason", { MetaTagAllowListInvalidOrigin: "MetaTagAllowListInvalidOrigin", MetaTagModifiedHTML: "MetaTagModifiedHTML" });
|
|
101036
102388
|
inspectorBackend.registerEnum("Audits.FederatedAuthRequestIssueReason", { ShouldEmbargo: "ShouldEmbargo", TooManyRequests: "TooManyRequests", WellKnownHttpNotFound: "WellKnownHttpNotFound", WellKnownNoResponse: "WellKnownNoResponse", WellKnownInvalidResponse: "WellKnownInvalidResponse", WellKnownListEmpty: "WellKnownListEmpty", WellKnownInvalidContentType: "WellKnownInvalidContentType", ConfigNotInWellKnown: "ConfigNotInWellKnown", WellKnownTooBig: "WellKnownTooBig", ConfigHttpNotFound: "ConfigHttpNotFound", ConfigNoResponse: "ConfigNoResponse", ConfigInvalidResponse: "ConfigInvalidResponse", ConfigInvalidContentType: "ConfigInvalidContentType", IdpNotPotentiallyTrustworthy: "IdpNotPotentiallyTrustworthy", DisabledInSettings: "DisabledInSettings", DisabledInFlags: "DisabledInFlags", ErrorFetchingSignin: "ErrorFetchingSignin", InvalidSigninResponse: "InvalidSigninResponse", AccountsHttpNotFound: "AccountsHttpNotFound", AccountsNoResponse: "AccountsNoResponse", AccountsInvalidResponse: "AccountsInvalidResponse", AccountsListEmpty: "AccountsListEmpty", AccountsInvalidContentType: "AccountsInvalidContentType", IdTokenHttpNotFound: "IdTokenHttpNotFound", IdTokenNoResponse: "IdTokenNoResponse", IdTokenInvalidResponse: "IdTokenInvalidResponse", IdTokenIdpErrorResponse: "IdTokenIdpErrorResponse", IdTokenCrossSiteIdpErrorResponse: "IdTokenCrossSiteIdpErrorResponse", IdTokenInvalidRequest: "IdTokenInvalidRequest", IdTokenInvalidContentType: "IdTokenInvalidContentType", ErrorIdToken: "ErrorIdToken", Canceled: "Canceled", RpPageNotVisible: "RpPageNotVisible", SilentMediationFailure: "SilentMediationFailure", NotSignedInWithIdp: "NotSignedInWithIdp", MissingTransientUserActivation: "MissingTransientUserActivation", ReplacedByActiveMode: "ReplacedByActiveMode", RelyingPartyOriginIsOpaque: "RelyingPartyOriginIsOpaque", TypeNotMatching: "TypeNotMatching", UiDismissedNoEmbargo: "UiDismissedNoEmbargo", CorsError: "CorsError", SuppressedBySegmentationPlatform: "SuppressedBySegmentationPlatform" });
|
|
101037
102389
|
inspectorBackend.registerEnum("Audits.FederatedAuthUserInfoRequestIssueReason", { NotSameOrigin: "NotSameOrigin", NotIframe: "NotIframe", NotPotentiallyTrustworthy: "NotPotentiallyTrustworthy", NoAPIPermission: "NoApiPermission", NotSignedInWithIdp: "NotSignedInWithIdp", NoAccountSharingPermission: "NoAccountSharingPermission", InvalidConfigOrWellKnown: "InvalidConfigOrWellKnown", InvalidAccountsResponse: "InvalidAccountsResponse", NoReturningUserFromFetchedAccounts: "NoReturningUserFromFetchedAccounts" });
|
|
@@ -101041,7 +102393,7 @@ function registerCommands(inspectorBackend) {
|
|
|
101041
102393
|
inspectorBackend.registerEnum("Audits.PropertyRuleIssueReason", { InvalidSyntax: "InvalidSyntax", InvalidInitialValue: "InvalidInitialValue", InvalidInherits: "InvalidInherits", InvalidName: "InvalidName" });
|
|
101042
102394
|
inspectorBackend.registerEnum("Audits.UserReidentificationIssueType", { BlockedFrameNavigation: "BlockedFrameNavigation", BlockedSubresource: "BlockedSubresource", NoisedCanvasReadback: "NoisedCanvasReadback" });
|
|
101043
102395
|
inspectorBackend.registerEnum("Audits.PermissionElementIssueType", { InvalidType: "InvalidType", FencedFrameDisallowed: "FencedFrameDisallowed", CspFrameAncestorsMissing: "CspFrameAncestorsMissing", PermissionsPolicyBlocked: "PermissionsPolicyBlocked", PaddingRightUnsupported: "PaddingRightUnsupported", PaddingBottomUnsupported: "PaddingBottomUnsupported", InsetBoxShadowUnsupported: "InsetBoxShadowUnsupported", RequestInProgress: "RequestInProgress", UntrustedEvent: "UntrustedEvent", RegistrationFailed: "RegistrationFailed", TypeNotSupported: "TypeNotSupported", InvalidTypeActivation: "InvalidTypeActivation", SecurityChecksFailed: "SecurityChecksFailed", ActivationDisabled: "ActivationDisabled", GeolocationDeprecated: "GeolocationDeprecated", InvalidDisplayStyle: "InvalidDisplayStyle", NonOpaqueColor: "NonOpaqueColor", LowContrast: "LowContrast", FontSizeTooSmall: "FontSizeTooSmall", FontSizeTooLarge: "FontSizeTooLarge", InvalidSizeValue: "InvalidSizeValue" });
|
|
101044
|
-
inspectorBackend.registerEnum("Audits.InspectorIssueCode", { CookieIssue: "CookieIssue", MixedContentIssue: "MixedContentIssue", BlockedByResponseIssue: "BlockedByResponseIssue", HeavyAdIssue: "HeavyAdIssue", ContentSecurityPolicyIssue: "ContentSecurityPolicyIssue", SharedArrayBufferIssue: "SharedArrayBufferIssue", LowTextContrastIssue: "LowTextContrastIssue", CorsIssue: "CorsIssue", AttributionReportingIssue: "AttributionReportingIssue", QuirksModeIssue: "QuirksModeIssue", PartitioningBlobURLIssue: "PartitioningBlobURLIssue", NavigatorUserAgentIssue: "NavigatorUserAgentIssue", GenericIssue: "GenericIssue", DeprecationIssue: "DeprecationIssue", ClientHintIssue: "ClientHintIssue", FederatedAuthRequestIssue: "FederatedAuthRequestIssue", BounceTrackingIssue: "BounceTrackingIssue", CookieDeprecationMetadataIssue: "CookieDeprecationMetadataIssue", StylesheetLoadingIssue: "StylesheetLoadingIssue", FederatedAuthUserInfoRequestIssue: "FederatedAuthUserInfoRequestIssue", PropertyRuleIssue: "PropertyRuleIssue", SharedDictionaryIssue: "SharedDictionaryIssue", ElementAccessibilityIssue: "ElementAccessibilityIssue", SRIMessageSignatureIssue: "SRIMessageSignatureIssue", UnencodedDigestIssue: "UnencodedDigestIssue", ConnectionAllowlistIssue: "ConnectionAllowlistIssue", UserReidentificationIssue: "UserReidentificationIssue", PermissionElementIssue: "PermissionElementIssue", PerformanceIssue: "PerformanceIssue" });
|
|
102396
|
+
inspectorBackend.registerEnum("Audits.InspectorIssueCode", { CookieIssue: "CookieIssue", MixedContentIssue: "MixedContentIssue", BlockedByResponseIssue: "BlockedByResponseIssue", HeavyAdIssue: "HeavyAdIssue", ContentSecurityPolicyIssue: "ContentSecurityPolicyIssue", SharedArrayBufferIssue: "SharedArrayBufferIssue", LowTextContrastIssue: "LowTextContrastIssue", CorsIssue: "CorsIssue", AttributionReportingIssue: "AttributionReportingIssue", QuirksModeIssue: "QuirksModeIssue", PartitioningBlobURLIssue: "PartitioningBlobURLIssue", NavigatorUserAgentIssue: "NavigatorUserAgentIssue", GenericIssue: "GenericIssue", DeprecationIssue: "DeprecationIssue", ClientHintIssue: "ClientHintIssue", FederatedAuthRequestIssue: "FederatedAuthRequestIssue", BounceTrackingIssue: "BounceTrackingIssue", CookieDeprecationMetadataIssue: "CookieDeprecationMetadataIssue", StylesheetLoadingIssue: "StylesheetLoadingIssue", FederatedAuthUserInfoRequestIssue: "FederatedAuthUserInfoRequestIssue", PropertyRuleIssue: "PropertyRuleIssue", SharedDictionaryIssue: "SharedDictionaryIssue", ElementAccessibilityIssue: "ElementAccessibilityIssue", SRIMessageSignatureIssue: "SRIMessageSignatureIssue", UnencodedDigestIssue: "UnencodedDigestIssue", ConnectionAllowlistIssue: "ConnectionAllowlistIssue", UserReidentificationIssue: "UserReidentificationIssue", PermissionElementIssue: "PermissionElementIssue", PerformanceIssue: "PerformanceIssue", SelectivePermissionsInterventionIssue: "SelectivePermissionsInterventionIssue" });
|
|
101045
102397
|
inspectorBackend.registerEvent("Audits.issueAdded", ["issue"]);
|
|
101046
102398
|
inspectorBackend.registerEnum("Audits.GetEncodedResponseRequestEncoding", { Webp: "webp", Jpeg: "jpeg", Png: "png" });
|
|
101047
102399
|
inspectorBackend.registerCommand("Audits.getEncodedResponse", [{ "name": "requestId", "type": "string", "optional": false, "description": "Identifier of the network request to get content for.", "typeRef": "Network.RequestId" }, { "name": "encoding", "type": "string", "optional": false, "description": "The encoding to use.", "typeRef": "Audits.GetEncodedResponseRequestEncoding" }, { "name": "quality", "type": "number", "optional": true, "description": "The quality of the encoding (0-1). (defaults to 1)", "typeRef": null }, { "name": "sizeOnly", "type": "boolean", "optional": true, "description": "Whether to only return the size information (defaults to false).", "typeRef": null }], ["body", "originalSize", "encodedSize"], "Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.");
|
|
@@ -101084,7 +102436,10 @@ function registerCommands(inspectorBackend) {
|
|
|
101084
102436
|
inspectorBackend.registerType("Audits.PropertyRuleIssueDetails", [{ "name": "sourceCodeLocation", "type": "object", "optional": false, "description": "Source code position of the property rule.", "typeRef": "Audits.SourceCodeLocation" }, { "name": "propertyRuleIssueReason", "type": "string", "optional": false, "description": "Reason why the property rule was discarded.", "typeRef": "Audits.PropertyRuleIssueReason" }, { "name": "propertyValue", "type": "string", "optional": true, "description": "The value of the property rule property that failed to parse", "typeRef": null }]);
|
|
101085
102437
|
inspectorBackend.registerType("Audits.UserReidentificationIssueDetails", [{ "name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Audits.UserReidentificationIssueType" }, { "name": "request", "type": "object", "optional": true, "description": "Applies to BlockedFrameNavigation and BlockedSubresource issue types.", "typeRef": "Audits.AffectedRequest" }, { "name": "sourceCodeLocation", "type": "object", "optional": true, "description": "Applies to NoisedCanvasReadback issue type.", "typeRef": "Audits.SourceCodeLocation" }]);
|
|
101086
102438
|
inspectorBackend.registerType("Audits.PermissionElementIssueDetails", [{ "name": "issueType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.PermissionElementIssueType" }, { "name": "type", "type": "string", "optional": true, "description": "The value of the type attribute.", "typeRef": null }, { "name": "nodeId", "type": "number", "optional": true, "description": "The node ID of the <permission> element.", "typeRef": "DOM.BackendNodeId" }, { "name": "isWarning", "type": "boolean", "optional": true, "description": "True if the issue is a warning, false if it is an error.", "typeRef": null }, { "name": "permissionName", "type": "string", "optional": true, "description": "Fields for message construction: Used for messages that reference a specific permission name", "typeRef": null }, { "name": "occluderNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occlusion", "typeRef": null }, { "name": "occluderParentNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occluder's parent", "typeRef": null }, { "name": "disableReason", "type": "string", "optional": true, "description": "Used for messages about activation disabled reason", "typeRef": null }]);
|
|
101087
|
-
inspectorBackend.registerType("Audits.
|
|
102439
|
+
inspectorBackend.registerType("Audits.AdScriptIdentifier", [{ "name": "scriptId", "type": "string", "optional": false, "description": "The script's v8 identifier.", "typeRef": "Runtime.ScriptId" }, { "name": "debuggerId", "type": "string", "optional": false, "description": "v8's debugging id for the v8::Context.", "typeRef": "Runtime.UniqueDebuggerId" }, { "name": "name", "type": "string", "optional": false, "description": "The script's url (or generated name based on id if inline script).", "typeRef": null }]);
|
|
102440
|
+
inspectorBackend.registerType("Audits.AdAncestry", [{ "name": "adAncestryChain", "type": "array", "optional": false, "description": "The ad-script in the stack when the offending script was loaded. This is recursive down to the root script that was tagged due to the filterlist rule.", "typeRef": "Audits.AdScriptIdentifier" }, { "name": "rootScriptFilterlistRule", "type": "string", "optional": true, "description": "The filterlist rule that caused the root (last) script in `adAncestry` to be ad-tagged.", "typeRef": null }]);
|
|
102441
|
+
inspectorBackend.registerType("Audits.SelectivePermissionsInterventionIssueDetails", [{ "name": "apiName", "type": "string", "optional": false, "description": "Which API was intervened on.", "typeRef": null }, { "name": "adAncestry", "type": "object", "optional": false, "description": "Why the ad script using the API is considered an ad.", "typeRef": "Audits.AdAncestry" }, { "name": "stackTrace", "type": "object", "optional": true, "description": "The stack trace at the time of the intervention.", "typeRef": "Runtime.StackTrace" }]);
|
|
102442
|
+
inspectorBackend.registerType("Audits.InspectorIssueDetails", [{ "name": "cookieIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieIssueDetails" }, { "name": "mixedContentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.MixedContentIssueDetails" }, { "name": "blockedByResponseIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BlockedByResponseIssueDetails" }, { "name": "heavyAdIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.HeavyAdIssueDetails" }, { "name": "contentSecurityPolicyIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ContentSecurityPolicyIssueDetails" }, { "name": "sharedArrayBufferIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedArrayBufferIssueDetails" }, { "name": "lowTextContrastIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.LowTextContrastIssueDetails" }, { "name": "corsIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CorsIssueDetails" }, { "name": "attributionReportingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AttributionReportingIssueDetails" }, { "name": "quirksModeIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.QuirksModeIssueDetails" }, { "name": "partitioningBlobURLIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PartitioningBlobURLIssueDetails" }, { "name": "navigatorUserAgentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.NavigatorUserAgentIssueDetails" }, { "name": "genericIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.GenericIssueDetails" }, { "name": "deprecationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.DeprecationIssueDetails" }, { "name": "clientHintIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ClientHintIssueDetails" }, { "name": "federatedAuthRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthRequestIssueDetails" }, { "name": "bounceTrackingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BounceTrackingIssueDetails" }, { "name": "cookieDeprecationMetadataIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieDeprecationMetadataIssueDetails" }, { "name": "stylesheetLoadingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.StylesheetLoadingIssueDetails" }, { "name": "propertyRuleIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PropertyRuleIssueDetails" }, { "name": "federatedAuthUserInfoRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthUserInfoRequestIssueDetails" }, { "name": "sharedDictionaryIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedDictionaryIssueDetails" }, { "name": "elementAccessibilityIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ElementAccessibilityIssueDetails" }, { "name": "sriMessageSignatureIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SRIMessageSignatureIssueDetails" }, { "name": "unencodedDigestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UnencodedDigestIssueDetails" }, { "name": "connectionAllowlistIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ConnectionAllowlistIssueDetails" }, { "name": "userReidentificationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UserReidentificationIssueDetails" }, { "name": "permissionElementIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PermissionElementIssueDetails" }, { "name": "performanceIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PerformanceIssueDetails" }, { "name": "selectivePermissionsInterventionIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SelectivePermissionsInterventionIssueDetails" }]);
|
|
101088
102443
|
inspectorBackend.registerType("Audits.InspectorIssue", [{ "name": "code", "type": "string", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueCode" }, { "name": "details", "type": "object", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueDetails" }, { "name": "issueId", "type": "string", "optional": true, "description": "A unique id for this issue. May be omitted if no other entity (e.g. exception, CDP message, etc.) is referencing this issue.", "typeRef": "Audits.IssueId" }]);
|
|
101089
102444
|
inspectorBackend.registerEnum("Autofill.FillingStrategy", { AutocompleteAttribute: "autocompleteAttribute", AutofillInferred: "autofillInferred" });
|
|
101090
102445
|
inspectorBackend.registerEvent("Autofill.addressFormFilled", ["filledFields", "addressUi"]);
|
|
@@ -101168,7 +102523,7 @@ function registerCommands(inspectorBackend) {
|
|
|
101168
102523
|
inspectorBackend.registerType("Browser.Bucket", [{ "name": "low", "type": "number", "optional": false, "description": "Minimum value (inclusive).", "typeRef": null }, { "name": "high", "type": "number", "optional": false, "description": "Maximum value (exclusive).", "typeRef": null }, { "name": "count", "type": "number", "optional": false, "description": "Number of samples.", "typeRef": null }]);
|
|
101169
102524
|
inspectorBackend.registerType("Browser.Histogram", [{ "name": "name", "type": "string", "optional": false, "description": "Name.", "typeRef": null }, { "name": "sum", "type": "number", "optional": false, "description": "Sum of sample values.", "typeRef": null }, { "name": "count", "type": "number", "optional": false, "description": "Total number of samples.", "typeRef": null }, { "name": "buckets", "type": "array", "optional": false, "description": "Buckets.", "typeRef": "Browser.Bucket" }]);
|
|
101170
102525
|
inspectorBackend.registerEnum("CSS.StyleSheetOrigin", { Injected: "injected", UserAgent: "user-agent", Inspector: "inspector", Regular: "regular" });
|
|
101171
|
-
inspectorBackend.registerEnum("CSS.CSSRuleType", { MediaRule: "MediaRule", SupportsRule: "SupportsRule", ContainerRule: "ContainerRule", LayerRule: "LayerRule", ScopeRule: "ScopeRule", StyleRule: "StyleRule", StartingStyleRule: "StartingStyleRule" });
|
|
102526
|
+
inspectorBackend.registerEnum("CSS.CSSRuleType", { MediaRule: "MediaRule", SupportsRule: "SupportsRule", ContainerRule: "ContainerRule", LayerRule: "LayerRule", ScopeRule: "ScopeRule", StyleRule: "StyleRule", StartingStyleRule: "StartingStyleRule", NavigationRule: "NavigationRule" });
|
|
101172
102527
|
inspectorBackend.registerEnum("CSS.CSSMediaSource", { MediaRule: "mediaRule", ImportRule: "importRule", LinkedSheet: "linkedSheet", InlineSheet: "inlineSheet" });
|
|
101173
102528
|
inspectorBackend.registerEnum("CSS.CSSAtRuleType", { FontFace: "font-face", FontFeatureValues: "font-feature-values", FontPaletteValues: "font-palette-values" });
|
|
101174
102529
|
inspectorBackend.registerEnum("CSS.CSSAtRuleSubsection", { Swash: "swash", Annotation: "annotation", Ornaments: "ornaments", Stylistic: "stylistic", Styleset: "styleset", CharacterVariant: "character-variant" });
|
|
@@ -101207,6 +102562,7 @@ function registerCommands(inspectorBackend) {
|
|
|
101207
102562
|
inspectorBackend.registerCommand("CSS.setMediaText", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange" }, { "name": "text", "type": "string", "optional": false, "description": "", "typeRef": null }], ["media"], "Modifies the rule selector.");
|
|
101208
102563
|
inspectorBackend.registerCommand("CSS.setContainerQueryText", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange" }, { "name": "text", "type": "string", "optional": false, "description": "", "typeRef": null }], ["containerQuery"], "Modifies the expression of a container query.");
|
|
101209
102564
|
inspectorBackend.registerCommand("CSS.setSupportsText", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange" }, { "name": "text", "type": "string", "optional": false, "description": "", "typeRef": null }], ["supports"], "Modifies the expression of a supports at-rule.");
|
|
102565
|
+
inspectorBackend.registerCommand("CSS.setNavigationText", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange" }, { "name": "text", "type": "string", "optional": false, "description": "", "typeRef": null }], ["navigation"], "Modifies the expression of a navigation at-rule.");
|
|
101210
102566
|
inspectorBackend.registerCommand("CSS.setScopeText", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange" }, { "name": "text", "type": "string", "optional": false, "description": "", "typeRef": null }], ["scope"], "Modifies the expression of a scope at-rule.");
|
|
101211
102567
|
inspectorBackend.registerCommand("CSS.setRuleSelector", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange" }, { "name": "selector", "type": "string", "optional": false, "description": "", "typeRef": null }], ["selectorList"], "Modifies the rule selector.");
|
|
101212
102568
|
inspectorBackend.registerCommand("CSS.setStyleSheetText", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "text", "type": "string", "optional": false, "description": "", "typeRef": null }], ["sourceMapURL"], "Sets the new stylesheet text.");
|
|
@@ -101225,7 +102581,7 @@ function registerCommands(inspectorBackend) {
|
|
|
101225
102581
|
inspectorBackend.registerType("CSS.Specificity", [{ "name": "a", "type": "number", "optional": false, "description": "The a component, which represents the number of ID selectors.", "typeRef": null }, { "name": "b", "type": "number", "optional": false, "description": "The b component, which represents the number of class selectors, attributes selectors, and pseudo-classes.", "typeRef": null }, { "name": "c", "type": "number", "optional": false, "description": "The c component, which represents the number of type selectors and pseudo-elements.", "typeRef": null }]);
|
|
101226
102582
|
inspectorBackend.registerType("CSS.SelectorList", [{ "name": "selectors", "type": "array", "optional": false, "description": "Selectors in the list.", "typeRef": "CSS.Value" }, { "name": "text", "type": "string", "optional": false, "description": "Rule selector text.", "typeRef": null }]);
|
|
101227
102583
|
inspectorBackend.registerType("CSS.CSSStyleSheetHeader", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "The stylesheet identifier.", "typeRef": "DOM.StyleSheetId" }, { "name": "frameId", "type": "string", "optional": false, "description": "Owner frame identifier.", "typeRef": "Page.FrameId" }, { "name": "sourceURL", "type": "string", "optional": false, "description": "Stylesheet resource URL. Empty if this is a constructed stylesheet created using new CSSStyleSheet() (but non-empty if this is a constructed stylesheet imported as a CSS module script).", "typeRef": null }, { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with the stylesheet (if any).", "typeRef": null }, { "name": "origin", "type": "string", "optional": false, "description": "Stylesheet origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "title", "type": "string", "optional": false, "description": "Stylesheet title.", "typeRef": null }, { "name": "ownerNode", "type": "number", "optional": true, "description": "The backend id for the owner node of the stylesheet.", "typeRef": "DOM.BackendNodeId" }, { "name": "disabled", "type": "boolean", "optional": false, "description": "Denotes whether the stylesheet is disabled.", "typeRef": null }, { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "Whether the sourceURL field value comes from the sourceURL comment.", "typeRef": null }, { "name": "isInline", "type": "boolean", "optional": false, "description": "Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags.", "typeRef": null }, { "name": "isMutable", "type": "boolean", "optional": false, "description": "Whether this stylesheet is mutable. Inline stylesheets become mutable after they have been modified via CSSOM API. `<link>` element's stylesheets become mutable only if DevTools modifies them. Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.", "typeRef": null }, { "name": "isConstructed", "type": "boolean", "optional": false, "description": "True if this stylesheet is created through new CSSStyleSheet() or imported as a CSS module script.", "typeRef": null }, { "name": "startLine", "type": "number", "optional": false, "description": "Line offset of the stylesheet within the resource (zero based).", "typeRef": null }, { "name": "startColumn", "type": "number", "optional": false, "description": "Column offset of the stylesheet within the resource (zero based).", "typeRef": null }, { "name": "length", "type": "number", "optional": false, "description": "Size of the content (in characters).", "typeRef": null }, { "name": "endLine", "type": "number", "optional": false, "description": "Line offset of the end of the stylesheet within the resource (zero based).", "typeRef": null }, { "name": "endColumn", "type": "number", "optional": false, "description": "Column offset of the end of the stylesheet within the resource (zero based).", "typeRef": null }, { "name": "loadingFailed", "type": "boolean", "optional": true, "description": "If the style sheet was loaded from a network resource, this indicates when the resource failed to load", "typeRef": null }]);
|
|
101228
|
-
inspectorBackend.registerType("CSS.CSSRule", [{ "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "selectorList", "type": "object", "optional": false, "description": "Rule selector data.", "typeRef": "CSS.SelectorList" }, { "name": "nestingSelectors", "type": "array", "optional": true, "description": "Array of selectors from ancestor style rules, sorted by distance from the current rule.", "typeRef": "string" }, { "name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle" }, { "name": "originTreeScopeNodeId", "type": "number", "optional": true, "description": "The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.", "typeRef": "DOM.BackendNodeId" }, { "name": "media", "type": "array", "optional": true, "description": "Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.", "typeRef": "CSS.CSSMedia" }, { "name": "containerQueries", "type": "array", "optional": true, "description": "Container query list array (for rules involving container queries). The array enumerates container queries starting with the innermost one, going outwards.", "typeRef": "CSS.CSSContainerQuery" }, { "name": "supports", "type": "array", "optional": true, "description": "@supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSSupports" }, { "name": "layers", "type": "array", "optional": true, "description": "Cascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.", "typeRef": "CSS.CSSLayer" }, { "name": "scopes", "type": "array", "optional": true, "description": "@scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSScope" }, { "name": "ruleTypes", "type": "array", "optional": true, "description": "The array keeps the types of ancestor CSSRules from the innermost going outwards.", "typeRef": "CSS.CSSRuleType" }, { "name": "startingStyles", "type": "array", "optional": true, "description": "@starting-style CSS at-rule array. The array enumerates @starting-style at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSStartingStyle" }]);
|
|
102584
|
+
inspectorBackend.registerType("CSS.CSSRule", [{ "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "selectorList", "type": "object", "optional": false, "description": "Rule selector data.", "typeRef": "CSS.SelectorList" }, { "name": "nestingSelectors", "type": "array", "optional": true, "description": "Array of selectors from ancestor style rules, sorted by distance from the current rule.", "typeRef": "string" }, { "name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle" }, { "name": "originTreeScopeNodeId", "type": "number", "optional": true, "description": "The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.", "typeRef": "DOM.BackendNodeId" }, { "name": "media", "type": "array", "optional": true, "description": "Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.", "typeRef": "CSS.CSSMedia" }, { "name": "containerQueries", "type": "array", "optional": true, "description": "Container query list array (for rules involving container queries). The array enumerates container queries starting with the innermost one, going outwards.", "typeRef": "CSS.CSSContainerQuery" }, { "name": "supports", "type": "array", "optional": true, "description": "@supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSSupports" }, { "name": "layers", "type": "array", "optional": true, "description": "Cascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.", "typeRef": "CSS.CSSLayer" }, { "name": "scopes", "type": "array", "optional": true, "description": "@scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSScope" }, { "name": "ruleTypes", "type": "array", "optional": true, "description": "The array keeps the types of ancestor CSSRules from the innermost going outwards.", "typeRef": "CSS.CSSRuleType" }, { "name": "startingStyles", "type": "array", "optional": true, "description": "@starting-style CSS at-rule array. The array enumerates @starting-style at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSStartingStyle" }, { "name": "navigations", "type": "array", "optional": true, "description": "@navigation CSS at-rule array. The array enumerates @navigation at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSNavigation" }]);
|
|
101229
102585
|
inspectorBackend.registerType("CSS.RuleUsage", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "startOffset", "type": "number", "optional": false, "description": "Offset of the start of the rule (including selector) from the beginning of the stylesheet.", "typeRef": null }, { "name": "endOffset", "type": "number", "optional": false, "description": "Offset of the end of the rule body from the beginning of the stylesheet.", "typeRef": null }, { "name": "used", "type": "boolean", "optional": false, "description": "Indicates whether the rule was actually used by some element in the page.", "typeRef": null }]);
|
|
101230
102586
|
inspectorBackend.registerType("CSS.SourceRange", [{ "name": "startLine", "type": "number", "optional": false, "description": "Start line of range.", "typeRef": null }, { "name": "startColumn", "type": "number", "optional": false, "description": "Start column of range (inclusive).", "typeRef": null }, { "name": "endLine", "type": "number", "optional": false, "description": "End line of range", "typeRef": null }, { "name": "endColumn", "type": "number", "optional": false, "description": "End column of range (exclusive).", "typeRef": null }]);
|
|
101231
102587
|
inspectorBackend.registerType("CSS.ShorthandEntry", [{ "name": "name", "type": "string", "optional": false, "description": "Shorthand name.", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "Shorthand value.", "typeRef": null }, { "name": "important", "type": "boolean", "optional": true, "description": "Whether the property has \\\"!important\\\" annotation (implies `false` if absent).", "typeRef": null }]);
|
|
@@ -101238,6 +102594,7 @@ function registerCommands(inspectorBackend) {
|
|
|
101238
102594
|
inspectorBackend.registerType("CSS.MediaQueryExpression", [{ "name": "value", "type": "number", "optional": false, "description": "Media query expression value.", "typeRef": null }, { "name": "unit", "type": "string", "optional": false, "description": "Media query expression units.", "typeRef": null }, { "name": "feature", "type": "string", "optional": false, "description": "Media query expression feature.", "typeRef": null }, { "name": "valueRange", "type": "object", "optional": true, "description": "The associated range of the value text in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "computedLength", "type": "number", "optional": true, "description": "Computed length of media query expression (if applicable).", "typeRef": null }]);
|
|
101239
102595
|
inspectorBackend.registerType("CSS.CSSContainerQuery", [{ "name": "text", "type": "string", "optional": false, "description": "Container query text.", "typeRef": null }, { "name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId" }, { "name": "name", "type": "string", "optional": true, "description": "Optional name for the container.", "typeRef": null }, { "name": "physicalAxes", "type": "string", "optional": true, "description": "Optional physical axes queried for the container.", "typeRef": "DOM.PhysicalAxes" }, { "name": "logicalAxes", "type": "string", "optional": true, "description": "Optional logical axes queried for the container.", "typeRef": "DOM.LogicalAxes" }, { "name": "queriesScrollState", "type": "boolean", "optional": true, "description": "true if the query contains scroll-state() queries.", "typeRef": null }, { "name": "queriesAnchored", "type": "boolean", "optional": true, "description": "true if the query contains anchored() queries.", "typeRef": null }]);
|
|
101240
102596
|
inspectorBackend.registerType("CSS.CSSSupports", [{ "name": "text", "type": "string", "optional": false, "description": "Supports rule text.", "typeRef": null }, { "name": "active", "type": "boolean", "optional": false, "description": "Whether the supports condition is satisfied.", "typeRef": null }, { "name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId" }]);
|
|
102597
|
+
inspectorBackend.registerType("CSS.CSSNavigation", [{ "name": "text", "type": "string", "optional": false, "description": "Navigation rule text.", "typeRef": null }, { "name": "active", "type": "boolean", "optional": true, "description": "Whether the navigation condition is satisfied.", "typeRef": null }, { "name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId" }]);
|
|
101241
102598
|
inspectorBackend.registerType("CSS.CSSScope", [{ "name": "text", "type": "string", "optional": false, "description": "Scope rule text.", "typeRef": null }, { "name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId" }]);
|
|
101242
102599
|
inspectorBackend.registerType("CSS.CSSLayer", [{ "name": "text", "type": "string", "optional": false, "description": "Layer name.", "typeRef": null }, { "name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId" }]);
|
|
101243
102600
|
inspectorBackend.registerType("CSS.CSSStartingStyle", [{ "name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId" }]);
|
|
@@ -101252,7 +102609,7 @@ function registerCommands(inspectorBackend) {
|
|
|
101252
102609
|
inspectorBackend.registerType("CSS.CSSAtRule", [{ "name": "type", "type": "string", "optional": false, "description": "Type of at-rule.", "typeRef": null }, { "name": "subsection", "type": "string", "optional": true, "description": "Subsection of font-feature-values, if this is a subsection.", "typeRef": null }, { "name": "name", "type": "object", "optional": true, "description": "LINT_SKIP.ThenChange(//third_party/blink/renderer/core/inspector/inspector_style_sheet.cc:FontVariantAlternatesFeatureType,//third_party/blink/renderer/core/inspector/inspector_css_agent.cc:FontVariantAlternatesFeatureType) Associated name, if applicable.", "typeRef": "CSS.Value" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle" }]);
|
|
101253
102610
|
inspectorBackend.registerType("CSS.CSSPropertyRule", [{ "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "propertyName", "type": "object", "optional": false, "description": "Associated property name.", "typeRef": "CSS.Value" }, { "name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle" }]);
|
|
101254
102611
|
inspectorBackend.registerType("CSS.CSSFunctionParameter", [{ "name": "name", "type": "string", "optional": false, "description": "The parameter name.", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "The parameter type.", "typeRef": null }]);
|
|
101255
|
-
inspectorBackend.registerType("CSS.CSSFunctionConditionNode", [{ "name": "media", "type": "object", "optional": true, "description": "Media query for this conditional block. Only one type of condition should be set.", "typeRef": "CSS.CSSMedia" }, { "name": "containerQueries", "type": "object", "optional": true, "description": "Container query for this conditional block. Only one type of condition should be set.", "typeRef": "CSS.CSSContainerQuery" }, { "name": "supports", "type": "object", "optional": true, "description": "@supports CSS at-rule condition. Only one type of condition should be set.", "typeRef": "CSS.CSSSupports" }, { "name": "children", "type": "array", "optional": false, "description": "Block body.", "typeRef": "CSS.CSSFunctionNode" }, { "name": "conditionText", "type": "string", "optional": false, "description": "The condition text.", "typeRef": null }]);
|
|
102612
|
+
inspectorBackend.registerType("CSS.CSSFunctionConditionNode", [{ "name": "media", "type": "object", "optional": true, "description": "Media query for this conditional block. Only one type of condition should be set.", "typeRef": "CSS.CSSMedia" }, { "name": "containerQueries", "type": "object", "optional": true, "description": "Container query for this conditional block. Only one type of condition should be set.", "typeRef": "CSS.CSSContainerQuery" }, { "name": "supports", "type": "object", "optional": true, "description": "@supports CSS at-rule condition. Only one type of condition should be set.", "typeRef": "CSS.CSSSupports" }, { "name": "navigation", "type": "object", "optional": true, "description": "@navigation condition. Only one type of condition should be set.", "typeRef": "CSS.CSSNavigation" }, { "name": "children", "type": "array", "optional": false, "description": "Block body.", "typeRef": "CSS.CSSFunctionNode" }, { "name": "conditionText", "type": "string", "optional": false, "description": "The condition text.", "typeRef": null }]);
|
|
101256
102613
|
inspectorBackend.registerType("CSS.CSSFunctionNode", [{ "name": "condition", "type": "object", "optional": true, "description": "A conditional block. If set, style should not be set.", "typeRef": "CSS.CSSFunctionConditionNode" }, { "name": "style", "type": "object", "optional": true, "description": "Values set by this node. If set, condition should not be set.", "typeRef": "CSS.CSSStyle" }]);
|
|
101257
102614
|
inspectorBackend.registerType("CSS.CSSFunctionRule", [{ "name": "name", "type": "object", "optional": false, "description": "Name of the function.", "typeRef": "CSS.Value" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "parameters", "type": "array", "optional": false, "description": "List of parameters.", "typeRef": "CSS.CSSFunctionParameter" }, { "name": "children", "type": "array", "optional": false, "description": "Function body.", "typeRef": "CSS.CSSFunctionNode" }]);
|
|
101258
102615
|
inspectorBackend.registerType("CSS.CSSKeyframeRule", [{ "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "keyText", "type": "object", "optional": false, "description": "Associated key text.", "typeRef": "CSS.Value" }, { "name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle" }]);
|
|
@@ -101295,6 +102652,7 @@ function registerCommands(inspectorBackend) {
|
|
|
101295
102652
|
inspectorBackend.registerEvent("DOM.pseudoElementAdded", ["parentId", "pseudoElement"]);
|
|
101296
102653
|
inspectorBackend.registerEvent("DOM.topLayerElementsUpdated", []);
|
|
101297
102654
|
inspectorBackend.registerEvent("DOM.scrollableFlagUpdated", ["nodeId", "isScrollable"]);
|
|
102655
|
+
inspectorBackend.registerEvent("DOM.adRelatedStateUpdated", ["nodeId", "isAdRelated"]);
|
|
101298
102656
|
inspectorBackend.registerEvent("DOM.affectedByStartingStylesFlagUpdated", ["nodeId", "affectedByStartingStyles"]);
|
|
101299
102657
|
inspectorBackend.registerEvent("DOM.pseudoElementRemoved", ["parentId", "pseudoElementId"]);
|
|
101300
102658
|
inspectorBackend.registerEvent("DOM.setChildNodes", ["parentId", "nodes"]);
|
|
@@ -101356,7 +102714,7 @@ function registerCommands(inspectorBackend) {
|
|
|
101356
102714
|
inspectorBackend.registerCommand("DOM.getAnchorElement", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the positioned element from which to find the anchor.", "typeRef": "DOM.NodeId" }, { "name": "anchorSpecifier", "type": "string", "optional": true, "description": "An optional anchor specifier, as defined in https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier. If not provided, it will return the implicit anchor element for the given positioned element.", "typeRef": null }], ["nodeId"], "Returns the target anchor element of the given anchor query according to https://www.w3.org/TR/css-anchor-position-1/#target.");
|
|
101357
102715
|
inspectorBackend.registerCommand("DOM.forceShowPopover", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the popover HTMLElement", "typeRef": "DOM.NodeId" }, { "name": "enable", "type": "boolean", "optional": false, "description": "If true, opens the popover and keeps it open. If false, closes the popover if it was previously force-opened.", "typeRef": null }], ["nodeIds"], "When enabling, this API force-opens the popover identified by nodeId and keeps it open until disabled.");
|
|
101358
102716
|
inspectorBackend.registerType("DOM.BackendNode", [{ "name": "nodeType", "type": "number", "optional": false, "description": "`Node`'s nodeType.", "typeRef": null }, { "name": "nodeName", "type": "string", "optional": false, "description": "`Node`'s nodeName.", "typeRef": null }, { "name": "backendNodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.BackendNodeId" }]);
|
|
101359
|
-
inspectorBackend.registerType("DOM.Node", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend will only push node with given `id` once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.", "typeRef": "DOM.NodeId" }, { "name": "parentId", "type": "number", "optional": true, "description": "The id of the parent node if any.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": false, "description": "The BackendNodeId for this node.", "typeRef": "DOM.BackendNodeId" }, { "name": "nodeType", "type": "number", "optional": false, "description": "`Node`'s nodeType.", "typeRef": null }, { "name": "nodeName", "type": "string", "optional": false, "description": "`Node`'s nodeName.", "typeRef": null }, { "name": "localName", "type": "string", "optional": false, "description": "`Node`'s localName.", "typeRef": null }, { "name": "nodeValue", "type": "string", "optional": false, "description": "`Node`'s nodeValue.", "typeRef": null }, { "name": "childNodeCount", "type": "number", "optional": true, "description": "Child count for `Container` nodes.", "typeRef": null }, { "name": "children", "type": "array", "optional": true, "description": "Child nodes of this node when requested with children.", "typeRef": "DOM.Node" }, { "name": "attributes", "type": "array", "optional": true, "description": "Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.", "typeRef": "string" }, { "name": "documentURL", "type": "string", "optional": true, "description": "Document URL that `Document` or `FrameOwner` node points to.", "typeRef": null }, { "name": "baseURL", "type": "string", "optional": true, "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.", "typeRef": null }, { "name": "publicId", "type": "string", "optional": true, "description": "`DocumentType`'s publicId.", "typeRef": null }, { "name": "systemId", "type": "string", "optional": true, "description": "`DocumentType`'s systemId.", "typeRef": null }, { "name": "internalSubset", "type": "string", "optional": true, "description": "`DocumentType`'s internalSubset.", "typeRef": null }, { "name": "xmlVersion", "type": "string", "optional": true, "description": "`Document`'s XML version in case of XML documents.", "typeRef": null }, { "name": "name", "type": "string", "optional": true, "description": "`Attr`'s name.", "typeRef": null }, { "name": "value", "type": "string", "optional": true, "description": "`Attr`'s value.", "typeRef": null }, { "name": "pseudoType", "type": "string", "optional": true, "description": "Pseudo element type for this node.", "typeRef": "DOM.PseudoType" }, { "name": "pseudoIdentifier", "type": "string", "optional": true, "description": "Pseudo element identifier for this node. Only present if there is a valid pseudoType.", "typeRef": null }, { "name": "shadowRootType", "type": "string", "optional": true, "description": "Shadow root type.", "typeRef": "DOM.ShadowRootType" }, { "name": "frameId", "type": "string", "optional": true, "description": "Frame ID for frame owner elements.", "typeRef": "Page.FrameId" }, { "name": "contentDocument", "type": "object", "optional": true, "description": "Content document for frame owner elements.", "typeRef": "DOM.Node" }, { "name": "shadowRoots", "type": "array", "optional": true, "description": "Shadow root list for given element host.", "typeRef": "DOM.Node" }, { "name": "templateContent", "type": "object", "optional": true, "description": "Content document fragment for template elements.", "typeRef": "DOM.Node" }, { "name": "pseudoElements", "type": "array", "optional": true, "description": "Pseudo elements associated with this node.", "typeRef": "DOM.Node" }, { "name": "importedDocument", "type": "object", "optional": true, "description": "Deprecated, as the HTML Imports API has been removed (crbug.com/937746). This property used to return the imported document for the HTMLImport links. The property is always undefined now.", "typeRef": "DOM.Node" }, { "name": "distributedNodes", "type": "array", "optional": true, "description": "Distributed nodes for given insertion point.", "typeRef": "DOM.BackendNode" }, { "name": "isSVG", "type": "boolean", "optional": true, "description": "Whether the node is SVG.", "typeRef": null }, { "name": "compatibilityMode", "type": "string", "optional": true, "description": "", "typeRef": "DOM.CompatibilityMode" }, { "name": "assignedSlot", "type": "object", "optional": true, "description": "", "typeRef": "DOM.BackendNode" }, { "name": "isScrollable", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "affectedByStartingStyles", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "adoptedStyleSheets", "type": "array", "optional": true, "description": "", "typeRef": "DOM.StyleSheetId" }]);
|
|
102717
|
+
inspectorBackend.registerType("DOM.Node", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend will only push node with given `id` once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.", "typeRef": "DOM.NodeId" }, { "name": "parentId", "type": "number", "optional": true, "description": "The id of the parent node if any.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": false, "description": "The BackendNodeId for this node.", "typeRef": "DOM.BackendNodeId" }, { "name": "nodeType", "type": "number", "optional": false, "description": "`Node`'s nodeType.", "typeRef": null }, { "name": "nodeName", "type": "string", "optional": false, "description": "`Node`'s nodeName.", "typeRef": null }, { "name": "localName", "type": "string", "optional": false, "description": "`Node`'s localName.", "typeRef": null }, { "name": "nodeValue", "type": "string", "optional": false, "description": "`Node`'s nodeValue.", "typeRef": null }, { "name": "childNodeCount", "type": "number", "optional": true, "description": "Child count for `Container` nodes.", "typeRef": null }, { "name": "children", "type": "array", "optional": true, "description": "Child nodes of this node when requested with children.", "typeRef": "DOM.Node" }, { "name": "attributes", "type": "array", "optional": true, "description": "Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.", "typeRef": "string" }, { "name": "documentURL", "type": "string", "optional": true, "description": "Document URL that `Document` or `FrameOwner` node points to.", "typeRef": null }, { "name": "baseURL", "type": "string", "optional": true, "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.", "typeRef": null }, { "name": "publicId", "type": "string", "optional": true, "description": "`DocumentType`'s publicId.", "typeRef": null }, { "name": "systemId", "type": "string", "optional": true, "description": "`DocumentType`'s systemId.", "typeRef": null }, { "name": "internalSubset", "type": "string", "optional": true, "description": "`DocumentType`'s internalSubset.", "typeRef": null }, { "name": "xmlVersion", "type": "string", "optional": true, "description": "`Document`'s XML version in case of XML documents.", "typeRef": null }, { "name": "name", "type": "string", "optional": true, "description": "`Attr`'s name.", "typeRef": null }, { "name": "value", "type": "string", "optional": true, "description": "`Attr`'s value.", "typeRef": null }, { "name": "pseudoType", "type": "string", "optional": true, "description": "Pseudo element type for this node.", "typeRef": "DOM.PseudoType" }, { "name": "pseudoIdentifier", "type": "string", "optional": true, "description": "Pseudo element identifier for this node. Only present if there is a valid pseudoType.", "typeRef": null }, { "name": "shadowRootType", "type": "string", "optional": true, "description": "Shadow root type.", "typeRef": "DOM.ShadowRootType" }, { "name": "frameId", "type": "string", "optional": true, "description": "Frame ID for frame owner elements.", "typeRef": "Page.FrameId" }, { "name": "contentDocument", "type": "object", "optional": true, "description": "Content document for frame owner elements.", "typeRef": "DOM.Node" }, { "name": "shadowRoots", "type": "array", "optional": true, "description": "Shadow root list for given element host.", "typeRef": "DOM.Node" }, { "name": "templateContent", "type": "object", "optional": true, "description": "Content document fragment for template elements.", "typeRef": "DOM.Node" }, { "name": "pseudoElements", "type": "array", "optional": true, "description": "Pseudo elements associated with this node.", "typeRef": "DOM.Node" }, { "name": "importedDocument", "type": "object", "optional": true, "description": "Deprecated, as the HTML Imports API has been removed (crbug.com/937746). This property used to return the imported document for the HTMLImport links. The property is always undefined now.", "typeRef": "DOM.Node" }, { "name": "distributedNodes", "type": "array", "optional": true, "description": "Distributed nodes for given insertion point.", "typeRef": "DOM.BackendNode" }, { "name": "isSVG", "type": "boolean", "optional": true, "description": "Whether the node is SVG.", "typeRef": null }, { "name": "compatibilityMode", "type": "string", "optional": true, "description": "", "typeRef": "DOM.CompatibilityMode" }, { "name": "assignedSlot", "type": "object", "optional": true, "description": "", "typeRef": "DOM.BackendNode" }, { "name": "isScrollable", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "affectedByStartingStyles", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "adoptedStyleSheets", "type": "array", "optional": true, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "isAdRelated", "type": "boolean", "optional": true, "description": "", "typeRef": null }]);
|
|
101360
102718
|
inspectorBackend.registerType("DOM.DetachedElementInfo", [{ "name": "treeNode", "type": "object", "optional": false, "description": "", "typeRef": "DOM.Node" }, { "name": "retainedNodeIds", "type": "array", "optional": false, "description": "", "typeRef": "DOM.NodeId" }]);
|
|
101361
102719
|
inspectorBackend.registerType("DOM.RGBA", [{ "name": "r", "type": "number", "optional": false, "description": "The red component, in the [0-255] range.", "typeRef": null }, { "name": "g", "type": "number", "optional": false, "description": "The green component, in the [0-255] range.", "typeRef": null }, { "name": "b", "type": "number", "optional": false, "description": "The blue component, in the [0-255] range.", "typeRef": null }, { "name": "a", "type": "number", "optional": true, "description": "The alpha component, in the [0-1] range (default: 1).", "typeRef": null }]);
|
|
101362
102720
|
inspectorBackend.registerType("DOM.Quad", [{ "name": "Quad", "type": "array", "optional": false, "description": "An array of quad vertices, x immediately followed by y for each point, points clock-wise.", "typeRef": "number" }]);
|
|
@@ -101422,8 +102780,9 @@ function registerCommands(inspectorBackend) {
|
|
|
101422
102780
|
inspectorBackend.registerEnum("Emulation.SensorType", { AbsoluteOrientation: "absolute-orientation", Accelerometer: "accelerometer", AmbientLight: "ambient-light", Gravity: "gravity", Gyroscope: "gyroscope", LinearAcceleration: "linear-acceleration", Magnetometer: "magnetometer", RelativeOrientation: "relative-orientation" });
|
|
101423
102781
|
inspectorBackend.registerEnum("Emulation.PressureSource", { Cpu: "cpu" });
|
|
101424
102782
|
inspectorBackend.registerEnum("Emulation.PressureState", { Nominal: "nominal", Fair: "fair", Serious: "serious", Critical: "critical" });
|
|
101425
|
-
inspectorBackend.registerEnum("Emulation.DisabledImageType", { Avif: "avif", Webp: "webp" });
|
|
102783
|
+
inspectorBackend.registerEnum("Emulation.DisabledImageType", { Avif: "avif", Jxl: "jxl", Webp: "webp" });
|
|
101426
102784
|
inspectorBackend.registerEvent("Emulation.virtualTimeBudgetExpired", []);
|
|
102785
|
+
inspectorBackend.registerEvent("Emulation.screenOrientationLockChanged", ["locked", "orientation"]);
|
|
101427
102786
|
inspectorBackend.registerCommand("Emulation.canEmulate", [], ["result"], "Tells whether emulation is supported.");
|
|
101428
102787
|
inspectorBackend.registerCommand("Emulation.clearDeviceMetricsOverride", [], [], "Clears the overridden device metrics.");
|
|
101429
102788
|
inspectorBackend.registerCommand("Emulation.clearGeolocationOverride", [], [], "Clears the overridden Geolocation Position and Error.");
|
|
@@ -101433,7 +102792,8 @@ function registerCommands(inspectorBackend) {
|
|
|
101433
102792
|
inspectorBackend.registerCommand("Emulation.setCPUThrottlingRate", [{ "name": "rate", "type": "number", "optional": false, "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).", "typeRef": null }], [], "Enables CPU throttling to emulate slow CPUs.");
|
|
101434
102793
|
inspectorBackend.registerCommand("Emulation.setDefaultBackgroundColorOverride", [{ "name": "color", "type": "object", "optional": true, "description": "RGBA of the default background color. If not specified, any existing override will be cleared.", "typeRef": "DOM.RGBA" }], [], "Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.");
|
|
101435
102794
|
inspectorBackend.registerCommand("Emulation.setSafeAreaInsetsOverride", [{ "name": "insets", "type": "object", "optional": false, "description": "", "typeRef": "Emulation.SafeAreaInsets" }], [], "Overrides the values for env(safe-area-inset-*) and env(safe-area-max-inset-*). Unset values will cause the respective variables to be undefined, even if previously overridden.");
|
|
101436
|
-
inspectorBackend.
|
|
102795
|
+
inspectorBackend.registerEnum("Emulation.SetDeviceMetricsOverrideRequestScrollbarType", { Overlay: "overlay", Default: "default" });
|
|
102796
|
+
inspectorBackend.registerCommand("Emulation.setDeviceMetricsOverride", [{ "name": "width", "type": "number", "optional": false, "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null }, { "name": "height", "type": "number", "optional": false, "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null }, { "name": "deviceScaleFactor", "type": "number", "optional": false, "description": "Overriding device scale factor value. 0 disables the override.", "typeRef": null }, { "name": "mobile", "type": "boolean", "optional": false, "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.", "typeRef": null }, { "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image.", "typeRef": null }, { "name": "screenWidth", "type": "number", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000).", "typeRef": null }, { "name": "screenHeight", "type": "number", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000).", "typeRef": null }, { "name": "positionX", "type": "number", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null }, { "name": "positionY", "type": "number", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null }, { "name": "dontSetVisibleSize", "type": "boolean", "optional": true, "description": "Do not set visible view size, rely upon explicit setVisibleSize call.", "typeRef": null }, { "name": "screenOrientation", "type": "object", "optional": true, "description": "Screen orientation override.", "typeRef": "Emulation.ScreenOrientation" }, { "name": "viewport", "type": "object", "optional": true, "description": "If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.", "typeRef": "Page.Viewport" }, { "name": "displayFeature", "type": "object", "optional": true, "description": "If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off. Deprecated, use Emulation.setDisplayFeaturesOverride.", "typeRef": "Emulation.DisplayFeature" }, { "name": "devicePosture", "type": "object", "optional": true, "description": "If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.", "typeRef": "Emulation.DevicePosture" }, { "name": "scrollbarType", "type": "string", "optional": true, "description": "Scrollbar type. Default: `default`.", "typeRef": "Emulation.SetDeviceMetricsOverrideRequestScrollbarType" }, { "name": "screenOrientationLockEmulation", "type": "boolean", "optional": true, "description": "If set to true, enables screen orientation lock emulation, which intercepts screen.orientation.lock() calls from the page and reports orientation changes via screenOrientationLockChanged events. This is useful for emulating mobile device orientation lock behavior in responsive design mode.", "typeRef": null }], [], "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).");
|
|
101437
102797
|
inspectorBackend.registerCommand("Emulation.setDevicePostureOverride", [{ "name": "posture", "type": "object", "optional": false, "description": "", "typeRef": "Emulation.DevicePosture" }], [], "Start reporting the given posture value to the Device Posture API. This override can also be set in setDeviceMetricsOverride().");
|
|
101438
102798
|
inspectorBackend.registerCommand("Emulation.clearDevicePostureOverride", [], [], "Clears a device posture override set with either setDeviceMetricsOverride() or setDevicePostureOverride() and starts using posture information from the platform again. Does nothing if no override is set.");
|
|
101439
102799
|
inspectorBackend.registerCommand("Emulation.setDisplayFeaturesOverride", [{ "name": "features", "type": "array", "optional": false, "description": "", "typeRef": "Emulation.DisplayFeature" }], [], "Start using the given display features to pupulate the Viewport Segments API. This override can also be set in setDeviceMetricsOverride().");
|
|
@@ -101471,7 +102831,9 @@ function registerCommands(inspectorBackend) {
|
|
|
101471
102831
|
inspectorBackend.registerCommand("Emulation.setSmallViewportHeightDifferenceOverride", [{ "name": "difference", "type": "number", "optional": false, "description": "This will cause an element of size 100svh to be `difference` pixels smaller than an element of size 100lvh.", "typeRef": null }], [], "Allows overriding the difference between the small and large viewport sizes, which determine the value of the `svh` and `lvh` unit, respectively. Only supported for top-level frames.");
|
|
101472
102832
|
inspectorBackend.registerCommand("Emulation.getScreenInfos", [], ["screenInfos"], "Returns device's screen configuration. In headful mode, the physical screens configuration is returned, whereas in headless mode, a virtual headless screen configuration is provided instead.");
|
|
101473
102833
|
inspectorBackend.registerCommand("Emulation.addScreen", [{ "name": "left", "type": "number", "optional": false, "description": "Offset of the left edge of the screen in pixels.", "typeRef": null }, { "name": "top", "type": "number", "optional": false, "description": "Offset of the top edge of the screen in pixels.", "typeRef": null }, { "name": "width", "type": "number", "optional": false, "description": "The width of the screen in pixels.", "typeRef": null }, { "name": "height", "type": "number", "optional": false, "description": "The height of the screen in pixels.", "typeRef": null }, { "name": "workAreaInsets", "type": "object", "optional": true, "description": "Specifies the screen's work area. Default is entire screen.", "typeRef": "Emulation.WorkAreaInsets" }, { "name": "devicePixelRatio", "type": "number", "optional": true, "description": "Specifies the screen's device pixel ratio. Default is 1.", "typeRef": null }, { "name": "rotation", "type": "number", "optional": true, "description": "Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270. Default is 0.", "typeRef": null }, { "name": "colorDepth", "type": "number", "optional": true, "description": "Specifies the screen's color depth in bits. Default is 24.", "typeRef": null }, { "name": "label", "type": "string", "optional": true, "description": "Specifies the descriptive label for the screen. Default is none.", "typeRef": null }, { "name": "isInternal", "type": "boolean", "optional": true, "description": "Indicates whether the screen is internal to the device or external, attached to the device. Default is false.", "typeRef": null }], ["screenInfo"], "Add a new screen to the device. Only supported in headless mode.");
|
|
102834
|
+
inspectorBackend.registerCommand("Emulation.updateScreen", [{ "name": "screenId", "type": "string", "optional": false, "description": "Target screen identifier.", "typeRef": "Emulation.ScreenId" }, { "name": "left", "type": "number", "optional": true, "description": "Offset of the left edge of the screen in pixels.", "typeRef": null }, { "name": "top", "type": "number", "optional": true, "description": "Offset of the top edge of the screen in pixels.", "typeRef": null }, { "name": "width", "type": "number", "optional": true, "description": "The width of the screen in pixels.", "typeRef": null }, { "name": "height", "type": "number", "optional": true, "description": "The height of the screen in pixels.", "typeRef": null }, { "name": "workAreaInsets", "type": "object", "optional": true, "description": "Specifies the screen's work area.", "typeRef": "Emulation.WorkAreaInsets" }, { "name": "devicePixelRatio", "type": "number", "optional": true, "description": "Specifies the screen's device pixel ratio.", "typeRef": null }, { "name": "rotation", "type": "number", "optional": true, "description": "Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270.", "typeRef": null }, { "name": "colorDepth", "type": "number", "optional": true, "description": "Specifies the screen's color depth in bits.", "typeRef": null }, { "name": "label", "type": "string", "optional": true, "description": "Specifies the descriptive label for the screen.", "typeRef": null }, { "name": "isInternal", "type": "boolean", "optional": true, "description": "Indicates whether the screen is internal to the device or external, attached to the device. Default is false.", "typeRef": null }], ["screenInfo"], "Updates specified screen parameters. Only supported in headless mode.");
|
|
101474
102835
|
inspectorBackend.registerCommand("Emulation.removeScreen", [{ "name": "screenId", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.ScreenId" }], [], "Remove screen from the device. Only supported in headless mode.");
|
|
102836
|
+
inspectorBackend.registerCommand("Emulation.setPrimaryScreen", [{ "name": "screenId", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.ScreenId" }], [], "Set primary screen. Only supported in headless mode. Note that this changes the coordinate system origin to the top-left of the new primary screen, updating the bounds and work areas of all existing screens accordingly.");
|
|
101475
102837
|
inspectorBackend.registerType("Emulation.SafeAreaInsets", [{ "name": "top", "type": "number", "optional": true, "description": "Overrides safe-area-inset-top.", "typeRef": null }, { "name": "topMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-top.", "typeRef": null }, { "name": "left", "type": "number", "optional": true, "description": "Overrides safe-area-inset-left.", "typeRef": null }, { "name": "leftMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-left.", "typeRef": null }, { "name": "bottom", "type": "number", "optional": true, "description": "Overrides safe-area-inset-bottom.", "typeRef": null }, { "name": "bottomMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-bottom.", "typeRef": null }, { "name": "right", "type": "number", "optional": true, "description": "Overrides safe-area-inset-right.", "typeRef": null }, { "name": "rightMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-right.", "typeRef": null }]);
|
|
101476
102838
|
inspectorBackend.registerType("Emulation.ScreenOrientation", [{ "name": "type", "type": "string", "optional": false, "description": "Orientation type.", "typeRef": null }, { "name": "angle", "type": "number", "optional": false, "description": "Orientation angle.", "typeRef": null }]);
|
|
101477
102839
|
inspectorBackend.registerType("Emulation.DisplayFeature", [{ "name": "orientation", "type": "string", "optional": false, "description": "Orientation of a display feature in relation to screen", "typeRef": null }, { "name": "offset", "type": "number", "optional": false, "description": "The offset from the screen origin in either the x (for vertical orientation) or y (for horizontal orientation) direction.", "typeRef": null }, { "name": "maskLength", "type": "number", "optional": false, "description": "A display feature may mask content such that it is not physically displayed - this length along with the offset describes this area. A display feature that only splits content will have a 0 mask_length.", "typeRef": null }]);
|
|
@@ -101493,11 +102855,13 @@ function registerCommands(inspectorBackend) {
|
|
|
101493
102855
|
inspectorBackend.registerEnum("Extensions.StorageArea", { Session: "session", Local: "local", Sync: "sync", Managed: "managed" });
|
|
101494
102856
|
inspectorBackend.registerCommand("Extensions.triggerAction", [{ "name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null }, { "name": "targetId", "type": "string", "optional": false, "description": "A tab target ID to trigger the default extension action on.", "typeRef": null }], [], "Runs an extension default action. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
|
|
101495
102857
|
inspectorBackend.registerCommand("Extensions.loadUnpacked", [{ "name": "path", "type": "string", "optional": false, "description": "Absolute file path.", "typeRef": null }, { "name": "enableInIncognito", "type": "boolean", "optional": true, "description": "Enable the extension in incognito", "typeRef": null }], ["id"], "Installs an unpacked extension from the filesystem similar to --load-extension CLI flags. Returns extension ID once the extension has been installed. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
|
|
102858
|
+
inspectorBackend.registerCommand("Extensions.getExtensions", [], ["extensions"], "Gets a list of all unpacked extensions. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
|
|
101496
102859
|
inspectorBackend.registerCommand("Extensions.uninstall", [{ "name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null }], [], "Uninstalls an unpacked extension (others not supported) from the profile. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging.");
|
|
101497
102860
|
inspectorBackend.registerCommand("Extensions.getStorageItems", [{ "name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null }, { "name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to retrieve data from.", "typeRef": "Extensions.StorageArea" }, { "name": "keys", "type": "array", "optional": true, "description": "Keys to retrieve.", "typeRef": "string" }], ["data"], "Gets data from extension storage in the given `storageArea`. If `keys` is specified, these are used to filter the result.");
|
|
101498
102861
|
inspectorBackend.registerCommand("Extensions.removeStorageItems", [{ "name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null }, { "name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to remove data from.", "typeRef": "Extensions.StorageArea" }, { "name": "keys", "type": "array", "optional": false, "description": "Keys to remove.", "typeRef": "string" }], [], "Removes `keys` from extension storage in the given `storageArea`.");
|
|
101499
102862
|
inspectorBackend.registerCommand("Extensions.clearStorageItems", [{ "name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null }, { "name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to remove data from.", "typeRef": "Extensions.StorageArea" }], [], "Clears extension storage in the given `storageArea`.");
|
|
101500
102863
|
inspectorBackend.registerCommand("Extensions.setStorageItems", [{ "name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null }, { "name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to set data in.", "typeRef": "Extensions.StorageArea" }, { "name": "values", "type": "object", "optional": false, "description": "Values to set.", "typeRef": null }], [], "Sets `values` in extension storage in the given `storageArea`. The provided `values` will be merged with existing values in the storage area.");
|
|
102864
|
+
inspectorBackend.registerType("Extensions.ExtensionInfo", [{ "name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null }, { "name": "name", "type": "string", "optional": false, "description": "Extension name.", "typeRef": null }, { "name": "version", "type": "string", "optional": false, "description": "Extension version.", "typeRef": null }, { "name": "path", "type": "string", "optional": false, "description": "The path from which the extension was loaded.", "typeRef": null }, { "name": "enabled", "type": "boolean", "optional": false, "description": "Extension enabled status.", "typeRef": null }]);
|
|
101501
102865
|
inspectorBackend.registerEnum("FedCm.LoginState", { SignIn: "SignIn", SignUp: "SignUp" });
|
|
101502
102866
|
inspectorBackend.registerEnum("FedCm.DialogType", { AccountChooser: "AccountChooser", AutoReauthn: "AutoReauthn", ConfirmIdpLogin: "ConfirmIdpLogin", Error: "Error" });
|
|
101503
102867
|
inspectorBackend.registerEnum("FedCm.DialogButton", { ConfirmIdpLoginContinue: "ConfirmIdpLoginContinue", ErrorGotIt: "ErrorGotIt", ErrorMoreDetails: "ErrorMoreDetails" });
|
|
@@ -101820,8 +103184,9 @@ function registerCommands(inspectorBackend) {
|
|
|
101820
103184
|
inspectorBackend.registerType("Network.DeviceBoundSessionUrlRule", [{ "name": "ruleType", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::rule_type`.", "typeRef": null }, { "name": "hostPattern", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::host_pattern`.", "typeRef": null }, { "name": "pathPrefix", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::path_prefix`.", "typeRef": null }]);
|
|
101821
103185
|
inspectorBackend.registerType("Network.DeviceBoundSessionInclusionRules", [{ "name": "origin", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::origin_`.", "typeRef": null }, { "name": "includeSite", "type": "boolean", "optional": false, "description": "Whether the whole site is included. See comments on `net::device_bound_sessions::SessionInclusionRules::include_site_` for more details; this boolean is true if that value is populated.", "typeRef": null }, { "name": "urlRules", "type": "array", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::url_rules_`.", "typeRef": "Network.DeviceBoundSessionUrlRule" }]);
|
|
101822
103186
|
inspectorBackend.registerType("Network.DeviceBoundSession", [{ "name": "key", "type": "object", "optional": false, "description": "The site and session ID of the session.", "typeRef": "Network.DeviceBoundSessionKey" }, { "name": "refreshUrl", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::refresh_url_`.", "typeRef": null }, { "name": "inclusionRules", "type": "object", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::inclusion_rules_`.", "typeRef": "Network.DeviceBoundSessionInclusionRules" }, { "name": "cookieCravings", "type": "array", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::cookie_cravings_`.", "typeRef": "Network.DeviceBoundSessionCookieCraving" }, { "name": "expiryDate", "type": "number", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::expiry_date_`.", "typeRef": "Network.TimeSinceEpoch" }, { "name": "cachedChallenge", "type": "string", "optional": true, "description": "See comments on `net::device_bound_sessions::Session::cached_challenge__`.", "typeRef": null }, { "name": "allowedRefreshInitiators", "type": "array", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::allowed_refresh_initiators_`.", "typeRef": "string" }]);
|
|
101823
|
-
inspectorBackend.registerType("Network.
|
|
101824
|
-
inspectorBackend.registerType("Network.
|
|
103187
|
+
inspectorBackend.registerType("Network.DeviceBoundSessionFailedRequest", [{ "name": "requestUrl", "type": "string", "optional": false, "description": "The failed request URL.", "typeRef": null }, { "name": "netError", "type": "string", "optional": true, "description": "The net error of the response if it was not OK.", "typeRef": null }, { "name": "responseError", "type": "number", "optional": true, "description": "The response code if the net error was OK and the response code was not 200.", "typeRef": null }, { "name": "responseErrorBody", "type": "string", "optional": true, "description": "The body of the response if the net error was OK, the response code was not 200, and the response body was not empty.", "typeRef": null }]);
|
|
103188
|
+
inspectorBackend.registerType("Network.CreationEventDetails", [{ "name": "fetchResult", "type": "string", "optional": false, "description": "The result of the fetch attempt.", "typeRef": "Network.DeviceBoundSessionFetchResult" }, { "name": "newSession", "type": "object", "optional": true, "description": "The session if there was a newly created session. This is populated for all successful creation events.", "typeRef": "Network.DeviceBoundSession" }, { "name": "failedRequest", "type": "object", "optional": true, "description": "Details about a failed device bound session network request if there was one.", "typeRef": "Network.DeviceBoundSessionFailedRequest" }]);
|
|
103189
|
+
inspectorBackend.registerType("Network.RefreshEventDetails", [{ "name": "refreshResult", "type": "string", "optional": false, "description": "The result of a refresh.", "typeRef": null }, { "name": "fetchResult", "type": "string", "optional": true, "description": "If there was a fetch attempt, the result of that.", "typeRef": "Network.DeviceBoundSessionFetchResult" }, { "name": "newSession", "type": "object", "optional": true, "description": "The session display if there was a newly created session. This is populated for any refresh event that modifies the session config.", "typeRef": "Network.DeviceBoundSession" }, { "name": "wasFullyProactiveRefresh", "type": "boolean", "optional": false, "description": "See comments on `net::device_bound_sessions::RefreshEventResult::was_fully_proactive_refresh`.", "typeRef": null }, { "name": "failedRequest", "type": "object", "optional": true, "description": "Details about a failed device bound session network request if there was one.", "typeRef": "Network.DeviceBoundSessionFailedRequest" }]);
|
|
101825
103190
|
inspectorBackend.registerType("Network.TerminationEventDetails", [{ "name": "deletionReason", "type": "string", "optional": false, "description": "The reason for a session being deleted.", "typeRef": null }]);
|
|
101826
103191
|
inspectorBackend.registerType("Network.ChallengeEventDetails", [{ "name": "challengeResult", "type": "string", "optional": false, "description": "The result of a challenge.", "typeRef": null }, { "name": "challenge", "type": "string", "optional": false, "description": "The challenge set.", "typeRef": null }]);
|
|
101827
103192
|
inspectorBackend.registerType("Network.LoadNetworkResourcePageResult", [{ "name": "success", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "netError", "type": "number", "optional": true, "description": "Optional values used for error reporting.", "typeRef": null }, { "name": "netErrorName", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "httpStatusCode", "type": "number", "optional": true, "description": "", "typeRef": null }, { "name": "stream", "type": "string", "optional": true, "description": "If successful, one of the following two fields holds the result.", "typeRef": "IO.StreamHandle" }, { "name": "headers", "type": "object", "optional": true, "description": "Response headers.", "typeRef": "Network.Headers" }]);
|
|
@@ -102857,6 +104222,9 @@ class TargetBase {
|
|
|
102857
104222
|
registerDOMStorageDispatcher(dispatcher) {
|
|
102858
104223
|
this.registerDispatcher('DOMStorage', dispatcher);
|
|
102859
104224
|
}
|
|
104225
|
+
registerEmulationDispatcher(dispatcher) {
|
|
104226
|
+
this.registerDispatcher('Emulation', dispatcher);
|
|
104227
|
+
}
|
|
102860
104228
|
registerFetchDispatcher(dispatcher) {
|
|
102861
104229
|
this.registerDispatcher('Fetch', dispatcher);
|
|
102862
104230
|
}
|
|
@@ -105367,7 +106735,6 @@ var DevtoolsExperiments;
|
|
|
105367
106735
|
DevtoolsExperiments[DevtoolsExperiments["apca"] = 39] = "apca";
|
|
105368
106736
|
DevtoolsExperiments[DevtoolsExperiments["font-editor"] = 41] = "font-editor";
|
|
105369
106737
|
DevtoolsExperiments[DevtoolsExperiments["full-accessibility-tree"] = 42] = "full-accessibility-tree";
|
|
105370
|
-
DevtoolsExperiments[DevtoolsExperiments["contrast-issues"] = 44] = "contrast-issues";
|
|
105371
106738
|
DevtoolsExperiments[DevtoolsExperiments["experimental-cookie-features"] = 45] = "experimental-cookie-features";
|
|
105372
106739
|
DevtoolsExperiments[DevtoolsExperiments["instrumentation-breakpoints"] = 61] = "instrumentation-breakpoints";
|
|
105373
106740
|
DevtoolsExperiments[DevtoolsExperiments["authored-deployed-grouping"] = 63] = "authored-deployed-grouping";
|
|
@@ -105375,7 +106742,9 @@ var DevtoolsExperiments;
|
|
|
105375
106742
|
DevtoolsExperiments[DevtoolsExperiments["use-source-map-scopes"] = 76] = "use-source-map-scopes";
|
|
105376
106743
|
DevtoolsExperiments[DevtoolsExperiments["timeline-show-postmessage-events"] = 86] = "timeline-show-postmessage-events";
|
|
105377
106744
|
DevtoolsExperiments[DevtoolsExperiments["timeline-debug-mode"] = 93] = "timeline-debug-mode";
|
|
105378
|
-
DevtoolsExperiments[DevtoolsExperiments["
|
|
106745
|
+
DevtoolsExperiments[DevtoolsExperiments["durable-messages"] = 110] = "durable-messages";
|
|
106746
|
+
DevtoolsExperiments[DevtoolsExperiments["jpeg-xl"] = 111] = "jpeg-xl";
|
|
106747
|
+
DevtoolsExperiments[DevtoolsExperiments["MAX_VALUE"] = 112] = "MAX_VALUE";
|
|
105379
106748
|
})(DevtoolsExperiments || (DevtoolsExperiments = {}));
|
|
105380
106749
|
var IssueExpanded;
|
|
105381
106750
|
(function (IssueExpanded) {
|
|
@@ -105442,7 +106811,6 @@ var IssueCreated;
|
|
|
105442
106811
|
IssueCreated[IssueCreated["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie"] = 35] = "CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie";
|
|
105443
106812
|
IssueCreated[IssueCreated["SharedArrayBufferIssue::TransferIssue"] = 36] = "SharedArrayBufferIssue::TransferIssue";
|
|
105444
106813
|
IssueCreated[IssueCreated["SharedArrayBufferIssue::CreationIssue"] = 37] = "SharedArrayBufferIssue::CreationIssue";
|
|
105445
|
-
IssueCreated[IssueCreated["LowTextContrastIssue"] = 41] = "LowTextContrastIssue";
|
|
105446
106814
|
IssueCreated[IssueCreated["CorsIssue::InsecureLocalNetwork"] = 42] = "CorsIssue::InsecureLocalNetwork";
|
|
105447
106815
|
IssueCreated[IssueCreated["CorsIssue::InvalidHeaders"] = 44] = "CorsIssue::InvalidHeaders";
|
|
105448
106816
|
IssueCreated[IssueCreated["CorsIssue::WildcardOriginWithCredentials"] = 45] = "CorsIssue::WildcardOriginWithCredentials";
|
|
@@ -106262,6 +107630,7 @@ const generatedProperties = [
|
|
|
106262
107630
|
"page-margin-safety",
|
|
106263
107631
|
"page-orientation",
|
|
106264
107632
|
"paint-order",
|
|
107633
|
+
"path-length",
|
|
106265
107634
|
"pathname",
|
|
106266
107635
|
"pattern",
|
|
106267
107636
|
"perspective",
|
|
@@ -107400,6 +108769,20 @@ const generatedProperties = [
|
|
|
107400
108769
|
],
|
|
107401
108770
|
"name": "column-rule-inset"
|
|
107402
108771
|
},
|
|
108772
|
+
{
|
|
108773
|
+
"longhands": [
|
|
108774
|
+
"column-rule-edge-inset-end",
|
|
108775
|
+
"column-rule-interior-inset-end"
|
|
108776
|
+
],
|
|
108777
|
+
"name": "column-rule-inset-end"
|
|
108778
|
+
},
|
|
108779
|
+
{
|
|
108780
|
+
"longhands": [
|
|
108781
|
+
"column-rule-edge-inset-start",
|
|
108782
|
+
"column-rule-interior-inset-start"
|
|
108783
|
+
],
|
|
108784
|
+
"name": "column-rule-inset-start"
|
|
108785
|
+
},
|
|
107403
108786
|
{
|
|
107404
108787
|
"longhands": [
|
|
107405
108788
|
"column-rule-interior-inset-start",
|
|
@@ -109199,6 +110582,12 @@ const generatedProperties = [
|
|
|
109199
110582
|
],
|
|
109200
110583
|
"name": "paint-order"
|
|
109201
110584
|
},
|
|
110585
|
+
{
|
|
110586
|
+
"keywords": [
|
|
110587
|
+
"none"
|
|
110588
|
+
],
|
|
110589
|
+
"name": "path-length"
|
|
110590
|
+
},
|
|
109202
110591
|
{
|
|
109203
110592
|
"name": "pathname"
|
|
109204
110593
|
},
|
|
@@ -109447,6 +110836,20 @@ const generatedProperties = [
|
|
|
109447
110836
|
],
|
|
109448
110837
|
"name": "row-rule-inset"
|
|
109449
110838
|
},
|
|
110839
|
+
{
|
|
110840
|
+
"longhands": [
|
|
110841
|
+
"row-rule-edge-inset-end",
|
|
110842
|
+
"row-rule-interior-inset-end"
|
|
110843
|
+
],
|
|
110844
|
+
"name": "row-rule-inset-end"
|
|
110845
|
+
},
|
|
110846
|
+
{
|
|
110847
|
+
"longhands": [
|
|
110848
|
+
"row-rule-edge-inset-start",
|
|
110849
|
+
"row-rule-interior-inset-start"
|
|
110850
|
+
],
|
|
110851
|
+
"name": "row-rule-inset-start"
|
|
110852
|
+
},
|
|
109450
110853
|
{
|
|
109451
110854
|
"longhands": [
|
|
109452
110855
|
"row-rule-interior-inset-start",
|
|
@@ -109568,6 +110971,24 @@ const generatedProperties = [
|
|
|
109568
110971
|
],
|
|
109569
110972
|
"name": "rule-inset"
|
|
109570
110973
|
},
|
|
110974
|
+
{
|
|
110975
|
+
"longhands": [
|
|
110976
|
+
"column-rule-edge-inset-end",
|
|
110977
|
+
"column-rule-interior-inset-end",
|
|
110978
|
+
"row-rule-edge-inset-end",
|
|
110979
|
+
"row-rule-interior-inset-end"
|
|
110980
|
+
],
|
|
110981
|
+
"name": "rule-inset-end"
|
|
110982
|
+
},
|
|
110983
|
+
{
|
|
110984
|
+
"longhands": [
|
|
110985
|
+
"column-rule-edge-inset-start",
|
|
110986
|
+
"column-rule-interior-inset-start",
|
|
110987
|
+
"row-rule-edge-inset-start",
|
|
110988
|
+
"row-rule-interior-inset-start"
|
|
110989
|
+
],
|
|
110990
|
+
"name": "rule-inset-start"
|
|
110991
|
+
},
|
|
109571
110992
|
{
|
|
109572
110993
|
"longhands": [
|
|
109573
110994
|
"row-rule-interior-inset-start",
|
|
@@ -110484,7 +111905,7 @@ const generatedProperties = [
|
|
|
110484
111905
|
"inherited": false,
|
|
110485
111906
|
"keywords": [
|
|
110486
111907
|
"none",
|
|
110487
|
-
"
|
|
111908
|
+
"all"
|
|
110488
111909
|
],
|
|
110489
111910
|
"name": "view-transition-scope"
|
|
110490
111911
|
},
|
|
@@ -112183,6 +113604,11 @@ const generatedPropertyValues = {
|
|
|
112183
113604
|
"markers"
|
|
112184
113605
|
]
|
|
112185
113606
|
},
|
|
113607
|
+
"path-length": {
|
|
113608
|
+
"values": [
|
|
113609
|
+
"none"
|
|
113610
|
+
]
|
|
113611
|
+
},
|
|
112186
113612
|
"perspective": {
|
|
112187
113613
|
"values": [
|
|
112188
113614
|
"none"
|
|
@@ -112860,7 +114286,7 @@ const generatedPropertyValues = {
|
|
|
112860
114286
|
"view-transition-scope": {
|
|
112861
114287
|
"values": [
|
|
112862
114288
|
"none",
|
|
112863
|
-
"
|
|
114289
|
+
"all"
|
|
112864
114290
|
]
|
|
112865
114291
|
},
|
|
112866
114292
|
"visibility": {
|
|
@@ -114586,6 +116012,23 @@ const extraPropertyValues = new Map([
|
|
|
114586
116012
|
['-webkit-transform-origin-x', new Set(['left', 'right', 'center'])],
|
|
114587
116013
|
['-webkit-transform-origin-y', new Set(['top', 'bottom', 'center'])],
|
|
114588
116014
|
['width', new Set(['-webkit-fill-available', 'stretch'])],
|
|
116015
|
+
[
|
|
116016
|
+
'animation-trigger',
|
|
116017
|
+
new Set([
|
|
116018
|
+
'play',
|
|
116019
|
+
'pause',
|
|
116020
|
+
'play-once',
|
|
116021
|
+
'play-alternate',
|
|
116022
|
+
'play-forwards',
|
|
116023
|
+
'play-backwards',
|
|
116024
|
+
'play-pause',
|
|
116025
|
+
'replay',
|
|
116026
|
+
]),
|
|
116027
|
+
],
|
|
116028
|
+
['timeline-trigger-activation-range-start', new Set(['normal'])],
|
|
116029
|
+
['timeline-trigger-activation-range-end', new Set(['normal'])],
|
|
116030
|
+
['timeline-trigger-active-range-start', new Set(['normal'])],
|
|
116031
|
+
['timeline-trigger-active-range-end', new Set(['normal'])],
|
|
114589
116032
|
['contain-intrinsic-width', new Set(['auto none', 'auto 100px'])],
|
|
114590
116033
|
['contain-intrinsic-height', new Set(['auto none', 'auto 100px'])],
|
|
114591
116034
|
['contain-intrinsic-size', new Set(['auto none', 'auto 100px'])],
|
|
@@ -116826,6 +118269,32 @@ class CSSProperty extends ObjectWrapper {
|
|
|
116826
118269
|
getLonghandProperties() {
|
|
116827
118270
|
return this.#longhandProperties;
|
|
116828
118271
|
}
|
|
118272
|
+
ignoreErrors() {
|
|
118273
|
+
function hasUnknownVendorPrefix(string) {
|
|
118274
|
+
return !string.startsWith('-webkit-') && /^[-_][\w\d]+-\w/.test(string);
|
|
118275
|
+
}
|
|
118276
|
+
const name = this.name.toLowerCase();
|
|
118277
|
+
if (name.charAt(0) === '_') {
|
|
118278
|
+
return true;
|
|
118279
|
+
}
|
|
118280
|
+
if (name === 'filter') {
|
|
118281
|
+
return true;
|
|
118282
|
+
}
|
|
118283
|
+
if (name.startsWith('scrollbar-')) {
|
|
118284
|
+
return true;
|
|
118285
|
+
}
|
|
118286
|
+
if (hasUnknownVendorPrefix(name)) {
|
|
118287
|
+
return true;
|
|
118288
|
+
}
|
|
118289
|
+
const value = this.value.toLowerCase();
|
|
118290
|
+
if (value.endsWith('\\9')) {
|
|
118291
|
+
return true;
|
|
118292
|
+
}
|
|
118293
|
+
if (hasUnknownVendorPrefix(value)) {
|
|
118294
|
+
return true;
|
|
118295
|
+
}
|
|
118296
|
+
return false;
|
|
118297
|
+
}
|
|
116829
118298
|
}
|
|
116830
118299
|
|
|
116831
118300
|
// Copyright 2021 The Chromium Authors
|
|
@@ -117084,6 +118553,27 @@ class CSSMedia extends CSSQuery {
|
|
|
117084
118553
|
}
|
|
117085
118554
|
}
|
|
117086
118555
|
|
|
118556
|
+
// Copyright 2026 The Chromium Authors
|
|
118557
|
+
class CSSNavigation extends CSSQuery {
|
|
118558
|
+
static parseNavigationPayload(cssModel, payload) {
|
|
118559
|
+
return payload.map(navigation => new CSSNavigation(cssModel, navigation));
|
|
118560
|
+
}
|
|
118561
|
+
#active = true;
|
|
118562
|
+
constructor(cssModel, payload) {
|
|
118563
|
+
super(cssModel);
|
|
118564
|
+
this.reinitialize(payload);
|
|
118565
|
+
}
|
|
118566
|
+
reinitialize(payload) {
|
|
118567
|
+
this.text = payload.text;
|
|
118568
|
+
this.range = payload.range ? TextRange.fromObject(payload.range) : null;
|
|
118569
|
+
this.styleSheetId = payload.styleSheetId;
|
|
118570
|
+
this.#active = payload.active ?? true;
|
|
118571
|
+
}
|
|
118572
|
+
active() {
|
|
118573
|
+
return this.#active;
|
|
118574
|
+
}
|
|
118575
|
+
}
|
|
118576
|
+
|
|
117087
118577
|
// Copyright 2022 The Chromium Authors
|
|
117088
118578
|
class CSSScope extends CSSQuery {
|
|
117089
118579
|
static parseScopesPayload(cssModel, payload) {
|
|
@@ -117478,6 +118968,7 @@ class CSSStyleRule extends CSSRule {
|
|
|
117478
118968
|
layers;
|
|
117479
118969
|
ruleTypes;
|
|
117480
118970
|
startingStyles;
|
|
118971
|
+
navigations;
|
|
117481
118972
|
wasUsed;
|
|
117482
118973
|
constructor(cssModel, payload, wasUsed) {
|
|
117483
118974
|
super(cssModel, {
|
|
@@ -117497,6 +118988,7 @@ class CSSStyleRule extends CSSRule {
|
|
|
117497
118988
|
this.layers = payload.layers ? CSSLayer.parseLayerPayload(cssModel, payload.layers) : [];
|
|
117498
118989
|
this.startingStyles =
|
|
117499
118990
|
payload.startingStyles ? CSSStartingStyle.parseStartingStylePayload(cssModel, payload.startingStyles) : [];
|
|
118991
|
+
this.navigations = payload.navigations ? CSSNavigation.parseNavigationPayload(cssModel, payload.navigations) : [];
|
|
117500
118992
|
this.ruleTypes = payload.ruleTypes || [];
|
|
117501
118993
|
this.wasUsed = wasUsed || false;
|
|
117502
118994
|
}
|
|
@@ -117504,7 +118996,7 @@ class CSSStyleRule extends CSSRule {
|
|
|
117504
118996
|
const dummyPayload = {
|
|
117505
118997
|
selectorList: {
|
|
117506
118998
|
text: '',
|
|
117507
|
-
selectors: [{ text: selectorText
|
|
118999
|
+
selectors: [{ text: selectorText }],
|
|
117508
119000
|
},
|
|
117509
119001
|
style: {
|
|
117510
119002
|
styleSheetId: '0',
|
|
@@ -117578,6 +119070,7 @@ class CSSStyleRule extends CSSRule {
|
|
|
117578
119070
|
this.containerQueries.forEach(cq => cq.rebase(edit));
|
|
117579
119071
|
this.scopes.forEach(scope => scope.rebase(edit));
|
|
117580
119072
|
this.supports.forEach(supports => supports.rebase(edit));
|
|
119073
|
+
this.navigations.forEach(navigation => navigation.rebase(edit));
|
|
117581
119074
|
super.rebase(edit);
|
|
117582
119075
|
}
|
|
117583
119076
|
}
|
|
@@ -117588,7 +119081,6 @@ class CSSPropertyRule extends CSSRule {
|
|
|
117588
119081
|
origin: payload.origin,
|
|
117589
119082
|
style: payload.style,
|
|
117590
119083
|
header: styleSheetHeaderForRule(cssModel, payload),
|
|
117591
|
-
originTreeScopeNodeId: undefined,
|
|
117592
119084
|
});
|
|
117593
119085
|
this.#name = new CSSValue(payload.propertyName);
|
|
117594
119086
|
}
|
|
@@ -117625,7 +119117,6 @@ class CSSAtRule extends CSSRule {
|
|
|
117625
119117
|
origin: payload.origin,
|
|
117626
119118
|
style: payload.style,
|
|
117627
119119
|
header: styleSheetHeaderForRule(cssModel, payload),
|
|
117628
|
-
originTreeScopeNodeId: undefined
|
|
117629
119120
|
});
|
|
117630
119121
|
this.#name = payload.name ? new CSSValue(payload.name) : null;
|
|
117631
119122
|
this.#type = payload.type;
|
|
@@ -117664,7 +119155,6 @@ class CSSKeyframeRule extends CSSRule {
|
|
|
117664
119155
|
origin: payload.origin,
|
|
117665
119156
|
style: payload.style,
|
|
117666
119157
|
header: styleSheetHeaderForRule(cssModel, payload),
|
|
117667
|
-
originTreeScopeNodeId: undefined
|
|
117668
119158
|
});
|
|
117669
119159
|
this.reinitializeKey(payload.keyText);
|
|
117670
119160
|
this.#parentRuleName = parentRuleName;
|
|
@@ -117713,7 +119203,6 @@ class CSSPositionTryRule extends CSSRule {
|
|
|
117713
119203
|
origin: payload.origin,
|
|
117714
119204
|
style: payload.style,
|
|
117715
119205
|
header: styleSheetHeaderForRule(cssModel, payload),
|
|
117716
|
-
originTreeScopeNodeId: undefined
|
|
117717
119206
|
});
|
|
117718
119207
|
this.#name = new CSSValue(payload.name);
|
|
117719
119208
|
this.#active = payload.active;
|
|
@@ -117734,7 +119223,6 @@ class CSSFunctionRule extends CSSRule {
|
|
|
117734
119223
|
origin: payload.origin,
|
|
117735
119224
|
style: { cssProperties: [], shorthandEntries: [] },
|
|
117736
119225
|
header: styleSheetHeaderForRule(cssModel, payload),
|
|
117737
|
-
originTreeScopeNodeId: undefined
|
|
117738
119226
|
});
|
|
117739
119227
|
this.#name = new CSSValue(payload.name);
|
|
117740
119228
|
this.#parameters = payload.parameters.map(({ name }) => name);
|
|
@@ -117783,7 +119271,13 @@ class CSSFunctionRule extends CSSRule {
|
|
|
117783
119271
|
supports: new CSSSupports(this.cssModelInternal, node.condition.supports),
|
|
117784
119272
|
};
|
|
117785
119273
|
}
|
|
117786
|
-
|
|
119274
|
+
if (node.condition.navigation) {
|
|
119275
|
+
return {
|
|
119276
|
+
children,
|
|
119277
|
+
navigation: new CSSNavigation(this.cssModelInternal, node.condition.navigation),
|
|
119278
|
+
};
|
|
119279
|
+
}
|
|
119280
|
+
console.error('A function rule condition must have a media, container, supports, or navigation');
|
|
117787
119281
|
return;
|
|
117788
119282
|
}
|
|
117789
119283
|
console.error('A function rule node must have a style or condition');
|
|
@@ -119663,7 +121157,6 @@ class CookieModel extends SDKModel {
|
|
|
119663
121157
|
this.#cookieToBlockedReasons.clear();
|
|
119664
121158
|
await Promise.all(cookies.map(cookie => networkAgent.invoke_deleteCookies({
|
|
119665
121159
|
name: cookie.name(),
|
|
119666
|
-
url: undefined,
|
|
119667
121160
|
domain: cookie.domain(),
|
|
119668
121161
|
path: cookie.path(),
|
|
119669
121162
|
partitionKey: cookie.partitionKey(),
|
|
@@ -121439,6 +122932,9 @@ class NetworkRequest extends ObjectWrapper {
|
|
|
121439
122932
|
requestContentType() {
|
|
121440
122933
|
return this.requestHeaderValue('Content-Type');
|
|
121441
122934
|
}
|
|
122935
|
+
requestContentEncoding() {
|
|
122936
|
+
return this.requestHeaderValue('Content-Encoding');
|
|
122937
|
+
}
|
|
121442
122938
|
hasErrorStatusCode() {
|
|
121443
122939
|
return this.statusCode >= 400;
|
|
121444
122940
|
}
|
|
@@ -122345,13 +123841,44 @@ class NetworkManager extends SDKModel {
|
|
|
122345
123841
|
return null;
|
|
122346
123842
|
}
|
|
122347
123843
|
try {
|
|
122348
|
-
const { postData } = await manager.#networkAgent.invoke_getRequestPostData({ requestId });
|
|
123844
|
+
const { postData, base64Encoded } = await manager.#networkAgent.invoke_getRequestPostData({ requestId });
|
|
123845
|
+
if (base64Encoded && postData) {
|
|
123846
|
+
const binaryString = window.atob(postData);
|
|
123847
|
+
const bytes = new Uint8Array(binaryString.length);
|
|
123848
|
+
for (let i = 0; i < binaryString.length; i++) {
|
|
123849
|
+
bytes[i] = binaryString.charCodeAt(i);
|
|
123850
|
+
}
|
|
123851
|
+
const requestContentType = request.requestContentType();
|
|
123852
|
+
const charset = requestContentType ? parseContentType(requestContentType).charset ?? 'utf-8' : 'utf-8';
|
|
123853
|
+
const contentEncoding = request.requestContentEncoding()?.toLowerCase();
|
|
123854
|
+
if (contentEncoding) {
|
|
123855
|
+
const decompressed = await NetworkManager.#tryDecompressBody(bytes.buffer, contentEncoding, charset);
|
|
123856
|
+
if (decompressed !== null) {
|
|
123857
|
+
return decompressed;
|
|
123858
|
+
}
|
|
123859
|
+
}
|
|
123860
|
+
return new TextDecoder(charset).decode(bytes);
|
|
123861
|
+
}
|
|
122349
123862
|
return postData;
|
|
122350
123863
|
}
|
|
122351
123864
|
catch (e) {
|
|
122352
123865
|
return e.message;
|
|
122353
123866
|
}
|
|
122354
123867
|
}
|
|
123868
|
+
static async #tryDecompressBody(buffer, encoding, charset) {
|
|
123869
|
+
try {
|
|
123870
|
+
if (encoding.includes('gzip') && isGzip(buffer)) {
|
|
123871
|
+
return await decompress(buffer, charset);
|
|
123872
|
+
}
|
|
123873
|
+
if (encoding.includes('deflate')) {
|
|
123874
|
+
return await decompressDeflate(buffer, charset);
|
|
123875
|
+
}
|
|
123876
|
+
}
|
|
123877
|
+
catch (e) {
|
|
123878
|
+
console.warn('Failed to decompress request body:', e);
|
|
123879
|
+
}
|
|
123880
|
+
return null;
|
|
123881
|
+
}
|
|
122355
123882
|
static connectionType(conditions) {
|
|
122356
123883
|
if (!conditions.download && !conditions.upload) {
|
|
122357
123884
|
return "none" ;
|
|
@@ -122536,7 +124063,8 @@ class NetworkDispatcher {
|
|
|
122536
124063
|
updateNetworkRequestWithRequest(networkRequest, request) {
|
|
122537
124064
|
networkRequest.requestMethod = request.method;
|
|
122538
124065
|
networkRequest.setRequestHeaders(this.headersMapToHeadersArray(request.headers));
|
|
122539
|
-
networkRequest.
|
|
124066
|
+
const isCompressed = Boolean(networkRequest.requestContentEncoding());
|
|
124067
|
+
networkRequest.setRequestFormData(Boolean(request.hasPostData), isCompressed ? null : (request.postData || null));
|
|
122540
124068
|
networkRequest.setInitialPriority(request.initialPriority);
|
|
122541
124069
|
networkRequest.mixedContentType = request.mixedContentType || "none" ;
|
|
122542
124070
|
networkRequest.setReferrerPolicy(request.referrerPolicy);
|
|
@@ -124213,7 +125741,13 @@ class PageResourceLoader extends ObjectWrapper {
|
|
|
124213
125741
|
throw new Error('Invalid initiator');
|
|
124214
125742
|
}
|
|
124215
125743
|
const key = PageResourceLoader.makeKey(url, initiator);
|
|
124216
|
-
const pageResource = {
|
|
125744
|
+
const pageResource = {
|
|
125745
|
+
success: null,
|
|
125746
|
+
size: null,
|
|
125747
|
+
duration: null,
|
|
125748
|
+
url,
|
|
125749
|
+
initiator,
|
|
125750
|
+
};
|
|
124217
125751
|
this.#pageResources.set(key, pageResource);
|
|
124218
125752
|
this.dispatchEventToListeners("Update" );
|
|
124219
125753
|
const startTime = performance.now();
|
|
@@ -124269,7 +125803,10 @@ class PageResourceLoader extends ObjectWrapper {
|
|
|
124269
125803
|
return {
|
|
124270
125804
|
success: false,
|
|
124271
125805
|
content: '',
|
|
124272
|
-
errorDescription: {
|
|
125806
|
+
errorDescription: {
|
|
125807
|
+
statusCode: 0,
|
|
125808
|
+
message: e.message,
|
|
125809
|
+
}
|
|
124273
125810
|
};
|
|
124274
125811
|
}
|
|
124275
125812
|
}
|
|
@@ -124327,7 +125864,6 @@ class PageResourceLoader extends ObjectWrapper {
|
|
|
124327
125864
|
netErrorName: resource.netErrorName,
|
|
124328
125865
|
message: netErrorToMessage(resource.netError, resource.httpStatusCode, resource.netErrorName) ||
|
|
124329
125866
|
'',
|
|
124330
|
-
urlValid: undefined,
|
|
124331
125867
|
},
|
|
124332
125868
|
};
|
|
124333
125869
|
}
|
|
@@ -124798,7 +126334,7 @@ class Decoder {
|
|
|
124798
126334
|
to: { line: 0, column: 0 },
|
|
124799
126335
|
value: value,
|
|
124800
126336
|
});
|
|
124801
|
-
for (const [
|
|
126337
|
+
for (const [line, column, binding] of bindings) {
|
|
124802
126338
|
lastLine += line;
|
|
124803
126339
|
if (line === 0) {
|
|
124804
126340
|
lastColumn += column;
|
|
@@ -125070,6 +126606,9 @@ var formatter = /*#__PURE__*/Object.freeze({
|
|
|
125070
126606
|
// Copyright 2023 The Chromium Authors
|
|
125071
126607
|
const scopeTrees = new WeakMap();
|
|
125072
126608
|
function scopeTreeForScript(script) {
|
|
126609
|
+
if (script.isWasm()) {
|
|
126610
|
+
return Promise.resolve(null);
|
|
126611
|
+
}
|
|
125073
126612
|
let promise = scopeTrees.get(script);
|
|
125074
126613
|
if (promise === undefined) {
|
|
125075
126614
|
promise = script.requestContentData().then(content => {
|
|
@@ -125811,7 +127350,6 @@ class SourceMap {
|
|
|
125811
127350
|
sourceURL: this.sourceURLs()[callsite.sourceIndex],
|
|
125812
127351
|
sourceLineNumber: callsite.line,
|
|
125813
127352
|
sourceColumnNumber: callsite.column,
|
|
125814
|
-
name: undefined,
|
|
125815
127353
|
};
|
|
125816
127354
|
}
|
|
125817
127355
|
const mappings = this.mappings();
|
|
@@ -126390,7 +127928,6 @@ class SourceMapManager extends ObjectWrapper {
|
|
|
126390
127928
|
let clientData = {
|
|
126391
127929
|
relativeSourceURL,
|
|
126392
127930
|
relativeSourceMapURL,
|
|
126393
|
-
sourceMap: undefined,
|
|
126394
127931
|
sourceMapPromise: Promise.resolve(undefined),
|
|
126395
127932
|
};
|
|
126396
127933
|
if (this.#isEnabled) {
|
|
@@ -126945,6 +128482,24 @@ class CSSModel extends SDKModel {
|
|
|
126945
128482
|
return false;
|
|
126946
128483
|
}
|
|
126947
128484
|
}
|
|
128485
|
+
async setNavigationText(styleSheetId, range, newNavigationText) {
|
|
128486
|
+
userMetrics.actionTaken(Action.StyleRuleEdited);
|
|
128487
|
+
try {
|
|
128488
|
+
await this.ensureOriginalStyleSheetText(styleSheetId);
|
|
128489
|
+
const { navigation } = await this.agent.invoke_setNavigationText({ styleSheetId, range, text: newNavigationText });
|
|
128490
|
+
if (!navigation) {
|
|
128491
|
+
return false;
|
|
128492
|
+
}
|
|
128493
|
+
this.#domModel.markUndoableState();
|
|
128494
|
+
const edit = new Edit(styleSheetId, range, newNavigationText, navigation);
|
|
128495
|
+
this.fireStyleSheetChanged(styleSheetId, edit);
|
|
128496
|
+
return true;
|
|
128497
|
+
}
|
|
128498
|
+
catch (e) {
|
|
128499
|
+
console.error(e);
|
|
128500
|
+
return false;
|
|
128501
|
+
}
|
|
128502
|
+
}
|
|
126948
128503
|
async setScopeText(styleSheetId, range, newScopeText) {
|
|
126949
128504
|
userMetrics.actionTaken(Action.StyleRuleEdited);
|
|
126950
128505
|
try {
|
|
@@ -129031,7 +130586,8 @@ class RuntimeModel extends SDKModel {
|
|
|
129031
130586
|
}
|
|
129032
130587
|
}
|
|
129033
130588
|
if (object.isNode()) {
|
|
129034
|
-
|
|
130589
|
+
const omitFocus = hints !== null && typeof hints === 'object' && 'omitFocus' in hints && Boolean(hints.omitFocus);
|
|
130590
|
+
void reveal(object, omitFocus).then(object.release.bind(object));
|
|
129035
130591
|
return;
|
|
129036
130592
|
}
|
|
129037
130593
|
if (object.type === 'function') {
|
|
@@ -129365,6 +130921,7 @@ var DOMNodeEvents;
|
|
|
129365
130921
|
(function (DOMNodeEvents) {
|
|
129366
130922
|
DOMNodeEvents["TOP_LAYER_INDEX_CHANGED"] = "TopLayerIndexChanged";
|
|
129367
130923
|
DOMNodeEvents["SCROLLABLE_FLAG_UPDATED"] = "ScrollableFlagUpdated";
|
|
130924
|
+
DOMNodeEvents["AD_RELATED_STATE_UPDATED"] = "AdRelatedStateUpdated";
|
|
129368
130925
|
DOMNodeEvents["GRID_OVERLAY_STATE_CHANGED"] = "GridOverlayStateChanged";
|
|
129369
130926
|
DOMNodeEvents["FLEX_CONTAINER_OVERLAY_STATE_CHANGED"] = "FlexContainerOverlayStateChanged";
|
|
129370
130927
|
DOMNodeEvents["SCROLL_SNAP_OVERLAY_STATE_CHANGED"] = "ScrollSnapOverlayStateChanged";
|
|
@@ -129419,6 +130976,7 @@ class DOMNode extends ObjectWrapper {
|
|
|
129419
130976
|
#retainedNodes;
|
|
129420
130977
|
#adoptedStyleSheets = [];
|
|
129421
130978
|
#topLayerIndex = -1;
|
|
130979
|
+
#isAdRelatedInternal = false;
|
|
129422
130980
|
constructor(domModel) {
|
|
129423
130981
|
super();
|
|
129424
130982
|
this.#domModel = domModel;
|
|
@@ -129499,6 +131057,9 @@ class DOMNode extends ObjectWrapper {
|
|
|
129499
131057
|
this.setChildrenPayload(payload.children);
|
|
129500
131058
|
}
|
|
129501
131059
|
this.setPseudoElements(payload.pseudoElements);
|
|
131060
|
+
if (payload.isAdRelated) {
|
|
131061
|
+
this.#isAdRelatedInternal = true;
|
|
131062
|
+
}
|
|
129502
131063
|
if (this.#nodeType === Node.ELEMENT_NODE) {
|
|
129503
131064
|
if (this.ownerDocument && !this.ownerDocument.documentElement && this.#nodeName === 'HTML') {
|
|
129504
131065
|
this.ownerDocument.documentElement = this;
|
|
@@ -129532,7 +131093,7 @@ class DOMNode extends ObjectWrapper {
|
|
|
129532
131093
|
topLayerIndex() {
|
|
129533
131094
|
return this.#topLayerIndex;
|
|
129534
131095
|
}
|
|
129535
|
-
|
|
131096
|
+
isAdRelatedNode() {
|
|
129536
131097
|
if (this.isIframe() && this.#frameOwnerFrameId) {
|
|
129537
131098
|
const frame = FrameManager.instance().getFrame(this.#frameOwnerFrameId);
|
|
129538
131099
|
if (!frame) {
|
|
@@ -129540,7 +131101,7 @@ class DOMNode extends ObjectWrapper {
|
|
|
129540
131101
|
}
|
|
129541
131102
|
return frame.adFrameType() !== "none" ;
|
|
129542
131103
|
}
|
|
129543
|
-
return
|
|
131104
|
+
return this.#isAdRelatedInternal;
|
|
129544
131105
|
}
|
|
129545
131106
|
isRootNode() {
|
|
129546
131107
|
if (this.nodeType() === Node.ELEMENT_NODE && this.nodeName() === 'HTML') {
|
|
@@ -129603,6 +131164,10 @@ class DOMNode extends ObjectWrapper {
|
|
|
129603
131164
|
this.ownerDocument?.documentElement?.setIsScrollable(isScrollable);
|
|
129604
131165
|
}
|
|
129605
131166
|
}
|
|
131167
|
+
setIsAdRelated(isAdRelated) {
|
|
131168
|
+
this.#isAdRelatedInternal = isAdRelated;
|
|
131169
|
+
this.dispatchEventToListeners(DOMNodeEvents.AD_RELATED_STATE_UPDATED);
|
|
131170
|
+
}
|
|
129606
131171
|
setAffectedByStartingStyles(affectedByStartingStyles) {
|
|
129607
131172
|
this.#affectedByStartingStyles = affectedByStartingStyles;
|
|
129608
131173
|
}
|
|
@@ -130148,13 +131713,17 @@ class DOMNode extends ObjectWrapper {
|
|
|
130148
131713
|
return null;
|
|
130149
131714
|
}
|
|
130150
131715
|
highlight(mode) {
|
|
130151
|
-
this.#domModel.overlayModel().highlightInOverlay({ node: this
|
|
131716
|
+
this.#domModel.overlayModel().highlightInOverlay({ node: this }, mode);
|
|
130152
131717
|
}
|
|
130153
131718
|
highlightForTwoSeconds() {
|
|
130154
|
-
this.#domModel.overlayModel().highlightInOverlayForTwoSeconds({ node: this
|
|
131719
|
+
this.#domModel.overlayModel().highlightInOverlayForTwoSeconds({ node: this });
|
|
130155
131720
|
}
|
|
130156
131721
|
async resolveToObject(objectGroup, executionContextId) {
|
|
130157
|
-
const { object } = await this.#agent.invoke_resolveNode({
|
|
131722
|
+
const { object } = await this.#agent.invoke_resolveNode({
|
|
131723
|
+
nodeId: this.id,
|
|
131724
|
+
executionContextId,
|
|
131725
|
+
objectGroup,
|
|
131726
|
+
});
|
|
130158
131727
|
return object && this.#domModel.runtimeModelInternal.createRemoteObject(object) || null;
|
|
130159
131728
|
}
|
|
130160
131729
|
async boxModel() {
|
|
@@ -130688,6 +132257,13 @@ class DOMModel extends SDKModel {
|
|
|
130688
132257
|
}
|
|
130689
132258
|
node.setIsScrollable(isScrollable);
|
|
130690
132259
|
}
|
|
132260
|
+
adRelatedStateUpdated(nodeId, isAdRelated) {
|
|
132261
|
+
const node = this.nodeForId(nodeId);
|
|
132262
|
+
if (!node || node.isAdRelatedNode() === isAdRelated) {
|
|
132263
|
+
return;
|
|
132264
|
+
}
|
|
132265
|
+
node.setIsAdRelated(isAdRelated);
|
|
132266
|
+
}
|
|
130691
132267
|
affectedByStartingStylesFlagUpdated(nodeId, affectedByStartingStyles) {
|
|
130692
132268
|
const node = this.nodeForId(nodeId);
|
|
130693
132269
|
if (!node || node.affectedByStartingStyles() === affectedByStartingStyles) {
|
|
@@ -130971,6 +132547,9 @@ class DOMDispatcher {
|
|
|
130971
132547
|
affectedByStartingStylesFlagUpdated({ nodeId, affectedByStartingStyles }) {
|
|
130972
132548
|
this.#domModel.affectedByStartingStylesFlagUpdated(nodeId, affectedByStartingStyles);
|
|
130973
132549
|
}
|
|
132550
|
+
adRelatedStateUpdated({ nodeId, isAdRelated }) {
|
|
132551
|
+
this.#domModel.adRelatedStateUpdated(nodeId, isAdRelated);
|
|
132552
|
+
}
|
|
130974
132553
|
}
|
|
130975
132554
|
let domModelUndoStackInstance = null;
|
|
130976
132555
|
class DOMModelUndoStack {
|
|
@@ -131766,9 +133345,7 @@ class ResourceTreeFrame {
|
|
|
131766
133345
|
#childFrames = new Set();
|
|
131767
133346
|
resourcesMap = new Map();
|
|
131768
133347
|
backForwardCacheDetails = {
|
|
131769
|
-
restoredFromCache: undefined,
|
|
131770
133348
|
explanations: [],
|
|
131771
|
-
explanationsTree: undefined,
|
|
131772
133349
|
};
|
|
131773
133350
|
constructor(model, parentFrame, frameId, payload, creationStackTrace) {
|
|
131774
133351
|
this.#model = model;
|
|
@@ -131827,9 +133404,7 @@ class ResourceTreeFrame {
|
|
|
131827
133404
|
this.#crossOriginIsolatedContextType = framePayload.crossOriginIsolatedContextType;
|
|
131828
133405
|
this.#gatedAPIFeatures = framePayload.gatedAPIFeatures;
|
|
131829
133406
|
this.backForwardCacheDetails = {
|
|
131830
|
-
restoredFromCache: undefined,
|
|
131831
133407
|
explanations: [],
|
|
131832
|
-
explanationsTree: undefined,
|
|
131833
133408
|
};
|
|
131834
133409
|
const mainResource = this.resourcesMap.get(this.#url);
|
|
131835
133410
|
this.resourcesMap.clear();
|
|
@@ -135552,10 +137127,14 @@ class EmulationModel extends SDKModel {
|
|
|
135552
137127
|
#touchEmulationAllowed;
|
|
135553
137128
|
#customTouchEnabled;
|
|
135554
137129
|
#touchConfiguration;
|
|
137130
|
+
#screenOrientationLocked;
|
|
137131
|
+
#lockedOrientation;
|
|
135555
137132
|
constructor(target) {
|
|
135556
137133
|
super(target);
|
|
135557
137134
|
this.#emulationAgent = target.emulationAgent();
|
|
135558
137135
|
this.#deviceOrientationAgent = target.deviceOrientationAgent();
|
|
137136
|
+
this.#screenOrientationLocked = false;
|
|
137137
|
+
this.#lockedOrientation = null;
|
|
135559
137138
|
this.#cssModel = target.model(CSSModel);
|
|
135560
137139
|
this.#overlayModel = target.model(OverlayModel);
|
|
135561
137140
|
if (this.#overlayModel) {
|
|
@@ -135678,20 +137257,25 @@ class EmulationModel extends SDKModel {
|
|
|
135678
137257
|
this.setLocalFontsDisabled(localFontsDisabledSetting.get());
|
|
135679
137258
|
}
|
|
135680
137259
|
const avifFormatDisabledSetting = Settings.instance().moduleSetting('avif-format-disabled');
|
|
137260
|
+
const jpegXlFormatDisabledSetting = Settings.instance().moduleSetting('jpeg-xl-format-disabled');
|
|
135681
137261
|
const webpFormatDisabledSetting = Settings.instance().moduleSetting('webp-format-disabled');
|
|
135682
137262
|
const updateDisabledImageFormats = () => {
|
|
135683
137263
|
const types = [];
|
|
135684
137264
|
if (avifFormatDisabledSetting.get()) {
|
|
135685
137265
|
types.push("avif" );
|
|
135686
137266
|
}
|
|
137267
|
+
if (jpegXlFormatDisabledSetting.get()) {
|
|
137268
|
+
types.push("jxl" );
|
|
137269
|
+
}
|
|
135687
137270
|
if (webpFormatDisabledSetting.get()) {
|
|
135688
137271
|
types.push("webp" );
|
|
135689
137272
|
}
|
|
135690
137273
|
this.setDisabledImageTypes(types);
|
|
135691
137274
|
};
|
|
135692
137275
|
avifFormatDisabledSetting.addChangeListener(updateDisabledImageFormats);
|
|
137276
|
+
jpegXlFormatDisabledSetting.addChangeListener(updateDisabledImageFormats);
|
|
135693
137277
|
webpFormatDisabledSetting.addChangeListener(updateDisabledImageFormats);
|
|
135694
|
-
if (avifFormatDisabledSetting.get() || webpFormatDisabledSetting.get()) {
|
|
137278
|
+
if (avifFormatDisabledSetting.get() || jpegXlFormatDisabledSetting.get() || webpFormatDisabledSetting.get()) {
|
|
135695
137279
|
updateDisabledImageFormats();
|
|
135696
137280
|
}
|
|
135697
137281
|
this.#cpuPressureEnabled = false;
|
|
@@ -135703,6 +137287,7 @@ class EmulationModel extends SDKModel {
|
|
|
135703
137287
|
enabled: false,
|
|
135704
137288
|
configuration: "mobile" ,
|
|
135705
137289
|
};
|
|
137290
|
+
target.registerEmulationDispatcher(this);
|
|
135706
137291
|
}
|
|
135707
137292
|
setTouchEmulationAllowed(touchEmulationAllowed) {
|
|
135708
137293
|
this.#touchEmulationAllowed = touchEmulationAllowed;
|
|
@@ -135917,6 +137502,19 @@ class EmulationModel extends SDKModel {
|
|
|
135917
137502
|
];
|
|
135918
137503
|
return await this.emulateCSSMedia(type, features);
|
|
135919
137504
|
}
|
|
137505
|
+
virtualTimeBudgetExpired() {
|
|
137506
|
+
}
|
|
137507
|
+
screenOrientationLockChanged(event) {
|
|
137508
|
+
this.#screenOrientationLocked = event.locked;
|
|
137509
|
+
this.#lockedOrientation = event.orientation ?? null;
|
|
137510
|
+
this.dispatchEventToListeners("ScreenOrientationLockChanged" , { locked: event.locked, orientation: event.orientation ?? null });
|
|
137511
|
+
}
|
|
137512
|
+
isScreenOrientationLocked() {
|
|
137513
|
+
return this.#screenOrientationLocked;
|
|
137514
|
+
}
|
|
137515
|
+
lockedOrientation() {
|
|
137516
|
+
return this.#lockedOrientation;
|
|
137517
|
+
}
|
|
135920
137518
|
}
|
|
135921
137519
|
SDKModel.register(EmulationModel, { capabilities: 256 , autostart: true });
|
|
135922
137520
|
|
|
@@ -136503,6 +138101,18 @@ class PreloadingModel extends SDKModel {
|
|
|
136503
138101
|
TargetManager.instance().removeModelListener(ResourceTreeModel, Events$6.PrimaryPageChanged, this.onPrimaryPageChanged, this);
|
|
136504
138102
|
void this.agent.invoke_disable();
|
|
136505
138103
|
}
|
|
138104
|
+
reset() {
|
|
138105
|
+
this.documents.clear();
|
|
138106
|
+
this.loaderIds = [];
|
|
138107
|
+
this.targetJustAttached = true;
|
|
138108
|
+
this.dispatchEventToListeners("ModelUpdated" );
|
|
138109
|
+
}
|
|
138110
|
+
maybeInferLoaderId(loaderId) {
|
|
138111
|
+
if (this.currentLoaderId() === null) {
|
|
138112
|
+
this.loaderIds = [loaderId];
|
|
138113
|
+
this.targetJustAttached = false;
|
|
138114
|
+
}
|
|
138115
|
+
}
|
|
136506
138116
|
ensureDocumentPreloadingData(loaderId) {
|
|
136507
138117
|
if (this.documents.get(loaderId) === undefined) {
|
|
136508
138118
|
this.documents.set(loaderId, new DocumentPreloadingData());
|
|
@@ -136615,10 +138225,7 @@ class PreloadingModel extends SDKModel {
|
|
|
136615
138225
|
onRuleSetUpdated(event) {
|
|
136616
138226
|
const ruleSet = event.ruleSet;
|
|
136617
138227
|
const loaderId = ruleSet.loaderId;
|
|
136618
|
-
|
|
136619
|
-
this.loaderIds = [loaderId];
|
|
136620
|
-
this.targetJustAttached = false;
|
|
136621
|
-
}
|
|
138228
|
+
this.maybeInferLoaderId(loaderId);
|
|
136622
138229
|
this.ensureDocumentPreloadingData(loaderId);
|
|
136623
138230
|
this.documents.get(loaderId)?.ruleSets.upsert(ruleSet);
|
|
136624
138231
|
this.dispatchEventToListeners("ModelUpdated" );
|
|
@@ -141283,9 +142890,9 @@ class DebuggerLanguagePluginManager {
|
|
|
141283
142890
|
try {
|
|
141284
142891
|
const object = await plugin.evaluate(expression, location, this.stopIdForCallFrame(callFrame));
|
|
141285
142892
|
if (object) {
|
|
141286
|
-
return { object: await wrapRemoteObject(callFrame, object, plugin)
|
|
142893
|
+
return { object: await wrapRemoteObject(callFrame, object, plugin) };
|
|
141287
142894
|
}
|
|
141288
|
-
return { object: new LocalJSONObject(undefined)
|
|
142895
|
+
return { object: new LocalJSONObject(undefined) };
|
|
141289
142896
|
}
|
|
141290
142897
|
catch (error) {
|
|
141291
142898
|
if (error instanceof FormattingError) {
|
|
@@ -141530,14 +143137,12 @@ class DebuggerLanguagePluginManager {
|
|
|
141530
143137
|
if (uiLocation) {
|
|
141531
143138
|
return {
|
|
141532
143139
|
uiSourceCode: uiLocation.uiSourceCode,
|
|
141533
|
-
url: undefined,
|
|
141534
143140
|
name,
|
|
141535
143141
|
line: uiLocation.lineNumber,
|
|
141536
143142
|
column: uiLocation.columnNumber ?? -1,
|
|
141537
143143
|
};
|
|
141538
143144
|
}
|
|
141539
143145
|
return {
|
|
141540
|
-
uiSourceCode: undefined,
|
|
141541
143146
|
url: fallback.url,
|
|
141542
143147
|
name: fallback.functionName,
|
|
141543
143148
|
line: fallback.lineNumber,
|
|
@@ -145481,10 +147086,7 @@ function makeZeroBasedCallFrame(callFrame) {
|
|
|
145481
147086
|
}
|
|
145482
147087
|
function getRawLineAndColumnNumbersForEvent(event) {
|
|
145483
147088
|
if (!event.args?.data) {
|
|
145484
|
-
return {
|
|
145485
|
-
lineNumber: undefined,
|
|
145486
|
-
columnNumber: undefined,
|
|
145487
|
-
};
|
|
147089
|
+
return {};
|
|
145488
147090
|
}
|
|
145489
147091
|
let lineNumber = undefined;
|
|
145490
147092
|
let columnNumber = undefined;
|
|
@@ -156461,13 +158063,13 @@ var NetworkDependencyTree = /*#__PURE__*/Object.freeze({
|
|
|
156461
158063
|
|
|
156462
158064
|
// Copyright 2024 The Chromium Authors
|
|
156463
158065
|
const UIStrings$w = {
|
|
156464
|
-
title: 'Render
|
|
158066
|
+
title: 'Render-blocking requests',
|
|
156465
158067
|
description: 'Requests are blocking the page\'s initial render, which may delay LCP. ' +
|
|
156466
158068
|
'[Deferring or inlining](https://developer.chrome.com/docs/performance/insights/render-blocking) ' +
|
|
156467
158069
|
'can move these network requests out of the critical path.',
|
|
156468
158070
|
renderBlockingRequest: 'Request',
|
|
156469
158071
|
duration: 'Duration',
|
|
156470
|
-
noRenderBlocking: 'No render
|
|
158072
|
+
noRenderBlocking: 'No render-blocking requests for this navigation',
|
|
156471
158073
|
};
|
|
156472
158074
|
const str_$v = registerUIStrings('models/trace/insights/RenderBlocking.ts', UIStrings$w);
|
|
156473
158075
|
const i18nString$h = getLocalizedString.bind(undefined, str_$v);
|
|
@@ -159586,11 +161188,7 @@ function createLanternRequest(parsedTrace, workerThreads, request) {
|
|
|
159586
161188
|
priority: request.args.data.priority,
|
|
159587
161189
|
frameId: request.args.data.frame,
|
|
159588
161190
|
fromWorker,
|
|
159589
|
-
serverResponseTime: request.args.data.lrServerResponseTime
|
|
159590
|
-
redirects: undefined,
|
|
159591
|
-
redirectSource: undefined,
|
|
159592
|
-
redirectDestination: undefined,
|
|
159593
|
-
initiatorRequest: undefined,
|
|
161191
|
+
serverResponseTime: request.args.data.lrServerResponseTime,
|
|
159594
161192
|
};
|
|
159595
161193
|
}
|
|
159596
161194
|
function chooseInitiatorRequest(request, requestsByURL) {
|
|
@@ -160867,7 +162465,8 @@ class Prototypes {
|
|
|
160867
162465
|
const settings = Settings.instance();
|
|
160868
162466
|
const aiAnnotations = settings.createSetting('greendev-ai-annotations-enabled', false, "Local" );
|
|
160869
162467
|
const copyToGemini = settings.createSetting('greendev-copy-to-gemini-enabled', false, "Local" );
|
|
160870
|
-
|
|
162468
|
+
const breakpointDebuggerAgent = settings.createSetting('greendev-breakpoint-debugger-agent-enabled', false, "Local" );
|
|
162469
|
+
return { aiAnnotations, copyToGemini, breakpointDebuggerAgent };
|
|
160871
162470
|
}
|
|
160872
162471
|
}
|
|
160873
162472
|
|
|
@@ -162306,6 +163905,7 @@ class DeviceModeModel extends ObjectWrapper {
|
|
|
162306
163905
|
#emulationModel;
|
|
162307
163906
|
#onModelAvailable;
|
|
162308
163907
|
#outlineRect;
|
|
163908
|
+
#screenOrientationLocked;
|
|
162309
163909
|
constructor() {
|
|
162310
163910
|
super();
|
|
162311
163911
|
this.#screenRect = new Rect(0, 0, 1, 1);
|
|
@@ -162354,6 +163954,7 @@ class DeviceModeModel extends ObjectWrapper {
|
|
|
162354
163954
|
this.#touchMobile = false;
|
|
162355
163955
|
this.#emulationModel = null;
|
|
162356
163956
|
this.#onModelAvailable = null;
|
|
163957
|
+
this.#screenOrientationLocked = false;
|
|
162357
163958
|
TargetManager.instance().observeModels(EmulationModel, this);
|
|
162358
163959
|
}
|
|
162359
163960
|
static instance(opts) {
|
|
@@ -162576,6 +164177,7 @@ class DeviceModeModel extends ObjectWrapper {
|
|
|
162576
164177
|
this.#onModelAvailable = null;
|
|
162577
164178
|
callback();
|
|
162578
164179
|
}
|
|
164180
|
+
emulationModel.addEventListener("ScreenOrientationLockChanged" , this.onScreenOrientationLockChanged, this);
|
|
162579
164181
|
const resourceTreeModel = emulationModel.target().model(ResourceTreeModel);
|
|
162580
164182
|
if (resourceTreeModel) {
|
|
162581
164183
|
resourceTreeModel.addEventListener(Events$6.FrameResized, this.onFrameChange, this);
|
|
@@ -162588,7 +164190,10 @@ class DeviceModeModel extends ObjectWrapper {
|
|
|
162588
164190
|
}
|
|
162589
164191
|
modelRemoved(emulationModel) {
|
|
162590
164192
|
if (this.#emulationModel === emulationModel) {
|
|
164193
|
+
emulationModel.removeEventListener("ScreenOrientationLockChanged" , this.onScreenOrientationLockChanged, this);
|
|
162591
164194
|
this.#emulationModel = null;
|
|
164195
|
+
this.#screenOrientationLocked = false;
|
|
164196
|
+
this.dispatchEventToListeners("Updated" );
|
|
162592
164197
|
}
|
|
162593
164198
|
}
|
|
162594
164199
|
inspectedURL() {
|
|
@@ -162601,6 +164206,36 @@ class DeviceModeModel extends ObjectWrapper {
|
|
|
162601
164206
|
}
|
|
162602
164207
|
this.showHingeIfApplicable(overlayModel);
|
|
162603
164208
|
}
|
|
164209
|
+
onScreenOrientationLockChanged(event) {
|
|
164210
|
+
this.#screenOrientationLocked = event.data.locked;
|
|
164211
|
+
if (event.data.locked && event.data.orientation) {
|
|
164212
|
+
this.applyOrientationLock(event.data.orientation);
|
|
164213
|
+
}
|
|
164214
|
+
this.dispatchEventToListeners("Updated" );
|
|
164215
|
+
}
|
|
164216
|
+
applyOrientationLock(orientation) {
|
|
164217
|
+
const wantsLandscape = orientation.type === "landscapePrimary" ||
|
|
164218
|
+
orientation.type === "landscapeSecondary" ;
|
|
164219
|
+
if (this.#type === Type.Device && this.#device && this.#mode) {
|
|
164220
|
+
const isCurrentlyLandscape = this.#mode.orientation === Horizontal || this.#mode.orientation === HorizontalSpanned;
|
|
164221
|
+
if (wantsLandscape !== isCurrentlyLandscape) {
|
|
164222
|
+
const rotationPartner = this.#device.getRotationPartner(this.#mode);
|
|
164223
|
+
if (rotationPartner) {
|
|
164224
|
+
this.emulate(this.#type, this.#device, rotationPartner);
|
|
164225
|
+
}
|
|
164226
|
+
}
|
|
164227
|
+
}
|
|
164228
|
+
else if (this.#type === Type.Responsive) {
|
|
164229
|
+
const appliedSize = this.appliedDeviceSize();
|
|
164230
|
+
const isCurrentlyLandscape = appliedSize.width > appliedSize.height;
|
|
164231
|
+
if (wantsLandscape !== isCurrentlyLandscape) {
|
|
164232
|
+
this.setSizeAndScaleToFit(appliedSize.height, appliedSize.width);
|
|
164233
|
+
}
|
|
164234
|
+
}
|
|
164235
|
+
}
|
|
164236
|
+
isScreenOrientationLocked() {
|
|
164237
|
+
return this.#screenOrientationLocked;
|
|
164238
|
+
}
|
|
162604
164239
|
scaleSettingChanged() {
|
|
162605
164240
|
this.calculateAndEmulate(false);
|
|
162606
164241
|
}
|
|
@@ -162785,9 +164420,6 @@ class DeviceModeModel extends ObjectWrapper {
|
|
|
162785
164420
|
positionX,
|
|
162786
164421
|
positionY,
|
|
162787
164422
|
dontSetVisibleSize: true,
|
|
162788
|
-
displayFeature: undefined,
|
|
162789
|
-
devicePosture: undefined,
|
|
162790
|
-
screenOrientation: undefined,
|
|
162791
164423
|
};
|
|
162792
164424
|
if (displayFeature) {
|
|
162793
164425
|
metrics.displayFeature = displayFeature;
|
|
@@ -163940,7 +165572,6 @@ class NetworkLog extends ObjectWrapper {
|
|
|
163940
165572
|
initiatorInfo = {
|
|
163941
165573
|
info: null,
|
|
163942
165574
|
chain: null,
|
|
163943
|
-
request: undefined,
|
|
163944
165575
|
};
|
|
163945
165576
|
this.#initiatorData.set(request, initiatorInfo);
|
|
163946
165577
|
return initiatorInfo;
|
|
@@ -165359,7 +166990,7 @@ Status code: ${statusCode}
|
|
|
165359
166990
|
MIME Type: ${mimeType}
|
|
165360
166991
|
Protocol: ${protocol}
|
|
165361
166992
|
${priorityLines.join('\n')}
|
|
165362
|
-
Render
|
|
166993
|
+
Render-blocking: ${renderBlocking ? 'Yes' : 'No'}
|
|
165363
166994
|
From a service worker: ${fromServiceWorker ? 'Yes' : 'No'}
|
|
165364
166995
|
Initiators (root request to the request that directly loaded this one): ${initiatorUrls.join(', ') || 'none'}
|
|
165365
166996
|
${NetworkRequestFormatter.formatHeaders('Response headers', responseHeaders ?? [], true)}`;
|
|
@@ -165688,8 +167319,8 @@ class PerformanceInsightFormatter {
|
|
|
165688
167319
|
return [{ title: 'How do I optimize my network dependency tree?' }];
|
|
165689
167320
|
case 'RenderBlocking':
|
|
165690
167321
|
return [
|
|
165691
|
-
{ title: 'Show me the most impactful render
|
|
165692
|
-
{ title: 'How can I reduce the number of render
|
|
167322
|
+
{ title: 'Show me the most impactful render-blocking requests that I should focus on' },
|
|
167323
|
+
{ title: 'How can I reduce the number of render-blocking requests?' }
|
|
165693
167324
|
];
|
|
165694
167325
|
case 'SlowCSSSelector':
|
|
165695
167326
|
return [{ title: 'How can I optimize my CSS to increase the performance of CSS selectors?' }];
|
|
@@ -166092,9 +167723,9 @@ ${requestSummary}`;
|
|
|
166092
167723
|
formatRenderBlockingInsight(insight) {
|
|
166093
167724
|
const requestSummary = this.#traceFormatter.formatNetworkRequests(insight.renderBlockingRequests);
|
|
166094
167725
|
if (requestSummary.length === 0) {
|
|
166095
|
-
return 'There are no network requests that are render
|
|
167726
|
+
return 'There are no network requests that are render-blocking.';
|
|
166096
167727
|
}
|
|
166097
|
-
return `Here is a list of the network requests that were render
|
|
167728
|
+
return `Here is a list of the network requests that were render-blocking on this page and their duration:
|
|
166098
167729
|
|
|
166099
167730
|
${requestSummary}`;
|
|
166100
167731
|
}
|
|
@@ -166371,7 +168002,7 @@ It is important that all of these checks pass to minimize the delay between the
|
|
|
166371
168002
|
3. The maximum of 4 preconnects should be respected.
|
|
166372
168003
|
- Opportunities to add [preconnect] for a faster loading experience.`;
|
|
166373
168004
|
case 'RenderBlocking':
|
|
166374
|
-
return 'This insight identifies network requests that were render
|
|
168005
|
+
return 'This insight identifies network requests that were render-blocking. Render-blocking requests are impactful because they are deemed critical to the page and therefore the browser stops rendering the page until it has dealt with these resources. For this insight make sure you fully inspect the details of each render-blocking network request and prioritize your suggestions to the user based on the impact of each render-blocking request.';
|
|
166375
168006
|
case 'SlowCSSSelector':
|
|
166376
168007
|
return `This insight identifies CSS selectors that are slowing down your page's rendering performance.`;
|
|
166377
168008
|
case 'ThirdParties':
|
|
@@ -170109,6 +171740,10 @@ const UIStrings$g = {
|
|
|
170109
171740
|
InsecurePrivateNetworkSubresourceRequest: "The website requested a subresource from a network that it could only access because of its users' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them.",
|
|
170110
171741
|
InterestGroupDailyUpdateUrl: "The `dailyUpdateUrl` field of `InterestGroups` passed to `joinAdInterestGroup()` has been renamed to `updateUrl`, to more accurately reflect its behavior.",
|
|
170111
171742
|
IntlV8BreakIterator: "`Intl.v8BreakIterator` is deprecated. Please use `Intl.Segmenter` instead.",
|
|
171743
|
+
LanguageModel_InputQuota: "LanguageModel.inputQuota is deprecated. Please use LanguageModel.contextWindow instead. This alias is only available in extensions.",
|
|
171744
|
+
LanguageModel_InputUsage: "LanguageModel.inputUsage is deprecated. Please use LanguageModel.contextUsage instead. This alias is only available in extensions.",
|
|
171745
|
+
LanguageModel_MeasureInputUsage: "LanguageModel.measureInputUsage() is deprecated. Please use LanguageModel.measureContextUsage() instead. This alias is only available in extensions.",
|
|
171746
|
+
LanguageModel_OnQuotaOverflow: "LanguageModel.onquotaoverflow is deprecated. Please use LanguageModel.oncontextoverflow instead. The LanguageModel.onquotaoverflow alias is only available in extensions.",
|
|
170112
171747
|
LanguageModelParams: "LanguageModel.params() is deprecated and now only available in extension contexts. The topK and temperature related fields within its result are also deprecated.",
|
|
170113
171748
|
LanguageModelTemperature: "The 'temperature' parameter/attribute for LanguageModel is deprecated. It is only functional within extensions and may be removed in the future.",
|
|
170114
171749
|
LanguageModelTopK: "The 'topK' parameter/attribute for LanguageModel is deprecated. It is only functional within extensions and may be removed in the future.",
|
|
@@ -170199,6 +171834,18 @@ const DEPRECATIONS_METADATA = {
|
|
|
170199
171834
|
"LanguageModelTopK": {
|
|
170200
171835
|
"chromeStatusFeature": 5134603979063296
|
|
170201
171836
|
},
|
|
171837
|
+
"LanguageModel_InputQuota": {
|
|
171838
|
+
"chromeStatusFeature": 5134603979063296
|
|
171839
|
+
},
|
|
171840
|
+
"LanguageModel_InputUsage": {
|
|
171841
|
+
"chromeStatusFeature": 5134603979063296
|
|
171842
|
+
},
|
|
171843
|
+
"LanguageModel_MeasureInputUsage": {
|
|
171844
|
+
"chromeStatusFeature": 5134603979063296
|
|
171845
|
+
},
|
|
171846
|
+
"LanguageModel_OnQuotaOverflow": {
|
|
171847
|
+
"chromeStatusFeature": 5134603979063296
|
|
171848
|
+
},
|
|
170202
171849
|
"LocalCSSFileExtensionRejected": {
|
|
170203
171850
|
"milestone": 64
|
|
170204
171851
|
},
|
|
@@ -170685,50 +172332,10 @@ class HeavyAdIssue extends Issue {
|
|
|
170685
172332
|
|
|
170686
172333
|
// Copyright 2020 The Chromium Authors
|
|
170687
172334
|
const UIStrings$c = {
|
|
170688
|
-
colorAndContrastAccessibility: 'Color and contrast accessibility',
|
|
170689
|
-
};
|
|
170690
|
-
const str_$c = registerUIStrings('models/issues_manager/LowTextContrastIssue.ts', UIStrings$c);
|
|
170691
|
-
const i18nString$5 = getLocalizedString.bind(undefined, str_$c);
|
|
170692
|
-
class LowTextContrastIssue extends Issue {
|
|
170693
|
-
constructor(issueDetails, issuesModel) {
|
|
170694
|
-
super('LowTextContrastIssue', issueDetails, issuesModel);
|
|
170695
|
-
}
|
|
170696
|
-
primaryKey() {
|
|
170697
|
-
return `${this.code()}-(${this.details().violatingNodeId})`;
|
|
170698
|
-
}
|
|
170699
|
-
getCategory() {
|
|
170700
|
-
return "LowTextContrast" ;
|
|
170701
|
-
}
|
|
170702
|
-
getDescription() {
|
|
170703
|
-
return {
|
|
170704
|
-
file: 'LowTextContrast.md',
|
|
170705
|
-
links: [
|
|
170706
|
-
{
|
|
170707
|
-
link: 'https://web.dev/color-and-contrast-accessibility/',
|
|
170708
|
-
linkTitle: i18nString$5(UIStrings$c.colorAndContrastAccessibility),
|
|
170709
|
-
},
|
|
170710
|
-
],
|
|
170711
|
-
};
|
|
170712
|
-
}
|
|
170713
|
-
getKind() {
|
|
170714
|
-
return "Improvement" ;
|
|
170715
|
-
}
|
|
170716
|
-
static fromInspectorIssue(issuesModel, inspectorIssue) {
|
|
170717
|
-
const lowTextContrastIssueDetails = inspectorIssue.details.lowTextContrastIssueDetails;
|
|
170718
|
-
if (!lowTextContrastIssueDetails) {
|
|
170719
|
-
console.warn('LowTextContrast issue without details received.');
|
|
170720
|
-
return [];
|
|
170721
|
-
}
|
|
170722
|
-
return [new LowTextContrastIssue(lowTextContrastIssueDetails, issuesModel)];
|
|
170723
|
-
}
|
|
170724
|
-
}
|
|
170725
|
-
|
|
170726
|
-
// Copyright 2020 The Chromium Authors
|
|
170727
|
-
const UIStrings$b = {
|
|
170728
172335
|
preventingMixedContent: 'Preventing mixed content',
|
|
170729
172336
|
};
|
|
170730
|
-
const str_$
|
|
170731
|
-
const i18nString$
|
|
172337
|
+
const str_$c = registerUIStrings('models/issues_manager/MixedContentIssue.ts', UIStrings$c);
|
|
172338
|
+
const i18nString$5 = getLocalizedString.bind(undefined, str_$c);
|
|
170732
172339
|
class MixedContentIssue extends Issue {
|
|
170733
172340
|
constructor(issueDetails, issuesModel) {
|
|
170734
172341
|
super("MixedContentIssue" , issueDetails, issuesModel);
|
|
@@ -170746,7 +172353,7 @@ class MixedContentIssue extends Issue {
|
|
|
170746
172353
|
getDescription() {
|
|
170747
172354
|
return {
|
|
170748
172355
|
file: 'mixedContent.md',
|
|
170749
|
-
links: [{ link: 'https://web.dev/what-is-mixed-content/', linkTitle: i18nString$
|
|
172356
|
+
links: [{ link: 'https://web.dev/what-is-mixed-content/', linkTitle: i18nString$5(UIStrings$c.preventingMixedContent) }],
|
|
170750
172357
|
};
|
|
170751
172358
|
}
|
|
170752
172359
|
primaryKey() {
|
|
@@ -170773,12 +172380,12 @@ class MixedContentIssue extends Issue {
|
|
|
170773
172380
|
}
|
|
170774
172381
|
|
|
170775
172382
|
// Copyright 2025 The Chromium Authors
|
|
170776
|
-
const UIStrings$
|
|
172383
|
+
const UIStrings$b = {
|
|
170777
172384
|
partitioningBlobURL: 'Partitioning BlobURL',
|
|
170778
172385
|
chromeStatusEntry: 'Chrome Status Entry'
|
|
170779
172386
|
};
|
|
170780
|
-
const str_$
|
|
170781
|
-
const i18nString$
|
|
172387
|
+
const str_$b = registerUIStrings('models/issues_manager/PartitioningBlobURLIssue.ts', UIStrings$b);
|
|
172388
|
+
const i18nString$4 = getLocalizedString.bind(undefined, str_$b);
|
|
170782
172389
|
class PartitioningBlobURLIssue extends Issue {
|
|
170783
172390
|
constructor(issueDetails, issuesModel) {
|
|
170784
172391
|
super("PartitioningBlobURLIssue" , issueDetails, issuesModel);
|
|
@@ -170796,11 +172403,11 @@ class PartitioningBlobURLIssue extends Issue {
|
|
|
170796
172403
|
links: [
|
|
170797
172404
|
{
|
|
170798
172405
|
link: 'https://developers.google.com/privacy-sandbox/cookies/storage-partitioning',
|
|
170799
|
-
linkTitle: i18nString$
|
|
172406
|
+
linkTitle: i18nString$4(UIStrings$b.partitioningBlobURL),
|
|
170800
172407
|
},
|
|
170801
172408
|
{
|
|
170802
172409
|
link: 'https://chromestatus.com/feature/5130361898795008',
|
|
170803
|
-
linkTitle: i18nString$
|
|
172410
|
+
linkTitle: i18nString$4(UIStrings$b.chromeStatusEntry),
|
|
170804
172411
|
},
|
|
170805
172412
|
],
|
|
170806
172413
|
};
|
|
@@ -171063,11 +172670,11 @@ class PermissionElementIssue extends Issue {
|
|
|
171063
172670
|
}
|
|
171064
172671
|
|
|
171065
172672
|
// Copyright 2021 The Chromium Authors
|
|
171066
|
-
const UIStrings$
|
|
172673
|
+
const UIStrings$a = {
|
|
171067
172674
|
documentCompatibilityMode: 'Document compatibility mode',
|
|
171068
172675
|
};
|
|
171069
|
-
const str_$
|
|
171070
|
-
const i18nString$
|
|
172676
|
+
const str_$a = registerUIStrings('models/issues_manager/QuirksModeIssue.ts', UIStrings$a);
|
|
172677
|
+
const i18nString$3 = getLocalizedString.bind(undefined, str_$a);
|
|
171071
172678
|
class QuirksModeIssue extends Issue {
|
|
171072
172679
|
constructor(issueDetails, issuesModel) {
|
|
171073
172680
|
const mode = issueDetails.isLimitedQuirksMode ? 'LimitedQuirksMode' : 'QuirksMode';
|
|
@@ -171086,7 +172693,7 @@ class QuirksModeIssue extends Issue {
|
|
|
171086
172693
|
links: [
|
|
171087
172694
|
{
|
|
171088
172695
|
link: 'https://web.dev/doctype/',
|
|
171089
|
-
linkTitle: i18nString$
|
|
172696
|
+
linkTitle: i18nString$3(UIStrings$a.documentCompatibilityMode),
|
|
171090
172697
|
},
|
|
171091
172698
|
],
|
|
171092
172699
|
};
|
|
@@ -171104,6 +172711,46 @@ class QuirksModeIssue extends Issue {
|
|
|
171104
172711
|
}
|
|
171105
172712
|
}
|
|
171106
172713
|
|
|
172714
|
+
// Copyright 2026 The Chromium Authors
|
|
172715
|
+
const UIStrings$9 = {
|
|
172716
|
+
selectivePermissionsIntervention: 'Selective Permissions Intervention',
|
|
172717
|
+
};
|
|
172718
|
+
const str_$9 = registerUIStrings('models/issues_manager/SelectivePermissionsInterventionIssue.ts', UIStrings$9);
|
|
172719
|
+
const i18nString$2 = getLocalizedString.bind(undefined, str_$9);
|
|
172720
|
+
class SelectivePermissionsInterventionIssue extends Issue {
|
|
172721
|
+
constructor(issueDetails, issuesModel) {
|
|
172722
|
+
super("SelectivePermissionsInterventionIssue" , issueDetails, issuesModel);
|
|
172723
|
+
}
|
|
172724
|
+
primaryKey() {
|
|
172725
|
+
return `${"SelectivePermissionsInterventionIssue" }-${JSON.stringify(this.details())}`;
|
|
172726
|
+
}
|
|
172727
|
+
getDescription() {
|
|
172728
|
+
return {
|
|
172729
|
+
file: 'selectivePermissionsIntervention.md',
|
|
172730
|
+
links: [
|
|
172731
|
+
{
|
|
172732
|
+
link: 'https://crbug.com/435223477',
|
|
172733
|
+
linkTitle: i18nString$2(UIStrings$9.selectivePermissionsIntervention),
|
|
172734
|
+
},
|
|
172735
|
+
],
|
|
172736
|
+
};
|
|
172737
|
+
}
|
|
172738
|
+
getCategory() {
|
|
172739
|
+
return "SelectivePermissionsIntervention" ;
|
|
172740
|
+
}
|
|
172741
|
+
getKind() {
|
|
172742
|
+
return "PageError" ;
|
|
172743
|
+
}
|
|
172744
|
+
static fromInspectorIssue(issuesModel, inspectorIssue) {
|
|
172745
|
+
const selectivePermissionsInterventionIssueDetails = inspectorIssue.details.selectivePermissionsInterventionIssueDetails;
|
|
172746
|
+
if (!selectivePermissionsInterventionIssueDetails) {
|
|
172747
|
+
console.warn('Selective Permissions Intervention issue without details received.');
|
|
172748
|
+
return [];
|
|
172749
|
+
}
|
|
172750
|
+
return [new SelectivePermissionsInterventionIssue(selectivePermissionsInterventionIssueDetails, issuesModel)];
|
|
172751
|
+
}
|
|
172752
|
+
}
|
|
172753
|
+
|
|
171107
172754
|
// Copyright 2020 The Chromium Authors
|
|
171108
172755
|
const UIStrings$8 = {
|
|
171109
172756
|
enablingSharedArrayBuffer: 'Enabling `SharedArrayBuffer`',
|
|
@@ -171161,11 +172808,11 @@ class AggregatedIssue extends Issue {
|
|
|
171161
172808
|
#cspIssues = new Set();
|
|
171162
172809
|
#deprecationIssues = new Set();
|
|
171163
172810
|
#issueKind = "Improvement" ;
|
|
171164
|
-
#lowContrastIssues = new Set();
|
|
171165
172811
|
#cookieDeprecationMetadataIssues = new Set();
|
|
171166
172812
|
#mixedContentIssues = new Set();
|
|
171167
172813
|
#partitioningBlobURLIssues = new Set();
|
|
171168
172814
|
#permissionElementIssues = new Set();
|
|
172815
|
+
#selectivePermissionsInterventionIssues = new Set();
|
|
171169
172816
|
#sharedArrayBufferIssues = new Set();
|
|
171170
172817
|
#quirksModeIssues = new Set();
|
|
171171
172818
|
#attributionReportingIssues = new Set();
|
|
@@ -171220,12 +172867,12 @@ class AggregatedIssue extends Issue {
|
|
|
171220
172867
|
getDeprecationIssues() {
|
|
171221
172868
|
return this.#deprecationIssues;
|
|
171222
172869
|
}
|
|
171223
|
-
getLowContrastIssues() {
|
|
171224
|
-
return this.#lowContrastIssues;
|
|
171225
|
-
}
|
|
171226
172870
|
requests() {
|
|
171227
172871
|
return this.#affectedRequests.values();
|
|
171228
172872
|
}
|
|
172873
|
+
getSelectivePermissionsInterventionIssues() {
|
|
172874
|
+
return this.#selectivePermissionsInterventionIssues;
|
|
172875
|
+
}
|
|
171229
172876
|
getSharedArrayBufferIssues() {
|
|
171230
172877
|
return this.#sharedArrayBufferIssues;
|
|
171231
172878
|
}
|
|
@@ -171329,9 +172976,6 @@ class AggregatedIssue extends Issue {
|
|
|
171329
172976
|
if (issue instanceof SharedArrayBufferIssue) {
|
|
171330
172977
|
this.#sharedArrayBufferIssues.add(issue);
|
|
171331
172978
|
}
|
|
171332
|
-
if (issue instanceof LowTextContrastIssue) {
|
|
171333
|
-
this.#lowContrastIssues.add(issue);
|
|
171334
|
-
}
|
|
171335
172979
|
if (issue instanceof CorsIssue) {
|
|
171336
172980
|
this.#corsIssues.add(issue);
|
|
171337
172981
|
}
|
|
@@ -171353,6 +172997,9 @@ class AggregatedIssue extends Issue {
|
|
|
171353
172997
|
if (issue instanceof PermissionElementIssue) {
|
|
171354
172998
|
this.#permissionElementIssues.add(issue);
|
|
171355
172999
|
}
|
|
173000
|
+
if (issue instanceof SelectivePermissionsInterventionIssue) {
|
|
173001
|
+
this.#selectivePermissionsInterventionIssues.add(issue);
|
|
173002
|
+
}
|
|
171356
173003
|
}
|
|
171357
173004
|
getKind() {
|
|
171358
173005
|
return this.#issueKind;
|
|
@@ -172523,10 +174170,6 @@ const issueCodeHandlers = new Map([
|
|
|
172523
174170
|
"SharedDictionaryIssue" ,
|
|
172524
174171
|
SharedDictionaryIssue.fromInspectorIssue,
|
|
172525
174172
|
],
|
|
172526
|
-
[
|
|
172527
|
-
"LowTextContrastIssue" ,
|
|
172528
|
-
LowTextContrastIssue.fromInspectorIssue,
|
|
172529
|
-
],
|
|
172530
174173
|
[
|
|
172531
174174
|
"CorsIssue" ,
|
|
172532
174175
|
CorsIssue.fromInspectorIssue,
|
|
@@ -172595,6 +174238,10 @@ const issueCodeHandlers = new Map([
|
|
|
172595
174238
|
"PermissionElementIssue" ,
|
|
172596
174239
|
PermissionElementIssue.fromInspectorIssue,
|
|
172597
174240
|
],
|
|
174241
|
+
[
|
|
174242
|
+
"SelectivePermissionsInterventionIssue" ,
|
|
174243
|
+
SelectivePermissionsInterventionIssue.fromInspectorIssue,
|
|
174244
|
+
],
|
|
172598
174245
|
]);
|
|
172599
174246
|
function createIssuesFromProtocolIssue(issuesModel, inspectorIssue) {
|
|
172600
174247
|
const handler = issueCodeHandlers.get(inspectorIssue.code);
|
|
@@ -172867,4 +174514,13 @@ var mcp = /*#__PURE__*/Object.freeze({
|
|
|
172867
174514
|
createIssuesFromProtocolIssue: createIssuesFromProtocolIssue
|
|
172868
174515
|
});
|
|
172869
174516
|
|
|
172870
|
-
|
|
174517
|
+
/**
|
|
174518
|
+
* @license
|
|
174519
|
+
* Copyright 2025 Google LLC
|
|
174520
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
174521
|
+
*/
|
|
174522
|
+
const snapshot = snapshot$1;
|
|
174523
|
+
const navigation = navigation$1;
|
|
174524
|
+
const generateReport = generateReport$1;
|
|
174525
|
+
|
|
174526
|
+
export { Browser as BrowserEnum, CDPSessionEvent, Client$1 as Client, mcp as DevTools, KnownDevices, Locator, McpServer, PipeTransport, PredefinedNetworkConditions, SetLevelRequestSchema, StdioClientTransport, StdioServerTransport, debug$2 as debug, detectBrowserPlatform, generateReport, hideBin, navigation, puppeteer, resolveDefaultUserDataDir, snapshot, Yargs as yargs, z as zod };
|