@antiphony/shared 0.1.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.
Files changed (59) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/api-codecs.cjs +90 -787
  3. package/dist/cjs/api-codecs.d.cts +117 -290
  4. package/dist/cjs/index.cjs +102 -947
  5. package/dist/cjs/index.d.cts +89 -7
  6. package/dist/cjs/nsid.cjs +8 -18
  7. package/dist/cjs/nsid.d.cts +8 -17
  8. package/dist/cjs/types/audio.cjs +77 -662
  9. package/dist/cjs/types/audio.d.cts +285 -203
  10. package/dist/cjs/types/blob.cjs +5 -9
  11. package/dist/cjs/types/blob.d.cts +21 -21
  12. package/dist/cjs/types/records.cjs +0 -370
  13. package/dist/cjs/types/records.d.cts +1 -825
  14. package/dist/esm/api-codecs.d.ts +117 -290
  15. package/dist/esm/api-codecs.js +5 -6
  16. package/dist/esm/{chunk-ORMEWXMH.js → chunk-5JBD5THX.js} +1 -16
  17. package/dist/esm/{chunk-F2CANZZ7.js → chunk-BNNLHRH7.js} +1 -1
  18. package/dist/esm/chunk-D655OH2I.js +35 -0
  19. package/dist/esm/chunk-RUUHUNZ6.js +37 -0
  20. package/dist/esm/chunk-SBYNIQRZ.js +23 -0
  21. package/dist/esm/chunk-SMK4OZNU.js +17 -0
  22. package/dist/esm/{chunk-BUNMR4ZO.js → chunk-WL2GSPGC.js} +81 -12
  23. package/dist/esm/errors/index.js +1 -1
  24. package/dist/esm/index.d.ts +89 -7
  25. package/dist/esm/index.js +7 -9
  26. package/dist/esm/nsid.d.ts +8 -17
  27. package/dist/esm/nsid.js +2 -2
  28. package/dist/esm/observability/index.js +2 -2
  29. package/dist/esm/observability/report-error.js +2 -2
  30. package/dist/esm/types/audio.d.ts +285 -203
  31. package/dist/esm/types/audio.js +4 -5
  32. package/dist/esm/types/blob.d.ts +21 -21
  33. package/dist/esm/types/blob.js +2 -2
  34. package/dist/esm/types/records.d.ts +1 -825
  35. package/dist/esm/types/records.js +2 -3
  36. package/dist/esm/utils/index.js +1 -1
  37. package/package.json +90 -26
  38. package/dist/cjs/types/api.cjs +0 -726
  39. package/dist/cjs/types/api.d.cts +0 -494
  40. package/dist/cjs/types/channels.cjs +0 -170
  41. package/dist/cjs/types/channels.d.cts +0 -262
  42. package/dist/cjs/types/storage.cjs +0 -414
  43. package/dist/cjs/types/storage.d.cts +0 -197
  44. package/dist/cjs/types/views.cjs +0 -820
  45. package/dist/cjs/types/views.d.cts +0 -9806
  46. package/dist/esm/chunk-3WZJXJNU.js +0 -378
  47. package/dist/esm/chunk-5EHV73BA.js +0 -20
  48. package/dist/esm/chunk-7V44CPRR.js +0 -132
  49. package/dist/esm/chunk-EA4OONDV.js +0 -380
  50. package/dist/esm/chunk-TIZRJORN.js +0 -24
  51. package/dist/esm/chunk-XDBKR6LW.js +0 -32
  52. package/dist/esm/types/api.d.ts +0 -494
  53. package/dist/esm/types/api.js +0 -5
  54. package/dist/esm/types/channels.d.ts +0 -262
  55. package/dist/esm/types/channels.js +0 -162
  56. package/dist/esm/types/storage.d.ts +0 -197
  57. package/dist/esm/types/storage.js +0 -26
  58. package/dist/esm/types/views.d.ts +0 -9806
  59. package/dist/esm/types/views.js +0 -4
@@ -0,0 +1,23 @@
1
+ // nsid.ts
2
+ var NSID = {
3
+ // Antiphony canonical record types (dev.antiphony.*).
4
+ // See lexicons/dev/antiphony/ + packages/shared/types/audio.ts.
5
+ AudioPost: "dev.antiphony.audio.post",
6
+ AudioTranscript: "dev.antiphony.audio.transcript",
7
+ // Portable lexicon only — the core never stores actor profiles; the
8
+ // caller BFF is the sole authority for profile data (see
9
+ // specs/core-bff-boundary.md, "actor.profile lexicon"). Hence no
10
+ // COLLECTIONS entry below.
11
+ ActorProfile: "dev.antiphony.actor.profile"
12
+ };
13
+ var EMBED_NSID = {
14
+ Audio: "dev.antiphony.embed.audio",
15
+ RecordWithAudio: "dev.antiphony.embed.recordWithAudio"
16
+ };
17
+ var COLLECTIONS = {
18
+ // One post collection + the transcript enrichment namespace.
19
+ [NSID.AudioPost]: "posts",
20
+ [NSID.AudioTranscript]: "audio_transcripts"
21
+ };
22
+
23
+ export { COLLECTIONS, EMBED_NSID, NSID };
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+
3
+ // types/blob.ts
4
+ var BlobRefSchema = z.object({
5
+ /** Discriminator for AT Protocol type system */
6
+ $type: z.literal("blob"),
7
+ /** IPLD link to the blob bytes: the content CID. */
8
+ ref: z.object({
9
+ $link: z.string().min(1)
10
+ }),
11
+ /** MIME type of the blob (e.g., 'audio/webm') */
12
+ mimeType: z.string(),
13
+ /** Size of the blob in bytes */
14
+ size: z.number().int().min(0)
15
+ });
16
+
17
+ export { BlobRefSchema };
@@ -1,8 +1,25 @@
1
- import { ProfileViewBasicSchema } from './chunk-EA4OONDV.js';
2
- import { FirestoreTimestampSchema } from './chunk-3WZJXJNU.js';
3
- import { BlobRefSchema } from './chunk-5EHV73BA.js';
1
+ import { FirestoreTimestampSchema } from './chunk-D655OH2I.js';
2
+ import { BlobRefSchema } from './chunk-SMK4OZNU.js';
4
3
  import { z } from 'zod';
5
4
 
5
+ var ProcessingStageStatusSchema = z.enum(["pending", "ready", "failed", "skipped"]);
6
+ var ProcessingRequestSchema = z.object({
7
+ transcribe: z.boolean().optional(),
8
+ denoise: z.boolean().optional()
9
+ });
10
+ var ProcessingStateSchema = z.object({
11
+ transcribe: ProcessingStageStatusSchema.optional(),
12
+ denoise: ProcessingStageStatusSchema.optional(),
13
+ /** Content CID of the denoised audio variant, once `denoise === 'ready'`. */
14
+ denoisedBlobCid: z.string().optional(),
15
+ updatedAt: FirestoreTimestampSchema
16
+ });
17
+ var ProcessingViewSchema = z.object({
18
+ transcribe: ProcessingStageStatusSchema.optional(),
19
+ denoise: ProcessingStageStatusSchema.optional()
20
+ });
21
+
22
+ // types/audio.ts
6
23
  var StrongRefSchema = z.object({
7
24
  uri: z.string().regex(/^at:\/\/.+/, "Must be an at:// URI"),
8
25
  cid: z.string()
@@ -13,7 +30,7 @@ var ReplyRefSchema = z.object({
13
30
  });
14
31
  var AudioEmbedSchema = z.object({
15
32
  $type: z.literal("dev.antiphony.embed.audio"),
16
- /** The audio bytes as a content-addressed storage ref (CID/path). */
33
+ /** The audio bytes as a content-addressed blob ref (`ref.$link` = CID). */
17
34
  audio: BlobRefSchema,
18
35
  /** Duration in MILLISECONDS (platform-wide unit; not seconds). */
19
36
  durationMs: z.number().int().min(0).optional(),
@@ -43,11 +60,26 @@ var AudioEmbedViewSchema = z.object({
43
60
  alt: z.string().max(1e4).optional(),
44
61
  waveform: z.array(z.number().int().min(0).max(100)).max(1e3).optional(),
45
62
  /** Lifted from the transcript enrichment record; absent until transcription completes. */
46
- transcript: TimedTranscriptSchema.optional()
63
+ transcript: TimedTranscriptSchema.optional(),
64
+ /**
65
+ * Per-stage audio-processing status (transcribe / denoise), when the app
66
+ * opted into processing on create. Absent otherwise. A `pending` stage
67
+ * means the client should poll (or re-render) for the result. When
68
+ * `denoise === 'ready'`, `url` above already resolves to the cleaned
69
+ * audio variant. See `types/processing.ts`.
70
+ */
71
+ processing: ProcessingViewSchema.optional()
47
72
  });
48
73
  var AudioPostRecordSchema = z.object({
49
74
  /** Storage id (rkey/doc id). */
50
75
  id: z.string(),
76
+ /**
77
+ * Content CID of the canonical lexicon record (CIDv1, dag-cbor, sha2-256
78
+ * — the AT Protocol record-CID rule). Computed at write time over the
79
+ * lexicon projection (public fields only, NOT the storage/tenancy fields
80
+ * below), so StrongRefs built from it are verifiable content addresses.
81
+ */
82
+ cid: z.string(),
51
83
  // --- Tenancy + facets (storage-indexed; NOT in the lexicon) ---
52
84
  /** Origin app that created this record — the multi-tenant isolation key. */
53
85
  originAppId: z.string(),
@@ -59,6 +91,30 @@ var AudioPostRecordSchema = z.object({
59
91
  orgId: z.string().nullable().optional(),
60
92
  /** Denormalized from `reply` presence: `reply` set ⇒ 'reply', else 'prompt'. */
61
93
  kind: z.enum(["prompt", "reply"]),
94
+ /**
95
+ * Branch participant pair (author ids) for reply gating — the parties to a
96
+ * reply's sub-thread: the creator (thread-root author) + the responder who
97
+ * opened the branch. Set on replies (deduped, 1–2 ids); absent on prompts
98
+ * (a prompt's repliers are the app's audience policy, not a fixed pair).
99
+ * Inherited down the branch so reply gating is an O(1) field check, never a
100
+ * thread walk.
101
+ */
102
+ threadParticipants: z.array(z.string()).optional(),
103
+ /**
104
+ * Author of this reply's thread ROOT (the prompt) — the reply's recipient,
105
+ * the person whose "replies to me" feed it lands in. Denormalized at write
106
+ * time so "replies whose root author is X" is a cheap composite-index query
107
+ * (see `queryByRootAuthor`). Set on replies (`kind === 'reply'`); absent on
108
+ * prompts. Storage-layer facet, NOT in the public lexicon or the record CID.
109
+ */
110
+ rootAuthorId: z.string().optional(),
111
+ /**
112
+ * Async audio-processing state (transcribe / denoise), present iff the app
113
+ * opted into processing on create. Mutated by the processing worker after
114
+ * the post is created — storage-layer, NOT in the lexicon or the record
115
+ * CID. See `types/processing.ts`.
116
+ */
117
+ processing: ProcessingStateSchema.optional(),
62
118
  // --- Lexicon fields (public contract) ---
63
119
  /** User-authored text (bsky-semantic). May be empty for pure-audio posts. NEVER the transcript. */
64
120
  text: z.string().max(3e3),
@@ -77,10 +133,11 @@ var AudioPostRecordSchema = z.object({
77
133
  }).refine(
78
134
  // `kind` is denormalized from `reply` presence at write time; enforce the
79
135
  // invariant so an inconsistent record can't be written or read silently.
80
- // A reply has `reply` and no `title`; a prompt has neither a `reply`.
81
- (r) => r.kind === "reply" ? !!r.reply && r.title === void 0 : !r.reply,
136
+ // A reply has `reply`, no `title`, and a stamped `rootAuthorId` (its
137
+ // recipient facet); a prompt has none of those.
138
+ (r) => r.kind === "reply" ? !!r.reply && r.title === void 0 && r.rootAuthorId !== void 0 : !r.reply && r.rootAuthorId === void 0,
82
139
  {
83
- message: "kind must match reply presence: 'reply' \u21D2 reply set & no title; 'prompt' \u21D2 no reply",
140
+ message: "kind must match reply presence: 'reply' \u21D2 reply set, no title, rootAuthorId set; 'prompt' \u21D2 no reply, no rootAuthorId",
84
141
  path: ["kind"]
85
142
  }
86
143
  );
@@ -102,7 +159,15 @@ var ActorProfileRecordSchema = z.object({
102
159
  });
103
160
  var ViewerStateSchema = z.object({
104
161
  /** True when the authenticated caller authored this post. */
105
- isAuthor: z.boolean().default(false)
162
+ isAuthor: z.boolean().default(false),
163
+ /**
164
+ * Whether the caller may reply to this post (reply gating, §6). A prompt is
165
+ * repliable by any authenticated viewer (the app's audience-policy default);
166
+ * a reply only by its branch participants (`{ creator, branch responder }`).
167
+ */
168
+ canReply: z.boolean().default(false),
169
+ /** Why `canReply` is false, when it is (omitted when the caller can reply). */
170
+ replyDisabledReason: z.enum(["unauthenticated", "not_a_participant"]).optional()
106
171
  });
107
172
  var PostRecordPublicSchema = z.object({
108
173
  text: z.string(),
@@ -115,13 +180,17 @@ var PostRecordPublicSchema = z.object({
115
180
  var AudioPostViewSchema = z.object({
116
181
  /** at:// URI (or internal ref) identifying the post. */
117
182
  uri: z.string(),
118
- cid: z.string().optional(),
183
+ /** Content CID of the canonical record (see `AudioPostRecordSchema.cid`). */
184
+ cid: z.string(),
119
185
  kind: z.enum(["prompt", "reply"]),
120
- author: ProfileViewBasicSchema,
186
+ /** The acting actor's app-scoped id — an opaque attribution ref, not a profile. */
187
+ authorId: z.string(),
188
+ /** The author's app-asserted AT Protocol DID, when the caller provided one. */
189
+ authorDid: z.string().optional(),
121
190
  record: PostRecordPublicSchema,
122
191
  /** Hydrated audio embed (signed URL + lifted transcript). */
123
192
  embed: AudioEmbedViewSchema.optional(),
124
193
  viewer: ViewerStateSchema
125
194
  });
126
195
 
127
- export { ActorProfileRecordSchema, AudioEmbedSchema, AudioEmbedViewSchema, AudioPostRecordSchema, AudioPostViewSchema, PostRecordPublicSchema, ReplyRefSchema, StrongRefSchema, TimedTranscriptSchema, TranscriptEnrichmentRecordSchema, TranscriptSegmentSchema, ViewerStateSchema };
196
+ export { ActorProfileRecordSchema, AudioEmbedSchema, AudioEmbedViewSchema, AudioPostRecordSchema, AudioPostViewSchema, PostRecordPublicSchema, ProcessingRequestSchema, ProcessingStageStatusSchema, ProcessingStateSchema, ProcessingViewSchema, ReplyRefSchema, StrongRefSchema, TimedTranscriptSchema, TranscriptEnrichmentRecordSchema, TranscriptSegmentSchema, ViewerStateSchema };
@@ -1,2 +1,2 @@
1
1
  export { ConflictError, ForbiddenError, NotFoundError, RateLimitError, ServiceError, UnauthorizedError, ValidationError } from '../chunk-7LW2FHLD.js';
2
- import '../chunk-ORMEWXMH.js';
2
+ import '../chunk-5JBD5THX.js';
@@ -1,11 +1,93 @@
1
- export { BadgeResetRequestSchema, BulkReplyActionRequestSchema, ConnectorConfigInputSchema, ConnectorConfigUpdateSchema, CreateAudioPostRequest, CreateAudioPostRequestSchema, CreateOrgInviteRequestSchema, CreateOrgRequestSchema, CreatePromptRequestSchema, FcmTokenRequestSchema, PersonMergeRequestSchema, PersonNotesUpdateSchema, ScreeningRuleInputSchema, ScreeningRuleUpdateSchema, SwitchOrgRequestSchema, UpdateMemberRoleRequestSchema, UpdateOrgRequestSchema, UpdateProfileRequestSchema, UpdateReplyStatusRequestSchema } from './api-codecs.js';
2
- export { CallForwardingConfig, CallForwardingConfigSchema, ConnectorConfigRecord, ConnectorConfigRecordSchema, ConnectorStatus, ConnectorStatusSchema, ConnectorType, ConnectorTypeSchema, FirestoreTimestamp, FirestoreTimestampSchema, OrgInviteRecord, OrgInviteRecordSchema, OrganizationMemberRecord, OrganizationMemberRecordSchema, OrganizationRecord, OrganizationRecordSchema, PersonEnrichmentRecord, PersonEnrichmentRecordSchema, PromptRecord, PromptRecordSchema, ReplyEnrichmentRecord, ReplyEnrichmentRecordSchema, ReplyRecord, ReplyRecordSchema, ScreeningRuleRecord, ScreeningRuleRecordSchema, SipEnrichment, SipEnrichmentSchema, UserRecord, UserRecordSchema, httpsUrl } from './types/records.js';
3
- export { ContactCrmData, EnrichedReplier, EnrichedReplierSchema, HandleResolution, HandleResolutionSchema, OrgInviteView, OrgInviteViewSchema, OrgProfileData, OrgProfileDataSchema, OrganizationMemberView, OrganizationMemberViewSchema, OrganizationView, OrganizationViewSchema, ProfileView, ProfileViewAdmin, ProfileViewAdminSchema, ProfileViewBasic, ProfileViewBasicSchema, ProfileViewDetailed, ProfileViewDetailedSchema, ProfileViewSchema, ProfileViewSelf, ProfileViewSelfSchema, PromptRepliers, PromptRepliersSchema, PromptView, PromptViewPublic, PromptViewPublicSchema, PromptViewSchema, PromptWithReplies, PromptWithRepliesSchema, Replier, ReplierSchema, ReplyView, ReplyViewPublic, ReplyViewPublicSchema, ReplyViewSchema, RssSummary, RssSummarySchema, UserProfileData, UserProfileDataSchema, VoxPopEmbedWidgetProps, toProfileViewBasic, toPromptViewPublic, toReplyViewPublic } from './types/views.js';
1
+ export { CreateAudioPostRequest, CreateAudioPostRequestSchema, PatchAudioPostRequest, PatchAudioPostRequestSchema } from './api-codecs.js';
2
+ export { FirestoreTimestamp, FirestoreTimestampSchema } from './types/records.js';
4
3
  export { ActorProfileRecord, ActorProfileRecordSchema, AudioEmbed, AudioEmbedSchema, AudioEmbedView, AudioEmbedViewSchema, AudioPostRecord, AudioPostRecordSchema, AudioPostView, AudioPostViewSchema, PostRecordPublic, PostRecordPublicSchema, ReplyRef, ReplyRefSchema, StrongRef, StrongRefSchema, TimedTranscript, TimedTranscriptSchema, TranscriptEnrichmentRecord, TranscriptEnrichmentRecordSchema, TranscriptSegment, TranscriptSegmentSchema, ViewerState, ViewerStateSchema } from './types/audio.js';
5
- export { BlobRef, BlobRefSchema, resolveAudioUrl } from './types/blob.js';
6
- export { ActorView, ActorViewSchema, PublicProfileDto, PublicProfileDtoSchema, PublicReplyDto, PublicReplyDtoSchema } from './types/api.js';
7
- export { COLLECTIONS, EMBED_NSID, NSID, NsidValue, nsidForCollection } from './nsid.js';
4
+ import { z } from 'zod';
5
+ export { BlobRef, BlobRefSchema } from './types/blob.js';
6
+ export { COLLECTIONS, EMBED_NSID, NSID, NsidValue, StoredNsidValue } from './nsid.js';
8
7
  export { ConflictError, ForbiddenError, NotFoundError, RateLimitError, ServiceError, UnauthorizedError, ValidationError } from './errors/index.js';
9
8
  export { isFirestoreTimestamp } from './utils/index.js';
10
9
  export { ReportedErrorEvent, buildReportedErrorEvent, reportError } from './observability/report-error.js';
11
- import 'zod';
10
+
11
+ /**
12
+ * Audio hygiene / enrichment processing (B5).
13
+ *
14
+ * Antiphony can, when the calling app opts in, run two pieces of audio
15
+ * processing on a post's audio: **transcription** (machine transcript, the
16
+ * `dev.antiphony.audio.transcript` enrichment) and **denoise** (a cleaned
17
+ * audio variant for playback). Both are OFF by default — the app asks for
18
+ * them per post via `CreateAudioPostRequest.processing`.
19
+ *
20
+ * The work runs asynchronously (outside the create request), so a post
21
+ * carries a mutable `processing` state that starts `pending` and settles to
22
+ * `ready`/`failed`/`skipped` per stage. That state is a storage-layer field —
23
+ * it is NOT part of the canonical lexicon record and never enters the record
24
+ * CID (like `kind` and `threadParticipants`), so processing can update it
25
+ * without changing the post's content address.
26
+ */
27
+ /**
28
+ * Per-stage status.
29
+ * - `pending` — requested, not yet done (the worker acts on these).
30
+ * - `ready` — completed.
31
+ * - `failed` — attempted and errored.
32
+ * - `skipped` — requested but this deployment has no provider for it.
33
+ */
34
+ declare const ProcessingStageStatusSchema: z.ZodEnum<["pending", "ready", "failed", "skipped"]>;
35
+ type ProcessingStageStatus = z.infer<typeof ProcessingStageStatusSchema>;
36
+ /**
37
+ * What the calling app opts into, on `CreateAudioPostRequest`. Both default
38
+ * off; only `true` values request a stage.
39
+ */
40
+ declare const ProcessingRequestSchema: z.ZodObject<{
41
+ transcribe: z.ZodOptional<z.ZodBoolean>;
42
+ denoise: z.ZodOptional<z.ZodBoolean>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ transcribe?: boolean | undefined;
45
+ denoise?: boolean | undefined;
46
+ }, {
47
+ transcribe?: boolean | undefined;
48
+ denoise?: boolean | undefined;
49
+ }>;
50
+ type ProcessingRequest = z.infer<typeof ProcessingRequestSchema>;
51
+ /**
52
+ * Stored processing state on the post record (storage-layer; not in the CID).
53
+ * A stage key is present iff that stage was requested. `denoisedBlobCid`
54
+ * points at the cleaned audio variant once denoise completes — the record's
55
+ * own `embed.audio.ref.$link` stays the ORIGINAL CID (immutable content
56
+ * address); only the read-time view swaps playback to the cleaned variant.
57
+ */
58
+ declare const ProcessingStateSchema: z.ZodObject<{
59
+ transcribe: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
60
+ denoise: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
61
+ /** Content CID of the denoised audio variant, once `denoise === 'ready'`. */
62
+ denoisedBlobCid: z.ZodOptional<z.ZodString>;
63
+ updatedAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ updatedAt: Date;
66
+ transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
67
+ denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
68
+ denoisedBlobCid?: string | undefined;
69
+ }, {
70
+ transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
71
+ denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
72
+ denoisedBlobCid?: string | undefined;
73
+ updatedAt?: unknown;
74
+ }>;
75
+ type ProcessingState = z.infer<typeof ProcessingStateSchema>;
76
+ /**
77
+ * The processing status surfaced on the hydrated view — the per-stage status
78
+ * only (no internal storage fields). Absent when no processing was requested.
79
+ * Clients treat any `pending` stage as "still working".
80
+ */
81
+ declare const ProcessingViewSchema: z.ZodObject<{
82
+ transcribe: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
83
+ denoise: z.ZodOptional<z.ZodEnum<["pending", "ready", "failed", "skipped"]>>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
86
+ denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
87
+ }, {
88
+ transcribe?: "pending" | "ready" | "failed" | "skipped" | undefined;
89
+ denoise?: "pending" | "ready" | "failed" | "skipped" | undefined;
90
+ }>;
91
+ type ProcessingView = z.infer<typeof ProcessingViewSchema>;
92
+
93
+ export { type ProcessingRequest, ProcessingRequestSchema, type ProcessingStageStatus, ProcessingStageStatusSchema, type ProcessingState, ProcessingStateSchema, type ProcessingView, ProcessingViewSchema };
package/dist/esm/index.js CHANGED
@@ -1,12 +1,10 @@
1
1
  export { isFirestoreTimestamp } from './chunk-24KIXQZK.js';
2
- export { BadgeResetRequestSchema, BulkReplyActionRequestSchema, ConnectorConfigInputSchema, ConnectorConfigUpdateSchema, CreateAudioPostRequestSchema, CreateOrgInviteRequestSchema, CreateOrgRequestSchema, CreatePromptRequestSchema, FcmTokenRequestSchema, PersonMergeRequestSchema, PersonNotesUpdateSchema, ScreeningRuleInputSchema, ScreeningRuleUpdateSchema, SwitchOrgRequestSchema, UpdateMemberRoleRequestSchema, UpdateOrgRequestSchema, UpdateProfileRequestSchema, UpdateReplyStatusRequestSchema } from './chunk-7V44CPRR.js';
3
- export { COLLECTIONS, EMBED_NSID, NSID, nsidForCollection } from './chunk-XDBKR6LW.js';
2
+ export { CreateAudioPostRequestSchema, PatchAudioPostRequestSchema } from './chunk-RUUHUNZ6.js';
3
+ export { COLLECTIONS, EMBED_NSID, NSID } from './chunk-SBYNIQRZ.js';
4
4
  export { ConflictError, ForbiddenError, NotFoundError, RateLimitError, ServiceError, UnauthorizedError, ValidationError } from './chunk-7LW2FHLD.js';
5
5
  import './chunk-72G3LBUQ.js';
6
- export { buildReportedErrorEvent, reportError } from './chunk-F2CANZZ7.js';
7
- export { ActorViewSchema, PublicProfileDtoSchema, PublicReplyDtoSchema } from './chunk-TIZRJORN.js';
8
- export { ActorProfileRecordSchema, AudioEmbedSchema, AudioEmbedViewSchema, AudioPostRecordSchema, AudioPostViewSchema, PostRecordPublicSchema, ReplyRefSchema, StrongRefSchema, TimedTranscriptSchema, TranscriptEnrichmentRecordSchema, TranscriptSegmentSchema, ViewerStateSchema } from './chunk-BUNMR4ZO.js';
9
- export { EnrichedReplierSchema, HandleResolutionSchema, OrgInviteViewSchema, OrgProfileDataSchema, OrganizationMemberViewSchema, OrganizationViewSchema, ProfileViewAdminSchema, ProfileViewBasicSchema, ProfileViewDetailedSchema, ProfileViewSchema, ProfileViewSelfSchema, PromptRepliersSchema, PromptViewPublicSchema, PromptViewSchema, PromptWithRepliesSchema, ReplierSchema, ReplyViewPublicSchema, ReplyViewSchema, RssSummarySchema, UserProfileDataSchema, toProfileViewBasic, toPromptViewPublic, toReplyViewPublic } from './chunk-EA4OONDV.js';
10
- export { CallForwardingConfigSchema, ConnectorConfigRecordSchema, ConnectorStatusSchema, ConnectorTypeSchema, FirestoreTimestampSchema, OrgInviteRecordSchema, OrganizationMemberRecordSchema, OrganizationRecordSchema, PersonEnrichmentRecordSchema, PromptRecordSchema, ReplyEnrichmentRecordSchema, ReplyRecordSchema, ScreeningRuleRecordSchema, SipEnrichmentSchema, UserRecordSchema, httpsUrl } from './chunk-3WZJXJNU.js';
11
- export { BlobRefSchema, resolveAudioUrl } from './chunk-5EHV73BA.js';
12
- import './chunk-ORMEWXMH.js';
6
+ export { buildReportedErrorEvent, reportError } from './chunk-BNNLHRH7.js';
7
+ export { ActorProfileRecordSchema, AudioEmbedSchema, AudioEmbedViewSchema, AudioPostRecordSchema, AudioPostViewSchema, PostRecordPublicSchema, ProcessingRequestSchema, ProcessingStageStatusSchema, ProcessingStateSchema, ProcessingViewSchema, ReplyRefSchema, StrongRefSchema, TimedTranscriptSchema, TranscriptEnrichmentRecordSchema, TranscriptSegmentSchema, ViewerStateSchema } from './chunk-WL2GSPGC.js';
8
+ export { FirestoreTimestampSchema } from './chunk-D655OH2I.js';
9
+ export { BlobRefSchema } from './chunk-SMK4OZNU.js';
10
+ import './chunk-5JBD5THX.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * AT Protocol Namespaced Identifiers (NSIDs) for Vox Pop record types.
2
+ * AT Protocol Namespaced Identifiers (NSIDs) for Antiphony record types.
3
3
  *
4
4
  * NSIDs are the canonical way to identify record types in AT Protocol.
5
5
  * This mapping connects AT Protocol NSIDs to Firestore collection names,
@@ -8,14 +8,13 @@
8
8
  * @see https://atproto.com/specs/nsid
9
9
  */
10
10
  declare const NSID: {
11
- readonly Prompt: "com.voxpop.audio.prompt";
12
- readonly Reply: "com.voxpop.audio.reply";
13
- readonly Profile: "com.voxpop.actor.profile";
14
11
  readonly AudioPost: "dev.antiphony.audio.post";
15
12
  readonly AudioTranscript: "dev.antiphony.audio.transcript";
16
13
  readonly ActorProfile: "dev.antiphony.actor.profile";
17
14
  };
18
15
  type NsidValue = typeof NSID[keyof typeof NSID];
16
+ /** The subset of record NSIDs the core actually stores. */
17
+ type StoredNsidValue = typeof NSID.AudioPost | typeof NSID.AudioTranscript;
19
18
  /**
20
19
  * Antiphony embed NSIDs. Embeds live inline on a post's `embed` field, not in
21
20
  * their own collection — kept out of `NSID`/`COLLECTIONS`.
@@ -25,18 +24,10 @@ declare const EMBED_NSID: {
25
24
  readonly RecordWithAudio: "dev.antiphony.embed.recordWithAudio";
26
25
  };
27
26
  /**
28
- * Maps AT Protocol record-type NSIDs to Firestore collection names.
29
- * When migrating to a PDS, this mapping becomes the adapter layer.
30
- *
31
- * Note: `dev.antiphony.actor.profile` and the legacy `com.voxpop.actor.profile`
32
- * both map to `users`. `nsidForCollection('users')` returns the legacy NSID
33
- * (listed first) — preserving today's reverse-lookup behavior until Stream 4
34
- * removes the legacy entry.
35
- */
36
- declare const COLLECTIONS: Record<NsidValue, string>;
37
- /**
38
- * Reverse lookup: get the NSID for a Firestore collection name.
27
+ * Maps the STORED AT Protocol record-type NSIDs to Firestore collection
28
+ * names. When migrating to a PDS, this mapping becomes the adapter layer.
29
+ * `actor.profile` is deliberately absent — portable schema, no core storage.
39
30
  */
40
- declare function nsidForCollection(collection: string): NsidValue | undefined;
31
+ declare const COLLECTIONS: Record<StoredNsidValue, string>;
41
32
 
42
- export { COLLECTIONS, EMBED_NSID, NSID, type NsidValue, nsidForCollection };
33
+ export { COLLECTIONS, EMBED_NSID, NSID, type NsidValue, type StoredNsidValue };
package/dist/esm/nsid.js CHANGED
@@ -1,2 +1,2 @@
1
- export { COLLECTIONS, EMBED_NSID, NSID, nsidForCollection } from './chunk-XDBKR6LW.js';
2
- import './chunk-ORMEWXMH.js';
1
+ export { COLLECTIONS, EMBED_NSID, NSID } from './chunk-SBYNIQRZ.js';
2
+ import './chunk-5JBD5THX.js';
@@ -1,3 +1,3 @@
1
1
  import '../chunk-72G3LBUQ.js';
2
- export { buildReportedErrorEvent, reportError } from '../chunk-F2CANZZ7.js';
3
- import '../chunk-ORMEWXMH.js';
2
+ export { buildReportedErrorEvent, reportError } from '../chunk-BNNLHRH7.js';
3
+ import '../chunk-5JBD5THX.js';
@@ -1,2 +1,2 @@
1
- export { buildReportedErrorEvent, reportError } from '../chunk-F2CANZZ7.js';
2
- import '../chunk-ORMEWXMH.js';
1
+ export { buildReportedErrorEvent, reportError } from '../chunk-BNNLHRH7.js';
2
+ import '../chunk-5JBD5THX.js';