@copilotkit/core 1.56.5-canary.1778052912 → 1.56.5-canary.1778068503

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/dist/index.cjs CHANGED
@@ -502,7 +502,7 @@ function withAbortErrorHandling(observable) {
502
502
  var ProxiedCopilotRuntimeAgent = class ProxiedCopilotRuntimeAgent extends _ag_ui_client.HttpAgent {
503
503
  runtimeUrl;
504
504
  credentials;
505
- remoteAgentId;
505
+ runtimeAgentId;
506
506
  transport;
507
507
  singleEndpointUrl;
508
508
  runtimeMode;
@@ -513,7 +513,7 @@ var ProxiedCopilotRuntimeAgent = class ProxiedCopilotRuntimeAgent extends _ag_ui
513
513
  constructor(config) {
514
514
  const normalizedRuntimeUrl = config.runtimeUrl ? config.runtimeUrl.replace(/\/$/, "") : void 0;
515
515
  const transport = config.transport ?? "auto";
516
- const routedId = config.remoteAgentId ?? config.agentId ?? "";
516
+ const routedId = config.runtimeAgentId ?? config.agentId ?? "";
517
517
  const runUrl = transport === "single" ? normalizedRuntimeUrl ?? config.runtimeUrl ?? "" : `${normalizedRuntimeUrl ?? config.runtimeUrl}/agent/${encodeURIComponent(routedId)}/run`;
518
518
  if (!runUrl) throw new Error("ProxiedCopilotRuntimeAgent requires a runtimeUrl when transport is set to 'single'.");
519
519
  super({
@@ -522,7 +522,7 @@ var ProxiedCopilotRuntimeAgent = class ProxiedCopilotRuntimeAgent extends _ag_ui
522
522
  });
523
523
  this.runtimeUrl = normalizedRuntimeUrl ?? config.runtimeUrl;
524
524
  this.credentials = config.credentials;
525
- this.remoteAgentId = config.remoteAgentId;
525
+ this.runtimeAgentId = config.runtimeAgentId;
526
526
  this.transport = transport;
527
527
  this.runtimeMode = config.runtimeMode ?? _copilotkit_shared.RUNTIME_MODE_SSE;
528
528
  this.intelligence = config.intelligence;
@@ -531,7 +531,7 @@ var ProxiedCopilotRuntimeAgent = class ProxiedCopilotRuntimeAgent extends _ag_ui
531
531
  if (this.transport === "single") this.singleEndpointUrl = this.runtimeUrl;
532
532
  }
533
533
  /**
534
- * The agent id used for outbound runtime requests — `remoteAgentId` when
534
+ * The agent id used for outbound runtime requests — `runtimeAgentId` when
535
535
  * set (manually-registered proxy), otherwise `agentId` (registry id
536
536
  * matches runtime id). Subscriber bookkeeping keeps using `agentId`
537
537
  * directly.
@@ -541,8 +541,8 @@ var ProxiedCopilotRuntimeAgent = class ProxiedCopilotRuntimeAgent extends _ag_ui
541
541
  * malformed `/agent//run` or `/agent/undefined/connect` URL silently.
542
542
  */
543
543
  routedAgentId() {
544
- const id = this.remoteAgentId ?? this.agentId;
545
- if (!id) throw new Error("ProxiedCopilotRuntimeAgent: cannot make a runtime request without an agentId or remoteAgentId.");
544
+ const id = this.runtimeAgentId ?? this.agentId;
545
+ if (!id) throw new Error("ProxiedCopilotRuntimeAgent: cannot make a runtime request without an agentId or runtimeAgentId.");
546
546
  return id;
547
547
  }
548
548
  get capabilities() {
@@ -675,7 +675,7 @@ var ProxiedCopilotRuntimeAgent = class ProxiedCopilotRuntimeAgent extends _ag_ui
675
675
  const cloned = new ProxiedCopilotRuntimeAgent({
676
676
  runtimeUrl: this.runtimeUrl,
677
677
  agentId: this.agentId,
678
- remoteAgentId: this.remoteAgentId,
678
+ runtimeAgentId: this.runtimeAgentId,
679
679
  description: this.description,
680
680
  headers: { ...this.headers },
681
681
  credentials: this.credentials,
@@ -930,7 +930,7 @@ var AgentRegistry = class {
930
930
  }
931
931
  /**
932
932
  * Register a proxied agent that routes outbound runtime requests to an
933
- * existing runtime agent (`remoteAgentId`) while exposing a distinct local
933
+ * existing runtime agent (`runtimeAgentId`) while exposing a distinct local
934
934
  * registry id (`agentId`). Throws if `agentId` is already taken by either a
935
935
  * local or runtime-discovered agent.
936
936
  *
@@ -939,14 +939,14 @@ var AgentRegistry = class {
939
939
  * implicit per-thread cloning. The returned `unregister` removes the proxy
940
940
  * from the registry and emits `onAgentsChanged`.
941
941
  */
942
- registerProxiedAgent({ agentId, remoteAgentId }) {
942
+ registerProxiedAgent({ agentId, runtimeAgentId }) {
943
943
  if (Object.prototype.hasOwnProperty.call(this._agents, agentId)) throw new Error(`CopilotKitCore.registerProxiedAgent: agentId "${agentId}" is already registered. Pick a different agentId, or unregister the existing agent first.`);
944
944
  const friends = this.core;
945
945
  const debug = friends.debug;
946
946
  const agent = new ProxiedCopilotRuntimeAgent({
947
947
  runtimeUrl: this._runtimeUrl,
948
948
  agentId,
949
- remoteAgentId,
949
+ runtimeAgentId,
950
950
  transport: this._runtimeTransport,
951
951
  credentials: friends.credentials,
952
952
  runtimeMode: this._runtimeUrl ? this._runtimeConnectionStatus === CopilotKitCoreRuntimeConnectionStatus.Connected ? this._runtimeMode : "pending" : _copilotkit_shared.RUNTIME_MODE_SSE,
@@ -2637,7 +2637,7 @@ var CopilotKitCore = class {
2637
2637
  /**
2638
2638
  * Register a proxied agent against an existing runtime agent. The proxy is
2639
2639
  * exposed under `agentId` (local registry id) and routes outbound runtime
2640
- * requests to `remoteAgentId`. Throws if `agentId` is already taken.
2640
+ * requests to `runtimeAgentId`. Throws if `agentId` is already taken.
2641
2641
  *
2642
2642
  * Returns the minted proxy and an `unregister` handle for cleanup.
2643
2643
  *
@@ -2647,7 +2647,7 @@ var CopilotKitCore = class {
2647
2647
  * @example
2648
2648
  * const { agent, unregister } = copilotkit.registerProxiedAgent({
2649
2649
  * agentId: "chat-1",
2650
- * remoteAgentId: "default",
2650
+ * runtimeAgentId: "default",
2651
2651
  * });
2652
2652
  * // ... <CopilotChat agentId="chat-1" />
2653
2653
  * // on cleanup: