Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -38,5 +41,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}


NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
15 changes: 11 additions & 4 deletions src/tools/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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",
Expand Down