@q9labsai/chalk-client 4.1.17 → 5.0.1

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 (177) hide show
  1. package/README.md +60 -42
  2. package/dist/access/grant.d.ts +0 -10
  3. package/dist/access/grant.d.ts.map +1 -1
  4. package/dist/access/manager.d.ts.map +1 -1
  5. package/dist/{chunk-ZRMGKMX4.js → chunk-2HJIJVE2.js} +552 -3651
  6. package/dist/{chunk-CZUJNAUI.js → chunk-AVXJ4HQU.js} +142 -49
  7. package/dist/{chunk-A7BVZEFM.js → chunk-CMVO7USN.js} +2 -8
  8. package/dist/{chunk-AUQTQOLR.js → chunk-IPAN4LUZ.js} +627 -2434
  9. package/dist/{chunk-2DZUHV6I.js → chunk-O2NOZKJP.js} +129 -721
  10. package/dist/client.d.ts +2559 -5303
  11. package/dist/client.d.ts.map +1 -1
  12. package/dist/collaboration/types.d.ts +21 -1
  13. package/dist/collaboration/types.d.ts.map +1 -1
  14. package/dist/collaboration/wire.d.ts +8 -1
  15. package/dist/collaboration/wire.d.ts.map +1 -1
  16. package/dist/connection/dependencies.d.ts +7 -13
  17. package/dist/connection/dependencies.d.ts.map +1 -1
  18. package/dist/connection/index.d.ts +1 -6
  19. package/dist/connection/index.d.ts.map +1 -1
  20. package/dist/connection/lifecycle.d.ts.map +1 -1
  21. package/dist/connection/media-devices.d.ts +11 -0
  22. package/dist/connection/media-devices.d.ts.map +1 -1
  23. package/dist/connection/production.d.ts +1 -1
  24. package/dist/connection/production.d.ts.map +1 -1
  25. package/dist/connection/types.d.ts +4 -4
  26. package/dist/connection/types.d.ts.map +1 -1
  27. package/dist/effect.d.ts +0 -4
  28. package/dist/effect.d.ts.map +1 -1
  29. package/dist/effect.js +53 -776
  30. package/dist/generated/http-api.d.ts +2603 -5293
  31. package/dist/generated/http-api.d.ts.map +1 -1
  32. package/dist/generated/schemas.d.ts +1893 -6870
  33. package/dist/generated/schemas.d.ts.map +1 -1
  34. package/dist/generated/sync.d.ts +191 -28
  35. package/dist/generated/sync.d.ts.map +1 -1
  36. package/dist/generated/whiteboard-v1.d.ts +0 -7
  37. package/dist/generated/whiteboard-v1.d.ts.map +1 -1
  38. package/dist/index.d.ts +0 -4
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +10 -119
  41. package/dist/media/client.d.ts +6 -5
  42. package/dist/media/client.d.ts.map +1 -1
  43. package/dist/media/index.d.ts +1 -2
  44. package/dist/media/index.d.ts.map +1 -1
  45. package/dist/media/index.js +1 -7
  46. package/dist/media/plane.d.ts +12 -1
  47. package/dist/media/plane.d.ts.map +1 -1
  48. package/dist/media/target.d.ts +4 -2
  49. package/dist/media/target.d.ts.map +1 -1
  50. package/dist/media/tracks.d.ts +2 -2
  51. package/dist/media/tracks.d.ts.map +1 -1
  52. package/dist/media/transport.d.ts.map +1 -1
  53. package/dist/media/types.d.ts +4 -11
  54. package/dist/media/types.d.ts.map +1 -1
  55. package/dist/public-invites/client.d.ts.map +1 -1
  56. package/dist/public-invites/index.d.ts +2 -2
  57. package/dist/public-invites/index.d.ts.map +1 -1
  58. package/dist/public-invites/index.js +2 -5
  59. package/dist/public-invites/types.d.ts +2 -6
  60. package/dist/public-invites/types.d.ts.map +1 -1
  61. package/dist/server/client.d.ts.map +1 -1
  62. package/dist/server/index.cjs +12 -112
  63. package/dist/server/index.d.cts +1 -1
  64. package/dist/server/index.d.ts +1 -1
  65. package/dist/server/index.d.ts.map +1 -1
  66. package/dist/server/index.js +9 -109
  67. package/dist/server/types.d.cts +0 -7
  68. package/dist/server/types.d.ts +0 -7
  69. package/dist/server/types.d.ts.map +1 -1
  70. package/dist/space-client/chat-controller-helpers.d.ts.map +1 -1
  71. package/dist/space-client/chat-controller.d.ts +2 -3
  72. package/dist/space-client/chat-controller.d.ts.map +1 -1
  73. package/dist/space-client/controller-effects.d.ts +0 -3
  74. package/dist/space-client/controller-effects.d.ts.map +1 -1
  75. package/dist/space-client/core.d.ts +3 -18
  76. package/dist/space-client/core.d.ts.map +1 -1
  77. package/dist/space-client/core.test.helpers.d.ts.map +1 -1
  78. package/dist/space-client/effect.d.ts +0 -2
  79. package/dist/space-client/effect.d.ts.map +1 -1
  80. package/dist/space-client/index.d.ts +1 -2
  81. package/dist/space-client/index.d.ts.map +1 -1
  82. package/dist/space-client/media-controller.d.ts +4 -4
  83. package/dist/space-client/media-controller.d.ts.map +1 -1
  84. package/dist/space-client/offline-actions-storage.d.ts +18 -3
  85. package/dist/space-client/offline-actions-storage.d.ts.map +1 -1
  86. package/dist/space-client/offline-actions.d.ts +1 -0
  87. package/dist/space-client/offline-actions.d.ts.map +1 -1
  88. package/dist/space-client/participants-controller.d.ts +2 -3
  89. package/dist/space-client/participants-controller.d.ts.map +1 -1
  90. package/dist/space-client/reactions-controller.d.ts +2 -3
  91. package/dist/space-client/reactions-controller.d.ts.map +1 -1
  92. package/dist/space-client/recording-controller.d.ts +2 -3
  93. package/dist/space-client/recording-controller.d.ts.map +1 -1
  94. package/dist/space-client/space-client.d.ts.map +1 -1
  95. package/dist/space-client/store.d.ts.map +1 -1
  96. package/dist/space-client/terminal.test.helpers.d.ts +33 -12
  97. package/dist/space-client/terminal.test.helpers.d.ts.map +1 -1
  98. package/dist/space-client/types.d.ts +15 -8
  99. package/dist/space-client/types.d.ts.map +1 -1
  100. package/dist/sync/index.d.ts +1 -1
  101. package/dist/sync/index.d.ts.map +1 -1
  102. package/dist/sync/index.js +1 -3
  103. package/dist/sync/v1-client.d.ts +4 -3
  104. package/dist/sync/v1-client.d.ts.map +1 -1
  105. package/dist/sync/v1-collaboration-state.d.ts +10 -3
  106. package/dist/sync/v1-collaboration-state.d.ts.map +1 -1
  107. package/dist/sync/v1-types.d.ts +10 -9
  108. package/dist/sync/v1-types.d.ts.map +1 -1
  109. package/dist/whiteboard/file-download-transport.d.ts +8 -0
  110. package/dist/whiteboard/file-download-transport.d.ts.map +1 -0
  111. package/dist/whiteboard/index.d.ts +1 -1
  112. package/dist/whiteboard/index.d.ts.map +1 -1
  113. package/dist/whiteboard/types.d.ts +12 -15
  114. package/dist/whiteboard/types.d.ts.map +1 -1
  115. package/dist/whiteboard/v1-client.d.ts.map +1 -1
  116. package/package.json +4 -16
  117. package/dist/access/episode-diagnostic-credential.d.ts +0 -11
  118. package/dist/access/episode-diagnostic-credential.d.ts.map +0 -1
  119. package/dist/chunk-EWTITNJ3.js +0 -1163
  120. package/dist/chunk-HW5TTZL2.js +0 -99
  121. package/dist/chunk-PBSYXPNJ.js +0 -23
  122. package/dist/chunk-RCDXIDCN.js +0 -33
  123. package/dist/connection/snapshot.d.ts +0 -23
  124. package/dist/connection/snapshot.d.ts.map +0 -1
  125. package/dist/feedback/collector.d.ts +0 -14
  126. package/dist/feedback/collector.d.ts.map +0 -1
  127. package/dist/feedback/context.d.ts +0 -38
  128. package/dist/feedback/context.d.ts.map +0 -1
  129. package/dist/feedback/controller.d.ts +0 -4
  130. package/dist/feedback/controller.d.ts.map +0 -1
  131. package/dist/feedback/index.d.ts +0 -7
  132. package/dist/feedback/index.d.ts.map +0 -1
  133. package/dist/feedback/transport.d.ts +0 -29
  134. package/dist/feedback/transport.d.ts.map +0 -1
  135. package/dist/feedback/types.d.ts +0 -202
  136. package/dist/feedback/types.d.ts.map +0 -1
  137. package/dist/feedback/validation.d.ts +0 -30
  138. package/dist/feedback/validation.d.ts.map +0 -1
  139. package/dist/media/rtk.d.ts +0 -101
  140. package/dist/media/rtk.d.ts.map +0 -1
  141. package/dist/space-client/episode-diagnostic-registry.d.ts +0 -13
  142. package/dist/space-client/episode-diagnostic-registry.d.ts.map +0 -1
  143. package/dist/space-client/episode-diagnostic-render-registry.d.ts +0 -4
  144. package/dist/space-client/episode-diagnostic-render-registry.d.ts.map +0 -1
  145. package/dist/space-client/episode-diagnostic-runtime.d.ts +0 -105
  146. package/dist/space-client/episode-diagnostic-runtime.d.ts.map +0 -1
  147. package/dist/telemetry/attributes.d.ts +0 -7
  148. package/dist/telemetry/attributes.d.ts.map +0 -1
  149. package/dist/telemetry/client.d.ts +0 -44
  150. package/dist/telemetry/client.d.ts.map +0 -1
  151. package/dist/telemetry/delivery.d.ts +0 -107
  152. package/dist/telemetry/delivery.d.ts.map +0 -1
  153. package/dist/telemetry/exporter.d.ts +0 -38
  154. package/dist/telemetry/exporter.d.ts.map +0 -1
  155. package/dist/telemetry/index.d.ts +0 -7
  156. package/dist/telemetry/index.d.ts.map +0 -1
  157. package/dist/telemetry/index.js +0 -50
  158. package/dist/telemetry/journey.d.ts +0 -52
  159. package/dist/telemetry/journey.d.ts.map +0 -1
  160. package/dist/telemetry/random.d.ts +0 -18
  161. package/dist/telemetry/random.d.ts.map +0 -1
  162. package/dist/telemetry/reconnect.d.ts +0 -7
  163. package/dist/telemetry/reconnect.d.ts.map +0 -1
  164. package/dist/telemetry/rtc.d.ts +0 -41
  165. package/dist/telemetry/rtc.d.ts.map +0 -1
  166. package/dist/telemetry/storage.d.ts +0 -22
  167. package/dist/telemetry/storage.d.ts.map +0 -1
  168. package/dist/telemetry/sync.d.ts +0 -10
  169. package/dist/telemetry/sync.d.ts.map +0 -1
  170. package/dist/telemetry/test-support.d.ts +0 -51
  171. package/dist/telemetry/test-support.d.ts.map +0 -1
  172. package/dist/telemetry/trace.d.ts +0 -18
  173. package/dist/telemetry/trace.d.ts.map +0 -1
  174. package/dist/telemetry/types.d.ts +0 -109
  175. package/dist/telemetry/types.d.ts.map +0 -1
  176. package/dist/whiteboard/file-http-transport.d.ts +0 -9
  177. package/dist/whiteboard/file-http-transport.d.ts.map +0 -1
