@superatomai/sdk-node 0.0.74-dsp → 0.0.75-dsp

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/dist/index.d.mts CHANGED
@@ -1935,6 +1935,23 @@ declare const PromptAttachmentSchema: z.ZodObject<{
1935
1935
  contentType?: string | undefined;
1936
1936
  }>;
1937
1937
  type PromptAttachment = z.infer<typeof PromptAttachmentSchema>;
1938
+ /**
1939
+ * A file the agent generated or changed for the person: the host backend has put it
1940
+ * in R2 and recorded it (sa-api's `files` table), so the answer carries only its
1941
+ * reference. A provider returns these as `data.generatedFiles`; they are saved with
1942
+ * the answer (beside `attachments`, the files the person sent), and a client
1943
+ * downloads each by `id` (sa-api's POST /files/:id/download).
1944
+ */
1945
+ interface GeneratedFile {
1946
+ /** The sa-api file id. */
1947
+ id: string;
1948
+ fileName: string;
1949
+ /** Size in bytes. */
1950
+ size: number;
1951
+ contentType?: string;
1952
+ /** 1 for the first copy; a changed file is a new copy, one higher. */
1953
+ version?: number;
1954
+ }
1938
1955
  declare const ComponentSchema: z.ZodObject<{
1939
1956
  id: z.ZodString;
1940
1957
  name: z.ZodString;
@@ -6670,4 +6687,4 @@ declare class SuperatomSDK {
6670
6687
  getConversationSimilarityThreshold(): number;
6671
6688
  }
6672
6689
 
6673
- export { ALL_COLUMN_KEYS, ANSWER_COMPONENT_NAMES, type AgentConfig, type AgentEvent, type AgentResponse, type AgentRunContext, type AgentRunHandlers, type AgentRunRecord, type AgentRunResult, type AgentTrigger, type AgentUsage, type AnalyticsEventType, type AnalyticsStatus, type AnswerProvider, type AnswerProviderContext, type ApplySummary, BM25L, type BM25LOptions, type BaseLLMConfig, type BuildTriggerInput, CATEGORY_KEYS, CONTEXT_CONFIG, type CapturedLog, CleanupService, type CodexSessionOptions, type CodingAgentCollectionConfig, type CodingAgentDefinition, type CodingAgentSession, type CodingAgentSessionOptions, type CodingAgentsConfig, type ColInfo, type ColType, type CollectionHandler, type CollectionOperation, type Component, type DBUIBlock, DEFAULT_AGENT_CONFIG, DEFAULT_FMT_CONFIG, type DashboardAgentCollectionConfig, type DatabaseType, type FindingCode, type Fmt, type FmtConfig, type Harness, type HybridSearchOptions, INSTRUCTIONS_FILE, type IncomingMessage, type KbNodesQueryFilters, type KbNodesRequestPayload, LLM, type LLMUsageEntry, type LogLevel, MainAgent, type McpServerSpec, type Message, MissingRequestContextError, type ModelStrategy, NUMERIC_KEYS, type NarrationUpdate, type OutputContract, type OutputField, type OutputValidator, type PiSessionListener, type PiSessionState, type PiTranscriptEntry, type Principal, type PromptAttachment, type PromptContext, type RequestContext, type RerankedResult, type RowFilter, type RunAgentOptions, STORAGE_CONFIG, type ScriptComponentSpec, ScriptMatcher, type ScriptParameter, type ScriptRecipe, type ScriptRecipeMetaRow, type ScriptRecipeStore, type ScriptResult, ScriptStore, type ScriptStoreOptions, type SelectedWorkflow, type ShimDef, type ShimSummary, type ShimTarget, type SourcePolicy, type SpecToValidate, SuperatomSDK, type SuperatomSDKConfig, type T_RESPONSE, type TaskType, Thread, ThreadManager, type Tool$1 as Tool, type ToolOutputSchema, type TriggerEvent, type TriggerFireInfo, UIBlock, UILogCollector, type User, UserManager, type UsersData, type ValidationContext, type ValidationFinding, type WorkflowDescriptor, type Workspace, analyticsClient, answerCatalogForBinding, answerComponents, anthropicLLM, assertReadOnlySql, bindContext, bridgePreamble, captureContext, clearContextTokens, contextTokenCount, createCodexSession, createCodingAgentSession, dashboardConversationHistory, dataFingerprint, describeContext, describeTriggers, emitAgentEvent, extractNamedExport, formatFindingsForAgent, geminiLLM, getCodingAgent, getCodingAgentsConfig, getPiSessionState, getRequestContext, groqLLM, hybridRerank, inferColumns, isUserContext, listCodingAgents, llmUsageLogger, logger, makeFmt, mintContextToken, normalizeScriptBody, onAgentRun, onPiSessionUpdate, openaiLLM, policiesFromConfig, projectForDatasetBinding, promptLoader, queryCache, registerCodingAgentCollection, registerCodingAgents, registerDashboardAgentCollection, requireRequestContext, rerankChromaResults, rerankConversationResults, resolveContextToken, resolveScriptRecipeStore, revokeContextToken, runAsSystem, runAsUser, runCodingAgent, runScript, runWithContext, runWithMessageIdentity, startAgentTriggers, stopAgentTriggers, userPromptErrorLogger, validateComponentSpec, withCapturedContext, writeBridgeShims, writeShims };
6690
+ export { ALL_COLUMN_KEYS, ANSWER_COMPONENT_NAMES, type AgentConfig, type AgentEvent, type AgentResponse, type AgentRunContext, type AgentRunHandlers, type AgentRunRecord, type AgentRunResult, type AgentTrigger, type AgentUsage, type AnalyticsEventType, type AnalyticsStatus, type AnswerProvider, type AnswerProviderContext, type ApplySummary, BM25L, type BM25LOptions, type BaseLLMConfig, type BuildTriggerInput, CATEGORY_KEYS, CONTEXT_CONFIG, type CapturedLog, CleanupService, type CodexSessionOptions, type CodingAgentCollectionConfig, type CodingAgentDefinition, type CodingAgentSession, type CodingAgentSessionOptions, type CodingAgentsConfig, type ColInfo, type ColType, type CollectionHandler, type CollectionOperation, type Component, type DBUIBlock, DEFAULT_AGENT_CONFIG, DEFAULT_FMT_CONFIG, type DashboardAgentCollectionConfig, type DatabaseType, type FindingCode, type Fmt, type FmtConfig, type GeneratedFile, type Harness, type HybridSearchOptions, INSTRUCTIONS_FILE, type IncomingMessage, type KbNodesQueryFilters, type KbNodesRequestPayload, LLM, type LLMUsageEntry, type LogLevel, MainAgent, type McpServerSpec, type Message, MissingRequestContextError, type ModelStrategy, NUMERIC_KEYS, type NarrationUpdate, type OutputContract, type OutputField, type OutputValidator, type PiSessionListener, type PiSessionState, type PiTranscriptEntry, type Principal, type PromptAttachment, type PromptContext, type RequestContext, type RerankedResult, type RowFilter, type RunAgentOptions, STORAGE_CONFIG, type ScriptComponentSpec, ScriptMatcher, type ScriptParameter, type ScriptRecipe, type ScriptRecipeMetaRow, type ScriptRecipeStore, type ScriptResult, ScriptStore, type ScriptStoreOptions, type SelectedWorkflow, type ShimDef, type ShimSummary, type ShimTarget, type SourcePolicy, type SpecToValidate, SuperatomSDK, type SuperatomSDKConfig, type T_RESPONSE, type TaskType, Thread, ThreadManager, type Tool$1 as Tool, type ToolOutputSchema, type TriggerEvent, type TriggerFireInfo, UIBlock, UILogCollector, type User, UserManager, type UsersData, type ValidationContext, type ValidationFinding, type WorkflowDescriptor, type Workspace, analyticsClient, answerCatalogForBinding, answerComponents, anthropicLLM, assertReadOnlySql, bindContext, bridgePreamble, captureContext, clearContextTokens, contextTokenCount, createCodexSession, createCodingAgentSession, dashboardConversationHistory, dataFingerprint, describeContext, describeTriggers, emitAgentEvent, extractNamedExport, formatFindingsForAgent, geminiLLM, getCodingAgent, getCodingAgentsConfig, getPiSessionState, getRequestContext, groqLLM, hybridRerank, inferColumns, isUserContext, listCodingAgents, llmUsageLogger, logger, makeFmt, mintContextToken, normalizeScriptBody, onAgentRun, onPiSessionUpdate, openaiLLM, policiesFromConfig, projectForDatasetBinding, promptLoader, queryCache, registerCodingAgentCollection, registerCodingAgents, registerDashboardAgentCollection, requireRequestContext, rerankChromaResults, rerankConversationResults, resolveContextToken, resolveScriptRecipeStore, revokeContextToken, runAsSystem, runAsUser, runCodingAgent, runScript, runWithContext, runWithMessageIdentity, startAgentTriggers, stopAgentTriggers, userPromptErrorLogger, validateComponentSpec, withCapturedContext, writeBridgeShims, writeShims };
package/dist/index.d.ts CHANGED
@@ -1935,6 +1935,23 @@ declare const PromptAttachmentSchema: z.ZodObject<{
1935
1935
  contentType?: string | undefined;
1936
1936
  }>;
1937
1937
  type PromptAttachment = z.infer<typeof PromptAttachmentSchema>;
1938
+ /**
1939
+ * A file the agent generated or changed for the person: the host backend has put it
1940
+ * in R2 and recorded it (sa-api's `files` table), so the answer carries only its
1941
+ * reference. A provider returns these as `data.generatedFiles`; they are saved with
1942
+ * the answer (beside `attachments`, the files the person sent), and a client
1943
+ * downloads each by `id` (sa-api's POST /files/:id/download).
1944
+ */
1945
+ interface GeneratedFile {
1946
+ /** The sa-api file id. */
1947
+ id: string;
1948
+ fileName: string;
1949
+ /** Size in bytes. */
1950
+ size: number;
1951
+ contentType?: string;
1952
+ /** 1 for the first copy; a changed file is a new copy, one higher. */
1953
+ version?: number;
1954
+ }
1938
1955
  declare const ComponentSchema: z.ZodObject<{
1939
1956
  id: z.ZodString;
1940
1957
  name: z.ZodString;
@@ -6670,4 +6687,4 @@ declare class SuperatomSDK {
6670
6687
  getConversationSimilarityThreshold(): number;
6671
6688
  }
6672
6689
 
6673
- export { ALL_COLUMN_KEYS, ANSWER_COMPONENT_NAMES, type AgentConfig, type AgentEvent, type AgentResponse, type AgentRunContext, type AgentRunHandlers, type AgentRunRecord, type AgentRunResult, type AgentTrigger, type AgentUsage, type AnalyticsEventType, type AnalyticsStatus, type AnswerProvider, type AnswerProviderContext, type ApplySummary, BM25L, type BM25LOptions, type BaseLLMConfig, type BuildTriggerInput, CATEGORY_KEYS, CONTEXT_CONFIG, type CapturedLog, CleanupService, type CodexSessionOptions, type CodingAgentCollectionConfig, type CodingAgentDefinition, type CodingAgentSession, type CodingAgentSessionOptions, type CodingAgentsConfig, type ColInfo, type ColType, type CollectionHandler, type CollectionOperation, type Component, type DBUIBlock, DEFAULT_AGENT_CONFIG, DEFAULT_FMT_CONFIG, type DashboardAgentCollectionConfig, type DatabaseType, type FindingCode, type Fmt, type FmtConfig, type Harness, type HybridSearchOptions, INSTRUCTIONS_FILE, type IncomingMessage, type KbNodesQueryFilters, type KbNodesRequestPayload, LLM, type LLMUsageEntry, type LogLevel, MainAgent, type McpServerSpec, type Message, MissingRequestContextError, type ModelStrategy, NUMERIC_KEYS, type NarrationUpdate, type OutputContract, type OutputField, type OutputValidator, type PiSessionListener, type PiSessionState, type PiTranscriptEntry, type Principal, type PromptAttachment, type PromptContext, type RequestContext, type RerankedResult, type RowFilter, type RunAgentOptions, STORAGE_CONFIG, type ScriptComponentSpec, ScriptMatcher, type ScriptParameter, type ScriptRecipe, type ScriptRecipeMetaRow, type ScriptRecipeStore, type ScriptResult, ScriptStore, type ScriptStoreOptions, type SelectedWorkflow, type ShimDef, type ShimSummary, type ShimTarget, type SourcePolicy, type SpecToValidate, SuperatomSDK, type SuperatomSDKConfig, type T_RESPONSE, type TaskType, Thread, ThreadManager, type Tool$1 as Tool, type ToolOutputSchema, type TriggerEvent, type TriggerFireInfo, UIBlock, UILogCollector, type User, UserManager, type UsersData, type ValidationContext, type ValidationFinding, type WorkflowDescriptor, type Workspace, analyticsClient, answerCatalogForBinding, answerComponents, anthropicLLM, assertReadOnlySql, bindContext, bridgePreamble, captureContext, clearContextTokens, contextTokenCount, createCodexSession, createCodingAgentSession, dashboardConversationHistory, dataFingerprint, describeContext, describeTriggers, emitAgentEvent, extractNamedExport, formatFindingsForAgent, geminiLLM, getCodingAgent, getCodingAgentsConfig, getPiSessionState, getRequestContext, groqLLM, hybridRerank, inferColumns, isUserContext, listCodingAgents, llmUsageLogger, logger, makeFmt, mintContextToken, normalizeScriptBody, onAgentRun, onPiSessionUpdate, openaiLLM, policiesFromConfig, projectForDatasetBinding, promptLoader, queryCache, registerCodingAgentCollection, registerCodingAgents, registerDashboardAgentCollection, requireRequestContext, rerankChromaResults, rerankConversationResults, resolveContextToken, resolveScriptRecipeStore, revokeContextToken, runAsSystem, runAsUser, runCodingAgent, runScript, runWithContext, runWithMessageIdentity, startAgentTriggers, stopAgentTriggers, userPromptErrorLogger, validateComponentSpec, withCapturedContext, writeBridgeShims, writeShims };
6690
+ export { ALL_COLUMN_KEYS, ANSWER_COMPONENT_NAMES, type AgentConfig, type AgentEvent, type AgentResponse, type AgentRunContext, type AgentRunHandlers, type AgentRunRecord, type AgentRunResult, type AgentTrigger, type AgentUsage, type AnalyticsEventType, type AnalyticsStatus, type AnswerProvider, type AnswerProviderContext, type ApplySummary, BM25L, type BM25LOptions, type BaseLLMConfig, type BuildTriggerInput, CATEGORY_KEYS, CONTEXT_CONFIG, type CapturedLog, CleanupService, type CodexSessionOptions, type CodingAgentCollectionConfig, type CodingAgentDefinition, type CodingAgentSession, type CodingAgentSessionOptions, type CodingAgentsConfig, type ColInfo, type ColType, type CollectionHandler, type CollectionOperation, type Component, type DBUIBlock, DEFAULT_AGENT_CONFIG, DEFAULT_FMT_CONFIG, type DashboardAgentCollectionConfig, type DatabaseType, type FindingCode, type Fmt, type FmtConfig, type GeneratedFile, type Harness, type HybridSearchOptions, INSTRUCTIONS_FILE, type IncomingMessage, type KbNodesQueryFilters, type KbNodesRequestPayload, LLM, type LLMUsageEntry, type LogLevel, MainAgent, type McpServerSpec, type Message, MissingRequestContextError, type ModelStrategy, NUMERIC_KEYS, type NarrationUpdate, type OutputContract, type OutputField, type OutputValidator, type PiSessionListener, type PiSessionState, type PiTranscriptEntry, type Principal, type PromptAttachment, type PromptContext, type RequestContext, type RerankedResult, type RowFilter, type RunAgentOptions, STORAGE_CONFIG, type ScriptComponentSpec, ScriptMatcher, type ScriptParameter, type ScriptRecipe, type ScriptRecipeMetaRow, type ScriptRecipeStore, type ScriptResult, ScriptStore, type ScriptStoreOptions, type SelectedWorkflow, type ShimDef, type ShimSummary, type ShimTarget, type SourcePolicy, type SpecToValidate, SuperatomSDK, type SuperatomSDKConfig, type T_RESPONSE, type TaskType, Thread, ThreadManager, type Tool$1 as Tool, type ToolOutputSchema, type TriggerEvent, type TriggerFireInfo, UIBlock, UILogCollector, type User, UserManager, type UsersData, type ValidationContext, type ValidationFinding, type WorkflowDescriptor, type Workspace, analyticsClient, answerCatalogForBinding, answerComponents, anthropicLLM, assertReadOnlySql, bindContext, bridgePreamble, captureContext, clearContextTokens, contextTokenCount, createCodexSession, createCodingAgentSession, dashboardConversationHistory, dataFingerprint, describeContext, describeTriggers, emitAgentEvent, extractNamedExport, formatFindingsForAgent, geminiLLM, getCodingAgent, getCodingAgentsConfig, getPiSessionState, getRequestContext, groqLLM, hybridRerank, inferColumns, isUserContext, listCodingAgents, llmUsageLogger, logger, makeFmt, mintContextToken, normalizeScriptBody, onAgentRun, onPiSessionUpdate, openaiLLM, policiesFromConfig, projectForDatasetBinding, promptLoader, queryCache, registerCodingAgentCollection, registerCodingAgents, registerDashboardAgentCollection, requireRequestContext, rerankChromaResults, rerankConversationResults, resolveContextToken, resolveScriptRecipeStore, revokeContextToken, runAsSystem, runAsUser, runCodingAgent, runScript, runWithContext, runWithMessageIdentity, startAgentTriggers, stopAgentTriggers, userPromptErrorLogger, validateComponentSpec, withCapturedContext, writeBridgeShims, writeShims };
package/dist/index.js CHANGED
@@ -698,7 +698,15 @@ var UIBlockSchema = import_zod3.z.object({
698
698
  similarity: import_zod3.z.number().optional()
699
699
  }).optional(),
700
700
  /** The steps shown while it was answered, saved with it. */
701
- narration: import_zod3.z.array(import_zod3.z.object({ elapsedMs: import_zod3.z.number(), text: import_zod3.z.string().nullable() }).passthrough()).optional()
701
+ narration: import_zod3.z.array(import_zod3.z.object({ elapsedMs: import_zod3.z.number(), text: import_zod3.z.string().nullable() }).passthrough()).optional(),
702
+ /** The files the agent generated or changed for this answer (references), saved with it. */
703
+ generatedFiles: import_zod3.z.array(import_zod3.z.object({
704
+ id: import_zod3.z.string(),
705
+ fileName: import_zod3.z.string(),
706
+ size: import_zod3.z.number(),
707
+ contentType: import_zod3.z.string().optional(),
708
+ version: import_zod3.z.number().optional()
709
+ })).optional()
702
710
  });
