@ranker/raxflow 0.2.2 → 0.2.3
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/dist/benchmark.d.ts +10 -0
- package/dist/benchmark.d.ts.map +1 -0
- package/dist/benchmark.js +123 -0
- package/dist/benchmark.js.map +1 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +141 -0
- package/dist/bin.js.map +1 -0
- package/dist/bootstrap.d.ts +8 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +22 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/bridge-adapter-templates.d.ts +4 -0
- package/dist/bridge-adapter-templates.d.ts.map +1 -0
- package/dist/bridge-adapter-templates.js +185 -0
- package/dist/bridge-adapter-templates.js.map +1 -0
- package/dist/bridge-test.d.ts +7 -0
- package/dist/bridge-test.d.ts.map +1 -0
- package/dist/bridge-test.js +89 -0
- package/dist/bridge-test.js.map +1 -0
- package/dist/dashboard.d.ts +4 -0
- package/dist/dashboard.d.ts.map +1 -0
- package/{src/dashboard.ts → dist/dashboard.js} +8 -10
- package/dist/dashboard.js.map +1 -0
- package/dist/doctor.d.ts +6 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +70 -0
- package/dist/doctor.js.map +1 -0
- package/dist/evolve.d.ts +7 -0
- package/dist/evolve.d.ts.map +1 -0
- package/{src/evolve.ts → dist/evolve.js} +7 -33
- package/dist/evolve.js.map +1 -0
- package/dist/host-init-templates.d.ts +16 -0
- package/dist/host-init-templates.d.ts.map +1 -0
- package/dist/host-init-templates.js +119 -0
- package/dist/host-init-templates.js.map +1 -0
- package/dist/hub/__tests__/commands.test.d.ts +2 -0
- package/dist/hub/__tests__/commands.test.d.ts.map +1 -0
- package/dist/hub/__tests__/commands.test.js +72 -0
- package/dist/hub/__tests__/commands.test.js.map +1 -0
- package/dist/hub/__tests__/history.test.d.ts +2 -0
- package/dist/hub/__tests__/history.test.d.ts.map +1 -0
- package/dist/hub/__tests__/history.test.js +119 -0
- package/dist/hub/__tests__/history.test.js.map +1 -0
- package/dist/hub/__tests__/parser.test.d.ts +2 -0
- package/dist/hub/__tests__/parser.test.d.ts.map +1 -0
- package/dist/hub/__tests__/parser.test.js +92 -0
- package/dist/hub/__tests__/parser.test.js.map +1 -0
- package/dist/hub/commands/agents.d.ts +3 -0
- package/dist/hub/commands/agents.d.ts.map +1 -0
- package/dist/hub/commands/agents.js +36 -0
- package/dist/hub/commands/agents.js.map +1 -0
- package/dist/hub/commands/index.d.ts +4 -0
- package/dist/hub/commands/index.d.ts.map +1 -0
- package/dist/hub/commands/index.js +123 -0
- package/dist/hub/commands/index.js.map +1 -0
- package/dist/hub/commands/logs.d.ts +3 -0
- package/dist/hub/commands/logs.d.ts.map +1 -0
- package/dist/hub/commands/logs.js +53 -0
- package/dist/hub/commands/logs.js.map +1 -0
- package/dist/hub/commands/memory.d.ts +3 -0
- package/dist/hub/commands/memory.d.ts.map +1 -0
- package/dist/hub/commands/memory.js +40 -0
- package/dist/hub/commands/memory.js.map +1 -0
- package/dist/hub/commands/metrics.d.ts +3 -0
- package/dist/hub/commands/metrics.d.ts.map +1 -0
- package/dist/hub/commands/metrics.js +35 -0
- package/dist/hub/commands/metrics.js.map +1 -0
- package/dist/hub/commands/providers.d.ts +3 -0
- package/dist/hub/commands/providers.d.ts.map +1 -0
- package/dist/hub/commands/providers.js +26 -0
- package/dist/hub/commands/providers.js.map +1 -0
- package/dist/hub/commands/run.d.ts +3 -0
- package/dist/hub/commands/run.d.ts.map +1 -0
- package/dist/hub/commands/run.js +31 -0
- package/dist/hub/commands/run.js.map +1 -0
- package/dist/hub/commands/status.d.ts +3 -0
- package/dist/hub/commands/status.d.ts.map +1 -0
- package/dist/hub/commands/status.js +61 -0
- package/dist/hub/commands/status.js.map +1 -0
- package/dist/hub/commands/workflows.d.ts +3 -0
- package/dist/hub/commands/workflows.d.ts.map +1 -0
- package/dist/hub/commands/workflows.js +45 -0
- package/dist/hub/commands/workflows.js.map +1 -0
- package/dist/hub/config-loader.d.ts +4 -0
- package/dist/hub/config-loader.d.ts.map +1 -0
- package/dist/hub/config-loader.js +27 -0
- package/dist/hub/config-loader.js.map +1 -0
- package/dist/hub/event-listener.d.ts +6 -0
- package/dist/hub/event-listener.d.ts.map +1 -0
- package/dist/hub/event-listener.js +12 -0
- package/dist/hub/event-listener.js.map +1 -0
- package/dist/hub/history.d.ts +13 -0
- package/dist/hub/history.d.ts.map +1 -0
- package/dist/hub/history.js +59 -0
- package/dist/hub/history.js.map +1 -0
- package/dist/hub/index.d.ts +4 -0
- package/dist/hub/index.d.ts.map +1 -0
- package/dist/hub/index.js +114 -0
- package/dist/hub/index.js.map +1 -0
- package/dist/hub/parser.d.ts +4 -0
- package/dist/hub/parser.d.ts.map +1 -0
- package/dist/hub/parser.js +98 -0
- package/dist/hub/parser.js.map +1 -0
- package/dist/hub/styles/borders.d.ts +23 -0
- package/dist/hub/styles/borders.d.ts.map +1 -0
- package/dist/hub/styles/borders.js +64 -0
- package/dist/hub/styles/borders.js.map +1 -0
- package/dist/hub/styles/colors.d.ts +63 -0
- package/dist/hub/styles/colors.d.ts.map +1 -0
- package/dist/hub/styles/colors.js +115 -0
- package/dist/hub/styles/colors.js.map +1 -0
- package/dist/hub/styles/typography.d.ts +34 -0
- package/dist/hub/styles/typography.d.ts.map +1 -0
- package/dist/hub/styles/typography.js +60 -0
- package/dist/hub/styles/typography.js.map +1 -0
- package/dist/hub/types.d.ts +27 -0
- package/dist/hub/types.d.ts.map +1 -0
- package/dist/hub/types.js +2 -0
- package/dist/hub/types.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/{src/index.ts → dist/index.js} +1 -0
- package/dist/index.js.map +1 -0
- package/dist/init-host.d.ts +10 -0
- package/dist/init-host.d.ts.map +1 -0
- package/dist/init-host.js +232 -0
- package/dist/init-host.js.map +1 -0
- package/dist/install.d.ts +8 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +99 -0
- package/dist/install.js.map +1 -0
- package/dist/run.d.ts +16 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/run.js +238 -0
- package/dist/run.js.map +1 -0
- package/dist/setup/components/ApiKeyInput.d.ts +25 -0
- package/dist/setup/components/ApiKeyInput.d.ts.map +1 -0
- package/dist/setup/components/ApiKeyInput.js +54 -0
- package/dist/setup/components/ApiKeyInput.js.map +1 -0
- package/dist/setup/components/AsciiBanner.d.ts +22 -0
- package/dist/setup/components/AsciiBanner.d.ts.map +1 -0
- package/{src/setup/components/AsciiBanner.tsx → dist/setup/components/AsciiBanner.js} +24 -94
- package/dist/setup/components/AsciiBanner.js.map +1 -0
- package/dist/setup/components/CliDetector.d.ts +17 -0
- package/dist/setup/components/CliDetector.d.ts.map +1 -0
- package/dist/setup/components/CliDetector.js +79 -0
- package/dist/setup/components/CliDetector.js.map +1 -0
- package/dist/setup/components/ModeSelector.d.ts +8 -0
- package/dist/setup/components/ModeSelector.d.ts.map +1 -0
- package/dist/setup/components/ModeSelector.js +76 -0
- package/dist/setup/components/ModeSelector.js.map +1 -0
- package/dist/setup/components/ProviderSelector.d.ts +18 -0
- package/dist/setup/components/ProviderSelector.d.ts.map +1 -0
- package/dist/setup/components/ProviderSelector.js +98 -0
- package/dist/setup/components/ProviderSelector.js.map +1 -0
- package/dist/setup/components/SetupWizard.d.ts +2 -0
- package/dist/setup/components/SetupWizard.d.ts.map +1 -0
- package/dist/setup/components/SetupWizard.js +212 -0
- package/dist/setup/components/SetupWizard.js.map +1 -0
- package/dist/setup/components/StepIndicator.d.ts +13 -0
- package/dist/setup/components/StepIndicator.d.ts.map +1 -0
- package/dist/setup/components/StepIndicator.js +18 -0
- package/dist/setup/components/StepIndicator.js.map +1 -0
- package/dist/setup/components/SuccessScreen.d.ts +18 -0
- package/dist/setup/components/SuccessScreen.d.ts.map +1 -0
- package/dist/setup/components/SuccessScreen.js +38 -0
- package/dist/setup/components/SuccessScreen.js.map +1 -0
- package/dist/setup/index.d.ts +12 -0
- package/dist/setup/index.d.ts.map +1 -0
- package/{src/setup/index.ts → dist/setup/index.js} +14 -19
- package/dist/setup/index.js.map +1 -0
- package/dist/setup/utils/cli-detection.d.ts +12 -0
- package/dist/setup/utils/cli-detection.d.ts.map +1 -0
- package/dist/setup/utils/cli-detection.js +83 -0
- package/dist/setup/utils/cli-detection.js.map +1 -0
- package/dist/setup/utils/config-writer.d.ts +43 -0
- package/dist/setup/utils/config-writer.d.ts.map +1 -0
- package/dist/setup/utils/config-writer.js +180 -0
- package/dist/setup/utils/config-writer.js.map +1 -0
- package/dist/styles.d.ts +12 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +12 -0
- package/dist/styles.js.map +1 -0
- package/dist/tui/App.d.ts +3 -0
- package/dist/tui/App.d.ts.map +1 -0
- package/dist/tui/App.js +136 -0
- package/dist/tui/App.js.map +1 -0
- package/dist/tui/components/AgentStateIcon.d.ts +18 -0
- package/dist/tui/components/AgentStateIcon.d.ts.map +1 -0
- package/dist/tui/components/AgentStateIcon.js +57 -0
- package/dist/tui/components/AgentStateIcon.js.map +1 -0
- package/dist/tui/components/AnimatedBranch.d.ts +39 -0
- package/dist/tui/components/AnimatedBranch.d.ts.map +1 -0
- package/dist/tui/components/AnimatedBranch.js +64 -0
- package/dist/tui/components/AnimatedBranch.js.map +1 -0
- package/dist/tui/components/ChatPanel.d.ts +17 -0
- package/dist/tui/components/ChatPanel.d.ts.map +1 -0
- package/dist/tui/components/ChatPanel.js +51 -0
- package/dist/tui/components/ChatPanel.js.map +1 -0
- package/dist/tui/components/DAGPanel.d.ts +37 -0
- package/dist/tui/components/DAGPanel.d.ts.map +1 -0
- package/dist/tui/components/DAGPanel.js +52 -0
- package/dist/tui/components/DAGPanel.js.map +1 -0
- package/dist/tui/components/ExecutionTimeline.d.ts +34 -0
- package/dist/tui/components/ExecutionTimeline.d.ts.map +1 -0
- package/dist/tui/components/ExecutionTimeline.js +67 -0
- package/dist/tui/components/ExecutionTimeline.js.map +1 -0
- package/dist/tui/components/Header.d.ts +12 -0
- package/dist/tui/components/Header.d.ts.map +1 -0
- package/dist/tui/components/Header.js +32 -0
- package/dist/tui/components/Header.js.map +1 -0
- package/dist/tui/components/HelpOverlay.d.ts +7 -0
- package/dist/tui/components/HelpOverlay.d.ts.map +1 -0
- package/dist/tui/components/HelpOverlay.js +60 -0
- package/dist/tui/components/HelpOverlay.js.map +1 -0
- package/dist/tui/components/InputBar.d.ts +10 -0
- package/dist/tui/components/InputBar.d.ts.map +1 -0
- package/dist/tui/components/InputBar.js +21 -0
- package/dist/tui/components/InputBar.js.map +1 -0
- package/dist/tui/components/LogsPanel.d.ts +10 -0
- package/dist/tui/components/MemoryPanel.d.ts +22 -0
- package/dist/tui/components/MetricsPanel.d.ts +19 -0
- package/dist/tui/components/StatusPanel.d.ts +24 -0
- package/dist/tui/components/TaskTree.d.ts +28 -0
- package/dist/tui/components/TaskTree.d.ts.map +1 -0
- package/dist/tui/components/TaskTree.js +29 -0
- package/dist/tui/components/TaskTree.js.map +1 -0
- package/dist/tui/components/animations/ProgressBar.d.ts +39 -0
- package/dist/tui/components/animations/ProgressBar.d.ts.map +1 -0
- package/dist/tui/components/animations/ProgressBar.js +39 -0
- package/dist/tui/components/animations/ProgressBar.js.map +1 -0
- package/dist/tui/components/animations/Pulse.d.ts +17 -0
- package/dist/tui/components/animations/Pulse.d.ts.map +1 -0
- package/dist/tui/components/animations/Pulse.js +47 -0
- package/dist/tui/components/animations/Pulse.js.map +1 -0
- package/dist/tui/components/animations/Spinner.d.ts +13 -0
- package/dist/tui/components/animations/Spinner.d.ts.map +1 -0
- package/dist/tui/components/animations/Spinner.js +36 -0
- package/dist/tui/components/animations/Spinner.js.map +1 -0
- package/dist/tui/components/animations/StatusAnimator.d.ts +27 -0
- package/dist/tui/components/animations/StatusAnimator.d.ts.map +1 -0
- package/dist/tui/components/animations/StatusAnimator.js +85 -0
- package/dist/tui/components/animations/StatusAnimator.js.map +1 -0
- package/dist/tui/components/animations/TypingEffect.d.ts +26 -0
- package/dist/tui/components/animations/TypingEffect.d.ts.map +1 -0
- package/dist/tui/components/animations/TypingEffect.js +59 -0
- package/dist/tui/components/animations/TypingEffect.js.map +1 -0
- package/{src/tui/components/animations/index.ts → dist/tui/components/animations/index.d.ts} +2 -10
- package/dist/tui/components/animations/index.d.ts.map +1 -0
- package/dist/tui/components/animations/index.js +6 -0
- package/dist/tui/components/animations/index.js.map +1 -0
- package/dist/tui/hooks/useAnimation.d.ts +42 -0
- package/dist/tui/hooks/useAnimation.d.ts.map +1 -0
- package/dist/tui/hooks/useAnimation.js +212 -0
- package/dist/tui/hooks/useAnimation.js.map +1 -0
- package/dist/tui/hooks/useAppState.d.ts +65 -0
- package/dist/tui/hooks/useAppState.d.ts.map +1 -0
- package/dist/tui/hooks/useAppState.js +293 -0
- package/dist/tui/hooks/useAppState.js.map +1 -0
- package/dist/tui/index.d.ts +3 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/{src/tui/index.ts → dist/tui/index.js} +2 -3
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/services/orchestrator.d.ts +16 -0
- package/dist/tui/services/orchestrator.d.ts.map +1 -0
- package/dist/tui/services/orchestrator.js +152 -0
- package/dist/tui/services/orchestrator.js.map +1 -0
- package/dist/tui/styles/borders.d.ts +31 -0
- package/dist/tui/styles/borders.d.ts.map +1 -0
- package/dist/tui/styles/borders.js +47 -0
- package/dist/tui/styles/borders.js.map +1 -0
- package/dist/tui/styles/colors.d.ts +18 -0
- package/dist/tui/styles/colors.d.ts.map +1 -0
- package/dist/tui/styles/colors.js +18 -0
- package/dist/tui/styles/colors.js.map +1 -0
- package/dist/tui/styles/index.d.ts +6 -0
- package/dist/tui/styles/index.d.ts.map +1 -0
- package/dist/tui/styles/index.js +6 -0
- package/dist/tui/styles/index.js.map +1 -0
- package/dist/tui/styles/indicators.d.ts +67 -0
- package/dist/tui/styles/indicators.d.ts.map +1 -0
- package/dist/tui/styles/indicators.js +42 -0
- package/dist/tui/styles/indicators.js.map +1 -0
- package/dist/tui/styles/layout.d.ts +21 -0
- package/dist/tui/styles/layout.d.ts.map +1 -0
- package/dist/tui/styles/layout.js +42 -0
- package/dist/tui/styles/layout.js.map +1 -0
- package/dist/tui/styles/providers.d.ts +77 -0
- package/dist/tui/styles/providers.d.ts.map +1 -0
- package/dist/tui/styles/providers.js +31 -0
- package/dist/tui/styles/providers.js.map +1 -0
- package/dist/tui/utils/animation.d.ts +44 -0
- package/dist/tui/utils/animation.d.ts.map +1 -0
- package/dist/tui/utils/animation.js +107 -0
- package/dist/tui/utils/animation.js.map +1 -0
- package/dist/vendor-manifests.d.ts +22 -0
- package/dist/vendor-manifests.d.ts.map +1 -0
- package/dist/vendor-manifests.js +94 -0
- package/dist/vendor-manifests.js.map +1 -0
- package/dist/ws-relay.d.ts +12 -0
- package/dist/ws-relay.d.ts.map +1 -0
- package/{src/ws-relay.ts → dist/ws-relay.js} +39 -47
- package/dist/ws-relay.js.map +1 -0
- package/package.json +5 -1
- package/dashboard/index.html +0 -420
- package/src/benchmark.ts +0 -156
- package/src/bin.ts +0 -156
- package/src/bootstrap.ts +0 -36
- package/src/bridge-adapter-templates.ts +0 -181
- package/src/bridge-test.ts +0 -107
- package/src/doctor.ts +0 -92
- package/src/host-init-templates.ts +0 -134
- package/src/hub/__tests__/commands.test.ts +0 -84
- package/src/hub/__tests__/history.test.ts +0 -137
- package/src/hub/__tests__/parser.test.ts +0 -105
- package/src/hub/commands/agents.ts +0 -53
- package/src/hub/commands/index.ts +0 -140
- package/src/hub/commands/logs.ts +0 -70
- package/src/hub/commands/memory.ts +0 -47
- package/src/hub/commands/metrics.ts +0 -49
- package/src/hub/commands/providers.ts +0 -39
- package/src/hub/commands/run.ts +0 -37
- package/src/hub/commands/status.ts +0 -69
- package/src/hub/commands/workflows.ts +0 -64
- package/src/hub/config-loader.ts +0 -37
- package/src/hub/event-listener.ts +0 -17
- package/src/hub/history.ts +0 -66
- package/src/hub/index.ts +0 -132
- package/src/hub/parser.ts +0 -107
- package/src/hub/styles/borders.ts +0 -74
- package/src/hub/styles/colors.ts +0 -129
- package/src/hub/styles/typography.ts +0 -68
- package/src/hub/types.ts +0 -31
- package/src/init-host.ts +0 -285
- package/src/install.ts +0 -118
- package/src/run.ts +0 -317
- package/src/setup/components/ApiKeyInput.tsx +0 -158
- package/src/setup/components/CliDetector.tsx +0 -230
- package/src/setup/components/ModeSelector.tsx +0 -137
- package/src/setup/components/ProviderSelector.tsx +0 -175
- package/src/setup/components/SetupWizard.tsx +0 -368
- package/src/setup/components/StepIndicator.tsx +0 -74
- package/src/setup/components/SuccessScreen.tsx +0 -229
- package/src/setup/utils/cli-detection.ts +0 -99
- package/src/setup/utils/config-writer.ts +0 -249
- package/src/styles.ts +0 -12
- package/src/tui/App.tsx +0 -183
- package/src/tui/components/AgentStateIcon.tsx +0 -84
- package/src/tui/components/AnimatedBranch.tsx +0 -134
- package/src/tui/components/ChatPanel.tsx +0 -128
- package/src/tui/components/DAGPanel.tsx +0 -212
- package/src/tui/components/ExecutionTimeline.tsx +0 -225
- package/src/tui/components/Header.tsx +0 -109
- package/src/tui/components/HelpOverlay.tsx +0 -140
- package/src/tui/components/InputBar.tsx +0 -69
- package/src/tui/components/LogsPanel.tsx +0 -132
- package/src/tui/components/MemoryPanel.tsx +0 -166
- package/src/tui/components/MetricsPanel.tsx +0 -152
- package/src/tui/components/StatusPanel.tsx +0 -140
- package/src/tui/components/TaskTree.tsx +0 -159
- package/src/tui/components/animations/ProgressBar.tsx +0 -160
- package/src/tui/components/animations/Pulse.tsx +0 -73
- package/src/tui/components/animations/Spinner.tsx +0 -54
- package/src/tui/components/animations/StatusAnimator.tsx +0 -153
- package/src/tui/components/animations/TypingEffect.tsx +0 -119
- package/src/tui/hooks/useAnimation.ts +0 -290
- package/src/tui/hooks/useAppState.ts +0 -403
- package/src/tui/services/orchestrator.ts +0 -195
- package/src/tui/styles/borders.ts +0 -51
- package/src/tui/styles/colors.ts +0 -19
- package/src/tui/styles/index.ts +0 -20
- package/src/tui/styles/indicators.ts +0 -54
- package/src/tui/styles/layout.ts +0 -44
- package/src/tui/styles/providers.ts +0 -32
- package/src/tui/utils/animation.ts +0 -124
- package/src/vendor-manifests.ts +0 -113
- package/tsconfig.json +0 -28
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../../src/tui/services/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAGZ,aAAa,EAKd,MAAM,eAAe,CAAC;AASvB,MAAM,WAAW,mBAAmB;IAClC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAC5D,SAAS,IAAI,kBAAkB,CAAC;IAChC,IAAI,IAAI,IAAI,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB;AA6GD,wBAAgB,kBAAkB,IAAI,mBAAmB,CAoDxD;AAED,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { CoreOrchestrator, } from "rax-flow-core";
|
|
2
|
+
import { OpenAIAdapter, ClaudeAdapter, GeminiAdapter, GroqAdapter, HostBridgeAdapter, } from "rax-flow-providers";
|
|
3
|
+
function createProviderFromEnv(name) {
|
|
4
|
+
switch (name) {
|
|
5
|
+
case "openai":
|
|
6
|
+
if (process.env.OPENAI_API_KEY) {
|
|
7
|
+
return new OpenAIAdapter({ apiKey: process.env.OPENAI_API_KEY });
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
case "claude":
|
|
11
|
+
case "anthropic":
|
|
12
|
+
if (process.env.ANTHROPIC_API_KEY) {
|
|
13
|
+
return new ClaudeAdapter({ apiKey: process.env.ANTHROPIC_API_KEY });
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
16
|
+
case "gemini":
|
|
17
|
+
if (process.env.GOOGLE_API_KEY || process.env.GEMINI_API_KEY) {
|
|
18
|
+
return new GeminiAdapter({ apiKey: process.env.GOOGLE_API_KEY || process.env.GEMINI_API_KEY });
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
case "groq":
|
|
22
|
+
if (process.env.GROQ_API_KEY) {
|
|
23
|
+
return new GroqAdapter({ apiKey: process.env.GROQ_API_KEY });
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
case "host":
|
|
27
|
+
return new HostBridgeAdapter({ mode: "auto" });
|
|
28
|
+
default:
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function createMockProvider() {
|
|
33
|
+
return {
|
|
34
|
+
async callModel(prompt, options) {
|
|
35
|
+
await new Promise((r) => setTimeout(r, 300 + Math.random() * 500));
|
|
36
|
+
return {
|
|
37
|
+
provider: "mock",
|
|
38
|
+
model: "mock-model",
|
|
39
|
+
latencyMs: 300 + Math.floor(Math.random() * 200),
|
|
40
|
+
output: `Processed: ${prompt.slice(0, 50)}...`,
|
|
41
|
+
usage: { promptTokens: 100, completionTokens: 50, totalTokens: 150 },
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
async callStructured(prompt, schema, options) {
|
|
45
|
+
const response = await this.callModel(prompt, options);
|
|
46
|
+
return {
|
|
47
|
+
...response,
|
|
48
|
+
output: {},
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
async healthCheck() {
|
|
52
|
+
return true;
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function buildProviders() {
|
|
57
|
+
const providers = {};
|
|
58
|
+
const hostProvider = createProviderFromEnv("host");
|
|
59
|
+
if (hostProvider)
|
|
60
|
+
providers["host"] = hostProvider;
|
|
61
|
+
for (const name of ["openai", "claude", "gemini", "groq"]) {
|
|
62
|
+
const provider = createProviderFromEnv(name);
|
|
63
|
+
if (provider)
|
|
64
|
+
providers[name] = provider;
|
|
65
|
+
}
|
|
66
|
+
if (Object.keys(providers).length === 0) {
|
|
67
|
+
console.log("[Orchestrator] No API keys found, using mock provider");
|
|
68
|
+
providers["mock"] = createMockProvider();
|
|
69
|
+
}
|
|
70
|
+
return providers;
|
|
71
|
+
}
|
|
72
|
+
function createAgent(name, role) {
|
|
73
|
+
return {
|
|
74
|
+
name,
|
|
75
|
+
role,
|
|
76
|
+
activationWhen: `intent == "${name.toLowerCase()}"`,
|
|
77
|
+
inputSchema: { type: "object" },
|
|
78
|
+
outputSchema: { type: "object" },
|
|
79
|
+
async run(input) {
|
|
80
|
+
await new Promise((r) => setTimeout(r, 200 + Math.random() * 300));
|
|
81
|
+
return {
|
|
82
|
+
agent: name,
|
|
83
|
+
success: true,
|
|
84
|
+
confidence: 0.85 + Math.random() * 0.1,
|
|
85
|
+
risks: [],
|
|
86
|
+
logs: [`Executed ${name}`],
|
|
87
|
+
data: { result: `Processed: ${input.userPrompt.slice(0, 50)}...` },
|
|
88
|
+
usage: { promptTokens: 100, completionTokens: 50, totalTokens: 150 },
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const DEFAULT_AGENTS = [
|
|
94
|
+
createAgent("IntentClassifier", "Classifies user intent"),
|
|
95
|
+
createAgent("TaskPlanner", "Decomposes tasks"),
|
|
96
|
+
createAgent("SpecAgent", "Writes specifications"),
|
|
97
|
+
createAgent("ArchitectureAgent", "Designs architecture"),
|
|
98
|
+
createAgent("CodeGenerator", "Generates code"),
|
|
99
|
+
createAgent("TestAgent", "Runs tests"),
|
|
100
|
+
createAgent("FixAgent", "Fixes issues"),
|
|
101
|
+
createAgent("ValidatorAgent", "Validates outputs"),
|
|
102
|
+
];
|
|
103
|
+
export function createOrchestrator() {
|
|
104
|
+
const providers = buildProviders();
|
|
105
|
+
const agents = {};
|
|
106
|
+
for (const agent of DEFAULT_AGENTS) {
|
|
107
|
+
agents[agent.name] = agent;
|
|
108
|
+
}
|
|
109
|
+
const orchestrator = new CoreOrchestrator(providers, agents);
|
|
110
|
+
let isRunning = false;
|
|
111
|
+
let currentTaskId = null;
|
|
112
|
+
let fitness = 0.87;
|
|
113
|
+
orchestrator.initialize().catch(() => { });
|
|
114
|
+
return {
|
|
115
|
+
async run(prompt) {
|
|
116
|
+
if (isRunning)
|
|
117
|
+
return;
|
|
118
|
+
isRunning = true;
|
|
119
|
+
currentTaskId = `task-${Date.now()}`;
|
|
120
|
+
try {
|
|
121
|
+
await orchestrator.run({
|
|
122
|
+
taskId: currentTaskId,
|
|
123
|
+
userPrompt: prompt,
|
|
124
|
+
});
|
|
125
|
+
fitness = Math.min(fitness + 0.02, 0.99);
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
console.error("Orchestrator error:", error);
|
|
129
|
+
}
|
|
130
|
+
finally {
|
|
131
|
+
currentTaskId = null;
|
|
132
|
+
isRunning = false;
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
onEvent(handler) {
|
|
136
|
+
return orchestrator.onEvent(handler);
|
|
137
|
+
},
|
|
138
|
+
getStatus() {
|
|
139
|
+
return {
|
|
140
|
+
isRunning,
|
|
141
|
+
currentTaskId,
|
|
142
|
+
workflow: null,
|
|
143
|
+
fitness,
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
stop() {
|
|
147
|
+
isRunning = false;
|
|
148
|
+
currentTaskId = null;
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=orchestrator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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B,UAAU,EAAE,MAAM;iBACnB,CAAC,CAAC;gBACH,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,EAAE,IAAI,CAAC,CAAC;YAC3C,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;YAC9C,CAAC;oBAAS,CAAC;gBACT,aAAa,GAAG,IAAI,CAAC;gBACrB,SAAS,GAAG,KAAK,CAAC;YACpB,CAAC;QACH,CAAC;QAED,OAAO,CAAC,OAAsC;YAC5C,OAAO,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC;QAED,SAAS;YACP,OAAO;gBACL,SAAS;gBACT,aAAa;gBACb,QAAQ,EAAE,IAAI;gBACd,OAAO;aACR,CAAC;QACJ,CAAC;QAED,IAAI;YACF,SAAS,GAAG,KAAK,CAAC;YAClB,aAAa,GAAG,IAAI,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const borders: {
|
|
2
|
+
horizontal: string;
|
|
3
|
+
vertical: string;
|
|
4
|
+
topLeft: string;
|
|
5
|
+
topRight: string;
|
|
6
|
+
bottomLeft: string;
|
|
7
|
+
bottomRight: string;
|
|
8
|
+
leftT: string;
|
|
9
|
+
rightT: string;
|
|
10
|
+
topT: string;
|
|
11
|
+
bottomT: string;
|
|
12
|
+
cross: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const doubleBorders: {
|
|
15
|
+
horizontal: string;
|
|
16
|
+
vertical: string;
|
|
17
|
+
topLeft: string;
|
|
18
|
+
topRight: string;
|
|
19
|
+
bottomLeft: string;
|
|
20
|
+
bottomRight: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const treeChars: {
|
|
23
|
+
branch: string;
|
|
24
|
+
lastBranch: string;
|
|
25
|
+
vertical: string;
|
|
26
|
+
indent: string;
|
|
27
|
+
};
|
|
28
|
+
export declare function drawTopBorder(width: number, title?: string): string;
|
|
29
|
+
export declare function drawBottomBorder(width: number): string;
|
|
30
|
+
export declare function drawSeparator(width: number): string;
|
|
31
|
+
//# sourceMappingURL=borders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"borders.d.ts","sourceRoot":"","sources":["../../../src/tui/styles/borders.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;;CAYnB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;CAOzB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;CAKrB,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAUnE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGnD"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export const borders = {
|
|
2
|
+
horizontal: "─",
|
|
3
|
+
vertical: "│",
|
|
4
|
+
topLeft: "┌",
|
|
5
|
+
topRight: "┐",
|
|
6
|
+
bottomLeft: "└",
|
|
7
|
+
bottomRight: "┘",
|
|
8
|
+
leftT: "├",
|
|
9
|
+
rightT: "┤",
|
|
10
|
+
topT: "┬",
|
|
11
|
+
bottomT: "┴",
|
|
12
|
+
cross: "┼",
|
|
13
|
+
};
|
|
14
|
+
export const doubleBorders = {
|
|
15
|
+
horizontal: "═",
|
|
16
|
+
vertical: "║",
|
|
17
|
+
topLeft: "╔",
|
|
18
|
+
topRight: "╗",
|
|
19
|
+
bottomLeft: "╚",
|
|
20
|
+
bottomRight: "╝",
|
|
21
|
+
};
|
|
22
|
+
export const treeChars = {
|
|
23
|
+
branch: "├─",
|
|
24
|
+
lastBranch: "└─",
|
|
25
|
+
vertical: "│",
|
|
26
|
+
indent: " ",
|
|
27
|
+
};
|
|
28
|
+
export function drawTopBorder(width, title) {
|
|
29
|
+
const { topLeft, topRight, horizontal } = borders;
|
|
30
|
+
if (title) {
|
|
31
|
+
const titleStr = ` ${title} `;
|
|
32
|
+
const titleLen = titleStr.length;
|
|
33
|
+
const remaining = width - 2 - titleLen;
|
|
34
|
+
const rightDashes = Math.max(0, remaining);
|
|
35
|
+
return `${topLeft}${titleStr}${horizontal.repeat(rightDashes)}${topRight}`;
|
|
36
|
+
}
|
|
37
|
+
return `${topLeft}${horizontal.repeat(width - 2)}${topRight}`;
|
|
38
|
+
}
|
|
39
|
+
export function drawBottomBorder(width) {
|
|
40
|
+
const { bottomLeft, bottomRight, horizontal } = borders;
|
|
41
|
+
return `${bottomLeft}${horizontal.repeat(width - 2)}${bottomRight}`;
|
|
42
|
+
}
|
|
43
|
+
export function drawSeparator(width) {
|
|
44
|
+
const { leftT, rightT, horizontal } = borders;
|
|
45
|
+
return `${leftT}${horizontal.repeat(width - 2)}${rightT}`;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=borders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"borders.js","sourceRoot":"","sources":["../../../src/tui/styles/borders.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,UAAU,EAAE,GAAG;IACf,WAAW,EAAE,GAAG;IAChB,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;IACX,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,GAAG;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,UAAU,EAAE,GA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AE,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { colors } from "../../hub/styles/colors.js";
|
|
2
|
+
export { colors };
|
|
3
|
+
export declare const tuiColors: {
|
|
4
|
+
background: string;
|
|
5
|
+
surface: string;
|
|
6
|
+
primary: string;
|
|
7
|
+
textPrimary: string;
|
|
8
|
+
textSecondary: string;
|
|
9
|
+
textTertiary: string;
|
|
10
|
+
textQuaternary: string;
|
|
11
|
+
success: string;
|
|
12
|
+
warning: string;
|
|
13
|
+
error: string;
|
|
14
|
+
border: string;
|
|
15
|
+
mutation: string;
|
|
16
|
+
checkpoint: string;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/tui/styles/colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;CAcrB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { colors } from "../../hub/styles/colors.js";
|
|
2
|
+
export { colors };
|
|
3
|
+
export const tuiColors = {
|
|
4
|
+
background: "#050505",
|
|
5
|
+
surface: "#0a0a0a",
|
|
6
|
+
primary: "#f97316",
|
|
7
|
+
textPrimary: "#ffffff",
|
|
8
|
+
textSecondary: "#a1a1aa",
|
|
9
|
+
textTertiary: "#71717a",
|
|
10
|
+
textQuaternary: "#3f3f46",
|
|
11
|
+
success: "#22c55e",
|
|
12
|
+
warning: "#f59e0b",
|
|
13
|
+
error: "#ef4444",
|
|
14
|
+
border: "#27272a",
|
|
15
|
+
mutation: "#f59e0b",
|
|
16
|
+
checkpoint: "#f97316",
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/tui/styles/colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,SAAS;IACtB,aAAa,EAAE,SAAS;IACxB,YAAY,EAAE,SAAS;IACvB,cAAc,EAAE,SAAS;IACzB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,SAAS;CACtB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { colors, tuiColors } from "./colors.js";
|
|
2
|
+
export { borders, doubleBorders, treeChars, drawTopBorder, drawBottomBorder, drawSeparator } from "./borders.js";
|
|
3
|
+
export { statusIndicators, getStatusIndicator, spinnerFrames, getSpinnerFrame, dotsSpinnerFrames, circleSpinnerFrames, pulseFrames, breathFrames, progressMarkerFrames, progressGlowFrames, getPulseFrame, getBreathFrame, getProgressMarker, getProgressGlow } from "./indicators.js";
|
|
4
|
+
export { providerTags, getProviderTag, logStatusTags } from "./providers.js";
|
|
5
|
+
export { layout, formatTimestamp, formatTimestampMs, padRight, truncate } from "./layout.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tui/styles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACjH,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { colors, tuiColors } from "./colors.js";
|
|
2
|
+
export { borders, doubleBorders, treeChars, drawTopBorder, drawBottomBorder, drawSeparator } from "./borders.js";
|
|
3
|
+
export { statusIndicators, getStatusIndicator, spinnerFrames, getSpinnerFrame, dotsSpinnerFrames, circleSpinnerFrames, pulseFrames, breathFrames, progressMarkerFrames, progressGlowFrames, getPulseFrame, getBreathFrame, getProgressMarker, getProgressGlow } from "./indicators.js";
|
|
4
|
+
export { providerTags, getProviderTag, logStatusTags } from "./providers.js";
|
|
5
|
+
export { layout, formatTimestamp, formatTimestampMs, padRight, truncate } from "./layout.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tui/styles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACjH,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export declare const statusIndicators: {
|
|
2
|
+
online: {
|
|
3
|
+
icon: string;
|
|
4
|
+
color: string;
|
|
5
|
+
};
|
|
6
|
+
offline: {
|
|
7
|
+
icon: string;
|
|
8
|
+
color: string;
|
|
9
|
+
};
|
|
10
|
+
pending: {
|
|
11
|
+
icon: string;
|
|
12
|
+
color: string;
|
|
13
|
+
};
|
|
14
|
+
running: {
|
|
15
|
+
icon: string;
|
|
16
|
+
color: string;
|
|
17
|
+
};
|
|
18
|
+
loading: {
|
|
19
|
+
icon: string;
|
|
20
|
+
color: string;
|
|
21
|
+
};
|
|
22
|
+
queued: {
|
|
23
|
+
icon: string;
|
|
24
|
+
color: string;
|
|
25
|
+
};
|
|
26
|
+
done: {
|
|
27
|
+
icon: string;
|
|
28
|
+
color: string;
|
|
29
|
+
};
|
|
30
|
+
success: {
|
|
31
|
+
icon: string;
|
|
32
|
+
color: string;
|
|
33
|
+
};
|
|
34
|
+
error: {
|
|
35
|
+
icon: string;
|
|
36
|
+
color: string;
|
|
37
|
+
};
|
|
38
|
+
mutation: {
|
|
39
|
+
icon: string;
|
|
40
|
+
color: string;
|
|
41
|
+
};
|
|
42
|
+
checkpoint: {
|
|
43
|
+
icon: string;
|
|
44
|
+
color: string;
|
|
45
|
+
};
|
|
46
|
+
idle: {
|
|
47
|
+
icon: string;
|
|
48
|
+
color: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export declare function getStatusIndicator(status: string): {
|
|
52
|
+
icon: string;
|
|
53
|
+
color: string;
|
|
54
|
+
};
|
|
55
|
+
export declare const spinnerFrames: string[];
|
|
56
|
+
export declare const dotsSpinnerFrames: string[];
|
|
57
|
+
export declare const circleSpinnerFrames: string[];
|
|
58
|
+
export declare const pulseFrames: string[];
|
|
59
|
+
export declare const breathFrames: string[];
|
|
60
|
+
export declare const progressMarkerFrames: string[];
|
|
61
|
+
export declare const progressGlowFrames: string[];
|
|
62
|
+
export declare function getSpinnerFrame(tick: number, type?: "circle" | "dots" | "pulse"): string;
|
|
63
|
+
export declare function getPulseFrame(tick: number): string;
|
|
64
|
+
export declare function getBreathFrame(tick: number): string;
|
|
65
|
+
export declare function getProgressMarker(tick: number): string;
|
|
66
|
+
export declare function getProgressGlow(tick: number): string;
|
|
67
|
+
//# sourceMappingURL=indicators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicators.d.ts","sourceRoot":"","sources":["../../../src/tui/styles/indicators.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa5B,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAGlF;AAED,eAAO,MAAM,aAAa,UAAuB,CAAC;AAElD,eAAO,MAAM,iBAAiB,UAAqD,CAAC;AAEpF,eAAO,MAAM,mBAAmB,UAAuB,CAAC;AAExD,eAAO,MAAM,WAAW,UAAuB,CAAC;AAEhD,eAAO,MAAM,YAAY,UAA2C,CAAC;AAErE,eAAO,MAAM,oBAAoB,UAAuB,CAAC;AAEzD,eAAO,MAAM,kBAAkB,UAAuB,CAAC;AAEvD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,QAAQ,GAAG,MAAM,GAAG,OAAkB,GAAG,MAAM,CAGlG;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export const statusIndicators = {
|
|
2
|
+
online: { icon: "●", color: "#22c55e" },
|
|
3
|
+
offline: { icon: "○", color: "#71717a" },
|
|
4
|
+
pending: { icon: "○", color: "#71717a" },
|
|
5
|
+
running: { icon: "▶", color: "#f97316" },
|
|
6
|
+
loading: { icon: "◐", color: "#f59e0b" },
|
|
7
|
+
queued: { icon: "◐", color: "#f59e0b" },
|
|
8
|
+
done: { icon: "●", color: "#22c55e" },
|
|
9
|
+
success: { icon: "●", color: "#22c55e" },
|
|
10
|
+
error: { icon: "✗", color: "#ef4444" },
|
|
11
|
+
mutation: { icon: "◆", color: "#f59e0b" },
|
|
12
|
+
checkpoint: { icon: "■", color: "#f97316" },
|
|
13
|
+
idle: { icon: "○", color: "#71717a" },
|
|
14
|
+
};
|
|
15
|
+
export function getStatusIndicator(status) {
|
|
16
|
+
const normalized = status.toLowerCase();
|
|
17
|
+
return statusIndicators[normalized] || statusIndicators.pending;
|
|
18
|
+
}
|
|
19
|
+
export const spinnerFrames = ["◐", "◓", "◑", "◒"];
|
|
20
|
+
export const dotsSpinnerFrames = ["⠋", "⠙", "⠹", "⠸", "⼸", "⠴", "⠦", "⠧", "⠇", "⠏"];
|
|
21
|
+
export const circleSpinnerFrames = ["◐", "◓", "◑", "◒"];
|
|
22
|
+
export const pulseFrames = ["●", "◐", "○", "◐"];
|
|
23
|
+
export const breathFrames = ["●", "●", "◐", "◐", "○", "○", "◐", "◐"];
|
|
24
|
+
export const progressMarkerFrames = ["▶", "▸", "▶", "▸"];
|
|
25
|
+
export const progressGlowFrames = ["█", "▓", "█", "▓"];
|
|
26
|
+
export function getSpinnerFrame(tick, type = "circle") {
|
|
27
|
+
const frames = type === "dots" ? dotsSpinnerFrames : type === "pulse" ? pulseFrames : circleSpinnerFrames;
|
|
28
|
+
return frames[tick % frames.length];
|
|
29
|
+
}
|
|
30
|
+
export function getPulseFrame(tick) {
|
|
31
|
+
return pulseFrames[tick % pulseFrames.length];
|
|
32
|
+
}
|
|
33
|
+
export function getBreathFrame(tick) {
|
|
34
|
+
return breathFrames[tick % breathFrames.length];
|
|
35
|
+
}
|
|
36
|
+
export function getProgressMarker(tick) {
|
|
37
|
+
return progressMarkerFrames[tick % progressMarkerFrames.length];
|
|
38
|
+
}
|
|
39
|
+
export function getProgressGlow(tick) {
|
|
40
|
+
return progressGlowFrames[tick % progressGlowFrames.length];
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=indicators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicators.js","sourceRoot":"","sources":["../../../src/tui/styles/indicators.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;IACvC,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;IACxC,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;IACxC,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;IACxC,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;IACxC,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;IACvC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAA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GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAEzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAEvD,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,OAAoC,QAAQ;IACxF,MAAM,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC;IAC1G,OAAO,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,WAAW,CAAC,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,YAAY,CAAC,IAAI,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,oBAAoB,CAAC,IAAI,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,kBAAkB,CAAC,IAAI,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const layout: {
|
|
2
|
+
defaultWidth: number;
|
|
3
|
+
panelWidth: {
|
|
4
|
+
chat: number;
|
|
5
|
+
dag: number;
|
|
6
|
+
status: number;
|
|
7
|
+
logs: number;
|
|
8
|
+
metrics: number;
|
|
9
|
+
memory: number;
|
|
10
|
+
};
|
|
11
|
+
padding: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
progressWidth: number;
|
|
16
|
+
};
|
|
17
|
+
export declare function formatTimestamp(date: Date): string;
|
|
18
|
+
export declare function formatTimestampMs(date: Date): string;
|
|
19
|
+
export declare function padRight(text: string, width: number): string;
|
|
20
|
+
export declare function truncate(text: string, maxLength: number): string;
|
|
21
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/tui/styles/layout.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;CAelB,CAAC;AAEF,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAMlD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAQpD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAG5D;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAGhE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export const layout = {
|
|
2
|
+
defaultWidth: 80,
|
|
3
|
+
panelWidth: {
|
|
4
|
+
chat: 40,
|
|
5
|
+
dag: 38,
|
|
6
|
+
status: 28,
|
|
7
|
+
logs: 32,
|
|
8
|
+
metrics: 28,
|
|
9
|
+
memory: 30,
|
|
10
|
+
},
|
|
11
|
+
padding: {
|
|
12
|
+
x: 1,
|
|
13
|
+
y: 0,
|
|
14
|
+
},
|
|
15
|
+
progressWidth: 16,
|
|
16
|
+
};
|
|
17
|
+
export function formatTimestamp(date) {
|
|
18
|
+
return date.toLocaleTimeString("fr-FR", {
|
|
19
|
+
hour: "2-digit",
|
|
20
|
+
minute: "2-digit",
|
|
21
|
+
second: "2-digit",
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export function formatTimestampMs(date) {
|
|
25
|
+
const time = date.toLocaleTimeString("fr-FR", {
|
|
26
|
+
hour: "2-digit",
|
|
27
|
+
minute: "2-digit",
|
|
28
|
+
second: "2-digit",
|
|
29
|
+
});
|
|
30
|
+
const ms = String(date.getMilliseconds()).padStart(3, "0");
|
|
31
|
+
return `${time}.${ms}`;
|
|
32
|
+
}
|
|
33
|
+
export function padRight(text, width) {
|
|
34
|
+
const padding = Math.max(0, width - text.length);
|
|
35
|
+
return text + " ".repeat(padding);
|
|
36
|
+
}
|
|
37
|
+
export function truncate(text, maxLength) {
|
|
38
|
+
if (text.length <= maxLength)
|
|
39
|
+
return text;
|
|
40
|
+
return text.slice(0, maxLength - 3) + "...";
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/tui/styles/layout.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,YAAY,EAAE,EAAE;IAChB,UAAU,EAAE;QACV,IAAI,EAAE,EAAE;QACR,GAAG,EAAE,EAAE;QACP,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,EAAE;QACR,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,EAAE;KACX;IACD,OAAO,EAAE;QACP,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;KACL;IACD,aAAa,EAAE,EAAE;CAClB,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,IAAU;IACxC,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE;QACtC,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAU;IAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE;QAC5C,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;IACH,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,OAAO,GAAG,IAAI,IAAI,EAAE,EAAE,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,KAAa;IAClD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,SAAiB;IACtD,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS;QAAE,OAAO,IAAI,CAAC;IAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export declare const providerTags: {
|
|
2
|
+
host: {
|
|
3
|
+
code: string;
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
claude: {
|
|
7
|
+
code: string;
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
opencode: {
|
|
11
|
+
code: string;
|
|
12
|
+
name: string;
|
|
13
|
+
};
|
|
14
|
+
kilo: {
|
|
15
|
+
code: string;
|
|
16
|
+
name: string;
|
|
17
|
+
};
|
|
18
|
+
anthropic: {
|
|
19
|
+
code: string;
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
gemini: {
|
|
23
|
+
code: string;
|
|
24
|
+
name: string;
|
|
25
|
+
};
|
|
26
|
+
mistral: {
|
|
27
|
+
code: string;
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
groq: {
|
|
31
|
+
code: string;
|
|
32
|
+
name: string;
|
|
33
|
+
};
|
|
34
|
+
openai: {
|
|
35
|
+
code: string;
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare function getProviderTag(provider: string): {
|
|
40
|
+
code: string;
|
|
41
|
+
name: string;
|
|
42
|
+
};
|
|
43
|
+
export declare const logStatusTags: {
|
|
44
|
+
run: {
|
|
45
|
+
tag: string;
|
|
46
|
+
color: string;
|
|
47
|
+
};
|
|
48
|
+
success: {
|
|
49
|
+
tag: string;
|
|
50
|
+
color: string;
|
|
51
|
+
};
|
|
52
|
+
warn: {
|
|
53
|
+
tag: string;
|
|
54
|
+
color: string;
|
|
55
|
+
};
|
|
56
|
+
error: {
|
|
57
|
+
tag: string;
|
|
58
|
+
color: string;
|
|
59
|
+
};
|
|
60
|
+
info: {
|
|
61
|
+
tag: string;
|
|
62
|
+
color: string;
|
|
63
|
+
};
|
|
64
|
+
mutate: {
|
|
65
|
+
tag: string;
|
|
66
|
+
color: string;
|
|
67
|
+
};
|
|
68
|
+
done: {
|
|
69
|
+
tag: string;
|
|
70
|
+
color: string;
|
|
71
|
+
};
|
|
72
|
+
start: {
|
|
73
|
+
tag: string;
|
|
74
|
+
color: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../src/tui/styles/providers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUxB,CAAC;AAEF,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAQ/E;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASzB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const providerTags = {
|
|
2
|
+
host: { code: "[H]", name: "Host-Native" },
|
|
3
|
+
claude: { code: "[C]", name: "Claude Code" },
|
|
4
|
+
opencode: { code: "[O]", name: "OpenCode" },
|
|
5
|
+
kilo: { code: "[K]", name: "Kilo" },
|
|
6
|
+
anthropic: { code: "[A]", name: "Anthropic API" },
|
|
7
|
+
gemini: { code: "[G]", name: "Gemini" },
|
|
8
|
+
mistral: { code: "[M]", name: "Mistral" },
|
|
9
|
+
groq: { code: "[Q]", name: "Groq" },
|
|
10
|
+
openai: { code: "[O]", name: "OpenAI" },
|
|
11
|
+
};
|
|
12
|
+
export function getProviderTag(provider) {
|
|
13
|
+
const normalized = provider.toLowerCase().replace(/[-_\s]/g, "");
|
|
14
|
+
for (const [key, value] of Object.entries(providerTags)) {
|
|
15
|
+
if (normalized.includes(key)) {
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return { code: "[?]", name: provider };
|
|
20
|
+
}
|
|
21
|
+
export const logStatusTags = {
|
|
22
|
+
run: { tag: "[RUN]", color: "#f97316" },
|
|
23
|
+
success: { tag: "[SUCCESS]", color: "#22c55e" },
|
|
24
|
+
warn: { tag: "[WARN]", color: "#f59e0b" },
|
|
25
|
+
error: { tag: "[ERROR]", color: "#ef4444" },
|
|
26
|
+
info: { tag: "[INFO]", color: "#a1a1aa" },
|
|
27
|
+
mutate: { tag: "[MUTATE]", color: "#f59e0b" },
|
|
28
|
+
done: { tag: "[DONE]", color: "#22c55e" },
|
|
29
|
+
start: { tag: "[START]", color: "#f97316" },
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=providers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../src/tui/styles/providers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,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