garrytan/gstack · error · Error
Usage: $B cdp <Domain.method> [json-params] Cause: '${name}'
Error message
Usage: $B cdp <Domain.method> [json-params]
Cause: '${name}' is not in Domain.method format.
Action: e.g. $B cdp Accessibility.getFullAXTree {} What it means
Error "Usage: $B cdp <Domain.method> [json-params] Cause: '${name}' is not in Domain.method format. Action: e.g. $B cdp Accessibility.getFullAXTree {}" thrown in garrytan/gstack.
Source
Thrown at browse/src/cdp-commands.ts:17
/**
* $B cdp <Domain.method> [json-params] — CLI surface for the CDP escape hatch.
*
* Output for trusted methods is a plain JSON pretty-print.
* Output for untrusted methods is wrapped with the centralized UNTRUSTED EXTERNAL
* CONTENT envelope so the sidebar-agent classifier sees it (matches the pattern
* used by other untrusted-content commands in commands.ts).
*/
import type { BrowserManager } from './browser-manager';
import { dispatchCdpCall } from './cdp-bridge';
import { wrapUntrustedContent } from './commands';
function parseQualified(name: string): { domain: string; method: string } {
const idx = name.indexOf('.');
if (idx <= 0 || idx === name.length - 1) {
throw new Error(
`Usage: $B cdp <Domain.method> [json-params]\n` +
`Cause: '${name}' is not in Domain.method format.\n` +
'Action: e.g. $B cdp Accessibility.getFullAXTree {}'
);
}
return { domain: name.slice(0, idx), method: name.slice(idx + 1) };
}
export async function handleCdpCommand(args: string[], bm: BrowserManager): Promise<string> {
if (args.length === 0 || args[0] === 'help' || args[0] === '--help') {
return [
'$B cdp — raw CDP method dispatch (deny-default escape hatch)',
'',
'Usage: $B cdp <Domain.method> [json-params]',
'',
'Allowed methods are listed in browse/src/cdp-allowlist.ts. To add one,',
'open a PR with a one-line justification and the (scope, output) tags.',
'Examples:',View on GitHub (pinned to 94993f7401)
When it happens
Trigger: Thrown at browse/src/cdp-commands.ts:17 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12).
Data as JSON: /api/errors/600b121f8155cbed.
Report an issue: GitHub.