@onkernel/sdk 0.104.0 → 0.107.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 +20 -0
- package/client.d.mts +2 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -5
- package/client.d.ts.map +1 -1
- package/client.js +0 -3
- package/client.js.map +1 -1
- package/client.mjs +0 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/browser-pools.d.mts +1 -1
- package/resources/browser-pools.d.ts +1 -1
- package/resources/browsers/browsers.d.mts +135 -8
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +135 -8
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js +26 -3
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs +26 -3
- package/resources/browsers/browsers.mjs.map +1 -1
- package/resources/browsers/index.d.mts +1 -1
- package/resources/browsers/index.d.mts.map +1 -1
- package/resources/browsers/index.d.ts +1 -1
- package/resources/browsers/index.d.ts.map +1 -1
- package/resources/browsers/index.js.map +1 -1
- package/resources/browsers/index.mjs.map +1 -1
- package/resources/config-registry/analyses.d.mts +13 -0
- package/resources/config-registry/analyses.d.mts.map +1 -1
- package/resources/config-registry/analyses.d.ts +13 -0
- package/resources/config-registry/analyses.d.ts.map +1 -1
- package/resources/config-registry/analyses.js +15 -0
- package/resources/config-registry/analyses.js.map +1 -1
- package/resources/config-registry/analyses.mjs +15 -0
- package/resources/config-registry/analyses.mjs.map +1 -1
- package/resources/config-registry/config-registry.d.mts +19 -16
- package/resources/config-registry/config-registry.d.mts.map +1 -1
- package/resources/config-registry/config-registry.d.ts +19 -16
- package/resources/config-registry/config-registry.d.ts.map +1 -1
- package/resources/config-registry/config-registry.js.map +1 -1
- package/resources/config-registry/config-registry.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invocations.d.mts +1 -1
- package/resources/invocations.d.ts +1 -1
- package/resources/vaults/index.d.mts +1 -1
- package/resources/vaults/index.d.mts.map +1 -1
- package/resources/vaults/index.d.ts +1 -1
- package/resources/vaults/index.d.ts.map +1 -1
- package/resources/vaults/index.js.map +1 -1
- package/resources/vaults/index.mjs.map +1 -1
- package/resources/vaults/items.d.mts +64 -36
- package/resources/vaults/items.d.mts.map +1 -1
- package/resources/vaults/items.d.ts +64 -36
- package/resources/vaults/items.d.ts.map +1 -1
- package/resources/vaults/items.js +4 -2
- package/resources/vaults/items.js.map +1 -1
- package/resources/vaults/items.mjs +4 -2
- package/resources/vaults/items.mjs.map +1 -1
- package/resources/vaults/vaults.d.mts +2 -2
- package/resources/vaults/vaults.d.mts.map +1 -1
- package/resources/vaults/vaults.d.ts +2 -2
- package/resources/vaults/vaults.d.ts.map +1 -1
- package/resources/vaults/vaults.js.map +1 -1
- package/resources/vaults/vaults.mjs.map +1 -1
- package/src/client.ts +12 -3
- package/src/resources/browser-pools.ts +1 -1
- package/src/resources/browsers/browsers.ts +165 -7
- package/src/resources/browsers/index.ts +6 -0
- package/src/resources/config-registry/analyses.ts +16 -0
- package/src/resources/config-registry/config-registry.ts +20 -17
- package/src/resources/index.ts +6 -0
- package/src/resources/invocations.ts +1 -1
- package/src/resources/vaults/index.ts +1 -0
- package/src/resources/vaults/items.ts +67 -36
- package/src/resources/vaults/vaults.ts +2 -0
- 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
|
@@ -149,9 +149,6 @@ import { multipartFormRequestOptions } from '../../internal/uploads';
|
|
|
149
149
|
import { path } from '../../internal/utils/path';
|
|
150
150
|
import { browserFetch, type BrowserFetchInit } from '../../lib/browser-fetch';
|
|
151
151
|
|
|
152
|
-
/**
|
|
153
|
-
* Create and manage browser sessions.
|
|
154
|
-
*/
|
|
155
152
|
export class Browsers extends APIResource {
|
|
156
153
|
telemetry: TelemetryAPI.Telemetry = new TelemetryAPI.Telemetry(this._client);
|
|
157
154
|
replays: ReplaysAPI.Replays = new ReplaysAPI.Replays(this._client);
|
|
@@ -306,6 +303,33 @@ export class Browsers extends APIResource {
|
|
|
306
303
|
),
|
|
307
304
|
);
|
|
308
305
|
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Execute JavaScript in a persistent Node.js runtime inside the browser VM.
|
|
309
|
+
* Top-level bindings, closures, mutations, and dynamically imported modules
|
|
310
|
+
* persist across calls until the REPL is reset or replaced. Start with
|
|
311
|
+
* `repl.help()` to list available methods, or call `repl.help("click")` for
|
|
312
|
+
* detailed help.
|
|
313
|
+
*
|
|
314
|
+
* Expression values are ignored. Emit ordered text or image output with
|
|
315
|
+
* `repl.write(...)`, console methods, or `repl.emitImage(...)`. The runtime also
|
|
316
|
+
* exposes browser-control helpers, WebMCP, Patchright, Playwright, and raw CDP.
|
|
317
|
+
*
|
|
318
|
+
* Executions are serialized. A timeout, crash, OOM, or protocol failure terminates
|
|
319
|
+
* the REPL and changes its `repl_id`. This is unrestricted code execution inside
|
|
320
|
+
* the browser VM and is not sandboxed.
|
|
321
|
+
*
|
|
322
|
+
* @example
|
|
323
|
+
* ```ts
|
|
324
|
+
* const browserReplResult = await client.browsers.repl(
|
|
325
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
326
|
+
* { code: 'code' },
|
|
327
|
+
* );
|
|
328
|
+
* ```
|
|
329
|
+
*/
|
|
330
|
+
repl(idOrName: string, body: BrowserReplParams, options?: RequestOptions): APIPromise<BrowserReplResult> {
|
|
331
|
+
return this._client.post(path`/browsers/${idOrName}/repl`, { body, ...options });
|
|
332
|
+
}
|
|
309
333
|
}
|
|
310
334
|
|
|
311
335
|
export type BrowserListResponsesOffsetPagination = OffsetPagination<BrowserListResponse>;
|
|
@@ -434,6 +458,104 @@ export interface BrowserProxyConfig {
|
|
|
434
458
|
*/
|
|
435
459
|
export type BrowserProxyMode = 'direct' | 'default';
|
|
436
460
|
|
|
461
|
+
/**
|
|
462
|
+
* Ordered discriminated union of Browser REPL output items.
|
|
463
|
+
*/
|
|
464
|
+
export type BrowserReplContent = BrowserReplTextContent | BrowserReplImageContent;
|
|
465
|
+
|
|
466
|
+
export interface BrowserReplImageContent {
|
|
467
|
+
data_b64: string;
|
|
468
|
+
|
|
469
|
+
mime_type: string;
|
|
470
|
+
|
|
471
|
+
type: 'image';
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Request to execute code in the persistent Browser REPL.
|
|
476
|
+
*/
|
|
477
|
+
export interface BrowserReplRequest {
|
|
478
|
+
/**
|
|
479
|
+
* JavaScript evaluated in a persistent Node.js runtime. Top-level bindings persist
|
|
480
|
+
* until the browser VM's API process exits, the REPL is reset, or the REPL is
|
|
481
|
+
* terminated after a crash or timeout. Static top-level imports are unsupported;
|
|
482
|
+
* use dynamic `import()`. Expression values are ignored; emit output with
|
|
483
|
+
* `repl.write(...)`, console methods, or `repl.emitImage(...)`. May be empty only
|
|
484
|
+
* when `reset` is true.
|
|
485
|
+
*/
|
|
486
|
+
code: string;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Terminate the current REPL, start a fresh one, and then evaluate code.
|
|
490
|
+
*/
|
|
491
|
+
reset?: boolean;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Maximum execution time in seconds. Default is 60.
|
|
495
|
+
*/
|
|
496
|
+
timeout_sec?: number;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Result of Browser REPL code execution.
|
|
501
|
+
*/
|
|
502
|
+
export interface BrowserReplResult {
|
|
503
|
+
/**
|
|
504
|
+
* CUID2 identifying the exact state-holding REPL process used for this execution.
|
|
505
|
+
* Stable across calls and Chromium reconnects; changes after an API restart,
|
|
506
|
+
* explicit reset, execution timeout, or REPL crash.
|
|
507
|
+
*/
|
|
508
|
+
repl_id: string;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Whether the code executed successfully.
|
|
512
|
+
*/
|
|
513
|
+
success: boolean;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Optional ordered text/image output produced by the execution.
|
|
517
|
+
*/
|
|
518
|
+
content?: Array<BrowserReplContent>;
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* True if text or image output was dropped or truncated due to response limits.
|
|
522
|
+
*/
|
|
523
|
+
content_truncated?: boolean;
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Wall-clock execution time in milliseconds.
|
|
527
|
+
*/
|
|
528
|
+
duration_ms?: number;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Error message if execution failed.
|
|
532
|
+
*/
|
|
533
|
+
error?: string;
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* True if the REPL identified by `repl_id` was terminated by this request. The
|
|
537
|
+
* next request lazily starts a fresh REPL with a new `repl_id`.
|
|
538
|
+
*/
|
|
539
|
+
repl_terminated?: boolean;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Stack trace if execution failed.
|
|
543
|
+
*/
|
|
544
|
+
stack?: string;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export interface BrowserReplTextContent {
|
|
548
|
+
/**
|
|
549
|
+
* `write` is emitted by `repl.write`; `stdout` and `stderr` are emitted by console
|
|
550
|
+
* methods.
|
|
551
|
+
*/
|
|
552
|
+
channel: 'write' | 'stdout' | 'stderr';
|
|
553
|
+
|
|
554
|
+
text: string;
|
|
555
|
+
|
|
556
|
+
type: 'text';
|
|
557
|
+
}
|
|
558
|
+
|
|
437
559
|
/**
|
|
438
560
|
* Session usage metrics.
|
|
439
561
|
*/
|
|
@@ -607,7 +729,7 @@ export interface BrowserCreateResponse {
|
|
|
607
729
|
proxy_id?: string;
|
|
608
730
|
|
|
609
731
|
/**
|
|
610
|
-
* URL the session was asked to navigate to
|
|
732
|
+
* URL the session was most recently asked to navigate to, if any. Recorded for
|
|
611
733
|
* debugging. Navigation is fire-and-forget — the URL is dispatched to the browser
|
|
612
734
|
* without waiting for it to load, and any errors (DNS failure, bad status,
|
|
613
735
|
* timeout) are silently dropped. Captures what was requested, not what the browser
|
|
@@ -778,7 +900,7 @@ export interface BrowserRetrieveResponse {
|
|
|
778
900
|
proxy_id?: string;
|
|
779
901
|
|
|
780
902
|
/**
|
|
781
|
-
* URL the session was asked to navigate to
|
|
903
|
+
* URL the session was most recently asked to navigate to, if any. Recorded for
|
|
782
904
|
* debugging. Navigation is fire-and-forget — the URL is dispatched to the browser
|
|
783
905
|
* without waiting for it to load, and any errors (DNS failure, bad status,
|
|
784
906
|
* timeout) are silently dropped. Captures what was requested, not what the browser
|
|
@@ -949,7 +1071,7 @@ export interface BrowserUpdateResponse {
|
|
|
949
1071
|
proxy_id?: string;
|
|
950
1072
|
|
|
951
1073
|
/**
|
|
952
|
-
* URL the session was asked to navigate to
|
|
1074
|
+
* URL the session was most recently asked to navigate to, if any. Recorded for
|
|
953
1075
|
* debugging. Navigation is fire-and-forget — the URL is dispatched to the browser
|
|
954
1076
|
* without waiting for it to load, and any errors (DNS failure, bad status,
|
|
955
1077
|
* timeout) are silently dropped. Captures what was requested, not what the browser
|
|
@@ -1120,7 +1242,7 @@ export interface BrowserListResponse {
|
|
|
1120
1242
|
proxy_id?: string;
|
|
1121
1243
|
|
|
1122
1244
|
/**
|
|
1123
|
-
* URL the session was asked to navigate to
|
|
1245
|
+
* URL the session was most recently asked to navigate to, if any. Recorded for
|
|
1124
1246
|
* debugging. Navigation is fire-and-forget — the URL is dispatched to the browser
|
|
1125
1247
|
* without waiting for it to load, and any errors (DNS failure, bad status,
|
|
1126
1248
|
* timeout) are silently dropped. Captures what was requested, not what the browser
|
|
@@ -1482,6 +1604,14 @@ export interface BrowserUpdateParams {
|
|
|
1482
1604
|
*/
|
|
1483
1605
|
proxy_id?: string | null;
|
|
1484
1606
|
|
|
1607
|
+
/**
|
|
1608
|
+
* Optional URL to navigate the browser to after applying this update. When a
|
|
1609
|
+
* profile is loaded in the same update, this overrides the profile's restored
|
|
1610
|
+
* tabs. Navigation is best-effort, so failures do not fail the update. Omit or set
|
|
1611
|
+
* to an empty string to leave the current page unchanged.
|
|
1612
|
+
*/
|
|
1613
|
+
start_url?: string;
|
|
1614
|
+
|
|
1485
1615
|
/**
|
|
1486
1616
|
* User-defined key-value tags for the browser session. Omit to leave unchanged.
|
|
1487
1617
|
* Provide a map to replace the entire tag set (full replace, not a merge). Set to
|
|
@@ -1695,6 +1825,28 @@ export namespace BrowserLoadExtensionsParams {
|
|
|
1695
1825
|
}
|
|
1696
1826
|
}
|
|
1697
1827
|
|
|
1828
|
+
export interface BrowserReplParams {
|
|
1829
|
+
/**
|
|
1830
|
+
* JavaScript evaluated in a persistent Node.js runtime. Top-level bindings persist
|
|
1831
|
+
* until the browser VM's API process exits, the REPL is reset, or the REPL is
|
|
1832
|
+
* terminated after a crash or timeout. Static top-level imports are unsupported;
|
|
1833
|
+
* use dynamic `import()`. Expression values are ignored; emit output with
|
|
1834
|
+
* `repl.write(...)`, console methods, or `repl.emitImage(...)`. May be empty only
|
|
1835
|
+
* when `reset` is true.
|
|
1836
|
+
*/
|
|
1837
|
+
code: string;
|
|
1838
|
+
|
|
1839
|
+
/**
|
|
1840
|
+
* Terminate the current REPL, start a fresh one, and then evaluate code.
|
|
1841
|
+
*/
|
|
1842
|
+
reset?: boolean;
|
|
1843
|
+
|
|
1844
|
+
/**
|
|
1845
|
+
* Maximum execution time in seconds. Default is 60.
|
|
1846
|
+
*/
|
|
1847
|
+
timeout_sec?: number;
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1698
1850
|
Browsers.Telemetry = TelemetryAPITelemetry;
|
|
1699
1851
|
Browsers.Replays = Replays;
|
|
1700
1852
|
Browsers.Fs = Fs;
|
|
@@ -1713,6 +1865,11 @@ export declare namespace Browsers {
|
|
|
1713
1865
|
type BrowserProxy as BrowserProxy,
|
|
1714
1866
|
type BrowserProxyConfig as BrowserProxyConfig,
|
|
1715
1867
|
type BrowserProxyMode as BrowserProxyMode,
|
|
1868
|
+
type BrowserReplContent as BrowserReplContent,
|
|
1869
|
+
type BrowserReplImageContent as BrowserReplImageContent,
|
|
1870
|
+
type BrowserReplRequest as BrowserReplRequest,
|
|
1871
|
+
type BrowserReplResult as BrowserReplResult,
|
|
1872
|
+
type BrowserReplTextContent as BrowserReplTextContent,
|
|
1716
1873
|
type BrowserUsage as BrowserUsage,
|
|
1717
1874
|
type Profile as Profile,
|
|
1718
1875
|
type Tags as Tags,
|
|
@@ -1729,6 +1886,7 @@ export declare namespace Browsers {
|
|
|
1729
1886
|
type BrowserListParams as BrowserListParams,
|
|
1730
1887
|
type BrowserCurlParams as BrowserCurlParams,
|
|
1731
1888
|
type BrowserLoadExtensionsParams as BrowserLoadExtensionsParams,
|
|
1889
|
+
type BrowserReplParams as BrowserReplParams,
|
|
1732
1890
|
};
|
|
1733
1891
|
|
|
1734
1892
|
export {
|
|
@@ -9,6 +9,11 @@ export {
|
|
|
9
9
|
type BrowserProxy,
|
|
10
10
|
type BrowserProxyConfig,
|
|
11
11
|
type BrowserProxyMode,
|
|
12
|
+
type BrowserReplContent,
|
|
13
|
+
type BrowserReplImageContent,
|
|
14
|
+
type BrowserReplRequest,
|
|
15
|
+
type BrowserReplResult,
|
|
16
|
+
type BrowserReplTextContent,
|
|
12
17
|
type BrowserUsage,
|
|
13
18
|
type Profile,
|
|
14
19
|
type Tags,
|
|
@@ -24,6 +29,7 @@ export {
|
|
|
24
29
|
type BrowserListParams,
|
|
25
30
|
type BrowserCurlParams,
|
|
26
31
|
type BrowserLoadExtensionsParams,
|
|
32
|
+
type BrowserReplParams,
|
|
27
33
|
type ProfilesOffsetPagination,
|
|
28
34
|
type BrowserListResponsesOffsetPagination,
|
|
29
35
|
} from './browsers';
|
|
@@ -47,6 +47,22 @@ export class Analyses extends APIResource {
|
|
|
47
47
|
{ query, ...options },
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Requests cancellation of a running project-scoped analysis. Cancellation is
|
|
53
|
+
* asynchronous; poll the analysis until its status becomes canceled. Repeating the
|
|
54
|
+
* request after the analysis reaches a terminal state returns the existing
|
|
55
|
+
* outcome.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const configRegistryResponse =
|
|
60
|
+
* await client.configRegistry.analyses.cancel('id');
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
cancel(id: string, options?: RequestOptions): APIPromise<ConfigRegistryAPI.ConfigRegistryResponse> {
|
|
64
|
+
return this._client.post(path`/config-registry/analyses/${id}/cancel`, options);
|
|
65
|
+
}
|
|
50
66
|
}
|
|
51
67
|
|
|
52
68
|
export interface AnalysisListParams extends OffsetPaginationParams {
|
|
@@ -104,6 +104,12 @@ export interface Analysis {
|
|
|
104
104
|
* Lifecycle status of a background analysis.
|
|
105
105
|
*/
|
|
106
106
|
status: 'running' | 'completed' | 'failed' | 'canceled' | 'expired';
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The workload description supplied for this analysis. Null when the analysis only
|
|
110
|
+
* tested connectivity.
|
|
111
|
+
*/
|
|
112
|
+
intent?: string | null;
|
|
107
113
|
}
|
|
108
114
|
|
|
109
115
|
export interface AnalysisSummary {
|
|
@@ -208,11 +214,11 @@ export interface Evidence {
|
|
|
208
214
|
success_rate: number;
|
|
209
215
|
|
|
210
216
|
/**
|
|
211
|
-
* Most recent contributing run
|
|
212
|
-
* Omitted
|
|
213
|
-
* threshold.
|
|
217
|
+
* Most recent contributing run whose evidence supported recommending this
|
|
218
|
+
* configuration. Omitted when no individual run independently met the
|
|
219
|
+
* recommendation threshold.
|
|
214
220
|
*/
|
|
215
|
-
|
|
221
|
+
last_supported_at?: string | null;
|
|
216
222
|
}
|
|
217
223
|
|
|
218
224
|
export interface LookupRequest {
|
|
@@ -255,7 +261,7 @@ export interface NoRecommendation {
|
|
|
255
261
|
/**
|
|
256
262
|
* Machine-readable reason Kernel cannot currently provide a config recommendation.
|
|
257
263
|
*/
|
|
258
|
-
code: 'proxy_restricted' | 'no_working_configuration' | 'inconclusive';
|
|
264
|
+
code: 'proxy_restricted' | 'target_not_evaluable' | 'no_working_configuration' | 'inconclusive';
|
|
259
265
|
|
|
260
266
|
/**
|
|
261
267
|
* Human-readable explanation suitable for display.
|
|
@@ -453,7 +459,9 @@ export interface Recommendation {
|
|
|
453
459
|
evidence: Evidence;
|
|
454
460
|
|
|
455
461
|
/**
|
|
456
|
-
* Specificity of knowledge matched for this recommendation.
|
|
462
|
+
* Specificity of knowledge matched for this recommendation. Exact matches use
|
|
463
|
+
* knowledge for the requested target; host and domain matches use broader fallback
|
|
464
|
+
* knowledge.
|
|
457
465
|
*/
|
|
458
466
|
match_scope: 'exact' | 'host' | 'domain';
|
|
459
467
|
|
|
@@ -468,13 +476,6 @@ export interface Recommendation {
|
|
|
468
476
|
proxy: Proxy;
|
|
469
477
|
|
|
470
478
|
type: 'recommendation';
|
|
471
|
-
|
|
472
|
-
/**
|
|
473
|
-
* Exact matches meet the evidence threshold; host and domain fallbacks are
|
|
474
|
-
* inferred. Check evidence.last_verified_at for successful verification age and
|
|
475
|
-
* last_observed_at for the latest evidence.
|
|
476
|
-
*/
|
|
477
|
-
verification: 'verified' | 'inferred';
|
|
478
479
|
}
|
|
479
480
|
|
|
480
481
|
/**
|
|
@@ -542,8 +543,9 @@ export interface ResolveRequest {
|
|
|
542
543
|
* any non-HTTPS destination as off-site and will not drive an http one. Kernel
|
|
543
544
|
* uses it to drive the browser further into the site, where it can observe
|
|
544
545
|
* protections that only appear once a session interacts. When this target already
|
|
545
|
-
* has a
|
|
546
|
-
* the whole matrix, so supplying an intent narrows what can be
|
|
546
|
+
* has a recommended configuration, the run confirms that one instead of
|
|
547
|
+
* re-deriving the whole matrix, so supplying an intent narrows what can be
|
|
548
|
+
* recommended.
|
|
547
549
|
*/
|
|
548
550
|
intent?: string;
|
|
549
551
|
}
|
|
@@ -609,8 +611,9 @@ export interface ConfigRegistryResolveParams {
|
|
|
609
611
|
* any non-HTTPS destination as off-site and will not drive an http one. Kernel
|
|
610
612
|
* uses it to drive the browser further into the site, where it can observe
|
|
611
613
|
* protections that only appear once a session interacts. When this target already
|
|
612
|
-
* has a
|
|
613
|
-
* the whole matrix, so supplying an intent narrows what can be
|
|
614
|
+
* has a recommended configuration, the run confirms that one instead of
|
|
615
|
+
* re-deriving the whole matrix, so supplying an intent narrows what can be
|
|
616
|
+
* recommended.
|
|
614
617
|
*/
|
|
615
618
|
intent?: string;
|
|
616
619
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -47,6 +47,11 @@ export {
|
|
|
47
47
|
type BrowserProxy,
|
|
48
48
|
type BrowserProxyConfig,
|
|
49
49
|
type BrowserProxyMode,
|
|
50
|
+
type BrowserReplContent,
|
|
51
|
+
type BrowserReplImageContent,
|
|
52
|
+
type BrowserReplRequest,
|
|
53
|
+
type BrowserReplResult,
|
|
54
|
+
type BrowserReplTextContent,
|
|
50
55
|
type BrowserUsage,
|
|
51
56
|
type Profile,
|
|
52
57
|
type Tags,
|
|
@@ -62,6 +67,7 @@ export {
|
|
|
62
67
|
type BrowserListParams,
|
|
63
68
|
type BrowserCurlParams,
|
|
64
69
|
type BrowserLoadExtensionsParams,
|
|
70
|
+
type BrowserReplParams,
|
|
65
71
|
type ProfilesOffsetPagination,
|
|
66
72
|
type BrowserListResponsesOffsetPagination,
|
|
67
73
|
} from './browsers/browsers';
|
|
@@ -566,7 +566,7 @@ export namespace InvocationListBrowsersResponse {
|
|
|
566
566
|
proxy_id?: string;
|
|
567
567
|
|
|
568
568
|
/**
|
|
569
|
-
* URL the session was asked to navigate to
|
|
569
|
+
* URL the session was most recently asked to navigate to, if any. Recorded for
|
|
570
570
|
* debugging. Navigation is fire-and-forget — the URL is dispatched to the browser
|
|
571
571
|
* without waiting for it to load, and any errors (DNS failure, bad status,
|
|
572
572
|
* timeout) are silently dropped. Captures what was requested, not what the browser
|
|
@@ -133,8 +133,10 @@ export class Items extends APIResource {
|
|
|
133
133
|
* device approval before native Square Pay. Keep the returned approval page open,
|
|
134
134
|
* poll until ready_to_submit, then submit before preparation.expires_at. Unused
|
|
135
135
|
* preparations expire automatically and cannot be reused. If spend-request
|
|
136
|
-
* creation is
|
|
137
|
-
*
|
|
136
|
+
* creation is rejected with a non-retryable provider error, the card item is
|
|
137
|
+
* deleted and the provider's error code and message are returned. Rate limits
|
|
138
|
+
* return HTTP 429 and retain the card item; stop, back off, and retry the same
|
|
139
|
+
* authorize operation.
|
|
138
140
|
*
|
|
139
141
|
* Fill returns a value-free execution result. Validation failures before writing
|
|
140
142
|
* return 400 (invalid request or targets), 403 (access or destination denied), 404
|
|
@@ -256,19 +258,21 @@ export interface AgentcardCheckoutAuthorization {
|
|
|
256
258
|
}
|
|
257
259
|
|
|
258
260
|
/**
|
|
259
|
-
* One-use
|
|
260
|
-
* handoff. The amount is display-only and does not constrain the
|
|
261
|
-
* eventual charge.
|
|
261
|
+
* One-use processor-bound checkout preparation. Keep the approval page open
|
|
262
|
+
* through token handoff. The amount is display-only and does not constrain the
|
|
263
|
+
* merchant's eventual charge.
|
|
262
264
|
*/
|
|
263
265
|
export interface AgentcardCheckoutPreparation {
|
|
264
266
|
browser_id: string;
|
|
265
267
|
|
|
266
268
|
created_at: string;
|
|
267
269
|
|
|
268
|
-
environment: 'production' | 'sandbox';
|
|
270
|
+
environment: 'production' | 'sandbox' | 'shared';
|
|
269
271
|
|
|
270
272
|
merchant_origin: string;
|
|
271
273
|
|
|
274
|
+
psp: AgentcardPreparedProcessor;
|
|
275
|
+
|
|
272
276
|
/**
|
|
273
277
|
* Preparation consumed means egress claimed the preparation and it cannot be
|
|
274
278
|
* reused. It does not mean the attempt settled. Use the enclosing item's status as
|
|
@@ -289,6 +293,8 @@ export interface AgentcardCheckoutPreparation {
|
|
|
289
293
|
expires_at?: string;
|
|
290
294
|
}
|
|
291
295
|
|
|
296
|
+
export type AgentcardPreparedProcessor = 'square' | 'braintree' | 'worldpay' | 'bambora' | 'mercado_pago';
|
|
297
|
+
|
|
292
298
|
/**
|
|
293
299
|
* Authorize a Link card using its existing purchase specification. Use only after
|
|
294
300
|
* explicit user approval and when the item advertises authorize. Do not
|
|
@@ -312,7 +318,8 @@ export namespace CardVaultItemSpec {
|
|
|
312
318
|
*/
|
|
313
319
|
export interface LinkCardVaultItemSpec {
|
|
314
320
|
/**
|
|
315
|
-
* Integer amount in minor currency units.
|
|
321
|
+
* Integer amount in minor currency units. Link permits at most 50000 per spend
|
|
322
|
+
* request.
|
|
316
323
|
*/
|
|
317
324
|
amount: number;
|
|
318
325
|
|
|
@@ -429,9 +436,17 @@ export namespace CardVaultItemSpec {
|
|
|
429
436
|
}
|
|
430
437
|
}
|
|
431
438
|
|
|
439
|
+
/**
|
|
440
|
+
* Issued Link cards retain encrypted card material for the fill operation. Link
|
|
441
|
+
* cards do not expose aliases or support egress substitution.
|
|
442
|
+
*/
|
|
432
443
|
export type CardVaultItemState = CardVaultItemState.LinkCardState | CardVaultItemState.AgentCardCardState;
|
|
433
444
|
|
|
434
445
|
export namespace CardVaultItemState {
|
|
446
|
+
/**
|
|
447
|
+
* Issued Link cards retain encrypted card material for the fill operation. Link
|
|
448
|
+
* cards do not expose aliases or support egress substitution.
|
|
449
|
+
*/
|
|
435
450
|
export interface LinkCardState {
|
|
436
451
|
provider: 'link';
|
|
437
452
|
|
|
@@ -451,8 +466,6 @@ export namespace CardVaultItemState {
|
|
|
451
466
|
| 'declined'
|
|
452
467
|
| 'recovery_required';
|
|
453
468
|
|
|
454
|
-
aliases?: ItemsAPI.VaultCardAliases;
|
|
455
|
-
|
|
456
469
|
domains?: Array<string>;
|
|
457
470
|
|
|
458
471
|
masks?: LinkCardState.Masks;
|
|
@@ -507,9 +520,9 @@ export namespace CardVaultItemState {
|
|
|
507
520
|
masks?: AgentCardCardState.Masks;
|
|
508
521
|
|
|
509
522
|
/**
|
|
510
|
-
* One-use
|
|
511
|
-
* handoff. The amount is display-only and does not constrain the
|
|
512
|
-
* eventual charge.
|
|
523
|
+
* One-use processor-bound checkout preparation. Keep the approval page open
|
|
524
|
+
* through token handoff. The amount is display-only and does not constrain the
|
|
525
|
+
* merchant's eventual charge.
|
|
513
526
|
*/
|
|
514
527
|
preparation?: ItemsAPI.AgentcardCheckoutPreparation;
|
|
515
528
|
|
|
@@ -891,10 +904,9 @@ export interface CredentialVaultItemUpdateRequest {
|
|
|
891
904
|
*
|
|
892
905
|
* Fill in request order and stop on the first failure. This operation is not
|
|
893
906
|
* atomic: previously filled fields are not rolled back. Never submit the form or
|
|
894
|
-
* click buttons, though input/change events may trigger site behavior.
|
|
895
|
-
*
|
|
896
|
-
*
|
|
897
|
-
* to aliases after a failed or indeterminate operation.
|
|
907
|
+
* click buttons, though input/change events may trigger site behavior. Link cards
|
|
908
|
+
* use fill for browser checkout and do not expose aliases or support egress
|
|
909
|
+
* substitution. Do not automatically retry a failed or indeterminate operation.
|
|
898
910
|
*
|
|
899
911
|
* Secret values are never returned or included in operation logs, traces, audit
|
|
900
912
|
* events, or error details. This does not prevent an agent with unrestricted
|
|
@@ -947,8 +959,8 @@ export interface FillVaultItemOperationResult {
|
|
|
947
959
|
}
|
|
948
960
|
|
|
949
961
|
/**
|
|
950
|
-
* Prepare an unused AgentCard card for
|
|
951
|
-
* approval URL and keep the approval page open. Poll the item until
|
|
962
|
+
* Prepare an unused AgentCard card for a supported tokenization checkout. Deliver
|
|
963
|
+
* the returned approval URL and keep the approval page open. Poll the item until
|
|
952
964
|
* ready_to_submit, then submit native Pay before preparation.expires_at. Readiness
|
|
953
965
|
* lasts at most 30 seconds. Unused preparations expire automatically. Preparations
|
|
954
966
|
* are single-use even after failure or expiry; do not automatically retry and
|
|
@@ -956,11 +968,11 @@ export interface FillVaultItemOperationResult {
|
|
|
956
968
|
*/
|
|
957
969
|
export interface PrepareCheckoutVaultItemOperationRequest {
|
|
958
970
|
/**
|
|
959
|
-
* Required when preparing an unused AgentCard card for
|
|
960
|
-
* this browser and declared merchant origin, not a
|
|
961
|
-
* ready_to_submit status before native Pay and submit
|
|
962
|
-
* deadline. Unused preparations expire automatically; every
|
|
963
|
-
* single-use, including after failure or expiry.
|
|
971
|
+
* Required when preparing an unused AgentCard card for a supported tokenization
|
|
972
|
+
* processor. Consent is bound to this browser and declared merchant origin, not a
|
|
973
|
+
* tab. Wait for the item's ready_to_submit status before native Pay and submit
|
|
974
|
+
* within its readiness deadline. Unused preparations expire automatically; every
|
|
975
|
+
* preparation is single-use, including after failure or expiry.
|
|
964
976
|
*/
|
|
965
977
|
checkout: VaultCheckoutContext;
|
|
966
978
|
|
|
@@ -1033,11 +1045,11 @@ export namespace VaultCardFillField {
|
|
|
1033
1045
|
}
|
|
1034
1046
|
|
|
1035
1047
|
/**
|
|
1036
|
-
* Required when preparing an unused AgentCard card for
|
|
1037
|
-
* this browser and declared merchant origin, not a
|
|
1038
|
-
* ready_to_submit status before native Pay and submit
|
|
1039
|
-
* deadline. Unused preparations expire automatically; every
|
|
1040
|
-
* single-use, including after failure or expiry.
|
|
1048
|
+
* Required when preparing an unused AgentCard card for a supported tokenization
|
|
1049
|
+
* processor. Consent is bound to this browser and declared merchant origin, not a
|
|
1050
|
+
* tab. Wait for the item's ready_to_submit status before native Pay and submit
|
|
1051
|
+
* within its readiness deadline. Unused preparations expire automatically; every
|
|
1052
|
+
* preparation is single-use, including after failure or expiry.
|
|
1041
1053
|
*/
|
|
1042
1054
|
export interface VaultCheckoutContext {
|
|
1043
1055
|
/**
|
|
@@ -1046,15 +1058,24 @@ export interface VaultCheckoutContext {
|
|
|
1046
1058
|
browser_id: string;
|
|
1047
1059
|
|
|
1048
1060
|
/**
|
|
1049
|
-
* Square
|
|
1061
|
+
* Use production or sandbox for Square, Braintree and Worldpay; shared for Bambora
|
|
1062
|
+
* and Mercado Pago. Shared endpoints do not establish test mode. Merchant
|
|
1063
|
+
* credentials/configuration determine processor test mode, independently of the
|
|
1064
|
+
* AgentCard credential mode.
|
|
1050
1065
|
*/
|
|
1051
|
-
environment: 'production' | 'sandbox';
|
|
1066
|
+
environment: 'production' | 'sandbox' | 'shared';
|
|
1052
1067
|
|
|
1053
1068
|
/**
|
|
1054
|
-
* Canonical HTTPS origin of the top-level merchant document, not
|
|
1069
|
+
* Canonical HTTPS origin of the top-level merchant document, not a processor
|
|
1055
1070
|
* iframe. HTTP localhost is accepted for tests.
|
|
1056
1071
|
*/
|
|
1057
1072
|
merchant_origin: string;
|
|
1073
|
+
|
|
1074
|
+
/**
|
|
1075
|
+
* Tokenization processor. Omit for Square compatibility. Non-Square processors
|
|
1076
|
+
* require multi-processor preparation enablement.
|
|
1077
|
+
*/
|
|
1078
|
+
psp?: AgentcardPreparedProcessor;
|
|
1058
1079
|
}
|
|
1059
1080
|
|
|
1060
1081
|
export interface VaultFillField {
|
|
@@ -1190,6 +1211,10 @@ export namespace VaultItem {
|
|
|
1190
1211
|
*/
|
|
1191
1212
|
spec: ItemsAPI.CardVaultItemSpec;
|
|
1192
1213
|
|
|
1214
|
+
/**
|
|
1215
|
+
* Issued Link cards retain encrypted card material for the fill operation. Link
|
|
1216
|
+
* cards do not expose aliases or support egress substitution.
|
|
1217
|
+
*/
|
|
1193
1218
|
state: ItemsAPI.CardVaultItemState;
|
|
1194
1219
|
|
|
1195
1220
|
type: 'card';
|
|
@@ -1384,6 +1409,10 @@ export namespace VaultItemOperationResponse {
|
|
|
1384
1409
|
*/
|
|
1385
1410
|
spec: ItemsAPI.CardVaultItemSpec;
|
|
1386
1411
|
|
|
1412
|
+
/**
|
|
1413
|
+
* Issued Link cards retain encrypted card material for the fill operation. Link
|
|
1414
|
+
* cards do not expose aliases or support egress substitution.
|
|
1415
|
+
*/
|
|
1387
1416
|
state: ItemsAPI.CardVaultItemState;
|
|
1388
1417
|
|
|
1389
1418
|
type: 'card';
|
|
@@ -1723,11 +1752,12 @@ export declare namespace ItemPerformOperationParams {
|
|
|
1723
1752
|
id_or_name: string;
|
|
1724
1753
|
|
|
1725
1754
|
/**
|
|
1726
|
-
* Body param: Required when preparing an unused AgentCard card for
|
|
1727
|
-
* is bound to this browser and declared merchant
|
|
1728
|
-
* item's ready_to_submit status before native Pay
|
|
1729
|
-
* deadline. Unused preparations expire
|
|
1730
|
-
* single-use, including after failure or
|
|
1755
|
+
* Body param: Required when preparing an unused AgentCard card for a supported
|
|
1756
|
+
* tokenization processor. Consent is bound to this browser and declared merchant
|
|
1757
|
+
* origin, not a tab. Wait for the item's ready_to_submit status before native Pay
|
|
1758
|
+
* and submit within its readiness deadline. Unused preparations expire
|
|
1759
|
+
* automatically; every preparation is single-use, including after failure or
|
|
1760
|
+
* expiry.
|
|
1731
1761
|
*/
|
|
1732
1762
|
checkout: VaultCheckoutContext;
|
|
1733
1763
|
|
|
@@ -1990,6 +2020,7 @@ export declare namespace Items {
|
|
|
1990
2020
|
export {
|
|
1991
2021
|
type AgentcardCheckoutAuthorization as AgentcardCheckoutAuthorization,
|
|
1992
2022
|
type AgentcardCheckoutPreparation as AgentcardCheckoutPreparation,
|
|
2023
|
+
type AgentcardPreparedProcessor as AgentcardPreparedProcessor,
|
|
1993
2024
|
type AuthorizeVaultItemOperationRequest as AuthorizeVaultItemOperationRequest,
|
|
1994
2025
|
type CardVaultItemSpec as CardVaultItemSpec,
|
|
1995
2026
|
type CardVaultItemState as CardVaultItemState,
|
|
@@ -5,6 +5,7 @@ import * as ItemsAPI from './items';
|
|
|
5
5
|
import {
|
|
6
6
|
AgentcardCheckoutAuthorization,
|
|
7
7
|
AgentcardCheckoutPreparation,
|
|
8
|
+
AgentcardPreparedProcessor,
|
|
8
9
|
AuthorizeVaultItemOperationRequest,
|
|
9
10
|
CardVaultItemSpec,
|
|
10
11
|
CardVaultItemState,
|
|
@@ -158,6 +159,7 @@ export declare namespace Vaults {
|
|
|
158
159
|
Items as Items,
|
|
159
160
|
type AgentcardCheckoutAuthorization as AgentcardCheckoutAuthorization,
|
|
160
161
|
type AgentcardCheckoutPreparation as AgentcardCheckoutPreparation,
|
|
162
|
+
type AgentcardPreparedProcessor as AgentcardPreparedProcessor,
|
|
161
163
|
type AuthorizeVaultItemOperationRequest as AuthorizeVaultItemOperationRequest,
|
|
162
164
|
type CardVaultItemSpec as CardVaultItemSpec,
|
|
163
165
|
type CardVaultItemState as CardVaultItemState,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.107.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.107.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.107.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|