@evalops/maestro 0.10.8 → 0.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/agent/action-approval.d.ts +6 -0
- package/dist/agent/action-approval.d.ts.map +1 -1
- package/dist/agent/action-approval.js.map +1 -1
- package/dist/agent/agent.d.ts +13 -1
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.js +368 -1
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/auto-compaction.d.ts +4 -4
- package/dist/agent/auto-compaction.d.ts.map +1 -1
- package/dist/agent/auto-compaction.js.map +1 -1
- package/dist/agent/compaction-cleanup.d.ts +2 -0
- package/dist/agent/compaction-cleanup.d.ts.map +1 -1
- package/dist/agent/compaction-cleanup.js +17 -2
- package/dist/agent/compaction-cleanup.js.map +1 -1
- package/dist/agent/compaction.d.ts +3 -1
- package/dist/agent/compaction.d.ts.map +1 -1
- package/dist/agent/compaction.js +10 -2
- package/dist/agent/compaction.js.map +1 -1
- package/dist/agent/context-manager.d.ts +4 -0
- package/dist/agent/context-manager.d.ts.map +1 -1
- package/dist/agent/context-manager.js +8 -0
- package/dist/agent/context-manager.js.map +1 -1
- package/dist/agent/context-providers.d.ts +2 -0
- package/dist/agent/context-providers.d.ts.map +1 -1
- package/dist/agent/context-providers.js +3 -2
- package/dist/agent/context-providers.js.map +1 -1
- package/dist/agent/providers/google-gemini-cli.js +17 -5
- package/dist/agent/providers/google.js +174 -144
- package/dist/agent/providers/openai-codex-responses.d.ts +4 -0
- package/dist/agent/providers/openai-codex-responses.d.ts.map +1 -0
- package/dist/agent/providers/openai-codex-responses.js +637 -0
- package/dist/agent/providers/openai-codex-responses.js.map +1 -0
- package/dist/agent/providers/openai-codex-session.d.ts +18 -0
- package/dist/agent/providers/openai-codex-session.d.ts.map +1 -0
- package/dist/agent/providers/openai-codex-session.js +53 -0
- package/dist/agent/providers/openai-codex-session.js.map +1 -0
- package/dist/agent/providers/openai-responses-sdk.d.ts.map +1 -1
- package/dist/agent/providers/openai-responses-sdk.js +16 -6
- package/dist/agent/providers/openai-responses-sdk.js.map +1 -1
- package/dist/agent/providers/openai-shared.d.ts +12 -5
- package/dist/agent/providers/openai-shared.d.ts.map +1 -1
- package/dist/agent/providers/openai-shared.js +291 -2
- package/dist/agent/providers/openai-shared.js.map +1 -1
- package/dist/agent/providers/openai.d.ts +1 -1
- package/dist/agent/providers/openai.d.ts.map +1 -1
- package/dist/agent/providers/openai.js +48 -20
- package/dist/agent/providers/openai.js.map +1 -1
- package/dist/agent/providers/vertex.js +7 -0
- package/dist/agent/tracing.d.ts +16 -5
- package/dist/agent/tracing.d.ts.map +1 -1
- package/dist/agent/tracing.js +44 -2
- package/dist/agent/tracing.js.map +1 -1
- package/dist/agent/transport/create-provider-stream.d.ts.map +1 -1
- package/dist/agent/transport/create-provider-stream.js +9 -0
- package/dist/agent/transport/create-provider-stream.js.map +1 -1
- package/dist/agent/transport/tool-execution-bridge.d.ts +86 -0
- package/dist/agent/transport/tool-execution-bridge.d.ts.map +1 -0
- package/dist/agent/transport/tool-execution-bridge.js +665 -0
- package/dist/agent/transport/tool-execution-bridge.js.map +1 -0
- package/dist/agent/transport/tool-execution.d.ts +3 -0
- package/dist/agent/transport/tool-execution.d.ts.map +1 -1
- package/dist/agent/transport/tool-execution.js +16 -1
- package/dist/agent/transport/tool-execution.js.map +1 -1
- package/dist/agent/transport/tool-safety-pipeline.d.ts +7 -1
- package/dist/agent/transport/tool-safety-pipeline.d.ts.map +1 -1
- package/dist/agent/transport/tool-safety-pipeline.js +207 -40
- package/dist/agent/transport/tool-safety-pipeline.js.map +1 -1
- package/dist/agent/transport/tool-update-queue.d.ts +2 -0
- package/dist/agent/transport/tool-update-queue.d.ts.map +1 -1
- package/dist/agent/transport/tool-update-queue.js.map +1 -1
- package/dist/agent/transport.d.ts +3 -0
- package/dist/agent/transport.d.ts.map +1 -1
- package/dist/agent/transport.js +96 -16
- package/dist/agent/transport.js.map +1 -1
- package/dist/agent/types.d.ts +50 -2
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/approvals/platform-action-approval.d.ts +32 -0
- package/dist/approvals/platform-action-approval.d.ts.map +1 -0
- package/dist/approvals/platform-action-approval.js +210 -0
- package/dist/approvals/platform-action-approval.js.map +1 -0
- package/dist/approvals/service-client.d.ts +56 -0
- package/dist/approvals/service-client.d.ts.map +1 -0
- package/dist/approvals/service-client.js +316 -0
- package/dist/approvals/service-client.js.map +1 -0
- package/dist/audit/logger.d.ts +4 -4
- package/dist/bootstrap/auth-setup.d.ts +2 -2
- package/dist/bootstrap/auth-setup.d.ts.map +1 -1
- package/dist/bootstrap/auth-setup.js +4 -7
- package/dist/bootstrap/auth-setup.js.map +1 -1
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +29 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/commands/codex.d.ts +2 -0
- package/dist/cli/commands/codex.d.ts.map +1 -0
- package/dist/cli/commands/codex.js +65 -0
- package/dist/cli/commands/codex.js.map +1 -0
- package/dist/cli/commands/config.js +1 -1
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/evalops.d.ts +2 -0
- package/dist/cli/commands/evalops.d.ts.map +1 -0
- package/dist/cli/commands/evalops.js +74 -0
- package/dist/cli/commands/evalops.js.map +1 -0
- package/dist/cli/commands/hosted-runner.d.ts +23 -0
- package/dist/cli/commands/hosted-runner.d.ts.map +1 -0
- package/dist/cli/commands/hosted-runner.js +241 -0
- package/dist/cli/commands/hosted-runner.js.map +1 -0
- package/dist/cli/commands/init.d.ts +4 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +140 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/memory.d.ts.map +1 -1
- package/dist/cli/commands/memory.js +23 -30
- package/dist/cli/commands/memory.js.map +1 -1
- package/dist/cli/commands/remote.d.ts +3 -0
- package/dist/cli/commands/remote.d.ts.map +1 -0
- package/dist/cli/commands/remote.js +631 -0
- package/dist/cli/commands/remote.js.map +1 -0
- package/dist/cli/commands/stats.d.ts +7 -0
- package/dist/cli/commands/stats.d.ts.map +1 -0
- package/dist/cli/commands/stats.js +167 -0
- package/dist/cli/commands/stats.js.map +1 -0
- package/dist/cli/headless-protocol.d.ts +16 -1
- package/dist/cli/headless-protocol.d.ts.map +1 -1
- package/dist/cli/headless-protocol.js +60 -4
- package/dist/cli/headless-protocol.js.map +1 -1
- package/dist/cli/headless.d.ts.map +1 -1
- package/dist/cli/headless.js +1 -0
- package/dist/cli/headless.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +44 -1
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/jsonl-writer.d.ts.map +1 -1
- package/dist/cli/jsonl-writer.js +19 -6
- package/dist/cli/jsonl-writer.js.map +1 -1
- package/dist/cli-tui/client-tools/client-tool-controller.d.ts.map +1 -1
- package/dist/cli-tui/client-tools/client-tool-controller.js +17 -1
- package/dist/cli-tui/client-tools/client-tool-controller.js.map +1 -1
- package/dist/cli-tui/commands/access-command.js +1 -1
- package/dist/cli-tui/commands/access-command.js.map +1 -1
- package/dist/cli-tui/commands/audit-command.js +1 -1
- package/dist/cli-tui/commands/audit-command.js.map +1 -1
- package/dist/cli-tui/commands/command-catalog.d.ts +29 -0
- package/dist/cli-tui/commands/command-catalog.d.ts.map +1 -0
- package/dist/cli-tui/commands/command-catalog.js +645 -0
- package/dist/cli-tui/commands/command-catalog.js.map +1 -0
- package/dist/cli-tui/commands/command-registry-adapter.d.ts +12 -0
- package/dist/cli-tui/commands/command-registry-adapter.d.ts.map +1 -0
- package/dist/cli-tui/commands/command-registry-adapter.js +120 -0
- package/dist/cli-tui/commands/command-registry-adapter.js.map +1 -0
- package/dist/cli-tui/commands/command-suite-catalog.d.ts +14 -0
- package/dist/cli-tui/commands/command-suite-catalog.d.ts.map +1 -0
- package/dist/cli-tui/commands/command-suite-catalog.js +147 -0
- package/dist/cli-tui/commands/command-suite-catalog.js.map +1 -0
- package/dist/cli-tui/commands/{grouped-command-handlers.d.ts → command-suite-handlers.d.ts} +27 -26
- package/dist/cli-tui/commands/command-suite-handlers.d.ts.map +1 -0
- package/dist/cli-tui/commands/command-suite-handlers.js +110 -0
- package/dist/cli-tui/commands/command-suite-handlers.js.map +1 -0
- package/dist/cli-tui/commands/hotkeys-command.d.ts +1 -1
- package/dist/cli-tui/commands/hotkeys-command.d.ts.map +1 -1
- package/dist/cli-tui/commands/hotkeys-command.js +2 -2
- package/dist/cli-tui/commands/hotkeys-command.js.map +1 -1
- package/dist/cli-tui/commands/limits-command.js +1 -1
- package/dist/cli-tui/commands/limits-command.js.map +1 -1
- package/dist/cli-tui/commands/pii-command.js +1 -1
- package/dist/cli-tui/commands/pii-command.js.map +1 -1
- package/dist/cli-tui/commands/registry.d.ts +1 -1
- package/dist/cli-tui/commands/registry.d.ts.map +1 -1
- package/dist/cli-tui/commands/registry.js +29 -921
- package/dist/cli-tui/commands/registry.js.map +1 -1
- package/dist/cli-tui/commands/{grouped → subcommands}/auth-commands.d.ts +2 -1
- package/dist/cli-tui/commands/subcommands/auth-commands.d.ts.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/auth-commands.js +22 -6
- package/dist/cli-tui/commands/subcommands/auth-commands.js.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/config-commands.d.ts +0 -1
- package/dist/cli-tui/commands/subcommands/config-commands.d.ts.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/config-commands.js +2 -2
- package/dist/cli-tui/commands/subcommands/config-commands.js.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/diag-commands.d.ts +1 -2
- package/dist/cli-tui/commands/subcommands/diag-commands.d.ts.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/diag-commands.js +5 -7
- package/dist/cli-tui/commands/subcommands/diag-commands.js.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/git-commands.d.ts +0 -2
- package/dist/cli-tui/commands/subcommands/git-commands.d.ts.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/git-commands.js +2 -2
- package/dist/cli-tui/commands/subcommands/git-commands.js.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/index.d.ts +2 -2
- package/dist/cli-tui/commands/subcommands/index.d.ts.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/index.js +2 -2
- package/dist/cli-tui/commands/subcommands/index.js.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/safety-commands.d.ts +0 -1
- package/dist/cli-tui/commands/subcommands/safety-commands.d.ts.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/safety-commands.js +12 -12
- package/dist/cli-tui/commands/subcommands/safety-commands.js.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/session-commands.d.ts +1 -2
- package/dist/cli-tui/commands/subcommands/session-commands.d.ts.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/session-commands.js +3 -3
- package/dist/cli-tui/commands/subcommands/session-commands.js.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/tools-commands.d.ts +0 -1
- package/dist/cli-tui/commands/subcommands/tools-commands.d.ts.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/tools-commands.js +2 -2
- package/dist/cli-tui/commands/subcommands/tools-commands.js.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/ui-commands.d.ts +0 -1
- package/dist/cli-tui/commands/subcommands/ui-commands.d.ts.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/ui-commands.js +5 -5
- package/dist/cli-tui/commands/subcommands/ui-commands.js.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/undo-commands.d.ts +1 -2
- package/dist/cli-tui/commands/subcommands/undo-commands.d.ts.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/undo-commands.js +6 -6
- package/dist/cli-tui/commands/subcommands/undo-commands.js.map +1 -0
- package/dist/cli-tui/commands/subcommands/usage-commands.d.ts.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/usage-commands.js +2 -2
- package/dist/cli-tui/commands/subcommands/usage-commands.js.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/utils.d.ts +15 -15
- package/dist/cli-tui/commands/subcommands/utils.d.ts.map +1 -0
- package/dist/cli-tui/commands/{grouped → subcommands}/utils.js +13 -8
- package/dist/cli-tui/commands/subcommands/utils.js.map +1 -0
- package/dist/cli-tui/commands/types.d.ts +3 -3
- package/dist/cli-tui/commands/types.d.ts.map +1 -1
- package/dist/cli-tui/commands/types.js.map +1 -1
- package/dist/cli-tui/editor-view.d.ts +1 -1
- package/dist/cli-tui/editor-view.d.ts.map +1 -1
- package/dist/cli-tui/editor-view.js +1 -1
- package/dist/cli-tui/editor-view.js.map +1 -1
- package/dist/cli-tui/oauth/oauth-flow-controller.d.ts +4 -0
- package/dist/cli-tui/oauth/oauth-flow-controller.d.ts.map +1 -1
- package/dist/cli-tui/oauth/oauth-flow-controller.js +76 -5
- package/dist/cli-tui/oauth/oauth-flow-controller.js.map +1 -1
- package/dist/cli-tui/run/run-controller.d.ts +2 -2
- package/dist/cli-tui/run/run-controller.d.ts.map +1 -1
- package/dist/cli-tui/run/run-controller.js +3 -2
- package/dist/cli-tui/run/run-controller.js.map +1 -1
- package/dist/cli-tui/run/run-shell-command.d.ts.map +1 -1
- package/dist/cli-tui/run/run-shell-command.js +11 -3
- package/dist/cli-tui/run/run-shell-command.js.map +1 -1
- package/dist/cli-tui/run/streaming-shell-command.d.ts.map +1 -1
- package/dist/cli-tui/run/streaming-shell-command.js +11 -3
- package/dist/cli-tui/run/streaming-shell-command.js.map +1 -1
- package/dist/cli-tui/selectors/model-selector.d.ts.map +1 -1
- package/dist/cli-tui/selectors/model-selector.js +1 -0
- package/dist/cli-tui/selectors/model-selector.js.map +1 -1
- package/dist/cli-tui/tui-renderer/agent-event-bridge.d.ts +8 -0
- package/dist/cli-tui/tui-renderer/agent-event-bridge.d.ts.map +1 -1
- package/dist/cli-tui/tui-renderer/agent-event-bridge.js +23 -2
- package/dist/cli-tui/tui-renderer/agent-event-bridge.js.map +1 -1
- package/dist/cli-tui/tui-renderer/command-registry-options.d.ts +3 -3
- package/dist/cli-tui/tui-renderer/command-registry-options.d.ts.map +1 -1
- package/dist/cli-tui/tui-renderer/command-registry-options.js +12 -2
- package/dist/cli-tui/tui-renderer/command-registry-options.js.map +1 -1
- package/dist/cli-tui/tui-renderer/command-suite-wiring.d.ts +32 -0
- package/dist/cli-tui/tui-renderer/command-suite-wiring.d.ts.map +1 -0
- package/dist/cli-tui/tui-renderer/command-suite-wiring.js +108 -0
- package/dist/cli-tui/tui-renderer/command-suite-wiring.js.map +1 -0
- package/dist/cli-tui/tui-renderer/input-controller.d.ts +2 -2
- package/dist/cli-tui/tui-renderer/input-controller.d.ts.map +1 -1
- package/dist/cli-tui/tui-renderer/input-controller.js +2 -2
- package/dist/cli-tui/tui-renderer/input-controller.js.map +1 -1
- package/dist/cli-tui/tui-renderer/ui-state-controller.d.ts +1 -1
- package/dist/cli-tui/tui-renderer/ui-state-controller.js +1 -1
- package/dist/cli-tui/tui-renderer/ui-state-controller.js.map +1 -1
- package/dist/cli-tui/tui-renderer.d.ts +1 -3
- package/dist/cli-tui/tui-renderer.d.ts.map +1 -1
- package/dist/cli-tui/tui-renderer.js +37 -83
- package/dist/cli-tui/tui-renderer.js.map +1 -1
- package/dist/cli-tui/utils/runtime-badges.d.ts +8 -0
- package/dist/cli-tui/utils/runtime-badges.d.ts.map +1 -1
- package/dist/cli-tui/utils/runtime-badges.js +58 -0
- package/dist/cli-tui/utils/runtime-badges.js.map +1 -1
- package/dist/cli.js +42555 -23133
- package/dist/cli.js.map +1 -1
- package/dist/config/env-vars.d.ts +4 -0
- package/dist/config/env-vars.d.ts.map +1 -1
- package/dist/config/env-vars.js +4 -0
- package/dist/config/env-vars.js.map +1 -1
- package/dist/config/feature-flags.d.ts +44 -0
- package/dist/config/feature-flags.d.ts.map +1 -1
- package/dist/config/feature-flags.js +214 -0
- package/dist/config/feature-flags.js.map +1 -1
- package/dist/connectors/service-client.d.ts +98 -0
- package/dist/connectors/service-client.d.ts.map +1 -0
- package/dist/connectors/service-client.js +459 -0
- package/dist/connectors/service-client.js.map +1 -0
- package/dist/conversation/render-model.d.ts.map +1 -1
- package/dist/conversation/render-model.js +53 -3
- package/dist/conversation/render-model.js.map +1 -1
- package/dist/db/health.d.ts +8 -0
- package/dist/db/health.d.ts.map +1 -0
- package/dist/db/health.js +64 -0
- package/dist/db/health.js.map +1 -0
- package/dist/db/migrate.d.ts +301 -0
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/migrate.js +186 -0
- package/dist/db/migrate.js.map +1 -1
- package/dist/db/migrations/0000_initial.sql +308 -0
- package/dist/db/migrations/0001_shared_sessions.sql +18 -0
- package/dist/db/migrations/0002_usage_metrics.sql +28 -0
- package/dist/db/migrations/0003_execution_traces.sql +18 -0
- package/dist/db/migrations/0004_workspace_config.sql +11 -0
- package/dist/db/migrations/0005_revenue_attribution.sql +31 -0
- package/dist/db/migrations/0006_hosted_session_storage.sql +51 -0
- package/dist/db/migrations/0007_reconcile_legacy_audit_hash_cache.sql +24 -0
- package/dist/db/migrations/0008_reconcile_legacy_webhook_deliveries.sql +290 -0
- package/dist/db/migrations/meta/0000_snapshot.json +2438 -0
- package/dist/db/migrations/meta/_journal.json +69 -0
- package/dist/db/schema.d.ts +2232 -844
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/schema.js +187 -1
- package/dist/db/schema.js.map +1 -1
- package/dist/evalops/agent-bootstrap.d.ts +73 -0
- package/dist/evalops/agent-bootstrap.d.ts.map +1 -0
- package/dist/evalops/agent-bootstrap.js +380 -0
- package/dist/evalops/agent-bootstrap.js.map +1 -0
- package/dist/export-html.d.ts.map +1 -1
- package/dist/export-html.js +7 -4
- package/dist/export-html.js.map +1 -1
- package/dist/headless/utility-command-manager.d.ts +2 -1
- package/dist/headless/utility-command-manager.d.ts.map +1 -1
- package/dist/headless/utility-command-manager.js +12 -6
- package/dist/headless/utility-command-manager.js.map +1 -1
- package/dist/headless/utility-file-read.d.ts +1 -0
- package/dist/headless/utility-file-read.d.ts.map +1 -1
- package/dist/headless/utility-file-read.js +5 -1
- package/dist/headless/utility-file-read.js.map +1 -1
- package/dist/headless/utility-file-search.d.ts +1 -0
- package/dist/headless/utility-file-search.d.ts.map +1 -1
- package/dist/headless/utility-file-search.js +4 -1
- package/dist/headless/utility-file-search.js.map +1 -1
- package/dist/headless/utility-file-watch-manager.d.ts +2 -1
- package/dist/headless/utility-file-watch-manager.d.ts.map +1 -1
- package/dist/headless/utility-file-watch-manager.js +6 -2
- package/dist/headless/utility-file-watch-manager.js.map +1 -1
- package/dist/headless/workspace-root.d.ts +8 -0
- package/dist/headless/workspace-root.d.ts.map +1 -0
- package/dist/headless/workspace-root.js +74 -0
- package/dist/headless/workspace-root.js.map +1 -0
- package/dist/hooks/notification-hooks.d.ts +5 -0
- package/dist/hooks/notification-hooks.d.ts.map +1 -1
- package/dist/hooks/notification-hooks.js +4 -0
- package/dist/hooks/notification-hooks.js.map +1 -1
- package/dist/lsp/diagnostic-deltas.d.ts +20 -0
- package/dist/lsp/diagnostic-deltas.d.ts.map +1 -0
- package/dist/lsp/diagnostic-deltas.js +92 -0
- package/dist/lsp/diagnostic-deltas.js.map +1 -0
- package/dist/lsp/diagnostic-repair.d.ts +48 -0
- package/dist/lsp/diagnostic-repair.d.ts.map +1 -0
- package/dist/lsp/diagnostic-repair.js +143 -0
- package/dist/lsp/diagnostic-repair.js.map +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +127 -37
- package/dist/main.js.map +1 -1
- package/dist/mcp/config.d.ts +4 -2
- package/dist/mcp/config.d.ts.map +1 -1
- package/dist/mcp/config.js +58 -14
- package/dist/mcp/config.js.map +1 -1
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/manager.d.ts +1 -0
- package/dist/mcp/manager.d.ts.map +1 -1
- package/dist/mcp/manager.js +1 -0
- package/dist/mcp/manager.js.map +1 -1
- package/dist/mcp/platform-plugin.d.ts +3 -0
- package/dist/mcp/platform-plugin.d.ts.map +1 -0
- package/dist/mcp/platform-plugin.js +117 -0
- package/dist/mcp/platform-plugin.js.map +1 -0
- package/dist/mcp/tool-bridge.d.ts +15 -0
- package/dist/mcp/tool-bridge.d.ts.map +1 -1
- package/dist/mcp/tool-bridge.js +194 -6
- package/dist/mcp/tool-bridge.js.map +1 -1
- package/dist/memory/platform-memory-client.d.ts +130 -0
- package/dist/memory/platform-memory-client.d.ts.map +1 -0
- package/dist/memory/platform-memory-client.js +330 -0
- package/dist/memory/platform-memory-client.js.map +1 -0
- package/dist/memory/service-client.d.ts.map +1 -1
- package/dist/memory/service-client.js +1 -2
- package/dist/memory/service-client.js.map +1 -1
- package/dist/models/builtin.d.ts.map +1 -1
- package/dist/models/builtin.js +137 -0
- package/dist/models/builtin.js.map +1 -1
- package/dist/models/config-loader.d.ts +10 -10
- package/dist/models/config-loader.d.ts.map +1 -1
- package/dist/models/config-loader.js +1 -0
- package/dist/models/config-loader.js.map +1 -1
- package/dist/models/registry.d.ts +1 -0
- package/dist/models/registry.d.ts.map +1 -1
- package/dist/models/registry.js +1 -0
- package/dist/models/registry.js.map +1 -1
- package/dist/oauth/connectors.d.ts +25 -0
- package/dist/oauth/connectors.d.ts.map +1 -0
- package/dist/oauth/connectors.js +253 -0
- package/dist/oauth/connectors.js.map +1 -0
- package/dist/oauth/device-identity.d.ts +18 -0
- package/dist/oauth/device-identity.d.ts.map +1 -0
- package/dist/oauth/device-identity.js +193 -0
- package/dist/oauth/device-identity.js.map +1 -0
- package/dist/oauth/evalops.d.ts.map +1 -1
- package/dist/oauth/evalops.js +74 -15
- package/dist/oauth/evalops.js.map +1 -1
- package/dist/oauth/index.d.ts +1 -1
- package/dist/oauth/index.d.ts.map +1 -1
- package/dist/oauth/index.js +31 -1
- package/dist/oauth/index.js.map +1 -1
- package/dist/oauth/openai-codex.d.ts +16 -0
- package/dist/oauth/openai-codex.d.ts.map +1 -0
- package/dist/oauth/openai-codex.js +300 -0
- package/dist/oauth/openai-codex.js.map +1 -0
- package/dist/opentelemetry.d.ts.map +1 -1
- package/dist/opentelemetry.js +9 -2
- package/dist/opentelemetry.js.map +1 -1
- package/dist/platform/agent-runtime-client.d.ts +279 -0
- package/dist/platform/agent-runtime-client.d.ts.map +1 -0
- package/dist/platform/agent-runtime-client.js +515 -0
- package/dist/platform/agent-runtime-client.js.map +1 -0
- package/dist/platform/cerebro-facts-client.d.ts +56 -0
- package/dist/platform/cerebro-facts-client.d.ts.map +1 -0
- package/dist/platform/cerebro-facts-client.js +297 -0
- package/dist/platform/cerebro-facts-client.js.map +1 -0
- package/dist/platform/client.d.ts +2 -1
- package/dist/platform/client.d.ts.map +1 -1
- package/dist/platform/client.js +9 -26
- package/dist/platform/client.js.map +1 -1
- package/dist/platform/core-services.d.ts +128 -0
- package/dist/platform/core-services.d.ts.map +1 -1
- package/dist/platform/core-services.js +128 -0
- package/dist/platform/core-services.js.map +1 -1
- package/dist/platform/maestro-timeline-client.d.ts +22 -0
- package/dist/platform/maestro-timeline-client.d.ts.map +1 -0
- package/dist/platform/maestro-timeline-client.js +373 -0
- package/dist/platform/maestro-timeline-client.js.map +1 -0
- package/dist/platform/tool-execution-client.d.ts +104 -0
- package/dist/platform/tool-execution-client.d.ts.map +1 -0
- package/dist/platform/tool-execution-client.js +284 -0
- package/dist/platform/tool-execution-client.js.map +1 -0
- package/dist/prompts/service-client.d.ts.map +1 -1
- package/dist/prompts/service-client.js +5 -2
- package/dist/prompts/service-client.js.map +1 -1
- package/dist/providers/anthropic-auth.d.ts.map +1 -1
- package/dist/providers/anthropic-auth.js +8 -6
- package/dist/providers/anthropic-auth.js.map +1 -1
- package/dist/providers/api-keys.d.ts +1 -0
- package/dist/providers/api-keys.d.ts.map +1 -1
- package/dist/providers/api-keys.js +5 -0
- package/dist/providers/api-keys.js.map +1 -1
- package/dist/providers/auth.d.ts +2 -1
- package/dist/providers/auth.d.ts.map +1 -1
- package/dist/providers/auth.js +26 -3
- package/dist/providers/auth.js.map +1 -1
- package/dist/remote-runner/attach-client.d.ts +41 -0
- package/dist/remote-runner/attach-client.d.ts.map +1 -0
- package/dist/remote-runner/attach-client.js +692 -0
- package/dist/remote-runner/attach-client.js.map +1 -0
- package/dist/remote-runner/client.d.ts +205 -0
- package/dist/remote-runner/client.d.ts.map +1 -0
- package/dist/remote-runner/client.js +633 -0
- package/dist/remote-runner/client.js.map +1 -0
- package/dist/safety/action-firewall.d.ts +6 -1
- package/dist/safety/action-firewall.d.ts.map +1 -1
- package/dist/safety/action-firewall.js +62 -26
- package/dist/safety/action-firewall.js.map +1 -1
- package/dist/safety/governance-service-client.d.ts +36 -0
- package/dist/safety/governance-service-client.d.ts.map +1 -0
- package/dist/safety/governance-service-client.js +279 -0
- package/dist/safety/governance-service-client.js.map +1 -0
- package/dist/safety/policy.d.ts +13 -2
- package/dist/safety/policy.d.ts.map +1 -1
- package/dist/safety/policy.js +474 -52
- package/dist/safety/policy.js.map +1 -1
- package/dist/sdk-tools.d.ts +21 -0
- package/dist/sdk-tools.d.ts.map +1 -1
- package/dist/sdk-tools.js +16 -0
- package/dist/sdk-tools.js.map +1 -1
- package/dist/server/app-context.d.ts +25 -0
- package/dist/server/app-context.d.ts.map +1 -1
- package/dist/server/app-context.js.map +1 -1
- package/dist/server/approval-service.d.ts +7 -8
- package/dist/server/approval-service.d.ts.map +1 -1
- package/dist/server/approval-service.js +12 -24
- package/dist/server/approval-service.js.map +1 -1
- package/dist/server/authz.d.ts +23 -2
- package/dist/server/authz.d.ts.map +1 -1
- package/dist/server/authz.js +153 -17
- package/dist/server/authz.js.map +1 -1
- package/dist/server/handlers/approvals.d.ts.map +1 -1
- package/dist/server/handlers/approvals.js +3 -10
- package/dist/server/handlers/approvals.js.map +1 -1
- package/dist/server/handlers/branch.d.ts.map +1 -1
- package/dist/server/handlers/branch.js +29 -20
- package/dist/server/handlers/branch.js.map +1 -1
- package/dist/server/handlers/bridge.d.ts.map +1 -1
- package/dist/server/handlers/bridge.js +3 -2
- package/dist/server/handlers/bridge.js.map +1 -1
- package/dist/server/handlers/chat-ws.d.ts.map +1 -1
- package/dist/server/handlers/chat-ws.js +23 -31
- package/dist/server/handlers/chat-ws.js.map +1 -1
- package/dist/server/handlers/chat.d.ts.map +1 -1
- package/dist/server/handlers/chat.js +105 -46
- package/dist/server/handlers/chat.js.map +1 -1
- package/dist/server/handlers/compliance.d.ts +3 -0
- package/dist/server/handlers/compliance.d.ts.map +1 -0
- package/dist/server/handlers/compliance.js +53 -0
- package/dist/server/handlers/compliance.js.map +1 -0
- package/dist/server/handlers/context.d.ts.map +1 -1
- package/dist/server/handlers/context.js +3 -8
- package/dist/server/handlers/context.js.map +1 -1
- package/dist/server/handlers/fleet.d.ts +4 -0
- package/dist/server/handlers/fleet.d.ts.map +1 -0
- package/dist/server/handlers/fleet.js +9 -0
- package/dist/server/handlers/fleet.js.map +1 -0
- package/dist/server/handlers/headless-sessions.d.ts +4 -0
- package/dist/server/handlers/headless-sessions.d.ts.map +1 -1
- package/dist/server/handlers/headless-sessions.js +168 -3
- package/dist/server/handlers/headless-sessions.js.map +1 -1
- package/dist/server/handlers/health.d.ts +31 -2
- package/dist/server/handlers/health.d.ts.map +1 -1
- package/dist/server/handlers/health.js +82 -8
- package/dist/server/handlers/health.js.map +1 -1
- package/dist/server/handlers/hosted-runner-drain.d.ts +128 -0
- package/dist/server/handlers/hosted-runner-drain.d.ts.map +1 -0
- package/dist/server/handlers/hosted-runner-drain.js +373 -0
- package/dist/server/handlers/hosted-runner-drain.js.map +1 -0
- package/dist/server/handlers/hosted-runner-identity.d.ts +17 -0
- package/dist/server/handlers/hosted-runner-identity.d.ts.map +1 -0
- package/dist/server/handlers/hosted-runner-identity.js +39 -0
- package/dist/server/handlers/hosted-runner-identity.js.map +1 -0
- package/dist/server/handlers/intelligent-router.d.ts +3 -0
- package/dist/server/handlers/intelligent-router.d.ts.map +1 -0
- package/dist/server/handlers/intelligent-router.js +141 -0
- package/dist/server/handlers/intelligent-router.js.map +1 -0
- package/dist/server/handlers/models.d.ts.map +1 -1
- package/dist/server/handlers/models.js +14 -0
- package/dist/server/handlers/models.js.map +1 -1
- package/dist/server/handlers/pending-requests.d.ts +8 -0
- package/dist/server/handlers/pending-requests.d.ts.map +1 -0
- package/dist/server/handlers/pending-requests.js +149 -0
- package/dist/server/handlers/pending-requests.js.map +1 -0
- package/dist/server/handlers/revenue-attribution.d.ts +3 -0
- package/dist/server/handlers/revenue-attribution.d.ts.map +1 -0
- package/dist/server/handlers/revenue-attribution.js +45 -0
- package/dist/server/handlers/revenue-attribution.js.map +1 -0
- package/dist/server/handlers/runtime-app-server-ws.d.ts +10 -0
- package/dist/server/handlers/runtime-app-server-ws.d.ts.map +1 -0
- package/dist/server/handlers/runtime-app-server-ws.js +206 -0
- package/dist/server/handlers/runtime-app-server-ws.js.map +1 -0
- package/dist/server/handlers/session-artifacts.js +2 -2
- package/dist/server/handlers/session-artifacts.js.map +1 -1
- package/dist/server/handlers/session-attachments.js +3 -3
- package/dist/server/handlers/session-attachments.js.map +1 -1
- package/dist/server/handlers/session-timeline.d.ts +11 -0
- package/dist/server/handlers/session-timeline.d.ts.map +1 -0
- package/dist/server/handlers/session-timeline.js +77 -0
- package/dist/server/handlers/session-timeline.js.map +1 -0
- package/dist/server/handlers/sessions.d.ts +11 -0
- package/dist/server/handlers/sessions.d.ts.map +1 -1
- package/dist/server/handlers/sessions.js +68 -100
- package/dist/server/handlers/sessions.js.map +1 -1
- package/dist/server/handlers/traces.d.ts +3 -0
- package/dist/server/handlers/traces.d.ts.map +1 -0
- package/dist/server/handlers/traces.js +60 -0
- package/dist/server/handlers/traces.js.map +1 -0
- package/dist/server/handlers/usage-analytics.d.ts +3 -0
- package/dist/server/handlers/usage-analytics.d.ts.map +1 -0
- package/dist/server/handlers/usage-analytics.js +40 -0
- package/dist/server/handlers/usage-analytics.js.map +1 -0
- package/dist/server/handlers/workspace-config.d.ts +3 -0
- package/dist/server/handlers/workspace-config.d.ts.map +1 -0
- package/dist/server/handlers/workspace-config.js +62 -0
- package/dist/server/handlers/workspace-config.js.map +1 -0
- package/dist/server/headless-in-process-host.d.ts +8 -1
- package/dist/server/headless-in-process-host.d.ts.map +1 -1
- package/dist/server/headless-in-process-host.js +6 -0
- package/dist/server/headless-in-process-host.js.map +1 -1
- package/dist/server/headless-runtime-service.d.ts +99 -1
- package/dist/server/headless-runtime-service.d.ts.map +1 -1
- package/dist/server/headless-runtime-service.js +286 -23
- package/dist/server/headless-runtime-service.js.map +1 -1
- package/dist/server/hosted-session-manager.d.ts +103 -0
- package/dist/server/hosted-session-manager.d.ts.map +1 -0
- package/dist/server/hosted-session-manager.js +629 -0
- package/dist/server/hosted-session-manager.js.map +1 -0
- package/dist/server/pending-request-payload.d.ts +4 -0
- package/dist/server/pending-request-payload.d.ts.map +1 -0
- package/dist/server/pending-request-payload.js +107 -0
- package/dist/server/pending-request-payload.js.map +1 -0
- package/dist/server/request-context.d.ts +4 -0
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/request-context.js +9 -0
- package/dist/server/request-context.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +149 -1
- package/dist/server/routes.js.map +1 -1
- package/dist/server/runtime-ws-access.d.ts +16 -0
- package/dist/server/runtime-ws-access.d.ts.map +1 -0
- package/dist/server/runtime-ws-access.js +21 -0
- package/dist/server/runtime-ws-access.js.map +1 -0
- package/dist/server/server-middlewares.d.ts +1 -1
- package/dist/server/server-middlewares.d.ts.map +1 -1
- package/dist/server/server-middlewares.js +35 -27
- package/dist/server/server-middlewares.js.map +1 -1
- package/dist/server/server-request-manager.d.ts +8 -27
- package/dist/server/server-request-manager.d.ts.map +1 -1
- package/dist/server/server-request-manager.js +7 -0
- package/dist/server/server-request-manager.js.map +1 -1
- package/dist/server/server-utils.d.ts +2 -1
- package/dist/server/server-utils.d.ts.map +1 -1
- package/dist/server/server-utils.js +11 -1
- package/dist/server/server-utils.js.map +1 -1
- package/dist/server/session-event-env.d.ts +2 -0
- package/dist/server/session-event-env.d.ts.map +1 -0
- package/dist/server/session-event-env.js +8 -0
- package/dist/server/session-event-env.js.map +1 -0
- package/dist/server/session-initialization.d.ts +25 -4
- package/dist/server/session-initialization.d.ts.map +1 -1
- package/dist/server/session-initialization.js +22 -5
- package/dist/server/session-initialization.js.map +1 -1
- package/dist/server/session-scope.d.ts +4 -0
- package/dist/server/session-scope.d.ts.map +1 -1
- package/dist/server/session-scope.js +44 -4
- package/dist/server/session-scope.js.map +1 -1
- package/dist/server/session-timeline.d.ts +13 -0
- package/dist/server/session-timeline.d.ts.map +1 -0
- package/dist/server/session-timeline.js +566 -0
- package/dist/server/session-timeline.js.map +1 -0
- package/dist/services/compliance/controls.d.ts +6 -0
- package/dist/services/compliance/controls.d.ts.map +1 -0
- package/dist/services/compliance/controls.js +113 -0
- package/dist/services/compliance/controls.js.map +1 -0
- package/dist/services/compliance/index.d.ts +6 -0
- package/dist/services/compliance/index.d.ts.map +1 -0
- package/dist/services/compliance/index.js +5 -0
- package/dist/services/compliance/index.js.map +1 -0
- package/dist/services/compliance/normalize.d.ts +23 -0
- package/dist/services/compliance/normalize.d.ts.map +1 -0
- package/dist/services/compliance/normalize.js +226 -0
- package/dist/services/compliance/normalize.js.map +1 -0
- package/dist/services/compliance/recorder.d.ts +22 -0
- package/dist/services/compliance/recorder.d.ts.map +1 -0
- package/dist/services/compliance/recorder.js +89 -0
- package/dist/services/compliance/recorder.js.map +1 -0
- package/dist/services/compliance/service.d.ts +24 -0
- package/dist/services/compliance/service.d.ts.map +1 -0
- package/dist/services/compliance/service.js +426 -0
- package/dist/services/compliance/service.js.map +1 -0
- package/dist/services/compliance/types.d.ts +185 -0
- package/dist/services/compliance/types.d.ts.map +1 -0
- package/dist/services/compliance/types.js +2 -0
- package/dist/services/compliance/types.js.map +1 -0
- package/dist/services/intelligent-router/index.d.ts +5 -0
- package/dist/services/intelligent-router/index.d.ts.map +1 -0
- package/dist/services/intelligent-router/index.js +5 -0
- package/dist/services/intelligent-router/index.js.map +1 -0
- package/dist/services/intelligent-router/normalize.d.ts +9 -0
- package/dist/services/intelligent-router/normalize.d.ts.map +1 -0
- package/dist/services/intelligent-router/normalize.js +169 -0
- package/dist/services/intelligent-router/normalize.js.map +1 -0
- package/dist/services/intelligent-router/recorder.d.ts +24 -0
- package/dist/services/intelligent-router/recorder.d.ts.map +1 -0
- package/dist/services/intelligent-router/recorder.js +98 -0
- package/dist/services/intelligent-router/recorder.js.map +1 -0
- package/dist/services/intelligent-router/service.d.ts +22 -0
- package/dist/services/intelligent-router/service.d.ts.map +1 -0
- package/dist/services/intelligent-router/service.js +328 -0
- package/dist/services/intelligent-router/service.js.map +1 -0
- package/dist/services/intelligent-router/types.d.ts +98 -0
- package/dist/services/intelligent-router/types.d.ts.map +1 -0
- package/dist/services/intelligent-router/types.js +7 -0
- package/dist/services/intelligent-router/types.js.map +1 -0
- package/dist/services/revenue-attribution/index.d.ts +4 -0
- package/dist/services/revenue-attribution/index.d.ts.map +1 -0
- package/dist/services/revenue-attribution/index.js +4 -0
- package/dist/services/revenue-attribution/index.js.map +1 -0
- package/dist/services/revenue-attribution/normalize.d.ts +13 -0
- package/dist/services/revenue-attribution/normalize.d.ts.map +1 -0
- package/dist/services/revenue-attribution/normalize.js +155 -0
- package/dist/services/revenue-attribution/normalize.js.map +1 -0
- package/dist/services/revenue-attribution/service.d.ts +21 -0
- package/dist/services/revenue-attribution/service.d.ts.map +1 -0
- package/dist/services/revenue-attribution/service.js +248 -0
- package/dist/services/revenue-attribution/service.js.map +1 -0
- package/dist/services/revenue-attribution/types.d.ts +96 -0
- package/dist/services/revenue-attribution/types.d.ts.map +1 -0
- package/dist/services/revenue-attribution/types.js +7 -0
- package/dist/services/revenue-attribution/types.js.map +1 -0
- package/dist/services/traces/index.d.ts +5 -0
- package/dist/services/traces/index.d.ts.map +1 -0
- package/dist/services/traces/index.js +4 -0
- package/dist/services/traces/index.js.map +1 -0
- package/dist/services/traces/normalize.d.ts +20 -0
- package/dist/services/traces/normalize.d.ts.map +1 -0
- package/dist/services/traces/normalize.js +261 -0
- package/dist/services/traces/normalize.js.map +1 -0
- package/dist/services/traces/otel.d.ts +3 -0
- package/dist/services/traces/otel.d.ts.map +1 -0
- package/dist/services/traces/otel.js +173 -0
- package/dist/services/traces/otel.js.map +1 -0
- package/dist/services/traces/service.d.ts +17 -0
- package/dist/services/traces/service.d.ts.map +1 -0
- package/dist/services/traces/service.js +197 -0
- package/dist/services/traces/service.js.map +1 -0
- package/dist/services/traces/types.d.ts +130 -0
- package/dist/services/traces/types.d.ts.map +1 -0
- package/dist/services/traces/types.js +8 -0
- package/dist/services/traces/types.js.map +1 -0
- package/dist/services/usage-analytics/aggregation.d.ts +18 -0
- package/dist/services/usage-analytics/aggregation.d.ts.map +1 -0
- package/dist/services/usage-analytics/aggregation.js +130 -0
- package/dist/services/usage-analytics/aggregation.js.map +1 -0
- package/dist/services/usage-analytics/index.d.ts +5 -0
- package/dist/services/usage-analytics/index.d.ts.map +1 -0
- package/dist/services/usage-analytics/index.js +4 -0
- package/dist/services/usage-analytics/index.js.map +1 -0
- package/dist/services/usage-analytics/recorder.d.ts +16 -0
- package/dist/services/usage-analytics/recorder.d.ts.map +1 -0
- package/dist/services/usage-analytics/recorder.js +128 -0
- package/dist/services/usage-analytics/recorder.js.map +1 -0
- package/dist/services/usage-analytics/service.d.ts +15 -0
- package/dist/services/usage-analytics/service.d.ts.map +1 -0
- package/dist/services/usage-analytics/service.js +210 -0
- package/dist/services/usage-analytics/service.js.map +1 -0
- package/dist/services/usage-analytics/types.d.ts +80 -0
- package/dist/services/usage-analytics/types.d.ts.map +1 -0
- package/dist/services/usage-analytics/types.js +2 -0
- package/dist/services/usage-analytics/types.js.map +1 -0
- package/dist/services/workspace-config/index.d.ts +6 -0
- package/dist/services/workspace-config/index.d.ts.map +1 -0
- package/dist/services/workspace-config/index.js +5 -0
- package/dist/services/workspace-config/index.js.map +1 -0
- package/dist/services/workspace-config/middleware.d.ts +5 -0
- package/dist/services/workspace-config/middleware.d.ts.map +1 -0
- package/dist/services/workspace-config/middleware.js +98 -0
- package/dist/services/workspace-config/middleware.js.map +1 -0
- package/dist/services/workspace-config/normalize.d.ts +17 -0
- package/dist/services/workspace-config/normalize.d.ts.map +1 -0
- package/dist/services/workspace-config/normalize.js +148 -0
- package/dist/services/workspace-config/normalize.js.map +1 -0
- package/dist/services/workspace-config/policy.d.ts +16 -0
- package/dist/services/workspace-config/policy.d.ts.map +1 -0
- package/dist/services/workspace-config/policy.js +77 -0
- package/dist/services/workspace-config/policy.js.map +1 -0
- package/dist/services/workspace-config/service.d.ts +20 -0
- package/dist/services/workspace-config/service.d.ts.map +1 -0
- package/dist/services/workspace-config/service.js +162 -0
- package/dist/services/workspace-config/service.js.map +1 -0
- package/dist/services/workspace-config/types.d.ts +71 -0
- package/dist/services/workspace-config/types.d.ts.map +1 -0
- package/dist/services/workspace-config/types.js +2 -0
- package/dist/services/workspace-config/types.js.map +1 -0
- package/dist/session/manager.d.ts.map +1 -1
- package/dist/session/manager.js +10 -0
- package/dist/session/manager.js.map +1 -1
- package/dist/session/migration.d.ts.map +1 -1
- package/dist/session/migration.js +2 -1
- package/dist/session/migration.js.map +1 -1
- package/dist/session/session-memory.d.ts.map +1 -1
- package/dist/session/session-memory.js +7 -1
- package/dist/session/session-memory.js.map +1 -1
- package/dist/session/types.d.ts +1 -2
- package/dist/session/types.d.ts.map +1 -1
- package/dist/session/types.js +1 -22
- package/dist/session/types.js.map +1 -1
- package/dist/session/wire-format.d.ts +7 -0
- package/dist/session/wire-format.d.ts.map +1 -0
- package/dist/session/wire-format.generated.d.ts +95 -0
- package/dist/session/wire-format.generated.d.ts.map +1 -0
- package/dist/session/wire-format.generated.js +111 -0
- package/dist/session/wire-format.generated.js.map +1 -0
- package/dist/session/wire-format.js +145 -0
- package/dist/session/wire-format.js.map +1 -0
- package/dist/shared-memory/client.d.ts.map +1 -1
- package/dist/shared-memory/client.js +22 -22
- package/dist/shared-memory/client.js.map +1 -1
- package/dist/skills/artifact-metadata.d.ts +16 -0
- package/dist/skills/artifact-metadata.d.ts.map +1 -0
- package/dist/skills/artifact-metadata.js +86 -0
- package/dist/skills/artifact-metadata.js.map +1 -0
- package/dist/skills/loader.d.ts +2 -2
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +1 -0
- package/dist/skills/loader.js.map +1 -1
- package/dist/skills/service-client.d.ts +42 -0
- package/dist/skills/service-client.d.ts.map +1 -0
- package/dist/skills/service-client.js +258 -0
- package/dist/skills/service-client.js.map +1 -0
- package/dist/skills/tool.d.ts +3 -0
- package/dist/skills/tool.d.ts.map +1 -1
- package/dist/skills/tool.js +67 -5
- package/dist/skills/tool.js.map +1 -1
- package/dist/telemetry/index.d.ts +4 -0
- package/dist/telemetry/index.d.ts.map +1 -1
- package/dist/telemetry/index.js +5 -0
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/maestro-event-bus.d.ts +440 -0
- package/dist/telemetry/maestro-event-bus.d.ts.map +1 -0
- package/dist/telemetry/maestro-event-bus.js +784 -0
- package/dist/telemetry/maestro-event-bus.js.map +1 -0
- package/dist/telemetry/maestro-event-catalog.d.ts +48 -0
- package/dist/telemetry/maestro-event-catalog.d.ts.map +1 -0
- package/dist/telemetry/maestro-event-catalog.js +69 -0
- package/dist/telemetry/maestro-event-catalog.js.map +1 -0
- package/dist/telemetry/maestro-platform-replay-fixture.d.ts +24 -0
- package/dist/telemetry/maestro-platform-replay-fixture.d.ts.map +1 -0
- package/dist/telemetry/maestro-platform-replay-fixture.js +400 -0
- package/dist/telemetry/maestro-platform-replay-fixture.js.map +1 -0
- package/dist/telemetry/maestro-publisher-conformance-fixture.d.ts +29 -0
- package/dist/telemetry/maestro-publisher-conformance-fixture.d.ts.map +1 -0
- package/dist/telemetry/maestro-publisher-conformance-fixture.js +240 -0
- package/dist/telemetry/maestro-publisher-conformance-fixture.js.map +1 -0
- package/dist/telemetry/meter-service-client.d.ts +0 -33
- package/dist/telemetry/meter-service-client.d.ts.map +1 -1
- package/dist/telemetry/meter-service-client.js +22 -50
- package/dist/telemetry/meter-service-client.js.map +1 -1
- package/dist/telemetry/turn-tracker.d.ts.map +1 -1
- package/dist/telemetry/turn-tracker.js +5 -5
- package/dist/telemetry/turn-tracker.js.map +1 -1
- package/dist/telemetry/wide-events.d.ts +8 -0
- package/dist/telemetry/wide-events.d.ts.map +1 -1
- package/dist/telemetry/wide-events.js +28 -0
- package/dist/telemetry/wide-events.js.map +1 -1
- package/dist/telemetry.d.ts +1 -1
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +14 -4
- package/dist/telemetry.js.map +1 -1
- package/dist/timeline/redaction.d.ts +5 -0
- package/dist/timeline/redaction.d.ts.map +1 -0
- package/dist/timeline/redaction.js +119 -0
- package/dist/timeline/redaction.js.map +1 -0
- package/dist/tools/ask-user.d.ts +26 -0
- package/dist/tools/ask-user.d.ts.map +1 -1
- package/dist/tools/ask-user.js +33 -1
- package/dist/tools/ask-user.js.map +1 -1
- package/dist/tools/background/task-types.d.ts +1 -1
- package/dist/tools/edit.d.ts +2 -0
- package/dist/tools/edit.d.ts.map +1 -1
- package/dist/tools/edit.js +27 -7
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/index.d.ts +9 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/pipeline.d.ts.map +1 -1
- package/dist/tools/pipeline.js +16 -7
- package/dist/tools/pipeline.js.map +1 -1
- package/dist/tools/write.d.ts +2 -0
- package/dist/tools/write.d.ts.map +1 -1
- package/dist/tools/write.js +24 -6
- package/dist/tools/write.js.map +1 -1
- package/dist/tracking/cost-tracker.d.ts +15 -12
- package/dist/tracking/cost-tracker.d.ts.map +1 -1
- package/dist/tracking/cost-tracker.js +29 -40
- package/dist/tracking/cost-tracker.js.map +1 -1
- package/dist/utils/checkpoint-profiler.d.ts +29 -0
- package/dist/utils/checkpoint-profiler.d.ts.map +1 -0
- package/dist/utils/checkpoint-profiler.js +118 -0
- package/dist/utils/checkpoint-profiler.js.map +1 -0
- package/dist/utils/downstream-http.d.ts +21 -0
- package/dist/utils/downstream-http.d.ts.map +1 -0
- package/dist/utils/downstream-http.js +151 -0
- package/dist/utils/downstream-http.js.map +1 -0
- package/dist/utils/downstream.d.ts +18 -0
- package/dist/utils/downstream.d.ts.map +1 -0
- package/dist/utils/downstream.js +47 -0
- package/dist/utils/downstream.js.map +1 -0
- package/dist/utils/logger.d.ts +3 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +12 -1
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/oauth-http.d.ts +8 -0
- package/dist/utils/oauth-http.d.ts.map +1 -0
- package/dist/utils/oauth-http.js +41 -0
- package/dist/utils/oauth-http.js.map +1 -0
- package/dist/utils/path-utils.d.ts +2 -0
- package/dist/utils/path-utils.d.ts.map +1 -0
- package/dist/utils/path-utils.js +12 -0
- package/dist/utils/path-utils.js.map +1 -0
- package/dist/utils/path-validation.d.ts +1 -1
- package/dist/utils/path-validation.d.ts.map +1 -1
- package/dist/utils/path-validation.js +3 -3
- package/dist/utils/path-validation.js.map +1 -1
- package/dist/version.json +2 -2
- package/dist/web-server.d.ts +7 -1
- package/dist/web-server.d.ts.map +1 -1
- package/dist/web-server.js +117 -15
- package/dist/web-server.js.map +1 -1
- package/dist/webhooks/delivery.d.ts.map +1 -1
- package/dist/webhooks/delivery.js +9 -12
- package/dist/webhooks/delivery.js.map +1 -1
- package/node_modules/@bufbuild/protobuf/dist/cjs/descriptors.d.ts +12 -5
- package/node_modules/@bufbuild/protobuf/dist/cjs/from-binary.js +7 -7
- package/node_modules/@bufbuild/protobuf/dist/cjs/from-json.d.ts +1 -1
- package/node_modules/@bufbuild/protobuf/dist/cjs/from-json.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/cjs/reflect/path.d.ts +1 -1
- package/node_modules/@bufbuild/protobuf/dist/cjs/registry.js +24 -1
- package/node_modules/@bufbuild/protobuf/dist/cjs/to-json.d.ts +1 -1
- package/node_modules/@bufbuild/protobuf/dist/cjs/to-json.js +9 -10
- package/node_modules/@bufbuild/protobuf/dist/cjs/types.d.ts +1 -1
- package/node_modules/@bufbuild/protobuf/dist/cjs/wire/binary-encoding.d.ts +9 -7
- package/node_modules/@bufbuild/protobuf/dist/cjs/wire/binary-encoding.js +18 -8
- package/node_modules/@bufbuild/protobuf/dist/cjs/wire/text-encoding.d.ts +4 -2
- package/node_modules/@bufbuild/protobuf/dist/cjs/wire/text-encoding.js +8 -1
- package/node_modules/@bufbuild/protobuf/dist/cjs/wkt/gen/google/protobuf/api_pb.d.ts +1 -1
- package/node_modules/@bufbuild/protobuf/dist/cjs/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +2 -2
- package/node_modules/@bufbuild/protobuf/dist/cjs/wkt/gen/google/protobuf/descriptor_pb.d.ts +37 -23
- package/node_modules/@bufbuild/protobuf/dist/cjs/wkt/gen/google/protobuf/descriptor_pb.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/cjs/wkt/gen/google/protobuf/field_mask_pb.d.ts +32 -36
- package/node_modules/@bufbuild/protobuf/dist/cjs/wkt/gen/google/protobuf/go_features_pb.d.ts +65 -0
- package/node_modules/@bufbuild/protobuf/dist/cjs/wkt/gen/google/protobuf/go_features_pb.js +38 -2
- package/node_modules/@bufbuild/protobuf/dist/cjs/wkt/gen/google/protobuf/timestamp_pb.d.ts +5 -5
- package/node_modules/@bufbuild/protobuf/dist/cjs/wkt/gen/google/protobuf/type_pb.d.ts +3 -3
- package/node_modules/@bufbuild/protobuf/dist/cjs/wkt/wrappers.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/cjs/wkt/wrappers.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.d.ts +12 -5
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +7 -7
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.d.ts +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.d.ts +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +24 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.d.ts +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +10 -11
- package/node_modules/@bufbuild/protobuf/dist/esm/types.d.ts +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.d.ts +9 -7
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +18 -8
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.d.ts +4 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +8 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.d.ts +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +2 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.d.ts +37 -23
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.d.ts +32 -36
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.d.ts +65 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +37 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.d.ts +5 -5
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.d.ts +3 -3
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +23 -0
- package/node_modules/@bufbuild/protobuf/package.json +1 -1
- package/node_modules/@evalops/contracts/dist/headless-protocol-schemas.generated.d.ts +305 -2
- package/node_modules/@evalops/contracts/dist/headless-protocol-schemas.generated.d.ts.map +1 -1
- package/node_modules/@evalops/contracts/dist/headless-protocol-schemas.generated.js +34 -4
- package/node_modules/@evalops/contracts/dist/headless-protocol-schemas.generated.js.map +1 -1
- package/node_modules/@evalops/contracts/dist/index.d.ts +88 -0
- package/node_modules/@evalops/contracts/dist/index.d.ts.map +1 -1
- package/node_modules/@evalops/contracts/dist/index.js +2 -0
- package/node_modules/@evalops/contracts/dist/index.js.map +1 -1
- package/node_modules/@evalops/contracts/dist/proto/maestro/v1/headless_pb.d.ts +77 -77
- package/node_modules/@evalops/contracts/dist/proto/maestro/v1/headless_pb.d.ts.map +1 -1
- package/node_modules/@evalops/contracts/dist/proto/maestro/v1/headless_pb.js +1 -1
- package/node_modules/@evalops/contracts/dist/proto/maestro/v1/headless_pb.js.map +1 -1
- package/node_modules/@evalops/contracts/dist/runtime-app-server.d.ts +182 -0
- package/node_modules/@evalops/contracts/dist/runtime-app-server.d.ts.map +1 -0
- package/node_modules/@evalops/contracts/dist/runtime-app-server.js +83 -0
- package/node_modules/@evalops/contracts/dist/runtime-app-server.js.map +1 -0
- package/node_modules/@evalops/contracts/dist/runtime-server-request.d.ts +133 -0
- package/node_modules/@evalops/contracts/dist/runtime-server-request.d.ts.map +1 -0
- package/node_modules/@evalops/contracts/dist/runtime-server-request.js +68 -0
- package/node_modules/@evalops/contracts/dist/runtime-server-request.js.map +1 -0
- package/node_modules/@evalops/contracts/dist/schemas.d.ts +178 -0
- package/node_modules/@evalops/contracts/dist/schemas.d.ts.map +1 -1
- package/node_modules/@evalops/contracts/dist/schemas.js +165 -0
- package/node_modules/@evalops/contracts/dist/schemas.js.map +1 -1
- package/node_modules/@evalops/contracts/dist/typebox-utils.d.ts +2 -0
- package/node_modules/@evalops/contracts/dist/typebox-utils.d.ts.map +1 -0
- package/node_modules/@evalops/contracts/dist/typebox-utils.js +5 -0
- package/node_modules/@evalops/contracts/dist/typebox-utils.js.map +1 -0
- package/node_modules/@evalops/contracts/dist/validators.d.ts +4 -1
- package/node_modules/@evalops/contracts/dist/validators.d.ts.map +1 -1
- package/node_modules/@evalops/contracts/dist/validators.js +4 -1
- package/node_modules/@evalops/contracts/dist/validators.js.map +1 -1
- package/node_modules/@evalops/contracts/package.json +1 -1
- package/node_modules/@evalops/tui/package.json +1 -1
- package/node_modules/string-width/index.js +93 -9
- package/node_modules/string-width/package.json +1 -1
- package/package.json +32 -25
- package/dist/cli-tui/commands/grouped/auth-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/grouped/auth-commands.js.map +0 -1
- package/dist/cli-tui/commands/grouped/config-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/grouped/config-commands.js.map +0 -1
- package/dist/cli-tui/commands/grouped/diag-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/grouped/diag-commands.js.map +0 -1
- package/dist/cli-tui/commands/grouped/git-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/grouped/git-commands.js.map +0 -1
- package/dist/cli-tui/commands/grouped/index.d.ts.map +0 -1
- package/dist/cli-tui/commands/grouped/index.js.map +0 -1
- package/dist/cli-tui/commands/grouped/safety-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/grouped/safety-commands.js.map +0 -1
- package/dist/cli-tui/commands/grouped/session-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/grouped/session-commands.js.map +0 -1
- package/dist/cli-tui/commands/grouped/tools-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/grouped/tools-commands.js.map +0 -1
- package/dist/cli-tui/commands/grouped/ui-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/grouped/ui-commands.js.map +0 -1
- package/dist/cli-tui/commands/grouped/undo-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/grouped/undo-commands.js.map +0 -1
- package/dist/cli-tui/commands/grouped/usage-commands.d.ts.map +0 -1
- package/dist/cli-tui/commands/grouped/usage-commands.js.map +0 -1
- package/dist/cli-tui/commands/grouped/utils.d.ts.map +0 -1
- package/dist/cli-tui/commands/grouped/utils.js.map +0 -1
- package/dist/cli-tui/commands/grouped-command-handlers.d.ts.map +0 -1
- package/dist/cli-tui/commands/grouped-command-handlers.js +0 -135
- package/dist/cli-tui/commands/grouped-command-handlers.js.map +0 -1
- package/dist/cli-tui/tui-renderer/grouped-handlers-wiring.d.ts +0 -78
- package/dist/cli-tui/tui-renderer/grouped-handlers-wiring.d.ts.map +0 -1
- package/dist/cli-tui/tui-renderer/grouped-handlers-wiring.js +0 -129
- package/dist/cli-tui/tui-renderer/grouped-handlers-wiring.js.map +0 -1
- package/node_modules/@evalops/memory/dist/client.d.ts +0 -94
- package/node_modules/@evalops/memory/dist/client.js +0 -503
- package/node_modules/@evalops/memory/gen/proto/dist/memory/v1/memory_pb.d.ts +0 -608
- package/node_modules/@evalops/memory/gen/proto/dist/memory/v1/memory_pb.js +0 -187
- package/node_modules/@evalops/memory/package.json +0 -26
- /package/dist/cli-tui/commands/{grouped → subcommands}/usage-commands.d.ts +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CommandSuiteWiring adapts top-level command handlers into parent command
|
|
3
|
+
* suites such as /ss, /diag, /cfg, and /tools.
|
|
4
|
+
*/
|
|
5
|
+
import { CommandSuiteKey, createCommandSuiteHandlers, } from "../commands/command-suite-handlers.js";
|
|
6
|
+
export function buildCommandSuiteHandlers(deps) {
|
|
7
|
+
const { handlers } = deps;
|
|
8
|
+
return createCommandSuiteHandlers({
|
|
9
|
+
[CommandSuiteKey.Session]: {
|
|
10
|
+
handleNewChat: (ctx) => handlers.newChat(ctx),
|
|
11
|
+
handleClear: () => handlers.clear(commandContext("/clear")),
|
|
12
|
+
handleSessionInfo: (ctx) => handlers.session(ctx),
|
|
13
|
+
handleSessionsList: (ctx) => handlers.sessions(ctx),
|
|
14
|
+
handleBranch: (ctx) => handlers.branch(ctx),
|
|
15
|
+
handleTree: (ctx) => handlers.tree(ctx),
|
|
16
|
+
handleQueue: (ctx) => handlers.queue(ctx),
|
|
17
|
+
handleExport: (ctx) => handlers.exportSession(ctx),
|
|
18
|
+
handleShare: (ctx) => handlers.shareSession(ctx),
|
|
19
|
+
handleRecover: (ctx) => deps.handleSessionRecoverCommand(ctx),
|
|
20
|
+
handleCleanup: (ctx) => deps.handleSessionCleanupCommand(ctx),
|
|
21
|
+
},
|
|
22
|
+
[CommandSuiteKey.Diag]: {
|
|
23
|
+
handleStatus: () => handlers.status(commandContext("/status")),
|
|
24
|
+
handleAbout: () => handlers.about(commandContext("/about")),
|
|
25
|
+
handleContext: (ctx) => handlers.context(ctx),
|
|
26
|
+
handleStats: (ctx) => handlers.stats(ctx),
|
|
27
|
+
handleBackground: (ctx) => handlers.background(ctx),
|
|
28
|
+
handleDiagnostics: (ctx) => handlers.diagnostics(ctx),
|
|
29
|
+
handleTelemetry: (ctx) => handlers.telemetry(ctx),
|
|
30
|
+
handleTraining: (ctx) => handlers.training(ctx),
|
|
31
|
+
handleOtel: (ctx) => handlers.otel(ctx),
|
|
32
|
+
handleConfig: (ctx) => handlers.config(ctx),
|
|
33
|
+
handleLsp: (ctx) => handlers.lsp(ctx),
|
|
34
|
+
handleMcp: (ctx) => handlers.mcp(ctx),
|
|
35
|
+
handleSources: (ctx) => deps.handleSourcesCommand(ctx),
|
|
36
|
+
handlePerf: () => deps.handlePerfCommand(),
|
|
37
|
+
},
|
|
38
|
+
[CommandSuiteKey.Ui]: {
|
|
39
|
+
showTheme: () => handlers.theme(commandContext("/theme")),
|
|
40
|
+
handleClean: (ctx) => handlers.clean(ctx),
|
|
41
|
+
handleFooter: (ctx) => handlers.footer(ctx),
|
|
42
|
+
handleZen: (ctx) => handlers.zen(ctx),
|
|
43
|
+
handleCompactTools: (ctx) => handlers.compactTools(ctx),
|
|
44
|
+
getUiState: () => deps.getUiState(),
|
|
45
|
+
},
|
|
46
|
+
[CommandSuiteKey.Safety]: {
|
|
47
|
+
handleApprovals: (ctx) => handlers.approvals(ctx),
|
|
48
|
+
handlePlanMode: (ctx) => handlers.planMode(ctx),
|
|
49
|
+
handleGuardian: (ctx) => handlers.guardian(ctx),
|
|
50
|
+
getSafetyState: () => ({
|
|
51
|
+
approvalMode: process.env.MAESTRO_APPROVALS ?? "prompt",
|
|
52
|
+
planMode: process.env.MAESTRO_PLAN_MODE === "1",
|
|
53
|
+
guardianEnabled: true,
|
|
54
|
+
}),
|
|
55
|
+
},
|
|
56
|
+
[CommandSuiteKey.Git]: {
|
|
57
|
+
handleDiff: (ctx) => handlers.preview(ctx),
|
|
58
|
+
handleReview: (ctx) => handlers.review(ctx),
|
|
59
|
+
},
|
|
60
|
+
[CommandSuiteKey.Auth]: {
|
|
61
|
+
handleLogin: (ctx) => handlers.login(ctx),
|
|
62
|
+
handleLogout: (ctx) => handlers.logout(ctx),
|
|
63
|
+
handleSourceOfTruthPolicy: (ctx) => deps.handleAuthSourceOfTruthCommand(ctx.argumentText, (msg) => ctx.showError(msg), (msg) => ctx.showInfo(msg)),
|
|
64
|
+
getAuthState: () => deps.getAuthState(),
|
|
65
|
+
},
|
|
66
|
+
[CommandSuiteKey.Usage]: {
|
|
67
|
+
handleCost: (ctx) => handlers.cost(ctx),
|
|
68
|
+
handleQuota: (ctx) => handlers.quota(ctx),
|
|
69
|
+
handleStats: (ctx) => handlers.stats(ctx),
|
|
70
|
+
},
|
|
71
|
+
[CommandSuiteKey.Undo]: {
|
|
72
|
+
handleUndo: (ctx) => handlers.undoChanges(ctx),
|
|
73
|
+
handleCheckpoint: (ctx) => handlers.checkpoint(ctx),
|
|
74
|
+
handleChanges: (ctx) => handlers.changes(ctx),
|
|
75
|
+
getUndoState: () => ({
|
|
76
|
+
canUndo: true,
|
|
77
|
+
undoCount: 0,
|
|
78
|
+
checkpoints: [],
|
|
79
|
+
}),
|
|
80
|
+
},
|
|
81
|
+
[CommandSuiteKey.Config]: {
|
|
82
|
+
handleConfig: (ctx) => handlers.config(ctx),
|
|
83
|
+
handleImport: (ctx) => handlers.importConfig(ctx),
|
|
84
|
+
handleFramework: (ctx) => handlers.framework(ctx),
|
|
85
|
+
handleComposer: (ctx) => handlers.composer(ctx),
|
|
86
|
+
handleInit: (ctx) => handlers.initAgents(ctx),
|
|
87
|
+
},
|
|
88
|
+
[CommandSuiteKey.Tools]: {
|
|
89
|
+
handleTools: (ctx) => handlers.tools(ctx),
|
|
90
|
+
handleMcp: (ctx) => handlers.mcp(ctx),
|
|
91
|
+
handleLsp: (ctx) => handlers.lsp(ctx),
|
|
92
|
+
handleWorkflow: (ctx) => handlers.workflow(ctx),
|
|
93
|
+
handleRun: (ctx) => handlers.run(ctx),
|
|
94
|
+
handleCommands: (ctx) => handlers.commands(ctx),
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function commandContext(rawInput) {
|
|
99
|
+
return {
|
|
100
|
+
command: { name: rawInput.replace(/^\//, ""), description: "" },
|
|
101
|
+
rawInput,
|
|
102
|
+
argumentText: "",
|
|
103
|
+
showInfo: () => undefined,
|
|
104
|
+
showError: () => undefined,
|
|
105
|
+
renderHelp: () => undefined,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=command-suite-wiring.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-suite-wiring.js","sourceRoot":"","sources":["../../../src/cli-tui/tui-renderer/command-suite-wiring.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,eAAe,EACf,0BAA0B,GAC1B,MAAM,uCAAuC,CAAC;AAu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AQ;QACR,YAAY,EAAE,EAAE;QAChB,QAAQ,EAAE,GAAG,EAAE,CAAC,SAAS;QACzB,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS;QAC1B,UAAU,EAAE,GAAG,EAAE,CAAC,SAAS;KAC3B,CAAC;AACH,CAAC","sourcesContent":["/**\n * CommandSuiteWiring adapts top-level command handlers into parent command\n * suites such as /ss, /diag, /cfg, and /tools.\n */\n\nimport {\n\ttype CommandSuiteHandlers,\n\tCommandSuiteKey,\n\tcreateCommandSuiteHandlers,\n} from \"../commands/command-suite-handlers.js\";\nimport type {\n\tCommandExecutionContext,\n\tCommandHandlers,\n} from \"../commands/types.js\";\n\ntype SuiteHandlerKey =\n\t| \"about\"\n\t| \"approvals\"\n\t| \"background\"\n\t| \"branch\"\n\t| \"changes\"\n\t| \"checkpoint\"\n\t| \"clean\"\n\t| \"clear\"\n\t| \"commands\"\n\t| \"compactTools\"\n\t| \"composer\"\n\t| \"config\"\n\t| \"context\"\n\t| \"cost\"\n\t| \"diagnostics\"\n\t| \"exportSession\"\n\t| \"footer\"\n\t| \"framework\"\n\t| \"guardian\"\n\t| \"importConfig\"\n\t| \"initAgents\"\n\t| \"login\"\n\t| \"logout\"\n\t| \"lsp\"\n\t| \"mcp\"\n\t| \"newChat\"\n\t| \"otel\"\n\t| \"planMode\"\n\t| \"preview\"\n\t| \"quota\"\n\t| \"queue\"\n\t| \"review\"\n\t| \"run\"\n\t| \"session\"\n\t| \"sessions\"\n\t| \"shareSession\"\n\t| \"stats\"\n\t| \"status\"\n\t| \"telemetry\"\n\t| \"theme\"\n\t| \"training\"\n\t| \"tree\"\n\t| \"tools\"\n\t| \"undoChanges\"\n\t| \"workflow\"\n\t| \"zen\";\n\nexport type CommandSuiteBaseHandlers = Pick<CommandHandlers, SuiteHandlerKey>;\n\nexport interface CommandSuiteRuntimeDeps {\n\tgetUiState: () => {\n\t\tzenMode: boolean;\n\t\tcleanMode: string;\n\t\tfooterMode: string;\n\t\tcompactTools: boolean;\n\t};\n\tgetAuthState: () => {\n\t\tauthenticated: boolean;\n\t\tprovider?: string;\n\t\tmode?: string;\n\t};\n\thandleSessionRecoverCommand: (\n\t\tctx: CommandExecutionContext,\n\t) => void | Promise<void>;\n\thandleSessionCleanupCommand: (\n\t\tctx: CommandExecutionContext,\n\t) => void | Promise<void>;\n\thandleSourcesCommand: (ctx: CommandExecutionContext) => void | Promise<void>;\n\thandlePerfCommand: () => void | Promise<void>;\n\thandleAuthSourceOfTruthCommand: (\n\t\targumentText: string,\n\t\tshowError: (msg: string) => void,\n\t\tshowInfo: (msg: string) => void,\n\t) => void | Promise<void>;\n}\n\nexport interface CommandSuiteWiringDeps extends CommandSuiteRuntimeDeps {\n\thandlers: CommandSuiteBaseHandlers;\n}\n\nexport function buildCommandSuiteHandlers(\n\tdeps: CommandSuiteWiringDeps,\n): CommandSuiteHandlers {\n\tconst { handlers } = deps;\n\n\treturn createCommandSuiteHandlers({\n\t\t[CommandSuiteKey.Session]: {\n\t\t\thandleNewChat: (ctx) => handlers.newChat(ctx),\n\t\t\thandleClear: () => handlers.clear(commandContext(\"/clear\")),\n\t\t\thandleSessionInfo: (ctx) => handlers.session(ctx),\n\t\t\thandleSessionsList: (ctx) => handlers.sessions(ctx),\n\t\t\thandleBranch: (ctx) => handlers.branch(ctx),\n\t\t\thandleTree: (ctx) => handlers.tree(ctx),\n\t\t\thandleQueue: (ctx) => handlers.queue(ctx),\n\t\t\thandleExport: (ctx) => handlers.exportSession(ctx),\n\t\t\thandleShare: (ctx) => handlers.shareSession(ctx),\n\t\t\thandleRecover: (ctx) => deps.handleSessionRecoverCommand(ctx),\n\t\t\thandleCleanup: (ctx) => deps.handleSessionCleanupCommand(ctx),\n\t\t},\n\t\t[CommandSuiteKey.Diag]: {\n\t\t\thandleStatus: () => handlers.status(commandContext(\"/status\")),\n\t\t\thandleAbout: () => handlers.about(commandContext(\"/about\")),\n\t\t\thandleContext: (ctx) => handlers.context(ctx),\n\t\t\thandleStats: (ctx) => handlers.stats(ctx),\n\t\t\thandleBackground: (ctx) => handlers.background(ctx),\n\t\t\thandleDiagnostics: (ctx) => handlers.diagnostics(ctx),\n\t\t\thandleTelemetry: (ctx) => handlers.telemetry(ctx),\n\t\t\thandleTraining: (ctx) => handlers.training(ctx),\n\t\t\thandleOtel: (ctx) => handlers.otel(ctx),\n\t\t\thandleConfig: (ctx) => handlers.config(ctx),\n\t\t\thandleLsp: (ctx) => handlers.lsp(ctx),\n\t\t\thandleMcp: (ctx) => handlers.mcp(ctx),\n\t\t\thandleSources: (ctx) => deps.handleSourcesCommand(ctx),\n\t\t\thandlePerf: () => deps.handlePerfCommand(),\n\t\t},\n\t\t[CommandSuiteKey.Ui]: {\n\t\t\tshowTheme: () => handlers.theme(commandContext(\"/theme\")),\n\t\t\thandleClean: (ctx) => handlers.clean(ctx),\n\t\t\thandleFooter: (ctx) => handlers.footer(ctx),\n\t\t\thandleZen: (ctx) => handlers.zen(ctx),\n\t\t\thandleCompactTools: (ctx) => handlers.compactTools(ctx),\n\t\t\tgetUiState: () => deps.getUiState(),\n\t\t},\n\t\t[CommandSuiteKey.Safety]: {\n\t\t\thandleApprovals: (ctx) => handlers.approvals(ctx),\n\t\t\thandlePlanMode: (ctx) => handlers.planMode(ctx),\n\t\t\thandleGuardian: (ctx) => handlers.guardian(ctx),\n\t\t\tgetSafetyState: () => ({\n\t\t\t\tapprovalMode: process.env.MAESTRO_APPROVALS ?? \"prompt\",\n\t\t\t\tplanMode: process.env.MAESTRO_PLAN_MODE === \"1\",\n\t\t\t\tguardianEnabled: true,\n\t\t\t}),\n\t\t},\n\t\t[CommandSuiteKey.Git]: {\n\t\t\thandleDiff: (ctx) => handlers.preview(ctx),\n\t\t\thandleReview: (ctx) => handlers.review(ctx),\n\t\t},\n\t\t[CommandSuiteKey.Auth]: {\n\t\t\thandleLogin: (ctx) => handlers.login(ctx),\n\t\t\thandleLogout: (ctx) => handlers.logout(ctx),\n\t\t\thandleSourceOfTruthPolicy: (ctx) =>\n\t\t\t\tdeps.handleAuthSourceOfTruthCommand(\n\t\t\t\t\tctx.argumentText,\n\t\t\t\t\t(msg) => ctx.showError(msg),\n\t\t\t\t\t(msg) => ctx.showInfo(msg),\n\t\t\t\t),\n\t\t\tgetAuthState: () => deps.getAuthState(),\n\t\t},\n\t\t[CommandSuiteKey.Usage]: {\n\t\t\thandleCost: (ctx) => handlers.cost(ctx),\n\t\t\thandleQuota: (ctx) => handlers.quota(ctx),\n\t\t\thandleStats: (ctx) => handlers.stats(ctx),\n\t\t},\n\t\t[CommandSuiteKey.Undo]: {\n\t\t\thandleUndo: (ctx) => handlers.undoChanges(ctx),\n\t\t\thandleCheckpoint: (ctx) => handlers.checkpoint(ctx),\n\t\t\thandleChanges: (ctx) => handlers.changes(ctx),\n\t\t\tgetUndoState: () => ({\n\t\t\t\tcanUndo: true,\n\t\t\t\tundoCount: 0,\n\t\t\t\tcheckpoints: [],\n\t\t\t}),\n\t\t},\n\t\t[CommandSuiteKey.Config]: {\n\t\t\thandleConfig: (ctx) => handlers.config(ctx),\n\t\t\thandleImport: (ctx) => handlers.importConfig(ctx),\n\t\t\thandleFramework: (ctx) => handlers.framework(ctx),\n\t\t\thandleComposer: (ctx) => handlers.composer(ctx),\n\t\t\thandleInit: (ctx) => handlers.initAgents(ctx),\n\t\t},\n\t\t[CommandSuiteKey.Tools]: {\n\t\t\thandleTools: (ctx) => handlers.tools(ctx),\n\t\t\thandleMcp: (ctx) => handlers.mcp(ctx),\n\t\t\thandleLsp: (ctx) => handlers.lsp(ctx),\n\t\t\thandleWorkflow: (ctx) => handlers.workflow(ctx),\n\t\t\thandleRun: (ctx) => handlers.run(ctx),\n\t\t\thandleCommands: (ctx) => handlers.commands(ctx),\n\t\t},\n\t});\n}\n\nfunction commandContext(rawInput: string): CommandExecutionContext {\n\treturn {\n\t\tcommand: { name: rawInput.replace(/^\\//, \"\"), description: \"\" },\n\t\trawInput,\n\t\targumentText: \"\",\n\t\tshowInfo: () => undefined,\n\t\tshowError: () => undefined,\n\t\trenderHelp: () => undefined,\n\t};\n}\n"]}
|
|
@@ -20,7 +20,7 @@ export interface InputControllerDeps {
|
|
|
20
20
|
}
|
|
21
21
|
export interface InputControllerCallbacks {
|
|
22
22
|
showInfo: (message: string) => void;
|
|
23
|
-
stopRenderer: () => void;
|
|
23
|
+
stopRenderer: () => Promise<void> | void;
|
|
24
24
|
exitProcess: (code?: number) => void;
|
|
25
25
|
}
|
|
26
26
|
export interface InputControllerOptions {
|
|
@@ -47,7 +47,7 @@ export declare class InputController {
|
|
|
47
47
|
interruptNow(options?: {
|
|
48
48
|
keepPartial?: boolean;
|
|
49
49
|
}): void;
|
|
50
|
-
handleCtrlDExit(): void
|
|
50
|
+
handleCtrlDExit(): Promise<void>;
|
|
51
51
|
prepareQueuedPayload(text: string): Promise<PromptPayload | null>;
|
|
52
52
|
submitPreparedPayload(payload: PromptPayload): boolean;
|
|
53
53
|
private preparePayload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-controller.d.ts","sourceRoot":"","sources":["../../../src/cli-tui/tui-renderer/input-controller.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,YAAY,CAAC;IACrB,eAAe,EAAE,MAAM,YAAY,CAAC;IACpC,gBAAgB,EAAE,MAAM,OAAO,CAAC;IAChC,eAAe,EAAE,MAAM,YAAY,CAAC;IAC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.(options);
|
|
54
54
|
}
|
|
55
|
-
handleCtrlDExit() {
|
|
56
|
-
this.callbacks.stopRenderer();
|
|
55
|
+
async handleCtrlDExit() {
|
|
56
|
+
await this.callbacks.stopRenderer();
|
|
57
57
|
this.callbacks.exitProcess(0);
|
|
58
58
|
}
|
|
59
59
|
async prepareQueuedPayload(text) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-controller.js","sourceRoot":"","sources":["../../../src/cli-tui/tui-renderer/input-controller.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA8BH,MAAM,OAAO,eAAe;IAM3B,YAAY,OAA+B;QAC1C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,YAAY;QACjB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC9B,IAAI,CAAC,eAAe,GAAG,CAAC,OAAsB,EAAE,EAAE;gBACjD,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;gBACjC,OAAO,CAAC,OAAO,CAAC,CAAC;YAClB,CAAC,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,oBAAoB,CACnB,QAAuD;QAEvD,IAAI,CAAC,mBAAmB,GAAG,QAAQ,CAAC;IACrC,CAAC;IAED,eAAe,CAAC,OAAmC;QAClD,IAAI,CAAC,mBAAmB,EAAE,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,IAAY;QAClC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,CAAC,OAAO,EAAE,CAAC;YACd,OAAO;QACR,CAAC;QACD,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,IAAY;QACtC,M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AAI,CAAC;QACb,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1D,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YACjD,IAAI,MAAM,YAAY,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;gBACnD,OAAO,IAAI,CAAC;YACb,CAAC;YACD,IAAI,MAAM,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC7C,OAAO,IAAI,CAAC;YACb,CAAC;QACF,CAAC;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACnD,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/C,MAAM,cAAc,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QAC9D,IAAI,CAAC,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC;QACb,CAAC;QACD,OAAO,OAAO,CAAC;IAChB,CAAC;CACD;AAED,MAAM,UAAU,qBAAqB,CACpC,OAA+B;IAE/B,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC","sourcesContent":["/**\n * InputController - Handles editor input submission and interrupt wiring.\n *\n * Keeps input lifecycle logic out of TuiRenderer while preserving behavior.\n */\n\nimport type { AutoRetryController } from \"../../agent/auto-retry.js\";\nimport type { BashModeView } from \"../bash-mode-view.js\";\nimport type { CustomEditor } from \"../custom-editor.js\";\nimport type { InterruptController } from \"../interrupt-controller.js\";\nimport type { PasteHandler } from \"../paste/paste-handler.js\";\nimport type { PromptPayload } from \"../prompt-queue.js\";\n\nexport interface InputControllerDeps {\n\teditor: CustomEditor;\n\tgetPasteHandler: () => PasteHandler;\n\tisBashModeActive: () => boolean;\n\tgetBashModeView: () => BashModeView;\n\tgetInterruptController: () => InterruptController;\n\tautoRetryController: AutoRetryController;\n\tconsumeAttachments: (text: string) => PromptPayload;\n}\n\nexport interface InputControllerCallbacks {\n\tshowInfo: (message: string) => void;\n\tstopRenderer: () => Promise<void> | void;\n\texitProcess: (code?: number) => void;\n}\n\nexport interface InputControllerOptions {\n\tdeps: InputControllerDeps;\n\tcallbacks: InputControllerCallbacks;\n}\n\nexport class InputController {\n\tprivate readonly deps: InputControllerDeps;\n\tprivate readonly callbacks: InputControllerCallbacks;\n\tprivate onInputCallback?: (payload: PromptPayload) => void;\n\tprivate onInterruptCallback?: (options?: { keepPartial?: boolean }) => void;\n\n\tconstructor(options: InputControllerOptions) {\n\t\tthis.deps = options.deps;\n\t\tthis.callbacks = options.callbacks;\n\t}\n\n\tasync getUserInput(): Promise<PromptPayload> {\n\t\treturn new Promise((resolve) => {\n\t\t\tthis.onInputCallback = (payload: PromptPayload) => {\n\t\t\t\tthis.onInputCallback = undefined;\n\t\t\t\tresolve(payload);\n\t\t\t};\n\t\t});\n\t}\n\n\tsetInterruptCallback(\n\t\tcallback: (options?: { keepPartial?: boolean }) => void,\n\t): void {\n\t\tthis.onInterruptCallback = callback;\n\t}\n\n\tnotifyInterrupt(options?: { keepPartial?: boolean }): void {\n\t\tthis.onInterruptCallback?.(options);\n\t}\n\n\tasync handleTextSubmit(text: string): Promise<void> {\n\t\tconst payload = await this.prepareQueuedPayload(text);\n\t\tif (!payload) {\n\t\t\treturn;\n\t\t}\n\t\tthis.submitPreparedPayload(payload);\n\t}\n\n\tasync handleFollowUpSubmit(text: string): Promise<boolean> {\n\t\tconst payload = await this.prepareQueuedPayload(text);\n\t\tif (!payload) {\n\t\t\treturn false;\n\t\t}\n\t\tpayload.kind = \"followUp\";\n\t\treturn this.submitPreparedPayload(payload);\n\t}\n\n\thandleInterruptRequest(): void {\n\t\tif (this.deps.autoRetryController.isRetrying()) {\n\t\t\tthis.deps.autoRetryController.abortRetry();\n\t\t}\n\t\tthis.deps.getInterruptController().handleInterruptRequest();\n\t}\n\n\thandleKeepPartialRequest(): boolean {\n\t\treturn this.deps.getInterruptController().handleKeepPartialRequest();\n\t}\n\n\tinterruptNow(options?: { keepPartial?: boolean }): void {\n\t\tif (this.deps.autoRetryController.isRetrying()) {\n\t\t\tthis.deps.autoRetryController.abortRetry();\n\t\t}\n\t\tthis.onInterruptCallback?.(options);\n\t}\n\n\tasync handleCtrlDExit(): Promise<void> {\n\t\tawait this.callbacks.stopRenderer();\n\t\tthis.callbacks.exitProcess(0);\n\t}\n\n\tasync prepareQueuedPayload(text: string): Promise<PromptPayload | null> {\n\t\tconst payload = await this.preparePayload(text);\n\t\tif (!payload) {\n\t\t\treturn null;\n\t\t}\n\t\tconst hasText = payload.text.trim().length > 0;\n\t\tif (hasText) {\n\t\t\tthis.deps.editor.addToHistory(payload.text);\n\t\t}\n\t\treturn payload;\n\t}\n\n\tsubmitPreparedPayload(payload: PromptPayload): boolean {\n\t\tif (!this.onInputCallback) {\n\t\t\treturn false;\n\t\t}\n\t\tthis.onInputCallback(payload);\n\t\treturn true;\n\t}\n\n\tprivate async preparePayload(text: string): Promise<PromptPayload | null> {\n\t\tconst pasteHandler = this.deps.getPasteHandler();\n\t\tif (pasteHandler.hasPending()) {\n\t\t\tthis.callbacks.showInfo(\n\t\t\t\t\"Still summarizing pasted content — please wait a moment.\",\n\t\t\t);\n\t\t\treturn null;\n\t\t}\n\t\tif (this.deps.isBashModeActive() || text.startsWith(\"!\")) {\n\t\t\tconst bashModeView = this.deps.getBashModeView();\n\t\t\tif (await bashModeView.tryHandleOneOffInput(text)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (await bashModeView.tryHandleInput(text)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tconst payload = this.deps.consumeAttachments(text);\n\t\tconst hasText = payload.text.trim().length > 0;\n\t\tconst hasAttachments = (payload.attachments?.length ?? 0) > 0;\n\t\tif (!hasText && !hasAttachments) {\n\t\t\treturn null;\n\t\t}\n\t\treturn payload;\n\t}\n}\n\nexport function createInputController(\n\toptions: InputControllerOptions,\n): InputController {\n\treturn new InputController(options);\n}\n"]}
|
|
@@ -58,7 +58,7 @@ export declare class UiStateController {
|
|
|
58
58
|
setHideThinkingBlocks(hidden: boolean): void;
|
|
59
59
|
toggleThinkingBlocks(): void;
|
|
60
60
|
/**
|
|
61
|
-
* Get the current UI state for display or
|
|
61
|
+
* Get the current UI state for display or command-suite handlers
|
|
62
62
|
*/
|
|
63
63
|
getState(): {
|
|
64
64
|
zenMode: boolean;
|
|
@@ -173,7 +173,7 @@ export class UiStateController {
|
|
|
173
173
|
}
|
|
174
174
|
// ─── Aggregated State ────────────────────────────────────────────────────
|
|
175
175
|
/**
|
|
176
|
-
* Get the current UI state for display or
|
|
176
|
+
* Get the current UI state for display or command-suite handlers
|
|
177
177
|
*/
|
|
178
178
|
getState() {
|
|
179
179
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-state-controller.js","sourceRoot":"","sources":["../../../src/cli-tui/tui-renderer/ui-state-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAgB,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAsB3D,MAAM,OAAO,iBAAiB;IAO7B,YAAY,OAAiC;QAC5C,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,gBAAgB,CAAC;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,iBAAiB,CAAC;QAC5C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC;QACtC,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,yBAAyB,CAAC;QAC5D,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IACpC,CA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C;IAChC,CAAC;IAED,qBAAqB,CAAC,MAAe;QACpC,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC;QACjC,IAAI,CAAC,YAAY,CAAC,EAAE,kBAAkB,EAAE,MAAM,EAAE,CAAC,CAAC;QAClD,IAAI,CAAC,SAAS,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IAED,oBAAoB;QACnB,IAAI,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACtD,CAAC;IAED,4EAA4E;IAE5E;;OAEG;IACH,QAAQ;QAKP,OAAO;YACN,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC3B,CAAC;IACH,CAAC;IAED,4EAA4E;IAEpE,YAAY,CAAC,OAAyB;QAC7C,WAAW,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC;CACD","sourcesContent":["/**\n * UiStateController - Manages TUI visual state settings\n *\n * Extracted from TuiRenderer to consolidate UI state management including:\n * - Zen mode (minimal distraction mode)\n * - Clean mode (streaming text deduplication)\n * - Footer mode (ensemble vs solo display)\n * - Thinking blocks visibility\n *\n * This controller owns the state and persistence, providing callbacks\n * for UI updates that the parent renderer implements.\n */\n\nimport type { CleanMode } from \"../../conversation/render-model.js\";\nimport { parseCleanMode } from \"../clean-mode.js\";\nimport type { CommandExecutionContext } from \"../commands/types.js\";\nimport { type UiState, saveUiState } from \"../ui-state.js\";\nimport type { FooterMode } from \"../utils/footer-utils.js\";\n\nexport interface UiStateCallbacks {\n\t/** Called when zen mode changes - update header visibility */\n\tonZenModeChange: (enabled: boolean) => void;\n\t/** Called when footer mode changes */\n\tonFooterModeChange: (mode: FooterMode) => void;\n\t/** Called when thinking blocks visibility changes */\n\tonHideThinkingBlocksChange: (hidden: boolean) => void;\n\t/** Request a render update */\n\trequestRender: () => void;\n}\n\nexport interface UiStateControllerOptions {\n\tinitialCleanMode: CleanMode;\n\tinitialFooterMode: FooterMode;\n\tinitialZenMode: boolean;\n\tinitialHideThinkingBlocks: boolean;\n\tcallbacks: UiStateCallbacks;\n}\n\nexport class UiStateController {\n\tprivate cleanMode: CleanMode;\n\tprivate footerMode: FooterMode;\n\tprivate zenMode: boolean;\n\tprivate hideThinkingBlocks: boolean;\n\tprivate readonly callbacks: UiStateCallbacks;\n\n\tconstructor(options: UiStateControllerOptions) {\n\t\tthis.cleanMode = options.initialCleanMode;\n\t\tthis.footerMode = options.initialFooterMode;\n\t\tthis.zenMode = options.initialZenMode;\n\t\tthis.hideThinkingBlocks = options.initialHideThinkingBlocks;\n\t\tthis.callbacks = options.callbacks;\n\t}\n\n\t// ─── Clean Mode ──────────────────────────────────────────────────────────\n\n\tgetCleanMode(): CleanMode {\n\t\treturn this.cleanMode;\n\t}\n\n\tsetCleanMode(mode: CleanMode): void {\n\t\tthis.cleanMode = mode;\n\t\tthis.persistState({ cleanMode: mode });\n\t}\n\n\thandleCleanCommand(context: CommandExecutionContext): void {\n\t\tconst arg = context.argumentText.trim().toLowerCase();\n\t\tif (!arg) {\n\t\t\tcontext.showInfo(\n\t\t\t\t`Clean mode is ${this.cleanMode} (streaming only). Use /clean off|soft|aggressive.`,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst parsed = parseCleanMode(arg);\n\t\tif (!parsed) {\n\t\t\tcontext.showError(\"Usage: /clean [off|soft|aggressive]\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setCleanMode(parsed);\n\t\tcontext.showInfo(\n\t\t\t`Clean mode set to ${parsed}. Dedupe applies only while text streams; transcripts stay raw.`,\n\t\t);\n\t}\n\n\t// ─── Zen Mode ────────────────────────────────────────────────────────────\n\n\tgetZenMode(): boolean {\n\t\treturn this.zenMode;\n\t}\n\n\tsetZenMode(enabled: boolean): void {\n\t\tthis.zenMode = enabled;\n\t\tthis.persistState({ zenMode: enabled });\n\t\tthis.callbacks.onZenModeChange(enabled);\n\t\tthis.callbacks.requestRender();\n\t}\n\n\thandleZenCommand(context: CommandExecutionContext): void {\n\t\tconst arg = context.argumentText.trim().toLowerCase();\n\t\tif (!arg) {\n\t\t\tconst newState = !this.zenMode;\n\t\t\tthis.setZenMode(newState);\n\t\t\tcontext.showInfo(\n\t\t\t\tnewState\n\t\t\t\t\t? \"Zen mode enabled. Distractions removed.\"\n\t\t\t\t\t: \"Zen mode disabled.\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tif (arg === \"on\") {\n\t\t\tif (this.zenMode) {\n\t\t\t\tcontext.showInfo(\"Zen mode is already on.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.setZenMode(true);\n\t\t\tcontext.showInfo(\"Zen mode enabled. Distractions removed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (arg === \"off\") {\n\t\t\tif (!this.zenMode) {\n\t\t\t\tcontext.showInfo(\"Zen mode is already off.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.setZenMode(false);\n\t\t\tcontext.showInfo(\"Zen mode disabled.\");\n\t\t\treturn;\n\t\t}\n\t\tcontext.showError(\"Usage: /zen [on|off]\");\n\t}\n\n\t// ─── Footer Mode ─────────────────────────────────────────────────────────\n\n\tgetFooterMode(): FooterMode {\n\t\treturn this.footerMode;\n\t}\n\n\tsetFooterMode(mode: FooterMode): void {\n\t\tif (this.zenMode) {\n\t\t\t// Zen mode owns the footer; ignore external mode changes\n\t\t\treturn;\n\t\t}\n\t\tthis.footerMode = mode;\n\t\tthis.persistState({ footerMode: mode });\n\t\tthis.callbacks.onFooterModeChange(mode);\n\t\tthis.callbacks.requestRender();\n\t}\n\n\thandleFooterCommand(\n\t\tcontext: CommandExecutionContext,\n\t\tfooterApi: {\n\t\t\tgetToastHistory: (\n\t\t\t\tcount: number,\n\t\t\t) => Array<{ tone: string; message: string }>;\n\t\t\tclearAlerts: () => void;\n\t\t},\n\t): void {\n\t\tif (this.zenMode) {\n\t\t\tcontext.showInfo(\n\t\t\t\t'Footer mode is controlled by Zen mode. Turn Zen off with \"/zen off\" to change the footer style.',\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst tokens = context.argumentText\n\t\t\t.trim()\n\t\t\t.toLowerCase()\n\t\t\t.split(/\\s+/)\n\t\t\t.filter((token) => token.length > 0);\n\n\t\tif (tokens.length === 0 || tokens[0] === \"help\") {\n\t\t\tcontext.showInfo(\n\t\t\t\t`Footer mode is ${this.describeFooterMode(this.footerMode)}. Use \"/footer ensemble\" for the full Maestro Ensemble or \"/footer solo\" for the minimal Solo style.`,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tif (tokens[0] === \"history\") {\n\t\t\tconst history = footerApi\n\t\t\t\t.getToastHistory(5)\n\t\t\t\t.map((t) => `${t.tone}: ${t.message}`)\n\t\t\t\t.join(\"\\n\");\n\t\t\tcontext.showInfo(history || \"No recent footer alerts (toasts).\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (tokens[0] === \"clear\") {\n\t\t\tfooterApi.clearAlerts();\n\t\t\tcontext.showInfo(\"Footer alerts cleared.\");\n\t\t\tthis.callbacks.requestRender();\n\t\t\treturn;\n\t\t}\n\n\t\tlet candidate = tokens[0];\n\t\tif (candidate === \"mode\" || candidate === \"set\" || candidate === \"style\") {\n\t\t\tcandidate = tokens[1] ?? \"\";\n\t\t}\n\t\tconst parsed = this.parseFooterMode(candidate ?? \"\");\n\t\tif (!parsed) {\n\t\t\tcontext.showError(\n\t\t\t\t\"Footer mode must be either 'ensemble' (rich) or 'solo' (minimal).\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tif (parsed === this.footerMode) {\n\t\t\tcontext.showInfo(\n\t\t\t\t`Footer already using ${this.describeFooterMode(parsed)} mode.`,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tthis.setFooterMode(parsed);\n\t\tcontext.showInfo(\n\t\t\t`Footer switched to ${this.describeFooterMode(parsed)} mode.`,\n\t\t);\n\t}\n\n\tprivate parseFooterMode(value: string): FooterMode | null {\n\t\tswitch (value) {\n\t\t\tcase \"ensemble\":\n\t\t\tcase \"rich\":\n\t\t\tcase \"classic\":\n\t\t\tcase \"full\":\n\t\t\t\treturn \"ensemble\";\n\t\t\tcase \"solo\":\n\t\t\tcase \"minimal\":\n\t\t\tcase \"lean\":\n\t\t\tcase \"lite\":\n\t\t\t\treturn \"solo\";\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}\n\n\tprivate describeFooterMode(mode: FooterMode): string {\n\t\treturn mode === \"ensemble\" ? \"Ensemble (rich)\" : \"Solo (minimal)\";\n\t}\n\n\t// ─── Thinking Blocks ─────────────────────────────────────────────────────\n\n\tgetHideThinkingBlocks(): boolean {\n\t\treturn this.hideThinkingBlocks;\n\t}\n\n\tsetHideThinkingBlocks(hidden: boolean): void {\n\t\tthis.hideThinkingBlocks = hidden;\n\t\tthis.persistState({ hideThinkingBlocks: hidden });\n\t\tthis.callbacks.onHideThinkingBlocksChange(hidden);\n\t}\n\n\ttoggleThinkingBlocks(): void {\n\t\tthis.setHideThinkingBlocks(!this.hideThinkingBlocks);\n\t}\n\n\t// ─── Aggregated State ────────────────────────────────────────────────────\n\n\t/**\n\t * Get the current UI state for display or grouped command handlers\n\t */\n\tgetState(): {\n\t\tzenMode: boolean;\n\t\tcleanMode: CleanMode;\n\t\tfooterMode: FooterMode;\n\t} {\n\t\treturn {\n\t\t\tzenMode: this.zenMode,\n\t\t\tcleanMode: this.cleanMode,\n\t\t\tfooterMode: this.footerMode,\n\t\t};\n\t}\n\n\t// ─── Persistence ─────────────────────────────────────────────────────────\n\n\tprivate persistState(partial: Partial<UiState>): void {\n\t\tsaveUiState(partial);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ui-state-controller.js","sourceRoot":"","sources":["../../../src/cli-tui/tui-renderer/ui-state-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,cAAc,EAAE,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AK,SAAS,CAAC;YACf,KAAK,MAAM;gBACV,OAAO,UAAU,CAAC;YACnB,KAAK,MAAM,CAAC;YACZ,KAAK,SAAS,CAAC;YACf,KAAK,MAAM,CAAC;YACZ,KAAK,MAAM;gBACV,OAAO,MAAM,CAAC;YACf;gBACC,OAAO,IAAI,CAAC;QACd,CAAC;IACF,CAAC;IAEO,kBAAkB,CAAC,IAAgB;QAC1C,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,gBAAgB,CAAC;IACnE,CAAC;IAED,4EAA4E;IAE5E,qBAAqB;QACpB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IAChC,CAAC;IAED,qBAAqB,CAAC,MAAe;QACpC,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC;QACjC,IAAI,CAAC,YAAY,CAAC,EAAE,kBAAkB,EAAE,MAAM,EAAE,CAAC,CAAC;QAClD,IAAI,CAAC,SAAS,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IAED,oBAAoB;QACnB,IAAI,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACtD,CAAC;IAED,4EAA4E;IAE5E;;OAEG;IACH,QAAQ;QAKP,OAAO;YACN,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC3B,CAAC;IACH,CAAC;IAED,4EAA4E;IAEpE,YAAY,CAAC,OAAyB;QAC7C,WAAW,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC;CACD","sourcesContent":["/**\n * UiStateController - Manages TUI visual state settings\n *\n * Extracted from TuiRenderer to consolidate UI state management including:\n * - Zen mode (minimal distraction mode)\n * - Clean mode (streaming text deduplication)\n * - Footer mode (ensemble vs solo display)\n * - Thinking blocks visibility\n *\n * This controller owns the state and persistence, providing callbacks\n * for UI updates that the parent renderer implements.\n */\n\nimport type { CleanMode } from \"../../conversation/render-model.js\";\nimport { parseCleanMode } from \"../clean-mode.js\";\nimport type { CommandExecutionContext } from \"../commands/types.js\";\nimport { type UiState, saveUiState } from \"../ui-state.js\";\nimport type { FooterMode } from \"../utils/footer-utils.js\";\n\nexport interface UiStateCallbacks {\n\t/** Called when zen mode changes - update header visibility */\n\tonZenModeChange: (enabled: boolean) => void;\n\t/** Called when footer mode changes */\n\tonFooterModeChange: (mode: FooterMode) => void;\n\t/** Called when thinking blocks visibility changes */\n\tonHideThinkingBlocksChange: (hidden: boolean) => void;\n\t/** Request a render update */\n\trequestRender: () => void;\n}\n\nexport interface UiStateControllerOptions {\n\tinitialCleanMode: CleanMode;\n\tinitialFooterMode: FooterMode;\n\tinitialZenMode: boolean;\n\tinitialHideThinkingBlocks: boolean;\n\tcallbacks: UiStateCallbacks;\n}\n\nexport class UiStateController {\n\tprivate cleanMode: CleanMode;\n\tprivate footerMode: FooterMode;\n\tprivate zenMode: boolean;\n\tprivate hideThinkingBlocks: boolean;\n\tprivate readonly callbacks: UiStateCallbacks;\n\n\tconstructor(options: UiStateControllerOptions) {\n\t\tthis.cleanMode = options.initialCleanMode;\n\t\tthis.footerMode = options.initialFooterMode;\n\t\tthis.zenMode = options.initialZenMode;\n\t\tthis.hideThinkingBlocks = options.initialHideThinkingBlocks;\n\t\tthis.callbacks = options.callbacks;\n\t}\n\n\t// ─── Clean Mode ──────────────────────────────────────────────────────────\n\n\tgetCleanMode(): CleanMode {\n\t\treturn this.cleanMode;\n\t}\n\n\tsetCleanMode(mode: CleanMode): void {\n\t\tthis.cleanMode = mode;\n\t\tthis.persistState({ cleanMode: mode });\n\t}\n\n\thandleCleanCommand(context: CommandExecutionContext): void {\n\t\tconst arg = context.argumentText.trim().toLowerCase();\n\t\tif (!arg) {\n\t\t\tcontext.showInfo(\n\t\t\t\t`Clean mode is ${this.cleanMode} (streaming only). Use /clean off|soft|aggressive.`,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst parsed = parseCleanMode(arg);\n\t\tif (!parsed) {\n\t\t\tcontext.showError(\"Usage: /clean [off|soft|aggressive]\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setCleanMode(parsed);\n\t\tcontext.showInfo(\n\t\t\t`Clean mode set to ${parsed}. Dedupe applies only while text streams; transcripts stay raw.`,\n\t\t);\n\t}\n\n\t// ─── Zen Mode ────────────────────────────────────────────────────────────\n\n\tgetZenMode(): boolean {\n\t\treturn this.zenMode;\n\t}\n\n\tsetZenMode(enabled: boolean): void {\n\t\tthis.zenMode = enabled;\n\t\tthis.persistState({ zenMode: enabled });\n\t\tthis.callbacks.onZenModeChange(enabled);\n\t\tthis.callbacks.requestRender();\n\t}\n\n\thandleZenCommand(context: CommandExecutionContext): void {\n\t\tconst arg = context.argumentText.trim().toLowerCase();\n\t\tif (!arg) {\n\t\t\tconst newState = !this.zenMode;\n\t\t\tthis.setZenMode(newState);\n\t\t\tcontext.showInfo(\n\t\t\t\tnewState\n\t\t\t\t\t? \"Zen mode enabled. Distractions removed.\"\n\t\t\t\t\t: \"Zen mode disabled.\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tif (arg === \"on\") {\n\t\t\tif (this.zenMode) {\n\t\t\t\tcontext.showInfo(\"Zen mode is already on.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.setZenMode(true);\n\t\t\tcontext.showInfo(\"Zen mode enabled. Distractions removed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (arg === \"off\") {\n\t\t\tif (!this.zenMode) {\n\t\t\t\tcontext.showInfo(\"Zen mode is already off.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.setZenMode(false);\n\t\t\tcontext.showInfo(\"Zen mode disabled.\");\n\t\t\treturn;\n\t\t}\n\t\tcontext.showError(\"Usage: /zen [on|off]\");\n\t}\n\n\t// ─── Footer Mode ─────────────────────────────────────────────────────────\n\n\tgetFooterMode(): FooterMode {\n\t\treturn this.footerMode;\n\t}\n\n\tsetFooterMode(mode: FooterMode): void {\n\t\tif (this.zenMode) {\n\t\t\t// Zen mode owns the footer; ignore external mode changes\n\t\t\treturn;\n\t\t}\n\t\tthis.footerMode = mode;\n\t\tthis.persistState({ footerMode: mode });\n\t\tthis.callbacks.onFooterModeChange(mode);\n\t\tthis.callbacks.requestRender();\n\t}\n\n\thandleFooterCommand(\n\t\tcontext: CommandExecutionContext,\n\t\tfooterApi: {\n\t\t\tgetToastHistory: (\n\t\t\t\tcount: number,\n\t\t\t) => Array<{ tone: string; message: string }>;\n\t\t\tclearAlerts: () => void;\n\t\t},\n\t): void {\n\t\tif (this.zenMode) {\n\t\t\tcontext.showInfo(\n\t\t\t\t'Footer mode is controlled by Zen mode. Turn Zen off with \"/zen off\" to change the footer style.',\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst tokens = context.argumentText\n\t\t\t.trim()\n\t\t\t.toLowerCase()\n\t\t\t.split(/\\s+/)\n\t\t\t.filter((token) => token.length > 0);\n\n\t\tif (tokens.length === 0 || tokens[0] === \"help\") {\n\t\t\tcontext.showInfo(\n\t\t\t\t`Footer mode is ${this.describeFooterMode(this.footerMode)}. Use \"/footer ensemble\" for the full Maestro Ensemble or \"/footer solo\" for the minimal Solo style.`,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tif (tokens[0] === \"history\") {\n\t\t\tconst history = footerApi\n\t\t\t\t.getToastHistory(5)\n\t\t\t\t.map((t) => `${t.tone}: ${t.message}`)\n\t\t\t\t.join(\"\\n\");\n\t\t\tcontext.showInfo(history || \"No recent footer alerts (toasts).\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (tokens[0] === \"clear\") {\n\t\t\tfooterApi.clearAlerts();\n\t\t\tcontext.showInfo(\"Footer alerts cleared.\");\n\t\t\tthis.callbacks.requestRender();\n\t\t\treturn;\n\t\t}\n\n\t\tlet candidate = tokens[0];\n\t\tif (candidate === \"mode\" || candidate === \"set\" || candidate === \"style\") {\n\t\t\tcandidate = tokens[1] ?? \"\";\n\t\t}\n\t\tconst parsed = this.parseFooterMode(candidate ?? \"\");\n\t\tif (!parsed) {\n\t\t\tcontext.showError(\n\t\t\t\t\"Footer mode must be either 'ensemble' (rich) or 'solo' (minimal).\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tif (parsed === this.footerMode) {\n\t\t\tcontext.showInfo(\n\t\t\t\t`Footer already using ${this.describeFooterMode(parsed)} mode.`,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tthis.setFooterMode(parsed);\n\t\tcontext.showInfo(\n\t\t\t`Footer switched to ${this.describeFooterMode(parsed)} mode.`,\n\t\t);\n\t}\n\n\tprivate parseFooterMode(value: string): FooterMode | null {\n\t\tswitch (value) {\n\t\t\tcase \"ensemble\":\n\t\t\tcase \"rich\":\n\t\t\tcase \"classic\":\n\t\t\tcase \"full\":\n\t\t\t\treturn \"ensemble\";\n\t\t\tcase \"solo\":\n\t\t\tcase \"minimal\":\n\t\t\tcase \"lean\":\n\t\t\tcase \"lite\":\n\t\t\t\treturn \"solo\";\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}\n\n\tprivate describeFooterMode(mode: FooterMode): string {\n\t\treturn mode === \"ensemble\" ? \"Ensemble (rich)\" : \"Solo (minimal)\";\n\t}\n\n\t// ─── Thinking Blocks ─────────────────────────────────────────────────────\n\n\tgetHideThinkingBlocks(): boolean {\n\t\treturn this.hideThinkingBlocks;\n\t}\n\n\tsetHideThinkingBlocks(hidden: boolean): void {\n\t\tthis.hideThinkingBlocks = hidden;\n\t\tthis.persistState({ hideThinkingBlocks: hidden });\n\t\tthis.callbacks.onHideThinkingBlocksChange(hidden);\n\t}\n\n\ttoggleThinkingBlocks(): void {\n\t\tthis.setHideThinkingBlocks(!this.hideThinkingBlocks);\n\t}\n\n\t// ─── Aggregated State ────────────────────────────────────────────────────\n\n\t/**\n\t * Get the current UI state for display or command-suite handlers\n\t */\n\tgetState(): {\n\t\tzenMode: boolean;\n\t\tcleanMode: CleanMode;\n\t\tfooterMode: FooterMode;\n\t} {\n\t\treturn {\n\t\t\tzenMode: this.zenMode,\n\t\t\tcleanMode: this.cleanMode,\n\t\t\tfooterMode: this.footerMode,\n\t\t};\n\t}\n\n\t// ─── Persistence ─────────────────────────────────────────────────────────\n\n\tprivate persistState(partial: Partial<UiState>): void {\n\t\tsaveUiState(partial);\n\t}\n}\n"]}
|
|
@@ -124,7 +124,6 @@ export declare class TuiRenderer {
|
|
|
124
124
|
private interruptController;
|
|
125
125
|
private pasteHandler;
|
|
126
126
|
private miscHandlers;
|
|
127
|
-
private groupedHandlers?;
|
|
128
127
|
private uiStateController;
|
|
129
128
|
private quickSettingsController;
|
|
130
129
|
private branchController?;
|
|
@@ -230,8 +229,7 @@ export declare class TuiRenderer {
|
|
|
230
229
|
private loadImportedSession;
|
|
231
230
|
private isMinimalMode;
|
|
232
231
|
private showPerfReport;
|
|
233
|
-
|
|
234
|
-
stop(): void;
|
|
232
|
+
stop(): Promise<void>;
|
|
235
233
|
/**
|
|
236
234
|
* Get the actual OAuth authentication state by checking stored credentials.
|
|
237
235
|
* Returns info about which provider the user is authenticated with.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tui-renderer.d.ts","sourceRoot":"","sources":["../../src/cli-tui/tui-renderer.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAGX,qBAAqB,EACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAGX,gBAAgB,EAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAQ7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"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RegistryOptions } from "./tui-renderer/command-registry-
|
|
|
67
67
|
import { buildTuiCommandRegistry } from "./tui-renderer/command-registry.js";
|
|
68
68
|
import { createDelegatingCommandHandlers, } from "./tui-renderer/delegating-command-handlers.js";
|
|
69
69
|
import { createFooterHintsController, } from "./tui-renderer/footer-hints-controller.js";
|
|
70
|
-
import { buildGroupedCommandHandlers } from "./tui-renderer/grouped-handlers-wiring.js";
|
|
71
70
|
import { createHistoryController, } from "./tui-renderer/history-controller.js";
|
|
72
71
|
import { createHookUiController, } from "./tui-renderer/hook-ui-controller.js";
|
|
73
72
|
import { createMiscHandlers, } from "./tui-renderer/misc-handlers.js";
|
|
@@ -591,7 +590,9 @@ export class TuiRenderer {
|
|
|
591
590
|
notifyFileChanges: () => this.gitView.notifyFileChanges(),
|
|
592
591
|
inMinimalMode: () => this.isMinimalMode(),
|
|
593
592
|
});
|
|
594
|
-
this.ui.setInterruptHandler(() =>
|
|
593
|
+
this.ui.setInterruptHandler(() => {
|
|
594
|
+
void this.handleCtrlC();
|
|
595
|
+
});
|
|
595
596
|
const sessionSubsystem = createSessionSubsystem({
|
|
596
597
|
agent: this.agent,
|
|
597
598
|
sessionManager: this.sessionManager,
|
|
@@ -832,10 +833,28 @@ export class TuiRenderer {
|
|
|
832
833
|
handleCheckpointCommand: (context) => this.delegatingHandlers.handleCheckpointCommand(context),
|
|
833
834
|
handleMemoryCommand: (context) => this.delegatingHandlers.handleMemoryCommand(context),
|
|
834
835
|
handleModeCommand: (context) => this.delegatingHandlers.handleModeCommand(context),
|
|
835
|
-
|
|
836
|
+
commandSuite: {
|
|
837
|
+
getUiState: () => ({
|
|
838
|
+
...this.uiStateController.getState(),
|
|
839
|
+
compactTools: this.toolOutputView?.isCompact() ?? false,
|
|
840
|
+
}),
|
|
841
|
+
getAuthState: () => this.getActualAuthState(),
|
|
842
|
+
handleSessionRecoverCommand: (context) => this.sessionStateController.handleSessionRecoverCommand(context),
|
|
843
|
+
handleSessionCleanupCommand: (context) => {
|
|
844
|
+
const result = this.sessionManager.pruneSessions();
|
|
845
|
+
if (result.removed === 0) {
|
|
846
|
+
context.showInfo("No sessions to prune.");
|
|
847
|
+
return;
|
|
848
|
+
}
|
|
849
|
+
context.showInfo(`Pruned ${result.removed} session(s).${result.errors > 0 ? ` ${result.errors} error(s).` : ""}`);
|
|
850
|
+
},
|
|
851
|
+
handleSourcesCommand: (context) => this.delegatingHandlers.handleSourcesCommand(context),
|
|
852
|
+
handlePerfCommand: () => this.showPerfReport(),
|
|
853
|
+
handleAuthSourceOfTruthCommand: (argumentText, showError, showInfo) => this.oauthFlowController.handleSourceOfTruthPolicyCommand(argumentText, showError, showInfo),
|
|
854
|
+
},
|
|
836
855
|
refreshFooterHint: () => this.refreshFooterHint(),
|
|
837
|
-
onQuit: () => {
|
|
838
|
-
this.stop();
|
|
856
|
+
onQuit: async () => {
|
|
857
|
+
await this.stop();
|
|
839
858
|
process.exit(0);
|
|
840
859
|
},
|
|
841
860
|
}),
|
|
@@ -914,8 +933,12 @@ export class TuiRenderer {
|
|
|
914
933
|
shouldInterrupt: () => this.isAgentRunning || this.interruptController.isArmed(),
|
|
915
934
|
onInterrupt: () => this.inputController.handleInterruptRequest(),
|
|
916
935
|
onKeepPartial: () => this.inputController.handleKeepPartialRequest(),
|
|
917
|
-
onCtrlC: () =>
|
|
918
|
-
|
|
936
|
+
onCtrlC: () => {
|
|
937
|
+
void this.handleCtrlC();
|
|
938
|
+
},
|
|
939
|
+
onCtrlD: () => {
|
|
940
|
+
void this.inputController.handleCtrlDExit();
|
|
941
|
+
},
|
|
919
942
|
showCommandPalette: () => this.getCommandPaletteView().showCommandPalette(),
|
|
920
943
|
showFileSearch: () => this.getFileSearchView().showFileSearch(),
|
|
921
944
|
onEditLastQueuedFollowUp: () => this.editLastQueuedFollowUp(),
|
|
@@ -1428,7 +1451,7 @@ export class TuiRenderer {
|
|
|
1428
1451
|
setInterruptCallback(callback) {
|
|
1429
1452
|
this.inputController.setInterruptCallback(callback);
|
|
1430
1453
|
}
|
|
1431
|
-
handleCtrlC() {
|
|
1454
|
+
async handleCtrlC() {
|
|
1432
1455
|
const bashModeView = this.bashModeView;
|
|
1433
1456
|
if (bashModeView?.isCommandRunning()) {
|
|
1434
1457
|
if (bashModeView.abortCurrentCommand()) {
|
|
@@ -1436,7 +1459,7 @@ export class TuiRenderer {
|
|
|
1436
1459
|
return;
|
|
1437
1460
|
}
|
|
1438
1461
|
}
|
|
1439
|
-
this.runController.handleCtrlC();
|
|
1462
|
+
await this.runController.handleCtrlC();
|
|
1440
1463
|
}
|
|
1441
1464
|
renderHeader() {
|
|
1442
1465
|
this.headerContainer.clear();
|
|
@@ -1950,80 +1973,11 @@ export class TuiRenderer {
|
|
|
1950
1973
|
const snap = this.perfCollector.snapshot();
|
|
1951
1974
|
this.notificationView.showInfo(formatPerfReport(snap));
|
|
1952
1975
|
}
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
approvalService: this.approvalService,
|
|
1959
|
-
requestRender: () => this.ui.requestRender(),
|
|
1960
|
-
refreshFooterHint: () => this.refreshFooterHint(),
|
|
1961
|
-
addSpacedText: (text) => {
|
|
1962
|
-
this.chatContainer.addChild(new Spacer(1));
|
|
1963
|
-
this.chatContainer.addChild(new Text(text, 1, 0));
|
|
1964
|
-
},
|
|
1965
|
-
handleNewChatCommand: (ctx) => this.sessionStateController.handleNewChatCommand(ctx),
|
|
1966
|
-
handleClearCommand: () => this.getClearController().handleClearCommand(),
|
|
1967
|
-
handleSessionCommand: (rawInput) => this.sessionView.handleSessionCommand(rawInput),
|
|
1968
|
-
handleSessionsCommand: (rawInput) => this.sessionView.handleSessionsCommand(rawInput),
|
|
1969
|
-
handleBranchCommand: (ctx) => this.getBranchController().handleBranchCommand(ctx),
|
|
1970
|
-
showTree: () => this.getTreeSelectorView().show(),
|
|
1971
|
-
handleQueueCommand: (ctx) => {
|
|
1972
|
-
const queuePanelController = this.getQueuePanelController();
|
|
1973
|
-
if (queuePanelController) {
|
|
1974
|
-
queuePanelController.handleQueueCommand(ctx);
|
|
1975
|
-
return;
|
|
1976
|
-
}
|
|
1977
|
-
ctx.showInfo("Prompt queue is not available.");
|
|
1978
|
-
},
|
|
1979
|
-
handleExportCommand: (rawInput) => this.getImportExportView().handleExportCommand(rawInput),
|
|
1980
|
-
handleShareCommand: (rawInput) => this.getImportExportView().handleShareCommand(rawInput),
|
|
1981
|
-
handleSessionRecoverCommand: (ctx) => this.sessionStateController.handleSessionRecoverCommand(ctx),
|
|
1982
|
-
handleSessionCleanupCommand: (ctx) => {
|
|
1983
|
-
const result = this.sessionManager.pruneSessions();
|
|
1984
|
-
if (result.removed === 0) {
|
|
1985
|
-
ctx.showInfo("No sessions to prune.");
|
|
1986
|
-
}
|
|
1987
|
-
else {
|
|
1988
|
-
ctx.showInfo(`Pruned ${result.removed} session(s).${result.errors > 0 ? ` ${result.errors} error(s).` : ""}`);
|
|
1989
|
-
}
|
|
1990
|
-
},
|
|
1991
|
-
handleStatusCommand: () => this.getDiagnosticsView().handleStatusCommand(),
|
|
1992
|
-
handleAboutCommand: () => this.getAboutView().handleAboutCommand(),
|
|
1993
|
-
handleContextCommand: (ctx) => this.handleContextCommand(ctx),
|
|
1994
|
-
handleStatsCommand: (ctx) => this.handleStatsCommand(ctx),
|
|
1995
|
-
handleBackgroundCommand: (ctx) => this.backgroundTasksController.handleBackgroundCommand(ctx),
|
|
1996
|
-
handleDiagnosticsCommand: (rawInput) => this.getDiagnosticsView().handleDiagnosticsCommand(rawInput),
|
|
1997
|
-
handleTelemetryCommand: (ctx) => this.getTelemetryView().handleTelemetryCommand(ctx),
|
|
1998
|
-
handleTrainingCommand: (ctx) => this.getTrainingView().handleTrainingCommand(ctx),
|
|
1999
|
-
handleConfigCommand: (ctx) => this.getConfigView().handleConfigCommand(ctx),
|
|
2000
|
-
handleLspCommand: (rawInput) => this.getLspView().handleLspCommand(rawInput),
|
|
2001
|
-
handlePerfCommand: () => this.showPerfReport(),
|
|
2002
|
-
showTheme: () => this.getThemeSelectorView().show(),
|
|
2003
|
-
handleCleanCommand: (ctx) => this.uiStateController.handleCleanCommand(ctx),
|
|
2004
|
-
handleFooterCommand: (ctx) => this.handleFooterCommand(ctx),
|
|
2005
|
-
handleZenCommand: (ctx) => this.uiStateController.handleZenCommand(ctx),
|
|
2006
|
-
handleCompactToolsCommand: (ctx) => this.handleCompactToolsCommand(ctx.rawInput),
|
|
2007
|
-
getUiState: () => ({
|
|
2008
|
-
...this.uiStateController.getState(),
|
|
2009
|
-
compactTools: this.toolOutputView?.isCompact() ?? false,
|
|
2010
|
-
}),
|
|
2011
|
-
handleDiffCommand: (rawInput) => this.gitView.handlePreviewCommand(rawInput),
|
|
2012
|
-
handleReviewCommand: (ctx) => this.handleReviewCommand(ctx),
|
|
2013
|
-
handleLoginCommand: (argumentText, showError) => this.oauthFlowController.handleLoginCommand(argumentText, showError),
|
|
2014
|
-
handleLogoutCommand: (argumentText, showError, showInfo) => this.oauthFlowController.handleLogoutCommand(argumentText, showError, showInfo),
|
|
2015
|
-
getAuthState: () => this.getActualAuthState(),
|
|
2016
|
-
handleCostCommand: (ctx) => this.getCostView().handleCostCommand(ctx),
|
|
2017
|
-
handleQuotaCommand: (ctx) => this.getQuotaView().handleQuotaCommand(ctx),
|
|
2018
|
-
handleImportCommand: (rawInput) => this.getImportExportView().handleImportCommand(rawInput),
|
|
2019
|
-
handleToolsCommand: (rawInput) => this.getToolStatusView().handleToolsCommand(rawInput),
|
|
2020
|
-
handleRunCommand: (rawInput) => this.getRunCommandView().handleRunCommand(rawInput),
|
|
2021
|
-
handleCommandsCommand: (ctx) => this.getCustomCommandsController().handleCommandsCommand(ctx),
|
|
2022
|
-
});
|
|
2023
|
-
}
|
|
2024
|
-
return this.groupedHandlers;
|
|
2025
|
-
}
|
|
2026
|
-
stop() {
|
|
1976
|
+
async stop() {
|
|
1977
|
+
await this.agentEventBridge?.recordSessionClosed({
|
|
1978
|
+
closeReason: "MAESTRO_CLOSE_REASON_USER_STOPPED",
|
|
1979
|
+
closeMessage: "TUI stopped",
|
|
1980
|
+
});
|
|
2027
1981
|
this.slashHintController?.dispose();
|
|
2028
1982
|
this.loaderView.stop();
|
|
2029
1983
|
this.backgroundTasksController.stop();
|