@q9labsai/chalk-client 5.2.4 → 5.2.6

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 (35) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/access/grant.d.ts +2 -1
  3. package/dist/access/manager.d.ts +1 -0
  4. package/dist/{chunk-AZONR3Q3.js → chunk-CJVLTSIO.js} +120 -8
  5. package/dist/{chunk-LDPC2JZB.js → chunk-I7Y4HR2P.js} +711 -194
  6. package/dist/{chunk-SYUGRHZ5.js → chunk-WFRTUBN6.js} +1 -1
  7. package/dist/{chunk-3ASKGMD3.js → chunk-YIDKETOX.js} +410 -232
  8. package/dist/client.d.ts +74 -2
  9. package/dist/connection/dependencies.d.ts +4 -1
  10. package/dist/connection/diagnostics.d.ts +4 -0
  11. package/dist/connection/episode-status.d.ts +7 -0
  12. package/dist/connection/index.d.ts +2 -0
  13. package/dist/connection/lifecycle.d.ts +2 -0
  14. package/dist/connection/production.d.ts +1 -1
  15. package/dist/effect.js +19 -3
  16. package/dist/generated/http-api.d.ts +73 -2
  17. package/dist/generated/schemas.d.ts +126 -4
  18. package/dist/index.js +4 -4
  19. package/dist/media/client.d.ts +4 -3
  20. package/dist/media/failure-diagnostics.d.ts +10 -0
  21. package/dist/media/index.js +1 -1
  22. package/dist/media/plane.d.ts +7 -2
  23. package/dist/media/types.d.ts +4 -2
  24. package/dist/public-invites/index.js +2 -2
  25. package/dist/server/access-refresh.d.cts +1 -1
  26. package/dist/server/access-refresh.d.ts +1 -1
  27. package/dist/server/index.cjs +15 -5
  28. package/dist/server/index.js +15 -5
  29. package/dist/server/types.d.cts +2 -1
  30. package/dist/server/types.d.ts +2 -1
  31. package/dist/space-client/media-projection-monitor.d.ts +26 -0
  32. package/dist/space-client/promise-facade.d.ts +5 -5
  33. package/dist/space-client/types.d.ts +4 -0
  34. package/dist/transport-diagnostics.d.ts +1 -1
  35. package/package.json +1 -1
package/dist/client.d.ts CHANGED
@@ -23,6 +23,7 @@ export declare const createChalkEffectClient: (options: ChalkEffectClientOptions
23
23
  readonly tenant_id: import("effect/Schema").brand<import("effect/Schema").String, "TenantId">;
24
24
  }>>, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
25
25
  readonly allow_partial_remote_tracks: import("effect/Schema").optional<import("effect/Schema").Boolean>;
26
+ readonly replacement_cause: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["user_pause", "moderation_pause", "sync_recovery_loss", "discovery_absent", "capture_cleanup", "consent_revoked", "publish_failure", "enable_failure", "projection_mismatch", "forced_pause", "local_signaling_failure", "remote_signaling_failure", "dormant_connection", "access_refresh"]>>;
26
27
  }>>, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
27
28
  readonly connection_id: import("effect/Schema").String;
