agent-orchestrator/packages
Prateek 0ca84adbfb refactor: move computeApiStats to core, eliminate route-grouping duplication
Three copies of the same route-grouping + percentile stats logic existed in:
  - web getRequestStats (request-logger.ts)
  - web GET /api/perf (perf/route.ts inline)
  - CLI ao perf routes (perf.ts inline)

Also, RequestLog in web was a duplicate of ApiLogEntry in core.

Changes:
- Add computeApiStats(), RouteStats, ApiPerfResult to packages/core/src/log-reader.ts
- Export from @composio/ao-core
- Rewrite web/request-logger.ts as thin delegation: re-export types from core,
  getRequestStats() = parseApiLogs() + computeApiStats()
- Simplify web/perf/route.ts to use getRequestStats() (removes 80-line inline loop)
- Update CLI perf.ts to use computeApiStats() (removes inline grouping)
- Update with-timing.ts to use ApiLogEntry instead of local RequestLog
- Add parseApiLogs + computeApiStats tests to core log-reader.test.ts
- Simplify web request-logger.test.ts to a 3-test delegation contract
- Update observability-routes.test.ts mock to include parseApiLogs/computeApiStats
- Update perf.test.ts mock to include computeApiStats with inline implementation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 19:34:33 +05:30
..
agent-orchestrator feat: publish to npm under @composio scope (#32) 2026-02-15 04:28:57 +05:30
cli refactor: move computeApiStats to core, eliminate route-grouping duplication 2026-02-20 19:34:33 +05:30
core refactor: move computeApiStats to core, eliminate route-grouping duplication 2026-02-20 19:34:33 +05:30
integration-tests feat(web): redesign dashboard, session detail, and orchestrator terminal (#125) 2026-02-20 18:43:57 +05:30
plugins feat(web): redesign dashboard, session detail, and orchestrator terminal (#125) 2026-02-20 18:43:57 +05:30
web refactor: move computeApiStats to core, eliminate route-grouping duplication 2026-02-20 19:34:33 +05:30