@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.js
CHANGED
|
@@ -4642,14 +4642,23 @@ var EventProcessor = class {
|
|
|
4642
4642
|
if (channel === "text" /* TEXT */) {
|
|
4643
4643
|
const output = event.data.output;
|
|
4644
4644
|
if (output?.answer) {
|
|
4645
|
-
acc.attachments =
|
|
4646
|
-
|
|
4645
|
+
acc.attachments = [
|
|
4646
|
+
...acc.attachments,
|
|
4647
|
+
...output.answer.attachments || []
|
|
4648
|
+
];
|
|
4649
|
+
acc.metadata = { ...acc.metadata, ...output.answer.metadata || {} };
|
|
4647
4650
|
} else if (output?.generation) {
|
|
4648
|
-
acc.attachments =
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
acc.metadata =
|
|
4651
|
+
acc.attachments = [
|
|
4652
|
+
...acc.attachments,
|
|
4653
|
+
...output.generation.attachments || []
|
|
4654
|
+
];
|
|
4655
|
+
acc.metadata = {
|
|
4656
|
+
...acc.metadata,
|
|
4657
|
+
...output.generation.metadata || {}
|
|
4658
|
+
};
|
|
4659
|
+
} else if (output?.attachments || output?.metadata) {
|
|
4660
|
+
acc.attachments = [...acc.attachments, ...output.attachments || []];
|
|
4661
|
+
acc.metadata = { ...acc.metadata, ...output.metadata || {} };
|
|
4653
4662
|
}
|
|
4654
4663
|
}
|
|
4655
4664
|
return;
|
|
@@ -5679,13 +5688,13 @@ var McpRuntimeHttpClient = class {
|
|
|
5679
5688
|
baseUrl;
|
|
5680
5689
|
constructor(mcpRuntimeUrl) {
|
|
5681
5690
|
this.baseUrl = mcpRuntimeUrl || process.env.MCP_RUNTIME_URL || "http://localhost:3004";
|
|
5691
|
+
const timeout = Number(process.env.MCP_RUNTIME_TIMEOUT || 9e5);
|
|
5682
5692
|
this.httpClient = axios2.create({
|
|
5683
5693
|
baseURL: this.baseUrl,
|
|
5684
|
-
timeout
|
|
5685
|
-
// 30 seconds
|
|
5694
|
+
timeout
|
|
5686
5695
|
});
|
|
5687
5696
|
this.logger.log(
|
|
5688
|
-
`MCP Runtime HTTP Client initialized with URL: ${this.baseUrl}`
|
|
5697
|
+
`MCP Runtime HTTP Client initialized with URL: ${this.baseUrl}, timeout: ${timeout}ms`
|
|
5689
5698
|
);
|
|
5690
5699
|
}
|
|
5691
5700
|
/**
|