703
711
  var DBUIBlockSchema = import_zod3.z.object({
704
712
  id: import_zod3.z.string(),
@@ -18216,7 +18224,9 @@ async function replayExactMatch(opts) {
18216
18224
  semanticSimilarity: 1,
18217
18225
  ...cachedBinding ? { scriptBinding: cachedBinding } : {},
18218
18226
  // The steps the original run took, so a replay shows them like a reload does.
18219
- ...Array.isArray(conversationMatch.uiBlock?.narration) && conversationMatch.uiBlock.narration.length ? { narration: conversationMatch.uiBlock.narration } : {}
18227
+ ...Array.isArray(conversationMatch.uiBlock?.narration) && conversationMatch.uiBlock.narration.length ? { narration: conversationMatch.uiBlock.narration } : {},
18228
+ // The files that answer generated, still downloadable by id.
18229
+ ...Array.isArray(conversationMatch.uiBlock?.generatedFiles) && conversationMatch.uiBlock.generatedFiles.length ? { generatedFiles: conversationMatch.uiBlock.generatedFiles } : {}
18220
18230
  },
18221
18231
  errors: []
18222
18232
  } };
@@ -19426,7 +19436,7 @@ function hasTraceContent(trace) {
19426
19436
  return (trace.kbNodes?.global?.length ?? 0) > 0 || (trace.kbNodes?.query?.length ?? 0) > 0 || (trace.schemaNodes?.routing?.length ?? 0) > 0 || (trace.schemaNodes?.preResolve?.length ?? 0) > 0 || !!trace.schemaNodes?.mainAgentCatalog || (trace.schemaNodes?.sourceAgentSchemas?.length ?? 0) > 0 || trace.script != null || trace.scriptMatcher != null || !!trace.entityResolution?.catalogText || (trace.entityResolution?.calls?.length ?? 0) > 0 || !!trace.conversationHistory || !!trace.userAccessContext || !!trace.userKbContext || !!trace.concepts?.catalogText || !!trace.concepts?.invariantsText || (trace.concepts?.calls?.length ?? 0) > 0 || (trace.directTools?.calls?.length ?? 0) > 0 || (trace.componentGen?.length ?? 0) > 0;
19427
19437
  }
