@kortyx/react 0.2.0 → 0.2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @kortyx/react
2
2
 
3
+ ## [0.2.1](https://github.com/kortyx-io/kortyx/compare/react-v0.2.0...react-v0.2.1) (2026-05-03)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * update vulnerable dependency versions ([274bc41](https://github.com/kortyx-io/kortyx/commit/274bc410fe04d53da9db941ef8d62407dadd4c54))
9
+
3
10
  ## [0.2.0](https://github.com/kortyx-io/kortyx/compare/react-v0.1.0...react-v0.2.0) (2026-04-23)
4
11
 
5
12
 
package/dist/index.d.ts CHANGED
@@ -181,253 +181,253 @@ declare function useChat(options: UseChatOptions): UseChatValue;
181
181
 
182
182
  declare function useChatStreamDebug(): {
183
183
  streamDebug: ({
184
- type?: "session";
185
- sessionId?: string;
184
+ type: "session";
185
+ sessionId: string;
186
186
  } | {
187
- type?: "status";
188
- message?: string;
187
+ type: "status";
188
+ message: string;
189
189
  node?: string;
190
190
  } | {
191
- type?: "message";
191
+ type: "message";
192
+ content: string;
192
193
  node?: string;
193
- content?: string;
194
194
  } | {
195
- type?: "text-start";
196
- id?: string;
195
+ type: "text-start";
197
196
  node?: string;
197
+ id?: string;
198
198
  opId?: string;
199
199
  segmentId?: string;
200
200
  } | {
201
- type?: "text-delta";
202
- id?: string;
201
+ type: "text-delta";
202
+ delta: string;
203
203
  node?: string;
204
- delta?: string;
204
+ id?: string;
205
205
  opId?: string;
206
206
  segmentId?: string;
207
207
  } | {
208
- type?: "text-end";
209
- id?: string;
208
+ type: "text-end";
210
209
  node?: string;
210
+ id?: string;
211
211
  opId?: string;
212
212
  segmentId?: string;
213
213
  } | {
214
- type?: "tool-result";
215
- node?: string;
216
- content?: unknown;
214
+ type: "tool-result";
215
+ content: unknown;
217
216
  tool?: string;
217
+ node?: string;
218
218
  } | {
219
- type?: "interrupt";
220
- schemaId?: string;
221
- schemaVersion?: string;
222
- id?: string;
219
+ type: "interrupt";
220
+ requestId: string;
221
+ resumeToken: string;
222
+ workflow?: string;
223
223
  node?: string;
224
+ id?: string;
224
225
  opId?: string;
225
- requestId?: string;
226
- resumeToken?: string;
227
- workflow?: string;
226
+ schemaId?: string;
227
+ schemaVersion?: string;
228
228
  input?: {
229
- options?: never[];
230
- kind?: "text";
229
+ kind: "text";
230
+ multiple: boolean;
231
+ question?: string;
232
+ id?: string;
231
233
  schemaId?: string;
232
234
  schemaVersion?: string;
233
- id?: string;
234
- multiple?: boolean;
235
- question?: string;
236
235
  meta?: Record<string, unknown>;
236
+ options?: never[];
237
237
  } | {
238
- options?: {
239
- id?: string;
240
- label?: string;
238
+ kind: "choice" | "multi-choice";
239
+ multiple: boolean;
240
+ question: string;
241
+ options: {
242
+ id: string;
243
+ label: string;
241
244
  description?: string;
242
245
  }[];
243
- kind?: "choice" | "multi-choice";
246
+ id?: string;
244
247
  schemaId?: string;
245
248
  schemaVersion?: string;
246
- id?: string;
247
- multiple?: boolean;
248
- question?: string;
249
249
  meta?: Record<string, unknown>;
250
250
  };
251
251
  meta?: Record<string, unknown>;
252
252
  } | {
253
- type?: "structured-data";
254
- value?: unknown;
255
- path?: string;
256
- streamId?: string;
257
- dataType?: string;
258
- kind?: "set";
253
+ type: "structured-data";
254
+ streamId: string;
255
+ dataType: string;
256
+ kind: "set";
257
+ path: string;
258
+ value: unknown;
259
259
  schemaId?: string;
260
260
  schemaVersion?: string;
261
261
  id?: string;
262
262
  node?: string;
263
263
  } | {
264
- type?: "structured-data";
265
- path?: string;
266
- streamId?: string;
267
- dataType?: string;
268
- kind?: "append";
264
+ type: "structured-data";
265
+ streamId: string;
266
+ dataType: string;
267
+ kind: "append";
268
+ path: string;
269
+ items: unknown[];
269
270
  schemaId?: string;
270
271
  schemaVersion?: string;
271
272
  id?: string;
272
273
  node?: string;
273
- items?: unknown[];
274
274
  } | {
275
- type?: "structured-data";
276
- path?: string;
277
- streamId?: string;
278
- dataType?: string;
279
- kind?: "text-delta";
275
+ type: "structured-data";
276
+ streamId: string;
277
+ dataType: string;
278
+ kind: "text-delta";
279
+ path: string;
280
+ delta: string;
280
281
  schemaId?: string;
281
282
  schemaVersion?: string;
282
283
  id?: string;
283
284
  node?: string;
284
- delta?: string;
285
285
  } | {
286
- type?: "structured-data";
287
- streamId?: string;
288
- dataType?: string;
289
- kind?: "final";
286
+ type: "structured-data";
287
+ streamId: string;
288
+ dataType: string;
289
+ kind: "final";
290
+ data: unknown;
290
291
  schemaId?: string;
291
292
  schemaVersion?: string;
292
293
  id?: string;
293
294
  node?: string;
294
- data?: unknown;
295
295
  } | {
296
- type?: "transition";
297
- transitionTo?: string;
296
+ type: "transition";
297
+ transitionTo: string;
298
298
  payload?: any;
299
299
  } | {
300
- type?: "done";
300
+ type: "done";
301
301
  data?: any;
302
302
  } | {
303
- type?: "error";
304
- message?: string;
303
+ type: "error";
304
+ message: string;
305
305
  })[];
306
306
  clearStreamDebug: () => void;
307
307
  createRecorder: (initialMessage: string) => {
308
308
  push: (chunk: StreamChunk) => void;
309
309
  getAll: () => ({
310
- type?: "session";
311
- sessionId?: string;
310
+ type: "session";
311
+ sessionId: string;
312
312
  } | {
313
- type?: "status";
314
- message?: string;
313
+ type: "status";
314
+ message: string;
315
315
  node?: string;
316
316
  } | {
317
- type?: "message";
317
+ type: "message";
318
+ content: string;
318
319
  node?: string;
319
- content?: string;
320
320
  } | {
321
- type?: "text-start";
322
- id?: string;
321
+ type: "text-start";
323
322
  node?: string;
323
+ id?: string;
324
324
  opId?: string;
325
325
  segmentId?: string;
326
326
  } | {
327
- type?: "text-delta";
328
- id?: string;
327
+ type: "text-delta";
328
+ delta: string;
329
329
  node?: string;
330
- delta?: string;
330
+ id?: string;
331
331
  opId?: string;
332
332
  segmentId?: string;
333
333
  } | {
334
- type?: "text-end";
335
- id?: string;
334
+ type: "text-end";
336
335
  node?: string;
336
+ id?: string;
337
337
  opId?: string;
338
338
  segmentId?: string;
339
339
  } | {
340
- type?: "tool-result";
341
- node?: string;
342
- content?: unknown;
340
+ type: "tool-result";
341
+ content: unknown;
343
342
  tool?: string;
343
+ node?: string;
344
344
  } | {
345
- type?: "interrupt";
346
- schemaId?: string;
347
- schemaVersion?: string;
348
- id?: string;
345
+ type: "interrupt";
346
+ requestId: string;
347
+ resumeToken: string;
348
+ workflow?: string;
349
349
  node?: string;
350
+ id?: string;
350
351
  opId?: string;
351
- requestId?: string;
352
- resumeToken?: string;
353
- workflow?: string;
352
+ schemaId?: string;
353
+ schemaVersion?: string;
354
354
  input?: {
355
- options?: never[];
356
- kind?: "text";
355
+ kind: "text";
356
+ multiple: boolean;
357
+ question?: string;
358
+ id?: string;
357
359
  schemaId?: string;
358
360
  schemaVersion?: string;
359
- id?: string;
360
- multiple?: boolean;
361
- question?: string;
362
361
  meta?: Record<string, unknown>;
362
+ options?: never[];
363
363
  } | {
364
- options?: {
365
- id?: string;
366
- label?: string;
364
+ kind: "choice" | "multi-choice";
365
+ multiple: boolean;
366
+ question: string;
367
+ options: {
368
+ id: string;
369
+ label: string;
367
370
  description?: string;
368
371
  }[];
369
- kind?: "choice" | "multi-choice";
372
+ id?: string;
370
373
  schemaId?: string;
371
374
  schemaVersion?: string;
372
- id?: string;
373
- multiple?: boolean;
374
- question?: string;
375
375
  meta?: Record<string, unknown>;
376
376
  };
377
377
  meta?: Record<string, unknown>;
378
378
  } | {
379
- type?: "structured-data";
380
- value?: unknown;
381
- path?: string;
382
- streamId?: string;
383
- dataType?: string;
384
- kind?: "set";
379
+ type: "structured-data";
380
+ streamId: string;
381
+ dataType: string;
382
+ kind: "set";
383
+ path: string;
384
+ value: unknown;
385
385
  schemaId?: string;
386
386
  schemaVersion?: string;
387
387
  id?: string;
388
388
  node?: string;
389
389
  } | {
390
- type?: "structured-data";
391
- path?: string;
392
- streamId?: string;
393
- dataType?: string;
394
- kind?: "append";
390
+ type: "structured-data";
391
+ streamId: string;
392
+ dataType: string;
393
+ kind: "append";
394
+ path: string;
395
+ items: unknown[];
395
396
  schemaId?: string;
396
397
  schemaVersion?: string;
397
398
  id?: string;
398
399
  node?: string;
399
- items?: unknown[];
400
400
  } | {
401
- type?: "structured-data";
402
- path?: string;
403
- streamId?: string;
404
- dataType?: string;
405
- kind?: "text-delta";
401
+ type: "structured-data";
402
+ streamId: string;
403
+ dataType: string;
404
+ kind: "text-delta";
405
+ path: string;
406
+ delta: string;
406
407
  schemaId?: string;
407
408
  schemaVersion?: string;
408
409
  id?: string;
409
410
  node?: string;
410
- delta?: string;
411
411
  } | {
412
- type?: "structured-data";
413
- streamId?: string;
414
- dataType?: string;
415
- kind?: "final";
412
+ type: "structured-data";
413
+ streamId: string;
414
+ dataType: string;
415
+ kind: "final";
416
+ data: unknown;
416
417
  schemaId?: string;
417
418
  schemaVersion?: string;
418
419
  id?: string;
419
420
  node?: string;
420
- data?: unknown;
421
421
  } | {
422
- type?: "transition";
423
- transitionTo?: string;
422
+ type: "transition";
423
+ transitionTo: string;
424
424
  payload?: any;
425
425
  } | {
426
- type?: "done";
426
+ type: "done";
427
427
  data?: any;
428
428
  } | {
429
- type?: "error";
430
- message?: string;
429
+ type: "error";
430
+ message: string;
431
431
  })[];
432
432
  };
433
433
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kortyx/react",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "description": "React hooks for Kortyx client streaming experiences.",
6
6
  "keywords": [
@@ -40,13 +40,13 @@
40
40
  "devDependencies": {
41
41
  "@testing-library/react": "^16.3.0",
42
42
  "@types/react": "^19",
43
- "jsdom": "^26.1.0",
43
+ "jsdom": "^29.1.1",
44
44
  "react": "19.2.1",
45
45
  "react-dom": "19.2.1",
46
- "turbo": "^2.5.4",
46
+ "turbo": "2.6.1",
47
47
  "tsup": "^8.5.1",
48
- "typescript": "5.7.2",
49
- "vitest": "^3.2.4"
48
+ "typescript": "5.9.3",
49
+ "vitest": "^4.1.5"
50
50
  },
51
51
  "sideEffects": false,
52
52
  "repository": {