browser-debugger-cli 0.5.1 → 0.6.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 +50 -4
- package/dist/__tests__/smoke/error-handling.smoke.test.js +0 -11
- package/dist/__tests__/smoke/error-handling.smoke.test.js.map +1 -1
- package/dist/cdp/protocol.d.ts +121 -0
- package/dist/cdp/protocol.d.ts.map +1 -0
- package/dist/cdp/protocol.js +215 -0
- package/dist/cdp/protocol.js.map +1 -0
- package/dist/cdp/schema.d.ts +159 -0
- package/dist/cdp/schema.d.ts.map +1 -0
- package/dist/cdp/schema.js +256 -0
- package/dist/cdp/schema.js.map +1 -0
- package/dist/cdp/types.d.ts +139 -0
- package/dist/cdp/types.d.ts.map +1 -0
- package/dist/cdp/types.js +7 -0
- package/dist/cdp/types.js.map +1 -0
- package/dist/commands/cdp.d.ts +10 -1
- package/dist/commands/cdp.d.ts.map +1 -1
- package/dist/commands/cdp.js +363 -26
- package/dist/commands/cdp.js.map +1 -1
- package/dist/commands/cleanup.js +3 -3
- package/dist/commands/cleanup.js.map +1 -1
- package/dist/commands/dom.d.ts.map +1 -1
- package/dist/commands/dom.js +1 -0
- package/dist/commands/dom.js.map +1 -1
- package/dist/commands/domEvalHelpers.d.ts +2 -15
- package/dist/commands/domEvalHelpers.d.ts.map +1 -1
- package/dist/commands/domEvalHelpers.js +1 -1
- package/dist/commands/domEvalHelpers.js.map +1 -1
- package/dist/commands/peek.d.ts.map +1 -1
- package/dist/commands/peek.js +12 -6
- package/dist/commands/peek.js.map +1 -1
- package/dist/commands/shared/CommandRunner.d.ts +2 -0
- package/dist/commands/shared/CommandRunner.d.ts.map +1 -1
- package/dist/commands/shared/CommandRunner.js +13 -1
- package/dist/commands/shared/CommandRunner.js.map +1 -1
- package/dist/commands/shared/commonOptions.d.ts.map +1 -1
- package/dist/commands/shared/commonOptions.js +2 -2
- package/dist/commands/shared/commonOptions.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +21 -12
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.js +2 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/stop.js +2 -2
- package/dist/commands/stop.js.map +1 -1
- package/dist/commands/tail.d.ts.map +1 -1
- package/dist/commands/tail.js +9 -6
- package/dist/commands/tail.js.map +1 -1
- package/dist/connection/cdp.d.ts.map +1 -1
- package/dist/connection/cdp.js +15 -2
- package/dist/connection/cdp.js.map +1 -1
- package/dist/connection/domOperations.d.ts.map +1 -1
- package/dist/connection/domOperations.js +3 -1
- package/dist/connection/domOperations.js.map +1 -1
- package/dist/connection/handlers.d.ts +34 -2
- package/dist/connection/handlers.d.ts.map +1 -1
- package/dist/connection/handlers.js +28 -2
- package/dist/connection/handlers.js.map +1 -1
- package/dist/connection/launcher.d.ts.map +1 -1
- package/dist/connection/launcher.js +14 -2
- package/dist/connection/launcher.js.map +1 -1
- package/dist/connection/pageReadiness.d.ts.map +1 -1
- package/dist/connection/pageReadiness.js +6 -6
- package/dist/connection/pageReadiness.js.map +1 -1
- package/dist/connection/typed-cdp.d.ts +144 -0
- package/dist/connection/typed-cdp.d.ts.map +1 -0
- package/dist/connection/typed-cdp.js +120 -0
- package/dist/connection/typed-cdp.js.map +1 -0
- package/dist/daemon/worker/commandRegistry.d.ts.map +1 -1
- package/dist/daemon/worker/commandRegistry.js.map +1 -1
- package/dist/telemetry/__tests__/network.contract.test.js +124 -93
- package/dist/telemetry/__tests__/network.contract.test.js.map +1 -1
- package/dist/telemetry/console.d.ts.map +1 -1
- package/dist/telemetry/console.js +3 -2
- package/dist/telemetry/console.js.map +1 -1
- package/dist/telemetry/dialogs.d.ts.map +1 -1
- package/dist/telemetry/dialogs.js.map +1 -1
- package/dist/telemetry/dom.d.ts.map +1 -1
- package/dist/telemetry/dom.js +3 -1
- package/dist/telemetry/dom.js.map +1 -1
- package/dist/telemetry/navigation.d.ts.map +1 -1
- package/dist/telemetry/navigation.js.map +1 -1
- package/dist/telemetry/network.d.ts.map +1 -1
- package/dist/telemetry/network.js.map +1 -1
- package/dist/types.d.ts +0 -141
- package/dist/types.d.ts.map +1 -1
- package/dist/ui/messages/commands.d.ts +1 -0
- package/dist/ui/messages/commands.d.ts.map +1 -1
- package/dist/ui/messages/commands.js +1 -0
- package/dist/ui/messages/commands.js.map +1 -1
- package/dist/ui/messages/errors.d.ts +30 -3
- package/dist/ui/messages/errors.d.ts.map +1 -1
- package/dist/ui/messages/errors.js +36 -8
- package/dist/ui/messages/errors.js.map +1 -1
- package/dist/ui/messages/session.d.ts.map +1 -1
- package/dist/ui/messages/session.js +5 -4
- package/dist/ui/messages/session.js.map +1 -1
- package/dist/ui/messages/validation.d.ts +22 -4
- package/dist/ui/messages/validation.d.ts.map +1 -1
- package/dist/ui/messages/validation.js +26 -5
- package/dist/ui/messages/validation.js.map +1 -1
- package/package.json +2 -1
- package/dist/cli/commands/__tests__/start.unit.test.d.ts +0 -2
- package/dist/cli/commands/__tests__/start.unit.test.d.ts.map +0 -1
- package/dist/cli/commands/__tests__/start.unit.test.js +0 -131
- package/dist/cli/commands/__tests__/start.unit.test.js.map +0 -1
- package/dist/cli/commands/cleanup.d.ts +0 -9
- package/dist/cli/commands/cleanup.d.ts.map +0 -1
- package/dist/cli/commands/cleanup.js +0 -148
- package/dist/cli/commands/cleanup.js.map +0 -1
- package/dist/cli/commands/details.d.ts +0 -9
- package/dist/cli/commands/details.d.ts.map +0 -1
- package/dist/cli/commands/details.js +0 -120
- package/dist/cli/commands/details.js.map +0 -1
- package/dist/cli/commands/peek.d.ts +0 -9
- package/dist/cli/commands/peek.d.ts.map +0 -1
- package/dist/cli/commands/peek.js +0 -64
- package/dist/cli/commands/peek.js.map +0 -1
- package/dist/cli/commands/query.d.ts +0 -9
- package/dist/cli/commands/query.d.ts.map +0 -1
- package/dist/cli/commands/query.js +0 -125
- package/dist/cli/commands/query.js.map +0 -1
- package/dist/cli/commands/start.d.ts +0 -83
- package/dist/cli/commands/start.d.ts.map +0 -1
- package/dist/cli/commands/start.js +0 -204
- package/dist/cli/commands/start.js.map +0 -1
- package/dist/cli/commands/status.d.ts +0 -9
- package/dist/cli/commands/status.d.ts.map +0 -1
- package/dist/cli/commands/status.js +0 -75
- package/dist/cli/commands/status.js.map +0 -1
- package/dist/cli/commands/stop.d.ts +0 -9
- package/dist/cli/commands/stop.d.ts.map +0 -1
- package/dist/cli/commands/stop.js +0 -133
- package/dist/cli/commands/stop.js.map +0 -1
- package/dist/cli/formatters/detailsFormatter.d.ts +0 -10
- package/dist/cli/formatters/detailsFormatter.d.ts.map +0 -1
- package/dist/cli/formatters/detailsFormatter.js +0 -63
- package/dist/cli/formatters/detailsFormatter.js.map +0 -1
- package/dist/cli/formatters/previewFormatter.d.ts +0 -27
- package/dist/cli/formatters/previewFormatter.d.ts.map +0 -1
- package/dist/cli/formatters/previewFormatter.js +0 -155
- package/dist/cli/formatters/previewFormatter.js.map +0 -1
- package/dist/cli/formatters/statusFormatter.d.ts +0 -42
- package/dist/cli/formatters/statusFormatter.d.ts.map +0 -1
- package/dist/cli/formatters/statusFormatter.js +0 -126
- package/dist/cli/formatters/statusFormatter.js.map +0 -1
- package/dist/cli/handlers/ChromeBootstrap.d.ts +0 -24
- package/dist/cli/handlers/ChromeBootstrap.d.ts.map +0 -1
- package/dist/cli/handlers/ChromeBootstrap.js +0 -50
- package/dist/cli/handlers/ChromeBootstrap.js.map +0 -1
- package/dist/cli/handlers/OutputBuilder.d.ts +0 -59
- package/dist/cli/handlers/OutputBuilder.d.ts.map +0 -1
- package/dist/cli/handlers/OutputBuilder.js +0 -136
- package/dist/cli/handlers/OutputBuilder.js.map +0 -1
- package/dist/cli/handlers/OutputWriter.d.ts +0 -15
- package/dist/cli/handlers/OutputWriter.d.ts.map +0 -1
- package/dist/cli/handlers/OutputWriter.js +0 -34
- package/dist/cli/handlers/OutputWriter.js.map +0 -1
- package/dist/cli/handlers/PreviewWriter.d.ts +0 -52
- package/dist/cli/handlers/PreviewWriter.d.ts.map +0 -1
- package/dist/cli/handlers/PreviewWriter.js +0 -118
- package/dist/cli/handlers/PreviewWriter.js.map +0 -1
- package/dist/cli/handlers/SessionLock.d.ts +0 -16
- package/dist/cli/handlers/SessionLock.d.ts.map +0 -1
- package/dist/cli/handlers/SessionLock.js +0 -35
- package/dist/cli/handlers/SessionLock.js.map +0 -1
- package/dist/cli/handlers/SessionLoop.d.ts +0 -19
- package/dist/cli/handlers/SessionLoop.d.ts.map +0 -1
- package/dist/cli/handlers/SessionLoop.js +0 -47
- package/dist/cli/handlers/SessionLoop.js.map +0 -1
- package/dist/cli/handlers/ShutdownController.d.ts +0 -41
- package/dist/cli/handlers/ShutdownController.d.ts.map +0 -1
- package/dist/cli/handlers/ShutdownController.js +0 -94
- package/dist/cli/handlers/ShutdownController.js.map +0 -1
- package/dist/cli/handlers/SignalHandler.d.ts +0 -35
- package/dist/cli/handlers/SignalHandler.d.ts.map +0 -1
- package/dist/cli/handlers/SignalHandler.js +0 -81
- package/dist/cli/handlers/SignalHandler.js.map +0 -1
- package/dist/cli/handlers/TargetSetup.d.ts +0 -42
- package/dist/cli/handlers/TargetSetup.d.ts.map +0 -1
- package/dist/cli/handlers/TargetSetup.js +0 -87
- package/dist/cli/handlers/TargetSetup.js.map +0 -1
- package/dist/cli/handlers/sessionController.d.ts +0 -62
- package/dist/cli/handlers/sessionController.d.ts.map +0 -1
- package/dist/cli/handlers/sessionController.js +0 -316
- package/dist/cli/handlers/sessionController.js.map +0 -1
- package/dist/cli/registry.d.ts +0 -11
- package/dist/cli/registry.d.ts.map +0 -1
- package/dist/cli/registry.js +0 -21
- package/dist/cli/registry.js.map +0 -1
- package/dist/collectors/console.d.ts +0 -19
- package/dist/collectors/console.d.ts.map +0 -1
- package/dist/collectors/console.js +0 -87
- package/dist/collectors/console.js.map +0 -1
- package/dist/collectors/dom.d.ts +0 -21
- package/dist/collectors/dom.d.ts.map +0 -1
- package/dist/collectors/dom.js +0 -99
- package/dist/collectors/dom.js.map +0 -1
- package/dist/collectors/network.d.ts +0 -32
- package/dist/collectors/network.d.ts.map +0 -1
- package/dist/collectors/network.js +0 -191
- package/dist/collectors/network.js.map +0 -1
- package/dist/connection/tabs.d.ts +0 -52
- package/dist/connection/tabs.d.ts.map +0 -1
- package/dist/connection/tabs.js +0 -227
- package/dist/connection/tabs.js.map +0 -1
- package/dist/help/machineReadableHelp.d.ts +0 -100
- package/dist/help/machineReadableHelp.d.ts.map +0 -1
- package/dist/help/machineReadableHelp.js +0 -139
- package/dist/help/machineReadableHelp.js.map +0 -1
- package/dist/session/BdgSession.d.ts +0 -91
- package/dist/session/BdgSession.d.ts.map +0 -1
- package/dist/session/BdgSession.js +0 -230
- package/dist/session/BdgSession.js.map +0 -1
- package/dist/ui/errors/SystemErrors.d.ts +0 -22
- package/dist/ui/errors/SystemErrors.d.ts.map +0 -1
- package/dist/ui/errors/SystemErrors.js +0 -23
- package/dist/ui/errors/SystemErrors.js.map +0 -1
- package/dist/ui/errors.d.ts +0 -39
- package/dist/ui/errors.d.ts.map +0 -1
- package/dist/ui/errors.js +0 -48
- package/dist/ui/errors.js.map +0 -1
- package/dist/ui/messages/deprecation.d.ts +0 -30
- package/dist/ui/messages/deprecation.d.ts.map +0 -1
- package/dist/ui/messages/deprecation.js +0 -49
- package/dist/ui/messages/deprecation.js.map +0 -1
- package/dist/ui/messages/index.d.ts +0 -12
- package/dist/ui/messages/index.d.ts.map +0 -1
- package/dist/ui/messages/index.js +0 -12
- package/dist/ui/messages/index.js.map +0 -1
- package/dist/utils/__tests__/filters.unit.test.d.ts +0 -2
- package/dist/utils/__tests__/filters.unit.test.d.ts.map +0 -1
- package/dist/utils/__tests__/filters.unit.test.js +0 -239
- package/dist/utils/__tests__/filters.unit.test.js.map +0 -1
- package/dist/utils/cdpHandlers.d.ts +0 -31
- package/dist/utils/cdpHandlers.d.ts.map +0 -1
- package/dist/utils/cdpHandlers.js +0 -38
- package/dist/utils/cdpHandlers.js.map +0 -1
- package/dist/utils/chromeDiagnostics.d.ts +0 -16
- package/dist/utils/chromeDiagnostics.d.ts.map +0 -1
- package/dist/utils/chromeDiagnostics.js +0 -37
- package/dist/utils/chromeDiagnostics.js.map +0 -1
- package/dist/utils/errors.d.ts +0 -82
- package/dist/utils/errors.d.ts.map +0 -1
- package/dist/utils/errors.js +0 -88
- package/dist/utils/errors.js.map +0 -1
- package/dist/utils/filters.d.ts +0 -148
- package/dist/utils/filters.d.ts.map +0 -1
- package/dist/utils/filters.js +0 -358
- package/dist/utils/filters.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -98
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -93
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/pageReadiness.d.ts +0 -46
- package/dist/utils/pageReadiness.d.ts.map +0 -1
- package/dist/utils/pageReadiness.js +0 -270
- package/dist/utils/pageReadiness.js.map +0 -1
- package/dist/utils/session.d.ts +0 -200
- package/dist/utils/session.d.ts.map +0 -1
- package/dist/utils/session.js +0 -498
- package/dist/utils/session.js.map +0 -1
- package/dist/utils/validation.d.ts +0 -12
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/validation.js +0 -20
- package/dist/utils/validation.js.map +0 -1
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CDP Schema Introspection
|
|
3
|
+
*
|
|
4
|
+
* Provides structured, agent-friendly schema information for all CDP domains and methods.
|
|
5
|
+
* Follows principles from docs/AGENT_FRIENDLY_TOOLS.md:
|
|
6
|
+
* - Machine-readable output (JSON schema)
|
|
7
|
+
* - Self-describing tools
|
|
8
|
+
* - Structured context without verbosity
|
|
9
|
+
*/
|
|
10
|
+
import { loadProtocol, findDomain, findCommand } from './protocol.js';
|
|
11
|
+
/**
|
|
12
|
+
* Get structured schema for a specific method.
|
|
13
|
+
*
|
|
14
|
+
* @param domainName - Domain name (case-insensitive)
|
|
15
|
+
* @param methodName - Method name (case-insensitive)
|
|
16
|
+
* @returns Method schema or undefined if not found
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const schema = getMethodSchema('Network', 'getCookies');
|
|
21
|
+
* console.log(schema.parameters); // [{ name: 'urls', type: 'array', required: false, ... }]
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export function getMethodSchema(domainName, methodName) {
|
|
25
|
+
const domain = findDomain(domainName);
|
|
26
|
+
if (!domain) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
const command = findCommand(domain.domain, methodName);
|
|
30
|
+
if (!command) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
return buildMethodSchema(domain.domain, command);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Build method schema from protocol command.
|
|
37
|
+
*
|
|
38
|
+
* @param domainName - Domain name
|
|
39
|
+
* @param command - Command from protocol
|
|
40
|
+
* @returns Structured method schema
|
|
41
|
+
*/
|
|
42
|
+
function buildMethodSchema(domainName, command) {
|
|
43
|
+
const parameters = command.parameters?.map(paramToSchema) ?? [];
|
|
44
|
+
const returns = command.returns?.map(returnToSchema) ?? [];
|
|
45
|
+
// Generate example
|
|
46
|
+
const example = {
|
|
47
|
+
command: `bdg cdp ${domainName}.${command.name}`,
|
|
48
|
+
};
|
|
49
|
+
if (parameters.length > 0) {
|
|
50
|
+
// Create example params with placeholder values
|
|
51
|
+
const exampleParams = {};
|
|
52
|
+
parameters.forEach((p) => {
|
|
53
|
+
if (!p.required)
|
|
54
|
+
return; // Skip optional params in example
|
|
55
|
+
exampleParams[p.name] = getExampleValue(p);
|
|
56
|
+
});
|
|
57
|
+
if (Object.keys(exampleParams).length > 0) {
|
|
58
|
+
example.params = exampleParams;
|
|
59
|
+
example.command += ` --params '${JSON.stringify(exampleParams)}'`;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const schema = {
|
|
63
|
+
name: `${domainName}.${command.name}`,
|
|
64
|
+
domain: domainName,
|
|
65
|
+
method: command.name,
|
|
66
|
+
parameters,
|
|
67
|
+
returns,
|
|
68
|
+
example,
|
|
69
|
+
};
|
|
70
|
+
if (command.description)
|
|
71
|
+
schema.description = command.description;
|
|
72
|
+
if (command.experimental)
|
|
73
|
+
schema.experimental = command.experimental;
|
|
74
|
+
if (command.deprecated)
|
|
75
|
+
schema.deprecated = command.deprecated;
|
|
76
|
+
return schema;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Convert protocol parameter to schema.
|
|
80
|
+
*/
|
|
81
|
+
function paramToSchema(param) {
|
|
82
|
+
const schema = {
|
|
83
|
+
name: param.name,
|
|
84
|
+
type: resolveType(param),
|
|
85
|
+
required: !param.optional,
|
|
86
|
+
};
|
|
87
|
+
if (param.description)
|
|
88
|
+
schema.description = param.description;
|
|
89
|
+
if (param.deprecated)
|
|
90
|
+
schema.deprecated = param.deprecated;
|
|
91
|
+
if (param.enum)
|
|
92
|
+
schema.enum = param.enum;
|
|
93
|
+
if (param.items)
|
|
94
|
+
schema.items = resolveType(param.items);
|
|
95
|
+
return schema;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Convert protocol return value to schema.
|
|
99
|
+
*/
|
|
100
|
+
function returnToSchema(ret) {
|
|
101
|
+
const schema = {
|
|
102
|
+
name: ret.name,
|
|
103
|
+
type: resolveType(ret),
|
|
104
|
+
optional: ret.optional ?? false,
|
|
105
|
+
};
|
|
106
|
+
if (ret.description)
|
|
107
|
+
schema.description = ret.description;
|
|
108
|
+
if (ret.items)
|
|
109
|
+
schema.items = resolveType(ret.items);
|
|
110
|
+
return schema;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Resolve type from parameter/return value.
|
|
114
|
+
*
|
|
115
|
+
* @param typeRef - Type reference from protocol
|
|
116
|
+
* @returns Type string (e.g., 'string', 'integer', 'Network.Cookie')
|
|
117
|
+
*/
|
|
118
|
+
function resolveType(typeRef) {
|
|
119
|
+
if (typeRef.$ref) {
|
|
120
|
+
return typeRef.$ref;
|
|
121
|
+
}
|
|
122
|
+
return typeRef.type ?? 'any';
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Get example value for a parameter type.
|
|
126
|
+
*
|
|
127
|
+
* @param param - Parameter schema
|
|
128
|
+
* @returns Example value
|
|
129
|
+
*/
|
|
130
|
+
function getExampleValue(param) {
|
|
131
|
+
if (param.enum && param.enum.length > 0) {
|
|
132
|
+
return param.enum[0];
|
|
133
|
+
}
|
|
134
|
+
switch (param.type) {
|
|
135
|
+
case 'string':
|
|
136
|
+
return 'example';
|
|
137
|
+
case 'integer':
|
|
138
|
+
case 'number':
|
|
139
|
+
return 0;
|
|
140
|
+
case 'boolean':
|
|
141
|
+
return true;
|
|
142
|
+
case 'array':
|
|
143
|
+
return [];
|
|
144
|
+
case 'object':
|
|
145
|
+
return {};
|
|
146
|
+
default:
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Get all methods in a domain.
|
|
152
|
+
*
|
|
153
|
+
* @param domainName - Domain name (case-insensitive)
|
|
154
|
+
* @returns Array of method schemas
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```typescript
|
|
158
|
+
* const methods = getDomainMethods('Network');
|
|
159
|
+
* console.log(methods.length); // 39
|
|
160
|
+
* console.log(methods[0].name); // 'Network.getIPProtectionProxyStatus'
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
export function getDomainMethods(domainName) {
|
|
164
|
+
const domain = findDomain(domainName);
|
|
165
|
+
if (!domain?.commands) {
|
|
166
|
+
return [];
|
|
167
|
+
}
|
|
168
|
+
return domain.commands.map((cmd) => buildMethodSchema(domain.domain, cmd));
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Get summary information for a domain.
|
|
172
|
+
*
|
|
173
|
+
* @param domainName - Domain name (case-insensitive)
|
|
174
|
+
* @returns Domain summary or undefined if not found
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```typescript
|
|
178
|
+
* const summary = getDomainSummary('Network');
|
|
179
|
+
* console.log(summary.commandCount); // 39
|
|
180
|
+
* console.log(summary.eventCount); // 12
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
export function getDomainSummary(domainName) {
|
|
184
|
+
const domain = findDomain(domainName);
|
|
185
|
+
if (!domain) {
|
|
186
|
+
return undefined;
|
|
187
|
+
}
|
|
188
|
+
return buildDomainSummary(domain);
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Build domain summary from protocol domain.
|
|
192
|
+
*/
|
|
193
|
+
function buildDomainSummary(domain) {
|
|
194
|
+
const summary = {
|
|
195
|
+
name: domain.domain,
|
|
196
|
+
commandCount: domain.commands?.length ?? 0,
|
|
197
|
+
eventCount: domain.events?.length ?? 0,
|
|
198
|
+
};
|
|
199
|
+
if (domain.description)
|
|
200
|
+
summary.description = domain.description;
|
|
201
|
+
if (domain.experimental)
|
|
202
|
+
summary.experimental = domain.experimental;
|
|
203
|
+
if (domain.deprecated)
|
|
204
|
+
summary.deprecated = domain.deprecated;
|
|
205
|
+
if (domain.dependencies)
|
|
206
|
+
summary.dependencies = domain.dependencies;
|
|
207
|
+
return summary;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Get summaries for all domains.
|
|
211
|
+
*
|
|
212
|
+
* @returns Array of domain summaries
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```typescript
|
|
216
|
+
* const summaries = getAllDomainSummaries();
|
|
217
|
+
* console.log(summaries.length); // 53
|
|
218
|
+
* console.log(summaries.find(d => d.name === 'Network').commandCount); // 39
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
export function getAllDomainSummaries() {
|
|
222
|
+
const protocol = loadProtocol();
|
|
223
|
+
return protocol.domains.map(buildDomainSummary);
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Search methods by keyword (case-insensitive).
|
|
227
|
+
*
|
|
228
|
+
* Searches in method names and descriptions.
|
|
229
|
+
*
|
|
230
|
+
* @param query - Search query
|
|
231
|
+
* @returns Array of matching method schemas
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* ```typescript
|
|
235
|
+
* const cookies = searchMethods('cookie');
|
|
236
|
+
* // Returns: Network.getCookies, Network.setCookie, Network.deleteCookies, etc.
|
|
237
|
+
* ```
|
|
238
|
+
*/
|
|
239
|
+
export function searchMethods(query) {
|
|
240
|
+
const protocol = loadProtocol();
|
|
241
|
+
const results = [];
|
|
242
|
+
const lowerQuery = query.toLowerCase();
|
|
243
|
+
protocol.domains.forEach((domain) => {
|
|
244
|
+
if (!domain.commands)
|
|
245
|
+
return;
|
|
246
|
+
domain.commands.forEach((command) => {
|
|
247
|
+
const nameMatch = command.name.toLowerCase().includes(lowerQuery);
|
|
248
|
+
const descMatch = command.description?.toLowerCase().includes(lowerQuery) ?? false;
|
|
249
|
+
if (nameMatch || descMatch) {
|
|
250
|
+
results.push(buildMethodSchema(domain.domain, command));
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
return results;
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/cdp/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAqFtE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,eAAe,CAAC,UAAkB,EAAE,UAAkB;IACpE,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IACtC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,MAAM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AQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAClC,IAAI,CAAC,MAAM,CAAC,QAAQ;YAAE,OAAO;QAE7B,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAClC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;YAClE,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC;YAEnF,IAAI,SAAS,IAAI,SAAS,EAAE,CAAC;gBAC3B,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;YAC1D,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript types for CDP Protocol Schema
|
|
3
|
+
*
|
|
4
|
+
* These types describe the structure of the protocol JSON from devtools-protocol package.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* CDP Protocol version information.
|
|
8
|
+
*/
|
|
9
|
+
export interface ProtocolVersion {
|
|
10
|
+
/** Major version (e.g., '1') */
|
|
11
|
+
major: string;
|
|
12
|
+
/** Minor version (e.g., '3') */
|
|
13
|
+
minor: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Parameter or return value type reference.
|
|
17
|
+
*/
|
|
18
|
+
export interface TypeRef {
|
|
19
|
+
/** Type name (e.g., 'string', 'integer', 'boolean', 'array', 'object') */
|
|
20
|
+
type?: string;
|
|
21
|
+
/** Reference to another type (e.g., 'Network.Cookie') */
|
|
22
|
+
$ref?: string;
|
|
23
|
+
/** Array item type (when type is 'array') */
|
|
24
|
+
items?: TypeRef;
|
|
25
|
+
/** Enum values (when type is 'string' with enum) */
|
|
26
|
+
enum?: string[];
|
|
27
|
+
/** Property definitions (when type is 'object') */
|
|
28
|
+
properties?: Parameter[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Command parameter or object property.
|
|
32
|
+
*/
|
|
33
|
+
export interface Parameter extends TypeRef {
|
|
34
|
+
/** Parameter name */
|
|
35
|
+
name: string;
|
|
36
|
+
/** Parameter description */
|
|
37
|
+
description?: string;
|
|
38
|
+
/** Whether parameter is optional */
|
|
39
|
+
optional?: boolean;
|
|
40
|
+
/** Deprecated flag */
|
|
41
|
+
deprecated?: boolean;
|
|
42
|
+
/** Experimental flag */
|
|
43
|
+
experimental?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Command return value.
|
|
47
|
+
*/
|
|
48
|
+
export interface ReturnValue extends TypeRef {
|
|
49
|
+
/** Return value name */
|
|
50
|
+
name: string;
|
|
51
|
+
/** Return value description */
|
|
52
|
+
description?: string;
|
|
53
|
+
/** Optional flag */
|
|
54
|
+
optional?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* CDP Command (method).
|
|
58
|
+
*/
|
|
59
|
+
export interface Command {
|
|
60
|
+
/** Command name (e.g., 'getCookies', 'enable') */
|
|
61
|
+
name: string;
|
|
62
|
+
/** Command description */
|
|
63
|
+
description?: string;
|
|
64
|
+
/** Command parameters */
|
|
65
|
+
parameters?: Parameter[];
|
|
66
|
+
/** Command return values */
|
|
67
|
+
returns?: ReturnValue[];
|
|
68
|
+
/** Whether command is experimental */
|
|
69
|
+
experimental?: boolean;
|
|
70
|
+
/** Whether command is deprecated */
|
|
71
|
+
deprecated?: boolean;
|
|
72
|
+
/** URL to specification */
|
|
73
|
+
redirect?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* CDP Event.
|
|
77
|
+
*/
|
|
78
|
+
export interface Event {
|
|
79
|
+
/** Event name */
|
|
80
|
+
name: string;
|
|
81
|
+
/** Event description */
|
|
82
|
+
description?: string;
|
|
83
|
+
/** Event parameters */
|
|
84
|
+
parameters?: Parameter[];
|
|
85
|
+
/** Whether event is experimental */
|
|
86
|
+
experimental?: boolean;
|
|
87
|
+
/** Whether event is deprecated */
|
|
88
|
+
deprecated?: boolean;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* CDP Type definition.
|
|
92
|
+
*/
|
|
93
|
+
export interface Type {
|
|
94
|
+
/** Type ID (e.g., 'Cookie', 'Headers') */
|
|
95
|
+
id: string;
|
|
96
|
+
/** Type description */
|
|
97
|
+
description?: string;
|
|
98
|
+
/** Base type */
|
|
99
|
+
type: string;
|
|
100
|
+
/** Enum values (for string enums) */
|
|
101
|
+
enum?: string[];
|
|
102
|
+
/** Properties (for object types) */
|
|
103
|
+
properties?: Parameter[];
|
|
104
|
+
/** Array item type */
|
|
105
|
+
items?: TypeRef;
|
|
106
|
+
/** Whether type is experimental */
|
|
107
|
+
experimental?: boolean;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* CDP Domain (e.g., Network, Runtime, DOM).
|
|
111
|
+
*/
|
|
112
|
+
export interface Domain {
|
|
113
|
+
/** Domain name (e.g., 'Network', 'Runtime') */
|
|
114
|
+
domain: string;
|
|
115
|
+
/** Domain description */
|
|
116
|
+
description?: string | null;
|
|
117
|
+
/** Domain dependencies */
|
|
118
|
+
dependencies?: string[];
|
|
119
|
+
/** Domain types */
|
|
120
|
+
types?: Type[];
|
|
121
|
+
/** Domain commands */
|
|
122
|
+
commands?: Command[];
|
|
123
|
+
/** Domain events */
|
|
124
|
+
events?: Event[];
|
|
125
|
+
/** Whether domain is experimental */
|
|
126
|
+
experimental?: boolean;
|
|
127
|
+
/** Whether domain is deprecated */
|
|
128
|
+
deprecated?: boolean;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Full CDP Protocol Schema.
|
|
132
|
+
*/
|
|
133
|
+
export interface ProtocolSchema {
|
|
134
|
+
/** Protocol version */
|
|
135
|
+
version: ProtocolVersion;
|
|
136
|
+
/** All protocol domains */
|
|
137
|
+
domains: Domain[];
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/cdp/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,mDAAmD;IACnD,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,OAAO;IACxC,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wBAAwB;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO;IAC1C,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;A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B;IAC1B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,mBAAmB;IACnB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,oBAAoB;IACpB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,qCAAqC;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mCAAmC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,uBAAuB;IACvB,OAAO,EAAE,eAAe,CAAC;IACzB,2BAA2B;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/cdp/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
package/dist/commands/cdp.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { Command } from 'commander';
|
|
2
2
|
/**
|
|
3
|
-
* Register CDP command.
|
|
3
|
+
* Register CDP command with full introspection support.
|
|
4
|
+
*
|
|
5
|
+
* Supports multiple modes:
|
|
6
|
+
* - Execution: `bdg cdp Network.getCookies --params '{...}'`
|
|
7
|
+
* - List domains: `bdg cdp --list`
|
|
8
|
+
* - List methods: `bdg cdp Network --list`
|
|
9
|
+
* - Describe method: `bdg cdp Network.getCookies --describe`
|
|
10
|
+
* - Search: `bdg cdp --search cookie`
|
|
11
|
+
*
|
|
12
|
+
* All modes support case-insensitive input and provide structured JSON output.
|
|
4
13
|
*
|
|
5
14
|
* @param program - Commander.js Command instance to register commands on
|
|
6
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdp.d.ts","sourceRoot":"","sources":["../../src/commands/cdp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"cdp.d.ts","sourceRoot":"","sources":["../../src/commands/cdp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8BzC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsDzD"}
|