@oxy.so/contracts 1.2.0 → 1.3.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.
Files changed (53) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/identity.js +3 -2
  3. package/dist/cjs/identityMove.js +111 -40
  4. package/dist/cjs/identityProof.js +164 -0
  5. package/dist/cjs/identityRecovery.js +51 -0
  6. package/dist/cjs/index.js +50 -21
  7. package/dist/cjs/inference/identifiers.js +3 -1
  8. package/dist/cjs/inference/providerConnection.js +1 -1
  9. package/dist/cjs/inference/request.js +15 -1
  10. package/dist/cjs/inference/streamEvents.js +24 -2
  11. package/dist/cjs/username.js +70 -2
  12. package/dist/cjs/webIdentityCarrier.js +112 -53
  13. package/dist/cjs/webauthn.js +14 -0
  14. package/dist/esm/.tsbuildinfo +1 -1
  15. package/dist/esm/identity.js +3 -2
  16. package/dist/esm/identityMove.js +105 -39
  17. package/dist/esm/identityProof.js +159 -0
  18. package/dist/esm/identityRecovery.js +48 -0
  19. package/dist/esm/index.js +11 -8
  20. package/dist/esm/inference/identifiers.js +2 -0
  21. package/dist/esm/inference/providerConnection.js +2 -2
  22. package/dist/esm/inference/request.js +14 -0
  23. package/dist/esm/inference/streamEvents.js +24 -2
  24. package/dist/esm/username.js +69 -1
  25. package/dist/esm/webIdentityCarrier.js +111 -52
  26. package/dist/esm/webauthn.js +14 -0
  27. package/dist/types/.tsbuildinfo +1 -1
  28. package/dist/types/accountGraph.d.ts +7 -7
  29. package/dist/types/agency.d.ts +24 -24
  30. package/dist/types/browserHub.d.ts +16 -16
  31. package/dist/types/deviceDirectory.d.ts +28 -28
  32. package/dist/types/externalIdentity.d.ts +7 -7
  33. package/dist/types/identity.d.ts +3 -2
  34. package/dist/types/identityMove.d.ts +119 -43
  35. package/dist/types/identityProof.d.ts +156 -0
  36. package/dist/types/identityRecovery.d.ts +246 -0
  37. package/dist/types/index.d.ts +13 -11
  38. package/dist/types/inference/identifiers.d.ts +2 -0
  39. package/dist/types/inference/providerConnection.d.ts +40 -40
  40. package/dist/types/inference/request.d.ts +84 -36
  41. package/dist/types/inference/streamEvents.d.ts +57 -1
  42. package/dist/types/keyRotation.d.ts +2 -2
  43. package/dist/types/oauth.d.ts +30 -30
  44. package/dist/types/sessionStatus.d.ts +6 -6
  45. package/dist/types/transparency.d.ts +10 -10
  46. package/dist/types/userResponse.d.ts +18 -18
  47. package/dist/types/username.d.ts +25 -2
  48. package/dist/types/webIdentityCarrier.d.ts +767 -159
  49. package/dist/types/webauthn.d.ts +208 -0
  50. package/package.json +1 -1
  51. package/dist/cjs/devicePairing.js +0 -138
  52. package/dist/esm/devicePairing.js +0 -135
  53. package/dist/types/devicePairing.d.ts +0 -130
