@copilotkit/runtime 2.0.0-rc.49 → 2.0.0-rc.50

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 (170) hide show
  1. package/README.md +1 -1
  2. package/dist/index.cjs +8 -3
  3. package/dist/index.d.cts +9 -9
  4. package/dist/index.d.mts +9 -9
  5. package/dist/index.mjs +4 -3
  6. package/dist/node.cjs +2 -0
  7. package/dist/node.d.cts +3 -3
  8. package/dist/node.d.mts +3 -3
  9. package/dist/node.mjs +3 -3
  10. package/dist/runtime/core/channel-manager.cjs.map +1 -1
  11. package/dist/runtime/core/channel-manager.mjs.map +1 -1
  12. package/dist/runtime/core/debug-event-bus.cjs.map +1 -1
  13. package/dist/runtime/core/debug-event-bus.d.cts +2 -2
  14. package/dist/runtime/core/debug-event-bus.d.cts.map +1 -1
  15. package/dist/runtime/core/debug-event-bus.d.mts +2 -2
  16. package/dist/runtime/core/debug-event-bus.d.mts.map +1 -1
  17. package/dist/runtime/core/debug-event-bus.mjs.map +1 -1
  18. package/dist/runtime/core/fetch-cors.cjs.map +1 -1
  19. package/dist/runtime/core/fetch-cors.d.cts +2 -2
  20. package/dist/runtime/core/fetch-cors.d.cts.map +1 -1
  21. package/dist/runtime/core/fetch-cors.d.mts +2 -2
  22. package/dist/runtime/core/fetch-cors.d.mts.map +1 -1
  23. package/dist/runtime/core/fetch-cors.mjs.map +1 -1
  24. package/dist/runtime/core/fetch-handler.cjs +9 -1
  25. package/dist/runtime/core/fetch-handler.cjs.map +1 -1
  26. package/dist/runtime/core/fetch-handler.d.cts +27 -14
  27. package/dist/runtime/core/fetch-handler.d.cts.map +1 -1
  28. package/dist/runtime/core/fetch-handler.d.mts +27 -14
  29. package/dist/runtime/core/fetch-handler.d.mts.map +1 -1
  30. package/dist/runtime/core/fetch-handler.mjs +9 -2
  31. package/dist/runtime/core/fetch-handler.mjs.map +1 -1
  32. package/dist/runtime/core/hooks.cjs.map +1 -1
  33. package/dist/runtime/core/hooks.d.cts +5 -5
  34. package/dist/runtime/core/hooks.d.cts.map +1 -1
  35. package/dist/runtime/core/hooks.d.mts +5 -5
  36. package/dist/runtime/core/hooks.d.mts.map +1 -1
  37. package/dist/runtime/core/hooks.mjs.map +1 -1
  38. package/dist/runtime/core/learning.cjs.map +1 -1
  39. package/dist/runtime/core/learning.d.cts +8 -8
  40. package/dist/runtime/core/learning.d.cts.map +1 -1
  41. package/dist/runtime/core/learning.d.mts +8 -8
  42. package/dist/runtime/core/learning.d.mts.map +1 -1
  43. package/dist/runtime/core/learning.mjs.map +1 -1
  44. package/dist/runtime/core/logger.cjs.map +1 -1
  45. package/dist/runtime/core/logger.d.cts +3 -3
  46. package/dist/runtime/core/logger.d.cts.map +1 -1
  47. package/dist/runtime/core/logger.d.mts +3 -3
  48. package/dist/runtime/core/logger.d.mts.map +1 -1
  49. package/dist/runtime/core/logger.mjs.map +1 -1
  50. package/dist/runtime/core/middleware-sse-parser.cjs.map +1 -1
  51. package/dist/runtime/core/middleware-sse-parser.mjs.map +1 -1
  52. package/dist/runtime/core/middleware.cjs.map +1 -1
  53. package/dist/runtime/core/middleware.d.cts +3 -3
  54. package/dist/runtime/core/middleware.d.cts.map +1 -1
  55. package/dist/runtime/core/middleware.d.mts +3 -3
  56. package/dist/runtime/core/middleware.d.mts.map +1 -1
  57. package/dist/runtime/core/middleware.mjs.map +1 -1
  58. package/dist/runtime/core/package-info.cjs +1 -1
  59. package/dist/runtime/core/package-info.mjs +1 -1
  60. package/dist/runtime/core/runtime-error-reporter.cjs.map +1 -1
  61. package/dist/runtime/core/runtime-error-reporter.mjs.map +1 -1
  62. package/dist/runtime/core/runtime.cjs +17 -17
  63. package/dist/runtime/core/runtime.cjs.map +1 -1
  64. package/dist/runtime/core/runtime.d.cts +65 -65
  65. package/dist/runtime/core/runtime.d.cts.map +1 -1
  66. package/dist/runtime/core/runtime.d.mts +65 -65
  67. package/dist/runtime/core/runtime.d.mts.map +1 -1
  68. package/dist/runtime/core/runtime.mjs +15 -15
  69. package/dist/runtime/core/runtime.mjs.map +1 -1
  70. package/dist/runtime/endpoints/auto-start-channels.cjs.map +1 -1
  71. package/dist/runtime/endpoints/auto-start-channels.mjs.map +1 -1
  72. package/dist/runtime/endpoints/node-fetch-handler.cjs +9 -1
  73. package/dist/runtime/endpoints/node-fetch-handler.cjs.map +1 -1
  74. package/dist/runtime/endpoints/node-fetch-handler.d.cts +9 -4
  75. package/dist/runtime/endpoints/node-fetch-handler.d.cts.map +1 -1
  76. package/dist/runtime/endpoints/node-fetch-handler.d.mts +9 -4
  77. package/dist/runtime/endpoints/node-fetch-handler.d.mts.map +1 -1
  78. package/dist/runtime/endpoints/node-fetch-handler.mjs +9 -2
  79. package/dist/runtime/endpoints/node-fetch-handler.mjs.map +1 -1
  80. package/dist/runtime/endpoints/node.cjs +11 -3
  81. package/dist/runtime/endpoints/node.cjs.map +1 -1
  82. package/dist/runtime/endpoints/node.d.cts +39 -16
  83. package/dist/runtime/endpoints/node.d.cts.map +1 -1
  84. package/dist/runtime/endpoints/node.d.mts +39 -16
  85. package/dist/runtime/endpoints/node.d.mts.map +1 -1
  86. package/dist/runtime/endpoints/node.mjs +13 -6
  87. package/dist/runtime/endpoints/node.mjs.map +1 -1
  88. package/dist/runtime/generative-ui/a2ui-v09-middleware.cjs.map +1 -1
  89. package/dist/runtime/generative-ui/a2ui-v09-middleware.mjs.map +1 -1
  90. package/dist/runtime/handlers/get-runtime-info.cjs.map +1 -1
  91. package/dist/runtime/handlers/get-runtime-info.mjs.map +1 -1
  92. package/dist/runtime/handlers/handle-debug-events.cjs.map +1 -1
  93. package/dist/runtime/handlers/handle-debug-events.mjs.map +1 -1
  94. package/dist/runtime/handlers/handle-inspector-learning.cjs.map +1 -1
  95. package/dist/runtime/handlers/handle-inspector-learning.mjs.map +1 -1
  96. package/dist/runtime/handlers/handle-inspector-metadata.cjs.map +1 -1
  97. package/dist/runtime/handlers/handle-inspector-metadata.mjs.map +1 -1
  98. package/dist/runtime/handlers/handle-stop.cjs.map +1 -1
  99. package/dist/runtime/handlers/handle-stop.mjs.map +1 -1
  100. package/dist/runtime/handlers/handle-suggest.cjs.map +1 -1
  101. package/dist/runtime/handlers/handle-suggest.mjs.map +1 -1
  102. package/dist/runtime/handlers/handle-trajectory-connect.cjs.map +1 -1
  103. package/dist/runtime/handlers/handle-trajectory-connect.mjs.map +1 -1
  104. package/dist/runtime/handlers/handle-transcribe.cjs.map +1 -1
  105. package/dist/runtime/handlers/handle-transcribe.mjs.map +1 -1
  106. package/dist/runtime/handlers/intelligence/annotate.cjs +1 -1
  107. package/dist/runtime/handlers/intelligence/annotate.cjs.map +1 -1
  108. package/dist/runtime/handlers/intelligence/annotate.mjs +1 -1
  109. package/dist/runtime/handlers/intelligence/annotate.mjs.map +1 -1
  110. package/dist/runtime/handlers/intelligence/connect.cjs.map +1 -1
  111. package/dist/runtime/handlers/intelligence/connect.mjs.map +1 -1
  112. package/dist/runtime/handlers/intelligence/memories.cjs +1 -1
  113. package/dist/runtime/handlers/intelligence/memories.cjs.map +1 -1
  114. package/dist/runtime/handlers/intelligence/memories.mjs +1 -1
  115. package/dist/runtime/handlers/intelligence/memories.mjs.map +1 -1
  116. package/dist/runtime/handlers/intelligence/run.cjs.map +1 -1
  117. package/dist/runtime/handlers/intelligence/run.mjs.map +1 -1
  118. package/dist/runtime/handlers/intelligence/thread-names.cjs.map +1 -1
  119. package/dist/runtime/handlers/intelligence/thread-names.mjs.map +1 -1
  120. package/dist/runtime/handlers/intelligence/threads.cjs +5 -5
  121. package/dist/runtime/handlers/intelligence/threads.cjs.map +1 -1
  122. package/dist/runtime/handlers/intelligence/threads.mjs +5 -5
  123. package/dist/runtime/handlers/intelligence/threads.mjs.map +1 -1
  124. package/dist/runtime/handlers/shared/agent-utils.cjs.map +1 -1
  125. package/dist/runtime/handlers/shared/agent-utils.mjs.map +1 -1
  126. package/dist/runtime/handlers/shared/memory-policy.cjs.map +1 -1
  127. package/dist/runtime/handlers/shared/memory-policy.mjs.map +1 -1
  128. package/dist/runtime/handlers/shared/resolve-intelligence-user.cjs.map +1 -1
  129. package/dist/runtime/handlers/shared/resolve-intelligence-user.mjs.map +1 -1
  130. package/dist/runtime/handlers/shared/sse-response.cjs.map +1 -1
  131. package/dist/runtime/handlers/shared/sse-response.mjs.map +1 -1
  132. package/dist/runtime/handlers/shared/thread-access.cjs +1 -1
  133. package/dist/runtime/handlers/shared/thread-access.cjs.map +1 -1
  134. package/dist/runtime/handlers/shared/thread-access.mjs +1 -1
  135. package/dist/runtime/handlers/shared/thread-access.mjs.map +1 -1
  136. package/dist/runtime/handlers/sse/connect.cjs.map +1 -1
  137. package/dist/runtime/handlers/sse/connect.mjs.map +1 -1
  138. package/dist/runtime/handlers/sse/run.cjs.map +1 -1
  139. package/dist/runtime/handlers/sse/run.mjs.map +1 -1
  140. package/dist/runtime/index.cjs +29 -0
  141. package/dist/runtime/index.cjs.map +1 -0
  142. package/dist/runtime/index.d.cts +58 -7
  143. package/dist/runtime/index.d.cts.map +1 -0
  144. package/dist/runtime/index.d.mts +58 -7
  145. package/dist/runtime/index.d.mts.map +1 -0
  146. package/dist/runtime/index.mjs +27 -0
  147. package/dist/runtime/index.mjs.map +1 -0
  148. package/dist/runtime/intelligence-platform/analytics-context.cjs.map +1 -1
  149. package/dist/runtime/intelligence-platform/analytics-context.mjs.map +1 -1
  150. package/dist/runtime/intelligence-platform/client.cjs +3 -3
  151. package/dist/runtime/intelligence-platform/client.cjs.map +1 -1
  152. package/dist/runtime/intelligence-platform/client.d.cts +1 -1
  153. package/dist/runtime/intelligence-platform/client.d.mts +1 -1
  154. package/dist/runtime/intelligence-platform/client.mjs +3 -3
  155. package/dist/runtime/intelligence-platform/client.mjs.map +1 -1
  156. package/dist/runtime/intelligence-platform/thread-lock-heartbeat.cjs.map +1 -1
  157. package/dist/runtime/intelligence-platform/thread-lock-heartbeat.mjs.map +1 -1
  158. package/dist/runtime/node.d.cts +2 -2
  159. package/dist/runtime/node.d.mts +2 -2
  160. package/dist/runtime/runner/intelligence.cjs.map +1 -1
  161. package/dist/runtime/runner/intelligence.d.cts +2 -2
  162. package/dist/runtime/runner/intelligence.d.cts.map +1 -1
  163. package/dist/runtime/runner/intelligence.d.mts +2 -2
  164. package/dist/runtime/runner/intelligence.d.mts.map +1 -1
  165. package/dist/runtime/runner/intelligence.mjs.map +1 -1
  166. package/dist/runtime/telemetry/disclosure.cjs.map +1 -1
  167. package/dist/runtime/telemetry/disclosure.mjs.map +1 -1
  168. package/dist/runtime/telemetry/instance-created.cjs.map +1 -1
  169. package/dist/runtime/telemetry/instance-created.mjs.map +1 -1
  170. package/package.json +4 -4
