@voltagent/server-core 1.0.21 → 1.0.23

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,4 @@
1
- import { ServerProviderDeps, A2AServerRegistry } from '@voltagent/core';
1
+ import { ServerProviderDeps, ConversationStepRecord, A2AServerRegistry } from '@voltagent/core';
2
2
  import { Logger, LogLevel, LogEntry, LogFilter } from '@voltagent/internal';
3
3
  import { UIMessage } from 'ai';
4
4
  import { A2AServerLike } from '@voltagent/internal/a2a';
@@ -826,6 +826,28 @@ declare const OBSERVABILITY_MEMORY_ROUTES: {
826
826
  };
827
827
  };
828
828
  };
829
+ readonly getConversationSteps: {
830
+ readonly method: "get";
831
+ readonly path: "/observability/memory/conversations/:conversationId/steps";
832
+ readonly summary: "Get conversation steps";
833
+ readonly description: "Fetch the recorded agent steps for a specific conversation stored in memory.";
834
+ readonly tags: readonly ["Observability", "Memory"];
835
+ readonly operationId: "getConversationSteps";
836
+ readonly responses: {
837
+ readonly 200: {
838
+ readonly description: "Successfully retrieved conversation steps";
839
+ readonly contentType: "application/json";
840
+ };
841
+ readonly 404: {
842
+ readonly description: "Conversation not found";
843
+ readonly contentType: "application/json";
844
+ };
845
+ readonly 500: {
846
+ readonly description: "Failed to retrieve conversation steps due to server error";
847
+ readonly contentType: "application/json";
848
+ };
849
+ };
850
+ };
829
851
  readonly getWorkingMemory: {
830
852
  readonly method: "get";
831
853
  readonly path: "/observability/memory/working-memory";
@@ -911,6 +933,28 @@ declare const ALL_ROUTES: {
911
933
  };
912
934
  };
913
935
  };
