@antiphony/shared 0.3.0 → 0.5.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/README.md +4 -4
- package/dist/cjs/api-codecs.cjs +149 -142
- package/dist/cjs/api-codecs.d.cts +157 -68
- package/dist/cjs/index.cjs +187 -192
- package/dist/cjs/index.d.cts +310 -7
- package/dist/cjs/nsid.cjs +6 -9
- package/dist/cjs/nsid.d.cts +7 -8
- package/dist/cjs/types/audio.cjs +133 -119
- package/dist/cjs/types/audio.d.cts +343 -199
- package/dist/cjs/types/blob.cjs +5 -9
- package/dist/cjs/types/blob.d.cts +21 -21
- package/dist/cjs/types/records.cjs +0 -45
- package/dist/cjs/types/records.d.cts +1 -103
- package/dist/esm/api-codecs.d.ts +187 -98
- package/dist/esm/api-codecs.js +4 -5
- package/dist/esm/chunk-D655OH2I.js +35 -0
- package/dist/esm/chunk-F5ZKFJL2.js +39 -0
- package/dist/esm/{chunk-6LROFBKK.js → chunk-SBYNIQRZ.js} +7 -9
- package/dist/esm/chunk-SMK4OZNU.js +17 -0
- package/dist/esm/chunk-TVOXIQKF.js +294 -0
- package/dist/esm/index.d.ts +310 -7
- package/dist/esm/index.js +5 -7
- package/dist/esm/nsid.d.ts +7 -8
- package/dist/esm/nsid.js +1 -1
- package/dist/esm/types/audio.d.ts +420 -276
- package/dist/esm/types/audio.js +3 -4
- package/dist/esm/types/blob.d.ts +21 -21
- package/dist/esm/types/blob.js +1 -1
- package/dist/esm/types/records.d.ts +1 -103
- package/dist/esm/types/records.js +1 -1
- package/package.json +94 -26
- package/dist/cjs/types/api.cjs +0 -166
- package/dist/cjs/types/api.d.cts +0 -242
- package/dist/cjs/types/views.cjs +0 -179
- package/dist/cjs/types/views.d.cts +0 -726
- package/dist/esm/chunk-5EHV73BA.js +0 -20
- package/dist/esm/chunk-F7IHVM34.js +0 -144
- package/dist/esm/chunk-FDM5FDN4.js +0 -46
- package/dist/esm/chunk-IHIBHQBJ.js +0 -78
- package/dist/esm/chunk-R6SBR3IG.js +0 -97
- package/dist/esm/chunk-Y6HNNRVD.js +0 -12
- package/dist/esm/types/api.d.ts +0 -242
- package/dist/esm/types/api.js +0 -4
- package/dist/esm/types/views.d.ts +0 -726
- package/dist/esm/types/views.js +0 -3
|
@@ -3,11 +3,6 @@ import { z } from 'zod';
|
|
|
3
3
|
/**
|
|
4
4
|
* Antiphony canonical audio-post contract (`dev.antiphony.*`).
|
|
5
5
|
*
|
|
6
|
-
* This is the NEW data model from `specs/antiphony-data-model.md`, added
|
|
7
|
-
* ADDITIVELY alongside the legacy `PromptRecord`/`ReplyRecord` (Stream 1).
|
|
8
|
-
* Nothing here touches the old shapes; Vox Pop keeps running on them until the
|
|
9
|
-
* Stream 4 migration deletes the legacy schemas + `com.voxpop.*` lexicons.
|
|
10
|
-
*
|
|
11
6
|
* Mirrors the lexicons in `lexicons/dev/antiphony/`. Key model decisions:
|
|
12
7
|
* - ONE post collection; `reply` presence discriminates prompt-vs-reply.
|
|
13
8
|
* - The audio is a standard `embed.audio`; transcript is platform enrichment
|
|
@@ -85,20 +80,30 @@ type ReplyRef = z.infer<typeof ReplyRefSchema>;
|
|
|
85
80
|
*/
|
|
86
81
|
declare const AudioEmbedSchema: z.ZodObject<{
|
|
87
82
|
$type: z.ZodLiteral<"dev.antiphony.embed.audio">;
|
|
88
|
-
/** The audio bytes as a content-addressed
|
|
83
|
+
/** The audio bytes as a content-addressed blob ref (`ref.$link` = CID). */
|
|
89
84
|
audio: z.ZodObject<{
|
|
90
85
|
$type: z.ZodLiteral<"blob">;
|
|
91
|
-
ref: z.
|
|
86
|
+
ref: z.ZodObject<{
|
|
87
|
+
$link: z.ZodString;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
$link: string;
|
|
90
|
+
}, {
|
|
91
|
+
$link: string;
|
|
92
|
+
}>;
|
|
92
93
|
mimeType: z.ZodString;
|
|
93
94
|
size: z.ZodNumber;
|
|
94
95
|
}, "strip", z.ZodTypeAny, {
|
|
95
96
|
$type: "blob";
|
|
96
|
-
ref:
|
|
97
|
+
ref: {
|
|
98
|
+
$link: string;
|
|
99
|
+
};
|
|
97
100
|
mimeType: string;
|
|
98
101
|
size: number;
|
|
99
102
|
}, {
|
|
100
103
|
$type: "blob";
|
|
101
|
-
ref:
|
|
104
|
+
ref: {
|
|
105
|
+
$link: string;
|
|
106
|
+
};
|
|
102
107
|
mimeType: string;
|
|
103
108
|
size: number;
|
|
104
109
|
}>;
|
|
@@ -112,24 +117,28 @@ declare const AudioEmbedSchema: z.ZodObject<{
|
|
|
112
117
|
$type: "dev.antiphony.embed.audio";
|
|
113
118
|
audio: {
|
|
114
119
|
$type: "blob";
|
|
115
|
-
ref:
|
|
120
|
+
ref: {
|
|
121
|
+
$link: string;
|
|
122
|
+
};
|
|
116
123
|
mimeType: string;
|
|
117
124
|
size: number;
|
|
118
125
|
};
|
|
126
|
+
waveform?: number[] | undefined;
|
|
119
127
|
durationMs?: number | undefined;
|
|
120
128
|
alt?: string | undefined;
|
|
121
|
-
waveform?: number[] | undefined;
|
|
122
129
|
}, {
|
|
123
130
|
$type: "dev.antiphony.embed.audio";
|
|
124
131
|
audio: {
|
|
125
132
|
$type: "blob";
|
|
126
|
-
ref:
|
|
133
|
+
ref: {
|
|
134
|
+
$link: string;
|
|
135
|
+
};
|
|
127
136
|
mimeType: string;
|
|
128
137
|
size: number;
|
|
129
138
|
};
|
|
139
|
+
waveform?: number[] | undefined;
|
|
130
140
|
durationMs?: number | undefined;
|
|
131
141
|
alt?: string | undefined;
|
|
132
|
-
waveform?: number[] | undefined;
|
|
133
142
|
}>;
|
|
134
143
|
type AudioEmbed = z.infer<typeof AudioEmbedSchema>;
|
|
135
144
|
/**
|
|
@@ -208,6 +217,18 @@ type TimedTranscript = z.infer<typeof TimedTranscriptSchema>;
|
|
|
208
217
|
*/
|
|
209
218
|
declare const AudioEmbedViewSchema: z.ZodObject<{
|
|
210
219
|
$type: z.ZodLiteral<"dev.antiphony.embed.audio#view">;
|
|
220
|
+
/**
|
|
221
|
+
* `url`, `durationMs` and `waveform` are RESOLVED, not copied: once
|
|
222
|
+
* processing has produced an audio variant they describe that variant
|
|
223
|
+
* rather than the bytes the client uploaded. They always agree with one
|
|
224
|
+
* another — a duration and a set of peaks are only meaningful against the
|
|
225
|
+
* audio `url` actually points at.
|
|
226
|
+
*
|
|
227
|
+
* A client that stored `durationMs` at upload time should therefore expect
|
|
228
|
+
* it to change (trim removes leading/trailing silence), and should render
|
|
229
|
+
* these three as a set rather than caching them independently. The record's
|
|
230
|
+
* originals are immutable and unaffected; this is a read-time resolution.
|
|
231
|
+
*/
|
|
211
232
|
url: z.ZodString;
|
|
212
233
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
213
234
|
alt: z.ZodOptional<z.ZodString>;
|
|
@@ -251,12 +272,37 @@ declare const AudioEmbedViewSchema: z.ZodObject<{
|
|
|
251
272
|
}[];
|
|
252
273
|
text?: string | undefined;
|
|
253
274
|
}>>;
|
|
275
|
+
/**
|
|
276
|
+
* Per-stage audio-processing status (denoise / trim / transcribe /
|
|
277
|
+
* waveform), when the app opted into processing. Absent otherwise. A
|
|
278
|
+
* `pending` stage means the client should poll (or re-render) for the
|
|
279
|
+
* result — including a stage that returns to `pending` after having been
|
|
280
|
+
* `ready`, which is how a recompute surfaces. Once a byte-mutating stage
|
|
281
|
+
* completes, `url`/`durationMs`/`waveform` above already resolve to the
|
|
282
|
+
* processed audio variant. See `types/processing.ts`.
|
|
283
|
+
*/
|
|
284
|
+
processing: z.ZodOptional<z.ZodObject<{
|
|
285
|
+
transcribe: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
286
|
+
denoise: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
287
|
+
trim: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
288
|
+
waveform: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
289
|
+
}, "strip", z.ZodTypeAny, {
|
|
290
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
291
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
292
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
293
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
294
|
+
}, {
|
|
295
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
296
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
297
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
298
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
299
|
+
}>>;
|
|
254
300
|
}, "strip", z.ZodTypeAny, {
|
|
255
301
|
$type: "dev.antiphony.embed.audio#view";
|
|
256
302
|
url: string;
|
|
303
|
+
waveform?: number[] | undefined;
|
|
257
304
|
durationMs?: number | undefined;
|
|
258
305
|
alt?: string | undefined;
|
|
259
|
-
waveform?: number[] | undefined;
|
|
260
306
|
transcript?: {
|
|
261
307
|
segments: {
|
|
262
308
|
startMs: number;
|
|
@@ -265,12 +311,18 @@ declare const AudioEmbedViewSchema: z.ZodObject<{
|
|
|
265
311
|
}[];
|
|
266
312
|
text?: string | undefined;
|
|
267
313
|
} | undefined;
|
|
314
|
+
processing?: {
|
|
315
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
316
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
317
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
318
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
319
|
+
} | undefined;
|
|
268
320
|
}, {
|
|
269
321
|
$type: "dev.antiphony.embed.audio#view";
|
|
270
322
|
url: string;
|
|
323
|
+
waveform?: number[] | undefined;
|
|
271
324
|
durationMs?: number | undefined;
|
|
272
325
|
alt?: string | undefined;
|
|
273
|
-
waveform?: number[] | undefined;
|
|
274
326
|
transcript?: {
|
|
275
327
|
segments: {
|
|
276
328
|
startMs: number;
|
|
@@ -279,6 +331,12 @@ declare const AudioEmbedViewSchema: z.ZodObject<{
|
|
|
279
331
|
}[];
|
|
280
332
|
text?: string | undefined;
|
|
281
333
|
} | undefined;
|
|
334
|
+
processing?: {
|
|
335
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
336
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
337
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
338
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
339
|
+
} | undefined;
|
|
282
340
|
}>;
|
|
283
341
|
type AudioEmbedView = z.infer<typeof AudioEmbedViewSchema>;
|
|
284
342
|
/**
|
|
@@ -293,6 +351,13 @@ type AudioEmbedView = z.infer<typeof AudioEmbedViewSchema>;
|
|
|
293
351
|
declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
294
352
|
/** Storage id (rkey/doc id). */
|
|
295
353
|
id: z.ZodString;
|
|
354
|
+
/**
|
|
355
|
+
* Content CID of the canonical lexicon record (CIDv1, dag-cbor, sha2-256
|
|
356
|
+
* — the AT Protocol record-CID rule). Computed at write time over the
|
|
357
|
+
* lexicon projection (public fields only, NOT the storage/tenancy fields
|
|
358
|
+
* below), so StrongRefs built from it are verifiable content addresses.
|
|
359
|
+
*/
|
|
360
|
+
cid: z.ZodString;
|
|
296
361
|
/** Origin app that created this record — the multi-tenant isolation key. */
|
|
297
362
|
originAppId: z.ZodString;
|
|
298
363
|
/** Authoring user. A queryable facet, not the tenancy boundary. */
|
|
@@ -309,9 +374,62 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
309
374
|
* opened the branch. Set on replies (deduped, 1–2 ids); absent on prompts
|
|
310
375
|
* (a prompt's repliers are the app's audience policy, not a fixed pair).
|
|
311
376
|
* Inherited down the branch so reply gating is an O(1) field check, never a
|
|
312
|
-
* thread walk.
|
|
377
|
+
* thread walk.
|
|
313
378
|
*/
|
|
314
379
|
threadParticipants: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
380
|
+
/**
|
|
381
|
+
* Author of this reply's thread ROOT (the prompt) — the reply's recipient,
|
|
382
|
+
* the person whose "replies to me" feed it lands in. Denormalized at write
|
|
383
|
+
* time so "replies whose root author is X" is a cheap composite-index query
|
|
384
|
+
* (see `queryByRootAuthor`). Set on replies (`kind === 'reply'`); absent on
|
|
385
|
+
* prompts. Storage-layer facet, NOT in the public lexicon or the record CID.
|
|
386
|
+
*/
|
|
387
|
+
rootAuthorId: z.ZodOptional<z.ZodString>;
|
|
388
|
+
/**
|
|
389
|
+
* Async audio-processing state (transcribe / denoise), present iff the app
|
|
390
|
+
* opted into processing on create. Mutated by the processing worker after
|
|
391
|
+
* the post is created — storage-layer, NOT in the lexicon or the record
|
|
392
|
+
* CID. See `types/processing.ts`.
|
|
393
|
+
*/
|
|
394
|
+
processing: z.ZodOptional<z.ZodObject<{
|
|
395
|
+
transcribe: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
396
|
+
denoise: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
397
|
+
trim: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
398
|
+
waveform: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
399
|
+
} & {
|
|
400
|
+
reprocess: z.ZodOptional<z.ZodBoolean>;
|
|
401
|
+
} & {
|
|
402
|
+
processedBlobCid: z.ZodOptional<z.ZodString>;
|
|
403
|
+
processedMimeType: z.ZodOptional<z.ZodString>;
|
|
404
|
+
processedDurationMs: z.ZodOptional<z.ZodNumber>;
|
|
405
|
+
waveformPeaks: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
406
|
+
leaseUntil: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
|
|
407
|
+
updatedAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
408
|
+
}, "strip", z.ZodTypeAny, {
|
|
409
|
+
updatedAt: Date;
|
|
410
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
411
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
412
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
413
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
414
|
+
reprocess?: boolean | undefined;
|
|
415
|
+
processedBlobCid?: string | undefined;
|
|
416
|
+
processedMimeType?: string | undefined;
|
|
417
|
+
processedDurationMs?: number | undefined;
|
|
418
|
+
waveformPeaks?: number[] | undefined;
|
|
419
|
+
leaseUntil?: Date | undefined;
|
|
420
|
+
}, {
|
|
421
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
422
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
423
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
424
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
425
|
+
reprocess?: boolean | undefined;
|
|
426
|
+
processedBlobCid?: string | undefined;
|
|
427
|
+
processedMimeType?: string | undefined;
|
|
428
|
+
processedDurationMs?: number | undefined;
|
|
429
|
+
waveformPeaks?: number[] | undefined;
|
|
430
|
+
leaseUntil?: unknown;
|
|
431
|
+
updatedAt?: unknown;
|
|
432
|
+
}>>;
|
|
315
433
|
/** User-authored text (bsky-semantic). May be empty for pure-audio posts. NEVER the transcript. */
|
|
316
434
|
text: z.ZodString;
|
|
317
435
|
/** Optional headline; a prompt feature, not the discriminator. */
|
|
@@ -319,20 +437,30 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
319
437
|
/** Audio (or other) attachment. Audio posts carry an `AudioEmbed`. */
|
|
320
438
|
embed: z.ZodOptional<z.ZodObject<{
|
|
321
439
|
$type: z.ZodLiteral<"dev.antiphony.embed.audio">;
|
|
322
|
-
/** The audio bytes as a content-addressed
|
|
440
|
+
/** The audio bytes as a content-addressed blob ref (`ref.$link` = CID). */
|
|
323
441
|
audio: z.ZodObject<{
|
|
324
442
|
$type: z.ZodLiteral<"blob">;
|
|
325
|
-
ref: z.
|
|
443
|
+
ref: z.ZodObject<{
|
|
444
|
+
$link: z.ZodString;
|
|
445
|
+
}, "strip", z.ZodTypeAny, {
|
|
446
|
+
$link: string;
|
|
447
|
+
}, {
|
|
448
|
+
$link: string;
|
|
449
|
+
}>;
|
|
326
450
|
mimeType: z.ZodString;
|
|
327
451
|
size: z.ZodNumber;
|
|
328
452
|
}, "strip", z.ZodTypeAny, {
|
|
329
453
|
$type: "blob";
|
|
330
|
-
ref:
|
|
454
|
+
ref: {
|
|
455
|
+
$link: string;
|
|
456
|
+
};
|
|
331
457
|
mimeType: string;
|
|
332
458
|
size: number;
|
|
333
459
|
}, {
|
|
334
460
|
$type: "blob";
|
|
335
|
-
ref:
|
|
461
|
+
ref: {
|
|
462
|
+
$link: string;
|
|
463
|
+
};
|
|
336
464
|
mimeType: string;
|
|
337
465
|
size: number;
|
|
338
466
|
}>;
|
|
@@ -346,24 +474,28 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
346
474
|
$type: "dev.antiphony.embed.audio";
|
|
347
475
|
audio: {
|
|
348
476
|
$type: "blob";
|
|
349
|
-
ref:
|
|
477
|
+
ref: {
|
|
478
|
+
$link: string;
|
|
479
|
+
};
|
|
350
480
|
mimeType: string;
|
|
351
481
|
size: number;
|
|
352
482
|
};
|
|
483
|
+
waveform?: number[] | undefined;
|
|
353
484
|
durationMs?: number | undefined;
|
|
354
485
|
alt?: string | undefined;
|
|
355
|
-
waveform?: number[] | undefined;
|
|
356
486
|
}, {
|
|
357
487
|
$type: "dev.antiphony.embed.audio";
|
|
358
488
|
audio: {
|
|
359
489
|
$type: "blob";
|
|
360
|
-
ref:
|
|
490
|
+
ref: {
|
|
491
|
+
$link: string;
|
|
492
|
+
};
|
|
361
493
|
mimeType: string;
|
|
362
494
|
size: number;
|
|
363
495
|
};
|
|
496
|
+
waveform?: number[] | undefined;
|
|
364
497
|
durationMs?: number | undefined;
|
|
365
498
|
alt?: string | undefined;
|
|
366
|
-
waveform?: number[] | undefined;
|
|
367
499
|
}>>;
|
|
368
500
|
/** Present iff this post is a reply (StrongRef root + parent). */
|
|
369
501
|
reply: z.ZodOptional<z.ZodObject<{
|
|
@@ -413,12 +545,26 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
413
545
|
selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
414
546
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
415
547
|
}, "strip", z.ZodTypeAny, {
|
|
416
|
-
|
|
417
|
-
createdAt: Date;
|
|
548
|
+
cid: string;
|
|
418
549
|
text: string;
|
|
550
|
+
id: string;
|
|
419
551
|
originAppId: string;
|
|
420
552
|
authorId: string;
|
|
421
553
|
kind: "prompt" | "reply";
|
|
554
|
+
createdAt: Date;
|
|
555
|
+
processing?: {
|
|
556
|
+
updatedAt: Date;
|
|
557
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
558
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
559
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
560
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
561
|
+
reprocess?: boolean | undefined;
|
|
562
|
+
processedBlobCid?: string | undefined;
|
|
563
|
+
processedMimeType?: string | undefined;
|
|
564
|
+
processedDurationMs?: number | undefined;
|
|
565
|
+
waveformPeaks?: number[] | undefined;
|
|
566
|
+
leaseUntil?: Date | undefined;
|
|
567
|
+
} | undefined;
|
|
422
568
|
authorDid?: string | undefined;
|
|
423
569
|
orgId?: string | null | undefined;
|
|
424
570
|
reply?: {
|
|
@@ -432,28 +578,44 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
432
578
|
};
|
|
433
579
|
} | undefined;
|
|
434
580
|
threadParticipants?: string[] | undefined;
|
|
581
|
+
rootAuthorId?: string | undefined;
|
|
435
582
|
title?: string | undefined;
|
|
436
583
|
embed?: {
|
|
437
584
|
$type: "dev.antiphony.embed.audio";
|
|
438
585
|
audio: {
|
|
439
586
|
$type: "blob";
|
|
440
|
-
ref:
|
|
587
|
+
ref: {
|
|
588
|
+
$link: string;
|
|
589
|
+
};
|
|
441
590
|
mimeType: string;
|
|
442
591
|
size: number;
|
|
443
592
|
};
|
|
593
|
+
waveform?: number[] | undefined;
|
|
444
594
|
durationMs?: number | undefined;
|
|
445
595
|
alt?: string | undefined;
|
|
446
|
-
waveform?: number[] | undefined;
|
|
447
596
|
} | undefined;
|
|
448
597
|
langs?: string[] | undefined;
|
|
449
598
|
selfLabels?: string[] | undefined;
|
|
450
599
|
}, {
|
|
451
|
-
|
|
600
|
+
cid: string;
|
|
452
601
|
text: string;
|
|
602
|
+
id: string;
|
|
453
603
|
originAppId: string;
|
|
454
604
|
authorId: string;
|
|
455
605
|
kind: "prompt" | "reply";
|
|
456
|
-
|
|
606
|
+
processing?: {
|
|
607
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
608
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
609
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
610
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
611
|
+
reprocess?: boolean | undefined;
|
|
612
|
+
processedBlobCid?: string | undefined;
|
|
613
|
+
processedMimeType?: string | undefined;
|
|
614
|
+
processedDurationMs?: number | undefined;
|
|
615
|
+
waveformPeaks?: number[] | undefined;
|
|
616
|
+
leaseUntil?: unknown;
|
|
617
|
+
updatedAt?: unknown;
|
|
618
|
+
} | undefined;
|
|
457
619
|
authorDid?: string | undefined;
|
|
458
620
|
orgId?: string | null | undefined;
|
|
459
621
|
reply?: {
|
|
@@ -467,28 +629,46 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
467
629
|
};
|
|
468
630
|
} | undefined;
|
|
469
631
|
threadParticipants?: string[] | undefined;
|
|
632
|
+
rootAuthorId?: string | undefined;
|
|
470
633
|
title?: string | undefined;
|
|
471
634
|
embed?: {
|
|
472
635
|
$type: "dev.antiphony.embed.audio";
|
|
473
636
|
audio: {
|
|
474
637
|
$type: "blob";
|
|
475
|
-
ref:
|
|
638
|
+
ref: {
|
|
639
|
+
$link: string;
|
|
640
|
+
};
|
|
476
641
|
mimeType: string;
|
|
477
642
|
size: number;
|
|
478
643
|
};
|
|
644
|
+
waveform?: number[] | undefined;
|
|
479
645
|
durationMs?: number | undefined;
|
|
480
646
|
alt?: string | undefined;
|
|
481
|
-
waveform?: number[] | undefined;
|
|
482
647
|
} | undefined;
|
|
483
648
|
langs?: string[] | undefined;
|
|
484
649
|
selfLabels?: string[] | undefined;
|
|
650
|
+
createdAt?: unknown;
|
|
485
651
|
}>, {
|
|
486
|
-
|
|
487
|
-
createdAt: Date;
|
|
652
|
+
cid: string;
|
|
488
653
|
text: string;
|
|
654
|
+
id: string;
|
|
489
655
|
originAppId: string;
|
|
490
656
|
authorId: string;
|
|
491
657
|
kind: "prompt" | "reply";
|
|
658
|
+
createdAt: Date;
|
|
659
|
+
processing?: {
|
|
660
|
+
updatedAt: Date;
|
|
661
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
662
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
663
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
664
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
665
|
+
reprocess?: boolean | undefined;
|
|
666
|
+
processedBlobCid?: string | undefined;
|
|
667
|
+
processedMimeType?: string | undefined;
|
|
668
|
+
processedDurationMs?: number | undefined;
|
|
669
|
+
waveformPeaks?: number[] | undefined;
|
|
670
|
+
leaseUntil?: Date | undefined;
|
|
671
|
+
} | undefined;
|
|
492
672
|
authorDid?: string | undefined;
|
|
493
673
|
orgId?: string | null | undefined;
|
|
494
674
|
reply?: {
|
|
@@ -502,28 +682,44 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
502
682
|
};
|
|
503
683
|
} | undefined;
|
|
504
684
|
threadParticipants?: string[] | undefined;
|
|
685
|
+
rootAuthorId?: string | undefined;
|
|
505
686
|
title?: string | undefined;
|
|
506
687
|
embed?: {
|
|
507
688
|
$type: "dev.antiphony.embed.audio";
|
|
508
689
|
audio: {
|
|
509
690
|
$type: "blob";
|
|
510
|
-
ref:
|
|
691
|
+
ref: {
|
|
692
|
+
$link: string;
|
|
693
|
+
};
|
|
511
694
|
mimeType: string;
|
|
512
695
|
size: number;
|
|
513
696
|
};
|
|
697
|
+
waveform?: number[] | undefined;
|
|
514
698
|
durationMs?: number | undefined;
|
|
515
699
|
alt?: string | undefined;
|
|
516
|
-
waveform?: number[] | undefined;
|
|
517
700
|
} | undefined;
|
|
518
701
|
langs?: string[] | undefined;
|
|
519
702
|
selfLabels?: string[] | undefined;
|
|
520
703
|
}, {
|
|
521
|
-
|
|
704
|
+
cid: string;
|
|
522
705
|
text: string;
|
|
706
|
+
id: string;
|
|
523
707
|
originAppId: string;
|
|
524
708
|
authorId: string;
|
|
525
709
|
kind: "prompt" | "reply";
|
|
526
|
-
|
|
710
|
+
processing?: {
|
|
711
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
712
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
713
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
714
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
715
|
+
reprocess?: boolean | undefined;
|
|
716
|
+
processedBlobCid?: string | undefined;
|
|
717
|
+
processedMimeType?: string | undefined;
|
|
718
|
+
processedDurationMs?: number | undefined;
|
|
719
|
+
waveformPeaks?: number[] | undefined;
|
|
720
|
+
leaseUntil?: unknown;
|
|
721
|
+
updatedAt?: unknown;
|
|
722
|
+
} | undefined;
|
|
527
723
|
authorDid?: string | undefined;
|
|
528
724
|
orgId?: string | null | undefined;
|
|
529
725
|
reply?: {
|
|
@@ -537,21 +733,25 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
537
733
|
};
|
|
538
734
|
} | undefined;
|
|
539
735
|
threadParticipants?: string[] | undefined;
|
|
736
|
+
rootAuthorId?: string | undefined;
|
|
540
737
|
title?: string | undefined;
|
|
541
738
|
embed?: {
|
|
542
739
|
$type: "dev.antiphony.embed.audio";
|
|
543
740
|
audio: {
|
|
544
741
|
$type: "blob";
|
|
545
|
-
ref:
|
|
742
|
+
ref: {
|
|
743
|
+
$link: string;
|
|
744
|
+
};
|
|
546
745
|
mimeType: string;
|
|
547
746
|
size: number;
|
|
548
747
|
};
|
|
748
|
+
waveform?: number[] | undefined;
|
|
549
749
|
durationMs?: number | undefined;
|
|
550
750
|
alt?: string | undefined;
|
|
551
|
-
waveform?: number[] | undefined;
|
|
552
751
|
} | undefined;
|
|
553
752
|
langs?: string[] | undefined;
|
|
554
753
|
selfLabels?: string[] | undefined;
|
|
754
|
+
createdAt?: unknown;
|
|
555
755
|
}>;
|
|
556
756
|
type AudioPostRecord = z.infer<typeof AudioPostRecordSchema>;
|
|
557
757
|
/**
|
|
@@ -616,8 +816,6 @@ declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
|
616
816
|
model: z.ZodOptional<z.ZodString>;
|
|
617
817
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
618
818
|
}, "strip", z.ZodTypeAny, {
|
|
619
|
-
id: string;
|
|
620
|
-
createdAt: Date;
|
|
621
819
|
transcript: {
|
|
622
820
|
segments: {
|
|
623
821
|
startMs: number;
|
|
@@ -626,6 +824,8 @@ declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
|
626
824
|
}[];
|
|
627
825
|
text?: string | undefined;
|
|
628
826
|
};
|
|
827
|
+
id: string;
|
|
828
|
+
createdAt: Date;
|
|
629
829
|
subject: {
|
|
630
830
|
uri: string;
|
|
631
831
|
cid: string;
|
|
@@ -633,7 +833,6 @@ declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
|
633
833
|
lang?: string | undefined;
|
|
634
834
|
model?: string | undefined;
|
|
635
835
|
}, {
|
|
636
|
-
id: string;
|
|
637
836
|
transcript: {
|
|
638
837
|
segments: {
|
|
639
838
|
startMs: number;
|
|
@@ -642,6 +841,7 @@ declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
|
642
841
|
}[];
|
|
643
842
|
text?: string | undefined;
|
|
644
843
|
};
|
|
844
|
+
id: string;
|
|
645
845
|
subject: {
|
|
646
846
|
uri: string;
|
|
647
847
|
cid: string;
|
|
@@ -652,7 +852,13 @@ declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
|
652
852
|
}>;
|
|
653
853
|
type TranscriptEnrichmentRecord = z.infer<typeof TranscriptEnrichmentRecordSchema>;
|
|
654
854
|
/**
|
|
655
|
-
* `dev.antiphony.actor.profile` —
|
|
855
|
+
* `dev.antiphony.actor.profile` — portable actor-profile record shape.
|
|
856
|
+
*
|
|
857
|
+
* Lexicon-only: the core never stores, serves, or CRUDs this record — the
|
|
858
|
+
* caller BFF is the sole authority for profile data. The schema stays in
|
|
859
|
+
* `@antiphony/shared` so a federating/exporting deployment has a well-known
|
|
860
|
+
* shape to project a BFF-owned profile into (see specs/core-bff-boundary.md,
|
|
861
|
+
* "actor.profile lexicon", resolved 2026-07-03).
|
|
656
862
|
*/
|
|
657
863
|
declare const ActorProfileRecordSchema: z.ZodObject<{
|
|
658
864
|
handle: z.ZodOptional<z.ZodString>;
|
|
@@ -745,8 +951,8 @@ declare const PostRecordPublicSchema: z.ZodObject<{
|
|
|
745
951
|
selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
746
952
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
747
953
|
}, "strip", z.ZodTypeAny, {
|
|
748
|
-
createdAt: Date;
|
|
749
954
|
text: string;
|
|
955
|
+
createdAt: Date;
|
|
750
956
|
reply?: {
|
|
751
957
|
root: {
|
|
752
958
|
uri: string;
|
|
@@ -762,7 +968,6 @@ declare const PostRecordPublicSchema: z.ZodObject<{
|
|
|
762
968
|
selfLabels?: string[] | undefined;
|
|
763
969
|
}, {
|
|
764
970
|
text: string;
|
|
765
|
-
createdAt?: unknown;
|
|
766
971
|
reply?: {
|
|
767
972
|
root: {
|
|
768
973
|
uri: string;
|
|
@@ -776,110 +981,32 @@ declare const PostRecordPublicSchema: z.ZodObject<{
|
|
|
776
981
|
title?: string | undefined;
|
|
777
982
|
langs?: string[] | undefined;
|
|
778
983
|
selfLabels?: string[] | undefined;
|
|
984
|
+
createdAt?: unknown;
|
|
779
985
|
}>;
|
|
780
986
|
type PostRecordPublic = z.infer<typeof PostRecordPublicSchema>;
|
|
781
987
|
/**
|
|
782
988
|
* `AudioPostView` — the hydrated, client-facing shape (the bsky `postView`
|
|
783
|
-
* analogue): record content + author + hydrated embed +
|
|
784
|
-
* Produced by the (batched) hydrator; the default/public
|
|
785
|
-
* owner-extra arriving via `viewer` + separate authed endpoints,
|
|
786
|
-
* records.
|
|
989
|
+
* analogue): record content + opaque author references + hydrated embed +
|
|
990
|
+
* per-viewer state. Produced by the (batched) hydrator; the default/public
|
|
991
|
+
* view, with owner-extra arriving via `viewer` + separate authed endpoints,
|
|
992
|
+
* not fat records.
|
|
993
|
+
*
|
|
994
|
+
* Author identity is carried as **opaque references**, never a hydrated
|
|
995
|
+
* profile: `authorId` is the app's own user id (attribution facet) and
|
|
996
|
+
* `authorDid` is present only when the caller asserted one. Antiphony holds no
|
|
997
|
+
* user data — the caller BFF hydrates display identity by joining on
|
|
998
|
+
* `authorId` (see specs/core-surface.md, "The author model").
|
|
787
999
|
*/
|
|
788
1000
|
declare const AudioPostViewSchema: z.ZodObject<{
|
|
789
1001
|
/** at:// URI (or internal ref) identifying the post. */
|
|
790
1002
|
uri: z.ZodString;
|
|
791
|
-
|
|
1003
|
+
/** Content CID of the canonical record (see `AudioPostRecordSchema.cid`). */
|
|
1004
|
+
cid: z.ZodString;
|
|
792
1005
|
kind: z.ZodEnum<["prompt", "reply"]>;
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
798
|
-
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
799
|
-
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
800
|
-
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
801
|
-
label: z.ZodString;
|
|
802
|
-
url: z.ZodString;
|
|
803
|
-
}, "strip", z.ZodTypeAny, {
|
|
804
|
-
label: string;
|
|
805
|
-
url: string;
|
|
806
|
-
}, {
|
|
807
|
-
label: string;
|
|
808
|
-
url: string;
|
|
809
|
-
}>, "many">>;
|
|
810
|
-
bluesky: z.ZodOptional<z.ZodObject<{
|
|
811
|
-
handle: z.ZodString;
|
|
812
|
-
did: z.ZodString;
|
|
813
|
-
}, "strip", z.ZodTypeAny, {
|
|
814
|
-
handle: string;
|
|
815
|
-
did: string;
|
|
816
|
-
}, {
|
|
817
|
-
handle: string;
|
|
818
|
-
did: string;
|
|
819
|
-
}>>;
|
|
820
|
-
stats: z.ZodOptional<z.ZodObject<{
|
|
821
|
-
followers: z.ZodDefault<z.ZodNumber>;
|
|
822
|
-
following: z.ZodDefault<z.ZodNumber>;
|
|
823
|
-
prompts: z.ZodDefault<z.ZodNumber>;
|
|
824
|
-
}, "strip", z.ZodTypeAny, {
|
|
825
|
-
followers: number;
|
|
826
|
-
following: number;
|
|
827
|
-
prompts: number;
|
|
828
|
-
}, {
|
|
829
|
-
followers?: number | undefined;
|
|
830
|
-
following?: number | undefined;
|
|
831
|
-
prompts?: number | undefined;
|
|
832
|
-
}>>;
|
|
833
|
-
badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
834
|
-
isVerified: z.ZodOptional<z.ZodBoolean>;
|
|
835
|
-
createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
|
|
836
|
-
}, "strip", z.ZodTypeAny, {
|
|
837
|
-
id: string;
|
|
838
|
-
handle?: string | null | undefined;
|
|
839
|
-
displayName?: string | null | undefined;
|
|
840
|
-
bio?: string | null | undefined;
|
|
841
|
-
avatarUrl?: string | null | undefined;
|
|
842
|
-
website?: string | null | undefined;
|
|
843
|
-
links?: {
|
|
844
|
-
label: string;
|
|
845
|
-
url: string;
|
|
846
|
-
}[] | undefined;
|
|
847
|
-
createdAt?: Date | undefined;
|
|
848
|
-
bluesky?: {
|
|
849
|
-
handle: string;
|
|
850
|
-
did: string;
|
|
851
|
-
} | undefined;
|
|
852
|
-
stats?: {
|
|
853
|
-
followers: number;
|
|
854
|
-
following: number;
|
|
855
|
-
prompts: number;
|
|
856
|
-
} | undefined;
|
|
857
|
-
badges?: string[] | undefined;
|
|
858
|
-
isVerified?: boolean | undefined;
|
|
859
|
-
}, {
|
|
860
|
-
id: string;
|
|
861
|
-
handle?: string | null | undefined;
|
|
862
|
-
displayName?: string | null | undefined;
|
|
863
|
-
bio?: string | null | undefined;
|
|
864
|
-
avatarUrl?: string | null | undefined;
|
|
865
|
-
website?: string | null | undefined;
|
|
866
|
-
links?: {
|
|
867
|
-
label: string;
|
|
868
|
-
url: string;
|
|
869
|
-
}[] | undefined;
|
|
870
|
-
createdAt?: unknown;
|
|
871
|
-
bluesky?: {
|
|
872
|
-
handle: string;
|
|
873
|
-
did: string;
|
|
874
|
-
} | undefined;
|
|
875
|
-
stats?: {
|
|
876
|
-
followers?: number | undefined;
|
|
877
|
-
following?: number | undefined;
|
|
878
|
-
prompts?: number | undefined;
|
|
879
|
-
} | undefined;
|
|
880
|
-
badges?: string[] | undefined;
|
|
881
|
-
isVerified?: boolean | undefined;
|
|
882
|
-
}>;
|
|
1006
|
+
/** The acting actor's app-scoped id — an opaque attribution ref, not a profile. */
|
|
1007
|
+
authorId: z.ZodString;
|
|
1008
|
+
/** The author's app-asserted AT Protocol DID, when the caller provided one. */
|
|
1009
|
+
authorDid: z.ZodOptional<z.ZodString>;
|
|
883
1010
|
record: z.ZodObject<{
|
|
884
1011
|
text: z.ZodString;
|
|
885
1012
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -927,8 +1054,8 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
927
1054
|
selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
928
1055
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
929
1056
|
}, "strip", z.ZodTypeAny, {
|
|
930
|
-
createdAt: Date;
|
|
931
1057
|
text: string;
|
|
1058
|
+
createdAt: Date;
|
|
932
1059
|
reply?: {
|
|
933
1060
|
root: {
|
|
934
1061
|
uri: string;
|
|
@@ -944,7 +1071,6 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
944
1071
|
selfLabels?: string[] | undefined;
|
|
945
1072
|
}, {
|
|
946
1073
|
text: string;
|
|
947
|
-
createdAt?: unknown;
|
|
948
1074
|
reply?: {
|
|
949
1075
|
root: {
|
|
950
1076
|
uri: string;
|
|
@@ -958,10 +1084,23 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
958
1084
|
title?: string | undefined;
|
|
959
1085
|
langs?: string[] | undefined;
|
|
960
1086
|
selfLabels?: string[] | undefined;
|
|
1087
|
+
createdAt?: unknown;
|
|
961
1088
|
}>;
|
|
962
1089
|
/** Hydrated audio embed (signed URL + lifted transcript). */
|
|
963
1090
|
embed: z.ZodOptional<z.ZodObject<{
|
|
964
1091
|
$type: z.ZodLiteral<"dev.antiphony.embed.audio#view">;
|
|
1092
|
+
/**
|
|
1093
|
+
* `url`, `durationMs` and `waveform` are RESOLVED, not copied: once
|
|
1094
|
+
* processing has produced an audio variant they describe that variant
|
|
1095
|
+
* rather than the bytes the client uploaded. They always agree with one
|
|
1096
|
+
* another — a duration and a set of peaks are only meaningful against the
|
|
1097
|
+
* audio `url` actually points at.
|
|
1098
|
+
*
|
|
1099
|
+
* A client that stored `durationMs` at upload time should therefore expect
|
|
1100
|
+
* it to change (trim removes leading/trailing silence), and should render
|
|
1101
|
+
* these three as a set rather than caching them independently. The record's
|
|
1102
|
+
* originals are immutable and unaffected; this is a read-time resolution.
|
|
1103
|
+
*/
|
|
965
1104
|
url: z.ZodString;
|
|
966
1105
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
967
1106
|
alt: z.ZodOptional<z.ZodString>;
|
|
@@ -1005,12 +1144,37 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1005
1144
|
}[];
|
|
1006
1145
|
text?: string | undefined;
|
|
1007
1146
|
}>>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Per-stage audio-processing status (denoise / trim / transcribe /
|
|
1149
|
+
* waveform), when the app opted into processing. Absent otherwise. A
|
|
1150
|
+
* `pending` stage means the client should poll (or re-render) for the
|
|
1151
|
+
* result — including a stage that returns to `pending` after having been
|
|
1152
|
+
* `ready`, which is how a recompute surfaces. Once a byte-mutating stage
|
|
1153
|
+
* completes, `url`/`durationMs`/`waveform` above already resolve to the
|
|
1154
|
+
* processed audio variant. See `types/processing.ts`.
|
|
1155
|
+
*/
|
|
1156
|
+
processing: z.ZodOptional<z.ZodObject<{
|
|
1157
|
+
transcribe: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
1158
|
+
denoise: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
1159
|
+
trim: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
1160
|
+
waveform: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
1161
|
+
}, "strip", z.ZodTypeAny, {
|
|
1162
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1163
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1164
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1165
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1166
|
+
}, {
|
|
1167
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1168
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1169
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1170
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1171
|
+
}>>;
|
|
1008
1172
|
}, "strip", z.ZodTypeAny, {
|
|
1009
1173
|
$type: "dev.antiphony.embed.audio#view";
|
|
1010
1174
|
url: string;
|
|
1175
|
+
waveform?: number[] | undefined;
|
|
1011
1176
|
durationMs?: number | undefined;
|
|
1012
1177
|
alt?: string | undefined;
|
|
1013
|
-
waveform?: number[] | undefined;
|
|
1014
1178
|
transcript?: {
|
|
1015
1179
|
segments: {
|
|
1016
1180
|
startMs: number;
|
|
@@ -1019,12 +1183,18 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1019
1183
|
}[];
|
|
1020
1184
|
text?: string | undefined;
|
|
1021
1185
|
} | undefined;
|
|
1186
|
+
processing?: {
|
|
1187
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1188
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1189
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1190
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1191
|
+
} | undefined;
|
|
1022
1192
|
}, {
|
|
1023
1193
|
$type: "dev.antiphony.embed.audio#view";
|
|
1024
1194
|
url: string;
|
|
1195
|
+
waveform?: number[] | undefined;
|
|
1025
1196
|
durationMs?: number | undefined;
|
|
1026
1197
|
alt?: string | undefined;
|
|
1027
|
-
waveform?: number[] | undefined;
|
|
1028
1198
|
transcript?: {
|
|
1029
1199
|
segments: {
|
|
1030
1200
|
startMs: number;
|
|
@@ -1033,6 +1203,12 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1033
1203
|
}[];
|
|
1034
1204
|
text?: string | undefined;
|
|
1035
1205
|
} | undefined;
|
|
1206
|
+
processing?: {
|
|
1207
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1208
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1209
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1210
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1211
|
+
} | undefined;
|
|
1036
1212
|
}>>;
|
|
1037
1213
|
viewer: z.ZodObject<{
|
|
1038
1214
|
/** True when the authenticated caller authored this post. */
|
|
@@ -1056,34 +1232,12 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1056
1232
|
}>;
|
|
1057
1233
|
}, "strip", z.ZodTypeAny, {
|
|
1058
1234
|
uri: string;
|
|
1235
|
+
cid: string;
|
|
1236
|
+
authorId: string;
|
|
1059
1237
|
kind: "prompt" | "reply";
|
|
1060
|
-
author: {
|
|
1061
|
-
id: string;
|
|
1062
|
-
handle?: string | null | undefined;
|
|
1063
|
-
displayName?: string | null | undefined;
|
|
1064
|
-
bio?: string | null | undefined;
|
|
1065
|
-
avatarUrl?: string | null | undefined;
|
|
1066
|
-
website?: string | null | undefined;
|
|
1067
|
-
links?: {
|
|
1068
|
-
label: string;
|
|
1069
|
-
url: string;
|
|
1070
|
-
}[] | undefined;
|
|
1071
|
-
createdAt?: Date | undefined;
|
|
1072
|
-
bluesky?: {
|
|
1073
|
-
handle: string;
|
|
1074
|
-
did: string;
|
|
1075
|
-
} | undefined;
|
|
1076
|
-
stats?: {
|
|
1077
|
-
followers: number;
|
|
1078
|
-
following: number;
|
|
1079
|
-
prompts: number;
|
|
1080
|
-
} | undefined;
|
|
1081
|
-
badges?: string[] | undefined;
|
|
1082
|
-
isVerified?: boolean | undefined;
|
|
1083
|
-
};
|
|
1084
1238
|
record: {
|
|
1085
|
-
createdAt: Date;
|
|
1086
1239
|
text: string;
|
|
1240
|
+
createdAt: Date;
|
|
1087
1241
|
reply?: {
|
|
1088
1242
|
root: {
|
|
1089
1243
|
uri: string;
|
|
@@ -1103,13 +1257,13 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1103
1257
|
canReply: boolean;
|
|
1104
1258
|
replyDisabledReason?: "unauthenticated" | "not_a_participant" | undefined;
|
|
1105
1259
|
};
|
|
1106
|
-
|
|
1260
|
+
authorDid?: string | undefined;
|
|
1107
1261
|
embed?: {
|
|
1108
1262
|
$type: "dev.antiphony.embed.audio#view";
|
|
1109
1263
|
url: string;
|
|
1264
|
+
waveform?: number[] | undefined;
|
|
1110
1265
|
durationMs?: number | undefined;
|
|
1111
1266
|
alt?: string | undefined;
|
|
1112
|
-
waveform?: number[] | undefined;
|
|
1113
1267
|
transcript?: {
|
|
1114
1268
|
segments: {
|
|
1115
1269
|
startMs: number;
|
|
@@ -1118,37 +1272,20 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1118
1272
|
}[];
|
|
1119
1273
|
text?: string | undefined;
|
|
1120
1274
|
} | undefined;
|
|
1275
|
+
processing?: {
|
|
1276
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1277
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1278
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1279
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1280
|
+
} | undefined;
|
|
1121
1281
|
} | undefined;
|
|
1122
1282
|
}, {
|
|
1123
1283
|
uri: string;
|
|
1284
|
+
cid: string;
|
|
1285
|
+
authorId: string;
|
|
1124
1286
|
kind: "prompt" | "reply";
|
|
1125
|
-
author: {
|
|
1126
|
-
id: string;
|
|
1127
|
-
handle?: string | null | undefined;
|
|
1128
|
-
displayName?: string | null | undefined;
|
|
1129
|
-
bio?: string | null | undefined;
|
|
1130
|
-
avatarUrl?: string | null | undefined;
|
|
1131
|
-
website?: string | null | undefined;
|
|
1132
|
-
links?: {
|
|
1133
|
-
label: string;
|
|
1134
|
-
url: string;
|
|
1135
|
-
}[] | undefined;
|
|
1136
|
-
createdAt?: unknown;
|
|
1137
|
-
bluesky?: {
|
|
1138
|
-
handle: string;
|
|
1139
|
-
did: string;
|
|
1140
|
-
} | undefined;
|
|
1141
|
-
stats?: {
|
|
1142
|
-
followers?: number | undefined;
|
|
1143
|
-
following?: number | undefined;
|
|
1144
|
-
prompts?: number | undefined;
|
|
1145
|
-
} | undefined;
|
|
1146
|
-
badges?: string[] | undefined;
|
|
1147
|
-
isVerified?: boolean | undefined;
|
|
1148
|
-
};
|
|
1149
1287
|
record: {
|
|
1150
1288
|
text: string;
|
|
1151
|
-
createdAt?: unknown;
|
|
1152
1289
|
reply?: {
|
|
1153
1290
|
root: {
|
|
1154
1291
|
uri: string;
|
|
@@ -1162,19 +1299,20 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1162
1299
|
title?: string | undefined;
|
|
1163
1300
|
langs?: string[] | undefined;
|
|
1164
1301
|
selfLabels?: string[] | undefined;
|
|
1302
|
+
createdAt?: unknown;
|
|
1165
1303
|
};
|
|
1166
1304
|
viewer: {
|
|
1167
1305
|
isAuthor?: boolean | undefined;
|
|
1168
1306
|
canReply?: boolean | undefined;
|
|
1169
1307
|
replyDisabledReason?: "unauthenticated" | "not_a_participant" | undefined;
|
|
1170
1308
|
};
|
|
1171
|
-
|
|
1309
|
+
authorDid?: string | undefined;
|
|
1172
1310
|
embed?: {
|
|
1173
1311
|
$type: "dev.antiphony.embed.audio#view";
|
|
1174
1312
|
url: string;
|
|
1313
|
+
waveform?: number[] | undefined;
|
|
1175
1314
|
durationMs?: number | undefined;
|
|
1176
1315
|
alt?: string | undefined;
|
|
1177
|
-
waveform?: number[] | undefined;
|
|
1178
1316
|
transcript?: {
|
|
1179
1317
|
segments: {
|
|
1180
1318
|
startMs: number;
|
|
@@ -1183,6 +1321,12 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1183
1321
|
}[];
|
|
1184
1322
|
text?: string | undefined;
|
|
1185
1323
|
} | undefined;
|
|
1324
|
+
processing?: {
|
|
1325
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1326
|
+
trim?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1327
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1328
|
+
waveform?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1329
|
+
} | undefined;
|
|
1186
1330
|
} | undefined;
|
|
1187
1331
|
}>;
|
|
1188
1332
|
type AudioPostView = z.infer<typeof AudioPostViewSchema>;
|