@copilotkit/shared 1.5.17-next.0 → 1.5.18-next.0

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.
@@ -1,4 +1,5 @@
1
1
  import { GraphQLError } from "graphql";
2
+ import { COPILOTKIT_VERSION } from "../index";
2
3
 
3
4
  export enum Severity {
4
5
  Error = "error",
@@ -10,6 +11,7 @@ export const ERROR_NAMES = {
10
11
  COPILOT_REMOTE_ENDPOINT_DISCOVERY_ERROR: "CopilotKitRemoteEndpointDiscoveryError",
11
12
  COPILOT_KIT_AGENT_DISCOVERY_ERROR: "CopilotKitAgentDiscoveryError",
12
13
  COPILOT_KIT_LOW_LEVEL_ERROR: "CopilotKitLowLevelError",
14
+ COPILOT_KIT_VERSION_MISMATCH_ERROR: "CopilotKitVersionMismatchError",
13
15
  RESOLVED_COPILOT_KIT_ERROR: "ResolvedCopilotKitError",
14
16
  CONFIGURATION_ERROR: "ConfigurationError",
15
17
  MISSING_PUBLIC_API_KEY_ERROR: "MissingPublicApiKeyError",
@@ -24,6 +26,7 @@ export enum CopilotKitErrorCode {
24
26
  REMOTE_ENDPOINT_NOT_FOUND = "REMOTE_ENDPOINT_NOT_FOUND",
25
27
  MISUSE = "MISUSE",
26
28
  UNKNOWN = "UNKNOWN",
29
+ VERSION_MISMATCH = "VERSION_MISMATCH",
27
30
  CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
28
31
  MISSING_PUBLIC_API_KEY_ERROR = "MISSING_PUBLIC_API_KEY_ERROR",
29
32
  UPGRADE_REQUIRED_ERROR = "UPGRADE_REQUIRED_ERROR",
@@ -76,6 +79,10 @@ export const ERROR_CONFIG = {
76
79
  troubleshootingUrl: null,
77
80
  severity: Severity.Error,
78
81
  },
82
+ [CopilotKitErrorCode.VERSION_MISMATCH]: {
83
+ statusCode: 400,
84
+ troubleshootingUrl: null,
85
+ },
79
86
  };
80
87
 
81
88
  export class CopilotKitError extends GraphQLError {
@@ -131,6 +138,24 @@ export class CopilotKitMisuseError extends CopilotKitError {
131
138
  }
132
139
  }
133
140
 
141
+ /**
142
+ * Error thrown when CPK versions does not match
143
+ *
144
+ * @extends CopilotKitError
145
+ */
146
+ export class CopilotKitVersionMismatchError extends CopilotKitError {
147
+ constructor({
148
+ reactCoreVersion,
149
+ runtimeVersion,
150
+ runtimeClientGqlVersion,
151
+ }: VersionMismatchResponse) {
152
+ const code = CopilotKitErrorCode.VERSION_MISMATCH;
153
+ const message = `Version mismatch detected: @copilotkit/runtime@${runtimeVersion ?? ""} is not compatible with @copilotkit/react-core@${reactCoreVersion} and @copilotkit/runtime-client-gql@${runtimeClientGqlVersion}. Please ensure all installed copilotkit packages are on the same version.`;
154
+ super({ message, code });
155
+ this.name = ERROR_NAMES.COPILOT_KIT_VERSION_MISMATCH_ERROR;
156
+ }
157
+ }
158
+
134
159
  /**
135
160
  * Error thrown when the CopilotKit API endpoint cannot be discovered or accessed.
136
161
  * This typically occurs when:
@@ -311,3 +336,30 @@ export class UpgradeRequiredError extends ConfigurationError {
311
336
  this.severity = Severity.Error;
312
337
  }
313
338
  }
339
+
340
+ interface VersionMismatchResponse {
341
+ runtimeVersion?: string;
342
+ runtimeClientGqlVersion: string;
343
+ reactCoreVersion: string;
344
+ }
345
+
346
+ export async function detectPossibleVersionMismatchError({
347
+ runtimeVersion,
348
+ runtimeClientGqlVersion,
349
+ }: {
350
+ runtimeVersion?: string;
351
+ runtimeClientGqlVersion: string;
352
+ }) {
353
+ if (!runtimeVersion || runtimeVersion === "" || !runtimeClientGqlVersion) return;
354
+ if (
355
+ COPILOTKIT_VERSION !== runtimeVersion ||
356
+ COPILOTKIT_VERSION !== runtimeClientGqlVersion ||
357
+ runtimeVersion !== runtimeClientGqlVersion
358
+ ) {
359
+ throw new CopilotKitVersionMismatchError({
360
+ runtimeVersion,
361
+ runtimeClientGqlVersion,
362
+ reactCoreVersion: COPILOTKIT_VERSION,
363
+ });
364
+ }
365
+ }
@@ -1 +0,0 @@
1
- //# sourceMappingURL=chunk-HGLO5LDS.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils/errors.ts"],"sourcesContent":["import { GraphQLError } from \"graphql\";\n\nexport enum Severity {\n Error = \"error\",\n}\n\nexport const ERROR_NAMES = {\n COPILOT_ERROR: \"CopilotError\",\n COPILOT_API_DISCOVERY_ERROR: \"CopilotApiDiscoveryError\",\n COPILOT_REMOTE_ENDPOINT_DISCOVERY_ERROR: \"CopilotKitRemoteEndpointDiscoveryError\",\n COPILOT_KIT_AGENT_DISCOVERY_ERROR: \"CopilotKitAgentDiscoveryError\",\n COPILOT_KIT_LOW_LEVEL_ERROR: \"CopilotKitLowLevelError\",\n RESOLVED_COPILOT_KIT_ERROR: \"ResolvedCopilotKitError\",\n CONFIGURATION_ERROR: \"ConfigurationError\",\n MISSING_PUBLIC_API_KEY_ERROR: \"MissingPublicApiKeyError\",\n UPGRADE_REQUIRED_ERROR: \"UpgradeRequiredError\",\n} as const;\n\nexport enum CopilotKitErrorCode {\n NETWORK_ERROR = \"NETWORK_ERROR\",\n NOT_FOUND = \"NOT_FOUND\",\n AGENT_NOT_FOUND = \"AGENT_NOT_FOUND\",\n API_NOT_FOUND = \"API_NOT_FOUND\",\n REMOTE_ENDPOINT_NOT_FOUND = \"REMOTE_ENDPOINT_NOT_FOUND\",\n MISUSE = \"MISUSE\",\n UNKNOWN = \"UNKNOWN\",\n CONFIGURATION_ERROR = \"CONFIGURATION_ERROR\",\n MISSING_PUBLIC_API_KEY_ERROR = \"MISSING_PUBLIC_API_KEY_ERROR\",\n UPGRADE_REQUIRED_ERROR = \"UPGRADE_REQUIRED_ERROR\",\n}\n\nconst BASE_URL = \"https://docs.copilotkit.ai\";\n\nconst getSeeMoreMarkdown = (link: string) => `See more: [${link}](${link})`;\n\nexport const ERROR_CONFIG = {\n [CopilotKitErrorCode.NETWORK_ERROR]: {\n statusCode: 503,\n troubleshootingUrl: `${BASE_URL}/troubleshooting/common-issues#i-am-getting-a-network-errors--api-not-found`,\n },\n [CopilotKitErrorCode.NOT_FOUND]: {\n statusCode: 404,\n troubleshootingUrl: `${BASE_URL}/troubleshooting/common-issues#i-am-getting-a-network-errors--api-not-found`,\n },\n [CopilotKitErrorCode.AGENT_NOT_FOUND]: {\n statusCode: 500,\n troubleshootingUrl: `${BASE_URL}/coagents/troubleshooting/common-issues#i-am-getting-agent-not-found-error`,\n },\n [CopilotKitErrorCode.API_NOT_FOUND]: {\n statusCode: 404,\n troubleshootingUrl: `${BASE_URL}/troubleshooting/common-issues#i-am-getting-a-network-errors--api-not-found`,\n },\n [CopilotKitErrorCode.REMOTE_ENDPOINT_NOT_FOUND]: {\n statusCode: 404,\n troubleshootingUrl: `${BASE_URL}/troubleshooting/common-issues#i-am-getting-copilotkits-remote-endpoint-not-found-error`,\n },\n [CopilotKitErrorCode.MISUSE]: {\n statusCode: 400,\n troubleshootingUrl: null,\n },\n [CopilotKitErrorCode.UNKNOWN]: {\n statusCode: 500,\n },\n [CopilotKitErrorCode.CONFIGURATION_ERROR]: {\n statusCode: 400,\n troubleshootingUrl: null,\n severity: Severity.Error,\n },\n [CopilotKitErrorCode.MISSING_PUBLIC_API_KEY_ERROR]: {\n statusCode: 400,\n troubleshootingUrl: null,\n severity: Severity.Error,\n },\n [CopilotKitErrorCode.UPGRADE_REQUIRED_ERROR]: {\n statusCode: 402,\n troubleshootingUrl: null,\n severity: Severity.Error,\n },\n};\n\nexport class CopilotKitError extends GraphQLError {\n code: CopilotKitErrorCode;\n statusCode: number;\n severity?: Severity;\n constructor({\n message = \"Unknown error occurred\",\n code,\n severity,\n }: {\n message?: string;\n code: CopilotKitErrorCode;\n severity?: Severity;\n }) {\n const name = ERROR_NAMES.COPILOT_ERROR;\n const { statusCode } = ERROR_CONFIG[code];\n\n super(message, {\n extensions: {\n name,\n statusCode,\n },\n });\n this.code = code;\n this.name = name;\n this.statusCode = statusCode;\n this.severity = severity;\n }\n}\n\n/**\n * Error thrown when we can identify wrong usage of our components.\n * This helps us notify the developer before real errors can happen\n *\n * @extends CopilotKitError\n */\nexport class CopilotKitMisuseError extends CopilotKitError {\n constructor({\n message,\n code = CopilotKitErrorCode.MISUSE,\n }: {\n message: string;\n code?: CopilotKitErrorCode;\n }) {\n const docsLink =\n \"troubleshootingUrl\" in ERROR_CONFIG[code]\n ? getSeeMoreMarkdown(ERROR_CONFIG[code].troubleshootingUrl as string)\n : null;\n const finalMessage = docsLink ? `${message}.\\n\\n${docsLink}` : message;\n super({ message: finalMessage, code });\n this.name = ERROR_NAMES.COPILOT_API_DISCOVERY_ERROR;\n }\n}\n\n/**\n * Error thrown when the CopilotKit API endpoint cannot be discovered or accessed.\n * This typically occurs when:\n * - The API endpoint URL is invalid or misconfigured\n * - The API service is not running at the expected location\n * - There are network/firewall issues preventing access\n *\n * @extends CopilotKitError\n */\nexport class CopilotKitApiDiscoveryError extends CopilotKitError {\n constructor(\n params: {\n message?: string;\n code?: CopilotKitErrorCode.API_NOT_FOUND | CopilotKitErrorCode.REMOTE_ENDPOINT_NOT_FOUND;\n } = {},\n ) {\n const message = params.message ?? \"Failed to find CopilotKit API endpoint\";\n const code = params.code ?? CopilotKitErrorCode.API_NOT_FOUND;\n const errorMessage = `${message}.\\n\\n${getSeeMoreMarkdown(ERROR_CONFIG[code].troubleshootingUrl)}`;\n super({ message: errorMessage, code });\n this.name = ERROR_NAMES.COPILOT_API_DISCOVERY_ERROR;\n }\n}\n\n/**\n * This error is used for endpoints specified in runtime's remote endpoints. If they cannot be contacted\n * This typically occurs when:\n * - The API endpoint URL is invalid or misconfigured\n * - The API service is not running at the expected location\n *\n * @extends CopilotKitApiDiscoveryError\n */\nexport class CopilotKitRemoteEndpointDiscoveryError extends CopilotKitApiDiscoveryError {\n constructor(params?: { message?: string }) {\n const message = params?.message ?? \"Failed to find or contact remote endpoint\";\n const code = CopilotKitErrorCode.REMOTE_ENDPOINT_NOT_FOUND;\n super({ message, code });\n this.name = ERROR_NAMES.COPILOT_REMOTE_ENDPOINT_DISCOVERY_ERROR;\n }\n}\n\n/**\n * Error thrown when a LangGraph agent cannot be found or accessed.\n * This typically occurs when:\n * - The specified agent name does not exist in the deployment\n * - The agent configuration is invalid or missing\n * - The agent service is not properly deployed or initialized\n *\n * @extends CopilotKitError\n */\nexport class CopilotKitAgentDiscoveryError extends CopilotKitError {\n constructor(params?: { agentName?: string }) {\n const code = CopilotKitErrorCode.AGENT_NOT_FOUND;\n const baseMessage = \"Failed to find agent\";\n const configMessage = \"Please verify the agent name exists and is properly configured.\";\n const finalMessage = params?.agentName\n ? `${baseMessage} '${params.agentName}'. ${configMessage}\\n\\n${getSeeMoreMarkdown(ERROR_CONFIG[code].troubleshootingUrl)}`\n : `${baseMessage}. ${configMessage}\\n\\n${getSeeMoreMarkdown(ERROR_CONFIG[code].troubleshootingUrl)}`;\n super({ message: finalMessage || finalMessage, code });\n this.name = ERROR_NAMES.COPILOT_KIT_AGENT_DISCOVERY_ERROR;\n }\n}\n\n/**\n * Handles low-level networking errors that occur before a request reaches the server.\n * These errors arise from issues in the underlying communication infrastructure rather than\n * application-level logic or server responses. Typically used to handle \"fetch failed\" errors\n * where no HTTP status code is available.\n *\n * Common scenarios include:\n * - Connection failures (ECONNREFUSED) when server is down/unreachable\n * - DNS resolution failures (ENOTFOUND) when domain can't be resolved\n * - Timeouts (ETIMEDOUT) when request takes too long\n * - Protocol/transport layer errors like SSL/TLS issues\n */\nexport class CopilotKitLowLevelError extends CopilotKitError {\n constructor({ error, url, message }: { error: Error; url: string; message?: string }) {\n let code = CopilotKitErrorCode.NETWORK_ERROR;\n\n const getMessageByCode = (errorCode?: string) => {\n const troubleshootingLink = ERROR_CONFIG[code].troubleshootingUrl;\n switch (errorCode) {\n case \"ECONNREFUSED\":\n return `Connection to ${url} was refused. Ensure the server is running and accessible.\\n\\n${getSeeMoreMarkdown(troubleshootingLink)}`;\n case \"ENOTFOUND\":\n return `The server on ${url} could not be found. Check the URL or your network configuration.\\n\\n${getSeeMoreMarkdown(ERROR_CONFIG[CopilotKitErrorCode.NOT_FOUND].troubleshootingUrl)}`;\n case \"ETIMEDOUT\":\n return `The connection to ${url} timed out. The server might be overloaded or taking too long to respond.\\n\\n${getSeeMoreMarkdown(troubleshootingLink)}`;\n default:\n return `Failed to fetch from url ${url}.\n\nPossible reasons:\n- -The server might be down or unreachable\n- -There might be a network issue (e.g., DNS failure, connection timeout) \n- -The URL might be incorrect\n- -The server is not running on the specified port\n\n${getSeeMoreMarkdown(troubleshootingLink)}`;\n }\n };\n // @ts-expect-error -- code may exist\n const errorMessage = message ?? getMessageByCode(error.code as string);\n\n super({ message: errorMessage, code });\n\n this.name = ERROR_NAMES.COPILOT_KIT_LOW_LEVEL_ERROR;\n }\n}\n\n/**\n * Generic catch-all error handler for HTTP responses from the CopilotKit API where a status code is available.\n * Used when we receive an HTTP error status and wish to handle broad range of them\n *\n * This differs from CopilotKitLowLevelError in that:\n * - ResolvedCopilotKitError: Server was reached and returned an HTTP status\n * - CopilotKitLowLevelError: Error occurred before reaching server (e.g. network failure)\n *\n * @param status - The HTTP status code received from the API response\n * @param message - Optional error message to include\n * @param code - Optional specific CopilotKitErrorCode to override default behavior\n *\n * Default behavior:\n * - 400 Bad Request: Maps to CopilotKitApiDiscoveryError\n * - All other status codes: Maps to UNKNOWN error code if no specific code provided\n */\nexport class ResolvedCopilotKitError extends CopilotKitError {\n constructor({\n status,\n message,\n code,\n isRemoteEndpoint,\n }: {\n status: number;\n message?: string;\n code?: CopilotKitErrorCode;\n isRemoteEndpoint?: boolean;\n }) {\n let resolvedCode = code;\n if (!resolvedCode) {\n switch (status) {\n case 400:\n throw new CopilotKitApiDiscoveryError({ message });\n case 404:\n throw isRemoteEndpoint\n ? new CopilotKitRemoteEndpointDiscoveryError({ message })\n : new CopilotKitApiDiscoveryError({ message });\n default:\n resolvedCode = CopilotKitErrorCode.UNKNOWN;\n super({ message, code: resolvedCode });\n }\n } else {\n super({ message, code: resolvedCode });\n }\n this.name = ERROR_NAMES.RESOLVED_COPILOT_KIT_ERROR;\n }\n}\n\nexport class ConfigurationError extends CopilotKitError {\n constructor(message: string) {\n super({ message, code: CopilotKitErrorCode.CONFIGURATION_ERROR });\n this.name = ERROR_NAMES.CONFIGURATION_ERROR;\n this.severity = Severity.Error;\n }\n}\n\nexport class MissingPublicApiKeyError extends ConfigurationError {\n constructor(message: string) {\n super(message);\n this.name = ERROR_NAMES.MISSING_PUBLIC_API_KEY_ERROR;\n this.severity = Severity.Error;\n }\n}\n\nexport class UpgradeRequiredError extends ConfigurationError {\n constructor(message: string) {\n super(message);\n this.name = ERROR_NAMES.UPGRADE_REQUIRED_ERROR;\n this.severity = Severity.Error;\n }\n}\n"],"mappings":";AAAA,SAAS,oBAAoB;AAEtB,IAAK,WAAL,kBAAKA,cAAL;AACL,EAAAA,UAAA,WAAQ;AADE,SAAAA;AAAA,GAAA;AAIL,IAAM,cAAc;AAAA,EACzB,eAAe;AAAA,EACf,6BAA6B;AAAA,EAC7B,yCAAyC;AAAA,EACzC,mCAAmC;AAAA,EACnC,6BAA6B;AAAA,EAC7B,4BAA4B;AAAA,EAC5B,qBAAqB;AAAA,EACrB,8BAA8B;AAAA,EAC9B,wBAAwB;AAC1B;AAEO,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,mBAAgB;AAChB,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,qBAAkB;AAClB,EAAAA,qBAAA,mBAAgB;AAChB,EAAAA,qBAAA,+BAA4B;AAC5B,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,yBAAsB;AACtB,EAAAA,qBAAA,kCAA+B;AAC/B,EAAAA,qBAAA,4BAAyB;AAVf,SAAAA;AAAA,GAAA;AAaZ,IAAM,WAAW;AAEjB,IAAM,qBAAqB,CAAC,SAAiB,cAAc,SAAS;AAE7D,IAAM,eAAe;AAAA,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