@creativeintelligence/abbie 0.1.4 → 0.1.6
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/login.js +26 -0
- package/dist/cli/commands/start.js +2 -1
- package/oclif.manifest.json +1 -1
- package/package.json +9 -5
- 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,580 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
-
import { basename } from "node:path";
|
|
3
|
-
import { api, getHttpClient } from "@creativeintelligence/sdk/convex";
|
|
4
|
-
import { Flags } from "@oclif/core";
|
|
5
|
-
import { type AgentType, getActiveSessionManager } from "../../../lib/active-sessions.js";
|
|
6
|
-
import { telemetry } from "../../../lib/analytics.js";
|
|
7
|
-
import { loadConfigFromPath } from "../../../lib/config-loader.js";
|
|
8
|
-
import { validateOutputContract } from "../../../lib/contracts.js";
|
|
9
|
-
import { getDeviceId } from "../../../lib/device.js";
|
|
10
|
-
import type { ReinjectMode } from "../../../lib/session-artifacts.js";
|
|
11
|
-
import { readSessionResult } from "../../../lib/session-result.js";
|
|
12
|
-
import { extractProjectFromPath } from "../../../lib/tmux/map.js";
|
|
13
|
-
import { AGENTS } from "../../../lib/types.js";
|
|
14
|
-
import { BaseCommand } from "../../base-command.js";
|
|
15
|
-
|
|
16
|
-
function hasExplicitSkillRouting(goal: string, skills?: string[]): boolean {
|
|
17
|
-
if (Array.isArray(skills) && skills.length > 0) {
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Explicit prompt-level invocation examples: "use convex-god skill"
|
|
22
|
-
if (/\buse\s+[\w/-]+\s+skill\b/i.test(goal)) {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Skill XML block already present in goal payload.
|
|
27
|
-
if (/<skill\b[^>]*>[\s\S]*<\/skill>/i.test(goal)) {
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
// Backwards-compat with earlier wrapper format.
|
|
31
|
-
if (/<skill_routing>[\s\S]*<\/skill_routing>/i.test(goal)) {
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const TRACE_URL_KEYS = ["traceUrl", "trace_url", "braintrustTraceUrl", "braintrust_trace_url"];
|
|
39
|
-
|
|
40
|
-
const ENCODED_TRAILING_JUNK_RE = /(?:%22|%27|%7d|%7b|%3e|%3c|%29|%5d)+$/i;
|
|
41
|
-
const RAW_TRAILING_JUNK_RE = /[),.;\]}>]+$/;
|
|
42
|
-
const HTML_TRAILING_JUNK_RE = /(?:"|"|'|>|<)+$/i;
|
|
43
|
-
const TRAILING_SLASH_RE = /\/+$/;
|
|
44
|
-
const TRACE_PATH_RE = /\/traces?\//i;
|
|
45
|
-
const TRACE_ID_PATH_RE = /\/traces?\/([^/?#]+)/i;
|
|
46
|
-
const TRACE_CANONICAL_PATH_RE = /(\/traces?\/[^/?#]+).*/i;
|
|
47
|
-
const BRAINTRUST_OBJECT_PATH_RE = /\/object$/i;
|
|
48
|
-
|
|
49
|
-
function trimTrailingJunk(value: string): string {
|
|
50
|
-
let next = value.trim();
|
|
51
|
-
|
|
52
|
-
while (true) {
|
|
53
|
-
const trimmed = next
|
|
54
|
-
.replace(ENCODED_TRAILING_JUNK_RE, "")
|
|
55
|
-
.replace(HTML_TRAILING_JUNK_RE, "")
|
|
56
|
-
.replace(RAW_TRAILING_JUNK_RE, "");
|
|
57
|
-
|
|
58
|
-
if (trimmed === next) {
|
|
59
|
-
return trimmed;
|
|
60
|
-
}
|
|
61
|
-
next = trimmed;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function normalizeTraceUrl(candidate: string): string | undefined {
|
|
66
|
-
const unescaped = candidate.replace(/\\\//g, "/").replace(/&/gi, "&");
|
|
67
|
-
const trimmed = trimTrailingJunk(unescaped);
|
|
68
|
-
if (!trimmed) {
|
|
69
|
-
return undefined;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
try {
|
|
73
|
-
const parsed = new URL(trimmed);
|
|
74
|
-
const hostname = parsed.hostname.toLowerCase();
|
|
75
|
-
const isBraintrustHost = hostname.includes("braintrust");
|
|
76
|
-
|
|
77
|
-
parsed.pathname = trimTrailingJunk(parsed.pathname).replace(TRAILING_SLASH_RE, "");
|
|
78
|
-
parsed.hash = "";
|
|
79
|
-
|
|
80
|
-
const traceMatch = parsed.pathname.match(TRACE_ID_PATH_RE);
|
|
81
|
-
if (!traceMatch?.[1]) {
|
|
82
|
-
if (isBraintrustHost && BRAINTRUST_OBJECT_PATH_RE.test(parsed.pathname)) {
|
|
83
|
-
const objectType = parsed.searchParams.get("object_type");
|
|
84
|
-
const objectId = parsed.searchParams.get("object_id");
|
|
85
|
-
const id = parsed.searchParams.get("id");
|
|
86
|
-
if (!objectType || !objectId || !id) {
|
|
87
|
-
return undefined;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const searchParams = new URLSearchParams();
|
|
91
|
-
searchParams.set("object_type", objectType);
|
|
92
|
-
searchParams.set("object_id", objectId);
|
|
93
|
-
searchParams.set("id", id);
|
|
94
|
-
parsed.search = `?${searchParams.toString()}`;
|
|
95
|
-
return parsed.toString();
|
|
96
|
-
}
|
|
97
|
-
return undefined;
|
|
98
|
-
}
|
|
99
|
-
if (!isBraintrustHost && !TRACE_PATH_RE.test(parsed.pathname)) {
|
|
100
|
-
return undefined;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
parsed.search = "";
|
|
104
|
-
const canonicalPath = parsed.pathname.replace(TRACE_CANONICAL_PATH_RE, "$1");
|
|
105
|
-
parsed.pathname = canonicalPath;
|
|
106
|
-
|
|
107
|
-
return parsed.toString();
|
|
108
|
-
} catch {
|
|
109
|
-
return undefined;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function extractUrlFromText(text: string): string | undefined {
|
|
114
|
-
const haystack = text.replace(/\\\//g, "/");
|
|
115
|
-
|
|
116
|
-
// Some agents wrap long URLs across lines (e.g. ".../app\n /test/traces/...").
|
|
117
|
-
// Fold any whitespace that appears between URL path separators.
|
|
118
|
-
let folded = haystack;
|
|
119
|
-
while (true) {
|
|
120
|
-
const next = folded.replace(/(https?:\/\/[^\s<>"')\]]+)\s+\/(?=[^<>\s])/gi, "$1/");
|
|
121
|
-
if (next === folded) {
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
folded = next;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
const matches = folded.match(/https?:\/\/[^\s<>"')\]]+/gi);
|
|
128
|
-
if (!matches) {
|
|
129
|
-
return undefined;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
for (const match of matches) {
|
|
133
|
-
const normalized = normalizeTraceUrl(match);
|
|
134
|
-
if (normalized) {
|
|
135
|
-
return normalized;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
return undefined;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function extractTraceUrl(value: unknown): string | undefined {
|
|
143
|
-
const queue: unknown[] = [value];
|
|
144
|
-
const seen = new Set<unknown>();
|
|
145
|
-
|
|
146
|
-
while (queue.length > 0) {
|
|
147
|
-
const current = queue.shift();
|
|
148
|
-
if (current === null || current === undefined) {
|
|
149
|
-
continue;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (typeof current === "string") {
|
|
153
|
-
const traceUrl = extractUrlFromText(current);
|
|
154
|
-
if (traceUrl) {
|
|
155
|
-
return traceUrl;
|
|
156
|
-
}
|
|
157
|
-
continue;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
if (typeof current !== "object") {
|
|
161
|
-
continue;
|
|
162
|
-
}
|
|
163
|
-
if (seen.has(current)) {
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
seen.add(current);
|
|
167
|
-
|
|
168
|
-
if (Array.isArray(current)) {
|
|
169
|
-
for (const item of current) {
|
|
170
|
-
queue.push(item);
|
|
171
|
-
}
|
|
172
|
-
continue;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
const record = current as Record<string, unknown>;
|
|
176
|
-
for (const key of TRACE_URL_KEYS) {
|
|
177
|
-
const candidate = record[key];
|
|
178
|
-
if (typeof candidate !== "string") {
|
|
179
|
-
continue;
|
|
180
|
-
}
|
|
181
|
-
const traceUrl = extractUrlFromText(candidate);
|
|
182
|
-
if (traceUrl) {
|
|
183
|
-
return traceUrl;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
for (const value of Object.values(record)) {
|
|
188
|
-
queue.push(value);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
return undefined;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export default class SessionStart extends BaseCommand {
|
|
196
|
-
static override description = "Start and spawn a new agent session";
|
|
197
|
-
static override hidden = false;
|
|
198
|
-
|
|
199
|
-
static override examples = [
|
|
200
|
-
'<%= config.bin %> session start --agent claude --project hostagent --goal "Implement ARBOR-123"',
|
|
201
|
-
'<%= config.bin %> session start --agent codex --project yuba --goal "Fix auth bug" --issue YUBA-42',
|
|
202
|
-
'<%= config.bin %> session start -a copilot -p arbor -g "Add unit tests" --json',
|
|
203
|
-
'<%= config.bin %> session start --explore -p arbor -g "map auth flow" --json',
|
|
204
|
-
"cat prompt.md | <%= config.bin %> session start --agent claude --project arbor",
|
|
205
|
-
];
|
|
206
|
-
|
|
207
|
-
static override flags = {
|
|
208
|
-
...BaseCommand.baseFlags,
|
|
209
|
-
agent: Flags.string({
|
|
210
|
-
char: "a",
|
|
211
|
-
description: "Agent type to spawn",
|
|
212
|
-
required: false,
|
|
213
|
-
options: [...AGENTS],
|
|
214
|
-
}),
|
|
215
|
-
explore: Flags.boolean({
|
|
216
|
-
description: "Explore mode - routes to Gemini and forces read-only",
|
|
217
|
-
default: false,
|
|
218
|
-
}),
|
|
219
|
-
project: Flags.string({
|
|
220
|
-
char: "p",
|
|
221
|
-
description: "Project name",
|
|
222
|
-
required: false,
|
|
223
|
-
}),
|
|
224
|
-
goal: Flags.string({
|
|
225
|
-
char: "g",
|
|
226
|
-
description: "Goal/task for the agent (can also be provided via stdin)",
|
|
227
|
-
}),
|
|
228
|
-
model: Flags.string({
|
|
229
|
-
char: "m",
|
|
230
|
-
description: "Model to use (overrides agent default)",
|
|
231
|
-
}),
|
|
232
|
-
issue: Flags.string({
|
|
233
|
-
char: "i",
|
|
234
|
-
description: "Linear issue reference (e.g., ARBOR-123)",
|
|
235
|
-
}),
|
|
236
|
-
parent: Flags.string({
|
|
237
|
-
description: "Parent session ID (for sub-session tracking)",
|
|
238
|
-
}),
|
|
239
|
-
reuse: Flags.string({
|
|
240
|
-
description: "Comma-separated prior session IDs to include as prompt context",
|
|
241
|
-
}),
|
|
242
|
-
"reuse-parent": Flags.boolean({
|
|
243
|
-
description: "Include the parent session artifact in prompt context",
|
|
244
|
-
default: false,
|
|
245
|
-
}),
|
|
246
|
-
"reinject-mode": Flags.string({
|
|
247
|
-
description: "How much prior session context to inject: off, summary, or full",
|
|
248
|
-
options: ["off", "summary", "full"],
|
|
249
|
-
default: "summary",
|
|
250
|
-
}),
|
|
251
|
-
cwd: Flags.string({
|
|
252
|
-
description: "Working directory for the agent",
|
|
253
|
-
}),
|
|
254
|
-
"prompt-file": Flags.string({
|
|
255
|
-
description: "Path to prompt file (instead of --goal)",
|
|
256
|
-
}),
|
|
257
|
-
"read-only": Flags.boolean({
|
|
258
|
-
char: "r",
|
|
259
|
-
description: "Read-only mode - inject contract forbidding writes",
|
|
260
|
-
default: false,
|
|
261
|
-
}),
|
|
262
|
-
"trace-id": Flags.string({
|
|
263
|
-
description:
|
|
264
|
-
"Explicit trace ID for event correlation (defaults to AGENTS_TRACE_ID or generates new)",
|
|
265
|
-
}),
|
|
266
|
-
await: Flags.boolean({
|
|
267
|
-
description: "Wait for session to complete and return output",
|
|
268
|
-
default: false,
|
|
269
|
-
}),
|
|
270
|
-
headless: Flags.boolean({
|
|
271
|
-
description: "Run as headless subprocess (no terminal window). Default is terminal mode.",
|
|
272
|
-
default: false,
|
|
273
|
-
}),
|
|
274
|
-
"tmux-session": Flags.string({
|
|
275
|
-
description:
|
|
276
|
-
'Tmux session name for terminal mode (default: "abbie"). Prevents hijacking your personal tmux.',
|
|
277
|
-
}),
|
|
278
|
-
"auto-context": Flags.boolean({
|
|
279
|
-
description: "Inject recent file_activity from prior sessions as context (default: true)",
|
|
280
|
-
default: true,
|
|
281
|
-
allowNo: true,
|
|
282
|
-
}),
|
|
283
|
-
skills: Flags.string({
|
|
284
|
-
char: "s",
|
|
285
|
-
description: "Skill(s) to route the agent toward (repeatable, e.g. -s loop -s convex-god)",
|
|
286
|
-
multiple: true,
|
|
287
|
-
}),
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Start an agent session.
|
|
292
|
-
*
|
|
293
|
-
* Supports goal via:
|
|
294
|
-
* - `--goal`
|
|
295
|
-
* - stdin (piped prompt)
|
|
296
|
-
* - both (combined as: `<goal>\n\n<stdin>`)
|
|
297
|
-
*
|
|
298
|
-
* With `--await`, blocks until completion and returns `{ session, await: { status, output } }`.
|
|
299
|
-
*/
|
|
300
|
-
protected async execute(): Promise<unknown> {
|
|
301
|
-
const { flags } = await this.parse(SessionStart);
|
|
302
|
-
this.parsedFlags = flags;
|
|
303
|
-
|
|
304
|
-
const manager = getActiveSessionManager();
|
|
305
|
-
|
|
306
|
-
// Get goal from flag, stdin, or both (combined)
|
|
307
|
-
// Skills often pipe a prompt AND pass -g for the task label
|
|
308
|
-
let goal = flags.goal || "";
|
|
309
|
-
const stdin = await this.readStdin();
|
|
310
|
-
|
|
311
|
-
if (stdin) {
|
|
312
|
-
// If both stdin and --goal provided, combine them
|
|
313
|
-
// This supports the skill pattern: cat prompt.md | abbie session start -g "task label"
|
|
314
|
-
if (goal) {
|
|
315
|
-
goal = `${goal}\n\n${stdin}`;
|
|
316
|
-
} else {
|
|
317
|
-
goal = stdin;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
if (!goal && !flags["prompt-file"]) {
|
|
322
|
-
this.error("Goal is required. Provide via --goal, stdin, or --prompt-file");
|
|
323
|
-
}
|
|
324
|
-
if (flags["reuse-parent"] && !flags.parent) {
|
|
325
|
-
this.error("--reuse-parent requires --parent");
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
const resolvedAgent = flags.explore ? "gemini" : flags.agent;
|
|
329
|
-
if (!resolvedAgent) {
|
|
330
|
-
this.error("Agent is required. Provide via --agent or use --explore");
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
// Explore mode is always read-only.
|
|
334
|
-
const resolvedReadOnly = flags["read-only"] || flags.explore;
|
|
335
|
-
|
|
336
|
-
const explicitSkillRouting = hasExplicitSkillRouting(goal, flags.skills);
|
|
337
|
-
if (!explicitSkillRouting) {
|
|
338
|
-
this.logWarn(
|
|
339
|
-
"Spawning without explicit skill routing. Recommended: pass -s <skill> or include `use <skill> skill` in the goal.",
|
|
340
|
-
);
|
|
341
|
-
telemetry.trackSession("skill-routing-missing", {
|
|
342
|
-
agent: resolvedAgent,
|
|
343
|
-
mode: resolvedReadOnly ? "read-only" : "full",
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
const resolvedCwd = flags.cwd ?? process.cwd();
|
|
348
|
-
|
|
349
|
-
// Infer project name if not explicitly provided.
|
|
350
|
-
// - Prefer .abbie/config.json "name" from nearest ancestor of cwd.
|
|
351
|
-
// - Otherwise, map to Luke's canonical directory structure:
|
|
352
|
-
// ~/Developer/apps/{project}/... or ~/Developer/utils/{project}/...
|
|
353
|
-
// - Fallback: basename(cwd)
|
|
354
|
-
const resolvedProject =
|
|
355
|
-
flags.project ||
|
|
356
|
-
(() => {
|
|
357
|
-
try {
|
|
358
|
-
const loaded = loadConfigFromPath(resolvedCwd);
|
|
359
|
-
if (loaded?.config?.name) return loaded.config.name;
|
|
360
|
-
} catch {
|
|
361
|
-
// ignore
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
return extractProjectFromPath(resolvedCwd) || basename(resolvedCwd) || "unknown";
|
|
365
|
-
})();
|
|
366
|
-
|
|
367
|
-
const reuseSessionIds = [
|
|
368
|
-
...(flags.reuse?.split(",") ?? []),
|
|
369
|
-
...(flags["reuse-parent"] && flags.parent ? [flags.parent] : []),
|
|
370
|
-
]
|
|
371
|
-
.map((id) => id.trim())
|
|
372
|
-
.filter((id) => id.length > 0)
|
|
373
|
-
.filter((id, index, all) => all.indexOf(id) === index);
|
|
374
|
-
const requestedReinjectMode = flags["reinject-mode"] as ReinjectMode;
|
|
375
|
-
const reinjectMode: ReinjectMode = reuseSessionIds.length === 0 ? "off" : requestedReinjectMode;
|
|
376
|
-
|
|
377
|
-
const result = await manager.start({
|
|
378
|
-
agent: resolvedAgent as AgentType,
|
|
379
|
-
project: resolvedProject,
|
|
380
|
-
goal: goal || "",
|
|
381
|
-
issue: flags.issue,
|
|
382
|
-
parentSessionId: flags.parent,
|
|
383
|
-
reuseSessionIds,
|
|
384
|
-
reinjectMode,
|
|
385
|
-
cwd: resolvedCwd,
|
|
386
|
-
promptFile: flags["prompt-file"],
|
|
387
|
-
readOnly: resolvedReadOnly,
|
|
388
|
-
traceId: flags["trace-id"],
|
|
389
|
-
model: flags.model,
|
|
390
|
-
awaitCompletion: flags.await, // Use runner foreground mode for --await
|
|
391
|
-
headless: flags.headless,
|
|
392
|
-
tmuxSession: flags["tmux-session"], // Defaults to "abbie" if not specified
|
|
393
|
-
autoContext: flags["auto-context"],
|
|
394
|
-
skills: flags.skills,
|
|
395
|
-
});
|
|
396
|
-
|
|
397
|
-
if (result.status === "failed") {
|
|
398
|
-
telemetry.trackSession("blocked", {
|
|
399
|
-
agent: resolvedAgent,
|
|
400
|
-
blocker_type: "spawn_failed",
|
|
401
|
-
});
|
|
402
|
-
this.error(`Failed to start session: ${result.error}`);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
// Track successful session spawn
|
|
406
|
-
telemetry.trackSession("started", {
|
|
407
|
-
agent: resolvedAgent,
|
|
408
|
-
mode: resolvedReadOnly ? "read-only" : "full",
|
|
409
|
-
});
|
|
410
|
-
|
|
411
|
-
// Best-effort: also write session record to the shared store (local JSON remains source of truth/fallback)
|
|
412
|
-
try {
|
|
413
|
-
const client = getHttpClient();
|
|
414
|
-
const session = manager.get(result.session_id);
|
|
415
|
-
|
|
416
|
-
await client.mutation(api.sessions.create, {
|
|
417
|
-
sessionId: result.session_id,
|
|
418
|
-
agent: resolvedAgent as AgentType,
|
|
419
|
-
project: resolvedProject,
|
|
420
|
-
goal: goal || undefined,
|
|
421
|
-
issue: flags.issue,
|
|
422
|
-
status: session?.status ?? "running",
|
|
423
|
-
pid: result.pid || undefined,
|
|
424
|
-
cwd: session?.cwd ?? resolvedCwd,
|
|
425
|
-
deviceId: getDeviceId(),
|
|
426
|
-
parentSessionId: flags.parent,
|
|
427
|
-
traceId: result.trace_id,
|
|
428
|
-
promptPath: result.prompt_path,
|
|
429
|
-
outputPath: result.output_path,
|
|
430
|
-
metadata: {
|
|
431
|
-
readOnly: resolvedReadOnly,
|
|
432
|
-
reuseSessionIds,
|
|
433
|
-
reinjectMode,
|
|
434
|
-
resultPath: result.result_path,
|
|
435
|
-
},
|
|
436
|
-
});
|
|
437
|
-
|
|
438
|
-
// If --await completed the session already, also persist an endedAt timestamp.
|
|
439
|
-
if (session && session.status !== "running") {
|
|
440
|
-
await client.mutation(api.sessions.update, {
|
|
441
|
-
sessionId: result.session_id,
|
|
442
|
-
status: session.status,
|
|
443
|
-
endedAt: Date.now(),
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
} catch (error) {
|
|
447
|
-
this.logWarn(
|
|
448
|
-
`Store write failed (continuing with local session files): ${(error as Error).message}`,
|
|
449
|
-
);
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
const isJson = flags.json || flags.format === "json";
|
|
453
|
-
|
|
454
|
-
if (!isJson) {
|
|
455
|
-
this.log(`Session started: ${result.session_id}`);
|
|
456
|
-
this.log(`Agent: ${resolvedAgent}`);
|
|
457
|
-
this.log(`PID: ${result.pid}`);
|
|
458
|
-
this.log(`Trace ID: ${result.trace_id}`);
|
|
459
|
-
if (result.read_only) {
|
|
460
|
-
this.log(`Mode: READ-ONLY`);
|
|
461
|
-
}
|
|
462
|
-
if (reuseSessionIds.length > 0 && reinjectMode !== "off") {
|
|
463
|
-
this.log(`Reinject: ${reinjectMode}`);
|
|
464
|
-
this.log(`Reuse sessions: ${reuseSessionIds.join(", ")}`);
|
|
465
|
-
}
|
|
466
|
-
this.log(`Prompt: ${result.prompt_path}`);
|
|
467
|
-
this.log(`Output: ${result.output_path}`);
|
|
468
|
-
this.log(`Result: ${result.result_path}`);
|
|
469
|
-
this.log("");
|
|
470
|
-
this.log(`Attach with: abbie session attach ${result.session_id}`);
|
|
471
|
-
this.log(`Stop with: abbie session stop ${result.session_id}`);
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
if (flags.await) {
|
|
475
|
-
// When awaitCompletion is true, manager.start() already blocked until completion.
|
|
476
|
-
// Read canonical result envelope (with legacy fallback for older sessions).
|
|
477
|
-
const session = manager.get(result.session_id);
|
|
478
|
-
const resultPath = session?.result_path || result.result_path;
|
|
479
|
-
const outputPath = session?.output_path || result.output_path;
|
|
480
|
-
|
|
481
|
-
let output: unknown;
|
|
482
|
-
let awaitStatus: "completed" | "stopped" | "failed" = "failed";
|
|
483
|
-
|
|
484
|
-
const sessionResult = resultPath ? readSessionResult(resultPath) : null;
|
|
485
|
-
if (sessionResult) {
|
|
486
|
-
output = sessionResult;
|
|
487
|
-
awaitStatus = sessionResult.status;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
if (!sessionResult && session) {
|
|
491
|
-
if (session.status === "completed") {
|
|
492
|
-
awaitStatus = "completed";
|
|
493
|
-
} else if (session.status === "stopped") {
|
|
494
|
-
awaitStatus = "stopped";
|
|
495
|
-
} else {
|
|
496
|
-
awaitStatus = "failed";
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
if (!sessionResult && outputPath && existsSync(outputPath)) {
|
|
501
|
-
const raw = readFileSync(outputPath, "utf-8").trim();
|
|
502
|
-
if (raw) {
|
|
503
|
-
try {
|
|
504
|
-
output = JSON.parse(raw);
|
|
505
|
-
} catch {
|
|
506
|
-
output = raw;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
// Validate output against contract schema (warn on invalid, don't block)
|
|
512
|
-
let contractValidation: { valid: boolean; errors: string[] } | undefined;
|
|
513
|
-
const contractCandidate =
|
|
514
|
-
typeof output === "object" &&
|
|
515
|
-
output !== null &&
|
|
516
|
-
"output" in output &&
|
|
517
|
-
typeof (output as { output?: unknown }).output === "object" &&
|
|
518
|
-
(output as { output?: { parsed?: unknown } }).output?.parsed !== undefined
|
|
519
|
-
? (output as { output: { parsed?: unknown } }).output.parsed
|
|
520
|
-
: output;
|
|
521
|
-
|
|
522
|
-
if (typeof contractCandidate === "object" && contractCandidate !== null) {
|
|
523
|
-
const validation = validateOutputContract(contractCandidate);
|
|
524
|
-
contractValidation = { valid: validation.valid, errors: validation.errors };
|
|
525
|
-
if (!validation.valid && !isJson) {
|
|
526
|
-
this.logWarn(`Output contract validation: ${validation.errors.join(", ")}`);
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
const sessionTraceUrl = normalizeTraceUrl(session?.trace_url ?? "");
|
|
531
|
-
const extractedTraceUrl = extractTraceUrl(contractCandidate) ?? extractTraceUrl(output);
|
|
532
|
-
const traceUrlToPersist = sessionTraceUrl ?? extractedTraceUrl;
|
|
533
|
-
if (traceUrlToPersist) {
|
|
534
|
-
try {
|
|
535
|
-
const client = getHttpClient();
|
|
536
|
-
await client.mutation(api.sessions.update, {
|
|
537
|
-
sessionId: result.session_id,
|
|
538
|
-
traceUrl: traceUrlToPersist,
|
|
539
|
-
metadata: {
|
|
540
|
-
trace_url: traceUrlToPersist,
|
|
541
|
-
traceUrl: traceUrlToPersist,
|
|
542
|
-
traceUrlSource: sessionTraceUrl ? "runner" : "output",
|
|
543
|
-
},
|
|
544
|
-
});
|
|
545
|
-
} catch (error) {
|
|
546
|
-
if (!isJson) {
|
|
547
|
-
this.logWarn(`Failed to persist trace URL: ${(error as Error).message}`);
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
const awaitResult = { status: awaitStatus, output, contractValidation };
|
|
553
|
-
const combined = { session: result, await: awaitResult };
|
|
554
|
-
|
|
555
|
-
if (isJson) {
|
|
556
|
-
return combined;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
if (awaitResult.status === "stopped") {
|
|
560
|
-
this.logInfo(`Session ${result.session_id} was stopped`);
|
|
561
|
-
} else if (awaitResult.status === "failed") {
|
|
562
|
-
this.logInfo(`Session ${result.session_id} failed`);
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
if (typeof awaitResult.output === "string") {
|
|
566
|
-
this.log(awaitResult.output);
|
|
567
|
-
} else if (awaitResult.output !== undefined) {
|
|
568
|
-
this.log(JSON.stringify(awaitResult.output, null, 2));
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
return combined;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
if (isJson) {
|
|
575
|
-
return result;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
return result;
|
|
579
|
-
}
|
|
580
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Flags } from "@oclif/core";
|
|
2
|
-
import { SessionStateManager } from "../../../../lib/session-state.js";
|
|
3
|
-
import { BaseCommand } from "../../../base-command.js";
|
|
4
|
-
|
|
5
|
-
export default class SessionStateCleanup extends BaseCommand {
|
|
6
|
-
static override description = "Clean up zombie and old session state records";
|
|
7
|
-
static override hidden = false;
|
|
8
|
-
|
|
9
|
-
static override examples = [
|
|
10
|
-
"<%= config.bin %> session state cleanup --older-than 7d --json",
|
|
11
|
-
"<%= config.bin %> session state cleanup --older-than 30d --dry-run --json",
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
static override flags = {
|
|
15
|
-
...BaseCommand.baseFlags,
|
|
16
|
-
"older-than": Flags.string({
|
|
17
|
-
description: "Delete ended sessions older than this duration (e.g., 7d, 12h, 30m)",
|
|
18
|
-
default: "7d",
|
|
19
|
-
}),
|
|
20
|
-
"dry-run": Flags.boolean({
|
|
21
|
-
description: "Show what would be changed without modifying the database",
|
|
22
|
-
default: false,
|
|
23
|
-
}),
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
protected async execute(): Promise<unknown> {
|
|
27
|
-
const { flags } = await this.parse(SessionStateCleanup);
|
|
28
|
-
this.parsedFlags = flags;
|
|
29
|
-
|
|
30
|
-
const manager = new SessionStateManager();
|
|
31
|
-
const result = manager.cleanup({
|
|
32
|
-
olderThan: flags["older-than"],
|
|
33
|
-
dryRun: flags["dry-run"],
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
if (flags.json || flags.format === "json") {
|
|
37
|
-
return result;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const verb = result.dry_run ? "Would clean" : "Cleaned";
|
|
41
|
-
this.logInfo(
|
|
42
|
-
`${verb} session state: ${result.zombies.length} zombies, ${result.deleted.length} deleted`,
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
if (result.zombies.length > 0) {
|
|
46
|
-
this.logInfo("\nZombies:");
|
|
47
|
-
for (const s of result.zombies) {
|
|
48
|
-
this.logInfo(`- ${s.session_id} (pid ${s.pid ?? "?"})`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (result.deleted.length > 0) {
|
|
53
|
-
this.logInfo("\nDeleted:");
|
|
54
|
-
for (const d of result.deleted) {
|
|
55
|
-
this.logInfo(`- ${d.session_id} (ended_at ${d.ended_at ?? "?"})`);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return result;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Flags } from "@oclif/core";
|
|
2
|
-
import { SessionStateManager, type SessionStateStatus } from "../../../../lib/session-state.js";
|
|
3
|
-
import { BaseCommand } from "../../../base-command.js";
|
|
4
|
-
|
|
5
|
-
export default class SessionStateEnd extends BaseCommand {
|
|
6
|
-
static override description = "End a session state record";
|
|
7
|
-
static override hidden = false;
|
|
8
|
-
|
|
9
|
-
static override examples = [
|
|
10
|
-
"<%= config.bin %> session state end --session test-123 --status completed --json",
|
|
11
|
-
"<%= config.bin %> session state end --session test-123 --status failed --json",
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
static override flags = {
|
|
15
|
-
...BaseCommand.baseFlags,
|
|
16
|
-
session: Flags.string({
|
|
17
|
-
description: "Session ID",
|
|
18
|
-
required: true,
|
|
19
|
-
}),
|
|
20
|
-
status: Flags.string({
|
|
21
|
-
description: "End status",
|
|
22
|
-
options: ["completed", "failed", "stopped"],
|
|
23
|
-
}),
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
protected async execute(): Promise<unknown> {
|
|
27
|
-
const { flags } = await this.parse(SessionStateEnd);
|
|
28
|
-
this.parsedFlags = flags;
|
|
29
|
-
|
|
30
|
-
const manager = new SessionStateManager();
|
|
31
|
-
const record = manager.end({
|
|
32
|
-
sessionId: flags.session,
|
|
33
|
-
status: (flags.status as Exclude<SessionStateStatus, "active"> | undefined) ?? "completed",
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
if (!record) {
|
|
37
|
-
this.error(`Session not found: ${flags.session}`);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (flags.json || flags.format === "json") {
|
|
41
|
-
return record;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
this.logInfo(`Ended session: ${record.session_id} (${record.status})`);
|
|
45
|
-
return record;
|
|
46
|
-
}
|
|
47
|
-
}
|