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
package/dist/team.js
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "node:fs";
|
|
2
2
|
import { getLocalAimuxDir, getProjectTeamPath, getGlobalTeamPath, getGlobalAimuxDir } from "./paths.js";
|
|
3
|
+
export function isTeammateSession(session) {
|
|
4
|
+
return Boolean(session?.team?.parentSessionId);
|
|
5
|
+
}
|
|
6
|
+
export function compareTeammateSessions(left, right) {
|
|
7
|
+
const leftOrder = typeof left.team?.order === "number" ? left.team.order : Number.POSITIVE_INFINITY;
|
|
8
|
+
const rightOrder = typeof right.team?.order === "number" ? right.team.order : Number.POSITIVE_INFINITY;
|
|
9
|
+
if (leftOrder !== rightOrder)
|
|
10
|
+
return leftOrder - rightOrder;
|
|
11
|
+
const leftCreated = left.createdAt ? Date.parse(left.createdAt) : Number.POSITIVE_INFINITY;
|
|
12
|
+
const rightCreated = right.createdAt ? Date.parse(right.createdAt) : Number.POSITIVE_INFINITY;
|
|
13
|
+
const normalizedLeftCreated = Number.isFinite(leftCreated) ? leftCreated : Number.POSITIVE_INFINITY;
|
|
14
|
+
const normalizedRightCreated = Number.isFinite(rightCreated) ? rightCreated : Number.POSITIVE_INFINITY;
|
|
15
|
+
if (normalizedLeftCreated !== normalizedRightCreated)
|
|
16
|
+
return normalizedLeftCreated - normalizedRightCreated;
|
|
17
|
+
return left.id.localeCompare(right.id);
|
|
18
|
+
}
|
|
19
|
+
export function selectDirectTeammates(sessions, parentSessionId) {
|
|
20
|
+
const byId = new Map();
|
|
21
|
+
for (const session of sessions) {
|
|
22
|
+
if (session.team?.parentSessionId !== parentSessionId)
|
|
23
|
+
continue;
|
|
24
|
+
if (!byId.has(session.id)) {
|
|
25
|
+
byId.set(session.id, session);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return [...byId.values()].sort(compareTeammateSessions);
|
|
29
|
+
}
|
|
30
|
+
export function selectOrphanTeammates(sessions, knownParentIds) {
|
|
31
|
+
const parents = new Set(knownParentIds);
|
|
32
|
+
const byId = new Map();
|
|
33
|
+
for (const session of sessions) {
|
|
34
|
+
const parentSessionId = session.team?.parentSessionId;
|
|
35
|
+
if (!parentSessionId || parents.has(parentSessionId))
|
|
36
|
+
continue;
|
|
37
|
+
if (!byId.has(session.id)) {
|
|
38
|
+
byId.set(session.id, session);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return [...byId.values()].sort(compareTeammateSessions);
|
|
42
|
+
}
|
|
3
43
|
const DEFAULT_TEAM_CONFIG = {
|
|
4
44
|
roles: {
|
|
5
45
|
coder: {
|
|
@@ -88,4 +128,3 @@ export function buildRolePreamble(role, config) {
|
|
|
88
128
|
}
|
|
89
129
|
return lines.join("\n");
|
|
90
130
|
}
|
|
91
|
-
//# sourceMappingURL=team.js.map
|
package/dist/terminal-host.js
CHANGED
package/dist/threads.d.ts
CHANGED
|
@@ -1,38 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
kind: ThreadKind;
|
|
8
|
-
createdAt: string;
|
|
9
|
-
updatedAt: string;
|
|
10
|
-
createdBy: string;
|
|
11
|
-
participants: string[];
|
|
12
|
-
status: ThreadStatus;
|
|
13
|
-
owner?: string;
|
|
14
|
-
waitingOn?: string[];
|
|
15
|
-
worktreePath?: string;
|
|
16
|
-
taskId?: string;
|
|
17
|
-
relatedPlanIds?: string[];
|
|
18
|
-
lastMessageId?: string;
|
|
19
|
-
unreadBy?: string[];
|
|
20
|
-
tags?: string[];
|
|
21
|
-
}
|
|
22
|
-
export interface OrchestrationMessage {
|
|
23
|
-
id: string;
|
|
24
|
-
threadId: string;
|
|
25
|
-
ts: string;
|
|
26
|
-
from: string;
|
|
27
|
-
to?: string[];
|
|
28
|
-
kind: MessageKind;
|
|
29
|
-
body: string;
|
|
30
|
-
taskId?: string;
|
|
31
|
-
planId?: string;
|
|
32
|
-
metadata?: Record<string, string | number | boolean | null>;
|
|
33
|
-
deliveredTo?: string[];
|
|
34
|
-
deliveredAt?: string;
|
|
35
|
-
}
|
|
1
|
+
import { type RuntimeExchangeMessage, type RuntimeExchangeThread } from "./runtime-core/exchange-store.js";
|
|
2
|
+
export type ThreadKind = RuntimeExchangeThread["kind"];
|
|
3
|
+
export type ThreadStatus = RuntimeExchangeThread["status"];
|
|
4
|
+
export type MessageKind = RuntimeExchangeMessage["kind"];
|
|
5
|
+
export type OrchestrationThread = RuntimeExchangeThread;
|
|
6
|
+
export type OrchestrationMessage = RuntimeExchangeMessage;
|
|
36
7
|
export interface ThreadSummary {
|
|
37
8
|
thread: OrchestrationThread;
|
|
38
9
|
latestMessage?: OrchestrationMessage;
|
package/dist/threads.js
CHANGED
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { getThreadsDir } from "./paths.js";
|
|
4
|
-
function threadsDir() {
|
|
5
|
-
const dir = getThreadsDir();
|
|
6
|
-
if (!existsSync(dir))
|
|
7
|
-
mkdirSync(dir, { recursive: true });
|
|
8
|
-
return dir;
|
|
9
|
-
}
|
|
10
|
-
function threadPath(threadId) {
|
|
11
|
-
return join(threadsDir(), `${threadId}.json`);
|
|
12
|
-
}
|
|
13
|
-
function messagesPath(threadId) {
|
|
14
|
-
return join(threadsDir(), `${threadId}.jsonl`);
|
|
15
|
-
}
|
|
1
|
+
import { deriveRuntimeExchangeIndexes } from "./runtime-core/exchange-derived.js";
|
|
2
|
+
import { createRuntimeExchangeStore, } from "./runtime-core/exchange-store.js";
|
|
16
3
|
function nowIso() {
|
|
17
4
|
return new Date().toISOString();
|
|
18
5
|
}
|
|
19
6
|
function randomId(prefix) {
|
|
20
7
|
return `${prefix}-${Math.random().toString(36).slice(2, 10)}`;
|
|
21
8
|
}
|
|
9
|
+
function unique(values) {
|
|
10
|
+
return [...new Set(values.map((value) => value?.trim()).filter(Boolean))];
|
|
11
|
+
}
|
|
12
|
+
function threadUpdatedForMessage(thread, message, updatedAt) {
|
|
13
|
+
return {
|
|
14
|
+
...thread,
|
|
15
|
+
updatedAt,
|
|
16
|
+
lastMessageId: message.id,
|
|
17
|
+
unreadBy: unique((thread.participants ?? []).filter((id) => id !== message.from)),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
22
20
|
export function createThread(input) {
|
|
21
|
+
const now = nowIso();
|
|
23
22
|
const thread = {
|
|
24
23
|
id: input.id ?? randomId("thread"),
|
|
25
24
|
title: input.title,
|
|
26
25
|
kind: input.kind,
|
|
27
|
-
createdAt:
|
|
28
|
-
updatedAt:
|
|
26
|
+
createdAt: now,
|
|
27
|
+
updatedAt: now,
|
|
29
28
|
createdBy: input.createdBy,
|
|
30
|
-
participants:
|
|
29
|
+
participants: unique(input.participants),
|
|
31
30
|
status: input.status ?? "open",
|
|
32
31
|
owner: input.owner,
|
|
33
32
|
waitingOn: input.waitingOn,
|
|
@@ -38,56 +37,50 @@ export function createThread(input) {
|
|
|
38
37
|
unreadBy: input.unreadBy,
|
|
39
38
|
tags: input.tags,
|
|
40
39
|
};
|
|
41
|
-
|
|
40
|
+
createRuntimeExchangeStore().update((exchange) => deriveRuntimeExchangeIndexes({
|
|
41
|
+
...exchange,
|
|
42
|
+
generatedAt: now,
|
|
43
|
+
threads: [...exchange.threads.filter((existing) => existing.id !== thread.id), thread],
|
|
44
|
+
}));
|
|
42
45
|
return thread;
|
|
43
46
|
}
|
|
44
47
|
export function readThread(threadId) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return JSON.parse(readFileSync(threadPath(threadId), "utf-8"));
|
|
49
|
-
}
|
|
50
|
-
catch {
|
|
51
|
-
return undefined;
|
|
52
|
-
}
|
|
48
|
+
return createRuntimeExchangeStore()
|
|
49
|
+
.read()
|
|
50
|
+
.threads.find((thread) => thread.id === threadId);
|
|
53
51
|
}
|
|
54
52
|
export function updateThread(threadId, updater) {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
53
|
+
const now = nowIso();
|
|
54
|
+
let updated;
|
|
55
|
+
createRuntimeExchangeStore().update((exchange) => {
|
|
56
|
+
const threads = exchange.threads.map((current) => {
|
|
57
|
+
if (current.id !== threadId)
|
|
58
|
+
return current;
|
|
59
|
+
updated = {
|
|
60
|
+
...updater(current),
|
|
61
|
+
id: current.id,
|
|
62
|
+
createdAt: current.createdAt,
|
|
63
|
+
updatedAt: now,
|
|
64
|
+
};
|
|
65
|
+
return updated;
|
|
66
|
+
});
|
|
67
|
+
return deriveRuntimeExchangeIndexes({
|
|
68
|
+
...exchange,
|
|
69
|
+
generatedAt: updated ? now : exchange.generatedAt,
|
|
70
|
+
threads,
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
return updated;
|
|
66
74
|
}
|
|
67
75
|
export function listThreads() {
|
|
68
|
-
|
|
69
|
-
return readdirSync(threadsDir())
|
|
70
|
-
.filter((name) => name.endsWith(".json"))
|
|
71
|
-
.map((name) => {
|
|
72
|
-
try {
|
|
73
|
-
return JSON.parse(readFileSync(join(threadsDir(), name), "utf-8"));
|
|
74
|
-
}
|
|
75
|
-
catch {
|
|
76
|
-
return undefined;
|
|
77
|
-
}
|
|
78
|
-
})
|
|
79
|
-
.filter((value) => Boolean(value))
|
|
80
|
-
.sort((a, b) => (a.updatedAt < b.updatedAt ? 1 : a.updatedAt > b.updatedAt ? -1 : 0));
|
|
81
|
-
}
|
|
82
|
-
catch {
|
|
83
|
-
return [];
|
|
84
|
-
}
|
|
76
|
+
return [...createRuntimeExchangeStore().read().threads].sort((a, b) => a.updatedAt < b.updatedAt ? 1 : a.updatedAt > b.updatedAt ? -1 : 0);
|
|
85
77
|
}
|
|
86
78
|
export function appendMessage(threadId, input) {
|
|
79
|
+
const now = nowIso();
|
|
87
80
|
const message = {
|
|
88
81
|
id: input.id ?? randomId("msg"),
|
|
89
82
|
threadId,
|
|
90
|
-
ts: input.ts ??
|
|
83
|
+
ts: input.ts ?? now,
|
|
91
84
|
from: input.from,
|
|
92
85
|
to: input.to,
|
|
93
86
|
kind: input.kind,
|
|
@@ -95,61 +88,59 @@ export function appendMessage(threadId, input) {
|
|
|
95
88
|
taskId: input.taskId,
|
|
96
89
|
planId: input.planId,
|
|
97
90
|
metadata: input.metadata,
|
|
91
|
+
deliveredTo: input.deliveredTo,
|
|
92
|
+
deliveredAt: input.deliveredAt,
|
|
98
93
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
94
|
+
let threadFound = false;
|
|
95
|
+
createRuntimeExchangeStore().update((exchange) => {
|
|
96
|
+
const threads = exchange.threads.map((thread) => {
|
|
97
|
+
if (thread.id !== threadId)
|
|
98
|
+
return thread;
|
|
99
|
+
threadFound = true;
|
|
100
|
+
return threadUpdatedForMessage(thread, message, now);
|
|
101
|
+
});
|
|
102
|
+
if (!threadFound)
|
|
103
|
+
throw new Error(`thread not found: ${threadId}`);
|
|
104
|
+
return deriveRuntimeExchangeIndexes({
|
|
105
|
+
...exchange,
|
|
106
|
+
generatedAt: now,
|
|
107
|
+
threads,
|
|
108
|
+
messages: [...exchange.messages.filter((existing) => existing.id !== message.id), message],
|
|
109
|
+
});
|
|
110
|
+
});
|
|
105
111
|
return message;
|
|
106
112
|
}
|
|
107
113
|
export function readMessages(threadId) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
.split("\n")
|
|
113
|
-
.map((line) => line.trim())
|
|
114
|
-
.filter(Boolean)
|
|
115
|
-
.map((line) => {
|
|
116
|
-
try {
|
|
117
|
-
return JSON.parse(line);
|
|
118
|
-
}
|
|
119
|
-
catch {
|
|
120
|
-
return undefined;
|
|
121
|
-
}
|
|
122
|
-
})
|
|
123
|
-
.filter((value) => Boolean(value));
|
|
124
|
-
}
|
|
125
|
-
catch {
|
|
126
|
-
return [];
|
|
127
|
-
}
|
|
114
|
+
return createRuntimeExchangeStore()
|
|
115
|
+
.read()
|
|
116
|
+
.messages.filter((message) => message.threadId === threadId)
|
|
117
|
+
.sort((a, b) => (a.ts < b.ts ? -1 : a.ts > b.ts ? 1 : 0));
|
|
128
118
|
}
|
|
129
119
|
export function updateMessage(threadId, messageId, updater) {
|
|
130
|
-
const messages = readMessages(threadId);
|
|
131
|
-
if (messages.length === 0)
|
|
132
|
-
return undefined;
|
|
133
120
|
let updated;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
121
|
+
createRuntimeExchangeStore().update((exchange) => {
|
|
122
|
+
const messages = exchange.messages.map((message) => {
|
|
123
|
+
if (message.threadId !== threadId || message.id !== messageId)
|
|
124
|
+
return message;
|
|
125
|
+
updated = {
|
|
126
|
+
...updater(message),
|
|
127
|
+
id: message.id,
|
|
128
|
+
threadId: message.threadId,
|
|
129
|
+
ts: message.ts,
|
|
130
|
+
};
|
|
131
|
+
return updated;
|
|
132
|
+
});
|
|
133
|
+
return {
|
|
134
|
+
...exchange,
|
|
135
|
+
generatedAt: updated ? nowIso() : exchange.generatedAt,
|
|
136
|
+
messages,
|
|
142
137
|
};
|
|
143
|
-
return updated;
|
|
144
138
|
});
|
|
145
|
-
if (!updated)
|
|
146
|
-
return undefined;
|
|
147
|
-
writeFileSync(messagesPath(threadId), nextMessages.map((message) => JSON.stringify(message)).join("\n") + "\n");
|
|
148
139
|
return updated;
|
|
149
140
|
}
|
|
150
141
|
export function markMessageDelivered(threadId, messageId, recipient) {
|
|
151
142
|
return updateMessage(threadId, messageId, (current) => {
|
|
152
|
-
const deliveredTo =
|
|
143
|
+
const deliveredTo = unique([...(current.deliveredTo ?? []), recipient]);
|
|
153
144
|
return {
|
|
154
145
|
...current,
|
|
155
146
|
deliveredTo,
|
|
@@ -197,4 +188,3 @@ export function listThreadSummaries(participantId) {
|
|
|
197
188
|
};
|
|
198
189
|
});
|
|
199
190
|
}
|
|
200
|
-
//# sourceMappingURL=threads.js.map
|
package/dist/tmux/doctor.js
CHANGED
package/dist/tmux/inbox-popup.js
CHANGED
|
@@ -2,6 +2,7 @@ import { readFileSync } from "node:fs";
|
|
|
2
2
|
import { TerminalHost } from "../terminal-host.js";
|
|
3
3
|
import { parseKeys } from "../key-parser.js";
|
|
4
4
|
import { requestJson } from "../http-client.js";
|
|
5
|
+
import { TmuxRuntimeManager } from "./runtime-manager.js";
|
|
5
6
|
function wrapText(text, width) {
|
|
6
7
|
if (width <= 8)
|
|
7
8
|
return [text.slice(0, Math.max(0, width))];
|
|
@@ -66,20 +67,39 @@ function loadEndpoint(projectStateDir) {
|
|
|
66
67
|
throw new Error("no live project service metadata endpoint");
|
|
67
68
|
return raw;
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
function resolveFocusedParticipant(options) {
|
|
71
|
+
const currentWindowId = options.currentWindowId?.trim();
|
|
72
|
+
if (!currentWindowId || (options.currentWindow?.trim() && /^dashboard/.test(options.currentWindow.trim()))) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
const tmux = new TmuxRuntimeManager();
|
|
77
|
+
const match = tmux
|
|
78
|
+
.listProjectManagedWindows(options.projectRoot)
|
|
79
|
+
.find((entry) => entry.target.windowId === currentWindowId);
|
|
80
|
+
return match?.metadata.sessionId?.trim() || undefined;
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
async function loadInboxEntries(endpoint, participantId) {
|
|
87
|
+
const query = participantId ? `?participant=${encodeURIComponent(participantId)}` : "";
|
|
88
|
+
const [{ status: inboxStatus, json: inboxBody }, { status: desktopStatus, json: desktopBody }] = await Promise.all([
|
|
89
|
+
requestJson(`${endpoint}/inbox${query}`, { timeoutMs: 2000 }),
|
|
90
|
+
requestJson(`${endpoint}/desktop-state`, {
|
|
91
|
+
timeoutMs: 2000,
|
|
92
|
+
}),
|
|
73
93
|
]);
|
|
74
|
-
if (
|
|
94
|
+
if (inboxStatus < 200 || inboxStatus >= 300) {
|
|
75
95
|
throw new Error("failed to load inbox");
|
|
76
96
|
}
|
|
77
97
|
if (desktopStatus < 200 || desktopStatus >= 300) {
|
|
78
98
|
throw new Error("failed to load desktop state");
|
|
79
99
|
}
|
|
80
|
-
const sessions = new Map((desktopBody.sessions ?? []).map((entry) => [entry.id, entry]));
|
|
100
|
+
const sessions = new Map([...(desktopBody.sessions ?? []), ...(desktopBody.teammates ?? [])].map((entry) => [entry.id, entry]));
|
|
81
101
|
const services = new Map((desktopBody.services ?? []).map((entry) => [entry.id, entry]));
|
|
82
|
-
return (
|
|
102
|
+
return (inboxBody.inbox ?? []).map((entry) => {
|
|
83
103
|
const session = entry.sessionId ? sessions.get(entry.sessionId) : undefined;
|
|
84
104
|
if (session) {
|
|
85
105
|
return {
|
|
@@ -98,7 +118,8 @@ async function loadInboxEntries(endpoint) {
|
|
|
98
118
|
}
|
|
99
119
|
return {
|
|
100
120
|
...entry,
|
|
101
|
-
|
|
121
|
+
sessionId: undefined,
|
|
122
|
+
targetState: "none",
|
|
102
123
|
};
|
|
103
124
|
});
|
|
104
125
|
}
|
|
@@ -163,7 +184,8 @@ function renderPopup(entries, index, message) {
|
|
|
163
184
|
}
|
|
164
185
|
export async function runTmuxInboxPopup(options) {
|
|
165
186
|
const endpoint = loadEndpoint(options.projectStateDir);
|
|
166
|
-
|
|
187
|
+
const participantId = resolveFocusedParticipant(options);
|
|
188
|
+
let entries = await loadInboxEntries(endpoint, participantId);
|
|
167
189
|
let index = entries.length > 0 ? 0 : -1;
|
|
168
190
|
let message = null;
|
|
169
191
|
const terminal = new TerminalHost();
|
|
@@ -177,7 +199,7 @@ export async function runTmuxInboxPopup(options) {
|
|
|
177
199
|
return code;
|
|
178
200
|
};
|
|
179
201
|
const refresh = async (nextMessage = null) => {
|
|
180
|
-
entries = await loadInboxEntries(endpoint);
|
|
202
|
+
entries = await loadInboxEntries(endpoint, participantId);
|
|
181
203
|
if (index >= entries.length)
|
|
182
204
|
index = Math.max(0, entries.length - 1);
|
|
183
205
|
if (entries.length === 0)
|
|
@@ -213,24 +235,24 @@ export async function runTmuxInboxPopup(options) {
|
|
|
213
235
|
if (key === "r") {
|
|
214
236
|
if (!selected)
|
|
215
237
|
return;
|
|
216
|
-
await postJson(endpoint, "/
|
|
238
|
+
await postJson(endpoint, "/inbox/read", { id: selected.id });
|
|
217
239
|
await refresh(null);
|
|
218
240
|
return;
|
|
219
241
|
}
|
|
220
242
|
if (key === "R") {
|
|
221
|
-
await postJson(endpoint, "/
|
|
243
|
+
await postJson(endpoint, "/inbox/read", { participant: participantId });
|
|
222
244
|
await refresh(null);
|
|
223
245
|
return;
|
|
224
246
|
}
|
|
225
247
|
if (key === "c") {
|
|
226
248
|
if (!selected)
|
|
227
249
|
return;
|
|
228
|
-
await postJson(endpoint, "/
|
|
250
|
+
await postJson(endpoint, "/inbox/clear", { id: selected.id });
|
|
229
251
|
await refresh(null);
|
|
230
252
|
return;
|
|
231
253
|
}
|
|
232
254
|
if (key === "C") {
|
|
233
|
-
await postJson(endpoint, "/
|
|
255
|
+
await postJson(endpoint, "/inbox/clear", { participant: participantId });
|
|
234
256
|
await refresh(null);
|
|
235
257
|
return;
|
|
236
258
|
}
|
|
@@ -251,7 +273,7 @@ export async function runTmuxInboxPopup(options) {
|
|
|
251
273
|
clientTty: options.clientTty,
|
|
252
274
|
});
|
|
253
275
|
if (selected.unread) {
|
|
254
|
-
await postJson(endpoint, "/
|
|
276
|
+
await postJson(endpoint, "/inbox/read", { id: selected.id });
|
|
255
277
|
}
|
|
256
278
|
process.stdin.off("data", onData);
|
|
257
279
|
resolve(exit(0));
|
|
@@ -264,4 +286,3 @@ export async function runTmuxInboxPopup(options) {
|
|
|
264
286
|
process.stdin.on("data", onData);
|
|
265
287
|
});
|
|
266
288
|
}
|
|
267
|
-
//# sourceMappingURL=inbox-popup.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SessionTeamMetadata } from "../team.js";
|
|
1
2
|
export interface TmuxExecOptions {
|
|
2
3
|
cwd?: string;
|
|
3
4
|
}
|
|
@@ -50,8 +51,10 @@ export interface TmuxWindowMetadata {
|
|
|
50
51
|
toolConfigKey: string;
|
|
51
52
|
createdAt?: string;
|
|
52
53
|
backendSessionId?: string;
|
|
54
|
+
team?: SessionTeamMetadata;
|
|
53
55
|
worktreePath?: string;
|
|
54
56
|
label?: string;
|
|
57
|
+
launchCommandLine?: string;
|
|
55
58
|
role?: string;
|
|
56
59
|
activity?: string;
|
|
57
60
|
attention?: string;
|
|
@@ -5,7 +5,7 @@ import { mkdtempSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import { loadConfig } from "../config.js";
|
|
8
|
-
import { debug } from "../debug.js";
|
|
8
|
+
import { debug, log } from "../debug.js";
|
|
9
9
|
import { getProjectStateDirFor } from "../paths.js";
|
|
10
10
|
export function isDashboardWindowName(name) {
|
|
11
11
|
return name === "dashboard" || name.startsWith("dashboard-");
|
|
@@ -560,8 +560,6 @@ export class TmuxRuntimeManager {
|
|
|
560
560
|
for (const entry of this.listManagedWindows(sessionName)) {
|
|
561
561
|
if (matcher.sessionId && entry.metadata.sessionId === matcher.sessionId)
|
|
562
562
|
return entry;
|
|
563
|
-
if (matcher.backendSessionId && entry.metadata.backendSessionId === matcher.backendSessionId)
|
|
564
|
-
return entry;
|
|
565
563
|
}
|
|
566
564
|
return null;
|
|
567
565
|
}
|
|
@@ -652,6 +650,15 @@ export class TmuxRuntimeManager {
|
|
|
652
650
|
...target,
|
|
653
651
|
sessionName,
|
|
654
652
|
};
|
|
653
|
+
log.info("opening tmux target", "tmux", {
|
|
654
|
+
targetSession: target.sessionName,
|
|
655
|
+
targetWindowId: target.windowId,
|
|
656
|
+
targetWindowName: target.windowName,
|
|
657
|
+
effectiveSession: effectiveTarget.sessionName,
|
|
658
|
+
effectiveWindowIndex: effectiveTarget.windowIndex,
|
|
659
|
+
insideTmux,
|
|
660
|
+
alreadyResolved: options.alreadyResolved === true,
|
|
661
|
+
});
|
|
655
662
|
if (isDashboardWindowName(effectiveTarget.windowName)) {
|
|
656
663
|
this.cancelCopyMode(effectiveTarget);
|
|
657
664
|
}
|
|
@@ -739,6 +746,7 @@ export class TmuxRuntimeManager {
|
|
|
739
746
|
this.exec(["unbind-key", "-T", "prefix", "p"]);
|
|
740
747
|
this.exec(["unbind-key", "-T", "prefix", "d"]);
|
|
741
748
|
this.exec(["unbind-key", "-T", "prefix", "u"]);
|
|
749
|
+
this.exec(["unbind-key", "-T", "prefix", "e"]);
|
|
742
750
|
this.exec(["unbind-key", "-T", "prefix", "K"]);
|
|
743
751
|
for (const digit of ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]) {
|
|
744
752
|
this.exec(["unbind-key", "-T", "prefix", digit]);
|
|
@@ -795,6 +803,15 @@ export class TmuxRuntimeManager {
|
|
|
795
803
|
"-b",
|
|
796
804
|
`${controlScript} attention --project-root ${shellQuote(projectRoot)} --project-state-dir ${shellQuote(projectStateDir)} --current-client-session '#{client_session}' --client-tty '#{client_tty}' --current-window '#{window_name}' --current-window-id '#{window_id}' --current-path '#{pane_current_path}' --pane-id '#{pane_id}' >/dev/null 2>&1`,
|
|
797
805
|
]);
|
|
806
|
+
this.exec([
|
|
807
|
+
"bind-key",
|
|
808
|
+
"-T",
|
|
809
|
+
"prefix",
|
|
810
|
+
"e",
|
|
811
|
+
"run-shell",
|
|
812
|
+
"-b",
|
|
813
|
+
`${controlScript} team --project-root ${shellQuote(projectRoot)} --project-state-dir ${shellQuote(projectStateDir)} --current-client-session '#{client_session}' --client-tty '#{client_tty}' --current-window '#{window_name}' --current-window-id '#{window_id}' --current-path '#{pane_current_path}' --pane-id '#{pane_id}' >/dev/null 2>&1`,
|
|
814
|
+
]);
|
|
798
815
|
this.exec([
|
|
799
816
|
"bind-key",
|
|
800
817
|
"-T",
|
|
@@ -845,7 +862,7 @@ export class TmuxRuntimeManager {
|
|
|
845
862
|
"-t",
|
|
846
863
|
sessionName,
|
|
847
864
|
"status-format[0]",
|
|
848
|
-
`#[bg=colour238,fg=colour255,bold] #(${top}) #[default]`,
|
|
865
|
+
`#[bg=colour238,fg=colour255,bold] #(${top})#[default]#{?pane_in_mode, #[fg=colour214,bold]scroll#[default],}`,
|
|
849
866
|
]);
|
|
850
867
|
this.exec([
|
|
851
868
|
"set-option",
|
|
@@ -953,4 +970,3 @@ export class TmuxRuntimeManager {
|
|
|
953
970
|
function shellQuote(value) {
|
|
954
971
|
return `'${value.replace(/'/g, `'"'"'`)}'`;
|
|
955
972
|
}
|
|
956
|
-
//# sourceMappingURL=runtime-manager.js.map
|