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,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.RestoreConfirmModal = RestoreConfirmModal;
|
|
37
|
+
/**
|
|
38
|
+
* Single-keypress y/N confirmation before restoring an offline ensemble.
|
|
39
|
+
* Restore is recoverable (operator can `shutdown` again), so no typed
|
|
40
|
+
* confirmation — that's reserved for `destroy`.
|
|
41
|
+
*/
|
|
42
|
+
const react_1 = __importStar(require("react"));
|
|
43
|
+
const ink_context_1 = require("../ink-context");
|
|
44
|
+
const theme_1 = require("../utils/theme");
|
|
45
|
+
function RestoreConfirmModal(props) {
|
|
46
|
+
const { ensemble, playerCount, conductorName, onConfirm, onCancel, submitting, error } = props;
|
|
47
|
+
const { Box, Text, useInput } = (0, ink_context_1.useInk)();
|
|
48
|
+
useInput((0, react_1.useCallback)((input, key) => {
|
|
49
|
+
if (submitting)
|
|
50
|
+
return;
|
|
51
|
+
if (key.escape) {
|
|
52
|
+
onCancel();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const ch = input.toLowerCase();
|
|
56
|
+
if (ch === 'y') {
|
|
57
|
+
onConfirm();
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (ch === 'n' || key.return) {
|
|
61
|
+
onCancel();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
}, [submitting, onCancel, onConfirm]));
|
|
65
|
+
const conductorLabel = conductorName ?? 'conductor';
|
|
66
|
+
return react_1.default.createElement(Box, { flexDirection: 'column' }, react_1.default.createElement(Text, { bold: true, color: theme_1.THEME.accent }, ' Restore offline ensemble'), react_1.default.createElement(Box, { marginTop: 1, flexDirection: 'column' }, react_1.default.createElement(Text, { color: theme_1.THEME.text }, ` Ensemble: ${ensemble}`), react_1.default.createElement(Text, { color: theme_1.THEME.text }, ` Offline players: ${playerCount}${playerCount === 0 ? ' (conductor only)' : ''}`), react_1.default.createElement(Text, { color: theme_1.THEME.text }, ` Conductor: ${conductorLabel}`)), error
|
|
67
|
+
? react_1.default.createElement(Text, { color: theme_1.THEME.error }, ` \u2717 ${error}`)
|
|
68
|
+
: null, submitting
|
|
69
|
+
? react_1.default.createElement(Box, { marginTop: 1 }, react_1.default.createElement(Text, { color: theme_1.THEME.warning }, `\u2026 Restoring "${ensemble}" on this host\u2026`))
|
|
70
|
+
: react_1.default.createElement(Box, { marginTop: 1 }, react_1.default.createElement(Text, { bold: true }, ' Restore to this computer? '), react_1.default.createElement(Text, { color: theme_1.THEME.dim }, '[y/N] (Esc to cancel)')));
|
|
71
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ScheduleOverlay — dismissible overlay showing active schedules.
|
|
3
|
+
*
|
|
4
|
+
* Performance: Single <Text> root with nested virtual-text children.
|
|
5
|
+
* Zero Yoga <Box> nodes.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { ScheduleEntry } from '../../types';
|
|
9
|
+
export interface ScheduleOverlayProps {
|
|
10
|
+
schedules: ScheduleEntry[];
|
|
11
|
+
ensemble: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function ScheduleOverlay({ schedules, ensemble }: ScheduleOverlayProps): React.CElement<{}, React.Component<{}, any, any>>;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ScheduleOverlay = ScheduleOverlay;
|
|
7
|
+
/**
|
|
8
|
+
* ScheduleOverlay — dismissible overlay showing active schedules.
|
|
9
|
+
*
|
|
10
|
+
* Performance: Single <Text> root with nested virtual-text children.
|
|
11
|
+
* Zero Yoga <Box> nodes.
|
|
12
|
+
*/
|
|
13
|
+
const react_1 = __importDefault(require("react"));
|
|
14
|
+
const ink_context_1 = require("../ink-context");
|
|
15
|
+
const theme_1 = require("../utils/theme");
|
|
16
|
+
function formatTime(ts) {
|
|
17
|
+
try {
|
|
18
|
+
const d = new Date(ts);
|
|
19
|
+
return `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}`;
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return '??:??';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function formatDateTime(ts) {
|
|
26
|
+
try {
|
|
27
|
+
const d = new Date(ts);
|
|
28
|
+
const month = String(d.getMonth() + 1).padStart(2, '0');
|
|
29
|
+
const day = String(d.getDate()).padStart(2, '0');
|
|
30
|
+
return `${month}-${day} ${formatTime(ts)}`;
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return '??';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function formatInterval(ms) {
|
|
37
|
+
if (ms < 60000)
|
|
38
|
+
return `${Math.round(ms / 1000)}s`;
|
|
39
|
+
if (ms < 3600000)
|
|
40
|
+
return `${Math.round(ms / 60000)}m`;
|
|
41
|
+
return `${(ms / 3600000).toFixed(1)}h`;
|
|
42
|
+
}
|
|
43
|
+
const typeIcons = {
|
|
44
|
+
once: '\u23F1', // stopwatch
|
|
45
|
+
interval: '\u21BB', // clockwise arrows
|
|
46
|
+
cron: '\u23F0', // alarm clock
|
|
47
|
+
};
|
|
48
|
+
const typeLabels = {
|
|
49
|
+
once: 'one-shot',
|
|
50
|
+
interval: 'recurring',
|
|
51
|
+
cron: 'cron',
|
|
52
|
+
};
|
|
53
|
+
function ScheduleOverlay({ schedules, ensemble }) {
|
|
54
|
+
const { Text } = (0, ink_context_1.useInk)();
|
|
55
|
+
const children = [];
|
|
56
|
+
children.push(react_1.default.createElement(Text, { key: 'h', bold: true, color: theme_1.THEME.accent }, ` Schedules \u00B7 ${ensemble}`));
|
|
57
|
+
if (schedules.length === 0) {
|
|
58
|
+
children.push('\n\n');
|
|
59
|
+
children.push(react_1.default.createElement(Text, { key: 'empty', color: theme_1.THEME.dim }, ' No active schedules.'));
|
|
60
|
+
children.push('\n\n');
|
|
61
|
+
children.push(react_1.default.createElement(Text, { key: 'hint1', color: theme_1.THEME.dim }, ' Use /schedule create to set one up.'));
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
children.push(react_1.default.createElement(Text, { key: 'count', color: theme_1.THEME.dim }, ` (${schedules.length})`));
|
|
65
|
+
for (let i = 0; i < schedules.length; i++) {
|
|
66
|
+
const s = schedules[i];
|
|
67
|
+
const icon = typeIcons[s.type] || '\u21BB';
|
|
68
|
+
const label = typeLabels[s.type] || s.type;
|
|
69
|
+
children.push('\n\n');
|
|
70
|
+
// Name + type
|
|
71
|
+
children.push(react_1.default.createElement(react_1.default.Fragment, { key: `s-${i}` }, react_1.default.createElement(Text, { color: theme_1.THEME.text }, ` ${icon} `), react_1.default.createElement(Text, { bold: true, color: theme_1.THEME.text }, s.name), react_1.default.createElement(Text, { color: theme_1.THEME.dim }, ` [${label}]`)));
|
|
72
|
+
// Target
|
|
73
|
+
children.push('\n');
|
|
74
|
+
children.push(react_1.default.createElement(Text, { key: `st-${i}`, color: theme_1.THEME.dim }, ` \u2192 ${s.target}`));
|
|
75
|
+
// Message content
|
|
76
|
+
const msgPreview = s.message.length > 80 ? s.message.slice(0, 77) + '\u2026' : s.message;
|
|
77
|
+
children.push('\n');
|
|
78
|
+
children.push(react_1.default.createElement(Text, { key: `sm-${i}`, color: theme_1.THEME.dim }, ' Message: '));
|
|
79
|
+
children.push(react_1.default.createElement(Text, { key: `smv-${i}`, color: theme_1.THEME.textMuted || theme_1.THEME.dim }, `"${msgPreview}"`));
|
|
80
|
+
// Timing details
|
|
81
|
+
const timingParts = [];
|
|
82
|
+
if (s.type === 'interval' && s.interval) {
|
|
83
|
+
timingParts.push(`every ${formatInterval(s.interval)}`);
|
|
84
|
+
}
|
|
85
|
+
if (s.cronExpression) {
|
|
86
|
+
timingParts.push(`cron: ${s.cronExpression}`);
|
|
87
|
+
if (s.timezone)
|
|
88
|
+
timingParts.push(`tz: ${s.timezone}`);
|
|
89
|
+
}
|
|
90
|
+
if (s.nextFireAt) {
|
|
91
|
+
timingParts.push(`next: ${formatDateTime(s.nextFireAt)}`);
|
|
92
|
+
}
|
|
93
|
+
if (s.firedCount > 0) {
|
|
94
|
+
timingParts.push(`fired ${s.firedCount}x`);
|
|
95
|
+
}
|
|
96
|
+
if (s.remainingCount !== undefined) {
|
|
97
|
+
timingParts.push(`${s.remainingCount} remaining`);
|
|
98
|
+
}
|
|
99
|
+
if (s.until) {
|
|
100
|
+
timingParts.push(`until ${formatDateTime(s.until)}`);
|
|
101
|
+
}
|
|
102
|
+
if (timingParts.length > 0) {
|
|
103
|
+
children.push('\n');
|
|
104
|
+
children.push(react_1.default.createElement(Text, { key: `sd-${i}`, color: theme_1.THEME.dim }, ` ${timingParts.join(' \u00B7 ')}`));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
children.push('\n\n');
|
|
109
|
+
children.push(react_1.default.createElement(Text, { key: 'hint', color: theme_1.THEME.dim }, ' /schedule create \u2014 new \u00B7 /schedule delete <name> \u2014 remove'));
|
|
110
|
+
children.push('\n');
|
|
111
|
+
children.push(react_1.default.createElement(Text, { key: 'hint2', color: theme_1.THEME.dim }, ' Esc to dismiss'));
|
|
112
|
+
return react_1.default.createElement(Text, null, ...children);
|
|
113
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ScheduleWizard — step-by-step wizard for creating a scheduled message.
|
|
3
|
+
* Steps: target → message → schedule type → timing → timezone (cron only) → confirm.
|
|
4
|
+
* Escape cancels. Backspace on empty input goes back a step.
|
|
5
|
+
*
|
|
6
|
+
* Minimal-Box pattern: single <Text> root for all static content (0 Yoga nodes).
|
|
7
|
+
* Uses manual key handling — no TextInput component, so zero Box elements needed.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import type { ScheduleWizardState, ScheduleAnswers } from '../store';
|
|
11
|
+
export interface ScheduleWizardProps {
|
|
12
|
+
state: ScheduleWizardState;
|
|
13
|
+
onAnswer: (answer: Partial<ScheduleAnswers>) => void;
|
|
14
|
+
onBack: () => void;
|
|
15
|
+
onConfirm: () => void;
|
|
16
|
+
onCancel: () => void;
|
|
17
|
+
onDone: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function ScheduleWizard({ state, onAnswer, onBack, onConfirm, onCancel, onDone }: ScheduleWizardProps): React.CElement<{}, React.Component<{}, any, any>>;
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ScheduleWizard = ScheduleWizard;
|
|
37
|
+
/**
|
|
38
|
+
* ScheduleWizard — step-by-step wizard for creating a scheduled message.
|
|
39
|
+
* Steps: target → message → schedule type → timing → timezone (cron only) → confirm.
|
|
40
|
+
* Escape cancels. Backspace on empty input goes back a step.
|
|
41
|
+
*
|
|
42
|
+
* Minimal-Box pattern: single <Text> root for all static content (0 Yoga nodes).
|
|
43
|
+
* Uses manual key handling — no TextInput component, so zero Box elements needed.
|
|
44
|
+
*/
|
|
45
|
+
const react_1 = __importStar(require("react"));
|
|
46
|
+
const ink_context_1 = require("../ink-context");
|
|
47
|
+
const theme_1 = require("../utils/theme");
|
|
48
|
+
const STEP_LABELS = {
|
|
49
|
+
target: 'Target player',
|
|
50
|
+
message: 'Message to deliver',
|
|
51
|
+
schedType: 'Schedule type',
|
|
52
|
+
timing: 'Timing',
|
|
53
|
+
timezone: 'Timezone (for cron)',
|
|
54
|
+
confirm: 'Confirm',
|
|
55
|
+
done: 'Done',
|
|
56
|
+
};
|
|
57
|
+
const SCHED_TYPE_OPTIONS = [
|
|
58
|
+
{ value: 'delay', label: 'One-shot delay', hint: 'e.g., 5m, 1h, 30s' },
|
|
59
|
+
{ value: 'at', label: 'Fixed time', hint: 'e.g., 2026-04-07T09:00:00' },
|
|
60
|
+
{ value: 'every', label: 'Recurring interval', hint: 'e.g., 30m, 1h, 6h' },
|
|
61
|
+
{ value: 'cron', label: 'Cron expression', hint: 'e.g., 0 9 * * * (daily 9am)' },
|
|
62
|
+
];
|
|
63
|
+
const TIMING_HINTS = {
|
|
64
|
+
delay: 'Enter delay duration (e.g., 5m, 1h, 30s):',
|
|
65
|
+
at: 'Enter ISO datetime (e.g., 2026-04-07T09:00:00):',
|
|
66
|
+
every: 'Enter interval (e.g., 30m, 1h, 6h):',
|
|
67
|
+
cron: 'Enter cron expression (e.g., 0 9 * * *):',
|
|
68
|
+
};
|
|
69
|
+
function ScheduleWizard({ state, onAnswer, onBack, onConfirm, onCancel, onDone }) {
|
|
70
|
+
const { Text, useInput } = (0, ink_context_1.useInk)();
|
|
71
|
+
const [inputValue, setInputValue] = (0, react_1.useState)('');
|
|
72
|
+
const [showRequired, setShowRequired] = (0, react_1.useState)(false);
|
|
73
|
+
const [typeIndex, setTypeIndex] = (0, react_1.useState)(SCHED_TYPE_OPTIONS.findIndex(o => o.value === state.answers.schedType));
|
|
74
|
+
useInput((0, react_1.useCallback)((input, key) => {
|
|
75
|
+
if (key.escape) {
|
|
76
|
+
onCancel();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
// Done step
|
|
80
|
+
if (state.step === 'done') {
|
|
81
|
+
if (key.return)
|
|
82
|
+
onDone();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
// Backspace on empty input → go back
|
|
86
|
+
if ((key.backspace || key.delete) && state.step !== 'target' && !inputValue) {
|
|
87
|
+
onBack();
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
// Schedule type selection step
|
|
91
|
+
if (state.step === 'schedType') {
|
|
92
|
+
if (key.upArrow) {
|
|
93
|
+
setTypeIndex(i => Math.max(0, i - 1));
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (key.downArrow) {
|
|
97
|
+
setTypeIndex(i => Math.min(SCHED_TYPE_OPTIONS.length - 1, i + 1));
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (key.return) {
|
|
101
|
+
const selected = SCHED_TYPE_OPTIONS[typeIndex];
|
|
102
|
+
const name = `${state.answers.target}-${selected.value}-${Date.now().toString(36)}`;
|
|
103
|
+
onAnswer({ schedType: selected.value, name });
|
|
104
|
+
setInputValue('');
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
// Confirm step
|
|
110
|
+
if (state.step === 'confirm') {
|
|
111
|
+
if (key.return) {
|
|
112
|
+
onConfirm();
|
|
113
|
+
}
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
// Empty enter — show validation hint
|
|
117
|
+
if (key.return && !inputValue.trim() && ['target', 'message', 'timing', 'timezone'].includes(state.step)) {
|
|
118
|
+
setShowRequired(true);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
// Text input steps
|
|
122
|
+
if (key.return && inputValue.trim()) {
|
|
123
|
+
const val = inputValue.trim();
|
|
124
|
+
switch (state.step) {
|
|
125
|
+
case 'target':
|
|
126
|
+
onAnswer({ target: val });
|
|
127
|
+
break;
|
|
128
|
+
case 'message':
|
|
129
|
+
onAnswer({ message: val });
|
|
130
|
+
break;
|
|
131
|
+
case 'timing':
|
|
132
|
+
onAnswer({ timing: val });
|
|
133
|
+
break;
|
|
134
|
+
case 'timezone':
|
|
135
|
+
onAnswer({ timezone: val });
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
setInputValue('');
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
// Backspace
|
|
142
|
+
if (key.backspace || key.delete) {
|
|
143
|
+
if (inputValue.length > 0)
|
|
144
|
+
setInputValue(v => v.slice(0, -1));
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
// Regular character
|
|
148
|
+
if (input && !key.ctrl && !key.meta && !key.tab) {
|
|
149
|
+
setInputValue(v => v + input);
|
|
150
|
+
if (showRequired)
|
|
151
|
+
setShowRequired(false);
|
|
152
|
+
}
|
|
153
|
+
}, [state.step, inputValue, typeIndex, onAnswer, onBack, onConfirm, onCancel, onDone, state.answers.target]));
|
|
154
|
+
// ── Progress indicator ──
|
|
155
|
+
const steps = ['target', 'message', 'schedType', 'timing', 'confirm'];
|
|
156
|
+
const currentStepIdx = steps.indexOf(state.step === 'timezone' ? 'timing' : state.step === 'done' ? 'confirm' : state.step);
|
|
157
|
+
const progressDots = steps.map((_, i) => i <= currentStepIdx ? '\u25CF' : '\u25CB').join(' ');
|
|
158
|
+
// ── Build content ──
|
|
159
|
+
const children = [];
|
|
160
|
+
// Header
|
|
161
|
+
children.push(react_1.default.createElement(react_1.default.Fragment, { key: 'hdr' }, react_1.default.createElement(Text, { bold: true, color: theme_1.THEME.accent }, ' Create Schedule'), react_1.default.createElement(Text, { color: theme_1.THEME.dim }, ` ${progressDots}`)));
|
|
162
|
+
// Completed answers as breadcrumbs
|
|
163
|
+
const completedSteps = [];
|
|
164
|
+
if (state.answers.target && state.step !== 'target') {
|
|
165
|
+
completedSteps.push(['Target', state.answers.target]);
|
|
166
|
+
}
|
|
167
|
+
if (state.answers.message && state.step !== 'message' && state.step !== 'target') {
|
|
168
|
+
const msg = state.answers.message.length > 40 ? state.answers.message.slice(0, 37) + '...' : state.answers.message;
|
|
169
|
+
completedSteps.push(['Message', msg]);
|
|
170
|
+
}
|
|
171
|
+
if (state.answers.schedType && ['timing', 'timezone', 'confirm', 'done'].includes(state.step)) {
|
|
172
|
+
completedSteps.push(['Type', state.answers.schedType]);
|
|
173
|
+
}
|
|
174
|
+
if (state.answers.timing && ['timezone', 'confirm', 'done'].includes(state.step)) {
|
|
175
|
+
completedSteps.push(['Timing', state.answers.timing]);
|
|
176
|
+
}
|
|
177
|
+
for (const [label, value] of completedSteps) {
|
|
178
|
+
children.push('\n');
|
|
179
|
+
children.push(react_1.default.createElement(Text, { key: `bc-${label}`, color: theme_1.THEME.dim }, ` \u2713 ${label}: ${value}`));
|
|
180
|
+
}
|
|
181
|
+
// Current step content
|
|
182
|
+
if (state.step === 'schedType') {
|
|
183
|
+
children.push('\n\n');
|
|
184
|
+
children.push(react_1.default.createElement(Text, { key: 'prompt', color: theme_1.THEME.text }, ` ${STEP_LABELS[state.step]}:`));
|
|
185
|
+
for (let i = 0; i < SCHED_TYPE_OPTIONS.length; i++) {
|
|
186
|
+
const opt = SCHED_TYPE_OPTIONS[i];
|
|
187
|
+
const selected = i === typeIndex;
|
|
188
|
+
children.push('\n');
|
|
189
|
+
children.push(react_1.default.createElement(Text, {
|
|
190
|
+
key: `opt-${i}`,
|
|
191
|
+
color: selected ? theme_1.THEME.accent : theme_1.THEME.textMuted,
|
|
192
|
+
bold: selected,
|
|
193
|
+
}, ` ${selected ? '\u25B6' : ' '} ${opt.label} ${selected ? `(${opt.hint})` : ''}`));
|
|
194
|
+
}
|
|
195
|
+
children.push('\n\n');
|
|
196
|
+
children.push(react_1.default.createElement(Text, { key: 'nav', color: theme_1.THEME.dim }, ' \u2191\u2193 select, Enter to confirm'));
|
|
197
|
+
}
|
|
198
|
+
else if (state.step === 'confirm') {
|
|
199
|
+
// Summary with text-based border
|
|
200
|
+
const boxWidth = 50;
|
|
201
|
+
const hLine = '\u2500'.repeat(boxWidth);
|
|
202
|
+
children.push('\n\n');
|
|
203
|
+
children.push(react_1.default.createElement(Text, { key: 'bt', color: theme_1.THEME.dim }, ` \u250C${hLine}\u2510`));
|
|
204
|
+
children.push('\n');
|
|
205
|
+
children.push(react_1.default.createElement(Text, { key: 'bh', bold: true, color: theme_1.THEME.text }, ' \u2502 Schedule Summary'));
|
|
206
|
+
children.push(react_1.default.createElement(Text, { key: 'bh2', color: theme_1.THEME.dim }, ' '.repeat(boxWidth - 17) + '\u2502'));
|
|
207
|
+
const summaryLines = [
|
|
208
|
+
`Name: ${state.answers.name}`,
|
|
209
|
+
`Target: ${state.answers.target}`,
|
|
210
|
+
`Message: ${state.answers.message}`,
|
|
211
|
+
`Type: ${state.answers.schedType}`,
|
|
212
|
+
`Timing: ${state.answers.timing}`,
|
|
213
|
+
];
|
|
214
|
+
if (state.answers.timezone) {
|
|
215
|
+
summaryLines.push(`Timezone: ${state.answers.timezone}`);
|
|
216
|
+
}
|
|
217
|
+
for (let i = 0; i < summaryLines.length; i++) {
|
|
218
|
+
const line = summaryLines[i];
|
|
219
|
+
const pad = ' '.repeat(Math.max(0, boxWidth - line.length - 2));
|
|
220
|
+
children.push('\n');
|
|
221
|
+
children.push(react_1.default.createElement(Text, { key: `sl-${i}`, color: theme_1.THEME.textMuted }, ` \u2502 ${line}`));
|
|
222
|
+
children.push(react_1.default.createElement(Text, { key: `sp-${i}`, color: theme_1.THEME.dim }, `${pad}\u2502`));
|
|
223
|
+
}
|
|
224
|
+
children.push('\n');
|
|
225
|
+
children.push(react_1.default.createElement(Text, { key: 'bb', color: theme_1.THEME.dim }, ` \u2514${hLine}\u2518`));
|
|
226
|
+
children.push('\n\n');
|
|
227
|
+
children.push(react_1.default.createElement(Text, { key: 'confirm-hint', color: theme_1.THEME.dim }, ' Enter to create, Esc to cancel, Backspace to go back'));
|
|
228
|
+
if (state.submitting) {
|
|
229
|
+
children.push('\n');
|
|
230
|
+
children.push(react_1.default.createElement(Text, { key: 'submitting', color: theme_1.THEME.warning }, ' Creating schedule...'));
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
else if (state.step === 'done') {
|
|
234
|
+
children.push('\n');
|
|
235
|
+
if (state.error) {
|
|
236
|
+
children.push(react_1.default.createElement(Text, { key: 'err', color: theme_1.THEME.error }, `\n \u2717 ${state.error}`));
|
|
237
|
+
children.push('\n');
|
|
238
|
+
children.push(react_1.default.createElement(Text, { key: 'err-hint', color: theme_1.THEME.dim }, ' Press Enter to dismiss.'));
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
children.push(react_1.default.createElement(Text, { key: 'ok', color: theme_1.THEME.success }, `\n \u2713 Schedule "${state.answers.name}" created!`));
|
|
242
|
+
children.push('\n');
|
|
243
|
+
children.push(react_1.default.createElement(Text, { key: 'ok-hint', color: theme_1.THEME.dim }, ' Press Enter to return.'));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
// Text input steps
|
|
248
|
+
const hint = state.step === 'timing' ? TIMING_HINTS[state.answers.schedType] : `${STEP_LABELS[state.step]}:`;
|
|
249
|
+
children.push('\n\n');
|
|
250
|
+
children.push(react_1.default.createElement(Text, { key: 'prompt', color: theme_1.THEME.text }, ` ${hint}`));
|
|
251
|
+
children.push('\n');
|
|
252
|
+
children.push(react_1.default.createElement(react_1.default.Fragment, { key: 'input' }, react_1.default.createElement(Text, { color: theme_1.THEME.accent }, ' > '), react_1.default.createElement(Text, { color: theme_1.THEME.text }, inputValue), react_1.default.createElement(Text, { color: theme_1.THEME.accent }, '\u2588'), showRequired ? react_1.default.createElement(Text, { color: 'red' }, ' (required)') : null));
|
|
253
|
+
if (state.step !== 'target') {
|
|
254
|
+
children.push('\n');
|
|
255
|
+
children.push(react_1.default.createElement(Text, { key: 'back-hint', color: theme_1.THEME.dim }, ' Backspace on empty to go back, Esc to cancel'));
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return react_1.default.createElement(Text, null, ...children);
|
|
259
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Splash screen — landing/home screen with animated metronome, connection
|
|
3
|
+
* status, and ensemble picker.
|
|
4
|
+
*
|
|
5
|
+
* Uses a single Text element with nested virtual-text nodes to minimize
|
|
6
|
+
* Yoga layout nodes (target: <10 total).
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
export interface EnsembleInfo {
|
|
10
|
+
name: string;
|
|
11
|
+
playerCount: number;
|
|
12
|
+
hasConductor: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface SplashProps {
|
|
15
|
+
status: string;
|
|
16
|
+
ensemble?: string;
|
|
17
|
+
version: string;
|
|
18
|
+
connected?: boolean;
|
|
19
|
+
ensembles?: EnsembleInfo[];
|
|
20
|
+
onContinue?: (selectedEnsemble?: string) => void;
|
|
21
|
+
onCreateEnsemble?: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function Splash({ status, version, connected, ensembles, onContinue, onCreateEnsemble }: SplashProps): React.CElement<{}, React.Component<{}, any, any>>;
|