Sign In

@panerelay/agent-browser

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@panerelay/agent-browser - npm Package Compare versions

Comparing version
0.6.0
to
0.7.0
+1
-1
dist/plugin.d.ts.map

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

{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,6BAA6B,EAAG,yBAAkC,CAAC;AAEhF,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,OAAO,6BAA6B,CAAC;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AA2GD,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAuDvF"}
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,6BAA6B,EAAG,yBAAkC,CAAC;AAEhF,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,OAAO,6BAA6B,CAAC;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AA6GD,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CA+DvF"}
import { readLiveBrowserRegistration, readLiveLegacyBrowserRegistration, selectBrowserRegistration, } from '@panerelay/browser-registry';
import { PANERELAY_PROTOCOL_VERSION, } from '@panerelay/protocol';
import { PANERELAY_PROTOCOL_VERSION, PANERELAY_CONVERSATION_TARGET_SESSION_PREFIX, parseConversationTargetSessionName, } from '@panerelay/protocol';
export const AGENT_BROWSER_PLUGIN_PROTOCOL = 'agent-browser.plugin.v1';

@@ -24,3 +24,3 @@ function success(body) {

}
async function createRelaySession(state, request) {
async function createRelaySession(state, request, initialTargetId) {
if (state.capabilities?.cdpRelay === false) {

@@ -43,2 +43,3 @@ throw new Error(`${state.browserName} does not support Panerelay browser automation because its Extension cannot provide a CDP relay`);

},
...(initialTargetId ? { initialTargetId } : {}),
}),

@@ -115,5 +116,13 @@ signal: AbortSignal.timeout(5_000),

try {
const selection = await selectBrowserRegistration();
const state = selection.state;
const session = await createRelaySession(state, input.request);
const label = sessionLabel(input.request);
const target = label ? parseConversationTargetSessionName(label) : undefined;
if (label?.startsWith(PANERELAY_CONVERSATION_TARGET_SESSION_PREFIX) && !target) {
throw new Error('The Panerelay conversation target session is malformed or unsupported');
}
const selection = target ? undefined : await selectBrowserRegistration();
const state = target ? await readLiveBrowserRegistration(target.browserId) : selection.state;
if (!state) {
throw new Error('The Panerelay conversation browser is no longer available');
}
const session = await createRelaySession(state, input.request, target?.targetId);
return success({

@@ -133,3 +142,3 @@ browser: {

browserId: state.browserId,
...(selection.source === 'legacy' ? { legacy: true } : {}),
...(selection?.source === 'legacy' ? { legacy: true } : {}),
sessionId: session.sessionId,

@@ -136,0 +145,0 @@ },

{
"name": "@panerelay/agent-browser",
"version": "0.6.0",
"version": "0.7.0",
"description": "Use agent-browser with current-tab or all-supported-tabs authorization in your existing browser through Panerelay.",

@@ -38,4 +38,4 @@ "type": "module",

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

@@ -42,0 +42,0 @@ "scripts": {

@@ -56,2 +56,4 @@ # `@panerelay/agent-browser`

New Side Panel conversations may inject a reserved `panerelay-tab-v1-...` session value for the originating tab. Use that exact value with `--session` and `--provider panerelay`; the Provider selects the named live browser and orders the already-authorized target as agent-browser's local `t1`. Do not construct the value manually or substitute a similar URL/title when it is unavailable. Ordinary session names keep the existing default-browser and tab-order behavior.
When more than one Panerelay browser is connected, choose one in Extension settings or with the optional administration CLI:

@@ -58,0 +60,0 @@