@creativeintelligence/abbie 0.1.3 → 0.1.5
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/dist/cli/commands/start.js +2 -1
- package/oclif.manifest.json +1 -1
- package/package.json +13 -7
- package/dist/cli/base-command.d.ts.map +0 -1
- package/dist/cli/commands/agent/list.d.ts.map +0 -1
- package/dist/cli/commands/annotation/ack.d.ts.map +0 -1
- package/dist/cli/commands/annotation/create.d.ts.map +0 -1
- package/dist/cli/commands/annotation/events.d.ts.map +0 -1
- package/dist/cli/commands/annotation/export.d.ts.map +0 -1
- package/dist/cli/commands/annotation/import.d.ts.map +0 -1
- package/dist/cli/commands/annotation/ingest.d.ts.map +0 -1
- package/dist/cli/commands/annotation/list.d.ts.map +0 -1
- package/dist/cli/commands/annotation/reply.d.ts.map +0 -1
- package/dist/cli/commands/annotation/resolve.d.ts.map +0 -1
- package/dist/cli/commands/auto/index.d.ts.map +0 -1
- package/dist/cli/commands/backlog/add.d.ts.map +0 -1
- package/dist/cli/commands/backlog/claim.d.ts.map +0 -1
- package/dist/cli/commands/backlog/complete.d.ts.map +0 -1
- package/dist/cli/commands/backlog/list.d.ts.map +0 -1
- package/dist/cli/commands/backlog/pick.d.ts.map +0 -1
- package/dist/cli/commands/backlog/sync.d.ts.map +0 -1
- package/dist/cli/commands/bootstrap.d.ts.map +0 -1
- package/dist/cli/commands/bridge.d.ts.map +0 -1
- package/dist/cli/commands/context/inject.d.ts.map +0 -1
- package/dist/cli/commands/context/list.d.ts.map +0 -1
- package/dist/cli/commands/context/publish.d.ts.map +0 -1
- package/dist/cli/commands/context/read.d.ts.map +0 -1
- package/dist/cli/commands/daemon.d.ts.map +0 -1
- package/dist/cli/commands/digest/index.d.ts.map +0 -1
- package/dist/cli/commands/docs/lint.d.ts.map +0 -1
- package/dist/cli/commands/docs/sync.d.ts.map +0 -1
- package/dist/cli/commands/doctor.d.ts.map +0 -1
- package/dist/cli/commands/find/index.d.ts.map +0 -1
- package/dist/cli/commands/gc.d.ts.map +0 -1
- package/dist/cli/commands/history/index.d.ts.map +0 -1
- package/dist/cli/commands/hooks/guard.d.ts.map +0 -1
- package/dist/cli/commands/hooks/list.d.ts.map +0 -1
- package/dist/cli/commands/hooks/lock.d.ts.map +0 -1
- package/dist/cli/commands/hooks/status.d.ts.map +0 -1
- package/dist/cli/commands/hooks/test.d.ts.map +0 -1
- package/dist/cli/commands/hooks/unlock.d.ts.map +0 -1
- package/dist/cli/commands/index.d.ts.map +0 -1
- package/dist/cli/commands/list.d.ts.map +0 -1
- package/dist/cli/commands/list.e2e.test.d.ts +0 -1
- package/dist/cli/commands/list.e2e.test.js +0 -47
- package/dist/cli/commands/login.d.ts.map +0 -1
- package/dist/cli/commands/logout.d.ts.map +0 -1
- package/dist/cli/commands/panes/broker.d.ts.map +0 -1
- package/dist/cli/commands/panes/pipe-sink.d.ts.map +0 -1
- package/dist/cli/commands/panes/snapshot.d.ts.map +0 -1
- package/dist/cli/commands/plan.d.ts.map +0 -1
- package/dist/cli/commands/plan.e2e.test.d.ts +0 -1
- package/dist/cli/commands/plan.e2e.test.js +0 -74
- package/dist/cli/commands/preview/index.d.ts.map +0 -1
- package/dist/cli/commands/preview/init.d.ts.map +0 -1
- package/dist/cli/commands/preview/list.d.ts.map +0 -1
- package/dist/cli/commands/preview/status.d.ts.map +0 -1
- package/dist/cli/commands/preview/stop.d.ts.map +0 -1
- package/dist/cli/commands/preview/sync.d.ts.map +0 -1
- package/dist/cli/commands/preview/watch.d.ts.map +0 -1
- package/dist/cli/commands/project/add.d.ts.map +0 -1
- package/dist/cli/commands/project/list.d.ts.map +0 -1
- package/dist/cli/commands/project/remove.d.ts.map +0 -1
- package/dist/cli/commands/push.d.ts.map +0 -1
- package/dist/cli/commands/reference/add.d.ts.map +0 -1
- package/dist/cli/commands/reference/delete.d.ts.map +0 -1
- package/dist/cli/commands/reference/extract.d.ts.map +0 -1
- package/dist/cli/commands/reference/list.d.ts.map +0 -1
- package/dist/cli/commands/reference/normalize.d.ts.map +0 -1
- package/dist/cli/commands/reference/open.d.ts.map +0 -1
- package/dist/cli/commands/reference/save.d.ts.map +0 -1
- package/dist/cli/commands/reference/search.d.ts.map +0 -1
- package/dist/cli/commands/reference/show.d.ts.map +0 -1
- package/dist/cli/commands/reference/update-index.d.ts.map +0 -1
- package/dist/cli/commands/reference/update.d.ts.map +0 -1
- package/dist/cli/commands/report/blocked.d.ts.map +0 -1
- package/dist/cli/commands/report/complete.d.ts.map +0 -1
- package/dist/cli/commands/report/progress.d.ts.map +0 -1
- package/dist/cli/commands/report/start.d.ts.map +0 -1
- package/dist/cli/commands/resource/acquire.d.ts.map +0 -1
- package/dist/cli/commands/resource/list.d.ts.map +0 -1
- package/dist/cli/commands/resource/release.d.ts.map +0 -1
- package/dist/cli/commands/resource/wait.d.ts.map +0 -1
- package/dist/cli/commands/review.d.ts.map +0 -1
- package/dist/cli/commands/session/attach.d.ts.map +0 -1
- package/dist/cli/commands/session/await.d.ts.map +0 -1
- package/dist/cli/commands/session/complete.d.ts.map +0 -1
- package/dist/cli/commands/session/create.d.ts.map +0 -1
- package/dist/cli/commands/session/heartbeat.d.ts.map +0 -1
- package/dist/cli/commands/session/list.d.ts.map +0 -1
- package/dist/cli/commands/session/mark-done.d.ts.map +0 -1
- package/dist/cli/commands/session/mine.d.ts.map +0 -1
- package/dist/cli/commands/session/replay.d.ts.map +0 -1
- package/dist/cli/commands/session/run.d.ts.map +0 -1
- package/dist/cli/commands/session/show.d.ts.map +0 -1
- package/dist/cli/commands/session/start.d.ts.map +0 -1
- package/dist/cli/commands/session/state/cleanup.d.ts.map +0 -1
- package/dist/cli/commands/session/state/end.d.ts.map +0 -1
- package/dist/cli/commands/session/state/get.d.ts.map +0 -1
- package/dist/cli/commands/session/state/init.d.ts.map +0 -1
- package/dist/cli/commands/session/state/list.d.ts.map +0 -1
- package/dist/cli/commands/session/state/update.d.ts.map +0 -1
- package/dist/cli/commands/session/stop.d.ts.map +0 -1
- package/dist/cli/commands/session/view.d.ts.map +0 -1
- package/dist/cli/commands/start.d.ts.map +0 -1
- package/dist/cli/commands/state/dump.d.ts.map +0 -1
- package/dist/cli/commands/status.d.ts.map +0 -1
- package/dist/cli/commands/sync.d.ts.map +0 -1
- package/dist/cli/commands/trace/export.d.ts.map +0 -1
- package/dist/cli/commands/triage/claim.d.ts.map +0 -1
- package/dist/cli/commands/triage/list.d.ts.map +0 -1
- package/dist/cli/commands/triage/next.d.ts.map +0 -1
- package/dist/cli/commands/triage/pull.d.ts.map +0 -1
- package/dist/cli/commands/triage/stats.d.ts.map +0 -1
- package/dist/cli/commands/tunnel/list.d.ts.map +0 -1
- package/dist/cli/commands/tunnel/start.d.ts.map +0 -1
- package/dist/cli/commands/tunnel/stop.d.ts.map +0 -1
- package/dist/cli/commands/tunnel/url.d.ts.map +0 -1
- package/dist/cli/commands/web/start.d.ts.map +0 -1
- package/dist/cli/commands/windows/context.d.ts.map +0 -1
- package/dist/cli/commands/windows/focus.d.ts.map +0 -1
- package/dist/cli/commands/windows/list.d.ts.map +0 -1
- package/dist/cli/commands/windows/map.d.ts.map +0 -1
- package/dist/cli/commands/windows/read.d.ts.map +0 -1
- package/dist/cli/commands/windows/search.d.ts.map +0 -1
- package/dist/cli/commands/windows/show.d.ts.map +0 -1
- package/dist/cli/commands/windows/watch.d.ts.map +0 -1
- package/dist/lib/active-sessions.d.ts.map +0 -1
- package/dist/lib/agent-adapters.d.ts.map +0 -1
- package/dist/lib/agent-sessions.d.ts.map +0 -1
- package/dist/lib/agent-trace.d.ts.map +0 -1
- package/dist/lib/analytics.d.ts.map +0 -1
- package/dist/lib/annotations-convex.d.ts.map +0 -1
- package/dist/lib/annotations.d.ts.map +0 -1
- package/dist/lib/auto/discover.d.ts.map +0 -1
- package/dist/lib/auto/ideate.d.ts.map +0 -1
- package/dist/lib/auto/spawn.d.ts.map +0 -1
- package/dist/lib/auto/workspace.d.ts.map +0 -1
- package/dist/lib/backlog.d.ts.map +0 -1
- package/dist/lib/backlog.test.d.ts +0 -1
- package/dist/lib/backlog.test.js +0 -162
- package/dist/lib/config-loader.d.ts.map +0 -1
- package/dist/lib/config-sync/adapters/claude.d.ts.map +0 -1
- package/dist/lib/config-sync/adapters/codex.d.ts.map +0 -1
- package/dist/lib/config-sync/adapters/copilot.d.ts.map +0 -1
- package/dist/lib/config-sync/adapters/gemini.d.ts.map +0 -1
- package/dist/lib/config-sync/adapters/index.d.ts.map +0 -1
- package/dist/lib/config-sync/adapters/opencode.d.ts.map +0 -1
- package/dist/lib/config-sync/index.d.ts.map +0 -1
- package/dist/lib/config-sync/types.d.ts.map +0 -1
- package/dist/lib/config-sync/writer.d.ts.map +0 -1
- package/dist/lib/content-sync/index.d.ts.map +0 -1
- package/dist/lib/content-sync/types.d.ts.map +0 -1
- package/dist/lib/contracts.d.ts.map +0 -1
- package/dist/lib/convex.d.ts.map +0 -1
- package/dist/lib/device.d.ts.map +0 -1
- package/dist/lib/digest/index.d.ts.map +0 -1
- package/dist/lib/docs/lint.d.ts.map +0 -1
- package/dist/lib/docs/lint.test.d.ts +0 -1
- package/dist/lib/docs/lint.test.js +0 -120
- package/dist/lib/docs/sync.d.ts.map +0 -1
- package/dist/lib/doctor/index.d.ts.map +0 -1
- package/dist/lib/doctor/repos.d.ts.map +0 -1
- package/dist/lib/doctor/templates.d.ts.map +0 -1
- package/dist/lib/errors.d.ts.map +0 -1
- package/dist/lib/events.d.ts.map +0 -1
- package/dist/lib/heartbeat.d.ts.map +0 -1
- package/dist/lib/heartbeat.test.d.ts +0 -1
- package/dist/lib/heartbeat.test.js +0 -124
- package/dist/lib/hooks/adapters/claude.d.ts.map +0 -1
- package/dist/lib/hooks/adapters/codex.d.ts.map +0 -1
- package/dist/lib/hooks/adapters/copilot.d.ts.map +0 -1
- package/dist/lib/hooks/context.d.ts.map +0 -1
- package/dist/lib/hooks/index.d.ts.map +0 -1
- package/dist/lib/hooks/registry.d.ts.map +0 -1
- package/dist/lib/hooks/runner.d.ts.map +0 -1
- package/dist/lib/hooks/types.d.ts.map +0 -1
- package/dist/lib/index.test.d.ts +0 -1
- package/dist/lib/index.test.js +0 -334
- package/dist/lib/managed-session.d.ts.map +0 -1
- package/dist/lib/math.d.ts.map +0 -1
- package/dist/lib/math.test.d.ts +0 -1
- package/dist/lib/math.test.js +0 -238
- package/dist/lib/ngrok.d.ts.map +0 -1
- package/dist/lib/nvim/discovery.d.ts.map +0 -1
- package/dist/lib/nvim/discovery.test.d.ts +0 -1
- package/dist/lib/nvim/discovery.test.js +0 -131
- package/dist/lib/nvim/index.d.ts.map +0 -1
- package/dist/lib/nvim/remote.d.ts.map +0 -1
- package/dist/lib/nvim/remote.test.d.ts +0 -1
- package/dist/lib/nvim/remote.test.js +0 -18
- package/dist/lib/panes/broker.d.ts.map +0 -1
- package/dist/lib/panes/index.d.ts.map +0 -1
- package/dist/lib/panes/server.d.ts.map +0 -1
- package/dist/lib/preview/detect.d.ts.map +0 -1
- package/dist/lib/preview/index.d.ts.map +0 -1
- package/dist/lib/preview/manager.d.ts.map +0 -1
- package/dist/lib/preview/schema.d.ts.map +0 -1
- package/dist/lib/preview/sprite.d.ts.map +0 -1
- package/dist/lib/preview/watcher.d.ts.map +0 -1
- package/dist/lib/process/index.d.ts.map +0 -1
- package/dist/lib/process/snapshot.d.ts.map +0 -1
- package/dist/lib/process/snapshot.test.d.ts +0 -1
- package/dist/lib/process/snapshot.test.js +0 -127
- package/dist/lib/project-identity.d.ts.map +0 -1
- package/dist/lib/provider-auth.d.ts.map +0 -1
- package/dist/lib/references.d.ts.map +0 -1
- package/dist/lib/report.d.ts.map +0 -1
- package/dist/lib/resources.d.ts.map +0 -1
- package/dist/lib/resources.test.d.ts +0 -1
- package/dist/lib/resources.test.js +0 -94
- package/dist/lib/runner.d.ts.map +0 -1
- package/dist/lib/runner.test.d.ts +0 -1
- package/dist/lib/runner.test.js +0 -234
- package/dist/lib/session-artifacts.d.ts.map +0 -1
- package/dist/lib/session-manager.d.ts.map +0 -1
- package/dist/lib/session-manager.test.d.ts +0 -1
- package/dist/lib/session-manager.test.js +0 -310
- package/dist/lib/session-result.d.ts.map +0 -1
- package/dist/lib/session-state.d.ts.map +0 -1
- package/dist/lib/slack-workspace.d.ts.map +0 -1
- package/dist/lib/tmux/bridge.d.ts.map +0 -1
- package/dist/lib/tmux/context.d.ts.map +0 -1
- package/dist/lib/tmux/context.test.d.ts +0 -1
- package/dist/lib/tmux/context.test.js +0 -215
- package/dist/lib/tmux/index.d.ts.map +0 -1
- package/dist/lib/tmux/map.d.ts.map +0 -1
- package/dist/lib/tmux/map.test.d.ts +0 -1
- package/dist/lib/tmux/map.test.js +0 -80
- package/dist/lib/tmux/panes.d.ts.map +0 -1
- package/dist/lib/tmux/redaction.d.ts.map +0 -1
- package/dist/lib/tmux/redaction.test.d.ts +0 -1
- package/dist/lib/tmux/redaction.test.js +0 -183
- package/dist/lib/triage-llm.d.ts.map +0 -1
- package/dist/lib/triage-tracker.d.ts.map +0 -1
- package/dist/lib/triage.d.ts.map +0 -1
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/windows/index.d.ts.map +0 -1
- package/dist/lib/windows/inventory.d.ts.map +0 -1
- package/dist/lib/windows/inventory.test.d.ts +0 -1
- package/dist/lib/windows/inventory.test.js +0 -292
- package/dist/lib/windows/types.d.ts.map +0 -1
- package/dist/lib.d.ts.map +0 -1
- package/dist/web/app/@overlay/default.d.ts +0 -1
- package/dist/web/app/@overlay/default.js +0 -3
- package/dist/web/app/about/page.d.ts +0 -1
- package/dist/web/app/about/page.js +0 -6
- package/dist/web/app/layout.d.ts +0 -7
- package/dist/web/app/layout.js +0 -19
- package/dist/web/app/page.d.ts +0 -1
- package/dist/web/app/page.js +0 -38
- package/dist/web/app/settings/page.d.ts +0 -1
- package/dist/web/app/settings/page.js +0 -6
- package/dist/web/app/shortcuts/page.d.ts +0 -1
- package/dist/web/app/shortcuts/page.js +0 -6
- package/dist/web/atoms/sidebar.d.ts +0 -16
- package/dist/web/atoms/sidebar.js +0 -58
- package/dist/web/atoms/state.d.ts +0 -24
- package/dist/web/atoms/state.js +0 -43
- package/dist/web/components/command-palette.d.ts +0 -6
- package/dist/web/components/command-palette.js +0 -297
- package/dist/web/components/main-view.d.ts +0 -1
- package/dist/web/components/main-view.js +0 -93
- package/dist/web/components/overlay/page-overlay.d.ts +0 -16
- package/dist/web/components/overlay/page-overlay.js +0 -84
- package/dist/web/components/pane-view.d.ts +0 -5
- package/dist/web/components/pane-view.js +0 -168
- package/dist/web/components/project-files-view.d.ts +0 -6
- package/dist/web/components/project-files-view.js +0 -205
- package/dist/web/components/project-planning-view.d.ts +0 -6
- package/dist/web/components/project-planning-view.js +0 -146
- package/dist/web/components/session-view.d.ts +0 -6
- package/dist/web/components/session-view.js +0 -211
- package/dist/web/components/sessions-list-view.d.ts +0 -1
- package/dist/web/components/sessions-list-view.js +0 -118
- package/dist/web/components/sidebar/index.d.ts +0 -9
- package/dist/web/components/sidebar/index.js +0 -29
- package/dist/web/components/sidebar/kbd.d.ts +0 -17
- package/dist/web/components/sidebar/kbd.js +0 -47
- package/dist/web/components/sidebar/nav-group.d.ts +0 -22
- package/dist/web/components/sidebar/nav-group.js +0 -43
- package/dist/web/components/sidebar/nav-item.d.ts +0 -17
- package/dist/web/components/sidebar/nav-item.js +0 -38
- package/dist/web/components/sidebar/sidebar-header.d.ts +0 -9
- package/dist/web/components/sidebar/sidebar-header.js +0 -18
- package/dist/web/components/sidebar/sidebar-nav.d.ts +0 -7
- package/dist/web/components/sidebar/sidebar-nav.js +0 -505
- package/dist/web/components/sidebar/sidebar-search.d.ts +0 -7
- package/dist/web/components/sidebar/sidebar-search.js +0 -18
- package/dist/web/components/sidebar/sidebar-settings.d.ts +0 -4
- package/dist/web/components/sidebar/sidebar-settings.js +0 -28
- package/dist/web/components/sidebar/sidebar-transition.d.ts +0 -12
- package/dist/web/components/sidebar/sidebar-transition.js +0 -58
- package/dist/web/components/status-bar.d.ts +0 -1
- package/dist/web/components/status-bar.js +0 -53
- package/dist/web/components/terminal.d.ts +0 -4
- package/dist/web/components/terminal.js +0 -324
- package/dist/web/components/toast.d.ts +0 -7
- package/dist/web/components/toast.js +0 -72
- package/dist/web/hooks/use-keybindings.d.ts +0 -30
- package/dist/web/hooks/use-keybindings.js +0 -322
- package/dist/web/hooks/use-state.d.ts +0 -11
- package/dist/web/hooks/use-state.js +0 -84
- package/dist/web/lib/api.d.ts +0 -179
- package/dist/web/lib/api.js +0 -79
- package/dist/web/lib/paths.d.ts +0 -2
- package/dist/web/lib/paths.js +0 -26
- package/dist/web/lib/utils.d.ts +0 -2
- package/dist/web/lib/utils.js +0 -5
- package/dist/web/lib/ws.d.ts +0 -18
- package/dist/web/lib/ws.js +0 -138
- package/dist/web/next.config.d.ts +0 -3
- package/dist/web/next.config.js +0 -9
- package/scripts/generate-manifest.ts +0 -44
- package/src/cli/base-command.ts +0 -233
- package/src/cli/commands/__tests__/annotations.test.ts +0 -704
- package/src/cli/commands/__tests__/bridge.test.ts +0 -101
- package/src/cli/commands/__tests__/daemon.test.ts +0 -79
- package/src/cli/commands/agent/list.ts +0 -75
- package/src/cli/commands/annotation/ack.ts +0 -37
- package/src/cli/commands/annotation/create.ts +0 -67
- package/src/cli/commands/annotation/events.ts +0 -63
- package/src/cli/commands/annotation/export.ts +0 -67
- package/src/cli/commands/annotation/import.ts +0 -98
- package/src/cli/commands/annotation/ingest.ts +0 -112
- package/src/cli/commands/annotation/list.ts +0 -57
- package/src/cli/commands/annotation/reply.ts +0 -46
- package/src/cli/commands/annotation/resolve.ts +0 -37
- package/src/cli/commands/auto/index.ts +0 -755
- package/src/cli/commands/backlog/add.ts +0 -74
- package/src/cli/commands/backlog/claim.ts +0 -53
- package/src/cli/commands/backlog/complete.ts +0 -51
- package/src/cli/commands/backlog/list.ts +0 -107
- package/src/cli/commands/backlog/pick.ts +0 -50
- package/src/cli/commands/backlog/sync.ts +0 -131
- package/src/cli/commands/bootstrap.ts +0 -205
- package/src/cli/commands/bridge.ts +0 -233
- package/src/cli/commands/context/inject.ts +0 -103
- package/src/cli/commands/context/list.ts +0 -112
- package/src/cli/commands/context/publish.ts +0 -83
- package/src/cli/commands/context/read.ts +0 -85
- package/src/cli/commands/daemon.ts +0 -1809
- package/src/cli/commands/digest/index.ts +0 -245
- package/src/cli/commands/docs/lint.ts +0 -93
- package/src/cli/commands/docs/sync.ts +0 -90
- package/src/cli/commands/doctor.ts +0 -267
- package/src/cli/commands/find/index.ts +0 -313
- package/src/cli/commands/history/index.ts +0 -269
- package/src/cli/commands/hooks/guard.ts +0 -71
- package/src/cli/commands/hooks/list.ts +0 -139
- package/src/cli/commands/hooks/lock.ts +0 -47
- package/src/cli/commands/hooks/status.ts +0 -56
- package/src/cli/commands/hooks/test.ts +0 -190
- package/src/cli/commands/hooks/unlock.ts +0 -56
- package/src/cli/commands/list.e2e.test.ts +0 -58
- package/src/cli/commands/list.ts +0 -96
- package/src/cli/commands/login.ts +0 -236
- package/src/cli/commands/logout.ts +0 -45
- package/src/cli/commands/panes/broker.ts +0 -68
- package/src/cli/commands/panes/pipe-sink.ts +0 -101
- package/src/cli/commands/panes/snapshot.ts +0 -156
- package/src/cli/commands/plan.e2e.test.ts +0 -90
- package/src/cli/commands/plan.ts +0 -68
- package/src/cli/commands/preview/index.ts +0 -282
- package/src/cli/commands/preview/list.ts +0 -116
- package/src/cli/commands/preview/status.ts +0 -137
- package/src/cli/commands/preview/stop.ts +0 -165
- package/src/cli/commands/project/add.ts +0 -110
- package/src/cli/commands/project/list.ts +0 -136
- package/src/cli/commands/project/remove.ts +0 -60
- package/src/cli/commands/push.ts +0 -115
- package/src/cli/commands/reference/add.ts +0 -266
- package/src/cli/commands/reference/delete.ts +0 -67
- package/src/cli/commands/reference/extract.ts +0 -389
- package/src/cli/commands/reference/list.ts +0 -117
- package/src/cli/commands/reference/normalize.ts +0 -90
- package/src/cli/commands/reference/open.ts +0 -92
- package/src/cli/commands/reference/save.ts +0 -103
- package/src/cli/commands/reference/search.ts +0 -85
- package/src/cli/commands/reference/show.ts +0 -174
- package/src/cli/commands/reference/update-index.ts +0 -103
- package/src/cli/commands/reference/update.ts +0 -136
- package/src/cli/commands/report/blocked.ts +0 -165
- package/src/cli/commands/report/complete.ts +0 -179
- package/src/cli/commands/report/progress.ts +0 -142
- package/src/cli/commands/report/start.ts +0 -140
- package/src/cli/commands/resource/acquire.ts +0 -116
- package/src/cli/commands/resource/list.ts +0 -77
- package/src/cli/commands/resource/release.ts +0 -64
- package/src/cli/commands/resource/wait.ts +0 -93
- package/src/cli/commands/review.ts +0 -105
- package/src/cli/commands/session/attach.ts +0 -200
- package/src/cli/commands/session/await.ts +0 -83
- package/src/cli/commands/session/complete.ts +0 -100
- package/src/cli/commands/session/create.ts +0 -92
- package/src/cli/commands/session/heartbeat.ts +0 -63
- package/src/cli/commands/session/list.ts +0 -281
- package/src/cli/commands/session/mark-done.ts +0 -132
- package/src/cli/commands/session/mine.ts +0 -189
- package/src/cli/commands/session/replay.ts +0 -659
- package/src/cli/commands/session/run.ts +0 -44
- package/src/cli/commands/session/show.ts +0 -177
- package/src/cli/commands/session/start.ts +0 -580
- package/src/cli/commands/session/state/cleanup.ts +0 -61
- package/src/cli/commands/session/state/end.ts +0 -47
- package/src/cli/commands/session/state/get.ts +0 -65
- package/src/cli/commands/session/state/init.ts +0 -50
- package/src/cli/commands/session/state/list.ts +0 -68
- package/src/cli/commands/session/state/update.ts +0 -108
- package/src/cli/commands/session/stop.ts +0 -134
- package/src/cli/commands/session/view.ts +0 -186
- package/src/cli/commands/start.ts +0 -256
- package/src/cli/commands/state/dump.ts +0 -449
- package/src/cli/commands/status.ts +0 -244
- package/src/cli/commands/sync.ts +0 -174
- package/src/cli/commands/trace/export.ts +0 -255
- package/src/cli/commands/triage/claim.ts +0 -203
- package/src/cli/commands/triage/list.ts +0 -137
- package/src/cli/commands/triage/next.ts +0 -73
- package/src/cli/commands/triage/pull.ts +0 -97
- package/src/cli/commands/triage/stats.ts +0 -82
- package/src/cli/commands/tunnel/list.ts +0 -113
- package/src/cli/commands/tunnel/start.ts +0 -122
- package/src/cli/commands/tunnel/stop.ts +0 -108
- package/src/cli/commands/tunnel/url.ts +0 -82
- package/src/cli/commands/web/start.ts +0 -125
- package/src/cli/commands/windows/context.ts +0 -439
- package/src/cli/commands/windows/focus.ts +0 -130
- package/src/cli/commands/windows/list.ts +0 -213
- package/src/cli/commands/windows/map.ts +0 -223
- package/src/cli/commands/windows/read.ts +0 -279
- package/src/cli/commands/windows/search.ts +0 -219
- package/src/cli/commands/windows/show.ts +0 -188
- package/src/cli/commands/windows/watch.ts +0 -262
- package/src/lib/__tests__/annotations-convex.test.ts +0 -104
- package/src/lib/active-sessions.ts +0 -1486
- package/src/lib/agent-adapters.ts +0 -412
- package/src/lib/agent-sessions.ts +0 -671
- package/src/lib/agent-trace.test.ts +0 -296
- package/src/lib/agent-trace.ts +0 -513
- package/src/lib/analytics.ts +0 -178
- package/src/lib/annotations-convex.ts +0 -296
- package/src/lib/annotations.test.ts +0 -274
- package/src/lib/annotations.ts +0 -836
- package/src/lib/auto/discover.ts +0 -545
- package/src/lib/auto/ideate.ts +0 -412
- package/src/lib/auto/spawn.ts +0 -549
- package/src/lib/auto/workspace.ts +0 -282
- package/src/lib/backlog.test.ts +0 -194
- package/src/lib/backlog.ts +0 -428
- package/src/lib/config-loader.ts +0 -391
- package/src/lib/config-sync/adapters/claude.ts +0 -91
- package/src/lib/config-sync/adapters/codex.ts +0 -135
- package/src/lib/config-sync/adapters/copilot.ts +0 -98
- package/src/lib/config-sync/adapters/gemini.ts +0 -86
- package/src/lib/config-sync/adapters/index.ts +0 -39
- package/src/lib/config-sync/adapters/opencode.ts +0 -94
- package/src/lib/config-sync/index.ts +0 -399
- package/src/lib/config-sync/types.ts +0 -92
- package/src/lib/config-sync/writer.ts +0 -188
- package/src/lib/content-sync/index.ts +0 -882
- package/src/lib/content-sync/types.ts +0 -104
- package/src/lib/contracts.test.ts +0 -186
- package/src/lib/contracts.ts +0 -195
- package/src/lib/convex.ts +0 -54
- package/src/lib/device.ts +0 -41
- package/src/lib/digest/index.ts +0 -529
- package/src/lib/docs/lint.test.ts +0 -135
- package/src/lib/docs/lint.ts +0 -310
- package/src/lib/docs/sync.ts +0 -184
- package/src/lib/doctor/index.ts +0 -647
- package/src/lib/doctor/repos.ts +0 -381
- package/src/lib/doctor/templates.ts +0 -191
- package/src/lib/errors.ts +0 -111
- package/src/lib/events.ts +0 -479
- package/src/lib/heartbeat.test.ts +0 -164
- package/src/lib/heartbeat.ts +0 -326
- package/src/lib/hooks/adapters/claude.ts +0 -115
- package/src/lib/hooks/adapters/codex.ts +0 -92
- package/src/lib/hooks/adapters/copilot.ts +0 -141
- package/src/lib/hooks/context.ts +0 -174
- package/src/lib/hooks/index.ts +0 -39
- package/src/lib/hooks/registry.ts +0 -101
- package/src/lib/hooks/runner.ts +0 -208
- package/src/lib/hooks/types.ts +0 -89
- package/src/lib/index.test.ts +0 -426
- package/src/lib/managed-session.ts +0 -117
- package/src/lib/math.test.ts +0 -299
- package/src/lib/math.ts +0 -120
- package/src/lib/ngrok.ts +0 -441
- package/src/lib/nvim/discovery.test.ts +0 -157
- package/src/lib/nvim/discovery.ts +0 -181
- package/src/lib/nvim/index.ts +0 -28
- package/src/lib/nvim/remote.test.ts +0 -21
- package/src/lib/nvim/remote.ts +0 -184
- package/src/lib/panes/README.md +0 -20
- package/src/lib/panes/broker.ts +0 -261
- package/src/lib/panes/index.ts +0 -1
- package/src/lib/panes/server.ts +0 -379
- package/src/lib/preview/detect.ts +0 -184
- package/src/lib/preview/index.ts +0 -1
- package/src/lib/process/index.ts +0 -16
- package/src/lib/process/snapshot.test.ts +0 -188
- package/src/lib/process/snapshot.ts +0 -257
- package/src/lib/provider-auth.ts +0 -258
- package/src/lib/references.ts +0 -481
- package/src/lib/report.ts +0 -973
- package/src/lib/resources.test.ts +0 -132
- package/src/lib/resources.ts +0 -429
- package/src/lib/runner.test.ts +0 -288
- package/src/lib/runner.ts +0 -1223
- package/src/lib/session-artifacts.test.ts +0 -107
- package/src/lib/session-artifacts.ts +0 -193
- package/src/lib/session-manager.test.ts +0 -402
- package/src/lib/session-manager.ts +0 -150
- package/src/lib/session-result.test.ts +0 -98
- package/src/lib/session-result.ts +0 -262
- package/src/lib/session-state.ts +0 -470
- package/src/lib/slack-workspace.ts +0 -25
- package/src/lib/tmux/bridge.ts +0 -439
- package/src/lib/tmux/context.test.ts +0 -242
- package/src/lib/tmux/context.ts +0 -380
- package/src/lib/tmux/index.ts +0 -46
- package/src/lib/tmux/map.test.ts +0 -99
- package/src/lib/tmux/map.ts +0 -252
- package/src/lib/tmux/panes.ts +0 -170
- package/src/lib/tmux/redaction.test.ts +0 -231
- package/src/lib/tmux/redaction.ts +0 -201
- package/src/lib/triage-llm.ts +0 -312
- package/src/lib/triage-tracker.ts +0 -400
- package/src/lib/triage.ts +0 -655
- package/src/lib/types.ts +0 -61
- package/src/lib/windows/index.ts +0 -2
- package/src/lib/windows/inventory.test.ts +0 -370
- package/src/lib/windows/inventory.ts +0 -352
- package/src/lib/windows/types.ts +0 -46
- package/src/lib.ts +0 -260
package/src/lib/index.test.ts
DELETED
|
@@ -1,426 +0,0 @@
|
|
|
1
|
-
import { afterAll, beforeAll, beforeEach, describe, expect, it, spyOn } from "bun:test";
|
|
2
|
-
import { mkdirSync, mkdtempSync, rmSync, utimesSync, writeFileSync } from "node:fs";
|
|
3
|
-
import * as os from "node:os";
|
|
4
|
-
import { dirname, join } from "node:path";
|
|
5
|
-
|
|
6
|
-
const testHome = mkdtempSync(join(os.tmpdir(), "agents-home-"));
|
|
7
|
-
|
|
8
|
-
let mod: typeof import("./agent-sessions");
|
|
9
|
-
let homedirSpy: ReturnType<typeof spyOn> | undefined;
|
|
10
|
-
|
|
11
|
-
const writeJson = (filePath: string, data: Record<string, unknown>): void => {
|
|
12
|
-
mkdirSync(dirname(filePath), { recursive: true });
|
|
13
|
-
writeFileSync(filePath, JSON.stringify(data, null, 2));
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const writeJsonl = (filePath: string, lines: Record<string, unknown>[]): void => {
|
|
17
|
-
mkdirSync(dirname(filePath), { recursive: true });
|
|
18
|
-
writeFileSync(filePath, `${lines.map((line) => JSON.stringify(line)).join("\n")}\n`);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const cleanHome = (): void => {
|
|
22
|
-
rmSync(join(testHome, ".claude"), { recursive: true, force: true });
|
|
23
|
-
rmSync(join(testHome, ".codex"), { recursive: true, force: true });
|
|
24
|
-
rmSync(join(testHome, ".copilot"), { recursive: true, force: true });
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
beforeAll(async () => {
|
|
28
|
-
homedirSpy = spyOn(os, "homedir").mockReturnValue(testHome);
|
|
29
|
-
mod = await import("./agent-sessions");
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
afterAll(() => {
|
|
33
|
-
homedirSpy?.mockRestore();
|
|
34
|
-
cleanHome();
|
|
35
|
-
rmSync(testHome, { recursive: true, force: true });
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
beforeEach(() => {
|
|
39
|
-
cleanHome();
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
describe("agent-sessions", () => {
|
|
43
|
-
it("returns empty list when no sessions exist", () => {
|
|
44
|
-
const miner = new mod.AgentSessionMiner();
|
|
45
|
-
expect(miner.mineAll()).toEqual([]);
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
it("parses claude session files", () => {
|
|
49
|
-
const sessionPath = join(testHome, ".claude", "sessions", "session-1.json");
|
|
50
|
-
writeJson(sessionPath, {
|
|
51
|
-
created_at: "2024-01-01T00:00:00.000Z",
|
|
52
|
-
updated_at: "2024-01-01T01:00:00.000Z",
|
|
53
|
-
project: "arbor",
|
|
54
|
-
summary: "work done",
|
|
55
|
-
files_modified: ["src/a.ts"],
|
|
56
|
-
issue: "ARBOR-1",
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
const miner = new mod.AgentSessionMiner();
|
|
60
|
-
const sessions = miner.mineClaude();
|
|
61
|
-
expect(sessions).toHaveLength(1);
|
|
62
|
-
expect(sessions[0].agent).toBe("claude");
|
|
63
|
-
expect(sessions[0].project).toBe("arbor");
|
|
64
|
-
expect(sessions[0].summary).toBe("work done");
|
|
65
|
-
expect(sessions[0].files_modified).toEqual(["src/a.ts"]);
|
|
66
|
-
expect(sessions[0].issue).toBe("ARBOR-1");
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it("skips malformed claude session files", () => {
|
|
70
|
-
const badPath = join(testHome, ".claude", "sessions", "bad.json");
|
|
71
|
-
mkdirSync(dirname(badPath), { recursive: true });
|
|
72
|
-
writeFileSync(badPath, "{bad json");
|
|
73
|
-
|
|
74
|
-
const okPath = join(testHome, ".claude", "sessions", "ok.json");
|
|
75
|
-
writeJson(okPath, { created_at: "2024-01-01T00:00:00.000Z" });
|
|
76
|
-
|
|
77
|
-
const miner = new mod.AgentSessionMiner();
|
|
78
|
-
const sessions = miner.mineClaude();
|
|
79
|
-
expect(sessions).toHaveLength(1);
|
|
80
|
-
expect(sessions[0].id).toBe("ok");
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
it("extracts issue from claude messages", () => {
|
|
84
|
-
const sessionPath = join(testHome, ".claude", "sessions", "with-msg.json");
|
|
85
|
-
writeJson(sessionPath, {
|
|
86
|
-
created_at: "2024-01-01T00:00:00.000Z",
|
|
87
|
-
messages: [{ content: "working on arbor-123" }],
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
const miner = new mod.AgentSessionMiner();
|
|
91
|
-
const sessions = miner.mineClaude();
|
|
92
|
-
expect(sessions[0].issue).toBe("ARBOR-123");
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
it("filters claude sessions by since date", () => {
|
|
96
|
-
const sessionPath = join(testHome, ".claude", "sessions", "old.json");
|
|
97
|
-
writeJson(sessionPath, { created_at: "2023-01-01T00:00:00.000Z" });
|
|
98
|
-
const oldDate = new Date("2023-01-01T00:00:00.000Z");
|
|
99
|
-
utimesSync(sessionPath, oldDate, oldDate);
|
|
100
|
-
|
|
101
|
-
const miner = new mod.AgentSessionMiner();
|
|
102
|
-
const sessions = miner.mineClaude({ since: new Date("2024-01-01T00:00:00.000Z") });
|
|
103
|
-
expect(sessions).toHaveLength(0);
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
it("filters claude sessions by project", () => {
|
|
107
|
-
writeJson(join(testHome, ".claude", "sessions", "alpha.json"), {
|
|
108
|
-
created_at: "2024-01-01T00:00:00.000Z",
|
|
109
|
-
project: "alpha",
|
|
110
|
-
});
|
|
111
|
-
writeJson(join(testHome, ".claude", "sessions", "beta.json"), {
|
|
112
|
-
created_at: "2024-01-01T00:00:00.000Z",
|
|
113
|
-
project: "beta",
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
const miner = new mod.AgentSessionMiner();
|
|
117
|
-
const sessions = miner.mineClaude({ project: "alpha" });
|
|
118
|
-
expect(sessions).toHaveLength(1);
|
|
119
|
-
expect(sessions[0].project).toBe("alpha");
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
it("parses claude project sessions with project scoping", () => {
|
|
123
|
-
const sessionPath = join(testHome, ".claude", "projects", "koto", "s-1.json");
|
|
124
|
-
writeJson(sessionPath, {
|
|
125
|
-
created_at: "2024-02-01T00:00:00.000Z",
|
|
126
|
-
summary: "project summary",
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
const miner = new mod.AgentSessionMiner();
|
|
130
|
-
const sessions = miner.mineClaude({ project: "koto" });
|
|
131
|
-
expect(sessions).toHaveLength(1);
|
|
132
|
-
expect(sessions[0].project).toBe("koto");
|
|
133
|
-
expect(sessions[0].id).toContain("koto-");
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
it("extracts issue from codex prompt when issue is missing", () => {
|
|
137
|
-
const sessionPath = join(testHome, ".codex", "history", "codex-issue.jsonl");
|
|
138
|
-
writeJsonl(sessionPath, [
|
|
139
|
-
{ timestamp: "2024-03-02T00:00:00.000Z", cwd: "/Users/luke/Developer/webs/webs-xyz" },
|
|
140
|
-
{ prompt: "work on webs-12", timestamp: "2024-03-02T01:00:00.000Z" },
|
|
141
|
-
]);
|
|
142
|
-
|
|
143
|
-
const miner = new mod.AgentSessionMiner();
|
|
144
|
-
const sessions = miner.mineCodex();
|
|
145
|
-
expect(sessions[0].issue).toBe("WEBS-12");
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
it("skips malformed codex lines but still parses sessions", () => {
|
|
149
|
-
const sessionPath = join(testHome, ".codex", "history", "codex-bad.jsonl");
|
|
150
|
-
const lines = [
|
|
151
|
-
JSON.stringify({
|
|
152
|
-
timestamp: "2024-03-03T00:00:00.000Z",
|
|
153
|
-
cwd: "/Users/luke/Developer/arbor/arbor-xyz",
|
|
154
|
-
}),
|
|
155
|
-
"{bad json",
|
|
156
|
-
JSON.stringify({ timestamp: "2024-03-03T02:00:00.000Z", type: "completion", summary: "ok" }),
|
|
157
|
-
];
|
|
158
|
-
mkdirSync(dirname(sessionPath), { recursive: true });
|
|
159
|
-
writeFileSync(sessionPath, `${lines.join("\n")}\n`);
|
|
160
|
-
|
|
161
|
-
const miner = new mod.AgentSessionMiner();
|
|
162
|
-
const sessions = miner.mineCodex();
|
|
163
|
-
expect(sessions).toHaveLength(1);
|
|
164
|
-
expect(sessions[0].summary).toBe("ok");
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
it("ignores empty codex history files", () => {
|
|
168
|
-
const sessionPath = join(testHome, ".codex", "history", "empty.jsonl");
|
|
169
|
-
mkdirSync(dirname(sessionPath), { recursive: true });
|
|
170
|
-
writeFileSync(sessionPath, "");
|
|
171
|
-
|
|
172
|
-
const miner = new mod.AgentSessionMiner();
|
|
173
|
-
const sessions = miner.mineCodex();
|
|
174
|
-
expect(sessions).toHaveLength(0);
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
it("parses codex jsonl sessions with summary, files, commits, and issue", () => {
|
|
178
|
-
const sessionPath = join(testHome, ".codex", "history", "codex-1.jsonl");
|
|
179
|
-
writeJsonl(sessionPath, [
|
|
180
|
-
{ timestamp: "2024-03-01T00:00:00.000Z", cwd: "/Users/luke/Developer/arbor/arbor-xyz" },
|
|
181
|
-
{ file: "src/index.ts" },
|
|
182
|
-
{ files: ["README.md"] },
|
|
183
|
-
{ type: "commit", hash: "abc123" },
|
|
184
|
-
{ issue: "ARBOR-123" },
|
|
185
|
-
{ timestamp: "2024-03-01T02:00:00.000Z", type: "completion", summary: "done" },
|
|
186
|
-
]);
|
|
187
|
-
|
|
188
|
-
const miner = new mod.AgentSessionMiner();
|
|
189
|
-
const sessions = miner.mineCodex();
|
|
190
|
-
expect(sessions).toHaveLength(1);
|
|
191
|
-
expect(sessions[0].project).toBe("arbor-xyz");
|
|
192
|
-
expect(sessions[0].summary).toBe("done");
|
|
193
|
-
expect(sessions[0].files_modified).toEqual(["src/index.ts", "README.md"]);
|
|
194
|
-
expect(sessions[0].commits).toEqual(["abc123"]);
|
|
195
|
-
expect(sessions[0].issue).toBe("ARBOR-123");
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
it("parses copilot session state", () => {
|
|
199
|
-
const sessionId = "copilot-1";
|
|
200
|
-
const sessionDir = join(testHome, ".copilot", "session-state", sessionId);
|
|
201
|
-
mkdirSync(sessionDir, { recursive: true });
|
|
202
|
-
|
|
203
|
-
// workspace.yaml for metadata
|
|
204
|
-
writeFileSync(
|
|
205
|
-
join(sessionDir, "workspace.yaml"),
|
|
206
|
-
[
|
|
207
|
-
`id: ${sessionId}`,
|
|
208
|
-
"cwd: /Users/luke/Developer/webs/webs-xyz",
|
|
209
|
-
"created_at: 2024-04-01T00:00:00.000Z",
|
|
210
|
-
"updated_at: 2024-04-01T01:00:00.000Z",
|
|
211
|
-
"",
|
|
212
|
-
].join("\n"),
|
|
213
|
-
);
|
|
214
|
-
|
|
215
|
-
// events.jsonl for actual summary and issue extraction
|
|
216
|
-
writeFileSync(
|
|
217
|
-
join(sessionDir, "events.jsonl"),
|
|
218
|
-
[
|
|
219
|
-
JSON.stringify({
|
|
220
|
-
type: "session.start",
|
|
221
|
-
data: { context: { branch: "feat/WEBS-1-auth" } },
|
|
222
|
-
}),
|
|
223
|
-
JSON.stringify({
|
|
224
|
-
type: "assistant.message",
|
|
225
|
-
data: { content: '{"summary": "fixed auth", "status": "success"}' },
|
|
226
|
-
}),
|
|
227
|
-
].join("\n"),
|
|
228
|
-
);
|
|
229
|
-
|
|
230
|
-
const miner = new mod.AgentSessionMiner();
|
|
231
|
-
const sessions = miner.mineCopilot();
|
|
232
|
-
expect(sessions).toHaveLength(1);
|
|
233
|
-
expect(sessions[0].agent).toBe("copilot");
|
|
234
|
-
expect(sessions[0].project).toBe("webs-xyz");
|
|
235
|
-
expect(sessions[0].issue).toBe("WEBS-1");
|
|
236
|
-
expect(sessions[0].summary).toBe("fixed auth");
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
it("filters copilot sessions by project", () => {
|
|
240
|
-
const p1 = join(testHome, ".copilot", "session-state", "s1", "workspace.yaml");
|
|
241
|
-
mkdirSync(dirname(p1), { recursive: true });
|
|
242
|
-
writeFileSync(
|
|
243
|
-
p1,
|
|
244
|
-
[
|
|
245
|
-
"id: s1",
|
|
246
|
-
"cwd: /Users/luke/Developer/webs/webs-xyz",
|
|
247
|
-
"updated_at: 2024-04-01T01:00:00.000Z",
|
|
248
|
-
"",
|
|
249
|
-
].join("\n"),
|
|
250
|
-
);
|
|
251
|
-
|
|
252
|
-
const p2 = join(testHome, ".copilot", "session-state", "s2", "workspace.yaml");
|
|
253
|
-
mkdirSync(dirname(p2), { recursive: true });
|
|
254
|
-
writeFileSync(
|
|
255
|
-
p2,
|
|
256
|
-
[
|
|
257
|
-
"id: s2",
|
|
258
|
-
"cwd: /Users/luke/Developer/arbor/arbor-xyz",
|
|
259
|
-
"updated_at: 2024-04-01T01:00:00.000Z",
|
|
260
|
-
"",
|
|
261
|
-
].join("\n"),
|
|
262
|
-
);
|
|
263
|
-
|
|
264
|
-
const miner = new mod.AgentSessionMiner();
|
|
265
|
-
const sessions = miner.mineCopilot({ project: "webs-xyz" });
|
|
266
|
-
expect(sessions).toHaveLength(1);
|
|
267
|
-
expect(sessions[0].project).toBe("webs-xyz");
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
it("filters copilot sessions by since date", () => {
|
|
271
|
-
const workspacePath = join(testHome, ".copilot", "session-state", "old", "workspace.yaml");
|
|
272
|
-
mkdirSync(dirname(workspacePath), { recursive: true });
|
|
273
|
-
writeFileSync(
|
|
274
|
-
workspacePath,
|
|
275
|
-
[
|
|
276
|
-
"id: old",
|
|
277
|
-
"cwd: /Users/luke/Developer/webs/webs-xyz",
|
|
278
|
-
"updated_at: 2023-01-01T00:00:00.000Z",
|
|
279
|
-
"",
|
|
280
|
-
].join("\n"),
|
|
281
|
-
);
|
|
282
|
-
|
|
283
|
-
const miner = new mod.AgentSessionMiner();
|
|
284
|
-
const sessions = miner.mineCopilot({ since: new Date("2024-01-01T00:00:00.000Z") });
|
|
285
|
-
expect(sessions).toHaveLength(0);
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
it("mineAll sorts by last activity descending", () => {
|
|
289
|
-
writeJson(join(testHome, ".claude", "sessions", "c1.json"), {
|
|
290
|
-
updated_at: "2024-01-01T01:00:00.000Z",
|
|
291
|
-
project: "alpha",
|
|
292
|
-
});
|
|
293
|
-
writeJsonl(join(testHome, ".codex", "history", "x1.jsonl"), [
|
|
294
|
-
{ timestamp: "2024-01-01T02:00:00.000Z", cwd: "/Users/luke/Developer/webs/webs-xyz" },
|
|
295
|
-
]);
|
|
296
|
-
|
|
297
|
-
const miner = new mod.AgentSessionMiner();
|
|
298
|
-
const sessions = miner.mineAll();
|
|
299
|
-
expect(sessions).toHaveLength(2);
|
|
300
|
-
expect(sessions[0].agent).toBe("codex");
|
|
301
|
-
});
|
|
302
|
-
|
|
303
|
-
it("mineAll includes all agent types when present", () => {
|
|
304
|
-
writeJson(join(testHome, ".claude", "sessions", "c1.json"), {
|
|
305
|
-
updated_at: "2024-01-01T01:00:00.000Z",
|
|
306
|
-
project: "alpha",
|
|
307
|
-
});
|
|
308
|
-
writeJsonl(join(testHome, ".codex", "history", "x1.jsonl"), [
|
|
309
|
-
{ timestamp: "2024-01-01T02:00:00.000Z", cwd: "/Users/luke/Developer/webs/webs-xyz" },
|
|
310
|
-
]);
|
|
311
|
-
const workspacePath = join(
|
|
312
|
-
testHome,
|
|
313
|
-
".copilot",
|
|
314
|
-
"session-state",
|
|
315
|
-
"copilot-1",
|
|
316
|
-
"workspace.yaml",
|
|
317
|
-
);
|
|
318
|
-
mkdirSync(dirname(workspacePath), { recursive: true });
|
|
319
|
-
writeFileSync(
|
|
320
|
-
workspacePath,
|
|
321
|
-
[
|
|
322
|
-
"id: copilot-1",
|
|
323
|
-
"cwd: /Users/luke/Developer/webs/webs-xyz",
|
|
324
|
-
"updated_at: 2024-04-01T01:00:00.000Z",
|
|
325
|
-
"",
|
|
326
|
-
].join("\n"),
|
|
327
|
-
);
|
|
328
|
-
|
|
329
|
-
const miner = new mod.AgentSessionMiner();
|
|
330
|
-
const sessions = miner.mineAll();
|
|
331
|
-
const agents = new Set(sessions.map((s) => s.agent));
|
|
332
|
-
expect(agents.has("claude")).toBe(true);
|
|
333
|
-
expect(agents.has("codex")).toBe(true);
|
|
334
|
-
expect(agents.has("copilot")).toBe(true);
|
|
335
|
-
});
|
|
336
|
-
|
|
337
|
-
it("getSessionsByIssue filters matching issues", () => {
|
|
338
|
-
writeJson(join(testHome, ".claude", "sessions", "c2.json"), {
|
|
339
|
-
updated_at: "2024-01-01T01:00:00.000Z",
|
|
340
|
-
project: "alpha",
|
|
341
|
-
issue: "ARBOR-999",
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
const sessionDir = join(testHome, ".copilot", "session-state", "c3");
|
|
345
|
-
mkdirSync(sessionDir, { recursive: true });
|
|
346
|
-
writeFileSync(
|
|
347
|
-
join(sessionDir, "workspace.yaml"),
|
|
348
|
-
[
|
|
349
|
-
"id: c3",
|
|
350
|
-
"cwd: /Users/luke/Developer/alpha/alpha",
|
|
351
|
-
"updated_at: 2024-01-01T02:00:00.000Z",
|
|
352
|
-
"",
|
|
353
|
-
].join("\n"),
|
|
354
|
-
);
|
|
355
|
-
// events.jsonl with issue reference
|
|
356
|
-
writeFileSync(
|
|
357
|
-
join(sessionDir, "events.jsonl"),
|
|
358
|
-
[
|
|
359
|
-
JSON.stringify({ type: "session.start", data: { context: { branch: "feat/WEBS-1" } } }),
|
|
360
|
-
JSON.stringify({ type: "assistant.message", data: { content: '{"summary": "done"}' } }),
|
|
361
|
-
].join("\n"),
|
|
362
|
-
);
|
|
363
|
-
|
|
364
|
-
const miner = new mod.AgentSessionMiner();
|
|
365
|
-
const sessions = miner.getSessionsByIssue("WEBS-1");
|
|
366
|
-
expect(sessions).toHaveLength(1);
|
|
367
|
-
expect(sessions[0].issue).toBe("WEBS-1");
|
|
368
|
-
});
|
|
369
|
-
|
|
370
|
-
it("correlateSessions attaches commits when issue matches", () => {
|
|
371
|
-
const miner = new mod.AgentSessionMiner();
|
|
372
|
-
const mineAllSpy = spyOn(miner, "mineAll").mockReturnValue([
|
|
373
|
-
{
|
|
374
|
-
id: "s-1",
|
|
375
|
-
agent: "claude",
|
|
376
|
-
project: "arbor",
|
|
377
|
-
started_at: "2024-01-01T00:00:00.000Z",
|
|
378
|
-
last_activity: "2024-01-01T01:00:00.000Z",
|
|
379
|
-
path: "/tmp/session.json",
|
|
380
|
-
issue: "ARBOR-123",
|
|
381
|
-
},
|
|
382
|
-
]);
|
|
383
|
-
const getRecentCommitsSpy = spyOn(miner, "getRecentCommits").mockReturnValue([
|
|
384
|
-
"abc123 ARBOR-123 test commit",
|
|
385
|
-
]);
|
|
386
|
-
|
|
387
|
-
const sessions = miner.correlateSessions("/tmp/repo");
|
|
388
|
-
expect(sessions[0].commits).toContain("abc123");
|
|
389
|
-
|
|
390
|
-
mineAllSpy.mockRestore();
|
|
391
|
-
getRecentCommitsSpy.mockRestore();
|
|
392
|
-
});
|
|
393
|
-
|
|
394
|
-
it("getRecentCommits returns empty array when git fails", () => {
|
|
395
|
-
const miner = new mod.AgentSessionMiner();
|
|
396
|
-
expect(miner.getRecentCommits("/path/does-not-exist")).toEqual([]);
|
|
397
|
-
});
|
|
398
|
-
|
|
399
|
-
it("getRecentSessions passes project to mineAll", () => {
|
|
400
|
-
const miner = new mod.AgentSessionMiner();
|
|
401
|
-
const mineAllSpy = spyOn(miner, "mineAll").mockReturnValue([]);
|
|
402
|
-
miner.getRecentSessions("webs");
|
|
403
|
-
expect(mineAllSpy).toHaveBeenCalledTimes(1);
|
|
404
|
-
const args = mineAllSpy.mock.calls[0][0] as { since?: Date; project?: string };
|
|
405
|
-
expect(args.project).toBe("webs");
|
|
406
|
-
expect(args.since).toBeInstanceOf(Date);
|
|
407
|
-
mineAllSpy.mockRestore();
|
|
408
|
-
});
|
|
409
|
-
|
|
410
|
-
it("getTodaySessions passes project to mineAll", () => {
|
|
411
|
-
const miner = new mod.AgentSessionMiner();
|
|
412
|
-
const mineAllSpy = spyOn(miner, "mineAll").mockReturnValue([]);
|
|
413
|
-
miner.getTodaySessions("roles");
|
|
414
|
-
expect(mineAllSpy).toHaveBeenCalledTimes(1);
|
|
415
|
-
const args = mineAllSpy.mock.calls[0][0] as { since?: Date; project?: string };
|
|
416
|
-
expect(args.project).toBe("roles");
|
|
417
|
-
expect(args.since).toBeInstanceOf(Date);
|
|
418
|
-
mineAllSpy.mockRestore();
|
|
419
|
-
});
|
|
420
|
-
|
|
421
|
-
it("getSessionMiner returns a singleton instance", () => {
|
|
422
|
-
const first = mod.getSessionMiner();
|
|
423
|
-
const second = mod.getSessionMiner();
|
|
424
|
-
expect(first).toBe(second);
|
|
425
|
-
});
|
|
426
|
-
});
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Managed abbie tmux session utilities.
|
|
3
|
-
*
|
|
4
|
-
* Abbie owns a dedicated tmux session where it manages project windows.
|
|
5
|
-
* This module provides the shared primitives for creating, querying,
|
|
6
|
-
* and managing that session.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { spawn as spawnCmd } from "node:child_process";
|
|
10
|
-
import { homedir } from "node:os";
|
|
11
|
-
|
|
12
|
-
const DEFAULT_SESSION_NAME = "abbie";
|
|
13
|
-
const INTERNAL_WINDOW_NAME = "_abbie";
|
|
14
|
-
const LEGACY_SHELL_WINDOWS = new Set(["zsh", "bash", "fish", "sh"]);
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Get the managed session name (from env or default).
|
|
18
|
-
*/
|
|
19
|
-
export function getManagedSessionName(): string {
|
|
20
|
-
return process.env.ABBIE_TMUX_SESSION ?? DEFAULT_SESSION_NAME;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Ensure the managed abbie tmux session exists.
|
|
25
|
-
* Creates it (detached) if it doesn't exist yet.
|
|
26
|
-
* Returns the session name.
|
|
27
|
-
*/
|
|
28
|
-
export async function ensureManagedSession(): Promise<string> {
|
|
29
|
-
const { isRunning, listSessions, listWindows } = await import("./tmux/bridge.js");
|
|
30
|
-
const session = getManagedSessionName();
|
|
31
|
-
|
|
32
|
-
const running = await isRunning();
|
|
33
|
-
if (!running) {
|
|
34
|
-
// No tmux server at all — create session (this also starts the server)
|
|
35
|
-
await createDetachedSession(session);
|
|
36
|
-
return session;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const sessions = await listSessions();
|
|
40
|
-
const exists = sessions.some((s) => s.name === session);
|
|
41
|
-
if (!exists) {
|
|
42
|
-
await createDetachedSession(session);
|
|
43
|
-
return session;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Normalize legacy bootstrap windows created by older versions (e.g. `zsh` window at index 0)
|
|
47
|
-
// so users don’t see a confusing "zsh" project when attaching to the managed session.
|
|
48
|
-
try {
|
|
49
|
-
const windows = await listWindows(session);
|
|
50
|
-
const hasInternal = windows.some((w) => w.name === INTERNAL_WINDOW_NAME);
|
|
51
|
-
const legacyBootstrap = windows.find((w) => w.index === 0 && LEGACY_SHELL_WINDOWS.has(w.name));
|
|
52
|
-
if (!hasInternal && legacyBootstrap) {
|
|
53
|
-
await renameWindow(session, legacyBootstrap.index, INTERNAL_WINDOW_NAME);
|
|
54
|
-
}
|
|
55
|
-
} catch {
|
|
56
|
-
// Best-effort only
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return session;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* List windows in the managed session.
|
|
64
|
-
* Returns empty array if session doesn't exist.
|
|
65
|
-
*/
|
|
66
|
-
export async function listManagedWindows() {
|
|
67
|
-
const { isRunning, listSessions, listWindows } = await import("./tmux/bridge.js");
|
|
68
|
-
const session = getManagedSessionName();
|
|
69
|
-
|
|
70
|
-
if (!(await isRunning())) return [];
|
|
71
|
-
|
|
72
|
-
const sessions = await listSessions();
|
|
73
|
-
if (!sessions.some((s) => s.name === session)) return [];
|
|
74
|
-
|
|
75
|
-
return listWindows(session);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Check if a project window already exists in the managed session.
|
|
80
|
-
*/
|
|
81
|
-
export async function hasProjectWindow(name: string): Promise<boolean> {
|
|
82
|
-
const windows = await listManagedWindows();
|
|
83
|
-
return windows.some((w) => w.name === name);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Create a detached tmux session.
|
|
88
|
-
*/
|
|
89
|
-
async function createDetachedSession(name: string): Promise<void> {
|
|
90
|
-
return new Promise<void>((resolve, reject) => {
|
|
91
|
-
const proc = spawnCmd(
|
|
92
|
-
"tmux",
|
|
93
|
-
["new-session", "-d", "-s", name, "-n", INTERNAL_WINDOW_NAME, "-c", homedir()],
|
|
94
|
-
{
|
|
95
|
-
stdio: ["ignore", "ignore", "ignore"],
|
|
96
|
-
},
|
|
97
|
-
);
|
|
98
|
-
proc.on("close", (code) => {
|
|
99
|
-
if (code === 0) resolve();
|
|
100
|
-
else reject(new Error(`Failed to create tmux session: ${name}`));
|
|
101
|
-
});
|
|
102
|
-
proc.on("error", reject);
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
async function renameWindow(session: string, index: number, name: string): Promise<void> {
|
|
107
|
-
await new Promise<void>((resolve, reject) => {
|
|
108
|
-
const proc = spawnCmd("tmux", ["rename-window", "-t", `${session}:${index}`, name], {
|
|
109
|
-
stdio: ["ignore", "ignore", "ignore"],
|
|
110
|
-
});
|
|
111
|
-
proc.on("close", (code) => {
|
|
112
|
-
if (code === 0) resolve();
|
|
113
|
-
else reject(new Error(`Failed to rename window ${session}:${index} → ${name}`));
|
|
114
|
-
});
|
|
115
|
-
proc.on("error", reject);
|
|
116
|
-
});
|
|
117
|
-
}
|