@flutchai/flutch-sdk 0.1.12 → 0.1.14
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.cjs +19 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4671,14 +4671,23 @@ exports.EventProcessor = class EventProcessor {
|
|
|
4671
4671
|
if (channel === "text" /* TEXT */) {
|
|
4672
4672
|
const output = event.data.output;
|
|
4673
4673
|
if (output?.answer) {
|
|
4674
|
-
acc.attachments =
|
|
4675
|
-
|
|
4674
|
+
acc.attachments = [
|
|
4675
|
+
...acc.attachments,
|
|
4676
|
+
...output.answer.attachments || []
|
|
4677
|
+
];
|
|
4678
|
+
acc.metadata = { ...acc.metadata, ...output.answer.metadata || {} };
|
|
4676
4679
|
} else if (output?.generation) {
|
|
4677
|
-
acc.attachments =
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
acc.metadata =
|
|
4680
|
+
acc.attachments = [
|
|
4681
|
+
...acc.attachments,
|
|
4682
|
+
...output.generation.attachments || []
|
|
4683
|
+
];
|
|
4684
|
+
acc.metadata = {
|
|
4685
|
+
...acc.metadata,
|
|
4686
|
+
...output.generation.metadata || {}
|
|
4687
|
+
};
|
|
4688
|
+
} else if (output?.attachments || output?.metadata) {
|
|
4689
|
+
acc.attachments = [...acc.attachments, ...output.attachments || []];
|
|
4690
|
+
acc.metadata = { ...acc.metadata, ...output.metadata || {} };
|
|
4682
4691
|
}
|
|
4683
4692
|
}
|
|
4684
4693
|
return;
|
|
@@ -5708,13 +5717,13 @@ exports.McpRuntimeHttpClient = class McpRuntimeHttpClient {
|
|
|
5708
5717
|
baseUrl;
|
|
5709
5718
|
constructor(mcpRuntimeUrl) {
|
|
5710
5719
|
this.baseUrl = mcpRuntimeUrl || process.env.MCP_RUNTIME_URL || "http://localhost:3004";
|
|
5720
|
+
const timeout = Number(process.env.MCP_RUNTIME_TIMEOUT || 9e5);
|
|
5711
5721
|
this.httpClient = axios2__default.default.create({
|
|
5712
5722
|
baseURL: this.baseUrl,
|
|
5713
|
-
timeout
|
|
5714
|
-
// 30 seconds
|
|
5723
|
+
timeout
|
|
5715
5724
|
});
|
|
5716
5725
|
this.logger.log(
|
|
5717
|
-
`MCP Runtime HTTP Client initialized with URL: ${this.baseUrl}`
|
|
5726
|
+
`MCP Runtime HTTP Client initialized with URL: ${this.baseUrl}, timeout: ${timeout}ms`
|
|
5718
5727
|
);
|
|
5719
5728
|
}
|
|
5720
5729
|
/**
|