@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
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { api, getHttpClient, isConvexConfigured } from "@creativeintelligence/sdk/convex";
|
|
2
|
-
import { Flags } from "@oclif/core";
|
|
3
|
-
import { getDeviceId } from "../../../lib/device.js";
|
|
4
|
-
import { isRunning } from "../../../lib/tmux/index.js";
|
|
5
|
-
import * as windows from "../../../lib/windows/index.js";
|
|
6
|
-
import { BaseCommand } from "../../base-command.js";
|
|
7
|
-
|
|
8
|
-
interface ListResult {
|
|
9
|
-
tmuxRunning: boolean;
|
|
10
|
-
windows: windows.WindowState[];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function abbreviateHome(path: string): string {
|
|
14
|
-
const home = process.env.HOME;
|
|
15
|
-
if (!home) return path;
|
|
16
|
-
if (path === home) return "~";
|
|
17
|
-
if (path.startsWith(`${home}/`)) return `~/${path.slice(home.length + 1)}`;
|
|
18
|
-
return path;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function paneRef(window: windows.WindowInfo): string {
|
|
22
|
-
return `${window.session}:${window.window}.${window.pane}`;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function windowLabel(window: windows.WindowInfo): string {
|
|
26
|
-
return `${window.window}:${window.windowName}`;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function pad(value: string, width: number): string {
|
|
30
|
-
if (value.length >= width) return value;
|
|
31
|
-
return value + " ".repeat(width - value.length);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function formatRow(state: windows.WindowState): {
|
|
35
|
-
id: string;
|
|
36
|
-
session: string;
|
|
37
|
-
window: string;
|
|
38
|
-
cmd: string;
|
|
39
|
-
cwd: string;
|
|
40
|
-
nvim: string;
|
|
41
|
-
agent: string;
|
|
42
|
-
} {
|
|
43
|
-
const id = state.window.paneId || paneRef(state.window);
|
|
44
|
-
return {
|
|
45
|
-
id,
|
|
46
|
-
session: state.window.session,
|
|
47
|
-
window: windowLabel(state.window),
|
|
48
|
-
cmd: state.window.title,
|
|
49
|
-
cwd: abbreviateHome(state.window.cwd),
|
|
50
|
-
nvim: state.nvim?.available ? "✓" : "-",
|
|
51
|
-
agent: state.agent?.type ?? "-",
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export default class WindowsListCommand extends BaseCommand {
|
|
56
|
-
static override summary = "List workspace windows (tmux panes)";
|
|
57
|
-
static hidden = false;
|
|
58
|
-
|
|
59
|
-
static override examples = [
|
|
60
|
-
"$ abbie windows list",
|
|
61
|
-
"$ abbie windows list --session work",
|
|
62
|
-
"$ abbie windows list --active",
|
|
63
|
-
"$ abbie windows list --no-with-nvim",
|
|
64
|
-
"$ abbie windows list --no-with-agent",
|
|
65
|
-
"$ abbie windows list --sync",
|
|
66
|
-
"$ abbie windows list --json",
|
|
67
|
-
];
|
|
68
|
-
|
|
69
|
-
static override flags = {
|
|
70
|
-
...BaseCommand.baseFlags,
|
|
71
|
-
session: Flags.string({
|
|
72
|
-
char: "s",
|
|
73
|
-
description: "Filter to specific tmux session",
|
|
74
|
-
}),
|
|
75
|
-
active: Flags.boolean({
|
|
76
|
-
description: "Only show active panes",
|
|
77
|
-
default: false,
|
|
78
|
-
}),
|
|
79
|
-
"with-nvim": Flags.boolean({
|
|
80
|
-
description: "Include nvim state",
|
|
81
|
-
default: true,
|
|
82
|
-
allowNo: true,
|
|
83
|
-
}),
|
|
84
|
-
"with-agent": Flags.boolean({
|
|
85
|
-
description: "Include agent detection",
|
|
86
|
-
default: true,
|
|
87
|
-
allowNo: true,
|
|
88
|
-
}),
|
|
89
|
-
sync: Flags.boolean({
|
|
90
|
-
description: "Sync windows to Convex for cross-device visibility",
|
|
91
|
-
default: false,
|
|
92
|
-
}),
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
async execute(): Promise<unknown> {
|
|
96
|
-
const { flags } = await this.parse(WindowsListCommand);
|
|
97
|
-
this.parsedFlags = flags;
|
|
98
|
-
|
|
99
|
-
const tmuxRunning = await isRunning();
|
|
100
|
-
if (!tmuxRunning) {
|
|
101
|
-
const result: ListResult = { tmuxRunning: false, windows: [] };
|
|
102
|
-
if (!this.jsonEnabled?.()) {
|
|
103
|
-
this.log("tmux is not running");
|
|
104
|
-
}
|
|
105
|
-
return result;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
const states = await windows.inventory({
|
|
109
|
-
session: flags.session,
|
|
110
|
-
includeNvim: flags["with-nvim"],
|
|
111
|
-
includeAgent: flags["with-agent"],
|
|
112
|
-
includeBuffers: false,
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
const filtered = (flags.active ? states.filter((s) => s.window.active) : states).sort(
|
|
116
|
-
(a, b) => {
|
|
117
|
-
if (a.window.session !== b.window.session)
|
|
118
|
-
return a.window.session.localeCompare(b.window.session);
|
|
119
|
-
if (a.window.window !== b.window.window) return a.window.window - b.window.window;
|
|
120
|
-
return a.window.pane - b.window.pane;
|
|
121
|
-
},
|
|
122
|
-
);
|
|
123
|
-
|
|
124
|
-
const result: ListResult = { tmuxRunning: true, windows: filtered };
|
|
125
|
-
|
|
126
|
-
// Sync to Convex if requested
|
|
127
|
-
if (flags.sync) {
|
|
128
|
-
await this.syncToConvex(filtered);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (!this.jsonEnabled?.()) {
|
|
132
|
-
this.printText(result);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return result;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
private async syncToConvex(states: windows.WindowState[]): Promise<void> {
|
|
139
|
-
if (!isConvexConfigured()) {
|
|
140
|
-
if (!this.jsonEnabled?.()) {
|
|
141
|
-
this.warn("Convex not configured, skipping sync");
|
|
142
|
-
}
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
const deviceId = getDeviceId();
|
|
147
|
-
const windowData = states.map((state) => ({
|
|
148
|
-
paneId:
|
|
149
|
-
state.window.paneId ||
|
|
150
|
-
`${state.window.session}:${state.window.window}.${state.window.pane}`,
|
|
151
|
-
tmuxSession: state.window.session,
|
|
152
|
-
windowIndex: state.window.window,
|
|
153
|
-
windowName: state.window.windowName,
|
|
154
|
-
paneIndex: state.window.pane,
|
|
155
|
-
cwd: state.window.cwd || "",
|
|
156
|
-
title: state.window.title || undefined,
|
|
157
|
-
isActive: state.window.active,
|
|
158
|
-
cols: state.window.size.cols,
|
|
159
|
-
rows: state.window.size.rows,
|
|
160
|
-
hasNvim: state.nvim?.available ?? false,
|
|
161
|
-
nvimPid: state.nvim?.pid ?? undefined,
|
|
162
|
-
nvimServerAddr: state.nvim?.serverAddr ?? undefined,
|
|
163
|
-
agentType: state.agent?.type ?? undefined,
|
|
164
|
-
agentPid: state.agent?.pid ?? undefined,
|
|
165
|
-
}));
|
|
166
|
-
|
|
167
|
-
try {
|
|
168
|
-
const client = getHttpClient();
|
|
169
|
-
const syncResult = await client.mutation(api.windows.sync, {
|
|
170
|
-
deviceId,
|
|
171
|
-
windows: windowData,
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
if (!this.jsonEnabled?.()) {
|
|
175
|
-
this.log(`Synced ${syncResult.synced} windows to Convex`);
|
|
176
|
-
}
|
|
177
|
-
} catch (error) {
|
|
178
|
-
if (!this.jsonEnabled?.()) {
|
|
179
|
-
this.warn(
|
|
180
|
-
`Failed to sync to Convex: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
private printText(result: ListResult): void {
|
|
187
|
-
if (result.windows.length === 0) {
|
|
188
|
-
this.log("No windows found");
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
const rows = result.windows.map(formatRow);
|
|
193
|
-
|
|
194
|
-
const widths = {
|
|
195
|
-
id: Math.max(2, ...rows.map((r) => r.id.length), "ID".length),
|
|
196
|
-
session: Math.max(2, ...rows.map((r) => r.session.length), "SESSION".length),
|
|
197
|
-
window: Math.max(2, ...rows.map((r) => r.window.length), "WINDOW".length),
|
|
198
|
-
cmd: Math.max(2, ...rows.map((r) => r.cmd.length), "CMD".length),
|
|
199
|
-
cwd: Math.max(2, ...rows.map((r) => r.cwd.length), "CWD".length),
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
this.log("WINDOWS");
|
|
203
|
-
this.log(
|
|
204
|
-
`${pad("ID", widths.id)} ${pad("SESSION", widths.session)} ${pad("WINDOW", widths.window)} ${pad("CMD", widths.cmd)} ${pad("CWD", widths.cwd)} NVIM AGENT`,
|
|
205
|
-
);
|
|
206
|
-
|
|
207
|
-
for (const row of rows) {
|
|
208
|
-
this.log(
|
|
209
|
-
`${pad(row.id, widths.id)} ${pad(row.session, widths.session)} ${pad(row.window, widths.window)} ${pad(row.cmd, widths.cmd)} ${pad(row.cwd, widths.cwd)} ${pad(row.nvim, 4)} ${row.agent}`,
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { Flags } from "@oclif/core";
|
|
2
|
-
import { type ActiveSession, getActiveSessionManager } from "../../../lib/active-sessions.js";
|
|
3
|
-
import { isRunning } from "../../../lib/tmux/index.js";
|
|
4
|
-
import * as windows from "../../../lib/windows/index.js";
|
|
5
|
-
import { BaseCommand } from "../../base-command.js";
|
|
6
|
-
|
|
7
|
-
interface MappingRow {
|
|
8
|
-
session: string;
|
|
9
|
-
agent: string;
|
|
10
|
-
status: ActiveSession["status"] | "unknown";
|
|
11
|
-
window: string | null;
|
|
12
|
-
paneId: string | null;
|
|
13
|
-
cmd: string | null;
|
|
14
|
-
cwd: string | null;
|
|
15
|
-
match: "session-id" | "pid" | "none";
|
|
16
|
-
pid: number | null;
|
|
17
|
-
issue?: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface MapResult {
|
|
21
|
-
tmuxRunning: boolean;
|
|
22
|
-
mappings: MappingRow[];
|
|
23
|
-
unmappedWindows: Array<{
|
|
24
|
-
paneId: string;
|
|
25
|
-
ref: string;
|
|
26
|
-
cmd: string;
|
|
27
|
-
cwd: string;
|
|
28
|
-
active: boolean;
|
|
29
|
-
}>;
|
|
30
|
-
orphanAgents: Array<{
|
|
31
|
-
session: string;
|
|
32
|
-
agent: string;
|
|
33
|
-
status: ActiveSession["status"];
|
|
34
|
-
pid: number | null;
|
|
35
|
-
cwd: string;
|
|
36
|
-
}>;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function abbreviateHome(path: string): string {
|
|
40
|
-
const home = process.env.HOME;
|
|
41
|
-
if (!home) return path;
|
|
42
|
-
if (path === home) return "~";
|
|
43
|
-
if (path.startsWith(`${home}/`)) return `~/${path.slice(home.length + 1)}`;
|
|
44
|
-
return path;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function paneRef(window: windows.WindowInfo): string {
|
|
48
|
-
return `${window.session}:${window.window}.${window.pane}`;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function pad(value: string, width: number): string {
|
|
52
|
-
if (value.length >= width) return value;
|
|
53
|
-
return value + " ".repeat(width - value.length);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export default class WindowsMapCommand extends BaseCommand {
|
|
57
|
-
static override summary = "Map agent sessions to windows";
|
|
58
|
-
static hidden = false;
|
|
59
|
-
|
|
60
|
-
static override examples = [
|
|
61
|
-
"$ abbie windows map",
|
|
62
|
-
"$ abbie windows map --orphans",
|
|
63
|
-
"$ abbie windows map --unmapped",
|
|
64
|
-
"$ abbie windows map --json",
|
|
65
|
-
];
|
|
66
|
-
|
|
67
|
-
static override flags = {
|
|
68
|
-
...BaseCommand.baseFlags,
|
|
69
|
-
orphans: Flags.boolean({
|
|
70
|
-
description: "Show orphan agents (no associated window)",
|
|
71
|
-
default: false,
|
|
72
|
-
}),
|
|
73
|
-
unmapped: Flags.boolean({
|
|
74
|
-
description: "Show windows without agents",
|
|
75
|
-
default: false,
|
|
76
|
-
}),
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
async execute(): Promise<unknown> {
|
|
80
|
-
const { flags } = await this.parse(WindowsMapCommand);
|
|
81
|
-
this.parsedFlags = flags;
|
|
82
|
-
|
|
83
|
-
const tmuxRunning = await isRunning();
|
|
84
|
-
if (!tmuxRunning) {
|
|
85
|
-
const result: MapResult = {
|
|
86
|
-
tmuxRunning: false,
|
|
87
|
-
mappings: [],
|
|
88
|
-
unmappedWindows: [],
|
|
89
|
-
orphanAgents: [],
|
|
90
|
-
};
|
|
91
|
-
if (!this.jsonEnabled?.()) {
|
|
92
|
-
this.log("tmux is not running");
|
|
93
|
-
}
|
|
94
|
-
return result;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const manager = getActiveSessionManager();
|
|
98
|
-
const activeSessions = await manager.listAsync({ status: "running" });
|
|
99
|
-
|
|
100
|
-
const states = await windows.inventory({
|
|
101
|
-
includeNvim: false,
|
|
102
|
-
includeAgent: true,
|
|
103
|
-
includeBuffers: false,
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
const bySessionId = new Map<string, windows.WindowState>();
|
|
107
|
-
const byPid = new Map<number, windows.WindowState>();
|
|
108
|
-
|
|
109
|
-
for (const state of states) {
|
|
110
|
-
if (state.agent?.sessionId) {
|
|
111
|
-
bySessionId.set(state.agent.sessionId, state);
|
|
112
|
-
}
|
|
113
|
-
if (state.agent?.pid) {
|
|
114
|
-
byPid.set(state.agent.pid, state);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const mappings: MappingRow[] = [];
|
|
119
|
-
|
|
120
|
-
for (const session of activeSessions) {
|
|
121
|
-
let matched: windows.WindowState | undefined;
|
|
122
|
-
let match: MappingRow["match"] = "none";
|
|
123
|
-
|
|
124
|
-
if (bySessionId.has(session.session_id)) {
|
|
125
|
-
matched = bySessionId.get(session.session_id);
|
|
126
|
-
match = "session-id";
|
|
127
|
-
} else if (typeof session.agent_pid === "number" && byPid.has(session.agent_pid)) {
|
|
128
|
-
matched = byPid.get(session.agent_pid);
|
|
129
|
-
match = "pid";
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
mappings.push({
|
|
133
|
-
session: session.session_id,
|
|
134
|
-
agent: session.agent,
|
|
135
|
-
status: session.status,
|
|
136
|
-
window: matched ? paneRef(matched.window) : null,
|
|
137
|
-
paneId: matched?.window.paneId || null,
|
|
138
|
-
cmd: matched?.window.title || null,
|
|
139
|
-
cwd: matched ? abbreviateHome(matched.window.cwd) : session.cwd,
|
|
140
|
-
match,
|
|
141
|
-
pid: session.agent_pid ?? null,
|
|
142
|
-
issue: session.issue,
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
const unmappedWindows = states
|
|
147
|
-
.filter((s) => !s.agent)
|
|
148
|
-
.map((s) => ({
|
|
149
|
-
paneId: s.window.paneId || paneRef(s.window),
|
|
150
|
-
ref: paneRef(s.window),
|
|
151
|
-
cmd: s.window.title,
|
|
152
|
-
cwd: abbreviateHome(s.window.cwd),
|
|
153
|
-
active: s.window.active,
|
|
154
|
-
}))
|
|
155
|
-
.sort((a, b) => a.ref.localeCompare(b.ref));
|
|
156
|
-
|
|
157
|
-
const orphanAgents = mappings
|
|
158
|
-
.filter((m) => m.window === null)
|
|
159
|
-
.map((m) => ({
|
|
160
|
-
session: m.session,
|
|
161
|
-
agent: m.agent,
|
|
162
|
-
status: m.status as ActiveSession["status"],
|
|
163
|
-
pid: m.pid,
|
|
164
|
-
cwd: m.cwd ?? "",
|
|
165
|
-
}));
|
|
166
|
-
|
|
167
|
-
const result: MapResult = { tmuxRunning: true, mappings, unmappedWindows, orphanAgents };
|
|
168
|
-
|
|
169
|
-
if (!this.jsonEnabled?.()) {
|
|
170
|
-
this.printText(result, flags);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
return result;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
private printText(result: MapResult, flags: { orphans: boolean; unmapped: boolean }): void {
|
|
177
|
-
const mapped = result.mappings.filter((m) => m.window !== null);
|
|
178
|
-
|
|
179
|
-
if (mapped.length === 0) {
|
|
180
|
-
this.log("No agent mappings found");
|
|
181
|
-
} else {
|
|
182
|
-
const sessionWidth = Math.max("SESSION".length, ...mapped.map((m) => m.session.length));
|
|
183
|
-
const agentWidth = Math.max("AGENT".length, ...mapped.map((m) => m.agent.length));
|
|
184
|
-
const windowWidth = Math.max("WINDOW".length, ...mapped.map((m) => (m.window ?? "").length));
|
|
185
|
-
|
|
186
|
-
this.log("AGENT MAPPINGS");
|
|
187
|
-
this.log(
|
|
188
|
-
`${pad("SESSION", sessionWidth)} ${pad("AGENT", agentWidth)} ${pad("WINDOW", windowWidth)} STATUS`,
|
|
189
|
-
);
|
|
190
|
-
|
|
191
|
-
for (const m of mapped) {
|
|
192
|
-
this.log(
|
|
193
|
-
`${pad(m.session, sessionWidth)} ${pad(m.agent, agentWidth)} ${pad(m.window ?? "-", windowWidth)} ${m.status}`,
|
|
194
|
-
);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (flags.unmapped) {
|
|
199
|
-
this.log("");
|
|
200
|
-
this.log("UNMAPPED WINDOWS (--unmapped)");
|
|
201
|
-
if (result.unmappedWindows.length === 0) {
|
|
202
|
-
this.log("None");
|
|
203
|
-
} else {
|
|
204
|
-
for (const w of result.unmappedWindows) {
|
|
205
|
-
this.log(`${w.paneId} ${w.ref} ${w.cmd} ${w.cwd}${w.active ? " [active]" : ""}`);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (flags.orphans) {
|
|
211
|
-
this.log("");
|
|
212
|
-
this.log("ORPHAN AGENTS (--orphans)");
|
|
213
|
-
if (result.orphanAgents.length === 0) {
|
|
214
|
-
this.log("None");
|
|
215
|
-
} else {
|
|
216
|
-
for (const a of result.orphanAgents) {
|
|
217
|
-
const pidStr = a.pid ? `PID ${a.pid}` : "PID -";
|
|
218
|
-
this.log(`${pidStr} (${a.agent}) - no associated window (${a.session})`);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from "@oclif/core";
|
|
2
|
-
import { getBufferLines, getCurrentBufferInfo, getVisibleRange } from "../../../lib/nvim/remote.js";
|
|
3
|
-
import { isRunning } from "../../../lib/tmux/index.js";
|
|
4
|
-
import { redactLine } from "../../../lib/tmux/redaction.js";
|
|
5
|
-
import * as windows from "../../../lib/windows/index.js";
|
|
6
|
-
import { BaseCommand } from "../../base-command.js";
|
|
7
|
-
|
|
8
|
-
type ReadScope = "visible" | "cursor" | "all";
|
|
9
|
-
|
|
10
|
-
interface ReadResult {
|
|
11
|
-
tmuxRunning: boolean;
|
|
12
|
-
window: windows.WindowInfo | null;
|
|
13
|
-
ref: string | null;
|
|
14
|
-
scope: ReadScope;
|
|
15
|
-
startLine: number | null;
|
|
16
|
-
endLine: number | null;
|
|
17
|
-
buffer: {
|
|
18
|
-
bufnr: number;
|
|
19
|
-
name: string;
|
|
20
|
-
filetype: string;
|
|
21
|
-
modified: boolean;
|
|
22
|
-
cursor?: { line: number; col: number };
|
|
23
|
-
} | null;
|
|
24
|
-
lines: string[];
|
|
25
|
-
redacted: boolean;
|
|
26
|
-
wasRedacted: boolean;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function abbreviateHome(path: string): string {
|
|
30
|
-
const home = process.env.HOME;
|
|
31
|
-
if (!home) return path;
|
|
32
|
-
if (path === home) return "~";
|
|
33
|
-
if (path.startsWith(`${home}/`)) return `~/${path.slice(home.length + 1)}`;
|
|
34
|
-
return path;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function paneRef(window: windows.WindowInfo): string {
|
|
38
|
-
return `${window.session}:${window.window}.${window.pane}`;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function formatPathForDisplay(path: string, cwd: string): string {
|
|
42
|
-
if (!path) return path;
|
|
43
|
-
const normalizedCwd = cwd.endsWith("/") ? cwd : `${cwd}/`;
|
|
44
|
-
if (path.startsWith(normalizedCwd)) {
|
|
45
|
-
return path.slice(normalizedCwd.length);
|
|
46
|
-
}
|
|
47
|
-
return abbreviateHome(path);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export default class WindowsReadCommand extends BaseCommand {
|
|
51
|
-
static override summary = "Read nvim buffer content for a window";
|
|
52
|
-
static hidden = false;
|
|
53
|
-
|
|
54
|
-
static override examples = [
|
|
55
|
-
"$ abbie windows read",
|
|
56
|
-
"$ abbie windows read %3",
|
|
57
|
-
"$ abbie windows read --scope visible",
|
|
58
|
-
"$ abbie windows read --scope cursor",
|
|
59
|
-
"$ abbie windows read --scope all",
|
|
60
|
-
"$ abbie windows read --lines 50",
|
|
61
|
-
"$ abbie windows read --no-redact",
|
|
62
|
-
"$ abbie windows read --json",
|
|
63
|
-
];
|
|
64
|
-
|
|
65
|
-
static override args = {
|
|
66
|
-
ref: Args.string({
|
|
67
|
-
description: "Pane ID (e.g. %3) or session:window.pane (e.g. work:0.0)",
|
|
68
|
-
required: false,
|
|
69
|
-
}),
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
static override flags = {
|
|
73
|
-
...BaseCommand.baseFlags,
|
|
74
|
-
scope: Flags.string({
|
|
75
|
-
description: "Read scope",
|
|
76
|
-
options: ["visible", "cursor", "all"],
|
|
77
|
-
default: "visible",
|
|
78
|
-
}),
|
|
79
|
-
lines: Flags.integer({
|
|
80
|
-
description: "Maximum lines to read",
|
|
81
|
-
default: 50,
|
|
82
|
-
}),
|
|
83
|
-
redact: Flags.boolean({
|
|
84
|
-
description: "Enable redaction",
|
|
85
|
-
default: true,
|
|
86
|
-
allowNo: true,
|
|
87
|
-
}),
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
async execute(): Promise<unknown> {
|
|
91
|
-
const { args, flags } = await this.parse(WindowsReadCommand);
|
|
92
|
-
this.parsedFlags = flags;
|
|
93
|
-
|
|
94
|
-
const scope = flags.scope as ReadScope;
|
|
95
|
-
const maxLines = Math.max(1, flags.lines);
|
|
96
|
-
|
|
97
|
-
const tmuxRunning = await isRunning();
|
|
98
|
-
if (!tmuxRunning) {
|
|
99
|
-
const result: ReadResult = {
|
|
100
|
-
tmuxRunning: false,
|
|
101
|
-
window: null,
|
|
102
|
-
ref: null,
|
|
103
|
-
scope,
|
|
104
|
-
startLine: null,
|
|
105
|
-
endLine: null,
|
|
106
|
-
buffer: null,
|
|
107
|
-
lines: [],
|
|
108
|
-
redacted: flags.redact,
|
|
109
|
-
wasRedacted: false,
|
|
110
|
-
};
|
|
111
|
-
if (!this.jsonEnabled?.()) {
|
|
112
|
-
this.log("tmux is not running");
|
|
113
|
-
}
|
|
114
|
-
return result;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const state = args.ref
|
|
118
|
-
? await windows.getWindowState(args.ref, {
|
|
119
|
-
includeNvim: true,
|
|
120
|
-
includeAgent: false,
|
|
121
|
-
includeBuffers: false,
|
|
122
|
-
})
|
|
123
|
-
: await windows.getFocusedWindow({
|
|
124
|
-
includeNvim: true,
|
|
125
|
-
includeAgent: false,
|
|
126
|
-
includeBuffers: false,
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
if (!state) {
|
|
130
|
-
const result: ReadResult = {
|
|
131
|
-
tmuxRunning: true,
|
|
132
|
-
window: null,
|
|
133
|
-
ref: null,
|
|
134
|
-
scope,
|
|
135
|
-
startLine: null,
|
|
136
|
-
endLine: null,
|
|
137
|
-
buffer: null,
|
|
138
|
-
lines: [],
|
|
139
|
-
redacted: flags.redact,
|
|
140
|
-
wasRedacted: false,
|
|
141
|
-
};
|
|
142
|
-
if (!this.jsonEnabled?.()) {
|
|
143
|
-
this.log("Window not found");
|
|
144
|
-
}
|
|
145
|
-
return result;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
const nvimState = state.nvim;
|
|
149
|
-
if (!nvimState?.available || !nvimState.serverAddr) {
|
|
150
|
-
const result: ReadResult = {
|
|
151
|
-
tmuxRunning: true,
|
|
152
|
-
window: state.window,
|
|
153
|
-
ref: paneRef(state.window),
|
|
154
|
-
scope,
|
|
155
|
-
startLine: null,
|
|
156
|
-
endLine: null,
|
|
157
|
-
buffer: null,
|
|
158
|
-
lines: [],
|
|
159
|
-
redacted: flags.redact,
|
|
160
|
-
wasRedacted: false,
|
|
161
|
-
};
|
|
162
|
-
if (!this.jsonEnabled?.()) {
|
|
163
|
-
this.log("nvim is not available for this window");
|
|
164
|
-
}
|
|
165
|
-
return result;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
const serverAddr = nvimState.serverAddr;
|
|
169
|
-
|
|
170
|
-
const bufferInfo = await getCurrentBufferInfo(serverAddr);
|
|
171
|
-
if (!bufferInfo) {
|
|
172
|
-
const result: ReadResult = {
|
|
173
|
-
tmuxRunning: true,
|
|
174
|
-
window: state.window,
|
|
175
|
-
ref: paneRef(state.window),
|
|
176
|
-
scope,
|
|
177
|
-
startLine: null,
|
|
178
|
-
endLine: null,
|
|
179
|
-
buffer: null,
|
|
180
|
-
lines: [],
|
|
181
|
-
redacted: flags.redact,
|
|
182
|
-
wasRedacted: false,
|
|
183
|
-
};
|
|
184
|
-
if (!this.jsonEnabled?.()) {
|
|
185
|
-
this.log("Unable to query nvim current buffer");
|
|
186
|
-
}
|
|
187
|
-
return result;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
let startLine = 1;
|
|
191
|
-
let endLine = 1;
|
|
192
|
-
let cursor = bufferInfo.cursor ?? { line: 1, col: 1 };
|
|
193
|
-
|
|
194
|
-
if (scope === "visible") {
|
|
195
|
-
const range = await getVisibleRange(serverAddr, bufferInfo.bufnr);
|
|
196
|
-
if (range) {
|
|
197
|
-
startLine = range.topLine;
|
|
198
|
-
endLine = Math.min(range.bottomLine, range.topLine + maxLines - 1);
|
|
199
|
-
cursor = range.cursor;
|
|
200
|
-
} else {
|
|
201
|
-
endLine = startLine + maxLines - 1;
|
|
202
|
-
}
|
|
203
|
-
} else if (scope === "cursor") {
|
|
204
|
-
const desiredHalf = Math.min(20, Math.floor((maxLines - 1) / 2));
|
|
205
|
-
startLine = Math.max(1, cursor.line - desiredHalf);
|
|
206
|
-
endLine = startLine + Math.min(maxLines, desiredHalf * 2 + 1) - 1;
|
|
207
|
-
} else {
|
|
208
|
-
startLine = 1;
|
|
209
|
-
endLine = startLine + maxLines - 1;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
const rawLines = await getBufferLines(serverAddr, bufferInfo.bufnr, startLine, endLine);
|
|
213
|
-
if (!rawLines) {
|
|
214
|
-
const result: ReadResult = {
|
|
215
|
-
tmuxRunning: true,
|
|
216
|
-
window: state.window,
|
|
217
|
-
ref: paneRef(state.window),
|
|
218
|
-
scope,
|
|
219
|
-
startLine,
|
|
220
|
-
endLine,
|
|
221
|
-
buffer: bufferInfo,
|
|
222
|
-
lines: [],
|
|
223
|
-
redacted: flags.redact,
|
|
224
|
-
wasRedacted: false,
|
|
225
|
-
};
|
|
226
|
-
if (!this.jsonEnabled?.()) {
|
|
227
|
-
this.log("Unable to read buffer content");
|
|
228
|
-
}
|
|
229
|
-
return result;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
let wasRedacted = false;
|
|
233
|
-
const renderedLines = rawLines.map((line) => {
|
|
234
|
-
if (!flags.redact) return line;
|
|
235
|
-
const redacted = redactLine(line);
|
|
236
|
-
if (redacted !== line) wasRedacted = true;
|
|
237
|
-
return redacted;
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
const result: ReadResult = {
|
|
241
|
-
tmuxRunning: true,
|
|
242
|
-
window: state.window,
|
|
243
|
-
ref: paneRef(state.window),
|
|
244
|
-
scope,
|
|
245
|
-
startLine,
|
|
246
|
-
endLine,
|
|
247
|
-
buffer: { ...bufferInfo, cursor },
|
|
248
|
-
lines: renderedLines,
|
|
249
|
-
redacted: flags.redact,
|
|
250
|
-
wasRedacted,
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
if (!this.jsonEnabled?.()) {
|
|
254
|
-
this.printText(result);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
return result;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
private printText(result: ReadResult): void {
|
|
261
|
-
if (!result.window || !result.buffer || result.startLine === null || result.endLine === null) {
|
|
262
|
-
this.log("No buffer content available");
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
const displayPath = formatPathForDisplay(result.buffer.name, result.window.cwd);
|
|
267
|
-
this.log(`BUFFER ${displayPath} (${result.buffer.filetype || "unknown"})`);
|
|
268
|
-
this.log(`Window: ${result.window.paneId || "-"} (${result.ref})`);
|
|
269
|
-
this.log(`Scope: ${result.scope} (lines ${result.startLine}-${result.endLine})`);
|
|
270
|
-
this.log("");
|
|
271
|
-
|
|
272
|
-
const width = String(result.endLine).length;
|
|
273
|
-
|
|
274
|
-
for (let i = 0; i < result.lines.length; i++) {
|
|
275
|
-
const lineNo = result.startLine + i;
|
|
276
|
-
this.log(` ${String(lineNo).padStart(width)} │ ${result.lines[i]}`);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|