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,335 @@
|
|
|
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.MIGRATION_MARKER_FILENAME = void 0;
|
|
37
|
+
exports.migrateLegacyHome = migrateLegacyHome;
|
|
38
|
+
exports.formatMigrationResult = formatMigrationResult;
|
|
39
|
+
/**
|
|
40
|
+
* Legacy home migration — `~/.claude-tempo/` → `~/.agent-tempo/`.
|
|
41
|
+
*
|
|
42
|
+
* PR-2 of the v1.0 rebrand renames the on-disk profile directory. This
|
|
43
|
+
* helper performs a one-shot copy on first boot of the new binary so
|
|
44
|
+
* users don't lose their saved config / lineups / state.
|
|
45
|
+
*
|
|
46
|
+
* Contract (see brief):
|
|
47
|
+
* 1. **Idempotent.** Re-running on a migrated home is `'already-migrated'`.
|
|
48
|
+
* 2. **Copy, not move.** Legacy `~/.claude-tempo/` stays untouched as a
|
|
49
|
+
* safety net for one release.
|
|
50
|
+
* 3. **Marker file.** Writes `~/.agent-tempo/.migrated-from-claude-tempo`
|
|
51
|
+
* with `{ migratedAt, copiedFromHash, files }`.
|
|
52
|
+
* 4. **Conflict policy.** If `~/.agent-tempo/` exists AND has no marker,
|
|
53
|
+
* refuse with `'skipped'`; user must pass `force: true` or delete.
|
|
54
|
+
* Don't clobber a user-initiated new home.
|
|
55
|
+
* 5. **Partial-copy resume.** Per-file SHA-256 in the marker — re-running
|
|
56
|
+
* a partially-completed run finishes only the missing/changed files.
|
|
57
|
+
* 6. **Files copied.** Allowlist — `config.json`, `.bootstrap-cache.json`,
|
|
58
|
+
* any `*.yaml` user-stashed lineup files, plus subdirs `lineups/`,
|
|
59
|
+
* `state/`, `coat-check/` (forward-compat — fine if absent). The
|
|
60
|
+
* volatile runtime trio (`daemon.pid`, `daemon.port`, `daemon.log`)
|
|
61
|
+
* is intentionally skipped — let the daemon recreate them.
|
|
62
|
+
* 7. **Volatile-state guard.** If `daemon.pid` is present in the legacy
|
|
63
|
+
* home (likely-running daemon), refuses unless `force: true`.
|
|
64
|
+
*
|
|
65
|
+
* Single owner file — narrow blast radius. The CLI verb in `src/cli.ts`
|
|
66
|
+
* and the bootstrap step in `src/cli/startup.ts` are the only callers.
|
|
67
|
+
*/
|
|
68
|
+
const fs = __importStar(require("fs"));
|
|
69
|
+
const path = __importStar(require("path"));
|
|
70
|
+
const crypto = __importStar(require("crypto"));
|
|
71
|
+
const os_1 = require("os");
|
|
72
|
+
const config_1 = require("../config");
|
|
73
|
+
/** Legacy POSIX/macOS/Windows home dir name (pre-v1.0 rebrand). */
|
|
74
|
+
const LEGACY_PROD_HOME_DIR_NAME = '.claude-tempo';
|
|
75
|
+
const LEGACY_DEV_HOME_DIR_NAME = '.claude-tempo-dev';
|
|
76
|
+
/** Marker file name dropped in the new home post-migration. */
|
|
77
|
+
exports.MIGRATION_MARKER_FILENAME = '.migrated-from-claude-tempo';
|
|
78
|
+
/** Volatile runtime state — never copied (daemon recreates on boot). */
|
|
79
|
+
const VOLATILE_FILES = new Set(['daemon.pid', 'daemon.port', 'daemon.log']);
|
|
80
|
+
/** Allowlisted top-level files. `*.yaml` is matched as a glob. */
|
|
81
|
+
const ALLOWLIST_FILES = new Set(['config.json', '.bootstrap-cache.json']);
|
|
82
|
+
/** Allowlisted top-level subdirs (recursive copy). Forward-compat — fine if absent. */
|
|
83
|
+
const ALLOWLIST_SUBDIRS = ['lineups', 'state', 'coat-check'];
|
|
84
|
+
function legacyHomeFor(profile, home) {
|
|
85
|
+
return path.join(home, profile === 'dev' ? LEGACY_DEV_HOME_DIR_NAME : LEGACY_PROD_HOME_DIR_NAME);
|
|
86
|
+
}
|
|
87
|
+
function newHomeFor(profile, home) {
|
|
88
|
+
return path.join(home, profile === 'dev' ? config_1.DEV_HOME_DIR_NAME : config_1.PROD_HOME_DIR_NAME);
|
|
89
|
+
}
|
|
90
|
+
/** SHA-256 hex digest of a file's contents. */
|
|
91
|
+
function hashFile(absPath) {
|
|
92
|
+
const hash = crypto.createHash('sha256');
|
|
93
|
+
hash.update(fs.readFileSync(absPath));
|
|
94
|
+
return hash.digest('hex');
|
|
95
|
+
}
|
|
96
|
+
/** Aggregate hash of a whole tree — order-stable by sorting relative paths. */
|
|
97
|
+
function hashTree(root, files) {
|
|
98
|
+
const hash = crypto.createHash('sha256');
|
|
99
|
+
for (const f of files.slice().sort((a, b) => a.rel.localeCompare(b.rel))) {
|
|
100
|
+
hash.update(f.rel + ':' + hashFile(f.abs) + '\n');
|
|
101
|
+
}
|
|
102
|
+
return hash.digest('hex');
|
|
103
|
+
}
|
|
104
|
+
/** Read the migration marker, returning `null` if absent / malformed. */
|
|
105
|
+
function readMarker(newHome) {
|
|
106
|
+
const markerPath = path.join(newHome, exports.MIGRATION_MARKER_FILENAME);
|
|
107
|
+
if (!fs.existsSync(markerPath))
|
|
108
|
+
return null;
|
|
109
|
+
try {
|
|
110
|
+
const parsed = JSON.parse(fs.readFileSync(markerPath, 'utf8'));
|
|
111
|
+
if (typeof parsed.copiedFromHash !== 'string' || !Array.isArray(parsed.files))
|
|
112
|
+
return null;
|
|
113
|
+
return {
|
|
114
|
+
migratedAt: parsed.migratedAt ?? '',
|
|
115
|
+
copiedFromHash: parsed.copiedFromHash,
|
|
116
|
+
files: parsed.files,
|
|
117
|
+
fileHashes: parsed.fileHashes ?? {},
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Walk a directory tree, yielding `{ rel, abs }` entries for files matching
|
|
126
|
+
* the allowlist. Returns `[]` if `legacyHome` doesn't exist.
|
|
127
|
+
*
|
|
128
|
+
* Allowlist:
|
|
129
|
+
* - top-level files in {@link ALLOWLIST_FILES}
|
|
130
|
+
* - top-level `*.yaml` / `*.yml` files
|
|
131
|
+
* - everything (recursively) under top-level subdirs in {@link ALLOWLIST_SUBDIRS}
|
|
132
|
+
*
|
|
133
|
+
* The volatile trio (`daemon.pid`/`.port`/`.log`) is excluded everywhere.
|
|
134
|
+
*/
|
|
135
|
+
function walkLegacyTree(legacyHome) {
|
|
136
|
+
if (!fs.existsSync(legacyHome))
|
|
137
|
+
return [];
|
|
138
|
+
const out = [];
|
|
139
|
+
// Top-level entries
|
|
140
|
+
let entries;
|
|
141
|
+
try {
|
|
142
|
+
entries = fs.readdirSync(legacyHome, { withFileTypes: true });
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
return [];
|
|
146
|
+
}
|
|
147
|
+
for (const entry of entries) {
|
|
148
|
+
if (VOLATILE_FILES.has(entry.name))
|
|
149
|
+
continue;
|
|
150
|
+
if (entry.name === exports.MIGRATION_MARKER_FILENAME)
|
|
151
|
+
continue;
|
|
152
|
+
const abs = path.join(legacyHome, entry.name);
|
|
153
|
+
if (entry.isFile()) {
|
|
154
|
+
if (ALLOWLIST_FILES.has(entry.name) || /\.ya?ml$/i.test(entry.name)) {
|
|
155
|
+
out.push({ rel: entry.name, abs });
|
|
156
|
+
}
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
if (entry.isDirectory() && ALLOWLIST_SUBDIRS.includes(entry.name)) {
|
|
160
|
+
walkSubtree(abs, entry.name, out);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return out;
|
|
164
|
+
}
|
|
165
|
+
function walkSubtree(absRoot, relRoot, out) {
|
|
166
|
+
let entries;
|
|
167
|
+
try {
|
|
168
|
+
entries = fs.readdirSync(absRoot, { withFileTypes: true });
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
for (const entry of entries) {
|
|
174
|
+
const abs = path.join(absRoot, entry.name);
|
|
175
|
+
const rel = path.posix.join(relRoot, entry.name);
|
|
176
|
+
if (entry.isFile()) {
|
|
177
|
+
out.push({ rel, abs });
|
|
178
|
+
}
|
|
179
|
+
else if (entry.isDirectory()) {
|
|
180
|
+
walkSubtree(abs, rel, out);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* One-shot legacy home migration. See module doc-comment for the full
|
|
186
|
+
* contract. Never throws — all error paths return a structured
|
|
187
|
+
* {@link LegacyMigrationResult}.
|
|
188
|
+
*/
|
|
189
|
+
async function migrateLegacyHome(opts = {}) {
|
|
190
|
+
const profile = opts.profile ?? 'prod';
|
|
191
|
+
const home = opts.homeDir ?? (0, os_1.homedir)();
|
|
192
|
+
const legacyHome = legacyHomeFor(profile, home);
|
|
193
|
+
const newHome = newHomeFor(profile, home);
|
|
194
|
+
// 1. No legacy → nothing to do.
|
|
195
|
+
if (!fs.existsSync(legacyHome)) {
|
|
196
|
+
return { status: 'no-legacy', legacyHome, newHome };
|
|
197
|
+
}
|
|
198
|
+
// 2. Volatile state guard — daemon.pid likely means a running daemon.
|
|
199
|
+
const pidPath = path.join(legacyHome, 'daemon.pid');
|
|
200
|
+
if (!opts.force && fs.existsSync(pidPath)) {
|
|
201
|
+
return {
|
|
202
|
+
status: 'skipped',
|
|
203
|
+
legacyHome,
|
|
204
|
+
newHome,
|
|
205
|
+
reason: `Legacy daemon.pid present at ${pidPath}. The daemon may still be running — ` +
|
|
206
|
+
`stop it first (\`agent-tempo daemon stop\` or \`claude-tempo daemon stop\`) ` +
|
|
207
|
+
`and re-run, or pass \`--force\` to migrate anyway.`,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
// 3. Conflict policy — new home exists without our marker = user-initiated, refuse.
|
|
211
|
+
const newHomeExists = fs.existsSync(newHome);
|
|
212
|
+
const existingMarker = newHomeExists ? readMarker(newHome) : null;
|
|
213
|
+
if (newHomeExists && !existingMarker && !opts.force) {
|
|
214
|
+
return {
|
|
215
|
+
status: 'skipped',
|
|
216
|
+
legacyHome,
|
|
217
|
+
newHome,
|
|
218
|
+
reason: `Refusing to overwrite ${newHome} — directory exists and was not created ` +
|
|
219
|
+
`by a previous migration (no \`${exports.MIGRATION_MARKER_FILENAME}\` marker found). ` +
|
|
220
|
+
`Pass \`--force\` to migrate anyway, or delete the directory first.`,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
// 4. Enumerate legacy files + hash the source tree.
|
|
224
|
+
const legacyFiles = walkLegacyTree(legacyHome);
|
|
225
|
+
if (legacyFiles.length === 0) {
|
|
226
|
+
// Legacy dir exists but holds only volatile state / nothing to migrate.
|
|
227
|
+
return { status: 'no-legacy', legacyHome, newHome };
|
|
228
|
+
}
|
|
229
|
+
const sourceHash = hashTree(legacyHome, legacyFiles);
|
|
230
|
+
// 5. Idempotency — same source content + valid marker = already migrated.
|
|
231
|
+
if (existingMarker && existingMarker.copiedFromHash === sourceHash) {
|
|
232
|
+
return {
|
|
233
|
+
status: 'already-migrated',
|
|
234
|
+
legacyHome,
|
|
235
|
+
newHome,
|
|
236
|
+
copiedFiles: [],
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
// 6. Plan the copy. Partial-copy resume: skip files whose dest already has the right SHA.
|
|
240
|
+
const plan = [];
|
|
241
|
+
const errors = [];
|
|
242
|
+
for (const f of legacyFiles) {
|
|
243
|
+
let srcHash;
|
|
244
|
+
try {
|
|
245
|
+
srcHash = hashFile(f.abs);
|
|
246
|
+
}
|
|
247
|
+
catch (err) {
|
|
248
|
+
errors.push(`hash failed for ${f.rel}: ${err.message}`);
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
const destAbs = path.join(newHome, f.rel);
|
|
252
|
+
if (existingMarker?.fileHashes?.[f.rel] === srcHash && fs.existsSync(destAbs)) {
|
|
253
|
+
try {
|
|
254
|
+
if (hashFile(destAbs) === srcHash)
|
|
255
|
+
continue; // already copied with right content
|
|
256
|
+
}
|
|
257
|
+
catch { /* fall through and re-copy */ }
|
|
258
|
+
}
|
|
259
|
+
plan.push({ rel: f.rel, abs: f.abs, destAbs, sourceHash: srcHash });
|
|
260
|
+
}
|
|
261
|
+
if (opts.dryRun) {
|
|
262
|
+
return {
|
|
263
|
+
status: 'migrated',
|
|
264
|
+
legacyHome,
|
|
265
|
+
newHome,
|
|
266
|
+
copiedFiles: plan.map((p) => p.rel),
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
// 7. Execute the copy.
|
|
270
|
+
const copied = [];
|
|
271
|
+
const fileHashes = { ...(existingMarker?.fileHashes ?? {}) };
|
|
272
|
+
try {
|
|
273
|
+
fs.mkdirSync(newHome, { recursive: true });
|
|
274
|
+
}
|
|
275
|
+
catch (err) {
|
|
276
|
+
errors.push(`mkdir ${newHome}: ${err.message}`);
|
|
277
|
+
return { status: 'failed', legacyHome, newHome, errors };
|
|
278
|
+
}
|
|
279
|
+
for (const p of plan) {
|
|
280
|
+
try {
|
|
281
|
+
fs.mkdirSync(path.dirname(p.destAbs), { recursive: true });
|
|
282
|
+
fs.copyFileSync(p.abs, p.destAbs);
|
|
283
|
+
copied.push(p.rel);
|
|
284
|
+
fileHashes[p.rel] = p.sourceHash;
|
|
285
|
+
}
|
|
286
|
+
catch (err) {
|
|
287
|
+
errors.push(`copy ${p.rel}: ${err.message}`);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
if (errors.length > 0 && copied.length === 0) {
|
|
291
|
+
return { status: 'failed', legacyHome, newHome, errors };
|
|
292
|
+
}
|
|
293
|
+
// 8. Drop the marker — captures final state for idempotency.
|
|
294
|
+
const allFiles = legacyFiles.map((f) => f.rel).sort();
|
|
295
|
+
const marker = {
|
|
296
|
+
migratedAt: new Date().toISOString(),
|
|
297
|
+
copiedFromHash: sourceHash,
|
|
298
|
+
files: allFiles,
|
|
299
|
+
fileHashes,
|
|
300
|
+
};
|
|
301
|
+
try {
|
|
302
|
+
fs.writeFileSync(path.join(newHome, exports.MIGRATION_MARKER_FILENAME), JSON.stringify(marker, null, 2) + '\n');
|
|
303
|
+
}
|
|
304
|
+
catch (err) {
|
|
305
|
+
errors.push(`marker write: ${err.message}`);
|
|
306
|
+
}
|
|
307
|
+
return {
|
|
308
|
+
status: 'migrated',
|
|
309
|
+
legacyHome,
|
|
310
|
+
newHome,
|
|
311
|
+
copiedFiles: copied,
|
|
312
|
+
...(errors.length > 0 ? { errors } : {}),
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Format a {@link LegacyMigrationResult} for human display (CLI verb output
|
|
317
|
+
* + bootstrap step `notes`).
|
|
318
|
+
*/
|
|
319
|
+
function formatMigrationResult(r) {
|
|
320
|
+
switch (r.status) {
|
|
321
|
+
case 'no-legacy':
|
|
322
|
+
return `No legacy home at ${r.legacyHome} — nothing to migrate.`;
|
|
323
|
+
case 'already-migrated':
|
|
324
|
+
return `Already migrated — ${r.newHome} is up-to-date with ${r.legacyHome}.`;
|
|
325
|
+
case 'migrated': {
|
|
326
|
+
const n = r.copiedFiles?.length ?? 0;
|
|
327
|
+
const errSuffix = r.errors?.length ? ` (${r.errors.length} error(s) recorded)` : '';
|
|
328
|
+
return `Migrated ${n} file(s) ${r.legacyHome} → ${r.newHome}${errSuffix}.`;
|
|
329
|
+
}
|
|
330
|
+
case 'skipped':
|
|
331
|
+
return r.reason ?? 'Migration skipped.';
|
|
332
|
+
case 'failed':
|
|
333
|
+
return `Migration failed: ${(r.errors ?? []).join('; ')}`;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Check if agent-tempo is registered in `claude mcp list` (global user scope). */
|
|
2
|
+
export declare function isGlobalMcpRegistered(): boolean;
|
|
3
|
+
/** Register agent-tempo globally via `claude mcp add`. */
|
|
4
|
+
export declare function addGlobalMcp(): boolean;
|
|
5
|
+
/** Remove agent-tempo from global MCP config via `claude mcp remove`. */
|
|
6
|
+
export declare function removeGlobalMcp(): boolean;
|
|
7
|
+
/** Check if agent-tempo MCP is configured (global or project-level). */
|
|
8
|
+
export declare function isMcpConfigured(projectDir: string): boolean;
|
package/dist/cli/mcp.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isGlobalMcpRegistered = isGlobalMcpRegistered;
|
|
4
|
+
exports.addGlobalMcp = addGlobalMcp;
|
|
5
|
+
exports.removeGlobalMcp = removeGlobalMcp;
|
|
6
|
+
exports.isMcpConfigured = isMcpConfigured;
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const child_process_1 = require("child_process");
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
/** Check if agent-tempo is registered in `claude mcp list` (global user scope). */
|
|
11
|
+
function isGlobalMcpRegistered() {
|
|
12
|
+
try {
|
|
13
|
+
const output = (0, child_process_1.execFileSync)('claude', ['mcp', 'list', '-s', 'user'], {
|
|
14
|
+
encoding: 'utf8',
|
|
15
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
16
|
+
});
|
|
17
|
+
// Match either the new (`agent-tempo`) or legacy (`agent-tempo`) registration —
|
|
18
|
+
// dual-bin in `package.json` keeps the old name working through the migration window.
|
|
19
|
+
return /\bagent-tempo\b/.test(output) || /\bagent-tempo\b/.test(output);
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** Register agent-tempo globally via `claude mcp add`. */
|
|
26
|
+
function addGlobalMcp() {
|
|
27
|
+
try {
|
|
28
|
+
(0, child_process_1.execFileSync)('claude', [
|
|
29
|
+
'mcp', 'add', 'agent-tempo', '-s', 'user',
|
|
30
|
+
'--', 'agent-tempo-server',
|
|
31
|
+
], { stdio: ['ignore', 'ignore', 'pipe'] });
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Remove agent-tempo from global MCP config via `claude mcp remove`. */
|
|
39
|
+
function removeGlobalMcp() {
|
|
40
|
+
try {
|
|
41
|
+
(0, child_process_1.execFileSync)('claude', [
|
|
42
|
+
'mcp', 'remove', 'agent-tempo', '-s', 'user',
|
|
43
|
+
], { stdio: ['ignore', 'ignore', 'pipe'] });
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/** Check if agent-tempo MCP is configured (global or project-level). */
|
|
51
|
+
function isMcpConfigured(projectDir) {
|
|
52
|
+
if (isGlobalMcpRegistered())
|
|
53
|
+
return true;
|
|
54
|
+
const mcpPath = (0, path_1.join)(projectDir, '.mcp.json');
|
|
55
|
+
if ((0, fs_1.existsSync)(mcpPath)) {
|
|
56
|
+
try {
|
|
57
|
+
const mcp = JSON.parse((0, fs_1.readFileSync)(mcpPath, 'utf8'));
|
|
58
|
+
return !!mcp?.mcpServers?.['agent-tempo'];
|
|
59
|
+
}
|
|
60
|
+
catch { /* invalid json */ }
|
|
61
|
+
}
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const bold: (s: string) => string;
|
|
2
|
+
export declare const dim: (s: string) => string;
|
|
3
|
+
export declare const red: (s: string) => string;
|
|
4
|
+
export declare const green: (s: string) => string;
|
|
5
|
+
export declare const yellow: (s: string) => string;
|
|
6
|
+
export declare const cyan: (s: string) => string;
|
|
7
|
+
export declare function log(msg: string): void;
|
|
8
|
+
export declare function error(msg: string): void;
|
|
9
|
+
export declare function success(msg: string): void;
|
|
10
|
+
export declare function warn(msg: string): void;
|
|
11
|
+
export declare function heading(msg: string): void;
|
|
12
|
+
export declare function check(label: string, ok: boolean, detail?: string): void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cyan = exports.yellow = exports.green = exports.red = exports.dim = exports.bold = void 0;
|
|
4
|
+
exports.log = log;
|
|
5
|
+
exports.error = error;
|
|
6
|
+
exports.success = success;
|
|
7
|
+
exports.warn = warn;
|
|
8
|
+
exports.heading = heading;
|
|
9
|
+
exports.check = check;
|
|
10
|
+
const isColor = process.stdout.isTTY && !process.env.NO_COLOR;
|
|
11
|
+
const ansi = (code) => (s) => isColor ? `\x1b[${code}m${s}\x1b[0m` : s;
|
|
12
|
+
exports.bold = ansi('1');
|
|
13
|
+
exports.dim = ansi('2');
|
|
14
|
+
exports.red = ansi('31');
|
|
15
|
+
exports.green = ansi('32');
|
|
16
|
+
exports.yellow = ansi('33');
|
|
17
|
+
exports.cyan = ansi('36');
|
|
18
|
+
function log(msg) {
|
|
19
|
+
console.log(msg);
|
|
20
|
+
}
|
|
21
|
+
function error(msg) {
|
|
22
|
+
console.error(`${(0, exports.red)('error')} ${msg}`);
|
|
23
|
+
}
|
|
24
|
+
function success(msg) {
|
|
25
|
+
console.log(`${(0, exports.green)('ok')} ${msg}`);
|
|
26
|
+
}
|
|
27
|
+
function warn(msg) {
|
|
28
|
+
console.log(`${(0, exports.yellow)('warn')} ${msg}`);
|
|
29
|
+
}
|
|
30
|
+
function heading(msg) {
|
|
31
|
+
console.log(`\n${(0, exports.bold)(msg)}`);
|
|
32
|
+
}
|
|
33
|
+
function check(label, ok, detail) {
|
|
34
|
+
const icon = ok ? (0, exports.green)('pass') : (0, exports.red)('FAIL');
|
|
35
|
+
const suffix = detail ? ` ${(0, exports.dim)(`(${detail})`)}` : '';
|
|
36
|
+
console.log(` ${icon} ${label}${suffix}`);
|
|
37
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
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.runPreflight = runPreflight;
|
|
37
|
+
const child_process_1 = require("child_process");
|
|
38
|
+
const config_1 = require("../config");
|
|
39
|
+
const connection_1 = require("../connection");
|
|
40
|
+
const spawn_1 = require("../spawn");
|
|
41
|
+
const mcp_1 = require("./mcp");
|
|
42
|
+
const out = __importStar(require("./output"));
|
|
43
|
+
function whichSync(cmd) {
|
|
44
|
+
const bin = process.platform === 'win32' ? 'where' : 'which';
|
|
45
|
+
try {
|
|
46
|
+
return (0, child_process_1.execFileSync)(bin, [cmd], { encoding: 'utf8' }).trim().split('\n')[0];
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async function runPreflight(opts) {
|
|
53
|
+
const config = (0, config_1.getConfig)(opts);
|
|
54
|
+
const errors = [];
|
|
55
|
+
const warnings = [];
|
|
56
|
+
out.heading('Preflight checks');
|
|
57
|
+
// 1. Node.js version
|
|
58
|
+
const major = parseInt(process.version.slice(1), 10);
|
|
59
|
+
const nodeOk = major >= 20;
|
|
60
|
+
out.check('Node.js >= 20', nodeOk, process.version);
|
|
61
|
+
if (!nodeOk)
|
|
62
|
+
errors.push(`Node.js 20+ required, found ${process.version}`);
|
|
63
|
+
// 2. Temporal reachable
|
|
64
|
+
let temporalOk = false;
|
|
65
|
+
try {
|
|
66
|
+
const conn = await Promise.race([
|
|
67
|
+
(0, connection_1.createTemporalConnection)(config),
|
|
68
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error('timeout')), 3000)),
|
|
69
|
+
]);
|
|
70
|
+
await conn.close();
|
|
71
|
+
temporalOk = true;
|
|
72
|
+
}
|
|
73
|
+
catch { /* unreachable */ }
|
|
74
|
+
out.check('Temporal reachable', temporalOk, config.temporalAddress);
|
|
75
|
+
if (!temporalOk)
|
|
76
|
+
errors.push(`Cannot connect to Temporal at ${config.temporalAddress}. Run: temporal server start-dev`);
|
|
77
|
+
// 3. claude binary
|
|
78
|
+
const claudePath = (0, spawn_1.resolveClaudePath)();
|
|
79
|
+
const claudeOk = claudePath !== 'claude';
|
|
80
|
+
out.check('claude binary found', claudeOk, claudeOk ? claudePath : 'not on PATH');
|
|
81
|
+
if (!claudeOk)
|
|
82
|
+
errors.push('claude binary not found on PATH. Install Claude Code first.');
|
|
83
|
+
// 4. agent-tempo-server binary (the MCP server)
|
|
84
|
+
const serverPath = whichSync('agent-tempo-server');
|
|
85
|
+
const serverOk = !!serverPath;
|
|
86
|
+
out.check('agent-tempo-server found', serverOk, serverOk ? serverPath : 'not on PATH');
|
|
87
|
+
if (!serverOk)
|
|
88
|
+
errors.push('agent-tempo-server not found on PATH. Run: npm install -g agent-tempo');
|
|
89
|
+
// 5. MCP config (global or project-level)
|
|
90
|
+
const mcpOk = (0, mcp_1.isMcpConfigured)(opts.dir);
|
|
91
|
+
out.check('MCP configured', mcpOk, mcpOk ? 'global or project' : 'not found');
|
|
92
|
+
if (!mcpOk)
|
|
93
|
+
warnings.push('No agent-tempo MCP config found. Run: agent-tempo init');
|
|
94
|
+
console.log();
|
|
95
|
+
return { ok: errors.length === 0, errors, warnings };
|
|
96
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Short hints completing "Use the TUI: agent-tempo → …". Keys are the
|
|
3
|
+
* removed CLI verbs; values name the TUI equivalent.
|
|
4
|
+
*/
|
|
5
|
+
export declare const REMOVED_VERBS: Record<string, string>;
|
|
6
|
+
/** Format the error message for a single removed verb. */
|
|
7
|
+
export declare function removedVerbMessage(verb: string): string;
|
|
8
|
+
/** Print the removed-verb error to stderr via the shared output helpers. */
|
|
9
|
+
export declare function printRemovedVerbMessage(verb: string): void;
|
|
@@ -0,0 +1,78 @@
|
|
|
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.REMOVED_VERBS = void 0;
|
|
37
|
+
exports.removedVerbMessage = removedVerbMessage;
|
|
38
|
+
exports.printRemovedVerbMessage = printRemovedVerbMessage;
|
|
39
|
+
/**
|
|
40
|
+
* Lookup table + helper for the CLI verbs removed in #288 (design #285).
|
|
41
|
+
*
|
|
42
|
+
* Kept in its own module so `src/cli.ts` can dispatch removed-verb errors
|
|
43
|
+
* BEFORE loading the Temporal-touching command surface (crash-proof
|
|
44
|
+
* pattern, same as `help-text.ts`) and so the mapping can be unit-tested
|
|
45
|
+
* without spinning up the dispatch loop.
|
|
46
|
+
*
|
|
47
|
+
* Any change to this table should ship alongside matching edits in
|
|
48
|
+
* `src/cli/help-text.ts` and `src/cli.ts` (no `case` for any key here).
|
|
49
|
+
*
|
|
50
|
+
* Dev-mode verbs (#432) are intercepted before this table — a verb is
|
|
51
|
+
* either dev-mode-live or removed-with-a-hint, never both. The
|
|
52
|
+
* mechanical test in `test/cli-dev-verbs.test.ts` enforces this.
|
|
53
|
+
*/
|
|
54
|
+
const out = __importStar(require("./output"));
|
|
55
|
+
/**
|
|
56
|
+
* Short hints completing "Use the TUI: agent-tempo → …". Keys are the
|
|
57
|
+
* removed CLI verbs; values name the TUI equivalent.
|
|
58
|
+
*/
|
|
59
|
+
exports.REMOVED_VERBS = {
|
|
60
|
+
stop: '/destroy',
|
|
61
|
+
conduct: 'launch directly (the TUI auto-provisions the conductor)',
|
|
62
|
+
start: '/recruit <name>',
|
|
63
|
+
disband: '/destroy',
|
|
64
|
+
detach: '/shutdown (ensemble-wide) — detach is no longer a user-facing verb',
|
|
65
|
+
restart: '/restart <player>',
|
|
66
|
+
recruit: '/recruit <name>',
|
|
67
|
+
migrate: '/migrate <player> <host>',
|
|
68
|
+
resume: '/play',
|
|
69
|
+
};
|
|
70
|
+
/** Format the error message for a single removed verb. */
|
|
71
|
+
function removedVerbMessage(verb) {
|
|
72
|
+
const hint = exports.REMOVED_VERBS[verb];
|
|
73
|
+
return `"${verb}" is no longer a CLI verb. Use the TUI: agent-tempo → ${hint}. See https://github.com/vinceblank/agent-tempo/issues/285 for details.`;
|
|
74
|
+
}
|
|
75
|
+
/** Print the removed-verb error to stderr via the shared output helpers. */
|
|
76
|
+
function printRemovedVerbMessage(verb) {
|
|
77
|
+
out.error(removedVerbMessage(verb));
|
|
78
|
+
}
|