19428
19438
  async function saveConversation(params) {
19429
- const { userId, userPrompt, uiblock, uiBlockId, threadId, collections, agentId, attachments, status = "success", error: turnError, trace } = params;
19439
+ const { userId, userPrompt, uiblock, uiBlockId, threadId, collections, agentId, attachments, generatedFiles, status = "success", error: turnError, trace } = params;
19430
19440
  if (!userId) {
19431
19441
  logger.warn("[CONVERSATION_SAVER] Skipping save: userId not provided");
19432
19442
  return {
@@ -19483,7 +19493,8 @@ async function saveConversation(params) {
19483
19493
  threadId,
19484
19494
  status,
19485
19495
  agentId,
19486
- ...attachments?.length ? { attachments } : {}
19496
+ ...attachments?.length ? { attachments } : {},
19497
+ ...generatedFiles?.length ? { generatedFiles } : {}
19487
19498
  });
19488
19499
  if (!saveResult?.success) {
19489
19500
  logger.warn(`[CONVERSATION_SAVER] Failed to save conversation to PostgreSQL: ${saveResult?.message || "Unknown error"}`);
@@ -19996,6 +20007,7 @@ var get_user_request = async (data, components, sendMessage, anthropicApiKey, gr
19996
20007
  collections,
19997
20008
  agentId,
19998
20009
  attachments,
20010
+ generatedFiles: userResponse.data?.generatedFiles,
19999
20011
  ...notReplayable ? { status: "general" } : {},
20000
20012
  trace: userResponse.data?.trace
20001
20013
  });
package/dist/index.mjs CHANGED
@@ -585,7 +585,15 @@ var UIBlockSchema = z3.object({
585
585
  similarity: z3.number().optional()
586
586
  }).optional(),
587
587
  /** The steps shown while it was answered, saved with it. */
588
- narration: z3.array(z3.object({ elapsedMs: z3.number(), text: z3.string().nullable() }).passthrough()).optional()
588
+ narration: z3.array(z3.object({ elapsedMs: z3.number(), text: z3.string().nullable() }).passthrough()).optional(),
589
+ /** The files the agent generated or changed for this answer (references), saved with it. */
590
+ generatedFiles: z3.array(z3.object({
591
+ id: z3.string(),
592
+ fileName: z3.string(),
593
+ size: z3.number(),
594
+ contentType: z3.string().optional(),
595
+ version: z3.number().optional()
596
+ })).optional()
589
597
  });
