@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/README.md +942 -942
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10611,11 +10611,33 @@ var get_agent_user_response = async (prompt, components, anthropicApiKey, groqAp
|
|
|
10611
10611
|
/<DataTable>[\s\S]*?<\/DataTable>/g,
|
|
10612
10612
|
"<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>"
|
|
10613
10613
|
);
|
|
10614
|
+
const componentExecutedTools = [...agentResponse.executedTools];
|
|
10615
|
+
const federationTool = agentTools.find((t) => t.id === "federation_query");
|
|
10616
|
+
if (federationTool && agentResponse.executedTools.length >= 2) {
|
|
10617
|
+
const sourceToolIds = new Set(agentResponse.executedTools.map((t) => t.id));
|
|
10618
|
+
const hasMultipleSources = sourceToolIds.size >= 2;
|
|
10619
|
+
if (hasMultipleSources) {
|
|
10620
|
+
componentExecutedTools.push({
|
|
10621
|
+
id: "federation_query",
|
|
10622
|
+
name: "Cross-Source Query",
|
|
10623
|
+
params: { sql: "DuckDB SQL with schema-qualified table names" },
|
|
10624
|
+
result: {
|
|
10625
|
+
_totalRecords: 0,
|
|
10626
|
+
_recordsShown: 0,
|
|
10627
|
+
_sampleData: []
|
|
10628
|
+
},
|
|
10629
|
+
outputSchema: federationTool.outputSchema,
|
|
10630
|
+
sourceSchema: federationTool.fullSchema || federationTool.description,
|
|
10631
|
+
sourceType: "duckdb"
|
|
10632
|
+
});
|
|
10633
|
+
logger.info(`[AgentFlow] Injected federation_query tool for cross-source component generation`);
|
|
10634
|
+
}
|
|
10635
|
+
}
|
|
10614
10636
|
const matchResult = await generateAgentComponents({
|
|
10615
10637
|
analysisContent: cleanAnalysis,
|
|
10616
10638
|
components,
|
|
10617
10639
|
userPrompt: prompt,
|
|
10618
|
-
executedTools:
|
|
10640
|
+
executedTools: componentExecutedTools,
|
|
10619
10641
|
collections,
|
|
10620
10642
|
apiKey,
|
|
10621
10643
|
componentStreamCallback,
|