Skip to content

Commit 340dd58

Browse files
authored
fix: make the release github action work (#115)
* installing pnpm instead of relying on cache * release fixes * session id fix
1 parent 6b2b4d3 commit 340dd58

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"commit": false,
55
"fixed": [],
66
"linked": [],
7-
"access": "restricted",
7+
"access": "public",
88
"baseBranch": "main",
99
"updateInternalDependencies": "patch",
1010
"ignore": []

.github/workflows/release.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,23 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v4
1818

19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v4
21+
with:
22+
version: 10.12.4
1923
- name: Setup Node
2024
uses: actions/setup-node@v4
2125
with:
2226
node-version: 20
2327
cache: 'pnpm'
24-
25-
- name: Setup pnpm
26-
uses: pnpm/action-setup@v4
27-
with:
28-
version: 10
28+
registry-url: 'https://registry.npmjs.org'
2929

3030
- name: Install deps
3131
run: pnpm install --frozen-lockfile
3232

33+
- name: Build
34+
run: pnpm build
35+
3336
- name: Create Release PR or Publish
3437
uses: changesets/action@v1
3538
with:
@@ -38,5 +41,4 @@ jobs:
3841
env:
3942
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4043
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41-
42-
44+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

src/tools/session.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,21 @@ async function handleCreateSession(
8383
const bb = new Browserbase({
8484
apiKey: config.browserbaseApiKey,
8585
});
86-
const debugUrl = (await bb.sessions.debug(session.sessionId))
86+
87+
const browserbaseSessionId = session.stagehand.browserbaseSessionID;
88+
if (!browserbaseSessionId) {
89+
throw new Error(
90+
"Browserbase session ID not found in Stagehand instance",
91+
);
92+
}
93+
const debugUrl = (await bb.sessions.debug(browserbaseSessionId))
8794
.debuggerFullscreenUrl;
8895
process.stderr.write(
89-
`[tool.connected] Successfully connected to Browserbase session. Internal ID: ${targetSessionId}, Actual ID: ${session.sessionId}`,
96+
`[tool.connected] Successfully connected to Browserbase session. Internal ID: ${targetSessionId}, Actual ID: ${browserbaseSessionId}`,
9097
);
9198

9299
process.stderr.write(
93-
`[SessionManager] Browserbase Live Session View URL: https://www.browserbase.com/sessions/${session.sessionId}`,
100+
`[SessionManager] Browserbase Live Session View URL: https://www.browserbase.com/sessions/${browserbaseSessionId}`,
94101
);
95102

96103
process.stderr.write(
@@ -101,7 +108,7 @@ async function handleCreateSession(
101108
content: [
102109
{
103110
type: "text",
104-
text: `Browserbase Live Session View URL: https://www.browserbase.com/sessions/${session.sessionId}`,
111+
text: `Browserbase Live Session View URL: https://www.browserbase.com/sessions/${browserbaseSessionId}`,
105112
},
106113
{
107114
type: "text",

0 commit comments

Comments
 (0)