@antiphony/shared 0.3.0 → 0.4.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 +74 -147
- package/dist/cjs/api-codecs.d.cts +105 -60
- package/dist/cjs/index.cjs +84 -197
- package/dist/cjs/index.d.cts +89 -7
- package/dist/cjs/nsid.cjs +6 -9
- package/dist/cjs/nsid.d.cts +7 -8
- package/dist/cjs/types/audio.cjs +60 -124
- package/dist/cjs/types/audio.d.cts +226 -185
- 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 +135 -90
- package/dist/esm/api-codecs.js +4 -5
- package/dist/esm/chunk-D655OH2I.js +35 -0
- package/dist/esm/chunk-RUUHUNZ6.js +37 -0
- package/dist/esm/{chunk-6LROFBKK.js → chunk-SBYNIQRZ.js} +7 -9
- package/dist/esm/chunk-SMK4OZNU.js +17 -0
- package/dist/esm/{chunk-F7IHVM34.js → chunk-WL2GSPGC.js} +64 -12
- package/dist/esm/index.d.ts +89 -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 +303 -262
- 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 +90 -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-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,7 +117,9 @@ 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
|
};
|
|
@@ -123,7 +130,9 @@ declare const AudioEmbedSchema: z.ZodObject<{
|
|
|
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
|
};
|
|
@@ -251,6 +260,23 @@ declare const AudioEmbedViewSchema: z.ZodObject<{
|
|
|
251
260
|
}[];
|
|
252
261
|
text?: string | undefined;
|
|
253
262
|
}>>;
|
|
263
|
+
/**
|
|
264
|
+
* Per-stage audio-processing status (transcribe / denoise), when the app
|
|
265
|
+
* opted into processing on create. Absent otherwise. A `pending` stage
|
|
266
|
+
* means the client should poll (or re-render) for the result. When
|
|
267
|
+
* `denoise === 'ready'`, `url` above already resolves to the cleaned
|
|
268
|
+
* audio variant. See `types/processing.ts`.
|
|
269
|
+
*/
|
|
270
|
+
processing: z.ZodOptional<z.ZodObject<{
|
|
271
|
+
transcribe: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
272
|
+
denoise: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
275
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
276
|
+
}, {
|
|
277
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
278
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
279
|
+
}>>;
|
|
254
280
|
}, "strip", z.ZodTypeAny, {
|
|
255
281
|
$type: "dev.antiphony.embed.audio#view";
|
|
256
282
|
url: string;
|
|
@@ -265,6 +291,10 @@ declare const AudioEmbedViewSchema: z.ZodObject<{
|
|
|
265
291
|
}[];
|
|
266
292
|
text?: string | undefined;
|
|
267
293
|
} | undefined;
|
|
294
|
+
processing?: {
|
|
295
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
296
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
297
|
+
} | undefined;
|
|
268
298
|
}, {
|
|
269
299
|
$type: "dev.antiphony.embed.audio#view";
|
|
270
300
|
url: string;
|
|
@@ -279,6 +309,10 @@ declare const AudioEmbedViewSchema: z.ZodObject<{
|
|
|
279
309
|
}[];
|
|
280
310
|
text?: string | undefined;
|
|
281
311
|
} | undefined;
|
|
312
|
+
processing?: {
|
|
313
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
314
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
315
|
+
} | undefined;
|
|
282
316
|
}>;
|
|
283
317
|
type AudioEmbedView = z.infer<typeof AudioEmbedViewSchema>;
|
|
284
318
|
/**
|
|
@@ -293,6 +327,13 @@ type AudioEmbedView = z.infer<typeof AudioEmbedViewSchema>;
|
|
|
293
327
|
declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
294
328
|
/** Storage id (rkey/doc id). */
|
|
295
329
|
id: z.ZodString;
|
|
330
|
+
/**
|
|
331
|
+
* Content CID of the canonical lexicon record (CIDv1, dag-cbor, sha2-256
|
|
332
|
+
* — the AT Protocol record-CID rule). Computed at write time over the
|
|
333
|
+
* lexicon projection (public fields only, NOT the storage/tenancy fields
|
|
334
|
+
* below), so StrongRefs built from it are verifiable content addresses.
|
|
335
|
+
*/
|
|
336
|
+
cid: z.ZodString;
|
|
296
337
|
/** Origin app that created this record — the multi-tenant isolation key. */
|
|
297
338
|
originAppId: z.ZodString;
|
|
298
339
|
/** Authoring user. A queryable facet, not the tenancy boundary. */
|
|
@@ -309,9 +350,39 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
309
350
|
* opened the branch. Set on replies (deduped, 1–2 ids); absent on prompts
|
|
310
351
|
* (a prompt's repliers are the app's audience policy, not a fixed pair).
|
|
311
352
|
* Inherited down the branch so reply gating is an O(1) field check, never a
|
|
312
|
-
* thread walk.
|
|
353
|
+
* thread walk.
|
|
313
354
|
*/
|
|
314
355
|
threadParticipants: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
356
|
+
/**
|
|
357
|
+
* Author of this reply's thread ROOT (the prompt) — the reply's recipient,
|
|
358
|
+
* the person whose "replies to me" feed it lands in. Denormalized at write
|
|
359
|
+
* time so "replies whose root author is X" is a cheap composite-index query
|
|
360
|
+
* (see `queryByRootAuthor`). Set on replies (`kind === 'reply'`); absent on
|
|
361
|
+
* prompts. Storage-layer facet, NOT in the public lexicon or the record CID.
|
|
362
|
+
*/
|
|
363
|
+
rootAuthorId: z.ZodOptional<z.ZodString>;
|
|
364
|
+
/**
|
|
365
|
+
* Async audio-processing state (transcribe / denoise), present iff the app
|
|
366
|
+
* opted into processing on create. Mutated by the processing worker after
|
|
367
|
+
* the post is created — storage-layer, NOT in the lexicon or the record
|
|
368
|
+
* CID. See `types/processing.ts`.
|
|
369
|
+
*/
|
|
370
|
+
processing: z.ZodOptional<z.ZodObject<{
|
|
371
|
+
transcribe: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
372
|
+
denoise: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
373
|
+
denoisedBlobCid: z.ZodOptional<z.ZodString>;
|
|
374
|
+
updatedAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
375
|
+
}, "strip", z.ZodTypeAny, {
|
|
376
|
+
updatedAt: Date;
|
|
377
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
378
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
379
|
+
denoisedBlobCid?: string | undefined;
|
|
380
|
+
}, {
|
|
381
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
382
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
383
|
+
denoisedBlobCid?: string | undefined;
|
|
384
|
+
updatedAt?: unknown;
|
|
385
|
+
}>>;
|
|
315
386
|
/** User-authored text (bsky-semantic). May be empty for pure-audio posts. NEVER the transcript. */
|
|
316
387
|
text: z.ZodString;
|
|
317
388
|
/** Optional headline; a prompt feature, not the discriminator. */
|
|
@@ -319,20 +390,30 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
319
390
|
/** Audio (or other) attachment. Audio posts carry an `AudioEmbed`. */
|
|
320
391
|
embed: z.ZodOptional<z.ZodObject<{
|
|
321
392
|
$type: z.ZodLiteral<"dev.antiphony.embed.audio">;
|
|
322
|
-
/** The audio bytes as a content-addressed
|
|
393
|
+
/** The audio bytes as a content-addressed blob ref (`ref.$link` = CID). */
|
|
323
394
|
audio: z.ZodObject<{
|
|
324
395
|
$type: z.ZodLiteral<"blob">;
|
|
325
|
-
ref: z.
|
|
396
|
+
ref: z.ZodObject<{
|
|
397
|
+
$link: z.ZodString;
|
|
398
|
+
}, "strip", z.ZodTypeAny, {
|
|
399
|
+
$link: string;
|
|
400
|
+
}, {
|
|
401
|
+
$link: string;
|
|
402
|
+
}>;
|
|
326
403
|
mimeType: z.ZodString;
|
|
327
404
|
size: z.ZodNumber;
|
|
328
405
|
}, "strip", z.ZodTypeAny, {
|
|
329
406
|
$type: "blob";
|
|
330
|
-
ref:
|
|
407
|
+
ref: {
|
|
408
|
+
$link: string;
|
|
409
|
+
};
|
|
331
410
|
mimeType: string;
|
|
332
411
|
size: number;
|
|
333
412
|
}, {
|
|
334
413
|
$type: "blob";
|
|
335
|
-
ref:
|
|
414
|
+
ref: {
|
|
415
|
+
$link: string;
|
|
416
|
+
};
|
|
336
417
|
mimeType: string;
|
|
337
418
|
size: number;
|
|
338
419
|
}>;
|
|
@@ -346,7 +427,9 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
346
427
|
$type: "dev.antiphony.embed.audio";
|
|
347
428
|
audio: {
|
|
348
429
|
$type: "blob";
|
|
349
|
-
ref:
|
|
430
|
+
ref: {
|
|
431
|
+
$link: string;
|
|
432
|
+
};
|
|
350
433
|
mimeType: string;
|
|
351
434
|
size: number;
|
|
352
435
|
};
|
|
@@ -357,7 +440,9 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
357
440
|
$type: "dev.antiphony.embed.audio";
|
|
358
441
|
audio: {
|
|
359
442
|
$type: "blob";
|
|
360
|
-
ref:
|
|
443
|
+
ref: {
|
|
444
|
+
$link: string;
|
|
445
|
+
};
|
|
361
446
|
mimeType: string;
|
|
362
447
|
size: number;
|
|
363
448
|
};
|
|
@@ -413,12 +498,19 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
413
498
|
selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
414
499
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
415
500
|
}, "strip", z.ZodTypeAny, {
|
|
416
|
-
|
|
417
|
-
createdAt: Date;
|
|
501
|
+
cid: string;
|
|
418
502
|
text: string;
|
|
503
|
+
id: string;
|
|
419
504
|
originAppId: string;
|
|
420
505
|
authorId: string;
|
|
421
506
|
kind: "prompt" | "reply";
|
|
507
|
+
createdAt: Date;
|
|
508
|
+
processing?: {
|
|
509
|
+
updatedAt: Date;
|
|
510
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
511
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
512
|
+
denoisedBlobCid?: string | undefined;
|
|
513
|
+
} | undefined;
|
|
422
514
|
authorDid?: string | undefined;
|
|
423
515
|
orgId?: string | null | undefined;
|
|
424
516
|
reply?: {
|
|
@@ -432,12 +524,15 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
432
524
|
};
|
|
433
525
|
} | undefined;
|
|
434
526
|
threadParticipants?: string[] | undefined;
|
|
527
|
+
rootAuthorId?: string | undefined;
|
|
435
528
|
title?: string | undefined;
|
|
436
529
|
embed?: {
|
|
437
530
|
$type: "dev.antiphony.embed.audio";
|
|
438
531
|
audio: {
|
|
439
532
|
$type: "blob";
|
|
440
|
-
ref:
|
|
533
|
+
ref: {
|
|
534
|
+
$link: string;
|
|
535
|
+
};
|
|
441
536
|
mimeType: string;
|
|
442
537
|
size: number;
|
|
443
538
|
};
|
|
@@ -448,12 +543,18 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
448
543
|
langs?: string[] | undefined;
|
|
449
544
|
selfLabels?: string[] | undefined;
|
|
450
545
|
}, {
|
|
451
|
-
|
|
546
|
+
cid: string;
|
|
452
547
|
text: string;
|
|
548
|
+
id: string;
|
|
453
549
|
originAppId: string;
|
|
454
550
|
authorId: string;
|
|
455
551
|
kind: "prompt" | "reply";
|
|
456
|
-
|
|
552
|
+
processing?: {
|
|
553
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
554
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
555
|
+
denoisedBlobCid?: string | undefined;
|
|
556
|
+
updatedAt?: unknown;
|
|
557
|
+
} | undefined;
|
|
457
558
|
authorDid?: string | undefined;
|
|
458
559
|
orgId?: string | null | undefined;
|
|
459
560
|
reply?: {
|
|
@@ -467,12 +568,15 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
467
568
|
};
|
|
468
569
|
} | undefined;
|
|
469
570
|
threadParticipants?: string[] | undefined;
|
|
571
|
+
rootAuthorId?: string | undefined;
|
|
470
572
|
title?: string | undefined;
|
|
471
573
|
embed?: {
|
|
472
574
|
$type: "dev.antiphony.embed.audio";
|
|
473
575
|
audio: {
|
|
474
576
|
$type: "blob";
|
|
475
|
-
ref:
|
|
577
|
+
ref: {
|
|
578
|
+
$link: string;
|
|
579
|
+
};
|
|
476
580
|
mimeType: string;
|
|
477
581
|
size: number;
|
|
478
582
|
};
|
|
@@ -482,13 +586,21 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
482
586
|
} | undefined;
|
|
483
587
|
langs?: string[] | undefined;
|
|
484
588
|
selfLabels?: string[] | undefined;
|
|
589
|
+
createdAt?: unknown;
|
|
485
590
|
}>, {
|
|
486
|
-
|
|
487
|
-
createdAt: Date;
|
|
591
|
+
cid: string;
|
|
488
592
|
text: string;
|
|
593
|
+
id: string;
|
|
489
594
|
originAppId: string;
|
|
490
595
|
authorId: string;
|
|
491
596
|
kind: "prompt" | "reply";
|
|
597
|
+
createdAt: Date;
|
|
598
|
+
processing?: {
|
|
599
|
+
updatedAt: Date;
|
|
600
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
601
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
602
|
+
denoisedBlobCid?: string | undefined;
|
|
603
|
+
} | undefined;
|
|
492
604
|
authorDid?: string | undefined;
|
|
493
605
|
orgId?: string | null | undefined;
|
|
494
606
|
reply?: {
|
|
@@ -502,12 +614,15 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
502
614
|
};
|
|
503
615
|
} | undefined;
|
|
504
616
|
threadParticipants?: string[] | undefined;
|
|
617
|
+
rootAuthorId?: string | undefined;
|
|
505
618
|
title?: string | undefined;
|
|
506
619
|
embed?: {
|
|
507
620
|
$type: "dev.antiphony.embed.audio";
|
|
508
621
|
audio: {
|
|
509
622
|
$type: "blob";
|
|
510
|
-
ref:
|
|
623
|
+
ref: {
|
|
624
|
+
$link: string;
|
|
625
|
+
};
|
|
511
626
|
mimeType: string;
|
|
512
627
|
size: number;
|
|
513
628
|
};
|
|
@@ -518,12 +633,18 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
518
633
|
langs?: string[] | undefined;
|
|
519
634
|
selfLabels?: string[] | undefined;
|
|
520
635
|
}, {
|
|
521
|
-
|
|
636
|
+
cid: string;
|
|
522
637
|
text: string;
|
|
638
|
+
id: string;
|
|
523
639
|
originAppId: string;
|
|
524
640
|
authorId: string;
|
|
525
641
|
kind: "prompt" | "reply";
|
|
526
|
-
|
|
642
|
+
processing?: {
|
|
643
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
644
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
645
|
+
denoisedBlobCid?: string | undefined;
|
|
646
|
+
updatedAt?: unknown;
|
|
647
|
+
} | undefined;
|
|
527
648
|
authorDid?: string | undefined;
|
|
528
649
|
orgId?: string | null | undefined;
|
|
529
650
|
reply?: {
|
|
@@ -537,12 +658,15 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
537
658
|
};
|
|
538
659
|
} | undefined;
|
|
539
660
|
threadParticipants?: string[] | undefined;
|
|
661
|
+
rootAuthorId?: string | undefined;
|
|
540
662
|
title?: string | undefined;
|
|
541
663
|
embed?: {
|
|
542
664
|
$type: "dev.antiphony.embed.audio";
|
|
543
665
|
audio: {
|
|
544
666
|
$type: "blob";
|
|
545
|
-
ref:
|
|
667
|
+
ref: {
|
|
668
|
+
$link: string;
|
|
669
|
+
};
|
|
546
670
|
mimeType: string;
|
|
547
671
|
size: number;
|
|
548
672
|
};
|
|
@@ -552,6 +676,7 @@ declare const AudioPostRecordSchema: z.ZodEffects<z.ZodObject<{
|
|
|
552
676
|
} | undefined;
|
|
553
677
|
langs?: string[] | undefined;
|
|
554
678
|
selfLabels?: string[] | undefined;
|
|
679
|
+
createdAt?: unknown;
|
|
555
680
|
}>;
|
|
556
681
|
type AudioPostRecord = z.infer<typeof AudioPostRecordSchema>;
|
|
557
682
|
/**
|
|
@@ -616,8 +741,6 @@ declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
|
616
741
|
model: z.ZodOptional<z.ZodString>;
|
|
617
742
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
618
743
|
}, "strip", z.ZodTypeAny, {
|
|
619
|
-
id: string;
|
|
620
|
-
createdAt: Date;
|
|
621
744
|
transcript: {
|
|
622
745
|
segments: {
|
|
623
746
|
startMs: number;
|
|
@@ -626,6 +749,8 @@ declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
|
626
749
|
}[];
|
|
627
750
|
text?: string | undefined;
|
|
628
751
|
};
|
|
752
|
+
id: string;
|
|
753
|
+
createdAt: Date;
|
|
629
754
|
subject: {
|
|
630
755
|
uri: string;
|
|
631
756
|
cid: string;
|
|
@@ -633,7 +758,6 @@ declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
|
633
758
|
lang?: string | undefined;
|
|
634
759
|
model?: string | undefined;
|
|
635
760
|
}, {
|
|
636
|
-
id: string;
|
|
637
761
|
transcript: {
|
|
638
762
|
segments: {
|
|
639
763
|
startMs: number;
|
|
@@ -642,6 +766,7 @@ declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
|
642
766
|
}[];
|
|
643
767
|
text?: string | undefined;
|
|
644
768
|
};
|
|
769
|
+
id: string;
|
|
645
770
|
subject: {
|
|
646
771
|
uri: string;
|
|
647
772
|
cid: string;
|
|
@@ -652,7 +777,13 @@ declare const TranscriptEnrichmentRecordSchema: z.ZodObject<{
|
|
|
652
777
|
}>;
|
|
653
778
|
type TranscriptEnrichmentRecord = z.infer<typeof TranscriptEnrichmentRecordSchema>;
|
|
654
779
|
/**
|
|
655
|
-
* `dev.antiphony.actor.profile` —
|
|
780
|
+
* `dev.antiphony.actor.profile` — portable actor-profile record shape.
|
|
781
|
+
*
|
|
782
|
+
* Lexicon-only: the core never stores, serves, or CRUDs this record — the
|
|
783
|
+
* caller BFF is the sole authority for profile data. The schema stays in
|
|
784
|
+
* `@antiphony/shared` so a federating/exporting deployment has a well-known
|
|
785
|
+
* shape to project a BFF-owned profile into (see specs/core-bff-boundary.md,
|
|
786
|
+
* "actor.profile lexicon", resolved 2026-07-03).
|
|
656
787
|
*/
|
|
657
788
|
declare const ActorProfileRecordSchema: z.ZodObject<{
|
|
658
789
|
handle: z.ZodOptional<z.ZodString>;
|
|
@@ -745,8 +876,8 @@ declare const PostRecordPublicSchema: z.ZodObject<{
|
|
|
745
876
|
selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
746
877
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
747
878
|
}, "strip", z.ZodTypeAny, {
|
|
748
|
-
createdAt: Date;
|
|
749
879
|
text: string;
|
|
880
|
+
createdAt: Date;
|
|
750
881
|
reply?: {
|
|
751
882
|
root: {
|
|
752
883
|
uri: string;
|
|
@@ -762,7 +893,6 @@ declare const PostRecordPublicSchema: z.ZodObject<{
|
|
|
762
893
|
selfLabels?: string[] | undefined;
|
|
763
894
|
}, {
|
|
764
895
|
text: string;
|
|
765
|
-
createdAt?: unknown;
|
|
766
896
|
reply?: {
|
|
767
897
|
root: {
|
|
768
898
|
uri: string;
|
|
@@ -776,110 +906,32 @@ declare const PostRecordPublicSchema: z.ZodObject<{
|
|
|
776
906
|
title?: string | undefined;
|
|
777
907
|
langs?: string[] | undefined;
|
|
778
908
|
selfLabels?: string[] | undefined;
|
|
909
|
+
createdAt?: unknown;
|
|
779
910
|
}>;
|
|
780
911
|
type PostRecordPublic = z.infer<typeof PostRecordPublicSchema>;
|
|
781
912
|
/**
|
|
782
913
|
* `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.
|
|
914
|
+
* analogue): record content + opaque author references + hydrated embed +
|
|
915
|
+
* per-viewer state. Produced by the (batched) hydrator; the default/public
|
|
916
|
+
* view, with owner-extra arriving via `viewer` + separate authed endpoints,
|
|
917
|
+
* not fat records.
|
|
918
|
+
*
|
|
919
|
+
* Author identity is carried as **opaque references**, never a hydrated
|
|
920
|
+
* profile: `authorId` is the app's own user id (attribution facet) and
|
|
921
|
+
* `authorDid` is present only when the caller asserted one. Antiphony holds no
|
|
922
|
+
* user data — the caller BFF hydrates display identity by joining on
|
|
923
|
+
* `authorId` (see specs/core-surface.md, "The author model").
|
|
787
924
|
*/
|
|
788
925
|
declare const AudioPostViewSchema: z.ZodObject<{
|
|
789
926
|
/** at:// URI (or internal ref) identifying the post. */
|
|
790
927
|
uri: z.ZodString;
|
|
791
|
-
|
|
928
|
+
/** Content CID of the canonical record (see `AudioPostRecordSchema.cid`). */
|
|
929
|
+
cid: z.ZodString;
|
|
792
930
|
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
|
-
}>;
|
|
931
|
+
/** The acting actor's app-scoped id — an opaque attribution ref, not a profile. */
|
|
932
|
+
authorId: z.ZodString;
|
|
933
|
+
/** The author's app-asserted AT Protocol DID, when the caller provided one. */
|
|
934
|
+
authorDid: z.ZodOptional<z.ZodString>;
|
|
883
935
|
record: z.ZodObject<{
|
|
884
936
|
text: z.ZodString;
|
|
885
937
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -927,8 +979,8 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
927
979
|
selfLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
928
980
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
929
981
|
}, "strip", z.ZodTypeAny, {
|
|
930
|
-
createdAt: Date;
|
|
931
982
|
text: string;
|
|
983
|
+
createdAt: Date;
|
|
932
984
|
reply?: {
|
|
933
985
|
root: {
|
|
934
986
|
uri: string;
|
|
@@ -944,7 +996,6 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
944
996
|
selfLabels?: string[] | undefined;
|
|
945
997
|
}, {
|
|
946
998
|
text: string;
|
|
947
|
-
createdAt?: unknown;
|
|
948
999
|
reply?: {
|
|
949
1000
|
root: {
|
|
950
1001
|
uri: string;
|
|
@@ -958,6 +1009,7 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
958
1009
|
title?: string | undefined;
|
|
959
1010
|
langs?: string[] | undefined;
|
|
960
1011
|
selfLabels?: string[] | undefined;
|
|
1012
|
+
createdAt?: unknown;
|
|
961
1013
|
}>;
|
|
962
1014
|
/** Hydrated audio embed (signed URL + lifted transcript). */
|
|
963
1015
|
embed: z.ZodOptional<z.ZodObject<{
|
|
@@ -1005,6 +1057,23 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1005
1057
|
}[];
|
|
1006
1058
|
text?: string | undefined;
|
|
1007
1059
|
}>>;
|
|
1060
|
+
/**
|
|
1061
|
+
* Per-stage audio-processing status (transcribe / denoise), when the app
|
|
1062
|
+
* opted into processing on create. Absent otherwise. A `pending` stage
|
|
1063
|
+
* means the client should poll (or re-render) for the result. When
|
|
1064
|
+
* `denoise === 'ready'`, `url` above already resolves to the cleaned
|
|
1065
|
+
* audio variant. See `types/processing.ts`.
|
|
1066
|
+
*/
|
|
1067
|
+
processing: z.ZodOptional<z.ZodObject<{
|
|
1068
|
+
transcribe: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
1069
|
+
denoise: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
|
|
1070
|
+
}, "strip", z.ZodTypeAny, {
|
|
1071
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1072
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1073
|
+
}, {
|
|
1074
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1075
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1076
|
+
}>>;
|
|
1008
1077
|
}, "strip", z.ZodTypeAny, {
|
|
1009
1078
|
$type: "dev.antiphony.embed.audio#view";
|
|
1010
1079
|
url: string;
|
|
@@ -1019,6 +1088,10 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1019
1088
|
}[];
|
|
1020
1089
|
text?: string | undefined;
|
|
1021
1090
|
} | undefined;
|
|
1091
|
+
processing?: {
|
|
1092
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1093
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1094
|
+
} | undefined;
|
|
1022
1095
|
}, {
|
|
1023
1096
|
$type: "dev.antiphony.embed.audio#view";
|
|
1024
1097
|
url: string;
|
|
@@ -1033,6 +1106,10 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1033
1106
|
}[];
|
|
1034
1107
|
text?: string | undefined;
|
|
1035
1108
|
} | undefined;
|
|
1109
|
+
processing?: {
|
|
1110
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1111
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1112
|
+
} | undefined;
|
|
1036
1113
|
}>>;
|
|
1037
1114
|
viewer: z.ZodObject<{
|
|
1038
1115
|
/** True when the authenticated caller authored this post. */
|
|
@@ -1056,34 +1133,12 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1056
1133
|
}>;
|
|
1057
1134
|
}, "strip", z.ZodTypeAny, {
|
|
1058
1135
|
uri: string;
|
|
1136
|
+
cid: string;
|
|
1137
|
+
authorId: string;
|
|
1059
1138
|
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
1139
|
record: {
|
|
1085
|
-
createdAt: Date;
|
|
1086
1140
|
text: string;
|
|
1141
|
+
createdAt: Date;
|
|
1087
1142
|
reply?: {
|
|
1088
1143
|
root: {
|
|
1089
1144
|
uri: string;
|
|
@@ -1103,7 +1158,7 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1103
1158
|
canReply: boolean;
|
|
1104
1159
|
replyDisabledReason?: "unauthenticated" | "not_a_participant" | undefined;
|
|
1105
1160
|
};
|
|
1106
|
-
|
|
1161
|
+
authorDid?: string | undefined;
|
|
1107
1162
|
embed?: {
|
|
1108
1163
|
$type: "dev.antiphony.embed.audio#view";
|
|
1109
1164
|
url: string;
|
|
@@ -1118,37 +1173,18 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1118
1173
|
}[];
|
|
1119
1174
|
text?: string | undefined;
|
|
1120
1175
|
} | undefined;
|
|
1176
|
+
processing?: {
|
|
1177
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1178
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1179
|
+
} | undefined;
|
|
1121
1180
|
} | undefined;
|
|
1122
1181
|
}, {
|
|
1123
1182
|
uri: string;
|
|
1183
|
+
cid: string;
|
|
1184
|
+
authorId: string;
|
|
1124
1185
|
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
1186
|
record: {
|
|
1150
1187
|
text: string;
|
|
1151
|
-
createdAt?: unknown;
|
|
1152
1188
|
reply?: {
|
|
1153
1189
|
root: {
|
|
1154
1190
|
uri: string;
|
|
@@ -1162,13 +1198,14 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1162
1198
|
title?: string | undefined;
|
|
1163
1199
|
langs?: string[] | undefined;
|
|
1164
1200
|
selfLabels?: string[] | undefined;
|
|
1201
|
+
createdAt?: unknown;
|
|
1165
1202
|
};
|
|
1166
1203
|
viewer: {
|
|
1167
1204
|
isAuthor?: boolean | undefined;
|
|
1168
1205
|
canReply?: boolean | undefined;
|
|
1169
1206
|
replyDisabledReason?: "unauthenticated" | "not_a_participant" | undefined;
|
|
1170
1207
|
};
|
|
1171
|
-
|
|
1208
|
+
authorDid?: string | undefined;
|
|
1172
1209
|
embed?: {
|
|
1173
1210
|
$type: "dev.antiphony.embed.audio#view";
|
|
1174
1211
|
url: string;
|
|
@@ -1183,6 +1220,10 @@ declare const AudioPostViewSchema: z.ZodObject<{
|
|
|
1183
1220
|
}[];
|
|
1184
1221
|
text?: string | undefined;
|
|
1185
1222
|
} | undefined;
|
|
1223
|
+
processing?: {
|
|
1224
|
+
transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1225
|
+
denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
|
|
1226
|
+
} | undefined;
|
|
1186
1227
|
} | undefined;
|
|
1187
1228
|
}>;
|
|
1188
1229
|
type AudioPostView = z.infer<typeof AudioPostViewSchema>;
|