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 @@
|
|
|
1
|
+
{"version":3,"file":"stop.js","sourceRoot":"","sources":["../../src/commands/stop.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,cAAc,EACd,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAM9B;;GAEG;AACH,KAAK,UAAU,WAAW,CAAC,GAAW,EAAE,SAAiB;IACvD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,GAAG,SAAS,EAAE,CAAC;QAC1C,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,UAA8B,EAAE;IAEhC,MAAM,KAAK,GAAG,cAAc,EAAE,C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O,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;QAC5C,gEAAgE;QAChE,aAAa,EAAE,CAAC;QAChB,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC5B,OAAO;IACT,CAAC;IAED,8BAA8B;IAC9B,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;QACxD,IAAI,CAAC;YACH,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAC/B,CAAC;QAAC,MAAM,CAAC;YACP,iDAAiD;QACnD,CAAC;QAED,kBAAkB;QAClB,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;QAEzD,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3B,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;YAC9B,aAAa,EAAE,CAAC;YAChB,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;YACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CACX,yCAAyC,GAAG,8BAA8B,CAC3E,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TUI command - interactive session explorer.
|
|
3
|
+
*/
|
|
4
|
+
export async function tuiCommand() {
|
|
5
|
+
// Dynamic imports to avoid loading React unless needed
|
|
6
|
+
const { render } = await import("ink");
|
|
7
|
+
const React = await import("react");
|
|
8
|
+
const { App } = await import("../tui/App.js");
|
|
9
|
+
// Render the TUI app
|
|
10
|
+
const { waitUntilExit } = render(React.createElement(App));
|
|
11
|
+
// Wait for the app to exit
|
|
12
|
+
await waitUntilExit();
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=tui.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tui.d.ts","sourceRoot":"","sources":["../../src/commands/tui.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAWhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tui.d.ts","sourceRoot":"","sources":["../../src/commands/tui.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAWhD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TUI command - interactive session explorer.
|
|
3
|
+
*/
|
|
4
|
+
export async function tuiCommand() {
|
|
5
|
+
// Dynamic imports to avoid loading React unless needed
|
|
6
|
+
const { render } = await import("ink");
|
|
7
|
+
const React = await import("react");
|
|
8
|
+
const { App } = await import("../tui/App.js");
|
|
9
|
+
// Render the TUI app
|
|
10
|
+
const { waitUntilExit } = render(React.createElement(App));
|
|
11
|
+
// Wait for the app to exit
|
|
12
|
+
await waitUntilExit();
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=tui.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tui.js","sourceRoot":"","sources":["../../src/commands/tui.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,uDAAuD;IACvD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC;IACpC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,CAAC;IAE9C,qBAAqB;IACrB,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;IAE3D,2BAA2B;IAC3B,MAAM,aAAa,EAAE,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tui.js","sourceRoot":"","sources":["../../src/commands/tui.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,uDAAuD;IACvD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC;IACpC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,CAAC;IAE9C,qBAAqB;IACrB,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;IAE3D,2BAA2B;IAC3B,MAAM,aAAa,EAAE,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code configuration detection and management.
|
|
3
|
+
* Supports both v2 (~/.claude/settings.json) and legacy (~/.config/claude/mcp.json) paths.
|
|
4
|
+
*/
|
|
5
|
+
import * as fs from "node:fs";
|
|
6
|
+
import * as path from "node:path";
|
|
7
|
+
import * as os from "node:os";
|
|
8
|
+
/**
|
|
9
|
+
* Get the v2 Claude config path (~/.claude/settings.json)
|
|
10
|
+
*/
|
|
11
|
+
export function getV2ConfigPath() {
|
|
12
|
+
return path.join(os.homedir(), ".claude", "settings.json");
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Get the legacy Claude config path (~/.config/claude/mcp.json)
|
|
16
|
+
*/
|
|
17
|
+
export function getLegacyConfigPath() {
|
|
18
|
+
return path.join(os.homedir(), ".config", "claude", "mcp.json");
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Detect which Claude config file exists.
|
|
22
|
+
* Checks v2 first, then legacy. Returns 'none' if neither exists.
|
|
23
|
+
*/
|
|
24
|
+
export function detectClaudeConfig() {
|
|
25
|
+
const v2Path = getV2ConfigPath();
|
|
26
|
+
const legacyPath = getLegacyConfigPath();
|
|
27
|
+
if (fs.existsSync(v2Path)) {
|
|
28
|
+
return { kind: "v2", path: v2Path };
|
|
29
|
+
}
|
|
30
|
+
if (fs.existsSync(legacyPath)) {
|
|
31
|
+
return { kind: "legacy", path: legacyPath };
|
|
32
|
+
}
|
|
33
|
+
return { kind: "none", path: null };
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Safely read and parse a JSON file.
|
|
37
|
+
* Returns null if file doesn't exist or is invalid JSON.
|
|
38
|
+
*/
|
|
39
|
+
export function readJsonFile(filePath) {
|
|
40
|
+
try {
|
|
41
|
+
if (!fs.existsSync(filePath)) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
const content = fs.readFileSync(filePath, "utf-8");
|
|
45
|
+
return JSON.parse(content);
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Write JSON to file atomically (write to temp, then rename).
|
|
53
|
+
* Creates parent directories if needed.
|
|
54
|
+
*/
|
|
55
|
+
export function writeJsonFileAtomic(filePath, data) {
|
|
56
|
+
const dir = path.dirname(filePath);
|
|
57
|
+
if (!fs.existsSync(dir)) {
|
|
58
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
59
|
+
}
|
|
60
|
+
const content = JSON.stringify(data, null, 2) + "\n";
|
|
61
|
+
const tempPath = `${filePath}.tmp.${Date.now()}`;
|
|
62
|
+
fs.writeFileSync(tempPath, content, "utf-8");
|
|
63
|
+
fs.renameSync(tempPath, filePath);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Create a backup of a file with timestamp.
|
|
67
|
+
* Returns the backup path.
|
|
68
|
+
*/
|
|
69
|
+
export function createBackup(filePath) {
|
|
70
|
+
const now = new Date();
|
|
71
|
+
// Format: YYYYMMDDHHMMSS (14 chars)
|
|
72
|
+
const timestamp = now.toISOString().replace(/[-:T]/g, "").slice(0, 14);
|
|
73
|
+
const backupPath = `${filePath}.bak-${timestamp}`;
|
|
74
|
+
if (fs.existsSync(filePath)) {
|
|
75
|
+
fs.copyFileSync(filePath, backupPath);
|
|
76
|
+
}
|
|
77
|
+
return backupPath;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Get the agent-recorder MCP server entry from a config object.
|
|
81
|
+
*/
|
|
82
|
+
export function getMcpServerEntry(config) {
|
|
83
|
+
const mcpServers = config.mcpServers;
|
|
84
|
+
if (!mcpServers || typeof mcpServers !== "object") {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
const entry = mcpServers["agent-recorder"];
|
|
88
|
+
if (!entry || typeof entry !== "object") {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
return entry;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Set the agent-recorder MCP server entry in a config object.
|
|
95
|
+
* Returns a new config object (does not mutate input).
|
|
96
|
+
*/
|
|
97
|
+
export function setMcpServerEntry(config, url) {
|
|
98
|
+
const newConfig = { ...config };
|
|
99
|
+
// Ensure mcpServers exists
|
|
100
|
+
const mcpServers = newConfig.mcpServers || {};
|
|
101
|
+
newConfig.mcpServers = {
|
|
102
|
+
...mcpServers,
|
|
103
|
+
"agent-recorder": { url },
|
|
104
|
+
};
|
|
105
|
+
return newConfig;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Format a path for display, replacing home directory with ~
|
|
109
|
+
*/
|
|
110
|
+
export function formatPath(filePath) {
|
|
111
|
+
const home = os.homedir();
|
|
112
|
+
if (filePath.startsWith(home)) {
|
|
113
|
+
return "~" + filePath.slice(home.length);
|
|
114
|
+
}
|
|
115
|
+
return filePath;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=claude-paths.js.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code configuration detection and management.
|
|
3
|
+
* Supports both v2 (~/.claude/settings.json) and legacy (~/.config/claude/mcp.json) paths.
|
|
4
|
+
*/
|
|
5
|
+
export interface ClaudeConfigInfo {
|
|
6
|
+
kind: "v2" | "legacy" | "none";
|
|
7
|
+
path: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface McpServerEntry {
|
|
10
|
+
url?: string;
|
|
11
|
+
command?: string;
|
|
12
|
+
args?: string[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Get the v2 Claude config path (~/.claude/settings.json)
|
|
16
|
+
*/
|
|
17
|
+
export declare function getV2ConfigPath(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Get the legacy Claude config path (~/.config/claude/mcp.json)
|
|
20
|
+
*/
|
|
21
|
+
export declare function getLegacyConfigPath(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Detect which Claude config file exists.
|
|
24
|
+
* Checks v2 first, then legacy. Returns 'none' if neither exists.
|
|
25
|
+
*/
|
|
26
|
+
export declare function detectClaudeConfig(): ClaudeConfigInfo;
|
|
27
|
+
/**
|
|
28
|
+
* Safely read and parse a JSON file.
|
|
29
|
+
* Returns null if file doesn't exist or is invalid JSON.
|
|
30
|
+
*/
|
|
31
|
+
export declare function readJsonFile(filePath: string): Record<string, unknown> | null;
|
|
32
|
+
/**
|
|
33
|
+
* Write JSON to file atomically (write to temp, then rename).
|
|
34
|
+
* Creates parent directories if needed.
|
|
35
|
+
*/
|
|
36
|
+
export declare function writeJsonFileAtomic(filePath: string, data: Record<string, unknown>): void;
|
|
37
|
+
/**
|
|
38
|
+
* Create a backup of a file with timestamp.
|
|
39
|
+
* Returns the backup path.
|
|
40
|
+
*/
|
|
41
|
+
export declare function createBackup(filePath: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* Get the agent-recorder MCP server entry from a config object.
|
|
44
|
+
*/
|
|
45
|
+
export declare function getMcpServerEntry(config: Record<string, unknown>): McpServerEntry | null;
|
|
46
|
+
/**
|
|
47
|
+
* Set the agent-recorder MCP server entry in a config object.
|
|
48
|
+
* Returns a new config object (does not mutate input).
|
|
49
|
+
*/
|
|
50
|
+
export declare function setMcpServerEntry(config: Record<string, unknown>, url: string): Record<string, unknown>;
|
|
51
|
+
/**
|
|
52
|
+
* Format a path for display, replacing home directory with ~
|
|
53
|
+
*/
|
|
54
|
+
export declare function formatPath(filePath: string): string;
|
|
55
|
+
//# sourceMappingURL=claude-paths.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code configuration detection and management.
|
|
3
|
+
* Supports both v2 (~/.claude/settings.json) and legacy (~/.config/claude/mcp.json) paths.
|
|
4
|
+
*/
|
|
5
|
+
export interface ClaudeConfigInfo {
|
|
6
|
+
kind: "v2" | "legacy" | "none";
|
|
7
|
+
path: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface McpServerEntry {
|
|
10
|
+
url?: string;
|
|
11
|
+
command?: string;
|
|
12
|
+
args?: string[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Get the v2 Claude config path (~/.claude/settings.json)
|
|
16
|
+
*/
|
|
17
|
+
export declare function getV2ConfigPath(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Get the legacy Claude config path (~/.config/claude/mcp.json)
|
|
20
|
+
*/
|
|
21
|
+
export declare function getLegacyConfigPath(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Detect which Claude config file exists.
|
|
24
|
+
* Checks v2 first, then legacy. Returns 'none' if neither exists.
|
|
25
|
+
*/
|
|
26
|
+
export declare function detectClaudeConfig(): ClaudeConfigInfo;
|
|
27
|
+
/**
|
|
28
|
+
* Safely read and parse a JSON file.
|
|
29
|
+
* Returns null if file doesn't exist or is invalid JSON.
|
|
30
|
+
*/
|
|
31
|
+
export declare function readJsonFile(filePath: string): Record<string, unknown> | null;
|
|
32
|
+
/**
|
|
33
|
+
* Write JSON to file atomically (write to temp, then rename).
|
|
34
|
+
* Creates parent directories if needed.
|
|
35
|
+
*/
|
|
36
|
+
export declare function writeJsonFileAtomic(filePath: string, data: Record<string, unknown>): void;
|
|
37
|
+
/**
|
|
38
|
+
* Create a backup of a file with timestamp.
|
|
39
|
+
* Returns the backup path.
|
|
40
|
+
*/
|
|
41
|
+
export declare function createBackup(filePath: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* Get the agent-recorder MCP server entry from a config object.
|
|
44
|
+
*/
|
|
45
|
+
export declare function getMcpServerEntry(config: Record<string, unknown>): McpServerEntry | null;
|
|
46
|
+
/**
|
|
47
|
+
* Set the agent-recorder MCP server entry in a config object.
|
|
48
|
+
* Returns a new config object (does not mutate input).
|
|
49
|
+
*/
|
|
50
|
+
export declare function setMcpServerEntry(config: Record<string, unknown>, url: string): Record<string, unknown>;
|
|
51
|
+
/**
|
|
52
|
+
* Format a path for display, replacing home directory with ~
|
|
53
|
+
*/
|
|
54
|
+
export declare function formatPath(filePath: string): string;
|
|
55
|
+
//# sourceMappingURL=claude-paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-paths.d.ts","sourceRoot":"","sources":["../../src/config/claude-paths.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,IAAI,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;A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AAE,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,gBAAgB,CAarD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAU7E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,IAAI,CAWN;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAWrD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,cAAc,GAAG,IAAI,CAYvB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,GAAG,EAAE,MAAM,GACV,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWzB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMnD"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code configuration detection and management.
|
|
3
|
+
* Supports both v2 (~/.claude/settings.json) and legacy (~/.config/claude/mcp.json) paths.
|
|
4
|
+
*/
|
|
5
|
+
import * as fs from "node:fs";
|
|
6
|
+
import * as path from "node:path";
|
|
7
|
+
import * as os from "node:os";
|
|
8
|
+
/**
|
|
9
|
+
* Get the v2 Claude config path (~/.claude/settings.json)
|
|
10
|
+
*/
|
|
11
|
+
export function getV2ConfigPath() {
|
|
12
|
+
return path.join(os.homedir(), ".claude", "settings.json");
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Get the legacy Claude config path (~/.config/claude/mcp.json)
|
|
16
|
+
*/
|
|
17
|
+
export function getLegacyConfigPath() {
|
|
18
|
+
return path.join(os.homedir(), ".config", "claude", "mcp.json");
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Detect which Claude config file exists.
|
|
22
|
+
* Checks v2 first, then legacy. Returns 'none' if neither exists.
|
|
23
|
+
*/
|
|
24
|
+
export function detectClaudeConfig() {
|
|
25
|
+
const v2Path = getV2ConfigPath();
|
|
26
|
+
const legacyPath = getLegacyConfigPath();
|
|
27
|
+
if (fs.existsSync(v2Path)) {
|
|
28
|
+
return { kind: "v2", path: v2Path };
|
|
29
|
+
}
|
|
30
|
+
if (fs.existsSync(legacyPath)) {
|
|
31
|
+
return { kind: "legacy", path: legacyPath };
|
|
32
|
+
}
|
|
33
|
+
return { kind: "none", path: null };
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Safely read and parse a JSON file.
|
|
37
|
+
* Returns null if file doesn't exist or is invalid JSON.
|
|
38
|
+
*/
|
|
39
|
+
export function readJsonFile(filePath) {
|
|
40
|
+
try {
|
|
41
|
+
if (!fs.existsSync(filePath)) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
const content = fs.readFileSync(filePath, "utf-8");
|
|
45
|
+
return JSON.parse(content);
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Write JSON to file atomically (write to temp, then rename).
|
|
53
|
+
* Creates parent directories if needed.
|
|
54
|
+
*/
|
|
55
|
+
export function writeJsonFileAtomic(filePath, data) {
|
|
56
|
+
const dir = path.dirname(filePath);
|
|
57
|
+
if (!fs.existsSync(dir)) {
|
|
58
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
59
|
+
}
|
|
60
|
+
const content = JSON.stringify(data, null, 2) + "\n";
|
|
61
|
+
const tempPath = `${filePath}.tmp.${Date.now()}`;
|
|
62
|
+
fs.writeFileSync(tempPath, content, "utf-8");
|
|
63
|
+
fs.renameSync(tempPath, filePath);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Create a backup of a file with timestamp.
|
|
67
|
+
* Returns the backup path.
|
|
68
|
+
*/
|
|
69
|
+
export function createBackup(filePath) {
|
|
70
|
+
const now = new Date();
|
|
71
|
+
// Format: YYYYMMDDHHMMSS (14 chars)
|
|
72
|
+
const timestamp = now.toISOString().replace(/[-:T]/g, "").slice(0, 14);
|
|
73
|
+
const backupPath = `${filePath}.bak-${timestamp}`;
|
|
74
|
+
if (fs.existsSync(filePath)) {
|
|
75
|
+
fs.copyFileSync(filePath, backupPath);
|
|
76
|
+
}
|
|
77
|
+
return backupPath;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Get the agent-recorder MCP server entry from a config object.
|
|
81
|
+
*/
|
|
82
|
+
export function getMcpServerEntry(config) {
|
|
83
|
+
const mcpServers = config.mcpServers;
|
|
84
|
+
if (!mcpServers || typeof mcpServers !== "object") {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
const entry = mcpServers["agent-recorder"];
|
|
88
|
+
if (!entry || typeof entry !== "object") {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
return entry;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Set the agent-recorder MCP server entry in a config object.
|
|
95
|
+
* Returns a new config object (does not mutate input).
|
|
96
|
+
*/
|
|
97
|
+
export function setMcpServerEntry(config, url) {
|
|
98
|
+
const newConfig = { ...config };
|
|
99
|
+
// Ensure mcpServers exists
|
|
100
|
+
const mcpServers = newConfig.mcpServers || {};
|
|
101
|
+
newConfig.mcpServers = {
|
|
102
|
+
...mcpServers,
|
|
103
|
+
"agent-recorder": { url },
|
|
104
|
+
};
|
|
105
|
+
return newConfig;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Format a path for display, replacing home directory with ~
|
|
109
|
+
*/
|
|
110
|
+
export function formatPath(filePath) {
|
|
111
|
+
const home = os.homedir();
|
|
112
|
+
if (filePath.startsWith(home)) {
|
|
113
|
+
return "~" + filePath.slice(home.length);
|
|
114
|
+
}
|
|
115
|
+
return filePath;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=claude-paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-paths.js","sourceRoot":"","sources":["../../src/config/claude-paths.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAa9B;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;AAC7D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;IACjC,MAAM,UAAU,GAAG,mBAAmB,EAAE,CAAC;IAEzC,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACtC,CAAC;IAED,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAC9C,CA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AO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for Claude config detection module.
|
|
3
|
+
*/
|
|
4
|
+
import { describe, it, expect, beforeEach, afterEach } from "vitest";
|
|
5
|
+
import * as fs from "node:fs";
|
|
6
|
+
import * as path from "node:path";
|
|
7
|
+
import * as os from "node:os";
|
|
8
|
+
import { readJsonFile, writeJsonFileAtomic, createBackup, getMcpServerEntry, setMcpServerEntry, formatPath, } from "./claude-paths.js";
|
|
9
|
+
describe("claude-paths", () => {
|
|
10
|
+
let tempDir;
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "claude-paths-test-"));
|
|
13
|
+
});
|
|
14
|
+
afterEach(() => {
|
|
15
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
16
|
+
});
|
|
17
|
+
describe("readJsonFile", () => {
|
|
18
|
+
it("returns null for non-existent file", () => {
|
|
19
|
+
const result = readJsonFile(path.join(tempDir, "nonexistent.json"));
|
|
20
|
+
expect(result).toBeNull();
|
|
21
|
+
});
|
|
22
|
+
it("reads and parses valid JSON", () => {
|
|
23
|
+
const filePath = path.join(tempDir, "test.json");
|
|
24
|
+
fs.writeFileSync(filePath, '{"key": "value"}');
|
|
25
|
+
const result = readJsonFile(filePath);
|
|
26
|
+
expect(result).toEqual({ key: "value" });
|
|
27
|
+
});
|
|
28
|
+
it("returns null for invalid JSON", () => {
|
|
29
|
+
const filePath = path.join(tempDir, "invalid.json");
|
|
30
|
+
fs.writeFileSync(filePath, "not valid json");
|
|
31
|
+
const result = readJsonFile(filePath);
|
|
32
|
+
expect(result).toBeNull();
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
describe("writeJsonFileAtomic", () => {
|
|
36
|
+
it("writes JSON file with proper formatting", () => {
|
|
37
|
+
const filePath = path.join(tempDir, "output.json");
|
|
38
|
+
writeJsonFileAtomic(filePath, { key: "value", nested: { a: 1 } });
|
|
39
|
+
const content = fs.readFileSync(filePath, "utf-8");
|
|
40
|
+
expect(content).toContain('"key": "value"');
|
|
41
|
+
expect(content).toContain('"nested"');
|
|
42
|
+
expect(content.endsWith("\n")).toBe(true);
|
|
43
|
+
});
|
|
44
|
+
it("creates parent directories if needed", () => {
|
|
45
|
+
const filePath = path.join(tempDir, "nested", "deep", "config.json");
|
|
46
|
+
writeJsonFileAtomic(filePath, { test: true });
|
|
47
|
+
expect(fs.existsSync(filePath)).toBe(true);
|
|
48
|
+
const result = readJsonFile(filePath);
|
|
49
|
+
expect(result).toEqual({ test: true });
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
describe("createBackup", () => {
|
|
53
|
+
it("creates backup with timestamp", () => {
|
|
54
|
+
const filePath = path.join(tempDir, "config.json");
|
|
55
|
+
fs.writeFileSync(filePath, '{"original": true}');
|
|
56
|
+
const backupPath = createBackup(filePath);
|
|
57
|
+
expect(backupPath).toMatch(/config\.json\.bak-\d{14}$/);
|
|
58
|
+
expect(fs.existsSync(backupPath)).toBe(true);
|
|
59
|
+
const backupContent = fs.readFileSync(backupPath, "utf-8");
|
|
60
|
+
expect(backupContent).toBe('{"original": true}');
|
|
61
|
+
});
|
|
62
|
+
it("returns path even if source doesn't exist", () => {
|
|
63
|
+
const filePath = path.join(tempDir, "nonexistent.json");
|
|
64
|
+
const backupPath = createBackup(filePath);
|
|
65
|
+
expect(backupPath).toMatch(/\.bak-\d{14}$/);
|
|
66
|
+
expect(fs.existsSync(backupPath)).toBe(false);
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
describe("getMcpServerEntry", () => {
|
|
70
|
+
it("returns null when mcpServers not present", () => {
|
|
71
|
+
const config = { someOther: "config" };
|
|
72
|
+
expect(getMcpServerEntry(config)).toBeNull();
|
|
73
|
+
});
|
|
74
|
+
it("returns null when agent-recorder entry not present", () => {
|
|
75
|
+
const config = { mcpServers: { other: { url: "http://other" } } };
|
|
76
|
+
expect(getMcpServerEntry(config)).toBeNull();
|
|
77
|
+
});
|
|
78
|
+
it("returns entry when present", () => {
|
|
79
|
+
const config = {
|
|
80
|
+
mcpServers: {
|
|
81
|
+
"agent-recorder": { url: "http://127.0.0.1:8788/" },
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
const entry = getMcpServerEntry(config);
|
|
85
|
+
expect(entry).toEqual({ url: "http://127.0.0.1:8788/" });
|
|
86
|
+
});
|
|
87
|
+
it("returns entry with command config", () => {
|
|
88
|
+
const config = {
|
|
89
|
+
mcpServers: {
|
|
90
|
+
"agent-recorder": {
|
|
91
|
+
command: "node",
|
|
92
|
+
args: ["server.js"],
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
const entry = getMcpServerEntry(config);
|
|
97
|
+
expect(entry).toEqual({ command: "node", args: ["server.js"] });
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
describe("setMcpServerEntry", () => {
|
|
101
|
+
it("adds mcpServers when not present", () => {
|
|
102
|
+
const config = { existing: "value" };
|
|
103
|
+
const result = setMcpServerEntry(config, "http://127.0.0.1:8788/");
|
|
104
|
+
expect(result).toEqual({
|
|
105
|
+
existing: "value",
|
|
106
|
+
mcpServers: {
|
|
107
|
+
"agent-recorder": { url: "http://127.0.0.1:8788/" },
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
it("preserves existing mcpServers entries", () => {
|
|
112
|
+
const config = {
|
|
113
|
+
mcpServers: {
|
|
114
|
+
other: { url: "http://other" },
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
const result = setMcpServerEntry(config, "http://127.0.0.1:8788/");
|
|
118
|
+
expect(result.mcpServers).toEqual({
|
|
119
|
+
other: { url: "http://other" },
|
|
120
|
+
"agent-recorder": { url: "http://127.0.0.1:8788/" },
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
it("updates existing agent-recorder entry", () => {
|
|
124
|
+
const config = {
|
|
125
|
+
mcpServers: {
|
|
126
|
+
"agent-recorder": { url: "http://old-url/" },
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
const result = setMcpServerEntry(config, "http://127.0.0.1:8788/");
|
|
130
|
+
expect(result.mcpServers).toEqual({
|
|
131
|
+
"agent-recorder": { url: "http://127.0.0.1:8788/" },
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
it("does not mutate original config", () => {
|
|
135
|
+
const config = { existing: "value" };
|
|
136
|
+
setMcpServerEntry(config, "http://127.0.0.1:8788/");
|
|
137
|
+
expect(config).toEqual({ existing: "value" });
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
describe("formatPath", () => {
|
|
141
|
+
it("replaces home directory with ~", () => {
|
|
142
|
+
const home = os.homedir();
|
|
143
|
+
const result = formatPath(`${home}/some/path`);
|
|
144
|
+
expect(result).toBe("~/some/path");
|
|
145
|
+
});
|
|
146
|
+
it("leaves other paths unchanged", () => {
|
|
147
|
+
const result = formatPath("/usr/local/bin");
|
|
148
|
+
expect(result).toBe("/usr/local/bin");
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
//# sourceMappingURL=claude-paths.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-paths.test.d.ts","sourceRoot":"","sources":["../../src/config/claude-paths.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-paths.test.d.ts","sourceRoot":"","sources":["../../src/config/claude-paths.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|