@@ -1,101 +0,0 @@
1
- import type { ParticipantMediaAccess } from "../access/grant";
2
- import type { ConnectionMediaSnapshot, MediaPlaneResult, MediaPlaneTarget, MediaPublication, MediaSource } from "./plane";
3
- type CloudflareRTKSelfAudioUpdate = {
4
- readonly audioEnabled: boolean;
5
- readonly audioTrack: MediaStreamTrack;
6
- };
7
- type CloudflareRTKSelfVideoUpdate = {
8
- readonly videoEnabled: boolean;
9
- readonly videoTrack: MediaStreamTrack;
10
- };
11
- type CloudflareRTKSelfScreenShareUpdate = {
12
- readonly screenShareEnabled: boolean;
13
- readonly screenShareTracks: {
14
- readonly audio?: MediaStreamTrack;
15
- readonly video?: MediaStreamTrack;
16
- };
17
- };
18
- export type CloudflareRTKParticipant = {
19
- readonly id: string;
20
- readonly userId: string;
21
- readonly customParticipantId?: string;
22
- readonly audioEnabled: boolean;
23
- readonly videoEnabled: boolean;
24
- readonly screenShareEnabled: boolean;
25
- readonly audioTrack: MediaStreamTrack | null;
26
- readonly videoTrack: MediaStreamTrack | null;
27
- readonly screenShareTracks: {
28
- readonly audio?: MediaStreamTrack;
29
- readonly video?: MediaStreamTrack;
30
- };
31
- readonly onAudioUpdate?: (listener: () => void) => () => void;
32
- readonly onVideoUpdate?: (listener: () => void) => () => void;
33
- readonly onScreenShareUpdate?: (listener: () => void) => () => void;
34
- };
35
- export type CloudflareRTKSelf = {
36
- readonly peerId: string;
37
- readonly audioEnabled: boolean;
38
- readonly videoEnabled: boolean;
39
- readonly screenShareEnabled: boolean;
40
- readonly audioTrack: MediaStreamTrack | null;
41
- readonly videoTrack: MediaStreamTrack | null;
42
- readonly screenShareTracks: {
43
- readonly audio?: MediaStreamTrack;
44
- readonly video?: MediaStreamTrack;
45
- };
46
- readonly enableAudio: (customTrack?: MediaStreamTrack) => Promise<void>;
47
- readonly enableVideo: (customTrack?: MediaStreamTrack) => Promise<void>;
48
- readonly enableScreenShare: () => Promise<void>;
49
- readonly disableAudio: () => Promise<void>;
50
- readonly disableVideo: () => Promise<void>;
51
- readonly disableScreenShare: () => Promise<void>;
52
- readonly onAudioUpdate: (listener: (payload: CloudflareRTKSelfAudioUpdate) => void) => () => void;
53
- readonly onVideoUpdate: (listener: (payload: CloudflareRTKSelfVideoUpdate) => void) => () => void;
54
- readonly onScreenShareUpdate: (listener: (payload: CloudflareRTKSelfScreenShareUpdate) => void) => () => void;
55
- readonly onLeft: (listener: () => void) => () => void;
56
- };
57
- export type CloudflareRTKJoinedParticipants = {
58
- readonly list: () => readonly CloudflareRTKParticipant[];
59
- readonly onJoined: (listener: (participant: CloudflareRTKParticipant) => void) => () => void;
60
- readonly onLeft: (listener: (participant: CloudflareRTKParticipant) => void) => () => void;
61
- };
62
- export type CloudflareRTKConnection = {
63
- readonly self: CloudflareRTKSelf;
64
- readonly participants: {
65
- readonly joined: CloudflareRTKJoinedParticipants;
66
- };
67
- readonly join: () => Promise<void>;
68
- readonly leave: () => Promise<void>;
69
- };
70
- export type CloudflareRTKClientFactory = (input: {
71
- readonly authToken: string;
72
- readonly onError: (error: unknown) => void;
73
- }) => Promise<CloudflareRTKConnection>;
74
- export type CloudflareRTKClientOptions = {
75
- readonly authToken: string;
76
- readonly participantId: string;
77
- readonly onError?: (error: unknown) => void;
78
- readonly onScreenEnded?: () => void;
79
- readonly clientFactory?: CloudflareRTKClientFactory;
80
- };
81
- export type CloudflareRTKErrorCode = "invalid_client" | "invalid_participant" | "invalid_target" | "media_failed" | "media_stopped" | "stale_generation";
82
- export declare class CloudflareRTKError extends Error {
83
- readonly code: CloudflareRTKErrorCode;
84
- constructor(message: string, code: CloudflareRTKErrorCode);
85
- }
86
- export declare class CloudflareRTKClient {
87
- #private;
88
- constructor(options: CloudflareRTKClientOptions);
89
- getSnapshot(): ConnectionMediaSnapshot;
90
- subscribe(listener: () => void): () => void;
91
- prepareLocalTrack(source: MediaSource, track: MediaStreamTrack): void;
92
- clearPreparedLocalTrack(source: MediaSource): Promise<void>;
93
- start(localMedia: MediaStream): Promise<void>;
94
- setLocalPublicationTarget(target: MediaPlaneTarget): Promise<MediaPlaneResult>;
95
- observeLocalPublications(listener: (publications: readonly MediaPublication[]) => void): () => void;
96
- observeRemotePublications(listener: (publications: readonly MediaPublication[]) => void): () => void;
97
- restart(input: ParticipantMediaAccess): Promise<void>;
98
- stop(): void;
99
- }
100
- export {};
101
- //# sourceMappingURL=rtk.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rtk.d.ts","s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QAAQ,EAAE,CAAC,YAAY,EAAE,SAAS,gBAAgB,EAAE,KAAK,IAAI,GAAG,MAAM,IAAI,CAElG;IAED,yBAAyB,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,SAAS,gBAAgB,EAAE,KAAK,IAAI,GAAG,MAAM,IAAI,CAEnG;IAEK,OAAO,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAc1D;IAED,IAAI,IAAI,IAAI,CASX;CAmNF"}
@@ -1,13 +0,0 @@
1
- import type { ConnectionLifecycleCapability } from "../connection/lifecycle";
2
- import type { ConnectionDependencies, ConnectionSyncClient } from "../connection/dependencies";
3
- import type { EpisodeDiagnosticRuntime } from "./episode-diagnostic-runtime";
4
- export declare function registerEpisodeDiagnosticConnection(connection: ConnectionLifecycleCapability, diagnostics: EpisodeDiagnosticRuntime): void;
5
- export declare function episodeDiagnosticsForConnection(connection: ConnectionLifecycleCapability): EpisodeDiagnosticRuntime | undefined;
6
- export declare function unregisterEpisodeDiagnosticConnection(connection: ConnectionLifecycleCapability, diagnostics?: EpisodeDiagnosticRuntime): void;
7
- export declare function registerEpisodeDiagnosticDependencies(dependencies: ConnectionDependencies, diagnostics: EpisodeDiagnosticRuntime): void;
8
- export declare function episodeDiagnosticsForDependencies(dependencies: ConnectionDependencies): EpisodeDiagnosticRuntime | undefined;
9
- export declare function unregisterEpisodeDiagnosticDependencies(dependencies: ConnectionDependencies, diagnostics?: EpisodeDiagnosticRuntime): void;
10
- export declare function registerEpisodeDiagnosticSyncClient<T extends ConnectionSyncClient>(client: T, diagnostics: EpisodeDiagnosticRuntime): T;
11
- export declare function episodeDiagnosticsForSyncClient(client: object): EpisodeDiagnosticRuntime | undefined;
12
- export declare function unregisterEpisodeDiagnosticSyncClient(client: object, diagnostics?: EpisodeDiagnosticRuntime): void;
13
- //# sourceMappingURL=episode-diagnostic-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"episode-diagnostic-registry.d.ts","sourceRoot":"","sources":["../../src/space-client/episode-diagnostic-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAC/F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAM7E,wBAAgB,mCAAmC,CAAC,UAAU,EAAE,6BAA6B,EAAE,WAAW,EAAE,wBAAwB,GAAG,IAAI,CAE1I;AAED,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,6BAA6B,GAAG,wBAAwB,GAAG,SAAS,CAE/H;AAED,wBAAgB,qCAAqC,CAAC,UAAU,EAAE,6BAA6B,EAAE,WAAW,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAE7I;AAED,wBAAgB,qCAAqC,CAAC,YAAY,EAAE,sBAAsB,EAAE,WAAW,EAAE,wBAAwB,GAAG,IAAI,CAEvI;AAED,wBAAgB,iCAAiC,CAAC,YAAY,EAAE,sBAAsB,GAAG,wBAAwB,GAAG,SAAS,CAE5H;AAED,wBAAgB,uCAAuC,CAAC,YAAY,EAAE,sBAAsB,EAAE,WAAW,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAE1I;AAED,wBAAgB,mCAAmC,CAAC,CAAC,SAAS,oBAAoB,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,wBAAwB,GAAG,CAAC,CAGvI;AAED,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,GAAG,wBAAwB,GAAG,SAAS,CAEpG;AAED,wBAAgB,qCAAqC,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAElH"}
@@ -1,4 +0,0 @@
1
- import type { EpisodeDiagnosticRuntime } from "./episode-diagnostic-runtime";
2
- export declare function registerEpisodeDiagnosticTrack(track: MediaStreamTrack, source: "camera" | "screen", diagnostics: EpisodeDiagnosticRuntime): void;
3
- export declare function unregisterEpisodeDiagnosticTrack(track: MediaStreamTrack, diagnostics?: EpisodeDiagnosticRuntime): void;
4
- //# sourceMappingURL=episode-diagnostic-render-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"episode-diagnostic-render-registry.d.ts","sourceRoot":"","sources":["../../src/space-client/episode-diagnostic-render-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAU7E,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,GAAG,QAAQ,EAAE,WAAW,EAAE,wBAAwB,GAAG,IAAI,CAwBhJ;AAED,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,gBAAgB,EAAE,WAAW,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAQtH"}
@@ -1,105 +0,0 @@
1
- import { type DiagnosticAttributes, type DiagnosticEventDraft, type DiagnosticEventState, type DiagnosticRelease } from "@q9labsai/diagnostics-contracts";
2
- import { parseEpisodeDiagnosticCredential, type EpisodeDiagnosticCredential } from "../access/episode-diagnostic-credential";
3
- export type EpisodeDiagnosticRuntimeOptions = Readonly<{
4
- apiBaseUrl: string;
5
- createId: () => string;
6
- fetch?: typeof globalThis.fetch;
7
- now?: () => number;
8
- setTimeout?: (callback: () => void, milliseconds: number) => unknown;
9
- clearTimeout?: (handle: unknown) => void;
10
- journeyId?: string;
11
- traceparent?: string;
12
- tracestate?: string;
13
- maxRingEvents?: number;
14
- maxRingBytes?: number;
15
- maxRingAgeMs?: number;
16
- maxQueueEvents?: number;
17
- maxQueueBytes?: number;
18
- maxQueueAgeMs?: number;
19
- maxBatchEvents?: number;
20
- maxBatchBytes?: number;
21
- maxRetryAttempts?: number;
22
- retryDelayMs?: number;
23
- release?: DiagnosticRelease;
24
- exporter?: EpisodeDiagnosticExporter;
25
- }>;
26
- export type EpisodeDiagnosticDeliveryResult = Readonly<{
27
- accepted: readonly string[];
28
- duplicates: readonly string[];
29
- conflicts: readonly string[];
30
- }>;
31
- export type EpisodeDiagnosticExporter = (request: Readonly<{
32
- endpoint: string;
33
- token: string;
34
- signal: AbortSignal;
35
- body: Readonly<{
36
- version: 1;
37
- producer: Readonly<{
38
- id: "sdk";
39
- instanceId: string;
40
- generation: number;
41
- }>;
42
- events: readonly DiagnosticEventDraft[];
43
- }>;
44
- }>) => Promise<EpisodeDiagnosticDeliveryResult | void>;
45
- export type EpisodeDiagnosticCorrelationInput = Readonly<{
46
- journeyId?: string;
47
- traceId?: string;
48
- spanId?: string;
49
- requestId?: string;
50
- commandId?: string;
51
- retryGroupRef?: string;
52
- attempt?: number;
53
- provider?: Readonly<{
54
- value: string;
55
- storage: "hmac";
56
- }>;
57
- }>;
58
- export type EpisodeDiagnosticObservation = Readonly<{
59
- name: string;
60
- phase: string;
61
- state: DiagnosticEventState;
62
- operationRef?: string;
63
- parentOperationRef?: string;
64
- checkpoint?: string;
65
- attributes?: Readonly<Record<string, unknown>>;
66
- correlation?: EpisodeDiagnosticCorrelationInput;
67
- }>;
68
- export type EpisodeDiagnosticOperation = Readonly<{
69
- ref: string;
70
- observe: (phase: string, checkpoint: string, attributes?: Readonly<Record<string, unknown>>) => void;
71
- succeed: (attributes?: Readonly<Record<string, unknown>>) => void;
72
- fail: (reason?: string) => void;
73
- notObservable: (checkpoint: string, reason?: string) => void;
74
- }>;
75
- /** Private, framework-neutral semantic diagnostics. It never owns or gates product work. */
76
- export declare class EpisodeDiagnosticRuntime {
77
- #private;
78
- constructor(options: EpisodeDiagnosticRuntimeOptions);
79
- rotateCredential(credential: EpisodeDiagnosticCredential | null): void;
80
- context(operationRef?: string): Readonly<{
81
- journeyId: string;
82
- traceparent: string;
83
- tracestate?: string;
84
- producerOperationRef?: string;
85
- }>;
86
- activeContext(): ReturnType<EpisodeDiagnosticRuntime["context"]> | undefined;
87
- /** Internal Feedback seam. It returns only a short-lived verified credential to the private transport. */
88
- feedbackCredentialUnsafe(): EpisodeDiagnosticCredential | null;
89
- feedbackAvailabilityUnsafe(): "available" | "disabled" | "disposed" | "unavailable";
90
- startOperation(name: string, attributes?: Readonly<Record<string, unknown>>, parentOperationRef?: string, producerOperationRef?: string, correlationInput?: EpisodeDiagnosticCorrelationInput): EpisodeDiagnosticOperation | undefined;
91
- observe(input: EpisodeDiagnosticObservation): void;
92
- observePromise<T>(operation: EpisodeDiagnosticOperation | undefined, promise: Promise<T>): Promise<T>;
93
- dispose(): void;
94
- /** Internal deterministic proof seam; it is not exported by the package. */
95
- inspect(): Readonly<{
96
- ring: readonly DiagnosticEventDraft[];
97
- queue: readonly DiagnosticEventDraft[];
98
- quarantine: readonly DiagnosticEventDraft[];
99
- dropped: number;
100
- credentialGeneration: number | null;
101
- }>;
102
- }
103
- export { parseEpisodeDiagnosticCredential };
104
- export type { DiagnosticAttributes, EpisodeDiagnosticCredential };
105
- //# sourceMappingURL=episode-diagnostic-runtime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"episode-diagnostic-runtime.d.ts","sourceRoot":"","sources":["../../src/space-client/episode-diagnostic-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8F,KAAK,oBAAoB,EAAmC,KAAK,oBAAoB,EAAE,KAAK,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACvR,OAAO,EAAE,gCAAgC,EAAoC,KAAK,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAe/J,MAAM,MAAM,+BAA+B,GAAG,QAAQ,CAAC;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC;IACrE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O,IAAI,IAAI,CAKd;IAED,4EAA4E;IAC5E,OAAO,IAAI,QAAQ,CAAC;QAAE,IAAI,EAAE,SAAS,oBAAoB,EAAE,CAAC;QAAC,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAC;QAAC,UAAU,EAAE,SAAS,oBAAoB,EAAE,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAQxM;CA4OF;AAmLD,OAAO,EAAE,gCAAgC,EAAE,CAAC;AAC5C,YAAY,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { TelemetryAttributes } from "./types";
2
- export declare const TELEMETRY_BUILT_IN_ATTRIBUTE_KEYS: readonly ["journey_kind", "category", "code", "metric_value", "child_journey_id", "relationship", "method", "route", "duration_ms", "status_code", "direction", "frame_type", "connection_state", "ice_connection_state", "signaling_state", "dtls_state", "selected_candidate_pair_state", "bytes_received", "bytes_sent", "frames_dropped", "inbound_streams", "outbound_streams", "packets_lost", "packets_received", "packets_sent", "transport_entries", "jitter_ms", "round_trip_time_ms"];
3
- export type TelemetryAttributeNormalizationOptions = {
4
- readonly reservedKeys?: readonly string[];
5
- };
6
- export declare function normalizeTelemetryAttributes(attributes: TelemetryAttributes | undefined, options?: TelemetryAttributeNormalizationOptions): TelemetryAttributes | undefined;
7
- //# sourceMappingURL=attributes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/telemetry/attributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAA2B,MAAM,SAAS,CAAC;AAM5E,eAAO,MAAM,iCAAiC,YAC5C,cAAc,EACd,UAAU,EACV,MAAM,EACN,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,OAAO,EACP,aAAa,EACb,aAAa,EACb,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,+BAA+B,EAC/B,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,oBAAoB,CACZ,CAAC;AAgCX,MAAM,MAAM,sCAAsC,GAAG;IACnD,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,mBAAmB,GAAG,SAAS,EAAE,OAAO,GAAE,sCAA2C,GAAG,mBAAmB,GAAG,SAAS,CAW/K"}
@@ -1,44 +0,0 @@
1
- import { type TelemetryAttributeNormalizationOptions } from "./attributes";
2
- import { type TelemetryExporterHealth, type TelemetryTimelineEntry } from "./delivery";
3
- import { type TelemetryExporter, type TelemetryExportOptions } from "./exporter";
4
- import { TelemetryJourney, type StartJourneyOptions } from "./journey";
5
- import type { TelemetryStorage } from "./storage";
6
- import { type JourneyTelemetryContext, type TelemetryEvent, type TelemetryEventDraft } from "./types";
7
- export type { TelemetryExporterHealth, TelemetryTimelineEntry } from "./delivery";
8
- export { createJourneyIntakeExporter, toJourneyIntakeEvent } from "./exporter";
9
- export type { JourneyIntakeExporterOptions, TelemetryExporter, TelemetryExportOptions } from "./exporter";
10
- export { TelemetryJourney } from "./journey";
11
- export type { DiagnosticObservation, HttpRequestObservation, StartJourneyOptions, SyncFrameObservation } from "./journey";
12
- export type TelemetryClientOptions = {
13
- /** Telemetry remains inert until a first-party surface explicitly sets this to true. */
14
- readonly enabled?: boolean;
15
- readonly baseUrl?: string | URL;
16
- readonly credentials?: RequestCredentials;
17
- readonly exporter?: TelemetryExporter;
18
- readonly exporterPath?: string;
19
- readonly fetch?: typeof globalThis.fetch;
20
- /** Caps each request at 100 events, the v1 journey intake limit. */
21
- readonly maxBatchSize?: number;
22
- readonly maxQueueSize?: number;
23
- readonly maxTimelineEntries?: number;
24
- readonly now?: () => Date;
25
- readonly onDrop?: (droppedEvents: readonly TelemetryEvent[]) => void;
26
- readonly retryDelayMs?: number;
27
- readonly storage?: TelemetryStorage;
28
- };
29
- export declare class TelemetryClient {
30
- #private;
31
- readonly enabled: boolean;
32
- constructor(options?: TelemetryClientOptions);
33
- startJourney(options: StartJourneyOptions): TelemetryJourney;
34
- getExporterHealth(): TelemetryExporterHealth;
35
- getTimeline(): readonly TelemetryTimelineEntry[];
36
- getPendingEvents(): readonly TelemetryEvent[];
37
- subscribeExporterHealth(listener: (health: TelemetryExporterHealth) => void): () => void;
38
- flush(options?: TelemetryExportOptions): Promise<void>;
39
- dispose(): void;
40
- /** Internal for TelemetryJourney. Event construction remains synchronous and never waits for storage or network I/O. */
41
- emit(context: JourneyTelemetryContext, sequence: number, draft: TelemetryEventDraft, options?: TelemetryAttributeNormalizationOptions): TelemetryEvent;
42
- }
43
- export declare function createTelemetryClient(options?: TelemetryClientOptions): TelemetryClient;
44
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/telemetry/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAgC,KAAK,sCAAsC,EAAE,MAAM,cAAc,CAAC;AACzG,OAAO,EAA6F,KAAK,uBAAuB,EAAE,KAAK,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAClL,OAAO,EAAoE,KAAK,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACnJ,OAAO,EAAE,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAA2B,KAAK,uBAAuB,EAAE,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE/H,YAAY,EAAE,uBAAuB,EAAE,sBAAsB,EAA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;IAED,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,gBAAgB,CAI3D;IAED,iBAAiB,IAAI,uBAAuB,CAE3C;IAED,WAAW,IAAI,SAAS,sBAAsB,EAAE,CAE/C;IAED,gBAAgB,IAAI,SAAS,cAAc,EAAE,CAE5C;IAED,uBAAuB,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,GAAG,MAAM,IAAI,CAEvF;IAEK,KAAK,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAK3D;IAED,OAAO,IAAI,IAAI,CAId;IAED,wHAAwH;IACxH,IAAI,CAAC,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,sCAAsC,GAAG,cAAc,CAsBrJ;CACF;AAED,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,sBAA2B,GAAG,eAAe,CAE3F"}
@@ -1,107 +0,0 @@
1
- import { Context, Effect, Layer, SubscriptionRef, type Scope } from "effect";
2
- import { toJourneyIntakeEvent, type TelemetryExporter, type TelemetryExportOptions } from "./exporter";
3
- import type { TelemetryStorage } from "./storage";
4
- import type { JourneyPhase, JourneyState, TelemetryEvent } from "./types";
5
- export type TelemetryExporterHealth = {
6
- readonly droppedEvents: number;
7
- readonly exportedEvents: number;
8
- readonly failedBatches: number;
9
- readonly lastError?: string;
10
- readonly queueDepth: number;
11
- readonly status: "degraded" | "idle" | "healthy";
12
- };
13
- export type TelemetryTimelineEntry = {
14
- readonly eventId: string;
15
- readonly name: TelemetryEvent["name"];
16
- readonly occurredAt: string;
17
- readonly phase: JourneyPhase;
18
- readonly state: JourneyState;
19
- };
20
- export type TelemetryDeliveryOptions = {
21
- readonly batchSize: number;
22
- readonly enabled: boolean;
23
- readonly exporter?: TelemetryExporter;
24
- readonly maxQueueSize: number;
25
- readonly maxTimelineEntries: number;
26
- readonly onDrop?: (droppedEvents: readonly TelemetryEvent[]) => void;
27
- readonly retryDelayMs: number;
28
- readonly storage?: TelemetryStorage;
29
- };
30
- export declare const NORMAL_FLUSH_DELAY_MS = 50;
31
- declare const TelemetryExportFailure_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
32
- readonly _tag: "TelemetryExportFailure";
33
- } & Readonly<A>;
34
- export declare class TelemetryExportFailure extends TelemetryExportFailure_base<{
35
- readonly cause: unknown;
36
- readonly retriable: boolean;
37
- }> {
38
- }
39
- declare const TelemetryStorageFailure_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
40
- readonly _tag: "TelemetryStorageFailure";
41
- } & Readonly<A>;
42
- export declare class TelemetryStorageFailure extends TelemetryStorageFailure_base<{
43
- readonly cause: unknown;
44
- }> {
45
- }
46
- export type TelemetryExporterCapability = {
47
- readonly configured: boolean;
48
- readonly export: (events: readonly ReturnType<typeof toJourneyIntakeEvent>[], options?: TelemetryExportOptions) => Effect.Effect<void, TelemetryExportFailure>;
49
- };
50
- export type TelemetryStorageCapability = {
51
- readonly configured: boolean;
52
- readonly load: Effect.Effect<readonly TelemetryEvent[], TelemetryStorageFailure>;
53
- readonly save: (events: readonly TelemetryEvent[]) => Effect.Effect<void, TelemetryStorageFailure>;
54
- };
55
- declare const TelemetryExporterService_base: Context.ServiceClass<TelemetryExporterService, "@chalk/telemetry/TelemetryExporter", TelemetryExporterCapability>;
56
- /** Capability boundary for the existing Promise-based exporter. */
57
- export declare class TelemetryExporterService extends TelemetryExporterService_base {
58
- }
59
- declare const TelemetryStorageService_base: Context.ServiceClass<TelemetryStorageService, "@chalk/telemetry/TelemetryStorage", TelemetryStorageCapability>;
60
- /** Capability boundary for the existing Promise-based durable queue. */
61
- export declare class TelemetryStorageService extends TelemetryStorageService_base {
62
- }
63
- export declare const makeTelemetryExporterLayer: (exporter?: TelemetryExporter) => Layer.Layer<TelemetryExporterService, never, never>;
64
- export declare const makeFakeTelemetryExporterLayer: (exporter: TelemetryExporter) => Layer.Layer<TelemetryExporterService, never, never>;
65
- export declare const makeTelemetryStorageLayer: (storage?: TelemetryStorage) => Layer.Layer<TelemetryStorageService, never, never>;
66
- export declare const makeFakeTelemetryStorageLayer: (storage: TelemetryStorage) => Layer.Layer<TelemetryStorageService, never, never>;
67
- export type TelemetryDeliveryEffectService = {
68
- readonly healthRef: SubscriptionRef.SubscriptionRef<TelemetryExporterHealth>;
69
- readonly pendingRef: SubscriptionRef.SubscriptionRef<readonly TelemetryEvent[]>;
70
- readonly enqueue: (event: TelemetryEvent) => Effect.Effect<void>;
71
- readonly enqueueUnsafe: (event: TelemetryEvent) => boolean;
72
- readonly flush: (options?: TelemetryExportOptions) => Effect.Effect<void>;
73
- readonly persist: () => Effect.Effect<void>;
74
- readonly dispose: () => Effect.Effect<void>;
75
- readonly awaitReady: () => Effect.Effect<void>;
76
- readonly getHealthUnsafe: () => TelemetryExporterHealth;
77
- readonly getPendingEventsUnsafe: () => readonly TelemetryEvent[];
78
- readonly getTimelineUnsafe: () => readonly TelemetryTimelineEntry[];
79
- readonly subscribe: (listener: (health: TelemetryExporterHealth) => void) => () => void;
80
- };
81
- declare const TelemetryDeliveryService_base: Context.ServiceClass<TelemetryDeliveryService, "@chalk/telemetry/TelemetryDelivery", TelemetryDeliveryEffectService>;
82
- /** The scoped, Effect-native delivery capability. */
83
- export declare class TelemetryDeliveryService extends TelemetryDeliveryService_base {
84
- }
85
- /** Builds a scoped delivery capability using production wrappers around the legacy interfaces. */
86
- export declare const makeTelemetryDeliveryLayer: (options: TelemetryDeliveryOptions) => Layer.Layer<TelemetryDeliveryService, never, never>;
87
- /** Builds a scoped delivery capability from exporter and storage services supplied by a test or application layer. */
88
- export declare const makeTelemetryDeliveryLayerFromServices: (options: Omit<TelemetryDeliveryOptions, "exporter" | "storage">) => Layer.Layer<TelemetryDeliveryService, never, TelemetryExporterService | TelemetryStorageService>;
89
- export declare function makeTelemetryDeliveryService(options: TelemetryDeliveryOptions, exporter?: TelemetryExporterCapability, storage?: TelemetryStorageCapability): Effect.Effect<TelemetryDeliveryEffectService, never, Scope.Scope>;
90
- /**
91
- * Compatibility facade for the synchronous client API. All durable work stays
92
- * in the scoped Effect pipeline below; this class only bridges its public
93
- * Promise methods and immediate snapshots.
94
- */
95
- export declare class TelemetryDelivery {
96
- #private;
97
- constructor(options: TelemetryDeliveryOptions);
98
- getHealth(): TelemetryExporterHealth;
99
- getTimeline(): readonly TelemetryTimelineEntry[];
100
- getPendingEvents(): readonly TelemetryEvent[];
101
- subscribe(listener: (health: TelemetryExporterHealth) => void): () => void;
102
- flush(options?: TelemetryExportOptions): Promise<void>;
103
- dispose(): void;
104
- enqueue(event: TelemetryEvent): void;
105
- }
106
- export {};
107
- //# sourceMappingURL=delivery.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../../src/telemetry/delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkB,MAAM,EAAE,KAAK,EAAsD,eAAe,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEjJ,OAAO,EAAqL,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAC1R,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE1E,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CA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uB,CAEnC;IAED,WAAW,IAAI,SAAS,sBAAsB,EAAE,CAE/C;IAED,gBAAgB,IAAI,SAAS,cAAc,EAAE,CAE5C;IAED,SAAS,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,GAAG,MAAM,IAAI,CAEzE;IAEK,KAAK,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAG3D;IAED,OAAO,IAAI,IAAI,CAKd;IAED,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAGnC;CACF"}
@@ -1,38 +0,0 @@
1
- import type { JourneyIntakeEvent, JourneyIntakeResponse, TelemetryEvent } from "./types";
2
- export type JourneyIntakeExporterOptions = {
3
- readonly baseUrl: string | URL;
4
- readonly credentials?: RequestCredentials;
5
- readonly fetch?: typeof globalThis.fetch;
6
- readonly headers?: Readonly<Record<string, string>> | (() => Readonly<Record<string, string>> | Promise<Readonly<Record<string, string>>>);
7
- readonly path?: string;
8
- };
9
- export type TelemetryExportOptions = {
10
- /** Keeps a browser request eligible to complete while the page is unloading. */
11
- readonly keepalive?: boolean;
12
- };
13
- /** Reserves headroom below the browser's 64 KiB aggregate quota for a concurrent terminal event. */
14
- export declare const MAX_KEEPALIVE_BODY_BYTES: number;
15
- /** Matches the v1 journey intake API's maximum events per request. */
16
- export declare const MAX_JOURNEY_INTAKE_EVENTS_PER_BATCH = 100;
17
- /** Matches the v1 journey intake API's 1 MiB request-body limit. */
18
- export declare const MAX_JOURNEY_INTAKE_BODY_BYTES: number;
19
- /** Reserves 64 KiB below the API request-body limit for request-processing headroom. */
20
- export declare const MAX_JOURNEY_INTAKE_BATCH_BODY_BYTES: number;
21
- export type TelemetryExporter = (events: readonly JourneyIntakeEvent[], options?: TelemetryExportOptions) => Promise<JourneyIntakeResponse | void>;
22
- export declare class TelemetryExportError extends Error {
23
- readonly retriable: boolean;
24
- readonly status: number;
25
- constructor(status: number);
26
- }
27
- export declare function isRetriableTelemetryExportError(error: unknown): boolean;
28
- export declare function createJourneyIntakeExporter(options: JourneyIntakeExporterOptions): TelemetryExporter;
29
- export declare class TelemetryPayloadTooLargeError extends Error {
30
- readonly retriable = false;
31
- constructor();
32
- }
33
- export declare function toJourneyIntakeEvent(event: TelemetryEvent): JourneyIntakeEvent;
34
- export declare function journeyContextBatches<TEvent extends Pick<JourneyIntakeEvent, "journey_id" | "traceparent" | "tracestate">>(events: readonly TEvent[]): TEvent[][];
35
- export declare function sharesJourneyContext(left: Pick<JourneyIntakeEvent, "journey_id" | "traceparent" | "tracestate">, right: Pick<JourneyIntakeEvent, "journey_id" | "traceparent" | "tracestate">): boolean;
36
- export declare function journeyIntakeBody(events: readonly JourneyIntakeEvent[]): string;
37
- export declare function encodedByteLength(value: string): number;
38
- //# sourceMappingURL=exporter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../src/telemetry/exporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzF,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC;IAC/B,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3I,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF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C,kBAAkB,EAAE,YAAY,GAAG,aAAa,GAAG,YAAY,CAAC,GAAG,OAAO,CAEvM;AAcD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,CAI/E;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD"}
@@ -1,7 +0,0 @@
1
- export * from "./client";
2
- export * from "./rtc";
3
- export * from "./storage";
4
- export * from "./sync";
5
- export * from "./trace";
6
- export * from "./types";
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/telemetry/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -1,50 +0,0 @@
1
- import {
2
- TELEMETRY_EVENT_VERSION,
3
- TelemetryClient,
4
- TelemetryJourney,
5
- createBrowserRuntimeTelemetryStorage,
6
- createBrowserTelemetryStorage,
7
- createJourneyIntakeExporter,
8
- createKeyValueTelemetryStorage,
9
- createMemoryTelemetryStorage,
10
- createTelemetryClient,
11
- rtcSummaryAttributes,
12
- summarizeRtcStats,
13
- toJourneyIntakeEvent
14
- } from "../chunk-EWTITNJ3.js";
15
- import {
16
- CHALK_JOURNEY_ID_HEADER,
17
- TRACEPARENT_HEADER,
18
- TRACESTATE_HEADER,
19
- createTraceContext,
20
- journeyHeaders,
21
- parseTraceparent,
22
- traceContextFromJourney
23
- } from "../chunk-HW5TTZL2.js";
24
- import {
25
- syncTelemetryCorrelation,
26
- withSyncTelemetryCorrelation
27
- } from "../chunk-PBSYXPNJ.js";
28
- export {
29
- CHALK_JOURNEY_ID_HEADER,
30
- TELEMETRY_EVENT_VERSION,
31
- TRACEPARENT_HEADER,
32
- TRACESTATE_HEADER,
33
- TelemetryClient,
34
- TelemetryJourney,
35
- createBrowserRuntimeTelemetryStorage,
36
- createBrowserTelemetryStorage,
37
- createJourneyIntakeExporter,
38
- createKeyValueTelemetryStorage,
39
- createMemoryTelemetryStorage,
40
- createTelemetryClient,
41
- createTraceContext,
42
- journeyHeaders,
43
- parseTraceparent,
44
- rtcSummaryAttributes,
45
- summarizeRtcStats,
46
- syncTelemetryCorrelation,
47
- toJourneyIntakeEvent,
48
- traceContextFromJourney,
49
- withSyncTelemetryCorrelation
50
- };
@@ -1,52 +0,0 @@
1
- import { type RtcConnectionStateSnapshot, type RtcStatsLike } from "./rtc";
2
- import type { TelemetryAttributeNormalizationOptions } from "./attributes";
3
- import type { JourneyPhase, JourneyState, JourneyTelemetryContext, TelemetryAttributes, TelemetryEvent, TelemetryEventDraft } from "./types";
4
- export type StartJourneyOptions = {
5
- readonly attributes?: TelemetryAttributes;
6
- readonly journeyId?: string;
7
- readonly kind: string;
8
- readonly parent?: TelemetryJourney;
9
- readonly traceparent?: string;
10
- readonly tracestate?: string;
11
- };
12
- export type HttpRequestObservation = {
13
- readonly durationMs?: number;
14
- readonly method: string;
15
- readonly route: string;
16
- readonly statusCode?: number;
17
- readonly state?: Extract<JourneyState, "failed" | "observed" | "succeeded">;
18
- };
19
- export type SyncFrameObservation = {
20
- readonly direction: "client_to_server" | "server_to_client";
21
- readonly frameType: string;
22
- readonly state?: Extract<JourneyState, "failed" | "observed" | "succeeded">;
23
- };
24
- export type DiagnosticObservation = {
25
- readonly category: "connection" | "device" | "episode" | "network" | "permission" | "recovery" | "whiteboard_renderer";
26
- readonly code: string;
27
- readonly attributes?: TelemetryAttributes;
28
- readonly metricValue?: number;
29
- readonly phase?: JourneyPhase;
30
- readonly state?: Extract<JourneyState, "failed" | "observed" | "succeeded">;
31
- };
32
- export type JourneyTelemetryHost = {
33
- emit(context: JourneyTelemetryContext, sequence: number, draft: TelemetryEventDraft, options?: TelemetryAttributeNormalizationOptions): TelemetryEvent;
34
- startJourney(options: StartJourneyOptions): TelemetryJourney;
35
- };
36
- export declare class TelemetryJourney {
37
- #private;
38
- readonly context: JourneyTelemetryContext;
39
- constructor(telemetry: JourneyTelemetryHost, context: JourneyTelemetryContext);
40
- get headers(): Record<string, string>;
41
- phase(phase: Exclude<JourneyPhase, "root" | "terminal">, attributes?: TelemetryAttributes): TelemetryEvent | undefined;
42
- terminal(state: Extract<JourneyState, "cancelled" | "failed" | "succeeded">, attributes?: TelemetryAttributes): TelemetryEvent;
43
- recordHttpRequest(observation: HttpRequestObservation): TelemetryEvent | undefined;
44
- recordSyncFrame(observation: SyncFrameObservation): TelemetryEvent | undefined;
45
- recordRtcSummary(connection: RtcConnectionStateSnapshot, stats: Iterable<RtcStatsLike>, state?: Extract<JourneyState, "failed" | "observed" | "succeeded">): TelemetryEvent | undefined;
46
- recordDiagnostic(observation: DiagnosticObservation): TelemetryEvent | undefined;
47
- startChild(options: Omit<StartJourneyOptions, "parent">): TelemetryJourney;
48
- record(draft: TelemetryEventDraft, options?: TelemetryAttributeNormalizationOptions): TelemetryEvent;
49
- linkChild(child: JourneyTelemetryContext): string;
50
- start(kind: string, attributes: TelemetryAttributes | undefined, parentEventId: string | undefined): void;
51
- }
52
- //# sourceMappingURL=journey.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"journey.d.ts","sourceRoot":"","sources":["../../src/telemetry/journey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,0BAA0B,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAEjG,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE7I,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,mBAAmB,CAAC;IAC1C,QAAQ,CAAC,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AAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG,gBAAgB,CAEzE;IAED,MAAM,CAAC,KAAK,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,sCAAsC,GAAG,cAAc,CAYnG;IAED,SAAS,CAAC,KAAK,EAAE,uBAAuB,GAAG,MAAM,CAShD;IAED,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB,GAAG,SAAS,EAAE,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAUxG;CACF"}
@@ -1,18 +0,0 @@
1
- import { Context, Layer } from "effect";
2
- type TelemetryRandom = {
3
- readonly nextIntUnsafe: () => number;
4
- };
5
- export type TelemetryEventSource = {
6
- readonly createUuid: () => string;
7
- readonly now: () => Date;
8
- readonly randomHex: (byteLength: number) => string;
9
- };
10
- declare const TelemetryEventSourceService_base: Context.ServiceClass<TelemetryEventSourceService, "@chalk/telemetry/TelemetryEventSource", TelemetryEventSource>;
11
- export declare class TelemetryEventSourceService extends TelemetryEventSourceService_base {
12
- }
13
- /** Uses Effect's production Clock and Random services, while retaining the public `now` override. */
14
- export declare const makeTelemetryEventSourceLayer: (now?: () => Date) => Layer.Layer<TelemetryEventSourceService, never, never>;
15
- export declare function randomHex(byteLength: number, random?: TelemetryRandom): string;
16
- export declare function createUuid(random?: TelemetryRandom): string;
17
- export {};
18
- //# sourceMappingURL=random.d.ts.map