@onkernel/sdk 0.119.0 → 0.120.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 (93) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +1 -1
  3. package/resources/auth/connections.d.mts +1 -1
  4. package/resources/auth/connections.d.mts.map +1 -1
  5. package/resources/auth/connections.d.ts +1 -1
  6. package/resources/auth/connections.d.ts.map +1 -1
  7. package/resources/browser-pools.d.mts +4 -4
  8. package/resources/browser-pools.d.mts.map +1 -1
  9. package/resources/browser-pools.d.ts +4 -4
  10. package/resources/browser-pools.d.ts.map +1 -1
  11. package/resources/browsers/browsers.d.mts +31 -9
  12. package/resources/browsers/browsers.d.mts.map +1 -1
  13. package/resources/browsers/browsers.d.ts +31 -9
  14. package/resources/browsers/browsers.d.ts.map +1 -1
  15. package/resources/browsers/browsers.js +2 -2
  16. package/resources/browsers/browsers.js.map +1 -1
  17. package/resources/browsers/browsers.mjs +2 -2
  18. package/resources/browsers/browsers.mjs.map +1 -1
  19. package/resources/browsers/index.d.mts +1 -1
  20. package/resources/browsers/index.d.mts.map +1 -1
  21. package/resources/browsers/index.d.ts +1 -1
  22. package/resources/browsers/index.d.ts.map +1 -1
  23. package/resources/browsers/index.js +4 -4
  24. package/resources/browsers/index.js.map +1 -1
  25. package/resources/browsers/index.mjs +1 -1
  26. package/resources/browsers/index.mjs.map +1 -1
  27. package/resources/browsers/playwright/executors.d.mts +95 -0
  28. package/resources/browsers/playwright/executors.d.mts.map +1 -0
  29. package/resources/browsers/playwright/executors.d.ts +95 -0
  30. package/resources/browsers/playwright/executors.d.ts.map +1 -0
  31. package/resources/browsers/playwright/executors.js +57 -0
  32. package/resources/browsers/playwright/executors.js.map +1 -0
  33. package/resources/browsers/playwright/executors.mjs +53 -0
  34. package/resources/browsers/playwright/executors.mjs.map +1 -0
  35. package/resources/browsers/playwright/index.d.mts +3 -0
  36. package/resources/browsers/playwright/index.d.mts.map +1 -0
  37. package/resources/browsers/playwright/index.d.ts +3 -0
  38. package/resources/browsers/playwright/index.d.ts.map +1 -0
  39. package/resources/browsers/playwright/index.js +9 -0
  40. package/resources/browsers/playwright/index.js.map +1 -0
  41. package/resources/browsers/playwright/index.mjs +4 -0
  42. package/resources/browsers/playwright/index.mjs.map +1 -0
  43. package/resources/browsers/playwright/playwright.d.mts +149 -0
  44. package/resources/browsers/playwright/playwright.d.mts.map +1 -0
  45. package/resources/browsers/playwright/playwright.d.ts +149 -0
  46. package/resources/browsers/playwright/playwright.d.ts.map +1 -0
  47. package/resources/browsers/playwright/playwright.js +76 -0
  48. package/resources/browsers/playwright/playwright.js.map +1 -0
  49. package/resources/browsers/playwright/playwright.mjs +71 -0
  50. package/resources/browsers/playwright/playwright.mjs.map +1 -0
  51. package/resources/browsers/playwright.d.mts +1 -68
  52. package/resources/browsers/playwright.d.mts.map +1 -1
  53. package/resources/browsers/playwright.d.ts +1 -68
  54. package/resources/browsers/playwright.d.ts.map +1 -1
  55. package/resources/browsers/playwright.js +2 -29
  56. package/resources/browsers/playwright.js.map +1 -1
  57. package/resources/browsers/playwright.mjs +1 -27
  58. package/resources/browsers/playwright.mjs.map +1 -1
  59. package/resources/browsers/telemetry.d.mts +17 -15
  60. package/resources/browsers/telemetry.d.mts.map +1 -1
  61. package/resources/browsers/telemetry.d.ts +17 -15
  62. package/resources/browsers/telemetry.d.ts.map +1 -1
  63. package/resources/invocations.d.mts +1 -1
  64. package/resources/invocations.d.mts.map +1 -1
  65. package/resources/invocations.d.ts +1 -1
  66. package/resources/invocations.d.ts.map +1 -1
  67. package/resources/search/search.d.mts +4 -2
  68. package/resources/search/search.d.mts.map +1 -1
  69. package/resources/search/search.d.ts +4 -2
  70. package/resources/search/search.d.ts.map +1 -1
  71. package/resources/search/search.js.map +1 -1
  72. package/resources/search/search.mjs.map +1 -1
  73. package/resources/vaults/items.d.mts +39 -26
  74. package/resources/vaults/items.d.mts.map +1 -1
  75. package/resources/vaults/items.d.ts +39 -26
  76. package/resources/vaults/items.d.ts.map +1 -1
  77. package/src/resources/auth/connections.ts +1 -1
  78. package/src/resources/browser-pools.ts +4 -4
  79. package/src/resources/browsers/browsers.ts +39 -8
  80. package/src/resources/browsers/index.ts +7 -1
  81. package/src/resources/browsers/playwright/executors.ts +123 -0
  82. package/src/resources/browsers/playwright/index.ts +10 -0
  83. package/src/resources/browsers/playwright/playwright.ts +186 -0
  84. package/src/resources/browsers/playwright.ts +1 -87
  85. package/src/resources/browsers/telemetry.ts +17 -14
  86. package/src/resources/invocations.ts +1 -1
  87. package/src/resources/search/search.ts +4 -2
  88. package/src/resources/vaults/items.ts +40 -26
  89. package/src/version.ts +1 -1
  90. package/version.d.mts +1 -1
  91. package/version.d.ts +1 -1
  92. package/version.js +1 -1
  93. package/version.mjs +1 -1
