Skip to content
Draft
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
81 changes: 67 additions & 14 deletions Cargo.lock

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

28 changes: 14 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ edition = "2024"
license = "Apache-2.0"

[workspace.dependencies]
toolpath = { version = "0.7.0", path = "crates/toolpath" }
toolpath-convo = { version = "0.11.1", 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 }
toolpath-codex = { version = "0.6.0", path = "crates/toolpath-codex" }
toolpath-copilot = { version = "0.1.0", path = "crates/toolpath-copilot" }
toolpath-opencode = { version = "0.5.0", path = "crates/toolpath-opencode" }
toolpath-cursor = { version = "0.2.0", path = "crates/toolpath-cursor" }
toolpath-github = { version = "0.6.0", path = "crates/toolpath-github" }
toolpath-dot = { version = "0.5.0", path = "crates/toolpath-dot" }
toolpath-md = { version = "0.7.0", path = "crates/toolpath-md" }
toolpath-pi = { version = "0.6.1", path = "crates/toolpath-pi" }
path-cli = { version = "0.15.0", path = "crates/path-cli" }
toolpath = { version = "0.8.0", path = "crates/toolpath" }
toolpath-convo = { version = "0.12.0", path = "crates/toolpath-convo" }
toolpath-git = { version = "0.7.0", path = "crates/toolpath-git" }
toolpath-claude = { version = "0.13.0", path = "crates/toolpath-claude", default-features = false }
toolpath-gemini = { version = "0.7.0", path = "crates/toolpath-gemini", default-features = false }
toolpath-codex = { version = "0.7.0", path = "crates/toolpath-codex" }
toolpath-copilot = { version = "0.2.0", path = "crates/toolpath-copilot" }
toolpath-opencode = { version = "0.6.0", path = "crates/toolpath-opencode" }
toolpath-cursor = { version = "0.3.0", path = "crates/toolpath-cursor" }
toolpath-github = { version = "0.7.0", path = "crates/toolpath-github" }
toolpath-dot = { version = "0.6.0", path = "crates/toolpath-dot" }
toolpath-md = { version = "0.8.0", path = "crates/toolpath-md" }
toolpath-pi = { version = "0.7.0", path = "crates/toolpath-pi" }
path-cli = { version = "0.16.0", path = "crates/path-cli" }
pathbase-client = { version = "0.2.0", path = "crates/pathbase-client" }

reqwest = { version = "0.13", default-features = false, features = ["blocking", "json", "rustls"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/path-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "path-cli"
version = "0.15.0"
version = "0.16.0"
edition.workspace = true
license.workspace = true
repository = "https://github.com/empathic/toolpath"
Expand Down
27 changes: 10 additions & 17 deletions crates/path-cli/tests/cross_harness_matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,7 @@ mod invariants {
}

fn meaningful_turns(view: &ConversationView) -> Vec<&Turn> {
view.turns
.iter()
view.turns()
.filter(|t| !is_system_envelope(t))
.collect()
}
Expand Down Expand Up @@ -690,8 +689,7 @@ mod invariants {
// on input/output — the fields every wire carries (codex has no
// cache_write analog, cursor carries no cache counters at all).
let usage_seq = |v: &ConversationView| -> Vec<(Option<u32>, Option<u32>)> {
v.turns
.iter()
v.turns()
.filter(|t| matches!(t.role, Role::Assistant))
.filter_map(|t| t.token_usage.as_ref())
.map(|u| (u.input_tokens, u.output_tokens))
Expand Down Expand Up @@ -745,13 +743,11 @@ mod invariants {
failures: &mut Vec<String>,
) {
let pre: Vec<&Turn> = before_target
.turns
.iter()
.turns()
.filter(|t| matches!(t.role, Role::Assistant))
.collect();
let post: Vec<&Turn> = after_target
.turns
.iter()
.turns()
.filter(|t| matches!(t.role, Role::Assistant))
.collect();
for (i, (a, b)) in pre.iter().zip(post.iter()).enumerate() {
Expand Down Expand Up @@ -813,8 +809,7 @@ mod invariants {
failures: &mut Vec<String>,
) {
let edges = |v: &ConversationView| -> BTreeSet<(String, Option<String>)> {
v.turns
.iter()
v.turns()
.map(|t| (t.id.clone(), t.parent_id.clone()))
.collect()
};
Expand Down Expand Up @@ -864,7 +859,7 @@ mod invariants {
failures: &mut Vec<String>,
) {
let count =
|v: &ConversationView| -> usize { v.turns.iter().map(|t| t.delegations.len()).sum() };
|v: &ConversationView| -> usize { v.turns().map(|t| t.delegations.len()).sum() };
let o = count(original);
let f = count(final_);
if o != f {
Expand All @@ -875,7 +870,7 @@ mod invariants {
return;
}

for (i, (a, b)) in original.turns.iter().zip(final_.turns.iter()).enumerate() {
for (i, (a, b)) in original.turns().zip(final_.turns()).enumerate() {
if a.delegations.len() != b.delegations.len() {
failures.push(format!(
"turn {} delegation count diverged: first={} second={}",
Expand Down Expand Up @@ -938,14 +933,12 @@ mod invariants {
failures: &mut Vec<String>,
) {
let agent_ids = |v: &ConversationView| -> BTreeSet<String> {
v.turns
.iter()
v.turns()
.flat_map(|t| t.delegations.iter().map(|d| d.agent_id.clone()))
.collect()
};
let tool_use_ids = |v: &ConversationView| -> BTreeSet<String> {
v.turns
.iter()
v.turns()
.flat_map(|t| t.tool_uses.iter().map(|tu| tu.id.clone()))
.collect()
};
Expand Down Expand Up @@ -1099,7 +1092,7 @@ fn matrix_translation() {
h.name()
)
});
eprintln!("loaded {} fixture: {} turns", h.name(), view.turns.len());
eprintln!("loaded {} fixture: {} turns", h.name(), view.turns().count());
sources.push((h.name().to_string(), view));
}
run_matrix("matrix (real fixtures)", &sources);
Expand Down
1 change: 1 addition & 0 deletions crates/path-cli/tests/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ fn kind_lists_bundled_kinds() {
.assert()
.success()
.stdout(predicate::str::contains("agent-coding-session"))
.stdout(predicate::str::contains("v1.0.0"))
.stdout(predicate::str::contains("v1.1.0"));
}

Expand Down
13 changes: 6 additions & 7 deletions crates/path-cli/tests/roundtrip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,18 @@ fn roundtrip_claude_conversation() {
// The extracted view comes from the toolpath Path which also emits
// conversation.append steps only for real turns (not tool-result-only entries).
assert_eq!(
extracted_view.turns.len(),
original_view.turns.len(),
extracted_view.turns().count(),
original_view.turns().count(),
"turn count mismatch: extracted {} vs original {}",
extracted_view.turns.len(),
original_view.turns.len(),
extracted_view.turns().count(),
original_view.turns().count(),
);

// ── Assertions: turn content ────────────────────────────────────

for (i, (ext, orig)) in extracted_view
.turns
.iter()
.zip(original_view.turns.iter())
.turns()
.zip(original_view.turns())
.enumerate()
{
assert_eq!(
Expand Down
2 changes: 1 addition & 1 deletion crates/toolpath-claude/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "toolpath-claude"
version = "0.12.0"
version = "0.13.0"
edition.workspace = true
license.workspace = true
repository = "https://github.com/empathic/toolpath"
Expand Down
Loading
Loading