quecto-agent v0.2.2
Performance: tool dispatch and trace telemetry.
What changed
- Tool dispatch:
Registrymoved fromVec<Box<dyn Tool>>with a linearfind()scan to aBTreeMap<String, Box<dyn Tool>>keyed by tool name — lookup,has(), and dispatch are now tree-lookup instead of scanning every registered tool, andtool_names()/schemas()iterate in deterministic sorted order. - Trace telemetry:
TraceEvent'sidentityfield is nowRc<TraceIdentity>instead of a bareTraceIdentity. The ~10 trace-event emission sites inrun_loopnow bump a refcount per event instead of deep-cloning up to 6 heap-allocatedStringfields each time — one real allocation per run instead of one per event. (Requires serde'srcfeature;#[serde(flatten)]output is unchanged.) - Also picks up the connection-reuse fix from
quecto v0.1.1via 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'sidentityfield type change fromTraceIdentitytoRc<TraceIdentity>is technically visible to any external code pattern-matching on that field directly.