Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to the Toolpath workspace are documented here.

## Derive: recognize camelCase file-path tool fields — 2026-07-09

- **`toolpath-convo`** (0.11.3): the shared `derive_path` file-path
extractor now probes the camelCase siblings `filePath` and `fileName`
in addition to `file_path`/`filename`/`path`/`file`. Providers that
leave file-mutation synthesis to the shared derive (rather than
pre-building `Turn.file_mutations`) previously dropped a `FileWrite`
tool's artifact when its input used the camelCase convention (e.g.
opencode's `filePath`). snake_case is probed first, so existing inputs
resolve unchanged. Additive; no effect on already-derived documents.
Follow-up to the change-key relativization work (0.11.2).

## Derive: relativize file change keys against `path.base` — 2026-07-08

- **`toolpath-convo`** (0.11.2): `derive_path` now stores file-change
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ license = "Apache-2.0"

[workspace.dependencies]
toolpath = { version = "0.7.0", path = "crates/toolpath" }
toolpath-convo = { version = "0.11.2", path = "crates/toolpath-convo" }
toolpath-convo = { version = "0.11.3", path = "crates/toolpath-convo" }
toolpath-git = { version = "0.6.0", path = "crates/toolpath-git" }
toolpath-claude = { version = "0.12.0", path = "crates/toolpath-claude", default-features = false }
toolpath-gemini = { version = "0.6.0", path = "crates/toolpath-gemini", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/toolpath-convo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "toolpath-convo"
version = "0.11.2"
version = "0.11.3"
edition.workspace = true
license.workspace = true
repository = "https://github.com/empathic/toolpath"
Expand Down
25 changes: 24 additions & 1 deletion crates/toolpath-convo/src/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,9 @@ pub(crate) fn relativize_key(path: &str, base_uri: Option<&str>) -> String {
}

fn extract_file_path(tool: &ToolInvocation) -> Option<String> {
for field in &["file_path", "path", "filename", "file"] {
// snake_case first so existing inputs resolve unchanged; camelCase
// siblings (`filePath`, `fileName`) cover conventions like opencode's.
for field in &["file_path", "filePath", "path", "filename", "fileName", "file"] {
if let Some(v) = tool.input.get(*field)
&& let Some(s) = v.as_str()
{
Expand Down Expand Up @@ -1251,6 +1253,27 @@ mod tests {
assert!(path.steps[0].change.contains_key("c.rs"));
}

#[test]
fn test_tool_use_filewrite_with_camelcase_file_path_field() {
// camelCase `filePath` is opencode's tool-input convention; a
// provider that leaves file-mutation synthesis to the shared
// derive would otherwise drop the artifact entirely.
let mut turn = base_turn("t1", Role::Assistant);
turn.tool_uses = vec![fw_tool("write", "tu1", serde_json::json!({"filePath": "d.rs"}))];
let view = view_with(vec![turn]);
let path = derive_path(&view, &DeriveConfig::default());
assert!(path.steps[0].change.contains_key("d.rs"));
}

#[test]
fn test_tool_use_filewrite_with_camelcase_file_name_field() {
let mut turn = base_turn("t1", Role::Assistant);
turn.tool_uses = vec![fw_tool("W", "tu1", serde_json::json!({"fileName": "e.rs"}))];
let view = view_with(vec![turn]);
let path = derive_path(&view, &DeriveConfig::default());
assert!(path.steps[0].change.contains_key("e.rs"));
}

#[test]
fn test_tool_use_filewrite_no_recognized_field() {
let mut turn = base_turn("t1", Role::Assistant);
Expand Down
2 changes: 1 addition & 1 deletion site/_data/crates.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
{
"name": "toolpath-convo",
"version": "0.11.2",
"version": "0.11.3",
"description": "Provider-agnostic conversation types, traits, and Toolpath-Path derivation",
"docs": "https://docs.rs/toolpath-convo",
"crate": "https://crates.io/crates/toolpath-convo",
Expand Down
Loading