codai-sdk 0.66.0 → 0.67.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/dist/index.d.ts CHANGED
@@ -7292,6 +7292,26 @@ type paths$1 = {
7292
7292
  readonly patch?: never;
7293
7293
  readonly trace?: never;
7294
7294
  };
7295
+ readonly '/v1/vault/grants/revoke-task': {
7296
+ readonly parameters: {
7297
+ readonly query?: never;
7298
+ readonly header?: never;
7299
+ readonly path?: never;
7300
+ readonly cookie?: never;
7301
+ };
7302
+ readonly get?: never;
7303
+ readonly put?: never;
7304
+ /**
7305
+ * Revoke the grants of a task
7306
+ * @description Revokes every live grant whose `task` matches (task id, client task id or session key sent as `task` on `/v1/vault/use`). The gateway also does this on task confirm, session delete and every 5 minutes for closed tasks.
7307
+ */
7308
+ readonly post: operations$1['revokeVaultTaskGrants'];
7309
+ readonly delete?: never;
7310
+ readonly options?: never;
7311
+ readonly head?: never;
7312
+ readonly patch?: never;
7313
+ readonly trace?: never;
7314
+ };
7295
7315
  readonly '/v1/vault/http': {
7296
7316
  readonly parameters: {
7297
7317
  readonly query?: never;
@@ -7376,6 +7396,66 @@ type paths$1 = {
7376
7396
  readonly patch?: never;
7377
7397
  readonly trace?: never;
7378
7398
  };
7399
+ readonly '/v1/vault/items/{id}/limits': {
7400
+ readonly parameters: {
7401
+ readonly query?: never;
7402
+ readonly header?: never;
7403
+ readonly path?: never;
7404
+ readonly cookie?: never;
7405
+ };
7406
+ readonly get?: never;
7407
+ /**
7408
+ * Set per-handle limits
7409
+ * @description Editor or above on the item's vault. Send all three keys; null removes a cap, all null removes the limits. Over a cap `/v1/vault/use`, `/v1/vault/http` and `/v1/vault/resolve` answer 429 `vault_rate_limited` with `Retry-After`.
7410
+ */
7411
+ readonly put: operations$1['setVaultItemLimits'];
7412
+ readonly post?: never;
7413
+ readonly delete?: never;
7414
+ readonly options?: never;
7415
+ readonly head?: never;
7416
+ readonly patch?: never;
7417
+ readonly trace?: never;
7418
+ };
7419
+ readonly '/v1/vault/limits': {
7420
+ readonly parameters: {
7421
+ readonly query?: never;
7422
+ readonly header?: never;
7423
+ readonly path?: never;
7424
+ readonly cookie?: never;
7425
+ };
7426
+ /**
7427
+ * List per-handle limits
7428
+ * @description Usage caps set on your items. Only allowed uses count; an `http` use costs 2 units, other modes 1.
7429
+ */
7430
+ readonly get: operations$1['listVaultLimits'];
7431
+ readonly put?: never;
7432
+ readonly post?: never;
7433
+ readonly delete?: never;
7434
+ readonly options?: never;
7435
+ readonly head?: never;
7436
+ readonly patch?: never;
7437
+ readonly trace?: never;
7438
+ };
7439
+ readonly '/v1/vault/lock': {
7440
+ readonly parameters: {
7441
+ readonly query?: never;
7442
+ readonly header?: never;
7443
+ readonly path?: never;
7444
+ readonly cookie?: never;
7445
+ };
7446
+ readonly get?: never;
7447
+ readonly put?: never;
7448
+ /**
7449
+ * Panic lock
7450
+ * @description Revokes every live grant, denies every pending approval and locks the vault: from then on every agent use is denied with reason `vault_locked` (`/v1/vault/http` and `/v1/vault/resolve` answer 403 `vault_denied`). Device keys stay enrolled. The body is optional; idempotent (a second call keeps the first lock time).
7451
+ */
7452
+ readonly post: operations$1['lockVault'];
7453
+ readonly delete?: never;
7454
+ readonly options?: never;
7455
+ readonly head?: never;
7456
+ readonly patch?: never;
7457
+ readonly trace?: never;
7458
+ };
7379
7459
  readonly '/v1/vault/resolve': {
7380
7460
  readonly parameters: {
7381
7461
  readonly query?: never;
@@ -7454,12 +7534,52 @@ type paths$1 = {
7454
7534
  readonly options?: never;
7455
7535
  readonly head?: never;
7456
7536
  /**
7457
- * Change the default agent tier
7458
- * @description Default approval tier for items without a matching rule (t3 = explicit approval).
7537
+ * Change the default tier and anomaly guards
7538
+ * @description Send `default_tier` (approval tier for items without a matching rule; t3 = explicit approval), `guards` (partial anomaly settings, merged over the current ones) or both. A use on a new host, in a burst or outside the allowed hours is forced to t4 with reason `anomaly:new_host`, `anomaly:burst` or `anomaly:hour`. Answers the effective settings.
7459
7539
  */
7460
7540
  readonly patch: operations$1['patchVaultSettings'];
7461
7541
  readonly trace?: never;
7462
7542
  };
7543
+ readonly '/v1/vault/unlock': {
7544
+ readonly parameters: {
7545
+ readonly query?: never;
7546
+ readonly header?: never;
7547
+ readonly path?: never;
7548
+ readonly cookie?: never;
7549
+ };
7550
+ readonly get?: never;
7551
+ readonly put?: never;
7552
+ /**
7553
+ * Unlock the vault
7554
+ * @description Ends a panic or honeytoken lock with a device key (phone, desktop) or passkey proof over the unlock challenge. Watch keys are refused (`wear_t3_only`). Errors (403): `challenge_invalid`, `unknown_device`, `device_revoked`, `wear_t3_only`, `invalid_signature`, `passkey_invalid`.
7555
+ */
7556
+ readonly post: operations$1['unlockVault'];
7557
+ readonly delete?: never;
7558
+ readonly options?: never;
7559
+ readonly head?: never;
7560
+ readonly patch?: never;
7561
+ readonly trace?: never;
7562
+ };
7563
+ readonly '/v1/vault/unlock/challenge': {
7564
+ readonly parameters: {
7565
+ readonly query?: never;
7566
+ readonly header?: never;
7567
+ readonly path?: never;
7568
+ readonly cookie?: never;
7569
+ };
7570
+ readonly get?: never;
7571
+ readonly put?: never;
7572
+ /**
7573
+ * Get an unlock challenge
7574
+ * @description Single-use challenge valid for 5 minutes. Sign `codai-vault/unlock/v1|<challenge>|<device_id>` with a device key, or use base64url(SHA-256(`codai-vault/unlock/v1|<challenge>|passkey`)) as the WebAuthn challenge.
7575
+ */
7576
+ readonly post: operations$1['createVaultUnlockChallenge'];
7577
+ readonly delete?: never;
7578
+ readonly options?: never;
7579
+ readonly head?: never;
7580
+ readonly patch?: never;
7581
+ readonly trace?: never;
7582
+ };
7463
7583
  readonly '/v1/vault/use': {
7464
7584
  readonly parameters: {
7465
7585
  readonly query?: never;
@@ -16950,6 +17070,17 @@ type components$1 = {
16950
17070
  readonly default_tier: 't1' | 't2' | 't3' | 't4';
16951
17071
  /** @description Public key fingerprint to compare between devices. */
16952
17072
  readonly fingerprint: string;
17073
+ readonly guards?: components$1['schemas']['VaultGuards'];
17074
+ /**
17075
+ * @description Why the vault is locked.
17076
+ * @enum {string|null}
17077
+ */
17078
+ readonly lock_reason?: 'panic' | 'honeytoken' | null;
17079
+ /**
17080
+ * Format: date-time
17081
+ * @description When the vault was locked (panic or honeytoken); null when unlocked. While locked every agent use is denied with reason `vault_locked`.
17082
+ */
17083
+ readonly locked_at?: string | null;
16953
17084
  readonly revision: number;
16954
17085
  };
16955
17086
  /** @description Proven step-up for a decision. `device`: an enrolled device key signs `codai-vault/approve/v2|<approval_id>|<action_hash>|<decision>|<scope>|<device_id>`. `passkey`: a WebAuthn assertion whose challenge is base64url(SHA-256(the same message with device id `passkey`)). With `match_number` the message is v3: `codai-vault/approve/v3|<approval_id>|<action_hash>|<decision>|<scope>|<device_id>|<preview_digest>|<match_number>`, where `preview_digest` = base64url(SHA-256(the canonical text of `request.preview`)). */
@@ -17026,6 +17157,20 @@ type components$1 = {
17026
17157
  /** @enum {string} */
17027
17158
  readonly surface: 'phone' | 'wear' | 'desktop';
17028
17159
  };
17160
+ readonly VaultGuards: {
17161
+ /** @description Agent requests for one item within `burst_window_s` that count as a burst (`anomaly:burst`); 0 = off. */
17162
+ readonly burst_max: number;
17163
+ /** @description Burst window in seconds. */
17164
+ readonly burst_window_s: number;
17165
+ /** @description End of the allowed hours (exclusive) in `tz`; a use outside [hour_start, hour_end) is `anomaly:hour`. */
17166
+ readonly hour_end: number | null;
17167
+ /** @description Start of the allowed hours (inclusive) in `tz`; null together with `hour_end` turns the hours check off. */
17168
+ readonly hour_start: number | null;
17169
+ /** @description Flag a use on a host with no allowed use or grant for that item in the last 30 days (`anomaly:new_host`). */
17170
+ readonly new_host: boolean;
17171
+ /** @description IANA time zone for the hours check, e.g. `Europe/Bucharest`. */
17172
+ readonly tz: string;
17173
+ };
17029
17174
  readonly VaultItemEnvelope: {
17030
17175
  /** @description Public catalogue entry for agents (title, sensitivity, hosts, env var). Never secret values. */
17031
17176
  readonly agent_meta?: {
@@ -17046,6 +17191,35 @@ type components$1 = {
17046
17191
  /** @description Per-item key wrapped under the vault key (`v1.<nonce>.<ciphertext>`). */
17047
17192
  readonly wrapped_key: string;
17048
17193
  };
17194
+ readonly VaultItemLimits: {
17195
+ /** Format: uuid */
17196
+ readonly item_id: string;
17197
+ /** @description Allowed uses per 24 hours; null = no cap. */
17198
+ readonly per_day: number | null;
17199
+ /** @description Allowed uses per minute; null = no cap. */
17200
+ readonly per_minute: number | null;
17201
+ /** @description Units per 24 hours (an `http` use costs 2, other modes 1); null = no cap. */
17202
+ readonly units_per_day: number | null;
17203
+ };
17204
+ readonly VaultLockResult: {
17205
+ /** @description Pending approvals denied by this lock. */
17206
+ readonly approvals_denied: number;
17207
+ /** @description Live grants revoked by this lock. */
17208
+ readonly grants_revoked: number;
17209
+ /** Format: date-time */
17210
+ readonly locked_at: string;
17211
+ };
17212
+ readonly VaultUnlockChallenge: {
17213
+ /** @description 32 random bytes, base64url. Single use. */
17214
+ readonly challenge: string;
17215
+ /**
17216
+ * Format: date-time
17217
+ * @description 5 minutes after issue.
17218
+ */
17219
+ readonly expires_at: string;
17220
+ /** @description `codai-vault/unlock/v1|<challenge>|<device_id or passkey>`: the UTF-8 message the proof covers. */
17221
+ readonly message_template: string;
17222
+ };
17049
17223
  readonly VaultUseDecision: {
17050
17224
  /** @description Hash of the exact request the approver signs. */
17051
17225
  readonly action_hash?: string;
@@ -17055,6 +17229,7 @@ type components$1 = {
17055
17229
  readonly cloud_usable?: boolean;
17056
17230
  /** @description Two digits to show the user with the approval request; they tap the same number on the approving device (number matching). Null when no approval is needed. */
17057
17231
  readonly match_number?: string | null;
17232
+ /** @description Why this tier. Guard reasons: `vault_locked` (the vault is locked, tier `deny`), `anomaly:new_host`, `anomaly:burst`, `anomaly:hour` (tier forced to t4; grants not approved at t4 are ignored). */
17058
17233
  readonly reasons: readonly string[];
17059
17234
  /** @enum {string} */
17060
17235
  readonly tier: 't0' | 't1' | 't2' | 't3' | 't4' | 'deny';
@@ -32265,6 +32440,36 @@ interface operations$1 {
32265
32440
  readonly 404: components$1['responses']['NotFound'];
32266
32441
  };
32267
32442
  };
32443
+ readonly revokeVaultTaskGrants: {
32444
+ readonly parameters: {
32445
+ readonly query?: never;
32446
+ readonly header?: never;
32447
+ readonly path?: never;
32448
+ readonly cookie?: never;
32449
+ };
32450
+ readonly requestBody: {
32451
+ readonly content: {
32452
+ readonly 'application/json': {
32453
+ readonly task: string;
32454
+ };
32455
+ };
32456
+ };
32457
+ readonly responses: {
32458
+ /** @description OK. */
32459
+ readonly 200: {
32460
+ headers: {
32461
+ readonly [name: string]: unknown;
32462
+ };
32463
+ content: {
32464
+ readonly 'application/json': {
32465
+ readonly revoked: number;
32466
+ };
32467
+ };
32468
+ };
32469
+ readonly 400: components$1['responses']['BadRequest'];
32470
+ readonly 401: components$1['responses']['Unauthorized'];
32471
+ };
32472
+ };
32268
32473
  readonly vaultHttp: {
32269
32474
  readonly parameters: {
32270
32475
  readonly query?: never;
@@ -32317,7 +32522,7 @@ interface operations$1 {
32317
32522
  };
32318
32523
  readonly 400: components$1['responses']['BadRequest'];
32319
32524
  readonly 401: components$1['responses']['Unauthorized'];
32320
- /** @description Denied by policy. */
32525
+ /** @description Denied by policy (`vault_denied`; reasons include `vault_locked` while the vault is locked). */
32321
32526
  readonly 403: {
32322
32527
  headers: {
32323
32528
  readonly [name: string]: unknown;
@@ -32329,6 +32534,17 @@ interface operations$1 {
32329
32534
  };
32330
32535
  };
32331
32536
  readonly 404: components$1['responses']['NotFound'];
32537
+ /** @description `vault_rate_limited`: a per-handle limit is reached (`PUT /v1/vault/items/{id}/limits`). Read `Retry-After` (60 s for the per-minute cap, 3600 s for the daily caps). */
32538
+ readonly 429: {
32539
+ headers: {
32540
+ /** @description Seconds to wait before retrying. */
32541
+ readonly 'Retry-After'?: number;
32542
+ readonly [name: string]: unknown;
32543
+ };
32544
+ content: {
32545
+ readonly 'application/json': components$1['schemas']['Error'];
32546
+ };
32547
+ };
32332
32548
  };
32333
32549
  };
32334
32550
  readonly listVaultItems: {
@@ -32476,6 +32692,96 @@ interface operations$1 {
32476
32692
  readonly 404: components$1['responses']['NotFound'];
32477
32693
  };
32478
32694
  };
32695
+ readonly setVaultItemLimits: {
32696
+ readonly parameters: {
32697
+ readonly query?: never;
32698
+ readonly header?: never;
32699
+ readonly path: {
32700
+ /** @description Resource id (uuid). */
32701
+ readonly id: string;
32702
+ };
32703
+ readonly cookie?: never;
32704
+ };
32705
+ readonly requestBody: {
32706
+ readonly content: {
32707
+ readonly 'application/json': {
32708
+ readonly per_day: number | null;
32709
+ readonly per_minute: number | null;
32710
+ readonly units_per_day: number | null;
32711
+ };
32712
+ };
32713
+ };
32714
+ readonly responses: {
32715
+ /** @description OK; `limits` is null when removed. */
32716
+ readonly 200: {
32717
+ headers: {
32718
+ readonly [name: string]: unknown;
32719
+ };
32720
+ content: {
32721
+ readonly 'application/json': {
32722
+ readonly limits: components$1['schemas']['VaultItemLimits'];
32723
+ };
32724
+ };
32725
+ };
32726
+ readonly 400: components$1['responses']['BadRequest'];
32727
+ readonly 401: components$1['responses']['Unauthorized'];
32728
+ readonly 404: components$1['responses']['NotFound'];
32729
+ };
32730
+ };
32731
+ readonly listVaultLimits: {
32732
+ readonly parameters: {
32733
+ readonly query?: never;
32734
+ readonly header?: never;
32735
+ readonly path?: never;
32736
+ readonly cookie?: never;
32737
+ };
32738
+ readonly requestBody?: never;
32739
+ readonly responses: {
32740
+ /** @description OK. */
32741
+ readonly 200: {
32742
+ headers: {
32743
+ readonly [name: string]: unknown;
32744
+ };
32745
+ content: {
32746
+ readonly 'application/json': {
32747
+ readonly limits: readonly components$1['schemas']['VaultItemLimits'][];
32748
+ };
32749
+ };
32750
+ };
32751
+ readonly 400: components$1['responses']['BadRequest'];
32752
+ readonly 401: components$1['responses']['Unauthorized'];
32753
+ };
32754
+ };
32755
+ readonly lockVault: {
32756
+ readonly parameters: {
32757
+ readonly query?: never;
32758
+ readonly header?: never;
32759
+ readonly path?: never;
32760
+ readonly cookie?: never;
32761
+ };
32762
+ readonly requestBody?: {
32763
+ readonly content: {
32764
+ readonly 'application/json': {
32765
+ /** @enum {string} */
32766
+ readonly via?: 'hub' | 'desktop' | 'phone' | 'wear' | 'extension';
32767
+ };
32768
+ };
32769
+ };
32770
+ readonly responses: {
32771
+ /** @description Locked. */
32772
+ readonly 200: {
32773
+ headers: {
32774
+ readonly [name: string]: unknown;
32775
+ };
32776
+ content: {
32777
+ readonly 'application/json': components$1['schemas']['VaultLockResult'];
32778
+ };
32779
+ };
32780
+ readonly 400: components$1['responses']['BadRequest'];
32781
+ readonly 401: components$1['responses']['Unauthorized'];
32782
+ readonly 404: components$1['responses']['NotFound'];
32783
+ };
32784
+ };
32479
32785
  readonly vaultResolve: {
32480
32786
  readonly parameters: {
32481
32787
  readonly query?: never;
@@ -32544,6 +32850,17 @@ interface operations$1 {
32544
32850
  };
32545
32851
  };
32546
32852
  };
32853
+ /** @description `vault_rate_limited`: a per-handle limit is reached (`PUT /v1/vault/items/{id}/limits`). Read `Retry-After` (60 s for the per-minute cap, 3600 s for the daily caps). */
32854
+ readonly 429: {
32855
+ headers: {
32856
+ /** @description Seconds to wait before retrying. */
32857
+ readonly 'Retry-After'?: number;
32858
+ readonly [name: string]: unknown;
32859
+ };
32860
+ content: {
32861
+ readonly 'application/json': components$1['schemas']['Error'];
32862
+ };
32863
+ };
32547
32864
  };
32548
32865
  };
32549
32866
  readonly listVaultRules: {
@@ -32646,27 +32963,112 @@ interface operations$1 {
32646
32963
  readonly content: {
32647
32964
  readonly 'application/json': {
32648
32965
  /** @enum {string} */
32649
- readonly default_tier: 't1' | 't2' | 't3' | 't4';
32966
+ readonly default_tier?: 't1' | 't2' | 't3' | 't4';
32967
+ /** @description Any subset of `VaultGuards`; `hour_start` and `hour_end` are both null (off) or both set. */
32968
+ readonly guards?: {
32969
+ /** @description Agent requests for one item within `burst_window_s` that count as a burst (`anomaly:burst`); 0 = off. */
32970
+ readonly burst_max?: number;
32971
+ /** @description Burst window in seconds. */
32972
+ readonly burst_window_s?: number;
32973
+ /** @description End of the allowed hours (exclusive) in `tz`; a use outside [hour_start, hour_end) is `anomaly:hour`. */
32974
+ readonly hour_end?: number | null;
32975
+ /** @description Start of the allowed hours (inclusive) in `tz`; null together with `hour_end` turns the hours check off. */
32976
+ readonly hour_start?: number | null;
32977
+ /** @description Flag a use on a host with no allowed use or grant for that item in the last 30 days (`anomaly:new_host`). */
32978
+ readonly new_host?: boolean;
32979
+ /** @description IANA time zone for the hours check, e.g. `Europe/Bucharest`. */
32980
+ readonly tz?: string;
32981
+ };
32982
+ };
32983
+ };
32984
+ };
32985
+ readonly responses: {
32986
+ /** @description Effective settings. */
32987
+ readonly 200: {
32988
+ headers: {
32989
+ readonly [name: string]: unknown;
32990
+ };
32991
+ content: {
32992
+ readonly 'application/json': {
32993
+ /** @enum {string} */
32994
+ readonly default_tier: 't1' | 't2' | 't3' | 't4';
32995
+ readonly guards: components$1['schemas']['VaultGuards'];
32996
+ };
32997
+ };
32998
+ };
32999
+ readonly 400: components$1['responses']['BadRequest'];
33000
+ readonly 401: components$1['responses']['Unauthorized'];
33001
+ readonly 404: components$1['responses']['NotFound'];
33002
+ };
33003
+ };
33004
+ readonly unlockVault: {
33005
+ readonly parameters: {
33006
+ readonly query?: never;
33007
+ readonly header?: never;
33008
+ readonly path?: never;
33009
+ readonly cookie?: never;
33010
+ };
33011
+ readonly requestBody: {
33012
+ readonly content: {
33013
+ readonly 'application/json': {
33014
+ /** @description Challenge from `POST /v1/vault/unlock/challenge`. */
33015
+ readonly challenge: string;
33016
+ readonly proof: components$1['schemas']['VaultApprovalProof'];
33017
+ /** @enum {string} */
33018
+ readonly via?: 'hub' | 'desktop' | 'phone' | 'wear' | 'extension';
32650
33019
  };
32651
33020
  };
32652
33021
  };
32653
33022
  readonly responses: {
32654
- /** @description OK. */
33023
+ /** @description Unlocked. */
32655
33024
  readonly 200: {
32656
33025
  headers: {
32657
33026
  readonly [name: string]: unknown;
32658
33027
  };
32659
33028
  content: {
32660
33029
  readonly 'application/json': {
32661
- readonly [key: string]: unknown;
33030
+ readonly unlocked: boolean;
32662
33031
  };
32663
33032
  };
32664
33033
  };
32665
33034
  readonly 400: components$1['responses']['BadRequest'];
32666
33035
  readonly 401: components$1['responses']['Unauthorized'];
33036
+ /** @description `challenge_invalid`, `unknown_device`, `device_revoked`, `wear_t3_only`, `invalid_signature` or `passkey_invalid`. */
33037
+ readonly 403: {
33038
+ headers: {
33039
+ readonly [name: string]: unknown;
33040
+ };
33041
+ content: {
33042
+ readonly 'application/json': {
33043
+ readonly [key: string]: unknown;
33044
+ };
33045
+ };
33046
+ };
32667
33047
  readonly 404: components$1['responses']['NotFound'];
32668
33048
  };
32669
33049
  };
33050
+ readonly createVaultUnlockChallenge: {
33051
+ readonly parameters: {
33052
+ readonly query?: never;
33053
+ readonly header?: never;
33054
+ readonly path?: never;
33055
+ readonly cookie?: never;
33056
+ };
33057
+ readonly requestBody?: never;
33058
+ readonly responses: {
33059
+ /** @description OK. */
33060
+ readonly 200: {
33061
+ headers: {
33062
+ readonly [name: string]: unknown;
33063
+ };
33064
+ content: {
33065
+ readonly 'application/json': components$1['schemas']['VaultUnlockChallenge'];
33066
+ };
33067
+ };
33068
+ readonly 400: components$1['responses']['BadRequest'];
33069
+ readonly 401: components$1['responses']['Unauthorized'];
33070
+ };
33071
+ };
32670
33072
  readonly vaultUse: {
32671
33073
  readonly parameters: {
32672
33074
  readonly query?: never;
@@ -32703,6 +33105,17 @@ interface operations$1 {
32703
33105
  readonly 400: components$1['responses']['BadRequest'];
32704
33106
  readonly 401: components$1['responses']['Unauthorized'];
32705
33107
  readonly 404: components$1['responses']['NotFound'];
33108
+ /** @description `vault_rate_limited`: a per-handle limit is reached (`PUT /v1/vault/items/{id}/limits`). Read `Retry-After` (60 s for the per-minute cap, 3600 s for the daily caps). */
33109
+ readonly 429: {
33110
+ headers: {
33111
+ /** @description Seconds to wait before retrying. */
33112
+ readonly 'Retry-After'?: number;
33113
+ readonly [name: string]: unknown;
33114
+ };
33115
+ content: {
33116
+ readonly 'application/json': components$1['schemas']['Error'];
33117
+ };
33118
+ };
32706
33119
  };
32707
33120
  };
32708
33121
  readonly listVaults: {
@@ -35246,6 +35659,20 @@ export type VaultUseRequest = Mutable<Body<'vaultUse'>>;
35246
35659
  export type VaultHttpRequest = Mutable<Body<'vaultHttp'>>;
35247
35660
  export type VaultResolveRequest = Mutable<Body<'vaultResolve'>>;
35248
35661
  export type VaultTier = VaultAccount['default_tier'];
35662
+ /** Anomaly guards (V-32): new host, burst, allowed hours. An anomaly forces t4. */
35663
+ export type VaultGuards = Schema<'VaultGuards'>;
35664
+ export type VaultSettingsPatch = Mutable<Body<'patchVaultSettings'>>;
35665
+ export type VaultSettings = Reply<'patchVaultSettings'>;
35666
+ export type VaultLockResult = Schema<'VaultLockResult'>;
35667
+ export type VaultUnlockChallenge = Schema<'VaultUnlockChallenge'>;
35668
+ export type VaultUnlockRequest = Mutable<Body<'unlockVault'>>;
35669
+ /** Per-handle limits (V-21); an `http` use costs 2 units, other modes 1. */
35670
+ export type VaultItemLimits = Schema<'VaultItemLimits'>;
35671
+ export type VaultItemLimitsInput = Mutable<Body<'setVaultItemLimits'>>;
35672
+ /** Where a lock/unlock was triggered from. */
35673
+ export type VaultVia = 'hub' | 'desktop' | 'phone' | 'wear' | 'extension';
35674
+ /** The UTF-8 message an unlock proof covers: `codai-vault/unlock/v1|<challenge>|<device_id or "passkey">`. */
35675
+ export declare function vaultUnlockMessage(challenge: string, deviceIdOrPasskey: string): string;
35249
35676
  /** Loose JSON object answers (lists, acks) as documented in the OpenAPI spec. */
35250
35677
  export type VaultObject = Record<string, unknown>;
35251
35678
  type CallOpts$21 = {
@@ -35279,6 +35706,32 @@ export declare class Vault {
35279
35706
  putAccount(body: VaultAccountPut, opts?: CallOpts$21): Promise<VaultObject>;
35280
35707
  /** `PATCH /v1/vault/settings` — default approval tier for items without a matching rule. */
35281
35708
  setDefaultTier(defaultTier: VaultTier, opts?: CallOpts$21): Promise<VaultObject>;
35709
+ /**
35710
+ * `PATCH /v1/vault/settings` — `default_tier` and/or partial anomaly `guards` (merged over the current ones).
35711
+ * Answers the effective `{ default_tier, guards }`.
35712
+ */
35713
+ updateSettings(body: VaultSettingsPatch, opts?: CallOpts$21): Promise<VaultSettings>;
35714
+ /**
35715
+ * `POST /v1/vault/lock` — panic: revoke every live grant, deny every pending approval, lock the vault (agent uses
35716
+ * then answer `vault_locked`). Device keys stay enrolled. Idempotent.
35717
+ */
35718
+ lock(params?: {
35719
+ via?: VaultVia;
35720
+ }, opts?: CallOpts$21): Promise<VaultLockResult>;
35721
+ /** `POST /v1/vault/unlock/challenge` — single-use unlock challenge, valid 5 minutes. */
35722
+ unlockChallenge(opts?: CallOpts$21): Promise<VaultUnlockChallenge>;
35723
+ /**
35724
+ * `POST /v1/vault/unlock` — end a lock with a device-key proof over {@link vaultUnlockMessage} or a passkey whose
35725
+ * challenge is base64url(SHA-256(that message with `passkey`)). 403 `challenge_invalid`, `wear_t3_only`, …
35726
+ */
35727
+ unlock(body: VaultUnlockRequest, opts?: CallOpts$21): Promise<Reply<'unlockVault'>>;
35728
+ /** `GET /v1/vault/limits` — per-handle usage caps on your items. */
35729
+ limits(opts?: CallOpts$21): Promise<VaultItemLimits[]>;
35730
+ /**
35731
+ * `PUT /v1/vault/items/{id}/limits` — all three keys required; `null` removes a cap, all `null` removes the limits
35732
+ * (answers `null`). Over a cap the broker calls answer 429 `vault_rate_limited` with `Retry-After`.
35733
+ */
35734
+ setLimits(id: string, limits: VaultItemLimitsInput, opts?: CallOpts$21): Promise<VaultItemLimits | null>;
35282
35735
  /** `GET /v1/vault/vaults` — vaults you belong to, with your role and sealed vault key. */
35283
35736
  vaults(opts?: CallOpts$21): Promise<VaultObject>;
35284
35737
  /** `POST /v1/vault/vaults` — register a vault created client-side (HTTP 201). */
@@ -35301,6 +35754,8 @@ export declare class Vault {
35301
35754
  grants(opts?: CallOpts$21): Promise<VaultObject>;
35302
35755
  /** `DELETE /v1/vault/grants/{id}` — revoke a grant immediately. */
35303
35756
  revokeGrant(id: string, opts?: CallOpts$21): Promise<VaultObject>;
35757
+ /** `POST /v1/vault/grants/revoke-task` — revoke every live grant of a task / session; answers `{ revoked }`. */
35758
+ revokeTaskGrants(task: string, opts?: CallOpts$21): Promise<Reply<'revokeVaultTaskGrants'>>;
35304
35759
  /** `GET /v1/vault/events` — append-only audit log (never contains secret values). */
35305
35760
  events(params?: QueryOf<'listVaultEvents'>, opts?: CallOpts$21): Promise<VaultObject>;
35306
35761
  /** `GET /v1/vault/approvals` — agent requests waiting for your decision. */