@opengeni/contracts 0.38.3 → 0.39.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ConnectionMetadata
3
- } from "./chunk-ZNH72ZGW.js";
3
+ } from "./chunk-PCTCJEAF.js";
4
4
  import {
5
5
  ConnectorDocumentDestination,
6
6
  ConnectorDocumentDestinationSelection
package/dist/index.d.ts CHANGED
@@ -685,6 +685,12 @@ export declare const ClientVoiceInputConfig: z.ZodObject<{
685
685
  maxDurationSeconds: z.ZodNumber;
686
686
  maxSizeBytes: z.ZodNumber;
687
687
  acceptedMimeTypes: z.ZodArray<z.ZodString>;
688
+ resumable: z.ZodOptional<z.ZodObject<{
689
+ maxDurationSeconds: z.ZodNumber;
690
+ maxSizeBytes: z.ZodNumber;
691
+ maxChunkSizeBytes: z.ZodNumber;
692
+ providerSegmentSeconds: z.ZodNumber;
693
+ }, z.core.$strict>>;
688
694
  }, z.core.$strict>;
689
695
  export type ClientVoiceInputConfig = z.infer<typeof ClientVoiceInputConfig>;
690
696
  /** Response from POST /v1/workspaces/:workspaceId/transcriptions. */
@@ -697,6 +703,7 @@ export type TranscribeAudioResponse = z.infer<typeof TranscribeAudioResponse>;
697
703
  export declare const VOICE_INPUT_MAX_DURATION_SECONDS: 60;
698
704
  export declare const VOICE_INPUT_MAX_SIZE_BYTES: number;
699
705
  export declare const VOICE_INPUT_ACCEPTED_MIME_TYPES: readonly ["audio/webm", "audio/webm;codecs=opus", "audio/mp4", "audio/ogg", "audio/ogg;codecs=opus", "audio/mpeg", "audio/wav", "audio/x-wav", "audio/mp3", "audio/m4a"];
706
+ export * from "./transcription-recordings";
700
707
  /** Per-session / workspace Codex compaction strategy. */
701
708
  export declare const CodexCompactionMode: z.ZodEnum<{
702
709
  portable: "portable";
@@ -15374,6 +15381,12 @@ export declare const ClientConfig: z.ZodObject<{
15374
15381
  maxDurationSeconds: z.ZodNumber;
15375
15382
  maxSizeBytes: z.ZodNumber;
15376
15383
  acceptedMimeTypes: z.ZodArray<z.ZodString>;
15384
+ resumable: z.ZodOptional<z.ZodObject<{
15385
+ maxDurationSeconds: z.ZodNumber;
15386
+ maxSizeBytes: z.ZodNumber;
15387
+ maxChunkSizeBytes: z.ZodNumber;
15388
+ providerSegmentSeconds: z.ZodNumber;
15389
+ }, z.core.$strict>>;
15377
15390
  }, z.core.$strict>>;
15378
15391
  productAccessMode: z.ZodEnum<{
15379
15392
  configured: "configured";
package/dist/index.js CHANGED
@@ -45,6 +45,7 @@ import {
45
45
  ClientAuthConfig,
46
46
  ClientConfig,
47
47
  ClientModel,
48
+ ClientResumableVoiceInputConfig,
48
49
  ClientSessionEvent,
49
50
  ClientVoiceInputConfig,
50
51
  CodexCompactionMode,
@@ -81,6 +82,7 @@ import {
81
82
  CreateSessionResponse,
82
83
  CreateSocialConnectionRequest,
83
84
  CreateSocialPostRequest,
85
+ CreateTranscriptionRecordingRequest,
84
86
  CreateVariableSetRequest,
85
87
  CreateWorkspaceArtifactRequest,
86
88
  CreateWorkspaceEnvironmentRequest,
@@ -149,6 +151,7 @@ import {
149
151
  FileResourceRef,
150
152
  FileStatus,
151
153
  FileUploadStatus,
154
+ FinalizeTranscriptionRecordingRequest,
152
155
  FirstPartyMcpToolName,
153
156
  FsChangeKind,
154
157
  FsChangedPayload,
@@ -510,6 +513,12 @@ import {
510
513
  SyncSessionRealtimeLedgerResponse,
511
514
  SystemUpdateClassification,
512
515
  TERMINAL_STREAM_PORT,
516
+ TRANSCRIPTION_RECORDING_MAX_CHUNK_SIZE_BYTES,
517
+ TRANSCRIPTION_RECORDING_MAX_DURATION_SECONDS,
518
+ TRANSCRIPTION_RECORDING_MAX_SIZE_BYTES,
519
+ TRANSCRIPTION_RECORDING_PROVIDER_SEGMENT_SECONDS,
520
+ TRANSCRIPTION_RECORDING_RECOVERY_RETRY_AFTER_MILLISECONDS,
521
+ TRANSCRIPTION_RECORDING_RETENTION_SECONDS,
513
522
  TURN_EXECUTION_POLICY_METADATA_KEY,
514
523
  TerminalExecRequest,
515
524
  TerminalExecResponse,
@@ -521,6 +530,14 @@ import {
521
530
  TranscribeAudioResponse,
522
531
  TranscriptionErrorCode,
523
532
  TranscriptionEvent,
533
+ TranscriptionRecording,
534
+ TranscriptionRecordingChunk,
535
+ TranscriptionRecordingErrorCode,
536
+ TranscriptionRecordingListResponse,
537
+ TranscriptionRecordingResponse,
538
+ TranscriptionRecordingSegment,
539
+ TranscriptionRecordingSegmentState,
540
+ TranscriptionRecordingState,
524
541
  TranscriptionResultMetadata,
525
542
  TranscriptionSpeaker,
526
543
  TranscriptionTimeSpan,
@@ -549,6 +566,7 @@ import {
549
566
  UpdateWorkspaceModelPolicyRequest,
550
567
  UpdateWorkspaceRequest,
551
568
  UpdateWorkspaceSettingsRequest,
569
+ UploadTranscriptionRecordingChunkResponse,
552
570
  UsageEvent,
553
571
  UsageEventType,
554
572
  UsageLimitsMode,
@@ -765,7 +783,7 @@ import {
765
783
  verifyStreamToken,
766
784
  workspaceControlUtf8Bytes,
767
785
  workspaceSlackReactionChannelAllowed
768
- } from "./chunk-ZNH72ZGW.js";
786
+ } from "./chunk-PCTCJEAF.js";
769
787
  import {
770
788
  ConnectorDocumentDestination,
771
789
  ConnectorDocumentDestinationAuthority,
@@ -836,6 +854,7 @@ export {
836
854
  ClientAuthConfig,
837
855
  ClientConfig,
838
856
  ClientModel,
857
+ ClientResumableVoiceInputConfig,
839
858
  ClientSessionEvent,
840
859
  ClientVoiceInputConfig,
841
860
  CodexCompactionMode,
@@ -875,6 +894,7 @@ export {
875
894
  CreateSessionResponse,
876
895
  CreateSocialConnectionRequest,
877
896
  CreateSocialPostRequest,
897
+ CreateTranscriptionRecordingRequest,
878
898
  CreateVariableSetRequest,
879
899
  CreateWorkspaceArtifactRequest,
880
900
  CreateWorkspaceEnvironmentRequest,
@@ -943,6 +963,7 @@ export {
943
963
  FileResourceRef,
944
964
  FileStatus,
945
965
  FileUploadStatus,
966
+ FinalizeTranscriptionRecordingRequest,
946
967
  FirstPartyMcpToolName,
947
968
  FsChangeKind,
948
969
  FsChangedPayload,
@@ -1311,6 +1332,12 @@ export {
1311
1332
  SyncSessionRealtimeLedgerResponse,
1312
1333
  SystemUpdateClassification,
1313
1334
  TERMINAL_STREAM_PORT,
1335
+ TRANSCRIPTION_RECORDING_MAX_CHUNK_SIZE_BYTES,
1336
+ TRANSCRIPTION_RECORDING_MAX_DURATION_SECONDS,
1337
+ TRANSCRIPTION_RECORDING_MAX_SIZE_BYTES,
1338
+ TRANSCRIPTION_RECORDING_PROVIDER_SEGMENT_SECONDS,
1339
+ TRANSCRIPTION_RECORDING_RECOVERY_RETRY_AFTER_MILLISECONDS,
1340
+ TRANSCRIPTION_RECORDING_RETENTION_SECONDS,
1314
1341
  TURN_EXECUTION_POLICY_METADATA_KEY,
1315
1342
  TerminalExecRequest,
1316
1343
  TerminalExecResponse,
@@ -1322,6 +1349,14 @@ export {
1322
1349
  TranscribeAudioResponse,
1323
1350
  TranscriptionErrorCode,
1324
1351
  TranscriptionEvent,
1352
+ TranscriptionRecording,
1353
+ TranscriptionRecordingChunk,
1354
+ TranscriptionRecordingErrorCode,
1355
+ TranscriptionRecordingListResponse,
1356
+ TranscriptionRecordingResponse,
1357
+ TranscriptionRecordingSegment,
1358
+ TranscriptionRecordingSegmentState,
1359
+ TranscriptionRecordingState,
1325
1360
  TranscriptionResultMetadata,
1326
1361
  TranscriptionSpeaker,
1327
1362
  TranscriptionTimeSpan,
@@ -1350,6 +1385,7 @@ export {
1350
1385
  UpdateWorkspaceModelPolicyRequest,
1351
1386
  UpdateWorkspaceRequest,
1352
1387
  UpdateWorkspaceSettingsRequest,
1388
+ UploadTranscriptionRecordingChunkResponse,
1353
1389
  UsageEvent,
1354
1390
  UsageEventType,
1355
1391
  UsageLimitsMode,
@@ -0,0 +1,300 @@
1
+ import { z } from "zod";
2
+ export declare const TranscriptionRecordingErrorCode: z.ZodEnum<{
3
+ cancelled: "cancelled";
4
+ invalid_audio: "invalid_audio";
5
+ network: "network";
6
+ not_supported: "not_supported";
7
+ permission_denied: "permission_denied";
8
+ policy_blocked: "policy_blocked";
9
+ provider: "provider";
10
+ timeout: "timeout";
11
+ too_large: "too_large";
12
+ unavailable: "unavailable";
13
+ unknown: "unknown";
14
+ }>;
15
+ export type TranscriptionRecordingErrorCode = z.infer<typeof TranscriptionRecordingErrorCode>;
16
+ export declare const TranscriptionRecordingState: z.ZodEnum<{
17
+ complete: "complete";
18
+ discarded: "discarded";
19
+ failed: "failed";
20
+ ready: "ready";
21
+ segmenting: "segmenting";
22
+ transcribing: "transcribing";
23
+ uploading: "uploading";
24
+ }>;
25
+ export type TranscriptionRecordingState = z.infer<typeof TranscriptionRecordingState>;
26
+ export declare const TranscriptionRecordingSegmentState: z.ZodEnum<{
27
+ complete: "complete";
28
+ failed: "failed";
29
+ pending: "pending";
30
+ preparing: "preparing";
31
+ transcribing: "transcribing";
32
+ }>;
33
+ export type TranscriptionRecordingSegmentState = z.infer<typeof TranscriptionRecordingSegmentState>;
34
+ export declare const ClientResumableVoiceInputConfig: z.ZodObject<{
35
+ maxDurationSeconds: z.ZodNumber;
36
+ maxSizeBytes: z.ZodNumber;
37
+ maxChunkSizeBytes: z.ZodNumber;
38
+ providerSegmentSeconds: z.ZodNumber;
39
+ }, z.core.$strict>;
40
+ export type ClientResumableVoiceInputConfig = z.infer<typeof ClientResumableVoiceInputConfig>;
41
+ export declare const CreateTranscriptionRecordingRequest: z.ZodObject<{
42
+ recordingId: z.ZodString;
43
+ mimeType: z.ZodString;
44
+ }, z.core.$strict>;
45
+ export type CreateTranscriptionRecordingRequest = z.infer<typeof CreateTranscriptionRecordingRequest>;
46
+ export declare const FinalizeTranscriptionRecordingRequest: z.ZodObject<{
47
+ chunkCount: z.ZodNumber;
48
+ totalBytes: z.ZodNumber;
49
+ totalDurationMilliseconds: z.ZodNumber;
50
+ }, z.core.$strict>;
51
+ export type FinalizeTranscriptionRecordingRequest = z.infer<typeof FinalizeTranscriptionRecordingRequest>;
52
+ export declare const TranscriptionRecordingChunk: z.ZodObject<{
53
+ chunkNumber: z.ZodNumber;
54
+ byteLength: z.ZodNumber;
55
+ sha256: z.ZodString;
56
+ startMilliseconds: z.ZodNumber;
57
+ durationMilliseconds: z.ZodNumber;
58
+ deduplicated: z.ZodBoolean;
59
+ }, z.core.$strict>;
60
+ export type TranscriptionRecordingChunk = z.infer<typeof TranscriptionRecordingChunk>;
61
+ export declare const TranscriptionRecordingSegment: z.ZodObject<{
62
+ segmentNumber: z.ZodNumber;
63
+ state: z.ZodEnum<{
64
+ complete: "complete";
65
+ failed: "failed";
66
+ pending: "pending";
67
+ preparing: "preparing";
68
+ transcribing: "transcribing";
69
+ }>;
70
+ startMilliseconds: z.ZodNumber;
71
+ durationMilliseconds: z.ZodNumber;
72
+ byteLength: z.ZodNumber;
73
+ errorCode: z.ZodNullable<z.ZodEnum<{
74
+ cancelled: "cancelled";
75
+ invalid_audio: "invalid_audio";
76
+ network: "network";
77
+ not_supported: "not_supported";
78
+ permission_denied: "permission_denied";
79
+ policy_blocked: "policy_blocked";
80
+ provider: "provider";
81
+ timeout: "timeout";
82
+ too_large: "too_large";
83
+ unavailable: "unavailable";
84
+ unknown: "unknown";
85
+ }>>;
86
+ retryable: z.ZodBoolean;
87
+ }, z.core.$strict>;
88
+ export type TranscriptionRecordingSegment = z.infer<typeof TranscriptionRecordingSegment>;
89
+ export declare const TranscriptionRecording: z.ZodObject<{
90
+ id: z.ZodString;
91
+ workspaceId: z.ZodString;
92
+ mimeType: z.ZodString;
93
+ state: z.ZodEnum<{
94
+ complete: "complete";
95
+ discarded: "discarded";
96
+ failed: "failed";
97
+ ready: "ready";
98
+ segmenting: "segmenting";
99
+ transcribing: "transcribing";
100
+ uploading: "uploading";
101
+ }>;
102
+ nextChunkNumber: z.ZodNumber;
103
+ chunkCount: z.ZodNumber;
104
+ totalBytes: z.ZodNumber;
105
+ totalDurationMilliseconds: z.ZodNumber;
106
+ segmentCount: z.ZodNumber;
107
+ completedSegmentCount: z.ZodNumber;
108
+ transcriptText: z.ZodNullable<z.ZodString>;
109
+ languages: z.ZodArray<z.ZodString>;
110
+ errorCode: z.ZodNullable<z.ZodEnum<{
111
+ cancelled: "cancelled";
112
+ invalid_audio: "invalid_audio";
113
+ network: "network";
114
+ not_supported: "not_supported";
115
+ permission_denied: "permission_denied";
116
+ policy_blocked: "policy_blocked";
117
+ provider: "provider";
118
+ timeout: "timeout";
119
+ too_large: "too_large";
120
+ unavailable: "unavailable";
121
+ unknown: "unknown";
122
+ }>>;
123
+ retryable: z.ZodBoolean;
124
+ objectsCleaned: z.ZodBoolean;
125
+ createdAt: z.ZodString;
126
+ updatedAt: z.ZodString;
127
+ expiresAt: z.ZodString;
128
+ }, z.core.$strict>;
129
+ export type TranscriptionRecording = z.infer<typeof TranscriptionRecording>;
130
+ export declare const TranscriptionRecordingResponse: z.ZodObject<{
131
+ recording: z.ZodObject<{
132
+ id: z.ZodString;
133
+ workspaceId: z.ZodString;
134
+ mimeType: z.ZodString;
135
+ state: z.ZodEnum<{
136
+ complete: "complete";
137
+ discarded: "discarded";
138
+ failed: "failed";
139
+ ready: "ready";
140
+ segmenting: "segmenting";
141
+ transcribing: "transcribing";
142
+ uploading: "uploading";
143
+ }>;
144
+ nextChunkNumber: z.ZodNumber;
145
+ chunkCount: z.ZodNumber;
146
+ totalBytes: z.ZodNumber;
147
+ totalDurationMilliseconds: z.ZodNumber;
148
+ segmentCount: z.ZodNumber;
149
+ completedSegmentCount: z.ZodNumber;
150
+ transcriptText: z.ZodNullable<z.ZodString>;
151
+ languages: z.ZodArray<z.ZodString>;
152
+ errorCode: z.ZodNullable<z.ZodEnum<{
153
+ cancelled: "cancelled";
154
+ invalid_audio: "invalid_audio";
155
+ network: "network";
156
+ not_supported: "not_supported";
157
+ permission_denied: "permission_denied";
158
+ policy_blocked: "policy_blocked";
159
+ provider: "provider";
160
+ timeout: "timeout";
161
+ too_large: "too_large";
162
+ unavailable: "unavailable";
163
+ unknown: "unknown";
164
+ }>>;
165
+ retryable: z.ZodBoolean;
166
+ objectsCleaned: z.ZodBoolean;
167
+ createdAt: z.ZodString;
168
+ updatedAt: z.ZodString;
169
+ expiresAt: z.ZodString;
170
+ }, z.core.$strict>;
171
+ segments: z.ZodArray<z.ZodObject<{
172
+ segmentNumber: z.ZodNumber;
173
+ state: z.ZodEnum<{
174
+ complete: "complete";
175
+ failed: "failed";
176
+ pending: "pending";
177
+ preparing: "preparing";
178
+ transcribing: "transcribing";
179
+ }>;
180
+ startMilliseconds: z.ZodNumber;
181
+ durationMilliseconds: z.ZodNumber;
182
+ byteLength: z.ZodNumber;
183
+ errorCode: z.ZodNullable<z.ZodEnum<{
184
+ cancelled: "cancelled";
185
+ invalid_audio: "invalid_audio";
186
+ network: "network";
187
+ not_supported: "not_supported";
188
+ permission_denied: "permission_denied";
189
+ policy_blocked: "policy_blocked";
190
+ provider: "provider";
191
+ timeout: "timeout";
192
+ too_large: "too_large";
193
+ unavailable: "unavailable";
194
+ unknown: "unknown";
195
+ }>>;
196
+ retryable: z.ZodBoolean;
197
+ }, z.core.$strict>>;
198
+ retryAfterMilliseconds: z.ZodOptional<z.ZodNumber>;
199
+ }, z.core.$strict>;
200
+ export type TranscriptionRecordingResponse = z.infer<typeof TranscriptionRecordingResponse>;
201
+ export declare const TranscriptionRecordingListResponse: z.ZodObject<{
202
+ recordings: z.ZodArray<z.ZodObject<{
203
+ id: z.ZodString;
204
+ workspaceId: z.ZodString;
205
+ mimeType: z.ZodString;
206
+ state: z.ZodEnum<{
207
+ complete: "complete";
208
+ discarded: "discarded";
209
+ failed: "failed";
210
+ ready: "ready";
211
+ segmenting: "segmenting";
212
+ transcribing: "transcribing";
213
+ uploading: "uploading";
214
+ }>;
215
+ nextChunkNumber: z.ZodNumber;
216
+ chunkCount: z.ZodNumber;
217
+ totalBytes: z.ZodNumber;
218
+ totalDurationMilliseconds: z.ZodNumber;
219
+ segmentCount: z.ZodNumber;
220
+ completedSegmentCount: z.ZodNumber;
221
+ transcriptText: z.ZodNullable<z.ZodString>;
222
+ languages: z.ZodArray<z.ZodString>;
223
+ errorCode: z.ZodNullable<z.ZodEnum<{
224
+ cancelled: "cancelled";
225
+ invalid_audio: "invalid_audio";
226
+ network: "network";
227
+ not_supported: "not_supported";
228
+ permission_denied: "permission_denied";
229
+ policy_blocked: "policy_blocked";
230
+ provider: "provider";
231
+ timeout: "timeout";
232
+ too_large: "too_large";
233
+ unavailable: "unavailable";
234
+ unknown: "unknown";
235
+ }>>;
236
+ retryable: z.ZodBoolean;
237
+ objectsCleaned: z.ZodBoolean;
238
+ createdAt: z.ZodString;
239
+ updatedAt: z.ZodString;
240
+ expiresAt: z.ZodString;
241
+ }, z.core.$strict>>;
242
+ }, z.core.$strict>;
243
+ export type TranscriptionRecordingListResponse = z.infer<typeof TranscriptionRecordingListResponse>;
244
+ export declare const UploadTranscriptionRecordingChunkResponse: z.ZodObject<{
245
+ recording: z.ZodObject<{
246
+ id: z.ZodString;
247
+ workspaceId: z.ZodString;
248
+ mimeType: z.ZodString;
249
+ state: z.ZodEnum<{
250
+ complete: "complete";
251
+ discarded: "discarded";
252
+ failed: "failed";
253
+ ready: "ready";
254
+ segmenting: "segmenting";
255
+ transcribing: "transcribing";
256
+ uploading: "uploading";
257
+ }>;
258
+ nextChunkNumber: z.ZodNumber;
259
+ chunkCount: z.ZodNumber;
260
+ totalBytes: z.ZodNumber;
261
+ totalDurationMilliseconds: z.ZodNumber;
262
+ segmentCount: z.ZodNumber;
263
+ completedSegmentCount: z.ZodNumber;
264
+ transcriptText: z.ZodNullable<z.ZodString>;
265
+ languages: z.ZodArray<z.ZodString>;
266
+ errorCode: z.ZodNullable<z.ZodEnum<{
267
+ cancelled: "cancelled";
268
+ invalid_audio: "invalid_audio";
269
+ network: "network";
270
+ not_supported: "not_supported";
271
+ permission_denied: "permission_denied";
272
+ policy_blocked: "policy_blocked";
273
+ provider: "provider";
274
+ timeout: "timeout";
275
+ too_large: "too_large";
276
+ unavailable: "unavailable";
277
+ unknown: "unknown";
278
+ }>>;
279
+ retryable: z.ZodBoolean;
280
+ objectsCleaned: z.ZodBoolean;
281
+ createdAt: z.ZodString;
282
+ updatedAt: z.ZodString;
283
+ expiresAt: z.ZodString;
284
+ }, z.core.$strict>;
285
+ chunk: z.ZodObject<{
286
+ chunkNumber: z.ZodNumber;
287
+ byteLength: z.ZodNumber;
288
+ sha256: z.ZodString;
289
+ startMilliseconds: z.ZodNumber;
290
+ durationMilliseconds: z.ZodNumber;
291
+ deduplicated: z.ZodBoolean;
292
+ }, z.core.$strict>;
293
+ }, z.core.$strict>;
294
+ export type UploadTranscriptionRecordingChunkResponse = z.infer<typeof UploadTranscriptionRecordingChunkResponse>;
295
+ export declare const TRANSCRIPTION_RECORDING_MAX_DURATION_SECONDS: number;
296
+ export declare const TRANSCRIPTION_RECORDING_MAX_SIZE_BYTES: number;
297
+ export declare const TRANSCRIPTION_RECORDING_MAX_CHUNK_SIZE_BYTES: number;
298
+ export declare const TRANSCRIPTION_RECORDING_PROVIDER_SEGMENT_SECONDS = 50;
299
+ export declare const TRANSCRIPTION_RECORDING_RECOVERY_RETRY_AFTER_MILLISECONDS = 5000;
300
+ export declare const TRANSCRIPTION_RECORDING_RETENTION_SECONDS: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/contracts",
3
- "version": "0.38.3",
3
+ "version": "0.39.0",
4
4
  "description": "Shared zod schemas and wire-contract types for the OpenGeni API.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/index.ts CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  type SessionEventBoundarySurface,
7
7
  } from "./event-preview";
8
8
  import { WorkspaceInstructionPolicyRoleKeyInput } from "./workspace-instruction-policies";
9
+ import { ClientResumableVoiceInputConfig } from "./transcription-recordings";
9
10
 
10
11
  export * from "./slack-bot-scopes";
11
12
  export * from "./connector-destinations";
@@ -1155,6 +1156,7 @@ export const ClientVoiceInputConfig = z
1155
1156
  .positive()
1156
1157
  .max(25 * 1024 * 1024),
1157
1158
  acceptedMimeTypes: z.array(z.string().trim().min(1).max(128)).min(1).max(32),
1159
+ resumable: ClientResumableVoiceInputConfig.optional(),
1158
1160
  })
1159
1161
  .strict();
1160
1162
  export type ClientVoiceInputConfig = z.infer<typeof ClientVoiceInputConfig>;
@@ -1184,6 +1186,8 @@ export const VOICE_INPUT_ACCEPTED_MIME_TYPES = [
1184
1186
  "audio/m4a",
1185
1187
  ] as const;
1186
1188
 
1189
+ export * from "./transcription-recordings";
1190
+
1187
1191
  /** Per-session / workspace Codex compaction strategy. */
1188
1192
  export const CodexCompactionMode = z.enum(["remote_v2", "portable"]);
1189
1193
  export type CodexCompactionMode = z.infer<typeof CodexCompactionMode>;
@@ -6253,9 +6257,9 @@ export const Session = z.object({
6253
6257
  createIdempotencyKey: z.string().nullable(),
6254
6258
  temporalWorkflowId: z.string().nullable(),
6255
6259
  activeTurnId: z.string().uuid().nullable(),
6256
- // Actual input tokens of the last model call of the most recent turn; the
6257
- // pre-turn portable context-compaction trigger reads it as its budget
6258
- // signal. Null until a turn with usage has completed.
6260
+ // Provider-reported input tokens of the latest authoritative terminal
6261
+ // response. Null after a context transition or whenever that latest response
6262
+ // supplied no usable count, so an older response can never drive compaction.
6259
6263
  lastInputTokens: z.number().int().nonnegative().nullable(),
6260
6264
  queueVersion: z.number().int().nonnegative(),
6261
6265
  queueHeadPosition: z.number().int(),
@@ -0,0 +1,169 @@
1
+ import { z } from "zod";
2
+
3
+ export const TranscriptionRecordingErrorCode = z.enum([
4
+ "permission_denied",
5
+ "not_supported",
6
+ "network",
7
+ "provider",
8
+ "policy_blocked",
9
+ "timeout",
10
+ "cancelled",
11
+ "unavailable",
12
+ "too_large",
13
+ "invalid_audio",
14
+ "unknown",
15
+ ]);
16
+ export type TranscriptionRecordingErrorCode = z.infer<typeof TranscriptionRecordingErrorCode>;
17
+
18
+ export const TranscriptionRecordingState = z.enum([
19
+ "uploading",
20
+ "segmenting",
21
+ "ready",
22
+ "transcribing",
23
+ "complete",
24
+ "failed",
25
+ "discarded",
26
+ ]);
27
+ export type TranscriptionRecordingState = z.infer<typeof TranscriptionRecordingState>;
28
+
29
+ export const TranscriptionRecordingSegmentState = z.enum([
30
+ "preparing",
31
+ "pending",
32
+ "transcribing",
33
+ "complete",
34
+ "failed",
35
+ ]);
36
+ export type TranscriptionRecordingSegmentState = z.infer<typeof TranscriptionRecordingSegmentState>;
37
+
38
+ export const ClientResumableVoiceInputConfig = z
39
+ .object({
40
+ maxDurationSeconds: z
41
+ .number()
42
+ .int()
43
+ .positive()
44
+ .max(8 * 60 * 60),
45
+ maxSizeBytes: z
46
+ .number()
47
+ .int()
48
+ .positive()
49
+ .max(512 * 1024 * 1024),
50
+ maxChunkSizeBytes: z
51
+ .number()
52
+ .int()
53
+ .positive()
54
+ .max(25 * 1024 * 1024),
55
+ providerSegmentSeconds: z.number().int().positive().max(600),
56
+ })
57
+ .strict();
58
+ export type ClientResumableVoiceInputConfig = z.infer<typeof ClientResumableVoiceInputConfig>;
59
+
60
+ export const CreateTranscriptionRecordingRequest = z
61
+ .object({
62
+ recordingId: z.string().uuid(),
63
+ mimeType: z.string().trim().min(1).max(128),
64
+ })
65
+ .strict();
66
+ export type CreateTranscriptionRecordingRequest = z.infer<
67
+ typeof CreateTranscriptionRecordingRequest
68
+ >;
69
+
70
+ export const FinalizeTranscriptionRecordingRequest = z
71
+ .object({
72
+ chunkCount: z.number().int().positive().max(100_000),
73
+ totalBytes: z
74
+ .number()
75
+ .int()
76
+ .positive()
77
+ .max(512 * 1024 * 1024),
78
+ totalDurationMilliseconds: z
79
+ .number()
80
+ .int()
81
+ .positive()
82
+ .max(8 * 60 * 60 * 1_000),
83
+ })
84
+ .strict();
85
+ export type FinalizeTranscriptionRecordingRequest = z.infer<
86
+ typeof FinalizeTranscriptionRecordingRequest
87
+ >;
88
+
89
+ export const TranscriptionRecordingChunk = z
90
+ .object({
91
+ chunkNumber: z.number().int().nonnegative(),
92
+ byteLength: z.number().int().positive(),
93
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
94
+ startMilliseconds: z.number().int().nonnegative(),
95
+ durationMilliseconds: z.number().int().nonnegative(),
96
+ deduplicated: z.boolean(),
97
+ })
98
+ .strict();
99
+ export type TranscriptionRecordingChunk = z.infer<typeof TranscriptionRecordingChunk>;
100
+
101
+ export const TranscriptionRecordingSegment = z
102
+ .object({
103
+ segmentNumber: z.number().int().nonnegative(),
104
+ state: TranscriptionRecordingSegmentState,
105
+ startMilliseconds: z.number().int().nonnegative(),
106
+ durationMilliseconds: z.number().int().positive(),
107
+ byteLength: z.number().int().positive(),
108
+ errorCode: TranscriptionRecordingErrorCode.nullable(),
109
+ retryable: z.boolean(),
110
+ })
111
+ .strict();
112
+ export type TranscriptionRecordingSegment = z.infer<typeof TranscriptionRecordingSegment>;
113
+
114
+ export const TranscriptionRecording = z
115
+ .object({
116
+ id: z.string().uuid(),
117
+ workspaceId: z.string().uuid(),
118
+ mimeType: z.string().trim().min(1).max(128),
119
+ state: TranscriptionRecordingState,
120
+ nextChunkNumber: z.number().int().nonnegative(),
121
+ chunkCount: z.number().int().nonnegative(),
122
+ totalBytes: z.number().int().nonnegative(),
123
+ totalDurationMilliseconds: z.number().int().nonnegative(),
124
+ segmentCount: z.number().int().nonnegative(),
125
+ completedSegmentCount: z.number().int().nonnegative(),
126
+ transcriptText: z.string().max(1_000_000).nullable(),
127
+ languages: z.array(z.string().trim().min(1).max(64)).max(64),
128
+ errorCode: TranscriptionRecordingErrorCode.nullable(),
129
+ retryable: z.boolean(),
130
+ objectsCleaned: z.boolean(),
131
+ createdAt: z.string().datetime(),
132
+ updatedAt: z.string().datetime(),
133
+ expiresAt: z.string().datetime(),
134
+ })
135
+ .strict();
136
+ export type TranscriptionRecording = z.infer<typeof TranscriptionRecording>;
137
+
138
+ export const TranscriptionRecordingResponse = z
139
+ .object({
140
+ recording: TranscriptionRecording,
141
+ segments: z.array(TranscriptionRecordingSegment).max(1_000),
142
+ retryAfterMilliseconds: z.number().int().positive().max(60_000).optional(),
143
+ })
144
+ .strict();
145
+ export type TranscriptionRecordingResponse = z.infer<typeof TranscriptionRecordingResponse>;
146
+
147
+ export const TranscriptionRecordingListResponse = z
148
+ .object({
149
+ recordings: z.array(TranscriptionRecording).max(50),
150
+ })
151
+ .strict();
152
+ export type TranscriptionRecordingListResponse = z.infer<typeof TranscriptionRecordingListResponse>;
153
+
154
+ export const UploadTranscriptionRecordingChunkResponse = z
155
+ .object({
156
+ recording: TranscriptionRecording,
157
+ chunk: TranscriptionRecordingChunk,
158
+ })
159
+ .strict();
160
+ export type UploadTranscriptionRecordingChunkResponse = z.infer<
161
+ typeof UploadTranscriptionRecordingChunkResponse
162
+ >;
163
+
164
+ export const TRANSCRIPTION_RECORDING_MAX_DURATION_SECONDS = 2 * 60 * 60;
165
+ export const TRANSCRIPTION_RECORDING_MAX_SIZE_BYTES = 512 * 1024 * 1024;
166
+ export const TRANSCRIPTION_RECORDING_MAX_CHUNK_SIZE_BYTES = 8 * 1024 * 1024;
167
+ export const TRANSCRIPTION_RECORDING_PROVIDER_SEGMENT_SECONDS = 50;
168
+ export const TRANSCRIPTION_RECORDING_RECOVERY_RETRY_AFTER_MILLISECONDS = 5_000;
169
+ export const TRANSCRIPTION_RECORDING_RETENTION_SECONDS = 24 * 60 * 60;