aimux-cli 0.1.16 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +184 -67
- package/bin/aimux-dev +10 -0
- package/dist/agent-events.js +0 -1
- package/dist/agent-output-parser.js +0 -1
- package/dist/agent-prompt-delivery.js +0 -1
- package/dist/agent-tracker.js +0 -1
- package/dist/agent-watcher.js +0 -1
- package/dist/alert-display.d.ts +21 -0
- package/dist/alert-display.js +85 -0
- package/dist/atomic-write.js +0 -1
- package/dist/attachment-store.d.ts +0 -7
- package/dist/attachment-store.js +2 -87
- package/dist/builtin-metadata-watchers.js +4 -5
- package/dist/claude-hooks.d.ts +1 -0
- package/dist/claude-hooks.js +25 -1
- package/dist/config.d.ts +19 -13
- package/dist/config.js +28 -15
- package/dist/connection-targets.d.ts +8 -0
- package/dist/connection-targets.js +27 -0
- package/dist/context/compactor.js +0 -1
- package/dist/context/context-bridge.js +0 -1
- package/dist/context/context-file.js +0 -1
- package/dist/context/history.js +0 -1
- package/dist/credentials.d.ts +12 -0
- package/dist/credentials.js +48 -0
- package/dist/daemon.d.ts +23 -0
- package/dist/daemon.js +391 -67
- package/dist/dashboard/command-spec.js +0 -1
- package/dist/dashboard/feedback.js +0 -1
- package/dist/dashboard/index.d.ts +13 -10
- package/dist/dashboard/index.js +3 -27
- package/dist/dashboard/operation-failures.js +0 -1
- package/dist/dashboard/order.d.ts +22 -0
- package/dist/dashboard/order.js +54 -0
- package/dist/dashboard/pending-actions.d.ts +39 -10
- package/dist/dashboard/pending-actions.js +166 -37
- package/dist/dashboard/quick-jump.d.ts +2 -1
- package/dist/dashboard/quick-jump.js +7 -5
- package/dist/dashboard/runtime-evidence.js +0 -1
- package/dist/dashboard/session-actions.d.ts +4 -4
- package/dist/dashboard/session-actions.js +1 -2
- package/dist/dashboard/session-registry.d.ts +4 -3
- package/dist/dashboard/session-registry.js +16 -51
- package/dist/dashboard/sort.js +0 -1
- package/dist/dashboard/state.d.ts +1 -1
- package/dist/dashboard/state.js +0 -1
- package/dist/dashboard/targets.js +0 -1
- package/dist/dashboard/ui-state-store.d.ts +16 -1
- package/dist/dashboard/ui-state-store.js +73 -3
- package/dist/debug-state.d.ts +97 -0
- package/dist/debug-state.js +540 -0
- package/dist/debug.d.ts +38 -0
- package/dist/debug.js +219 -16
- package/dist/default-plugins/gh-pr-context.d.ts +2 -1
- package/dist/default-plugins/gh-pr-context.js +17 -12
- package/dist/default-plugins/transcript-length.js +15 -3
- package/dist/fast-control.js +37 -20
- package/dist/hotkeys.js +0 -1
- package/dist/http-client.js +31 -3
- package/dist/key-parser.js +0 -1
- package/dist/last-used.js +0 -1
- package/dist/local-ui-server.d.ts +22 -0
- package/dist/local-ui-server.js +185 -0
- package/dist/login-flow.d.ts +7 -0
- package/dist/login-flow.js +119 -0
- package/dist/main.js +821 -152
- package/dist/managed-launch-env.js +14 -1
- package/dist/metadata-server.d.ts +36 -36
- package/dist/metadata-server.js +638 -138
- package/dist/metadata-store.d.ts +4 -1
- package/dist/metadata-store.js +30 -3
- package/dist/multiplexer/agent-io-methods.d.ts +2 -10
- package/dist/multiplexer/agent-io-methods.js +12 -44
- package/dist/multiplexer/archives.js +8 -10
- package/dist/multiplexer/dashboard-actions-methods.js +0 -1
- package/dist/multiplexer/dashboard-control.js +45 -14
- package/dist/multiplexer/dashboard-interaction.d.ts +8 -2
- package/dist/multiplexer/dashboard-interaction.js +187 -29
- package/dist/multiplexer/dashboard-model.d.ts +10 -3
- package/dist/multiplexer/dashboard-model.js +417 -36
- package/dist/multiplexer/dashboard-ops.d.ts +9 -7
- package/dist/multiplexer/dashboard-ops.js +178 -69
- package/dist/multiplexer/dashboard-state-methods.d.ts +2 -1
- package/dist/multiplexer/dashboard-state-methods.js +3 -3
- package/dist/multiplexer/dashboard-tail-methods.d.ts +22 -10
- package/dist/multiplexer/dashboard-tail-methods.js +164 -48
- package/dist/multiplexer/dashboard-view-methods.d.ts +1 -1
- package/dist/multiplexer/dashboard-view-methods.js +23 -9
- package/dist/multiplexer/graveyard-view-model.d.ts +9 -1
- package/dist/multiplexer/graveyard-view-model.js +39 -1
- package/dist/multiplexer/index.d.ts +15 -12
- package/dist/multiplexer/index.js +64 -44
- package/dist/multiplexer/navigation.js +0 -1
- package/dist/multiplexer/notifications.js +107 -25
- package/dist/multiplexer/persistence-methods.d.ts +31 -4
- package/dist/multiplexer/persistence-methods.js +304 -309
- package/dist/multiplexer/runtime-lifecycle-methods.d.ts +8 -10
- package/dist/multiplexer/runtime-lifecycle-methods.js +104 -87
- package/dist/multiplexer/runtime-state.d.ts +8 -10
- package/dist/multiplexer/runtime-state.js +82 -146
- package/dist/multiplexer/runtime-sync.d.ts +2 -10
- package/dist/multiplexer/runtime-sync.js +3 -19
- package/dist/multiplexer/service-state-snapshot.d.ts +2 -4
- package/dist/multiplexer/service-state-snapshot.js +4 -52
- package/dist/multiplexer/services.d.ts +1 -0
- package/dist/multiplexer/services.js +55 -6
- package/dist/multiplexer/session-capture.d.ts +1 -0
- package/dist/multiplexer/session-capture.js +23 -0
- package/dist/multiplexer/session-launch.d.ts +4 -1
- package/dist/multiplexer/session-launch.js +152 -64
- package/dist/multiplexer/session-runtime-core.d.ts +8 -20
- package/dist/multiplexer/session-runtime-core.js +40 -136
- package/dist/multiplexer/subscreens.js +10 -4
- package/dist/multiplexer/tool-picker.js +0 -1
- package/dist/multiplexer/worktree-graveyard.d.ts +0 -1
- package/dist/multiplexer/worktree-graveyard.js +15 -17
- package/dist/multiplexer/worktrees.js +96 -41
- package/dist/notification-context.js +8 -5
- package/dist/notifications.js +163 -102
- package/dist/notify.d.ts +4 -0
- package/dist/notify.js +14 -1
- package/dist/orchestration-actions.js +0 -1
- package/dist/orchestration-routing.js +0 -1
- package/dist/orchestration.js +0 -1
- package/dist/osc-notifications.js +0 -1
- package/dist/paths.d.ts +32 -7
- package/dist/paths.js +82 -59
- package/dist/pending-actions.d.ts +5 -0
- package/dist/pending-actions.js +13 -0
- package/dist/plugin-runtime.js +9 -3
- package/dist/project-events.d.ts +1 -10
- package/dist/project-events.js +0 -11
- package/dist/project-scanner.d.ts +2 -3
- package/dist/project-scanner.js +58 -130
- package/dist/project-service-manifest.d.ts +1 -3
- package/dist/project-service-manifest.js +1 -4
- package/dist/recency.js +0 -1
- package/dist/recorder.js +0 -1
- package/dist/relay-client.d.ts +30 -0
- package/dist/relay-client.js +190 -0
- package/dist/remote-access.d.ts +16 -0
- package/dist/remote-access.js +90 -0
- package/dist/runtime-core/exchange-derived.d.ts +2 -0
- package/dist/runtime-core/exchange-derived.js +153 -0
- package/dist/runtime-core/exchange-import.d.ts +24 -0
- package/dist/runtime-core/exchange-import.js +317 -0
- package/dist/runtime-core/exchange-store.d.ts +157 -0
- package/dist/runtime-core/exchange-store.js +452 -0
- package/dist/runtime-core/topology-services.d.ts +38 -0
- package/dist/runtime-core/topology-services.js +170 -0
- package/dist/runtime-core/topology-sessions.d.ts +52 -0
- package/dist/runtime-core/topology-sessions.js +238 -0
- package/dist/runtime-core/topology-store.d.ts +171 -0
- package/dist/runtime-core/topology-store.js +419 -0
- package/dist/runtime-core/topology-worktrees.d.ts +60 -0
- package/dist/runtime-core/topology-worktrees.js +199 -0
- package/dist/runtime-migration.d.ts +69 -0
- package/dist/runtime-migration.js +398 -0
- package/dist/session-bootstrap.d.ts +8 -6
- package/dist/session-bootstrap.js +51 -159
- package/dist/session-runtime.d.ts +2 -0
- package/dist/session-runtime.js +1 -1
- package/dist/session-semantics.d.ts +12 -4
- package/dist/session-semantics.js +14 -1
- package/dist/shell-args.js +0 -1
- package/dist/shell-hooks.js +32 -11
- package/dist/shell-state.d.ts +2 -0
- package/dist/shell-state.js +26 -2
- package/dist/status-detector.js +0 -1
- package/dist/statusline-model.d.ts +10 -2
- package/dist/statusline-model.js +106 -31
- package/dist/task-workflow.d.ts +6 -9
- package/dist/task-workflow.js +37 -85
- package/dist/tasks.d.ts +6 -33
- package/dist/tasks.js +46 -89
- package/dist/team.d.ts +29 -0
- package/dist/team.js +40 -1
- package/dist/terminal-host.js +0 -1
- package/dist/threads.d.ts +6 -35
- package/dist/threads.js +89 -99
- package/dist/tmux/doctor.js +0 -1
- package/dist/tmux/inbox-popup.js +37 -16
- package/dist/tmux/runtime-manager.d.ts +3 -0
- package/dist/tmux/runtime-manager.js +21 -5
- package/dist/tmux/session-transport.js +0 -1
- package/dist/tmux/statusline-cache.js +0 -1
- package/dist/tmux/statusline.js +49 -10
- package/dist/tmux/switcher.js +0 -1
- package/dist/tmux/window-open.js +1 -3
- package/dist/tool-output-watchers.d.ts +0 -18
- package/dist/tool-output-watchers.js +0 -323
- package/dist/tui/render/box.js +0 -1
- package/dist/tui/render/text.js +0 -1
- package/dist/tui/screens/dashboard-renderers.js +37 -26
- package/dist/tui/screens/overlay-renderers.d.ts +2 -0
- package/dist/tui/screens/overlay-renderers.js +37 -2
- package/dist/tui/screens/subscreen-renderers.js +7 -1
- package/dist/workflow.js +0 -1
- package/dist/worktree.js +17 -1
- package/dist-ui/_expo/static/css/web-30453ede1678c16acb08b97e83e8646d.css +1 -0
- package/dist-ui/_expo/static/js/web/entry-477c745b2adc79367a4380ecf07d9ff6.js +14620 -0
- package/dist-ui/assets/assets/images/icon.a5413dcd2e811c9f2317d01a28118d8a.png +0 -0
- package/dist-ui/assets/node_modules/@react-navigation/elements/lib/module/assets/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png +0 -0
- package/dist-ui/assets/node_modules/@react-navigation/elements/lib/module/assets/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png +0 -0
- package/dist-ui/assets/node_modules/@react-navigation/elements/lib/module/assets/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png +0 -0
- package/dist-ui/assets/node_modules/@react-navigation/elements/lib/module/assets/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png +0 -0
- package/dist-ui/assets/node_modules/@react-navigation/elements/lib/module/assets/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png +0 -0
- package/dist-ui/assets/node_modules/@react-navigation/elements/lib/module/assets/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png +0 -0
- package/dist-ui/assets/node_modules/@react-navigation/elements/lib/module/assets/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png +0 -0
- package/dist-ui/assets/node_modules/@react-navigation/elements/lib/module/assets/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png +0 -0
- package/dist-ui/assets/node_modules/@react-navigation/elements/lib/module/assets/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png +0 -0
- package/dist-ui/assets/node_modules/@react-navigation/elements/lib/module/assets/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png +0 -0
- package/dist-ui/assets/node_modules/@react-navigation/elements/lib/module/assets/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png +0 -0
- package/dist-ui/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png +0 -0
- package/dist-ui/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png +0 -0
- package/dist-ui/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png +0 -0
- package/dist-ui/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png +0 -0
- package/dist-ui/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png +0 -0
- package/dist-ui/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png +0 -0
- package/dist-ui/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png +0 -0
- package/dist-ui/favicon.ico +0 -0
- package/dist-ui/index.html +38 -0
- package/dist-ui/metadata.json +1 -0
- package/package.json +29 -12
- package/dist/agent-events.js.map +0 -1
- package/dist/agent-message-parts.d.ts +0 -17
- package/dist/agent-message-parts.js +0 -31
- package/dist/agent-message-parts.js.map +0 -1
- package/dist/agent-output-parser.js.map +0 -1
- package/dist/agent-prompt-delivery.js.map +0 -1
- package/dist/agent-tracker.js.map +0 -1
- package/dist/agent-watcher.js.map +0 -1
- package/dist/atomic-write.js.map +0 -1
- package/dist/attachment-store.js.map +0 -1
- package/dist/builtin-metadata-watchers.js.map +0 -1
- package/dist/claude-hooks.js.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/context/compactor.js.map +0 -1
- package/dist/context/context-bridge.js.map +0 -1
- package/dist/context/context-file.js.map +0 -1
- package/dist/context/history.js.map +0 -1
- package/dist/daemon.js.map +0 -1
- package/dist/dashboard/command-spec.js.map +0 -1
- package/dist/dashboard/feedback.js.map +0 -1
- package/dist/dashboard/index.js.map +0 -1
- package/dist/dashboard/operation-failures.js.map +0 -1
- package/dist/dashboard/pending-actions.js.map +0 -1
- package/dist/dashboard/quick-jump.js.map +0 -1
- package/dist/dashboard/runtime-evidence.js.map +0 -1
- package/dist/dashboard/session-actions.js.map +0 -1
- package/dist/dashboard/session-registry.js.map +0 -1
- package/dist/dashboard/sort.js.map +0 -1
- package/dist/dashboard/state.js.map +0 -1
- package/dist/dashboard/targets.js.map +0 -1
- package/dist/dashboard/ui-state-store.js.map +0 -1
- package/dist/debug.js.map +0 -1
- package/dist/default-plugins/gh-pr-context.js.map +0 -1
- package/dist/default-plugins/transcript-length.js.map +0 -1
- package/dist/fast-control.js.map +0 -1
- package/dist/hotkeys.js.map +0 -1
- package/dist/http-client.js.map +0 -1
- package/dist/instance-directory.d.ts +0 -32
- package/dist/instance-directory.js +0 -82
- package/dist/instance-directory.js.map +0 -1
- package/dist/instance-registry.d.ts +0 -39
- package/dist/instance-registry.js +0 -208
- package/dist/instance-registry.js.map +0 -1
- package/dist/key-parser.js.map +0 -1
- package/dist/last-used.js.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/managed-launch-env.js.map +0 -1
- package/dist/metadata-server.js.map +0 -1
- package/dist/metadata-store.js.map +0 -1
- package/dist/multiplexer/agent-io-methods.js.map +0 -1
- package/dist/multiplexer/archives.js.map +0 -1
- package/dist/multiplexer/dashboard-actions-methods.js.map +0 -1
- package/dist/multiplexer/dashboard-control.js.map +0 -1
- package/dist/multiplexer/dashboard-interaction.js.map +0 -1
- package/dist/multiplexer/dashboard-model.js.map +0 -1
- package/dist/multiplexer/dashboard-ops.js.map +0 -1
- package/dist/multiplexer/dashboard-state-methods.js.map +0 -1
- package/dist/multiplexer/dashboard-tail-methods.js.map +0 -1
- package/dist/multiplexer/dashboard-view-methods.js.map +0 -1
- package/dist/multiplexer/graveyard-view-model.js.map +0 -1
- package/dist/multiplexer/index.js.map +0 -1
- package/dist/multiplexer/navigation.js.map +0 -1
- package/dist/multiplexer/notifications.js.map +0 -1
- package/dist/multiplexer/persistence-methods.js.map +0 -1
- package/dist/multiplexer/runtime-lifecycle-methods.js.map +0 -1
- package/dist/multiplexer/runtime-state.js.map +0 -1
- package/dist/multiplexer/runtime-sync.js.map +0 -1
- package/dist/multiplexer/service-state-snapshot.js.map +0 -1
- package/dist/multiplexer/services.js.map +0 -1
- package/dist/multiplexer/session-actions.d.ts +0 -40
- package/dist/multiplexer/session-actions.js +0 -110
- package/dist/multiplexer/session-actions.js.map +0 -1
- package/dist/multiplexer/session-launch.js.map +0 -1
- package/dist/multiplexer/session-runtime-core.js.map +0 -1
- package/dist/multiplexer/subscreens.js.map +0 -1
- package/dist/multiplexer/tool-picker.js.map +0 -1
- package/dist/multiplexer/worktree-graveyard.js.map +0 -1
- package/dist/multiplexer/worktrees.js.map +0 -1
- package/dist/notification-context.js.map +0 -1
- package/dist/notifications.js.map +0 -1
- package/dist/notify.js.map +0 -1
- package/dist/orchestration-actions.js.map +0 -1
- package/dist/orchestration-dispatcher.d.ts +0 -25
- package/dist/orchestration-dispatcher.js +0 -59
- package/dist/orchestration-dispatcher.js.map +0 -1
- package/dist/orchestration-routing.js.map +0 -1
- package/dist/orchestration.js.map +0 -1
- package/dist/osc-notifications.js.map +0 -1
- package/dist/paths.js.map +0 -1
- package/dist/plugin-runtime.js.map +0 -1
- package/dist/project-events.js.map +0 -1
- package/dist/project-scanner.js.map +0 -1
- package/dist/project-service-manifest.js.map +0 -1
- package/dist/recency.js.map +0 -1
- package/dist/recorder.js.map +0 -1
- package/dist/session-bootstrap.js.map +0 -1
- package/dist/session-input-operations.d.ts +0 -19
- package/dist/session-input-operations.js +0 -46
- package/dist/session-input-operations.js.map +0 -1
- package/dist/session-message-history.d.ts +0 -27
- package/dist/session-message-history.js +0 -105
- package/dist/session-message-history.js.map +0 -1
- package/dist/session-runtime.js.map +0 -1
- package/dist/session-semantics.js.map +0 -1
- package/dist/shell-args.js.map +0 -1
- package/dist/shell-hooks.js.map +0 -1
- package/dist/shell-state.js.map +0 -1
- package/dist/status-detector.js.map +0 -1
- package/dist/statusline-model.js.map +0 -1
- package/dist/task-dispatcher.d.ts +0 -64
- package/dist/task-dispatcher.js +0 -213
- package/dist/task-dispatcher.js.map +0 -1
- package/dist/task-workflow.js.map +0 -1
- package/dist/tasks.js.map +0 -1
- package/dist/team.js.map +0 -1
- package/dist/terminal-host.js.map +0 -1
- package/dist/threads.js.map +0 -1
- package/dist/tmux/doctor.js.map +0 -1
- package/dist/tmux/inbox-popup.js.map +0 -1
- package/dist/tmux/runtime-manager.js.map +0 -1
- package/dist/tmux/session-transport.js.map +0 -1
- package/dist/tmux/statusline-cache.js.map +0 -1
- package/dist/tmux/statusline.js.map +0 -1
- package/dist/tmux/switcher.js.map +0 -1
- package/dist/tmux/window-open.js.map +0 -1
- package/dist/tool-output-watchers.js.map +0 -1
- package/dist/tui/render/box.js.map +0 -1
- package/dist/tui/render/text.js.map +0 -1
- package/dist/tui/screens/dashboard-renderers.js.map +0 -1
- package/dist/tui/screens/overlay-renderers.js.map +0 -1
- package/dist/tui/screens/subscreen-renderers.js.map +0 -1
- package/dist/workflow.js.map +0 -1
- package/dist/worktree.js.map +0 -1
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { execSync } from "node:child_process";
|
|
2
2
|
import { DASHBOARD_QUICK_JUMP_TIMEOUT_MS, buildDashboardQuickJumpWorktrees, resolveDashboardQuickJumpTarget, } from "../dashboard/quick-jump.js";
|
|
3
|
+
import { selectDashboardTeammates } from "../dashboard/session-registry.js";
|
|
3
4
|
import { clearDashboardOperationFailures } from "../dashboard/operation-failures.js";
|
|
4
5
|
import { parseKeys } from "../key-parser.js";
|
|
5
|
-
import {
|
|
6
|
+
import { isBlockingPendingDashboardActionKind } from "../pending-actions.js";
|
|
7
|
+
import { requestReview } from "../task-workflow.js";
|
|
8
|
+
import { isTeammateSession } from "../team.js";
|
|
6
9
|
function hasBlockingPendingDashboardAction(entry) {
|
|
7
|
-
return (entry?.pendingAction
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
return isBlockingPendingDashboardActionKind(entry?.pendingAction);
|
|
11
|
+
}
|
|
12
|
+
function pendingDashboardItemMessage(entry, fallbackKind) {
|
|
13
|
+
const action = entry.pendingAction ?? "pending";
|
|
14
|
+
const name = entry.label ?? entry.command ?? entry.id ?? fallbackKind;
|
|
15
|
+
return `${fallbackKind === "agent" ? "Agent" : "Service"} ${name} is ${action}`;
|
|
16
|
+
}
|
|
17
|
+
function flashPendingDashboardItem(host, entry, fallbackKind) {
|
|
18
|
+
host.footerFlash = pendingDashboardItemMessage(entry, fallbackKind);
|
|
19
|
+
host.footerFlashTicks = 3;
|
|
20
|
+
host.renderDashboard();
|
|
15
21
|
}
|
|
16
22
|
function findDashboardWorktreeGroup(host, worktreePath) {
|
|
17
23
|
return host.dashboardWorktreeGroupsCache.find((group) => group.path === worktreePath);
|
|
@@ -48,6 +54,73 @@ function refreshSelectedWorktreeEntry(host) {
|
|
|
48
54
|
}
|
|
49
55
|
return host.dashboardState.worktreeEntries[host.dashboardState.sessionIndex];
|
|
50
56
|
}
|
|
57
|
+
function moveSelectedDashboardWorktreeEntry(host, direction) {
|
|
58
|
+
if (host.dashboardState.level !== "sessions")
|
|
59
|
+
return false;
|
|
60
|
+
const selectedEntry = host.dashboardState.worktreeEntries[host.dashboardState.sessionIndex];
|
|
61
|
+
if (!selectedEntry)
|
|
62
|
+
return false;
|
|
63
|
+
const peerEntries = host.dashboardState.worktreeEntries.filter((entry) => entry.kind === selectedEntry.kind);
|
|
64
|
+
const moved = host.dashboardUiStateStore.moveEntryWithinWorktree({
|
|
65
|
+
kind: selectedEntry.kind,
|
|
66
|
+
worktreePath: host.dashboardState.focusedWorktreePath,
|
|
67
|
+
selectedId: selectedEntry.id,
|
|
68
|
+
direction,
|
|
69
|
+
sessions: peerEntries.filter((entry) => entry.kind === "session").map((entry) => ({ id: entry.id })),
|
|
70
|
+
services: peerEntries.filter((entry) => entry.kind === "service").map((entry) => ({ id: entry.id })),
|
|
71
|
+
});
|
|
72
|
+
if (!moved) {
|
|
73
|
+
host.footerFlash = "Already at edge";
|
|
74
|
+
host.footerFlashTicks = 2;
|
|
75
|
+
host.renderDashboard();
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
host.dashboardWorktreeGroupsCache = host.dashboardUiStateStore.orderWorktreeGroups(host.dashboardWorktreeGroupsCache);
|
|
79
|
+
host.updateWorktreeSessions();
|
|
80
|
+
const nextIndex = host.dashboardState.worktreeEntries.findIndex((entry) => entry.kind === selectedEntry.kind && entry.id === selectedEntry.id);
|
|
81
|
+
if (nextIndex >= 0)
|
|
82
|
+
host.dashboardState.sessionIndex = nextIndex;
|
|
83
|
+
host.preferDashboardEntrySelection(selectedEntry.kind, selectedEntry.id, host.dashboardState.focusedWorktreePath);
|
|
84
|
+
host.persistDashboardUiState();
|
|
85
|
+
void host.postToProjectService?.("/statusline/refresh", { force: true }).catch(() => { });
|
|
86
|
+
host.footerFlash = `Moved ${selectedEntry.kind === "session" ? "agent" : "service"} ${direction}`;
|
|
87
|
+
host.footerFlashTicks = 2;
|
|
88
|
+
host.renderDashboard();
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
function selectedDashboardSession(host) {
|
|
92
|
+
const allSessions = host.getDashboardSessions();
|
|
93
|
+
if (host.dashboardState.level === "sessions" && host.dashboardState.worktreeEntries.length > 0) {
|
|
94
|
+
const entry = host.dashboardState.worktreeEntries[host.dashboardState.sessionIndex];
|
|
95
|
+
if (entry?.kind !== "session")
|
|
96
|
+
return undefined;
|
|
97
|
+
return allSessions.find((session) => session.id === entry.id);
|
|
98
|
+
}
|
|
99
|
+
if (!host.dashboardState.hasWorktrees()) {
|
|
100
|
+
return allSessions[host.activeIndex];
|
|
101
|
+
}
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
function teammateParentSession(host) {
|
|
105
|
+
const parentId = host.teammatePickerState?.parentSessionId;
|
|
106
|
+
const selected = selectedDashboardSession(host);
|
|
107
|
+
if (parentId) {
|
|
108
|
+
const parent = host.dashboardSessionsCache?.find((session) => session.id === parentId) ??
|
|
109
|
+
(selected?.id === parentId ? selected : undefined);
|
|
110
|
+
if (parent && !isTeammateSession(parent))
|
|
111
|
+
return parent;
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|
|
114
|
+
if (selected && !isTeammateSession(selected))
|
|
115
|
+
return selected;
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
function teammatePickerEntries(host) {
|
|
119
|
+
return selectDashboardTeammates(host.dashboardTeammatesCache ?? [], teammateParentSession(host));
|
|
120
|
+
}
|
|
121
|
+
function teammatePickerVisibleCount(total) {
|
|
122
|
+
return Math.min(total, Math.max(3, (process.stdout.rows ?? 24) - 10));
|
|
123
|
+
}
|
|
51
124
|
export const dashboardInteractionMethods = {
|
|
52
125
|
clearDashboardQuickJump() {
|
|
53
126
|
if (this.dashboardQuickJumpTimeout) {
|
|
@@ -178,6 +251,11 @@ export const dashboardInteractionMethods = {
|
|
|
178
251
|
this.renderCurrentDashboardView();
|
|
179
252
|
return;
|
|
180
253
|
}
|
|
254
|
+
if (hasWorktrees && this.isDashboardScreen("dashboard") && event.shift && (key === "up" || key === "down")) {
|
|
255
|
+
if (moveSelectedDashboardWorktreeEntry(this, key)) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
181
259
|
switch (key) {
|
|
182
260
|
case "?":
|
|
183
261
|
this.showHelp();
|
|
@@ -188,9 +266,12 @@ export const dashboardInteractionMethods = {
|
|
|
188
266
|
case "v":
|
|
189
267
|
this.showServiceCreatePrompt();
|
|
190
268
|
return;
|
|
269
|
+
case "e":
|
|
270
|
+
this.showTeammatePicker();
|
|
271
|
+
return;
|
|
191
272
|
case "f": {
|
|
192
273
|
const selected = this.getSelectedDashboardSessionForActions();
|
|
193
|
-
if (selected
|
|
274
|
+
if (selected) {
|
|
194
275
|
this.showToolPicker(selected.id);
|
|
195
276
|
}
|
|
196
277
|
else if (hasWorktrees && this.dashboardState.level === "worktrees") {
|
|
@@ -211,14 +292,14 @@ export const dashboardInteractionMethods = {
|
|
|
211
292
|
return;
|
|
212
293
|
case "o": {
|
|
213
294
|
const selected = this.getSelectedDashboardSessionForActions();
|
|
214
|
-
if (selected
|
|
295
|
+
if (selected) {
|
|
215
296
|
this.openRelevantThreadForSession(selected.id);
|
|
216
297
|
}
|
|
217
298
|
return;
|
|
218
299
|
}
|
|
219
300
|
case "R": {
|
|
220
301
|
const selected = this.getSelectedDashboardSessionForActions();
|
|
221
|
-
if (selected
|
|
302
|
+
if (selected) {
|
|
222
303
|
if ((selected.threadWaitingOnMeCount ?? 0) > 0) {
|
|
223
304
|
this.openRelevantThreadForSession(selected.id);
|
|
224
305
|
}
|
|
@@ -263,7 +344,7 @@ export const dashboardInteractionMethods = {
|
|
|
263
344
|
case "x": {
|
|
264
345
|
if (hasWorktrees && this.dashboardState.level === "worktrees" && this.dashboardState.focusedWorktreePath) {
|
|
265
346
|
const focusedGroup = this.dashboardWorktreeGroupsCache.find((group) => group.path === this.dashboardState.focusedWorktreePath);
|
|
266
|
-
if (isRemovingDashboardWorktree(focusedGroup)
|
|
347
|
+
if (isRemovingDashboardWorktree(focusedGroup)) {
|
|
267
348
|
this.footerFlash = blockedRemovingWorktreeMessage(focusedGroup, this.dashboardState.focusedWorktreePath);
|
|
268
349
|
this.footerFlashTicks = 2;
|
|
269
350
|
this.renderDashboard();
|
|
@@ -297,6 +378,7 @@ export const dashboardInteractionMethods = {
|
|
|
297
378
|
const selectedService = this.getSelectedDashboardServiceForActions();
|
|
298
379
|
if (selectedService) {
|
|
299
380
|
if (hasBlockingPendingDashboardAction(selectedService)) {
|
|
381
|
+
flashPendingDashboardItem(this, selectedService, "service");
|
|
300
382
|
return;
|
|
301
383
|
}
|
|
302
384
|
if (selectedService.status === "offline") {
|
|
@@ -321,6 +403,7 @@ export const dashboardInteractionMethods = {
|
|
|
321
403
|
if (!selEntry)
|
|
322
404
|
return;
|
|
323
405
|
if (hasBlockingPendingDashboardAction(selEntry)) {
|
|
406
|
+
flashPendingDashboardItem(this, selEntry, "agent");
|
|
324
407
|
return;
|
|
325
408
|
}
|
|
326
409
|
const runtime = this.sessions.find((s) => s.id === selEntry.id);
|
|
@@ -360,7 +443,7 @@ export const dashboardInteractionMethods = {
|
|
|
360
443
|
: !hasWorktrees
|
|
361
444
|
? allDs2[this.activeIndex]
|
|
362
445
|
: undefined;
|
|
363
|
-
if (selEntry2
|
|
446
|
+
if (selEntry2) {
|
|
364
447
|
this.openDashboardOverlay("label-input");
|
|
365
448
|
this.labelInputBuffer = this.getSessionLabel(selEntry2.id) ?? "";
|
|
366
449
|
this.labelInputTarget = selEntry2.id;
|
|
@@ -513,6 +596,7 @@ export const dashboardInteractionMethods = {
|
|
|
513
596
|
return;
|
|
514
597
|
}
|
|
515
598
|
if (hasBlockingPendingDashboardAction(service)) {
|
|
599
|
+
flashPendingDashboardItem(this, service, "service");
|
|
516
600
|
return;
|
|
517
601
|
}
|
|
518
602
|
this.preferDashboardEntrySelection("service", service.id, service.worktreePath);
|
|
@@ -523,7 +607,7 @@ export const dashboardInteractionMethods = {
|
|
|
523
607
|
}
|
|
524
608
|
await this.waitAndOpenLiveTmuxWindowForService(service.id);
|
|
525
609
|
},
|
|
526
|
-
async activateDashboardEntry(entry) {
|
|
610
|
+
async activateDashboardEntry(entry, options = {}) {
|
|
527
611
|
if (!entry)
|
|
528
612
|
return;
|
|
529
613
|
const worktreeGroup = findDashboardWorktreeGroup(this, entry.worktreePath);
|
|
@@ -534,10 +618,13 @@ export const dashboardInteractionMethods = {
|
|
|
534
618
|
return;
|
|
535
619
|
}
|
|
536
620
|
if (hasBlockingPendingDashboardAction(entry)) {
|
|
621
|
+
flashPendingDashboardItem(this, entry, "agent");
|
|
537
622
|
return;
|
|
538
623
|
}
|
|
539
|
-
|
|
540
|
-
|
|
624
|
+
if (!options.preserveDashboardSelection) {
|
|
625
|
+
this.preferDashboardEntrySelection("session", entry.id, entry.worktreePath);
|
|
626
|
+
this.persistDashboardUiState();
|
|
627
|
+
}
|
|
541
628
|
const openResult = await this.waitAndOpenLiveTmuxWindowForEntry(entry);
|
|
542
629
|
if (openResult !== "missing") {
|
|
543
630
|
if (entry.status === "offline") {
|
|
@@ -546,15 +633,9 @@ export const dashboardInteractionMethods = {
|
|
|
546
633
|
}
|
|
547
634
|
return;
|
|
548
635
|
}
|
|
549
|
-
if (entry.remoteInstanceId) {
|
|
550
|
-
await this.takeoverFromDashEntryWithFeedback(entry);
|
|
551
|
-
return;
|
|
552
|
-
}
|
|
553
636
|
if (entry.status === "offline") {
|
|
554
637
|
const offline = this.offlineSessions.find((session) => session.id === entry.id);
|
|
555
|
-
|
|
556
|
-
await this.resumeOfflineSessionWithFeedback(offline);
|
|
557
|
-
}
|
|
638
|
+
await this.resumeOfflineSessionWithFeedback(offline ?? entry);
|
|
558
639
|
return;
|
|
559
640
|
}
|
|
560
641
|
const ptyIdx = this.sessions.findIndex((session) => session.id === entry.id);
|
|
@@ -563,6 +644,84 @@ export const dashboardInteractionMethods = {
|
|
|
563
644
|
this.focusSession(ptyIdx);
|
|
564
645
|
}
|
|
565
646
|
},
|
|
647
|
+
getTeammatePickerEntries() {
|
|
648
|
+
return teammatePickerEntries(this);
|
|
649
|
+
},
|
|
650
|
+
showTeammatePicker() {
|
|
651
|
+
const parent = teammateParentSession(this);
|
|
652
|
+
if (!parent) {
|
|
653
|
+
this.footerFlash = "Select an agent with teammates";
|
|
654
|
+
this.footerFlashTicks = 2;
|
|
655
|
+
this.renderDashboard();
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
const teammates = selectDashboardTeammates(this.dashboardTeammatesCache ?? [], parent);
|
|
659
|
+
if (teammates.length === 0) {
|
|
660
|
+
this.footerFlash = `${parent.label ?? parent.command} has no teammates`;
|
|
661
|
+
this.footerFlashTicks = 2;
|
|
662
|
+
this.renderDashboard();
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
this.teammatePickerState = { parentSessionId: parent.id, index: 0 };
|
|
666
|
+
this.openDashboardOverlay("teammate-picker");
|
|
667
|
+
this.renderTeammatePicker();
|
|
668
|
+
},
|
|
669
|
+
renderTeammatePicker() {
|
|
670
|
+
this.redrawDashboardWithOverlay();
|
|
671
|
+
},
|
|
672
|
+
handleTeammatePickerKey(data) {
|
|
673
|
+
const events = parseKeys(data);
|
|
674
|
+
if (events.length === 0)
|
|
675
|
+
return;
|
|
676
|
+
const event = events[0];
|
|
677
|
+
const key = event.name || event.char;
|
|
678
|
+
const teammates = teammatePickerEntries(this);
|
|
679
|
+
const visibleTeammates = teammates.slice(0, teammatePickerVisibleCount(teammates.length));
|
|
680
|
+
const selectedIndex = Math.max(0, Math.min(this.teammatePickerState?.index ?? 0, visibleTeammates.length - 1));
|
|
681
|
+
if (key === "escape") {
|
|
682
|
+
this.teammatePickerState = null;
|
|
683
|
+
this.clearDashboardOverlay();
|
|
684
|
+
this.restoreDashboardAfterOverlayDismiss();
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
if (visibleTeammates.length === 0) {
|
|
688
|
+
this.teammatePickerState = null;
|
|
689
|
+
this.clearDashboardOverlay();
|
|
690
|
+
this.restoreDashboardAfterOverlayDismiss();
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
if (key === "down" || key === "j") {
|
|
694
|
+
this.teammatePickerState = {
|
|
695
|
+
parentSessionId: this.teammatePickerState?.parentSessionId ?? teammateParentSession(this)?.id ?? "",
|
|
696
|
+
index: ((this.teammatePickerState?.index ?? 0) + 1) % visibleTeammates.length,
|
|
697
|
+
};
|
|
698
|
+
this.renderTeammatePicker();
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
if (key === "up" || key === "k") {
|
|
702
|
+
this.teammatePickerState = {
|
|
703
|
+
parentSessionId: this.teammatePickerState?.parentSessionId ?? teammateParentSession(this)?.id ?? "",
|
|
704
|
+
index: ((this.teammatePickerState?.index ?? 0) - 1 + visibleTeammates.length) % visibleTeammates.length,
|
|
705
|
+
};
|
|
706
|
+
this.renderTeammatePicker();
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
let targetIndex;
|
|
710
|
+
if (key === "enter" || key === "return") {
|
|
711
|
+
targetIndex = selectedIndex;
|
|
712
|
+
}
|
|
713
|
+
else if (key >= "1" && key <= "9") {
|
|
714
|
+
targetIndex = parseInt(key, 10) - 1;
|
|
715
|
+
}
|
|
716
|
+
if (targetIndex === undefined)
|
|
717
|
+
return;
|
|
718
|
+
const teammate = visibleTeammates[targetIndex];
|
|
719
|
+
if (!teammate)
|
|
720
|
+
return;
|
|
721
|
+
this.teammatePickerState = null;
|
|
722
|
+
this.clearDashboardOverlay();
|
|
723
|
+
void this.activateDashboardEntry(teammate, { preserveDashboardSelection: true });
|
|
724
|
+
},
|
|
566
725
|
handleServiceInputKey(data) {
|
|
567
726
|
const events = parseKeys(data);
|
|
568
727
|
if (events.length === 0)
|
|
@@ -635,7 +794,7 @@ export const dashboardInteractionMethods = {
|
|
|
635
794
|
this.renderLabelInput();
|
|
636
795
|
}
|
|
637
796
|
},
|
|
638
|
-
handleReviewRequest() {
|
|
797
|
+
async handleReviewRequest() {
|
|
639
798
|
const session = this.activeSession;
|
|
640
799
|
if (!session)
|
|
641
800
|
return;
|
|
@@ -645,7 +804,7 @@ export const dashboardInteractionMethods = {
|
|
|
645
804
|
diff = execSync("git diff HEAD", { encoding: "utf-8", timeout: 5000 }).slice(0, 5000) || undefined;
|
|
646
805
|
}
|
|
647
806
|
catch { }
|
|
648
|
-
const reviewTask = requestReview(session.id, role, diff, `Review ${session.command} agent's recent work`);
|
|
807
|
+
const reviewTask = await requestReview(session.id, role, diff, `Review ${session.command} agent's recent work`);
|
|
649
808
|
if (reviewTask) {
|
|
650
809
|
this.footerFlash = `⧫ Review requested → ${reviewTask.assignee ?? "reviewer"}`;
|
|
651
810
|
this.footerFlashTicks = 3;
|
|
@@ -681,7 +840,7 @@ export const dashboardInteractionMethods = {
|
|
|
681
840
|
this.footerFlash = `Sent message to ${count} recipient${count === 1 ? "" : "s"}`;
|
|
682
841
|
}
|
|
683
842
|
else if (mode === "handoff") {
|
|
684
|
-
await this.postToProjectService("/
|
|
843
|
+
await this.postToProjectService("/handoff", {
|
|
685
844
|
...requestBody,
|
|
686
845
|
body,
|
|
687
846
|
});
|
|
@@ -690,7 +849,7 @@ export const dashboardInteractionMethods = {
|
|
|
690
849
|
else {
|
|
691
850
|
await this.postToProjectService("/tasks/assign", {
|
|
692
851
|
...requestBody,
|
|
693
|
-
body,
|
|
852
|
+
description: body,
|
|
694
853
|
});
|
|
695
854
|
this.footerFlash = `Assigned task to ${target.label}`;
|
|
696
855
|
}
|
|
@@ -711,4 +870,3 @@ export const dashboardInteractionMethods = {
|
|
|
711
870
|
this.renderDashboard();
|
|
712
871
|
},
|
|
713
872
|
};
|
|
714
|
-
//# sourceMappingURL=dashboard-interaction.js.map
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { DashboardService, DashboardSession, WorktreeGroup } from "../dashboard/index.js";
|
|
2
2
|
import { type DashboardOperationFailure } from "../dashboard/operation-failures.js";
|
|
3
|
+
import type { PendingServiceActionKind, PendingSessionActionKind, PendingWorktreeActionKind } from "../pending-actions.js";
|
|
3
4
|
type DashboardModelHost = any;
|
|
5
|
+
type MetadataPendingSettle<T> = (result: T) => Promise<boolean> | boolean;
|
|
6
|
+
export declare function withMetadataSessionPending<T>(host: DashboardModelHost, sessionId: string | undefined, kind: PendingSessionActionKind, work: () => Promise<T> | T, sessionSeed?: DashboardSession, settle?: MetadataPendingSettle<T>): Promise<T>;
|
|
7
|
+
export declare function withMetadataServicePending<T>(host: DashboardModelHost, serviceId: string, kind: PendingServiceActionKind, work: () => Promise<T> | T, settle?: MetadataPendingSettle<T>): Promise<T>;
|
|
4
8
|
export declare function buildDashboardWorktreeGroups(_host: DashboardModelHost, dashSessions: DashboardSession[], dashServices: DashboardService[], worktrees: Array<{
|
|
5
9
|
name: string;
|
|
6
10
|
path: string;
|
|
@@ -9,17 +13,19 @@ export declare function buildDashboardWorktreeGroups(_host: DashboardModelHost,
|
|
|
9
13
|
createdAt?: string;
|
|
10
14
|
pending?: boolean;
|
|
11
15
|
removing?: boolean;
|
|
12
|
-
pendingAction?: "creating"
|
|
16
|
+
pendingAction?: Extract<PendingWorktreeActionKind, "creating" | "removing" | "graveyarding">;
|
|
13
17
|
operationFailure?: DashboardOperationFailure;
|
|
14
18
|
}>, mainRepoPath?: string): WorktreeGroup[];
|
|
15
19
|
export declare function composeDashboardWorktreeGroups(worktreeGroups: WorktreeGroup[], dashSessions: DashboardSession[], dashServices: DashboardService[]): WorktreeGroup[];
|
|
16
|
-
export declare function applyDashboardModel(host: DashboardModelHost, dashSessions: DashboardSession[], dashServices: DashboardService[], worktreeGroups: WorktreeGroup[], mainCheckoutInfo: {
|
|
20
|
+
export declare function applyDashboardModel(host: DashboardModelHost, dashSessions: DashboardSession[], dashTeammates: DashboardSession[], dashServices: DashboardService[], worktreeGroups: WorktreeGroup[], mainCheckoutInfo: {
|
|
17
21
|
name: string;
|
|
18
22
|
branch: string;
|
|
19
23
|
}, operationFailures?: DashboardOperationFailure[]): boolean;
|
|
20
24
|
export declare function invalidateDesktopStateSnapshot(host: DashboardModelHost): void;
|
|
21
25
|
export declare function refreshDesktopStateSnapshot(host: DashboardModelHost): void;
|
|
22
|
-
export declare function computeDashboardSessions(host: DashboardModelHost
|
|
26
|
+
export declare function computeDashboardSessions(host: DashboardModelHost, options?: {
|
|
27
|
+
includeTeammates?: boolean;
|
|
28
|
+
}): DashboardSession[];
|
|
23
29
|
export declare function computeDashboardServices(host: DashboardModelHost, worktrees?: any): DashboardService[];
|
|
24
30
|
export declare function readTmuxProcessInfo(host: DashboardModelHost, target: {
|
|
25
31
|
windowId: string;
|
|
@@ -30,6 +36,7 @@ export declare function readTmuxProcessInfo(host: DashboardModelHost, target: {
|
|
|
30
36
|
};
|
|
31
37
|
export declare function buildDesktopStateSnapshot(host: DashboardModelHost): {
|
|
32
38
|
sessions: DashboardSession[];
|
|
39
|
+
teammates: DashboardSession[];
|
|
33
40
|
services: DashboardService[];
|
|
34
41
|
worktrees: any;
|
|
35
42
|
operationFailures: DashboardOperationFailure[];
|