@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,631 @@
|
|
|
1
|
+
import { headlessProtocolVersion } from "@evalops/contracts";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { getPackageVersion } from "../../package-metadata.js";
|
|
4
|
+
import { attachToRemoteRunnerSession, shouldUseInteractiveRemoteAttach, } from "../../remote-runner/attach-client.js";
|
|
5
|
+
import { DEFAULT_REMOTE_RUNNER_WAIT_POLL_INTERVAL_MS, DEFAULT_REMOTE_RUNNER_WAIT_TIMEOUT_MS, RUNNER_ATTACH_ROLES, createRunnerSession, extendRunnerSession, getRemoteRunnerStatus, getRunnerSession, listRunnerSessionEvents, listRunnerSessions, mintRunnerAttachToken, remoteRunnerGatewayBaseUrl, resolveRemoteRunnerConfig, revokeRunnerAttachToken, stopRunnerSession, verifyRunnerHeadlessAttach, waitForRunnerSessionReady, } from "../../remote-runner/client.js";
|
|
6
|
+
const REMOTE_USAGE = `maestro remote <command> [options]
|
|
7
|
+
|
|
8
|
+
Commands:
|
|
9
|
+
start --workspace <id> --repo <repo> --branch <branch> [--ttl 90m] [--profile standard] [--wait] [--wait-timeout 5m] [--poll-interval 5s] [--verify]
|
|
10
|
+
list --workspace <id> [--state running] [--limit 20]
|
|
11
|
+
status --workspace <id>
|
|
12
|
+
get <session-id>
|
|
13
|
+
events <session-id> [--after <sequence>] [--limit 50]
|
|
14
|
+
extend <session-id> --ttl 2h [--idle-ttl 30m]
|
|
15
|
+
stop <session-id> [--reason <text>]
|
|
16
|
+
attach <session-id> [--role controller] [--ttl 30m] [--verify] [--print-env]
|
|
17
|
+
attach-token <session-id> [--role viewer] [--ttl 30m] [--json]
|
|
18
|
+
revoke-token <session-id> <token-id>
|
|
19
|
+
target <session-id>
|
|
20
|
+
|
|
21
|
+
Shared options:
|
|
22
|
+
--base-url <url> Remote runner URL (defaults to https://runner.evalops.dev)
|
|
23
|
+
--org <id> EvalOps organization id
|
|
24
|
+
--workspace <id> EvalOps workspace id
|
|
25
|
+
--token <token> EvalOps access token
|
|
26
|
+
--json Print machine-readable JSON
|
|
27
|
+
--help Show this help`;
|
|
28
|
+
function parseRemoteOptions(args) {
|
|
29
|
+
const flags = new Map();
|
|
30
|
+
const positionals = [];
|
|
31
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
32
|
+
const arg = args[index];
|
|
33
|
+
if (!arg) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (arg === "--") {
|
|
37
|
+
positionals.push(...args.slice(index + 1));
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
if (!arg.startsWith("--")) {
|
|
41
|
+
positionals.push(arg);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const equalsIndex = arg.indexOf("=");
|
|
45
|
+
const key = equalsIndex >= 0 ? arg.slice(2, equalsIndex) : arg.slice(2);
|
|
46
|
+
const inlineValue = equalsIndex >= 0 ? arg.slice(equalsIndex + 1) : undefined;
|
|
47
|
+
const next = args[index + 1];
|
|
48
|
+
const value = inlineValue !== undefined
|
|
49
|
+
? inlineValue
|
|
50
|
+
: next && !next.startsWith("--")
|
|
51
|
+
? next
|
|
52
|
+
: true;
|
|
53
|
+
if (inlineValue === undefined && value !== true) {
|
|
54
|
+
index += 1;
|
|
55
|
+
}
|
|
56
|
+
const values = flags.get(key) ?? [];
|
|
57
|
+
values.push(value);
|
|
58
|
+
flags.set(key, values);
|
|
59
|
+
}
|
|
60
|
+
return { flags, positionals };
|
|
61
|
+
}
|
|
62
|
+
function hasFlag(options, name) {
|
|
63
|
+
return options.flags.has(name);
|
|
64
|
+
}
|
|
65
|
+
function getFlag(options, ...names) {
|
|
66
|
+
for (const name of names) {
|
|
67
|
+
const values = options.flags.get(name);
|
|
68
|
+
const last = values?.at(-1);
|
|
69
|
+
if (typeof last === "string" && last.trim().length > 0) {
|
|
70
|
+
return last.trim();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
function getRepeatedFlag(options, ...names) {
|
|
76
|
+
const values = [];
|
|
77
|
+
for (const name of names) {
|
|
78
|
+
for (const value of options.flags.get(name) ?? []) {
|
|
79
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
80
|
+
values.push(value.trim());
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return values;
|
|
85
|
+
}
|
|
86
|
+
function parseIntFlag(options, name, fallback) {
|
|
87
|
+
const raw = getFlag(options, name);
|
|
88
|
+
if (!raw) {
|
|
89
|
+
return fallback;
|
|
90
|
+
}
|
|
91
|
+
const parsed = Number.parseInt(raw, 10);
|
|
92
|
+
if (!Number.isInteger(parsed) || parsed < 0) {
|
|
93
|
+
throw new Error(`--${name} must be a non-negative integer`);
|
|
94
|
+
}
|
|
95
|
+
return parsed;
|
|
96
|
+
}
|
|
97
|
+
export function parseRemoteDurationMinutes(raw, fallback) {
|
|
98
|
+
if (!raw) {
|
|
99
|
+
return fallback;
|
|
100
|
+
}
|
|
101
|
+
const value = raw.trim().toLowerCase();
|
|
102
|
+
const match = value.match(/^(\d+(?:\.\d+)?)(m|min|mins|minute|minutes|h|hr|hrs|hour|hours)?$/u);
|
|
103
|
+
if (!match) {
|
|
104
|
+
throw new Error(`Invalid duration "${raw}". Use minutes, 90m, or 2h.`);
|
|
105
|
+
}
|
|
106
|
+
const amount = Number(match[1]);
|
|
107
|
+
const unit = match[2] ?? "m";
|
|
108
|
+
const minutes = unit.startsWith("h") ? amount * 60 : amount;
|
|
109
|
+
if (!Number.isFinite(minutes) || minutes <= 0 || !Number.isInteger(minutes)) {
|
|
110
|
+
throw new Error(`Invalid duration "${raw}". Duration must resolve to whole minutes.`);
|
|
111
|
+
}
|
|
112
|
+
return minutes;
|
|
113
|
+
}
|
|
114
|
+
function parseOptionalDurationMinutes(raw) {
|
|
115
|
+
if (!raw) {
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
return parseRemoteDurationMinutes(raw, 0);
|
|
119
|
+
}
|
|
120
|
+
function parseWaitDurationMs(raw, fallback) {
|
|
121
|
+
if (!raw) {
|
|
122
|
+
return fallback;
|
|
123
|
+
}
|
|
124
|
+
const value = raw.trim().toLowerCase();
|
|
125
|
+
const match = value.match(/^(\d+(?:\.\d+)?)(ms|msec|millisecond|milliseconds|s|sec|secs|second|seconds|m|min|mins|minute|minutes|h|hr|hrs|hour|hours)?$/u);
|
|
126
|
+
if (!match) {
|
|
127
|
+
throw new Error(`Invalid wait duration "${raw}". Use values like 5s, 30s, 5m, or 1h.`);
|
|
128
|
+
}
|
|
129
|
+
const amount = Number(match[1]);
|
|
130
|
+
const unit = match[2] ?? "s";
|
|
131
|
+
let milliseconds = amount * 1000;
|
|
132
|
+
if (unit === "ms" || unit === "msec" || unit.startsWith("millisecond")) {
|
|
133
|
+
milliseconds = amount;
|
|
134
|
+
}
|
|
135
|
+
else if (unit.startsWith("m") && unit !== "ms" && unit !== "msec") {
|
|
136
|
+
milliseconds = amount * 60 * 1000;
|
|
137
|
+
}
|
|
138
|
+
else if (unit.startsWith("h")) {
|
|
139
|
+
milliseconds = amount * 60 * 60 * 1000;
|
|
140
|
+
}
|
|
141
|
+
if (!Number.isFinite(milliseconds) || milliseconds < 1) {
|
|
142
|
+
throw new Error(`Invalid wait duration "${raw}". Duration must resolve to at least 1ms.`);
|
|
143
|
+
}
|
|
144
|
+
return Math.round(milliseconds);
|
|
145
|
+
}
|
|
146
|
+
function formatElapsedMs(rawMs) {
|
|
147
|
+
if (!rawMs || rawMs < 1000) {
|
|
148
|
+
return `${rawMs ?? 0}ms`;
|
|
149
|
+
}
|
|
150
|
+
if (rawMs < 60_000) {
|
|
151
|
+
return `${(rawMs / 1000).toFixed(rawMs % 1000 === 0 ? 0 : 1)}s`;
|
|
152
|
+
}
|
|
153
|
+
const minutes = rawMs / 60_000;
|
|
154
|
+
if (rawMs < 60 * 60_000) {
|
|
155
|
+
return `${minutes.toFixed(rawMs % 60_000 === 0 ? 0 : 1)}m`;
|
|
156
|
+
}
|
|
157
|
+
const hours = rawMs / (60 * 60_000);
|
|
158
|
+
return `${hours.toFixed(rawMs % (60 * 60_000) === 0 ? 0 : 1)}h`;
|
|
159
|
+
}
|
|
160
|
+
function parseMetadata(values) {
|
|
161
|
+
if (!values.length) {
|
|
162
|
+
return undefined;
|
|
163
|
+
}
|
|
164
|
+
const metadata = {};
|
|
165
|
+
for (const value of values) {
|
|
166
|
+
const equalsIndex = value.indexOf("=");
|
|
167
|
+
if (equalsIndex <= 0) {
|
|
168
|
+
throw new Error(`--metadata values must be key=value pairs: ${value}`);
|
|
169
|
+
}
|
|
170
|
+
const key = value.slice(0, equalsIndex).trim();
|
|
171
|
+
const raw = value.slice(equalsIndex + 1).trim();
|
|
172
|
+
if (!key) {
|
|
173
|
+
throw new Error(`--metadata values must include a key: ${value}`);
|
|
174
|
+
}
|
|
175
|
+
metadata[key] = raw;
|
|
176
|
+
}
|
|
177
|
+
return metadata;
|
|
178
|
+
}
|
|
179
|
+
function jsonFlag(options) {
|
|
180
|
+
return hasFlag(options, "json");
|
|
181
|
+
}
|
|
182
|
+
function clientOptions(options) {
|
|
183
|
+
return {
|
|
184
|
+
baseUrl: getFlag(options, "base-url", "url"),
|
|
185
|
+
token: getFlag(options, "token"),
|
|
186
|
+
organizationId: getFlag(options, "org", "organization"),
|
|
187
|
+
workspaceId: getFlag(options, "workspace"),
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
function stateLabel(state) {
|
|
191
|
+
return (state
|
|
192
|
+
?.replace(/^RUNNER_SESSION_STATE_/u, "")
|
|
193
|
+
.toLowerCase()
|
|
194
|
+
.replaceAll("_", "-") ?? "unknown");
|
|
195
|
+
}
|
|
196
|
+
function roleValues(options) {
|
|
197
|
+
const rawRoles = getRepeatedFlag(options, "role", "roles");
|
|
198
|
+
const roles = rawRoles.length
|
|
199
|
+
? rawRoles.flatMap((role) => role.split(","))
|
|
200
|
+
: hasFlag(options, "viewer")
|
|
201
|
+
? ["viewer"]
|
|
202
|
+
: hasFlag(options, "admin")
|
|
203
|
+
? ["admin"]
|
|
204
|
+
: ["controller"];
|
|
205
|
+
return roles.map((role) => {
|
|
206
|
+
const normalized = role
|
|
207
|
+
.trim()
|
|
208
|
+
.toUpperCase()
|
|
209
|
+
.replace(/^RUNNER_ATTACH_ROLE_/u, "");
|
|
210
|
+
const value = RUNNER_ATTACH_ROLES[normalized];
|
|
211
|
+
if (!value || value === RUNNER_ATTACH_ROLES.UNSPECIFIED) {
|
|
212
|
+
throw new Error(`Unknown remote attach role: ${role}`);
|
|
213
|
+
}
|
|
214
|
+
return value;
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
function attachConnectionRole(options) {
|
|
218
|
+
return roleValues(options).every((role) => role === RUNNER_ATTACH_ROLES.VIEWER)
|
|
219
|
+
? "viewer"
|
|
220
|
+
: "controller";
|
|
221
|
+
}
|
|
222
|
+
function shouldWaitForStart(options) {
|
|
223
|
+
return hasFlag(options, "wait") || hasFlag(options, "verify");
|
|
224
|
+
}
|
|
225
|
+
function printJson(value) {
|
|
226
|
+
console.log(JSON.stringify(value, null, 2));
|
|
227
|
+
}
|
|
228
|
+
function printSession(session) {
|
|
229
|
+
console.log(chalk.bold(session.id));
|
|
230
|
+
console.log(` state: ${stateLabel(session.state)}`);
|
|
231
|
+
console.log(` workspace: ${session.workspaceId ?? "-"}`);
|
|
232
|
+
console.log(` profile: ${session.runnerProfile ?? "-"}`);
|
|
233
|
+
console.log(` repo: ${session.repoUrl ?? "-"}`);
|
|
234
|
+
console.log(` branch: ${session.branch ?? "-"}`);
|
|
235
|
+
console.log(` expires: ${session.expiresAt ?? "-"}`);
|
|
236
|
+
console.log(` idle: ${session.idleExpiresAt ?? "-"}`);
|
|
237
|
+
if (session.stopReason) {
|
|
238
|
+
console.log(` stopped: ${session.stopReason}`);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
function printSessionTable(sessions) {
|
|
242
|
+
if (!sessions.length) {
|
|
243
|
+
console.log(chalk.dim("No remote runner sessions found."));
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const rows = sessions.map((session) => ({
|
|
247
|
+
id: session.id,
|
|
248
|
+
state: stateLabel(session.state),
|
|
249
|
+
profile: session.runnerProfile ?? "-",
|
|
250
|
+
repo: session.repoUrl ?? "-",
|
|
251
|
+
branch: session.branch ?? "-",
|
|
252
|
+
expires: session.expiresAt ?? "-",
|
|
253
|
+
}));
|
|
254
|
+
const widths = {
|
|
255
|
+
id: Math.max("session".length, ...rows.map((row) => row.id.length)),
|
|
256
|
+
state: Math.max("state".length, ...rows.map((row) => row.state.length)),
|
|
257
|
+
profile: Math.max("profile".length, ...rows.map((row) => row.profile.length)),
|
|
258
|
+
repo: Math.max("repo".length, ...rows.map((row) => row.repo.length)),
|
|
259
|
+
branch: Math.max("branch".length, ...rows.map((row) => row.branch.length)),
|
|
260
|
+
};
|
|
261
|
+
console.log([
|
|
262
|
+
"session".padEnd(widths.id),
|
|
263
|
+
"state".padEnd(widths.state),
|
|
264
|
+
"profile".padEnd(widths.profile),
|
|
265
|
+
"repo".padEnd(widths.repo),
|
|
266
|
+
"branch".padEnd(widths.branch),
|
|
267
|
+
"expires",
|
|
268
|
+
].join(" "));
|
|
269
|
+
for (const row of rows) {
|
|
270
|
+
console.log([
|
|
271
|
+
row.id.padEnd(widths.id),
|
|
272
|
+
row.state.padEnd(widths.state),
|
|
273
|
+
row.profile.padEnd(widths.profile),
|
|
274
|
+
row.repo.padEnd(widths.repo),
|
|
275
|
+
row.branch.padEnd(widths.branch),
|
|
276
|
+
row.expires,
|
|
277
|
+
].join(" "));
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
function printAttachInstructions(input) {
|
|
281
|
+
if (input.json) {
|
|
282
|
+
printJson({
|
|
283
|
+
sessionId: input.sessionId,
|
|
284
|
+
gatewayBaseUrl: input.gatewayBaseUrl,
|
|
285
|
+
tokenId: input.tokenId,
|
|
286
|
+
tokenSecret: input.tokenSecret,
|
|
287
|
+
expiresAt: input.expiresAt,
|
|
288
|
+
verified: input.verified,
|
|
289
|
+
});
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
console.log(chalk.bold(`Remote runner attach token minted for ${input.sessionId}`));
|
|
293
|
+
console.log(` gateway: ${input.gatewayBaseUrl}`);
|
|
294
|
+
console.log(` token: ${input.tokenId}`);
|
|
295
|
+
console.log(` expires: ${input.expiresAt ?? "-"}`);
|
|
296
|
+
if (input.verified) {
|
|
297
|
+
console.log(chalk.green(" headless gateway: verified"));
|
|
298
|
+
}
|
|
299
|
+
if (input.showSecret || !input.verified) {
|
|
300
|
+
console.log("");
|
|
301
|
+
console.log(chalk.dim("Ephemeral remote transport environment:"));
|
|
302
|
+
console.log(`export MAESTRO_REMOTE_BASE_URL=${JSON.stringify(input.gatewayBaseUrl)}`);
|
|
303
|
+
console.log(`export MAESTRO_REMOTE_API_KEY=${JSON.stringify(input.tokenSecret)}`);
|
|
304
|
+
console.log(`export MAESTRO_REMOTE_HEADER_X_EVALOPS_RUNNER_ATTACH_TOKEN_ID=${JSON.stringify(input.tokenId)}`);
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
console.log(chalk.dim(" token secret hidden; rerun with --show-secret or --json when handoff needs it."));
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
async function handleStart(options) {
|
|
311
|
+
const ttlMinutes = parseRemoteDurationMinutes(getFlag(options, "ttl"), 90);
|
|
312
|
+
const idleTtlMinutes = parseOptionalDurationMinutes(getFlag(options, "idle-ttl", "idle"));
|
|
313
|
+
const result = await createRunnerSession({
|
|
314
|
+
workspaceId: getFlag(options, "workspace"),
|
|
315
|
+
userId: getFlag(options, "user"),
|
|
316
|
+
agentRunId: getFlag(options, "agent-run"),
|
|
317
|
+
maestroSessionId: getFlag(options, "maestro-session", "session"),
|
|
318
|
+
idempotencyKey: getFlag(options, "idempotency-key"),
|
|
319
|
+
runnerProfile: getFlag(options, "profile") ?? "standard",
|
|
320
|
+
runnerImage: getFlag(options, "image"),
|
|
321
|
+
workspaceSource: getFlag(options, "workspace-source"),
|
|
322
|
+
repoUrl: getFlag(options, "repo", "repo-url"),
|
|
323
|
+
branch: getFlag(options, "branch") ?? "main",
|
|
324
|
+
model: getFlag(options, "model"),
|
|
325
|
+
ttlMinutes,
|
|
326
|
+
idleTtlMinutes,
|
|
327
|
+
metadata: parseMetadata(getRepeatedFlag(options, "metadata")),
|
|
328
|
+
}, clientOptions(options));
|
|
329
|
+
let waitResult;
|
|
330
|
+
let attachResult;
|
|
331
|
+
if (shouldWaitForStart(options)) {
|
|
332
|
+
waitResult = await waitForRunnerSessionReady(result.session.id, {
|
|
333
|
+
...clientOptions(options),
|
|
334
|
+
timeoutMs: parseWaitDurationMs(getFlag(options, "wait-timeout"), DEFAULT_REMOTE_RUNNER_WAIT_TIMEOUT_MS),
|
|
335
|
+
pollIntervalMs: parseWaitDurationMs(getFlag(options, "poll-interval"), DEFAULT_REMOTE_RUNNER_WAIT_POLL_INTERVAL_MS),
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
if (hasFlag(options, "verify")) {
|
|
339
|
+
const minted = await mintRunnerAttachToken({
|
|
340
|
+
sessionId: result.session.id,
|
|
341
|
+
roles: roleValues(options),
|
|
342
|
+
ttlMinutes: parseRemoteDurationMinutes(getFlag(options, "attach-ttl"), 30),
|
|
343
|
+
}, clientOptions(options));
|
|
344
|
+
attachResult = {
|
|
345
|
+
gatewayBaseUrl: minted.gatewayBaseUrl,
|
|
346
|
+
token: minted.token,
|
|
347
|
+
tokenSecret: minted.tokenSecret,
|
|
348
|
+
verified: await verifyRunnerHeadlessAttach({
|
|
349
|
+
gatewayBaseUrl: minted.gatewayBaseUrl,
|
|
350
|
+
tokenId: minted.token.id,
|
|
351
|
+
tokenSecret: minted.tokenSecret,
|
|
352
|
+
sessionId: result.session.id,
|
|
353
|
+
protocolVersion: headlessProtocolVersion,
|
|
354
|
+
clientVersion: getPackageVersion(),
|
|
355
|
+
takeControl: hasFlag(options, "take-control"),
|
|
356
|
+
}),
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
if (jsonFlag(options)) {
|
|
360
|
+
printJson({
|
|
361
|
+
created: result,
|
|
362
|
+
wait: waitResult,
|
|
363
|
+
attach: attachResult,
|
|
364
|
+
});
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
printSession(waitResult?.session ?? result.session);
|
|
368
|
+
if (waitResult) {
|
|
369
|
+
console.log(chalk.dim(` ready: ${formatElapsedMs(waitResult.elapsedMs)} (${waitResult.attempts} checks)`));
|
|
370
|
+
}
|
|
371
|
+
if (result.replayed) {
|
|
372
|
+
console.log(chalk.dim(" replayed: existing idempotent request"));
|
|
373
|
+
}
|
|
374
|
+
console.log("");
|
|
375
|
+
if (attachResult) {
|
|
376
|
+
printAttachInstructions({
|
|
377
|
+
sessionId: result.session.id,
|
|
378
|
+
gatewayBaseUrl: attachResult.gatewayBaseUrl,
|
|
379
|
+
tokenId: attachResult.token.id,
|
|
380
|
+
tokenSecret: attachResult.tokenSecret,
|
|
381
|
+
expiresAt: attachResult.token.expiresAt,
|
|
382
|
+
json: false,
|
|
383
|
+
showSecret: hasFlag(options, "show-secret"),
|
|
384
|
+
verified: attachResult.verified,
|
|
385
|
+
});
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
console.log(chalk.dim(`Attach: maestro remote attach ${result.session.id}`));
|
|
389
|
+
}
|
|
390
|
+
async function handleList(options) {
|
|
391
|
+
const result = await listRunnerSessions({
|
|
392
|
+
workspaceId: getFlag(options, "workspace"),
|
|
393
|
+
state: getFlag(options, "state"),
|
|
394
|
+
limit: parseIntFlag(options, "limit", 20),
|
|
395
|
+
offset: parseIntFlag(options, "offset", 0),
|
|
396
|
+
}, clientOptions(options));
|
|
397
|
+
if (jsonFlag(options)) {
|
|
398
|
+
printJson(result);
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
printSessionTable(result.sessions);
|
|
402
|
+
if (result.nextOffset !== undefined && result.nextOffset > 0) {
|
|
403
|
+
console.log(chalk.dim(`next offset: ${result.nextOffset}`));
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
async function handleStatus(options) {
|
|
407
|
+
const status = await getRemoteRunnerStatus(getFlag(options, "workspace"), clientOptions(options));
|
|
408
|
+
if (jsonFlag(options)) {
|
|
409
|
+
printJson(status);
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
console.log(chalk.bold(status.service ?? "remote-runner"));
|
|
413
|
+
console.log(` workspace: ${status.workspaceId ?? "-"}`);
|
|
414
|
+
console.log(` policy: ${status.downstreamPolicy ?? "-"}`);
|
|
415
|
+
}
|
|
416
|
+
async function handleGet(options) {
|
|
417
|
+
const sessionId = options.positionals[0];
|
|
418
|
+
if (!sessionId) {
|
|
419
|
+
throw new Error("Usage: maestro remote get <session-id>");
|
|
420
|
+
}
|
|
421
|
+
const session = await getRunnerSession(sessionId, clientOptions(options));
|
|
422
|
+
if (jsonFlag(options)) {
|
|
423
|
+
printJson(session);
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
printSession(session);
|
|
427
|
+
}
|
|
428
|
+
async function handleEvents(options) {
|
|
429
|
+
const sessionId = options.positionals[0];
|
|
430
|
+
if (!sessionId) {
|
|
431
|
+
throw new Error("Usage: maestro remote events <session-id>");
|
|
432
|
+
}
|
|
433
|
+
const result = await listRunnerSessionEvents({
|
|
434
|
+
sessionId,
|
|
435
|
+
afterSequence: parseIntFlag(options, "after"),
|
|
436
|
+
limit: parseIntFlag(options, "limit", 50),
|
|
437
|
+
}, clientOptions(options));
|
|
438
|
+
if (jsonFlag(options)) {
|
|
439
|
+
printJson(result);
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
for (const event of result.events) {
|
|
443
|
+
console.log(`${String(event.sequence ?? "-").padStart(4)} ${event.occurredAt ?? "-"} ${event.eventType ?? "-"}`);
|
|
444
|
+
}
|
|
445
|
+
if (!result.events.length) {
|
|
446
|
+
console.log(chalk.dim("No remote runner events found."));
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
async function handleStop(options) {
|
|
450
|
+
const sessionId = options.positionals[0];
|
|
451
|
+
if (!sessionId) {
|
|
452
|
+
throw new Error("Usage: maestro remote stop <session-id> [--reason text]");
|
|
453
|
+
}
|
|
454
|
+
const result = await stopRunnerSession(sessionId, getFlag(options, "reason") ?? "maestro remote stop", clientOptions(options));
|
|
455
|
+
if (jsonFlag(options)) {
|
|
456
|
+
printJson(result);
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
printSession(result.session);
|
|
460
|
+
}
|
|
461
|
+
async function handleExtend(options) {
|
|
462
|
+
const sessionId = options.positionals[0];
|
|
463
|
+
if (!sessionId) {
|
|
464
|
+
throw new Error("Usage: maestro remote extend <session-id> --ttl 2h");
|
|
465
|
+
}
|
|
466
|
+
const ttl = getFlag(options, "ttl", "add-ttl");
|
|
467
|
+
if (!ttl) {
|
|
468
|
+
throw new Error("maestro remote extend requires --ttl");
|
|
469
|
+
}
|
|
470
|
+
const result = await extendRunnerSession({
|
|
471
|
+
sessionId,
|
|
472
|
+
additionalMinutes: parseRemoteDurationMinutes(ttl, 0),
|
|
473
|
+
additionalIdleMinutes: parseOptionalDurationMinutes(getFlag(options, "idle-ttl", "add-idle-ttl")),
|
|
474
|
+
reason: getFlag(options, "reason") ?? "maestro remote extend",
|
|
475
|
+
}, clientOptions(options));
|
|
476
|
+
if (jsonFlag(options)) {
|
|
477
|
+
printJson(result);
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
printSession(result.session);
|
|
481
|
+
}
|
|
482
|
+
async function mintAttach(options) {
|
|
483
|
+
const sessionId = options.positionals[0];
|
|
484
|
+
if (!sessionId) {
|
|
485
|
+
throw new Error("Usage: maestro remote attach <session-id>");
|
|
486
|
+
}
|
|
487
|
+
return mintRunnerAttachToken({
|
|
488
|
+
sessionId,
|
|
489
|
+
subjectId: getFlag(options, "subject", "user"),
|
|
490
|
+
roles: roleValues(options),
|
|
491
|
+
ttlMinutes: parseRemoteDurationMinutes(getFlag(options, "ttl"), 30),
|
|
492
|
+
}, clientOptions(options));
|
|
493
|
+
}
|
|
494
|
+
async function handleAttach(options) {
|
|
495
|
+
const sessionId = options.positionals[0];
|
|
496
|
+
const minted = await mintAttach(options);
|
|
497
|
+
if (shouldUseInteractiveRemoteAttach({
|
|
498
|
+
json: jsonFlag(options),
|
|
499
|
+
printEnv: hasFlag(options, "print-env"),
|
|
500
|
+
stdinIsTTY: Boolean(process.stdin.isTTY),
|
|
501
|
+
stdoutIsTTY: Boolean(process.stdout.isTTY),
|
|
502
|
+
})) {
|
|
503
|
+
await attachToRemoteRunnerSession({
|
|
504
|
+
sessionId: sessionId,
|
|
505
|
+
gatewayBaseUrl: minted.gatewayBaseUrl,
|
|
506
|
+
tokenId: minted.token.id,
|
|
507
|
+
tokenSecret: minted.tokenSecret,
|
|
508
|
+
role: attachConnectionRole(options),
|
|
509
|
+
protocolVersion: headlessProtocolVersion,
|
|
510
|
+
clientVersion: getPackageVersion(),
|
|
511
|
+
takeControl: hasFlag(options, "take-control"),
|
|
512
|
+
});
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
let verified;
|
|
516
|
+
if (hasFlag(options, "verify")) {
|
|
517
|
+
verified = await verifyRunnerHeadlessAttach({
|
|
518
|
+
gatewayBaseUrl: minted.gatewayBaseUrl,
|
|
519
|
+
tokenId: minted.token.id,
|
|
520
|
+
tokenSecret: minted.tokenSecret,
|
|
521
|
+
sessionId: sessionId,
|
|
522
|
+
protocolVersion: headlessProtocolVersion,
|
|
523
|
+
clientVersion: getPackageVersion(),
|
|
524
|
+
takeControl: hasFlag(options, "take-control"),
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
printAttachInstructions({
|
|
528
|
+
sessionId: sessionId,
|
|
529
|
+
gatewayBaseUrl: minted.gatewayBaseUrl,
|
|
530
|
+
tokenId: minted.token.id,
|
|
531
|
+
tokenSecret: minted.tokenSecret,
|
|
532
|
+
expiresAt: minted.token.expiresAt,
|
|
533
|
+
json: jsonFlag(options),
|
|
534
|
+
showSecret: hasFlag(options, "show-secret"),
|
|
535
|
+
verified,
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
async function handleAttachToken(options) {
|
|
539
|
+
const sessionId = options.positionals[0];
|
|
540
|
+
const minted = await mintAttach(options);
|
|
541
|
+
if (jsonFlag(options)) {
|
|
542
|
+
printJson(minted);
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
console.log(chalk.bold(`Attach token for ${sessionId}`));
|
|
546
|
+
console.log(` gateway: ${minted.gatewayBaseUrl}`);
|
|
547
|
+
console.log(` token: ${minted.token.id}`);
|
|
548
|
+
console.log(` secret: ${minted.tokenSecret}`);
|
|
549
|
+
console.log(` expires: ${minted.token.expiresAt ?? "-"}`);
|
|
550
|
+
}
|
|
551
|
+
async function handleRevokeToken(options) {
|
|
552
|
+
const sessionId = options.positionals[0];
|
|
553
|
+
const tokenId = options.positionals[1];
|
|
554
|
+
if (!sessionId || !tokenId) {
|
|
555
|
+
throw new Error("Usage: maestro remote revoke-token <session-id> <token-id>");
|
|
556
|
+
}
|
|
557
|
+
const result = await revokeRunnerAttachToken({ sessionId, tokenId }, clientOptions(options));
|
|
558
|
+
if (jsonFlag(options)) {
|
|
559
|
+
printJson(result);
|
|
560
|
+
return;
|
|
561
|
+
}
|
|
562
|
+
console.log(chalk.bold(`Revoked attach token ${result.token.id}`));
|
|
563
|
+
}
|
|
564
|
+
async function handleTarget(options) {
|
|
565
|
+
const sessionId = options.positionals[0];
|
|
566
|
+
if (!sessionId) {
|
|
567
|
+
throw new Error("Usage: maestro remote target <session-id>");
|
|
568
|
+
}
|
|
569
|
+
const config = await resolveRemoteRunnerConfig(clientOptions(options));
|
|
570
|
+
if (!config) {
|
|
571
|
+
throw new Error("Remote runner target requires EvalOps organization and access token.");
|
|
572
|
+
}
|
|
573
|
+
const gatewayBaseUrl = remoteRunnerGatewayBaseUrl(config, sessionId);
|
|
574
|
+
if (jsonFlag(options)) {
|
|
575
|
+
printJson({ sessionId, gatewayBaseUrl });
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
console.log(gatewayBaseUrl);
|
|
579
|
+
}
|
|
580
|
+
export async function handleRemoteCommand(subcommand, args = []) {
|
|
581
|
+
const options = parseRemoteOptions(args);
|
|
582
|
+
if (!subcommand || subcommand === "help" || hasFlag(options, "help")) {
|
|
583
|
+
console.log(REMOTE_USAGE);
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
try {
|
|
587
|
+
switch (subcommand) {
|
|
588
|
+
case "start":
|
|
589
|
+
await handleStart(options);
|
|
590
|
+
return;
|
|
591
|
+
case "list":
|
|
592
|
+
await handleList(options);
|
|
593
|
+
return;
|
|
594
|
+
case "status":
|
|
595
|
+
await handleStatus(options);
|
|
596
|
+
return;
|
|
597
|
+
case "get":
|
|
598
|
+
await handleGet(options);
|
|
599
|
+
return;
|
|
600
|
+
case "events":
|
|
601
|
+
await handleEvents(options);
|
|
602
|
+
return;
|
|
603
|
+
case "stop":
|
|
604
|
+
await handleStop(options);
|
|
605
|
+
return;
|
|
606
|
+
case "extend":
|
|
607
|
+
await handleExtend(options);
|
|
608
|
+
return;
|
|
609
|
+
case "attach":
|
|
610
|
+
await handleAttach(options);
|
|
611
|
+
return;
|
|
612
|
+
case "attach-token":
|
|
613
|
+
await handleAttachToken(options);
|
|
614
|
+
return;
|
|
615
|
+
case "revoke-token":
|
|
616
|
+
await handleRevokeToken(options);
|
|
617
|
+
return;
|
|
618
|
+
case "target":
|
|
619
|
+
await handleTarget(options);
|
|
620
|
+
return;
|
|
621
|
+
default:
|
|
622
|
+
throw new Error(`Unknown remote command: ${subcommand}`);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
catch (error) {
|
|
626
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
627
|
+
console.error(chalk.red(message));
|
|
628
|
+
process.exitCode = 1;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
//# sourceMappingURL=remote.js.map
|