28
29
  readonly session_description: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Struct<{
@@ -1065,6 +1066,7 @@ export declare const createChalkEffectClient: (options: ChalkEffectClientOptions
1065
1066
  readonly tenant_id: import("effect/Schema").brand<import("effect/Schema").String, "TenantId">;
1066
1067
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
1067
1068
  readonly current_media_token: import("effect/Schema").optional<import("effect/Schema").String>;
1069
+ readonly expected_media_connection_id: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
1068
1070
  readonly participant_generation: import("effect/Schema").Number;
1069
1071
  readonly replace_media_connection: import("effect/Schema").Boolean;
1070
1072
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
@@ -1186,6 +1188,11 @@ export declare const createChalkEffectClient: (options: ChalkEffectClientOptions
1186
1188
  readonly code: import("effect/Schema").Literal<"participant.invalid_id">;
1187
1189
  readonly message: import("effect/Schema").String;
1188
1190
  }>;
1191
+ }>, never, never> | import("effect/Schema").decodeTo<typeof import("./effect").ParticipantMediaReplacementPendingError, import("effect/Schema").Struct<{
1192
+ readonly error: import("effect/Schema").Struct<{
1193
+ readonly code: import("effect/Schema").Literal<"participant.media_replacement_pending">;
1194
+ readonly message: import("effect/Schema").String;
1195
+ }>;
1189
1196
  }>, never, never> | import("effect/Schema").decodeTo<typeof import("./effect").ParticipantNotFoundError, import("effect/Schema").Struct<{
1190
1197
  readonly error: import("effect/Schema").Struct<{
1191
1198
  readonly code: import("effect/Schema").Literal<"participant.not_found">;
@@ -1770,15 +1777,22 @@ export declare const createChalkEffectClient: (options: ChalkEffectClientOptions
1770
1777
  readonly code: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["invalid_state", "invalid_access", "access_unavailable", "permission_denied", "device_not_found", "device_busy", "device_constraint_invalid", "media_capture_failed", "sync_start_failed", "state_digest_recovery_failed", "sync_hello_timeout", "media_start_failed", "join_cleanup_unconfirmed", "sync_recovery_exhausted", "media_recovery_exhausted", "command_rejected", "leave_unconfirmed", "episode_ended", "unsupported_environment", "internal_error", "collaboration_unavailable", "chat_cursor_reset_required", "rate_limited", "invalid_payload"]>>;
1771
1778
  readonly duration_ms: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
1772
1779
  readonly elapsed_ms: import("effect/Schema").Number;
1773
- readonly event: import("effect/Schema").Literals<readonly ["space_join_span", "state_changed", "connection_failed", "sync_connect_failed", "sync_dial_timeout", "access_refreshed", "access_refresh_failed", "recovery_attempt", "recovery_succeeded", "recovery_exhausted", "cleanup_completed", "cleanup_unconfirmed", "sync_socket_open", "sync_socket_close", "sync_heartbeat_gap", "media_state", "media_http_error"]>;
1780
+ readonly event: import("effect/Schema").Literals<readonly ["space_join_span", "state_changed", "connection_failed", "sync_connect_failed", "sync_dial_timeout", "access_refreshed", "access_refresh_failed", "recovery_attempt", "recovery_succeeded", "recovery_exhausted", "cleanup_completed", "cleanup_unconfirmed", "sync_socket_open", "sync_socket_close", "sync_heartbeat_gap", "media_state", "media_http_error", "media_projection_mismatch"]>;
1781
+ readonly granted_audio: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["granted", "not_granted", "unknown"]>>;
1782
+ readonly granted_video: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["granted", "not_granted", "unknown"]>>;
1774
1783
  readonly heartbeat_gap_ms: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
1775
1784
  readonly http_status: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
1785
+ readonly media_error_kind: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["NotAllowedError", "NotReadableError", "NotFoundError", "OverconstrainedError", "AbortError", "SecurityError", "InvalidStateError", "OperationError", "NotSupportedError", "CloudflareSFUError", "network", "timeout", "unknown"]>>;
1786
+ readonly media_error_step: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["local_capture", "peer_connection", "access_refresh", "sfu_tracks", "sfu_close_tracks", "sfu_renegotiate", "sfu_publications"]>>;
1776
1787
  readonly outcome: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["started", "succeeded", "failed", "cancelled"]>>;
1777
1788
  readonly phase: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["idle", "connecting", "live", "recovering", "failed", "stopped", "new", "connected", "disconnected", "closed"]>>;
1789
+ readonly projection_state: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["on", "off"]>>;
1790
+ readonly publication_state: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["on", "off"]>>;
1791
+ readonly source: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["microphone", "camera"]>>;
1778
1792
  readonly state: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["idle", "joining", "live", "reconnecting", "leaving", "left", "failed"]>>;
1779
1793
  readonly step: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["join", "acquire_initial_media", "access_initialize", "create_media_client", "create_sync_client", "start_media", "start_sync", "wait_for_sync_live", "confirm_entered"]>>;
1780
1794
  }>>;
1781
- readonly trigger: import("effect/Schema").Literals<readonly ["join_failed", "connection_lost", "recovery_exhausted"]>;
1795
+ readonly trigger: import("effect/Schema").Literals<readonly ["join_failed", "connection_lost", "recovery_exhausted", "media_projection_mismatch"]>;
1782
1796
  readonly version: import("effect/Schema").Literal<1>;
1783
1797
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Void>, import("effect/Schema").toCodecJson<import("effect/Schema").decodeTo<typeof import("./effect").AccessForbiddenError, import("effect/Schema").Struct<{
1784
1798
  readonly error: import("effect/Schema").Struct<{
@@ -2980,6 +2994,64 @@ export declare const createChalkEffectClient: (options: ChalkEffectClientOptions
2980
2994
  readonly message: import("effect/Schema").String;
2981
2995
  }>;
2982
2996
  }>, never, never>>, never, never>, never, never>;
2997
+ readonly getParticipantEpisodeStatus: HttpApiClient.Client.Method<import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getParticipantEpisodeStatus", "GET", "/v1/tenants/:tenant_id/spaces/:space_id/episodes/:episode_id/participants/:participant_id/episode-status", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
2998
+ readonly episode_id: import("effect/Schema").brand<import("effect/Schema").String, "EpisodeId">;
2999
+ readonly participant_id: import("effect/Schema").brand<import("effect/Schema").String, "ParticipantId">;
3000
+ readonly space_id: import("effect/Schema").brand<import("effect/Schema").String, "SpaceId">;
3001
+ readonly tenant_id: import("effect/Schema").brand<import("effect/Schema").String, "TenantId">;
3002
+ }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
3003
+ readonly status: import("effect/Schema").Literals<readonly ["active", "ending", "ended"]>;
3004
+ }>>, import("effect/Schema").toCodecJson<import("effect/Schema").decodeTo<typeof import("./effect").AccessForbiddenError, import("effect/Schema").Struct<{
3005
+ readonly error: import("effect/Schema").Struct<{
3006
+ readonly code: import("effect/Schema").Literal<"access.forbidden">;
3007
+ readonly message: import("effect/Schema").String;
3008
+ }>;
3009
+ }>, never, never> | import("effect/Schema").decodeTo<typeof import("./effect").AccessUnauthenticatedError, import("effect/Schema").Struct<{
3010
+ readonly error: import("effect/Schema").Struct<{
3011
+ readonly code: import("effect/Schema").Literal<"access.unauthenticated">;
3012
+ readonly message: import("effect/Schema").String;
3013
+ }>;
3014
+ }>, never, never> | import("effect/Schema").decodeTo<typeof import("./effect").EpisodeInvalidIdError, import("effect/Schema").Struct<{
3015
+ readonly error: import("effect/Schema").Struct<{
3016
+ readonly code: import("effect/Schema").Literal<"episode.invalid_id">;
3017
+ readonly message: import("effect/Schema").String;
3018
+ }>;
3019
+ }>, never, never> | import("effect/Schema").decodeTo<typeof import("./effect").EpisodeNotFoundError, import("effect/Schema").Struct<{
3020
+ readonly error: import("effect/Schema").Struct<{
3021
+ readonly code: import("effect/Schema").Literal<"episode.not_found">;
3022
+ readonly message: import("effect/Schema").String;
3023
+ }>;
3024
+ }>, never, never> | import("effect/Schema").decodeTo<typeof import("./effect").ParticipantInvalidIdError, import("effect/Schema").Struct<{
3025
+ readonly error: import("effect/Schema").Struct<{
3026
+ readonly code: import("effect/Schema").Literal<"participant.invalid_id">;
3027
+ readonly message: import("effect/Schema").String;
3028
+ }>;
3029
+ }>, never, never> | import("effect/Schema").decodeTo<typeof import("./effect").RequestRateLimitedError, import("effect/Schema").Struct<{
3030
+ readonly error: import("effect/Schema").Struct<{
3031
+ readonly code: import("effect/Schema").Literal<"request.rate_limited">;
3032
+ readonly message: import("effect/Schema").String;
3033
+ }>;
3034
+ }>, never, never> | import("effect/Schema").decodeTo<typeof import("./effect").ServiceInternalError, import("effect/Schema").Struct<{
3035
+ readonly error: import("effect/Schema").Struct<{
3036
+ readonly code: import("effect/Schema").Literal<"service.internal_error">;
3037
+ readonly message: import("effect/Schema").String;
3038
+ }>;
3039
+ }>, never, never> | import("effect/Schema").decodeTo<typeof import("./effect").ServiceUnavailableError, import("effect/Schema").Struct<{
3040
+ readonly error: import("effect/Schema").Struct<{
3041
+ readonly code: import("effect/Schema").Literal<"service.unavailable">;
3042
+ readonly message: import("effect/Schema").String;
3043
+ }>;
3044
+ }>, never, never> | import("effect/Schema").decodeTo<typeof import("./effect").SpaceInvalidIdError, import("effect/Schema").Struct<{
3045
+ readonly error: import("effect/Schema").Struct<{
3046
+ readonly code: import("effect/Schema").Literal<"space.invalid_id">;
3047
+ readonly message: import("effect/Schema").String;
3048
+ }>;
3049
+ }>, never, never> | import("effect/Schema").decodeTo<typeof import("./effect").TenantInvalidIdError, import("effect/Schema").Struct<{
3050
+ readonly error: import("effect/Schema").Struct<{
3051
+ readonly code: import("effect/Schema").Literal<"tenant.invalid_id">;
3052
+ readonly message: import("effect/Schema").String;
3053
+ }>;
3054
+ }>, never, never>>, never, never>, never, never>;
2983
3055
  readonly issueEpisodeParticipantSyncToken: HttpApiClient.Client.Method<import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"issueEpisodeParticipantSyncToken", "POST", "/v1/tenants/:tenant_id/spaces/:space_id/episodes/:episode_id/participants/:participant_id/sync-token", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
2984
3056
  readonly episode_id: import("effect/Schema").brand<import("effect/Schema").String, "EpisodeId">;
2985
3057
  readonly participant_id: import("effect/Schema").brand<import("effect/Schema").String, "ParticipantId">;
@@ -1,3 +1,4 @@
1
+ import type { ParticipantEpisodeStatus } from "../generated/schemas";
1
2
  import type { ConnectionReporter, ConnectionReportTransportEvent } from "./report";
2
3
  import type { ClientMediaPlane, CloudflareSFUBootstrap, ConnectionMediaSnapshot } from "../media";
3
4
  import type { ChalkChatFileTransport } from "../chat-files";
@@ -13,6 +14,7 @@ export type ConnectionAccessRequest = {
13
14
  readonly signal?: AbortSignal;
14
15
  readonly currentMediaToken?: ParticipantMediaCredential;
15
16
  readonly expectedParticipantGeneration?: number;
17
+ readonly expectedMediaConnectionId?: string;
16
18
  };
17
19
  export type ConnectionAccessProvider = (request?: ConnectionAccessRequest) => ParsedAccessGrant | Promise<ParsedAccessGrant>;
18
20
  export type ConnectionClock = {
@@ -82,7 +84,7 @@ export type ConnectionMediaFactoryInput = {
82
84
  readonly replaceMediaConnection?: () => Promise<ParticipantMediaAccess>;
83
85
  readonly traceparent?: string;
84
86
  readonly onTransportDiagnostic?: (event: ConnectionReportTransportEvent) => void;
85
- readonly onFailure: (error: unknown) => void;
87
+ readonly onFailure: (error: unknown, mediaConnectionId?: string) => void;
86
88
  readonly onScreenEnded: () => void;
87
89
  };
88
90
  export type ConnectionSyncFactoryInput = {
@@ -103,6 +105,7 @@ export type ConnectionChatFileFactoryInput = {
103
105
  export type ConnectionDependencies = {
104
106
  readonly clock: ConnectionClock;
105
107
  readonly createConnectionReporter?: (access: () => ParsedAccessGrant | null) => ConnectionReporter | undefined;
108
+ readonly getEpisodeStatus?: (access: ParsedAccessGrant, signal: AbortSignal) => Promise<ParticipantEpisodeStatus["status"]>;
106
109
  readonly cancelPendingAdmission?: (access: ParsedAccessGrant, signal: AbortSignal) => Promise<boolean>;
107
110
  readonly mediaDevices: ConnectionMediaDevices;
108
111
  readonly createMediaClient: (input: ConnectionMediaFactoryInput) => ConnectionMediaClient;
@@ -18,8 +18,10 @@ export type ConnectionJoinTraceEnd = {
18
18
  readonly epoch: number;
19
19
  readonly outcome: Exclude<ConnectionJoinTraceOutcome, "started">;
20
20
  readonly code?: ConnectionErrorCode;
21
+ readonly media?: import("../media/failure-diagnostics").MediaFailureDiagnostic & import("../media/failure-diagnostics").GrantedMedia;
21
22
  };
22
23
  export type ConnectionDiagnostic = {
24
+ readonly media?: import("../media/failure-diagnostics").MediaFailureDiagnostic & import("../media/failure-diagnostics").GrantedMedia;
23
25
  readonly timestamp: number;
24
26
  readonly event: ConnectionDiagnosticEventName;
25
27
  readonly state: ConnectionState;
@@ -54,6 +56,8 @@ export declare class ConnectionDiagnostics {
54
56
  readonly code: "sync_recovery_exhausted" | "media_recovery_exhausted";
55
57
  readonly attempts: number;
56
58
  readonly transport: import("../sync/connect-diagnostics").SyncRecoveryDiagnostic | null;
59
+ readonly media?: ConnectionDiagnostic["media"];
60
+ readonly grantedMedia: import("../media/failure-diagnostics").GrantedMedia;
57
61
  }): void;
58
62
  snapshot(): readonly ConnectionDiagnostic[];
59
63
  startSpan(input: {
@@ -0,0 +1,7 @@
1
+ export declare class EpisodeStatusError extends Error {
2
+ readonly status: number;
3
+ readonly retryAfterMs: number;
4
+ constructor(status: number, retryAfterMs?: number);
5
+ }
6
+ export declare function episodeStatusRetryDelay(attempt: number, error: unknown): number;
7
+ export declare function retryAfterMilliseconds(value: string | null, now: number): number;
@@ -34,7 +34,9 @@ export type ConnectionOptions = {
34
34
  readonly initialCameraEnabled?: boolean;
35
35
  readonly accessRefreshWindowMs?: number;
36
36
  readonly recovery?: {
37
+ /** Sync attempt cap. Recoverable media failures retry until budgetMs expires. */
37
38
  readonly maxAttempts?: number;
39
+ /** Foreground recovery budget for either transport; defaults to 60 seconds. */
38
40
  readonly budgetMs?: number;
39
41
  readonly backoffMs?: readonly number[];
40
42
  };
@@ -39,6 +39,7 @@ export type ConnectionLifecycleCapability = {
39
39
  }>) => Effect.Effect<void, ConnectionLifecycleFailure>;
40
40
  readonly getSyncToken: () => Effect.Effect<string, ConnectionLifecycleFailure>;
41
41
  readonly confirmEpisodeEnded: Effect.Effect<void>;
42
+ readonly runEpisodeEnd: <A, E>(operation: Effect.Effect<A, E>) => Effect.Effect<A, E>;
42
43
  readonly join: () => Effect.Effect<void, ConnectionLifecycleFailure>;
43
44
  readonly leave: () => Effect.Effect<void, ConnectionLifecycleFailure>;
44
45
  readonly runCommand: <A, E>(operation: (ports: ConnectionPorts) => Effect.Effect<A, E>) => Effect.Effect<A, ConnectionLifecycleFailure | E>;
@@ -47,6 +48,7 @@ export type ConnectionLifecycleCapability = {
47
48
  readonly scheduleUnsafe: (callback: () => void, milliseconds: number) => unknown;
48
49
  readonly cancelScheduleUnsafe: (handle: unknown) => void;
49
50
  readonly createId: () => string;
51
+ readonly recordTransportDiagnostic: (event: import("./report").ConnectionReportTransportEvent) => void;
50
52
  };
51
53
  declare const ConnectionLifecycleService_base: Context.ServiceClass<ConnectionLifecycleService, "@chalk/client/ConnectionLifecycle", ConnectionLifecycleCapability>;
52
54
  export declare class ConnectionLifecycleService extends ConnectionLifecycleService_base {
@@ -10,6 +10,6 @@ export declare const makeProductionConnectionPlatformLayer: (options: {
10
10
  readonly syncURL: string;
11
11
  readonly whiteboardURL?: string | null;
12
12
  }) => import("effect/Layer").Layer<import("./dependencies").ConnectionPlatformService, never, never>;
13
- type BoundMediaClient = Pick<ConnectionMediaClient, "setLocalPublicationTarget" | "setLocalSourceIntent" | "closeForcedLocalPublication" | "observeLocalPublications" | "observeRemotePublications" | "remotePublicationsChanged" | "remoteParticipantsChanged" | "remotePublicationResumed" | "start" | "stop" | "prepareLocalTrack" | "clearPreparedLocalTrack" | "getSnapshot" | "subscribe">;
13
+ type BoundMediaClient = Pick<ConnectionMediaClient, "setLocalPublicationTarget" | "pauseLocalCapture" | "setLocalSourceIntent" | "closeForcedLocalPublication" | "observeLocalPublications" | "observeRemotePublications" | "remotePublicationsChanged" | "remoteParticipantsChanged" | "remotePublicationResumed" | "start" | "stop" | "prepareLocalTrack" | "clearPreparedLocalTrack" | "getSnapshot" | "subscribe">;
14
14
  export declare function bindConnectionMediaClient(client: BoundMediaClient, restart: ConnectionMediaClient["restart"]): ConnectionMediaClient;
15
15
  export {};
package/dist/effect.js CHANGED
@@ -17,8 +17,8 @@ import {
17
17
  makeSpaceClientCoreLayer,
18
18
  makeSpaceClientCoreLayerFromServices,
19
19
  makeSpaceStoreLayer
20
- } from "./chunk-LDPC2JZB.js";
21
- import "./chunk-3ASKGMD3.js";
20
+ } from "./chunk-I7Y4HR2P.js";
21
+ import "./chunk-YIDKETOX.js";
22
22
  import {
23
23
  APIKeyListSchema,
24
24
  APIKeyWithSecretSchema,
@@ -261,6 +261,10 @@ import {
261
261
  GetEpisodeErrorSchema,
262
262
  GetEpisodePathParamsSchema,
263
263
  GetEpisodeResponseSchema,
264
+ GetParticipantEpisodeStatus429ResponseHeadersSchema,
265
+ GetParticipantEpisodeStatusErrorSchema,
266
+ GetParticipantEpisodeStatusPathParamsSchema,
267
+ GetParticipantEpisodeStatusResponseSchema,
264
268
  GetProblemReportAvailabilityErrorSchema,
265
269
  GetProblemReportAvailabilityPathParamsSchema,
266
270
  GetProblemReportAvailabilityResponseSchema,
@@ -451,6 +455,7 @@ import {
451
455
  ParticipantConnectionSupersededError,
452
456
  ParticipantConnectionSupersededErrorSchema,
453
457
  ParticipantConnectionSupersededErrorWireSchema,
458
+ ParticipantEpisodeStatusSchema,
454
459
  ParticipantGenerationMismatchError,
455
460
  ParticipantGenerationMismatchErrorSchema,
456
461
  ParticipantGenerationMismatchErrorWireSchema,
@@ -460,6 +465,9 @@ import {
460
465
  ParticipantInvalidIdErrorWireSchema,
461
466
  ParticipantJoinCancellationSchema,
462
467
  ParticipantLifecycleSchema,
468
+ ParticipantMediaReplacementPendingError,
469
+ ParticipantMediaReplacementPendingErrorSchema,
470
+ ParticipantMediaReplacementPendingErrorWireSchema,
463
471
  ParticipantNotActiveError,
464
472
  ParticipantNotActiveErrorSchema,
465
473
  ParticipantNotActiveErrorWireSchema,
@@ -833,7 +841,7 @@ import {
833
841
  WhiteboardStorageUnavailableErrorSchema,
834
842
  WhiteboardStorageUnavailableErrorWireSchema,
835
843
  createChalkEffectClient
836
- } from "./chunk-AZONR3Q3.js";
844
+ } from "./chunk-CJVLTSIO.js";
837
845
  import "./chunk-5YPQNMJE.js";
838
846
 
839
847
  // src/space-client/effect.ts
@@ -1117,6 +1125,10 @@ export {
1117
1125
  GetEpisodeErrorSchema,
1118
1126
  GetEpisodePathParamsSchema,
1119
1127
  GetEpisodeResponseSchema,
1128
+ GetParticipantEpisodeStatus429ResponseHeadersSchema,
1129
+ GetParticipantEpisodeStatusErrorSchema,
1130
+ GetParticipantEpisodeStatusPathParamsSchema,
1131
+ GetParticipantEpisodeStatusResponseSchema,
1120
1132
  GetProblemReportAvailabilityErrorSchema,
1121
1133
  GetProblemReportAvailabilityPathParamsSchema,
1122
1134
  GetProblemReportAvailabilityResponseSchema,
@@ -1307,6 +1319,7 @@ export {
1307
1319
  ParticipantConnectionSupersededError,
1308
1320
  ParticipantConnectionSupersededErrorSchema,
1309
1321
  ParticipantConnectionSupersededErrorWireSchema,
1322
+ ParticipantEpisodeStatusSchema,
1310
1323
  ParticipantGenerationMismatchError,
1311
1324
  ParticipantGenerationMismatchErrorSchema,
1312
1325
  ParticipantGenerationMismatchErrorWireSchema,
@@ -1316,6 +1329,9 @@ export {
1316
1329
  ParticipantInvalidIdErrorWireSchema,
1317
1330
  ParticipantJoinCancellationSchema,
1318
1331
  ParticipantLifecycleSchema,
1332
+ ParticipantMediaReplacementPendingError,
1333
+ ParticipantMediaReplacementPendingErrorSchema,
1334
+ ParticipantMediaReplacementPendingErrorWireSchema,
1319
1335
  ParticipantNotActiveError,
1320
1336
  ParticipantNotActiveErrorSchema,
1321
1337
  ParticipantNotActiveErrorWireSchema,
@@ -7,6 +7,7 @@ declare const ChalkApi_base: HttpApi.HttpApi<"ChalkApi", HttpApiGroup.HttpApiGro
7
7
  readonly tenant_id: import("effect/Schema").brand<import("effect/Schema").String, "TenantId">;
8
8
  }>>, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
9
9
  readonly allow_partial_remote_tracks: import("effect/Schema").optional<import("effect/Schema").Boolean>;
10
+ readonly replacement_cause: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["user_pause", "moderation_pause", "sync_recovery_loss", "discovery_absent", "capture_cleanup", "consent_revoked", "publish_failure", "enable_failure", "projection_mismatch", "forced_pause", "local_signaling_failure", "remote_signaling_failure", "dormant_connection", "access_refresh"]>>;
10
11
  }>>, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
11
12
  readonly connection_id: import("effect/Schema").String;
12
13
  readonly session_description: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Struct<{
@@ -1037,6 +1038,7 @@ declare const ChalkApi_base: HttpApi.HttpApi<"ChalkApi", HttpApiGroup.HttpApiGro
1037
1038
  readonly tenant_id: import("effect/Schema").brand<import("effect/Schema").String, "TenantId">;
1038
1039
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
1039
1040
  readonly current_media_token: import("effect/Schema").optional<import("effect/Schema").String>;
1041
+ readonly expected_media_connection_id: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
1040
1042
  readonly participant_generation: import("effect/Schema").Number;
1041
1043
  readonly replace_media_connection: import("effect/Schema").Boolean;
1042
1044
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
@@ -1158,6 +1160,11 @@ declare const ChalkApi_base: HttpApi.HttpApi<"ChalkApi", HttpApiGroup.HttpApiGro
1158
1160
  readonly code: import("effect/Schema").Literal<"participant.invalid_id">;
1159
1161
  readonly message: import("effect/Schema").String;
1160
1162
  }>;
1163
+ }>, never, never> | import("effect/Schema").decodeTo<typeof S.ParticipantMediaReplacementPendingError, import("effect/Schema").Struct<{
1164
+ readonly error: import("effect/Schema").Struct<{
1165
+ readonly code: import("effect/Schema").Literal<"participant.media_replacement_pending">;
1166
+ readonly message: import("effect/Schema").String;
1167
+ }>;
1161
1168
  }>, never, never> | import("effect/Schema").decodeTo<typeof S.ParticipantNotFoundError, import("effect/Schema").Struct<{
1162
1169
  readonly error: import("effect/Schema").Struct<{
1163
1170
  readonly code: import("effect/Schema").Literal<"participant.not_found">;
@@ -1735,15 +1742,22 @@ declare const ChalkApi_base: HttpApi.HttpApi<"ChalkApi", HttpApiGroup.HttpApiGro
1735
1742
  readonly code: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["invalid_state", "invalid_access", "access_unavailable", "permission_denied", "device_not_found", "device_busy", "device_constraint_invalid", "media_capture_failed", "sync_start_failed", "state_digest_recovery_failed", "sync_hello_timeout", "media_start_failed", "join_cleanup_unconfirmed", "sync_recovery_exhausted", "media_recovery_exhausted", "command_rejected", "leave_unconfirmed", "episode_ended", "unsupported_environment", "internal_error", "collaboration_unavailable", "chat_cursor_reset_required", "rate_limited", "invalid_payload"]>>;
1736
1743
  readonly duration_ms: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
1737
1744
  readonly elapsed_ms: import("effect/Schema").Number;
1738
- readonly event: import("effect/Schema").Literals<readonly ["space_join_span", "state_changed", "connection_failed", "sync_connect_failed", "sync_dial_timeout", "access_refreshed", "access_refresh_failed", "recovery_attempt", "recovery_succeeded", "recovery_exhausted", "cleanup_completed", "cleanup_unconfirmed", "sync_socket_open", "sync_socket_close", "sync_heartbeat_gap", "media_state", "media_http_error"]>;
1745
+ readonly event: import("effect/Schema").Literals<readonly ["space_join_span", "state_changed", "connection_failed", "sync_connect_failed", "sync_dial_timeout", "access_refreshed", "access_refresh_failed", "recovery_attempt", "recovery_succeeded", "recovery_exhausted", "cleanup_completed", "cleanup_unconfirmed", "sync_socket_open", "sync_socket_close", "sync_heartbeat_gap", "media_state", "media_http_error", "media_projection_mismatch"]>;
1746
+ readonly granted_audio: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["granted", "not_granted", "unknown"]>>;
1747
+ readonly granted_video: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["granted", "not_granted", "unknown"]>>;
1739
1748
  readonly heartbeat_gap_ms: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
1740
1749
  readonly http_status: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
1750
+ readonly media_error_kind: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["NotAllowedError", "NotReadableError", "NotFoundError", "OverconstrainedError", "AbortError", "SecurityError", "InvalidStateError", "OperationError", "NotSupportedError", "CloudflareSFUError", "network", "timeout", "unknown"]>>;
1751
+ readonly media_error_step: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["local_capture", "peer_connection", "access_refresh", "sfu_tracks", "sfu_close_tracks", "sfu_renegotiate", "sfu_publications"]>>;
1741
1752
  readonly outcome: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["started", "succeeded", "failed", "cancelled"]>>;
1742
1753
  readonly phase: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["idle", "connecting", "live", "recovering", "failed", "stopped", "new", "connected", "disconnected", "closed"]>>;
1754
+ readonly projection_state: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["on", "off"]>>;
1755
+ readonly publication_state: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["on", "off"]>>;
1756
+ readonly source: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["microphone", "camera"]>>;
1743
1757
  readonly state: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["idle", "joining", "live", "reconnecting", "leaving", "left", "failed"]>>;
1744
1758
  readonly step: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["join", "acquire_initial_media", "access_initialize", "create_media_client", "create_sync_client", "start_media", "start_sync", "wait_for_sync_live", "confirm_entered"]>>;
1745
1759
  }>>;
1746
- readonly trigger: import("effect/Schema").Literals<readonly ["join_failed", "connection_lost", "recovery_exhausted"]>;
1760
+ readonly trigger: import("effect/Schema").Literals<readonly ["join_failed", "connection_lost", "recovery_exhausted", "media_projection_mismatch"]>;
1747
1761
  readonly version: import("effect/Schema").Literal<1>;
1748
1762
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Void>, import("effect/Schema").toCodecJson<import("effect/Schema").decodeTo<typeof S.AccessForbiddenError, import("effect/Schema").Struct<{
1749
1763
  readonly error: import("effect/Schema").Struct<{
@@ -2930,6 +2944,63 @@ declare const ChalkApi_base: HttpApi.HttpApi<"ChalkApi", HttpApiGroup.HttpApiGro
2930
2944
  readonly code: import("effect/Schema").Literal<"tenant.invalid_id">;
2931
2945
  readonly message: import("effect/Schema").String;
2932
2946
  }>;
2947
+ }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getParticipantEpisodeStatus", "GET", "/v1/tenants/:tenant_id/spaces/:space_id/episodes/:episode_id/participants/:participant_id/episode-status", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
2948
+ readonly episode_id: import("effect/Schema").brand<import("effect/Schema").String, "EpisodeId">;
2949
+ readonly participant_id: import("effect/Schema").brand<import("effect/Schema").String, "ParticipantId">;
2950
+ readonly space_id: import("effect/Schema").brand<import("effect/Schema").String, "SpaceId">;
2951
+ readonly tenant_id: import("effect/Schema").brand<import("effect/Schema").String, "TenantId">;
2952
+ }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
2953
+ readonly status: import("effect/Schema").Literals<readonly ["active", "ending", "ended"]>;
2954
+ }>>, import("effect/Schema").toCodecJson<import("effect/Schema").decodeTo<typeof S.AccessForbiddenError, import("effect/Schema").Struct<{
2955
+ readonly error: import("effect/Schema").Struct<{
2956
+ readonly code: import("effect/Schema").Literal<"access.forbidden">;
2957
+ readonly message: import("effect/Schema").String;
2958
+ }>;
2959
+ }>, never, never> | import("effect/Schema").decodeTo<typeof S.AccessUnauthenticatedError, import("effect/Schema").Struct<{
2960
+ readonly error: import("effect/Schema").Struct<{
2961
+ readonly code: import("effect/Schema").Literal<"access.unauthenticated">;
2962
+ readonly message: import("effect/Schema").String;
2963
+ }>;
2964
+ }>, never, never> | import("effect/Schema").decodeTo<typeof S.EpisodeInvalidIdError, import("effect/Schema").Struct<{
2965
+ readonly error: import("effect/Schema").Struct<{
2966
+ readonly code: import("effect/Schema").Literal<"episode.invalid_id">;
2967
+ readonly message: import("effect/Schema").String;
2968
+ }>;
2969
+ }>, never, never> | import("effect/Schema").decodeTo<typeof S.EpisodeNotFoundError, import("effect/Schema").Struct<{
2970
+ readonly error: import("effect/Schema").Struct<{
2971
+ readonly code: import("effect/Schema").Literal<"episode.not_found">;
2972
+ readonly message: import("effect/Schema").String;
2973
+ }>;
2974
+ }>, never, never> | import("effect/Schema").decodeTo<typeof S.ParticipantInvalidIdError, import("effect/Schema").Struct<{
2975
+ readonly error: import("effect/Schema").Struct<{
2976
+ readonly code: import("effect/Schema").Literal<"participant.invalid_id">;
2977
+ readonly message: import("effect/Schema").String;
2978
+ }>;
2979
+ }>, never, never> | import("effect/Schema").decodeTo<typeof S.RequestRateLimitedError, import("effect/Schema").Struct<{
2980
+ readonly error: import("effect/Schema").Struct<{
2981
+ readonly code: import("effect/Schema").Literal<"request.rate_limited">;
2982
+ readonly message: import("effect/Schema").String;
2983
+ }>;
2984
+ }>, never, never> | import("effect/Schema").decodeTo<typeof S.ServiceInternalError, import("effect/Schema").Struct<{
2985
+ readonly error: import("effect/Schema").Struct<{
2986
+ readonly code: import("effect/Schema").Literal<"service.internal_error">;
2987
+ readonly message: import("effect/Schema").String;
2988
+ }>;
2989
+ }>, never, never> | import("effect/Schema").decodeTo<typeof S.ServiceUnavailableError, import("effect/Schema").Struct<{
2990
+ readonly error: import("effect/Schema").Struct<{
2991
+ readonly code: import("effect/Schema").Literal<"service.unavailable">;
2992
+ readonly message: import("effect/Schema").String;
2993
+ }>;
2994
+ }>, never, never> | import("effect/Schema").decodeTo<typeof S.SpaceInvalidIdError, import("effect/Schema").Struct<{
2995
+ readonly error: import("effect/Schema").Struct<{
2996
+ readonly code: import("effect/Schema").Literal<"space.invalid_id">;
2997
+ readonly message: import("effect/Schema").String;
2998
+ }>;
2999
+ }>, never, never> | import("effect/Schema").decodeTo<typeof S.TenantInvalidIdError, import("effect/Schema").Struct<{
3000
+ readonly error: import("effect/Schema").Struct<{
3001
+ readonly code: import("effect/Schema").Literal<"tenant.invalid_id">;
3002
+ readonly message: import("effect/Schema").String;
3003
+ }>;
2933
3004
  }>, never, never>>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"issueEpisodeParticipantSyncToken", "POST", "/v1/tenants/:tenant_id/spaces/:space_id/episodes/:episode_id/participants/:participant_id/sync-token", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
2934
3005
  readonly episode_id: import("effect/Schema").brand<import("effect/Schema").String, "EpisodeId">;
2935
3006
  readonly participant_id: import("effect/Schema").brand<import("effect/Schema").String, "ParticipantId">;