@copilotkit/runtime 1.10.6-next.4 → 1.10.6-next.6

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 (43) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{chunk-F7IANE7Z.mjs → chunk-27JKTS6P.mjs} +8 -2
  3. package/dist/chunk-27JKTS6P.mjs.map +1 -0
  4. package/dist/{chunk-IDGTM3MH.mjs → chunk-3E7IQ6TR.mjs} +2 -2
  5. package/dist/{chunk-K3NXT234.mjs → chunk-BC7SRXHH.mjs} +10 -8
  6. package/dist/chunk-BC7SRXHH.mjs.map +1 -0
  7. package/dist/{chunk-MESW37CD.mjs → chunk-MTFW77DQ.mjs} +2 -2
  8. package/dist/{chunk-RA6S32TD.mjs → chunk-O7WFHCR2.mjs} +2 -2
  9. package/dist/{chunk-LPILCDAF.mjs → chunk-VCGA7OLG.mjs} +2 -2
  10. package/dist/index.js +15 -7
  11. package/dist/index.js.map +1 -1
  12. package/dist/index.mjs +6 -6
  13. package/dist/lib/index.d.ts +8 -0
  14. package/dist/lib/index.js +15 -7
  15. package/dist/lib/index.js.map +1 -1
  16. package/dist/lib/index.mjs +6 -6
  17. package/dist/lib/integrations/index.js +2 -2
  18. package/dist/lib/integrations/index.js.map +1 -1
  19. package/dist/lib/integrations/index.mjs +5 -5
  20. package/dist/lib/integrations/nest/index.js +2 -2
  21. package/dist/lib/integrations/nest/index.js.map +1 -1
  22. package/dist/lib/integrations/nest/index.mjs +3 -3
  23. package/dist/lib/integrations/node-express/index.js +2 -2
  24. package/dist/lib/integrations/node-express/index.js.map +1 -1
  25. package/dist/lib/integrations/node-express/index.mjs +3 -3
  26. package/dist/lib/integrations/node-http/index.js +2 -2
  27. package/dist/lib/integrations/node-http/index.js.map +1 -1
  28. package/dist/lib/integrations/node-http/index.mjs +2 -2
  29. package/dist/service-adapters/index.js +7 -1
  30. package/dist/service-adapters/index.js.map +1 -1
  31. package/dist/service-adapters/index.mjs +1 -1
  32. package/package.json +3 -3
  33. package/src/lib/runtime/agui-action.ts +8 -4
  34. package/src/lib/runtime/copilot-runtime.ts +2 -1
  35. package/src/lib/runtime/remote-actions.ts +2 -8
  36. package/src/service-adapters/events.ts +1 -0
  37. package/src/service-adapters/langchain/utils.ts +8 -1
  38. package/dist/chunk-F7IANE7Z.mjs.map +0 -1
  39. package/dist/chunk-K3NXT234.mjs.map +0 -1
  40. /package/dist/{chunk-IDGTM3MH.mjs.map → chunk-3E7IQ6TR.mjs.map} +0 -0
  41. /package/dist/{chunk-MESW37CD.mjs.map → chunk-MTFW77DQ.mjs.map} +0 -0
  42. /package/dist/{chunk-RA6S32TD.mjs.map → chunk-O7WFHCR2.mjs.map} +0 -0
  43. /package/dist/{chunk-LPILCDAF.mjs.map → chunk-VCGA7OLG.mjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LangGraphEventTypes
3
- } from "./chunk-K3NXT234.mjs";
3
+ } from "./chunk-BC7SRXHH.mjs";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-FHD4JECV.mjs";
@@ -172,4 +172,4 @@ export {
172
172
  CustomEventNames,
173
173
  LangGraphAgent
174
174
  };
