@mmmbuto/anthmorph 0.1.1 → 0.1.2
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/Cargo.lock +1 -1
- package/Cargo.toml +1 -1
- package/README.md +2 -2
- package/package.json +1 -1
- package/prebuilt/anthmorph +0 -0
- package/src/models/anthropic.rs +5 -1
- package/src/proxy.rs +6 -1
package/Cargo.lock
CHANGED
package/Cargo.toml
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AnthMorph
|
|
2
2
|
|
|
3
|
-
[](#project-status)
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
[](https://www.rust-lang.org)
|
|
6
6
|
[](https://termux.dev)
|
|
@@ -19,7 +19,7 @@ Core capabilities:
|
|
|
19
19
|
|
|
20
20
|
## Project Status
|
|
21
21
|
|
|
22
|
-
- Current line: `0.1.
|
|
22
|
+
- Current line: `0.1.2`
|
|
23
23
|
- Primary target: `chutes.ai`
|
|
24
24
|
- Secondary target: generic OpenAI-compatible endpoints
|
|
25
25
|
- Tested locally against Chutes, MiniMax, and Alibaba Coding Plan rejection handling
|
package/package.json
CHANGED
package/prebuilt/anthmorph
CHANGED
|
Binary file
|
package/src/models/anthropic.rs
CHANGED
|
@@ -248,7 +248,11 @@ pub enum ContentBlockStartData {
|
|
|
248
248
|
#[serde(rename = "thinking")]
|
|
249
249
|
Thinking { thinking: String },
|
|
250
250
|
#[serde(rename = "tool_use")]
|
|
251
|
-
ToolUse {
|
|
251
|
+
ToolUse {
|
|
252
|
+
id: String,
|
|
253
|
+
name: String,
|
|
254
|
+
input: serde_json::Value,
|
|
255
|
+
},
|
|
252
256
|
}
|
|
253
257
|
|
|
254
258
|
#[derive(Debug, Clone, Serialize)]
|
package/src/proxy.rs
CHANGED
|
@@ -554,7 +554,11 @@ fn transition_to_tool(
|
|
|
554
554
|
*active_block = Some(ActiveBlock::ToolUse(tool_index, index));
|
|
555
555
|
events.push(start_block_sse(
|
|
556
556
|
index,
|
|
557
|
-
anthropic::ContentBlockStartData::ToolUse {
|
|
557
|
+
anthropic::ContentBlockStartData::ToolUse {
|
|
558
|
+
id,
|
|
559
|
+
name,
|
|
560
|
+
input: json!({}),
|
|
561
|
+
},
|
|
558
562
|
));
|
|
559
563
|
(index, events)
|
|
560
564
|
}
|
|
@@ -734,6 +738,7 @@ mod tests {
|
|
|
734
738
|
|
|
735
739
|
let joined = output.join("");
|
|
736
740
|
assert!(joined.contains("\"type\":\"tool_use\""));
|
|
741
|
+
assert!(joined.contains("\"input\":{}"));
|
|
737
742
|
assert!(joined.contains("\"partial_json\":\"{\\\"loc\""));
|
|
738
743
|
assert!(joined.contains("\"partial_json\":\"ation"));
|
|
739
744
|
assert_eq!(joined.matches("event: content_block_start").count(), 1);
|