@onkernel/sdk 0.115.0 → 0.117.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.
@@ -139,8 +139,29 @@ export interface CreateCredentialRequest {
139
139
  sso_provider?: string;
140
140
 
141
141
  /**
142
- * Base32-encoded TOTP secret for generating one-time passwords. Used for automatic
143
- * 2FA during login.
142
+ * HMAC algorithm used to generate TOTP codes. Defaults to SHA1 and is ignored when
143
+ * an `otpauth://` URI supplies the algorithm.
144
+ */
145
+ totp_algorithm?: 'SHA1' | 'SHA256' | 'SHA512';
146
+
147
+ /**
148
+ * Number of digits in generated TOTP codes. Defaults to 6 and is ignored when an
149
+ * `otpauth://` URI supplies the digit count.
150
+ */
151
+ totp_digits?: number;
152
+
153
+ /**
154
+ * TOTP rotation period in seconds. Defaults to 30 and is ignored when an
155
+ * `otpauth://` URI supplies the period.
156
+ */
157
+ totp_period?: number;
158
+
159
+ /**
160
+ * Accepts a 16-128 character base32-encoded TOTP secret or an `otpauth://totp/...`
161
+ * URI. The range accepts existing shorter seeds and longer seeds regardless of
162
+ * HMAC algorithm; RFC 6238 recommends unpadded base32 lengths of 32/52/103 for
163
+ * SHA1/SHA256/SHA512. Only URI parameters present override the corresponding
164
+ * explicit TOTP fields. Used for automatic 2FA during login.
144
165
  */
145
166
  totp_secret?: string;
146
167
  }
