@superatomai/sdk-node 0.0.35-mds → 0.0.36-mds

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.mjs CHANGED
@@ -10551,11 +10551,33 @@ var get_agent_user_response = async (prompt, components, anthropicApiKey, groqAp
10551
10551
  /<DataTable>[\s\S]*?<\/DataTable>/g,
10552
10552
  "<DataTable>[Data preview removed - for table components, REUSE the exact SQL from EXECUTED_TOOLS parameters. Do NOT write a new query or embed data in props.]</DataTable>"
10553
10553
  );
10554
+ const componentExecutedTools = [...agentResponse.executedTools];
10555
+ const federationTool = agentTools.find((t) => t.id === "federation_query");
10556
+ if (federationTool && agentResponse.executedTools.length >= 2) {
10557
+ const sourceToolIds = new Set(agentResponse.executedTools.map((t) => t.id));
10558
+ const hasMultipleSources = sourceToolIds.size >= 2;
10559
+ if (hasMultipleSources) {
10560
+ componentExecutedTools.push({
10561
+ id: "federation_query",
10562
+ name: "Cross-Source Query",
10563
+ params: { sql: "DuckDB SQL with schema-qualified table names" },
10564
+ result: {
10565
+ _totalRecords: 0,
10566
+ _recordsShown: 0,
10567
+ _sampleData: []
10568
+ },
10569
+ outputSchema: federationTool.outputSchema,
10570
+ sourceSchema: federationTool.fullSchema || federationTool.description,
10571
+ sourceType: "duckdb"
10572
+ });
10573
+ logger.info(`[AgentFlow] Injected federation_query tool for cross-source component generation`);
10574
+ }
10575
+ }
10554
10576
  const matchResult = await generateAgentComponents({
10555
10577
  analysisContent: cleanAnalysis,
10556
10578
  components,
10557
10579
  userPrompt: prompt,
10558
- executedTools: agentResponse.executedTools,
10580
+ executedTools: componentExecutedTools,
10559
10581
  collections,
10560
10582
  apiKey,
10561
10583
  componentStreamCallback,