agent-tempo 1.0.1
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/CLAUDE.md +213 -0
- package/LICENSE +21 -0
- package/README.md +289 -0
- package/assets/icon-32.png +0 -0
- package/assets/icon-512.png +0 -0
- package/assets/icon-64.png +0 -0
- package/assets/icon-dark-32.png +0 -0
- package/assets/icon-dark-64.png +0 -0
- package/assets/icon-dark.svg +9 -0
- package/assets/icon.svg +9 -0
- package/assets/logo-dark.svg +11 -0
- package/assets/logo-light.svg +11 -0
- package/dashboard/README.md +91 -0
- package/dashboard/dist/assets/index-CB78ToNE.css +2 -0
- package/dashboard/dist/assets/index-_5jV0Znu.js +62 -0
- package/dashboard/dist/assets/index-_5jV0Znu.js.map +1 -0
- package/dashboard/dist/index.html +21 -0
- package/dashboard/package.json +47 -0
- package/dist/activities/hard-terminate.d.ts +32 -0
- package/dist/activities/hard-terminate.js +460 -0
- package/dist/activities/maestro.d.ts +72 -0
- package/dist/activities/maestro.js +254 -0
- package/dist/activities/outbox.d.ts +188 -0
- package/dist/activities/outbox.js +849 -0
- package/dist/activities/resolve.d.ts +64 -0
- package/dist/activities/resolve.js +129 -0
- package/dist/activities/schedule-fire.d.ts +36 -0
- package/dist/activities/schedule-fire.js +147 -0
- package/dist/adapters/base.d.ts +426 -0
- package/dist/adapters/base.js +1270 -0
- package/dist/adapters/claude-api/adapter.d.ts +168 -0
- package/dist/adapters/claude-api/adapter.js +797 -0
- package/dist/adapters/claude-api/api-error.d.ts +96 -0
- package/dist/adapters/claude-api/api-error.js +191 -0
- package/dist/adapters/claude-api/index.d.ts +16 -0
- package/dist/adapters/claude-api/index.js +21 -0
- package/dist/adapters/claude-api/mcp-bridge.d.ts +50 -0
- package/dist/adapters/claude-api/mcp-bridge.js +157 -0
- package/dist/adapters/claude-code/adapter.d.ts +133 -0
- package/dist/adapters/claude-code/adapter.js +274 -0
- package/dist/adapters/claude-code/index.d.ts +15 -0
- package/dist/adapters/claude-code/index.js +20 -0
- package/dist/adapters/claude-code-headless/adapter.d.ts +131 -0
- package/dist/adapters/claude-code-headless/adapter.js +710 -0
- package/dist/adapters/claude-code-headless/error-mapper.d.ts +107 -0
- package/dist/adapters/claude-code-headless/error-mapper.js +281 -0
- package/dist/adapters/claude-code-headless/index.d.ts +17 -0
- package/dist/adapters/claude-code-headless/index.js +26 -0
- package/dist/adapters/claude-code-headless/pre-flight.d.ts +51 -0
- package/dist/adapters/claude-code-headless/pre-flight.js +207 -0
- package/dist/adapters/claude-code-headless/prompt.d.ts +93 -0
- package/dist/adapters/claude-code-headless/prompt.js +79 -0
- package/dist/adapters/claude-code-headless/stream-json.d.ts +242 -0
- package/dist/adapters/claude-code-headless/stream-json.js +208 -0
- package/dist/adapters/claude-code-headless/types.d.ts +28 -0
- package/dist/adapters/claude-code-headless/types.js +36 -0
- package/dist/adapters/copilot/adapter.d.ts +100 -0
- package/dist/adapters/copilot/adapter.js +730 -0
- package/dist/adapters/copilot/index.d.ts +15 -0
- package/dist/adapters/copilot/index.js +20 -0
- package/dist/adapters/index.d.ts +42 -0
- package/dist/adapters/index.js +115 -0
- package/dist/adapters/opencode/adapter.d.ts +82 -0
- package/dist/adapters/opencode/adapter.js +710 -0
- package/dist/adapters/opencode/config.d.ts +90 -0
- package/dist/adapters/opencode/config.js +137 -0
- package/dist/adapters/opencode/helpers.d.ts +40 -0
- package/dist/adapters/opencode/helpers.js +144 -0
- package/dist/adapters/opencode/index.d.ts +12 -0
- package/dist/adapters/opencode/index.js +17 -0
- package/dist/adapters/opencode/server-bridge.d.ts +124 -0
- package/dist/adapters/opencode/server-bridge.js +216 -0
- package/dist/adapters/sdk/base.d.ts +95 -0
- package/dist/adapters/sdk/base.js +134 -0
- package/dist/adapters/sdk/system-prompt.d.ts +64 -0
- package/dist/adapters/sdk/system-prompt.js +78 -0
- package/dist/adapters/terminal-error.d.ts +27 -0
- package/dist/adapters/terminal-error.js +39 -0
- package/dist/channel.d.ts +3 -0
- package/dist/channel.js +48 -0
- package/dist/cli/commands.d.ts +245 -0
- package/dist/cli/commands.js +2438 -0
- package/dist/cli/config-command.d.ts +8 -0
- package/dist/cli/config-command.js +254 -0
- package/dist/cli/daemon-command.d.ts +57 -0
- package/dist/cli/daemon-command.js +493 -0
- package/dist/cli/daemon.d.ts +217 -0
- package/dist/cli/daemon.js +632 -0
- package/dist/cli/dashboard-command.d.ts +20 -0
- package/dist/cli/dashboard-command.js +241 -0
- package/dist/cli/dev-banner.d.ts +107 -0
- package/dist/cli/dev-banner.js +190 -0
- package/dist/cli/dev-mode-bootstrap.d.ts +29 -0
- package/dist/cli/dev-mode-bootstrap.js +36 -0
- package/dist/cli/dev-verbs.d.ts +43 -0
- package/dist/cli/dev-verbs.js +254 -0
- package/dist/cli/help-text.d.ts +1 -0
- package/dist/cli/help-text.js +158 -0
- package/dist/cli/legacy-migration.d.ts +35 -0
- package/dist/cli/legacy-migration.js +335 -0
- package/dist/cli/mcp.d.ts +8 -0
- package/dist/cli/mcp.js +63 -0
- package/dist/cli/output.d.ts +12 -0
- package/dist/cli/output.js +37 -0
- package/dist/cli/preflight.d.ts +9 -0
- package/dist/cli/preflight.js +96 -0
- package/dist/cli/removed-verbs.d.ts +9 -0
- package/dist/cli/removed-verbs.js +78 -0
- package/dist/cli/sa-preflight.d.ts +99 -0
- package/dist/cli/sa-preflight.js +183 -0
- package/dist/cli/scenarios-command.d.ts +6 -0
- package/dist/cli/scenarios-command.js +167 -0
- package/dist/cli/startup.d.ts +112 -0
- package/dist/cli/startup.js +641 -0
- package/dist/cli/upgrade-command.d.ts +5 -0
- package/dist/cli/upgrade-command.js +240 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +680 -0
- package/dist/client/core.d.ts +33 -0
- package/dist/client/core.js +1260 -0
- package/dist/client/ensure-conductor-spawned.d.ts +35 -0
- package/dist/client/ensure-conductor-spawned.js +48 -0
- package/dist/client/index.d.ts +32 -0
- package/dist/client/index.js +22 -0
- package/dist/client/interface.d.ts +461 -0
- package/dist/client/interface.js +2 -0
- package/dist/client/subscribe.d.ts +108 -0
- package/dist/client/subscribe.js +598 -0
- package/dist/client/with-spawn.d.ts +27 -0
- package/dist/client/with-spawn.js +87 -0
- package/dist/config.d.ts +323 -0
- package/dist/config.js +593 -0
- package/dist/connection.d.ts +7 -0
- package/dist/connection.js +46 -0
- package/dist/constants.d.ts +50 -0
- package/dist/constants.js +74 -0
- package/dist/copilot-bridge.d.ts +22 -0
- package/dist/copilot-bridge.js +565 -0
- package/dist/daemon-adapter-versions.d.ts +52 -0
- package/dist/daemon-adapter-versions.js +170 -0
- package/dist/daemon.d.ts +275 -0
- package/dist/daemon.js +989 -0
- package/dist/ensemble/agent-types.d.ts +23 -0
- package/dist/ensemble/agent-types.js +132 -0
- package/dist/ensemble/loader.d.ts +14 -0
- package/dist/ensemble/loader.js +140 -0
- package/dist/ensemble/saver.d.ts +49 -0
- package/dist/ensemble/saver.js +201 -0
- package/dist/ensemble/schema.d.ts +71 -0
- package/dist/ensemble/schema.js +3 -0
- package/dist/git-info.d.ts +4 -0
- package/dist/git-info.js +29 -0
- package/dist/http/aggregate.d.ts +319 -0
- package/dist/http/aggregate.js +684 -0
- package/dist/http/auth.d.ts +67 -0
- package/dist/http/auth.js +177 -0
- package/dist/http/body.d.ts +71 -0
- package/dist/http/body.js +121 -0
- package/dist/http/catalog.d.ts +67 -0
- package/dist/http/catalog.js +209 -0
- package/dist/http/cors.d.ts +42 -0
- package/dist/http/cors.js +111 -0
- package/dist/http/dashboard-pair.d.ts +94 -0
- package/dist/http/dashboard-pair.js +148 -0
- package/dist/http/dashboard.d.ts +20 -0
- package/dist/http/dashboard.js +160 -0
- package/dist/http/event-bus.d.ts +217 -0
- package/dist/http/event-bus.js +365 -0
- package/dist/http/event-id.d.ts +77 -0
- package/dist/http/event-id.js +117 -0
- package/dist/http/event-types.d.ts +348 -0
- package/dist/http/event-types.js +36 -0
- package/dist/http/fixtures/chat-stress.d.ts +8 -0
- package/dist/http/fixtures/chat-stress.js +63 -0
- package/dist/http/fixtures/conductor-leaving.d.ts +8 -0
- package/dist/http/fixtures/conductor-leaving.js +80 -0
- package/dist/http/fixtures/constants.d.ts +10 -0
- package/dist/http/fixtures/constants.js +13 -0
- package/dist/http/fixtures/eight-player-broadcast.d.ts +10 -0
- package/dist/http/fixtures/eight-player-broadcast.js +81 -0
- package/dist/http/fixtures/empty-ensemble.d.ts +6 -0
- package/dist/http/fixtures/empty-ensemble.js +26 -0
- package/dist/http/fixtures/index.d.ts +55 -0
- package/dist/http/fixtures/index.js +110 -0
- package/dist/http/fixtures/single-conductor.d.ts +7 -0
- package/dist/http/fixtures/single-conductor.js +46 -0
- package/dist/http/fixtures/sse-reconnect.d.ts +8 -0
- package/dist/http/fixtures/sse-reconnect.js +77 -0
- package/dist/http/index.d.ts +21 -0
- package/dist/http/index.js +61 -0
- package/dist/http/port-file.d.ts +22 -0
- package/dist/http/port-file.js +132 -0
- package/dist/http/responses.d.ts +27 -0
- package/dist/http/responses.js +40 -0
- package/dist/http/ring-buffer.d.ts +41 -0
- package/dist/http/ring-buffer.js +80 -0
- package/dist/http/server.d.ts +122 -0
- package/dist/http/server.js +459 -0
- package/dist/http/snapshot.d.ts +85 -0
- package/dist/http/snapshot.js +180 -0
- package/dist/http/sse-handler.d.ts +87 -0
- package/dist/http/sse-handler.js +294 -0
- package/dist/http/writes.d.ts +55 -0
- package/dist/http/writes.js +240 -0
- package/dist/palette/index.d.ts +138 -0
- package/dist/palette/index.js +221 -0
- package/dist/reconcile/orphans.d.ts +255 -0
- package/dist/reconcile/orphans.js +340 -0
- package/dist/scripts/258-spotcheck.js +303 -0
- package/dist/scripts/check-components-css-sync.js +199 -0
- package/dist/scripts/run-shard.js +121 -0
- package/dist/scripts/verify-daemon-isolation-guard.js +128 -0
- package/dist/server-tools.d.ts +87 -0
- package/dist/server-tools.js +146 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +366 -0
- package/dist/spawn.d.ts +296 -0
- package/dist/spawn.js +747 -0
- package/dist/tools/agent-types.d.ts +2 -0
- package/dist/tools/agent-types.js +21 -0
- package/dist/tools/attachment-info.d.ts +4 -0
- package/dist/tools/attachment-info.js +48 -0
- package/dist/tools/broadcast.d.ts +4 -0
- package/dist/tools/broadcast.js +76 -0
- package/dist/tools/cancel-stage.d.ts +3 -0
- package/dist/tools/cancel-stage.js +20 -0
- package/dist/tools/clear-state.d.ts +3 -0
- package/dist/tools/clear-state.js +37 -0
- package/dist/tools/coat-check-evict.d.ts +4 -0
- package/dist/tools/coat-check-evict.js +43 -0
- package/dist/tools/coat-check-get.d.ts +4 -0
- package/dist/tools/coat-check-get.js +56 -0
- package/dist/tools/coat-check-list.d.ts +4 -0
- package/dist/tools/coat-check-list.js +60 -0
- package/dist/tools/coat-check-put.d.ts +4 -0
- package/dist/tools/coat-check-put.js +53 -0
- package/dist/tools/cue.d.ts +44 -0
- package/dist/tools/cue.js +201 -0
- package/dist/tools/destroy.d.ts +4 -0
- package/dist/tools/destroy.js +188 -0
- package/dist/tools/detach.d.ts +4 -0
- package/dist/tools/detach.js +45 -0
- package/dist/tools/encore.d.ts +4 -0
- package/dist/tools/encore.js +31 -0
- package/dist/tools/ensemble.d.ts +32 -0
- package/dist/tools/ensemble.js +198 -0
- package/dist/tools/evaluate-gate.d.ts +3 -0
- package/dist/tools/evaluate-gate.js +32 -0
- package/dist/tools/fetch-state.d.ts +13 -0
- package/dist/tools/fetch-state.js +78 -0
- package/dist/tools/gates.d.ts +3 -0
- package/dist/tools/gates.js +41 -0
- package/dist/tools/helpers.d.ts +21 -0
- package/dist/tools/helpers.js +25 -0
- package/dist/tools/hosts.d.ts +4 -0
- package/dist/tools/hosts.js +40 -0
- package/dist/tools/listen.d.ts +3 -0
- package/dist/tools/listen.js +22 -0
- package/dist/tools/load-lineup.d.ts +5 -0
- package/dist/tools/load-lineup.js +381 -0
- package/dist/tools/migrate.d.ts +4 -0
- package/dist/tools/migrate.js +60 -0
- package/dist/tools/pause-ensemble.d.ts +4 -0
- package/dist/tools/pause-ensemble.js +58 -0
- package/dist/tools/pause.d.ts +4 -0
- package/dist/tools/pause.js +36 -0
- package/dist/tools/play.d.ts +4 -0
- package/dist/tools/play.js +57 -0
- package/dist/tools/quality-gate.d.ts +3 -0
- package/dist/tools/quality-gate.js +26 -0
- package/dist/tools/recall.d.ts +3 -0
- package/dist/tools/recall.js +32 -0
- package/dist/tools/recruit.d.ts +38 -0
- package/dist/tools/recruit.js +447 -0
- package/dist/tools/release.d.ts +4 -0
- package/dist/tools/release.js +98 -0
- package/dist/tools/report.d.ts +3 -0
- package/dist/tools/report.js +29 -0
- package/dist/tools/resolve.d.ts +1 -0
- package/dist/tools/resolve.js +7 -0
- package/dist/tools/restart.d.ts +35 -0
- package/dist/tools/restart.js +131 -0
- package/dist/tools/restore.d.ts +4 -0
- package/dist/tools/restore.js +107 -0
- package/dist/tools/resume-ensemble.d.ts +4 -0
- package/dist/tools/resume-ensemble.js +79 -0
- package/dist/tools/save-lineup.d.ts +4 -0
- package/dist/tools/save-lineup.js +36 -0
- package/dist/tools/save-state.d.ts +3 -0
- package/dist/tools/save-state.js +57 -0
- package/dist/tools/schedule.d.ts +4 -0
- package/dist/tools/schedule.js +152 -0
- package/dist/tools/schedules.d.ts +4 -0
- package/dist/tools/schedules.js +54 -0
- package/dist/tools/set-ensemble-description.d.ts +4 -0
- package/dist/tools/set-ensemble-description.js +37 -0
- package/dist/tools/set-name.d.ts +4 -0
- package/dist/tools/set-name.js +45 -0
- package/dist/tools/set-part.d.ts +3 -0
- package/dist/tools/set-part.js +20 -0
- package/dist/tools/shutdown.d.ts +4 -0
- package/dist/tools/shutdown.js +54 -0
- package/dist/tools/stage.d.ts +3 -0
- package/dist/tools/stage.js +28 -0
- package/dist/tools/stages.d.ts +3 -0
- package/dist/tools/stages.js +35 -0
- package/dist/tools/stop.d.ts +4 -0
- package/dist/tools/stop.js +29 -0
- package/dist/tools/unschedule.d.ts +4 -0
- package/dist/tools/unschedule.js +35 -0
- package/dist/tools/who-am-i.d.ts +3 -0
- package/dist/tools/who-am-i.js +34 -0
- package/dist/tools/worktree.d.ts +4 -0
- package/dist/tools/worktree.js +181 -0
- package/dist/tui/App.d.ts +85 -0
- package/dist/tui/App.js +1791 -0
- package/dist/tui/bootstrap-types.d.ts +46 -0
- package/dist/tui/bootstrap-types.js +7 -0
- package/dist/tui/client.d.ts +6 -0
- package/dist/tui/client.js +9 -0
- package/dist/tui/commands.d.ts +71 -0
- package/dist/tui/commands.js +1375 -0
- package/dist/tui/components/ActivityLog.d.ts +16 -0
- package/dist/tui/components/ActivityLog.js +36 -0
- package/dist/tui/components/ChatView.d.ts +35 -0
- package/dist/tui/components/ChatView.js +54 -0
- package/dist/tui/components/CommandOverlay.d.ts +15 -0
- package/dist/tui/components/CommandOverlay.js +34 -0
- package/dist/tui/components/CommandPalette.d.ts +21 -0
- package/dist/tui/components/CommandPalette.js +67 -0
- package/dist/tui/components/ConductorChat.d.ts +16 -0
- package/dist/tui/components/ConductorChat.js +32 -0
- package/dist/tui/components/ConversationStream.d.ts +114 -0
- package/dist/tui/components/ConversationStream.js +307 -0
- package/dist/tui/components/CreateEnsembleWizard.d.ts +19 -0
- package/dist/tui/components/CreateEnsembleWizard.js +223 -0
- package/dist/tui/components/DestroyConfirmModal.d.ts +17 -0
- package/dist/tui/components/DestroyConfirmModal.js +62 -0
- package/dist/tui/components/EnsembleListView.d.ts +14 -0
- package/dist/tui/components/EnsembleListView.js +32 -0
- package/dist/tui/components/EnsemblePanel.d.ts +12 -0
- package/dist/tui/components/EnsemblePanel.js +40 -0
- package/dist/tui/components/ErrorView.d.ts +31 -0
- package/dist/tui/components/ErrorView.js +129 -0
- package/dist/tui/components/HomeView.d.ts +54 -0
- package/dist/tui/components/HomeView.js +306 -0
- package/dist/tui/components/InputBar.d.ts +13 -0
- package/dist/tui/components/InputBar.js +58 -0
- package/dist/tui/components/LoadLineupModal.d.ts +18 -0
- package/dist/tui/components/LoadLineupModal.js +79 -0
- package/dist/tui/components/MainView.d.ts +21 -0
- package/dist/tui/components/MainView.js +107 -0
- package/dist/tui/components/NewEnsembleModal.d.ts +9 -0
- package/dist/tui/components/NewEnsembleModal.js +73 -0
- package/dist/tui/components/Picker.d.ts +23 -0
- package/dist/tui/components/Picker.js +70 -0
- package/dist/tui/components/PlayerDetailView.d.ts +26 -0
- package/dist/tui/components/PlayerDetailView.js +118 -0
- package/dist/tui/components/PromptArea.d.ts +50 -0
- package/dist/tui/components/PromptArea.js +303 -0
- package/dist/tui/components/RecruitWizard.d.ts +17 -0
- package/dist/tui/components/RecruitWizard.js +221 -0
- package/dist/tui/components/RestoreConfirmModal.d.ts +18 -0
- package/dist/tui/components/RestoreConfirmModal.js +71 -0
- package/dist/tui/components/ScheduleOverlay.d.ts +13 -0
- package/dist/tui/components/ScheduleOverlay.js +113 -0
- package/dist/tui/components/ScheduleWizard.d.ts +19 -0
- package/dist/tui/components/ScheduleWizard.js +259 -0
- package/dist/tui/components/Splash.d.ts +23 -0
- package/dist/tui/components/Splash.js +221 -0
- package/dist/tui/components/StatusBar.d.ts +48 -0
- package/dist/tui/components/StatusBar.js +128 -0
- package/dist/tui/components/StatusOverlay.d.ts +15 -0
- package/dist/tui/components/StatusOverlay.js +76 -0
- package/dist/tui/components/TitleBar.d.ts +10 -0
- package/dist/tui/components/TitleBar.js +21 -0
- package/dist/tui/components/TopBar.d.ts +12 -0
- package/dist/tui/components/TopBar.js +15 -0
- package/dist/tui/core-api.d.ts +26 -0
- package/dist/tui/core-api.js +67 -0
- package/dist/tui/hooks/useEnsembleDiscovery.d.ts +3 -0
- package/dist/tui/hooks/useEnsembleDiscovery.js +30 -0
- package/dist/tui/hooks/useMaestroPoller.d.ts +3 -0
- package/dist/tui/hooks/useMaestroPoller.js +36 -0
- package/dist/tui/hooks/useSendCommand.d.ts +7 -0
- package/dist/tui/hooks/useSendCommand.js +29 -0
- package/dist/tui/index.d.ts +15 -0
- package/dist/tui/index.js +156 -0
- package/dist/tui/ink-context.d.ts +18 -0
- package/dist/tui/ink-context.js +59 -0
- package/dist/tui/ink-loader.d.ts +26 -0
- package/dist/tui/ink-loader.js +42 -0
- package/dist/tui/removed-commands.d.ts +9 -0
- package/dist/tui/removed-commands.js +22 -0
- package/dist/tui/sse-handler.d.ts +52 -0
- package/dist/tui/sse-handler.js +157 -0
- package/dist/tui/store.d.ts +598 -0
- package/dist/tui/store.js +753 -0
- package/dist/tui/utils/format.d.ts +56 -0
- package/dist/tui/utils/format.js +155 -0
- package/dist/tui/utils/fullscreen.d.ts +23 -0
- package/dist/tui/utils/fullscreen.js +71 -0
- package/dist/tui/utils/history.d.ts +10 -0
- package/dist/tui/utils/history.js +85 -0
- package/dist/tui/utils/platform.d.ts +45 -0
- package/dist/tui/utils/platform.js +258 -0
- package/dist/tui/utils/theme.d.ts +21 -0
- package/dist/tui/utils/theme.js +24 -0
- package/dist/types.d.ts +1020 -0
- package/dist/types.js +39 -0
- package/dist/utils/attachment-format.d.ts +22 -0
- package/dist/utils/attachment-format.js +32 -0
- package/dist/utils/default-part.d.ts +43 -0
- package/dist/utils/default-part.js +104 -0
- package/dist/utils/duration.d.ts +30 -0
- package/dist/utils/duration.js +69 -0
- package/dist/utils/ensemble-ops.d.ts +61 -0
- package/dist/utils/ensemble-ops.js +77 -0
- package/dist/utils/format-hosts.d.ts +21 -0
- package/dist/utils/format-hosts.js +73 -0
- package/dist/utils/hosts.d.ts +113 -0
- package/dist/utils/hosts.js +265 -0
- package/dist/utils/parent-death-watchdog.d.ts +1 -0
- package/dist/utils/parent-death-watchdog.js +47 -0
- package/dist/utils/query-timeout.d.ts +103 -0
- package/dist/utils/query-timeout.js +113 -0
- package/dist/utils/recall-format.d.ts +78 -0
- package/dist/utils/recall-format.js +105 -0
- package/dist/utils/restore-format.d.ts +49 -0
- package/dist/utils/restore-format.js +91 -0
- package/dist/utils/safe-path.d.ts +10 -0
- package/dist/utils/safe-path.js +43 -0
- package/dist/utils/sdk-probe.d.ts +9 -0
- package/dist/utils/sdk-probe.js +45 -0
- package/dist/utils/search-attributes.d.ts +76 -0
- package/dist/utils/search-attributes.js +86 -0
- package/dist/utils/validation.d.ts +113 -0
- package/dist/utils/validation.js +163 -0
- package/dist/utils/visibility-deadline.d.ts +186 -0
- package/dist/utils/visibility-deadline.js +158 -0
- package/dist/utils/worktree.d.ts +103 -0
- package/dist/utils/worktree.js +327 -0
- package/dist/worker.d.ts +14 -0
- package/dist/worker.js +146 -0
- package/dist/workflows/attachment-math.d.ts +56 -0
- package/dist/workflows/attachment-math.js +47 -0
- package/dist/workflows/index.d.ts +3 -0
- package/dist/workflows/index.js +11 -0
- package/dist/workflows/maestro-signals.d.ts +217 -0
- package/dist/workflows/maestro-signals.js +155 -0
- package/dist/workflows/maestro.d.ts +3 -0
- package/dist/workflows/maestro.js +812 -0
- package/dist/workflows/scheduler-signals.d.ts +10 -0
- package/dist/workflows/scheduler-signals.js +14 -0
- package/dist/workflows/scheduler.d.ts +17 -0
- package/dist/workflows/scheduler.js +143 -0
- package/dist/workflows/session.d.ts +2 -0
- package/dist/workflows/session.js +1638 -0
- package/dist/workflows/signals.d.ts +297 -0
- package/dist/workflows/signals.js +239 -0
- package/examples/agents/tempo-composer.md +56 -0
- package/examples/agents/tempo-conductor.md +117 -0
- package/examples/agents/tempo-critic.md +73 -0
- package/examples/agents/tempo-improv.md +74 -0
- package/examples/agents/tempo-liner.md +75 -0
- package/examples/agents/tempo-roadie.md +61 -0
- package/examples/agents/tempo-soloist.md +71 -0
- package/examples/agents/tempo-tuner.md +94 -0
- package/examples/ensembles/tempo-big-band.yaml +146 -0
- package/examples/ensembles/tempo-dev-team.yaml +58 -0
- package/examples/ensembles/tempo-headless-jam.yaml +77 -0
- package/examples/ensembles/tempo-jam-session.yaml +41 -0
- package/examples/ensembles/tempo-mock-jam.yaml +79 -0
- package/examples/ensembles/tempo-review-squad.yaml +32 -0
- package/package.json +172 -0
- package/packaging/launchd/com.agent.tempo.plist +46 -0
- package/packaging/systemd/agent-tempo.service +32 -0
- package/packaging/windows/install-task.ps1 +71 -0
- package/scenarios/conductor-recruit-mock.yaml +33 -0
- package/scenarios/echo-roundtrip.yaml +15 -0
- package/scenarios/multi-player-handoff.yaml +38 -0
- package/scenarios/recruit-cascade.yaml +38 -0
- package/scenarios/two-player-conversation.yaml +33 -0
- package/workflow-bundle.js +14146 -0
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TUI state management — useReducer + React context.
|
|
3
|
+
* No external state libraries. All state flows through a single dispatch.
|
|
4
|
+
*
|
|
5
|
+
* Supports multi-ensemble navigation: home -> ensemble -> player views.
|
|
6
|
+
*/
|
|
7
|
+
import type { AttachmentPhase, MaestroPlayerInfo, MaestroRelayMessage, HistoryEntry, Message, SentMessage, SessionMetadata, ScheduleEntry, EnsembleChatMessage, EnsembleChatResult } from '../types';
|
|
8
|
+
import type { EnsembleSummary } from '../client';
|
|
9
|
+
/** Conversation-entry shape rendered by `ConversationStream`. */
|
|
10
|
+
export interface ConversationEntry {
|
|
11
|
+
id: string;
|
|
12
|
+
from: string;
|
|
13
|
+
to: string;
|
|
14
|
+
text: string;
|
|
15
|
+
timestamp: string;
|
|
16
|
+
direction: 'in' | 'out';
|
|
17
|
+
role?: 'maestro-out' | 'maestro-in' | 'conductor-out' | 'conductor-in';
|
|
18
|
+
thirdParty?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* #357: Mirrors `EnsembleChatMessage.broadcastId`. Threaded through
|
|
21
|
+
* `toConversationEntry` so the TUI's `ConversationStream.foldByBroadcastId`
|
|
22
|
+
* can collapse consecutive entries sharing the same id into one row.
|
|
23
|
+
*/
|
|
24
|
+
broadcastId?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Project an `EnsembleChatMessage` into a `ConversationEntry`. Shared by
|
|
28
|
+
* the reducer's incremental path (`APPEND_CHAT_MESSAGE`) and the SSE
|
|
29
|
+
* snapshot/recovery paths (`src/tui/sse-handler.ts`) so both produce the
|
|
30
|
+
* same shape.
|
|
31
|
+
*/
|
|
32
|
+
export declare function toConversationEntry(m: EnsembleChatMessage): ConversationEntry;
|
|
33
|
+
/**
|
|
34
|
+
* TuiView tracks the *navigation hierarchy* (home → ensemble → player).
|
|
35
|
+
* It determines what data to fetch and what breadcrumb context to show.
|
|
36
|
+
*/
|
|
37
|
+
export type TuiView = 'home' | 'ensemble' | 'player';
|
|
38
|
+
/**
|
|
39
|
+
* TuiPhase tracks the *application lifecycle* (splash → main → chat/error).
|
|
40
|
+
* It determines which component renders in the live content area.
|
|
41
|
+
* A phase can span multiple views (e.g., 'main' shows either home or ensemble view).
|
|
42
|
+
*/
|
|
43
|
+
export type TuiPhase = 'splash' | 'main' | 'chat' | 'recruit' | 'schedule-create' | 'create-ensemble' | 'error';
|
|
44
|
+
export interface StaticItem {
|
|
45
|
+
id: string;
|
|
46
|
+
type: 'splash-done' | 'command-output' | 'message' | 'error' | 'info';
|
|
47
|
+
content: string;
|
|
48
|
+
timestamp: number;
|
|
49
|
+
/** Message-specific fields for rich rendering in scrollback. */
|
|
50
|
+
msgDirection?: 'in' | 'out';
|
|
51
|
+
msgSender?: string;
|
|
52
|
+
msgTime?: string;
|
|
53
|
+
msgThirdParty?: boolean;
|
|
54
|
+
msgRouteLabel?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* #306: Bottom-pinned ephemeral notifications for errors + warnings.
|
|
58
|
+
*
|
|
59
|
+
* Before #306 these rode `commitStatic('error'|'warn', …)` and scrolled out
|
|
60
|
+
* of view — users missed critical guard errors (e.g. `/destroy conductor`
|
|
61
|
+
* refusals) because a few lines of other output pushed them above the fold.
|
|
62
|
+
* Notifications render below the prompt, auto-dismiss on TTL, and can be
|
|
63
|
+
* dismissed with Esc.
|
|
64
|
+
*/
|
|
65
|
+
export interface NotificationItem {
|
|
66
|
+
id: number;
|
|
67
|
+
kind: 'error' | 'warn' | 'info';
|
|
68
|
+
content: string;
|
|
69
|
+
timestamp: number;
|
|
70
|
+
/** Absolute ms epoch when this notification should disappear. */
|
|
71
|
+
expiresAt: number;
|
|
72
|
+
}
|
|
73
|
+
/** Default TTLs by kind — errors get extra time to read. */
|
|
74
|
+
export declare const NOTIFICATION_TTL_MS: {
|
|
75
|
+
readonly error: 8000;
|
|
76
|
+
readonly warn: 5000;
|
|
77
|
+
readonly info: 5000;
|
|
78
|
+
};
|
|
79
|
+
/** Maximum concurrent notifications; oldest is dropped when exceeded. */
|
|
80
|
+
export declare const NOTIFICATION_CAP = 3;
|
|
81
|
+
export type RecruitStep = 'name' | 'agent' | 'type' | 'workDir' | 'message' | 'host' | 'confirm' | 'done';
|
|
82
|
+
export interface RecruitAnswers {
|
|
83
|
+
name: string;
|
|
84
|
+
agent: 'claude' | 'copilot';
|
|
85
|
+
playerType: string;
|
|
86
|
+
workDir: string;
|
|
87
|
+
initialMessage: string;
|
|
88
|
+
host: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Wizard Pattern:
|
|
92
|
+
* - Each wizard has a phase (e.g., 'recruit', 'schedule-create', 'create-ensemble')
|
|
93
|
+
* - State: step name, answers accumulator, error, submitting flag, pre-wizard phase/chatTarget
|
|
94
|
+
* - Actions: ENTER_*, *_NEXT_STEP, *_PREV_STEP, *_SUBMIT, *_DONE, EXIT_*
|
|
95
|
+
* - Components: zero-Yoga-node Text renders, manual key handling in App.tsx useInput
|
|
96
|
+
* - Pre-wizard state (phase, chatTarget) is saved on enter and restored on exit
|
|
97
|
+
* - Future: normalize to generic WizardState<TStep, TAnswers> (see #96)
|
|
98
|
+
*/
|
|
99
|
+
export interface RecruitState {
|
|
100
|
+
step: RecruitStep;
|
|
101
|
+
answers: RecruitAnswers;
|
|
102
|
+
/** Error from the recruit API call, if any. */
|
|
103
|
+
error?: string;
|
|
104
|
+
/** Whether the recruit API call is in progress. */
|
|
105
|
+
submitting?: boolean;
|
|
106
|
+
/** Phase before entering the wizard (restored on exit). */
|
|
107
|
+
preRecruitPhase: TuiPhase;
|
|
108
|
+
/** Chat target before entering the wizard (restored on exit). */
|
|
109
|
+
preRecruitChatTarget?: string;
|
|
110
|
+
}
|
|
111
|
+
export declare const RECRUIT_STEPS: RecruitStep[];
|
|
112
|
+
export type ScheduleStep = 'target' | 'message' | 'schedType' | 'timing' | 'timezone' | 'confirm' | 'done';
|
|
113
|
+
export type ScheduleType = 'delay' | 'at' | 'every' | 'cron';
|
|
114
|
+
export interface ScheduleAnswers {
|
|
115
|
+
target: string;
|
|
116
|
+
message: string;
|
|
117
|
+
schedType: ScheduleType;
|
|
118
|
+
timing: string;
|
|
119
|
+
timezone: string;
|
|
120
|
+
name: string;
|
|
121
|
+
}
|
|
122
|
+
export interface ScheduleWizardState {
|
|
123
|
+
step: ScheduleStep;
|
|
124
|
+
answers: ScheduleAnswers;
|
|
125
|
+
error?: string;
|
|
126
|
+
submitting?: boolean;
|
|
127
|
+
prePhase: TuiPhase;
|
|
128
|
+
preChatTarget?: string;
|
|
129
|
+
}
|
|
130
|
+
export declare const SCHEDULE_STEPS: ScheduleStep[];
|
|
131
|
+
export declare const DEFAULT_SCHEDULE_ANSWERS: ScheduleAnswers;
|
|
132
|
+
export declare function defaultRecruitAnswers(defaultAgent?: 'claude' | 'copilot'): RecruitAnswers;
|
|
133
|
+
export type CreateEnsembleStep = 'name' | 'workDir' | 'lineup' | 'confirm' | 'done';
|
|
134
|
+
export interface CreateEnsembleAnswers {
|
|
135
|
+
name: string;
|
|
136
|
+
workDir: string;
|
|
137
|
+
lineup: string;
|
|
138
|
+
}
|
|
139
|
+
export interface CreateEnsembleState {
|
|
140
|
+
step: CreateEnsembleStep;
|
|
141
|
+
answers: CreateEnsembleAnswers;
|
|
142
|
+
error?: string;
|
|
143
|
+
submitting?: boolean;
|
|
144
|
+
prePhase: TuiPhase;
|
|
145
|
+
}
|
|
146
|
+
export declare const CREATE_ENSEMBLE_STEPS: CreateEnsembleStep[];
|
|
147
|
+
export declare const DEFAULT_CREATE_ENSEMBLE_ANSWERS: CreateEnsembleAnswers;
|
|
148
|
+
export interface TuiState {
|
|
149
|
+
phase: TuiPhase;
|
|
150
|
+
/** Current view in the navigation hierarchy. */
|
|
151
|
+
view: TuiView;
|
|
152
|
+
/** Error message when phase === 'error'. */
|
|
153
|
+
error?: string;
|
|
154
|
+
/** Splash screen status text. */
|
|
155
|
+
splashStatus: string;
|
|
156
|
+
/** Progressive checklist items shown during splash. */
|
|
157
|
+
splashChecks: Array<{
|
|
158
|
+
label: string;
|
|
159
|
+
done: boolean;
|
|
160
|
+
error?: boolean;
|
|
161
|
+
}>;
|
|
162
|
+
/** Whether the splash connection sequence is complete. */
|
|
163
|
+
splashConnected: boolean;
|
|
164
|
+
/** Summary info shown in splash after connection. */
|
|
165
|
+
splashSummary?: {
|
|
166
|
+
ensemble: string;
|
|
167
|
+
playerCount: number;
|
|
168
|
+
conductor?: string;
|
|
169
|
+
scheduleCount?: number;
|
|
170
|
+
};
|
|
171
|
+
/** Known ensembles (null = not yet loaded, [] = loaded but empty). */
|
|
172
|
+
ensembles: EnsembleSummary[] | null;
|
|
173
|
+
/** Currently highlighted ensemble index (home view). */
|
|
174
|
+
selectedEnsembleIndex: number;
|
|
175
|
+
/** The ensemble currently being viewed (null = home). */
|
|
176
|
+
activeEnsemble: string | null;
|
|
177
|
+
/** Players in the active ensemble. */
|
|
178
|
+
players: MaestroPlayerInfo[];
|
|
179
|
+
/** True after the first successful player poll. Reset on ensemble switch. */
|
|
180
|
+
playersLoaded: boolean;
|
|
181
|
+
/** Messages in the active ensemble (relay messages). */
|
|
182
|
+
messages: MaestroRelayMessage[];
|
|
183
|
+
/** Conductor history in the active ensemble. */
|
|
184
|
+
conductorHistory: HistoryEntry[];
|
|
185
|
+
/** Active schedules in the ensemble. */
|
|
186
|
+
schedules: ScheduleEntry[];
|
|
187
|
+
/** Maestro conversation (null = loading, [] = loaded but empty). */
|
|
188
|
+
conversation: ConversationEntry[] | null;
|
|
189
|
+
/** Aggregated ensemble chat feed (from maestroEnsembleChat query). */
|
|
190
|
+
ensembleChat: EnsembleChatMessage[];
|
|
191
|
+
/** Whether the active ensemble has a conductor. */
|
|
192
|
+
hasConductor: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Bug B: Whether the active ensemble's maestro hub is paused. Polled
|
|
195
|
+
* alongside players/chat. The conductor's session-level `paused` flag
|
|
196
|
+
* blocks outbox dispatch, so the TUI surfaces this in the status bar
|
|
197
|
+
* (`paused` segment) so users don't wonder why typed messages aren't
|
|
198
|
+
* getting a reply. Optimistically toggled by `/pause` and `/play`.
|
|
199
|
+
*/
|
|
200
|
+
ensemblePaused: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* #306 follow-up: Whether at least one session in the active ensemble
|
|
203
|
+
* has its outbox locked (`held`). Mirrors {@link ensemblePaused} —
|
|
204
|
+
* polled in the same 2s loop, reset on nav transitions, optimistically
|
|
205
|
+
* cleared by `/play` and `/go`. Drives the StatusBar `held` segment +
|
|
206
|
+
* the "Tip: type /go" hint pinned below the input.
|
|
207
|
+
*
|
|
208
|
+
* Independent of `ensemblePaused` because `/load_lineup` produces
|
|
209
|
+
* paused + held simultaneously, and resuming both requires `/play`
|
|
210
|
+
* AND `/go`. Without surfacing held separately, users got stuck
|
|
211
|
+
* unpausing an ensemble that still had every player frozen.
|
|
212
|
+
*/
|
|
213
|
+
ensembleHeld: boolean;
|
|
214
|
+
/** Currently highlighted player index (ensemble view). */
|
|
215
|
+
selectedPlayerIndex: number;
|
|
216
|
+
/** The player currently being inspected (null = not viewing a player). */
|
|
217
|
+
activePlayer: string | null;
|
|
218
|
+
/** Player's workflow metadata. */
|
|
219
|
+
playerMetadata: SessionMetadata | null;
|
|
220
|
+
/** Player's message history (received + sent). */
|
|
221
|
+
playerMessages: Array<Message | (SentMessage & {
|
|
222
|
+
direction: 'sent';
|
|
223
|
+
})>;
|
|
224
|
+
/** Scroll offset within the player detail view message list. */
|
|
225
|
+
playerScrollOffset: number;
|
|
226
|
+
/** Committed scroll-up history items. */
|
|
227
|
+
staticItems: StaticItem[];
|
|
228
|
+
/**
|
|
229
|
+
* #306: Bottom-pinned ephemeral notifications — errors/warnings that must
|
|
230
|
+
* stay visible until dismissed rather than scrolling off the top. The
|
|
231
|
+
* renderer filters expired entries on every tick via a separate state
|
|
232
|
+
* counter so the auto-dismiss doesn't need a reducer pass.
|
|
233
|
+
*/
|
|
234
|
+
notifications: NotificationItem[];
|
|
235
|
+
/**
|
|
236
|
+
* #306: Monotonic tick counter — bumped every 500ms by a root-level effect
|
|
237
|
+
* to force re-renders so expired notifications disappear without requiring
|
|
238
|
+
* a reducer action per expiration. Cheap — a single integer diff.
|
|
239
|
+
*/
|
|
240
|
+
notificationTick: number;
|
|
241
|
+
/** Player name when in chat mode (bare text sends message to this target). */
|
|
242
|
+
chatTarget?: string;
|
|
243
|
+
/** Locally tracked sent messages (TUI has no workflow to query). */
|
|
244
|
+
sentMessages: Array<{
|
|
245
|
+
to: string;
|
|
246
|
+
text: string;
|
|
247
|
+
timestamp: string;
|
|
248
|
+
}>;
|
|
249
|
+
/** ID of the last message seen (for detecting new arrivals in polling). */
|
|
250
|
+
lastSeenMessageId?: string;
|
|
251
|
+
/** Player name pending destroy confirmation (PR-H renamed `/stop` → `/destroy`; field name kept for diff hygiene). */
|
|
252
|
+
confirmingStop?: string;
|
|
253
|
+
/** Optional `reason` carried from the `/destroy <player> [reason]` invocation. */
|
|
254
|
+
confirmingStopReason?: string;
|
|
255
|
+
/** Ensemble name pending disband confirmation (null = not confirming). */
|
|
256
|
+
confirmingDisband?: string;
|
|
257
|
+
/**
|
|
258
|
+
* Ensemble name pending `/destroy <ensemble>` typed-name confirmation.
|
|
259
|
+
* Distinct from `confirmingDisband` because the gate is typed-name rather
|
|
260
|
+
* than y/N.
|
|
261
|
+
*/
|
|
262
|
+
confirmingEnsembleDestroy?: {
|
|
263
|
+
ensemble: string;
|
|
264
|
+
/** Current contents of the typed-confirmation input. */
|
|
265
|
+
input: string;
|
|
266
|
+
/** Mismatch error shown beneath the input; cleared on next keystroke. */
|
|
267
|
+
error?: string;
|
|
268
|
+
submitting?: boolean;
|
|
269
|
+
};
|
|
270
|
+
/** Lineup confirmation state (pending load). */
|
|
271
|
+
confirmingLineup?: {
|
|
272
|
+
action: 'load';
|
|
273
|
+
path: string;
|
|
274
|
+
summary: string;
|
|
275
|
+
};
|
|
276
|
+
/** Recruit wizard state (active when phase === 'recruit'). */
|
|
277
|
+
recruitState?: RecruitState;
|
|
278
|
+
/** Schedule creation wizard state (active when phase === 'schedule-create'). */
|
|
279
|
+
scheduleWizard?: ScheduleWizardState;
|
|
280
|
+
/** Create ensemble wizard state (active when phase === 'create-ensemble'). */
|
|
281
|
+
createEnsembleState?: CreateEnsembleState;
|
|
282
|
+
/**
|
|
283
|
+
* Home-view modal overlay. `undefined` = no modal. Restore carries the
|
|
284
|
+
* target ensemble + conductor name + parked player count so the
|
|
285
|
+
* confirmation body doesn't re-query the backend.
|
|
286
|
+
*/
|
|
287
|
+
homeModal?: {
|
|
288
|
+
type: 'new';
|
|
289
|
+
} | {
|
|
290
|
+
type: 'lineup';
|
|
291
|
+
} | {
|
|
292
|
+
type: 'restore';
|
|
293
|
+
ensemble: string;
|
|
294
|
+
playerCount: number;
|
|
295
|
+
conductor?: string;
|
|
296
|
+
};
|
|
297
|
+
/** True while a home-view modal's submit handler is in flight. */
|
|
298
|
+
homeModalSubmitting?: boolean;
|
|
299
|
+
/** Error surfaced inside the active home modal (spawn failure, etc.). */
|
|
300
|
+
homeModalError?: string;
|
|
301
|
+
/** Status overlay visible (shows player list). */
|
|
302
|
+
statusOverlay: boolean;
|
|
303
|
+
/** Generic command overlay (title + pre-formatted content). Shown by data-display commands. */
|
|
304
|
+
/** Interactive overlay (schedules, gates, stages, worktrees, or generic command). */
|
|
305
|
+
overlay: {
|
|
306
|
+
type: string;
|
|
307
|
+
title: string;
|
|
308
|
+
items: Array<{
|
|
309
|
+
id: string;
|
|
310
|
+
label: string;
|
|
311
|
+
sublabel?: string;
|
|
312
|
+
}>;
|
|
313
|
+
selectedIndex: number;
|
|
314
|
+
hint: string;
|
|
315
|
+
} | null;
|
|
316
|
+
/** Scroll offset within the status overlay. */
|
|
317
|
+
statusScrollOffset: number;
|
|
318
|
+
/** Command palette state. */
|
|
319
|
+
paletteVisible: boolean;
|
|
320
|
+
paletteIndex: number;
|
|
321
|
+
/** Interactive picker overlay state. */
|
|
322
|
+
pickerVisible: boolean;
|
|
323
|
+
pickerType: 'players' | 'ensembles' | null;
|
|
324
|
+
pickerIntent: 'navigate' | null;
|
|
325
|
+
pickerIndex: number;
|
|
326
|
+
/** Optional status filter for player picker. */
|
|
327
|
+
pickerStatusFilter: string | null;
|
|
328
|
+
}
|
|
329
|
+
export declare function initialState(ensemble?: string): TuiState;
|
|
330
|
+
export type TuiAction = {
|
|
331
|
+
type: 'SET_PHASE';
|
|
332
|
+
phase: TuiPhase;
|
|
333
|
+
error?: string;
|
|
334
|
+
} | {
|
|
335
|
+
type: 'SET_SPLASH_STATUS';
|
|
336
|
+
status: string;
|
|
337
|
+
} | {
|
|
338
|
+
type: 'SET_SPLASH_CHECKS';
|
|
339
|
+
checks: Array<{
|
|
340
|
+
label: string;
|
|
341
|
+
done: boolean;
|
|
342
|
+
error?: boolean;
|
|
343
|
+
}>;
|
|
344
|
+
} | {
|
|
345
|
+
type: 'SET_SPLASH_CONNECTED';
|
|
346
|
+
summary?: TuiState['splashSummary'];
|
|
347
|
+
} | {
|
|
348
|
+
type: 'NAVIGATE_HOME';
|
|
349
|
+
} | {
|
|
350
|
+
type: 'NAVIGATE_ENSEMBLE';
|
|
351
|
+
ensemble: string;
|
|
352
|
+
} | {
|
|
353
|
+
type: 'NAVIGATE_PLAYER';
|
|
354
|
+
playerId: string;
|
|
355
|
+
} | {
|
|
356
|
+
type: 'REFRESH_ENSEMBLES';
|
|
357
|
+
ensembles: EnsembleSummary[];
|
|
358
|
+
} | {
|
|
359
|
+
type: 'REFRESH_ENSEMBLE_DATA';
|
|
360
|
+
players: MaestroPlayerInfo[];
|
|
361
|
+
messages: MaestroRelayMessage[];
|
|
362
|
+
history: HistoryEntry[];
|
|
363
|
+
schedules?: ScheduleEntry[];
|
|
364
|
+
} | {
|
|
365
|
+
type: 'SET_CONVERSATION';
|
|
366
|
+
conversation: ConversationEntry[];
|
|
367
|
+
} | {
|
|
368
|
+
type: 'SET_ENSEMBLE_CHAT';
|
|
369
|
+
chat: EnsembleChatResult;
|
|
370
|
+
}
|
|
371
|
+
/** Append one new chat message — used by `event: chat.appended`. Updates `ensembleChat` and `conversation` together. */
|
|
372
|
+
| {
|
|
373
|
+
type: 'APPEND_CHAT_MESSAGE';
|
|
374
|
+
message: EnsembleChatMessage;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Insert or update a player by `playerId` — used by `event: player.added`.
|
|
378
|
+
*
|
|
379
|
+
* **Invariant**: `player` MUST be a complete `MaestroPlayerInfo` snapshot.
|
|
380
|
+
* The reducer's `{...existing, ...incoming}` merge will clobber any fields
|
|
381
|
+
* omitted from `incoming` with `undefined`. For sparse updates (e.g.
|
|
382
|
+
* `phase`-only), use `PATCH_PLAYER_PHASE` (introduced for #351) — extend
|
|
383
|
+
* that pattern to other fields rather than passing partial payloads here.
|
|
384
|
+
*/
|
|
385
|
+
| {
|
|
386
|
+
type: 'UPSERT_PLAYER';
|
|
387
|
+
player: MaestroPlayerInfo;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Patch only the `phase` field of an existing player — used by
|
|
391
|
+
* `event: player.phase_changed`. The wire payload for that event is
|
|
392
|
+
* deliberately sparse (only `playerId`, `ensemble`, `phase`, plus a
|
|
393
|
+
* couple of optional timestamps); routing through `UPSERT_PLAYER`
|
|
394
|
+
* would force the handler to fill `hostname`/`part`/`isConductor`
|
|
395
|
+
* with empty defaults, and the reducer's `{...existing, ...incoming}`
|
|
396
|
+
* spread would then clobber the real values cached from the snapshot.
|
|
397
|
+
* Phase-only patching keeps the rest of the row intact. See #351.
|
|
398
|
+
*/
|
|
399
|
+
| {
|
|
400
|
+
type: 'PATCH_PLAYER_PHASE';
|
|
401
|
+
playerId: string;
|
|
402
|
+
phase: AttachmentPhase;
|
|
403
|
+
}
|
|
404
|
+
/** Remove a player by `playerId` — used by `event: player.removed`. */
|
|
405
|
+
| {
|
|
406
|
+
type: 'REMOVE_PLAYER';
|
|
407
|
+
playerId: string;
|
|
408
|
+
}
|
|
409
|
+
/** Replace the schedules slice — used by `event: schedules.changed`. */
|
|
410
|
+
| {
|
|
411
|
+
type: 'SET_SCHEDULES';
|
|
412
|
+
schedules: ScheduleEntry[];
|
|
413
|
+
} | {
|
|
414
|
+
type: 'REFRESH_PLAYER_DATA';
|
|
415
|
+
metadata: SessionMetadata | null;
|
|
416
|
+
messages: Array<Message | (SentMessage & {
|
|
417
|
+
direction: 'sent';
|
|
418
|
+
})>;
|
|
419
|
+
} | {
|
|
420
|
+
type: 'PLAYER_SCROLL_UP';
|
|
421
|
+
} | {
|
|
422
|
+
type: 'PLAYER_SCROLL_DOWN';
|
|
423
|
+
} | {
|
|
424
|
+
type: 'COMMIT_STATIC';
|
|
425
|
+
item: StaticItem;
|
|
426
|
+
} | {
|
|
427
|
+
type: 'ADD_NOTIFICATION';
|
|
428
|
+
notification: NotificationItem;
|
|
429
|
+
} | {
|
|
430
|
+
type: 'DISMISS_NOTIFICATION';
|
|
431
|
+
id: number;
|
|
432
|
+
} | {
|
|
433
|
+
type: 'DISMISS_OLDEST_NOTIFICATION';
|
|
434
|
+
} | {
|
|
435
|
+
type: 'CLEAR_NOTIFICATIONS';
|
|
436
|
+
} | {
|
|
437
|
+
type: 'NOTIFICATION_TICK';
|
|
438
|
+
} | {
|
|
439
|
+
type: 'SET_ENSEMBLE_PAUSED';
|
|
440
|
+
paused: boolean;
|
|
441
|
+
} | {
|
|
442
|
+
type: 'SET_ENSEMBLE_HELD';
|
|
443
|
+
held: boolean;
|
|
444
|
+
} | {
|
|
445
|
+
type: 'APPEND_SENT_MESSAGE';
|
|
446
|
+
to: string;
|
|
447
|
+
text: string;
|
|
448
|
+
} | {
|
|
449
|
+
type: 'HYDRATE_SENT_MESSAGES';
|
|
450
|
+
messages: Array<{
|
|
451
|
+
to: string;
|
|
452
|
+
text: string;
|
|
453
|
+
timestamp: string;
|
|
454
|
+
}>;
|
|
455
|
+
} | {
|
|
456
|
+
type: 'ENTER_CHAT';
|
|
457
|
+
target: string;
|
|
458
|
+
} | {
|
|
459
|
+
type: 'EXIT_CHAT';
|
|
460
|
+
} | {
|
|
461
|
+
type: 'SHOW_PALETTE';
|
|
462
|
+
} | {
|
|
463
|
+
type: 'HIDE_PALETTE';
|
|
464
|
+
} | {
|
|
465
|
+
type: 'PALETTE_UP';
|
|
466
|
+
} | {
|
|
467
|
+
type: 'PALETTE_DOWN';
|
|
468
|
+
max?: number;
|
|
469
|
+
} | {
|
|
470
|
+
type: 'PALETTE_SET_INDEX';
|
|
471
|
+
index: number;
|
|
472
|
+
} | {
|
|
473
|
+
type: 'SHOW_STATUS';
|
|
474
|
+
} | {
|
|
475
|
+
type: 'HIDE_STATUS';
|
|
476
|
+
} | {
|
|
477
|
+
type: 'SHOW_COMMAND_OVERLAY';
|
|
478
|
+
title: string;
|
|
479
|
+
content: string;
|
|
480
|
+
} | {
|
|
481
|
+
type: 'SHOW_OVERLAY';
|
|
482
|
+
overlay: {
|
|
483
|
+
type: string;
|
|
484
|
+
title: string;
|
|
485
|
+
items: Array<{
|
|
486
|
+
id: string;
|
|
487
|
+
label: string;
|
|
488
|
+
sublabel?: string;
|
|
489
|
+
}>;
|
|
490
|
+
hint: string;
|
|
491
|
+
};
|
|
492
|
+
} | {
|
|
493
|
+
type: 'HIDE_OVERLAY';
|
|
494
|
+
} | {
|
|
495
|
+
type: 'OVERLAY_SELECT';
|
|
496
|
+
direction: 'up' | 'down';
|
|
497
|
+
} | {
|
|
498
|
+
type: 'STATUS_SCROLL_UP';
|
|
499
|
+
} | {
|
|
500
|
+
type: 'STATUS_SCROLL_DOWN';
|
|
501
|
+
} | {
|
|
502
|
+
type: 'SHOW_PICKER';
|
|
503
|
+
pickerType: 'players' | 'ensembles';
|
|
504
|
+
intent?: 'navigate';
|
|
505
|
+
statusFilter?: string;
|
|
506
|
+
} | {
|
|
507
|
+
type: 'HIDE_PICKER';
|
|
508
|
+
} | {
|
|
509
|
+
type: 'PICKER_UP';
|
|
510
|
+
} | {
|
|
511
|
+
type: 'PICKER_DOWN';
|
|
512
|
+
} | {
|
|
513
|
+
type: 'CONFIRM_STOP';
|
|
514
|
+
player: string;
|
|
515
|
+
reason?: string;
|
|
516
|
+
} | {
|
|
517
|
+
type: 'CANCEL_STOP';
|
|
518
|
+
} | {
|
|
519
|
+
type: 'CONFIRM_DISBAND';
|
|
520
|
+
ensemble: string;
|
|
521
|
+
} | {
|
|
522
|
+
type: 'CANCEL_DISBAND';
|
|
523
|
+
} | {
|
|
524
|
+
type: 'CONFIRM_ENSEMBLE_DESTROY';
|
|
525
|
+
ensemble: string;
|
|
526
|
+
} | {
|
|
527
|
+
type: 'ENSEMBLE_DESTROY_INPUT';
|
|
528
|
+
input: string;
|
|
529
|
+
} | {
|
|
530
|
+
type: 'ENSEMBLE_DESTROY_SUBMIT_BUSY';
|
|
531
|
+
} | {
|
|
532
|
+
type: 'ENSEMBLE_DESTROY_MISMATCH';
|
|
533
|
+
} | {
|
|
534
|
+
type: 'CANCEL_ENSEMBLE_DESTROY';
|
|
535
|
+
} | {
|
|
536
|
+
type: 'CONFIRM_LINEUP';
|
|
537
|
+
action: 'load';
|
|
538
|
+
path: string;
|
|
539
|
+
summary: string;
|
|
540
|
+
} | {
|
|
541
|
+
type: 'CANCEL_LINEUP';
|
|
542
|
+
} | {
|
|
543
|
+
type: 'ENTER_RECRUIT';
|
|
544
|
+
answers?: Partial<RecruitAnswers>;
|
|
545
|
+
defaultAgent?: 'claude' | 'copilot';
|
|
546
|
+
} | {
|
|
547
|
+
type: 'RECRUIT_NEXT_STEP';
|
|
548
|
+
answer: Partial<RecruitAnswers>;
|
|
549
|
+
} | {
|
|
550
|
+
type: 'RECRUIT_PREV_STEP';
|
|
551
|
+
} | {
|
|
552
|
+
type: 'RECRUIT_SUBMIT';
|
|
553
|
+
} | {
|
|
554
|
+
type: 'RECRUIT_DONE';
|
|
555
|
+
error?: string;
|
|
556
|
+
} | {
|
|
557
|
+
type: 'EXIT_RECRUIT';
|
|
558
|
+
} | {
|
|
559
|
+
type: 'ENTER_SCHEDULE_WIZARD';
|
|
560
|
+
answers?: Partial<ScheduleAnswers>;
|
|
561
|
+
} | {
|
|
562
|
+
type: 'SCHEDULE_NEXT_STEP';
|
|
563
|
+
answer: Partial<ScheduleAnswers>;
|
|
564
|
+
} | {
|
|
565
|
+
type: 'SCHEDULE_PREV_STEP';
|
|
566
|
+
} | {
|
|
567
|
+
type: 'SCHEDULE_SUBMIT';
|
|
568
|
+
} | {
|
|
569
|
+
type: 'SCHEDULE_DONE';
|
|
570
|
+
error?: string;
|
|
571
|
+
} | {
|
|
572
|
+
type: 'EXIT_SCHEDULE_WIZARD';
|
|
573
|
+
} | {
|
|
574
|
+
type: 'ENTER_CREATE_ENSEMBLE';
|
|
575
|
+
} | {
|
|
576
|
+
type: 'CREATE_ENSEMBLE_NEXT_STEP';
|
|
577
|
+
answer: Partial<CreateEnsembleAnswers>;
|
|
578
|
+
} | {
|
|
579
|
+
type: 'CREATE_ENSEMBLE_PREV_STEP';
|
|
580
|
+
} | {
|
|
581
|
+
type: 'CREATE_ENSEMBLE_SUBMIT';
|
|
582
|
+
} | {
|
|
583
|
+
type: 'CREATE_ENSEMBLE_DONE';
|
|
584
|
+
error?: string;
|
|
585
|
+
ensemble?: string;
|
|
586
|
+
} | {
|
|
587
|
+
type: 'EXIT_CREATE_ENSEMBLE';
|
|
588
|
+
} | {
|
|
589
|
+
type: 'OPEN_HOME_MODAL';
|
|
590
|
+
modal: NonNullable<TuiState['homeModal']>;
|
|
591
|
+
} | {
|
|
592
|
+
type: 'CLOSE_HOME_MODAL';
|
|
593
|
+
} | {
|
|
594
|
+
type: 'SET_HOME_MODAL_STATUS';
|
|
595
|
+
submitting?: boolean;
|
|
596
|
+
error?: string;
|
|
597
|
+
};
|
|
598
|
+
export declare function tuiReducer(state: TuiState, action: TuiAction): TuiState;
|