175
- //# sourceMappingURL=chunk-MESW37CD.mjs.map
175
+ //# sourceMappingURL=chunk-MTFW77DQ.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-K3NXT234.mjs";
5
+ } from "./chunk-BC7SRXHH.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-FHD4JECV.mjs";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
22
22
  export {
23
23
  copilotRuntimeNestEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-RA6S32TD.mjs.map
25
+ //# sourceMappingURL=chunk-O7WFHCR2.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-K3NXT234.mjs";
5
+ } from "./chunk-BC7SRXHH.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-FHD4JECV.mjs";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNodeExpressEndpoint, "copilotRuntimeNodeExpressEndpoint");
22
22
  export {
23
23
  copilotRuntimeNodeExpressEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-LPILCDAF.mjs.map
25
+ //# sourceMappingURL=chunk-VCGA7OLG.mjs.map
package/dist/index.js CHANGED
@@ -44,7 +44,7 @@ var require_package = __commonJS({
44
44
  publishConfig: {
45
45
  access: "public"
46
46
  },
47
- version: "1.10.6-next.4",
47
+ version: "1.10.6-next.6",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -113,7 +113,7 @@ var require_package = __commonJS({
113
113
  "@ag-ui/client": ">=0.0.39",
114
114
  "@ag-ui/core": ">=0.0.39",
115
115
  "@ag-ui/encoder": ">=0.0.39",
116
- "@ag-ui/langgraph": ">=0.0.17",
116
+ "@ag-ui/langgraph": ">=0.0.18",
117
117
  "@ag-ui/proto": ">=0.0.39"
118
118
  },
119
119
  keywords: [
@@ -594,6 +594,7 @@ function convertMessageToLangChainMessage(message) {
594
594
  __name(convertMessageToLangChainMessage, "convertMessageToLangChainMessage");
595
595
  function convertActionInputToLangChainTool(actionInput) {
596
596
  return new import_tools.DynamicStructuredTool({
597
+ ...actionInput,
597
598
  name: actionInput.name,
598
599
  description: actionInput.description,
599
600
  schema: (0, import_shared5.convertJsonSchemaToZodSchema)(JSON.parse(actionInput.jsonSchema), true),
@@ -628,7 +629,12 @@ __name(maybeSendActionExecutionResultIsMessage, "maybeSendActionExecutionResultI
628
629
  async function streamLangChainResponse({ result, eventStream$, actionExecution }) {
629
630
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
630
631
  if (typeof result === "string") {
631
- if (!actionExecution) {
632
+ if (!actionExecution || (actionExecution == null ? void 0 : actionExecution.returnDirect)) {
633
+ eventStream$.sendActionExecutionResult({
634
+ actionExecutionId: actionExecution.id,
635
+ actionName: actionExecution.name,
636
+ result
637
+ });
632
638
  eventStream$.sendTextMessage((0, import_shared5.randomId)(), result);
633
639
  } else {
634
640
  eventStream$.sendActionExecutionResult({
@@ -5038,7 +5044,8 @@ please use an LLM adapter instead.`
5038
5044
  const serverSideActionsInput = serverSideActions.map((action) => ({
5039
5045
  name: action.name,
5040
5046
  description: action.description,
5041
- jsonSchema: JSON.stringify((0, import_shared18.actionParametersToJsonSchema)(action.parameters))
5047
+ jsonSchema: JSON.stringify((0, import_shared18.actionParametersToJsonSchema)(action.parameters)),
5048
+ additionalConfig: action.additionalConfig
5042
5049
  }));
5043
5050
  const actionInputs = flattenToolCallsNoDuplicates([
5044
5051
  ...serverSideActionsInput,
@@ -6472,7 +6479,7 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
6472
6479
  name: agent.agentId,
6473
6480
  description: agent.description,
6474
6481
  parameters: [],
6475
- handler: async (_args) => {
6482
+ handler: async () => {
6476
6483
  },
6477
6484
  remoteAgentHandler: async ({ actionInputsWithoutAgents, threadId }) => {
6478
6485
  var _a;
@@ -6949,7 +6956,7 @@ var RuntimeEventSource = class {
6949
6956
  };
6950
6957
  __name(RuntimeEventSource, "RuntimeEventSource");
6951
6958
  async function executeAction(eventStream$, guardrailsResult$, action, actionArguments, actionExecutionParentMessageId, actionExecutionId, actionInputsWithoutAgents, threadId) {
6952
- var _a;
6959
+ var _a, _b;
6953
6960
  if (guardrailsResult$) {
6954
6961
  const { status } = await (0, import_rxjs4.firstValueFrom)(guardrailsResult$);
6955
6962
  if (status === "denied") {
@@ -7030,7 +7037,8 @@ async function executeAction(eventStream$, guardrailsResult$, action, actionArgu
7030
7037
  eventStream$,
7031
7038
  actionExecution: {
7032
7039
  name: action.name,
7033
- id: actionExecutionId
7040
+ id: actionExecutionId,
7041
+ returnDirect: (_b = action.additionalConfig) == null ? void 0 : _b.returnDirect
7034
7042
  }
7035
7043
  });
7036
7044
  } catch (e) {