@copilotkit/runtime 1.50.0-beta.14 → 1.50.0-beta.16

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/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "1.50.0-beta.14",
12
+ "version": "1.50.0-beta.16",
13
13
  "sideEffects": false,
14
14
  "main": "./dist/index.js",
15
15
  "module": "./dist/index.mjs",
@@ -50,8 +50,8 @@
50
50
  "tsconfig": "1.4.6"
51
51
  },
52
52
  "dependencies": {
53
- "@copilotkitnext/agent": "0.0.30",
54
- "@copilotkitnext/runtime": "0.0.30",
53
+ "@copilotkitnext/agent": "0.0.31",
54
+ "@copilotkitnext/runtime": "0.0.31",
55
55
  "@graphql-yoga/plugin-defer-stream": "^3.3.1",
56
56
  "@hono/node-server": "^1.13.5",
57
57
  "@langchain/core": "^0.3.38",
@@ -71,7 +71,7 @@
71
71
  "rxjs": "7.8.1",
72
72
  "type-graphql": "2.0.0-rc.1",
73
73
  "zod": "^3.23.3",
74
- "@copilotkit/shared": "1.50.0-beta.14"
74
+ "@copilotkit/shared": "1.50.0-beta.16"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@anthropic-ai/sdk": "^0.57.0",
package/src/lib/index.ts CHANGED
@@ -13,7 +13,7 @@ export * from "./runtime/telemetry-agent-runner";
13
13
  // The below re-exports "dummy" classes and types, to get a deprecation warning redirecting the users to import these from the correct, new route
14
14
 
15
15
  /**
16
- * @deprecated LangGraphAgent import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead
16
+ * @deprecated LangGraphAgent import from `@copilotkit/runtime` is deprecated. Please import it from `@copilotkit/runtime/langgraph` instead
17
17
  */
18
18
  export class LangGraphAgent {
19
19
  constructor() {
@@ -24,7 +24,7 @@ export class LangGraphAgent {
24
24
  }
25
25
 
26
26
  /**
27
- * @deprecated LangGraphHttpAgent import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead
27
+ * @deprecated LangGraphHttpAgent import from `@copilotkit/runtime` is deprecated. Please import it from `@copilotkit/runtime/langgraph` instead
28
28
  */
29
29
  export class LangGraphHttpAgent {
30
30
  constructor() {
@@ -35,18 +35,18 @@ export class LangGraphHttpAgent {
35
35
  }
36
36
 
37
37
  /**
38
- * @deprecated TextMessageEvents import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead
38
+ * @deprecated TextMessageEvents import from `@copilotkit/runtime` is deprecated. Please import it from `@copilotkit/runtime/langgraph` instead
39
39
  */
40
40
  export type TextMessageEvents = any;
41
41
  /**
42
- * @deprecated ToolCallEvents import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead
42
+ * @deprecated ToolCallEvents import from `@copilotkit/runtime` is deprecated. Please import it from `@copilotkit/runtime/langgraph` instead
43
43
  */
44
44
  export type ToolCallEvents = any;
45
45
  /**
46
- * @deprecated CustomEventNames import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead
46
+ * @deprecated CustomEventNames import from `@copilotkit/runtime` is deprecated. Please import it from `@copilotkit/runtime/langgraph` instead
47
47
  */
48
48
  export type CustomEventNames = any;
49
49
  /**
50
- * @deprecated PredictStateTool import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead
50
+ * @deprecated PredictStateTool import from `@copilotkit/runtime` is deprecated. Please import it from `@copilotkit/runtime/langgraph` instead
51
51
  */
52
52
  export type PredictStateTool = any;
@@ -464,8 +464,7 @@ export class CopilotRuntime<const T extends Parameter[] | [] = []> {
464
464
  | undefined;
465
465
 
466
466
  // Get cloud base URL from environment or default
467
- const cloudBaseUrl =
468
- process.env.COPILOT_CLOUD_BASE_URL || "https://api.cloud.copilotkit.ai";
467
+ const cloudBaseUrl = process.env.COPILOT_CLOUD_BASE_URL || "https://api.cloud.copilotkit.ai";
469
468
 
470
469
  telemetry.capture("oss.runtime.copilot_request_created", {
471
470
  "cloud.guardrails.enabled": forwardedProps?.cloud?.guardrails !== undefined,
@@ -57,9 +57,7 @@ export class TelemetryAgentRunner implements AgentRunner {
57
57
  * Runs an agent with telemetry tracking.
58
58
  * Wraps the underlying runner's Observable stream with telemetry events.
59
59
  */
60
- run(
61
- ...args: Parameters<AgentRunner["run"]>
62
- ): ReturnType<AgentRunner["run"]> {
60
+ run(...args: Parameters<AgentRunner["run"]>): ReturnType<AgentRunner["run"]> {
63
61
  const streamInfo: AgentExecutionResponseInfo = {
64
62
  hashedLgcKey: this.hashedLgcKey,
65
63
  };
@@ -75,7 +73,11 @@ export class TelemetryAgentRunner implements AgentRunner {
75
73
  // Extract metadata from events if available
76
74
  tap((event) => {
77
75
  // Try to extract provider/model info from raw events
78
- const rawEvent = (event as { rawEvent?: { metadata?: Record<string, unknown>; data?: Record<string, unknown> } }).rawEvent;
76
+ const rawEvent = (
77
+ event as {
78
+ rawEvent?: { metadata?: Record<string, unknown>; data?: Record<string, unknown> };
79
+ }
80
+ ).rawEvent;
79
81
  if (rawEvent?.data) {
80
82
  const data = rawEvent.data as { output?: { model?: string } };
81
83
  if (data?.output?.model) {
@@ -84,7 +86,10 @@ export class TelemetryAgentRunner implements AgentRunner {
84
86
  }
85
87
  }
86
88
  if (rawEvent?.metadata) {
87
- const metadata = rawEvent.metadata as { langgraph_host?: string; langgraph_version?: string };
89
+ const metadata = rawEvent.metadata as {
90
+ langgraph_host?: string;
91
+ langgraph_version?: string;
92
+ };
88
93
  if (metadata?.langgraph_host) {
89
94
  streamInfo.langGraphHost = metadata.langgraph_host;
90
95
  }