590
598
  var DBUIBlockSchema = z3.object({
591
599
  id: z3.string(),
@@ -18103,7 +18111,9 @@ async function replayExactMatch(opts) {
18103
18111
  semanticSimilarity: 1,
18104
18112
  ...cachedBinding ? { scriptBinding: cachedBinding } : {},
18105
18113
  // The steps the original run took, so a replay shows them like a reload does.
18106
- ...Array.isArray(conversationMatch.uiBlock?.narration) && conversationMatch.uiBlock.narration.length ? { narration: conversationMatch.uiBlock.narration } : {}
18114
+ ...Array.isArray(conversationMatch.uiBlock?.narration) && conversationMatch.uiBlock.narration.length ? { narration: conversationMatch.uiBlock.narration } : {},
18115
+ // The files that answer generated, still downloadable by id.
18116
+ ...Array.isArray(conversationMatch.uiBlock?.generatedFiles) && conversationMatch.uiBlock.generatedFiles.length ? { generatedFiles: conversationMatch.uiBlock.generatedFiles } : {}
18107
18117
  },
18108
18118
  errors: []
18109
18119
  } };
@@ -19313,7 +19323,7 @@ function hasTraceContent(trace) {
19313
19323
  return (trace.kbNodes?.global?.length ?? 0) > 0 || (trace.kbNodes?.query?.length ?? 0) > 0 || (trace.schemaNodes?.routing?.length ?? 0) > 0 || (trace.schemaNodes?.preResolve?.length ?? 0) > 0 || !!trace.schemaNodes?.mainAgentCatalog || (trace.schemaNodes?.sourceAgentSchemas?.length ?? 0) > 0 || trace.script != null || trace.scriptMatcher != null || !!trace.entityResolution?.catalogText || (trace.entityResolution?.calls?.length ?? 0) > 0 || !!trace.conversationHistory || !!trace.userAccessContext || !!trace.userKbContext || !!trace.concepts?.catalogText || !!trace.concepts?.invariantsText || (trace.concepts?.calls?.length ?? 0) > 0 || (trace.directTools?.calls?.length ?? 0) > 0 || (trace.componentGen?.length ?? 0) > 0;
19314
19324
  }
