🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@panerelay/playwright

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@panerelay/playwright - npm Package Compare versions

Comparing version
0.6.0
to
0.7.0
+5
-1
dist/environment.d.ts

@@ -0,1 +1,2 @@

import { type ConversationTargetHint } from '@panerelay/protocol';
export declare const PANERELAY_PLAYWRIGHT_GATEWAY_PATH: "/cdp/playwright";

@@ -7,4 +8,7 @@ export declare const PANERELAY_PLAYWRIGHT_GATEWAY_URL: "http://127.0.0.1:43827/cdp/playwright";

}
export type PlaywrightTargetGatewaySelection = ConversationTargetHint;
export type PlaywrightGatewayRouteSelection = PlaywrightGatewaySelection | PlaywrightTargetGatewaySelection;
export declare function playwrightGatewayUrl(selection?: PlaywrightGatewaySelection): string;
export declare function parsePlaywrightGatewaySelection(pathname: string): PlaywrightGatewaySelection | null | undefined;
export declare function playwrightTargetGatewayUrl(selection: ConversationTargetHint): string;
export declare function parsePlaywrightGatewaySelection(pathname: string): PlaywrightGatewayRouteSelection | null | undefined;
//# sourceMappingURL=environment.d.ts.map
+1
-1

@@ -1,1 +0,1 @@

