@kana-ai/edgar-ext-browserbase 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +114 -2
  3. package/dist/src/api/client.d.ts +17 -0
  4. package/dist/src/api/client.js +40 -0
  5. package/dist/src/api/failures.d.ts +10 -0
  6. package/dist/src/api/failures.js +36 -0
  7. package/dist/src/index.d.ts +93 -0
  8. package/dist/src/index.js +16 -0
  9. package/dist/src/schemas/browserbase.d.ts +83 -0
  10. package/dist/src/schemas/browserbase.js +46 -0
  11. package/dist/src/schemas/config.d.ts +20 -0
  12. package/dist/src/schemas/config.js +10 -0
  13. package/dist/src/schemas/tools.d.ts +148 -0
  14. package/dist/src/schemas/tools.js +76 -0
  15. package/dist/src/tools/contexts.d.ts +14 -0
  16. package/dist/src/tools/contexts.js +35 -0
  17. package/dist/src/tools/evidence.d.ts +37 -0
  18. package/dist/src/tools/evidence.js +70 -0
  19. package/dist/src/tools/sessions.d.ts +60 -0
  20. package/dist/src/tools/sessions.js +110 -0
  21. package/edgar-extension.json +129 -0
  22. package/package.json +41 -3
  23. package/schemas/config.json +25 -0
  24. package/schemas/create_context.in.json +10 -0
  25. package/schemas/create_context.out.json +10 -0
  26. package/schemas/create_session.in.json +24 -0
  27. package/schemas/create_session.out.json +19 -0
  28. package/schemas/delete_context.in.json +11 -0
  29. package/schemas/delete_context.out.json +13 -0
  30. package/schemas/end_session.in.json +11 -0
  31. package/schemas/end_session.out.json +26 -0
  32. package/schemas/list_sessions.in.json +10 -0
  33. package/schemas/list_sessions.out.json +35 -0
  34. package/schemas/session_downloads.in.json +11 -0
  35. package/schemas/session_downloads.out.json +33 -0
  36. package/schemas/session_logs.in.json +11 -0
  37. package/schemas/session_logs.out.json +32 -0
  38. package/schemas/session_replay.in.json +11 -0
  39. package/schemas/session_replay.out.json +35 -0
  40. package/schemas/session_state.in.json +11 -0
  41. package/schemas/session_state.out.json +26 -0
