@poe-platform/safe-bash 0.1.639 → 0.1.641

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.
Files changed (44) hide show
  1. package/dist/safe-bash/commands/playwright/index.d.ts.map +1 -1
  2. package/dist/safe-bash/commands/playwright/index.js +9 -1
  3. package/dist/safe-bash/commands/playwright/index.js.map +1 -1
  4. package/dist/safe-bash/playwright/abilities.d.ts +40 -0
  5. package/dist/safe-bash/playwright/abilities.d.ts.map +1 -0
  6. package/dist/safe-bash/playwright/abilities.js +43 -0
  7. package/dist/safe-bash/playwright/abilities.js.map +1 -0
  8. package/dist/safe-bash/playwright/ability-execution.d.ts +10 -0
  9. package/dist/safe-bash/playwright/ability-execution.d.ts.map +1 -0
  10. package/dist/safe-bash/playwright/ability-execution.js +126 -0
  11. package/dist/safe-bash/playwright/ability-execution.js.map +1 -0
  12. package/dist/safe-bash/playwright/builtins.d.ts +61 -0
  13. package/dist/safe-bash/playwright/builtins.d.ts.map +1 -0
  14. package/dist/safe-bash/playwright/builtins.js +23 -0
  15. package/dist/safe-bash/playwright/builtins.js.map +1 -0
  16. package/dist/safe-bash/playwright/catalog.d.ts +19 -0
  17. package/dist/safe-bash/playwright/catalog.d.ts.map +1 -0
  18. package/dist/safe-bash/playwright/catalog.js +35 -0
  19. package/dist/safe-bash/playwright/catalog.js.map +1 -0
  20. package/dist/safe-bash/playwright/command-reference.d.ts +584 -0
  21. package/dist/safe-bash/playwright/command-reference.d.ts.map +1 -0
  22. package/dist/safe-bash/playwright/command-reference.js +712 -0
  23. package/dist/safe-bash/playwright/command-reference.js.map +1 -0
  24. package/dist/safe-bash/playwright/controller.d.ts +3 -0
  25. package/dist/safe-bash/playwright/controller.d.ts.map +1 -1
  26. package/dist/safe-bash/playwright/controller.js +68 -9
  27. package/dist/safe-bash/playwright/controller.js.map +1 -1
  28. package/dist/safe-bash/playwright/help-reference.d.ts +2 -0
  29. package/dist/safe-bash/playwright/help-reference.d.ts.map +1 -0
  30. package/dist/safe-bash/playwright/help-reference.js +126 -0
  31. package/dist/safe-bash/playwright/help-reference.js.map +1 -0
  32. package/dist/safe-bash/playwright/help.d.ts +3 -88
  33. package/dist/safe-bash/playwright/help.d.ts.map +1 -1
  34. package/dist/safe-bash/playwright/help.js +51 -27
  35. package/dist/safe-bash/playwright/help.js.map +1 -1
  36. package/dist/safe-bash/playwright/index.d.ts +2 -0
  37. package/dist/safe-bash/playwright/index.d.ts.map +1 -1
  38. package/dist/safe-bash/playwright/index.js +1 -0
  39. package/dist/safe-bash/playwright/index.js.map +1 -1
  40. package/dist/safe-bash/playwright/invocation.d.ts +6 -4
  41. package/dist/safe-bash/playwright/invocation.d.ts.map +1 -1
  42. package/dist/safe-bash/playwright/invocation.js +106 -74
  43. package/dist/safe-bash/playwright/invocation.js.map +1 -1
  44. package/package.json +2 -2