{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iCAAiC,EAAG,iBAA0B,CAAC;AAC5E,eAAO,MAAM,gCAAgC,yCAC0B,CAAC;AAExE,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAMD,wBAAgB,oBAAoB,CAAC,SAAS,CAAC,EAAE,0BAA0B,GAAG,MAAM,CAInF;AAED,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,MAAM,GACf,0BAA0B,GAAG,IAAI,GAAG,SAAS,CA8B/C"}
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE5F,eAAO,MAAM,iCAAiC,EAAG,iBAA0B,CAAC;AAC5E,eAAO,MAAM,gCAAgC,yCAC0B,CAAC;AAExE,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,gCAAgC,GAAG,sBAAsB,CAAC;AAEtE,MAAM,MAAM,+BAA+B,GACzC,0BAA0B,GAAG,gCAAgC,CAAC;AAMhE,wBAAgB,oBAAoB,CAAC,SAAS,CAAC,EAAE,0BAA0B,GAAG,MAAM,CAInF;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,sBAAsB,GAAG,MAAM,CAKpF;AAED,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,MAAM,GACf,+BAA+B,GAAG,IAAI,GAAG,SAAS,CAwCpD"}

@@ -0,1 +1,2 @@

import { isConversationTargetHint } from '@panerelay/protocol';
export const PANERELAY_PLAYWRIGHT_GATEWAY_PATH = '/cdp/playwright';

@@ -11,2 +12,8 @@ export const PANERELAY_PLAYWRIGHT_GATEWAY_URL = `http://127.0.0.1:43827${PANERELAY_PLAYWRIGHT_GATEWAY_PATH}`;

}
export function playwrightTargetGatewayUrl(selection) {
if (!isConversationTargetHint(selection)) {
throw new Error('Invalid Panerelay Playwright target selection');
}
return `${PANERELAY_PLAYWRIGHT_GATEWAY_URL}/target/${selectionToken(selection)}`;
}
export function parsePlaywrightGatewaySelection(pathname) {

@@ -17,7 +24,13 @@ if (pathname === `${PANERELAY_PLAYWRIGHT_GATEWAY_PATH}/json/version` ||

}
const prefix = `${PANERELAY_PLAYWRIGHT_GATEWAY_PATH}/browser/`;
const browserPrefix = `${PANERELAY_PLAYWRIGHT_GATEWAY_PATH}/browser/`;
const targetPrefix = `${PANERELAY_PLAYWRIGHT_GATEWAY_PATH}/target/`;
const suffix = '/json/version';
const slashSuffix = '/json/version/';
const actualSuffix = pathname.endsWith(slashSuffix) ? slashSuffix : suffix;
if (!pathname.startsWith(prefix) || !pathname.endsWith(actualSuffix))
const prefix = pathname.startsWith(browserPrefix)
? browserPrefix
: pathname.startsWith(targetPrefix)
? targetPrefix
: undefined;
if (!prefix || !pathname.endsWith(actualSuffix))
return null;

@@ -31,4 +44,8 @@ const token = pathname.slice(prefix.length, -actualSuffix.length);

return null;
if (prefix === targetPrefix) {
return isConversationTargetHint(value) ? value : null;
}
const selection = value;
if (typeof selection.browserId !== 'string' ||
if (Object.keys(value).length !== 2 ||
typeof selection.browserId !== 'string' ||
selection.browserId.length === 0 ||

@@ -35,0 +52,0 @@ selection.browserId.length > 128 ||

@@ -26,3 +26,3 @@ #!/usr/bin/env node

export declare function handlePlaywrightAdapterRequest(request: CliAdapterRequest, dependencies?: PlaywrightAdapterDependencies): Promise<CliAdapterResponse>;
export { PANERELAY_PLAYWRIGHT_GATEWAY_PATH, PANERELAY_PLAYWRIGHT_GATEWAY_URL, playwrightGatewayUrl, } from './environment.js';
export { PANERELAY_PLAYWRIGHT_GATEWAY_PATH, PANERELAY_PLAYWRIGHT_GATEWAY_URL, playwrightGatewayUrl, playwrightTargetGatewayUrl, } from './environment.js';
//# sourceMappingURL=index.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAQA,OAAO,EAML,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EAExB,MAAM,qBAAqB,CAAC;AAG7B,eAAO,MAAM,qBAAqB,EAAG,YAAqB,CAAC;AAC3D,eAAO,MAAM,0BAA0B,EAAG,QAAiB,CAAC;AAC5D,eAAO,MAAM,iCAAiC,0CAA2C,CAAC;AAI1F,MAAM,WAAW,sBAAsB;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,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PANERELAY_PLAYWRIGHT_GATEWAY_PATH, PANERELAY_PLAYWRIGHT_GATEWAY_URL, playwrightGatewayUrl, } from './environment.js';
export { PANERELAY_PLAYWRIGHT_GATEWAY_PATH, PANERELAY_PLAYWRIGHT_GATEWAY_URL, playwrightGatewayUrl, playwrightTargetGatewayUrl, } from './environment.js';
function isMainModule() {

@@ -182,0 +182,0 @@ if (!process.argv[1])

{
"name": "@panerelay/playwright",
"version": "0.6.0",
"version": "0.7.0",
"description": "Connect Playwright CLI to current-tab or all-supported-tabs authorization through Panerelay.",

@@ -42,3 +42,3 @@ "type": "module",

"dependencies": {
"@panerelay/protocol": "0.6.0"
"@panerelay/protocol": "0.7.0"
},

@@ -45,0 +45,0 @@ "devDependencies": {

@@ -21,2 +21,4 @@ # `@panerelay/playwright`

New Side Panel conversations may instead inject a reserved `-s=panerelay-tab-v1-...` session and a target-scoped `/cdp/playwright/target/...` attach URL. Use both exact values, then run `tab-list`, `tab-select 0`, and `tab-list` again. Panerelay validates the opaque browser/target pair against the current authorized inventory and exposes that page first without changing Playwright CLI. A stale or unauthorized target fails closed; do not retry through the unscoped URL or match URL/title.
The setup package verifies the upstream executable and installs only Panerelay-owned adapter metadata. It does not install a shim, modify `PATH` or shell startup files, write `.playwright/cli.config.json`, set Playwright as a default, or manage an Agent Skill. The independently installed `panerelay-browser` Skill contains the Playwright workflow.

@@ -23,0 +25,0 @@