agent-recorder 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +133 -0
- package/dist/bundle.d.ts +8 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +131 -0
- package/dist/bundle.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/package.json +53 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics 2.js +205 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.d 2.ts +50 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.d.ts +50 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.js +205 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.test 2.js +253 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.test.d 2.ts +5 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.test.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.test.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.test.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.test.js +253 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.test.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/analytics/session-analytics.test.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/configure 2.js +144 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/configure.d 2.ts +17 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/configure.d.ts +17 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/configure.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/configure.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/configure.js +144 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/configure.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/configure.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/diagnose 2.js +141 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/diagnose.d 2.ts +5 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/diagnose.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/diagnose.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/diagnose.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/diagnose.js +141 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/diagnose.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/diagnose.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/doctor 2.js +253 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/doctor.d 2.ts +5 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/doctor.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/doctor.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/doctor.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/doctor.js +253 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/doctor.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/doctor.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/export 2.js +56 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/export.d 2.ts +12 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/export.d.ts +12 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/export.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/export.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/export.js +56 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/export.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/export.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/install 2.js +77 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/install.d 2.ts +13 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/install.d.ts +13 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/install.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/install.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/install.js +77 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/install.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/install.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/logs 2.js +40 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/logs.d 2.ts +8 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/logs.d.ts +8 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/logs.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/logs.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/logs.js +40 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/logs.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/logs.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/mock-mcp 2.js +188 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/mock-mcp.d 2.ts +10 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/mock-mcp.d.ts +10 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/mock-mcp.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/mock-mcp.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/mock-mcp.js +188 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/mock-mcp.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/mock-mcp.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/restart 2.js +67 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/restart.d 2.ts +9 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/restart.d.ts +9 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/restart.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/restart.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/restart.js +67 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/restart.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/restart.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/sessions 2.js +333 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/sessions.d 2.ts +52 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/sessions.d.ts +52 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/sessions.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/sessions.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/sessions.js +333 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/sessions.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/sessions.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/start 2.js +174 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/start.d 2.ts +10 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/start.d.ts +10 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/start.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/start.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/start.js +174 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/start.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/start.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/status 2.js +104 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/status.d 2.ts +5 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/status.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/status.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/status.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/status.js +104 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/status.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/status.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/stop 2.js +89 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/stop.d 2.ts +8 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/stop.d.ts +8 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/stop.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/stop.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/stop.js +89 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/stop.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/stop.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/tui 2.js +14 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/tui.d 2.ts +5 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/tui.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/tui.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/tui.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/tui.js +14 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/tui.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/commands/tui.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths 2.js +117 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.d 2.ts +55 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.d.ts +55 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.js +117 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.test 2.js +152 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.test.d 2.ts +5 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.test.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.test.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.test.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.test.js +152 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.test.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/config/claude-paths.test.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/index 2.js +194 -0
- package/vendor/node_modules/@agent-recorder/cli/index.d 2.ts +10 -0
- package/vendor/node_modules/@agent-recorder/cli/index.d.ts +10 -0
- package/vendor/node_modules/@agent-recorder/cli/index.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/index.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/index.js +194 -0
- package/vendor/node_modules/@agent-recorder/cli/index.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/index.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/package 2.json +17 -0
- package/vendor/node_modules/@agent-recorder/cli/package.json +17 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/App 2.js +84 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/App.d 2.ts +6 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/App.d.ts +6 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/App.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/App.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/App.js +84 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/App.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/App.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/api 2.js +105 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/api.d 2.ts +31 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/api.d.ts +31 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/api.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/api.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/api.js +105 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/api.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/api.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/EventInspectPanel 2.js +45 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/EventInspectPanel.d 2.ts +11 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/EventInspectPanel.d.ts +11 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/EventInspectPanel.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/EventInspectPanel.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/EventInspectPanel.js +45 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/EventInspectPanel.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/EventInspectPanel.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Header 2.js +13 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Header.d 2.ts +17 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Header.d.ts +17 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Header.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Header.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Header.js +13 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Header.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Header.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Spinner 2.js +21 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Spinner.d 2.ts +12 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Spinner.d.ts +12 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Spinner.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Spinner.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Spinner.js +21 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Spinner.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Spinner.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/StatusBadge 2.js +50 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/StatusBadge.d 2.ts +16 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/StatusBadge.d.ts +16 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/StatusBadge.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/StatusBadge.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/StatusBadge.js +50 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/StatusBadge.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/StatusBadge.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Table 2.js +20 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Table.d 2.ts +21 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Table.d.ts +21 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Table.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Table.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Table.js +20 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Table.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/Table.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/index 2.js +8 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/index.d 2.ts +8 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/index.d.ts +8 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/index.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/index.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/index.js +8 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/index.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/components/index.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/hooks/useEventStream 2.js +75 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/hooks/useEventStream.d 2.ts +22 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/hooks/useEventStream.d.ts +22 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/hooks/useEventStream.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/hooks/useEventStream.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/hooks/useEventStream.js +75 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/hooks/useEventStream.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/hooks/useEventStream.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionDetailScreen 2.js +190 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionDetailScreen.d 2.ts +13 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionDetailScreen.d.ts +13 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionDetailScreen.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionDetailScreen.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionDetailScreen.js +190 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionDetailScreen.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionDetailScreen.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionsScreen 2.js +166 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionsScreen.d 2.ts +10 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionsScreen.d.ts +10 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionsScreen.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionsScreen.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionsScreen.js +166 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionsScreen.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/SessionsScreen.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/index 2.js +6 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/index.d 2.ts +6 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/index.d.ts +6 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/index.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/index.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/index.js +6 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/index.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/cli/tui/screens/index.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/config 2.js +44 -0
- package/vendor/node_modules/@agent-recorder/core/config.d 2.ts +25 -0
- package/vendor/node_modules/@agent-recorder/core/config.d.ts +25 -0
- package/vendor/node_modules/@agent-recorder/core/config.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/config.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/config.js +44 -0
- package/vendor/node_modules/@agent-recorder/core/config.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/config.test.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/core/config.test.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/config.test.js +78 -0
- package/vendor/node_modules/@agent-recorder/core/config.test.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/daemon-paths.d.ts +50 -0
- package/vendor/node_modules/@agent-recorder/core/daemon-paths.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/daemon-paths.js +113 -0
- package/vendor/node_modules/@agent-recorder/core/daemon-paths.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/daemon-paths.test.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/core/daemon-paths.test.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/daemon-paths.test.js +143 -0
- package/vendor/node_modules/@agent-recorder/core/daemon-paths.test.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/connection.d 2.ts +15 -0
- package/vendor/node_modules/@agent-recorder/core/db/connection.d.ts +15 -0
- package/vendor/node_modules/@agent-recorder/core/db/connection.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/connection.js +30 -0
- package/vendor/node_modules/@agent-recorder/core/db/connection.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/events.d.ts +65 -0
- package/vendor/node_modules/@agent-recorder/core/db/events.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/events.js +117 -0
- package/vendor/node_modules/@agent-recorder/core/db/events.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/events.test.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/core/db/events.test.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/events.test.js +72 -0
- package/vendor/node_modules/@agent-recorder/core/db/events.test.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/index.d.ts +9 -0
- package/vendor/node_modules/@agent-recorder/core/db/index.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/index.js +9 -0
- package/vendor/node_modules/@agent-recorder/core/db/index.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/migrations.d.ts +17 -0
- package/vendor/node_modules/@agent-recorder/core/db/migrations.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/migrations.js +56 -0
- package/vendor/node_modules/@agent-recorder/core/db/migrations.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/sequences.d.ts +17 -0
- package/vendor/node_modules/@agent-recorder/core/db/sequences.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/sequences.js +41 -0
- package/vendor/node_modules/@agent-recorder/core/db/sequences.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/sessions.d.ts +17 -0
- package/vendor/node_modules/@agent-recorder/core/db/sessions.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/db/sessions.js +61 -0
- package/vendor/node_modules/@agent-recorder/core/db/sessions.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/index.d.ts +13 -0
- package/vendor/node_modules/@agent-recorder/core/index.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/index.js +13 -0
- package/vendor/node_modules/@agent-recorder/core/index.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/lockfile.d.ts +42 -0
- package/vendor/node_modules/@agent-recorder/core/lockfile.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/lockfile.js +122 -0
- package/vendor/node_modules/@agent-recorder/core/lockfile.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/lockfile.test.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/core/lockfile.test.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/lockfile.test.js +136 -0
- package/vendor/node_modules/@agent-recorder/core/lockfile.test.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/migrations/001_initial 2.sql +40 -0
- package/vendor/node_modules/@agent-recorder/core/migrations/001_initial.sql +40 -0
- package/vendor/node_modules/@agent-recorder/core/migrations/002_session_sequences 2.sql +8 -0
- package/vendor/node_modules/@agent-recorder/core/migrations/002_session_sequences.sql +8 -0
- package/vendor/node_modules/@agent-recorder/core/migrations/003_add_tool_columns 2.sql +9 -0
- package/vendor/node_modules/@agent-recorder/core/migrations/003_add_tool_columns.sql +9 -0
- package/vendor/node_modules/@agent-recorder/core/migrations/004_add_cancelled_status 2.sql +23 -0
- package/vendor/node_modules/@agent-recorder/core/migrations/004_add_cancelled_status.sql +23 -0
- package/vendor/node_modules/@agent-recorder/core/migrations/005_add_error_category 2.sql +6 -0
- package/vendor/node_modules/@agent-recorder/core/migrations/005_add_error_category.sql +6 -0
- package/vendor/node_modules/@agent-recorder/core/package 2.json +18 -0
- package/vendor/node_modules/@agent-recorder/core/package.json +18 -0
- package/vendor/node_modules/@agent-recorder/core/types/events.d 2.ts +69 -0
- package/vendor/node_modules/@agent-recorder/core/types/events.d.ts +69 -0
- package/vendor/node_modules/@agent-recorder/core/types/events.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/types/events.js +6 -0
- package/vendor/node_modules/@agent-recorder/core/types/events.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/types/index 2.js +2 -0
- package/vendor/node_modules/@agent-recorder/core/types/index.d.ts +3 -0
- package/vendor/node_modules/@agent-recorder/core/types/index.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/types/index.js +2 -0
- package/vendor/node_modules/@agent-recorder/core/types/index.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/types/index.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/types/session 2.js +6 -0
- package/vendor/node_modules/@agent-recorder/core/types/session.d 2.ts +22 -0
- package/vendor/node_modules/@agent-recorder/core/types/session.d.ts +22 -0
- package/vendor/node_modules/@agent-recorder/core/types/session.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/types/session.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/types/session.js +6 -0
- package/vendor/node_modules/@agent-recorder/core/types/session.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/types/session.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category 2.js +58 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.d 2.ts +22 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.d.ts +22 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.js +58 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.test.d 2.ts +5 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.test.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.test.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.test.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.test.js +89 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.test.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/error-category.test.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/index 2.js +6 -0
- package/vendor/node_modules/@agent-recorder/core/utils/index.d 2.ts +6 -0
- package/vendor/node_modules/@agent-recorder/core/utils/index.d.ts +6 -0
- package/vendor/node_modules/@agent-recorder/core/utils/index.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/index.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/index.js +6 -0
- package/vendor/node_modules/@agent-recorder/core/utils/index.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/index.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/redact.d 2.ts +19 -0
- package/vendor/node_modules/@agent-recorder/core/utils/redact.d.ts +19 -0
- package/vendor/node_modules/@agent-recorder/core/utils/redact.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/redact.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/redact.js +52 -0
- package/vendor/node_modules/@agent-recorder/core/utils/redact.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/core/utils/redact.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/index 2.js +128 -0
- package/vendor/node_modules/@agent-recorder/service/index.d 2.ts +36 -0
- package/vendor/node_modules/@agent-recorder/service/index.d.ts +36 -0
- package/vendor/node_modules/@agent-recorder/service/index.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/index.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/index.js +128 -0
- package/vendor/node_modules/@agent-recorder/service/index.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/index.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/index 2.js +7 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/index.d 2.ts +7 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/index.d.ts +7 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/index.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/index.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/index.js +7 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/index.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/index.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy 2.js +223 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.d 2.ts +26 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.d.ts +26 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.js +223 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.test.d 2.ts +5 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.test.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.test.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.test.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.test.js +367 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.test.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/proxy.test.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/recorder 2.js +62 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/recorder.d 2.ts +31 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/recorder.d.ts +31 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/recorder.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/recorder.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/recorder.js +62 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/recorder.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/recorder.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/types 2.js +15 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/types.d 2.ts +40 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/types.d.ts +40 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/types.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/types.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/types.js +15 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/types.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/mcp/types.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/package 2.json +15 -0
- package/vendor/node_modules/@agent-recorder/service/package.json +15 -0
- package/vendor/node_modules/@agent-recorder/service/routes/events 2.js +71 -0
- package/vendor/node_modules/@agent-recorder/service/routes/events.d 2.ts +11 -0
- package/vendor/node_modules/@agent-recorder/service/routes/events.d.ts +11 -0
- package/vendor/node_modules/@agent-recorder/service/routes/events.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/routes/events.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/routes/events.js +71 -0
- package/vendor/node_modules/@agent-recorder/service/routes/events.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/routes/events.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/routes/health 2.js +18 -0
- package/vendor/node_modules/@agent-recorder/service/routes/health.d 2.ts +6 -0
- package/vendor/node_modules/@agent-recorder/service/routes/health.d.ts +6 -0
- package/vendor/node_modules/@agent-recorder/service/routes/health.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/routes/health.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/routes/health.js +18 -0
- package/vendor/node_modules/@agent-recorder/service/routes/health.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/routes/health.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/routes/sessions 2.js +80 -0
- package/vendor/node_modules/@agent-recorder/service/routes/sessions.d 2.ts +12 -0
- package/vendor/node_modules/@agent-recorder/service/routes/sessions.d.ts +12 -0
- package/vendor/node_modules/@agent-recorder/service/routes/sessions.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/routes/sessions.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/routes/sessions.js +80 -0
- package/vendor/node_modules/@agent-recorder/service/routes/sessions.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/routes/sessions.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/server 2.js +36 -0
- package/vendor/node_modules/@agent-recorder/service/server.d 2.ts +19 -0
- package/vendor/node_modules/@agent-recorder/service/server.d.ts +19 -0
- package/vendor/node_modules/@agent-recorder/service/server.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/server.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/server.js +36 -0
- package/vendor/node_modules/@agent-recorder/service/server.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/server.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/server.test 2.js +296 -0
- package/vendor/node_modules/@agent-recorder/service/server.test.d 2.ts +5 -0
- package/vendor/node_modules/@agent-recorder/service/server.test.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/service/server.test.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/server.test.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/server.test.js +296 -0
- package/vendor/node_modules/@agent-recorder/service/server.test.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager 2.js +22 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.d 2.ts +16 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.d.ts +16 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.js +22 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.js.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.test 2.js +61 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.test.d 2.ts +5 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.test.d.ts +5 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.test.d.ts 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.test.d.ts.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.test.js +61 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.test.js 2.map +1 -0
- package/vendor/node_modules/@agent-recorder/service/session-manager.test.js.map +1 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session analytics - pure functions for computing session metrics.
|
|
3
|
+
* These functions work on BaseEvent[] arrays fetched from the API.
|
|
4
|
+
* No side effects, no I/O - just computation.
|
|
5
|
+
*/
|
|
6
|
+
import type { BaseEvent, ErrorCategory } from "@agent-recorder/core";
|
|
7
|
+
/** Session summary computed from events */
|
|
8
|
+
export interface SessionSummary {
|
|
9
|
+
totalEvents: number;
|
|
10
|
+
byStatus: Record<string, number>;
|
|
11
|
+
byEventType: Record<string, number>;
|
|
12
|
+
byToolName: Record<string, number>;
|
|
13
|
+
byErrorCategory: Record<string, number>;
|
|
14
|
+
successCount: number;
|
|
15
|
+
errorCount: number;
|
|
16
|
+
timeoutCount: number;
|
|
17
|
+
errorRate: number;
|
|
18
|
+
avgDurationMs: number | null;
|
|
19
|
+
totalDurationMs: number;
|
|
20
|
+
topTools: Array<{
|
|
21
|
+
name: string;
|
|
22
|
+
count: number;
|
|
23
|
+
}>;
|
|
24
|
+
topErrors: Array<{
|
|
25
|
+
category: ErrorCategory;
|
|
26
|
+
count: number;
|
|
27
|
+
}>;
|
|
28
|
+
slowestCalls: Array<{
|
|
29
|
+
sequence: number;
|
|
30
|
+
toolName: string | null;
|
|
31
|
+
durationMs: number;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Compute session summary from events.
|
|
36
|
+
*/
|
|
37
|
+
export declare function computeSessionSummary(events: BaseEvent[], slowestCount?: number): SessionSummary;
|
|
38
|
+
/**
|
|
39
|
+
* Format summary as human-readable text.
|
|
40
|
+
*/
|
|
41
|
+
export declare function formatSummaryText(summary: SessionSummary): string;
|
|
42
|
+
/**
|
|
43
|
+
* Format a concise one-line safe summary (no content).
|
|
44
|
+
*/
|
|
45
|
+
export declare function formatConciseSummary(events: BaseEvent[], summary: SessionSummary): string;
|
|
46
|
+
/**
|
|
47
|
+
* Format stats output for CLI.
|
|
48
|
+
*/
|
|
49
|
+
export declare function formatStatsText(summary: SessionSummary): string;
|
|
50
|
+
//# sourceMappingURL=session-analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-analytics.d.ts","sourceRoot":"","sources":["../../src/analytics/session-analytics.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErE,2CAA2C;AAC3C,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,GAAG,I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AC;IACnC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,SAAS,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,aAAa,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7D,YAAY,EAAE,KAAK,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;CACJ;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,EAAE,EACnB,YAAY,SAAK,GAChB,cAAc,CAkGhB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAoDjE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EAAE,EACnB,OAAO,EAAE,cAAc,GACtB,MAAM,CAqCR;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAiD/D"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session analytics - pure functions for computing session metrics.
|
|
3
|
+
* These functions work on BaseEvent[] arrays fetched from the API.
|
|
4
|
+
* No side effects, no I/O - just computation.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Compute session summary from events.
|
|
8
|
+
*/
|
|
9
|
+
export function computeSessionSummary(events, slowestCount = 10) {
|
|
10
|
+
const byStatus = {};
|
|
11
|
+
const byEventType = {};
|
|
12
|
+
const byToolName = {};
|
|
13
|
+
const byErrorCategory = {};
|
|
14
|
+
let successCount = 0;
|
|
15
|
+
let errorCount = 0;
|
|
16
|
+
let timeoutCount = 0;
|
|
17
|
+
let totalDurationMs = 0;
|
|
18
|
+
let durationCount = 0;
|
|
19
|
+
// Collect durations for slowest calls
|
|
20
|
+
const durations = [];
|
|
21
|
+
for (const event of events) {
|
|
22
|
+
// Count by status
|
|
23
|
+
byStatus[event.status] = (byStatus[event.status] ?? 0) + 1;
|
|
24
|
+
// Count by event type
|
|
25
|
+
byEventType[event.eventType] = (byEventType[event.eventType] ?? 0) + 1;
|
|
26
|
+
// Count by tool name
|
|
27
|
+
if (event.toolName) {
|
|
28
|
+
byToolName[event.toolName] = (byToolName[event.toolName] ?? 0) + 1;
|
|
29
|
+
}
|
|
30
|
+
// Count by error category
|
|
31
|
+
if (event.errorCategory) {
|
|
32
|
+
byErrorCategory[event.errorCategory] =
|
|
33
|
+
(byErrorCategory[event.errorCategory] ?? 0) + 1;
|
|
34
|
+
}
|
|
35
|
+
// Count success/error/timeout
|
|
36
|
+
if (event.status === "success") {
|
|
37
|
+
successCount++;
|
|
38
|
+
}
|
|
39
|
+
else if (event.status === "error") {
|
|
40
|
+
errorCount++;
|
|
41
|
+
}
|
|
42
|
+
else if (event.status === "timeout") {
|
|
43
|
+
timeoutCount++;
|
|
44
|
+
}
|
|
45
|
+
// Compute duration if both timestamps present
|
|
46
|
+
if (event.startedAt && event.endedAt) {
|
|
47
|
+
const duration = new Date(event.endedAt).getTime() - new Date(event.startedAt).getTime();
|
|
48
|
+
totalDurationMs += duration;
|
|
49
|
+
durationCount++;
|
|
50
|
+
durations.push({
|
|
51
|
+
sequence: event.sequence,
|
|
52
|
+
toolName: event.toolName,
|
|
53
|
+
durationMs: duration,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// Top tools by count
|
|
58
|
+
const topTools = Object.entries(byToolName)
|
|
59
|
+
.sort(([, a], [, b]) => b - a)
|
|
60
|
+
.slice(0, 5)
|
|
61
|
+
.map(([name, count]) => ({ name, count }));
|
|
62
|
+
// Top errors by count
|
|
63
|
+
const topErrors = Object.entries(byErrorCategory)
|
|
64
|
+
.sort(([, a], [, b]) => b - a)
|
|
65
|
+
.slice(0, 5)
|
|
66
|
+
.map(([category, count]) => ({
|
|
67
|
+
category: category,
|
|
68
|
+
count,
|
|
69
|
+
}));
|
|
70
|
+
// Slowest calls
|
|
71
|
+
const slowestCalls = durations
|
|
72
|
+
.sort((a, b) => b.durationMs - a.durationMs)
|
|
73
|
+
.slice(0, slowestCount);
|
|
74
|
+
return {
|
|
75
|
+
totalEvents: events.length,
|
|
76
|
+
byStatus,
|
|
77
|
+
byEventType,
|
|
78
|
+
byToolName,
|
|
79
|
+
byErrorCategory,
|
|
80
|
+
successCount,
|
|
81
|
+
errorCount,
|
|
82
|
+
timeoutCount,
|
|
83
|
+
errorRate: events.length > 0 ? (errorCount + timeoutCount) / events.length : 0,
|
|
84
|
+
avgDurationMs: durationCount > 0 ? Math.round(totalDurationMs / durationCount) : null,
|
|
85
|
+
totalDurationMs,
|
|
86
|
+
topTools,
|
|
87
|
+
topErrors,
|
|
88
|
+
slowestCalls,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Format summary as human-readable text.
|
|
93
|
+
*/
|
|
94
|
+
export function formatSummaryText(summary) {
|
|
95
|
+
const lines = [];
|
|
96
|
+
lines.push("Session Summary");
|
|
97
|
+
lines.push("=".repeat(50));
|
|
98
|
+
lines.push(`Total Events: ${summary.totalEvents}`);
|
|
99
|
+
lines.push(`Error Rate: ${(summary.errorRate * 100).toFixed(1)}% (${summary.errorCount} errors, ${summary.timeoutCount} timeouts)`);
|
|
100
|
+
lines.push(`Avg Duration: ${summary.avgDurationMs !== null ? `${summary.avgDurationMs}ms` : "N/A"}`);
|
|
101
|
+
lines.push(`Total Duration: ${summary.totalDurationMs}ms`);
|
|
102
|
+
lines.push("");
|
|
103
|
+
// By status
|
|
104
|
+
lines.push("By Status:");
|
|
105
|
+
for (const [status, count] of Object.entries(summary.byStatus)) {
|
|
106
|
+
lines.push(` ${status}: ${count}`);
|
|
107
|
+
}
|
|
108
|
+
lines.push("");
|
|
109
|
+
// Top tools
|
|
110
|
+
if (summary.topTools.length > 0) {
|
|
111
|
+
lines.push("Top Tools:");
|
|
112
|
+
for (const { name, count } of summary.topTools) {
|
|
113
|
+
lines.push(` ${name}: ${count}`);
|
|
114
|
+
}
|
|
115
|
+
lines.push("");
|
|
116
|
+
}
|
|
117
|
+
// Error categories
|
|
118
|
+
if (summary.topErrors.length > 0) {
|
|
119
|
+
lines.push("Error Categories:");
|
|
120
|
+
for (const { category, count } of summary.topErrors) {
|
|
121
|
+
lines.push(` ${category}: ${count}`);
|
|
122
|
+
}
|
|
123
|
+
lines.push("");
|
|
124
|
+
}
|
|
125
|
+
// Slowest calls
|
|
126
|
+
if (summary.slowestCalls.length > 0) {
|
|
127
|
+
lines.push("Slowest Calls:");
|
|
128
|
+
for (const { sequence, toolName, durationMs } of summary.slowestCalls.slice(0, 5)) {
|
|
129
|
+
lines.push(` [${sequence}] ${toolName ?? "-"}: ${durationMs}ms`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return lines.join("\n");
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Format a concise one-line safe summary (no content).
|
|
136
|
+
*/
|
|
137
|
+
export function formatConciseSummary(events, summary) {
|
|
138
|
+
const parts = [];
|
|
139
|
+
// Total events with top tools
|
|
140
|
+
const toolBreakdown = summary.topTools
|
|
141
|
+
.slice(0, 3)
|
|
142
|
+
.map((t) => `${t.name}(${t.count})`)
|
|
143
|
+
.join(", ");
|
|
144
|
+
parts.push(`${summary.totalEvents} tool calls across ${toolBreakdown}${summary.topTools.length > 3 ? "..." : ""}`);
|
|
145
|
+
// Errors
|
|
146
|
+
if (summary.errorCount > 0 || summary.timeoutCount > 0) {
|
|
147
|
+
const errorDetails = summary.topErrors
|
|
148
|
+
.map((e) => `${e.category}`)
|
|
149
|
+
.join(", ");
|
|
150
|
+
parts.push(`${summary.errorCount + summary.timeoutCount} error(s): ${errorDetails || "unknown"}`);
|
|
151
|
+
}
|
|
152
|
+
// Slowest call
|
|
153
|
+
if (summary.slowestCalls.length > 0) {
|
|
154
|
+
const slowest = summary.slowestCalls[0];
|
|
155
|
+
parts.push(`Slowest: ${slowest.toolName ?? "unknown"} (${slowest.durationMs}ms)`);
|
|
156
|
+
}
|
|
157
|
+
// Total wall time
|
|
158
|
+
if (summary.totalDurationMs > 0) {
|
|
159
|
+
const wallTime = (summary.totalDurationMs / 1000).toFixed(1);
|
|
160
|
+
parts.push(`Total time: ${wallTime}s`);
|
|
161
|
+
}
|
|
162
|
+
return parts.join("\n");
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Format stats output for CLI.
|
|
166
|
+
*/
|
|
167
|
+
export function formatStatsText(summary) {
|
|
168
|
+
const lines = [];
|
|
169
|
+
lines.push("Session Statistics");
|
|
170
|
+
lines.push("=".repeat(50));
|
|
171
|
+
lines.push("");
|
|
172
|
+
// Counts by tool
|
|
173
|
+
lines.push("Tool Call Counts (sorted by frequency):");
|
|
174
|
+
const sortedTools = Object.entries(summary.byToolName).sort(([, a], [, b]) => b - a);
|
|
175
|
+
for (const [name, count] of sortedTools) {
|
|
176
|
+
lines.push(` ${name.padEnd(30)} ${count}`);
|
|
177
|
+
}
|
|
178
|
+
lines.push("");
|
|
179
|
+
// Slowest calls
|
|
180
|
+
if (summary.slowestCalls.length > 0) {
|
|
181
|
+
lines.push("Slowest Calls (top 10):");
|
|
182
|
+
for (const { sequence, toolName, durationMs } of summary.slowestCalls) {
|
|
183
|
+
lines.push(` [${String(sequence).padStart(4)}] ${(toolName ?? "-").padEnd(30)} ${durationMs}ms`);
|
|
184
|
+
}
|
|
185
|
+
lines.push("");
|
|
186
|
+
}
|
|
187
|
+
// Error counts by tool
|
|
188
|
+
if (summary.topErrors.length > 0) {
|
|
189
|
+
lines.push("Error Categories:");
|
|
190
|
+
for (const { category, count } of summary.topErrors) {
|
|
191
|
+
lines.push(` ${category.padEnd(30)} ${count}`);
|
|
192
|
+
}
|
|
193
|
+
lines.push("");
|
|
194
|
+
}
|
|
195
|
+
// Summary stats
|
|
196
|
+
lines.push("Summary:");
|
|
197
|
+
lines.push(` Total Events: ${summary.totalEvents}`);
|
|
198
|
+
lines.push(` Success: ${summary.successCount}`);
|
|
199
|
+
lines.push(` Errors: ${summary.errorCount}`);
|
|
200
|
+
lines.push(` Timeouts: ${summary.timeoutCount}`);
|
|
201
|
+
lines.push(` Avg Duration: ${summary.avgDurationMs !== null ? `${summary.avgDurationMs}ms` : "N/A"}`);
|
|
202
|
+
lines.push(` Total Duration: ${summary.totalDurationMs}ms`);
|
|
203
|
+
return lines.join("\n");
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=session-analytics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-analytics.js","sourceRoot":"","sources":["../../src/analytics/session-analytics.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA0BH;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAmB,EACnB,YAAY,GAAG,EAAE;IAEjB,MAAM,QAAQ,GAA2B,EAAE,CAAC;IAC5C,MAAM,WAAW,GAA2B,EAAE,CAAC;IAC/C,MAAM,UAAU,GAA2B,EAAE,CAAC;IAC9C,MAAM,eAAe,GAA2B,EAAE,CAAC;IAEnD,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,IAAI,eAAe,GAAG,CAAC,CAAC;IACxB,IAAI,aAAa,GAAG,CAAC,CAAC;IAEtB,sCAAsC;IACtC,MAAM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 +1,253 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for session analytics pure functions.
|
|
3
|
+
*/
|
|
4
|
+
import { describe, it, expect } from "vitest";
|
|
5
|
+
import { computeSessionSummary, formatSummaryText, formatStatsText, formatConciseSummary, } from "./session-analytics.js";
|
|
6
|
+
/** Create a mock event for testing */
|
|
7
|
+
function mockEvent(overrides = {}) {
|
|
8
|
+
return {
|
|
9
|
+
id: "test-id",
|
|
10
|
+
sessionId: "session-1",
|
|
11
|
+
parentEventId: null,
|
|
12
|
+
sequence: 1,
|
|
13
|
+
eventType: "tool_call",
|
|
14
|
+
agentRole: "assistant",
|
|
15
|
+
agentName: "claude-code",
|
|
16
|
+
skillName: null,
|
|
17
|
+
toolName: "read_file",
|
|
18
|
+
mcpMethod: "tools/call",
|
|
19
|
+
startedAt: "2024-01-01T00:00:00.000Z",
|
|
20
|
+
endedAt: "2024-01-01T00:00:01.000Z",
|
|
21
|
+
status: "success",
|
|
22
|
+
inputJson: "{}",
|
|
23
|
+
outputJson: "{}",
|
|
24
|
+
errorCategory: null,
|
|
25
|
+
createdAt: "2024-01-01T00:00:00.000Z",
|
|
26
|
+
...overrides,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
describe("computeSessionSummary", () => {
|
|
30
|
+
it("computes correct total events", () => {
|
|
31
|
+
const events = [
|
|
32
|
+
mockEvent({ sequence: 1 }),
|
|
33
|
+
mockEvent({ sequence: 2 }),
|
|
34
|
+
mockEvent({ sequence: 3 }),
|
|
35
|
+
];
|
|
36
|
+
const summary = computeSessionSummary(events);
|
|
37
|
+
expect(summary.totalEvents).toBe(3);
|
|
38
|
+
});
|
|
39
|
+
it("counts events by status", () => {
|
|
40
|
+
const events = [
|
|
41
|
+
mockEvent({ sequence: 1, status: "success" }),
|
|
42
|
+
mockEvent({ sequence: 2, status: "success" }),
|
|
43
|
+
mockEvent({
|
|
44
|
+
sequence: 3,
|
|
45
|
+
status: "error",
|
|
46
|
+
errorCategory: "jsonrpc_error",
|
|
47
|
+
}),
|
|
48
|
+
mockEvent({
|
|
49
|
+
sequence: 4,
|
|
50
|
+
status: "timeout",
|
|
51
|
+
errorCategory: "downstream_timeout",
|
|
52
|
+
}),
|
|
53
|
+
];
|
|
54
|
+
const summary = computeSessionSummary(events);
|
|
55
|
+
expect(summary.byStatus["success"]).toBe(2);
|
|
56
|
+
expect(summary.byStatus["error"]).toBe(1);
|
|
57
|
+
expect(summary.byStatus["timeout"]).toBe(1);
|
|
58
|
+
expect(summary.successCount).toBe(2);
|
|
59
|
+
expect(summary.errorCount).toBe(1);
|
|
60
|
+
expect(summary.timeoutCount).toBe(1);
|
|
61
|
+
});
|
|
62
|
+
it("counts events by tool name", () => {
|
|
63
|
+
const events = [
|
|
64
|
+
mockEvent({ sequence: 1, toolName: "read_file" }),
|
|
65
|
+
mockEvent({ sequence: 2, toolName: "write_file" }),
|
|
66
|
+
mockEvent({ sequence: 3, toolName: "read_file" }),
|
|
67
|
+
];
|
|
68
|
+
const summary = computeSessionSummary(events);
|
|
69
|
+
expect(summary.byToolName["read_file"]).toBe(2);
|
|
70
|
+
expect(summary.byToolName["write_file"]).toBe(1);
|
|
71
|
+
});
|
|
72
|
+
it("computes error rate correctly", () => {
|
|
73
|
+
const events = [
|
|
74
|
+
mockEvent({ sequence: 1, status: "success" }),
|
|
75
|
+
mockEvent({
|
|
76
|
+
sequence: 2,
|
|
77
|
+
status: "error",
|
|
78
|
+
errorCategory: "jsonrpc_error",
|
|
79
|
+
}),
|
|
80
|
+
mockEvent({
|
|
81
|
+
sequence: 3,
|
|
82
|
+
status: "timeout",
|
|
83
|
+
errorCategory: "downstream_timeout",
|
|
84
|
+
}),
|
|
85
|
+
mockEvent({ sequence: 4, status: "success" }),
|
|
86
|
+
];
|
|
87
|
+
const summary = computeSessionSummary(events);
|
|
88
|
+
expect(summary.errorRate).toBe(0.5); // 2 errors out of 4
|
|
89
|
+
});
|
|
90
|
+
it("computes average duration", () => {
|
|
91
|
+
const events = [
|
|
92
|
+
mockEvent({
|
|
93
|
+
sequence: 1,
|
|
94
|
+
startedAt: "2024-01-01T00:00:00.000Z",
|
|
95
|
+
endedAt: "2024-01-01T00:00:01.000Z", // 1000ms
|
|
96
|
+
}),
|
|
97
|
+
mockEvent({
|
|
98
|
+
sequence: 2,
|
|
99
|
+
startedAt: "2024-01-01T00:00:02.000Z",
|
|
100
|
+
endedAt: "2024-01-01T00:00:05.000Z", // 3000ms
|
|
101
|
+
}),
|
|
102
|
+
];
|
|
103
|
+
const summary = computeSessionSummary(events);
|
|
104
|
+
expect(summary.avgDurationMs).toBe(2000);
|
|
105
|
+
expect(summary.totalDurationMs).toBe(4000);
|
|
106
|
+
});
|
|
107
|
+
it("handles events with no end time", () => {
|
|
108
|
+
const events = [
|
|
109
|
+
mockEvent({
|
|
110
|
+
sequence: 1,
|
|
111
|
+
status: "running",
|
|
112
|
+
startedAt: "2024-01-01T00:00:00.000Z",
|
|
113
|
+
endedAt: null,
|
|
114
|
+
}),
|
|
115
|
+
];
|
|
116
|
+
const summary = computeSessionSummary(events);
|
|
117
|
+
expect(summary.avgDurationMs).toBeNull();
|
|
118
|
+
expect(summary.totalDurationMs).toBe(0);
|
|
119
|
+
});
|
|
120
|
+
it("counts error categories", () => {
|
|
121
|
+
const events = [
|
|
122
|
+
mockEvent({
|
|
123
|
+
sequence: 1,
|
|
124
|
+
status: "error",
|
|
125
|
+
errorCategory: "jsonrpc_error",
|
|
126
|
+
}),
|
|
127
|
+
mockEvent({
|
|
128
|
+
sequence: 2,
|
|
129
|
+
status: "timeout",
|
|
130
|
+
errorCategory: "downstream_timeout",
|
|
131
|
+
}),
|
|
132
|
+
mockEvent({
|
|
133
|
+
sequence: 3,
|
|
134
|
+
status: "error",
|
|
135
|
+
errorCategory: "jsonrpc_error",
|
|
136
|
+
}),
|
|
137
|
+
];
|
|
138
|
+
const summary = computeSessionSummary(events);
|
|
139
|
+
expect(summary.byErrorCategory["jsonrpc_error"]).toBe(2);
|
|
140
|
+
expect(summary.byErrorCategory["downstream_timeout"]).toBe(1);
|
|
141
|
+
});
|
|
142
|
+
it("computes top tools sorted by count", () => {
|
|
143
|
+
const events = [
|
|
144
|
+
mockEvent({ sequence: 1, toolName: "read_file" }),
|
|
145
|
+
mockEvent({ sequence: 2, toolName: "read_file" }),
|
|
146
|
+
mockEvent({ sequence: 3, toolName: "read_file" }),
|
|
147
|
+
mockEvent({ sequence: 4, toolName: "write_file" }),
|
|
148
|
+
mockEvent({ sequence: 5, toolName: "write_file" }),
|
|
149
|
+
mockEvent({ sequence: 6, toolName: "bash" }),
|
|
150
|
+
];
|
|
151
|
+
const summary = computeSessionSummary(events);
|
|
152
|
+
expect(summary.topTools).toHaveLength(3);
|
|
153
|
+
expect(summary.topTools[0]).toEqual({ name: "read_file", count: 3 });
|
|
154
|
+
expect(summary.topTools[1]).toEqual({ name: "write_file", count: 2 });
|
|
155
|
+
expect(summary.topTools[2]).toEqual({ name: "bash", count: 1 });
|
|
156
|
+
});
|
|
157
|
+
it("computes slowest calls", () => {
|
|
158
|
+
const events = [
|
|
159
|
+
mockEvent({
|
|
160
|
+
sequence: 1,
|
|
161
|
+
toolName: "fast_tool",
|
|
162
|
+
startedAt: "2024-01-01T00:00:00.000Z",
|
|
163
|
+
endedAt: "2024-01-01T00:00:00.100Z", // 100ms
|
|
164
|
+
}),
|
|
165
|
+
mockEvent({
|
|
166
|
+
sequence: 2,
|
|
167
|
+
toolName: "slow_tool",
|
|
168
|
+
startedAt: "2024-01-01T00:00:01.000Z",
|
|
169
|
+
endedAt: "2024-01-01T00:00:06.000Z", // 5000ms
|
|
170
|
+
}),
|
|
171
|
+
mockEvent({
|
|
172
|
+
sequence: 3,
|
|
173
|
+
toolName: "medium_tool",
|
|
174
|
+
startedAt: "2024-01-01T00:00:07.000Z",
|
|
175
|
+
endedAt: "2024-01-01T00:00:08.000Z", // 1000ms
|
|
176
|
+
}),
|
|
177
|
+
];
|
|
178
|
+
const summary = computeSessionSummary(events);
|
|
179
|
+
expect(summary.slowestCalls).toHaveLength(3);
|
|
180
|
+
expect(summary.slowestCalls[0]).toEqual({
|
|
181
|
+
sequence: 2,
|
|
182
|
+
toolName: "slow_tool",
|
|
183
|
+
durationMs: 5000,
|
|
184
|
+
});
|
|
185
|
+
expect(summary.slowestCalls[1]).toEqual({
|
|
186
|
+
sequence: 3,
|
|
187
|
+
toolName: "medium_tool",
|
|
188
|
+
durationMs: 1000,
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
it("handles empty events array", () => {
|
|
192
|
+
const summary = computeSessionSummary([]);
|
|
193
|
+
expect(summary.totalEvents).toBe(0);
|
|
194
|
+
expect(summary.errorRate).toBe(0);
|
|
195
|
+
expect(summary.avgDurationMs).toBeNull();
|
|
196
|
+
expect(summary.topTools).toHaveLength(0);
|
|
197
|
+
expect(summary.slowestCalls).toHaveLength(0);
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
describe("formatSummaryText", () => {
|
|
201
|
+
it("formats summary as text", () => {
|
|
202
|
+
const events = [
|
|
203
|
+
mockEvent({ sequence: 1, toolName: "read_file", status: "success" }),
|
|
204
|
+
];
|
|
205
|
+
const summary = computeSessionSummary(events);
|
|
206
|
+
const text = formatSummaryText(summary);
|
|
207
|
+
expect(text).toContain("Session Summary");
|
|
208
|
+
expect(text).toContain("Total Events: 1");
|
|
209
|
+
expect(text).toContain("read_file: 1");
|
|
210
|
+
expect(text).toContain("success: 1");
|
|
211
|
+
});
|
|
212
|
+
it("includes error categories when present", () => {
|
|
213
|
+
const events = [
|
|
214
|
+
mockEvent({
|
|
215
|
+
sequence: 1,
|
|
216
|
+
status: "error",
|
|
217
|
+
errorCategory: "jsonrpc_error",
|
|
218
|
+
}),
|
|
219
|
+
];
|
|
220
|
+
const summary = computeSessionSummary(events);
|
|
221
|
+
const text = formatSummaryText(summary);
|
|
222
|
+
expect(text).toContain("Error Categories:");
|
|
223
|
+
expect(text).toContain("jsonrpc_error: 1");
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
describe("formatStatsText", () => {
|
|
227
|
+
it("formats stats output", () => {
|
|
228
|
+
const events = [
|
|
229
|
+
mockEvent({ sequence: 1, toolName: "read_file" }),
|
|
230
|
+
mockEvent({ sequence: 2, toolName: "read_file" }),
|
|
231
|
+
];
|
|
232
|
+
const summary = computeSessionSummary(events);
|
|
233
|
+
const text = formatStatsText(summary);
|
|
234
|
+
expect(text).toContain("Session Statistics");
|
|
235
|
+
expect(text).toContain("Tool Call Counts");
|
|
236
|
+
expect(text).toContain("read_file");
|
|
237
|
+
expect(text).toContain("Summary:");
|
|
238
|
+
expect(text).toContain("Total Events:");
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
describe("formatConciseSummary", () => {
|
|
242
|
+
it("formats concise one-liner summary", () => {
|
|
243
|
+
const events = [
|
|
244
|
+
mockEvent({ sequence: 1, toolName: "read_file" }),
|
|
245
|
+
mockEvent({ sequence: 2, toolName: "write_file" }),
|
|
246
|
+
];
|
|
247
|
+
const summary = computeSessionSummary(events);
|
|
248
|
+
const text = formatConciseSummary(events, summary);
|
|
249
|
+
expect(text).toContain("2 tool calls");
|
|
250
|
+
expect(text).toContain("read_file");
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
//# sourceMappingURL=session-analytics.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-analytics.test.d.ts","sourceRoot":"","sources":["../../src/analytics/session-analytics.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-analytics.test.d.ts","sourceRoot":"","sources":["../../src/analytics/session-analytics.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|