936
+ readonly getConversationSteps: {
937
+ readonly method: "get";
938
+ readonly path: "/observability/memory/conversations/:conversationId/steps";
939
+ readonly summary: "Get conversation steps";
940
+ readonly description: "Fetch the recorded agent steps for a specific conversation stored in memory.";
941
+ readonly tags: readonly ["Observability", "Memory"];
942
+ readonly operationId: "getConversationSteps";
943
+ readonly responses: {
944
+ readonly 200: {
945
+ readonly description: "Successfully retrieved conversation steps";
946
+ readonly contentType: "application/json";
947
+ };
948
+ readonly 404: {
949
+ readonly description: "Conversation not found";
950
+ readonly contentType: "application/json";
951
+ };
952
+ readonly 500: {
953
+ readonly description: "Failed to retrieve conversation steps due to server error";
954
+ readonly contentType: "application/json";
955
+ };
956
+ };
957
+ };
914
958
  readonly getWorkingMemory: {
915
959
  readonly method: "get";
916
960
  readonly path: "/observability/memory/working-memory";
@@ -1895,6 +1939,10 @@ interface MemoryConversationMessagesResult {
1895
1939
  conversation: MemoryConversationSummary;
1896
1940
  messages: UIMessage[];
1897
1941
  }
1942
+ interface MemoryConversationStepsResult {
1943
+ conversation: MemoryConversationSummary;
1944
+ steps: ConversationStepRecord[];
1945
+ }
1898
1946
  interface MemoryWorkingMemoryResult {
1899
1947
  agentId: string | null;
1900
1948
  agentName?: string | null;
@@ -1924,6 +1972,11 @@ interface MemoryGetMessagesQuery {
1924
1972
  after?: Date;
1925
1973
  roles?: string[];
1926
1974
  }
1975
+ interface MemoryGetStepsQuery {
1976
+ agentId?: string;
1977
+ limit?: number;
1978
+ operationId?: string;
1979
+ }
1927
1980
 
1928
1981
  /**
1929
1982
  * Handler for listing all agents
@@ -2045,6 +2098,7 @@ declare function listMemoryConversationsHandler(deps: ServerProviderDeps, query:
2045
2098
  offset: number;
2046
2099
  }>>;
2047
2100
  declare function getConversationMessagesHandler(deps: ServerProviderDeps, conversationId: string, query: MemoryGetMessagesQuery): Promise<ApiResponse<MemoryConversationMessagesResult>>;
2101
+ declare function getConversationStepsHandler(deps: ServerProviderDeps, conversationId: string, query: MemoryGetStepsQuery): Promise<ApiResponse<MemoryConversationStepsResult>>;
2048
2102
  declare function getWorkingMemoryHandler(deps: ServerProviderDeps, params: {
2049
2103
  agentId?: string;
2050
2104
  conversationId?: string;
@@ -2172,4 +2226,4 @@ declare function mapHandlerResponse(response: ApiResponse, type?: string): ApiRe
2172
2226
  */
2173
2227
  declare function getResponseStatus(response: ApiResponse): number;
2174
2228
 
2175
- export { handleGetAgent as $, type ApiResponse as A, type JsonRpcRequest as B, type A2ARequestContext as C, type AgentCardSkill as D, type ErrorResponse as E, type AgentCardProviderInfo as F, type AgentCardCapabilities as G, type HttpMethod as H, type AgentCard as I, type JsonRpcError as J, A2AErrorCode as K, LOG_ROUTES as L, type MemoryUserSummary as M, normalizeError as N, OBSERVABILITY_ROUTES as O, isJsonRpcRequest as P, handleGetAgents as Q, type ResponseDefinition as R, type SuccessResponse as S, handleGenerateText as T, UPDATE_ROUTES as U, VoltA2AError as V, WORKFLOW_ROUTES as W, handleStreamText as X, handleChatStream as Y, handleGenerateObject as Z, handleStreamObject as _, type A2AServerLikeWithHandlers as a, handleGetAgentHistory as a0, handleGetWorkflows as a1, handleGetWorkflow as a2, handleExecuteWorkflow as a3, handleStreamWorkflow as a4, handleSuspendWorkflow as a5, handleCancelWorkflow as a6, handleResumeWorkflow as a7, handleGetWorkflowState as a8, type LogFilterOptions as a9, type LogHandlerResponse as aa, handleGetLogs as ab, listMemoryUsersHandler as ac, listMemoryConversationsHandler as ad, getConversationMessagesHandler as ae, getWorkingMemoryHandler as af, mapLogResponse as ag, mapHandlerResponse as ah, getResponseStatus as ai, type OpenApiInfo as aj, type AppSetupConfig as ak, getOrCreateLogger as al, shouldEnableSwaggerUI as am, getOpenApiDoc as an, DEFAULT_CORS_OPTIONS as ao, type StreamResponse as b, isSuccessResponse as c, type MemoryUserAgentSummary as d, type MemoryConversationSummary as e, type MemoryConversationMessagesResult as f, type MemoryWorkingMemoryResult as g, type MemoryListUsersQuery as h, isErrorResponse as i, type MemoryListConversationsQuery as j, type MemoryGetMessagesQuery as k, type RouteDefinition as l, AGENT_ROUTES as m, OBSERVABILITY_MEMORY_ROUTES as n, ALL_ROUTES as o, getAllRoutesArray as p, MCP_ROUTES as q, A2A_ROUTES as r, getRoutesByTag as s, parseJsonRpcRequest as t, resolveAgentCard as u, executeA2ARequest as v, type A2AJsonRpcId as w, type JsonRpcResponse as x, type JsonRpcStream as y, type JsonRpcHandlerResult as z };
2229
+ export { handleGenerateObject as $, type ApiResponse as A, type JsonRpcStream as B, type JsonRpcHandlerResult as C, type JsonRpcRequest as D, type ErrorResponse as E, type A2ARequestContext as F, type AgentCardSkill as G, type HttpMethod as H, type AgentCardProviderInfo as I, type JsonRpcError as J, type AgentCardCapabilities as K, LOG_ROUTES as L, type MemoryUserSummary as M, type AgentCard as N, OBSERVABILITY_ROUTES as O, A2AErrorCode as P, normalizeError as Q, type ResponseDefinition as R, type SuccessResponse as S, isJsonRpcRequest as T, UPDATE_ROUTES as U, VoltA2AError as V, WORKFLOW_ROUTES as W, handleGetAgents as X, handleGenerateText as Y, handleStreamText as Z, handleChatStream as _, type A2AServerLikeWithHandlers as a, handleStreamObject as a0, handleGetAgent as a1, handleGetAgentHistory as a2, handleGetWorkflows as a3, handleGetWorkflow as a4, handleExecuteWorkflow as a5, handleStreamWorkflow as a6, handleSuspendWorkflow as a7, handleCancelWorkflow as a8, handleResumeWorkflow as a9, handleGetWorkflowState as aa, type LogFilterOptions as ab, type LogHandlerResponse as ac, handleGetLogs as ad, listMemoryUsersHandler as ae, listMemoryConversationsHandler as af, getConversationMessagesHandler as ag, getConversationStepsHandler as ah, getWorkingMemoryHandler as ai, mapLogResponse as aj, mapHandlerResponse as ak, getResponseStatus as al, type OpenApiInfo as am, type AppSetupConfig as an, getOrCreateLogger as ao, shouldEnableSwaggerUI as ap, getOpenApiDoc as aq, DEFAULT_CORS_OPTIONS as ar, type StreamResponse as b, isSuccessResponse as c, type MemoryUserAgentSummary as d, type MemoryConversationSummary as e, type MemoryConversationMessagesResult as f, type MemoryConversationStepsResult as g, type MemoryWorkingMemoryResult as h, isErrorResponse as i, type MemoryListUsersQuery as j, type MemoryListConversationsQuery as k, type MemoryGetMessagesQuery as l, type MemoryGetStepsQuery as m, type RouteDefinition as n, AGENT_ROUTES as o, OBSERVABILITY_MEMORY_ROUTES as p, ALL_ROUTES as q, getAllRoutesArray as r, MCP_ROUTES as s, A2A_ROUTES as t, getRoutesByTag as u, parseJsonRpcRequest as v, resolveAgentCard as w, executeA2ARequest as x, type A2AJsonRpcId as y, type JsonRpcResponse as z };
@@ -1,4 +1,4 @@
1
- import { ServerProviderDeps, A2AServerRegistry } from '@voltagent/core';
1
+ import { ServerProviderDeps, ConversationStepRecord, A2AServerRegistry } from '@voltagent/core';
2
2
  import { Logger, LogLevel, LogEntry, LogFilter } from '@voltagent/internal';
3
3
  import { UIMessage } from 'ai';
4
4
  import { A2AServerLike } from '@voltagent/internal/a2a';
@@ -826,6 +826,28 @@ declare const OBSERVABILITY_MEMORY_ROUTES: {
826
826
  };
827
827
  };
828
828
  };
