@b3os/sdk 0.1.0 → 0.1.3
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.
- package/README.md +171 -42
- package/dist/cjs/core/bytes.d.ts +30 -0
- package/dist/cjs/core/bytes.js +115 -0
- package/dist/cjs/core/bytes.js.map +1 -0
- package/dist/cjs/core/client.d.ts +61 -3
- package/dist/cjs/core/client.js +211 -33
- package/dist/cjs/core/client.js.map +1 -1
- package/dist/cjs/core/errors.d.ts +16 -4
- package/dist/cjs/core/errors.js +9 -6
- package/dist/cjs/core/errors.js.map +1 -1
- package/dist/cjs/core/handle.d.ts +31 -0
- package/dist/cjs/core/handle.js +86 -0
- package/dist/cjs/core/handle.js.map +1 -0
- package/dist/cjs/core/index.d.ts +6 -4
- package/dist/cjs/core/index.js +8 -1
- package/dist/cjs/core/index.js.map +1 -1
- package/dist/cjs/core/login.d.ts +24 -0
- package/dist/cjs/core/login.js +93 -0
- package/dist/cjs/core/login.js.map +1 -0
- package/dist/cjs/core/namespace.d.ts +1 -1
- package/dist/cjs/core/namespace.js +1 -1
- package/dist/cjs/core/op.d.ts +11 -1
- package/dist/cjs/core/timing.d.ts +1 -1
- package/dist/cjs/core/timing.js +8 -1
- package/dist/cjs/core/timing.js.map +1 -1
- package/dist/cjs/core/transport.js +1 -1
- package/dist/cjs/core/transport.js.map +1 -1
- package/dist/cjs/core/util.d.ts +15 -3
- package/dist/cjs/core/util.js +54 -2
- package/dist/cjs/core/util.js.map +1 -1
- package/dist/cjs/core/ws.d.ts +4 -0
- package/dist/cjs/core/ws.js +7 -4
- package/dist/cjs/core/ws.js.map +1 -1
- package/dist/cjs/generated/client.d.ts +2 -2
- package/dist/cjs/generated/client.js +2 -2
- package/dist/cjs/generated/errors.d.ts +1 -1
- package/dist/cjs/generated/errors.js +30 -0
- package/dist/cjs/generated/errors.js.map +1 -1
- package/dist/cjs/generated/jobs.js +1 -1
- package/dist/cjs/generated/ns/actions.d.ts +48 -6
- package/dist/cjs/generated/ns/actions.js +59 -6
- package/dist/cjs/generated/ns/actions.js.map +1 -1
- package/dist/cjs/generated/ns/infer.d.ts +185 -54
- package/dist/cjs/generated/ns/infer.js +28 -74
- package/dist/cjs/generated/ns/infer.js.map +1 -1
- package/dist/cjs/generated/ns/keys.d.ts +12 -0
- package/dist/cjs/generated/ns/keys.js +22 -0
- package/dist/cjs/generated/ns/keys.js.map +1 -1
- package/dist/cjs/generated/ns/render.d.ts +95 -6
- package/dist/cjs/generated/ns/render.js +124 -7
- package/dist/cjs/generated/ns/render.js.map +1 -1
- package/dist/cjs/generated/ns/requests.d.ts +3 -1
- package/dist/cjs/generated/ns/requests.js +3 -1
- package/dist/cjs/generated/ns/requests.js.map +1 -1
- package/dist/cjs/generated/ns/routines.d.ts +131 -9
- package/dist/cjs/generated/ns/routines.js +186 -9
- package/dist/cjs/generated/ns/routines.js.map +1 -1
- package/dist/cjs/generated/ns/sandboxes.d.ts +298 -31
- package/dist/cjs/generated/ns/sandboxes.js +368 -29
- package/dist/cjs/generated/ns/sandboxes.js.map +1 -1
- package/dist/cjs/generated/ns/vision.d.ts +133 -14
- package/dist/cjs/generated/ns/vision.js +158 -12
- package/dist/cjs/generated/ns/vision.js.map +1 -1
- package/dist/cjs/generated/ns/webhooks.d.ts +8 -5
- package/dist/cjs/generated/ns/webhooks.js +8 -5
- package/dist/cjs/generated/ns/webhooks.js.map +1 -1
- package/dist/cjs/generated/types.d.ts +1956 -301
- package/dist/cjs/helpers/agents.d.ts +95 -0
- package/dist/cjs/helpers/agents.js +205 -0
- package/dist/cjs/helpers/agents.js.map +1 -0
- package/dist/cjs/helpers/render.d.ts +15 -0
- package/dist/cjs/helpers/render.js +74 -0
- package/dist/cjs/helpers/render.js.map +1 -0
- package/dist/cjs/helpers/routines.d.ts +61 -0
- package/dist/cjs/helpers/routines.js +234 -0
- package/dist/cjs/helpers/routines.js.map +1 -0
- package/dist/cjs/helpers/sandboxes.d.ts +237 -0
- package/dist/cjs/helpers/sandboxes.js +608 -0
- package/dist/cjs/helpers/sandboxes.js.map +1 -0
- package/dist/cjs/index.d.ts +4 -1
- package/dist/cjs/index.js +8 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/routines.d.ts +1 -0
- package/dist/cjs/routines.js +21 -0
- package/dist/cjs/routines.js.map +1 -0
- package/dist/cjs/webhooks.js.map +1 -1
- package/dist/esm/core/bytes.d.ts +30 -0
- package/dist/esm/core/bytes.js +111 -0
- package/dist/esm/core/bytes.js.map +1 -0
- package/dist/esm/core/client.d.ts +61 -3
- package/dist/esm/core/client.js +208 -31
- package/dist/esm/core/client.js.map +1 -1
- package/dist/esm/core/errors.d.ts +16 -4
- package/dist/esm/core/errors.js +9 -6
- package/dist/esm/core/errors.js.map +1 -1
- package/dist/esm/core/handle.d.ts +31 -0
- package/dist/esm/core/handle.js +82 -0
- package/dist/esm/core/handle.js.map +1 -0
- package/dist/esm/core/index.d.ts +6 -4
- package/dist/esm/core/index.js +4 -2
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/core/login.d.ts +24 -0
- package/dist/esm/core/login.js +85 -0
- package/dist/esm/core/login.js.map +1 -0
- package/dist/esm/core/namespace.d.ts +1 -1
- package/dist/esm/core/namespace.js +1 -1
- package/dist/esm/core/op.d.ts +11 -1
- package/dist/esm/core/timing.d.ts +1 -1
- package/dist/esm/core/timing.js +8 -1
- package/dist/esm/core/timing.js.map +1 -1
- package/dist/esm/core/transport.js +1 -1
- package/dist/esm/core/transport.js.map +1 -1
- package/dist/esm/core/util.d.ts +15 -3
- package/dist/esm/core/util.js +48 -1
- package/dist/esm/core/util.js.map +1 -1
- package/dist/esm/core/ws.d.ts +4 -0
- package/dist/esm/core/ws.js +7 -4
- package/dist/esm/core/ws.js.map +1 -1
- package/dist/esm/generated/client.d.ts +2 -2
- package/dist/esm/generated/client.js +2 -2
- package/dist/esm/generated/errors.d.ts +1 -1
- package/dist/esm/generated/errors.js +30 -0
- package/dist/esm/generated/errors.js.map +1 -1
- package/dist/esm/generated/jobs.js +1 -1
- package/dist/esm/generated/ns/actions.d.ts +48 -6
- package/dist/esm/generated/ns/actions.js +59 -6
- package/dist/esm/generated/ns/actions.js.map +1 -1
- package/dist/esm/generated/ns/infer.d.ts +185 -54
- package/dist/esm/generated/ns/infer.js +28 -74
- package/dist/esm/generated/ns/infer.js.map +1 -1
- package/dist/esm/generated/ns/keys.d.ts +12 -0
- package/dist/esm/generated/ns/keys.js +22 -0
- package/dist/esm/generated/ns/keys.js.map +1 -1
- package/dist/esm/generated/ns/render.d.ts +95 -6
- package/dist/esm/generated/ns/render.js +124 -7
- package/dist/esm/generated/ns/render.js.map +1 -1
- package/dist/esm/generated/ns/requests.d.ts +3 -1
- package/dist/esm/generated/ns/requests.js +3 -1
- package/dist/esm/generated/ns/requests.js.map +1 -1
- package/dist/esm/generated/ns/routines.d.ts +131 -9
- package/dist/esm/generated/ns/routines.js +186 -9
- package/dist/esm/generated/ns/routines.js.map +1 -1
- package/dist/esm/generated/ns/sandboxes.d.ts +298 -31
- package/dist/esm/generated/ns/sandboxes.js +368 -29
- package/dist/esm/generated/ns/sandboxes.js.map +1 -1
- package/dist/esm/generated/ns/vision.d.ts +133 -14
- package/dist/esm/generated/ns/vision.js +158 -12
- package/dist/esm/generated/ns/vision.js.map +1 -1
- package/dist/esm/generated/ns/webhooks.d.ts +8 -5
- package/dist/esm/generated/ns/webhooks.js +8 -5
- package/dist/esm/generated/ns/webhooks.js.map +1 -1
- package/dist/esm/generated/types.d.ts +1956 -301
- package/dist/esm/helpers/agents.d.ts +95 -0
- package/dist/esm/helpers/agents.js +199 -0
- package/dist/esm/helpers/agents.js.map +1 -0
- package/dist/esm/helpers/render.d.ts +15 -0
- package/dist/esm/helpers/render.js +70 -0
- package/dist/esm/helpers/render.js.map +1 -0
- package/dist/esm/helpers/routines.d.ts +61 -0
- package/dist/esm/helpers/routines.js +226 -0
- package/dist/esm/helpers/routines.js.map +1 -0
- package/dist/esm/helpers/sandboxes.d.ts +237 -0
- package/dist/esm/helpers/sandboxes.js +600 -0
- package/dist/esm/helpers/sandboxes.js.map +1 -0
- package/dist/esm/index.d.ts +4 -1
- package/dist/esm/index.js +6 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routines.d.ts +1 -0
- package/dist/esm/routines.js +5 -0
- package/dist/esm/routines.js.map +1 -0
- package/dist/esm/webhooks.js.map +1 -1
- package/package.json +14 -3
- package/src/core/bytes.ts +112 -0
- package/src/core/client.ts +253 -33
- package/src/core/errors.ts +27 -10
- package/src/core/handle.ts +97 -0
- package/src/core/index.ts +7 -2
- package/src/core/login.ts +98 -0
- package/src/core/namespace.ts +1 -1
- package/src/core/op.ts +11 -1
- package/src/core/timing.ts +7 -2
- package/src/core/transport.ts +1 -1
- package/src/core/util.ts +53 -3
- package/src/core/ws.ts +11 -4
- package/src/generated/client.ts +2 -2
- package/src/generated/errors.ts +60 -0
- package/src/generated/jobs.ts +1 -1
- package/src/generated/ns/actions.ts +69 -6
- package/src/generated/ns/infer.ts +229 -61
- package/src/generated/ns/keys.ts +23 -0
- package/src/generated/ns/render.ts +152 -7
- package/src/generated/ns/requests.ts +3 -1
- package/src/generated/ns/routines.ts +205 -9
- package/src/generated/ns/sandboxes.ts +434 -34
- package/src/generated/ns/vision.ts +168 -14
- package/src/generated/ns/webhooks.ts +8 -5
- package/src/generated/types.ts +2211 -422
- package/src/helpers/agents.ts +300 -0
- package/src/helpers/render.ts +91 -0
- package/src/helpers/routines.ts +278 -0
- package/src/helpers/sandboxes.ts +788 -0
- package/src/index.ts +29 -5
- package/src/routines.ts +5 -0
- package/src/webhooks.ts +5 -1
package/src/generated/errors.ts
CHANGED
|
@@ -11,12 +11,16 @@ export const ERROR_CATALOG: Readonly<Record<string, readonly [status: number, re
|
|
|
11
11
|
not_acceptable: [406, 0, "Not acceptable"],
|
|
12
12
|
payload_too_large: [413, 0, "Payload too large"],
|
|
13
13
|
route_not_found: [404, 0, "Route not found"],
|
|
14
|
+
feature_not_enabled: [404, 0, "Feature not enabled"],
|
|
14
15
|
method_not_allowed: [405, 0, "Method not allowed"],
|
|
15
16
|
edge_only: [421, 0, "Served by beta-api.b3os.org"],
|
|
16
17
|
limit_exceeded: [422, 0, "Limit exceeded"],
|
|
18
|
+
option_not_allowed: [422, 0, "Option not allowed"],
|
|
17
19
|
idempotency_key_invalid: [400, 0, "Invalid idempotency key"],
|
|
18
20
|
idempotency_key_conflict: [409, 0, "Idempotency key conflict"],
|
|
19
21
|
idempotency_request_in_progress: [409, 1, "Request in progress"],
|
|
22
|
+
idempotency_response_evicted: [409, 0, "Stored response evicted"],
|
|
23
|
+
idempotency_outcome_unknown: [409, 0, "Outcome unknown"],
|
|
20
24
|
conflict: [409, 0, "Conflict"],
|
|
21
25
|
resource_not_found: [404, 0, "Not found"],
|
|
22
26
|
not_implemented: [501, 0, "Not implemented"],
|
|
@@ -68,6 +72,10 @@ export const ERROR_CATALOG: Readonly<Record<string, readonly [status: number, re
|
|
|
68
72
|
pack_signature_invalid: [422, 0, "Invalid pack signature"],
|
|
69
73
|
org_suspended: [403, 0, "Organization suspended"],
|
|
70
74
|
hook_queue_full: [503, 1, "Webhook queue full"],
|
|
75
|
+
email_unavailable: [503, 1, "Email sign-in unavailable"],
|
|
76
|
+
turnstile_required: [400, 0, "Turnstile token required"],
|
|
77
|
+
turnstile_failed: [403, 0, "Turnstile check failed"],
|
|
78
|
+
turnstile_unavailable: [503, 1, "Turnstile unavailable"],
|
|
71
79
|
authorization_pending: [400, 1, "Authorization pending"],
|
|
72
80
|
slow_down: [400, 1, "Slow down"],
|
|
73
81
|
access_denied: [400, 0, "Access denied"],
|
|
@@ -81,6 +89,7 @@ export const ERROR_CATALOG: Readonly<Record<string, readonly [status: number, re
|
|
|
81
89
|
profile_domain_mismatch: [422, 0, "Profile domain mismatch"],
|
|
82
90
|
profile_conflict: [409, 0, "Profile changed since it was loaded"],
|
|
83
91
|
profile_name_taken: [409, 0, "Profile name taken"],
|
|
92
|
+
profile_not_exportable: [403, 0, "Profile not exportable"],
|
|
84
93
|
crawl_not_found: [404, 0, "Crawl not found"],
|
|
85
94
|
batch_not_found: [404, 0, "Batch scrape not found"],
|
|
86
95
|
robots_disallowed: [403, 0, "Disallowed by robots.txt"],
|
|
@@ -88,10 +97,16 @@ export const ERROR_CATALOG: Readonly<Record<string, readonly [status: number, re
|
|
|
88
97
|
navigation_failed: [502, 1, "Navigation failed"],
|
|
89
98
|
scrape_timeout: [504, 1, "Scrape timed out"],
|
|
90
99
|
target_not_found: [422, 0, "Target not found"],
|
|
100
|
+
target_covered: [422, 0, "Target covered"],
|
|
101
|
+
stale_ref: [422, 0, "Stale ref"],
|
|
91
102
|
act_step_failed: [422, 0, "Browser action failed"],
|
|
92
103
|
cdp_method_blocked: [403, 0, "CDP method not allowed"],
|
|
93
104
|
extraction_failed: [502, 1, "Extraction failed"],
|
|
94
105
|
scrape_no_cached_data: [404, 0, "No cached copy"],
|
|
106
|
+
scrape_lockdown_cache_miss: [404, 0, "Not in the cache (lockdown)"],
|
|
107
|
+
search_unavailable: [503, 1, "Search unavailable"],
|
|
108
|
+
search_failed: [502, 1, "Search failed"],
|
|
109
|
+
search_answer_too_large: [413, 0, "Search answer too large"],
|
|
95
110
|
screenshot_not_found: [404, 0, "Screenshot not found"],
|
|
96
111
|
video_not_found: [404, 0, "Video not found"],
|
|
97
112
|
artifact_not_found: [404, 0, "Artifact not found"],
|
|
@@ -100,14 +115,19 @@ export const ERROR_CATALOG: Readonly<Record<string, readonly [status: number, re
|
|
|
100
115
|
script_invalid: [422, 0, "Invalid video script"],
|
|
101
116
|
script_step_failed: [422, 0, "Script step failed"],
|
|
102
117
|
restyle_unavailable: [409, 0, "Restyle not available"],
|
|
118
|
+
background_unavailable: [503, 1, "Background unavailable"],
|
|
103
119
|
style_invalid: [422, 0, "Invalid style"],
|
|
104
120
|
sandbox_not_found: [404, 0, "Sandbox not found"],
|
|
105
121
|
sandbox_not_running: [409, 0, "Sandbox not running"],
|
|
106
122
|
template_not_found: [404, 0, "Template not found"],
|
|
107
123
|
snapshot_not_found: [404, 0, "Snapshot not found"],
|
|
124
|
+
snapshot_damaged: [409, 0, "Snapshot damaged"],
|
|
108
125
|
file_not_found: [404, 0, "File not found"],
|
|
109
126
|
path_invalid: [422, 0, "Invalid path"],
|
|
110
127
|
not_a_directory: [422, 0, "Not a directory"],
|
|
128
|
+
file_exists: [409, 0, "File exists"],
|
|
129
|
+
directory_not_empty: [409, 0, "Directory not empty"],
|
|
130
|
+
guest_outdated: [409, 0, "Sandbox agent predates the operation"],
|
|
111
131
|
file_too_large: [413, 0, "File too large"],
|
|
112
132
|
port_not_exposed: [404, 0, "Port not exposed"],
|
|
113
133
|
process_not_found: [404, 0, "Process not found"],
|
|
@@ -116,6 +136,7 @@ export const ERROR_CATALOG: Readonly<Record<string, readonly [status: number, re
|
|
|
116
136
|
guest_unreachable: [502, 1, "Sandbox agent unreachable"],
|
|
117
137
|
snapshot_failed: [500, 1, "Snapshot failed"],
|
|
118
138
|
fork_unavailable: [409, 0, "Fork not available"],
|
|
139
|
+
envd_token_invalid: [401, 0, "envd access token invalid"],
|
|
119
140
|
routine_not_found: [404, 0, "Routine not found"],
|
|
120
141
|
routine_version_not_found: [404, 0, "Routine version not found"],
|
|
121
142
|
run_not_found: [404, 0, "Run not found"],
|
|
@@ -123,6 +144,14 @@ export const ERROR_CATALOG: Readonly<Record<string, readonly [status: number, re
|
|
|
123
144
|
routine_invalid: [422, 0, "Invalid routine"],
|
|
124
145
|
routine_name_taken: [409, 0, "Routine name taken"],
|
|
125
146
|
run_not_waiting: [409, 0, "Run is not waiting for this signal"],
|
|
147
|
+
event_fan_out_too_large: [422, 0, "Event fans out too far"],
|
|
148
|
+
wait_link_invalid: [404, 0, "Wait link not valid"],
|
|
149
|
+
wait_not_ready: [409, 1, "Wait not ready"],
|
|
150
|
+
wait_already_answered: [410, 0, "Wait already answered"],
|
|
151
|
+
wait_link_expired: [410, 0, "Wait link expired"],
|
|
152
|
+
run_not_finished: [409, 0, "Run not finished"],
|
|
153
|
+
run_steps_not_kept: [410, 0, "Run steps not kept"],
|
|
154
|
+
replay_too_large: [422, 0, "Replay too large"],
|
|
126
155
|
run_as_revoked: [403, 0, "Publishing key revoked"],
|
|
127
156
|
webhook_signature_invalid: [401, 0, "Webhook verification failed"],
|
|
128
157
|
step_failed: [422, 0, "Step failed"],
|
|
@@ -130,6 +159,7 @@ export const ERROR_CATALOG: Readonly<Record<string, readonly [status: number, re
|
|
|
130
159
|
run_input_invalid: [422, 0, "Invalid run input"],
|
|
131
160
|
step_timed_out: [504, 1, "Step timed out"],
|
|
132
161
|
step_outcome_unknown: [409, 0, "Step outcome unknown"],
|
|
162
|
+
internal_recovery_failed: [500, 0, "Recovery failed"],
|
|
133
163
|
hook_attestation_unverifiable: [503, 1, "Webhook replay cannot be checked yet"],
|
|
134
164
|
pack_not_found: [404, 0, "Pack not found"],
|
|
135
165
|
pack_version_not_found: [404, 0, "Pack version not found"],
|
|
@@ -166,12 +196,16 @@ export type B3OSServerErrorCode =
|
|
|
166
196
|
| "not_acceptable"
|
|
167
197
|
| "payload_too_large"
|
|
168
198
|
| "route_not_found"
|
|
199
|
+
| "feature_not_enabled"
|
|
169
200
|
| "method_not_allowed"
|
|
170
201
|
| "edge_only"
|
|
171
202
|
| "limit_exceeded"
|
|
203
|
+
| "option_not_allowed"
|
|
172
204
|
| "idempotency_key_invalid"
|
|
173
205
|
| "idempotency_key_conflict"
|
|
174
206
|
| "idempotency_request_in_progress"
|
|
207
|
+
| "idempotency_response_evicted"
|
|
208
|
+
| "idempotency_outcome_unknown"
|
|
175
209
|
| "conflict"
|
|
176
210
|
| "resource_not_found"
|
|
177
211
|
| "not_implemented"
|
|
@@ -223,6 +257,10 @@ export type B3OSServerErrorCode =
|
|
|
223
257
|
| "pack_signature_invalid"
|
|
224
258
|
| "org_suspended"
|
|
225
259
|
| "hook_queue_full"
|
|
260
|
+
| "email_unavailable"
|
|
261
|
+
| "turnstile_required"
|
|
262
|
+
| "turnstile_failed"
|
|
263
|
+
| "turnstile_unavailable"
|
|
226
264
|
| "authorization_pending"
|
|
227
265
|
| "slow_down"
|
|
228
266
|
| "access_denied"
|
|
@@ -236,6 +274,7 @@ export type B3OSServerErrorCode =
|
|
|
236
274
|
| "profile_domain_mismatch"
|
|
237
275
|
| "profile_conflict"
|
|
238
276
|
| "profile_name_taken"
|
|
277
|
+
| "profile_not_exportable"
|
|
239
278
|
| "crawl_not_found"
|
|
240
279
|
| "batch_not_found"
|
|
241
280
|
| "robots_disallowed"
|
|
@@ -243,10 +282,16 @@ export type B3OSServerErrorCode =
|
|
|
243
282
|
| "navigation_failed"
|
|
244
283
|
| "scrape_timeout"
|
|
245
284
|
| "target_not_found"
|
|
285
|
+
| "target_covered"
|
|
286
|
+
| "stale_ref"
|
|
246
287
|
| "act_step_failed"
|
|
247
288
|
| "cdp_method_blocked"
|
|
248
289
|
| "extraction_failed"
|
|
249
290
|
| "scrape_no_cached_data"
|
|
291
|
+
| "scrape_lockdown_cache_miss"
|
|
292
|
+
| "search_unavailable"
|
|
293
|
+
| "search_failed"
|
|
294
|
+
| "search_answer_too_large"
|
|
250
295
|
| "screenshot_not_found"
|
|
251
296
|
| "video_not_found"
|
|
252
297
|
| "artifact_not_found"
|
|
@@ -255,14 +300,19 @@ export type B3OSServerErrorCode =
|
|
|
255
300
|
| "script_invalid"
|
|
256
301
|
| "script_step_failed"
|
|
257
302
|
| "restyle_unavailable"
|
|
303
|
+
| "background_unavailable"
|
|
258
304
|
| "style_invalid"
|
|
259
305
|
| "sandbox_not_found"
|
|
260
306
|
| "sandbox_not_running"
|
|
261
307
|
| "template_not_found"
|
|
262
308
|
| "snapshot_not_found"
|
|
309
|
+
| "snapshot_damaged"
|
|
263
310
|
| "file_not_found"
|
|
264
311
|
| "path_invalid"
|
|
265
312
|
| "not_a_directory"
|
|
313
|
+
| "file_exists"
|
|
314
|
+
| "directory_not_empty"
|
|
315
|
+
| "guest_outdated"
|
|
266
316
|
| "file_too_large"
|
|
267
317
|
| "port_not_exposed"
|
|
268
318
|
| "process_not_found"
|
|
@@ -271,6 +321,7 @@ export type B3OSServerErrorCode =
|
|
|
271
321
|
| "guest_unreachable"
|
|
272
322
|
| "snapshot_failed"
|
|
273
323
|
| "fork_unavailable"
|
|
324
|
+
| "envd_token_invalid"
|
|
274
325
|
| "routine_not_found"
|
|
275
326
|
| "routine_version_not_found"
|
|
276
327
|
| "run_not_found"
|
|
@@ -278,6 +329,14 @@ export type B3OSServerErrorCode =
|
|
|
278
329
|
| "routine_invalid"
|
|
279
330
|
| "routine_name_taken"
|
|
280
331
|
| "run_not_waiting"
|
|
332
|
+
| "event_fan_out_too_large"
|
|
333
|
+
| "wait_link_invalid"
|
|
334
|
+
| "wait_not_ready"
|
|
335
|
+
| "wait_already_answered"
|
|
336
|
+
| "wait_link_expired"
|
|
337
|
+
| "run_not_finished"
|
|
338
|
+
| "run_steps_not_kept"
|
|
339
|
+
| "replay_too_large"
|
|
281
340
|
| "run_as_revoked"
|
|
282
341
|
| "webhook_signature_invalid"
|
|
283
342
|
| "step_failed"
|
|
@@ -285,6 +344,7 @@ export type B3OSServerErrorCode =
|
|
|
285
344
|
| "run_input_invalid"
|
|
286
345
|
| "step_timed_out"
|
|
287
346
|
| "step_outcome_unknown"
|
|
347
|
+
| "internal_recovery_failed"
|
|
288
348
|
| "hook_attestation_unverifiable"
|
|
289
349
|
| "pack_not_found"
|
|
290
350
|
| "pack_version_not_found"
|
package/src/generated/jobs.ts
CHANGED
|
@@ -10,7 +10,7 @@ export const JOB_OPS: Readonly<Record<string, JobOps>> = {
|
|
|
10
10
|
batch: visionOps.createBatch.job as JobOps,
|
|
11
11
|
crawl: visionOps.createCrawl.job as JobOps,
|
|
12
12
|
vid: renderOps.createVideo.job as JobOps,
|
|
13
|
-
run: routinesOps.
|
|
13
|
+
run: routinesOps.replayRun.job as JobOps,
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -37,6 +37,15 @@ const getPackOp: Op = {
|
|
|
37
37
|
timeoutMs: 10000,
|
|
38
38
|
scope: "actions:read",
|
|
39
39
|
};
|
|
40
|
+
const getPackToolsOp: Op = {
|
|
41
|
+
id: "actionsGetPackTools",
|
|
42
|
+
method: "GET",
|
|
43
|
+
path: "/v1/actions/packs/{namespace}/{name}/tools",
|
|
44
|
+
params: ["namespace", "name"],
|
|
45
|
+
headerParams: { if_none_match: "If-None-Match" },
|
|
46
|
+
timeoutMs: 10000,
|
|
47
|
+
scope: "actions:read",
|
|
48
|
+
};
|
|
40
49
|
const getPackManifestOp: Op = {
|
|
41
50
|
id: "actionsGetPackManifest",
|
|
42
51
|
method: "GET",
|
|
@@ -126,6 +135,7 @@ export const actionsOps = {
|
|
|
126
135
|
describe: describeOp,
|
|
127
136
|
listPacks: listPacksOp,
|
|
128
137
|
getPack: getPackOp,
|
|
138
|
+
getPackTools: getPackToolsOp,
|
|
129
139
|
getPackManifest: getPackManifestOp,
|
|
130
140
|
listRegistryPacks: listRegistryPacksOp,
|
|
131
141
|
publishPack: publishPackOp,
|
|
@@ -145,10 +155,27 @@ export class ActionsAPI extends Namespace {
|
|
|
145
155
|
*
|
|
146
156
|
* Validates `input` against the action's schema, runs it, validates the result against its output schema and
|
|
147
157
|
* returns it. Credentials come from `connections` (pack connection key to `conn_` ID), or else from your
|
|
148
|
-
* project's most recently created connection for that pack and key
|
|
149
|
-
* user (
|
|
150
|
-
*
|
|
151
|
-
* connection
|
|
158
|
+
* project's most recently created connection for that pack and key that has no `subject`: an unnamed key never
|
|
159
|
+
* uses an end user's connection (one with a `subject`), even when it is newer; name end-user connections
|
|
160
|
+
* explicitly. A call with `subject` (your end user's ID) resolves each unnamed key to that subject's most
|
|
161
|
+
* recently created connection for the pack and key instead, never to another subject's or to one without a
|
|
162
|
+
* `subject`. With no such connection the call is refused with `422 connection_required`. Using a stored
|
|
163
|
+
* connection, named or not, also needs `vault:run`. A credential is sent only over `https`, and only to a host
|
|
164
|
+
* that both the called pack version declares for the connection and the connection is bound to (its `hosts`;
|
|
165
|
+
* a host a later pack version adds needs a new connection). A request to a plain `http` URL whose host would
|
|
166
|
+
* get a credential is refused with `403 egress_denied` (`reason: scheme`) and nothing is sent; after a
|
|
167
|
+
* redirect, a credential bound through a wildcard host (`*.atlassian.net`) goes only back to the host the
|
|
168
|
+
* request started at. A JavaScript action whose credential would be bound only through a wildcard host is
|
|
169
|
+
* refused with `501 not_implemented` on a node whose egress proxy for JavaScript actions cannot yet keep it
|
|
170
|
+
* on one host; nothing runs and nothing is billed. Credential values an upstream echoes are replaced by `*`
|
|
171
|
+
* characters before the response mapping reads the answer, and what a mapping computes, every error text
|
|
172
|
+
* and the output of a JavaScript action are searched again. Found are values as written, with JSON string
|
|
173
|
+
* escapes (`\/`, `\u0073`) or percent escapes in either hex case, also nested (a JSON text in a string, a URL
|
|
174
|
+
* in another URL's query), and for `basic` the `Authorization` value (values of at least 8 characters; error
|
|
175
|
+
* texts also drop shorter ones of at least 4). JavaScript code reads answers through the node's egress proxy:
|
|
176
|
+
* the built-in one replaces all of these spellings, the platform proxy only values written as is. Other
|
|
177
|
+
* encodings, such as base64 of an API key, are not recognized.
|
|
178
|
+
* Only `pure` and `read` actions are retried automatically; send `Idempotency-Key`
|
|
152
179
|
* with `write` actions so a retry of your own does not repeat the effect (packs that declare an
|
|
153
180
|
* idempotency header pass it upstream). `timing` phases: `validate` (input schema), `inject` (connections),
|
|
154
181
|
* `render` (request templates), `upstream` (every HTTP exchange, retries and redirects included), `map`
|
|
@@ -201,6 +228,30 @@ export class ActionsAPI extends Namespace {
|
|
|
201
228
|
return this._client._call<T.Pack>(getPackOp, { path: [namespace, name], query: params }, options);
|
|
202
229
|
}
|
|
203
230
|
|
|
231
|
+
/**
|
|
232
|
+
* List a pack's MCP tools
|
|
233
|
+
*
|
|
234
|
+
* Every action of a pack version that is exposed to MCP, as MCP tool definitions in one response, so an MCP
|
|
235
|
+
* server lists a pack's tools with one request instead of one describe per action. The node builds the list
|
|
236
|
+
* when it loads the pack. Tool names are the registry's (`mcp_name`); each tool also carries the action's `ref`
|
|
237
|
+
* and `effects`, which a server drops from `tools/list`. Cache the response for `ttlMs`; the `ETag` is the
|
|
238
|
+
* version's content hash plus the filters, and `If-None-Match` with it answers `304`.
|
|
239
|
+
*
|
|
240
|
+
* `GET /v1/actions/packs/{namespace}/{name}/tools` · scope `actions:read` · served by the node
|
|
241
|
+
*/
|
|
242
|
+
getPackTools(
|
|
243
|
+
namespace: string,
|
|
244
|
+
name: string,
|
|
245
|
+
params?: T.ActionsGetPackToolsParams,
|
|
246
|
+
options?: RequestOptions,
|
|
247
|
+
): APIPromise<T.PackTools> {
|
|
248
|
+
return this._client._call<T.PackTools>(
|
|
249
|
+
getPackToolsOp,
|
|
250
|
+
{ path: [namespace, name], query: params, headerParams: params },
|
|
251
|
+
options,
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
204
255
|
/**
|
|
205
256
|
* Get a pack manifest
|
|
206
257
|
*
|
|
@@ -292,8 +343,20 @@ export class ActionsAPI extends Namespace {
|
|
|
292
343
|
/**
|
|
293
344
|
* Search actions
|
|
294
345
|
*
|
|
295
|
-
* Full-text search over action titles, descriptions and
|
|
296
|
-
* can pass to describe and call. The same results back the `actions_search` MCP tool.
|
|
346
|
+
* Full-text search over action titles, descriptions, pack names and task phrases, ranked for agents. Returns
|
|
347
|
+
* references you can pass to describe and call. The same results back the `actions_search` MCP tool. With
|
|
348
|
+
* `kind=trigger` it searches triggers instead (results have `kind: trigger`, and their refs go in a routine's
|
|
349
|
+
* action trigger), and with `kind=any` both, ranked together, each result with its `kind`.
|
|
350
|
+
*
|
|
351
|
+
* Every answer says whether anything matched: `match` is `found` or `none`. A query that names a pack (`slack`,
|
|
352
|
+
* `google sheets`, or a pack's term such as `email` or `weather`) searches only the packs it names, and its
|
|
353
|
+
* other words are values (`weather in Tokyo`). A query that names no pack matches only an action that carries
|
|
354
|
+
* all of its words. A service the catalog does not have (`telegram message`) matches nothing, and verbs keep
|
|
355
|
+
* the effect class they ask for: `delete` or `send` only actions that write, `read` or `list` only actions
|
|
356
|
+
* that read. A removal, or an action that cannot be undone, must also be about what the query names
|
|
357
|
+
* (`delete the repo` matches nothing, since no GitHub action deletes a repository). With `match: none`,
|
|
358
|
+
* `data` is empty, `unmatched` lists the words the catalog does not know, and `fallback` names the generic
|
|
359
|
+
* HTTP actions to use instead. Never substitute an unrelated action.
|
|
297
360
|
*
|
|
298
361
|
* `GET /v1/actions/search` · scope `actions:read` · served by the node
|
|
299
362
|
*/
|