@@ -0,0 +1,129 @@
1
+ {
2
+ "contract": 1,
3
+ "name": "browserbase",
4
+ "version": "0.1.1",
5
+ "config_schema": "schemas/config.json",
6
+ "secrets": [
7
+ {
8
+ "name": "BROWSERBASE_API_KEY",
9
+ "hosts": ["api.browserbase.com"]
10
+ },
11
+ {
12
+ "name": "BROWSERBASE_PROJECT_ID",
13
+ "hosts": ["api.browserbase.com"]
14
+ }
15
+ ],
16
+ "capabilities": ["network:api.browserbase.com", "sandbox:write"],
17
+ "tools": [
18
+ {
19
+ "name": "create_session",
20
+ "description": "Start a cloud browser session; write its CDP URL, which grants the browser, to the sandbox file `connect_url_file`, and return its live view URL",
21
+ "input_schema": "schemas/create_session.in.json",
22
+ "output_schema": "schemas/create_session.out.json",
23
+ "secrets": ["BROWSERBASE_API_KEY", "BROWSERBASE_PROJECT_ID"],
24
+ "capabilities": ["network:api.browserbase.com", "sandbox:write"],
25
+ "side_effect": true,
26
+ "undo": "none",
27
+ "undo_reason": "a session ends by itself at its timeout, and end_session releases it sooner; the minute it ran is billed",
28
+ "approval": "never",
29
+ "disabled": false
30
+ },
31
+ {
32
+ "name": "session_state",
33
+ "description": "Read the status and the times of a browser session",
34
+ "input_schema": "schemas/session_state.in.json",
35
+ "output_schema": "schemas/session_state.out.json",
36
+ "secrets": ["BROWSERBASE_API_KEY", "BROWSERBASE_PROJECT_ID"],
37
+ "capabilities": ["network:api.browserbase.com"],
38
+ "side_effect": false,
39
+ "approval": "never",
40
+ "disabled": false
41
+ },
42
+ {
43
+ "name": "end_session",
44
+ "description": "End a browser session now; a session that already ended keeps its status",
45
+ "input_schema": "schemas/end_session.in.json",
46
+ "output_schema": "schemas/end_session.out.json",
47
+ "secrets": ["BROWSERBASE_API_KEY", "BROWSERBASE_PROJECT_ID"],
48
+ "capabilities": ["network:api.browserbase.com"],
49
+ "side_effect": false,
50
+ "approval": "never",
51
+ "disabled": false
52
+ },
53
+ {
54
+ "name": "list_sessions",
55
+ "description": "List the project's browser sessions, of one status when given, in one page",
56
+ "input_schema": "schemas/list_sessions.in.json",
57
+ "output_schema": "schemas/list_sessions.out.json",
58
+ "secrets": ["BROWSERBASE_API_KEY", "BROWSERBASE_PROJECT_ID"],
59
+ "capabilities": ["network:api.browserbase.com"],
60
+ "side_effect": false,
61
+ "approval": "never",
62
+ "disabled": false
63
+ },
64
+ {
65
+ "name": "session_logs",
66
+ "description": "Read the CDP log of a session: the count and the first 200 methods",
67
+ "input_schema": "schemas/session_logs.in.json",
68
+ "output_schema": "schemas/session_logs.out.json",
69
+ "secrets": ["BROWSERBASE_API_KEY", "BROWSERBASE_PROJECT_ID"],
70
+ "capabilities": ["network:api.browserbase.com"],
71
+ "side_effect": false,
72
+ "approval": "never",
73
+ "disabled": false
74
+ },
75
+ {
76
+ "name": "session_replay",
77
+ "description": "Read the replay pages of a session, each with its HLS playlist URL, and the URL of the replay in the dashboard",
78
+ "input_schema": "schemas/session_replay.in.json",
79
+ "output_schema": "schemas/session_replay.out.json",
80
+ "secrets": ["BROWSERBASE_API_KEY", "BROWSERBASE_PROJECT_ID"],
81
+ "capabilities": ["network:api.browserbase.com"],
82
+ "side_effect": false,
83
+ "approval": "never",
84
+ "disabled": false
85
+ },
86
+ {
87
+ "name": "session_downloads",
88
+ "description": "List the files a session downloaded, up to 100",
89
+ "input_schema": "schemas/session_downloads.in.json",
90
+ "output_schema": "schemas/session_downloads.out.json",
91
+ "secrets": ["BROWSERBASE_API_KEY", "BROWSERBASE_PROJECT_ID"],
92
+ "capabilities": ["network:api.browserbase.com"],
93
+ "side_effect": false,
94
+ "approval": "never",
95
+ "disabled": false
96
+ },
97
+ {
98
+ "name": "create_context",
99
+ "description": "Create an empty context that sessions can sign in to and keep across runs",
100
+ "input_schema": "schemas/create_context.in.json",
101
+ "output_schema": "schemas/create_context.out.json",
102
+ "secrets": ["BROWSERBASE_API_KEY", "BROWSERBASE_PROJECT_ID"],
103
+ "capabilities": ["network:api.browserbase.com"],
104
+ "side_effect": false,
105
+ "approval": "never",
106
+ "disabled": false
107
+ },
108
+ {
109
+ "name": "delete_context",
110
+ "description": "Delete a context with its cookies and storage",
111
+ "input_schema": "schemas/delete_context.in.json",
112
+ "output_schema": "schemas/delete_context.out.json",
113
+ "secrets": ["BROWSERBASE_API_KEY", "BROWSERBASE_PROJECT_ID"],
114
+ "capabilities": ["network:api.browserbase.com"],
115
+ "side_effect": true,
116
+ "undo": "none",
117
+ "undo_reason": "a deleted context's cookies and storage are gone; a person signs in again",
118
+ "approval": "never",
119
+ "disabled": false
120
+ }
121
+ ],
122
+ "webhooks": [],
123
+ "workflows": [],
124
+ "roles": [],
125
+ "skills": [],
126
+ "tracker": null,
127
+ "environments": [],
128
+ "hooks": []
129
+ }
package/package.json CHANGED
@@ -1,6 +1,44 @@
1
1
  {
2
2
  "name": "@kana-ai/edgar-ext-browserbase",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.1",
4
+ "description": "EDGAR extension for Browserbase: start, watch and end cloud browser sessions, and read their evidence.",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/kana-ai/edgar",
9
+ "directory": "packages/extensions/ext-browserbase"
10
+ },
11
+ "files": [
12
+ "dist/src",
13
+ "edgar-extension.json",
14
+ "schemas"
15
+ ],
16
+ "type": "module",
17
+ "imports": {
18
+ "#*": "./dist/src/*.js"
19
+ },
20
+ "exports": {
21
+ ".": "./dist/src/index.js"
22
+ },
23
+ "dependencies": {
24
+ "@kana-ai/edgar-sdk": "0.1.1",
25
+ "zod": "4.6.7"
26
+ },
27
+ "devDependencies": {
28
+ "@kana-ai/edgar-contracts": "0.1.1",
29
+ "@types/node": "24.19.2",
30
+ "ajv": "8.20.0",
31
+ "oxfmt": "0.76.0",
32
+ "oxlint": "1.91.0",
33
+ "oxlint-tsgolint": "7.0.2005",
34
+ "typescript": "7.0.2",
35
+ "undici": "7.30.2"
36
+ },
37
+ "scripts": {
38
+ "build": "edgar-extension-build src/index.ts",
39
+ "check-types": "tsc --noEmit",
40
+ "lint": "oxlint --type-aware --deny-warnings",
41
+ "format:check": "oxfmt --check",
42
+ "test": "node --test"
43
+ }
6
44
  }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "timeout_seconds": {
6
+ "default": 300,
7
+ "type": "integer",
8
+ "minimum": 60,
9
+ "maximum": 21600
10
+ },
11
+ "keep_alive": {
12
+ "default": false,
13
+ "type": "boolean"
14
+ },
15
+ "record": {
16
+ "default": true,
17
+ "type": "boolean"
18
+ },
19
+ "region": {
20
+ "type": "string",
21
+ "enum": ["us-west-2", "us-east-1", "eu-central-1", "ap-southeast-1"]
22
+ }
23
+ },
24
+ "additionalProperties": false
25
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "name": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "context_id": {
6
+ "type": "string"
7
+ }
8
+ },
9
+ "required": ["context_id"]
10
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "context_id": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "keep_alive": {
10
+ "type": "boolean"
11
+ },
12
+ "timeout_seconds": {
13
+ "type": "integer",
14
+ "minimum": 60,
15
+ "maximum": 21600
16
+ },
17
+ "record": {
18
+ "type": "boolean"
19
+ },
20
+ "proxies": {
21
+ "type": "boolean"
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "session_id": {
6
+ "type": "string"
7
+ },
8
+ "connect_url_file": {
9
+ "type": ["string", "null"]
10
+ },
11
+ "live_view_url": {
12
+ "type": ["string", "null"]
13
+ },
14
+ "expires_at": {
15
+ "type": "string"
16
+ }
17
+ },
18
+ "required": ["session_id", "connect_url_file", "live_view_url", "expires_at"]
19
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "context_id": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ }
9
+ },
10
+ "required": ["context_id"]
11
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "context_id": {
6
+ "type": "string"
7
+ },
8
+ "deleted": {
9
+ "type": "boolean"
10
+ }
11
+ },
12
+ "required": ["context_id", "deleted"]
13
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "session_id": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ }
9
+ },
10
+ "required": ["session_id"]
11
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "session_id": {
6
+ "type": "string"
7
+ },
8
+ "status": {
9
+ "type": "string",
10
+ "enum": ["PENDING", "RUNNING", "ERROR", "TIMED_OUT", "COMPLETED"]
11
+ },
12
+ "started_at": {
13
+ "type": "string"
14
+ },
15
+ "ended_at": {
16
+ "type": ["string", "null"]
17
+ },
18
+ "expires_at": {
19
+ "type": "string"
20
+ },
21
+ "context_id": {
22
+ "type": ["string", "null"]
23
+ }
24
+ },
25
+ "required": ["session_id", "status", "started_at", "ended_at", "expires_at", "context_id"]
26
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "status": {
6
+ "type": "string",
7
+ "enum": ["PENDING", "RUNNING", "ERROR", "TIMED_OUT", "COMPLETED"]
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "sessions": {
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "properties": {
10
+ "session_id": {
11
+ "type": "string"
12
+ },
13
+ "status": {
14
+ "type": "string",
15
+ "enum": ["PENDING", "RUNNING", "ERROR", "TIMED_OUT", "COMPLETED"]
16
+ },
17
+ "started_at": {
18
+ "type": "string"
19
+ },
20
+ "ended_at": {
21
+ "type": ["string", "null"]
22
+ },
23
+ "expires_at": {
24
+ "type": "string"
25
+ },
26
+ "context_id": {
27
+ "type": ["string", "null"]
28
+ }
29
+ },
30
+ "required": ["session_id", "status", "started_at", "ended_at", "expires_at", "context_id"]
31
+ }
32
+ }
33
+ },
34
+ "required": ["sessions"]
35
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "session_id": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ }
9
+ },
10
+ "required": ["session_id"]
11
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "total": {
6
+ "type": "integer",
7
+ "minimum": -9007199254740991,
8
+ "maximum": 9007199254740991
9
+ },
10
+ "downloads": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "object",
14
+ "properties": {
15
+ "id": {
16
+ "type": "string"
17
+ },
18
+ "filename": {
19
+ "type": "string"
20
+ },
21
+ "mime_type": {
22
+ "type": "string"
23
+ },
24
+ "size": {
25
+ "type": "number"
26
+ }
27
+ },
28
+ "required": ["id", "filename", "mime_type", "size"]
29
+ }
30
+ }
31
+ },
32
+ "required": ["total", "downloads"]
33
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "session_id": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ }
9
+ },
10
+ "required": ["session_id"]
11
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "count": {
6
+ "type": "integer",
7
+ "minimum": -9007199254740991,
8
+ "maximum": 9007199254740991
9
+ },
10
+ "logs": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "object",
14
+ "properties": {
15
+ "method": {
16
+ "type": "string"
17
+ },
18
+ "page_id": {
19
+ "type": "integer",
20
+ "minimum": -9007199254740991,
21
+ "maximum": 9007199254740991
22
+ },
23
+ "timestamp": {
24
+ "type": ["number", "null"]
25
+ }
26
+ },
27
+ "required": ["method", "page_id", "timestamp"]
28
+ }
29
+ }
30
+ },
31
+ "required": ["count", "logs"]
32
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "session_id": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ }
9
+ },
10
+ "required": ["session_id"]
11
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "url": {
6
+ "type": "string"
7
+ },
8
+ "pages": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "object",
12
+ "properties": {
13
+ "page_id": {
14
+ "type": "string"
15
+ },
16
+ "url": {
17
+ "type": "string"
18
+ },
19
+ "start_ms": {
20
+ "type": "integer",
21
+ "minimum": -9007199254740991,
22
+ "maximum": 9007199254740991
23
+ },
24
+ "end_ms": {
25
+ "type": "integer",
26
+ "minimum": -9007199254740991,
27
+ "maximum": 9007199254740991
28
+ }
29
+ },
30
+ "required": ["page_id", "url", "start_ms", "end_ms"]
31
+ }
32
+ }
33
+ },
34
+ "required": ["url", "pages"]
35
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "session_id": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ }
9
+ },
10
+ "required": ["session_id"]
11
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "session_id": {
6
+ "type": "string"
7
+ },
8
+ "status": {
9
+ "type": "string",
10
+ "enum": ["PENDING", "RUNNING", "ERROR", "TIMED_OUT", "COMPLETED"]
11
+ },
12
+ "started_at": {
13
+ "type": "string"
14
+ },
15
+ "ended_at": {
16
+ "type": ["string", "null"]
17
+ },
18
+ "expires_at": {
19
+ "type": "string"
20
+ },
21
+ "context_id": {
22
+ "type": ["string", "null"]
23
+ }
24
+ },
25
+ "required": ["session_id", "status", "started_at", "ended_at", "expires_at", "context_id"]
26
+ }