@browserbasehq/sdk 2.20.0 → 2.21.0

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 (63) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/index.d.mts +6 -0
  3. package/index.d.ts +6 -0
  4. package/index.d.ts.map +1 -1
  5. package/index.js +6 -0
  6. package/index.js.map +1 -1
  7. package/index.mjs +6 -0
  8. package/index.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/agents/agents.d.ts +4 -4
  11. package/resources/agents/runs.d.ts +24 -8
  12. package/resources/agents/runs.d.ts.map +1 -1
  13. package/resources/functions/functions.d.ts +10 -0
  14. package/resources/functions/functions.d.ts.map +1 -0
  15. package/resources/functions/functions.js +49 -0
  16. package/resources/functions/functions.js.map +1 -0
  17. package/resources/functions/functions.mjs +12 -0
  18. package/resources/functions/functions.mjs.map +1 -0
  19. package/resources/functions/index.d.ts +3 -0
  20. package/resources/functions/index.d.ts.map +1 -0
  21. package/resources/functions/index.js +9 -0
  22. package/resources/functions/index.js.map +1 -0
  23. package/resources/functions/index.mjs +4 -0
  24. package/resources/functions/index.mjs.map +1 -0
  25. package/resources/functions/secrets.d.ts +74 -0
  26. package/resources/functions/secrets.d.ts.map +1 -0
  27. package/resources/functions/secrets.js +39 -0
  28. package/resources/functions/secrets.js.map +1 -0
  29. package/resources/functions/secrets.mjs +35 -0
  30. package/resources/functions/secrets.mjs.map +1 -0
  31. package/resources/functions.d.ts +2 -0
  32. package/resources/functions.d.ts.map +1 -0
  33. package/resources/functions.js +19 -0
  34. package/resources/functions.js.map +1 -0
  35. package/resources/functions.mjs +3 -0
  36. package/resources/functions.mjs.map +1 -0
  37. package/resources/index.d.ts +2 -0
  38. package/resources/index.d.ts.map +1 -1
  39. package/resources/index.js +5 -1
  40. package/resources/index.js.map +1 -1
  41. package/resources/index.mjs +2 -0
  42. package/resources/index.mjs.map +1 -1
  43. package/resources/search.d.ts +1 -1
  44. package/resources/secrets.d.ts +142 -0
  45. package/resources/secrets.d.ts.map +1 -0
  46. package/resources/secrets.js +50 -0
  47. package/resources/secrets.js.map +1 -0
  48. package/resources/secrets.mjs +46 -0
  49. package/resources/secrets.mjs.map +1 -0
  50. package/src/index.ts +26 -0
  51. package/src/resources/agents/agents.ts +4 -4
  52. package/src/resources/agents/runs.ts +25 -8
  53. package/src/resources/functions/functions.ts +20 -0
  54. package/src/resources/functions/index.ts +4 -0
  55. package/src/resources/functions/secrets.ts +117 -0
  56. package/src/resources/functions.ts +3 -0
  57. package/src/resources/index.ts +10 -0
  58. package/src/resources/search.ts +1 -1
  59. package/src/resources/secrets.ts +196 -0
  60. package/src/version.ts +1 -1
  61. package/version.d.ts +1 -1
  62. package/version.js +1 -1
  63. package/version.mjs +1 -1
