@zenmux/rosetta-ai 1.0.39 → 1.0.41-beta.44056850478.1
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.
|
@@ -10,7 +10,7 @@ export declare function interactionStepContent(step: InteractionStartStep): ({
|
|
|
10
10
|
uri?: string | undefined;
|
|
11
11
|
} | {
|
|
12
12
|
data?: string | undefined;
|
|
13
|
-
mime_type?: ((string & {}) | "application/pdf" | "text/csv") | undefined;
|
|
13
|
+
mime_type?: ((string & {}) | "application/pdf" | "text/csv" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/vnd.ms-powerpoint" | "application/vnd.oasis.opendocument.presentation" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.template" | "application/vnd.oasis.opendocument.text" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.ms-excel" | "application/vnd.oasis.opendocument.spreadsheet") | undefined;
|
|
14
14
|
type: "document";
|
|
15
15
|
uri?: string | undefined;
|
|
16
16
|
} | {
|
|
@@ -788,14 +788,18 @@ class ResponsesToMessagesConverter {
|
|
|
788
788
|
else if (typed.type === "function_call_output") {
|
|
789
789
|
flushAssistant();
|
|
790
790
|
const output = typed.output;
|
|
791
|
-
//
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
791
|
+
// Preserve native content parts while keeping legacy JSON outputs and strings as text.
|
|
792
|
+
const isContentArray = Array.isArray(output) &&
|
|
793
|
+
output.length > 0 &&
|
|
794
|
+
output.every(part => part != null && ["input_text", "input_image", "input_file"].includes(part.type));
|
|
795
|
+
let content = output;
|
|
796
|
+
if (!isContentArray && typeof output !== "string") {
|
|
797
|
+
content = output == null ? "" : JSON.stringify(output);
|
|
798
|
+
}
|
|
795
799
|
const toolResult = {
|
|
796
800
|
type: "tool_result",
|
|
797
801
|
tool_use_id: typed.call_id,
|
|
798
|
-
content:
|
|
802
|
+
content: this.convertInputContent(content),
|
|
799
803
|
};
|
|
800
804
|
// Anthropic requires parallel tool_results grouped in one user message,
|
|
801
805
|
// so append to the prior user message if it already holds tool_results.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenmux/rosetta-ai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.41-beta.44056850478.1",
|
|
4
4
|
"description": "Universal translator between AI provider protocols",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"homepage": "https://github.com/ZenMux/rosetta-ai#readme",
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@anthropic-ai/sdk": "0.132.1",
|
|
47
|
-
"@google/genai": "2.
|
|
47
|
+
"@google/genai": "3.2.0",
|
|
48
48
|
"openai": "7.32.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
@@ -60,4 +60,4 @@
|
|
|
60
60
|
"typescript": "^6.0.2",
|
|
61
61
|
"typescript-eslint": "^8.58.2"
|
|
62
62
|
}
|
|
63
|
-
}
|
|
63
|
+
}
|