@voltagent/server-core 1.0.21 → 1.0.22

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",
@@ -1838,6 +1861,64 @@ async function getConversationMessagesHandler(deps, conversationId, query) {
1838
1861
  }
1839
1862
  }
1840
1863
  __name(getConversationMessagesHandler, "getConversationMessagesHandler");
1864
+ async function getConversationStepsHandler(deps, conversationId, query) {
1865
+ try {
1866
+ const agents = getAgentsWithMemory(deps, query.agentId);
1867
+ if (agents.length === 0) {
1868
+ return {
1869
+ success: false,
1870
+ error: "Conversation not found"
1871
+ };
1872
+ }
1873
+ for (const { agentId, agentName, memory } of agents) {
1874
+ const conversation = await memory.getConversation(conversationId);
1875
+ if (!conversation) {
1876
+ continue;
1877
+ }
1878
+ const memoryWithSteps = memory;
1879
+ if (typeof memoryWithSteps.getConversationSteps !== "function") {
1880
+ return {
1881
+ success: false,
1882
+ error: "Conversation steps are not supported by this memory adapter."
1883
+ };
1884
+ }
1885
+ const steps = await memoryWithSteps.getConversationSteps(
1886
+ conversation.userId,
1887
+ conversationId,
1888
+ {
1889
+ limit: query.limit ? clampLimit(query.limit) : void 0,
1890
+ operationId: query.operationId
1891
+ }
1892
+ );
1893
+ return {
1894
+ success: true,
1895
+ data: {
1896
+ conversation: {
1897
+ id: conversation.id,
1898
+ userId: conversation.userId,
1899
+ agentId,
1900
+ agentName,
1901
+ title: conversation.title,
1902
+ createdAt: conversation.createdAt,
1903
+ updatedAt: conversation.updatedAt,
1904
+ metadata: conversation.metadata
1905
+ },
1906
+ steps
1907
+ }
1908
+ };
1909
+ }
1910
+ return {
1911
+ success: false,
1912
+ error: "Conversation not found"
1913
+ };
1914
+ } catch (error) {
1915
+ return {
1916
+ success: false,
1917
+ error: error instanceof Error ? error.message : (0, import_internal3.safeStringify)(error)
1918
+ };
1919
+ }
1920
+ }
1921
+ __name(getConversationStepsHandler, "getConversationStepsHandler");
1841
1922
  async function getWorkingMemoryHandler(deps, params) {
1842
1923
  try {
1843
1924
  const agents = getAgentsWithMemory(deps, params.agentId);
@@ -2111,6 +2192,7 @@ __name(mapLogResponse, "mapLogResponse");
2111
2192
  WORKFLOW_ROUTES,
2112
2193
  executeA2ARequest,
2113
2194
  getConversationMessagesHandler,
2195
+ getConversationStepsHandler,
2114
2196
  getOrCreateLogger,
2115
2197
  getWorkingMemoryHandler,
2116
2198
  handleChatStream,