@onkernel/sdk 0.114.0 → 0.115.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.
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/resources/search/search.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,mEAA0C;AAC1C,4CAAyG;AACzG,qEAA4C;AAC5C,8CAA4F;AAG5F,uDAAiD;AAEjD;;GAEG;AACH,MAAa,cAAe,SAAQ,sBAAW;IAA/C;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoC/E,CAAC;IAlCC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;CACF;AAtCD,wCAsCC;AAq4CD,cAAc,CAAC,QAAQ,GAAG,mBAAmB,CAAC;AAC9C,cAAc,CAAC,SAAS,GAAG,qBAAS,CAAC"}
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/resources/search/search.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,mEAA0C;AAC1C,4CAAyG;AACzG,qEAA4C;AAC5C,8CAA4F;AAG5F,uDAAiD;AAEjD;;GAEG;AACH,MAAa,cAAe,SAAQ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;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;CACF;AAm5CD,cAAc,CAAC,QAAQ,GAAG,mBAAmB,CAAC;AAC9C,cAAc,CAAC,SAAS,GAAG,SAAS,CAAC"}
@@ -3,7 +3,6 @@
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as SearchAPI from './search';
5
5
  import { APIPromise } from '../../core/api-promise';
6
- import { buildHeaders } from '../../internal/headers';
7
6
  import { RequestOptions } from '../../internal/request-options';
8
7
  import { path } from '../../internal/utils/path';
9
8
 
@@ -12,21 +11,25 @@ import { path } from '../../internal/utils/path';
12
11
  */
