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
|
@@ -4,6 +4,34 @@ import { graveyardSessionWithFeedback as runGraveyardSessionWithFeedback, resume
|
|
|
4
4
|
import { isAttachableDashboardSessionEntry, isLiveDashboardServiceRuntimeEntry, } from "../dashboard/runtime-evidence.js";
|
|
5
5
|
import { isDashboardWindowName } from "../tmux/runtime-manager.js";
|
|
6
6
|
import { generateServiceId, serviceLabelForCommand } from "./services.js";
|
|
7
|
+
const dashboardAgentRestoreQueues = new WeakMap();
|
|
8
|
+
const dashboardQueuedAgentRestores = new WeakMap();
|
|
9
|
+
function queuedAgentRestoresFor(host) {
|
|
10
|
+
let queued = dashboardQueuedAgentRestores.get(host);
|
|
11
|
+
if (!queued) {
|
|
12
|
+
queued = new Set();
|
|
13
|
+
dashboardQueuedAgentRestores.set(host, queued);
|
|
14
|
+
}
|
|
15
|
+
return queued;
|
|
16
|
+
}
|
|
17
|
+
async function enqueueDashboardAgentRestore(host, sessionId, work) {
|
|
18
|
+
const queued = queuedAgentRestoresFor(host);
|
|
19
|
+
if (queued.has(sessionId))
|
|
20
|
+
return;
|
|
21
|
+
queued.add(sessionId);
|
|
22
|
+
const previous = dashboardAgentRestoreQueues.get(host) ?? Promise.resolve();
|
|
23
|
+
const current = previous
|
|
24
|
+
.catch(() => undefined)
|
|
25
|
+
.then(work)
|
|
26
|
+
.finally(() => {
|
|
27
|
+
queued.delete(sessionId);
|
|
28
|
+
if (dashboardAgentRestoreQueues.get(host) === current) {
|
|
29
|
+
dashboardAgentRestoreQueues.delete(host);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
dashboardAgentRestoreQueues.set(host, current);
|
|
33
|
+
await current;
|
|
34
|
+
}
|
|
7
35
|
function buildPendingSessionSeed(input) {
|
|
8
36
|
return {
|
|
9
37
|
index: -1,
|
|
@@ -18,22 +46,34 @@ function buildPendingSessionSeed(input) {
|
|
|
18
46
|
optimistic: true,
|
|
19
47
|
};
|
|
20
48
|
}
|
|
49
|
+
function restoreWarningLines(result) {
|
|
50
|
+
const warning = typeof result?.warning === "string" ? result.warning.trim() : "";
|
|
51
|
+
const failures = Array.isArray(result?.teammateFailures)
|
|
52
|
+
? result.teammateFailures
|
|
53
|
+
.map((failure) => {
|
|
54
|
+
const sessionId = typeof failure?.sessionId === "string" ? failure.sessionId : "";
|
|
55
|
+
const message = typeof failure?.error === "string"
|
|
56
|
+
? failure.error.trim()
|
|
57
|
+
: typeof failure?.message === "string"
|
|
58
|
+
? failure.message.trim()
|
|
59
|
+
: "";
|
|
60
|
+
if (!sessionId || !message)
|
|
61
|
+
return "";
|
|
62
|
+
return message.includes(sessionId) ? message : `${sessionId}: ${message}`;
|
|
63
|
+
})
|
|
64
|
+
.filter((line) => line.trim().length > 0)
|
|
65
|
+
: [];
|
|
66
|
+
if (failures.length > 0)
|
|
67
|
+
return Array.from(new Set(failures));
|
|
68
|
+
if (!warning)
|
|
69
|
+
return [];
|
|
70
|
+
return Array.from(new Set([warning, "Stale teammates remain offline; create a new team to replace them."]));
|
|
71
|
+
}
|
|
21
72
|
function assertDashboardMutationSettled(settled, action) {
|
|
22
73
|
if (!settled) {
|
|
23
74
|
throw new Error(`${action} did not settle before timing out`);
|
|
24
75
|
}
|
|
25
76
|
}
|
|
26
|
-
async function waitForRenderedDashboardSessionState(host, sessionId, predicate, timeoutMs = 10_000) {
|
|
27
|
-
const deadline = Date.now() + timeoutMs;
|
|
28
|
-
while (Date.now() < deadline) {
|
|
29
|
-
await host.refreshDashboardModelFromService(true);
|
|
30
|
-
const session = host.getDashboardSessions().find((entry) => entry.id === sessionId);
|
|
31
|
-
if (predicate(session))
|
|
32
|
-
return true;
|
|
33
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
34
|
-
}
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
77
|
async function refreshDashboardModelAfterAuthoritativeMutation(host) {
|
|
38
78
|
if (typeof host.refreshDashboardModelFromService === "function") {
|
|
39
79
|
await host.refreshDashboardModelFromService(true);
|
|
@@ -165,13 +205,22 @@ async function waitForStableDashboardServiceAbsence(host, serviceId, timeoutMs =
|
|
|
165
205
|
return false;
|
|
166
206
|
}
|
|
167
207
|
async function runDashboardSessionMutation(host, opts) {
|
|
168
|
-
host.setPendingDashboardSessionAction(opts.sessionId, opts.pendingAction, {
|
|
208
|
+
const token = host.setPendingDashboardSessionAction(opts.sessionId, opts.pendingAction, {
|
|
209
|
+
sessionSeed: opts.sessionSeed,
|
|
210
|
+
});
|
|
169
211
|
opts.onBeforeRequest?.();
|
|
170
212
|
host.renderDashboard();
|
|
171
213
|
try {
|
|
172
214
|
await opts.request();
|
|
173
215
|
assertDashboardMutationSettled(await opts.settle(), opts.pendingAction);
|
|
174
|
-
|
|
216
|
+
if (typeof token === "number") {
|
|
217
|
+
if (host.dashboardPendingActions?.clearSessionActionIfToken?.(opts.sessionId, token)) {
|
|
218
|
+
host.reapplyDashboardPendingActions?.();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
host.setPendingDashboardSessionAction(opts.sessionId, null);
|
|
223
|
+
}
|
|
175
224
|
opts.onAfterSettle?.();
|
|
176
225
|
if (opts.successFlash) {
|
|
177
226
|
host.footerFlash = opts.successFlash.message;
|
|
@@ -180,19 +229,35 @@ async function runDashboardSessionMutation(host, opts) {
|
|
|
180
229
|
host.renderDashboard();
|
|
181
230
|
}
|
|
182
231
|
catch (error) {
|
|
183
|
-
|
|
232
|
+
if (typeof token === "number") {
|
|
233
|
+
if (host.dashboardPendingActions?.clearSessionActionIfToken?.(opts.sessionId, token)) {
|
|
234
|
+
host.reapplyDashboardPendingActions?.();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
host.setPendingDashboardSessionAction(opts.sessionId, null);
|
|
239
|
+
}
|
|
184
240
|
await opts.onError?.();
|
|
185
241
|
host.showDashboardError(opts.errorTitle, [error instanceof Error ? error.message : String(error)]);
|
|
186
242
|
}
|
|
187
243
|
}
|
|
188
244
|
async function runDashboardServiceMutation(host, opts) {
|
|
189
|
-
host.
|
|
245
|
+
const token = host.setPendingDashboardServiceAction(opts.serviceId, opts.pendingAction, {
|
|
246
|
+
serviceSeed: opts.serviceSeed,
|
|
247
|
+
});
|
|
190
248
|
opts.onBeforeRequest?.();
|
|
191
249
|
host.renderDashboard();
|
|
192
250
|
try {
|
|
193
251
|
await opts.request();
|
|
194
252
|
assertDashboardMutationSettled(await opts.settle(), opts.pendingAction);
|
|
195
|
-
|
|
253
|
+
if (typeof token === "number") {
|
|
254
|
+
if (host.dashboardPendingActions?.clearServiceActionIfToken?.(opts.serviceId, token)) {
|
|
255
|
+
host.reapplyDashboardPendingActions?.();
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
host.setPendingDashboardServiceAction(opts.serviceId, null);
|
|
260
|
+
}
|
|
196
261
|
opts.onAfterSettle?.();
|
|
197
262
|
if (opts.successFlash) {
|
|
198
263
|
host.footerFlash = opts.successFlash.message;
|
|
@@ -201,7 +266,14 @@ async function runDashboardServiceMutation(host, opts) {
|
|
|
201
266
|
host.renderDashboard();
|
|
202
267
|
}
|
|
203
268
|
catch (error) {
|
|
204
|
-
|
|
269
|
+
if (typeof token === "number") {
|
|
270
|
+
if (host.dashboardPendingActions?.clearServiceActionIfToken?.(opts.serviceId, token)) {
|
|
271
|
+
host.reapplyDashboardPendingActions?.();
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
host.setPendingDashboardServiceAction(opts.serviceId, null);
|
|
276
|
+
}
|
|
205
277
|
await opts.onError?.();
|
|
206
278
|
host.showDashboardError(opts.errorTitle, [error instanceof Error ? error.message : String(error)]);
|
|
207
279
|
}
|
|
@@ -210,19 +282,18 @@ export async function runDashboardOperation(host, title, lines, work, errorTitle
|
|
|
210
282
|
return host.dashboardFeedback.runOperation(title, lines, work, errorTitle);
|
|
211
283
|
}
|
|
212
284
|
export async function spawnDashboardAgentWithFeedback(host, input) {
|
|
285
|
+
const sessionSeed = buildPendingSessionSeed({
|
|
286
|
+
sessionId: input.sessionId,
|
|
287
|
+
tool: input.tool,
|
|
288
|
+
worktreePath: input.worktreePath,
|
|
289
|
+
pendingAction: "creating",
|
|
290
|
+
});
|
|
213
291
|
await runDashboardSessionMutation(host, {
|
|
214
292
|
sessionId: input.sessionId,
|
|
215
293
|
pendingAction: "creating",
|
|
294
|
+
sessionSeed,
|
|
216
295
|
onBeforeRequest: () => {
|
|
217
296
|
host.preferDashboardEntrySelection("session", input.sessionId, input.worktreePath);
|
|
218
|
-
host.setPendingDashboardSessionAction(input.sessionId, "creating", {
|
|
219
|
-
sessionSeed: buildPendingSessionSeed({
|
|
220
|
-
sessionId: input.sessionId,
|
|
221
|
-
tool: input.tool,
|
|
222
|
-
worktreePath: input.worktreePath,
|
|
223
|
-
pendingAction: "creating",
|
|
224
|
-
}),
|
|
225
|
-
});
|
|
226
297
|
},
|
|
227
298
|
request: async () => {
|
|
228
299
|
await host.postToProjectService("/agents/spawn", {
|
|
@@ -233,25 +304,24 @@ export async function spawnDashboardAgentWithFeedback(host, input) {
|
|
|
233
304
|
open: false,
|
|
234
305
|
}, { timeoutMs: 10_000 });
|
|
235
306
|
},
|
|
236
|
-
settle: () =>
|
|
307
|
+
settle: () => waitForDashboardSessionResumeSettle(host, input.sessionId),
|
|
237
308
|
onError: () => host.refreshDashboardModelFromService(true),
|
|
238
309
|
errorTitle: `Failed to create ${input.tool} agent`,
|
|
239
310
|
});
|
|
240
311
|
}
|
|
241
312
|
export async function forkDashboardAgentWithFeedback(host, input) {
|
|
313
|
+
const sessionSeed = buildPendingSessionSeed({
|
|
314
|
+
sessionId: input.targetSessionId,
|
|
315
|
+
tool: input.tool,
|
|
316
|
+
worktreePath: input.worktreePath,
|
|
317
|
+
pendingAction: "forking",
|
|
318
|
+
});
|
|
242
319
|
await runDashboardSessionMutation(host, {
|
|
243
320
|
sessionId: input.targetSessionId,
|
|
244
321
|
pendingAction: "forking",
|
|
322
|
+
sessionSeed,
|
|
245
323
|
onBeforeRequest: () => {
|
|
246
324
|
host.preferDashboardEntrySelection("session", input.targetSessionId, input.worktreePath);
|
|
247
|
-
host.setPendingDashboardSessionAction(input.targetSessionId, "forking", {
|
|
248
|
-
sessionSeed: buildPendingSessionSeed({
|
|
249
|
-
sessionId: input.targetSessionId,
|
|
250
|
-
tool: input.tool,
|
|
251
|
-
worktreePath: input.worktreePath,
|
|
252
|
-
pendingAction: "forking",
|
|
253
|
-
}),
|
|
254
|
-
});
|
|
255
325
|
},
|
|
256
326
|
request: async () => {
|
|
257
327
|
await host.postToProjectService("/agents/fork", {
|
|
@@ -264,16 +334,36 @@ export async function forkDashboardAgentWithFeedback(host, input) {
|
|
|
264
334
|
open: false,
|
|
265
335
|
}, { timeoutMs: 10_000 });
|
|
266
336
|
},
|
|
267
|
-
settle: () =>
|
|
337
|
+
settle: () => waitForDashboardSessionResumeSettle(host, input.targetSessionId),
|
|
268
338
|
onError: () => host.refreshDashboardModelFromService(true),
|
|
269
339
|
errorTitle: "Cannot fork session",
|
|
270
340
|
});
|
|
271
341
|
}
|
|
272
342
|
export function setPendingDashboardSessionAction(host, sessionId, kind, opts) {
|
|
273
|
-
|
|
343
|
+
let token;
|
|
344
|
+
if (kind) {
|
|
345
|
+
token = host.dashboardPendingActions.setSessionAction(sessionId, kind, opts);
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
host.dashboardPendingActions.clearSessionAction(sessionId);
|
|
349
|
+
}
|
|
274
350
|
if (typeof host.reapplyDashboardPendingActions === "function") {
|
|
275
351
|
host.reapplyDashboardPendingActions();
|
|
276
352
|
}
|
|
353
|
+
return token;
|
|
354
|
+
}
|
|
355
|
+
export function setPendingDashboardServiceAction(host, serviceId, kind, opts) {
|
|
356
|
+
let token;
|
|
357
|
+
if (kind) {
|
|
358
|
+
token = host.dashboardPendingActions.setServiceAction(serviceId, kind, opts);
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
host.dashboardPendingActions.clearServiceAction(serviceId);
|
|
362
|
+
}
|
|
363
|
+
if (typeof host.reapplyDashboardPendingActions === "function") {
|
|
364
|
+
host.reapplyDashboardPendingActions();
|
|
365
|
+
}
|
|
366
|
+
return token;
|
|
277
367
|
}
|
|
278
368
|
export async function stopSessionToOfflineWithFeedback(host, session) {
|
|
279
369
|
if (host.mode === "dashboard") {
|
|
@@ -417,14 +507,19 @@ export function basenameForHost(value) {
|
|
|
417
507
|
return basename(value);
|
|
418
508
|
}
|
|
419
509
|
export async function graveyardSessionWithFeedback(host, sessionId, hasWorktrees) {
|
|
420
|
-
const
|
|
510
|
+
const dashboardEntry = host.getDashboardSessions?.().find((entry) => entry.id === sessionId);
|
|
511
|
+
const session = host.offlineSessions.find((s) => s.id === sessionId) ??
|
|
512
|
+
host.sessions.find((s) => s.id === sessionId) ??
|
|
513
|
+
dashboardEntry;
|
|
421
514
|
if (host.mode === "dashboard") {
|
|
422
515
|
if (!session)
|
|
423
516
|
return;
|
|
424
517
|
const label = host.getSessionLabel(sessionId) ?? session.label ?? session.command;
|
|
518
|
+
const sessionSeed = dashboardEntry ?? session;
|
|
425
519
|
await runDashboardSessionMutation(host, {
|
|
426
520
|
sessionId,
|
|
427
521
|
pendingAction: "graveyarding",
|
|
522
|
+
sessionSeed,
|
|
428
523
|
request: async () => {
|
|
429
524
|
await host.postToProjectService("/agents/kill", { sessionId }, { timeoutMs: 10_000 });
|
|
430
525
|
},
|
|
@@ -441,7 +536,8 @@ export async function graveyardSessionWithFeedback(host, sessionId, hasWorktrees
|
|
|
441
536
|
export async function resumeOfflineSessionWithFeedback(host, session) {
|
|
442
537
|
if (host.mode === "dashboard") {
|
|
443
538
|
const label = session.label ?? session.command;
|
|
444
|
-
if (host.dashboardPendingActions.
|
|
539
|
+
if (host.dashboardPendingActions.getSessionAction(session.id) === "starting" ||
|
|
540
|
+
queuedAgentRestoresFor(host).has(session.id)) {
|
|
445
541
|
return;
|
|
446
542
|
}
|
|
447
543
|
const sessionSeed = host.getDashboardSessions?.().find((entry) => entry.id === session.id) ??
|
|
@@ -453,29 +549,41 @@ export async function resumeOfflineSessionWithFeedback(host, session) {
|
|
|
453
549
|
status: "offline",
|
|
454
550
|
active: false,
|
|
455
551
|
worktreePath: session.worktreePath,
|
|
552
|
+
team: session.team,
|
|
456
553
|
};
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
554
|
+
let resumeResult;
|
|
555
|
+
host.footerFlash = `Queued restore ${label}`;
|
|
556
|
+
host.footerFlashTicks = 3;
|
|
557
|
+
host.setPendingDashboardSessionAction(session.id, "starting", { sessionSeed });
|
|
558
|
+
host.renderDashboard();
|
|
559
|
+
await enqueueDashboardAgentRestore(host, session.id, async () => {
|
|
560
|
+
await runDashboardSessionMutation(host, {
|
|
561
|
+
sessionId: session.id,
|
|
562
|
+
pendingAction: "starting",
|
|
563
|
+
sessionSeed,
|
|
564
|
+
onBeforeRequest: () => {
|
|
565
|
+
host.footerFlash = `Restoring ${label}`;
|
|
566
|
+
host.footerFlashTicks = 3;
|
|
567
|
+
},
|
|
568
|
+
request: async () => {
|
|
569
|
+
resumeResult = await host.postToProjectService("/agents/resume", { sessionId: session.id }, { timeoutMs: 60_000 });
|
|
570
|
+
},
|
|
571
|
+
settle: () => waitForDashboardSessionResumeSettle(host, session.id),
|
|
572
|
+
successFlash: { message: `Restored ${label}` },
|
|
573
|
+
onError: () => host.refreshDashboardModelFromService(true),
|
|
574
|
+
errorTitle: `Failed to restore "${label}"`,
|
|
575
|
+
});
|
|
472
576
|
});
|
|
577
|
+
const warningLines = restoreWarningLines(resumeResult);
|
|
578
|
+
if (warningLines.length > 0) {
|
|
579
|
+
host.showDashboardError(`Restored "${label}" with teammate issues`, warningLines);
|
|
580
|
+
}
|
|
473
581
|
return;
|
|
474
582
|
}
|
|
475
583
|
await runResumeOfflineSessionWithFeedback(dashboardSessionActionDeps(host), session);
|
|
476
584
|
}
|
|
477
585
|
export async function resumeOfflineServiceWithFeedback(host, service) {
|
|
478
|
-
if (host.dashboardPendingActions.
|
|
586
|
+
if (host.dashboardPendingActions.getServiceAction(service.id) === "starting") {
|
|
479
587
|
return;
|
|
480
588
|
}
|
|
481
589
|
if (host.mode === "dashboard") {
|
|
@@ -505,19 +613,19 @@ export async function resumeOfflineServiceWithFeedback(host, service) {
|
|
|
505
613
|
});
|
|
506
614
|
return;
|
|
507
615
|
}
|
|
508
|
-
host.
|
|
616
|
+
host.setPendingDashboardServiceAction(service.id, "starting");
|
|
509
617
|
host.footerFlash = `Restoring ${service.label ?? service.id}`;
|
|
510
618
|
host.footerFlashTicks = 3;
|
|
511
619
|
host.renderDashboard();
|
|
512
620
|
try {
|
|
513
621
|
host.resumeOfflineServiceById(service.id);
|
|
514
|
-
host.
|
|
622
|
+
host.setPendingDashboardServiceAction(service.id, null);
|
|
515
623
|
host.footerFlash = `◆ Started service ${service.label ?? service.id}`;
|
|
516
624
|
host.footerFlashTicks = 3;
|
|
517
625
|
host.renderDashboard();
|
|
518
626
|
}
|
|
519
627
|
catch (error) {
|
|
520
|
-
host.
|
|
628
|
+
host.setPendingDashboardServiceAction(service.id, null);
|
|
521
629
|
host.refreshLocalDashboardModel();
|
|
522
630
|
host.showDashboardError("Failed to start service", [error instanceof Error ? error.message : String(error)]);
|
|
523
631
|
}
|
|
@@ -600,16 +708,22 @@ export async function waitForSessionStartForHost(host, sessionId, timeoutMs = 80
|
|
|
600
708
|
export function dashboardSessionActionDeps(host) {
|
|
601
709
|
return {
|
|
602
710
|
getSessionLabel: (sessionId) => host.getSessionLabel(sessionId),
|
|
603
|
-
getPendingAction: (sessionId) => host.dashboardPendingActions.
|
|
711
|
+
getPendingAction: (sessionId) => host.dashboardPendingActions.getSessionAction(sessionId),
|
|
604
712
|
setPendingAction: (sessionId, kind) => setPendingDashboardSessionAction(host, sessionId, kind),
|
|
605
|
-
stopSessionToOffline: (session) => host.
|
|
713
|
+
stopSessionToOffline: (session) => host.stopAgent(session.id),
|
|
606
714
|
isGraveyardAfterStop: (sessionId) => host.graveyardAfterStopSessionIds.has(sessionId),
|
|
607
715
|
sendAgentToGraveyard: (sessionId) => host.sendAgentToGraveyard(sessionId).then(() => undefined),
|
|
608
|
-
resumeOfflineSession: (session) =>
|
|
609
|
-
|
|
610
|
-
.
|
|
611
|
-
|
|
612
|
-
|
|
716
|
+
resumeOfflineSession: async (session) => {
|
|
717
|
+
if (host.mode !== "dashboard") {
|
|
718
|
+
host.resumeOfflineSession(session);
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
const result = await host.postToProjectService("/agents/resume", { sessionId: session.id }, { timeoutMs: 10_000 });
|
|
722
|
+
const warningLines = restoreWarningLines(result);
|
|
723
|
+
if (warningLines.length > 0) {
|
|
724
|
+
throw new Error(warningLines.join("\n"));
|
|
725
|
+
}
|
|
726
|
+
},
|
|
613
727
|
refreshLocalDashboardModel: () => host.refreshLocalDashboardModel(),
|
|
614
728
|
adjustAfterRemove: (hasWorktrees) => host.adjustAfterRemove(hasWorktrees),
|
|
615
729
|
renderDashboard: () => host.renderCurrentDashboardView(),
|
|
@@ -622,10 +736,6 @@ export function dashboardSessionActionDeps(host) {
|
|
|
622
736
|
isSessionRuntimeLive: (session) => host.isSessionRuntimeLive(session),
|
|
623
737
|
};
|
|
624
738
|
}
|
|
625
|
-
export async function takeoverFromDashEntryWithFeedback(host, entry) {
|
|
626
|
-
const label = entry.label ?? entry.command;
|
|
627
|
-
await runDashboardOperation(host, `Taking over "${label}"`, [` Session: ${entry.id}`], () => host.takeoverSessionFromDashEntry(entry), `Failed to take over "${label}"`);
|
|
628
|
-
}
|
|
629
739
|
export async function migrateSessionWithFeedback(host, session, targetPath, targetName) {
|
|
630
740
|
const label = host.getSessionLabel(session.id) ?? session.command;
|
|
631
741
|
if (host.mode !== "dashboard") {
|
|
@@ -668,4 +778,3 @@ export async function migrateSessionWithFeedback(host, session, targetPath, targ
|
|
|
668
778
|
errorTitle: `Failed to migrate "${label}"`,
|
|
669
779
|
});
|
|
670
780
|
}
|
|
671
|
-
//# sourceMappingURL=dashboard-ops.js.map
|
|
@@ -30,7 +30,7 @@ export declare const dashboardStateMethods: {
|
|
|
30
30
|
branch: string;
|
|
31
31
|
isBare: boolean;
|
|
32
32
|
}>, mainRepoPath?: string): WorktreeGroup[];
|
|
33
|
-
applyDashboardModel(this: any, dashSessions: DashboardSession[], dashServices: DashboardService[], worktreeGroups: WorktreeGroup[], mainCheckoutInfo: {
|
|
33
|
+
applyDashboardModel(this: any, dashSessions: DashboardSession[], dashTeammates: DashboardSession[], dashServices: DashboardService[], worktreeGroups: WorktreeGroup[], mainCheckoutInfo: {
|
|
34
34
|
name: string;
|
|
35
35
|
branch: string;
|
|
36
36
|
}): boolean;
|
|
@@ -45,6 +45,7 @@ export declare const dashboardStateMethods: {
|
|
|
45
45
|
};
|
|
46
46
|
buildDesktopStateSnapshot(this: any): {
|
|
47
47
|
sessions: DashboardSession[];
|
|
48
|
+
teammates: DashboardSession[];
|
|
48
49
|
services: DashboardService[];
|
|
49
50
|
worktrees: Array<{
|
|
50
51
|
name: string;
|
|
@@ -36,6 +36,7 @@ export const dashboardStateMethods = {
|
|
|
36
36
|
},
|
|
37
37
|
loadDashboardUiState() {
|
|
38
38
|
this.dashboardUiStateStore.loadInto(this.dashboardState, this.getDashboardUiClientKey());
|
|
39
|
+
this.dashboardWorktreeGroupsCache = this.dashboardUiStateStore.orderWorktreeGroups(this.dashboardWorktreeGroupsCache);
|
|
39
40
|
},
|
|
40
41
|
hydrateDashboardScreenState() {
|
|
41
42
|
hydrateDashboardArchiveScreenState(this);
|
|
@@ -193,8 +194,8 @@ export const dashboardStateMethods = {
|
|
|
193
194
|
buildDashboardWorktreeGroups(dashSessions, dashServices, worktrees, mainRepoPath) {
|
|
194
195
|
return buildDashboardWorktreeGroupsImpl(this, dashSessions, dashServices, worktrees, mainRepoPath);
|
|
195
196
|
},
|
|
196
|
-
applyDashboardModel(dashSessions, dashServices, worktreeGroups, mainCheckoutInfo) {
|
|
197
|
-
return applyDashboardModelImpl(this, dashSessions, dashServices, worktreeGroups, mainCheckoutInfo);
|
|
197
|
+
applyDashboardModel(dashSessions, dashTeammates, dashServices, worktreeGroups, mainCheckoutInfo) {
|
|
198
|
+
return applyDashboardModelImpl(this, dashSessions, dashTeammates, dashServices, worktreeGroups, mainCheckoutInfo);
|
|
198
199
|
},
|
|
199
200
|
invalidateDesktopStateSnapshot() {
|
|
200
201
|
invalidateDesktopStateSnapshotImpl(this);
|
|
@@ -224,4 +225,3 @@ export const dashboardStateMethods = {
|
|
|
224
225
|
await startProjectServicesImpl(this);
|
|
225
226
|
},
|
|
226
227
|
};
|
|
227
|
-
//# sourceMappingURL=dashboard-state-methods.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DashboardService, DashboardSession } from "../dashboard/index.js";
|
|
2
2
|
import type { Multiplexer, SessionState } from "./index.js";
|
|
3
3
|
import { dashboardSessionActionDeps as dashboardSessionActionDepsImpl } from "./dashboard-ops.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { PendingServiceActionKind, PendingSessionActionKind } from "../pending-actions.js";
|
|
5
5
|
import type { SessionRuntime } from "../session-runtime.js";
|
|
6
6
|
export type DashboardTailMethods = {
|
|
7
7
|
forkAgent(this: Multiplexer, opts: {
|
|
@@ -25,6 +25,23 @@ export type DashboardTailMethods = {
|
|
|
25
25
|
}): Promise<{
|
|
26
26
|
sessionId: string;
|
|
27
27
|
}>;
|
|
28
|
+
createTeammateAgent(this: Multiplexer, opts: {
|
|
29
|
+
parentSessionId: string;
|
|
30
|
+
role?: string;
|
|
31
|
+
label?: string;
|
|
32
|
+
toolConfigKey?: string;
|
|
33
|
+
targetSessionId?: string;
|
|
34
|
+
targetWorktreePath?: string;
|
|
35
|
+
open?: boolean;
|
|
36
|
+
extraArgs?: string[];
|
|
37
|
+
order?: number;
|
|
38
|
+
}): Promise<{
|
|
39
|
+
sessionId: string;
|
|
40
|
+
parentSessionId: string;
|
|
41
|
+
teamId: string;
|
|
42
|
+
role?: string;
|
|
43
|
+
label?: string;
|
|
44
|
+
}>;
|
|
28
45
|
renameAgent(this: Multiplexer, sessionId: string, label?: string): Promise<{
|
|
29
46
|
sessionId: string;
|
|
30
47
|
label?: string;
|
|
@@ -70,9 +87,12 @@ export type DashboardTailMethods = {
|
|
|
70
87
|
showMigratePicker(this: Multiplexer, sessionId?: string): void;
|
|
71
88
|
renderMigratePicker(this: Multiplexer): void;
|
|
72
89
|
runDashboardOperation<T>(this: Multiplexer, title: string, lines: string[], work: () => Promise<T> | T, errorTitle?: string): Promise<T | undefined>;
|
|
73
|
-
setPendingDashboardSessionAction(this: Multiplexer, sessionId: string, kind:
|
|
90
|
+
setPendingDashboardSessionAction(this: Multiplexer, sessionId: string, kind: PendingSessionActionKind | null, opts?: {
|
|
74
91
|
sessionSeed?: DashboardSession;
|
|
75
92
|
}): void;
|
|
93
|
+
setPendingDashboardServiceAction(this: Multiplexer, serviceId: string, kind: PendingServiceActionKind | null, opts?: {
|
|
94
|
+
serviceSeed?: DashboardService;
|
|
95
|
+
}): void;
|
|
76
96
|
stopSessionToOfflineWithFeedback(this: Multiplexer, session: SessionRuntime): Promise<void>;
|
|
77
97
|
clearDashboardSubscreens(this: Multiplexer): void;
|
|
78
98
|
renderSessionDetails(this: Multiplexer, session: DashboardSession | undefined, width: number, height: number): string[];
|
|
@@ -97,18 +117,10 @@ export type DashboardTailMethods = {
|
|
|
97
117
|
resumeOfflineSessionWithFeedback(this: Multiplexer, session: SessionState): Promise<void>;
|
|
98
118
|
waitForSessionStart(this: Multiplexer, sessionId: string, timeoutMs?: number): Promise<boolean>;
|
|
99
119
|
dashboardSessionActionDeps(this: Multiplexer): ReturnType<typeof dashboardSessionActionDepsImpl>;
|
|
100
|
-
takeoverFromDashEntryWithFeedback(this: Multiplexer, entry: DashboardSession): Promise<void>;
|
|
101
120
|
migrateSessionWithFeedback(this: Multiplexer, session: SessionRuntime, targetPath: string, targetName: string): Promise<void>;
|
|
102
121
|
handleMigratePickerKey(this: Multiplexer, data: Buffer): void;
|
|
103
122
|
getDashboardSessions(this: Multiplexer): DashboardSession[];
|
|
104
123
|
getDashboardServices(this: Multiplexer): DashboardService[];
|
|
105
124
|
getDashboardSessionsInVisualOrder(this: Multiplexer): DashboardSession[];
|
|
106
|
-
takeoverSessionFromDashEntry(this: Multiplexer, entry: DashboardSession): Promise<void>;
|
|
107
|
-
takeoverSession(this: Multiplexer, target: {
|
|
108
|
-
id: string;
|
|
109
|
-
tool: string;
|
|
110
|
-
backendSessionId: string;
|
|
111
|
-
fromInstanceId: string;
|
|
112
|
-
}): Promise<void>;
|
|
113
125
|
};
|
|
114
126
|
export declare const dashboardTailMethods: DashboardTailMethods;
|