@@ -0,0 +1,35 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../resource.mjs";
3
+ import { isRequestOptions } from "../../core.mjs";
4
+ export class Secrets extends APIResource {
5
+ list(id, query = {}, options) {
6
+ if (isRequestOptions(query)) {
7
+ return this.list(id, {}, query);
8
+ }
9
+ return this._client.get(`/v1/functions/${id}/secrets`, { query, ...options });
10
+ }
11
+ /**
12
+ * Attach a secret to a Function, taking effect on the Function's next invocation.
13
+ * Note: Attaching a secret that is already attached succeeds to support
14
+ * idempotency.
15
+ */
16
+ attach(id, body, options) {
17
+ return this._client.post(`/v1/functions/${id}/secrets`, {
18
+ body,
19
+ ...options,
20
+ headers: { Accept: '*/*', ...options?.headers },
21
+ });
22
+ }
23
+ /**
24
+ * Detach a secret from a Function, taking effect on the Function's next
25
+ * invocation. Note: Detaching a secret that is not attached succeeds to support
26
+ * idempotency.
27
+ */
28
+ detach(id, secretId, options) {
29
+ return this._client.delete(`/v1/functions/${id}/secrets/${secretId}`, {
30
+ ...options,
31
+ headers: { Accept: '*/*', ...options?.headers },
32
+ });
33
+ }
34
+ }
35
+ //# sourceMappingURL=secrets.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secrets.mjs","sourceRoot":"","sources":["../../src/resources/functions/secrets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAI3B,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAWtC,IAAI,CACF,EAAU,EACV,QAAgD,EAAE,EAClD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QAClC,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,EAAU,EAAE,IAAwB,EAAE,OAA6B;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,UAAU,EAAE;YACtD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,EAAU,EAAE,QAAgB,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,YAAY,QAAQ,EAAE,EAAE;YACpE,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export * from "./functions/index.js";
2
+ //# sourceMappingURL=functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../src/resources/functions.ts"],"names":[],"mappings":"AAEA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ __exportStar(require("./functions/index.js"), exports);
19
+ //# sourceMappingURL=functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions.js","sourceRoot":"","sources":["../src/resources/functions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;AAEtF,uDAAkC"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export * from "./functions/index.mjs";
3
+ //# sourceMappingURL=functions.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions.mjs","sourceRoot":"","sources":["../src/resources/functions.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -3,8 +3,10 @@ export { Certificates, type Certificate, type CertificateListResponse, type Cert
3
3
  export { Contexts, type Context, type ContextCreateResponse, type ContextUpdateResponse, type ContextCreateParams, } from "./contexts.js";
4
4
  export { Extensions, type Extension, type ExtensionCreateParams } from "./extensions.js";
5
5
  export { FetchAPI, type FetchAPICreateResponse, type FetchAPICreateParams } from "./fetch-api.js";
6
+ export { Functions } from "./functions/functions.js";
6
7
  export { Projects, type Project, type ProjectUsage, type ProjectListResponse } from "./projects.js";
7
8
  export { Search, type SearchWebResponse, type SearchWebParams } from "./search.js";
9
+ export { Secrets, type Secret, type SecretsKeypair, type SecretListResponse, type SecretCreateParams, type SecretUpdateParams, type SecretListParams, } from "./secrets.js";
8
10
  export { Sessions, type Session, type SessionLiveURLs, type SessionCreateResponse, type SessionRetrieveResponse, type SessionListResponse, type SessionCreateParams, type SessionUpdateParams, type SessionListParams, type SessionDebugParams, } from "./sessions/sessions.js";
9
11
  export { Webhooks, type Webhook, type WebhookCreateResponse, type WebhookListResponse, type WebhookRotateSecretResponse, type WebhookCreateParams, type WebhookUpdateParams, type WebhookListParams, type WebhookRotateSecretParams, } from "./webhooks.js";
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,KAAK,sBAAsB,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjG,OAAO,EAAE,MAAM,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,KAAK,sBAAsB,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjG,OAAO,EAAE,MAAM,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,GACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B,MAAM,YAAY,CAAC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Webhooks = exports.Sessions = exports.Search = exports.Projects = exports.FetchAPI = exports.Extensions = exports.Contexts = exports.Certificates = exports.Agents = void 0;
4
+ exports.Webhooks = exports.Sessions = exports.Secrets = exports.Search = exports.Projects = exports.Functions = exports.FetchAPI = exports.Extensions = exports.Contexts = exports.Certificates = exports.Agents = void 0;
5
5
  var agents_1 = require("./agents/agents.js");
6
6
  Object.defineProperty(exports, "Agents", { enumerable: true, get: function () { return agents_1.Agents; } });
7
7
  var certificates_1 = require("./certificates.js");
@@ -12,10 +12,14 @@ var extensions_1 = require("./extensions.js");
12
12
  Object.defineProperty(exports, "Extensions", { enumerable: true, get: function () { return extensions_1.Extensions; } });
