You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ProposerStrategyResult now has an optional metaJson field (Record<string, unknown>).
If your strategyFn returns structured metadata (e.g., tool call arguments, extracted entities),
set it on the result and it will flow into the Proposal.metaJson field automatically.
No changes needed if you don't use it — the field is optional and defaults to undefined.
// Before (still works, no change needed):return{transitionName: "approve",toState: "approved",reasoning: "..."};// After (new capability):return{transitionName: "book_ride",toState: "riding",reasoning: "...",metaJson: {destination: "airport",rideType: "premium"},};
submitProposal now merges metaJson from strategy results into proposals using the same
precedence rules as costUSD, latencyMsec, etc.: caller-provided opts.metaJson wins;
strategy-returned metaJson fills the gap when opts doesn't provide it. Previously, metaJson was only set from the caller's opts and strategy-returned metadata was silently
dropped. If you had a workaround that manually called the strategy and then passed metaJson
through opts, you can remove it — the merge now happens automatically.
Fixes
Fixed submitProposal ignoring metaJson returned by strategy functions. Previously,
line 708 in api.ts always used the raw opts.metaJson value, so any metaJson set by
a strategyFn, executeProposerLlm, or webhook response was discarded. Now it follows the
same opts ?? strategy merge pattern as all other fields. If you were working around this
by extracting metaJson from the strategy result and passing it explicitly to submitProposal,
that workaround is no longer needed.