segmind 0.5.1 → 0.6.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.
@@ -0,0 +1,245 @@
1
+ import { a as SessionTokenProvider, r as SessionState, E as EndReason, x as Usage, e as SessionCreatedEvent, f as AudioFormat, g as ServerEvent, o as ServerEventType, s as SessionUpdateParams, C as ClientEvent, d as SegmindError } from './errors-CcHEuSmR.cjs';
2
+
3
+ /**
4
+ * A managed realtime session: one primitive, explicit states, typed events,
5
+ * and a `close()` that resolves with what the session cost.
6
+ *
7
+ * `opening` the token is being minted and the socket is connecting; sends
8
+ * are queued (bounded) and flushed once the server says
9
+ * `session.created`.
10
+ * `live` sends go straight to the socket; a `ping` keeps the connection
11
+ * warm.
12
+ * `closed` terminal. Every ending reaches it exactly once: the server's
13
+ * `session.ended`, a refusal before the session opened, or a
14
+ * socket close with no frame (reason from the close code).
15
+ *
16
+ * A handle that has closed can never write again: `send*` after `closed`
17
+ * returns false and does nothing.
18
+ *
19
+ * Nothing here touches the DOM or a browser global: the socket comes from
20
+ * `webSocketFactory` (the runtime's `WebSocket` when none is given), so the
21
+ * same core runs in a browser, React Native or Node.
22
+ */
23
+
24
+ /** The production session service. */
25
+ declare const DEFAULT_REALTIME_URL = "wss://rt.segmind.com";
26
+ interface SessionOptions {
27
+ /** Session parameters sent on the query string (voice, instructions, vad…). */
28
+ params?: Record<string, string>;
29
+ /** The session's path on the service, from the model record's
30
+ * `endpoints.session`. Default `/<slug>`. */
31
+ path?: string;
32
+ /** Milliseconds between `ping` frames while live. 0 disables. Default 15000. */
33
+ heartbeatMs?: number;
34
+ /** Sends queued while opening, beyond which `send*` returns false. Default 64. */
35
+ maxQueuedSends?: number;
36
+ /** Aborting closes the session, or cancels the open while it is still opening. */
37
+ signal?: AbortSignal;
38
+ }
39
+ interface ClientOptions {
40
+ /** Where the session service lives. Default `wss://rt.segmind.com`. */
41
+ realtimeRoot?: string;
42
+ /**
43
+ * Trades the app's credentials for a short-lived session token. In a browser
44
+ * or a phone app it calls the app's own backend, which calls
45
+ * `segmind.realtime.createToken()`; the API key never leaves the server.
46
+ */
47
+ tokenProvider: SessionTokenProvider;
48
+ /** How to open the socket. Default: the runtime's global `WebSocket`. */
49
+ webSocketFactory?: (url: string) => WebSocketLike;
50
+ /** Injectable clock for tests. */
51
+ setInterval?: typeof setInterval;
52
+ clearInterval?: typeof clearInterval;
53
+ }
54
+ /** The subset of WebSocket the session needs, so tests can fake it. */
55
+ interface WebSocketLike {
56
+ readonly readyState: number;
57
+ binaryType?: string;
58
+ send(data: string | ArrayBuffer): void;
59
+ close(code?: number, reason?: string): void;
60
+ onopen: ((ev: unknown) => void) | null;
61
+ onmessage: ((ev: {
62
+ data: unknown;
63
+ }) => void) | null;
64
+ onclose: ((ev: {
65
+ code: number;
66
+ reason: string;
67
+ }) => void) | null;
68
+ onerror: ((ev: unknown) => void) | null;
69
+ }
70
+ type EventListener = (event: ServerEvent) => void;
71
+ /** A listener for one event type, typed by it. */
72
+ type TypedEventListener<T extends ServerEventType> = (event: Extract<ServerEvent, {
73
+ type: T;
74
+ }>) => void;
75
+ type StateListener = (state: SessionState, reason?: EndReason) => void;
76
+ interface SessionEnd {
77
+ reason: EndReason;
78
+ usage: Usage | null;
79
+ message?: string;
80
+ /**
81
+ * For a refusal, the server's error code (`insufficient_credits`,
82
+ * `capacity`, `service_unavailable`…), or `unsupported_protocol`.
83
+ */
84
+ code?: string;
85
+ /** The socket close code, when the ending came from a close rather than `session.ended`. */
86
+ closeCode?: number;
87
+ }
88
+ /**
89
+ * `open()` rejects with this when the session ends before it is live. `end`
90
+ * keeps the refusal's code and close code: branch on `end.code`
91
+ * (`insufficient_credits`, `capacity`…) rather than parsing the message.
92
+ */
93
+ declare class SessionOpenError extends SegmindError {
94
+ readonly end: SessionEnd;
95
+ constructor(end: SessionEnd);
96
+ /** The server's refusal code (`insufficient_credits`, `capacity`, `token_expired`…), when there is one. */
97
+ get code(): string | undefined;
98
+ }
99
+ declare class RealtimeSession {
100
+ readonly slug: string;
101
+ private readonly client;
102
+ private readonly options;
103
+ private _state;
104
+ private _reason;
105
+ private _usage;
106
+ private _end;
107
+ private _created;
108
+ private socket;
109
+ private readonly queue;
110
+ private readonly eventListeners;
111
+ private readonly stateListeners;
112
+ private readonly ended;
113
+ private resolveEnded;
114
+ private heartbeat;
115
+ private sawEndedFrame;
116
+ private opening;
117
+ private closeRequested;
118
+ /** The `error` frame of a refusal, held until the close that follows carries its code. */
119
+ private refusal;
120
+ constructor(slug: string, client: ClientOptions, options?: SessionOptions);
121
+ get state(): SessionState;
122
+ get reason(): EndReason | null;
123
+ /** The final usage, once the session has closed. */
124
+ get usage(): Usage | null;
125
+ /** How the session ended (reason, usage, refusal code, close code), once closed. */
126
+ get end(): SessionEnd | null;
127
+ /** The `session.created` frame, once live. */
128
+ get created(): SessionCreatedEvent | null;
129
+ /**
130
+ * The session's audio stream (`session.created.media.audio`): its rate,
131
+ * channels and binary tag. Null before live, or for a session without
132
+ * 16-bit PCM audio. Size capture and playback from it.
133
+ */
134
+ get audio(): AudioFormat | null;
135
+ /** Every server event. Returns a function that removes the listener. */
136
+ onEvent(listener: EventListener): () => void;
137
+ /** One event type, typed by it: `session.on('transcript.delta', (e) => e.text)`. */
138
+ on<T extends ServerEventType>(type: T, listener: TypedEventListener<T>): () => void;
139
+ onState(listener: StateListener): () => void;
140
+ /** Every server event as an async iterable; ends when the session closes. */
141
+ events(): AsyncIterable<ServerEvent>;
142
+ /** Mint a token and connect. Resolves when the session is live, rejects when refused. */
143
+ open(): Promise<SessionCreatedEvent>;
144
+ /**
145
+ * Resolves when the session has closed, whichever side ended it, with the
146
+ * final usage. Unlike `close()` it asks for nothing: use it to await the
147
+ * ending of a session something else will end.
148
+ */
149
+ whenEnded(): Promise<SessionEnd>;
150
+ /** Ask the server to end the session. Resolves with the final usage after settlement. */
151
+ close(): Promise<SessionEnd>;
152
+ /**
153
+ * Raw s16le PCM at the session rate (`audio.rate`), sent as a binary frame
154
+ * tagged with the audio stream's tag. Before live it is queued and tagged
155
+ * once `session.created` names the stream. Returns false when the session
156
+ * takes no audio input.
157
+ */
158
+ sendAudio(pcm: Int16Array | ArrayBuffer): boolean;
159
+ commitAudio(): boolean;
160
+ sendText(text: string): boolean;
161
+ interrupt(): boolean;
162
+ update(session: SessionUpdateParams): boolean;
163
+ send(event: ClientEvent): boolean;
164
+ private enqueue;
165
+ private flushQueue;
166
+ private rawSend;
167
+ private handleMessage;
168
+ private handleClose;
169
+ private finish;
170
+ private startHeartbeat;
171
+ private stopHeartbeat;
172
+ private setState;
173
+ private emit;
174
+ }
175
+ /**
176
+ * Holds the service root and the token provider, and hands out sessions.
177
+ * `connect()` is the shorthand for one session.
178
+ */
179
+ declare class RealtimeClient {
180
+ private readonly options;
181
+ constructor(options: ClientOptions);
182
+ /** A session handle in `opening`; call `open()` to connect. */
183
+ session(slug: string, options?: SessionOptions): RealtimeSession;
184
+ /** Mint, connect and resolve once live. */
185
+ connect(slug: string, options?: SessionOptions): Promise<RealtimeSession>;
186
+ }
187
+ /**
188
+ * Opens one session and resolves once it is live.
189
+ *
190
+ * ```ts
191
+ * import { connect } from 'segmind/realtime';
192
+ *
193
+ * const session = await connect('your-session-model', {
194
+ * tokenProvider: () => fetch('/api/realtime-token', { method: 'POST' }).then((r) => r.json()),
195
+ * });
196
+ * session.on('transcript.delta', (e) => console.log(e.role, e.text));
197
+ * session.sendText('Hello');
198
+ * const { usage } = await session.close();
199
+ * ```
200
+ */
201
+ declare function connect(slug: string, options: ClientOptions & SessionOptions): Promise<RealtimeSession>;
202
+
203
+ /**
204
+ * A small energy-based voice activity detector, run on the client's own
205
+ * microphone frames.
206
+ *
207
+ * Why it exists: the upstream's VAD reports that the user started speaking
208
+ * only after a delay, and the upstream generates faster than real time, so a
209
+ * short reply has been fully generated by then (the README has the figures).
210
+ * Detecting speech locally lets the client flush playback and send
211
+ * `interrupt` within one frame of the user opening their mouth.
212
+ *
213
+ * Pure: feed it frames, get `start` / `end` decisions. Measured in audio
214
+ * time, not wall-clock time, so it behaves the same from a file as from a
215
+ * microphone.
216
+ */
217
+ interface VadOptions {
218
+ /** RMS on the Int16 scale above which a frame counts as speech. Default 700. */
219
+ threshold?: number;
220
+ /** Consecutive speech frames before `start`. Default 2 (200 ms at 100 ms frames). */
221
+ startFrames?: number;
222
+ /** Silent audio after speech before `end`. Default 600 ms. */
223
+ endSilenceMs?: number;
224
+ sampleRate?: number;
225
+ }
226
+ type VadDecision = 'start' | 'end' | null;
227
+ declare class EnergyVad {
228
+ private readonly threshold;
229
+ private readonly startFrames;
230
+ private readonly endSilenceMs;
231
+ private readonly sampleRate;
232
+ private speaking;
233
+ private loudRun;
234
+ private silenceMs;
235
+ private _level;
236
+ constructor(options?: VadOptions);
237
+ /** The last frame's RMS, for a level meter. */
238
+ get level(): number;
239
+ get isSpeaking(): boolean;
240
+ feed(frame: Int16Array): VadDecision;
241
+ reset(): void;
242
+ }
243
+
244
+ export { DEFAULT_REALTIME_URL as D, EnergyVad as E, RealtimeSession as R, RealtimeClient as b, SessionOpenError as c, connect as g };
245
+ export type { ClientOptions as C, SessionEnd as S, TypedEventListener as T, VadOptions as V, WebSocketLike as W, EventListener as a, SessionOptions as d, StateListener as e, VadDecision as f };
@@ -0,0 +1,245 @@
1
+ import { a as SessionTokenProvider, r as SessionState, E as EndReason, x as Usage, e as SessionCreatedEvent, f as AudioFormat, g as ServerEvent, o as ServerEventType, s as SessionUpdateParams, C as ClientEvent, d as SegmindError } from './errors-CcHEuSmR.js';
2
+
3
+ /**
4
+ * A managed realtime session: one primitive, explicit states, typed events,
5
+ * and a `close()` that resolves with what the session cost.
6
+ *
7
+ * `opening` the token is being minted and the socket is connecting; sends
8
+ * are queued (bounded) and flushed once the server says
9
+ * `session.created`.
10
+ * `live` sends go straight to the socket; a `ping` keeps the connection
11
+ * warm.
12
+ * `closed` terminal. Every ending reaches it exactly once: the server's
13
+ * `session.ended`, a refusal before the session opened, or a
14
+ * socket close with no frame (reason from the close code).
15
+ *
16
+ * A handle that has closed can never write again: `send*` after `closed`
17
+ * returns false and does nothing.
18
+ *
19
+ * Nothing here touches the DOM or a browser global: the socket comes from
20
+ * `webSocketFactory` (the runtime's `WebSocket` when none is given), so the
21
+ * same core runs in a browser, React Native or Node.
22
+ */
23
+
24
+ /** The production session service. */
25
+ declare const DEFAULT_REALTIME_URL = "wss://rt.segmind.com";
26
+ interface SessionOptions {
27
+ /** Session parameters sent on the query string (voice, instructions, vad…). */
28
+ params?: Record<string, string>;
29
+ /** The session's path on the service, from the model record's
30
+ * `endpoints.session`. Default `/<slug>`. */
31
+ path?: string;
32
+ /** Milliseconds between `ping` frames while live. 0 disables. Default 15000. */
33
+ heartbeatMs?: number;
34
+ /** Sends queued while opening, beyond which `send*` returns false. Default 64. */
35
+ maxQueuedSends?: number;
36
+ /** Aborting closes the session, or cancels the open while it is still opening. */
37
+ signal?: AbortSignal;
38
+ }
39
+ interface ClientOptions {
40
+ /** Where the session service lives. Default `wss://rt.segmind.com`. */
41
+ realtimeRoot?: string;
42
+ /**
43
+ * Trades the app's credentials for a short-lived session token. In a browser
44
+ * or a phone app it calls the app's own backend, which calls
45
+ * `segmind.realtime.createToken()`; the API key never leaves the server.
46
+ */
47
+ tokenProvider: SessionTokenProvider;
48
+ /** How to open the socket. Default: the runtime's global `WebSocket`. */
49
+ webSocketFactory?: (url: string) => WebSocketLike;
50
+ /** Injectable clock for tests. */
51
+ setInterval?: typeof setInterval;
52
+ clearInterval?: typeof clearInterval;
53
+ }
54
+ /** The subset of WebSocket the session needs, so tests can fake it. */
55
+ interface WebSocketLike {
56
+ readonly readyState: number;
57
+ binaryType?: string;
58
+ send(data: string | ArrayBuffer): void;
59
+ close(code?: number, reason?: string): void;
60
+ onopen: ((ev: unknown) => void) | null;
61
+ onmessage: ((ev: {
62
+ data: unknown;
63
+ }) => void) | null;
64
+ onclose: ((ev: {
65
+ code: number;
66
+ reason: string;
67
+ }) => void) | null;
68
+ onerror: ((ev: unknown) => void) | null;
69
+ }
70
+ type EventListener = (event: ServerEvent) => void;
71
+ /** A listener for one event type, typed by it. */
72
+ type TypedEventListener<T extends ServerEventType> = (event: Extract<ServerEvent, {
73
+ type: T;
74
+ }>) => void;
75
+ type StateListener = (state: SessionState, reason?: EndReason) => void;
76
+ interface SessionEnd {
77
+ reason: EndReason;
78
+ usage: Usage | null;
79
+ message?: string;
80
+ /**
81
+ * For a refusal, the server's error code (`insufficient_credits`,
82
+ * `capacity`, `service_unavailable`…), or `unsupported_protocol`.
83
+ */
84
+ code?: string;
85
+ /** The socket close code, when the ending came from a close rather than `session.ended`. */
86
+ closeCode?: number;
87
+ }
88
+ /**
89
+ * `open()` rejects with this when the session ends before it is live. `end`
90
+ * keeps the refusal's code and close code: branch on `end.code`
91
+ * (`insufficient_credits`, `capacity`…) rather than parsing the message.
92
+ */
93
+ declare class SessionOpenError extends SegmindError {
94
+ readonly end: SessionEnd;
95
+ constructor(end: SessionEnd);
96
+ /** The server's refusal code (`insufficient_credits`, `capacity`, `token_expired`…), when there is one. */
97
+ get code(): string | undefined;
98
+ }
99
+ declare class RealtimeSession {
100
+ readonly slug: string;
101
+ private readonly client;
102
+ private readonly options;
103
+ private _state;
104
+ private _reason;
105
+ private _usage;
106
+ private _end;
107
+ private _created;
108
+ private socket;
109
+ private readonly queue;
110
+ private readonly eventListeners;
111
+ private readonly stateListeners;
112
+ private readonly ended;
113
+ private resolveEnded;
114
+ private heartbeat;
115
+ private sawEndedFrame;
116
+ private opening;
117
+ private closeRequested;
118
+ /** The `error` frame of a refusal, held until the close that follows carries its code. */
119
+ private refusal;
120
+ constructor(slug: string, client: ClientOptions, options?: SessionOptions);
121
+ get state(): SessionState;
122
+ get reason(): EndReason | null;
123
+ /** The final usage, once the session has closed. */
124
+ get usage(): Usage | null;
125
+ /** How the session ended (reason, usage, refusal code, close code), once closed. */
126
+ get end(): SessionEnd | null;
127
+ /** The `session.created` frame, once live. */
128
+ get created(): SessionCreatedEvent | null;
129
+ /**
130
+ * The session's audio stream (`session.created.media.audio`): its rate,
131
+ * channels and binary tag. Null before live, or for a session without
132
+ * 16-bit PCM audio. Size capture and playback from it.
133
+ */
134
+ get audio(): AudioFormat | null;
135
+ /** Every server event. Returns a function that removes the listener. */
136
+ onEvent(listener: EventListener): () => void;
137
+ /** One event type, typed by it: `session.on('transcript.delta', (e) => e.text)`. */
138
+ on<T extends ServerEventType>(type: T, listener: TypedEventListener<T>): () => void;
139
+ onState(listener: StateListener): () => void;
140
+ /** Every server event as an async iterable; ends when the session closes. */
141
+ events(): AsyncIterable<ServerEvent>;
142
+ /** Mint a token and connect. Resolves when the session is live, rejects when refused. */
143
+ open(): Promise<SessionCreatedEvent>;
144
+ /**
145
+ * Resolves when the session has closed, whichever side ended it, with the
146
+ * final usage. Unlike `close()` it asks for nothing: use it to await the
147
+ * ending of a session something else will end.
148
+ */
149
+ whenEnded(): Promise<SessionEnd>;
150
+ /** Ask the server to end the session. Resolves with the final usage after settlement. */
151
+ close(): Promise<SessionEnd>;
152
+ /**
153
+ * Raw s16le PCM at the session rate (`audio.rate`), sent as a binary frame
154
+ * tagged with the audio stream's tag. Before live it is queued and tagged
155
+ * once `session.created` names the stream. Returns false when the session
156
+ * takes no audio input.
157
+ */
158
+ sendAudio(pcm: Int16Array | ArrayBuffer): boolean;
159
+ commitAudio(): boolean;
160
+ sendText(text: string): boolean;
161
+ interrupt(): boolean;
162
+ update(session: SessionUpdateParams): boolean;
163
+ send(event: ClientEvent): boolean;
164
+ private enqueue;
165
+ private flushQueue;
166
+ private rawSend;
167
+ private handleMessage;
168
+ private handleClose;
169
+ private finish;
170
+ private startHeartbeat;
171
+ private stopHeartbeat;
172
+ private setState;
173
+ private emit;
174
+ }
175
+ /**
176
+ * Holds the service root and the token provider, and hands out sessions.
177
+ * `connect()` is the shorthand for one session.
178
+ */
179
+ declare class RealtimeClient {
180
+ private readonly options;
181
+ constructor(options: ClientOptions);
182
+ /** A session handle in `opening`; call `open()` to connect. */
183
+ session(slug: string, options?: SessionOptions): RealtimeSession;
184
+ /** Mint, connect and resolve once live. */
185
+ connect(slug: string, options?: SessionOptions): Promise<RealtimeSession>;
186
+ }
187
+ /**
188
+ * Opens one session and resolves once it is live.
189
+ *
190
+ * ```ts
191
+ * import { connect } from 'segmind/realtime';
192
+ *
193
+ * const session = await connect('your-session-model', {
194
+ * tokenProvider: () => fetch('/api/realtime-token', { method: 'POST' }).then((r) => r.json()),
195
+ * });
196
+ * session.on('transcript.delta', (e) => console.log(e.role, e.text));
197
+ * session.sendText('Hello');
198
+ * const { usage } = await session.close();
199
+ * ```
200
+ */
201
+ declare function connect(slug: string, options: ClientOptions & SessionOptions): Promise<RealtimeSession>;
202
+
203
+ /**
204
+ * A small energy-based voice activity detector, run on the client's own
205
+ * microphone frames.
206
+ *
207
+ * Why it exists: the upstream's VAD reports that the user started speaking
208
+ * only after a delay, and the upstream generates faster than real time, so a
209
+ * short reply has been fully generated by then (the README has the figures).
210
+ * Detecting speech locally lets the client flush playback and send
211
+ * `interrupt` within one frame of the user opening their mouth.
212
+ *
213
+ * Pure: feed it frames, get `start` / `end` decisions. Measured in audio
214
+ * time, not wall-clock time, so it behaves the same from a file as from a
215
+ * microphone.
216
+ */
217
+ interface VadOptions {
218
+ /** RMS on the Int16 scale above which a frame counts as speech. Default 700. */
219
+ threshold?: number;
220
+ /** Consecutive speech frames before `start`. Default 2 (200 ms at 100 ms frames). */
221
+ startFrames?: number;
222
+ /** Silent audio after speech before `end`. Default 600 ms. */
223
+ endSilenceMs?: number;
224
+ sampleRate?: number;
225
+ }
226
+ type VadDecision = 'start' | 'end' | null;
227
+ declare class EnergyVad {
228
+ private readonly threshold;
229
+ private readonly startFrames;
230
+ private readonly endSilenceMs;
231
+ private readonly sampleRate;
232
+ private speaking;
233
+ private loudRun;
234
+ private silenceMs;
235
+ private _level;
236
+ constructor(options?: VadOptions);
237
+ /** The last frame's RMS, for a level meter. */
238
+ get level(): number;
239
+ get isSpeaking(): boolean;
240
+ feed(frame: Int16Array): VadDecision;
241
+ reset(): void;
242
+ }
243
+
244
+ export { DEFAULT_REALTIME_URL as D, EnergyVad as E, RealtimeSession as R, RealtimeClient as b, SessionOpenError as c, connect as g };
245
+ export type { ClientOptions as C, SessionEnd as S, TypedEventListener as T, VadOptions as V, WebSocketLike as W, EventListener as a, SessionOptions as d, StateListener as e, VadDecision as f };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "segmind",
3
- "version": "0.5.1",
3
+ "version": "0.6.1",
4
4
  "description": "Official JavaScript SDK for the Segmind API: image, video, audio and LLM models from Node, browsers and React Native.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Segmind <support@segmind.com>",