@@ -1,30 +1,54 @@
1
- export const playwrightCommands = {
2
- open: { arity: [1, 2], usage: 'open [url]', description: 'Open a new session (about:blank when no URL is given).', details: '--browser <chromium|firefox|webkit> selects an injected engine (default: chromium).\n--headed or --headless selects the mode (default: headless); host support is required.' },
3
- goto: { arity: [2, 2], usage: 'goto <url>', description: 'Navigate the selected tab in an open session.', details: 'Navigation accepts http:, https:, and about:blank. It invalidates snapshot refs.' },
4
- list: { arity: [1, 1], usage: 'list', description: 'List named sessions and their lifecycle states.', details: 'States: acquiring, open, closing, closed.' },
5
- close: { arity: [1, 1], usage: 'close', description: 'Close the selected session.', details: 'Closing an absent session is safe. Use open to start it again.' },
6
- 'close-all': { arity: [1, 1], usage: 'close-all', description: 'Close all sessions owned by this controller.', details: 'This does not terminate unrelated host browsers.' },
7
- snapshot: { arity: [1, 1], usage: 'snapshot', description: 'Read page text and capture actionable element refs.', details: '--filename <path> writes UTF-8 snapshot text to the virtual filesystem instead of stdout.\nUse the emitted refs (for example e1) with click/fill; snapshot again after changes.\nA new snapshot, navigation or tab change invalidates old refs. Byte/ref limits apply.' },
8
- click: { arity: [2, 2], usage: 'click <ref>', description: 'Click an element from the latest snapshot.', details: 'The ref must be an issued, still-connected element handle, not a CSS selector.' },
9
- fill: { arity: [3, 3], usage: 'fill <ref> <text>', description: 'Fill an element from the latest snapshot.', details: 'Quote text containing spaces; use -- before literal arguments beginning with -.' },
10
- press: { arity: [2, 2], usage: 'press <key>', description: 'Press a key, such as Enter or Control+a.', details: 'Acts on the selected tab through the injected keyboard capability.' },
11
- screenshot: { arity: [1, 1], usage: 'screenshot', description: 'Capture an image of the selected tab.', details: '--filename <path.png|path.jpg|path.jpeg> writes to the virtual filesystem.\nWithout --filename, raw PNG bytes go to stdout; use shell redirection.\n--full-page captures the whole page instead of the viewport. Byte limits apply.' },
12
- 'tab-list': { arity: [1, 1], usage: 'tab-list', description: 'List tabs with zero-based indexes and URLs.', details: 'The selected tab is marked selected.' },
13
- 'tab-new': { arity: [1, 2], usage: 'tab-new [url]', description: 'Open and select a new tab.', details: 'Defaults to about:blank. The host tab limit applies.' },
14
- 'tab-select': { arity: [2, 2], usage: 'tab-select <index>', description: 'Select a tab by its zero-based index.', details: 'Use tab-list to discover indexes. Selecting a tab invalidates snapshot refs.' },
15
- 'tab-close': { arity: [1, 2], usage: 'tab-close [index]', description: 'Close a tab (the selected tab by default).', details: 'Use tab-list to discover the remaining tabs after closing one.' },
16
- };
17
- export function formatPlaywrightHelp(topic) {
18
- const commands = Object.entries(playwrightCommands).filter(([name]) => topic === undefined || (topic === 'tab' ? name.startsWith('tab-') : name === topic));
19
- const usage = topic === undefined ? '[options] <command> [arguments]' : topic === 'tab' ? 'tab <list|new|select|close> [arguments]' : playwrightCommands[topic].usage;
20
- let text = `Usage: playwright-cli ${usage}\n\nSupported commands:\n`;
21
- for (const [, command] of commands)
22
- text += ` ${command.usage.padEnd(24)} ${command.description}\n`;
23
- if (topic !== undefined)
24
- text += `\n${commands.map(([, command]) => command.details).join('\n')}\n`;
25
- else
26
- text += '\nCommand options:\n open: --browser <engine>, --headed, --headless\n snapshot: --filename <path> (UTF-8 text; default: stdout)\n screenshot: --filename <path.png|path.jpg|path.jpeg>, --full-page\n Default: raw PNG on stdout; use shell redirection.\n';
27
- text += '\nSession selection:\n -s, --session <name> Select a session (also accepts --session=<name>).\n Precedence: explicit option > exported PLAYWRIGHT_CLI_SESSION > default.\n Commands reuse the selected open session; repeated open is an error.\n Sessions live only in this retained controller, not across independent owners.\n close/close-all release owned sessions; remote loss requires an explicit open.\n\nDiscovery and limits:\n --help, -h, help [command] Show help without allocating a browser.\n playwright-cli <command> --help shows command arguments and options.\n tab <list|new|select|close> is also accepted.\n Snapshot refs are temporary handles, not selectors; recapture after changes.\n Snapshot byte/ref, screenshot byte, session and tab limits are host-configured.\n Browser commands require an injected adapter; help does not.\n\nUnsupported in this subset:\n Arbitrary code/eval, uploads, downloads, PDF, video, tracing, install,\n kill-all, persistent profiles and unlisted commands/options.\n';
1
+ import { playwrightCommandCatalog } from './catalog.js';
2
+ import { registerPlaywrightAbilities } from './abilities.js';
3
+ export function formatPlaywrightHelp(topic, abilities = registerPlaywrightAbilities(undefined, true)) {
4
+ let text = 'playwright-cli - run playwright mcp commands from terminal\n\n';
5
+ const usage = topic === undefined ? '<command> [args] [options]' : topic === 'tab' ? 'tab <list|new|select|close> [args]' : playwrightCommandCatalog[topic].usage;
6
+ text += `Usage: playwright-cli ${usage}\nUsage: playwright-cli -s=<session> ${usage}\n`;
7
+ const selected = Object.entries(playwrightCommandCatalog).filter(([name]) => topic === undefined ? abilities.has(name) : topic === 'tab' ? name.startsWith('tab-') && abilities.has(name) : name === topic);
8
+ const sections = new Map();
9
+ for (const entry of selected) {
10
+ const entries = sections.get(entry[1].section) ?? [];
11
+ entries.push(entry);
12
+ sections.set(entry[1].section, entries);
13
+ }
14
+ if (topic === undefined && !selected.length)
15
+ text += '\nNo command abilities are enabled by this client.\n';
16
+ for (const [section, entries] of sections) {
17
+ if (topic === undefined)
18
+ text += `\n${section}:\n`;
19
+ for (const [name, definition] of entries) {
20
+ const ability = abilities.get(name);
21
+ if (topic !== undefined)
22
+ text += '\n';
23
+ text += `${definition.referenceLine}${ability?.limitations ? ' [limited]' : ''}\n`;
24
+ if (topic !== undefined) {
25
+ if (!ability)
26
+ text += '\nNot enabled by this client. This command cannot be executed.\n';
27
+ else {
28
+ if (ability.details)
29
+ text += `\n${ability.details}\n`;
30
+ if (ability.limitations)
31
+ text += `\n${ability.limitations}\n`;
32
+ const flags = Object.entries(ability.options).filter(([flag]) => flag !== 'session');
33
+ if (flags.length)
34
+ text += '\nOptions:\n' + flags.map(([flag, option]) => ` --${flag}${option.type === 'string' ? option.optionalValue ? ' [value]' : ' <value>' : ''} ${option.description}\n`).join('');
35
+ }
36
+ }
37
+ }
38
+ }
39
+ text += '\nGlobal options:\n --help [command] print help\n -s, --session <name> select a session (also accepts -s=<name>)\n';
40
+ if (topic === undefined) {
41
+ const limited = [...abilities.entries()].filter(([, ability]) => ability.limitations);
42
+ if (limited.length)
43
+ text += '\nCompatibility notes:\n' + limited.map(([, ability]) => ` ${ability.limitations}\n`).join('');
44
+ const flags = [...abilities.entries()].filter(([, ability]) => Object.keys(ability.options).some(flag => flag !== 'session'));
45
+ if (flags.length)
46
+ text += '\nSupported command options:\n' + flags.map(([name, ability]) => ` ${name}: ${Object.entries(ability.options).filter(([flag]) => flag !== 'session').map(([flag, option]) => `--${flag}${option.type === 'string' ? option.optionalValue ? ' [value]' : ' <value>' : ''}`).join(', ')}\n`).join('');
47
+ }
48
+ text += '\nClient capabilities:\n Only enabled abilities and declared options are executable.\n Client implementations own their backend effects; help never allocates a browser.\n Use help <command> for supported options and limitations.\n\nSession selection and lifecycle:\n Precedence: explicit option > exported PLAYWRIGHT_CLI_SESSION > default.\n Client-scoped abilities own their sessions; session-scoped abilities borrow this controller.\n';
49
+ if ([...abilities.values()].some(ability => !ability.execute || ability.scope === 'session'))
50
+ text += ' Retained sessions require open; repeated open is an error.\n close/close-all release owned sessions; remote loss requires an explicit open.\n Snapshot refs are temporary handles; navigation, new snapshots and tab changes invalidate refs.\n';
51
+ text += '\nHost limits:\n Session, tab, snapshot byte/ref, artifact byte and command byte limits are host-configured.\n Artifacts use supplied byte destinations or the virtual filesystem, never implicit native paths.\n';
28
52
  return text;
29
53
  }
30
54
  //# sourceMappingURL=help.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/playwright/help.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,wDAAwD,EAAE,OAAO,EAAE,6KAA6K,EAAE;IAC3S,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,+CAA+C,EAAE,OAAO,EAAE,kFAAkF,EAAE;IACvM,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,iDAAiD,EAAE,OAAO,EAAE,2CAA2C,EAAE;IAC5J,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,6BAA6B,EAAE,OAAO,EAAE,gEAAgE,EAAE;IAC/J,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,8CAA8C,EAAE,OAAO,EAAE,kDAAkD,EAAE;IAC5K,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,qDAAqD,EAAE,OAAO,EAAE,wQAAwQ,EAAE;IACrY,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC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CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClU,CAAC;IACD,IAAI,IAAI,2bAA2b,CAAC;IACpc,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC;QAAE,IAAI,IAAI,qPAAqP,CAAC;IAC5V,IAAI,IAAI,qNAAqN,CAAC;IAC9N,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,5 +1,7 @@
1
1
  export * from './adapter.js';
2
2
  export * from './billing.js';
3
3
  export * from './controller.js';
4
+ export * from './catalog.js';
5
+ export type { PlaywrightAbilities, PlaywrightAbility, PlaywrightAbilityRequest } from './abilities.js';
4
6
  export type { PlaywrightInvocation } from './invocation.js';
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/playwright/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/playwright/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AACvG,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './adapter.js';
2
2
  export * from './billing.js';
3
3
  export * from './controller.js';
4
+ export * from './catalog.js';
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/playwright/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/playwright/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
@@ -1,18 +1,20 @@
1
1
  import type { BrowserEngine, PlaywrightAdapter } from './adapter.js';
2
- import { type PlaywrightCommand } from './help.js';
2
+ import { type PlaywrightCommand } from './catalog.js';
3
+ import type { RegisteredPlaywrightAbility } from './abilities.js';
3
4
  export interface PlaywrightInvocation {
4
5
  readonly args: readonly string[];
5
- /** Only exported shell variables. Never read the host environment. */
6
6
  readonly env: Readonly<Record<string, string>>;
7
7
  readonly signal: AbortSignal;
8
8
  write(text: string): Promise<void>;
9
- /** Byte destination: optional guest filename, resolved by the injected VFS. */
9
+ readonly readArtifact?: ((filename: string, maxBytes: number) => Promise<Uint8Array>) | undefined;
10
10
  readonly writeArtifact?: ((bytes: Uint8Array, filename?: string) => Promise<void>) | undefined;
11
11
  readonly registerCleanup?: ((cleanup: () => Promise<void>) => void) | undefined;
12
12
  }
13
13
  export type ParsedInvocation = {
14
14
  command: PlaywrightCommand;
15
15
  session: string;
16
+ args: readonly string[];
17
+ options: Readonly<Record<string, string | boolean | readonly string[]>>;
16
18
  browser: BrowserEngine;
17
19
  headless: boolean;
18
20
  url?: string;
@@ -23,7 +25,7 @@ export type ParsedInvocation = {
23
25
  fullPage: boolean;
24
26
  imageType: 'png' | 'jpeg';
25
27
  };
26
- export declare function parseInvocation(invocation: PlaywrightInvocation, adapter?: PlaywrightAdapter): ParsedInvocation | {
28
+ export declare function parseInvocation(invocation: PlaywrightInvocation, abilities: ReadonlyMap<PlaywrightCommand, RegisteredPlaywrightAbility>, adapter?: PlaywrightAdapter): ParsedInvocation | {
27
29
  command: 'help';
28
30
  topic?: PlaywrightCommand | 'tab';
29
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"invocation.d.ts","sourceRoot":"","sources":["../../src/playwright/invocation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAsB,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEvE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,sEAAsE;IACtE,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,+EAA+E;IAC/E,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;IAC/F,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACjF;AACD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CA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,eAAe,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACjF;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;IACxE,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;CAC3B,CAAC;AAEF,wBAAgB,eAAe,CAAC,UAAU,EAAE,oBAAoB,EAAE,SAAS,EAAE,WAAW,CAAC,iBAAiB,EAAE,2BAA2B,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,gBAAgB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,iBAAiB,GAAG,KAAK,CAAA;CAAE,CA4GhP"}
@@ -1,123 +1,155 @@
1
- import { playwrightCommands } from './help.js';
2
- export function parseInvocation(invocation, adapter) {
3
- let session;
4
- let browser = 'chromium';
5
- let headless = true;
6
- let filename;
7
- let fullPage = false;
8
- let browserOption = false;
9
- let modeOption = false;
10
- let help = false;
1
+ import { playwrightCommandCatalog } from './catalog.js';
2
+ export function parseInvocation(invocation, abilities, adapter) {
11
3
  const positional = [];
12
- const seen = new Set();
4
+ const supplied = new Map();
5
+ const knownOptions = new Map(Object.values(playwrightCommandCatalog).flatMap(command => Object.entries(command.options)));
6
+ knownOptions.set('headless', { type: 'boolean', description: '' });
7
+ knownOptions.set('session', { type: 'string', description: '' });
8
+ let help = false;
13
9
  let literal = false;
14
- for (let i = 0; i < invocation.args.length; i++) {
15
- const arg = invocation.args[i];
10
+ for (let index = 0; index < invocation.args.length; index++) {
11
+ const arg = invocation.args[index];
12
+ if (typeof arg !== 'string' || arg.includes('\0'))
13
+ throw new Error('Invalid Playwright argument');
16
14
  if (arg === '--' && !literal) {
17
15
  literal = true;
18
16
  continue;
19
17
  }
20
- if (literal || !arg.startsWith('-')) {
18
+ const numeric = arg.startsWith('-') && arg.length > 1 && '0123456789.'.includes(arg[1]) && Number.isFinite(Number(arg));
19
+ if (literal || !arg.startsWith('-') || numeric) {
21
20
  positional.push(arg);
22
21
  continue;
23
22
  }
24
23
  const separator = arg.indexOf('=');
25
24
  const flag = separator === -1 ? arg : arg.slice(0, separator);
26
- const key = flag === '-s' ? '--session' : flag;
27
- if (seen.has(key))
28
- throw new Error(`Repeated option: ${flag}`);
29
- seen.add(key);
30
- if (key === '--session' || key === '--browser' || key === '--filename') {
31
- const value = separator === -1 ? invocation.args[++i] : arg.slice(separator + 1);
32
- if (!value || value.startsWith('-') || value.includes('\0'))
33
- throw new Error(`Missing or invalid value: ${flag}`);
34
- if (key === '--session')
35
- session = value;
36
- else if (key === '--filename')
37
- filename = value;
38
- else {
39
- browser = value;
40
- browserOption = true;
41
- }
42
- }
43
- else if ((key === '--help' || key === '-h') && separator === -1)
25
+ const key = flag === '-s' ? 'session' : flag === '-g' ? 'global' : flag.slice(2);
26
+ if ((flag === '-h' || flag === '--help') && separator === -1) {
44
27
  help = true;
45
- else if (key === '--headed' || key === '--headless') {
46
- if (separator !== -1 || modeOption)
47
- throw new Error(`Invalid option: ${arg}`);
48
- headless = key === '--headless';
49
- modeOption = true;
28
+ continue;
50
29
  }
51
- else if (key === '--full-page' && separator === -1)
52
- fullPage = true;
53
- else
30
+ const definition = knownOptions.get(key);
31
+ if (!definition || flag !== '-s' && flag !== '-g' && !flag.startsWith('--'))
54
32
  throw new Error(`Unsupported option: ${arg}`);
33
+ let value;
34
+ if (definition.type === 'boolean') {
35
+ if (separator !== -1)
36
+ throw new Error(`Invalid option: ${arg}`);
37
+ value = true;
38
+ }
39
+ else if (definition.optionalValue && separator === -1 && (invocation.args[index + 1] === undefined || invocation.args[index + 1].startsWith('-'))) {
40
+ value = true;
41
+ }
42
+ else {
43
+ const candidate = separator === -1 ? invocation.args[++index] : arg.slice(separator + 1);
44
+ if (candidate === undefined || candidate.includes('\0') || separator === -1 && candidate.startsWith('-') && !Number.isFinite(Number(candidate)))
45
+ throw new Error(`Missing or invalid value: ${flag}`);
46
+ value = candidate;
47
+ }
48
+ const values = supplied.get(key) ?? [];
49
+ values.push(value);
50
+ supplied.set(key, values);
55
51
  }
56
52
  if (positional[0] === 'help') {
57
53
  help = true;
58
54
  positional.shift();
59
55
  }
56
+ if (!positional.length && !supplied.size)
57
+ help = true;
60
58
  if (help && (positional.length === 0 || positional.length === 1 && positional[0] === 'tab'))
61
59
  return { command: 'help', ...(positional[0] === 'tab' ? { topic: 'tab' } : {}) };
62
- // Accept both agent-oriented CLI tab-* spellings and tab <operation>.
63
60
  if (positional[0] === 'tab')
64
61
  positional.splice(0, 2, `tab-${positional[1] ?? ''}`);
65
- const command = positional[0];
66
- if (!Object.hasOwn(playwrightCommands, command))
67
- throw new Error(`Unsupported command in qualified subset: ${command ?? ''}`);
62
+ const command = positional.shift();
63
+ if (!Object.hasOwn(playwrightCommandCatalog, command))
64
+ throw new Error(`Unsupported command: ${command ?? ''}`);
68
65
  if (help)
69
66
  return { command: 'help', topic: command };
70
- session ??= invocation.env.PLAYWRIGHT_CLI_SESSION ?? 'default';
67
+ const ability = abilities.get(command);
68
+ if (!ability)
69
+ throw new Error(`Playwright ability not enabled: ${command}`);
70
+ const sessionValues = supplied.get('session');
71
+ if (sessionValues && sessionValues.length !== 1)
72
+ throw new Error('Repeated option: --session');
73
+ const session = sessionValues?.[0] ?? invocation.env.PLAYWRIGHT_CLI_SESSION ?? 'default';
71
74
  if (!session || session.length > 128 || [...session].some(char => !'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-'.includes(char)))
72
75
  throw new Error('Invalid session name');
73
- const [min, max] = playwrightCommands[command].arity;
76
+ supplied.delete('session');
77
+ const options = {};
78
+ for (const [flag, values] of supplied) {
79
+ const definition = ability.options[flag];
80
+ if (!definition)
81
+ throw new Error(`Unsupported option: --${flag}`);
82
+ if (values.length > 1 && !definition.repeatable)
83
+ throw new Error(`Repeated option: --${flag}`);
84
+ options[flag] = definition.repeatable ? Object.freeze(values) : values[0];
85
+ }
86
+ const [min, max] = ability.arity;
74
87
  if (positional.length < min || positional.length > max)
75
88
  throw new Error(`Invalid arguments for ${command}`);
76
- if (command !== 'open' && (browserOption || modeOption))
77
- throw new Error('Browser options require open');
78
- if (filename !== undefined && command !== 'snapshot' && command !== 'screenshot')
79
- throw new Error('Filename requires snapshot or screenshot');
80
- if (fullPage && command !== 'screenshot')
81
- throw new Error('Full page requires screenshot');
82
- if (command === 'screenshot' || filename !== undefined) {
89
+ const parsed = { command, session, args: Object.freeze(positional), options: Object.freeze(options), browser: 'chromium', headless: true, fullPage: false, imageType: 'png' };
90
+ if (ability.execute)
91
+ return parsed;
92
+ const browser = options.browser ?? 'chromium';
93
+ if (browser !== 'chromium' && browser !== 'firefox' && browser !== 'webkit')
94
+ throw new Error(`Unsupported browser: ${browser}`);
95
+ parsed.browser = browser;
96
+ if (options.headed && options.headless)
97
+ throw new Error('Invalid option: --headless');
98
+ parsed.headless = !options.headed;
99
+ parsed.fullPage = options['full-page'] === true;
100
+ if (options.filename !== undefined) {
101
+ const filename = options.filename;
102
+ if (!filename)
103
+ throw new Error('Missing or invalid value: --filename');
104
+ parsed.filename = filename;
105
+ }
106
+ if (command === 'screenshot' || parsed.filename !== undefined) {
83
107
  if (typeof invocation.writeArtifact !== 'function')
84
108
  throw new Error('Artifact byte destination unsupported');
85
109
  }
86
- if (browser !== 'chromium' && browser !== 'firefox' && browser !== 'webkit')
87
- throw new Error(`Unsupported browser: ${browser}`);
88
110
  if (command === 'open') {
89
111
  if (!adapter)
90
112
  throw new Error('An injected Playwright adapter is required');
91
113
  const capability = adapter.browsers[browser];
92
114
  if (!capability)
93
115
  throw new Error(`Unsupported browser: ${browser}`);
94
- if (!headless && !capability.headed)
116
+ if (!parsed.headless && !capability.headed)
95
117
  throw new Error(`Headed mode is unsupported for ${browser}`);
96
118
  }
97
- let imageType = 'png';
98
- if (command === 'screenshot' && filename !== undefined) {
99
- const lower = filename.toLowerCase();
119
+ if (command === 'screenshot' && parsed.filename !== undefined) {
120
+ const lower = parsed.filename.toLowerCase();
100
121
  if (lower.endsWith('.jpg') || lower.endsWith('.jpeg'))
101
- imageType = 'jpeg';
122
+ parsed.imageType = 'jpeg';
102
123
  else if (!lower.endsWith('.png'))
103
124
  throw new Error('Unsupported screenshot extension; use png or jpeg');
104
125
  }
105
- const url = command === 'open' || command === 'goto' || command === 'tab-new' ? positional[1] : undefined;
126
+ const url = command === 'open' || command === 'goto' || command === 'tab-new' ? positional[0] : undefined;
106
127
  if (url !== undefined) {
107
- const parsed = new URL(url);
108
- if (parsed.protocol !== 'https:' && parsed.protocol !== 'http:' && url !== 'about:blank')
128
+ const parsedUrl = new URL(url);
129
+ if (parsedUrl.protocol !== 'https:' && parsedUrl.protocol !== 'http:' && url !== 'about:blank')
109
130
  throw new Error('Unsupported navigation URL');
131
+ parsed.url = url;
132
+ }
133
+ if (command === 'click' || command === 'fill') {
134
+ const ref = positional[0];
135
+ if (ref[0] !== 'e' || ref.length < 2 || [...ref.slice(1)].some(char => !'0123456789'.includes(char)))
136
+ throw new Error('Action requires a snapshot ref');
137
+ parsed.ref = ref;
138
+ }
139
+ if (command === 'fill')
140
+ parsed.value = positional[1];
141
+ if (command === 'press') {
142
+ if (!positional[0])
143
+ throw new Error('Missing press key');
144
+ parsed.value = positional[0];
145
+ }
146
+ const tabValue = command === 'tab-select' || command === 'tab-close' ? positional[0] : undefined;
147
+ if (tabValue !== undefined) {
148
+ const tab = Number(tabValue);
149
+ if (!tabValue || [...tabValue].some(char => !'0123456789'.includes(char)) || !Number.isSafeInteger(tab))
150
+ throw new Error('Invalid tab index');
151
+ parsed.tab = tab;
110
152
  }
111
- const ref = command === 'click' || command === 'fill' ? positional[1] : undefined;
112
- if (ref !== undefined && (ref[0] !== 'e' || ref.length < 2 || [...ref.slice(1)].some(char => !'0123456789'.includes(char))))
113
- throw new Error('Action requires a snapshot ref');
114
- const value = command === 'fill' ? positional[2] : command === 'press' ? positional[1] : undefined;
115
- if (command === 'press' && !value)
116
- throw new Error('Missing press key');
117
- const tabValue = command === 'tab-select' || command === 'tab-close' ? positional[1] : undefined;
118
- const tab = tabValue === undefined ? undefined : Number(tabValue);
119
- if (tabValue !== undefined && (!tabValue || [...tabValue].some(char => !'0123456789'.includes(char)) || !Number.isSafeInteger(tab)))
120
- throw new Error('Invalid tab index');
121
- return { command, session, browser, headless, fullPage, imageType, ...(url === undefined ? {} : { url }), ...(ref === undefined ? {} : { ref }), ...(value === undefined ? {} : { value }), ...(tab === undefined ? {} : { tab }), ...(filename === undefined ? {} : { filename }) };
153
+ return parsed;
122
154
  }
123
155
  //# sourceMappingURL=invocation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"invocation.js","sourceRoot":"","sources":["../../src/playwright/invocation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAA0B,MAAM,WAAW,CAAC;AA0BvE,MAAM,UAAU,eAAe,CAAC,UAAgC,EAAE,OAA2B;IAC3F,IAAI,OAA2B,CAAC;IAChC,IAAI,OAAO,GAAW,UAAU,CAAC;IACjC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,IAAI,QAA4B,CAAC;IACjC,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAA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C;QAC3B,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC7B,IAAI,CAAC,QAAQ,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC9I,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;IACnB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poe-platform/safe-bash",
3
- "version": "0.1.639",
3
+ "version": "0.1.641",
4
4
  "description": "Extensible virtual shell with pluggable filesystems and streaming commands",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -356,7 +356,7 @@
356
356
  "access": "public"
357
357
  },
358
358
  "dependencies": {
359
- "@poe-platform/safe-fs": "0.1.639",
359
+ "@poe-platform/safe-fs": "0.1.641",
360
360
  "pako": "3.0.1",
361
361
  "@noble/hashes": "2.4.0",
362
362
  "@types/node": "^25.2.2",