@onkernel/sdk 0.125.0 → 0.126.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/vaults/items.d.mts +129 -61
- package/resources/vaults/items.d.mts.map +1 -1
- package/resources/vaults/items.d.ts +129 -61
- package/resources/vaults/items.d.ts.map +1 -1
- package/resources/vaults/items.js +10 -5
- package/resources/vaults/items.js.map +1 -1
- package/resources/vaults/items.mjs +10 -5
- package/resources/vaults/items.mjs.map +1 -1
- package/src/resources/vaults/items.ts +136 -62
- 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
|
@@ -43,7 +43,9 @@ export class Items extends APIResource {
|
|
|
43
43
|
* remain unchanged and explicit empty lists clear them. Wallet/provider binding
|
|
44
44
|
* and unsupported fields cannot change after authorization starts. An uncertain
|
|
45
45
|
* update enters recovery_required and must not be retried. Checkout cards may be
|
|
46
|
-
* edited between authorizations.
|
|
46
|
+
* edited between authorizations. A Link card authorized with browser_id and
|
|
47
|
+
* page_url cannot be changed; delete it and create a new card with the updated
|
|
48
|
+
* details.
|
|
47
49
|
*
|
|
48
50
|
* @example
|
|
49
51
|
* ```ts
|
|
@@ -132,10 +134,11 @@ export class Items extends APIResource {
|
|
|
132
134
|
* `available_operations`, following its natural-language description. Availability
|
|
133
135
|
* is rechecked at execution time; unavailable operations return 409. Authorization
|
|
134
136
|
* and preparation may call an external provider and return updated state. Link
|
|
135
|
-
* cards advertise authorize
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
137
|
+
* cards advertise authorize; pass browser_id and page_url from the final checkout
|
|
138
|
+
* page so Kernel can inspect the checkout. Eligible unused AgentCard cards
|
|
139
|
+
* advertise prepare_checkout, which requires checkout context and obtains device
|
|
140
|
+
* approval before native Square Pay. Keep the returned approval page open, poll
|
|
141
|
+
* until ready_to_submit, then submit before preparation.expires_at. Unused
|
|
139
142
|
* preparations expire automatically and cannot be reused. If spend-request
|
|
140
143
|
* creation is rejected with a non-retryable provider error, the card item is
|
|
141
144
|
* deleted and the provider's error code and message are returned. Rate limits
|
|
@@ -155,6 +158,8 @@ export class Items extends APIResource {
|
|
|
155
158
|
* await client.vaults.items.performOperation('key', {
|
|
156
159
|
* id_or_name: 'id_or_name',
|
|
157
160
|
* type: 'authorize',
|
|
161
|
+
* browser_id: 'browser-session-id',
|
|
162
|
+
* page_url: 'https://store.example.com/checkout',
|
|
158
163
|
* });
|
|
159
164
|
* ```
|
|
160
165
|
*/
|
|
@@ -309,16 +314,39 @@ export type AgentcardPreparedProcessor =
|
|
|
309
314
|
|
|
310
315
|
/**
|
|
311
316
|
* Authorize a Link or Kernel card using its existing purchase specification. Use
|
|
312
|
-
* only after explicit user approval and when the item advertises authorize
|
|
313
|
-
*
|
|
314
|
-
*
|
|
317
|
+
* only after explicit user approval and when the item advertises authorize; follow
|
|
318
|
+
* the advertised operation's description. For a Link card, pass browser_id and
|
|
319
|
+
* page_url together while the browser is on the final checkout page: Kernel
|
|
320
|
+
* inspects that checkout, chooses how the credential is delivered, and limits fill
|
|
321
|
+
* to that checkout's origin in any browser with this vault attached. Omitting both
|
|
322
|
+
* issues a virtual card that fills any page on the merchant origin. Once approval
|
|
323
|
+
* has been requested, browser_id and page_url are ignored and authorize only
|
|
324
|
+
* re-checks the request. Browser and checkout inspection errors occur before any
|
|
325
|
+
* provider request and can be retried once the browser is on the checkout page.
|
|
326
|
+
* Kernel cards do not accept browser_id or page_url.
|
|
315
327
|
*/
|
|
316
328
|
export interface AuthorizeVaultItemOperationRequest {
|
|
317
329
|
type: 'authorize';
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Browser session ID, not a reusable browser name. The browser must have this
|
|
333
|
+
* vault attached.
|
|
334
|
+
*/
|
|
335
|
+
browser_id?: string;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Exact current top-level URL of the final checkout page open in browser_id.
|
|
339
|
+
*/
|
|
340
|
+
page_url?: string;
|
|
318
341
|
}
|
|
319
342
|
|
|
320
343
|
/**
|
|
321
|
-
* Live
|
|
344
|
+
* Live Link card request. Test-mode card creation is not supported. The spec can
|
|
345
|
+
* be changed with PATCH until the card is authorized at a checkout. Authorize it
|
|
346
|
+
* with the browser at final checkout: Kernel inspects the checkout through WebMCP
|
|
347
|
+
* and internally chooses a merchant-bound Link Pay Token when supported or a
|
|
348
|
+
* virtual card otherwise. Callers never receive or choose how the credential is
|
|
349
|
+
* delivered.
|
|
322
350
|
*/
|
|
323
351
|
export type CardVaultItemSpec =
|
|
324
352
|
| CardVaultItemSpec.LinkCardVaultItemSpec
|
|
@@ -327,12 +355,18 @@ export type CardVaultItemSpec =
|
|
|
327
355
|
|
|
328
356
|
export namespace CardVaultItemSpec {
|
|
329
357
|
/**
|
|
330
|
-
* Live
|
|
358
|
+
* Live Link card request. Test-mode card creation is not supported. The spec can
|
|
359
|
+
* be changed with PATCH until the card is authorized at a checkout. Authorize it
|
|
360
|
+
* with the browser at final checkout: Kernel inspects the checkout through WebMCP
|
|
361
|
+
* and internally chooses a merchant-bound Link Pay Token when supported or a
|
|
362
|
+
* virtual card otherwise. Callers never receive or choose how the credential is
|
|
363
|
+
* delivered.
|
|
331
364
|
*/
|
|
332
365
|
export interface LinkCardVaultItemSpec {
|
|
333
366
|
/**
|
|
334
|
-
* Integer amount in minor currency units. Link permits at most
|
|
335
|
-
*
|
|
367
|
+
* Integer amount in minor currency units. Link Pay Token execution permits at most
|
|
368
|
+
* 500000; virtual-card execution permits at most 50000. Authorization rejects a
|
|
369
|
+
* larger amount when the checkout requires a virtual card.
|
|
336
370
|
*/
|
|
337
371
|
amount: number;
|
|
338
372
|
|
|
@@ -354,7 +388,7 @@ export namespace CardVaultItemSpec {
|
|
|
354
388
|
provider: 'link';
|
|
355
389
|
|
|
356
390
|
/**
|
|
357
|
-
*
|
|
391
|
+
* Connected Link wallet item key.
|
|
358
392
|
*/
|
|
359
393
|
wallet: string;
|
|
360
394
|
|
|
@@ -1127,32 +1161,18 @@ export interface CredentialVaultItemUpdateRequest {
|
|
|
1127
1161
|
}
|
|
1128
1162
|
|
|
1129
1163
|
/**
|
|
1130
|
-
*
|
|
1131
|
-
*
|
|
1132
|
-
*
|
|
1133
|
-
*
|
|
1134
|
-
*
|
|
1135
|
-
*
|
|
1136
|
-
* Find exactly one open page matching `page_url`. Credential items may omit
|
|
1137
|
-
* `page_url` to require exactly one open page; cards require an HTTPS page URL.
|
|
1138
|
-
* Credentials have no destination allowlist. TOTP fields generate a current code
|
|
1139
|
-
* immediately before writing; their seeds never enter the browser. For each
|
|
1140
|
-
* selector, search the main frame and all descendant frames for editable inputs or
|
|
1141
|
-
* selects matched directly or contained within matching elements. Each selector
|
|
1142
|
-
* must resolve to one unique editable element across all frames; zero or multiple
|
|
1143
|
-
* candidates fail. Count each element once, even if multiple matching containers
|
|
1144
|
-
* contain it. Validate all bindings before filling. Select elements match an
|
|
1145
|
-
* option by its value, not its label. If the page navigates or a target disappears
|
|
1146
|
-
* during filling, stop rather than selecting a different page or element.
|
|
1164
|
+
* Use a vault item in a browser session, for example to fill a login or payment
|
|
1165
|
+
* form. Only invoke when the item advertises `fill`; the advertised operation
|
|
1166
|
+
* describes the inputs that item needs. Requires `browser_id` and usually
|
|
1167
|
+
* `page_url`; some items also require `fields`. Browser and vault must belong to
|
|
1168
|
+
* the same project. Kernel checks access and allowed destinations before filling;
|
|
1169
|
+
* providing a page URL does not authorize a destination.
|
|
1147
1170
|
*
|
|
1148
|
-
* Fill
|
|
1149
|
-
* atomic:
|
|
1150
|
-
*
|
|
1151
|
-
*
|
|
1152
|
-
*
|
|
1153
|
-
* indeterminate fill is safe to retry; a retry rewrites the same fields. A retry
|
|
1154
|
-
* right after an indeterminate fill may wait up to 15 seconds for the earlier
|
|
1155
|
-
* attempt's browser lock to expire.
|
|
1171
|
+
* Fill never submits forms or clicks buttons, though input and change events may
|
|
1172
|
+
* trigger site behavior. It is not atomic: completed steps are not rolled back.
|
|
1173
|
+
* Fill does not consume the item, so a failed or indeterminate fill is safe to
|
|
1174
|
+
* retry. A retry right after an indeterminate fill may wait up to 15 seconds for
|
|
1175
|
+
* the earlier attempt's browser lock to expire.
|
|
1156
1176
|
*
|
|
1157
1177
|
* Secret values are never returned or included in operation logs, traces, audit
|
|
1158
1178
|
* events, or error details. This does not prevent an agent with unrestricted
|
|
@@ -1165,19 +1185,25 @@ export interface FillVaultItemOperationRequest {
|
|
|
1165
1185
|
*/
|
|
1166
1186
|
browser_id: string;
|
|
1167
1187
|
|
|
1188
|
+
type: 'fill';
|
|
1189
|
+
|
|
1168
1190
|
/**
|
|
1169
|
-
* Field bindings
|
|
1191
|
+
* Field bindings, when the item's advertised fill operation requires them. Each
|
|
1192
|
+
* selector is searched in the main frame and all descendant frames and must
|
|
1193
|
+
* resolve to exactly one editable input or select, matched directly or through a
|
|
1194
|
+
* containing element; zero or multiple candidates fail, and no two bindings may
|
|
1195
|
+
* resolve to the same element. Select elements match an option by value, not
|
|
1196
|
+
* label. All bindings are validated before any write, then filled in request
|
|
1197
|
+
* order, stopping at the first failure. If the page navigates or a target
|
|
1198
|
+
* disappears, fill stops rather than choosing another page or element.
|
|
1170
1199
|
*/
|
|
1171
|
-
fields
|
|
1172
|
-
|
|
1173
|
-
type: 'fill';
|
|
1200
|
+
fields?: Array<VaultFillField>;
|
|
1174
1201
|
|
|
1175
1202
|
/**
|
|
1176
1203
|
* Exact current top-level page URL, including path, query, and fragment. Must
|
|
1177
1204
|
* match exactly one open page in the browser; zero or multiple matches fail. No
|
|
1178
|
-
* prefix or glob matching.
|
|
1179
|
-
*
|
|
1180
|
-
* one open page.
|
|
1205
|
+
* prefix or glob matching. When an item allows omitting it, the browser must have
|
|
1206
|
+
* exactly one open page.
|
|
1181
1207
|
*/
|
|
1182
1208
|
page_url?: string;
|
|
1183
1209
|
|
|
@@ -1189,15 +1215,16 @@ export interface FillVaultItemOperationRequest {
|
|
|
1189
1215
|
|
|
1190
1216
|
export interface FillVaultItemOperationResult {
|
|
1191
1217
|
/**
|
|
1192
|
-
*
|
|
1193
|
-
* or unknown field, all remaining fields are
|
|
1218
|
+
* One result per request binding, in request order; empty when the fill used no
|
|
1219
|
+
* bindings. After the first failed or unknown field, all remaining fields are
|
|
1220
|
+
* not_attempted.
|
|
1194
1221
|
*/
|
|
1195
1222
|
fields: Array<VaultFillFieldResult>;
|
|
1196
1223
|
|
|
1197
1224
|
/**
|
|
1198
|
-
* Completed
|
|
1199
|
-
*
|
|
1200
|
-
*
|
|
1225
|
+
* Completed when the fill finished. Failed when execution stopped with known
|
|
1226
|
+
* outcomes. Unknown when an outcome cannot be determined. Completed means values
|
|
1227
|
+
* were supplied to the page, not that the site accepted or submitted them.
|
|
1201
1228
|
*/
|
|
1202
1229
|
status: 'completed' | 'failed' | 'unknown';
|
|
1203
1230
|
|
|
@@ -2103,6 +2130,11 @@ export namespace VaultItem {
|
|
|
2103
2130
|
|
|
2104
2131
|
action?: ItemsAPI.VaultItemAction;
|
|
2105
2132
|
|
|
2133
|
+
/**
|
|
2134
|
+
* Server-generated provider and lifecycle guidance for agents.
|
|
2135
|
+
*/
|
|
2136
|
+
description?: string;
|
|
2137
|
+
|
|
2106
2138
|
/**
|
|
2107
2139
|
* Live, non-persisted data requested through the item GET expand parameter.
|
|
2108
2140
|
*/
|
|
@@ -2167,7 +2199,12 @@ export namespace VaultItem {
|
|
|
2167
2199
|
key: string;
|
|
2168
2200
|
|
|
2169
2201
|
/**
|
|
2170
|
-
* Live
|
|
2202
|
+
* Live Link card request. Test-mode card creation is not supported. The spec can
|
|
2203
|
+
* be changed with PATCH until the card is authorized at a checkout. Authorize it
|
|
2204
|
+
* with the browser at final checkout: Kernel inspects the checkout through WebMCP
|
|
2205
|
+
* and internally chooses a merchant-bound Link Pay Token when supported or a
|
|
2206
|
+
* virtual card otherwise. Callers never receive or choose how the credential is
|
|
2207
|
+
* delivered.
|
|
2171
2208
|
*/
|
|
2172
2209
|
spec: ItemsAPI.CardVaultItemSpec;
|
|
2173
2210
|
|
|
@@ -2329,6 +2366,11 @@ export namespace VaultItemOperationResponse {
|
|
|
2329
2366
|
|
|
2330
2367
|
action?: ItemsAPI.VaultItemAction;
|
|
2331
2368
|
|
|
2369
|
+
/**
|
|
2370
|
+
* Server-generated provider and lifecycle guidance for agents.
|
|
2371
|
+
*/
|
|
2372
|
+
description?: string;
|
|
2373
|
+
|
|
2332
2374
|
/**
|
|
2333
2375
|
* Live, non-persisted data requested through the item GET expand parameter.
|
|
2334
2376
|
*/
|
|
@@ -2393,7 +2435,12 @@ export namespace VaultItemOperationResponse {
|
|
|
2393
2435
|
key: string;
|
|
2394
2436
|
|
|
2395
2437
|
/**
|
|
2396
|
-
* Live
|
|
2438
|
+
* Live Link card request. Test-mode card creation is not supported. The spec can
|
|
2439
|
+
* be changed with PATCH until the card is authorized at a checkout. Authorize it
|
|
2440
|
+
* with the browser at final checkout: Kernel inspects the checkout through WebMCP
|
|
2441
|
+
* and internally chooses a merchant-bound Link Pay Token when supported or a
|
|
2442
|
+
* virtual card otherwise. Callers never receive or choose how the credential is
|
|
2443
|
+
* delivered.
|
|
2397
2444
|
*/
|
|
2398
2445
|
spec: ItemsAPI.CardVaultItemSpec;
|
|
2399
2446
|
|
|
@@ -2755,7 +2802,12 @@ export declare namespace ItemUpdateParams {
|
|
|
2755
2802
|
id_or_name: string;
|
|
2756
2803
|
|
|
2757
2804
|
/**
|
|
2758
|
-
* Body param: Live
|
|
2805
|
+
* Body param: Live Link card request. Test-mode card creation is not supported.
|
|
2806
|
+
* The spec can be changed with PATCH until the card is authorized at a checkout.
|
|
2807
|
+
* Authorize it with the browser at final checkout: Kernel inspects the checkout
|
|
2808
|
+
* through WebMCP and internally chooses a merchant-bound Link Pay Token when
|
|
2809
|
+
* supported or a virtual card otherwise. Callers never receive or choose how the
|
|
2810
|
+
* credential is delivered.
|
|
2759
2811
|
*/
|
|
2760
2812
|
spec: CardVaultItemSpec;
|
|
2761
2813
|
|
|
@@ -2842,6 +2894,18 @@ export declare namespace ItemPerformOperationParams {
|
|
|
2842
2894
|
* Body param
|
|
2843
2895
|
*/
|
|
2844
2896
|
type: 'authorize';
|
|
2897
|
+
|
|
2898
|
+
/**
|
|
2899
|
+
* Body param: Browser session ID, not a reusable browser name. The browser must
|
|
2900
|
+
* have this vault attached.
|
|
2901
|
+
*/
|
|
2902
|
+
browser_id?: string;
|
|
2903
|
+
|
|
2904
|
+
/**
|
|
2905
|
+
* Body param: Exact current top-level URL of the final checkout page open in
|
|
2906
|
+
* browser_id.
|
|
2907
|
+
*/
|
|
2908
|
+
page_url?: string;
|
|
2845
2909
|
}
|
|
2846
2910
|
|
|
2847
2911
|
export interface RestartVerificationVaultItemOperationRequest {
|
|
@@ -2948,22 +3012,27 @@ export declare namespace ItemPerformOperationParams {
|
|
|
2948
3012
|
browser_id: string;
|
|
2949
3013
|
|
|
2950
3014
|
/**
|
|
2951
|
-
* Body param
|
|
2952
|
-
* same element.
|
|
3015
|
+
* Body param
|
|
2953
3016
|
*/
|
|
2954
|
-
|
|
3017
|
+
type: 'fill';
|
|
2955
3018
|
|
|
2956
3019
|
/**
|
|
2957
|
-
* Body param
|
|
3020
|
+
* Body param: Field bindings, when the item's advertised fill operation requires
|
|
3021
|
+
* them. Each selector is searched in the main frame and all descendant frames and
|
|
3022
|
+
* must resolve to exactly one editable input or select, matched directly or
|
|
3023
|
+
* through a containing element; zero or multiple candidates fail, and no two
|
|
3024
|
+
* bindings may resolve to the same element. Select elements match an option by
|
|
3025
|
+
* value, not label. All bindings are validated before any write, then filled in
|
|
3026
|
+
* request order, stopping at the first failure. If the page navigates or a target
|
|
3027
|
+
* disappears, fill stops rather than choosing another page or element.
|
|
2958
3028
|
*/
|
|
2959
|
-
|
|
3029
|
+
fields?: Array<VaultFillField>;
|
|
2960
3030
|
|
|
2961
3031
|
/**
|
|
2962
3032
|
* Body param: Exact current top-level page URL, including path, query, and
|
|
2963
3033
|
* fragment. Must match exactly one open page in the browser; zero or multiple
|
|
2964
|
-
* matches fail. No prefix or glob matching.
|
|
2965
|
-
*
|
|
2966
|
-
* requires exactly one open page.
|
|
3034
|
+
* matches fail. No prefix or glob matching. When an item allows omitting it, the
|
|
3035
|
+
* browser must have exactly one open page.
|
|
2967
3036
|
*/
|
|
2968
3037
|
page_url?: string;
|
|
2969
3038
|
|
|
@@ -3315,7 +3384,12 @@ export declare namespace ItemUpsertParams {
|
|
|
3315
3384
|
id_or_name: string;
|
|
3316
3385
|
|
|
3317
3386
|
/**
|
|
3318
|
-
* Body param: Live
|
|
3387
|
+
* Body param: Live Link card request. Test-mode card creation is not supported.
|
|
3388
|
+
* The spec can be changed with PATCH until the card is authorized at a checkout.
|
|
3389
|
+
* Authorize it with the browser at final checkout: Kernel inspects the checkout
|
|
3390
|
+
* through WebMCP and internally chooses a merchant-bound Link Pay Token when
|
|
3391
|
+
* supported or a virtual card otherwise. Callers never receive or choose how the
|
|
3392
|
+
* credential is delivered.
|
|
3319
3393
|
*/
|
|
3320
3394
|
spec: CardVaultItemSpec;
|
|
3321
3395
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.126.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.126.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.126.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.126.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|