@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.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/resources/search/contents.d.mts +85 -56
- package/resources/search/contents.d.mts.map +1 -1
- package/resources/search/contents.d.ts +85 -56
- package/resources/search/contents.d.ts.map +1 -1
- package/resources/search/contents.js +13 -10
- package/resources/search/contents.js.map +1 -1
- package/resources/search/contents.mjs +13 -10
- package/resources/search/contents.mjs.map +1 -1
- package/resources/search/search.d.mts +65 -51
- package/resources/search/search.d.mts.map +1 -1
- package/resources/search/search.d.ts +65 -51
- package/resources/search/search.d.ts.map +1 -1
- package/resources/search/search.js.map +1 -1
- package/resources/search/search.mjs.map +1 -1
- package/src/resources/search/contents.ts +86 -62
- package/src/resources/search/search.ts +65 -51
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -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;
|
|
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;AAm5CD,cAAc,CAAC,QAAQ,GAAG,mBAAmB,CAAC;AAC9C,cAAc,CAAC,SAAS,GAAG,qBAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.mjs","sourceRoot":"","sources":["../../src/resources/search/search.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EAAsB,QAAQ,IAAI,mBAAmB,EAA0B,uBAAmB;AACzG,OAAO,KAAK,YAAY,wBAAoB;AAC5C,OAAO,EAAsD,SAAS,EAAE,wBAAoB;AAG5F,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;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,IAAI,CAAA,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"search.mjs","sourceRoot":"","sources":["../../src/resources/search/search.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EAAsB,QAAQ,IAAI,mBAAmB,EAA0B,uBAAmB;AACzG,OAAO,KAAK,YAAY,wBAAoB;AAC5C,OAAO,EAAsD,SAAS,EAAE,wBAAoB;AAG5F,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;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,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
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
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(
|
|
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<
|
|
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
|
-
*
|
|
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
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
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
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
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
|
-
*
|
|
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
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
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.
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
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
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
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
|
-
*
|
|
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
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
950
|
-
*
|
|
951
|
-
*
|
|
952
|
-
*
|
|
953
|
-
*
|
|
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
|
-
*
|
|
965
|
-
*
|
|
966
|
-
*
|
|
967
|
-
*
|
|
968
|
-
*
|
|
969
|
-
*
|
|
970
|
-
*
|
|
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
|
-
*
|
|
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
|
|
990
|
-
*
|
|
991
|
-
*
|
|
992
|
-
*
|
|
993
|
-
*
|
|
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.
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
1410
|
-
*
|
|
1411
|
-
*
|
|
1412
|
-
*
|
|
1413
|
-
*
|
|
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
|
-
*
|
|
1425
|
-
*
|
|
1426
|
-
*
|
|
1427
|
-
*
|
|
1428
|
-
*
|
|
1429
|
-
*
|
|
1430
|
-
*
|
|
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
|
-
*
|
|
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
|
|
1450
|
-
*
|
|
1451
|
-
*
|
|
1452
|
-
*
|
|
1453
|
-
*
|
|
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.
|
|
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.
|
|
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.
|
|
1
|
+
export declare const VERSION = "0.115.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.115.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|