@onkernel/sdk 0.114.0 → 0.116.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.
@@ -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
 
@@ -413,8 +413,9 @@ export namespace CardVaultItemSpec {
413
413
 
414
414
  /**
415
415
  * AgentCard reusable live payment card. Test-mode card creation is not supported.
416
- * Each checkout creates an approval-gated authorization for spec.merchant /
417
- * spec.amount. The card stays ready after each authorization.
416
+ * Each checkout creates an authorization for spec.merchant / spec.amount that the
417
+ * cardholder approves, unless AgentCard runs it under one of the cardholder's
418
+ * autopilot rules. The card stays ready after each authorization.
418
419
  */
419
420
  export interface AgentCardCardVaultItemSpec {
420
421
  /**
@@ -442,6 +443,18 @@ export namespace CardVaultItemSpec {
442
443
  * picks on the approval screen.
443
444
  */
444
445
  card_id?: string;
446
+
447
+ /**
448
+ * Origin of the top-level checkout page, such as https://shop.example.com: https,
449
+ * a lowercase host, a port only when it is not 443, and no path. http is accepted
450
+ * only for localhost test pages. Checkouts without a preparation send it to
451
+ * AgentCard, which uses it to match the cardholder's autopilot rules; prepared
452
+ * checkouts send the preparation's merchant_origin instead. Kernel sends the
453
+ * declared value and does not compare it with the page the browser has open.
454
+ * Omitted, those checkouts ask the cardholder to approve. Card updates replace the
455
+ * whole spec, so an update that omits it removes it.
456
+ */
457
+ checkout_origin?: string;
445
458
  }
446
459
  }
447
460
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.114.0'; // x-release-please-version
1
+ export const VERSION = '0.116.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.116.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.116.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.116.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.116.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map