@xpert-ai/chatkit-types 0.0.14 → 0.0.15

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 (2) hide show
  1. package/dist/index.d.ts +23 -3
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -431,16 +431,36 @@ export declare type ChatKitOptions = {
431
431
  };
432
432
  };
433
433
 
434
- export declare type ChatKitRequestOptions = {
434
+ export declare type ChatKitRequestContext = {
435
+ /**
436
+ * Request-scoped runtime env overrides.
437
+ * ChatKit forwards this field to LangGraph as `context.env`.
438
+ */
439
+ env?: Record<string, string>;
440
+ [key: string]: unknown;
441
+ };
442
+
443
+ export declare type ChatKitRequestOptions<TState = Record<string, any>, TContext extends ChatKitRequestContext = ChatKitRequestContext, TConfig extends Record<string, unknown> = Record<string, unknown>> = {
435
444
  /**
436
445
  * Custom graph state merged into every submitted message request.
437
446
  * The active user input is always written into `state.human.input`.
438
447
  */
439
- state?: Record<string, any>;
448
+ state?: TState;
440
449
  /**
441
450
  * Additional stream context merged into every submitted message request.
451
+ *
452
+ * Request-scoped runtime env overrides should be placed in `context.env`.
453
+ * Extend `TContext` with any other request-scoped context fields you need.
454
+ */
455
+ context?: TContext;
456
+ /**
457
+ * Additional LangGraph run config merged into every submitted message request.
458
+ *
459
+ * This is forwarded to the hosted `runs.stream` request as `config`.
460
+ * Use this for LangGraph runtime controls such as tags or configurable values,
461
+ * not request-scoped env overrides.
442
462
  */
443
- context?: Record<string, unknown>;
463
+ config?: TConfig;
444
464
  };
445
465
 
446
466
  export declare type ChatKitTheme = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/chatkit-types",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "Type definitions for the ChatKit.",
5
5
  "sideEffects": false,
6
6
  "type": "module",