diff --git a/.changeset/config.json b/.changeset/config.json index d88011f..2be13d4 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -4,7 +4,7 @@ "commit": false, "fixed": [], "linked": [], - "access": "restricted", + "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", "ignore": [] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91f51c9..efbef5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,20 +16,23 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.12.4 - name: Setup Node uses: actions/setup-node@v4 with: node-version: 20 cache: 'pnpm' - - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 + registry-url: 'https://registry.npmjs.org' - name: Install deps run: pnpm install --frozen-lockfile + - name: Build + run: pnpm build + - name: Create Release PR or Publish uses: changesets/action@v1 with: @@ -38,5 +41,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/src/tools/session.ts b/src/tools/session.ts index 25048ab..680b518 100644 --- a/src/tools/session.ts +++ b/src/tools/session.ts @@ -83,14 +83,21 @@ async function handleCreateSession( const bb = new Browserbase({ apiKey: config.browserbaseApiKey, }); - const debugUrl = (await bb.sessions.debug(session.sessionId)) + + const browserbaseSessionId = session.stagehand.browserbaseSessionID; + if (!browserbaseSessionId) { + throw new Error( + "Browserbase session ID not found in Stagehand instance", + ); + } + const debugUrl = (await bb.sessions.debug(browserbaseSessionId)) .debuggerFullscreenUrl; process.stderr.write( - `[tool.connected] Successfully connected to Browserbase session. Internal ID: ${targetSessionId}, Actual ID: ${session.sessionId}`, + `[tool.connected] Successfully connected to Browserbase session. Internal ID: ${targetSessionId}, Actual ID: ${browserbaseSessionId}`, ); process.stderr.write( - `[SessionManager] Browserbase Live Session View URL: https://www.browserbase.com/sessions/${session.sessionId}`, + `[SessionManager] Browserbase Live Session View URL: https://www.browserbase.com/sessions/${browserbaseSessionId}`, ); process.stderr.write( @@ -101,7 +108,7 @@ async function handleCreateSession( content: [ { type: "text", - text: `Browserbase Live Session View URL: https://www.browserbase.com/sessions/${session.sessionId}`, + text: `Browserbase Live Session View URL: https://www.browserbase.com/sessions/${browserbaseSessionId}`, }, { type: "text",