@@ -193,8 +214,14 @@ export interface Credential {
193
214
  sso_provider?: string | null;
194
215
 
195
216
  /**
196
- * Current 6-digit TOTP code. Only included in create/update responses when
197
- * totp_secret was just set.
217
+ * HMAC algorithm used to generate TOTP codes. Defaults to SHA1 for credentials
218
+ * created before this metadata was stored.
219
+ */
220
+ totp_algorithm?: 'SHA1' | 'SHA256' | 'SHA512';
221
+
222
+ /**
223
+ * Current TOTP code. Only included in create/update responses when totp_secret was
224
+ * just set.
198
225
  */
199
226
  totp_code?: string;
200
227
 
@@ -203,6 +230,18 @@ export interface Credential {
203
230
  */
204
231
  totp_code_expires_at?: string;
205
232
 
233
+ /**
234
+ * Number of digits in generated TOTP codes. Defaults to 6 for credentials created
235
+ * before this metadata was stored.
236
+ */
237
+ totp_digits?: number;
238
+
239
+ /**
240
+ * TOTP rotation period in seconds. Defaults to 30 for credentials created before
241
+ * this metadata was stored.
242
+ */
243
+ totp_period?: number;
244
+
206
245
  /**
207
246
  * The field names stored in this credential's values (e.g., username, password).
208
247
  * Values themselves are never returned. Included on single-credential responses
@@ -233,8 +272,29 @@ export interface UpdateCredentialRequest {
233
272
  sso_provider?: string | null;
234
273
 
235
274
  /**
236
- * Base32-encoded TOTP secret for generating one-time passwords. Spaces and
237
- * formatting are automatically normalized. Set to empty string to remove.
275
+ * HMAC algorithm used to generate TOTP codes. Requires totp_secret and is ignored
276
+ * when an `otpauth://` URI supplies the algorithm.
277
+ */
278
+ totp_algorithm?: 'SHA1' | 'SHA256' | 'SHA512';
279
+
280
+ /**
281
+ * Number of digits in generated TOTP codes. Requires totp_secret and is ignored
282
+ * when an `otpauth://` URI supplies the digit count.
283
+ */
284
+ totp_digits?: number;
285
+
286
+ /**
287
+ * TOTP rotation period in seconds. Requires totp_secret and is ignored when an
288
+ * `otpauth://` URI supplies the period.
289
+ */
290
+ totp_period?: number;
291
+
292
+ /**
293
+ * Accepts a 16-128 character base32-encoded TOTP secret or an `otpauth://totp/...`
294
+ * URI. Only URI parameters present override the corresponding explicit TOTP
295
+ * fields. When rotating a raw secret, omitted fields preserve their existing
296
+ * values; a new URI defaults unspecified fields to SHA1/6/30. Set to empty string
297
+ * to remove the secret and its metadata.
238
298
  */
239
299
  totp_secret?: string;
240
300
 
@@ -282,8 +342,29 @@ export interface CredentialCreateParams {
282
342
  sso_provider?: string;
283
343
 
284
344
  /**
285
- * Base32-encoded TOTP secret for generating one-time passwords. Used for automatic
286
- * 2FA during login.
345
+ * HMAC algorithm used to generate TOTP codes. Defaults to SHA1 and is ignored when
346
+ * an `otpauth://` URI supplies the algorithm.
347
+ */
348
+ totp_algorithm?: 'SHA1' | 'SHA256' | 'SHA512';
349
+
350
+ /**
351
+ * Number of digits in generated TOTP codes. Defaults to 6 and is ignored when an
352
+ * `otpauth://` URI supplies the digit count.
353
+ */
354
+ totp_digits?: number;
355
+
356
+ /**
357
+ * TOTP rotation period in seconds. Defaults to 30 and is ignored when an
358
+ * `otpauth://` URI supplies the period.
359
+ */
360
+ totp_period?: number;
361
+
362
+ /**
363
+ * Accepts a 16-128 character base32-encoded TOTP secret or an `otpauth://totp/...`
364
+ * URI. The range accepts existing shorter seeds and longer seeds regardless of
365
+ * HMAC algorithm; RFC 6238 recommends unpadded base32 lengths of 32/52/103 for
366
+ * SHA1/SHA256/SHA512. Only URI parameters present override the corresponding
367
+ * explicit TOTP fields. Used for automatic 2FA during login.
287
368
  */
288
369
  totp_secret?: string;
289
370
  }
@@ -307,8 +388,29 @@ export interface CredentialUpdateParams {
307
388
  sso_provider?: string | null;
308
389
 
309
390
  /**
310
- * Base32-encoded TOTP secret for generating one-time passwords. Spaces and
311
- * formatting are automatically normalized. Set to empty string to remove.
391
+ * HMAC algorithm used to generate TOTP codes. Requires totp_secret and is ignored
392
+ * when an `otpauth://` URI supplies the algorithm.
393
+ */
394
+ totp_algorithm?: 'SHA1' | 'SHA256' | 'SHA512';
395
+
396
+ /**
397
+ * Number of digits in generated TOTP codes. Requires totp_secret and is ignored
398
+ * when an `otpauth://` URI supplies the digit count.
399
+ */
400
+ totp_digits?: number;
401
+
402
+ /**
403
+ * TOTP rotation period in seconds. Requires totp_secret and is ignored when an
404
+ * `otpauth://` URI supplies the period.
405
+ */
406
+ totp_period?: number;
407
+
408
+ /**
409
+ * Accepts a 16-128 character base32-encoded TOTP secret or an `otpauth://totp/...`
410
+ * URI. Only URI parameters present override the corresponding explicit TOTP
411
+ * fields. When rotating a raw secret, omitted fields preserve their existing
412
+ * values; a new URI defaults unspecified fields to SHA1/6/30. Set to empty string
413
+ * to remove the secret and its metadata.
312
414
  */
313
415
  totp_secret?: string;
314
416
 
@@ -50,8 +50,11 @@ export {
50
50
  type VaultItemEvent,
51
51
  type VaultItemOperationResponse,
52
52
  type VaultPaymentMethod,
53
+ type VaultWebmcpBinding,
53
54
  type WalletVaultItemSpec,
54
55
  type WalletVaultItemState,
56
+ type WebmcpInvokeVaultItemOperationRequest,
57
+ type WebmcpInvokeVaultItemOperationResult,
55
58
  type ItemListResponse,
56
59
  type ItemEventsResponse,
57
60
  type ItemRetrieveParams,
@@ -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
 
@@ -628,7 +641,8 @@ export namespace CredentialAccountVaultItem {
628
641
  | '1pw_access_request_status'
629
642
  | '1pw_fill'
630
643
  | '1pw_recover'
631
- | '1pw_update_access_token';
644
+ | '1pw_update_access_token'
645
+ | 'webmcp_invoke';
632
646
  }
633
647
  }
634
648
 
@@ -894,7 +908,8 @@ export namespace CredentialVaultItem {
894
908
  | '1pw_access_request_status'
895
909
  | '1pw_fill'
896
910
  | '1pw_recover'
897
- | '1pw_update_access_token';
911
+ | '1pw_update_access_token'
912
+ | 'webmcp_invoke';
898
913
  }
899
914
 
900
915
  export interface OnePasswordAccessApprovalAction {
@@ -1759,7 +1774,8 @@ export namespace VaultItem {
1759
1774
  | '1pw_access_request_status'
1760
1775
  | '1pw_fill'
1761
1776
  | '1pw_recover'
1762
- | '1pw_update_access_token';
1777
+ | '1pw_update_access_token'
1778
+ | 'webmcp_invoke';
1763
1779
  }
1764
1780
 
1765
1781
  /**
@@ -1831,7 +1847,8 @@ export namespace VaultItem {
1831
1847
  | '1pw_access_request_status'
1832
1848
  | '1pw_fill'
1833
1849
  | '1pw_recover'
1834
- | '1pw_update_access_token';
1850
+ | '1pw_update_access_token'
1851
+ | 'webmcp_invoke';
1835
1852
  }
1836
1853
  }
1837
1854
  }
@@ -1898,9 +1915,9 @@ export interface VaultItemEvent {
1898
1915
  }
1899
1916
 
1900
1917
  /**
1901
- * The submission result reported by the 1Password extension when available. Kernel
1902
- * returns fill_unknown if the extension call has no conclusive result. Inspect the
1903
- * page to determine successful authentication on the website.
1918
+ * Authorization and preparation return the existing item shape. Fill returns a
1919
+ * value-free result; WebMCP invocation returns the tool's output. Neither persists
1920
+ * transient outcomes on the item.
1904
1921
  */
1905
1922
  export type VaultItemOperationResponse =
1906
1923
  | VaultItemOperationResponse.WalletVaultItem
@@ -1908,7 +1925,8 @@ export type VaultItemOperationResponse =
1908
1925
  | CredentialAccountVaultItem
1909
1926
  | CredentialVaultItem
1910
1927
  | FillVaultItemOperationResult
1911
- | OnePasswordFillVaultItemOperationResult;
1928
+ | OnePasswordFillVaultItemOperationResult
1929
+ | WebmcpInvokeVaultItemOperationResult;
1912
1930
 
1913
1931
  export namespace VaultItemOperationResponse {
1914
1932
  export interface WalletVaultItem {
@@ -1978,7 +1996,8 @@ export namespace VaultItemOperationResponse {
1978
1996
  | '1pw_access_request_status'
1979
1997
  | '1pw_fill'
1980
1998
  | '1pw_recover'
1981
- | '1pw_update_access_token';
1999
+ | '1pw_update_access_token'
2000
+ | 'webmcp_invoke';
1982
2001
  }
1983
2002
 
1984
2003
  /**
@@ -2050,7 +2069,8 @@ export namespace VaultItemOperationResponse {
2050
2069
  | '1pw_access_request_status'
2051
2070
  | '1pw_fill'
2052
2071
  | '1pw_recover'
2053
- | '1pw_update_access_token';
2072
+ | '1pw_update_access_token'
2073
+ | 'webmcp_invoke';
2054
2074
  }
2055
2075
  }
2056
2076
  }
@@ -2105,6 +2125,27 @@ export namespace VaultPaymentMethod {
2105
2125
  }
2106
2126
  }
2107
2127
 
2128
+ export interface VaultWebmcpBinding {
2129
+ /**
2130
+ * A declared, populated credential field or supported card field. A TOTP field
2131
+ * supplies a fresh code, never its seed.
2132
+ */
2133
+ field: string;
2134
+
2135
+ /**
2136
+ * RFC 6901 JSON Pointer to an existing null value in input. Object keys are exact;
2137
+ * array indices must be canonical and in range. No root or array-append paths.
2138
+ * Each path and each field may occur only once.
2139
+ */
2140
+ input_path: string;
2141
+
2142
+ /**
2143
+ * Required for card expiration (MM/YY or MM/YYYY), forbidden for other fields.
2144
+ * Invalid formats are rejected before invocation.
2145
+ */
2146
+ format?: string;
2147
+ }
2148
+
2108
2149
  /**
2109
2150
  * AgentCard wallet. Omit provider_config to use Kernel-managed credentials, or
2110
2151
  * select a customer-owned configuration. Mode (sandbox vs live) is determined by
@@ -2222,6 +2263,85 @@ export namespace WalletVaultItemState {
2222
2263
  }
2223
2264
  }
2224
2265
 
2266
+ /**
2267
+ * Invoke a WebMCP tool using values from a vaulted item. The browser must be
2268
+ * attached to the item's vault. Discover the tool_ref, inputSchema, and source
2269
+ * with GET /browsers/{id_or_name}/webmcp/tools or webmcp.listTools() in the
2270
+ * Browser REPL (POST /browsers/{id_or_name}/repl) before invoking it. Input paths
2271
+ * replace existing null slots in input. Tool output is returned without redaction
2272
+ * and may include the supplied values. The tool may submit or perform other side
2273
+ * effects. Any item destination restrictions apply to the tool's top-level page
2274
+ * and registering frame (if any).
2275
+ */
2276
+ export interface WebmcpInvokeVaultItemOperationRequest {
2277
+ bindings: Array<VaultWebmcpBinding>;
2278
+
2279
+ /**
2280
+ * Browser session ID, not a reusable browser name.
2281
+ */
2282
+ browser_id: string;
2283
+
2284
+ /**
2285
+ * Public tool arguments with an existing null slot at each binding path. At most
2286
+ * 64 KiB after JSON serialization, including substituted values. Never include
2287
+ * vault values here.
2288
+ */
2289
+ input: { [key: string]: unknown };
2290
+
2291
+ /**
2292
+ * Exact top-level URL from the discovered tool source (fragment omitted). This
2293
+ * pins the target page; it does not authorize a destination.
2294
+ */
2295
+ page_url: string;
2296
+
2297
+ /**
2298
+ * Opaque reference to the exact live WebMCP registration.
2299
+ */
2300
+ tool_ref: string;
2301
+
2302
+ type: 'webmcp_invoke';
2303
+
2304
+ /**
2305
+ * Tool invocation timeout in seconds; preflight and response handling have an
2306
+ * additional bounded allowance. An indeterminate outcome is not retried.
2307
+ */
2308
+ timeout_sec?: number;
2309
+ }
2310
+
2311
+ /**
2312
+ * Returns the same tool result fields as the browser WebMCP invoke API, plus the
2313
+ * vault operation discriminator. Output and error text are untrusted page-provided
2314
+ * data, returned without redaction; tools may include supplied vault values.
2315
+ * Inspect the browser page to determine whether the intended site action
2316
+ * succeeded.
2317
+ */
2318
+ export interface WebmcpInvokeVaultItemOperationResult {
2319
+ /**
2320
+ * Unknown means invocation may have run; do not retry automatically. No status
2321
+ * confirms that the website accepted the action.
2322
+ */
2323
+ status: 'completed' | 'canceled' | 'error' | 'awaiting_submission' | 'unknown';
2324
+
2325
+ type: 'webmcp_invoke';
2326
+
2327
+ /**
2328
+ * Untrusted page-provided error text, returned without redaction. May contain
2329
+ * supplied vault values.
2330
+ */
2331
+ error_text?: string;
2332
+
2333
+ /**
2334
+ * Present when the browser reported one.
2335
+ */
2336
+ invocation_id?: string;
2337
+
2338
+ /**
2339
+ * Untrusted page-provided output, returned without redaction. May contain supplied
2340
+ * vault values.
2341
+ */
2342
+ output?: unknown;
2343
+ }
2344
+
2225
2345
  export type ItemListResponse = Array<VaultItem>;
2226
2346
 
2227
2347
  export type ItemEventsResponse = Array<VaultItemEvent>;
@@ -2331,7 +2451,8 @@ export type ItemPerformOperationParams =
2331
2451
  | ItemPerformOperationParams.OnePasswordPollAccessVaultItemOperationRequest
2332
2452
  | ItemPerformOperationParams.OnePasswordFillVaultItemOperationRequest
2333
2453
  | ItemPerformOperationParams.OnePasswordRecoverVaultItemOperationRequest
2334
- | ItemPerformOperationParams.OnePasswordUpdateAccessTokenVaultItemOperationRequest;
2454
+ | ItemPerformOperationParams.OnePasswordUpdateAccessTokenVaultItemOperationRequest
2455
+ | ItemPerformOperationParams.WebmcpInvokeVaultItemOperationRequest;
2335
2456
 
2336
2457
  export declare namespace ItemPerformOperationParams {
2337
2458
  export interface AuthorizeVaultItemOperationRequest {
@@ -2538,6 +2659,52 @@ export declare namespace ItemPerformOperationParams {
2538
2659
  */
2539
2660
  access_token_expires_at?: string;
2540
2661
  }
2662
+
2663
+ export interface WebmcpInvokeVaultItemOperationRequest {
2664
+ /**
2665
+ * Path param
2666
+ */
2667
+ id_or_name: string;
2668
+
2669
+ /**
2670
+ * Body param
2671
+ */
2672
+ bindings: Array<VaultWebmcpBinding>;
2673
+
2674
+ /**
2675
+ * Body param: Browser session ID, not a reusable browser name.
2676
+ */
2677
+ browser_id: string;
2678
+
2679
+ /**
2680
+ * Body param: Public tool arguments with an existing null slot at each binding
2681
+ * path. At most 64 KiB after JSON serialization, including substituted values.
2682
+ * Never include vault values here.
2683
+ */
2684
+ input: { [key: string]: unknown };
2685
+
2686
+ /**
2687
+ * Body param: Exact top-level URL from the discovered tool source (fragment
2688
+ * omitted). This pins the target page; it does not authorize a destination.
2689
+ */
2690
+ page_url: string;
2691
+
2692
+ /**
2693
+ * Body param: Opaque reference to the exact live WebMCP registration.
2694
+ */
2695
+ tool_ref: string;
2696
+
2697
+ /**
2698
+ * Body param
2699
+ */
2700
+ type: 'webmcp_invoke';
2701
+
2702
+ /**
2703
+ * Body param: Tool invocation timeout in seconds; preflight and response handling
2704
+ * have an additional bounded allowance. An indeterminate outcome is not retried.
2705
+ */
2706
+ timeout_sec?: number;
2707
+ }
2541
2708
  }
2542
2709
 
2543
2710
  export type ItemUpsertParams =
@@ -2821,8 +2988,11 @@ export declare namespace Items {
2821
2988
  type VaultItemEvent as VaultItemEvent,
2822
2989
  type VaultItemOperationResponse as VaultItemOperationResponse,
2823
2990
  type VaultPaymentMethod as VaultPaymentMethod,
2991
+ type VaultWebmcpBinding as VaultWebmcpBinding,
2824
2992
  type WalletVaultItemSpec as WalletVaultItemSpec,
2825
2993
  type WalletVaultItemState as WalletVaultItemState,
2994
+ type WebmcpInvokeVaultItemOperationRequest as WebmcpInvokeVaultItemOperationRequest,
2995
+ type WebmcpInvokeVaultItemOperationResult as WebmcpInvokeVaultItemOperationResult,
2826
2996
  type ItemListResponse as ItemListResponse,
2827
2997
  type ItemEventsResponse as ItemEventsResponse,
2828
2998
  type ItemRetrieveParams as ItemRetrieveParams,
@@ -60,8 +60,11 @@ import {
60
60
  VaultItemEvent,
61
61
  VaultItemOperationResponse,
62
62
  VaultPaymentMethod,
63
+ VaultWebmcpBinding,
63
64
  WalletVaultItemSpec,
64
65
  WalletVaultItemState,
66
+ WebmcpInvokeVaultItemOperationRequest,
67
+ WebmcpInvokeVaultItemOperationResult,
65
68
  } from './items';
66
69
  import { APIPromise } from '../../core/api-promise';
67
70
  import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../../core/pagination';
@@ -220,8 +223,11 @@ export declare namespace Vaults {
220
223
  type VaultItemEvent as VaultItemEvent,
221
224
  type VaultItemOperationResponse as VaultItemOperationResponse,
222
225
  type VaultPaymentMethod as VaultPaymentMethod,
226
+ type VaultWebmcpBinding as VaultWebmcpBinding,
223
227
  type WalletVaultItemSpec as WalletVaultItemSpec,
224
228
  type WalletVaultItemState as WalletVaultItemState,
229
+ type WebmcpInvokeVaultItemOperationRequest as WebmcpInvokeVaultItemOperationRequest,
230
+ type WebmcpInvokeVaultItemOperationResult as WebmcpInvokeVaultItemOperationResult,
225
231
  type ItemListResponse as ItemListResponse,
226
232
  type ItemEventsResponse as ItemEventsResponse,
227
233
  type ItemRetrieveParams as ItemRetrieveParams,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.115.0'; // x-release-please-version
1
+ export const VERSION = '0.117.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.115.0";
1
+ export declare const VERSION = "0.117.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.115.0";
1
+ export declare const VERSION = "0.117.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.115.0'; // x-release-please-version
4
+ exports.VERSION = '0.117.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.115.0'; // x-release-please-version
1
+ export const VERSION = '0.117.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map