13
13
  var fetch_api_1 = require("./fetch-api.js");
14
14
  Object.defineProperty(exports, "FetchAPI", { enumerable: true, get: function () { return fetch_api_1.FetchAPI; } });
15
+ var functions_1 = require("./functions/functions.js");
16
+ Object.defineProperty(exports, "Functions", { enumerable: true, get: function () { return functions_1.Functions; } });
15
17
  var projects_1 = require("./projects.js");
16
18
  Object.defineProperty(exports, "Projects", { enumerable: true, get: function () { return projects_1.Projects; } });
17
19
  var search_1 = require("./search.js");
18
20
  Object.defineProperty(exports, "Search", { enumerable: true, get: function () { return search_1.Search; } });
21
+ var secrets_1 = require("./secrets.js");
22
+ Object.defineProperty(exports, "Secrets", { enumerable: true, get: function () { return secrets_1.Secrets; } });
19
23
  var sessions_1 = require("./sessions/sessions.js");
20
24
  Object.defineProperty(exports, "Sessions", { enumerable: true, get: function () { return sessions_1.Sessions; } });
21
25
  var webhooks_1 = require("./webhooks.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CASyB;AARvB,gGAAA,MAAM,OAAA;AASR,kDAKwB;AAJtB,4GAAA,YAAY,OAAA;AAKd,0CAMoB;AALlB,oGAAA,QAAQ,OAAA;AAMV,8CAAsF;AAA7E,wGAAA,UAAU,OAAA;AACnB,4CAA+F;AAAtF,qGAAA,QAAQ,OAAA;AACjB,0CAAiG;AAAxF,oGAAA,QAAQ,OAAA;AACjB,sCAAgF;AAAvE,gGAAA,MAAM,OAAA;AACf,mDAW6B;AAV3B,oGAAA,QAAQ,OAAA;AAWV,0CAUoB;AATlB,oGAAA,QAAQ,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CASyB;AARvB,gGAAA,MAAM,OAAA;AASR,kDAKwB;AAJtB,4GAAA,YAAY,OAAA;AAKd,0CAMoB;AALlB,oGAAA,QAAQ,OAAA;AAMV,8CAAsF;AAA7E,wGAAA,UAAU,OAAA;AACnB,4CAA+F;AAAtF,qGAAA,QAAQ,OAAA;AACjB,sDAAkD;AAAzC,sGAAA,SAAS,OAAA;AAClB,0CAAiG;AAAxF,oGAAA,QAAQ,OAAA;AACjB,sCAAgF;AAAvE,gGAAA,MAAM,OAAA;AACf,wCAQmB;AAPjB,kGAAA,OAAO,OAAA;AAQT,mDAW6B;AAV3B,oGAAA,QAAQ,OAAA;AAWV,0CAUoB;AATlB,oGAAA,QAAQ,OAAA"}
@@ -4,8 +4,10 @@ export { Certificates, } from "./certificates.mjs";
4
4
  export { Contexts, } from "./contexts.mjs";
5
5
  export { Extensions } from "./extensions.mjs";
6
6
  export { FetchAPI } from "./fetch-api.mjs";
7
+ export { Functions } from "./functions/functions.mjs";
7
8
  export { Projects } from "./projects.mjs";
8
9
  export { Search } from "./search.mjs";
10
+ export { Secrets, } from "./secrets.mjs";
9
11
  export { Sessions, } from "./sessions/sessions.mjs";
10
12
  export { Webhooks, } from "./webhooks.mjs";
