codai-sdk 0.70.0 → 0.72.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 +165 -16
- package/dist/index.js +22 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7865,7 +7865,7 @@ type paths$1 = {
|
|
|
7865
7865
|
readonly put?: never;
|
|
7866
7866
|
/**
|
|
7867
7867
|
* Resolve values for a local broker
|
|
7868
|
-
* @description For codai brokers only (`x-codai-agent: codaid…` or `desktop…`): the cloud fallback of `codaid vault run` when the vault is not unlocked on the machine. Each handle gets an env-mode policy decision; t3/t4 answer 202 with approval ids, items that are not cloud-usable answer 409 `not_cloud_usable`. The broker injects values into a child process and redacts its output; they never reach a model.
|
|
7868
|
+
* @description For codai brokers only (`x-codai-agent: codaid…` or `desktop…`): the cloud fallback of `codaid vault run` when the vault is not unlocked on the machine. Every call carries a `proof`: a fresh challenge from `POST /v1/vault/resolve/challenge` signed by one of your enrolled device keys, checked before any policy decision. Each handle gets an env-mode policy decision; t3/t4 answer 202 with approval ids, items that are not cloud-usable answer 409 `not_cloud_usable`. The broker injects values into a child process and redacts its output; they never reach a model. Errors: 400 `proof_required`, `invalid_challenge` (unknown, used or expired); 403 `invalid_device_proof` (device not yours, revoked, or bad signature), `broker_only`, `vault_denied`.
|
|
7869
7869
|
*/
|
|
7870
7870
|
readonly post: operations$1['vaultResolve'];
|
|
7871
7871
|
readonly delete?: never;
|
|
@@ -7874,6 +7874,26 @@ type paths$1 = {
|
|
|
7874
7874
|
readonly patch?: never;
|
|
7875
7875
|
readonly trace?: never;
|
|
7876
7876
|
};
|
|
7877
|
+
readonly '/v1/vault/resolve/challenge': {
|
|
7878
|
+
readonly parameters: {
|
|
7879
|
+
readonly query?: never;
|
|
7880
|
+
readonly header?: never;
|
|
7881
|
+
readonly path?: never;
|
|
7882
|
+
readonly cookie?: never;
|
|
7883
|
+
};
|
|
7884
|
+
readonly get?: never;
|
|
7885
|
+
readonly put?: never;
|
|
7886
|
+
/**
|
|
7887
|
+
* Get a resolve challenge
|
|
7888
|
+
* @description For codai brokers only (`x-codai-agent: codaid…` or `desktop…`; others get 403 `broker_only`). Single-use nonce valid for 120 seconds; the broker signs it with its enrolled device key into the `proof` of the next `POST /v1/vault/resolve`.
|
|
7889
|
+
*/
|
|
7890
|
+
readonly post: operations$1['createVaultResolveChallenge'];
|
|
7891
|
+
readonly delete?: never;
|
|
7892
|
+
readonly options?: never;
|
|
7893
|
+
readonly head?: never;
|
|
7894
|
+
readonly patch?: never;
|
|
7895
|
+
readonly trace?: never;
|
|
7896
|
+
};
|
|
7877
7897
|
readonly '/v1/vault/rules': {
|
|
7878
7898
|
readonly parameters: {
|
|
7879
7899
|
readonly query?: never;
|
|
@@ -13799,6 +13819,8 @@ type components$1 = {
|
|
|
13799
13819
|
readonly id: string;
|
|
13800
13820
|
/** @enum {string} */
|
|
13801
13821
|
readonly language: 'ro' | 'en';
|
|
13822
|
+
/** @description What the critic heard on the master of the latest round (MR-11): measured listening features of codai-studio-media (spectral, dynamics, stereo width, a 16-point loudness timeline) with Meta Audiobox Aesthetics (CE content enjoyment, CU content usefulness, PC production complexity, PQ production quality, about 1-10), and a Gemini listener's verdict (0-10 impressions, timestamped notes, audible AI tells). null before the critic ran. Either half is null when that listener was unavailable; when both are, the song carries the `critic_text_only` warning. */
|
|
13823
|
+
readonly listening: components$1['schemas']['MusicRoomListening'] | null;
|
|
13802
13824
|
/** @enum {string} */
|
|
13803
13825
|
readonly object: 'studio.music_room';
|
|
13804
13826
|
/**
|
|
@@ -13831,7 +13853,7 @@ type components$1 = {
|
|
|
13831
13853
|
readonly track_id?: string | null;
|
|
13832
13854
|
}[];
|
|
13833
13855
|
readonly title: string | null;
|
|
13834
|
-
/** @description Non-fatal notes. Voice passport values: `voice_passport_beta` (sung with your voice, beta: approximates your timbre), `voice_passport_needs_singing_consent` (the voice has no active singing consent, or it was revoked during the song), `voice_passport_not_found` (not one of your active voices), `voice_passport_unavailable` (voice cloning is not enabled for your account, or the voice is paused), `voice_passport_lyrics_refused` (the lyrics failed the voice-safety text check, so the passport was not used). Others: `artist_reference_removed: N`, `vocal_asr_check_unavailable`, `critic_text_only
|
|
13856
|
+
/** @description Non-fatal notes. Voice passport values: `voice_passport_beta` (sung with your voice, beta: approximates your timbre), `voice_passport_needs_singing_consent` (the voice has no active singing consent, or it was revoked during the song), `voice_passport_not_found` (not one of your active voices), `voice_passport_unavailable` (voice cloning is not enabled for your account, or the voice is paused), `voice_passport_lyrics_refused` (the lyrics failed the voice-safety text check, so the passport was not used). Others: `artist_reference_removed: N`, `vocal_asr_check_unavailable`, `critic_text_only` (the critic could not listen to the master and judged from the score), `<step>_skipped: <reason>`. */
|
|
13835
13857
|
readonly warnings: readonly string[];
|
|
13836
13858
|
};
|
|
13837
13859
|
/**
|
|
@@ -13864,8 +13886,8 @@ type components$1 = {
|
|
|
13864
13886
|
/** @description What the song is for and how it should feel: occasion, mood, story, audience (10–2,000 characters; no artist names). */
|
|
13865
13887
|
readonly brief: string;
|
|
13866
13888
|
/**
|
|
13867
|
-
* @description Spending cap for one song beyond the plan quota, in micro-USD (default
|
|
13868
|
-
* @default
|
|
13889
|
+
* @description Spending cap for one song beyond the plan quota, in micro-USD (default 10,000,000 = $10, max 20,000,000).
|
|
13890
|
+
* @default 10000000
|
|
13869
13891
|
*/
|
|
13870
13892
|
readonly budget_micro_usd?: number;
|
|
13871
13893
|
/** @description Target length in seconds (max 4 minutes). */
|
|
@@ -13910,6 +13932,63 @@ type components$1 = {
|
|
|
13910
13932
|
/** @enum {string} */
|
|
13911
13933
|
readonly object: 'list';
|
|
13912
13934
|
};
|
|
13935
|
+
/** Music Room listening */
|
|
13936
|
+
readonly MusicRoomListening: {
|
|
13937
|
+
/** @description Measured listening features of the master (codai-studio-media). `null` when the measurement was unavailable. */
|
|
13938
|
+
readonly features: {
|
|
13939
|
+
/** @description Meta Audiobox Aesthetics, about 1-10: CE content enjoyment, CU content usefulness, PC production complexity, PQ production quality. `null` when unavailable. */
|
|
13940
|
+
readonly aesthetics?: {
|
|
13941
|
+
readonly CE: number;
|
|
13942
|
+
readonly CU: number;
|
|
13943
|
+
readonly PC: number;
|
|
13944
|
+
readonly PQ: number;
|
|
13945
|
+
} | null;
|
|
13946
|
+
/** @description Crest factor in dB (peak to RMS; low means heavily compressed). */
|
|
13947
|
+
readonly crest_factor_db?: number | null;
|
|
13948
|
+
/** @description Length of the master in seconds. */
|
|
13949
|
+
readonly duration_seconds?: number | null;
|
|
13950
|
+
/** @description Loudness range in LU. */
|
|
13951
|
+
readonly loudness_range_lu?: number | null;
|
|
13952
|
+
/** @description Integrated loudness in LUFS for each 1/16 of the song (16 points; `null` for a silent slice). */
|
|
13953
|
+
readonly loudness_timeline_lufs?: readonly (number | null)[];
|
|
13954
|
+
/** @description Coefficient of variation of the onset rate (how much the rhythmic density changes). */
|
|
13955
|
+
readonly onset_rate_cv?: number | null;
|
|
13956
|
+
/** @description Note onsets per second. */
|
|
13957
|
+
readonly onset_rate_per_s?: number | null;
|
|
13958
|
+
/** @description Mean spectral centroid (brightness) in Hz. */
|
|
13959
|
+
readonly spectral_centroid_hz?: number | null;
|
|
13960
|
+
/** @description Standard deviation of the spectral centroid in Hz. */
|
|
13961
|
+
readonly spectral_centroid_std_hz?: number | null;
|
|
13962
|
+
/** @description Mean spectral flatness (0 tonal, 1 noise-like). */
|
|
13963
|
+
readonly spectral_flatness?: number | null;
|
|
13964
|
+
/** @description Stereo width (0 mono, higher is wider). */
|
|
13965
|
+
readonly stereo_width?: number | null;
|
|
13966
|
+
} | null;
|
|
13967
|
+
/** @description The listener model. */
|
|
13968
|
+
readonly model: string | null;
|
|
13969
|
+
/** @description The Gemini listener's verdict. `null` when the listener was unavailable. */
|
|
13970
|
+
readonly verdict: {
|
|
13971
|
+
/** @description Up to 6 audible signs of AI or MIDI generation (empty if none). */
|
|
13972
|
+
readonly ai_tells: readonly string[];
|
|
13973
|
+
/** @description Impressions from 0 to 10 per aspect; `vocals` is `null` for an instrumental. */
|
|
13974
|
+
readonly impressions: {
|
|
13975
|
+
readonly genre_fit: number;
|
|
13976
|
+
readonly groove: number;
|
|
13977
|
+
readonly humanness: number;
|
|
13978
|
+
readonly melody: number;
|
|
13979
|
+
readonly mix: number;
|
|
13980
|
+
readonly vocals: number | null;
|
|
13981
|
+
};
|
|
13982
|
+
/** @description Up to 8 timestamped notes. */
|
|
13983
|
+
readonly notes: readonly {
|
|
13984
|
+
/** @description Position in the master, in seconds. */
|
|
13985
|
+
readonly at_seconds: number;
|
|
13986
|
+
readonly note: string;
|
|
13987
|
+
}[];
|
|
13988
|
+
/** @description One-paragraph summary of what the listener heard. */
|
|
13989
|
+
readonly summary: string;
|
|
13990
|
+
} | null;
|
|
13991
|
+
};
|
|
13913
13992
|
/** Music Room plan variant */
|
|
13914
13993
|
readonly MusicRoomPlanVariant: {
|
|
13915
13994
|
readonly bpm: number;
|
|
@@ -18601,7 +18680,7 @@ type components$1 = {
|
|
|
18601
18680
|
readonly nonce: string;
|
|
18602
18681
|
};
|
|
18603
18682
|
readonly VaultDeviceEnroll: {
|
|
18604
|
-
/** @description Required for `android_keystore` (certificate chain, leaf first, attestation challenge = nonce bytes). Optional for `windows_hello`: a TPM attestation gives `tpm`, none gives `hello-unattested`. */
|
|
18683
|
+
/** @description Required for `android_keystore` (certificate chain, leaf first, attestation challenge = nonce bytes). Optional for `windows_hello`: a TPM attestation gives `tpm`, none gives `hello-unattested`. Must be absent for `cli_ed25519` (surface `cli`, stored as `software`). */
|
|
18605
18684
|
readonly attestation?: {
|
|
18606
18685
|
readonly android_chain: readonly string[];
|
|
18607
18686
|
} | {
|
|
@@ -18611,36 +18690,39 @@ type components$1 = {
|
|
|
18611
18690
|
};
|
|
18612
18691
|
};
|
|
18613
18692
|
readonly device_id: string;
|
|
18614
|
-
/** @description The device key over the same message (ECDSA P-256 DER on Android, RSASSA-PKCS1-v1_5 SHA-256 for Windows Hello), base64url. */
|
|
18693
|
+
/** @description The device key over the same message (ECDSA P-256 DER on Android, RSASSA-PKCS1-v1_5 SHA-256 for Windows Hello, raw 64-byte Ed25519 for `cli_ed25519`), base64url. */
|
|
18615
18694
|
readonly device_signature: string;
|
|
18616
18695
|
/** @enum {string} */
|
|
18617
|
-
readonly kind: 'android_keystore' | 'windows_hello';
|
|
18696
|
+
readonly kind: 'android_keystore' | 'windows_hello' | 'cli_ed25519';
|
|
18618
18697
|
readonly name: string;
|
|
18619
18698
|
/** @description Nonce from `POST /v1/vault/devices/challenge`. */
|
|
18620
18699
|
readonly nonce: string;
|
|
18621
18700
|
/** @description SubjectPublicKeyInfo DER of the device key, base64url. */
|
|
18622
18701
|
readonly public_key: string;
|
|
18623
18702
|
/** @enum {string} */
|
|
18624
|
-
readonly surface: 'phone' | 'wear' | 'desktop';
|
|
18703
|
+
readonly surface: 'phone' | 'wear' | 'desktop' | 'cli';
|
|
18625
18704
|
/** @description Ed25519 signature of your vault key over `codai-vault/device-enroll/v1|<device_id>|<kind>|<spki_sha256>|<nonce>`. */
|
|
18626
18705
|
readonly vault_signature: string;
|
|
18627
18706
|
};
|
|
18628
18707
|
readonly VaultDeviceKey: {
|
|
18629
18708
|
/**
|
|
18630
|
-
* @description What the gateway verified at enrolment: Google key attestation (StrongBox or TEE), a TPM attestation of the Windows Hello key,
|
|
18709
|
+
* @description What the gateway verified at enrolment: Google key attestation (StrongBox or TEE), a TPM attestation of the Windows Hello key, an unattested Windows Hello key, or `software` for a `cli_ed25519` key (no hardware proof).
|
|
18631
18710
|
* @enum {string}
|
|
18632
18711
|
*/
|
|
18633
|
-
readonly attestation: 'android-strongbox' | 'android-tee' | 'tpm' | 'hello-unattested';
|
|
18712
|
+
readonly attestation: 'android-strongbox' | 'android-tee' | 'tpm' | 'hello-unattested' | 'software';
|
|
18634
18713
|
/** @description Attestation details (security level, OS patch level, verified boot state…). No secrets. */
|
|
18635
18714
|
readonly attestation_info: {
|
|
18636
18715
|
readonly [key: string]: unknown;
|
|
18637
18716
|
};
|
|
18638
18717
|
/** Format: date-time */
|
|
18639
18718
|
readonly created_at: string;
|
|
18640
|
-
/** @description Device id (`android-…`, `wear-…` or `
|
|
18719
|
+
/** @description Device id (`android-…`, `wear-…`, `desktop-…` or `cli-…`), chosen by the client. */
|
|
18641
18720
|
readonly id: string;
|
|
18642
|
-
/**
|
|
18643
|
-
|
|
18721
|
+
/**
|
|
18722
|
+
* @description `cli_ed25519` is the software key of `codaid`: it proves `POST /v1/vault/resolve` requests only and can never decide approvals or unlock the vault.
|
|
18723
|
+
* @enum {string}
|
|
18724
|
+
*/
|
|
18725
|
+
readonly kind: 'android_keystore' | 'windows_hello' | 'cli_ed25519';
|
|
18644
18726
|
/** Format: date-time */
|
|
18645
18727
|
readonly last_used_at: string | null;
|
|
18646
18728
|
readonly name: string;
|
|
@@ -18649,7 +18731,7 @@ type components$1 = {
|
|
|
18649
18731
|
/** Format: date-time */
|
|
18650
18732
|
readonly revoked_at: string | null;
|
|
18651
18733
|
/** @enum {string} */
|
|
18652
|
-
readonly surface: 'phone' | 'wear' | 'desktop';
|
|
18734
|
+
readonly surface: 'phone' | 'wear' | 'desktop' | 'cli';
|
|
18653
18735
|
};
|
|
18654
18736
|
readonly VaultGuards: {
|
|
18655
18737
|
/** @description Agent requests for one item within `burst_window_s` that count as a burst (`anomaly:burst`); 0 = off. */
|
|
@@ -18703,6 +18785,23 @@ type components$1 = {
|
|
|
18703
18785
|
/** Format: date-time */
|
|
18704
18786
|
readonly locked_at: string;
|
|
18705
18787
|
};
|
|
18788
|
+
readonly VaultResolveChallenge: {
|
|
18789
|
+
/** @description 32 random bytes, base64url. Single use; sign it into the next `POST /v1/vault/resolve` proof. */
|
|
18790
|
+
readonly challenge: string;
|
|
18791
|
+
/**
|
|
18792
|
+
* Format: date-time
|
|
18793
|
+
* @description 120 seconds after issue.
|
|
18794
|
+
*/
|
|
18795
|
+
readonly expires_at: string;
|
|
18796
|
+
};
|
|
18797
|
+
readonly VaultResolveProof: {
|
|
18798
|
+
/** @description Challenge from `POST /v1/vault/resolve/challenge`. */
|
|
18799
|
+
readonly challenge: string;
|
|
18800
|
+
/** @description An enrolled, unrevoked device key of the caller (desktop: `windows_hello`; codaid: `cli_ed25519`). */
|
|
18801
|
+
readonly device_id: string;
|
|
18802
|
+
/** @description Device-key signature, base64url, over `codai-vault/resolve/v1|<challenge>|<device_id>|<digest>` where `digest` = base64url_nopad(SHA-256(UTF-8(handles joined by `\n` + `\n\n` + action))), with `handles` and `action` exactly as sent. */
|
|
18803
|
+
readonly signature: string;
|
|
18804
|
+
};
|
|
18706
18805
|
readonly VaultUnlockChallenge: {
|
|
18707
18806
|
/** @description 32 random bytes, base64url. Single use. */
|
|
18708
18807
|
readonly challenge: string;
|
|
@@ -35028,6 +35127,7 @@ interface operations$1 {
|
|
|
35028
35127
|
readonly action: string;
|
|
35029
35128
|
readonly chain?: readonly string[];
|
|
35030
35129
|
readonly handles: readonly string[];
|
|
35130
|
+
readonly proof: components$1['schemas']['VaultResolveProof'];
|
|
35031
35131
|
/** @enum {string} */
|
|
35032
35132
|
readonly provenance?: 'user' | 'agent' | 'untrusted';
|
|
35033
35133
|
readonly purpose?: string;
|
|
@@ -35060,7 +35160,7 @@ interface operations$1 {
|
|
|
35060
35160
|
};
|
|
35061
35161
|
readonly 400: components$1['responses']['BadRequest'];
|
|
35062
35162
|
readonly 401: components$1['responses']['Unauthorized'];
|
|
35063
|
-
/** @description
|
|
35163
|
+
/** @description `invalid_device_proof`, `broker_only` (not a broker) or `vault_denied` (denied by policy). */
|
|
35064
35164
|
readonly 403: {
|
|
35065
35165
|
headers: {
|
|
35066
35166
|
readonly [name: string]: unknown;
|
|
@@ -35096,6 +35196,39 @@ interface operations$1 {
|
|
|
35096
35196
|
};
|
|
35097
35197
|
};
|
|
35098
35198
|
};
|
|
35199
|
+
readonly createVaultResolveChallenge: {
|
|
35200
|
+
readonly parameters: {
|
|
35201
|
+
readonly query?: never;
|
|
35202
|
+
readonly header?: never;
|
|
35203
|
+
readonly path?: never;
|
|
35204
|
+
readonly cookie?: never;
|
|
35205
|
+
};
|
|
35206
|
+
readonly requestBody?: never;
|
|
35207
|
+
readonly responses: {
|
|
35208
|
+
/** @description OK. */
|
|
35209
|
+
readonly 200: {
|
|
35210
|
+
headers: {
|
|
35211
|
+
readonly [name: string]: unknown;
|
|
35212
|
+
};
|
|
35213
|
+
content: {
|
|
35214
|
+
readonly 'application/json': components$1['schemas']['VaultResolveChallenge'];
|
|
35215
|
+
};
|
|
35216
|
+
};
|
|
35217
|
+
readonly 400: components$1['responses']['BadRequest'];
|
|
35218
|
+
readonly 401: components$1['responses']['Unauthorized'];
|
|
35219
|
+
/** @description `broker_only`: not a codai broker. */
|
|
35220
|
+
readonly 403: {
|
|
35221
|
+
headers: {
|
|
35222
|
+
readonly [name: string]: unknown;
|
|
35223
|
+
};
|
|
35224
|
+
content: {
|
|
35225
|
+
readonly 'application/json': {
|
|
35226
|
+
readonly [key: string]: unknown;
|
|
35227
|
+
};
|
|
35228
|
+
};
|
|
35229
|
+
};
|
|
35230
|
+
};
|
|
35231
|
+
};
|
|
35099
35232
|
readonly listVaultRules: {
|
|
35100
35233
|
readonly parameters: {
|
|
35101
35234
|
readonly query?: never;
|
|
@@ -38337,7 +38470,10 @@ export type VaultDeviceEnroll = Mutable<Schema<'VaultDeviceEnroll'>>;
|
|
|
38337
38470
|
export type VaultDeviceAttestation = VaultDeviceKey['attestation'];
|
|
38338
38471
|
export type VaultUseRequest = Mutable<Body<'vaultUse'>>;
|
|
38339
38472
|
export type VaultHttpRequest = Mutable<Body<'vaultHttp'>>;
|
|
38473
|
+
/** Requires `proof`: a fresh {@link Vault.resolveChallenge} signed over {@link vaultResolveMessage} by an enrolled device key. */
|
|
38340
38474
|
export type VaultResolveRequest = Mutable<Body<'vaultResolve'>>;
|
|
38475
|
+
export type VaultResolveProof = Mutable<Schema<'VaultResolveProof'>>;
|
|
38476
|
+
export type VaultResolveChallenge = Schema<'VaultResolveChallenge'>;
|
|
38341
38477
|
export type VaultTier = VaultAccount['default_tier'];
|
|
38342
38478
|
/** Anomaly guards (V-32): new host, burst, allowed hours. An anomaly forces t4. */
|
|
38343
38479
|
export type VaultGuards = Schema<'VaultGuards'>;
|
|
@@ -38353,6 +38489,14 @@ export type VaultItemLimitsInput = Mutable<Body<'setVaultItemLimits'>>;
|
|
|
38353
38489
|
export type VaultVia = 'hub' | 'desktop' | 'phone' | 'wear' | 'extension';
|
|
38354
38490
|
/** The UTF-8 message an unlock proof covers: `codai-vault/unlock/v1|<challenge>|<device_id or "passkey">`. */
|
|
38355
38491
|
export declare function vaultUnlockMessage(challenge: string, deviceIdOrPasskey: string): string;
|
|
38492
|
+
/**
|
|
38493
|
+
* The UTF-8 message a resolve proof covers: `codai-vault/resolve/v1|<challenge>|<device_id>|<digest>`, where `digest` =
|
|
38494
|
+
* base64url_nopad(SHA-256(handles.join("\n") + "\n\n" + action)) with handles and action exactly as sent.
|
|
38495
|
+
* Compute `digest` with your platform's SHA-256 (the SDK stays crypto-free).
|
|
38496
|
+
*/
|
|
38497
|
+
export declare function vaultResolveMessage(challenge: string, deviceId: string, digest: string): string;
|
|
38498
|
+
/** The exact UTF-8 text whose SHA-256 (base64url, no padding) is the resolve proof `digest`. */
|
|
38499
|
+
export declare function vaultResolveDigestInput(handles: readonly string[], action: string): string;
|
|
38356
38500
|
/** Loose JSON object answers (lists, acks) as documented in the OpenAPI spec. */
|
|
38357
38501
|
export type VaultObject = Record<string, unknown>;
|
|
38358
38502
|
type CallOpts$21 = {
|
|
@@ -38453,7 +38597,12 @@ export declare class Vault {
|
|
|
38453
38597
|
use(body: VaultUseRequest, opts?: CallOpts$21): Promise<VaultUseDecision>;
|
|
38454
38598
|
/** `POST /v1/vault/http` — brokered HTTPS call with `{{vault:<slug>}}` handles; 202 = approval required. */
|
|
38455
38599
|
httpCall(body: VaultHttpRequest, opts?: CallOpts$21): Promise<VaultObject>;
|
|
38456
|
-
/** `POST /v1/vault/resolve` — codai local brokers only
|
|
38600
|
+
/** `POST /v1/vault/resolve/challenge` — codai local brokers only; single-use resolve challenge, valid 120 s. */
|
|
38601
|
+
resolveChallenge(opts?: CallOpts$21): Promise<VaultResolveChallenge>;
|
|
38602
|
+
/**
|
|
38603
|
+
* `POST /v1/vault/resolve` — codai local brokers only (cloud fallback of `codaid vault run`); 202 = approval.
|
|
38604
|
+
* `body.proof` is required: 400 `proof_required` / `invalid_challenge`, 403 `invalid_device_proof`.
|
|
38605
|
+
*/
|
|
38457
38606
|
resolve(body: VaultResolveRequest, opts?: CallOpts$21): Promise<VaultObject>;
|
|
38458
38607
|
}
|
|
38459
38608
|
/** `share_token`, `surface`, `category`, `explanation`, `reporter_name`, `reporter_email`, `good_faith: true`. */
|
package/dist/index.js
CHANGED
|
@@ -3523,6 +3523,18 @@ var Voices = class {
|
|
|
3523
3523
|
function vaultUnlockMessage(challenge, deviceIdOrPasskey) {
|
|
3524
3524
|
return `codai-vault/unlock/v1|${challenge}|${deviceIdOrPasskey}`;
|
|
3525
3525
|
}
|
|
3526
|
+
/**
|
|
3527
|
+
* The UTF-8 message a resolve proof covers: `codai-vault/resolve/v1|<challenge>|<device_id>|<digest>`, where `digest` =
|
|
3528
|
+
* base64url_nopad(SHA-256(handles.join("\n") + "\n\n" + action)) with handles and action exactly as sent.
|
|
3529
|
+
* Compute `digest` with your platform's SHA-256 (the SDK stays crypto-free).
|
|
3530
|
+
*/
|
|
3531
|
+
function vaultResolveMessage(challenge, deviceId, digest) {
|
|
3532
|
+
return `codai-vault/resolve/v1|${challenge}|${deviceId}|${digest}`;
|
|
3533
|
+
}
|
|
3534
|
+
/** The exact UTF-8 text whose SHA-256 (base64url, no padding) is the resolve proof `digest`. */
|
|
3535
|
+
function vaultResolveDigestInput(handles, action) {
|
|
3536
|
+
return `${handles.join("\n")}\n\n${action}`;
|
|
3537
|
+
}
|
|
3526
3538
|
const seg = (base, id, suffix = "") => `${base}/${encodeURIComponent(id)}${suffix}`;
|
|
3527
3539
|
/** `/v1/vault/devices/*` — hardware-backed device approval keys (public keys only; revocation is instant). */
|
|
3528
3540
|
var VaultDevices = class {
|
|
@@ -3743,7 +3755,14 @@ var Vault = class {
|
|
|
3743
3755
|
httpCall(body, opts = {}) {
|
|
3744
3756
|
return this.send("POST", "/v1/vault/http", opts, body);
|
|
3745
3757
|
}
|
|
3746
|
-
/** `POST /v1/vault/resolve` — codai local brokers only
|
|
3758
|
+
/** `POST /v1/vault/resolve/challenge` — codai local brokers only; single-use resolve challenge, valid 120 s. */
|
|
3759
|
+
resolveChallenge(opts = {}) {
|
|
3760
|
+
return this.send("POST", "/v1/vault/resolve/challenge", opts, {});
|
|
3761
|
+
}
|
|
3762
|
+
/**
|
|
3763
|
+
* `POST /v1/vault/resolve` — codai local brokers only (cloud fallback of `codaid vault run`); 202 = approval.
|
|
3764
|
+
* `body.proof` is required: 400 `proof_required` / `invalid_challenge`, 403 `invalid_device_proof`.
|
|
3765
|
+
*/
|
|
3747
3766
|
resolve(body, opts = {}) {
|
|
3748
3767
|
return this.send("POST", "/v1/vault/resolve", opts, body);
|
|
3749
3768
|
}
|
|
@@ -6896,6 +6915,7 @@ const OPERATION_METHODS = {
|
|
|
6896
6915
|
vaultUse: "vault.use",
|
|
6897
6916
|
vaultHttp: "vault.httpCall",
|
|
6898
6917
|
vaultResolve: "vault.resolve",
|
|
6918
|
+
createVaultResolveChallenge: "vault.resolveChallenge",
|
|
6899
6919
|
createStudioAbuseReport: "abuseReports.create",
|
|
6900
6920
|
checkProvenance: "provenance.check",
|
|
6901
6921
|
createStudioBatch: "batches.create",
|
|
@@ -7727,5 +7747,5 @@ function allKeys(obj) {
|
|
|
7727
7747
|
return [...keys];
|
|
7728
7748
|
}
|
|
7729
7749
|
|
|
7730
|
-
export { AbuseReports, Account, AgentRuns, Agents, Assets, Audio, Batches, Billing, BrandKits, Cards, Chat, ChatCompletions, Codai, Codai as default, CodaiApps, CodaiError, Creatives, Devices, Documents, Embeddings, EnvironmentFiles, EnvironmentJobs, EnvironmentMembers, EnvironmentPorts, EnvironmentSecrets, EnvironmentTasks, Environments, Exports, Feedback, Health, Heartbeats, Hosts, HttpClient, Images, JAM_CLOSE_CODES, JAM_SCALES, JAM_SUBPROTOCOL, Jam, JamSession, Keys, Lists, LyricsResource, MediaOps, Memory, Messages, Models, Music, MusicRoom, Notifications, OPERATION_METHODS, OrgMembers, Orgs, OsGate, PROVENANCE_MAX_BYTES, PhoneModels, Productions, Projects, Prompts, Provenance, RESOLVE_ATTESTATION_PAYLOAD_TYPE, RESOLVE_OPERATION_METHODS, RESOLVE_TERMINAL_STATUSES, Realtime, RealtimeSession, Receipts, Referrals, Renders, Research, Resolve, ResolveError, ResolveInsufficientFundsError, Responses, STREAMING_OPERATIONS, SandboxFiles, Sandboxes, ScheduleExecutor, SchedulerHosts, Schedules, SessionControls, SessionEvents, SessionLease, SessionShares, Sessions, Settings, Sfx, Shares, SystemOne, TUS_CHUNK_BYTES, Tasks, Templates, Tokens, Tools, Transcripts, Triggers, Usage, Vault, VaultDevices, Verify, Videos, VoiceRevocations, Voices, extensionHeaders, frameJson, isAssetDto, isMediaOpJob, isMediaOpJobFinished, isMusicRoomFinished, isPagedBuild, isProductionFinished, isResearchFinished, jamUrl, mergeToolCall, readSse, realtimeUrl, resolveAttestationStatement, settingsConflictCurrent, shareTokenFrom, uploadIdFromLocation, vaultUnlockMessage, verifyAttestationWithKeys, verifyResolveWebhook };
|
|
7750
|
+
export { AbuseReports, Account, AgentRuns, Agents, Assets, Audio, Batches, Billing, BrandKits, Cards, Chat, ChatCompletions, Codai, Codai as default, CodaiApps, CodaiError, Creatives, Devices, Documents, Embeddings, EnvironmentFiles, EnvironmentJobs, EnvironmentMembers, EnvironmentPorts, EnvironmentSecrets, EnvironmentTasks, Environments, Exports, Feedback, Health, Heartbeats, Hosts, HttpClient, Images, JAM_CLOSE_CODES, JAM_SCALES, JAM_SUBPROTOCOL, Jam, JamSession, Keys, Lists, LyricsResource, MediaOps, Memory, Messages, Models, Music, MusicRoom, Notifications, OPERATION_METHODS, OrgMembers, Orgs, OsGate, PROVENANCE_MAX_BYTES, PhoneModels, Productions, Projects, Prompts, Provenance, RESOLVE_ATTESTATION_PAYLOAD_TYPE, RESOLVE_OPERATION_METHODS, RESOLVE_TERMINAL_STATUSES, Realtime, RealtimeSession, Receipts, Referrals, Renders, Research, Resolve, ResolveError, ResolveInsufficientFundsError, Responses, STREAMING_OPERATIONS, SandboxFiles, Sandboxes, ScheduleExecutor, SchedulerHosts, Schedules, SessionControls, SessionEvents, SessionLease, SessionShares, Sessions, Settings, Sfx, Shares, SystemOne, TUS_CHUNK_BYTES, Tasks, Templates, Tokens, Tools, Transcripts, Triggers, Usage, Vault, VaultDevices, Verify, Videos, VoiceRevocations, Voices, extensionHeaders, frameJson, isAssetDto, isMediaOpJob, isMediaOpJobFinished, isMusicRoomFinished, isPagedBuild, isProductionFinished, isResearchFinished, jamUrl, mergeToolCall, readSse, realtimeUrl, resolveAttestationStatement, settingsConflictCurrent, shareTokenFrom, uploadIdFromLocation, vaultResolveDigestInput, vaultResolveMessage, vaultUnlockMessage, verifyAttestationWithKeys, verifyResolveWebhook };
|
|
7731
7751
|
//# sourceMappingURL=index.js.map
|