13
12
  export class Contents extends APIResource {
14
13
  /**
15
- * Deferred result-content retrieval is reserved but not available in this release.
16
- * Requests return 404 until the retrieval implementation is shipped. X-Request-Id
17
- * identifies this request separately from the search resource.
14
+ * Retrieves selected results from a retained search. Provide exactly one of
15
+ * result_ids or limit; the latter fetches the top results. Content defaults to
16
+ * source:auto. Responses preserve result_ids order. Unknown result IDs are
17
+ * rejected before retrieval starts. Missing, expired, or inaccessible searches
18
+ * return 404. Once retrieval begins, return one outcome per selected result,
19
+ * including timeout entries for work unfinished at the overall deadline. Browser
20
+ * retrievals run sequentially in result order, so later results may time out when
21
+ * earlier pages are slow. X-Request-Id identifies this request separately from the
22
+ * search resource.
18
23
  *
19
24
  * @example
20
25
  * ```ts
21
- * await client.search.contents.fetch('srch_abc123');
26
+ * const response = await client.search.contents.fetch(
27
+ * 'srch_abc123',
28
+ * );
22
29
  * ```
23
30
  */
24
- fetch(id: string, body: ContentFetchParams, options?: RequestOptions): APIPromise<void> {
25
- return this._client.post(path`/search/${id}/contents`, {
26
- body,
27
- ...options,
28
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
29
- });
31
+ fetch(id: string, body: ContentFetchParams, options?: RequestOptions): APIPromise<Response> {
32
+ return this._client.post(path`/search/${id}/contents`, { body, ...options });
30
33
  }
31
34
  }
32
35
 
@@ -60,36 +63,37 @@ export namespace FetchRequest {
60
63
  */
61
64
  export interface Content {
62
65
  /**
63
- * Invalid with source=provider. Supplying browser_id requires source=browser so
64
- * the chosen identity is not bypassed.
66
+ * Requires source=auto or source=browser in deferred retrieval.
65
67
  */
66
68
  browser?: Content.Browser;
67
69
 
68
70
  format?: 'markdown' | 'text';
69
71
 
70
72
  /**
71
- * Maximum acceptable age of cached page content, measured from origin retrieval. 0
72
- * forces a live fetch. Governs the Kernel content cache, which is scoped to the
73
- * caller organization and project and separated by retrieval context; fetches
74
- * through a caller-supplied browser_id bypass that cache. Mapped to the provider
75
- * freshness control when source is provider and the provider supports one;
76
- * otherwise provider content age is reported as unknown via fetched_at.
73
+ * For source=auto, maximum acceptable age of retained provider content, measured
74
+ * from when the search received it from the provider. A value of 0 disables reuse
75
+ * of retained content, so every result is fetched through a browser.
76
+ * source=provider reuses retained provider content without freshness validation.
77
+ * source=browser always fetches through a browser and does not use this age limit.
77
78
  */
78
79
  max_age_hours?: number;
79
80
 
80
81
  /**
81
- * Per-result Unicode character limit after extraction.
82
+ * Per-result Unicode character limit after extraction. Retained provider content
83
+ * cannot exceed what was stored at search time; such results report truncated when
84
+ * the stored text was already truncated.
82
85
  */
83
86
  max_chars?: number;
84
87
 
85
88
  /**
86
- * provider uses the search provider's native content retrieval; browser fetches
87
- * each URL through a Kernel browser; auto prefers Kernel browser retrieval and
88
- * falls back to provider-native content when browser retrieval is unavailable or
89
- * unsuitable. Defaults to auto for both inline and deferred retrieval. Deferred
90
- * provider retrieval requires post_hoc capability; an explicit provider source
91
- * without it is a 400. Missing documents produce per-result unavailable outcomes,
92
- * not request failures.
89
+ * auto uses retained provider content within max_age_hours; for deferred retrieval
90
+ * it falls back to a Kernel browser (caller-supplied or temporary) for results
91
+ * without it. Inline retrieval never uses a browser. provider reuses retained
92
+ * provider content when available, without freshness validation, and never
93
+ * provisions a browser. browser fetches each URL through a Kernel browser, either
94
+ * caller-supplied or temporary. No option makes a new provider request. Defaults
95
+ * to auto for both inline and deferred retrieval. Missing documents produce
96
+ * per-result unavailable outcomes, not request failures.
93
97
  */
94
98
  source?: 'auto' | 'provider' | 'browser';
95
99
 
@@ -102,17 +106,22 @@ export namespace FetchRequest {
102
106
 
103
107
  export namespace Content {
104
108
  /**
105
- * Invalid with source=provider. Supplying browser_id requires source=browser so
106
- * the chosen identity is not bypassed.
109
+ * Requires source=auto or source=browser in deferred retrieval.
107
110
  */
108
111
  export interface Browser {
109
112
  /**
110
113
  * Existing browser session ID authorized for the caller and selected project.
111
- * Reuses its cookies, proxy, and browser configuration. Kernel does not delete a
112
- * caller-supplied browser. Render mode uses a temporary tab; website activity may
113
- * still change shared cookies and storage. When omitted, Kernel obtains isolated
114
- * browser capacity in the caller's account and releases it after retrieval. That
115
- * capacity is not retained for later interaction. Existing browser quotas apply.
114
+ * Reuses its cookies, proxy, and browser configuration; requests follow that
115
+ * browser's existing network access behavior, with no additional destination
116
+ * allowlist in this endpoint. Kernel does not delete a caller-supplied browser.
117
+ * Render mode uses a temporary tab; website activity may still change shared
118
+ * cookies and storage. When omitted and any result needs browser retrieval, Kernel
119
+ * creates one temporary browser for the request using the dashboard launch
120
+ * defaults (headful, stealth, default proxy), tags it with search_id, and deletes
121
+ * it when the request finishes. It is billed and counts toward browser concurrency
122
+ * like any other browser. A concurrency rejection returns 429 for source=browser;
123
+ * for source=auto, results with retained content are still returned and the rest
124
+ * report the rejection.
116
125
  */
117
126
  browser_id?: string;
118
127
 
@@ -154,7 +163,9 @@ export namespace Response {
154
163
  url: string;
155
164
 
156
165
  /**
157
- * Kernel cache outcome. Provider-internal cache behavior may be unknown.
166
+ * Kernel content cache outcome. Kernel has no content cache yet: responses report
167
+ * bypass or unknown, and hit and miss are reserved. Provider-internal cache
168
+ * behavior may be unknown.
158
169
  */
159
170
  cache_status?: 'hit' | 'miss' | 'bypass' | 'unknown';
160
171
 
@@ -172,15 +183,21 @@ export namespace Response {
172
183
  extractor_version?: string;
173
184
 
174
185
  /**
175
- * Origin retrieval time when known, not cache read time.
186
+ * When Kernel fetched the content, or received it from the provider for retained
187
+ * content.
176
188
  */
177
189
  fetched_at?: string | null;
178
190
 
179
191
  /**
180
- * Final retrieval URL when known.
192
+ * Final retrieval URL after redirects when known. Curl mode follows up to 5
193
+ * redirects.
181
194
  */
182
195
  final_url?: string;
183
196
 
197
+ /**
198
+ * Format of text. Plain-text and JSON pages are returned unchanged as text even
199
+ * when markdown was requested.
200
+ */
184
201
  format?: 'markdown' | 'text';
185
202
 
186
203
  /**
@@ -189,7 +206,7 @@ export namespace Response {
189
206
  http_status?: number;
190
207
 
191
208
  /**
192
- * Original retrieval method, including on cache hits.
209
+ * Original retrieval method.
193
210
  */
194
211
  method?: 'provider' | 'browser_curl' | 'browser_render';
195
212
 
@@ -200,7 +217,8 @@ export namespace Response {
200
217
  text?: string;
201
218
 
202
219
  /**
203
- * Whether max_chars truncated the extracted content.
220
+ * Whether the content was cut short, by max_chars or because the page exceeded the
221
+ * 1 MiB read limit.
204
222
  */
205
223
  truncated?: boolean;
206
224
  }
@@ -252,36 +270,37 @@ export namespace ContentFetchParams {
252
270
  */
253
271
  export interface Content {
254
272
  /**
255
- * Invalid with source=provider. Supplying browser_id requires source=browser so
256
- * the chosen identity is not bypassed.
273
+ * Requires source=auto or source=browser in deferred retrieval.
257
274
  */
258
275
  browser?: Content.Browser;
259
276
 
260
277
  format?: 'markdown' | 'text';
261
278
 
262
279
  /**
263
- * Maximum acceptable age of cached page content, measured from origin retrieval. 0
264
- * forces a live fetch. Governs the Kernel content cache, which is scoped to the
265
- * caller organization and project and separated by retrieval context; fetches
266
- * through a caller-supplied browser_id bypass that cache. Mapped to the provider
267
- * freshness control when source is provider and the provider supports one;
268
- * otherwise provider content age is reported as unknown via fetched_at.
280
+ * For source=auto, maximum acceptable age of retained provider content, measured
281
+ * from when the search received it from the provider. A value of 0 disables reuse
282
+ * of retained content, so every result is fetched through a browser.
283
+ * source=provider reuses retained provider content without freshness validation.
284
+ * source=browser always fetches through a browser and does not use this age limit.
269
285
  */
270
286
  max_age_hours?: number;
271
287
 
272
288
  /**
273
- * Per-result Unicode character limit after extraction.
289
+ * Per-result Unicode character limit after extraction. Retained provider content
290
+ * cannot exceed what was stored at search time; such results report truncated when
291
+ * the stored text was already truncated.
274
292
  */
275
293
  max_chars?: number;
276
294
 
277
295
  /**
278
- * provider uses the search provider's native content retrieval; browser fetches
279
- * each URL through a Kernel browser; auto prefers Kernel browser retrieval and
280
- * falls back to provider-native content when browser retrieval is unavailable or
281
- * unsuitable. Defaults to auto for both inline and deferred retrieval. Deferred
282
- * provider retrieval requires post_hoc capability; an explicit provider source
283
- * without it is a 400. Missing documents produce per-result unavailable outcomes,
284
- * not request failures.
296
+ * auto uses retained provider content within max_age_hours; for deferred retrieval
297
+ * it falls back to a Kernel browser (caller-supplied or temporary) for results
298
+ * without it. Inline retrieval never uses a browser. provider reuses retained
299
+ * provider content when available, without freshness validation, and never
300
+ * provisions a browser. browser fetches each URL through a Kernel browser, either
301
+ * caller-supplied or temporary. No option makes a new provider request. Defaults
302
+ * to auto for both inline and deferred retrieval. Missing documents produce
303
+ * per-result unavailable outcomes, not request failures.
285
304
  */
286
305
  source?: 'auto' | 'provider' | 'browser';
287
306
 
@@ -294,17 +313,22 @@ export namespace ContentFetchParams {
294
313
 
295
314
  export namespace Content {
296
315
  /**
297
- * Invalid with source=provider. Supplying browser_id requires source=browser so
298
- * the chosen identity is not bypassed.
316
+ * Requires source=auto or source=browser in deferred retrieval.
299
317
  */
300
318
  export interface Browser {
301
319
  /**
302
320
  * Existing browser session ID authorized for the caller and selected project.
303
- * Reuses its cookies, proxy, and browser configuration. Kernel does not delete a
304
- * caller-supplied browser. Render mode uses a temporary tab; website activity may
305
- * still change shared cookies and storage. When omitted, Kernel obtains isolated
306
- * browser capacity in the caller's account and releases it after retrieval. That
307
- * capacity is not retained for later interaction. Existing browser quotas apply.
321
+ * Reuses its cookies, proxy, and browser configuration; requests follow that
322
+ * browser's existing network access behavior, with no additional destination
323
+ * allowlist in this endpoint. Kernel does not delete a caller-supplied browser.
324
+ * Render mode uses a temporary tab; website activity may still change shared
325
+ * cookies and storage. When omitted and any result needs browser retrieval, Kernel
326
+ * creates one temporary browser for the request using the dashboard launch
327
+ * defaults (headful, stealth, default proxy), tags it with search_id, and deletes
328
+ * it when the request finishes. It is billed and counts toward browser concurrency
329
+ * like any other browser. A concurrency rejection returns 429 for source=browser;
330
+ * for source=auto, results with retained content are still returned and the rest
331
+ * report the rejection.
308
332
  */
309
333
  browser_id?: string;
310
334
 
@@ -938,36 +938,37 @@ export interface Request {
938
938
  export namespace Request {
939
939
  export interface SearchContentOptions {
940
940
  /**
941
- * Invalid with source=provider. Supplying browser_id requires source=browser so
942
- * the chosen identity is not bypassed.
941
+ * Requires source=auto or source=browser in deferred retrieval.
943
942
  */
944
943
  browser?: SearchContentOptions.Browser;
945
944
 
946
945
  format?: 'markdown' | 'text';
947
946
 
948
947
  /**
949
- * Maximum acceptable age of cached page content, measured from origin retrieval. 0
950
- * forces a live fetch. Governs the Kernel content cache, which is scoped to the
951
- * caller organization and project and separated by retrieval context; fetches
952
- * through a caller-supplied browser_id bypass that cache. Mapped to the provider
953
- * freshness control when source is provider and the provider supports one;
954
- * otherwise provider content age is reported as unknown via fetched_at.
948
+ * For source=auto, maximum acceptable age of retained provider content, measured
949
+ * from when the search received it from the provider. A value of 0 disables reuse
950
+ * of retained content, so every result is fetched through a browser.
951
+ * source=provider reuses retained provider content without freshness validation.
952
+ * source=browser always fetches through a browser and does not use this age limit.
955
953
  */
956
954
  max_age_hours?: number;
957
955
 
958
956
  /**
959
- * Per-result Unicode character limit after extraction.
957
+ * Per-result Unicode character limit after extraction. Retained provider content
958
+ * cannot exceed what was stored at search time; such results report truncated when
959
+ * the stored text was already truncated.
960
960
  */
961
961
  max_chars?: number;
962
962
 
963
963
  /**
964
- * provider uses the search provider's native content retrieval; browser fetches
965
- * each URL through a Kernel browser; auto prefers Kernel browser retrieval and
966
- * falls back to provider-native content when browser retrieval is unavailable or
967
- * unsuitable. Defaults to auto for both inline and deferred retrieval. Deferred
968
- * provider retrieval requires post_hoc capability; an explicit provider source
969
- * without it is a 400. Missing documents produce per-result unavailable outcomes,
970
- * not request failures.
964
+ * auto uses retained provider content within max_age_hours; for deferred retrieval
965
+ * it falls back to a Kernel browser (caller-supplied or temporary) for results
966
+ * without it. Inline retrieval never uses a browser. provider reuses retained
967
+ * provider content when available, without freshness validation, and never
968
+ * provisions a browser. browser fetches each URL through a Kernel browser, either
969
+ * caller-supplied or temporary. No option makes a new provider request. Defaults
970
+ * to auto for both inline and deferred retrieval. Missing documents produce
971
+ * per-result unavailable outcomes, not request failures.
971
972
  */
972
973
  source?: 'auto' | 'provider' | 'browser';
973
974
 
@@ -980,17 +981,22 @@ export namespace Request {
980
981
 
981
982
  export namespace SearchContentOptions {
982
983
  /**
983
- * Invalid with source=provider. Supplying browser_id requires source=browser so
984
- * the chosen identity is not bypassed.
984
+ * Requires source=auto or source=browser in deferred retrieval.
985
985
  */
986
986
  export interface Browser {
987
987
  /**
988
988
  * Existing browser session ID authorized for the caller and selected project.
989
- * Reuses its cookies, proxy, and browser configuration. Kernel does not delete a
990
- * caller-supplied browser. Render mode uses a temporary tab; website activity may
991
- * still change shared cookies and storage. When omitted, Kernel obtains isolated
992
- * browser capacity in the caller's account and releases it after retrieval. That
993
- * capacity is not retained for later interaction. Existing browser quotas apply.
989
+ * Reuses its cookies, proxy, and browser configuration; requests follow that
990
+ * browser's existing network access behavior, with no additional destination
991
+ * allowlist in this endpoint. Kernel does not delete a caller-supplied browser.
992
+ * Render mode uses a temporary tab; website activity may still change shared
993
+ * cookies and storage. When omitted and any result needs browser retrieval, Kernel
994
+ * creates one temporary browser for the request using the dashboard launch
995
+ * defaults (headful, stealth, default proxy), tags it with search_id, and deletes
996
+ * it when the request finishes. It is billed and counts toward browser concurrency
997
+ * like any other browser. A concurrency rejection returns 429 for source=browser;
998
+ * for source=auto, results with retained content are still returned and the rest
999
+ * report the rejection.
994
1000
  */
995
1001
  browser_id?: string;
996
1002
 
@@ -1070,7 +1076,9 @@ export namespace Result {
1070
1076
  status: 'ok' | 'unavailable' | 'blocked' | 'timeout' | 'unsupported_type' | 'extraction_failed' | 'error';
1071
1077
 
1072
1078
  /**
1073
- * Kernel cache outcome. Provider-internal cache behavior may be unknown.
1079
+ * Kernel content cache outcome. Kernel has no content cache yet: responses report
1080
+ * bypass or unknown, and hit and miss are reserved. Provider-internal cache
1081
+ * behavior may be unknown.
1074
1082
  */
1075
1083
  cache_status?: 'hit' | 'miss' | 'bypass' | 'unknown';
1076
1084
 
@@ -1088,7 +1096,7 @@ export namespace Result {
1088
1096
  extractor_version?: string;
1089
1097
 
1090
1098
  /**
1091
- * Origin retrieval time when known, not cache read time.
1099
+ * When Kernel received the content from the provider.
1092
1100
  */
1093
1101
  fetched_at?: string | null;
1094
1102
 
@@ -1105,7 +1113,7 @@ export namespace Result {
1105
1113
  http_status?: number;
1106
1114
 
1107
1115
  /**
1108
- * Original retrieval method, including on cache hits.
1116
+ * Original retrieval method.
1109
1117
  */
1110
1118
  method?: 'provider' | 'browser_curl' | 'browser_render';
1111
1119
 
@@ -1254,8 +1262,8 @@ export namespace Strategy {
1254
1262
 
1255
1263
  export interface Usage {
1256
1264
  /**
1257
- * Number of result URLs for which a Kernel browser retrieval was attempted,
1258
- * excluding cache-only hits.
1265
+ * Number of result URLs for which a Kernel browser retrieval received a response
1266
+ * from the target, excluding cache-only hits.
1259
1267
  */
1260
1268
  content_fetches: number;
1261
1269
 
@@ -1398,36 +1406,37 @@ export interface SearchCreateParams {
1398
1406
  export namespace SearchCreateParams {
1399
1407
  export interface SearchContentOptions {
1400
1408
  /**
1401
- * Invalid with source=provider. Supplying browser_id requires source=browser so
1402
- * the chosen identity is not bypassed.
1409
+ * Requires source=auto or source=browser in deferred retrieval.
1403
1410
  */
1404
1411
  browser?: SearchContentOptions.Browser;
1405
1412
 
1406
1413
  format?: 'markdown' | 'text';
1407
1414
 
1408
1415
  /**
1409
- * Maximum acceptable age of cached page content, measured from origin retrieval. 0
1410
- * forces a live fetch. Governs the Kernel content cache, which is scoped to the
1411
- * caller organization and project and separated by retrieval context; fetches
1412
- * through a caller-supplied browser_id bypass that cache. Mapped to the provider
1413
- * freshness control when source is provider and the provider supports one;
1414
- * otherwise provider content age is reported as unknown via fetched_at.
1416
+ * For source=auto, maximum acceptable age of retained provider content, measured
1417
+ * from when the search received it from the provider. A value of 0 disables reuse
1418
+ * of retained content, so every result is fetched through a browser.
1419
+ * source=provider reuses retained provider content without freshness validation.
1420
+ * source=browser always fetches through a browser and does not use this age limit.
1415
1421
  */
1416
1422
  max_age_hours?: number;
1417
1423
 
1418
1424
  /**
1419
- * Per-result Unicode character limit after extraction.
1425
+ * Per-result Unicode character limit after extraction. Retained provider content
1426
+ * cannot exceed what was stored at search time; such results report truncated when
1427
+ * the stored text was already truncated.
1420
1428
  */
1421
1429
  max_chars?: number;
1422
1430
 
1423
1431
  /**
1424
- * provider uses the search provider's native content retrieval; browser fetches
1425
- * each URL through a Kernel browser; auto prefers Kernel browser retrieval and
1426
- * falls back to provider-native content when browser retrieval is unavailable or
1427
- * unsuitable. Defaults to auto for both inline and deferred retrieval. Deferred
1428
- * provider retrieval requires post_hoc capability; an explicit provider source
1429
- * without it is a 400. Missing documents produce per-result unavailable outcomes,
1430
- * not request failures.
1432
+ * auto uses retained provider content within max_age_hours; for deferred retrieval
1433
+ * it falls back to a Kernel browser (caller-supplied or temporary) for results
1434
+ * without it. Inline retrieval never uses a browser. provider reuses retained
1435
+ * provider content when available, without freshness validation, and never
1436
+ * provisions a browser. browser fetches each URL through a Kernel browser, either
1437
+ * caller-supplied or temporary. No option makes a new provider request. Defaults
1438
+ * to auto for both inline and deferred retrieval. Missing documents produce
1439
+ * per-result unavailable outcomes, not request failures.
1431
1440
  */
1432
1441
  source?: 'auto' | 'provider' | 'browser';
1433
1442
 
@@ -1440,17 +1449,22 @@ export namespace SearchCreateParams {
1440
1449
 
1441
1450
  export namespace SearchContentOptions {
1442
1451
  /**
1443
- * Invalid with source=provider. Supplying browser_id requires source=browser so
1444
- * the chosen identity is not bypassed.
1452
+ * Requires source=auto or source=browser in deferred retrieval.
1445
1453
  */
1446
1454
  export interface Browser {
1447
1455
  /**
1448
1456
  * Existing browser session ID authorized for the caller and selected project.
1449
- * Reuses its cookies, proxy, and browser configuration. Kernel does not delete a
1450
- * caller-supplied browser. Render mode uses a temporary tab; website activity may
1451
- * still change shared cookies and storage. When omitted, Kernel obtains isolated
1452
- * browser capacity in the caller's account and releases it after retrieval. That
1453
- * capacity is not retained for later interaction. Existing browser quotas apply.
1457
+ * Reuses its cookies, proxy, and browser configuration; requests follow that
1458
+ * browser's existing network access behavior, with no additional destination
1459
+ * allowlist in this endpoint. Kernel does not delete a caller-supplied browser.
1460
+ * Render mode uses a temporary tab; website activity may still change shared
1461
+ * cookies and storage. When omitted and any result needs browser retrieval, Kernel
1462
+ * creates one temporary browser for the request using the dashboard launch
1463
+ * defaults (headful, stealth, default proxy), tags it with search_id, and deletes
1464
+ * it when the request finishes. It is billed and counts toward browser concurrency
1465
+ * like any other browser. A concurrency rejection returns 429 for source=browser;
1466
+ * for source=auto, results with retained content are still returned and the rest
1467
+ * report the rejection.
1454
1468
  */
1455
1469
  browser_id?: string;
1456
1470
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.114.0'; // x-release-please-version
1
+ export const VERSION = '0.115.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.114.0";
1
+ export declare const VERSION = "0.115.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.114.0";
1
+ export declare const VERSION = "0.115.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.114.0'; // x-release-please-version
4
+ exports.VERSION = '0.115.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.114.0'; // x-release-please-version
1
+ export const VERSION = '0.115.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map