11
13
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAQP;OACM,EACL,YAAY,GAIb;OACM,EACL,QAAQ,GAKT;OACM,EAAE,UAAU,EAA8C;OAC1D,EAAE,QAAQ,EAA0D;OACpE,EAAE,QAAQ,EAA6D;OACvE,EAAE,MAAM,EAAgD;OACxD,EACL,QAAQ,GAUT;OACM,EACL,QAAQ,GAST"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAQP;OACM,EACL,YAAY,GAIb;OACM,EACL,QAAQ,GAKT;OACM,EAAE,UAAU,EAA8C;OAC1D,EAAE,QAAQ,EAA0D;OACpE,EAAE,SAAS,EAAE;OACb,EAAE,QAAQ,EAA6D;OACvE,EAAE,MAAM,EAAgD;OACxD,EACL,OAAO,GAOR;OACM,EACL,QAAQ,GAUT;OACM,EACL,QAAQ,GAST"}
@@ -47,7 +47,7 @@ export declare namespace SearchWebResponse {
47
47
  */
48
48
  image?: string;
49
49
  /**
50
- * Publication date in ISO 8601 format
50
+ * Publication date in RFC 3339 format
51
51
  */
52
52
  publishedDate?: string;
53
53
  }
@@ -0,0 +1,142 @@
1
+ import { APIResource } from "../resource.js";
2
+ import * as Core from "../core.js";
3
+ export declare class Secrets extends APIResource {
4
+ /**
5
+ * Create Secret
6
+ */
7
+ create(body: SecretCreateParams, options?: Core.RequestOptions): Core.APIPromise<Secret>;
8
+ /**
9
+ * Get Secret
10
+ */
11
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Secret>;
12
+ /**
13
+ * Replace a secret's value. The name cannot be changed; to rename, create a new
14
+ * secret and delete the old one.
15
+ */
16
+ update(id: string, body: SecretUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Secret>;
17
+ /**
18
+ * List project secrets. Supports filtering by creation time.
19
+ */
20
+ list(query?: SecretListParams, options?: Core.RequestOptions): Core.APIPromise<SecretListResponse>;
21
+ list(options?: Core.RequestOptions): Core.APIPromise<SecretListResponse>;
22
+ /**
23
+ * Delete Secret
24
+ */
25
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void>;
26
+ /**
27
+ * Get Secrets Keypair
28
+ */
29
+ getPublicKey(options?: Core.RequestOptions): Core.APIPromise<SecretsKeypair>;
30
+ }
31
+ export interface Secret {
32
+ /**
33
+ * Unique identifier of the secret.
34
+ */
35
+ id: string;
36
+ /**
37
+ * The name the secret value is stored under.
38
+ */
39
+ secretKey: string;
40
+ }
41
+ export interface SecretsKeypair {
42
+ /**
43
+ * Identifier of the keypair the public key was minted from. Pass this back when
44
+ * creating a secret so the ciphertext records which keypair sealed it, which keeps
45
+ * decryption correct across keypair rotation.
46
+ */
47
+ id: string;
48
+ /**
49
+ * The project's HPKE public encryption key, base64-encoded. Encrypt secret values
50
+ * with this key before creating a secret.
51
+ */
52
+ publicKey: string;
53
+ }
54
+ /**
55
+ * A page of secrets.
56
+ */
57
+ export interface SecretListResponse {
58
+ /**
59
+ * The page of matching secrets.
60
+ */
61
+ data: Array<Secret>;
62
+ /**
63
+ * The maximum number of results returned in this page.
64
+ */
65
+ limit: number;
66
+ /**
67
+ * Cursor for the next page. Pass it back as `cursor` on the next request to
68
+ * continue paging. null when there are no more results.
69
+ */
70
+ nextCursor: string | null;
71
+ }
72
+ export interface SecretCreateParams {
73
+ /**
74
+ * The `id` returned by GET /v1/secrets/keypair, identifying the keypair whose
75
+ * public key encrypted the value. Recorded with the secret so decryption stays
76
+ * correct across keypair rotation.
77
+ */
78
+ keypairId: string;
79
+ /**
80
+ * The secret value encrypted with HPKE. In order to seal the secret value before
81
+ * sending, get the project's public key from GET /v1/secrets/keypair. Decode the
82
+ * publicKey using base64 into the raw 32-byte public key. Then, use HPKE Base mode
83
+ * (RFC 9180) with the following algorithm suite: DHKEM(X25519, HKDF-SHA256),
84
+ * HKDF-SHA256, and AES-256-GCM. Set both info and additional authenticated data
85
+ * (AAD) to an empty byte string. Then, create a new sender context using the
86
+ * public key and these settings, and encrypt the secret value as one message. Put
87
+ * the 32-byte encapsulated key before the ciphertext and keep the authentication
88
+ * tag at the end of the ciphertext. Encode the combined bytes with standard
89
+ * base64. Send the result as sealedSecretValue: base64(enc || ciphertext)
90
+ */
91
+ sealedSecretValue: string;
92
+ /**
93
+ * The name to store the secret value under.
94
+ */
95
+ secretKey: string;
96
+ }
97
+ export interface SecretUpdateParams {
98
+ /**
99
+ * The `id` returned by GET /v1/secrets/keypair, identifying the keypair whose
100
+ * public key encrypted the value. Recorded with the secret so decryption stays
101
+ * correct across keypair rotation.
102
+ */
103
+ keypairId: string;
104
+ /**
105
+ * The new secret value encrypted with HPKE. In order to seal the secret value
106
+ * before sending, get the project's public key from GET /v1/secrets/keypair.
107
+ * Decode the publicKey using base64 into the raw 32-byte public key. Then, use
108
+ * HPKE Base mode (RFC 9180) with the following algorithm suite: DHKEM(X25519,
109
+ * HKDF-SHA256), HKDF-SHA256, and AES-256-GCM. Set both info and additional
110
+ * authenticated data (AAD) to an empty byte string. Then, create a new sender
111
+ * context using the public key and these settings, and encrypt the secret value as
112
+ * one message. Put the 32-byte encapsulated key before the ciphertext and keep the
113
+ * authentication tag at the end of the ciphertext. Encode the combined bytes with
114
+ * standard base64. Send the result as sealedSecretValue: base64(enc || ciphertext)
115
+ */
116
+ sealedSecretValue: string;
117
+ }
118
+ export interface SecretListParams {
119
+ /**
120
+ * Pagination cursor. Pass the nextCursor from the previous response to fetch the
121
+ * next page. Omit to start from the first page.
122
+ */
123
+ cursor?: string;
124
+ /**
125
+ * Only return secrets created on or before this timestamp (inclusive). RFC 3339,
126
+ * e.g. 2026-01-20T00:00:00Z.
127
+ */
128
+ endAt?: string;
129
+ /**
130
+ * Maximum number of results to return.
131
+ */
132
+ limit?: number;
133
+ /**
134
+ * Only return secrets created on or after this timestamp (inclusive). RFC 3339,
135
+ * e.g. 2026-01-19T00:00:00Z.
136
+ */
137
+ startAt?: string;
138
+ }
139
+ export declare namespace Secrets {
140
+ export { type Secret as Secret, type SecretsKeypair as SecretsKeypair, type SecretListResponse as SecretListResponse, type SecretCreateParams as SecretCreateParams, type SecretUpdateParams as SecretUpdateParams, type SecretListParams as SecretListParams, };
141
+ }
142
+ //# sourceMappingURL=secrets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../src/resources/secrets.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAIxF;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAI5E;;;OAGG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAIpG;;OAEG;IACH,IAAI,CAAC,KAAK,CAAC,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAClG,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAWxE;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;IAOxE;;OAEG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC;CAG7E;AAED,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;;;;OAWG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;;;;OAWG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Secrets = void 0;
5
+ const resource_1 = require("../resource.js");
6
+ const core_1 = require("../core.js");
7
+ class Secrets extends resource_1.APIResource {
8
+ /**
9
+ * Create Secret
10
+ */
11
+ create(body, options) {
12
+ return this._client.post('/v1/secrets', { body, ...options });
13
+ }
14
+ /**
15
+ * Get Secret
16
+ */
17
+ retrieve(id, options) {
18
+ return this._client.get(`/v1/secrets/${id}`, options);
19
+ }
20
+ /**
21
+ * Replace a secret's value. The name cannot be changed; to rename, create a new
22
+ * secret and delete the old one.
23
+ */
24
+ update(id, body, options) {
25
+ return this._client.patch(`/v1/secrets/${id}`, { body, ...options });
26
+ }
27
+ list(query = {}, options) {
28
+ if ((0, core_1.isRequestOptions)(query)) {
29
+ return this.list({}, query);
30
+ }
31
+ return this._client.get('/v1/secrets', { query, ...options });
32
+ }
33
+ /**
34
+ * Delete Secret
35
+ */
36
+ delete(id, options) {
37
+ return this._client.delete(`/v1/secrets/${id}`, {
38
+ ...options,
39
+ headers: { Accept: '*/*', ...options?.headers },
40
+ });
41
+ }
42
+ /**
43
+ * Get Secrets Keypair
44
+ */
45
+ getPublicKey(options) {
46
+ return this._client.get('/v1/secrets/keypair', options);
47
+ }
48
+ }
49
+ exports.Secrets = Secrets;
50
+ //# sourceMappingURL=secrets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secrets.js","sourceRoot":"","sources":["../src/resources/secrets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAG3C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,EAAU,EAAE,IAAwB,EAAE,OAA6B;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAOD,IAAI,CACF,QAAgD,EAAE,EAClD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAC9B,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,EAAE,EAAE;YAC9C,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,OAA6B;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF;AAtDD,0BAsDC"}
@@ -0,0 +1,46 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../resource.mjs";
3
+ import { isRequestOptions } from "../core.mjs";
4
+ export class Secrets extends APIResource {
5
+ /**
6
+ * Create Secret
7
+ */
8
+ create(body, options) {
9
+ return this._client.post('/v1/secrets', { body, ...options });
10
+ }
11
+ /**
12
+ * Get Secret
13
+ */
14
+ retrieve(id, options) {
15
+ return this._client.get(`/v1/secrets/${id}`, options);
16
+ }
17
+ /**
18
+ * Replace a secret's value. The name cannot be changed; to rename, create a new
19
+ * secret and delete the old one.
20
+ */
21
+ update(id, body, options) {
22
+ return this._client.patch(`/v1/secrets/${id}`, { body, ...options });
23
+ }
24
+ list(query = {}, options) {
25
+ if (isRequestOptions(query)) {
26
+ return this.list({}, query);
27
+ }
28
+ return this._client.get('/v1/secrets', { query, ...options });
29
+ }
30
+ /**
31
+ * Delete Secret
32
+ */
33
+ delete(id, options) {
34
+ return this._client.delete(`/v1/secrets/${id}`, {
35
+ ...options,
36
+ headers: { Accept: '*/*', ...options?.headers },
37
+ });
38
+ }
39
+ /**
40
+ * Get Secrets Keypair
41
+ */
42
+ getPublicKey(options) {
43
+ return this._client.get('/v1/secrets/keypair', options);
44
+ }
45
+ }
46
+ //# sourceMappingURL=secrets.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secrets.mjs","sourceRoot":"","sources":["../src/resources/secrets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,EAAU,EAAE,IAAwB,EAAE,OAA6B;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAOD,IAAI,CACF,QAAgD,EAAE,EAClD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAC9B,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,EAAE,EAAE;YAC9C,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,OAA6B;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF"}
package/src/index.ts CHANGED
@@ -22,6 +22,15 @@ import { Extension, ExtensionCreateParams, Extensions } from './resources/extens
22
22
  import { FetchAPI, FetchAPICreateParams, FetchAPICreateResponse } from './resources/fetch-api';
23
23
  import { Project, ProjectListResponse, ProjectUsage, Projects } from './resources/projects';
24
24
  import { Search, SearchWebParams, SearchWebResponse } from './resources/search';
25
+ import {
26
+ Secret,
27
+ SecretCreateParams,
28
+ SecretListParams,
29
+ SecretListResponse,
30
+ SecretUpdateParams,
31
+ Secrets,
32
+ SecretsKeypair,
33
+ } from './resources/secrets';
25
34
  import {
26
35
  Webhook,
27
36
  WebhookCreateParams,
@@ -43,6 +52,7 @@ import {
43
52
  AgentUpdateResponse,
44
53
  Agents,
45
54
  } from './resources/agents/agents';
55
+ import { Functions } from './resources/functions/functions';
46
56
  import {
47
57
  Session,
48
58
  SessionCreateParams,
@@ -190,8 +200,10 @@ export class Browserbase extends Core.APIClient {
190
200
  contexts: API.Contexts = new API.Contexts(this);
191
201
  extensions: API.Extensions = new API.Extensions(this);
192
202
  fetchAPI: API.FetchAPI = new API.FetchAPI(this);
203
+ functions: API.Functions = new API.Functions(this);
193
204
  projects: API.Projects = new API.Projects(this);
194
205
  search: API.Search = new API.Search(this);
206
+ secrets: API.Secrets = new API.Secrets(this);
195
207
  sessions: API.Sessions = new API.Sessions(this);
196
208
  agents: API.Agents = new API.Agents(this);
197
209
  webhooks: API.Webhooks = new API.Webhooks(this);
@@ -243,8 +255,10 @@ Browserbase.Certificates = Certificates;
243
255
  Browserbase.Contexts = Contexts;
244
256
  Browserbase.Extensions = Extensions;
245
257
  Browserbase.FetchAPI = FetchAPI;
258
+ Browserbase.Functions = Functions;
246
259
  Browserbase.Projects = Projects;
247
260
  Browserbase.Search = Search;
261
+ Browserbase.Secrets = Secrets;
248
262
  Browserbase.Sessions = Sessions;
249
263
  Browserbase.Agents = Agents;
250
264
  Browserbase.Webhooks = Webhooks;
@@ -279,6 +293,8 @@ export declare namespace Browserbase {
279
293
  type FetchAPICreateParams as FetchAPICreateParams,
280
294
  };
281
295
 
296
+ export { Functions as Functions };
297
+
282
298
  export {
283
299
  Projects as Projects,
284
300
  type Project as Project,
@@ -292,6 +308,16 @@ export declare namespace Browserbase {
292
308
  type SearchWebParams as SearchWebParams,
293
309
  };
294
310
 
311
+ export {
312
+ Secrets as Secrets,
313
+ type Secret as Secret,
314
+ type SecretsKeypair as SecretsKeypair,
315
+ type SecretListResponse as SecretListResponse,
316
+ type SecretCreateParams as SecretCreateParams,
317
+ type SecretUpdateParams as SecretUpdateParams,
318
+ type SecretListParams as SecretListParams,
319
+ };
320
+
295
321
  export {
296
322
  Sessions as Sessions,
297
323
  type Session as Session,
@@ -292,8 +292,8 @@ export interface AgentListParams {
292
292
  cursor?: string;
293
293
 
294
294
  /**
295
- * Only return agents created on or before this timestamp (inclusive). ISO 8601 /
296
- * RFC 3339, e.g. 2026-01-20T00:00:00Z.
295
+ * Only return agents created on or before this timestamp (inclusive). RFC 3339,
296
+ * e.g. 2026-01-20T00:00:00Z.
297
297
  */
298
298
  endAt?: string;
299
299
 
@@ -303,8 +303,8 @@ export interface AgentListParams {
303
303
  limit?: number;
304
304
 
305
305
  /**
306
- * Only return agents created on or after this timestamp (inclusive). ISO 8601 /
307
- * RFC 3339, e.g. 2026-01-19T00:00:00Z.
306
+ * Only return agents created on or after this timestamp (inclusive). RFC 3339,
307
+ * e.g. 2026-01-19T00:00:00Z.
308
308
  */
309
309
  startAt?: string;
310
310
  }
@@ -85,8 +85,10 @@ export interface RunCreateResponse {
85
85
  * - `FAILED` - agent has failed the run
86
86
  * - `STOPPED` - run was stopped by the user
87
87
  * - `TIMED_OUT` - run exceeded maximum time
88
+ * - `PAUSED` - run is paused awaiting input from the caller; the agent's request
89
+ * is the trailing `pause` tool call in the run's messages
88
90
  */
89
- status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
91
+ status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT' | 'PAUSED';
90
92
 
91
93
  /**
92
94
  * The original task description.
@@ -165,8 +167,10 @@ export interface RunRetrieveResponse {
165
167
  * - `FAILED` - agent has failed the run
166
168
  * - `STOPPED` - run was stopped by the user
167
169
  * - `TIMED_OUT` - run exceeded maximum time
170
+ * - `PAUSED` - run is paused awaiting input from the caller; the agent's request
171
+ * is the trailing `pause` tool call in the run's messages
168
172
  */
169
- status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
173
+ status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT' | 'PAUSED';
170
174
 
171
175
  /**
172
176
  * The original task description.
@@ -267,8 +271,10 @@ export namespace RunListResponse {
267
271
  * - `FAILED` - agent has failed the run
268
272
  * - `STOPPED` - run was stopped by the user
269
273
  * - `TIMED_OUT` - run exceeded maximum time
274
+ * - `PAUSED` - run is paused awaiting input from the caller; the agent's request
275
+ * is the trailing `pause` tool call in the run's messages
270
276
  */
271
- status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
277
+ status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT' | 'PAUSED';
272
278
 
273
279
  /**
274
280
  * The original task description.
@@ -414,6 +420,15 @@ export interface RunCreateParams {
414
420
  */
415
421
  browserSettings?: RunCreateParams.BrowserSettings;
416
422
 
423
+ /**
424
+ * Optional description of when the agent should pause and wait for input from your
425
+ * application (e.g. a verification code, an approval, or an answer from another
426
+ * system). When set, the agent is given a `pause` tool; calling it transitions the
427
+ * run to `PAUSED` (the agent's request is the trailing `pause` tool call in the
428
+ * run's messages) until it is resumed via the resume endpoint.
429
+ */
430
+ pauseWhen?: string;
431
+
417
432
  /**
418
433
  * An optional [JSON Schema](https://json-schema.org/specification) object. If
419
434
  * provided, the agent will aim to return a `result` that conforms to this schema
@@ -580,8 +595,8 @@ export interface RunListParams {
580
595
  cursor?: string;
581
596
 
582
597
  /**
583
- * Only return runs created on or before this timestamp (inclusive). ISO 8601 / RFC
584
- * 3339, e.g. 2026-01-20T00:00:00Z.
598
+ * Only return runs created on or before this timestamp (inclusive). RFC 3339, e.g.
599
+ * 2026-01-20T00:00:00Z.
585
600
  */
586
601
  endAt?: string;
587
602
 
@@ -591,8 +606,8 @@ export interface RunListParams {
591
606
  limit?: number;
592
607
 
593
608
  /**
594
- * Only return runs created on or after this timestamp (inclusive). ISO 8601 / RFC
595
- * 3339, e.g. 2026-01-19T00:00:00Z.
609
+ * Only return runs created on or after this timestamp (inclusive). RFC 3339, e.g.
610
+ * 2026-01-19T00:00:00Z.
596
611
  */
597
612
  startAt?: string;
598
613
 
@@ -605,8 +620,10 @@ export interface RunListParams {
605
620
  * - `FAILED` - agent has failed the run
606
621
  * - `STOPPED` - run was stopped by the user
607
622
  * - `TIMED_OUT` - run exceeded maximum time
623
+ * - `PAUSED` - run is paused awaiting input from the caller; the agent's request
624
+ * is the trailing `pause` tool call in the run's messages
608
625
  */
609
- status?: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT';
626
+ status?: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPED' | 'TIMED_OUT' | 'PAUSED';
610
627
  }
611
628
 
612
629
  export interface RunListMessagesParams {
@@ -0,0 +1,20 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as SecretsAPI from './secrets';
5
+ import { SecretAttachParams, SecretListParams, SecretListResponse, Secrets } from './secrets';
6
+
7
+ export class Functions extends APIResource {
8
+ secrets: SecretsAPI.Secrets = new SecretsAPI.Secrets(this._client);
9
+ }
10
+
11
+ Functions.Secrets = Secrets;
12
+
13
+ export declare namespace Functions {
14
+ export {
15
+ Secrets as Secrets,
16
+ type SecretListResponse as SecretListResponse,
17
+ type SecretListParams as SecretListParams,
18
+ type SecretAttachParams as SecretAttachParams,
19
+ };
20
+ }
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Functions } from './functions';
4
+ export { Secrets, type SecretListResponse, type SecretListParams, type SecretAttachParams } from './secrets';