Skip to content

Commit c79c87c

Browse files
authored
[STG-2002] feat: migrate Convex Stagehand package (#73)
* feat: migrate convex stagehand package * fix: use trusted publishing compatible node * chore: label release node version
1 parent 3f98fc6 commit c79c87c

34 files changed

Lines changed: 10057 additions & 0 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@browserbasehq/convex-stagehand": patch
3+
---
4+
5+
Migrate the Convex Stagehand package into the integrations monorepo.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"trailingComma": "all"
3+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# @browserbasehq/convex-stagehand
2+
3+
## 0.1.0
4+
5+
### Minor Changes
6+
7+
- [#11](https://github.com/browserbase/convex-stagehand/pull/11) [`ae8018e`](https://github.com/browserbase/convex-stagehand/commit/ae8018ef9188fff6bc221cc538fd2b832ec59c7d) Thanks [@shrey150](https://github.com/shrey150)! - Fix region handling for Stagehand sessions by persisting session region metadata and routing follow-up API calls to the correct regional Stagehand endpoint.
8+
- Store `region` on session metadata and resolve region internally for `extract`, `act`, `observe`, `agent`, and `endSession`.
9+
- Retry once on region-mismatch errors by parsing the returned region and updating metadata.
10+
- Keep operation request payloads aligned with Stagehand API docs (region is not sent in operation bodies).
11+
- Tighten internal TypeScript typing for region-aware API routing.
12+
13+
## 0.0.3
14+
15+
### Patch Changes
16+
17+
- [#9](https://github.com/browserbase/convex-stagehand/pull/9) [`32b6e70`](https://github.com/browserbase/convex-stagehand/commit/32b6e705e534984935a231857810d98e1f89f97a) Thanks [@victlue](https://github.com/victlue)! - Strictly type BrowserbaseSessionCreateParams to match the Stagehand API spec, removing index signature backdoors
18+
19+
## 0.0.2
20+
21+
### Patch Changes
22+
23+
- [#7](https://github.com/browserbase/convex-stagehand/pull/7) [`3ab9545`](https://github.com/browserbase/convex-stagehand/commit/3ab95452b00bd331ab170c26e0abc9888a099be9) Thanks [@shrey150](https://github.com/shrey150)! - Fix agent endpoint URL typo causing 404 errors. The agentExecute function was calling `/sessions/{id}/agent/execute` but the correct Stagehand API endpoint is `/sessions/{id}/agentExecute`. This fixes the `stagehand.agent()` function which was previously broken.
24+
25+
- [#3](https://github.com/browserbase/convex-stagehand/pull/3) [`14db9a8`](https://github.com/browserbase/convex-stagehand/commit/14db9a81c53d02300adbd0d19454c1c85fee9e1e) Thanks [@shrey150](https://github.com/shrey150)! - Fix ComponentApi type to eliminate type assertion requirement. The ComponentApi type now correctly specifies "internal" visibility for component functions, matching the types generated for consumers. Users no longer need to use `as unknown as ComponentApi` type assertion when initializing the Stagehand client.
26+
27+
**Before:**
28+
29+
```typescript
30+
const stagehand = new Stagehand(components.stagehand as unknown as ComponentApi, { ... });
31+
```
32+
33+
**After:**
34+
35+
```typescript
36+
const stagehand = new Stagehand(components.stagehand, { ... });
37+
```

packages/convex-stagehand/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Browserbase Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)