@@ -1,13 +1,13 @@
1
1
  import { AgentRunner } from "../runner/agent-runner.mjs";
2
2
  import { ThreadAccessMode, ThreadsConfig } from "../handlers/shared/thread-access.mjs";
3
3
  import { ForwardHeadersConfig, ResolvedForwardHeadersPolicy } from "../handlers/header-utils.mjs";
4
- import { CopilotRuntimeLogger } from "./logger.mjs";
4
+ import { CopilotKitRuntimeLogger } from "./logger.mjs";
5
5
  import { AfterRequestMiddleware, BeforeRequestMiddleware } from "./middleware.mjs";
6
6
  import { TranscriptionService } from "../transcription-service/transcription-service.mjs";
7
7
  import { DebugEventBus } from "./debug-event-bus.mjs";
8
8
  import "../intelligence-platform/index.mjs";
9
9
  import { TelemetryCapture } from "../telemetry/telemetry-client.mjs";
10
- import { CopilotRuntimeLearningConfig, CopilotRuntimeLearningContext, CopilotRuntimeUser, GetLearningContainerId, GetTrajectoryLearningContainerIds, LearningContainerSelectorInput, TrajectoryLearningContainerSelectorInput } from "./learning.mjs";
10
+ import { CopilotKitRuntimeLearningConfig, CopilotKitRuntimeLearningContext, CopilotKitRuntimeUser, GetLearningContainerId, GetTrajectoryLearningContainerIds, LearningContainerSelectorInput, TrajectoryLearningContainerSelectorInput } from "./learning.mjs";
11
11
  import { CopilotKitIntelligence } from "../intelligence-platform/client.mjs";
12
12
  import { DebugConfig, MaybePromise, NonEmptyRecord, RUNTIME_MODE_INTELLIGENCE, RUNTIME_MODE_SSE, ResolvedDebugConfig, RuntimeMode } from "@copilotkit/shared";
13
13
  import { LicenseChecker } from "@copilotkit/license-verifier";
@@ -45,7 +45,7 @@ type A2UIVersion = "0.9" | "1.0";
45
45
  *
46
46
  * @example
47
47
  * ```ts
48
- * new CopilotRuntime({
48
+ * new CopilotKitRuntime({
49
49
  * agents: { legacy: legacyAgent, current: currentAgent },
50
50
  * generativeUI: { a2uiVersion: { legacy: "0.9" } },
51
51
  * });
@@ -212,7 +212,7 @@ interface BaseCopilotRuntimeOptions extends CopilotRuntimeMiddlewares {
212
212
  * Without it, the runtime writes to the console, and debug output is JSON
213
213
  * lines on stdout.
214
214
  */
215
- logger?: CopilotRuntimeLogger;
215
+ logger?: CopilotKitRuntimeLogger;
216
216
  /**
217
217
  * Policy controlling which inbound HTTP headers are forwarded onto the
218
218
  * outgoing agent call. By default a built-in denylist strips known
@@ -265,22 +265,22 @@ interface BaseCopilotRuntimeOptions extends CopilotRuntimeMiddlewares {
265
265
  */
266
266
  threads?: ThreadsConfig;
267
267
  }
268
- type IdentifyUserCallback = (request: Request) => MaybePromise<CopilotRuntimeUser>;
268
+ type IdentifyUserCallback = (request: Request) => MaybePromise<CopilotKitRuntimeUser>;
269
269
  type MemoryAccess = "none" | "read" | "read-write";
270
270
  interface MemoryGrant {
271
271
  readonly user: MemoryAccess;
272
272
  readonly project: MemoryAccess;
273
273
  }
274
274
  type MemoryConsumer = "agent" | "client";
275
- interface CopilotRuntimeMemoryConfig {
275
+ interface CopilotKitRuntimeMemoryConfig {
276
276
  /** Resolves immutable Memory access for one authenticated web request. */
277
277
  access(input: {
278
278
  readonly request: Request;
279
- readonly user: CopilotRuntimeUser;
279
+ readonly user: CopilotKitRuntimeUser;
280
280
  readonly consumer: MemoryConsumer;
281
281
  }): MaybePromise<MemoryGrant | null>;
282
282
  }
283
- interface CopilotSseRuntimeOptions extends BaseCopilotRuntimeOptions {
283
+ interface CopilotKitSseRuntimeOptions extends BaseCopilotRuntimeOptions {
284
284
  /** The runner to use for running agents in SSE mode. */
285
285
  runner?: AgentRunner;
286
286
  /**
@@ -309,7 +309,7 @@ interface CopilotIntelligenceRuntimeBaseOptions extends BaseCopilotRuntimeOption
309
309
  * Chooses one stable Learning Container ID for each web or Channel run.
310
310
  * @deprecated Configure `getLearningContainerId` on `CopilotKitIntelligence`.
311
311
  */
312
- ɵlearning?: CopilotRuntimeLearningConfig;
312
+ ɵlearning?: CopilotKitRuntimeLearningConfig;
313
313
  /** Auto-generate short names for newly created threads. */
314
314
  generateThreadNames?: boolean;
315
315
  /** Max delay (ms) for WebSocket reconnect backoff. @default 10_000 */
@@ -331,25 +331,25 @@ interface CopilotIntelligenceRuntimeBaseOptions extends BaseCopilotRuntimeOption
331
331
  }
332
332
  type NonEmptyChannels = readonly [Channel, ...Channel[]];
333
333
  /** Intelligence runtime options with web identity, Channels, or both. */
334
- type CopilotIntelligenceRuntimeOptions = CopilotIntelligenceRuntimeBaseOptions & ({
334
+ type CopilotKitIntelligenceRuntimeOptions = CopilotIntelligenceRuntimeBaseOptions & ({
335
335
  /** Resolves the authenticated user for web requests. */identifyUser: IdentifyUserCallback; /** Enables agent and browser Memory under one request policy. */
336
- memory?: CopilotRuntimeMemoryConfig;
336
+ memory?: CopilotKitRuntimeMemoryConfig;
337
337
  channels?: readonly Channel[];
338
338
  } | {
339
339
  /** Channels-only runtimes expose no functional web surface. */identifyUser?: undefined;
340
340
  memory?: undefined;
341
341
  channels: NonEmptyChannels;
342
342
  });
343
- type CopilotRuntimeOptions = CopilotSseRuntimeOptions | CopilotIntelligenceRuntimeOptions;
344
- interface CopilotRuntimeLike {
345
- agents: CopilotRuntimeOptions["agents"];
346
- transcriptionService: CopilotRuntimeOptions["transcriptionService"];
347
- beforeRequestMiddleware: CopilotRuntimeOptions["beforeRequestMiddleware"];
348
- afterRequestMiddleware: CopilotRuntimeOptions["afterRequestMiddleware"];
343
+ type CopilotKitRuntimeOptions = CopilotKitSseRuntimeOptions | CopilotKitIntelligenceRuntimeOptions;
344
+ interface CopilotKitRuntimeLike {
345
+ agents: CopilotKitRuntimeOptions["agents"];
346
+ transcriptionService: CopilotKitRuntimeOptions["transcriptionService"];
347
+ beforeRequestMiddleware: CopilotKitRuntimeOptions["beforeRequestMiddleware"];
348
+ afterRequestMiddleware: CopilotKitRuntimeOptions["afterRequestMiddleware"];
349
349
  runner: AgentRunner;
350
- mcpApps: CopilotRuntimeOptions["mcpApps"];
351
- openGenerativeUI: CopilotRuntimeOptions["openGenerativeUI"];
352
- generativeUI?: CopilotRuntimeOptions["generativeUI"];
350
+ mcpApps: CopilotKitRuntimeOptions["mcpApps"];
351
+ openGenerativeUI: CopilotKitRuntimeOptions["openGenerativeUI"];
352
+ generativeUI?: CopilotKitRuntimeOptions["generativeUI"];
353
353
  intelligence?: CopilotKitIntelligence;
354
354
  identifyUser?: IdentifyUserCallback;
355
355
  mode: RuntimeMode;
@@ -362,13 +362,13 @@ interface CopilotRuntimeLike {
362
362
  getLicenseChecker?(): Promise<LicenseChecker | undefined>;
363
363
  debugEventBus?: DebugEventBus;
364
364
  debug: ResolvedDebugConfig;
365
- debugLogger?: CopilotRuntimeLogger;
365
+ debugLogger?: CopilotKitRuntimeLogger;
366
366
  /**
367
367
  * The logger the runtime writes to. Optional so external implementations of
368
368
  * this published interface remain source-compatible; a missing value means
369
369
  * the console.
370
370
  */
371
- logger?: CopilotRuntimeLogger;
371
+ logger?: CopilotKitRuntimeLogger;
372
372
  /**
373
373
  * Runtime-bound telemetry capture. Optional so external implementations of
374
374
  * this published interface remain source-compatible.
@@ -376,7 +376,7 @@ interface CopilotRuntimeLike {
376
376
  telemetry?: TelemetryCapture;
377
377
  /**
378
378
  * Resolved inbound-header forwarding policy read by the /run and /connect call
379
- * sites. Optional on the published interface so an external `CopilotRuntimeLike`
379
+ * sites. Optional on the published interface so an external `CopilotKitRuntimeLike`
380
380
  * implementor predating this field stays source-compatible (non-breaking minor
381
381
  * release). Concrete runtimes (`BaseCopilotRuntime`) always resolve and set it;
382
382
  * the call sites coalesce a missing value to the default resolved policy
@@ -391,7 +391,7 @@ interface CopilotRuntimeLike {
391
391
  sseKeepAliveIntervalSeconds?: number;
392
392
  /**
393
393
  * Resolved opt-in flag for the client-facing memory proxy routes. Optional on
394
- * the published interface so an external `CopilotRuntimeLike` implementor
394
+ * the published interface so an external `CopilotKitRuntimeLike` implementor
395
395
  * predating this field stays source-compatible; the dispatcher coalesces a
396
396
  * missing value to `false` (secure default — routes hidden). Concrete runtimes
397
397
  * (`BaseCopilotRuntime`) always resolve and set it.
@@ -403,14 +403,14 @@ interface CopilotRuntimeLike {
403
403
  * the default (`DEFAULT_THREAD_ACCESS`).
404
404
  */
405
405
  threadAccess?: ThreadAccessMode;
406
- memory?: CopilotRuntimeMemoryConfig;
407
- learning?: CopilotRuntimeLearningConfig;
406
+ memory?: CopilotKitRuntimeMemoryConfig;
407
+ learning?: CopilotKitRuntimeLearningConfig;
408
408
  }
409
- interface CopilotSseRuntimeLike extends CopilotRuntimeLike {
409
+ interface CopilotKitSseRuntimeLike extends CopilotKitRuntimeLike {
410
410
  intelligence?: undefined;
411
411
  mode: typeof RUNTIME_MODE_SSE;
412
412
  }
413
- interface CopilotIntelligenceRuntimeLike extends CopilotRuntimeLike {
413
+ interface CopilotKitIntelligenceRuntimeLike extends CopilotKitRuntimeLike {
414
414
  intelligence: CopilotKitIntelligence;
415
415
  identifyUser?: IdentifyUserCallback;
416
416
  generateThreadNames: boolean;
@@ -418,32 +418,32 @@ interface CopilotIntelligenceRuntimeLike extends CopilotRuntimeLike {
418
418
  lockKeyPrefix?: string;
419
419
  lockHeartbeatIntervalSeconds: number;
420
420
  channels: Channel[];
421
- learning?: CopilotRuntimeLearningConfig;
421
+ learning?: CopilotKitRuntimeLearningConfig;
422
422
  mode: typeof RUNTIME_MODE_INTELLIGENCE;
423
423
  }
424
- declare abstract class BaseCopilotRuntime implements CopilotRuntimeLike {
425
- agents: CopilotRuntimeOptions["agents"];
426
- transcriptionService: CopilotRuntimeOptions["transcriptionService"];
427
- beforeRequestMiddleware: CopilotRuntimeOptions["beforeRequestMiddleware"];
428
- afterRequestMiddleware: CopilotRuntimeOptions["afterRequestMiddleware"];
424
+ declare abstract class BaseCopilotRuntime implements CopilotKitRuntimeLike {
425
+ agents: CopilotKitRuntimeOptions["agents"];
426
+ transcriptionService: CopilotKitRuntimeOptions["transcriptionService"];
427
+ beforeRequestMiddleware: CopilotKitRuntimeOptions["beforeRequestMiddleware"];
428
+ afterRequestMiddleware: CopilotKitRuntimeOptions["afterRequestMiddleware"];
429
429
  runner: AgentRunner;
430
- mcpApps: CopilotRuntimeOptions["mcpApps"];
431
- openGenerativeUI: CopilotRuntimeOptions["openGenerativeUI"];
432
- generativeUI: CopilotRuntimeOptions["generativeUI"];
430
+ mcpApps: CopilotKitRuntimeOptions["mcpApps"];
431
+ openGenerativeUI: CopilotKitRuntimeOptions["openGenerativeUI"];
432
+ generativeUI: CopilotKitRuntimeOptions["generativeUI"];
433
433
  readonly debugEventBus?: DebugEventBus;
434
434
  debug: ResolvedDebugConfig;
435
- debugLogger?: CopilotRuntimeLogger;
436
- readonly logger: CopilotRuntimeLogger;
435
+ debugLogger?: CopilotKitRuntimeLogger;
436
+ readonly logger: CopilotKitRuntimeLogger;
437
437
  readonly telemetry: TelemetryCapture;
438
438
  readonly forwardHeadersPolicy: ResolvedForwardHeadersPolicy;
439
439
  readonly sseKeepAliveIntervalSeconds: number;
440
440
  readonly exposeMemoryRoutes: boolean;
441
441
  readonly threadAccess: ThreadAccessMode;
442
- readonly memory?: CopilotRuntimeMemoryConfig;
442
+ readonly memory?: CopilotKitRuntimeMemoryConfig;
443
443
  /**
444
444
  * License token resolved once with the env fallback, so telemetry
445
445
  * attribution (below) and subclass feature gating
446
- * (CopilotIntelligenceRuntime's getLicenseChecker) read the exact same value
446
+ * (CopilotKitIntelligenceRuntime's getLicenseChecker) read the exact same value
447
447
  * instead of each re-applying `?? COPILOTKIT_LICENSE_TOKEN`.
448
448
  */
449
449
  protected readonly resolvedLicenseToken?: string;
@@ -453,13 +453,13 @@ declare abstract class BaseCopilotRuntime implements CopilotRuntimeLike {
453
453
  getLicenseChecker(): Promise<LicenseChecker | undefined>;
454
454
  constructor(options: BaseCopilotRuntimeOptions, runner: AgentRunner);
455
455
  }
456
- declare class CopilotSseRuntime extends BaseCopilotRuntime implements CopilotSseRuntimeLike {
456
+ declare class CopilotKitSseRuntime extends BaseCopilotRuntime implements CopilotKitSseRuntimeLike {
457
457
  readonly intelligence: any;
458
458
  readonly mode: "sse";
459
459
  readonly identifyUser?: IdentifyUserCallback;
460
- constructor(options: CopilotSseRuntimeOptions);
460
+ constructor(options: CopilotKitSseRuntimeOptions);
461
461
  }
462
- declare class CopilotIntelligenceRuntime extends BaseCopilotRuntime implements CopilotIntelligenceRuntimeLike {
462
+ declare class CopilotKitIntelligenceRuntime extends BaseCopilotRuntime implements CopilotKitIntelligenceRuntimeLike {
463
463
  readonly intelligence: CopilotKitIntelligence;
464
464
  readonly identifyUser?: IdentifyUserCallback;
465
465
  readonly generateThreadNames: boolean;
@@ -467,14 +467,14 @@ declare class CopilotIntelligenceRuntime extends BaseCopilotRuntime implements C
467
467
  readonly lockKeyPrefix?: string;
468
468
  readonly lockHeartbeatIntervalSeconds: number;
469
469
  readonly channels: Channel[];
470
- readonly learning?: CopilotRuntimeLearningConfig;
470
+ readonly learning?: CopilotKitRuntimeLearningConfig;
471
471
  readonly mode: "intelligence";
472
472
  private licenseCheckerPromise?;
473
473
  /** Maximum allowed lock TTL in seconds (1 hour). */
474
474
  static readonly MAX_LOCK_TTL_SECONDS = 3600;
475
475
  /** Maximum allowed heartbeat interval in seconds (50 minutes). */
476
476
  static readonly MAX_HEARTBEAT_INTERVAL_SECONDS = 3000;
477
- constructor(options: CopilotIntelligenceRuntimeOptions);
477
+ constructor(options: CopilotKitIntelligenceRuntimeOptions);
478
478
  /**
479
479
  * Verify the license token on first use, then reuse the result. Not done in
480
480
  * the constructor: edge-safe (Web Crypto) verification is async, and
@@ -484,12 +484,12 @@ declare class CopilotIntelligenceRuntime extends BaseCopilotRuntime implements C
484
484
  */
485
485
  getLicenseChecker(): Promise<LicenseChecker>;
486
486
  }
487
- declare function isIntelligenceRuntime(runtime: CopilotRuntimeLike): runtime is CopilotIntelligenceRuntimeLike;
487
+ declare function isIntelligenceRuntime(runtime: CopilotKitRuntimeLike): runtime is CopilotKitIntelligenceRuntimeLike;
488
488
  /**
489
- * Compile-time phantom brand marking a {@link CopilotRuntime} that was
489
+ * Compile-time phantom brand marking a {@link CopilotKitRuntime} that was
490
490
  * constructed with at least one declared Intelligence Channel. It has no runtime
491
491
  * representation — the shim never sets this property; it exists purely so
492
- * `createCopilotRuntimeHandler` can tell, at the type level, that the resulting
492
+ * `createCopilotKitRuntimeHandler` can tell, at the type level, that the resulting
493
493
  * handler will carry a non-optional `.channels` control surface.
494
494
  */
495
495
  interface RuntimeWithDeclaredChannels {
@@ -499,12 +499,12 @@ interface RuntimeWithDeclaredChannels {
499
499
  readonly __copilotkitChannelsDeclared: true;
500
500
  }
501
501
  /**
502
- * Instance shape of the {@link CopilotRuntime} compatibility shim. Extends
503
- * {@link CopilotRuntimeLike} with the Intelligence-only accessors the shim
502
+ * Instance shape of the {@link CopilotKitRuntime} compatibility shim. Extends
503
+ * {@link CopilotKitRuntimeLike} with the Intelligence-only accessors the shim
504
504
  * surfaces (all `undefined` in SSE mode). Declared explicitly so the exported
505
- * `CopilotRuntime` name resolves as a type as well as a value.
505
+ * `CopilotKitRuntime` name resolves as a type as well as a value.
506
506
  */
507
- interface CopilotRuntime extends CopilotRuntimeLike {
507
+ interface CopilotKitRuntime extends CopilotKitRuntimeLike {
508
508
  /** Telemetry capture bound to this runtime's construction-time identity. */
509
509
  telemetry: TelemetryCapture;
510
510
  /** Auto-generate short thread names; `undefined` in SSE mode. */
@@ -518,14 +518,14 @@ interface CopilotRuntime extends CopilotRuntimeLike {
518
518
  /** Declared Intelligence Channels; `undefined` in SSE mode. */
519
519
  channels?: Channel[];
520
520
  /** Learning Container selector; `undefined` in SSE mode. */
521
- learning?: CopilotRuntimeLearningConfig;
521
+ learning?: CopilotKitRuntimeLearningConfig;
522
522
  }
523
523
  /**
524
- * Constructor type for the {@link CopilotRuntime} compatibility shim.
524
+ * Constructor type for the {@link CopilotKitRuntime} compatibility shim.
525
525
  *
526
526
  * The first overload fires when the caller passes `intelligence` together with a
527
527
  * non-empty `channels` tuple: it returns a {@link RuntimeWithDeclaredChannels}-
528
- * branded runtime, which `createCopilotRuntimeHandler` maps to a handler whose
528
+ * branded runtime, which `createCopilotKitRuntimeHandler` maps to a handler whose
529
529
  * `.channels` is non-optional. Every other configuration (SSE, or Intelligence
530
530
  * without channels, or an empty `channels: []`) falls through to the second
531
531
  * overload and stays unbranded, so its handler keeps `.channels` optional.
@@ -534,30 +534,30 @@ interface CopilotRuntime extends CopilotRuntimeLike {
534
534
  * to the instance type), so the branding lives on this construct-signature
535
535
  * interface instead of on the class itself.
536
536
  */
537
- interface CopilotRuntimeConstructor {
537
+ interface CopilotKitRuntimeConstructor {
538
538
  new (options: CopilotIntelligenceRuntimeBaseOptions & ({
539
539
  identifyUser: IdentifyUserCallback;
540
- memory?: CopilotRuntimeMemoryConfig;
540
+ memory?: CopilotKitRuntimeMemoryConfig;
541
541
  channels: NonEmptyChannels;
542
542
  } | {
543
543
  identifyUser?: undefined;
544
544
  memory?: undefined;
545
545
  channels: NonEmptyChannels;
546
- })): CopilotRuntime & RuntimeWithDeclaredChannels;
547
- new (options: CopilotRuntimeOptions): CopilotRuntime;
546
+ })): CopilotKitRuntime & RuntimeWithDeclaredChannels;
547
+ new (options: CopilotKitRuntimeOptions): CopilotKitRuntime;
548
548
  }
549
549
  /**
550
- * The public `CopilotRuntime` constructor. Backed by {@link CopilotRuntimeShim}
551
- * but typed as {@link CopilotRuntimeConstructor} so that constructing with a
550
+ * The public `CopilotKitRuntime` constructor. Backed by {@link CopilotRuntimeShim}
551
+ * but typed as {@link CopilotKitRuntimeConstructor} so that constructing with a
552
552
  * non-empty `channels` array yields a {@link RuntimeWithDeclaredChannels}-branded
553
553
  * runtime type.
554
554
  *
555
555
  * The `as unknown as` cast is required (not dishonest widening): the brand is a
556
556
  * phantom, compile-time-only marker with no runtime representation, so the shim
557
557
  * instances legitimately do not carry the brand property. Behavior is identical
558
- * to the former `class CopilotRuntime` — this only refines the static type.
558
+ * to the former `class CopilotKitRuntime` — this only refines the static type.
559
559
  */
560
- declare const CopilotRuntime: CopilotRuntimeConstructor;
560
+ declare const CopilotKitRuntime: CopilotKitRuntimeConstructor;
561
561
  //#endregion
562
- export { A2UIVersion, AgentFactoryContext, AgentsConfig, AgentsFactory, CopilotIntelligenceRuntime, CopilotIntelligenceRuntimeLike, CopilotIntelligenceRuntimeOptions, CopilotRuntime, CopilotRuntimeConstructor, CopilotRuntimeLike, CopilotRuntimeMemoryConfig, CopilotRuntimeOptions, CopilotSseRuntime, CopilotSseRuntimeLike, CopilotSseRuntimeOptions, GenerativeUIOptions, IdentifyUserCallback, McpAppsConfig, McpAppsServerConfig, MemoryAccess, MemoryConsumer, MemoryGrant, OpenGenerativeUIConfig, OpenGenerativeUIOptions, RuntimeWithDeclaredChannels, VERSION, isIntelligenceRuntime, resolveAgents };
562
+ export { A2UIVersion, AgentFactoryContext, AgentsConfig, AgentsFactory, CopilotKitIntelligenceRuntime, CopilotKitIntelligenceRuntimeLike, CopilotKitIntelligenceRuntimeOptions, CopilotKitRuntime, CopilotKitRuntimeConstructor, CopilotKitRuntimeLike, CopilotKitRuntimeMemoryConfig, CopilotKitRuntimeOptions, CopilotKitSseRuntime, CopilotKitSseRuntimeLike, CopilotKitSseRuntimeOptions, GenerativeUIOptions, IdentifyUserCallback, McpAppsConfig, McpAppsServerConfig, MemoryAccess, MemoryConsumer, MemoryGrant, OpenGenerativeUIConfig, OpenGenerativeUIOptions, RuntimeWithDeclaredChannels, VERSION, isIntelligenceRuntime, resolveAgents };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;;;;;;EA0UE,iBAAA,CAAA,GAAqB,OAAA,CAAQ,cAAA;AAAA;AAAA,iBAcxB,qBAAA,CACd,OAAA,EAAS,qBAAA,GACR,OAAA,IAAW,iCAAA;;;;;;;;UAWG,2BAAA;EA5VC;;;EAAA,SAgWP,4BAAA;AAAA;;;;;;;UASM,iBAAA,SAA0B,qBAAA;EA3VtB;EA6VnB,SAAA,EAAW,gBAAA;EA3VsB;EA6VjC,mBAAA;EA5VwB;EA8VxB,cAAA;EA3VqB;EA6VrB,aAAA;;EAEA,4BAAA;EA3VY;EA6VZ,QAAA,GAAW,OAAA;EA7VqC;EA+VhD,QAAA,GAAW,+BAAA;AAAA;AAzQb;;;;;;;;;;;;;;AAAA,UA0RiB,4BAAA;EAAA,KAEb,OAAA,EAAS,qCAAA;IAGD,YAAA,EAAc,oBAAA;IACd,MAAA,GAAS,6BAAA;IACT,QAAA,EAAU,gBAAA;EAAA;IAGV,YAAA;IACA,MAAA;IACA,QAAA,EAAU,gBAAA;EAAA,KAGjB,iBAAA,GAAoB,2BAAA;EAAA,KAClB,OAAA,EAAS,wBAAA,GAA2B,iBAAA;AAAA;;;;;;;;;;;;cAiK9B,iBAAA,EAAmB,4BAAA"}
@@ -59,7 +59,7 @@ var BaseCopilotRuntime = class {
59
59
  this.threadAccess = resolveThreadAccessMode(options.threads);
60
60
  }
61
61
  };
62
- var CopilotSseRuntime = class extends BaseCopilotRuntime {
62
+ var CopilotKitSseRuntime = class extends BaseCopilotRuntime {
63
63
  constructor(options) {
64
64
  const channels = options.channels;
65
65
  if (Array.isArray(channels) && channels.length > 0) throw new Error("`channels` requires the Intelligence runtime (pass `intelligence`); Intelligence Channels are not available in SSE mode.");
@@ -73,7 +73,7 @@ var CopilotSseRuntime = class extends BaseCopilotRuntime {
73
73
  warnIfThreadListRefused(this);
74
74
  }
75
75
  };
76
- var CopilotIntelligenceRuntime = class CopilotIntelligenceRuntime extends BaseCopilotRuntime {
76
+ var CopilotKitIntelligenceRuntime = class CopilotKitIntelligenceRuntime extends BaseCopilotRuntime {
77
77
  static {
78
78
  this.MAX_LOCK_TTL_SECONDS = 3600;
79
79
  }
@@ -92,7 +92,7 @@ var CopilotIntelligenceRuntime = class CopilotIntelligenceRuntime extends BaseCo
92
92
  if (rawOptions.memory !== void 0 && (typeof rawOptions.memory !== "object" || rawOptions.memory === null || typeof rawOptions.memory.access !== "function")) throw new Error("Intelligence Runtime `memory.access` must be a callback");
93
93
  if (rawOptions.memory !== void 0 && !hasWebIdentity) throw new Error("Intelligence Runtime web `memory` requires `identifyUser`");
94
94
  if (rawOptions.ɵlearning !== void 0 && (typeof rawOptions.ɵlearning !== "object" || rawOptions.ɵlearning === null || !(typeof rawOptions.ɵlearning.containerId === "string" || typeof rawOptions.ɵlearning.containerId === "function"))) throw new Error("Intelligence Runtime `ɵlearning.containerId` must be a stable ID or callback");
95
- if (rawOptions.ɵlearning !== void 0 && options.intelligence.ɵgetLearningContainerId?.() !== void 0) throw new Error("Configure Learning Containers with `getLearningContainerId` on `CopilotKitIntelligence`; do not also pass deprecated `ɵlearning` to `CopilotRuntime`");
95
+ if (rawOptions.ɵlearning !== void 0 && options.intelligence.ɵgetLearningContainerId?.() !== void 0) throw new Error("Configure Learning Containers with `getLearningContainerId` on `CopilotKitIntelligence`; do not also pass deprecated `ɵlearning` to `CopilotKitRuntime`");
96
96
  if (typeof rawOptions.ɵlearning?.containerId === "string") assertStableLearningContainerId(rawOptions.ɵlearning.containerId);
97
97
  super(options, new IntelligenceAgentRunner({
98
98
  url: options.intelligence.ɵgetRunnerWsUrl(),
@@ -107,9 +107,9 @@ var CopilotIntelligenceRuntime = class CopilotIntelligenceRuntime extends BaseCo
107
107
  this.learning = options.ɵlearning;
108
108
  this.identifyUser = hasWebIdentity ? rawOptions.identifyUser : void 0;
109
109
  this.generateThreadNames = options.generateThreadNames ?? true;
110
- this.lockTtlSeconds = Math.min(options.lockTtlSeconds ?? 20, CopilotIntelligenceRuntime.MAX_LOCK_TTL_SECONDS);
110
+ this.lockTtlSeconds = Math.min(options.lockTtlSeconds ?? 20, CopilotKitIntelligenceRuntime.MAX_LOCK_TTL_SECONDS);
111
111
  this.lockKeyPrefix = options.lockKeyPrefix;
112
- this.lockHeartbeatIntervalSeconds = Math.min(options.lockHeartbeatIntervalSeconds ?? 15, CopilotIntelligenceRuntime.MAX_HEARTBEAT_INTERVAL_SECONDS);
112
+ this.lockHeartbeatIntervalSeconds = Math.min(options.lockHeartbeatIntervalSeconds ?? 15, CopilotKitIntelligenceRuntime.MAX_HEARTBEAT_INTERVAL_SECONDS);
113
113
  this.channels = [...rawOptions.channels ?? []];
114
114
  for (const c of this.channels) if (!c || typeof c !== "object" || !c.name) throw new Error("Intelligence Channel is missing a `name` — pass createChannel({ name }) for each Channel in `channels`");
115
115
  }
@@ -132,16 +132,16 @@ function isIntelligenceRuntime(runtime) {
132
132
  return runtime.mode === RUNTIME_MODE_INTELLIGENCE && !!runtime.intelligence;
133
133
  }
134
134
  /**
135
- * Compatibility shim that preserves the legacy `CopilotRuntime` entrypoint.
136
- * New code should prefer `CopilotSseRuntime` or `CopilotIntelligenceRuntime`.
135
+ * Compatibility shim that preserves the legacy `CopilotKitRuntime` entrypoint.
136
+ * New code should prefer `CopilotKitSseRuntime` or `CopilotKitIntelligenceRuntime`.
137
137
  *
138
- * Exported to consumers as the {@link CopilotRuntime} value (typed as
139
- * {@link CopilotRuntimeConstructor}) rather than as a class, so that the
138
+ * Exported to consumers as the {@link CopilotKitRuntime} value (typed as
139
+ * {@link CopilotKitRuntimeConstructor}) rather than as a class, so that the
140
140
  * channel-presence brand can flow from construction into the handler type.
141
141
  */
142
142
  var CopilotRuntimeShim = class {
143
143
  constructor(options) {
144
- this.delegate = hasIntelligenceOptions(options) ? new CopilotIntelligenceRuntime(options) : new CopilotSseRuntime(options);
144
+ this.delegate = hasIntelligenceOptions(options) ? new CopilotKitIntelligenceRuntime(options) : new CopilotKitSseRuntime(options);
145
145
  const reporter = getRuntimeErrorReporterFromOptions(options);
146
146
  if (reporter) attachRuntimeErrorReporter(this, reporter);
147
147
  }
@@ -231,18 +231,18 @@ var CopilotRuntimeShim = class {
231
231
  }
232
232
  };
233
233
  /**
234
- * The public `CopilotRuntime` constructor. Backed by {@link CopilotRuntimeShim}
235
- * but typed as {@link CopilotRuntimeConstructor} so that constructing with a
234
+ * The public `CopilotKitRuntime` constructor. Backed by {@link CopilotRuntimeShim}
235
+ * but typed as {@link CopilotKitRuntimeConstructor} so that constructing with a
236
236
  * non-empty `channels` array yields a {@link RuntimeWithDeclaredChannels}-branded
237
237
  * runtime type.
238
238
  *
239
239
  * The `as unknown as` cast is required (not dishonest widening): the brand is a
240
240
  * phantom, compile-time-only marker with no runtime representation, so the shim
241
241
  * instances legitimately do not carry the brand property. Behavior is identical
242
- * to the former `class CopilotRuntime` — this only refines the static type.
242
+ * to the former `class CopilotKitRuntime` — this only refines the static type.
243
243
  */
244
- const CopilotRuntime = CopilotRuntimeShim;
244
+ const CopilotKitRuntime = CopilotRuntimeShim;
245
245
 
246
246
  //#endregion
247
- export { CopilotIntelligenceRuntime, CopilotRuntime, CopilotSseRuntime, VERSION, isIntelligenceRuntime, resolveAgents };
247
+ export { CopilotKitIntelligenceRuntime, CopilotKitRuntime, CopilotKitSseRuntime, VERSION, isIntelligenceRuntime, resolveAgents };
248
248
  //# sourceMappingURL=runtime.mjs.map