FN-7393: add planner chat task metrics access
Planner chat can now answer read-only task usage and timing questions with scoped metrics context.
- Add a task-scoped metrics tool for token, cost, runtime, timing-event, workflow-step, and per-model usage summaries.
- Wire planner chat to expose the metrics tool only for task-detail planner sessions.
- Cover metric aggregation, stale pricing uncertainty, chat tool routing, and planner context behavior with dashboard tests.
- Document planner chat metrics support and add a published package changeset.
Files changed:
.changeset/fn-7393-planner-metrics.md | 7 +
docs/dashboard-guide.md | 2 +-
.../dashboard/src/__tests__/chat-manager.test.ts | 153 +++++++
.../__tests__/task-planner-chat-metrics.test.ts | 243 +++++++++++
packages/dashboard/src/chat.ts | 61 ++-
.../dashboard/src/task-planner-chat-context.ts | 5 +-
.../dashboard/src/task-planner-chat-metrics.ts | 445 +++++++++++++++++++++
7 files changed, 912 insertions(+), 4 deletions(-)
Fusion-Task-Id: FN-7393
Fusion-Task-Lineage: aed7574e-67cf-49af-982f-dfd4620ebe0a
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>