@@ -0,0 +1,156 @@
1
+ /**
2
+ * Identity proof contract — the ONE signed format for operations on a personal root.
3
+ *
4
+ * ADR 0024 D7. A proof is a signature by the root key over the canonical bytes
5
+ * of {@link IdentityProofClaims}. Every field the verifier cares about is IN the
6
+ * signed bytes, so a signature cannot be moved to another operation, account,
7
+ * root, payload, revision or audience, and the one-use `challenge` means it
8
+ * cannot be replayed either (a timestamp window is not replay protection).
9
+ *
10
+ * Both sides build the bytes with {@link buildIdentityProofMessage} and hash
11
+ * payloads with {@link canonicalJson}; neither writes its own JSON template, so
12
+ * the client and the verifier cannot drift apart.
13
+ *
14
+ * Platform-agnostic — zod only, ESM-safe (no `require()`), no hashing here (the
15
+ * caller hashes `canonicalJson(payload)` with SHA-256 using its platform's
16
+ * primitive and passes the hex digest in).
17
+ */
18
+ import { z } from 'zod';
19
+ export declare const IDENTITY_PROOF_VERSION: 2;
20
+ export declare const IDENTITY_PROOF_DOMAIN: "oxy-identity-proof";
21
+ /** The audience every API-verified identity proof names. */
22
+ export declare const IDENTITY_PROOF_AUDIENCE: "oxy-api/identity";
23
+ /** How long a proof challenge lives: one interactive ceremony. */
24
+ export declare const IDENTITY_PROOF_CHALLENGE_TTL_MS: number;
25
+ /**
26
+ * Everything a root proof may authorize. A challenge is minted for exactly one
27
+ * action and spent only by a proof for that action.
28
+ */
29
+ export declare const IDENTITY_PROOF_ACTIONS: {
30
+ /** A keyless account's FIRST root, stored with its web envelope. */
31
+ readonly establish: "web_envelope_establish";
32
+ /** Replace the web envelope (add or remove a wrap, re-seal). */
33
+ readonly put: "web_envelope_put";
34
+ /** Record that the recovery material is written down. */
35
+ readonly phraseConfirmed: "web_envelope_phrase_confirmed";
36
+ /** Record that the recovery material re-derived the root. */
37
+ readonly recoveryVerified: "web_envelope_recovery_verified";
38
+ /** Remove the web holder. */
39
+ readonly delete: "web_envelope_delete";
40
+ /** Link a keyless account's first root without a web envelope (`POST /auth/link`). */
41
+ readonly link: "link_identity";
42
+ /** Create a personal account together with its root (passkey sign-up). */
43
+ readonly enroll: "enroll_identity";
44
+ /** Prove the root to start signed-out recovery. */
45
+ readonly recoverStart: "recover_account_start";
46
+ /** Bind the new passkey and envelope when completing signed-out recovery. */
47
+ readonly recoverComplete: "recover_account_complete";
48
+ /** Seal the root for the Commons device that joined a move (payload: move id + sealed bytes). */
49
+ readonly moveSeal: "identity_move_seal";
50
+ };
51
+ export type IdentityProofAction = (typeof IDENTITY_PROOF_ACTIONS)[keyof typeof IDENTITY_PROOF_ACTIONS];
52
+ export declare const IDENTITY_PROOF_ACTION_VALUES: [IdentityProofAction, ...IdentityProofAction[]];
53
+ /**
54
+ * The signed claims. `null` is written explicitly for a field that does not
55
+ * apply, so "absent" can never be confused with a value.
56
+ */
57
+ export interface IdentityProofClaims {
58
+ action: IdentityProofAction;
59
+ /** The account the operation changes (`users.id`), or a namespaced subject (`username:alice`) before one exists. */
60
+ subject: string;
61
+ /** Who performs it: the signed-in personal principal, or `credential:<id>` / `anonymous` where none exists. */
62
+ actor: string;
63
+ /** The root doing the signing, lowercase uncompressed hex. */
64
+ rootPublicKey: string;
65
+ /** SHA-256 hex of `canonicalJson(payload)`, or `null` when the operation has no payload. */
66
+ payloadDigest: string | null;
67
+ /** The envelope revision the operation expects to replace, or `null`. */
68
+ expectedRevision: number | null;
69
+ audience: string;
70
+ /** The one-use server challenge. */
71
+ challenge: string;
72
+ /** Unix milliseconds after which the proof is refused. */
73
+ expiresAt: number;
74
+ }
75
+ /**
76
+ * Canonical JSON: object keys sorted by UTF-16 code unit, no whitespace,
77
+ * `undefined` members omitted, arrays in order. Numbers must be finite. This is
78
+ * the ONLY serializer for anything digested into a proof.
79
+ */
80
+ export declare function canonicalJson(value: unknown): string;
81
+ /**
82
+ * The exact bytes a root signs. Throws on a malformed claim rather than signing
83
+ * (or verifying) something ambiguous.
84
+ */
85
+ export declare function buildIdentityProofMessage(claims: IdentityProofClaims): string;
86
+ /** The proof as it travels: the signature plus the two claims the verifier cannot derive. */
87
+ export declare const identityProofSchema: z.ZodObject<{
88
+ v: z.ZodLiteral<2>;
89
+ challenge: z.ZodString;
90
+ expiresAt: z.ZodNumber;
91
+ signature: z.ZodString;
92
+ }, "strip", z.ZodTypeAny, {
93
+ expiresAt: number;
94
+ signature: string;
95
+ v: 2;
96
+ challenge: string;
97
+ }, {
98
+ expiresAt: number;
99
+ signature: string;
100
+ v: 2;
101
+ challenge: string;
102
+ }>;
103
+ export type IdentityProof = z.infer<typeof identityProofSchema>;
104
+ /** `POST /identity/proof-challenge` */
105
+ export declare const identityProofChallengeRequestSchema: z.ZodObject<{
106
+ action: z.ZodEnum<[IdentityProofAction, ...IdentityProofAction[]]>;
107
+ }, "strip", z.ZodTypeAny, {
108
+ action: IdentityProofAction;
109
+ }, {
110
+ action: IdentityProofAction;
111
+ }>;
112
+ export type IdentityProofChallengeRequest = z.infer<typeof identityProofChallengeRequestSchema>;
113
+ export interface IdentityProofChallengeResponse {
114
+ challenge: string;
115
+ /** Unix milliseconds; a proof must not claim a later `expiresAt`. */
116
+ expiresAt: number;
117
+ audience: string;
118
+ }
119
+ export declare const identityProofChallengeResponseSchema: z.ZodType<IdentityProofChallengeResponse>;
120
+ /**
121
+ * Stable error codes the root routes answer with (`error.code` in the API error
122
+ * body). Clients map these through their localization, never the English message.
123
+ */
124
+ export declare const IDENTITY_ERROR_CODES: {
125
+ readonly proofInvalid: "IDENTITY_PROOF_INVALID";
126
+ readonly revisionConflict: "IDENTITY_ENVELOPE_REVISION_CONFLICT";
127
+ readonly rootAlreadyLinked: "IDENTITY_ROOT_ALREADY_LINKED";
128
+ readonly rootLinkedElsewhere: "IDENTITY_ROOT_LINKED_ELSEWHERE";
129
+ readonly noRoot: "IDENTITY_NO_ROOT";
130
+ readonly freshFactorRequired: "IDENTITY_FRESH_FACTOR_REQUIRED";
131
+ readonly lastWebHolder: "IDENTITY_LAST_WEB_HOLDER";
132
+ readonly enrollmentRequired: "IDENTITY_ENROLLMENT_REQUIRED";
133
+ readonly enrollmentInvalid: "IDENTITY_ENROLLMENT_INVALID";
134
+ readonly notPersonal: "IDENTITY_NOT_PERSONAL_ACCOUNT";
135
+ readonly recoveryFailed: "IDENTITY_RECOVERY_FAILED";
136
+ };
137
+ export type IdentityErrorCode = (typeof IDENTITY_ERROR_CODES)[keyof typeof IDENTITY_ERROR_CODES];
138
+ /**
139
+ * `GET /identity/root-status` — non-sensitive readiness metadata any first-party
140
+ * surface (Accounts, the account menu) may read with a bearer to show a reminder,
141
+ * without the ciphertext and without opening anything (ADR 0024 D5).
142
+ */
143
+ export interface IdentityRootStatus {
144
+ /** Whether the account has a root at all. */
145
+ rootLinked: boolean;
146
+ /** Passkeys whose wraps can open the web holder, and how many have proven it. `null`: no web holder. */
147
+ webHolder: {
148
+ passkeys: number;
149
+ verifiedPasskeys: number;
150
+ } | null;
151
+ /** Whether the root has recovery words (a raw-key root does not). `null` when unknown (no web holder). */
152
+ hasPhrase: boolean | null;
153
+ phraseConfirmedAt: string | null;
154
+ recoveryVerifiedAt: string | null;
155
+ }
156
+ export declare const identityRootStatusSchema: z.ZodType<IdentityRootStatus>;
@@ -0,0 +1,246 @@
1
+ /**
2
+ * Signed-out recovery contract (ADR 0024 D5) — get an EXISTING account back from
3
+ * its root alone, with no passkey, session or email.
4
+ *
5
+ * 1. `POST /identity/recovery/challenge` → a one-use challenge. It says nothing
6
+ * about any account.
7
+ * 2. The holder derives the root locally from recovery material (12/24 words or a
8
+ * raw key) and signs `recover_account_start` over that challenge:
9
+ * `POST /identity/recovery/start { publicKey, proof }`. Only a valid proof
10
+ * learns which account the root belongs to; the response carries passkey
11
+ * registration options for THAT account and a short-lived ticket.
12
+ * 3. The holder creates the passkey, seals the root under it (PRF), and signs
13
+ * `recover_account_complete` over the registration challenge and the envelope
14
+ * digest: `POST /identity/recovery/complete`. The passkey, the envelope and a
15
+ * session are created in one transaction.
16
+ *
17
+ * The recovery material and the root never leave the holder. Platform-agnostic —
18
+ * zod only, ESM-safe.
19
+ */
20
+ import { z } from 'zod';
21
+ /** A recovery attempt lives this long between steps. */
22
+ export declare const IDENTITY_RECOVERY_TTL_MS: number;
23
+ export interface IdentityRecoveryChallengeResponse {
24
+ /** 32 bytes, lowercase hex. */
25
+ challenge: string;
26
+ /** Unix milliseconds. */
27
+ expiresAt: number;
28
+ }
29
+ export declare const identityRecoveryChallengeResponseSchema: z.ZodType<IdentityRecoveryChallengeResponse>;
30
+ export declare const identityRecoveryStartRequestSchema: z.ZodObject<{
31
+ publicKey: z.ZodString;
32
+ /** `recover_account_start`, subject `root:<publicKey>`, actor `anonymous`. */
33
+ proof: z.ZodObject<{
34
+ v: z.ZodLiteral<2>;
35
+ challenge: z.ZodString;
36
+ expiresAt: z.ZodNumber;
37
+ signature: z.ZodString;
38
+ }, "strip", z.ZodTypeAny, {
39
+ expiresAt: number;
40
+ signature: string;
41
+ v: 2;
42
+ challenge: string;
43
+ }, {
44
+ expiresAt: number;
45
+ signature: string;
46
+ v: 2;
47
+ challenge: string;
48
+ }>;
49
+ }, "strict", z.ZodTypeAny, {
50
+ publicKey: string;
51
+ proof: {
52
+ expiresAt: number;
53
+ signature: string;
54
+ v: 2;
55
+ challenge: string;
56
+ };
57
+ }, {
58
+ publicKey: string;
59
+ proof: {
60
+ expiresAt: number;
61
+ signature: string;
62
+ v: 2;
63
+ challenge: string;
64
+ };
65
+ }>;
66
+ export type IdentityRecoveryStartRequest = z.infer<typeof identityRecoveryStartRequestSchema>;
67
+ export interface IdentityRecoveryStartResponse {
68
+ /** Opaque, one-use; presented once to `complete`. */
69
+ ticket: string;
70
+ accountId: string;
71
+ username: string | null;
72
+ /** `PublicKeyCredentialCreationOptionsJSON` for the account's new passkey. */
73
+ registrationOptions: Record<string, unknown>;
74
+ /** Unix milliseconds. */
75
+ expiresAt: number;
76
+ }
77
+ export declare const identityRecoveryCompleteRequestSchema: z.ZodObject<{
78
+ ticket: z.ZodString;
79
+ /** The browser `RegistrationResponseJSON`, verified by the API's WebAuthn library. */
80
+ response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
81
+ /** The root sealed under the new passkey — exactly one wrap, for that credential. */
82
+ envelope: z.ZodEffects<z.ZodObject<{
83
+ version: z.ZodLiteral<2>;
84
+ algorithm: z.ZodLiteral<"xchacha20poly1305">;
85
+ publicKey: z.ZodString;
86
+ secretKind: z.ZodEnum<["mnemonic-entropy", "raw-private-key"]>;
87
+ secretNonce: z.ZodString;
88
+ sealedSecret: z.ZodString;
89
+ wraps: z.ZodArray<z.ZodObject<{
90
+ credentialId: z.ZodString;
91
+ nonce: z.ZodString;
92
+ wrappedKey: z.ZodString;
93
+ createdAt: z.ZodString;
94
+ rpId: z.ZodString;
95
+ verifiedAt: z.ZodOptional<z.ZodString>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ credentialId: string;
98
+ createdAt: string;
99
+ nonce: string;
100
+ wrappedKey: string;
101
+ rpId: string;
102
+ verifiedAt?: string | undefined;
103
+ }, {
104
+ credentialId: string;
105
+ createdAt: string;
106
+ nonce: string;
107
+ wrappedKey: string;
108
+ rpId: string;
109
+ verifiedAt?: string | undefined;
110
+ }>, "many">;
111
+ }, "strip", z.ZodTypeAny, {
112
+ version: 2;
113
+ publicKey: string;
114
+ algorithm: "xchacha20poly1305";
115
+ secretKind: "mnemonic-entropy" | "raw-private-key";
116
+ secretNonce: string;
117
+ sealedSecret: string;
118
+ wraps: {
119
+ credentialId: string;
120
+ createdAt: string;
121
+ nonce: string;
122
+ wrappedKey: string;
123
+ rpId: string;
124
+ verifiedAt?: string | undefined;
125
+ }[];
126
+ }, {
127
+ version: 2;
128
+ publicKey: string;
129
+ algorithm: "xchacha20poly1305";
130
+ secretKind: "mnemonic-entropy" | "raw-private-key";
131
+ secretNonce: string;
132
+ sealedSecret: string;
133
+ wraps: {
134
+ credentialId: string;
135
+ createdAt: string;
136
+ nonce: string;
137
+ wrappedKey: string;
138
+ rpId: string;
139
+ verifiedAt?: string | undefined;
140
+ }[];
141
+ }>, {
142
+ version: 2;
143
+ publicKey: string;
144
+ algorithm: "xchacha20poly1305";
145
+ secretKind: "mnemonic-entropy" | "raw-private-key";
146
+ secretNonce: string;
147
+ sealedSecret: string;
148
+ wraps: {
149
+ credentialId: string;
150
+ createdAt: string;
151
+ nonce: string;
152
+ wrappedKey: string;
153
+ rpId: string;
154
+ verifiedAt?: string | undefined;
155
+ }[];
156
+ }, {
157
+ version: 2;
158
+ publicKey: string;
159
+ algorithm: "xchacha20poly1305";
160
+ secretKind: "mnemonic-entropy" | "raw-private-key";
161
+ secretNonce: string;
162
+ sealedSecret: string;
163
+ wraps: {
164
+ credentialId: string;
165
+ createdAt: string;
166
+ nonce: string;
167
+ wrappedKey: string;
168
+ rpId: string;
169
+ verifiedAt?: string | undefined;
170
+ }[];
171
+ }>;
172
+ /** `recover_account_complete`, subject = account id, actor `credential:<id>`, challenge = registration challenge (hex). */
173
+ proof: z.ZodObject<{
174
+ v: z.ZodLiteral<2>;
175
+ challenge: z.ZodString;
176
+ expiresAt: z.ZodNumber;
177
+ signature: z.ZodString;
178
+ }, "strip", z.ZodTypeAny, {
179
+ expiresAt: number;
180
+ signature: string;
181
+ v: 2;
182
+ challenge: string;
183
+ }, {
184
+ expiresAt: number;
185
+ signature: string;
186
+ v: 2;
187
+ challenge: string;
188
+ }>;
189
+ deviceName: z.ZodOptional<z.ZodString>;
190
+ deviceFingerprint: z.ZodOptional<z.ZodString>;
191
+ }, "strict", z.ZodTypeAny, {
192
+ proof: {
193
+ expiresAt: number;
194
+ signature: string;
195
+ v: 2;
196
+ challenge: string;
197
+ };
198
+ envelope: {
199
+ version: 2;
200
+ publicKey: string;
201
+ algorithm: "xchacha20poly1305";
202
+ secretKind: "mnemonic-entropy" | "raw-private-key";
203
+ secretNonce: string;
204
+ sealedSecret: string;
205
+ wraps: {
206
+ credentialId: string;
207
+ createdAt: string;
208
+ nonce: string;
209
+ wrappedKey: string;
210
+ rpId: string;
211
+ verifiedAt?: string | undefined;
212
+ }[];
213
+ };
214
+ response: Record<string, unknown>;
215
+ ticket: string;
216
+ deviceName?: string | undefined;
217
+ deviceFingerprint?: string | undefined;
218
+ }, {
219
+ proof: {
220
+ expiresAt: number;
221
+ signature: string;
222
+ v: 2;
223
+ challenge: string;
224
+ };
225
+ envelope: {
226
+ version: 2;
227
+ publicKey: string;
228
+ algorithm: "xchacha20poly1305";
229
+ secretKind: "mnemonic-entropy" | "raw-private-key";
230
+ secretNonce: string;
231
+ sealedSecret: string;
232
+ wraps: {
233
+ credentialId: string;
234
+ createdAt: string;
235
+ nonce: string;
236
+ wrappedKey: string;
237
+ rpId: string;
238
+ verifiedAt?: string | undefined;
239
+ }[];
240
+ };
241
+ response: Record<string, unknown>;
242
+ ticket: string;
243
+ deviceName?: string | undefined;
244
+ deviceFingerprint?: string | undefined;
245
+ }>;
246
+ export type IdentityRecoveryCompleteRequest = z.infer<typeof identityRecoveryCompleteRequestSchema>;
@@ -11,7 +11,7 @@
11
11
  */
12
12
  export { ACCOUNT_KINDS, accountKindSchema, CHILD_ACCOUNT_KINDS, childAccountKindSchema, isAccountKind, isDelegatedActAsEligibleKind, isOperatorSwitchTargetKind, ACCOUNT_CATEGORY_IDS, ACCOUNT_CATEGORY_KINDS, accountCategoriesSchema, accountCategoryIdSchema, isSelectableAccountCategoryId, kindAcceptsAccountCategories, MAX_ACCOUNT_CATEGORIES, newlyAddedRetiredCategories, RETIRED_ACCOUNT_CATEGORY_IDS, SELECTABLE_ACCOUNT_CATEGORY_IDS, createAccountRequestSchema, } from './accountGraph';
13
13
  export type { AccountKind, AccountCategoryId, AccountCategoryKind, ChildAccountKind, CreateAccountRequest, } from './accountGraph';
14
- export { usernameSchema, usernameSchemaForAccountKind, isValidUsername, stripDisallowedUsernameCharacters, applyBotUsernameSuffix, USERNAME_MIN_LENGTH, USERNAME_MAX_LENGTH, USERNAME_INVALID_MESSAGE, BOT_USERNAME_INVALID_MESSAGE, } from './username';
14
+ export { usernameSchema, usernameSchemaForAccountKind, isValidUsername, stripDisallowedUsernameCharacters, applyBotUsernameSuffix, USERNAME_MIN_LENGTH, USERNAME_MAX_LENGTH, USERNAME_INVALID_MESSAGE, BOT_USERNAME_INVALID_MESSAGE, RESERVED_USERNAME_MESSAGE, NUMERIC_USERNAME_MESSAGE, } from './username';
15
15
  export { userNameSchema, userRelationshipSchema, themePreferenceSchema, dateOfBirthSchema, userResponseSchema, userProfileUpdateSchema, currentUserResponseSchema, deviceLinkedSessionSchema, deviceLinkedSessionsResponseSchema, resolveUserId, safeParseContract, } from './userResponse';