829
+ readonly getConversationSteps: {
830
+ readonly method: "get";
831
+ readonly path: "/observability/memory/conversations/:conversationId/steps";
832
+ readonly summary: "Get conversation steps";
833
+ readonly description: "Fetch the recorded agent steps for a specific conversation stored in memory.";
834
+ readonly tags: readonly ["Observability", "Memory"];
835
+ readonly operationId: "getConversationSteps";
836
+ readonly responses: {
837
+ readonly 200: {
838
+ readonly description: "Successfully retrieved conversation steps";
839
+ readonly contentType: "application/json";
840
+ };
841
+ readonly 404: {
842
+ readonly description: "Conversation not found";
843
+ readonly contentType: "application/json";
844
+ };
845
+ readonly 500: {
846
+ readonly description: "Failed to retrieve conversation steps due to server error";
847
+ readonly contentType: "application/json";
848
+ };
849
+ };
850
+ };
829
851
  readonly getWorkingMemory: {
830
852
  readonly method: "get";
831
853
  readonly path: "/observability/memory/working-memory";
@@ -911,6 +933,28 @@ declare const ALL_ROUTES: {
911
933
  };
912
934
  };
913
935
  };
936
+ readonly getConversationSteps: {
937
+ readonly method: "get";
938
+ readonly path: "/observability/memory/conversations/:conversationId/steps";
939
+ readonly summary: "Get conversation steps";
940
+ readonly description: "Fetch the recorded agent steps for a specific conversation stored in memory.";
941
+ readonly tags: readonly ["Observability", "Memory"];
942
+ readonly operationId: "getConversationSteps";
943
+ readonly responses: {
944
+ readonly 200: {
945
+ readonly description: "Successfully retrieved conversation steps";
946
+ readonly contentType: "application/json";
947
+ };
948
+ readonly 404: {
949
+ readonly description: "Conversation not found";
950
+ readonly contentType: "application/json";
951
+ };
952
+ readonly 500: {
953
+ readonly description: "Failed to retrieve conversation steps due to server error";
954
+ readonly contentType: "application/json";
955
+ };
956
+ };
957
+ };
914
958
  readonly getWorkingMemory: {
915
959
  readonly method: "get";
916
960
  readonly path: "/observability/memory/working-memory";
@@ -1895,6 +1939,10 @@ interface MemoryConversationMessagesResult {
1895
1939
  conversation: MemoryConversationSummary;
1896
1940
  messages: UIMessage[];
1897
1941
  }
1942
+ interface MemoryConversationStepsResult {
1943
+ conversation: MemoryConversationSummary;
1944
+ steps: ConversationStepRecord[];
1945
+ }
1898
1946
  interface MemoryWorkingMemoryResult {
1899
1947
  agentId: string | null;
1900
1948
  agentName?: string | null;
@@ -1924,6 +1972,11 @@ interface MemoryGetMessagesQuery {
1924
1972
  after?: Date;
1925
1973
  roles?: string[];
1926
1974
  }
1975
+ interface MemoryGetStepsQuery {
1976
+ agentId?: string;
1977
+ limit?: number;
1978
+ operationId?: string;
1979
+ }
1927
1980
 
1928
1981
  /**
1929
1982
  * Handler for listing all agents
@@ -2045,6 +2098,7 @@ declare function listMemoryConversationsHandler(deps: ServerProviderDeps, query:
2045
2098
  offset: number;
2046
2099
  }>>;
2047
2100
  declare function getConversationMessagesHandler(deps: ServerProviderDeps, conversationId: string, query: MemoryGetMessagesQuery): Promise<ApiResponse<MemoryConversationMessagesResult>>;
2101
+ declare function getConversationStepsHandler(deps: ServerProviderDeps, conversationId: string, query: MemoryGetStepsQuery): Promise<ApiResponse<MemoryConversationStepsResult>>;
2048
2102
  declare function getWorkingMemoryHandler(deps: ServerProviderDeps, params: {
2049
2103
  agentId?: string;
2050
2104
  conversationId?: string;
@@ -2172,4 +2226,4 @@ declare function mapHandlerResponse(response: ApiResponse, type?: string): ApiRe
2172
2226
  */
2173
2227
  declare function getResponseStatus(response: ApiResponse): number;
2174
2228
 
2175
- export { handleGetAgent as $, type ApiResponse as A, type JsonRpcRequest as B, type A2ARequestContext as C, type AgentCardSkill as D, type ErrorResponse as E, type AgentCardProviderInfo as F, type AgentCardCapabilities as G, type HttpMethod as H, type AgentCard as I, type JsonRpcError as J, A2AErrorCode as K, LOG_ROUTES as L, type MemoryUserSummary as M, normalizeError as N, OBSERVABILITY_ROUTES as O, isJsonRpcRequest as P, handleGetAgents as Q, type ResponseDefinition as R, type SuccessResponse as S, handleGenerateText as T, UPDATE_ROUTES as U, VoltA2AError as V, WORKFLOW_ROUTES as W, handleStreamText as X, handleChatStream as Y, handleGenerateObject as Z, handleStreamObject as _, type A2AServerLikeWithHandlers as a, handleGetAgentHistory as a0, handleGetWorkflows as a1, handleGetWorkflow as a2, handleExecuteWorkflow as a3, handleStreamWorkflow as a4, handleSuspendWorkflow as a5, handleCancelWorkflow as a6, handleResumeWorkflow as a7, handleGetWorkflowState as a8, type LogFilterOptions as a9, type LogHandlerResponse as aa, handleGetLogs as ab, listMemoryUsersHandler as ac, listMemoryConversationsHandler as ad, getConversationMessagesHandler as ae, getWorkingMemoryHandler as af, mapLogResponse as ag, mapHandlerResponse as ah, getResponseStatus as ai, type OpenApiInfo as aj, type AppSetupConfig as ak, getOrCreateLogger as al, shouldEnableSwaggerUI as am, getOpenApiDoc as an, DEFAULT_CORS_OPTIONS as ao, type StreamResponse as b, isSuccessResponse as c, type MemoryUserAgentSummary as d, type MemoryConversationSummary as e, type MemoryConversationMessagesResult as f, type MemoryWorkingMemoryResult as g, type MemoryListUsersQuery as h, isErrorResponse as i, type MemoryListConversationsQuery as j, type MemoryGetMessagesQuery as k, type RouteDefinition as l, AGENT_ROUTES as m, OBSERVABILITY_MEMORY_ROUTES as n, ALL_ROUTES as o, getAllRoutesArray as p, MCP_ROUTES as q, A2A_ROUTES as r, getRoutesByTag as s, parseJsonRpcRequest as t, resolveAgentCard as u, executeA2ARequest as v, type A2AJsonRpcId as w, type JsonRpcResponse as x, type JsonRpcStream as y, type JsonRpcHandlerResult as z };
2229
+ export { handleGenerateObject as $, type ApiResponse as A, type JsonRpcStream as B, type JsonRpcHandlerResult as C, type JsonRpcRequest as D, type ErrorResponse as E, type A2ARequestContext as F, type AgentCardSkill as G, type HttpMethod as H, type AgentCardProviderInfo as I, type JsonRpcError as J, type AgentCardCapabilities as K, LOG_ROUTES as L, type MemoryUserSummary as M, type AgentCard as N, OBSERVABILITY_ROUTES as O, A2AErrorCode as P, normalizeError as Q, type ResponseDefinition as R, type SuccessResponse as S, isJsonRpcRequest as T, UPDATE_ROUTES as U, VoltA2AError as V, WORKFLOW_ROUTES as W, handleGetAgents as X, handleGenerateText as Y, handleStreamText as Z, handleChatStream as _, type A2AServerLikeWithHandlers as a, handleStreamObject as a0, handleGetAgent as a1, handleGetAgentHistory as a2, handleGetWorkflows as a3, handleGetWorkflow as a4, handleExecuteWorkflow as a5, handleStreamWorkflow as a6, handleSuspendWorkflow as a7, handleCancelWorkflow as a8, handleResumeWorkflow as a9, handleGetWorkflowState as aa, type LogFilterOptions as ab, type LogHandlerResponse as ac, handleGetLogs as ad, listMemoryUsersHandler as ae, listMemoryConversationsHandler as af, getConversationMessagesHandler as ag, getConversationStepsHandler as ah, getWorkingMemoryHandler as ai, mapLogResponse as aj, mapHandlerResponse as ak, getResponseStatus as al, type OpenApiInfo as am, type AppSetupConfig as an, getOrCreateLogger as ao, shouldEnableSwaggerUI as ap, getOpenApiDoc as aq, DEFAULT_CORS_OPTIONS as ar, type StreamResponse as b, isSuccessResponse as c, type MemoryUserAgentSummary as d, type MemoryConversationSummary as e, type MemoryConversationMessagesResult as f, type MemoryConversationStepsResult as g, type MemoryWorkingMemoryResult as h, isErrorResponse as i, type MemoryListUsersQuery as j, type MemoryListConversationsQuery as k, type MemoryGetMessagesQuery as l, type MemoryGetStepsQuery as m, type RouteDefinition as n, AGENT_ROUTES as o, OBSERVABILITY_MEMORY_ROUTES as p, ALL_ROUTES as q, getAllRoutesArray as r, MCP_ROUTES as s, A2A_ROUTES as t, getRoutesByTag as u, parseJsonRpcRequest as v, resolveAgentCard as w, executeA2ARequest as x, type A2AJsonRpcId as y, type JsonRpcResponse as z };
package/dist/edge.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { C as A2ARequestContext, r as A2A_ROUTES, m as AGENT_ROUTES, L as LOG_ROUTES, n as OBSERVABILITY_MEMORY_ROUTES, O as OBSERVABILITY_ROUTES, W as WORKFLOW_ROUTES, v as executeA2ARequest, ae as getConversationMessagesHandler, al as getOrCreateLogger, af as getWorkingMemoryHandler, Y as handleChatStream, a3 as handleExecuteWorkflow, Z as handleGenerateObject, T as handleGenerateText, $ as handleGetAgent, a0 as handleGetAgentHistory, Q as handleGetAgents, ab as handleGetLogs, a2 as handleGetWorkflow, a8 as handleGetWorkflowState, a1 as handleGetWorkflows, a7 as handleResumeWorkflow, _ as handleStreamObject, X as handleStreamText, a4 as handleStreamWorkflow, a5 as handleSuspendWorkflow, i as isErrorResponse, ad as listMemoryConversationsHandler, ac as listMemoryUsersHandler, ag as mapLogResponse, t as parseJsonRpcRequest, u as resolveAgentCard } from './edge-C_OaxFpr.mjs';
1
+ export { F as A2ARequestContext, t as A2A_ROUTES, o as AGENT_ROUTES, L as LOG_ROUTES, p as OBSERVABILITY_MEMORY_ROUTES, O as OBSERVABILITY_ROUTES, W as WORKFLOW_ROUTES, x as executeA2ARequest, ag as getConversationMessagesHandler, ah as getConversationStepsHandler, ao as getOrCreateLogger, ai as getWorkingMemoryHandler, _ as handleChatStream, a5 as handleExecuteWorkflow, $ as handleGenerateObject, Y as handleGenerateText, a1 as handleGetAgent, a2 as handleGetAgentHistory, X as handleGetAgents, ad as handleGetLogs, a4 as handleGetWorkflow, aa as handleGetWorkflowState, a3 as handleGetWorkflows, a9 as handleResumeWorkflow, a0 as handleStreamObject, Z as handleStreamText, a6 as handleStreamWorkflow, a7 as handleSuspendWorkflow, i as isErrorResponse, af as listMemoryConversationsHandler, ae as listMemoryUsersHandler, aj as mapLogResponse, v as parseJsonRpcRequest, w as resolveAgentCard } from './edge-CtOnFGMl.mjs';
2
2
  import '@voltagent/core';
3
3
  import '@voltagent/internal';
4
4
  import 'ai';
package/dist/edge.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { C as A2ARequestContext, r as A2A_ROUTES, m as AGENT_ROUTES, L as LOG_ROUTES, n as OBSERVABILITY_MEMORY_ROUTES, O as OBSERVABILITY_ROUTES, W as WORKFLOW_ROUTES, v as executeA2ARequest, ae as getConversationMessagesHandler, al as getOrCreateLogger, af as getWorkingMemoryHandler, Y as handleChatStream, a3 as handleExecuteWorkflow, Z as handleGenerateObject, T as handleGenerateText, $ as handleGetAgent, a0 as handleGetAgentHistory, Q as handleGetAgents, ab as handleGetLogs, a2 as handleGetWorkflow, a8 as handleGetWorkflowState, a1 as handleGetWorkflows, a7 as handleResumeWorkflow, _ as handleStreamObject, X as handleStreamText, a4 as handleStreamWorkflow, a5 as handleSuspendWorkflow, i as isErrorResponse, ad as listMemoryConversationsHandler, ac as listMemoryUsersHandler, ag as mapLogResponse, t as parseJsonRpcRequest, u as resolveAgentCard } from './edge-C_OaxFpr.js';
1
+ export { F as A2ARequestContext, t as A2A_ROUTES, o as AGENT_ROUTES, L as LOG_ROUTES, p as OBSERVABILITY_MEMORY_ROUTES, O as OBSERVABILITY_ROUTES, W as WORKFLOW_ROUTES, x as executeA2ARequest, ag as getConversationMessagesHandler, ah as getConversationStepsHandler, ao as getOrCreateLogger, ai as getWorkingMemoryHandler, _ as handleChatStream, a5 as handleExecuteWorkflow, $ as handleGenerateObject, Y as handleGenerateText, a1 as handleGetAgent, a2 as handleGetAgentHistory, X as handleGetAgents, ad as handleGetLogs, a4 as handleGetWorkflow, aa as handleGetWorkflowState, a3 as handleGetWorkflows, a9 as handleResumeWorkflow, a0 as handleStreamObject, Z as handleStreamText, a6 as handleStreamWorkflow, a7 as handleSuspendWorkflow, i as isErrorResponse, af as listMemoryConversationsHandler, ae as listMemoryUsersHandler, aj as mapLogResponse, v as parseJsonRpcRequest, w as resolveAgentCard } from './edge-CtOnFGMl.js';
2
2
  import '@voltagent/core';
3
3
  import '@voltagent/internal';
4
4
  import 'ai';
package/dist/edge.js CHANGED
@@ -29,6 +29,7 @@ __export(edge_exports, {
29
29
  WORKFLOW_ROUTES: () => WORKFLOW_ROUTES,
30
30
  executeA2ARequest: () => executeA2ARequest,
31
31
  getConversationMessagesHandler: () => getConversationMessagesHandler,
32
+ getConversationStepsHandler: () => getConversationStepsHandler,
32
33
  getOrCreateLogger: () => getOrCreateLogger,
33
34
  getWorkingMemoryHandler: () => getWorkingMemoryHandler,
34
35
  handleChatStream: () => handleChatStream,
@@ -769,6 +770,28 @@ var OBSERVABILITY_MEMORY_ROUTES = {
769
770
  }
770
771
  }
771
772
  },
773
+ getConversationSteps: {
774
+ method: "get",
775
+ path: "/observability/memory/conversations/:conversationId/steps",
776
+ summary: "Get conversation steps",
777
+ description: "Fetch the recorded agent steps for a specific conversation stored in memory.",
778
+ tags: ["Observability", "Memory"],
779
+ operationId: "getConversationSteps",
780
+ responses: {
781
+ 200: {
782
+ description: "Successfully retrieved conversation steps",
783
+ contentType: "application/json"
784
+ },
785
+ 404: {
786
+ description: "Conversation not found",
787
+ contentType: "application/json"
788
+ },
789
+ 500: {
790
+ description: "Failed to retrieve conversation steps due to server error",
791
+ contentType: "application/json"
792
+ }
793
+ }
794
+ },
772
795
  getWorkingMemory: {
773
796
  method: "get",
774
797
  path: "/observability/memory/working-memory",
@@ -851,11 +874,15 @@ var A2A_ROUTES = {
851
874
  var import_core2 = require("@voltagent/core");
852
875
  var import_core3 = require("@voltagent/core");
853
876
  var import_internal = require("@voltagent/internal");
877
+ var import_zod2 = require("zod");
878
+ var import_zod_from_json_schema2 = require("zod-from-json-schema");
879
+ var import_zod_from_json_schema_v32 = require("zod-from-json-schema-v3");
880
+
881
+ // src/utils/options.ts
882
+ var import_ai = require("ai");
854
883
  var import_zod = require("zod");
855
884
  var import_zod_from_json_schema = require("zod-from-json-schema");
856
885
  var import_zod_from_json_schema_v3 = require("zod-from-json-schema-v3");
857
-
858
- // src/utils/options.ts
859
886
  function processAgentOptions(body, signal) {
860
887
  const options = body.options || {};
861
888
  const processedOptions = {
@@ -865,6 +892,17 @@ function processAgentOptions(body, signal) {
865
892
  if (options.context && typeof options.context === "object" && !(options.context instanceof Map)) {
866
893
  processedOptions.context = new Map(Object.entries(options.context));
867
894
  }
895
+ if (options.experimental_output) {
896
+ const { type, schema: jsonSchema } = options.experimental_output;
897
+ if (type === "object" && jsonSchema) {
898
+ const zodSchema = ("toJSONSchema" in import_zod.z ? import_zod_from_json_schema.convertJsonSchemaToZod : import_zod_from_json_schema_v3.convertJsonSchemaToZod)(
899
+ jsonSchema
900
+ );
901
+ processedOptions.experimental_output = import_ai.Output.object({ schema: zodSchema });
902
+ } else if (type === "text") {
903
+ processedOptions.experimental_output = import_ai.Output.text();
904
+ }
905
+ }
868
906
  return processedOptions;
869
907
  }
870
908
  __name(processAgentOptions, "processAgentOptions");
@@ -943,7 +981,8 @@ async function handleGenerateText(agentId, body, deps, logger, signal) {
943
981
  usage,
944
982
  finishReason: result.finishReason,
945
983
  toolCalls: result.toolCalls,
946
- toolResults: result.toolResults
984
+ toolResults: result.toolResults,
985
+ ...result.experimental_output && { experimental_output: result.experimental_output }
947
986
  }
948
987
  };
949
988
  } catch (error) {
@@ -1085,7 +1124,7 @@ async function handleGenerateObject(agentId, body, deps, logger, signal) {
1085
1124
  }
1086
1125
  const { input, schema: jsonSchema } = body;
1087
1126
  const options = processAgentOptions(body, signal);
1088
- const zodSchema = ("toJSONSchema" in import_zod.z ? import_zod_from_json_schema.convertJsonSchemaToZod : import_zod_from_json_schema_v3.convertJsonSchemaToZod)(
1127
+ const zodSchema = ("toJSONSchema" in import_zod2.z ? import_zod_from_json_schema2.convertJsonSchemaToZod : import_zod_from_json_schema_v32.convertJsonSchemaToZod)(
1089
1128
  jsonSchema
1090
1129
  );
1091
1130
  const result = await agent.generateObject(input, zodSchema, options);
@@ -1121,7 +1160,7 @@ async function handleStreamObject(agentId, body, deps, logger, signal) {
1121
1160
  }
1122
1161
  const { input, schema: jsonSchema } = body;
1123
1162
  const options = processAgentOptions(body, signal);
1124
- const zodSchema = ("toJSONSchema" in import_zod.z ? import_zod_from_json_schema.convertJsonSchemaToZod : import_zod_from_json_schema_v3.convertJsonSchemaToZod)(
1163
+ const zodSchema = ("toJSONSchema" in import_zod2.z ? import_zod_from_json_schema2.convertJsonSchemaToZod : import_zod_from_json_schema_v32.convertJsonSchemaToZod)(
1125
1164
  jsonSchema
1126
1165
  );
1127
1166
  const result = await agent.streamObject(input, zodSchema, options);
@@ -1838,6 +1877,64 @@ async function getConversationMessagesHandler(deps, conversationId, query) {
1838
1877
  }
1839
1878
  }
1840
1879
  __name(getConversationMessagesHandler, "getConversationMessagesHandler");
1880
+ async function getConversationStepsHandler(deps, conversationId, query) {
1881
+ try {
1882
+ const agents = getAgentsWithMemory(deps, query.agentId);
1883
+ if (agents.length === 0) {
1884
+ return {
1885
+ success: false,
1886
+ error: "Conversation not found"
1887
+ };
1888
+ }
1889
+ for (const { agentId, agentName, memory } of agents) {
1890
+ const conversation = await memory.getConversation(conversationId);
1891
+ if (!conversation) {
1892
+ continue;
1893
+ }
1894
+ const memoryWithSteps = memory;
1895
+ if (typeof memoryWithSteps.getConversationSteps !== "function") {
1896
+ return {
1897
+ success: false,
1898
+ error: "Conversation steps are not supported by this memory adapter."
1899
+ };
1900
+ }
1901
+ const steps = await memoryWithSteps.getConversationSteps(
1902
+ conversation.userId,
1903
+ conversationId,
1904
+ {
1905
+ limit: query.limit ? clampLimit(query.limit) : void 0,
1906
+ operationId: query.operationId
1907
+ }
1908
+ );
1909
+ return {
1910
+ success: true,
1911
+ data: {
1912
+ conversation: {
1913
+ id: conversation.id,
1914
+ userId: conversation.userId,
1915
+ agentId,
1916
+ agentName,
1917
+ title: conversation.title,
1918
+ createdAt: conversation.createdAt,
1919
+ updatedAt: conversation.updatedAt,
1920
+ metadata: conversation.metadata
1921
+ },
1922
+ steps
1923
+ }
1924
+ };
1925
+ }
1926
+ return {
1927
+ success: false,
1928
+ error: "Conversation not found"
1929
+ };
1930
+ } catch (error) {
1931
+ return {
1932
+ success: false,
1933
+ error: error instanceof Error ? error.message : (0, import_internal3.safeStringify)(error)
1934
+ };
1935
+ }
1936
+ }
1937
+ __name(getConversationStepsHandler, "getConversationStepsHandler");
1841
1938
  async function getWorkingMemoryHandler(deps, params) {
1842
1939
  try {
1843
1940
  const agents = getAgentsWithMemory(deps, params.agentId);
@@ -2111,6 +2208,7 @@ __name(mapLogResponse, "mapLogResponse");
2111
2208
  WORKFLOW_ROUTES,
2112
2209
  executeA2ARequest,
2113
2210
  getConversationMessagesHandler,
2211
+ getConversationStepsHandler,
2114
2212
  getOrCreateLogger,
2115
2213
  getWorkingMemoryHandler,
2116
2214
  handleChatStream,