@@ -0,0 +1,123 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import { APIPromise } from '../../../core/api-promise';
5
+ import { buildHeaders } from '../../../internal/headers';
6
+ import { RequestOptions } from '../../../internal/request-options';
7
+ import { path } from '../../../internal/utils/path';
8
+
9
+ /**
10
+ * Execute Playwright code against the browser instance and manage the executors it runs in.
11
+ */
12
+ export class Executors extends APIResource {
13
+ /**
14
+ * Lists the default executor first, then the named executors created by POST
15
+ * /browsers/{id_or_name}/playwright/execute. Each entry reports whether a call is
16
+ * running on it and, for named executors, the target ID and URL of the tab it
17
+ * owns. Returns 404 for a browser whose image predates executors.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * const executorList =
22
+ * await client.browsers.playwright.executors.list(
23
+ * 'htzv5orfit78e1m2biiifpbv',
24
+ * );
25
+ * ```
26
+ */
27
+ list(idOrName: string, options?: RequestOptions): APIPromise<ExecutorList> {
28
+ return this._client.get(path`/browsers/${idOrName}/playwright/executors`, options);
29
+ }
30
+
31
+ /**
32
+ * Stops the executor's process. A call running on it fails with an error saying
33
+ * the executor was deleted. By default the executor's tab is closed too. The name
34
+ * can be reused; the next call with it creates a new executor and tab.
35
+ *
36
+ * The default executor is restarted instead of removed: its process is stopped, a
37
+ * call running on it fails with an error saying the executor was restarted, and
38
+ * queued and later calls run on a new process. It owns no tab, so 'close_tab' has
39
+ * no effect on it.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * await client.browsers.playwright.executors.delete(
44
+ * 'checkout',
45
+ * { id_or_name: 'htzv5orfit78e1m2biiifpbv' },
46
+ * );
47
+ * ```
48
+ */
49
+ delete(name: string, params: ExecutorDeleteParams, options?: RequestOptions): APIPromise<void> {
50
+ const { id_or_name, close_tab } = params;
51
+ return this._client.delete(path`/browsers/${id_or_name}/playwright/executors/${name}`, {
52
+ query: { close_tab },
53
+ ...options,
54
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
55
+ });
56
+ }
57
+ }
58
+
59
+ /**
60
+ * A Playwright executor on the browser
61
+ */
62
+ export interface Executor {
63
+ /**
64
+ * Whether a call is running on the executor
65
+ */
66
+ busy: boolean;
67
+
68
+ /**
69
+ * When the executor was created
70
+ */
71
+ created_at: string;
72
+
73
+ /**
74
+ * When the most recent call on the executor started
75
+ */
76
+ last_used_at: string;
77
+
78
+ /**
79
+ * Name of a Playwright executor. Calls with the same name run in the same
80
+ * executor, one at a time; the first call with a new name creates it. Calls on
81
+ * different executors run concurrently. 'default' names the executor that runs
82
+ * calls without a name.
83
+ */
84
+ name: string;
85
+
86
+ /**
87
+ * CDP page target ID of the executor's tab, once it has one. The default executor
88
+ * owns no tab.
89
+ */
90
+ target_id?: string;
91
+
92
+ /**
93
+ * Current URL of the executor's tab, when it is open
94
+ */
95
+ url?: string;
96
+ }
97
+
98
+ /**
99
+ * The default executor followed by the named executors
100
+ */
101
+ export interface ExecutorList {
102
+ executors: Array<Executor>;
103
+ }
104
+
105
+ export interface ExecutorDeleteParams {
106
+ /**
107
+ * Path param: Browser session ID or name
108
+ */
109
+ id_or_name: string;
110
+
111
+ /**
112
+ * Query param: Close the executor's tab. Defaults to true.
113
+ */
114
+ close_tab?: boolean;
115
+ }
116
+
117
+ export declare namespace Executors {
118
+ export {
119
+ type Executor as Executor,
120
+ type ExecutorList as ExecutorList,
121
+ type ExecutorDeleteParams as ExecutorDeleteParams,
122
+ };
123
+ }
@@ -0,0 +1,10 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Executors, type Executor, type ExecutorList, type ExecutorDeleteParams } from './executors';
4
+ export {
5
+ Playwright,
6
+ type ExecutorLimitError,
7
+ type Tab,
8
+ type PlaywrightExecuteResponse,
9
+ type PlaywrightExecuteParams,
10
+ } from './playwright';
@@ -0,0 +1,186 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as ExecutorsAPI from './executors';
5
+ import { Executor, ExecutorDeleteParams, ExecutorList, Executors } from './executors';
6
+ import { APIPromise } from '../../../core/api-promise';
7
+ import { RequestOptions } from '../../../internal/request-options';
8
+ import { path } from '../../../internal/utils/path';
9
+
10
+ /**
11
+ * Execute Playwright code against the browser instance and manage the executors it runs in.
12
+ */
13
+ export class Playwright extends APIResource {
14
+ executors: ExecutorsAPI.Executors = new ExecutorsAPI.Executors(this._client);
15
+
16
+ /**
17
+ * Execute arbitrary Playwright code in a fresh execution context against the
18
+ * browser. The code runs in the same VM as the browser, minimizing latency and
19
+ * maximizing throughput. It has access to 'page', 'context', 'browser', and
20
+ * 'webmcp' variables. Use 'webmcp.listTools()' to discover browser-wide WebMCP
21
+ * tools and 'webmcp.invokeTool(toolRef, input?, { timeoutSec? })' to invoke an
22
+ * exact registration. It can `return` a value, and this value is returned in the
23
+ * response.
24
+ *
25
+ * Every call runs in an executor: a dedicated Node.js process with its own browser
26
+ * connection. Calls on different executors run concurrently; calls on the same
27
+ * executor run one at a time. A timeout, crash, or blocked event loop in one
28
+ * executor does not affect other executors. After a timeout the executor keeps its
29
+ * process and drops its browser connection, so code abandoned by the timeout
30
+ * cannot keep driving the browser. After a crash or a blocked event loop, the next
31
+ * call on that executor starts a fresh process.
32
+ *
33
+ * Calls without 'executor' run in the executor named 'default', which always
34
+ * exists and is the same as passing 'executor: "default"'. In the default
35
+ * executor, 'page' is bound to an active tab reported by Chrome. In single-window
36
+ * sessions, this is the foreground tab. When multiple browser windows are open,
37
+ * Chrome reports one active tab per window and the selected window is unspecified.
38
+ * 'context' is the BrowserContext that owns the selected page. Use
39
+ * 'browser.contexts()' to select a context or page explicitly.
40
+ *
41
+ * Pass any other name to run the call in a named executor. The first call with a
42
+ * new name creates it. Each named executor owns a tab: its first call opens a new
43
+ * background tab in the default browser context, and 'page' is bound to that tab
44
+ * on every later call while it stays open. Opening it does not change the active
45
+ * tab of an existing window. If the tab is closed, the next call opens a new one
46
+ * and reports 'tab.created: true'. Executor code can still reach other tabs
47
+ * through 'context' and 'browser'; ownership only decides what 'page' is bound to.
48
+ * Use named executors to drive several tabs of one browser in parallel.
49
+ *
50
+ * A browser can have at most 8 named executors; the default executor does not
51
+ * count. A call that would create another returns 409 with the current executors;
52
+ * delete one with DELETE /browsers/{id_or_name}/playwright/executors/{name}. Named
53
+ * executors are not removed automatically while the browser runs; when it shuts
54
+ * down, they are removed and their tabs closed.
55
+ *
56
+ * A named call to a browser whose image predates executors fails with 400 instead
57
+ * of running on the active tab; calls without 'executor' keep working on every
58
+ * image.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * const response = await client.browsers.playwright.execute(
63
+ * 'htzv5orfit78e1m2biiifpbv',
64
+ * { code: 'code' },
65
+ * );
66
+ * ```
67
+ */
68
+ execute(
69
+ idOrName: string,
70
+ body: PlaywrightExecuteParams,
71
+ options?: RequestOptions,
72
+ ): APIPromise<PlaywrightExecuteResponse> {
73
+ return this._client.post(path`/browsers/${idOrName}/playwright/execute`, { body, ...options });
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Returned when a call would create a named executor beyond the per-browser limit
79
+ */
80
+ export interface ExecutorLimitError {
81
+ /**
82
+ * The default executor and the named executors that already exist
83
+ */
84
+ executors: Array<ExecutorsAPI.Executor>;
85
+
86
+ /**
87
+ * Human-readable error description
88
+ */
89
+ message: string;
90
+ }
91
+
92
+ /**
93
+ * The tab 'page' was bound to for this call. Absent if the call failed before
94
+ * binding a tab.
95
+ */
96
+ export interface Tab {
97
+ /**
98
+ * Whether this call opened the tab. For a named executor this happens on its first
99
+ * call and after its previous tab was closed. For the default executor it happens
100
+ * only when the browser had no open page.
101
+ */
102
+ created: boolean;
103
+
104
+ /**
105
+ * CDP page target ID of the tab
106
+ */
107
+ target_id: string;
108
+ }
109
+
110
+ /**
111
+ * Result of Playwright code execution
112
+ */
113
+ export interface PlaywrightExecuteResponse {
114
+ /**
115
+ * Whether the code executed successfully
116
+ */
117
+ success: boolean;
118
+
119
+ /**
120
+ * Error message if execution failed
121
+ */
122
+ error?: string;
123
+
124
+ /**
125
+ * The value returned by the code (if any)
126
+ */
127
+ result?: unknown;
128
+
129
+ /**
130
+ * Standard error from the execution
131
+ */
132
+ stderr?: string;
133
+
134
+ /**
135
+ * Standard output from the execution
136
+ */
137
+ stdout?: string;
138
+
139
+ /**
140
+ * The tab 'page' was bound to for this call. Absent if the call failed before
141
+ * binding a tab.
142
+ */
143
+ tab?: Tab;
144
+ }
145
+
146
+ export interface PlaywrightExecuteParams {
147
+ /**
148
+ * TypeScript/JavaScript code to execute. The code has access to 'page', 'context',
149
+ * and 'browser' variables. It runs within a function, so you can use a return
150
+ * statement at the end to return a value. This value is returned as the `result`
151
+ * property in the response. Example: "await page.goto('https://example.com');
152
+ * return await page.title();"
153
+ */
154
+ code: string;
155
+
156
+ /**
157
+ * Name of a Playwright executor. Calls with the same name run in the same
158
+ * executor, one at a time; the first call with a new name creates it. Calls on
159
+ * different executors run concurrently. 'default' names the executor that runs
160
+ * calls without a name.
161
+ */
162
+ executor?: string;
163
+
164
+ /**
165
+ * Maximum execution time in seconds. Default is 60.
166
+ */
167
+ timeout_sec?: number;
168
+ }
169
+
170
+ Playwright.Executors = Executors;
171
+
172
+ export declare namespace Playwright {
173
+ export {
174
+ type ExecutorLimitError as ExecutorLimitError,
175
+ type Tab as Tab,
176
+ type PlaywrightExecuteResponse as PlaywrightExecuteResponse,
177
+ type PlaywrightExecuteParams as PlaywrightExecuteParams,
178
+ };
179
+
180
+ export {
181
+ Executors as Executors,
182
+ type Executor as Executor,
183
+ type ExecutorList as ExecutorList,
184
+ type ExecutorDeleteParams as ExecutorDeleteParams,
185
+ };
186
+ }
@@ -1,89 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../core/resource';
4
- import { APIPromise } from '../../core/api-promise';
5
- import { RequestOptions } from '../../internal/request-options';
6
- import { path } from '../../internal/utils/path';
7
-
8
- /**
9
- * Execute Playwright code against the browser instance.
10
- */
11
- export class Playwright extends APIResource {
12
- /**
13
- * Execute arbitrary Playwright code in a fresh execution context against the
14
- * browser. The code runs in the same VM as the browser, minimizing latency and
15
- * maximizing throughput. It has access to 'page', 'context', 'browser', and
16
- * 'webmcp' variables. Use 'webmcp.listTools()' to discover browser-wide WebMCP
17
- * tools and 'webmcp.invokeTool(toolRef, input?, { timeoutSec? })' to invoke an
18
- * exact registration. It can `return` a value, and this value is returned in the
19
- * response.
20
- *
21
- * @example
22
- * ```ts
23
- * const response = await client.browsers.playwright.execute(
24
- * 'htzv5orfit78e1m2biiifpbv',
25
- * { code: 'code' },
26
- * );
27
- * ```
28
- */
29
- execute(
30
- idOrName: string,
31
- body: PlaywrightExecuteParams,
32
- options?: RequestOptions,
33
- ): APIPromise<PlaywrightExecuteResponse> {
34
- return this._client.post(path`/browsers/${idOrName}/playwright/execute`, { body, ...options });
35
- }
36
- }
37
-
38
- /**
39
- * Result of Playwright code execution
40
- */
41
- export interface PlaywrightExecuteResponse {
42
- /**
43
- * Whether the code executed successfully
44
- */
45
- success: boolean;
46
-
47
- /**
48
- * Error message if execution failed
49
- */
50
- error?: string;
51
-
52
- /**
53
- * The value returned by the code (if any)
54
- */
55
- result?: unknown;
56
-
57
- /**
58
- * Standard error from the execution
59
- */
60
- stderr?: string;
61
-
62
- /**
63
- * Standard output from the execution
64
- */
65
- stdout?: string;
66
- }
67
-
68
- export interface PlaywrightExecuteParams {
69
- /**
70
- * TypeScript/JavaScript code to execute. The code has access to 'page', 'context',
71
- * and 'browser' variables. It runs within a function, so you can use a return
72
- * statement at the end to return a value. This value is returned as the `result`
73
- * property in the response. Example: "await page.goto('https://example.com');
74
- * return await page.title();"
75
- */
76
- code: string;
77
-
78
- /**
79
- * Maximum execution time in seconds. Default is 60.
80
- */
81
- timeout_sec?: number;
82
- }
83
-
84
- export declare namespace Playwright {
85
- export {
86
- type PlaywrightExecuteResponse as PlaywrightExecuteResponse,
87
- type PlaywrightExecuteParams as PlaywrightExecuteParams,
88
- };
89
- }
3
+ export * from './playwright/index';
@@ -4325,12 +4325,13 @@ export namespace BrowserPlatformAPICallEvent {
4325
4325
 
4326
4326
  /**
4327
4327
  * A branded proxy-layer failure observed by the browser. Emitted when the metro
4328
- * egress host-proxy serves a branded 5xx error page whose response carries the
4329
- * X-Kernel-Proxy-Error header. Low-volume and carries a typed code. Its value is
4330
- * per-session and per-URL attribution for sessions that already capture the
4331
- * network stream: proxy failures are only observable while the CDP network
4332
- * collector is running, so this is an opt-in refinement of the raw network events
4333
- * rather than a default-on alerting signal.
4328
+ * egress host-proxy serves a branded error page whose response carries the
4329
+ * X-Kernel-Proxy-Error header: a 502 for proxy-layer failures, or a 403 when the
4330
+ * session's network policy blocks the destination. Low-volume and carries a typed
4331
+ * code. Its value is per-session and per-URL attribution for sessions that already
4332
+ * capture the network stream: proxy failures are only observable while the CDP
4333
+ * network collector is running, so this is an opt-in refinement of the raw network
4334
+ * events rather than a default-on alerting signal.
4334
4335
  */
4335
4336
  export interface BrowserProxyErrorEvent {
4336
4337
  category: 'network';
@@ -4369,17 +4370,18 @@ export namespace BrowserProxyErrorEvent {
4369
4370
  export interface Data extends TelemetryAPI.BrowserEventContext {
4370
4371
  /**
4371
4372
  * Proxy-layer error code: the X-Kernel-Proxy-Error response header value from a
4372
- * branded 5xx error page served by the metro egress host-proxy. Values mirror what
4373
- * the proxy emits: destination_blocked, destination_route_unavailable,
4374
- * provider_blacklisted, provider_unreachable, provider_rejected,
4375
- * origin_tls_timeout, origin_response_incomplete, proxy_unavailable,
4376
- * restricted_route_unavailable, upstream_timeout, upstream_dns_failure,
4377
- * upstream_connect_failed. A header value the browser image does not recognize is
4378
- * reported as unknown, with the header value in raw_code.
4373
+ * branded error page served by the metro egress host-proxy. Values mirror what the
4374
+ * proxy emits: destination_blocked, destination_route_unavailable,
4375
+ * network_policy_denied, provider_blacklisted, provider_unreachable,
4376
+ * provider_rejected, origin_tls_timeout, origin_response_incomplete,
4377
+ * proxy_unavailable, restricted_route_unavailable, upstream_timeout,
4378
+ * upstream_dns_failure, upstream_connect_failed. A header value the browser image
4379
+ * does not recognize is reported as unknown, with the header value in raw_code.
4379
4380
  */
4380
4381
  code:
4381
4382
  | 'destination_blocked'
4382
4383
  | 'destination_route_unavailable'
4384
+ | 'network_policy_denied'
4383
4385
  | 'provider_blacklisted'
4384
4386
  | 'provider_unreachable'
4385
4387
  | 'provider_rejected'
@@ -4398,7 +4400,8 @@ export namespace BrowserProxyErrorEvent {
4398
4400
  request_id: string;
4399
4401
 
4400
4402
  /**
4401
- * HTTP response status of the branded error page (502).
4403
+ * HTTP response status of the branded error page (502, or 403 for
4404
+ * network_policy_denied).
4402
4405
  */
4403
4406
  status: number;
4404
4407
 
@@ -471,7 +471,7 @@ export namespace InvocationListBrowsersResponse {
471
471
  /**
472
472
  * Geographic region of the browser session. Fixed once the session is created.
473
473
  */
474
- region: 'us-east' | 'eu-west' | 'ap-southeast';
474
+ region: 'us-east' | 'us-west' | 'eu-west' | 'ap-southeast';
475
475
 
476
476
  /**
477
477
  * Unique identifier for the browser session
@@ -202,7 +202,8 @@ export namespace ProviderTarget {
202
202
  */
203
203
  export interface Contents {
204
204
  /**
205
- * Return query-relevant provider excerpts.
205
+ * Return query-relevant provider excerpts. Defaults to true for Exa search
206
+ * requests; set false to disable.
206
207
  */
207
208
  highlights?: boolean;
208
209
 
@@ -255,7 +256,8 @@ export namespace ProviderTarget {
255
256
  query?: Array<string>;
256
257
 
257
258
  /**
258
- * Provider context size supported by the selected model.
259
+ * Amount of page content Perplexity extracts per result. Defaults to medium unless
260
+ * max_tokens or max_tokens_per_page is set.
259
261
  */
260
262
  search_context_size?: 'low' | 'medium' | 'high';
261
263
 
@@ -1123,22 +1123,24 @@ export interface FillVaultItemOperationResult {
1123
1123
  /**
1124
1124
  * A ready Kernel card retains its encrypted network token and one-time code for
1125
1125
  * the fill operation until the item's expires_at. Fill and submit checkout before
1126
- * then. Visa cards can be enrolled, but Visa purchases are not yet supported and
1127
- * authorize returns 400; supported Mastercard purchases need no cardholder
1128
- * approval. masks.last4 is the enrolled card's last four digits; masks.token_last4
1129
- * is the network token's last four digits shown to the merchant. Kernel cards do
1130
- * not expose aliases or support egress substitution. Kernel does not observe
1131
- * whether the merchant charged the card.
1126
+ * then. Visa purchases require a spend_approval action before the code is issued;
1127
+ * Mastercard purchases need no hosted approval. masks.last4 is the enrolled card's
1128
+ * last four digits; masks.token_last4 is the network token's last four digits
1129
+ * shown to the merchant. Kernel cards do not expose aliases or support egress
1130
+ * substitution. Kernel does not observe whether the merchant charged the card.
1132
1131
  */
1133
1132
  export interface KernelCardState {
1134
1133
  provider: 'kernel';
1135
1134
 
1136
1135
  /**
1137
- * recovery_required means issuing the one-time code has an unresolved outcome.
1138
- * Kernel never issues another code for the item automatically, and the item cannot
1139
- * be deleted or replaced until the original attempt is reconciled with support.
1140
- * When status_reason says the provider refused retrieval before acceptance, no
1141
- * code was issued and a later read retries.
1136
+ * pending_authorization on a Visa purchase waits for the cardholder to approve it
1137
+ * through the spend_approval action; an unused link expires after 30 minutes.
1138
+ * recovery_required means approving the purchase or issuing the one-time code has
1139
+ * an unresolved outcome. Kernel never approves again or issues another code for
1140
+ * the item automatically, and the item cannot be deleted or replaced until the
1141
+ * original attempt is reconciled with support. When status_reason says the
1142
+ * provider refused retrieval before acceptance, no code was issued and a later
1143
+ * read retries. declined means the card network refused to issue a code.
1142
1144
  */
1143
1145
  status:
1144
1146
  | 'requested'
@@ -1179,10 +1181,12 @@ export namespace KernelCardState {
1179
1181
  * network token number, expiry and one-time 3-digit code. They are stored
1180
1182
  * encrypted for the fill operation, which types them only on merchant_url's
1181
1183
  * origin; the merchant's own checkout submits the payment. The one-time code is
1182
- * valid until the item's expires_at; fill and submit checkout before then. Visa
1183
- * cards can be enrolled, but Visa purchases are not yet supported: authorize
1184
- * returns 400. Supported Mastercard purchases need no cardholder approval. Card
1185
- * updates are not supported; delete and create a new item instead.
1184
+ * valid until the item's expires_at; fill and submit checkout before then.
1185
+ * Mastercard purchases need no cardholder approval. A Visa purchase returns a
1186
+ * spend_approval action: the cardholder approves it with a Visa passkey, and
1187
+ * Kernel registers a Visa intent for one transaction up to the amount before
1188
+ * issuing the code. Card updates are not supported; delete and create a new item
1189
+ * instead.
1186
1190
  */
1187
1191
  export interface KernelCardVaultItemSpec {
1188
1192
  /**
@@ -1210,6 +1214,12 @@ export interface KernelCardVaultItemSpec {
1210
1214
  * Key of the Kernel wallet item whose enrolled card pays.
1211
1215
  */
1212
1216
  wallet: string;
1217
+
1218
+ /**
1219
+ * The merchant's ISO 3166-1 alpha-2 country code. Required for Visa cards, whose
1220
+ * one-time code is issued for the merchant's country.
1221
+ */
1222
+ merchant_country?: string;
1213
1223
  }
1214
1224
 
1215
1225
  export interface KernelCredentialVaultItemSpec {
@@ -1273,10 +1283,11 @@ export interface KernelWalletState {
1273
1283
 
1274
1284
  /**
1275
1285
  * pending_authorization asks the cardholder to use the card_enrollment action.
1276
- * connected is ready for supported purchases. reconnect_required asks the
1277
- * cardholder to use a new card_enrollment action after an uncertain enrollment was
1278
- * safely removed. degraded means the enrollment outcome is unknown and the wallet
1279
- * must be deleted before adding another card.
1286
+ * connected means the card is stored; it can pay once payment_methods reports
1287
+ * capabilities.single_use_card.eligible. reconnect_required asks the cardholder to
1288
+ * use a new card_enrollment action after an uncertain enrollment was safely
1289
+ * removed. degraded means the enrollment outcome is unknown and the wallet must be
1290
+ * deleted before adding another card.
1280
1291
  */
1281
1292
  status: 'pending_authorization' | 'connected' | 'reconnect_required' | 'degraded';
1282
1293
 
@@ -1284,13 +1295,16 @@ export interface KernelWalletState {
1284
1295
  }
1285
1296
 
1286
1297
  /**
1287
- * One card Kernel enrolls for Visa or Mastercard agentic network tokens using
1288
- * Kernel-managed credentials. Creation returns a card_enrollment action: the
1289
- * cardholder enters the card and their email on a Kernel-hosted page, then Kernel
1290
- * enrolls the securely stored card. The card number never reaches Kernel. The
1291
- * connected wallet's payment_methods expansion lists the enrolled card. Visa cards
1292
- * can be enrolled, but Visa purchases are not yet supported: authorize
1293
- * returns 400.
1298
+ * One card stored with Kernel-managed credentials. Creation returns a
1299
+ * card*enrollment action: the cardholder enters the card and their email on a
1300
+ * Kernel-hosted page, and the wallet connects once the card is stored. Kernel then
1301
+ * enrolls it for an agentic network token when the issuer supports it. The card
1302
+ * number never reaches Kernel. The connected wallet's payment_methods expansion
1303
+ * lists the card; capabilities.single_use_card.eligible is false, with a
1304
+ * network_token*\* reason, until the card has a network token, and authorize
1305
+ * returns 400 for such a card. Visa purchases require the cardholder to complete a
1306
+ * spend_approval action before Kernel issues a one-time code; Mastercard purchases
1307
+ * need no hosted approval.
1294
1308
  */
1295
1309
  export interface KernelWalletVaultItemSpec {
1296
1310
  provider: 'kernel';
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.119.0'; // x-release-please-version
1
+ export const VERSION = '0.120.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.119.0";
1
+ export declare const VERSION = "0.120.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.119.0";
1
+ export declare const VERSION = "0.120.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.119.0'; // x-release-please-version
4
+ exports.VERSION = '0.120.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.119.0'; // x-release-please-version
1
+ export const VERSION = '0.120.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map