@@ -10,7 +10,14 @@
10
10
  "url": "git+https://github.com/segmind/segmind-js.git",
11
11
  "directory": "packages/segmind"
12
12
  },
13
- "keywords": ["segmind", "ai", "image-generation", "video-generation", "llm", "sdk"],
13
+ "keywords": [
14
+ "segmind",
15
+ "ai",
16
+ "image-generation",
17
+ "video-generation",
18
+ "llm",
19
+ "sdk"
20
+ ],
14
21
  "type": "module",
15
22
  "sideEffects": false,
16
23
  "engines": {
@@ -30,17 +37,51 @@
30
37
  "default": "./dist/index.cjs"
31
38
  }
32
39
  },
40
+ "./realtime": {
41
+ "import": {
42
+ "types": "./dist/realtime/index.d.ts",
43
+ "default": "./dist/realtime/index.js"
44
+ },
45
+ "require": {
46
+ "types": "./dist/realtime/index.d.cts",
47
+ "default": "./dist/realtime/index.cjs"
48
+ }
49
+ },
50
+ "./realtime/browser": {
51
+ "import": {
52
+ "types": "./dist/realtime/browser/index.d.ts",
53
+ "default": "./dist/realtime/browser/index.js"
54
+ },
55
+ "require": {
56
+ "types": "./dist/realtime/browser/index.d.cts",
57
+ "default": "./dist/realtime/browser/index.cjs"
58
+ }
59
+ },
33
60
  "./package.json": "./package.json"
34
61
  },
35
- "files": ["dist", "README.md", "LICENSE"],
62
+ "typesVersions": {
63
+ "*": {
64
+ "realtime": [
65
+ "./dist/realtime/index.d.ts"
66
+ ],
67
+ "realtime/browser": [
68
+ "./dist/realtime/browser/index.d.ts"
69
+ ]
70
+ }
71
+ },
72
+ "files": [
73
+ "dist",
74
+ "README.md",
75
+ "LICENSE"
76
+ ],
77
+ "publishConfig": {
78
+ "access": "public",
79
+ "provenance": true
80
+ },
36
81
  "scripts": {
37
82
  "build": "tsup",
38
83
  "test": "vitest run",
39
84
  "typecheck": "tsc --noEmit -p tsconfig.json",
40
85
  "check:package": "publint && attw --pack ."
41
- },
42
- "publishConfig": {
43
- "access": "public",
44
- "provenance": true
45
86
  }
46
- }
87
+ }