19315
19325
  async function saveConversation(params) {
19316
- const { userId, userPrompt, uiblock, uiBlockId, threadId, collections, agentId, attachments, status = "success", error: turnError, trace } = params;
19326
+ const { userId, userPrompt, uiblock, uiBlockId, threadId, collections, agentId, attachments, generatedFiles, status = "success", error: turnError, trace } = params;
19317
19327
  if (!userId) {
19318
19328
  logger.warn("[CONVERSATION_SAVER] Skipping save: userId not provided");
19319
19329
  return {
@@ -19370,7 +19380,8 @@ async function saveConversation(params) {
19370
19380
  threadId,
19371
19381
  status,
19372
19382
  agentId,
19373
- ...attachments?.length ? { attachments } : {}
19383
+ ...attachments?.length ? { attachments } : {},
19384
+ ...generatedFiles?.length ? { generatedFiles } : {}
19374
19385
  });
19375
19386
  if (!saveResult?.success) {
19376
19387
  logger.warn(`[CONVERSATION_SAVER] Failed to save conversation to PostgreSQL: ${saveResult?.message || "Unknown error"}`);
@@ -19883,6 +19894,7 @@ var get_user_request = async (data, components, sendMessage, anthropicApiKey, gr
19883
19894
  collections,
19884
19895
  agentId,
19885
19896
  attachments,
19897
+ generatedFiles: userResponse.data?.generatedFiles,
19886
19898
  ...notReplayable ? { status: "general" } : {},
19887
19899
  trace: userResponse.data?.trace
19888
19900
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superatomai/sdk-node",
3
- "version": "0.0.74-dsp",
3
+ "version": "0.0.75-dsp",
4
4
  "description": "Node.js TypeScript SDK for Superatom",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",