Skip to content

quecto-agent v0.2.2

Latest

Choose a tag to compare

@adityak74 adityak74 released this 26 Aug 05:42

quecto-agent v0.2.2

Performance: tool dispatch and trace telemetry.

What changed

  • Tool dispatch: Registry moved from Vec<Box<dyn Tool>> with a linear find() scan to a BTreeMap<String, Box<dyn Tool>> keyed by tool name — lookup, has(), and dispatch are now tree-lookup instead of scanning every registered tool, and tool_names()/schemas() iterate in deterministic sorted order.
  • Trace telemetry: TraceEvent's identity field is now Rc<TraceIdentity> instead of a bare TraceIdentity. The ~10 trace-event emission sites in run_loop now bump a refcount per event instead of deep-cloning up to 6 heap-allocated String fields each time — one real allocation per run instead of one per event. (Requires serde's rc feature; #[serde(flatten)] output is unchanged.)
  • Also picks up the connection-reuse fix from quecto v0.1.1 via its dependency on core.

Review note
PR #28's original description overstated two of these: the tool dispatch was described as "O(1) hash lookup" (it's actually a BTreeMap, O(log n), no hashing — still a real improvement over the linear scan, just mislabeled), and the trace-identity change originally didn't reduce clone count at all (it just moved the clone source, same number of deep clones per event). The Rc<TraceIdentity> fix above was implemented during review to make the clone-elimination claim actually true before merge. See the PR discussion for the full verification.

Quality

  • Full workspace suite green (462 tests), clippy clean (no new warnings from this change).
  • No public API break for typical usage; TraceEvent's identity field type change from TraceIdentity to Rc<TraceIdentity> is technically visible to any external code pattern-matching on that field directly.