16
16
  export type { UserNameResponse, UserRelationship, ThemePreference, UserResponse, UserProfileUpdate, CurrentUserResponseContract, DeviceLinkedSessionResponse, DeviceLinkedSessionsResponseContract, } from './userResponse';
17
17
  export { applicationTypeSchema, publicApplicationSchema, sessionStatusSchema, } from './sessionStatus';
@@ -51,16 +51,18 @@ export { rotateKeyChallengeResponseSchema, rotateKeyCompleteRequestSchema, rotat
51
51
  export type { RotateKeyChallengeResponse, RotateKeyCompleteRequest, RotateKeyCompleteResponse, } from './keyRotation';
52
52
  export { backupLookupIdSchema, encryptedBackupEnvelopeSchema, backupUploadRequestSchema, backupStatusResponseSchema, } from './keyRecovery';
53
53
  export type { EncryptedBackupEnvelope, BackupUploadRequest, BackupStatusResponse, } from './keyRecovery';
54
- export { WEB_IDENTITY_ENVELOPE_VERSION, webIdentityPublicKeySchema, webauthnCredentialIdSchema, webIdentityWrapSchema, webIdentityEnvelopeSchema, webIdentityEnvelopeUploadSchema, webIdentityEnvelopeResponseSchema, webIdentityEnvelopeProofSchema, webIdentityEnvelopePutSchema, webIdentityEnvelopeEstablishSchema, } from './webIdentityCarrier';
55
- export { IDENTITY_MOVE_TTL_MS, IDENTITY_MOVE_STATUSES, IDENTITY_MOVE_QR_PREFIX, identityMoveIdSchema, identityMoveEphemeralKeySchema, identityMoveCreateRequestSchema, identityMoveCreateResponseSchema, identityMoveJoinRequestSchema, identityMoveSealRequestSchema, identityMoveReceiptRequestSchema, identityMoveStateSchema, } from './identityMove';
56
- export type { IdentityMoveStatus, IdentityMoveCreateRequest, IdentityMoveCreateResponse, IdentityMoveJoinRequest, IdentityMoveSealRequest, IdentityMoveReceiptRequest, IdentityMoveState, } from './identityMove';
57
- export type { WebIdentityWrap, WebIdentityEnvelope, WebIdentityEnvelopeUpload, WebIdentityEnvelopeResponse, WebIdentityEnvelopeProof, WebIdentityEnvelopePut, WebIdentityEnvelopeEstablish, } from './webIdentityCarrier';
54
+ export { WEB_IDENTITY_ENVELOPE_VERSION, WEB_IDENTITY_SECRET_KINDS, webIdentityPublicKeySchema, webauthnCredentialIdSchema, webauthnRpIdSchema, webIdentityWrapSchema, webIdentityEnvelopeSchema, webIdentityEnvelopeUploadSchema, webIdentityHolderSchema, webIdentityEnvelopeResponseSchema, webIdentityEnvelopeProofFieldsSchema, webIdentityEnvelopeActionSchema, webIdentityEnvelopePutSchema, webauthnAssertionResponseSchema, webIdentityEnvelopeEstablishSchema, } from './webIdentityCarrier';
55
+ export { IDENTITY_PROOF_VERSION, IDENTITY_PROOF_DOMAIN, IDENTITY_PROOF_AUDIENCE, IDENTITY_PROOF_CHALLENGE_TTL_MS, IDENTITY_PROOF_ACTIONS, IDENTITY_PROOF_ACTION_VALUES, IDENTITY_ERROR_CODES, canonicalJson, buildIdentityProofMessage, identityProofSchema, identityProofChallengeRequestSchema, identityProofChallengeResponseSchema, identityRootStatusSchema, } from './identityProof';
56
+ export { IDENTITY_RECOVERY_TTL_MS, identityRecoveryChallengeResponseSchema, identityRecoveryStartRequestSchema, identityRecoveryCompleteRequestSchema, } from './identityRecovery';
57
+ export type { IdentityRecoveryChallengeResponse, IdentityRecoveryStartRequest, IdentityRecoveryStartResponse, IdentityRecoveryCompleteRequest, } from './identityRecovery';
58
+ export type { IdentityProofAction, IdentityErrorCode, IdentityProofClaims, IdentityProof, IdentityProofChallengeRequest, IdentityProofChallengeResponse, IdentityRootStatus, } from './identityProof';
59
+ export { IDENTITY_MOVE_TTL_MS, IDENTITY_MOVE_STATUSES, IDENTITY_MOVE_QR_PREFIX, identityMoveRevealRequestSchema, buildMoveCommitmentInput, buildMoveSasInput, buildMoveSealPayload, buildMoveCiphertextDigestInput, buildMoveReceiptMessage, identityMoveIdSchema, identityMoveEphemeralKeySchema, identityMoveCreateRequestSchema, identityMoveCreateResponseSchema, identityMoveJoinRequestSchema, identityMoveSealRequestSchema, identityMoveReceiptRequestSchema, identityMoveStateSchema, } from './identityMove';
60
+ export type { IdentityMoveStatus, IdentityMoveCreateRequest, IdentityMoveCreateResponse, IdentityMoveJoinRequest, IdentityMoveSealRequest, IdentityMoveReceiptRequest, IdentityMoveRevealRequest, IdentityMoveState, } from './identityMove';
61
+ export type { WebIdentityWrap, WebIdentityEnvelope, WebIdentitySecretKind, WebIdentityHolder, WebIdentityEnvelopeAction, WebauthnAssertionResponse, WebIdentityEnvelopeUpload, WebIdentityEnvelopeResponse, WebIdentityEnvelopePut, WebIdentityEnvelopeEstablish, } from './webIdentityCarrier';
58
62
  export { updatePlatformSchema, updateStatusSchema, updateAssetStatusSchema, sha256HexSchema, channelNameSchema, runtimeVersionSchema, rolloutPercentSchema, assetInitItemSchema, assetInitRequestSchema, assetUploadTicketSchema, assetInitResponseSchema, assetCompleteRequestSchema, assetCompleteResultItemSchema, assetCompleteResponseSchema, updateAssetRefSchema, createUpdateRequestSchema, updateSchema, createUpdateResponseSchema, rollbackToEmbeddedEntrySchema, channelSchema, channelListResponseSchema, updateListResponseSchema, rollbackRequestSchema, rollbackToEmbeddedRequestSchema, promoteRequestSchema, updateRolloutPatchSchema, } from './updates';
59
63
  export type { UpdatePlatform, UpdateStatus, UpdateAssetStatus, AssetInitItem, AssetInitRequest, AssetUploadTicket, AssetInitResponse, AssetCompleteRequest, AssetCompleteResultItem, AssetCompleteResponse, UpdateAssetRef, CreateUpdateRequest, Update, CreateUpdateResponse, RollbackToEmbeddedEntry, Channel, ChannelListResponse, UpdateListResponse, RollbackRequest, RollbackToEmbeddedRequest, PromoteRequest, UpdateRolloutPatch, } from './updates';
60
64
  export { webauthnRegisterOptionsRequestSchema, webauthnLoginOptionsRequestSchema, webauthnRegisterVerifyRequestSchema, webauthnLoginVerifyRequestSchema, } from './webauthn';
61
65
  export type { WebauthnRegisterOptionsRequest, WebauthnLoginOptionsRequest, WebauthnRegisterVerifyRequest, WebauthnLoginVerifyRequest, } from './webauthn';
62
- export { devicePairingStatusSchema, deviceTransferInitRequestSchema, deviceTransferInitResponseSchema, deviceTransferInfoResponseSchema, deviceTransferApproveRequestSchema, deviceTransferApproveResponseSchema, deviceTransferDenyResponseSchema, } from './devicePairing';
63
- export type { DevicePairingStatus, DeviceTransferInitRequest, DeviceTransferInitResponse, DeviceTransferInfoResponse, DeviceTransferApproveRequest, DeviceTransferApproveResponse, DeviceTransferDenyResponse, } from './devicePairing';
64
66
  export { transparencyCheckpointSignatureSchema, transparencyAnchorSchema, transparencyCheckpointSchema, transparencyInclusionProofSchema, transparencyCheckpointListSchema, } from './transparency';
65
67
  export type { TransparencyCheckpointSignature, TransparencyAnchor, TransparencyCheckpoint, TransparencyInclusionProof, TransparencyCheckpointList, } from './transparency';
66
68
  export { INFERENCE_CONTRACT_VERSION, } from './inference/version';
@@ -84,10 +86,10 @@ export { aliaReleaseArtifactSchema, aliaReleaseSignatureSchema, aliaModelRelease
84
86
  export type { AliaReleaseArtifact, AliaReleaseSignature, AliaModelReleaseManifest, } from './inference/aliaModelRelease';
85
87
  export { modelDistributionMethodSchema, modelSystemicRiskTierSchema, trainingComputeFlopsSchema, SYSTEMIC_RISK_COMPUTE_THRESHOLD_FLOPS, modelDownstreamDocumentationSchema, modelGpaiDocumentationSchema, modelLineDeclarationSchema, modelReleaseIngestionRequestSchema, modelReleaseIngestionResultSchema, modelDocumentationSchema, } from './inference/modelDocumentation';
86
88
  export type { ModelDistributionMethod, ModelSystemicRiskTier, ModelDownstreamDocumentation, ModelGpaiDocumentation, ModelLineDeclaration, ModelReleaseIngestionRequest, ModelReleaseIngestionResult, ModelDocumentation, } from './inference/modelDocumentation';
87
- export { inferenceContentSourceSchema, inferenceContentPartSchema, inferenceToolCallSchema, inferenceMessageRoleSchema, inferenceMessageSchema, inferenceInputSchema, samplingParametersSchema, toolDefinitionSchema, toolChoiceSchema, responseFormatSchema, clientRequestMetadataSchema, inferenceRequestSchema, } from './inference/request';
88
- export type { InferenceContentSource, InferenceContentPart, InferenceToolCall, InferenceMessageRole, InferenceMessage, InferenceInput, SamplingParameters, ToolDefinition, ToolChoice, ResponseFormat, ClientRequestMetadata, InferenceRequest, } from './inference/request';
89
- export { inferenceStreamStartEventSchema, inferenceStreamDeltaEventSchema, inferenceStreamToolCallEventSchema, inferenceStreamUsageEventSchema, inferenceRouteSwitchDetailSchema, inferenceRouteSwitchReasonSchema, inferenceStreamRouteSwitchEventSchema, inferenceStreamErrorEventSchema, inferenceFinishReasonSchema, inferenceStreamDoneEventSchema, inferenceStreamEventSchema, } from './inference/streamEvents';
90
- export type { InferenceStreamStartEvent, InferenceStreamDeltaEvent, InferenceStreamToolCallEvent, InferenceStreamUsageEvent, InferenceRouteSwitchDetail, InferenceRouteSwitchReason, InferenceStreamRouteSwitchEvent, InferenceStreamErrorEvent, InferenceFinishReason, InferenceStreamDoneEvent, InferenceStreamEvent, } from './inference/streamEvents';
89
+ export { inferenceContentSourceSchema, inferenceContentPartSchema, inferenceToolCallSchema, inferenceMessageRoleSchema, inferenceMessageSchema, inferenceInputSchema, samplingParametersSchema, toolDefinitionSchema, toolChoiceSchema, responseFormatSchema, clientRequestMetadataSchema, inferenceRequestSchema, inferenceSpeechParametersSchema, } from './inference/request';
90
+ export type { InferenceContentSource, InferenceContentPart, InferenceToolCall, InferenceMessageRole, InferenceMessage, InferenceInput, SamplingParameters, ToolDefinition, ToolChoice, ResponseFormat, ClientRequestMetadata, InferenceRequest, InferenceSpeechParameters, } from './inference/request';
91
+ export { inferenceStreamStartEventSchema, inferenceStreamDeltaEventSchema, inferenceAudioMediaTypeSchema, MAX_INFERENCE_AUDIO_BYTES, inferenceStreamAudioEventSchema, inferenceStreamToolCallEventSchema, inferenceStreamUsageEventSchema, inferenceRouteSwitchDetailSchema, inferenceRouteSwitchReasonSchema, inferenceStreamRouteSwitchEventSchema, inferenceStreamErrorEventSchema, inferenceFinishReasonSchema, inferenceStreamDoneEventSchema, inferenceStreamEventSchema, } from './inference/streamEvents';
92
+ export type { InferenceStreamStartEvent, InferenceStreamDeltaEvent, InferenceAudioMediaType, InferenceStreamAudioEvent, InferenceStreamToolCallEvent, InferenceStreamUsageEvent, InferenceRouteSwitchDetail, InferenceRouteSwitchReason, InferenceStreamRouteSwitchEvent, InferenceStreamErrorEvent, InferenceFinishReason, InferenceStreamDoneEvent, InferenceStreamEvent, } from './inference/streamEvents';
91
93
  export { usageReservationRequestSchema, usageReservationStatusSchema, usageReservationSchema, inferenceRequestOutcomeSchema, normalizedUsageReportSchema, usageReceiptSchema, usageRefundSubjectSchema, usageRefundReasonSchema, usageRefundSchema, } from './inference/usage';
92
94
  export type { UsageReservationRequest, UsageReservationStatus, UsageReservation, InferenceRequestOutcome, NormalizedUsageReport, UsageReceipt, UsageRefundSubject, UsageRefundReason, UsageRefund, } from './inference/usage';
93
95
  export { providerConnectionScopeSchema, kaanaCredentialHandleSchema, kaanaCredentialOperationIdSchema, kaanaCredentialOperationActionSchema, kaanaCredentialIdentitySchema, kaanaCredentialCreateMutationSchema, kaanaCredentialRotateMutationSchema, kaanaCredentialRevokeMutationSchema, kaanaCredentialMutationSchema, kaanaCredentialCreateOutcomeRequestSchema, kaanaCredentialRotateOutcomeRequestSchema, kaanaCredentialRevokeOutcomeRequestSchema, kaanaCredentialOutcomeRequestSchema, kaanaCredentialAppliedOutcomeSchema, kaanaCredentialConflictOutcomeSchema, kaanaCredentialOutcomeSchema, kaanaCredentialValidationTaskSchema, kaanaCredentialValidationOutcomeStateSchema, kaanaCredentialValidationFailureCodeSchema, kaanaCredentialValidationOutcomeSchema, providerCredentialValidationOperationSchema, providerCredentialValidationDeploymentSchema, providerCredentialCustodyStateSchema, providerConnectionValidationSchema, providerConnectionStatusSchema, providerConnectionSchema, } from './inference/providerConnection';
@@ -113,6 +113,8 @@ export declare const inferenceHttpsUrlSchema: z.ZodString;
113
113
  * every artifact registry emits.
114
114
  */
115
115
  export declare const sha256DigestSchema: z.ZodString;
116
+ /** Standard base64 in whole, padded 4-character groups. */
117
+ export declare const PADDED_BASE64_PATTERN: RegExp;
116
118
  /** A publisher slug, e.g. `openai`, `anthropic`, `meta`, `alia`. */
117
119
  export declare const publisherSlugSchema: z.ZodString;
118
120
  /** A model slug within its publisher's namespace, e.g. `gpt-5`, `llama-3.1-70b`. */