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
feat!: consolidate graph metric summary into LDAIGraphMetricSummary
The managed-layer `AIGraphMetricSummary` and the tracker-layer
`LDAIGraphMetricSummary` were duplicate interfaces describing the same
spec concept (`AIGraphMetricSummary` in AIRUNNER §2.5). Consolidate to
the single `LDAIGraphMetricSummary` (JS LD-prefix convention) and add
`nodeMetrics` so it can carry per-node summaries from
`ManagedAgentGraph.run()`.
Required vs. optional matches the runtime contract:
- `success`, `path`, `nodeMetrics` are required — the managed layer
sources these from `LDAIGraphMetrics` where they are required, so the
type now reflects the actual guarantee.
- `durationMs`, `tokens`, `resumptionToken` remain optional — these
may not be tracked depending on runner.
For `LDGraphTracker.getSummary()`, which populates incrementally as
tracking calls arrive, the return type is now
`Partial<LDAIGraphMetricSummary>` to express the per-call partial state
explicitly. `LDGraphTrackerImpl._summary` is similarly typed.
`AIGraphMetricSummary` is removed; `ManagedGraphResult.metrics` and
`ManagedAgentGraph` now use `LDAIGraphMetricSummary`.
BREAKING CHANGE: `AIGraphMetricSummary` is removed in favour of
`LDAIGraphMetricSummary`. `LDGraphTracker.getSummary()` now returns
`Partial<LDAIGraphMetricSummary>` instead of `LDAIGraphMetricSummary`
to reflect that the tracker accumulates the summary incrementally;
consumers must check optional fields.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments