@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,279 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
import { loadOAuthCredentials } from "../oauth/storage.js";
|
|
3
|
+
import { CONNECT_PROTOCOL_VERSION } from "../platform/client.js";
|
|
4
|
+
import { PLATFORM_CONNECT_METHODS, PLATFORM_CONNECT_SERVICES, platformConnectMethodPath, platformConnectServicePath, } from "../platform/core-services.js";
|
|
5
|
+
import { fetchDownstream, } from "../utils/downstream-http.js";
|
|
6
|
+
import * as downstream from "../utils/downstream.js";
|
|
7
|
+
const DEFAULT_AGENT_ID = "maestro";
|
|
8
|
+
const DEFAULT_MAX_ATTEMPTS = 2;
|
|
9
|
+
const DEFAULT_TIMEOUT_MS = 2_000;
|
|
10
|
+
const EVALUATE_ACTION_PATH = platformConnectMethodPath(PLATFORM_CONNECT_METHODS.governance.evaluateAction);
|
|
11
|
+
export const GOVERNANCE_CALL_FAILURE_MODES = {
|
|
12
|
+
evaluateAction: {
|
|
13
|
+
optional: downstream.FailOpen,
|
|
14
|
+
required: downstream.FailClosed,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
const downstreamClients = new Map();
|
|
18
|
+
function trimString(value) {
|
|
19
|
+
const trimmed = value?.trim();
|
|
20
|
+
return trimmed ? trimmed : undefined;
|
|
21
|
+
}
|
|
22
|
+
function getEnvValue(names) {
|
|
23
|
+
for (const name of names) {
|
|
24
|
+
const value = trimString(process.env[name]);
|
|
25
|
+
if (value) {
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
function parsePositiveInt(value, fallback) {
|
|
32
|
+
const parsed = Number.parseInt(value ?? "", 10);
|
|
33
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
|
|
34
|
+
}
|
|
35
|
+
function stripTrailingSlashes(value) {
|
|
36
|
+
return value.replace(/\/+$/, "");
|
|
37
|
+
}
|
|
38
|
+
function normalizeBaseUrl(baseUrl) {
|
|
39
|
+
let normalized = stripTrailingSlashes(baseUrl.trim());
|
|
40
|
+
for (const suffix of [
|
|
41
|
+
EVALUATE_ACTION_PATH,
|
|
42
|
+
platformConnectServicePath(PLATFORM_CONNECT_SERVICES.governance),
|
|
43
|
+
]) {
|
|
44
|
+
if (normalized.endsWith(suffix)) {
|
|
45
|
+
normalized = stripTrailingSlashes(normalized.slice(0, -suffix.length));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return normalized;
|
|
49
|
+
}
|
|
50
|
+
function resolveWorkspaceId(config, context) {
|
|
51
|
+
const configuredWorkspaceId = trimString(config?.workspaceId);
|
|
52
|
+
const envWorkspaceId = getEnvValue([
|
|
53
|
+
"GOVERNANCE_SERVICE_WORKSPACE_ID",
|
|
54
|
+
"MAESTRO_GOVERNANCE_WORKSPACE_ID",
|
|
55
|
+
"MAESTRO_EVALOPS_WORKSPACE_ID",
|
|
56
|
+
"MAESTRO_WORKSPACE_ID",
|
|
57
|
+
"MAESTRO_EVALOPS_ORG_ID",
|
|
58
|
+
"EVALOPS_ORGANIZATION_ID",
|
|
59
|
+
"MAESTRO_ENTERPRISE_ORG_ID",
|
|
60
|
+
]);
|
|
61
|
+
if (configuredWorkspaceId ??
|
|
62
|
+
trimString(context.user?.orgId) ??
|
|
63
|
+
envWorkspaceId) {
|
|
64
|
+
return (configuredWorkspaceId ?? trimString(context.user?.orgId) ?? envWorkspaceId);
|
|
65
|
+
}
|
|
66
|
+
const stored = loadOAuthCredentials("evalops")?.metadata?.organizationId;
|
|
67
|
+
return typeof stored === "string" && stored.trim().length > 0
|
|
68
|
+
? stored.trim()
|
|
69
|
+
: undefined;
|
|
70
|
+
}
|
|
71
|
+
export function resolveActionFirewallGovernanceServiceConfig(config, context) {
|
|
72
|
+
if (config === false) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
const baseUrl = trimString(config?.baseUrl) ??
|
|
76
|
+
getEnvValue([
|
|
77
|
+
"GOVERNANCE_SERVICE_URL",
|
|
78
|
+
"MAESTRO_GOVERNANCE_SERVICE_URL",
|
|
79
|
+
"MAESTRO_PLATFORM_BASE_URL",
|
|
80
|
+
"MAESTRO_EVALOPS_BASE_URL",
|
|
81
|
+
"EVALOPS_BASE_URL",
|
|
82
|
+
]);
|
|
83
|
+
if (!baseUrl) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
const workspaceId = resolveWorkspaceId(config, context);
|
|
87
|
+
if (!workspaceId) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
const storedToken = trimString(loadOAuthCredentials("evalops")?.access);
|
|
91
|
+
const required = config?.required ??
|
|
92
|
+
getEnvValue([
|
|
93
|
+
"GOVERNANCE_SERVICE_REQUIRED",
|
|
94
|
+
"MAESTRO_GOVERNANCE_SERVICE_REQUIRED",
|
|
95
|
+
]) === "1";
|
|
96
|
+
return {
|
|
97
|
+
agentId: trimString(config?.agentId) ??
|
|
98
|
+
getEnvValue([
|
|
99
|
+
"GOVERNANCE_SERVICE_AGENT_ID",
|
|
100
|
+
"MAESTRO_GOVERNANCE_AGENT_ID",
|
|
101
|
+
"MAESTRO_EVALOPS_AGENT_ID",
|
|
102
|
+
"MAESTRO_AGENT_ID",
|
|
103
|
+
]) ??
|
|
104
|
+
DEFAULT_AGENT_ID,
|
|
105
|
+
baseUrl: normalizeBaseUrl(baseUrl),
|
|
106
|
+
circuitFailureThreshold: config?.circuitFailureThreshold ??
|
|
107
|
+
parsePositiveInt(getEnvValue([
|
|
108
|
+
"GOVERNANCE_SERVICE_CIRCUIT_FAILURE_THRESHOLD",
|
|
109
|
+
"MAESTRO_GOVERNANCE_SERVICE_CIRCUIT_FAILURE_THRESHOLD",
|
|
110
|
+
]), 5),
|
|
111
|
+
circuitResetTimeoutMs: config?.circuitResetTimeoutMs ??
|
|
112
|
+
parsePositiveInt(getEnvValue([
|
|
113
|
+
"GOVERNANCE_SERVICE_CIRCUIT_RESET_TIMEOUT_MS",
|
|
114
|
+
"MAESTRO_GOVERNANCE_SERVICE_CIRCUIT_RESET_TIMEOUT_MS",
|
|
115
|
+
]), 30_000),
|
|
116
|
+
circuitSuccessThreshold: config?.circuitSuccessThreshold ??
|
|
117
|
+
parsePositiveInt(getEnvValue([
|
|
118
|
+
"GOVERNANCE_SERVICE_CIRCUIT_SUCCESS_THRESHOLD",
|
|
119
|
+
"MAESTRO_GOVERNANCE_SERVICE_CIRCUIT_SUCCESS_THRESHOLD",
|
|
120
|
+
]), 2),
|
|
121
|
+
failureMode: required ? "required" : "optional",
|
|
122
|
+
maxAttempts: config?.maxAttempts ??
|
|
123
|
+
parsePositiveInt(getEnvValue([
|
|
124
|
+
"GOVERNANCE_SERVICE_MAX_ATTEMPTS",
|
|
125
|
+
"MAESTRO_GOVERNANCE_SERVICE_MAX_ATTEMPTS",
|
|
126
|
+
]), DEFAULT_MAX_ATTEMPTS),
|
|
127
|
+
timeoutMs: config?.timeoutMs ??
|
|
128
|
+
parsePositiveInt(getEnvValue([
|
|
129
|
+
"GOVERNANCE_SERVICE_TIMEOUT_MS",
|
|
130
|
+
"MAESTRO_GOVERNANCE_SERVICE_TIMEOUT_MS",
|
|
131
|
+
]), DEFAULT_TIMEOUT_MS),
|
|
132
|
+
token: trimString(config?.token) ??
|
|
133
|
+
getEnvValue([
|
|
134
|
+
"GOVERNANCE_SERVICE_TOKEN",
|
|
135
|
+
"MAESTRO_GOVERNANCE_SERVICE_TOKEN",
|
|
136
|
+
"MAESTRO_EVALOPS_ACCESS_TOKEN",
|
|
137
|
+
"EVALOPS_TOKEN",
|
|
138
|
+
]) ??
|
|
139
|
+
storedToken,
|
|
140
|
+
workspaceId,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function getDownstreamClient(config, op) {
|
|
144
|
+
const failureMode = GOVERNANCE_CALL_FAILURE_MODES[op][config.failureMode];
|
|
145
|
+
const key = JSON.stringify({
|
|
146
|
+
baseUrl: config.baseUrl,
|
|
147
|
+
failureMode,
|
|
148
|
+
op,
|
|
149
|
+
reset: config.circuitResetTimeoutMs,
|
|
150
|
+
success: config.circuitSuccessThreshold,
|
|
151
|
+
threshold: config.circuitFailureThreshold,
|
|
152
|
+
});
|
|
153
|
+
const cached = downstreamClients.get(key);
|
|
154
|
+
if (cached) {
|
|
155
|
+
return cached;
|
|
156
|
+
}
|
|
157
|
+
const client = downstream.New(`governance.${op}`, {
|
|
158
|
+
failureMode,
|
|
159
|
+
breaker: {
|
|
160
|
+
failureThreshold: config.circuitFailureThreshold,
|
|
161
|
+
resetTimeoutMs: config.circuitResetTimeoutMs,
|
|
162
|
+
successThreshold: config.circuitSuccessThreshold,
|
|
163
|
+
toolName: `governance.${op}`,
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
downstreamClients.set(key, client);
|
|
167
|
+
return client;
|
|
168
|
+
}
|
|
169
|
+
function toHttpFailureMode(client) {
|
|
170
|
+
return client.failureMode === downstream.FailClosed ? "required" : "optional";
|
|
171
|
+
}
|
|
172
|
+
function buildHeaders(config) {
|
|
173
|
+
return {
|
|
174
|
+
...(config.token ? { Authorization: `Bearer ${config.token}` } : {}),
|
|
175
|
+
"Connect-Protocol-Version": CONNECT_PROTOCOL_VERSION,
|
|
176
|
+
"Content-Type": "application/json",
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
function buildActionContext() {
|
|
180
|
+
const environment = getEnvValue([
|
|
181
|
+
"GOVERNANCE_SERVICE_ENVIRONMENT",
|
|
182
|
+
"NODE_ENV",
|
|
183
|
+
]);
|
|
184
|
+
return environment ? { environment } : undefined;
|
|
185
|
+
}
|
|
186
|
+
function encodeActionPayload(context) {
|
|
187
|
+
return Buffer.from(JSON.stringify({
|
|
188
|
+
args: context.args,
|
|
189
|
+
metadata: context.metadata,
|
|
190
|
+
session: context.session
|
|
191
|
+
? {
|
|
192
|
+
id: context.session.id,
|
|
193
|
+
startedAt: context.session.startedAt.toISOString(),
|
|
194
|
+
}
|
|
195
|
+
: undefined,
|
|
196
|
+
toolName: context.toolName,
|
|
197
|
+
user: context.user,
|
|
198
|
+
userIntent: context.userIntent,
|
|
199
|
+
}), "utf8").toString("base64");
|
|
200
|
+
}
|
|
201
|
+
function normalizeDecision(decision) {
|
|
202
|
+
switch (decision) {
|
|
203
|
+
case "ACTION_DECISION_ALLOW":
|
|
204
|
+
case "allow":
|
|
205
|
+
case 1:
|
|
206
|
+
return "allow";
|
|
207
|
+
case "ACTION_DECISION_DENY":
|
|
208
|
+
case "deny":
|
|
209
|
+
case 2:
|
|
210
|
+
return "block";
|
|
211
|
+
case "ACTION_DECISION_REQUIRE_APPROVAL":
|
|
212
|
+
case "require_approval":
|
|
213
|
+
case 3:
|
|
214
|
+
return "require_approval";
|
|
215
|
+
default:
|
|
216
|
+
throw new Error("governance service response did not include a decision");
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function normalizeStringArray(value) {
|
|
220
|
+
return Array.isArray(value)
|
|
221
|
+
? value.map((item) => item.trim()).filter((item) => item.length > 0)
|
|
222
|
+
: [];
|
|
223
|
+
}
|
|
224
|
+
function normalizeEvaluationResponse(payload) {
|
|
225
|
+
const evaluation = payload.evaluation;
|
|
226
|
+
if (!evaluation) {
|
|
227
|
+
throw new Error("governance service response did not include evaluation");
|
|
228
|
+
}
|
|
229
|
+
const action = normalizeDecision(evaluation.decision);
|
|
230
|
+
if (action === "allow") {
|
|
231
|
+
return { action };
|
|
232
|
+
}
|
|
233
|
+
const reasons = normalizeStringArray(evaluation.reasons);
|
|
234
|
+
const matchedRules = normalizeStringArray(evaluation.matchedRules);
|
|
235
|
+
const ruleId = matchedRules[0] ?? "governance-service";
|
|
236
|
+
const reason = reasons.join("; ") || "Action denied by governance service";
|
|
237
|
+
if (action === "block") {
|
|
238
|
+
return {
|
|
239
|
+
action,
|
|
240
|
+
ruleId,
|
|
241
|
+
reason,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
return {
|
|
245
|
+
action: "require_approval",
|
|
246
|
+
ruleId,
|
|
247
|
+
reason,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
export async function evaluateActionWithActionFirewallGovernanceService(config, context) {
|
|
251
|
+
const client = getDownstreamClient(config, "evaluateAction");
|
|
252
|
+
return downstream.CallOp(client, "evaluateAction", async () => {
|
|
253
|
+
const response = await fetchDownstream(`${config.baseUrl}${EVALUATE_ACTION_PATH}`, {
|
|
254
|
+
method: "POST",
|
|
255
|
+
headers: buildHeaders(config),
|
|
256
|
+
body: JSON.stringify({
|
|
257
|
+
workspaceId: config.workspaceId,
|
|
258
|
+
agentId: config.agentId,
|
|
259
|
+
actionType: context.toolName,
|
|
260
|
+
actionPayload: encodeActionPayload(context),
|
|
261
|
+
context: buildActionContext(),
|
|
262
|
+
}),
|
|
263
|
+
}, {
|
|
264
|
+
serviceName: "governance service",
|
|
265
|
+
failureMode: toHttpFailureMode(client),
|
|
266
|
+
timeoutMs: config.timeoutMs,
|
|
267
|
+
maxAttempts: config.maxAttempts,
|
|
268
|
+
});
|
|
269
|
+
if (!response.ok) {
|
|
270
|
+
const text = await response.text();
|
|
271
|
+
throw new Error(`governance service returned ${response.status}: ${text || response.statusText}`);
|
|
272
|
+
}
|
|
273
|
+
return normalizeEvaluationResponse((await response.json()));
|
|
274
|
+
}, () => null);
|
|
275
|
+
}
|
|
276
|
+
export function resetActionFirewallGovernanceDownstreamForTests() {
|
|
277
|
+
downstreamClients.clear();
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=governance-service-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"governance-service-client.js","sourceRoot":"","sources":["../../src/safety/governance-service-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAKrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EACN,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,0BAA0B,GAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEN,eAAe,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAErD,MAAM,gBAAgB,GAAG,SAAS,CAAC;AACnC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACjC,MAAM,oBAAoB,GAAG,yBAAyB,CACrD,wBAAwB,CA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MAAM,IAAI,KAAK,CACd,+BAA+B,QAAQ,CAAC,MAAM,KAC7C,IAAI,IAAI,QAAQ,CAAC,UAClB,EAAE,CACF,CAAC;QACH,CAAC;QAED,OAAO,2BAA2B,CACjC,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAA2B,CACjD,CAAC;IACH,CAAC,EACD,GAAG,EAAE,CAAC,IAAI,CACV,CAAC;AACH,CAAC;AAED,MAAM,UAAU,+CAA+C;IAC9D,iBAAiB,CAAC,KAAK,EAAE,CAAC;AAC3B,CAAC","sourcesContent":["import { Buffer } from \"node:buffer\";\nimport type {\n\tActionApprovalContext,\n\tActionFirewallVerdict,\n} from \"../agent/action-approval.js\";\nimport { loadOAuthCredentials } from \"../oauth/storage.js\";\nimport { CONNECT_PROTOCOL_VERSION } from \"../platform/client.js\";\nimport {\n\tPLATFORM_CONNECT_METHODS,\n\tPLATFORM_CONNECT_SERVICES,\n\tplatformConnectMethodPath,\n\tplatformConnectServicePath,\n} from \"../platform/core-services.js\";\nimport {\n\ttype DownstreamFailureMode as DownstreamHttpFailureMode,\n\tfetchDownstream,\n} from \"../utils/downstream-http.js\";\nimport * as downstream from \"../utils/downstream.js\";\n\nconst DEFAULT_AGENT_ID = \"maestro\";\nconst DEFAULT_MAX_ATTEMPTS = 2;\nconst DEFAULT_TIMEOUT_MS = 2_000;\nconst EVALUATE_ACTION_PATH = platformConnectMethodPath(\n\tPLATFORM_CONNECT_METHODS.governance.evaluateAction,\n);\n\nexport const GOVERNANCE_CALL_FAILURE_MODES = {\n\tevaluateAction: {\n\t\toptional: downstream.FailOpen,\n\t\trequired: downstream.FailClosed,\n\t},\n} as const;\n\ntype GovernanceCall = keyof typeof GOVERNANCE_CALL_FAILURE_MODES;\n\nexport interface ActionFirewallGovernanceServiceConfig {\n\tbaseUrl?: string;\n\ttoken?: string;\n\tworkspaceId?: string;\n\tagentId?: string;\n\ttimeoutMs?: number;\n\tmaxAttempts?: number;\n\tcircuitFailureThreshold?: number;\n\tcircuitResetTimeoutMs?: number;\n\tcircuitSuccessThreshold?: number;\n\trequired?: boolean;\n}\n\nexport interface ResolvedActionFirewallGovernanceServiceConfig {\n\tbaseUrl: string;\n\ttoken?: string;\n\tworkspaceId: string;\n\tagentId: string;\n\ttimeoutMs: number;\n\tmaxAttempts: number;\n\tcircuitFailureThreshold: number;\n\tcircuitResetTimeoutMs: number;\n\tcircuitSuccessThreshold: number;\n\tfailureMode: DownstreamHttpFailureMode;\n}\n\ninterface EvaluateActionResponse {\n\tevaluation?: {\n\t\tdecision?: string | number;\n\t\treasons?: string[];\n\t\tmatchedRules?: string[];\n\t};\n}\n\nconst downstreamClients = new Map<string, downstream.DownstreamClient>();\n\nfunction trimString(value: string | undefined): string | undefined {\n\tconst trimmed = value?.trim();\n\treturn trimmed ? trimmed : undefined;\n}\n\nfunction getEnvValue(names: string[]): string | undefined {\n\tfor (const name of names) {\n\t\tconst value = trimString(process.env[name]);\n\t\tif (value) {\n\t\t\treturn value;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nfunction parsePositiveInt(value: string | undefined, fallback: number): number {\n\tconst parsed = Number.parseInt(value ?? \"\", 10);\n\treturn Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;\n}\n\nfunction stripTrailingSlashes(value: string): string {\n\treturn value.replace(/\\/+$/, \"\");\n}\n\nfunction normalizeBaseUrl(baseUrl: string): string {\n\tlet normalized = stripTrailingSlashes(baseUrl.trim());\n\tfor (const suffix of [\n\t\tEVALUATE_ACTION_PATH,\n\t\tplatformConnectServicePath(PLATFORM_CONNECT_SERVICES.governance),\n\t]) {\n\t\tif (normalized.endsWith(suffix)) {\n\t\t\tnormalized = stripTrailingSlashes(normalized.slice(0, -suffix.length));\n\t\t}\n\t}\n\treturn normalized;\n}\n\nfunction resolveWorkspaceId(\n\tconfig: ActionFirewallGovernanceServiceConfig | undefined,\n\tcontext: ActionApprovalContext,\n): string | undefined {\n\tconst configuredWorkspaceId = trimString(config?.workspaceId);\n\tconst envWorkspaceId = getEnvValue([\n\t\t\"GOVERNANCE_SERVICE_WORKSPACE_ID\",\n\t\t\"MAESTRO_GOVERNANCE_WORKSPACE_ID\",\n\t\t\"MAESTRO_EVALOPS_WORKSPACE_ID\",\n\t\t\"MAESTRO_WORKSPACE_ID\",\n\t\t\"MAESTRO_EVALOPS_ORG_ID\",\n\t\t\"EVALOPS_ORGANIZATION_ID\",\n\t\t\"MAESTRO_ENTERPRISE_ORG_ID\",\n\t]);\n\tif (\n\t\tconfiguredWorkspaceId ??\n\t\ttrimString(context.user?.orgId) ??\n\t\tenvWorkspaceId\n\t) {\n\t\treturn (\n\t\t\tconfiguredWorkspaceId ?? trimString(context.user?.orgId) ?? envWorkspaceId\n\t\t);\n\t}\n\n\tconst stored = loadOAuthCredentials(\"evalops\")?.metadata?.organizationId;\n\treturn typeof stored === \"string\" && stored.trim().length > 0\n\t\t? stored.trim()\n\t\t: undefined;\n}\n\nexport function resolveActionFirewallGovernanceServiceConfig(\n\tconfig: ActionFirewallGovernanceServiceConfig | false | undefined,\n\tcontext: ActionApprovalContext,\n): ResolvedActionFirewallGovernanceServiceConfig | null {\n\tif (config === false) {\n\t\treturn null;\n\t}\n\n\tconst baseUrl =\n\t\ttrimString(config?.baseUrl) ??\n\t\tgetEnvValue([\n\t\t\t\"GOVERNANCE_SERVICE_URL\",\n\t\t\t\"MAESTRO_GOVERNANCE_SERVICE_URL\",\n\t\t\t\"MAESTRO_PLATFORM_BASE_URL\",\n\t\t\t\"MAESTRO_EVALOPS_BASE_URL\",\n\t\t\t\"EVALOPS_BASE_URL\",\n\t\t]);\n\tif (!baseUrl) {\n\t\treturn null;\n\t}\n\n\tconst workspaceId = resolveWorkspaceId(config, context);\n\tif (!workspaceId) {\n\t\treturn null;\n\t}\n\n\tconst storedToken = trimString(loadOAuthCredentials(\"evalops\")?.access);\n\tconst required =\n\t\tconfig?.required ??\n\t\tgetEnvValue([\n\t\t\t\"GOVERNANCE_SERVICE_REQUIRED\",\n\t\t\t\"MAESTRO_GOVERNANCE_SERVICE_REQUIRED\",\n\t\t]) === \"1\";\n\n\treturn {\n\t\tagentId:\n\t\t\ttrimString(config?.agentId) ??\n\t\t\tgetEnvValue([\n\t\t\t\t\"GOVERNANCE_SERVICE_AGENT_ID\",\n\t\t\t\t\"MAESTRO_GOVERNANCE_AGENT_ID\",\n\t\t\t\t\"MAESTRO_EVALOPS_AGENT_ID\",\n\t\t\t\t\"MAESTRO_AGENT_ID\",\n\t\t\t]) ??\n\t\t\tDEFAULT_AGENT_ID,\n\t\tbaseUrl: normalizeBaseUrl(baseUrl),\n\t\tcircuitFailureThreshold:\n\t\t\tconfig?.circuitFailureThreshold ??\n\t\t\tparsePositiveInt(\n\t\t\t\tgetEnvValue([\n\t\t\t\t\t\"GOVERNANCE_SERVICE_CIRCUIT_FAILURE_THRESHOLD\",\n\t\t\t\t\t\"MAESTRO_GOVERNANCE_SERVICE_CIRCUIT_FAILURE_THRESHOLD\",\n\t\t\t\t]),\n\t\t\t\t5,\n\t\t\t),\n\t\tcircuitResetTimeoutMs:\n\t\t\tconfig?.circuitResetTimeoutMs ??\n\t\t\tparsePositiveInt(\n\t\t\t\tgetEnvValue([\n\t\t\t\t\t\"GOVERNANCE_SERVICE_CIRCUIT_RESET_TIMEOUT_MS\",\n\t\t\t\t\t\"MAESTRO_GOVERNANCE_SERVICE_CIRCUIT_RESET_TIMEOUT_MS\",\n\t\t\t\t]),\n\t\t\t\t30_000,\n\t\t\t),\n\t\tcircuitSuccessThreshold:\n\t\t\tconfig?.circuitSuccessThreshold ??\n\t\t\tparsePositiveInt(\n\t\t\t\tgetEnvValue([\n\t\t\t\t\t\"GOVERNANCE_SERVICE_CIRCUIT_SUCCESS_THRESHOLD\",\n\t\t\t\t\t\"MAESTRO_GOVERNANCE_SERVICE_CIRCUIT_SUCCESS_THRESHOLD\",\n\t\t\t\t]),\n\t\t\t\t2,\n\t\t\t),\n\t\tfailureMode: required ? \"required\" : \"optional\",\n\t\tmaxAttempts:\n\t\t\tconfig?.maxAttempts ??\n\t\t\tparsePositiveInt(\n\t\t\t\tgetEnvValue([\n\t\t\t\t\t\"GOVERNANCE_SERVICE_MAX_ATTEMPTS\",\n\t\t\t\t\t\"MAESTRO_GOVERNANCE_SERVICE_MAX_ATTEMPTS\",\n\t\t\t\t]),\n\t\t\t\tDEFAULT_MAX_ATTEMPTS,\n\t\t\t),\n\t\ttimeoutMs:\n\t\t\tconfig?.timeoutMs ??\n\t\t\tparsePositiveInt(\n\t\t\t\tgetEnvValue([\n\t\t\t\t\t\"GOVERNANCE_SERVICE_TIMEOUT_MS\",\n\t\t\t\t\t\"MAESTRO_GOVERNANCE_SERVICE_TIMEOUT_MS\",\n\t\t\t\t]),\n\t\t\t\tDEFAULT_TIMEOUT_MS,\n\t\t\t),\n\t\ttoken:\n\t\t\ttrimString(config?.token) ??\n\t\t\tgetEnvValue([\n\t\t\t\t\"GOVERNANCE_SERVICE_TOKEN\",\n\t\t\t\t\"MAESTRO_GOVERNANCE_SERVICE_TOKEN\",\n\t\t\t\t\"MAESTRO_EVALOPS_ACCESS_TOKEN\",\n\t\t\t\t\"EVALOPS_TOKEN\",\n\t\t\t]) ??\n\t\t\tstoredToken,\n\t\tworkspaceId,\n\t};\n}\n\nfunction getDownstreamClient(\n\tconfig: ResolvedActionFirewallGovernanceServiceConfig,\n\top: GovernanceCall,\n): downstream.DownstreamClient {\n\tconst failureMode = GOVERNANCE_CALL_FAILURE_MODES[op][config.failureMode];\n\tconst key = JSON.stringify({\n\t\tbaseUrl: config.baseUrl,\n\t\tfailureMode,\n\t\top,\n\t\treset: config.circuitResetTimeoutMs,\n\t\tsuccess: config.circuitSuccessThreshold,\n\t\tthreshold: config.circuitFailureThreshold,\n\t});\n\tconst cached = downstreamClients.get(key);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\tconst client = downstream.New(`governance.${op}`, {\n\t\tfailureMode,\n\t\tbreaker: {\n\t\t\tfailureThreshold: config.circuitFailureThreshold,\n\t\t\tresetTimeoutMs: config.circuitResetTimeoutMs,\n\t\t\tsuccessThreshold: config.circuitSuccessThreshold,\n\t\t\ttoolName: `governance.${op}`,\n\t\t},\n\t});\n\tdownstreamClients.set(key, client);\n\treturn client;\n}\n\nfunction toHttpFailureMode(\n\tclient: downstream.DownstreamClient,\n): DownstreamHttpFailureMode {\n\treturn client.failureMode === downstream.FailClosed ? \"required\" : \"optional\";\n}\n\nfunction buildHeaders(\n\tconfig: ResolvedActionFirewallGovernanceServiceConfig,\n): Record<string, string> {\n\treturn {\n\t\t...(config.token ? { Authorization: `Bearer ${config.token}` } : {}),\n\t\t\"Connect-Protocol-Version\": CONNECT_PROTOCOL_VERSION,\n\t\t\"Content-Type\": \"application/json\",\n\t};\n}\n\nfunction buildActionContext(): Record<string, string> | undefined {\n\tconst environment = getEnvValue([\n\t\t\"GOVERNANCE_SERVICE_ENVIRONMENT\",\n\t\t\"NODE_ENV\",\n\t]);\n\treturn environment ? { environment } : undefined;\n}\n\nfunction encodeActionPayload(context: ActionApprovalContext): string {\n\treturn Buffer.from(\n\t\tJSON.stringify({\n\t\t\targs: context.args,\n\t\t\tmetadata: context.metadata,\n\t\t\tsession: context.session\n\t\t\t\t? {\n\t\t\t\t\t\tid: context.session.id,\n\t\t\t\t\t\tstartedAt: context.session.startedAt.toISOString(),\n\t\t\t\t\t}\n\t\t\t\t: undefined,\n\t\t\ttoolName: context.toolName,\n\t\t\tuser: context.user,\n\t\t\tuserIntent: context.userIntent,\n\t\t}),\n\t\t\"utf8\",\n\t).toString(\"base64\");\n}\n\nfunction normalizeDecision(\n\tdecision: string | number | undefined,\n): ActionFirewallVerdict[\"action\"] {\n\tswitch (decision) {\n\t\tcase \"ACTION_DECISION_ALLOW\":\n\t\tcase \"allow\":\n\t\tcase 1:\n\t\t\treturn \"allow\";\n\t\tcase \"ACTION_DECISION_DENY\":\n\t\tcase \"deny\":\n\t\tcase 2:\n\t\t\treturn \"block\";\n\t\tcase \"ACTION_DECISION_REQUIRE_APPROVAL\":\n\t\tcase \"require_approval\":\n\t\tcase 3:\n\t\t\treturn \"require_approval\";\n\t\tdefault:\n\t\t\tthrow new Error(\"governance service response did not include a decision\");\n\t}\n}\n\nfunction normalizeStringArray(value: string[] | undefined): string[] {\n\treturn Array.isArray(value)\n\t\t? value.map((item) => item.trim()).filter((item) => item.length > 0)\n\t\t: [];\n}\n\nfunction normalizeEvaluationResponse(\n\tpayload: EvaluateActionResponse,\n): ActionFirewallVerdict {\n\tconst evaluation = payload.evaluation;\n\tif (!evaluation) {\n\t\tthrow new Error(\"governance service response did not include evaluation\");\n\t}\n\n\tconst action = normalizeDecision(evaluation.decision);\n\tif (action === \"allow\") {\n\t\treturn { action };\n\t}\n\n\tconst reasons = normalizeStringArray(evaluation.reasons);\n\tconst matchedRules = normalizeStringArray(evaluation.matchedRules);\n\tconst ruleId = matchedRules[0] ?? \"governance-service\";\n\tconst reason = reasons.join(\"; \") || \"Action denied by governance service\";\n\tif (action === \"block\") {\n\t\treturn {\n\t\t\taction,\n\t\t\truleId,\n\t\t\treason,\n\t\t};\n\t}\n\treturn {\n\t\taction: \"require_approval\",\n\t\truleId,\n\t\treason,\n\t};\n}\n\nexport async function evaluateActionWithActionFirewallGovernanceService(\n\tconfig: ResolvedActionFirewallGovernanceServiceConfig,\n\tcontext: ActionApprovalContext,\n): Promise<ActionFirewallVerdict | null> {\n\tconst client = getDownstreamClient(config, \"evaluateAction\");\n\treturn downstream.CallOp(\n\t\tclient,\n\t\t\"evaluateAction\",\n\t\tasync () => {\n\t\t\tconst response = await fetchDownstream(\n\t\t\t\t`${config.baseUrl}${EVALUATE_ACTION_PATH}`,\n\t\t\t\t{\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\theaders: buildHeaders(config),\n\t\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\t\tworkspaceId: config.workspaceId,\n\t\t\t\t\t\tagentId: config.agentId,\n\t\t\t\t\t\tactionType: context.toolName,\n\t\t\t\t\t\tactionPayload: encodeActionPayload(context),\n\t\t\t\t\t\tcontext: buildActionContext(),\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tserviceName: \"governance service\",\n\t\t\t\t\tfailureMode: toHttpFailureMode(client),\n\t\t\t\t\ttimeoutMs: config.timeoutMs,\n\t\t\t\t\tmaxAttempts: config.maxAttempts,\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tif (!response.ok) {\n\t\t\t\tconst text = await response.text();\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`governance service returned ${response.status}: ${\n\t\t\t\t\t\ttext || response.statusText\n\t\t\t\t\t}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn normalizeEvaluationResponse(\n\t\t\t\t(await response.json()) as EvaluateActionResponse,\n\t\t\t);\n\t\t},\n\t\t() => null,\n\t);\n}\n\nexport function resetActionFirewallGovernanceDownstreamForTests(): void {\n\tdownstreamClients.clear();\n}\n"]}
|
package/dist/safety/policy.d.ts
CHANGED
|
@@ -7,8 +7,11 @@
|
|
|
7
7
|
*
|
|
8
8
|
* ## Policy File Location
|
|
9
9
|
*
|
|
10
|
-
* Policies are loaded from `~/.maestro/policy.json
|
|
11
|
-
*
|
|
10
|
+
* Policies are loaded from `~/.maestro/policy.json` (or the legacy Composer
|
|
11
|
+
* policy file as a fallback) and `.maestro/workspace.toml` in the current
|
|
12
|
+
* workspace. The global JSON file is typically deployed by enterprise IT and
|
|
13
|
+
* should be protected with appropriate permissions. Workspace TOML applies a
|
|
14
|
+
* stricter project-specific layer.
|
|
12
15
|
*
|
|
13
16
|
* ## Policy Structure
|
|
14
17
|
*
|
|
@@ -41,6 +44,9 @@
|
|
|
41
44
|
* }
|
|
42
45
|
* ```
|
|
43
46
|
*
|
|
47
|
+
* Workspace policies use TOML keys such as `allowed_models`, `blocked_tools`,
|
|
48
|
+
* `file_boundaries`, and `max_tokens_per_session`.
|
|
49
|
+
*
|
|
44
50
|
* ## Rule Evaluation
|
|
45
51
|
*
|
|
46
52
|
* Policies use an allow/block list pattern with the following evaluation order:
|
|
@@ -119,6 +125,11 @@ export interface EnterprisePolicy {
|
|
|
119
125
|
/** Blacklist of blocked model patterns */
|
|
120
126
|
blocked?: string[];
|
|
121
127
|
};
|
|
128
|
+
/** Required skill names for workspace-controlled workflows */
|
|
129
|
+
skills?: {
|
|
130
|
+
/** Skills that must be available for this workspace */
|
|
131
|
+
required?: string[];
|
|
132
|
+
};
|
|
122
133
|
/** File system path restrictions */
|
|
123
134
|
paths?: {
|
|
124
135
|
/** Whitelist of allowed path patterns (e.g., "/home/user/projects/**") */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/safety/policy.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/safety/policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AAYH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAmBzE;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAChC,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,sEAAsE;IACtE,KAAK,CAAC,EAAE;QACP,gEAAgE;QAChE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,sEAAsE;QACtE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;IAEF,mDAAmD;IACnD,YAAY,CAAC,EAAE;QACd,4CAA4C;QAC5C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,4CAA4C;QAC5C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;IAEF,8DAA8D;IAC9D,MAAM,CAAC,EAAE;QACR,gEAAgE;QAChE,OAAO,CAAC,EAAE,MAAM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