@evalops/maestro 0.10.8 → 0.10.10
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 +28 -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 +69 -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/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 +36 -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 +41771 -22892
- 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/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 +122 -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 +83 -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 +73 -14
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/agent/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EACX,sBAAsB,EACtB,qBAAqB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE3E;;;;;;;;;;GAUG;AACH,MAAM,MAAM,GAAG,GACZ,oBAAoB,GACpB,kBAAkB,GAClB,oBAAoB,GACpB,sBAAsB,GACtB,mBAAmB,GACnB,kBAAkB,GAClB,WAAW,CAAC;AAEf,MAAM,W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W,GAClB,aAAa,CAAC,UAAU,CAAC,CAAC;IAE7B;;;;;;;;;;;;OAYG;IACH,QAAQ,CACP,QAAQ,EAAE,OAAO,EAAE,EACnB,MAAM,EAAE,cAAc,EACtB,MAAM,CAAC,EAAE,WAAW,GAClB,aAAa,CAAC,UAAU,CAAC,CAAC;IAE7B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC7B,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,SAAS,GAAG,iBAAiB,CAAC;IACzC,mEAAmE;IACnE,UAAU,CAAC,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IAClC,2DAA2D;IAC3D,IAAI,EAAE,WAAW,CAAC;CAClB"}
|
package/dist/agent/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/agent/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG","sourcesContent":["/**\n * @fileoverview Core Type Definitions for Composer Agent\n *\n * This module defines the fundamental types used throughout the Composer AI system,\n * including message formats, tool definitions, model configurations, and agent state.\n *\n * ## Type Categories\n *\n * ### Message Types\n * - {@link UserMessage} - Messages from the human user\n * - {@link AssistantMessage} - Responses from the AI assistant\n * - {@link ToolResultMessage} - Results from tool executions\n * - {@link Message} - Union of all message types\n *\n * ### Content Types\n * - {@link TextContent} - Plain text content blocks\n * - {@link ImageContent} - Base64-encoded images\n * - {@link ThinkingContent} - Extended reasoning traces\n * - {@link ToolCall} - Tool invocation requests\n *\n * ### Tool Types\n * - {@link Tool} - Tool definition schema (for API)\n * - {@link AgentTool} - Tool with execute function (for runtime)\n * - {@link AgentToolResult} - Return value from tool execution\n *\n * ### Configuration Types\n * - {@link Model} - LLM model configuration\n * - {@link AgentState} - Current state of an agent\n * - {@link AgentRunConfig} - Runtime configuration\n *\n * @module agent/types\n */\n\nimport type { TSchema } from \"@sinclair/typebox\";\nimport type { PromptMetadata } from \"../prompts/types.js\";\nimport type {\n\tActionApprovalDecision,\n\tActionApprovalRequest,\n} from \"./action-approval.js\";\nimport type { ToolRetryDecision, ToolRetryRequest } from \"./tool-retry.js\";\n\n/**\n * API format identifier for different LLM provider APIs.\n *\n * Each provider may support different API formats:\n * - `openai-completions` - OpenAI Chat Completions API\n * - `openai-responses` - OpenAI Responses API (newer format)\n * - `anthropic-messages` - Anthropic Messages API\n * - `google-generative-ai` - Google Generative AI (Gemini)\n * - `google-gemini-cli` - Google Cloud Code Assist (Gemini CLI)\n * - `bedrock-converse` - AWS Bedrock Converse API\n */\nexport type Api =\n\t| \"openai-completions\"\n\t| \"openai-responses\"\n\t| \"anthropic-messages\"\n\t| \"google-generative-ai\"\n\t| \"google-gemini-cli\"\n\t| \"bedrock-converse\"\n\t| \"vertex-ai\";\n\nexport interface OpenAICompatOverrides {\n\tsupportsStore?: boolean;\n\tsupportsDeveloperRole?: boolean;\n\tsupportsReasoningEffort?: boolean;\n\tsupportsResponsesApi?: boolean;\n\t/** Supports Anthropic-style cache_control (OpenRouter with Claude models) */\n\tsupportsCacheControl?: boolean;\n\tmaxTokensField?: \"max_tokens\" | \"max_completion_tokens\";\n\trequiresToolResultName?: boolean;\n\trequiresAssistantAfterToolResult?: boolean;\n\trequiresThinkingAsText?: boolean;\n\trequiresMistralToolIds?: boolean;\n}\n\n/**\n * Well-known LLM provider identifiers.\n *\n * These are the officially supported providers with built-in configurations:\n * - `anthropic` - Anthropic (Claude models)\n * - `bedrock` - AWS Bedrock\n * - `google` - Google AI (Gemini models)\n * - `openai` - OpenAI (GPT models)\n * - `azure-openai` - Azure OpenAI\n * - `writer` - Writer.com\n * - `xai` - xAI (Grok models)\n * - `groq` - Groq\n * - `cerebras` - Cerebras\n * - `openrouter` - OpenRouter (aggregator)\n * - `zai` - ZAI\n */\nexport type KnownProvider =\n\t| \"anthropic\"\n\t| \"bedrock\"\n\t| \"google\"\n\t| \"openai\"\n\t| \"azure-openai\"\n\t| \"writer\"\n\t| \"xai\"\n\t| \"groq\"\n\t| \"cerebras\"\n\t| \"openrouter\"\n\t| \"zai\";\n\n/**\n * Provider identifier - either a known provider or a custom string.\n * Custom providers can be used with OpenAI-compatible APIs.\n */\nexport type Provider = KnownProvider | string;\n\n/**\n * Reasoning effort level for models that support extended thinking.\n *\n * Higher levels produce more detailed reasoning at increased latency:\n * - `minimal` - Brief chain-of-thought hints\n * - `low` - Short reasoning steps\n * - `medium` - Moderate reasoning depth (recommended default)\n * - `high` - Thorough step-by-step reasoning\n * - `ultra` - Maximum reasoning depth (for complex problems)\n *\n * Note: Claude Code uses keywords \"think\", \"think hard\", \"think harder\", \"ultrathink\"\n * which map to low, medium, high, ultra respectively.\n */\nexport type ReasoningEffort = \"minimal\" | \"low\" | \"medium\" | \"high\" | \"ultra\";\n\n/**\n * Plain text content block within a message.\n *\n * @example\n * ```typescript\n * const content: TextContent = {\n * type: \"text\",\n * text: \"Hello, how can I help you today?\"\n * };\n * ```\n */\nexport interface TextContent {\n\t/** Discriminator for content block type */\n\ttype: \"text\";\n\t/** The text content */\n\ttext: string;\n\t/** Optional signature for content verification */\n\ttextSignature?: string;\n}\n\n/**\n * Extended thinking/reasoning content block.\n *\n * Contains the model's internal reasoning process when extended\n * thinking is enabled. This is typically hidden from end users\n * but useful for debugging and understanding model behavior.\n */\nexport interface ThinkingContent {\n\t/** Discriminator for content block type */\n\ttype: \"thinking\";\n\t/** The thinking/reasoning trace */\n\tthinking: string;\n\t/** Optional signature for content verification */\n\tthinkingSignature?: string;\n}\n\n/**\n * Base64-encoded image content block.\n *\n * Used for including images in user messages (vision input)\n * or tool results (screenshots, generated images).\n *\n * @example\n * ```typescript\n * const image: ImageContent = {\n * type: \"image\",\n * data: \"iVBORw0KGgo...\", // base64 encoded\n * mimeType: \"image/png\"\n * };\n * ```\n */\nexport interface ImageContent {\n\t/** Discriminator for content block type */\n\ttype: \"image\";\n\t/** Base64-encoded image data */\n\tdata: string;\n\t/** MIME type (e.g., \"image/png\", \"image/jpeg\") */\n\tmimeType: string;\n}\n\n/**\n * Tool invocation request within an assistant message.\n *\n * When the model decides to use a tool, it emits a ToolCall\n * content block specifying which tool to call and with what arguments.\n *\n * @example\n * ```typescript\n * const toolCall: ToolCall = {\n * type: \"toolCall\",\n * id: \"call_abc123\",\n * name: \"read\",\n * arguments: { file_path: \"/src/index.ts\" }\n * };\n * ```\n */\nexport interface ToolCall {\n\t/** Discriminator for content block type */\n\ttype: \"toolCall\";\n\t/** Unique identifier for this tool call (used to match results) */\n\tid: string;\n\t/** Name of the tool to invoke */\n\tname: string;\n\t/** Arguments to pass to the tool */\n\targuments: Record<string, unknown>;\n\t/**\n\t * Provider-specific signature used by some APIs (notably Gemini 3) to\n\t * associate tool calls with preceding thoughts. If present, it must be\n\t * preserved across turns when replaying the message history back to the provider.\n\t */\n\tthoughtSignature?: string;\n}\n\n/**\n * Token usage and cost information for a message or request.\n *\n * Tracks input/output tokens and cache utilization for cost monitoring\n * and context window management.\n */\nexport interface Usage {\n\t/** Number of input tokens consumed */\n\tinput: number;\n\t/** Number of output tokens generated */\n\toutput: number;\n\t/** Tokens served from prompt cache (reduces cost) */\n\tcacheRead: number;\n\t/** Tokens written to prompt cache */\n\tcacheWrite: number;\n\t/** Calculated cost breakdown in USD */\n\tcost: {\n\t\t/** Cost for input tokens */\n\t\tinput: number;\n\t\t/** Cost for output tokens */\n\t\toutput: number;\n\t\t/** Cost savings from cache reads */\n\t\tcacheRead: number;\n\t\t/** Cost for cache writes */\n\t\tcacheWrite: number;\n\t\t/** Total cost for this message/request */\n\t\ttotal: number;\n\t};\n}\n\n/**\n * Reason why the model stopped generating.\n *\n * - `stop` - Natural completion (end of response)\n * - `length` - Hit max_tokens limit\n * - `toolUse` - Model wants to use a tool (generation paused)\n * - `error` - An error occurred during generation\n * - `aborted` - Request was cancelled by the user\n */\nexport type StopReason = \"stop\" | \"length\" | \"toolUse\" | \"error\" | \"aborted\";\n\n/**\n * Message from the human user.\n *\n * User messages can contain plain text or an array of content blocks\n * (for multi-modal input with images).\n *\n * @example\n * ```typescript\n * // Simple text message\n * const msg: UserMessage = {\n * role: \"user\",\n * content: \"What is this code doing?\",\n * timestamp: Date.now()\n * };\n *\n * // Message with image\n * const multiModal: UserMessage = {\n * role: \"user\",\n * content: [\n * { type: \"text\", text: \"What's in this screenshot?\" },\n * { type: \"image\", data: base64Data, mimeType: \"image/png\" }\n * ],\n * timestamp: Date.now()\n * };\n * ```\n */\nexport interface UserMessage {\n\t/** Message role discriminator */\n\trole: \"user\";\n\t/** Message content - string or array of content blocks */\n\tcontent: string | (TextContent | ImageContent)[];\n\t/** Optional non-LLM metadata for runtime bookkeeping */\n\tmetadata?: Record<string, unknown>;\n\t/** Unix timestamp in milliseconds when message was created */\n\ttimestamp: number;\n}\n\n/**\n * Response message from the AI assistant.\n *\n * Contains the model's response along with metadata about the generation\n * including token usage, stop reason, and provider information.\n *\n * The content array may contain:\n * - {@link TextContent} - The actual response text\n * - {@link ThinkingContent} - Extended reasoning (if enabled)\n * - {@link ToolCall} - Tool invocation requests\n */\nexport interface AssistantMessage {\n\t/** Message role discriminator */\n\trole: \"assistant\";\n\t/** Array of content blocks (text, thinking, tool calls) */\n\tcontent: (TextContent | ThinkingContent | ToolCall)[];\n\t/** API format used for this response */\n\tapi: Api;\n\t/** Provider that generated this response */\n\tprovider: Provider;\n\t/** Model ID that generated this response */\n\tmodel: string;\n\t/** Token usage and cost information */\n\tusage: Usage;\n\t/** Reason why generation stopped */\n\tstopReason: StopReason;\n\t/** Error message if stopReason is \"error\" */\n\terrorMessage?: string;\n\t/** Unix timestamp in milliseconds when message was created */\n\ttimestamp: number;\n}\n\n/**\n * Result message from a tool execution.\n *\n * After a tool is executed, the result is sent back to the model\n * as a ToolResultMessage so it can incorporate the information\n * into its response.\n *\n * @typeParam TDetails - Type of additional details attached to the result\n *\n * @example\n * ```typescript\n * const result: ToolResultMessage = {\n * role: \"toolResult\",\n * toolCallId: \"call_abc123\",\n * toolName: \"read\",\n * content: [{ type: \"text\", text: \"file contents...\" }],\n * isError: false,\n * timestamp: Date.now()\n * };\n * ```\n */\nexport interface ToolResultMessage<TDetails = unknown> {\n\t/** Message role discriminator */\n\trole: \"toolResult\";\n\t/** ID of the tool call this result corresponds to */\n\ttoolCallId: string;\n\t/** Name of the tool that was executed */\n\ttoolName: string;\n\t/** Result content (text or images) */\n\tcontent: (TextContent | ImageContent)[];\n\t/** Optional additional details about the execution */\n\tdetails?: TDetails;\n\t/** Whether the tool execution resulted in an error */\n\tisError: boolean;\n\t/** Unix timestamp in milliseconds when result was created */\n\ttimestamp: number;\n}\n\n/**\n * Message type for hook-injected messages.\n *\n * Hooks can inject these into the conversation. They are converted to user\n * messages for LLM context and can optionally be hidden from the UI.\n */\nexport interface HookMessage<T = unknown> {\n\t/** Message role discriminator */\n\trole: \"hookMessage\";\n\t/** Hook-defined message category */\n\tcustomType: string;\n\t/** Message content - string or array of content blocks */\n\tcontent: string | (TextContent | ImageContent)[];\n\t/** Whether to render this message in the UI */\n\tdisplay: boolean;\n\t/** Optional hook-specific metadata (not sent to the LLM) */\n\tdetails?: T;\n\t/** Unix timestamp in milliseconds when message was created */\n\ttimestamp: number;\n}\n\n/**\n * Message type for branch summaries when navigating session trees.\n */\nexport interface BranchSummaryMessage {\n\t/** Message role discriminator */\n\trole: \"branchSummary\";\n\t/** Summary text */\n\tsummary: string;\n\t/** ID of the branch point this summary came from */\n\tfromId: string;\n\t/** Unix timestamp in milliseconds when summary was created */\n\ttimestamp: number;\n}\n\n/**\n * Message type for compaction summaries.\n */\nexport interface CompactionSummaryMessage {\n\t/** Message role discriminator */\n\trole: \"compactionSummary\";\n\t/** Summary text */\n\tsummary: string;\n\t/** Token count before compaction (for diagnostics) */\n\ttokensBefore: number;\n\t/** Unix timestamp in milliseconds when summary was created */\n\ttimestamp: number;\n}\n\n/**\n * Union type representing LLM-native messages that can be sent to the model.\n *\n * A conversation with the LLM consists of user input, assistant responses,\n * and tool results.\n */\nexport type Message = UserMessage | AssistantMessage | ToolResultMessage;\n\n/**\n * Empty interface for declaration merging to add custom message types.\n *\n * Consumers can extend this interface to add their own message types:\n *\n * @example\n * ```typescript\n * declare module \"@evalops/maestro\" {\n * interface CustomAgentMessages {\n * notification: { role: \"notification\"; text: string; timestamp: number };\n * }\n * }\n * ```\n */\n// biome-ignore lint/suspicious/noEmptyInterface: Required for declaration merging\nexport interface CustomAgentMessages {}\n\n/**\n * Union type representing all messages in the agent conversation history.\n *\n * Includes both LLM-native messages (user, assistant, toolResult) and\n * custom message types (hookMessage, branchSummary, compactionSummary,\n * plus any types added via declaration merging).\n *\n * Custom messages are preserved in session history but filtered out\n * before being sent to the LLM via {@link convertToLlm}.\n */\nexport type AgentMessage =\n\t| Message\n\t| HookMessage\n\t| BranchSummaryMessage\n\t| CompactionSummaryMessage\n\t| CustomAgentMessages[keyof CustomAgentMessages];\n\n/**\n * Tool definition schema for API serialization.\n *\n * This interface defines a tool's metadata and parameter schema\n * for transmission to the LLM. The actual execution logic is in\n * {@link AgentTool}.\n *\n * @typeParam TParameters - TypeBox schema for the tool's parameters\n *\n * @example\n * ```typescript\n * import { Type } from \"@sinclair/typebox\";\n *\n * const readTool: Tool = {\n * name: \"read\",\n * description: \"Read a file from the filesystem\",\n * parameters: Type.Object({\n * file_path: Type.String({ description: \"Path to the file\" })\n * })\n * };\n * ```\n */\nexport interface Tool<TParameters extends TSchema = TSchema> {\n\t/** Unique tool identifier */\n\tname: string;\n\t/** Human-readable description of what the tool does */\n\tdescription: string;\n\t/** TypeBox schema defining the tool's parameters */\n\tparameters: TParameters;\n\t/** Optional categorization (e.g., \"file\", \"shell\", \"web\") */\n\ttoolType?: string;\n\t/** Example inputs for documentation/few-shot prompting */\n\tinputExamples?: unknown[];\n\t/** List of caller identifiers allowed to use this tool */\n\tallowedCallers?: string[];\n\t/** If true, don't send tool definition to API (used for internal tools) */\n\tdeferApiDefinition?: boolean;\n}\n\n/**\n * Behavioral hints for tools (from MCP annotations).\n *\n * These hints help the model and UI understand the tool's behavior\n * for better decision-making and user feedback.\n */\nexport interface ToolAnnotations {\n\t/** If true, the tool does not modify its environment (safe to retry) */\n\treadOnlyHint?: boolean;\n\t/** If true, the tool may perform destructive/irreversible updates */\n\tdestructiveHint?: boolean;\n\t/** If true, calling repeatedly with same args has no additional effect */\n\tidempotentHint?: boolean;\n\t/** If true, the tool interacts with external systems (network, APIs) */\n\topenWorldHint?: boolean;\n}\n\n/**\n * Complete tool definition with execute function.\n *\n * This is the runtime representation of a tool, including both\n * the schema (for the LLM) and the execute function (for the runtime).\n *\n * @typeParam TParameters - TypeBox schema for the tool's parameters\n * @typeParam TDetails - Type of additional details returned with results\n *\n * @example\n * ```typescript\n * import { Type } from \"@sinclair/typebox\";\n *\n * const readTool: AgentTool = {\n * name: \"read\",\n * description: \"Read a file from the filesystem\",\n * parameters: Type.Object({\n * file_path: Type.String()\n * }),\n * execute: async (toolCallId, params) => {\n * const content = await fs.readFile(params.file_path, \"utf-8\");\n * return { content: [{ type: \"text\", text: content }] };\n * }\n * };\n * ```\n */\nexport interface AgentTool<\n\tTParameters extends TSchema = TSchema,\n\tTDetails = unknown,\n> {\n\t/** Unique tool identifier */\n\tname: string;\n\t/** Display label for UI (defaults to name) */\n\tlabel?: string;\n\t/** Human-readable description of what the tool does */\n\tdescription: string;\n\t/** TypeBox schema defining the tool's parameters */\n\tparameters: TParameters;\n\t/** Tool behavior hints from MCP annotations */\n\tannotations?: ToolAnnotations;\n\t/** Optional categorization (e.g., \"file\", \"shell\", \"web\") */\n\ttoolType?: string;\n\t/**\n\t * Where the tool should be executed.\n\t * - `\"server\"`: (default) Executed by the backend agent\n\t * - `\"client\"`: Executed by the client (VS Code, browser) via callback\n\t */\n\texecutionLocation?: \"server\" | \"client\";\n\t/** Example inputs for documentation/few-shot prompting */\n\tinputExamples?: unknown[];\n\t/** List of caller identifiers allowed to use this tool */\n\tallowedCallers?: string[];\n\t/** If true, don't send tool definition to API */\n\tdeferApiDefinition?: boolean;\n\t/** Optional max retries configured by the tool itself */\n\tmaxRetries?: number;\n\t/** Optional retry delay configured by the tool itself */\n\tretryDelayMs?: number;\n\t/** Optional tool-level retry predicate */\n\tshouldRetry?: (error: unknown) => boolean;\n\t/** Optional compact summary used after a tool finishes. */\n\tgetToolUseSummary?: (params: Record<string, unknown>) => string | null;\n\t/** Optional human-facing label used for live tool UI. */\n\tgetDisplayName?: (params: Record<string, unknown>) => string | null;\n\t/** Optional present-tense activity label used while a tool is running. */\n\tgetActivityDescription?: (params: Record<string, unknown>) => string | null;\n\t/**\n\t * Execute the tool with the given parameters.\n\t *\n\t * @param toolCallId - Unique identifier for this tool call\n\t * @param params - Parameters matching the tool's schema\n\t * @param signal - Optional AbortSignal for cancellation\n\t * @param context - Optional execution context (sandbox, etc.)\n\t * @param onUpdate - Optional callback for partial tool output streaming\n\t * @returns Tool result with content and optional details\n\t */\n\texecute: (\n\t\ttoolCallId: string,\n\t\tparams: Record<string, unknown>,\n\t\tsignal?: AbortSignal,\n\t\tcontext?: { sandbox?: import(\"../sandbox/types.js\").Sandbox },\n\t\tonUpdate?: AgentToolUpdateCallback<TDetails>,\n\t) => AgentToolResult<TDetails> | Promise<AgentToolResult<TDetails>>;\n}\n\nexport type AgentToolUpdateCallback<TDetails = unknown> = (\n\tpartial: AgentToolResult<TDetails>,\n) => void;\n\n/**\n * Result returned from tool execution.\n *\n * @typeParam TDetails - Type of additional details attached to the result\n */\nexport interface AgentToolResult<TDetails = unknown> {\n\t/** Result content (text or images) */\n\tcontent: (TextContent | ImageContent)[];\n\t/** Optional additional details about the execution */\n\tdetails?: TDetails;\n\t/** Whether the execution resulted in an error */\n\tisError?: boolean;\n}\n\n/**\n * Conversation context for LLM requests.\n *\n * Contains the system prompt, conversation history, and available tools\n * for a single LLM request.\n */\nexport interface Context {\n\t/** System prompt providing instructions and context */\n\tsystemPrompt?: string;\n\t/** Conversation history */\n\tmessages: Message[];\n\t/** Tools available for the model to use */\n\ttools?: Tool[];\n}\n\n/**\n * Streaming events during assistant message construction.\n *\n * These events are emitted as the LLM generates its response, enabling\n * real-time UI updates and progress tracking.\n *\n * ## Event Types\n *\n * | Type | Description |\n * |------|-------------|\n * | `start` | Message generation started |\n * | `text_start` | New text content block started |\n * | `text_delta` | Incremental text content |\n * | `text_end` | Text content block completed |\n * | `thinking_start` | Extended thinking block started |\n * | `thinking_delta` | Incremental thinking content |\n * | `thinking_end` | Thinking block completed |\n * | `toolcall_start` | Tool call started |\n * | `toolcall_delta` | Incremental tool call args |\n * | `toolcall_end` | Tool call completed |\n * | `done` | Generation completed successfully |\n * | `error` | Generation failed or was aborted |\n */\nexport type AssistantMessageEvent =\n\t| {\n\t\t\t/** Message generation started */\n\t\t\ttype: \"start\";\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** New text content block started */\n\t\t\ttype: \"text_start\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Incremental text content received */\n\t\t\ttype: \"text_delta\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** New text to append */\n\t\t\tdelta: string;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Text content block completed */\n\t\t\ttype: \"text_end\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** Final text content */\n\t\t\tcontent: string;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Extended thinking block started */\n\t\t\ttype: \"thinking_start\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Incremental thinking content received */\n\t\t\ttype: \"thinking_delta\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** New thinking text to append */\n\t\t\tdelta: string;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Thinking content block completed */\n\t\t\ttype: \"thinking_end\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** Final thinking content */\n\t\t\tcontent: string;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Tool call started */\n\t\t\ttype: \"toolcall_start\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Incremental tool call arguments received */\n\t\t\ttype: \"toolcall_delta\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** New JSON fragment to append to arguments */\n\t\t\tdelta: string;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Tool call completed */\n\t\t\ttype: \"toolcall_end\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** Completed tool call */\n\t\t\ttoolCall: ToolCall;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Generation completed successfully */\n\t\t\ttype: \"done\";\n\t\t\t/** Reason for completion */\n\t\t\treason: Extract<StopReason, \"stop\" | \"length\" | \"toolUse\">;\n\t\t\t/** Final assistant message */\n\t\t\tmessage: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Generation failed or was aborted */\n\t\t\ttype: \"error\";\n\t\t\t/** Reason for failure */\n\t\t\treason: Extract<StopReason, \"aborted\" | \"error\">;\n\t\t\t/** Error message details */\n\t\t\terror: AssistantMessage;\n\t };\n\n/**\n * LLM model configuration.\n *\n * Contains all the information needed to use a model, including\n * API endpoints, capabilities, and pricing.\n *\n * @typeParam TApi - The API format this model uses\n *\n * @example\n * ```typescript\n * const claude: Model<\"anthropic-messages\"> = {\n * id: \"claude-sonnet-4-5-20250929\",\n * name: \"Claude Sonnet 4.5\",\n * api: \"anthropic-messages\",\n * provider: \"anthropic\",\n * baseUrl: \"https://api.anthropic.com/v1\",\n * reasoning: true,\n * input: [\"text\", \"image\"],\n * cost: { input: 3.00, output: 15.00, cacheRead: 0.30, cacheWrite: 3.75 },\n * contextWindow: 200000,\n * maxTokens: 8192\n * };\n * ```\n */\nexport interface Model<TApi extends Api> {\n\t/** Unique model identifier (e.g., \"claude-sonnet-4-5-20250929\") */\n\tid: string;\n\t/** Human-readable model name (e.g., \"Claude Sonnet 4.5\") */\n\tname: string;\n\t/** API format used for requests */\n\tapi: TApi;\n\t/** Provider serving this model */\n\tprovider: Provider;\n\t/** Base URL for API requests */\n\tbaseUrl: string;\n\t/** Optional custom headers to include in API requests */\n\theaders?: Record<string, string>;\n\t/** Optional OpenAI-compatibility overrides for vendor quirks */\n\tcompat?: OpenAICompatOverrides;\n\t/** Whether the model supports extended thinking */\n\treasoning: boolean;\n\t/** Whether the model supports tool use */\n\ttoolUse?: boolean;\n\t/** Supported input modalities */\n\tinput: (\"text\" | \"image\")[];\n\t/** Cost per million tokens in USD */\n\tcost: {\n\t\t/** Input token cost */\n\t\tinput: number;\n\t\t/** Output token cost */\n\t\toutput: number;\n\t\t/** Cache read cost (typically discounted) */\n\t\tcacheRead: number;\n\t\t/** Cache write cost */\n\t\tcacheWrite: number;\n\t};\n\t/** Maximum context window in tokens */\n\tcontextWindow: number;\n\t/** Maximum output tokens per response */\n\tmaxTokens: number;\n}\n\n/**\n * File attachment for messages.\n *\n * Represents an uploaded file (image or document) that can be\n * included in a user message.\n */\nexport interface Attachment {\n\t/** Unique identifier for this attachment */\n\tid: string;\n\t/** Type of attachment */\n\ttype: \"image\" | \"document\";\n\t/** Original filename */\n\tfileName: string;\n\t/** MIME type of the file */\n\tmimeType: string;\n\t/** File size in bytes */\n\tsize: number;\n\t/** Base64-encoded file content */\n\tcontent: string;\n\t/** Extracted text content (for documents) */\n\textractedText?: string;\n\t/** Preview image (for documents) */\n\tpreview?: string;\n}\n\n/**\n * User-configurable thinking level for extended reasoning.\n *\n * Controls how much computational effort the model spends on\n * reasoning before generating a response.\n *\n * - `off` - No extended thinking\n * - `minimal` - Brief reasoning hints\n * - `low` - Short reasoning steps\n * - `medium` - Moderate reasoning (default)\n * - `high` - Thorough step-by-step reasoning\n * - `max` - Maximum reasoning depth\n */\nexport type ThinkingLevel =\n\t| \"off\"\n\t| \"minimal\"\n\t| \"low\"\n\t| \"medium\"\n\t| \"high\"\n\t| \"ultra\"\n\t| \"max\";\n\n/**\n * User message with optional file attachments.\n *\n * Extends the base UserMessage to support file attachments\n * for rich multi-modal interactions.\n */\nexport type UserMessageWithAttachments = UserMessage & {\n\t/** Optional file attachments */\n\tattachments?: Attachment[];\n};\n\n/**\n * Placeholder for custom message types.\n * Can be extended to add application-specific message types.\n */\nexport interface CustomMessages {\n\thookMessage: HookMessage;\n\tbranchSummary: BranchSummaryMessage;\n\tcompactionSummary: CompactionSummaryMessage;\n}\n\n/**\n * Application-level message type.\n *\n * Union of all message types that can appear in the UI,\n * including user messages with attachments.\n */\nexport type AppMessage =\n\t| AssistantMessage\n\t| UserMessageWithAttachments\n\t| Message\n\t| CustomMessages[keyof CustomMessages];\n\n/**\n * Information about a tool call currently being executed.\n */\nexport interface PendingToolCall {\n\t/** Name of the tool being executed */\n\ttoolName: string;\n\t/** Original arguments passed to the tool */\n\targs?: Record<string, unknown>;\n\t/** Tool metadata captured when execution started */\n\ttool?: Pick<\n\t\tAgentTool,\n\t\t\"label\" | \"getDisplayName\" | \"getToolUseSummary\" | \"getActivityDescription\"\n\t>;\n\t/** Stable display name for live UI */\n\tdisplayName?: string;\n\t/** Stable compact summary for live UI */\n\tsummaryLabel?: string;\n}\n\n/**\n * Current state of an agent instance.\n *\n * This is the central state object managed by the Agent class,\n * containing all information about the current conversation,\n * configuration, and execution status.\n */\nexport interface AgentState {\n\t/** System prompt providing instructions and context */\n\tsystemPrompt: string;\n\t/** Version/hash metadata for the base system prompt instructions */\n\tpromptMetadata?: PromptMetadata;\n\t/** Exact prompt source files layered into the current system prompt */\n\tsystemPromptSourcePaths?: string[];\n\t/** Current model configuration */\n\tmodel: Model<Api>;\n\t/** Current thinking level for extended reasoning */\n\tthinkingLevel: ThinkingLevel;\n\t/** Optional reasoning summary preference for Responses API */\n\treasoningSummary?: \"auto\" | \"detailed\" | \"concise\" | null;\n\t/** Available tools for this agent */\n\ttools: AgentTool[];\n\t/**\n\t * Controls how queued steering messages are sent between turns.\n\t * - `\"all\"` - Send all queued messages at once\n\t * - `\"one\"` - Send one message at a time\n\t */\n\tsteeringMode: \"all\" | \"one\";\n\t/**\n\t * Controls how queued follow-up messages are sent between turns.\n\t * - `\"all\"` - Send all queued messages at once\n\t * - `\"one\"` - Send one message at a time\n\t */\n\tfollowUpMode: \"all\" | \"one\";\n\t/**\n\t * @deprecated Use steeringMode/followUpMode instead.\n\t */\n\tqueueMode: \"all\" | \"one\";\n\t/** Conversation history */\n\tmessages: AppMessage[];\n\t/** Whether the agent is currently streaming a response */\n\tisStreaming: boolean;\n\t/** Current streaming message (partial response) */\n\tstreamMessage: Message | null;\n\t/** Tool calls currently being executed */\n\tpendingToolCalls: Map<string, PendingToolCall>;\n\t/** Current error message, if any */\n\terror?: string;\n\t/** Optional sandbox for isolated tool execution */\n\tsandbox?: import(\"../sandbox/types.js\").Sandbox;\n\t/** Current sandbox mode (e.g., \"docker\", \"local\") */\n\tsandboxMode?: string | null;\n\t/** Whether sandboxing is enabled */\n\tsandboxEnabled?: boolean;\n\t/** User identification for tracking */\n\tuser?: {\n\t\t/** User UUID */\n\t\tid: string;\n\t\t/** Organization UUID */\n\t\torgId: string;\n\t};\n\t/** Session information for persistence */\n\tsession?: {\n\t\t/** Session UUID */\n\t\tid: string;\n\t\t/** When the session started */\n\t\tstartedAt: Date;\n\t};\n\t/** Sampling temperature override (0.0-2.0, lower = more deterministic) */\n\ttemperature?: number;\n\t/** Top-p sampling override (0.0-1.0) */\n\ttopP?: number;\n}\n\n/**\n * Events emitted during agent execution.\n *\n * These events provide real-time updates about agent activity,\n * enabling UI updates, logging, and progress tracking.\n *\n * ## Lifecycle Events\n * - `agent_start` - Agent execution started\n * - `agent_end` - Agent execution completed\n * - `turn_start` - New conversation turn started\n * - `turn_end` - Conversation turn completed\n *\n * ## Message Events\n * - `message_start` - New message being constructed\n * - `message_update` - Incremental message update\n * - `message_end` - Message completed\n *\n * ## Tool Events\n * - `tool_execution_start` - Tool execution started\n * - `tool_execution_update` - Tool execution produced partial output\n * - `tool_execution_end` - Tool execution completed\n * - `tool_batch_summary` - Tool batch completed with a transient summary label\n * - `client_tool_request` - Client-side tool invocation needed\n *\n * ## Approval Events\n * - `action_approval_required` - User approval needed\n * - `action_approval_resolved` - User made approval decision\n *\n * ## Tool Retry Events\n * - `tool_retry_required` - Tool failed and retry decision needed\n * - `tool_retry_resolved` - Tool retry decision resolved\n *\n * ## Status Events\n * - `status` - Status update\n * - `error` - Error occurred\n * - `compaction` - Context was compacted\n */\nexport type AgentEvent =\n\t| {\n\t\t\t/** Agent execution started */\n\t\t\ttype: \"agent_start\";\n\t\t\t/** Whether this execution is an automatic continuation of the current turn */\n\t\t\tcontinuation?: boolean;\n\t }\n\t| {\n\t\t\t/** Agent execution completed */\n\t\t\ttype: \"agent_end\";\n\t\t\t/** Final messages from this execution */\n\t\t\tmessages: AppMessage[];\n\t\t\t/** Whether execution was aborted */\n\t\t\taborted?: boolean;\n\t\t\t/** If aborted with partial acceptance, contains the saved partial message */\n\t\t\tpartialAccepted?: AppMessage;\n\t\t\t/** Final stop reason from the LLM - \"length\" indicates output hit the max token limit */\n\t\t\tstopReason?: StopReason;\n\t }\n\t| {\n\t\t\t/** Status update during execution */\n\t\t\ttype: \"status\";\n\t\t\t/** Status message */\n\t\t\tstatus: string;\n\t\t\t/** Additional details */\n\t\t\tdetails: Record<string, unknown>;\n\t }\n\t| {\n\t\t\t/** Error occurred during execution */\n\t\t\ttype: \"error\";\n\t\t\t/** Error message */\n\t\t\tmessage: string;\n\t }\n\t| {\n\t\t\t/** New conversation turn started */\n\t\t\ttype: \"turn_start\";\n\t }\n\t| {\n\t\t\t/** Conversation turn completed */\n\t\t\ttype: \"turn_end\";\n\t\t\t/** Assistant message from this turn */\n\t\t\tmessage: AppMessage;\n\t\t\t/** Tool results from this turn */\n\t\t\ttoolResults: AppMessage[];\n\t }\n\t| {\n\t\t\t/** New message being constructed */\n\t\t\ttype: \"message_start\";\n\t\t\t/** The message being built */\n\t\t\tmessage: AppMessage;\n\t }\n\t| {\n\t\t\t/** Incremental update to current message */\n\t\t\ttype: \"message_update\";\n\t\t\t/** Updated message state */\n\t\t\tmessage: AppMessage;\n\t\t\t/** The streaming event that triggered this update */\n\t\t\tassistantMessageEvent: AssistantMessageEvent;\n\t }\n\t| {\n\t\t\t/** Message completed */\n\t\t\ttype: \"message_end\";\n\t\t\t/** Final message */\n\t\t\tmessage: AppMessage;\n\t }\n\t| {\n\t\t\t/** Tool execution started */\n\t\t\ttype: \"tool_execution_start\";\n\t\t\t/** Tool call identifier */\n\t\t\ttoolCallId: string;\n\t\t\t/** Name of the tool */\n\t\t\ttoolName: string;\n\t\t\t/** Optional human-facing label for live UI */\n\t\t\tdisplayName?: string;\n\t\t\t/** Optional compact summary for live UI */\n\t\t\tsummaryLabel?: string;\n\t\t\t/** Arguments passed to the tool */\n\t\t\targs: Record<string, unknown>;\n\t }\n\t| {\n\t\t\t/** Tool execution completed */\n\t\t\ttype: \"tool_execution_end\";\n\t\t\t/** Tool call identifier */\n\t\t\ttoolCallId: string;\n\t\t\t/** Name of the tool */\n\t\t\ttoolName: string;\n\t\t\t/** Optional human-facing label for live UI */\n\t\t\tdisplayName?: string;\n\t\t\t/** Optional compact summary for live UI */\n\t\t\tsummaryLabel?: string;\n\t\t\t/** Result from the tool */\n\t\t\tresult: ToolResultMessage;\n\t\t\t/** Whether the tool returned an error */\n\t\t\tisError: boolean;\n\t }\n\t| {\n\t\t\t/** Summary emitted after the final tool in a batch completes */\n\t\t\ttype: \"tool_batch_summary\";\n\t\t\t/** Stable one-line summary of what the completed tool batch did */\n\t\t\tsummary: string;\n\t\t\t/** Underlying per-tool summary labels used to build the summary */\n\t\t\tsummaryLabels: string[];\n\t\t\t/** Tool call identifiers included in this batch */\n\t\t\ttoolCallIds: string[];\n\t\t\t/** Tool names included in this batch */\n\t\t\ttoolNames: string[];\n\t\t\t/** Successful tool calls in the batch */\n\t\t\tcallsSucceeded: number;\n\t\t\t/** Failed tool calls in the batch */\n\t\t\tcallsFailed: number;\n\t }\n\t| {\n\t\t\t/** Tool execution produced partial output */\n\t\t\ttype: \"tool_execution_update\";\n\t\t\t/** Tool call identifier */\n\t\t\ttoolCallId: string;\n\t\t\t/** Name of the tool */\n\t\t\ttoolName: string;\n\t\t\t/** Optional human-facing label for live UI */\n\t\t\tdisplayName?: string;\n\t\t\t/** Optional compact summary for live UI */\n\t\t\tsummaryLabel?: string;\n\t\t\t/** Arguments passed to the tool */\n\t\t\targs: Record<string, unknown>;\n\t\t\t/** Partial tool result */\n\t\t\tpartialResult: AgentToolResult;\n\t }\n\t| {\n\t\t\t/** User approval required for an action */\n\t\t\ttype: \"action_approval_required\";\n\t\t\t/** Details of the approval request */\n\t\t\trequest: ActionApprovalRequest;\n\t }\n\t| {\n\t\t\t/** User made approval decision */\n\t\t\ttype: \"action_approval_resolved\";\n\t\t\t/** The original request */\n\t\t\trequest: ActionApprovalRequest;\n\t\t\t/** User's decision */\n\t\t\tdecision: ActionApprovalDecision;\n\t }\n\t| {\n\t\t\t/** Tool failed and requires a retry decision */\n\t\t\ttype: \"tool_retry_required\";\n\t\t\t/** Details of the retry request */\n\t\t\trequest: ToolRetryRequest;\n\t }\n\t| {\n\t\t\t/** Tool retry decision resolved */\n\t\t\ttype: \"tool_retry_resolved\";\n\t\t\t/** The original request */\n\t\t\trequest: ToolRetryRequest;\n\t\t\t/** User or policy decision */\n\t\t\tdecision: ToolRetryDecision;\n\t }\n\t| {\n\t\t\t/** Client-side tool invocation needed */\n\t\t\ttype: \"client_tool_request\";\n\t\t\t/** Tool call identifier */\n\t\t\ttoolCallId: string;\n\t\t\t/** Name of the tool */\n\t\t\ttoolName: string;\n\t\t\t/** Arguments for the tool */\n\t\t\targs: unknown;\n\t }\n\t| {\n\t\t\t/** Context was compacted (older messages summarized) */\n\t\t\ttype: \"compaction\";\n\t\t\t/** Generated summary of compacted messages */\n\t\t\tsummary: string;\n\t\t\t/** Index of first entry to keep (entries before were summarized) */\n\t\t\tfirstKeptEntryIndex: number;\n\t\t\t/** Token count before compaction */\n\t\t\ttokensBefore: number;\n\t\t\t/** Whether this was auto-triggered vs manual /compact */\n\t\t\tauto?: boolean;\n\t\t\t/** Custom instructions used for summarization */\n\t\t\tcustomInstructions?: string;\n\t\t\t/** Timestamp of compaction */\n\t\t\ttimestamp: string;\n\t }\n\t| {\n\t\t\t/** Auto-retry started for transient error (rate limit, overload, 5xx) */\n\t\t\ttype: \"auto_retry_start\";\n\t\t\t/** Current retry attempt (1-based) */\n\t\t\tattempt: number;\n\t\t\t/** Maximum number of retry attempts */\n\t\t\tmaxAttempts: number;\n\t\t\t/** Delay in milliseconds before retry */\n\t\t\tdelayMs: number;\n\t\t\t/** The error message that triggered the retry */\n\t\t\terrorMessage: string;\n\t }\n\t| {\n\t\t\t/** Auto-retry completed (success or final failure) */\n\t\t\ttype: \"auto_retry_end\";\n\t\t\t/** Whether the retry eventually succeeded */\n\t\t\tsuccess: boolean;\n\t\t\t/** Final attempt number */\n\t\t\tattempt: number;\n\t\t\t/** If failed, the final error message */\n\t\t\tfinalError?: string;\n\t };\n\n/**\n * Events emitted over streaming transports (SSE/WebSocket).\n *\n * Includes core agent events plus transport-level signals.\n */\nexport type AgentStreamEvent =\n\t| AgentEvent\n\t| { type: \"session_update\"; sessionId: string }\n\t| { type: \"heartbeat\" }\n\t| { type: \"aborted\" }\n\t| { type: \"done\" };\n\n/**\n * Message queued for sending to the LLM.\n *\n * Wraps the original message with an optional LLM-formatted version,\n * allowing for message transformation before sending.\n *\n * @typeParam TOriginal - Type of the original message\n */\nexport interface QueuedMessage<TOriginal = AppMessage> {\n\t/** Stable identifier for queue operations */\n\tid: number;\n\t/** When the message was queued */\n\tcreatedAt: number;\n\t/** Original message as received */\n\toriginal: TOriginal;\n\t/** Optional LLM-formatted version of the message */\n\tllm?: Message;\n}\n\n/**\n * Runtime configuration for agent execution.\n *\n * Passed to the transport layer when starting a new agent run,\n * containing all the configuration needed to execute a conversation turn.\n */\nexport interface AgentRunConfig {\n\t/** System prompt providing instructions and context */\n\tsystemPrompt: string;\n\t/** Tools available for this run */\n\ttools: AgentTool[];\n\t/** Model to use for generation */\n\tmodel: Model<Api>;\n\t/** Optional reasoning effort level */\n\treasoning?: ReasoningEffort;\n\t/** Optional reasoning summary preference for Responses API */\n\treasoningSummary?: \"auto\" | \"detailed\" | \"concise\" | null;\n\t/** Emit message_end for the initial user message (defaults to true). */\n\temitUserMessageEnd?: boolean;\n\t/** Function to retrieve steering messages for batch sending */\n\tgetSteeringMessages?: <T>() => Promise<QueuedMessage<T>[]>;\n\t/** Function to retrieve follow-up messages for batch sending */\n\tgetFollowUpMessages?: <T>() => Promise<QueuedMessage<T>[]>;\n\t/** Function to retrieve prompt-only messages for the next turn. */\n\tgetPromptOnlyMessages?: () => Promise<Message[]>;\n\t/** @deprecated Use getSteeringMessages/getFollowUpMessages instead */\n\tgetQueuedMessages?: <T>() => Promise<QueuedMessage<T>[]>;\n\t/**\n\t * Optional message preprocessor applied immediately before calling the LLM provider.\n\t *\n\t * Use this to implement provider-specific compatibility transforms (e.g., image limits,\n\t * signature preservation, prompt caching markers) without polluting the core tools.\n\t *\n\t * Note: This is a pure preprocessing hook. It should not execute tools or perform I/O.\n\t */\n\tpreprocessMessages?: (\n\t\tmessages: Message[],\n\t\tcontext: {\n\t\t\tsystemPrompt: string;\n\t\t\ttools: AgentTool[];\n\t\t\tmodel: Model<Api>;\n\t\t\tuserMessage?: Message;\n\t\t},\n\t\tsignal?: AbortSignal,\n\t) => Message[] | Promise<Message[]>;\n\t/** User identification for tracking */\n\tuser?: {\n\t\t/** User UUID */\n\t\tid: string;\n\t\t/** Organization UUID */\n\t\torgId: string;\n\t};\n\t/** Session information for persistence */\n\tsession?: {\n\t\t/** Session UUID */\n\t\tid: string;\n\t\t/** When the session started */\n\t\tstartedAt: Date;\n\t};\n\t/** Optional helper function for running LLM queries (e.g., for summarization) */\n\trunLLM?: (systemPrompt: string, userPrompt: string) => Promise<string>;\n\t/** Optional sandbox for isolated tool execution */\n\tsandbox?: import(\"../sandbox/types.js\").Sandbox;\n\t/** Sampling temperature override (0.0-2.0, lower = more deterministic) */\n\ttemperature?: number;\n\t/** Top-p sampling override (0.0-1.0) */\n\ttopP?: number;\n\t/** Optional Anthropic API-side task budget for the current turn */\n\ttaskBudget?: {\n\t\ttotal: number;\n\t\tremaining?: number;\n\t};\n}\n\n/**\n * Transport interface for LLM communication.\n *\n * Implementors of this interface handle the actual communication\n * with the LLM provider, including streaming and tool execution.\n */\nexport interface AgentTransport {\n\t/**\n\t * Execute a conversation turn with a new user message.\n\t *\n\t * @param messages - Conversation history\n\t * @param userMessage - New user message\n\t * @param config - Runtime configuration\n\t * @param signal - Optional abort signal for cancellation\n\t * @returns Async iterable of agent events\n\t */\n\trun(\n\t\tmessages: Message[],\n\t\tuserMessage: Message,\n\t\tconfig: AgentRunConfig,\n\t\tsignal?: AbortSignal,\n\t): AsyncIterable<AgentEvent>;\n\n\t/**\n\t * Continue from current context without a new user message.\n\t *\n\t * Used for:\n\t * - Retrying after transient errors (rate limits, overload)\n\t * - Continuing after context compaction\n\t * - Resuming interrupted tool execution\n\t *\n\t * @param messages - Current conversation history\n\t * @param config - Runtime configuration\n\t * @param signal - Optional abort signal for cancellation\n\t * @returns Async iterable of agent events\n\t */\n\tcontinue(\n\t\tmessages: Message[],\n\t\tconfig: AgentRunConfig,\n\t\tsignal?: AbortSignal,\n\t): AsyncIterable<AgentEvent>;\n\n\t/**\n\t * Optional lightweight connectivity probe for UI health checks.\n\t */\n\tping?: () => Promise<void>;\n}\n\n/**\n * Options for streaming LLM requests.\n *\n * These options are passed to the transport layer when making\n * streaming requests to the LLM provider.\n */\nexport interface StreamOptions {\n\t/** Sampling temperature (0.0-2.0, lower = more deterministic) */\n\ttemperature?: number;\n\t/** Maximum tokens to generate */\n\tmaxTokens?: number;\n\t/** Abort signal for cancellation */\n\tsignal?: AbortSignal;\n\t/** API key for authentication */\n\tapiKey?: string;\n\t/** Additional headers to include in requests */\n\theaders?: Record<string, string>;\n\t/** Additional request body fields for provider-specific extensions */\n\trequestBody?: Record<string, unknown>;\n\t/** Authentication type for the request */\n\tauthType?: \"api-key\" | \"anthropic-oauth\";\n\t/** Optional Anthropic API-side task budget for the current turn */\n\ttaskBudget?: {\n\t\ttotal: number;\n\t\tremaining?: number;\n\t};\n}\n\n/**\n * Cache control hint for prompt caching.\n *\n * Used to mark content that should be cached for faster\n * subsequent requests.\n */\nexport interface PromptCacheControl {\n\t/** Cache type - currently only \"ephemeral\" is supported */\n\ttype: \"ephemeral\";\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/agent/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG","sourcesContent":["/**\n * @fileoverview Core Type Definitions for Composer Agent\n *\n * This module defines the fundamental types used throughout the Composer AI system,\n * including message formats, tool definitions, model configurations, and agent state.\n *\n * ## Type Categories\n *\n * ### Message Types\n * - {@link UserMessage} - Messages from the human user\n * - {@link AssistantMessage} - Responses from the AI assistant\n * - {@link ToolResultMessage} - Results from tool executions\n * - {@link Message} - Union of all message types\n *\n * ### Content Types\n * - {@link TextContent} - Plain text content blocks\n * - {@link ImageContent} - Base64-encoded images\n * - {@link ThinkingContent} - Extended reasoning traces\n * - {@link ToolCall} - Tool invocation requests\n *\n * ### Tool Types\n * - {@link Tool} - Tool definition schema (for API)\n * - {@link AgentTool} - Tool with execute function (for runtime)\n * - {@link AgentToolResult} - Return value from tool execution\n *\n * ### Configuration Types\n * - {@link Model} - LLM model configuration\n * - {@link AgentState} - Current state of an agent\n * - {@link AgentRunConfig} - Runtime configuration\n *\n * @module agent/types\n */\n\nimport type { TSchema } from \"@sinclair/typebox\";\nimport type { PromptMetadata } from \"../prompts/types.js\";\nimport type { SkillArtifactMetadata } from \"../skills/artifact-metadata.js\";\nimport type { CheckpointProfiler } from \"../utils/checkpoint-profiler.js\";\nimport type {\n\tActionApprovalDecision,\n\tActionApprovalRequest,\n} from \"./action-approval.js\";\nimport type { ToolRetryDecision, ToolRetryRequest } from \"./tool-retry.js\";\n\n/**\n * API format identifier for different LLM provider APIs.\n *\n * Each provider may support different API formats:\n * - `openai-completions` - OpenAI Chat Completions API\n * - `openai-responses` - OpenAI Responses API (newer format)\n * - `openai-codex-responses` - ChatGPT Codex Responses backend\n * - `anthropic-messages` - Anthropic Messages API\n * - `google-generative-ai` - Google Generative AI (Gemini)\n * - `google-gemini-cli` - Google Cloud Code Assist (Gemini CLI)\n * - `bedrock-converse` - AWS Bedrock Converse API\n */\nexport type Api =\n\t| \"openai-completions\"\n\t| \"openai-responses\"\n\t| \"openai-codex-responses\"\n\t| \"anthropic-messages\"\n\t| \"google-generative-ai\"\n\t| \"google-gemini-cli\"\n\t| \"bedrock-converse\"\n\t| \"vertex-ai\";\n\nexport interface OpenAICompatOverrides {\n\tsupportsStore?: boolean;\n\tsupportsDeveloperRole?: boolean;\n\tsupportsReasoningEffort?: boolean;\n\tsupportsResponsesApi?: boolean;\n\t/** Supports Anthropic-style cache_control (OpenRouter with Claude models) */\n\tsupportsCacheControl?: boolean;\n\tmaxTokensField?: \"max_tokens\" | \"max_completion_tokens\";\n\trequiresToolResultName?: boolean;\n\trequiresAssistantAfterToolResult?: boolean;\n\trequiresThinkingAsText?: boolean;\n\trequiresMistralToolIds?: boolean;\n}\n\n/**\n * Well-known LLM provider identifiers.\n *\n * These are the officially supported providers with built-in configurations:\n * - `anthropic` - Anthropic (Claude models)\n * - `bedrock` - AWS Bedrock\n * - `google` - Google AI (Gemini models)\n * - `openai` - OpenAI (GPT models)\n * - `azure-openai` - Azure OpenAI\n * - `writer` - Writer.com\n * - `xai` - xAI (Grok models)\n * - `groq` - Groq\n * - `cerebras` - Cerebras\n * - `openrouter` - OpenRouter (aggregator)\n * - `zai` - ZAI\n */\nexport type KnownProvider =\n\t| \"anthropic\"\n\t| \"bedrock\"\n\t| \"google\"\n\t| \"openai\"\n\t| \"openai-codex\"\n\t| \"azure-openai\"\n\t| \"writer\"\n\t| \"xai\"\n\t| \"groq\"\n\t| \"cerebras\"\n\t| \"openrouter\"\n\t| \"zai\";\n\n/**\n * Provider identifier - either a known provider or a custom string.\n * Custom providers can be used with OpenAI-compatible APIs.\n */\nexport type Provider = KnownProvider | string;\n\n/**\n * Reasoning effort level for models that support extended thinking.\n *\n * Higher levels produce more detailed reasoning at increased latency:\n * - `minimal` - Brief chain-of-thought hints\n * - `low` - Short reasoning steps\n * - `medium` - Moderate reasoning depth (recommended default)\n * - `high` - Thorough step-by-step reasoning\n * - `ultra` - Maximum reasoning depth (for complex problems)\n *\n * Note: Claude Code uses keywords \"think\", \"think hard\", \"think harder\", \"ultrathink\"\n * which map to low, medium, high, ultra respectively.\n */\nexport type ReasoningEffort = \"minimal\" | \"low\" | \"medium\" | \"high\" | \"ultra\";\n\n/**\n * Plain text content block within a message.\n *\n * @example\n * ```typescript\n * const content: TextContent = {\n * type: \"text\",\n * text: \"Hello, how can I help you today?\"\n * };\n * ```\n */\nexport interface TextContent {\n\t/** Discriminator for content block type */\n\ttype: \"text\";\n\t/** The text content */\n\ttext: string;\n\t/** Optional signature for content verification */\n\ttextSignature?: string;\n}\n\n/**\n * Extended thinking/reasoning content block.\n *\n * Contains the model's internal reasoning process when extended\n * thinking is enabled. This is typically hidden from end users\n * but useful for debugging and understanding model behavior.\n */\nexport interface ThinkingContent {\n\t/** Discriminator for content block type */\n\ttype: \"thinking\";\n\t/** The thinking/reasoning trace */\n\tthinking: string;\n\t/** Optional signature for content verification */\n\tthinkingSignature?: string;\n}\n\n/**\n * Base64-encoded image content block.\n *\n * Used for including images in user messages (vision input)\n * or tool results (screenshots, generated images).\n *\n * @example\n * ```typescript\n * const image: ImageContent = {\n * type: \"image\",\n * data: \"iVBORw0KGgo...\", // base64 encoded\n * mimeType: \"image/png\"\n * };\n * ```\n */\nexport interface ImageContent {\n\t/** Discriminator for content block type */\n\ttype: \"image\";\n\t/** Base64-encoded image data */\n\tdata: string;\n\t/** MIME type (e.g., \"image/png\", \"image/jpeg\") */\n\tmimeType: string;\n}\n\n/**\n * Tool invocation request within an assistant message.\n *\n * When the model decides to use a tool, it emits a ToolCall\n * content block specifying which tool to call and with what arguments.\n *\n * @example\n * ```typescript\n * const toolCall: ToolCall = {\n * type: \"toolCall\",\n * id: \"call_abc123\",\n * name: \"read\",\n * arguments: { file_path: \"/src/index.ts\" }\n * };\n * ```\n */\nexport interface ToolCall {\n\t/** Discriminator for content block type */\n\ttype: \"toolCall\";\n\t/** Unique identifier for this tool call (used to match results) */\n\tid: string;\n\t/** Name of the tool to invoke */\n\tname: string;\n\t/** Arguments to pass to the tool */\n\targuments: Record<string, unknown>;\n\t/**\n\t * Provider-specific signature used by some APIs (notably Gemini 3) to\n\t * associate tool calls with preceding thoughts. If present, it must be\n\t * preserved across turns when replaying the message history back to the provider.\n\t */\n\tthoughtSignature?: string;\n}\n\n/**\n * Token usage and cost information for a message or request.\n *\n * Tracks input/output tokens and cache utilization for cost monitoring\n * and context window management.\n */\nexport interface Usage {\n\t/** Number of input tokens consumed */\n\tinput: number;\n\t/** Number of output tokens generated */\n\toutput: number;\n\t/** Tokens served from prompt cache (reduces cost) */\n\tcacheRead: number;\n\t/** Tokens written to prompt cache */\n\tcacheWrite: number;\n\t/** Calculated cost breakdown in USD */\n\tcost: {\n\t\t/** Cost for input tokens */\n\t\tinput: number;\n\t\t/** Cost for output tokens */\n\t\toutput: number;\n\t\t/** Cost savings from cache reads */\n\t\tcacheRead: number;\n\t\t/** Cost for cache writes */\n\t\tcacheWrite: number;\n\t\t/** Total cost for this message/request */\n\t\ttotal: number;\n\t};\n}\n\n/**\n * Reason why the model stopped generating.\n *\n * - `stop` - Natural completion (end of response)\n * - `length` - Hit max_tokens limit\n * - `toolUse` - Model wants to use a tool (generation paused)\n * - `error` - An error occurred during generation\n * - `aborted` - Request was cancelled by the user\n */\nexport type StopReason = \"stop\" | \"length\" | \"toolUse\" | \"error\" | \"aborted\";\n\n/**\n * Message from the human user.\n *\n * User messages can contain plain text or an array of content blocks\n * (for multi-modal input with images).\n *\n * @example\n * ```typescript\n * // Simple text message\n * const msg: UserMessage = {\n * role: \"user\",\n * content: \"What is this code doing?\",\n * timestamp: Date.now()\n * };\n *\n * // Message with image\n * const multiModal: UserMessage = {\n * role: \"user\",\n * content: [\n * { type: \"text\", text: \"What's in this screenshot?\" },\n * { type: \"image\", data: base64Data, mimeType: \"image/png\" }\n * ],\n * timestamp: Date.now()\n * };\n * ```\n */\nexport interface UserMessage {\n\t/** Message role discriminator */\n\trole: \"user\";\n\t/** Message content - string or array of content blocks */\n\tcontent: string | (TextContent | ImageContent)[];\n\t/** Optional non-LLM metadata for runtime bookkeeping */\n\tmetadata?: Record<string, unknown>;\n\t/** Unix timestamp in milliseconds when message was created */\n\ttimestamp: number;\n}\n\n/**\n * Response message from the AI assistant.\n *\n * Contains the model's response along with metadata about the generation\n * including token usage, stop reason, and provider information.\n *\n * The content array may contain:\n * - {@link TextContent} - The actual response text\n * - {@link ThinkingContent} - Extended reasoning (if enabled)\n * - {@link ToolCall} - Tool invocation requests\n */\nexport interface AssistantMessage {\n\t/** Message role discriminator */\n\trole: \"assistant\";\n\t/** Array of content blocks (text, thinking, tool calls) */\n\tcontent: (TextContent | ThinkingContent | ToolCall)[];\n\t/** API format used for this response */\n\tapi: Api;\n\t/** Provider that generated this response */\n\tprovider: Provider;\n\t/** Model ID that generated this response */\n\tmodel: string;\n\t/** Token usage and cost information */\n\tusage: Usage;\n\t/** Reason why generation stopped */\n\tstopReason: StopReason;\n\t/** Error message if stopReason is \"error\" */\n\terrorMessage?: string;\n\t/** Unix timestamp in milliseconds when message was created */\n\ttimestamp: number;\n}\n\n/**\n * Result message from a tool execution.\n *\n * After a tool is executed, the result is sent back to the model\n * as a ToolResultMessage so it can incorporate the information\n * into its response.\n *\n * @typeParam TDetails - Type of additional details attached to the result\n *\n * @example\n * ```typescript\n * const result: ToolResultMessage = {\n * role: \"toolResult\",\n * toolCallId: \"call_abc123\",\n * toolName: \"read\",\n * content: [{ type: \"text\", text: \"file contents...\" }],\n * isError: false,\n * timestamp: Date.now()\n * };\n * ```\n */\nexport interface ToolResultMessage<TDetails = unknown> {\n\t/** Message role discriminator */\n\trole: \"toolResult\";\n\t/** ID of the tool call this result corresponds to */\n\ttoolCallId: string;\n\t/** Name of the tool that was executed */\n\ttoolName: string;\n\t/** Result content (text or images) */\n\tcontent: (TextContent | ImageContent)[];\n\t/** Optional additional details about the execution */\n\tdetails?: TDetails;\n\t/** Whether the tool execution resulted in an error */\n\tisError: boolean;\n\t/** Unix timestamp in milliseconds when result was created */\n\ttimestamp: number;\n}\n\n/**\n * Message type for hook-injected messages.\n *\n * Hooks can inject these into the conversation. They are converted to user\n * messages for LLM context and can optionally be hidden from the UI.\n */\nexport interface HookMessage<T = unknown> {\n\t/** Message role discriminator */\n\trole: \"hookMessage\";\n\t/** Hook-defined message category */\n\tcustomType: string;\n\t/** Message content - string or array of content blocks */\n\tcontent: string | (TextContent | ImageContent)[];\n\t/** Whether to render this message in the UI */\n\tdisplay: boolean;\n\t/** Optional hook-specific metadata (not sent to the LLM) */\n\tdetails?: T;\n\t/** Unix timestamp in milliseconds when message was created */\n\ttimestamp: number;\n}\n\n/**\n * Message type for branch summaries when navigating session trees.\n */\nexport interface BranchSummaryMessage {\n\t/** Message role discriminator */\n\trole: \"branchSummary\";\n\t/** Summary text */\n\tsummary: string;\n\t/** ID of the branch point this summary came from */\n\tfromId: string;\n\t/** Unix timestamp in milliseconds when summary was created */\n\ttimestamp: number;\n}\n\n/**\n * Message type for compaction summaries.\n */\nexport interface CompactionSummaryMessage {\n\t/** Message role discriminator */\n\trole: \"compactionSummary\";\n\t/** Summary text */\n\tsummary: string;\n\t/** Token count before compaction (for diagnostics) */\n\ttokensBefore: number;\n\t/** Unix timestamp in milliseconds when summary was created */\n\ttimestamp: number;\n}\n\n/**\n * Union type representing LLM-native messages that can be sent to the model.\n *\n * A conversation with the LLM consists of user input, assistant responses,\n * and tool results.\n */\nexport type Message = UserMessage | AssistantMessage | ToolResultMessage;\n\n/**\n * Empty interface for declaration merging to add custom message types.\n *\n * Consumers can extend this interface to add their own message types:\n *\n * @example\n * ```typescript\n * declare module \"@evalops/maestro\" {\n * interface CustomAgentMessages {\n * notification: { role: \"notification\"; text: string; timestamp: number };\n * }\n * }\n * ```\n */\n// biome-ignore lint/suspicious/noEmptyInterface: Required for declaration merging\nexport interface CustomAgentMessages {}\n\n/**\n * Union type representing all messages in the agent conversation history.\n *\n * Includes both LLM-native messages (user, assistant, toolResult) and\n * custom message types (hookMessage, branchSummary, compactionSummary,\n * plus any types added via declaration merging).\n *\n * Custom messages are preserved in session history but filtered out\n * before being sent to the LLM via {@link convertToLlm}.\n */\nexport type AgentMessage =\n\t| Message\n\t| HookMessage\n\t| BranchSummaryMessage\n\t| CompactionSummaryMessage\n\t| CustomAgentMessages[keyof CustomAgentMessages];\n\n/**\n * Tool definition schema for API serialization.\n *\n * This interface defines a tool's metadata and parameter schema\n * for transmission to the LLM. The actual execution logic is in\n * {@link AgentTool}.\n *\n * @typeParam TParameters - TypeBox schema for the tool's parameters\n *\n * @example\n * ```typescript\n * import { Type } from \"@sinclair/typebox\";\n *\n * const readTool: Tool = {\n * name: \"read\",\n * description: \"Read a file from the filesystem\",\n * parameters: Type.Object({\n * file_path: Type.String({ description: \"Path to the file\" })\n * })\n * };\n * ```\n */\nexport interface Tool<TParameters extends TSchema = TSchema> {\n\t/** Unique tool identifier */\n\tname: string;\n\t/** Human-readable description of what the tool does */\n\tdescription: string;\n\t/** TypeBox schema defining the tool's parameters */\n\tparameters: TParameters;\n\t/** Optional categorization (e.g., \"file\", \"shell\", \"web\") */\n\ttoolType?: string;\n\t/** Example inputs for documentation/few-shot prompting */\n\tinputExamples?: unknown[];\n\t/** List of caller identifiers allowed to use this tool */\n\tallowedCallers?: string[];\n\t/** If true, don't send tool definition to API (used for internal tools) */\n\tdeferApiDefinition?: boolean;\n}\n\n/**\n * Behavioral hints for tools (from MCP annotations).\n *\n * These hints help the model and UI understand the tool's behavior\n * for better decision-making and user feedback.\n */\nexport interface ToolAnnotations {\n\t/** If true, the tool does not modify its environment (safe to retry) */\n\treadOnlyHint?: boolean;\n\t/** If true, the tool may perform destructive/irreversible updates */\n\tdestructiveHint?: boolean;\n\t/** If true, calling repeatedly with same args has no additional effect */\n\tidempotentHint?: boolean;\n\t/** If true, the tool interacts with external systems (network, APIs) */\n\topenWorldHint?: boolean;\n}\n\n/**\n * Complete tool definition with execute function.\n *\n * This is the runtime representation of a tool, including both\n * the schema (for the LLM) and the execute function (for the runtime).\n *\n * @typeParam TParameters - TypeBox schema for the tool's parameters\n * @typeParam TDetails - Type of additional details returned with results\n *\n * @example\n * ```typescript\n * import { Type } from \"@sinclair/typebox\";\n *\n * const readTool: AgentTool = {\n * name: \"read\",\n * description: \"Read a file from the filesystem\",\n * parameters: Type.Object({\n * file_path: Type.String()\n * }),\n * execute: async (toolCallId, params) => {\n * const content = await fs.readFile(params.file_path, \"utf-8\");\n * return { content: [{ type: \"text\", text: content }] };\n * }\n * };\n * ```\n */\nexport interface AgentTool<\n\tTParameters extends TSchema = TSchema,\n\tTDetails = unknown,\n> {\n\t/** Unique tool identifier */\n\tname: string;\n\t/** Display label for UI (defaults to name) */\n\tlabel?: string;\n\t/** Human-readable description of what the tool does */\n\tdescription: string;\n\t/** TypeBox schema defining the tool's parameters */\n\tparameters: TParameters;\n\t/** Tool behavior hints from MCP annotations */\n\tannotations?: ToolAnnotations;\n\t/** Optional categorization (e.g., \"file\", \"shell\", \"web\") */\n\ttoolType?: string;\n\t/**\n\t * Where the tool should be executed.\n\t * - `\"server\"`: (default) Executed by the backend agent\n\t * - `\"client\"`: Executed by the client (VS Code, browser) via callback\n\t */\n\texecutionLocation?: \"server\" | \"client\";\n\t/** Example inputs for documentation/few-shot prompting */\n\tinputExamples?: unknown[];\n\t/** List of caller identifiers allowed to use this tool */\n\tallowedCallers?: string[];\n\t/** If true, don't send tool definition to API */\n\tdeferApiDefinition?: boolean;\n\t/** Optional max retries configured by the tool itself */\n\tmaxRetries?: number;\n\t/** Optional retry delay configured by the tool itself */\n\tretryDelayMs?: number;\n\t/** Optional tool-level retry predicate */\n\tshouldRetry?: (error: unknown) => boolean;\n\t/** Optional compact summary used after a tool finishes. */\n\tgetToolUseSummary?: (params: Record<string, unknown>) => string | null;\n\t/** Optional human-facing label used for live tool UI. */\n\tgetDisplayName?: (params: Record<string, unknown>) => string | null;\n\t/** Optional present-tense activity label used while a tool is running. */\n\tgetActivityDescription?: (params: Record<string, unknown>) => string | null;\n\t/**\n\t * Execute the tool with the given parameters.\n\t *\n\t * @param toolCallId - Unique identifier for this tool call\n\t * @param params - Parameters matching the tool's schema\n\t * @param signal - Optional AbortSignal for cancellation\n\t * @param context - Optional execution context (sandbox, etc.)\n\t * @param onUpdate - Optional callback for partial tool output streaming\n\t * @returns Tool result with content and optional details\n\t */\n\texecute: (\n\t\ttoolCallId: string,\n\t\tparams: Record<string, unknown>,\n\t\tsignal?: AbortSignal,\n\t\tcontext?: { sandbox?: import(\"../sandbox/types.js\").Sandbox },\n\t\tonUpdate?: AgentToolUpdateCallback<TDetails>,\n\t) => AgentToolResult<TDetails> | Promise<AgentToolResult<TDetails>>;\n}\n\nexport type AgentToolUpdateCallback<TDetails = unknown> = (\n\tpartial: AgentToolResult<TDetails>,\n) => void;\n\n/**\n * Result returned from tool execution.\n *\n * @typeParam TDetails - Type of additional details attached to the result\n */\nexport interface AgentToolResult<TDetails = unknown> {\n\t/** Result content (text or images) */\n\tcontent: (TextContent | ImageContent)[];\n\t/** Optional additional details about the execution */\n\tdetails?: TDetails;\n\t/** Whether the execution resulted in an error */\n\tisError?: boolean;\n}\n\n/**\n * Conversation context for LLM requests.\n *\n * Contains the system prompt, conversation history, and available tools\n * for a single LLM request.\n */\nexport interface Context {\n\t/** System prompt providing instructions and context */\n\tsystemPrompt?: string;\n\t/** Conversation history */\n\tmessages: Message[];\n\t/** Tools available for the model to use */\n\ttools?: Tool[];\n}\n\n/**\n * Streaming events during assistant message construction.\n *\n * These events are emitted as the LLM generates its response, enabling\n * real-time UI updates and progress tracking.\n *\n * ## Event Types\n *\n * | Type | Description |\n * |------|-------------|\n * | `start` | Message generation started |\n * | `text_start` | New text content block started |\n * | `text_delta` | Incremental text content |\n * | `text_end` | Text content block completed |\n * | `thinking_start` | Extended thinking block started |\n * | `thinking_delta` | Incremental thinking content |\n * | `thinking_end` | Thinking block completed |\n * | `toolcall_start` | Tool call started |\n * | `toolcall_delta` | Incremental tool call args |\n * | `toolcall_end` | Tool call completed |\n * | `done` | Generation completed successfully |\n * | `error` | Generation failed or was aborted |\n */\nexport type AssistantMessageEvent =\n\t| {\n\t\t\t/** Message generation started */\n\t\t\ttype: \"start\";\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** New text content block started */\n\t\t\ttype: \"text_start\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Incremental text content received */\n\t\t\ttype: \"text_delta\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** New text to append */\n\t\t\tdelta: string;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Text content block completed */\n\t\t\ttype: \"text_end\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** Final text content */\n\t\t\tcontent: string;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Extended thinking block started */\n\t\t\ttype: \"thinking_start\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Incremental thinking content received */\n\t\t\ttype: \"thinking_delta\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** New thinking text to append */\n\t\t\tdelta: string;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Thinking content block completed */\n\t\t\ttype: \"thinking_end\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** Final thinking content */\n\t\t\tcontent: string;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Tool call started */\n\t\t\ttype: \"toolcall_start\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Incremental tool call arguments received */\n\t\t\ttype: \"toolcall_delta\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** New JSON fragment to append to arguments */\n\t\t\tdelta: string;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Tool call completed */\n\t\t\ttype: \"toolcall_end\";\n\t\t\t/** Index of the content block */\n\t\t\tcontentIndex: number;\n\t\t\t/** Completed tool call */\n\t\t\ttoolCall: ToolCall;\n\t\t\t/** Partial message state */\n\t\t\tpartial: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Generation completed successfully */\n\t\t\ttype: \"done\";\n\t\t\t/** Reason for completion */\n\t\t\treason: Extract<StopReason, \"stop\" | \"length\" | \"toolUse\">;\n\t\t\t/** Final assistant message */\n\t\t\tmessage: AssistantMessage;\n\t }\n\t| {\n\t\t\t/** Generation failed or was aborted */\n\t\t\ttype: \"error\";\n\t\t\t/** Reason for failure */\n\t\t\treason: Extract<StopReason, \"aborted\" | \"error\">;\n\t\t\t/** Error message details */\n\t\t\terror: AssistantMessage;\n\t };\n\n/**\n * LLM model configuration.\n *\n * Contains all the information needed to use a model, including\n * API endpoints, capabilities, and pricing.\n *\n * @typeParam TApi - The API format this model uses\n *\n * @example\n * ```typescript\n * const claude: Model<\"anthropic-messages\"> = {\n * id: \"claude-sonnet-4-5-20250929\",\n * name: \"Claude Sonnet 4.5\",\n * api: \"anthropic-messages\",\n * provider: \"anthropic\",\n * baseUrl: \"https://api.anthropic.com/v1\",\n * reasoning: true,\n * input: [\"text\", \"image\"],\n * cost: { input: 3.00, output: 15.00, cacheRead: 0.30, cacheWrite: 3.75 },\n * contextWindow: 200000,\n * maxTokens: 8192\n * };\n * ```\n */\nexport interface Model<TApi extends Api> {\n\t/** Unique model identifier (e.g., \"claude-sonnet-4-5-20250929\") */\n\tid: string;\n\t/** Human-readable model name (e.g., \"Claude Sonnet 4.5\") */\n\tname: string;\n\t/** API format used for requests */\n\tapi: TApi;\n\t/** Provider serving this model */\n\tprovider: Provider;\n\t/** Base URL for API requests */\n\tbaseUrl: string;\n\t/** Optional custom headers to include in API requests */\n\theaders?: Record<string, string>;\n\t/** Optional OpenAI-compatibility overrides for vendor quirks */\n\tcompat?: OpenAICompatOverrides;\n\t/** Whether the model supports extended thinking */\n\treasoning: boolean;\n\t/** Whether the model supports tool use */\n\ttoolUse?: boolean;\n\t/** Supported input modalities */\n\tinput: (\"text\" | \"image\")[];\n\t/** Cost per million tokens in USD */\n\tcost: {\n\t\t/** Input token cost */\n\t\tinput: number;\n\t\t/** Output token cost */\n\t\toutput: number;\n\t\t/** Cache read cost (typically discounted) */\n\t\tcacheRead: number;\n\t\t/** Cache write cost */\n\t\tcacheWrite: number;\n\t};\n\t/** Maximum context window in tokens */\n\tcontextWindow: number;\n\t/** Maximum output tokens per response */\n\tmaxTokens: number;\n}\n\n/**\n * File attachment for messages.\n *\n * Represents an uploaded file (image or document) that can be\n * included in a user message.\n */\nexport interface Attachment {\n\t/** Unique identifier for this attachment */\n\tid: string;\n\t/** Type of attachment */\n\ttype: \"image\" | \"document\";\n\t/** Original filename */\n\tfileName: string;\n\t/** MIME type of the file */\n\tmimeType: string;\n\t/** File size in bytes */\n\tsize: number;\n\t/** Base64-encoded file content */\n\tcontent: string;\n\t/** Extracted text content (for documents) */\n\textractedText?: string;\n\t/** Preview image (for documents) */\n\tpreview?: string;\n}\n\n/**\n * User-configurable thinking level for extended reasoning.\n *\n * Controls how much computational effort the model spends on\n * reasoning before generating a response.\n *\n * - `off` - No extended thinking\n * - `minimal` - Brief reasoning hints\n * - `low` - Short reasoning steps\n * - `medium` - Moderate reasoning (default)\n * - `high` - Thorough step-by-step reasoning\n * - `max` - Maximum reasoning depth\n */\nexport type ThinkingLevel =\n\t| \"off\"\n\t| \"minimal\"\n\t| \"low\"\n\t| \"medium\"\n\t| \"high\"\n\t| \"ultra\"\n\t| \"max\";\n\n/**\n * User message with optional file attachments.\n *\n * Extends the base UserMessage to support file attachments\n * for rich multi-modal interactions.\n */\nexport type UserMessageWithAttachments = UserMessage & {\n\t/** Optional file attachments */\n\tattachments?: Attachment[];\n};\n\n/**\n * Placeholder for custom message types.\n * Can be extended to add application-specific message types.\n */\nexport interface CustomMessages {\n\thookMessage: HookMessage;\n\tbranchSummary: BranchSummaryMessage;\n\tcompactionSummary: CompactionSummaryMessage;\n}\n\n/**\n * Application-level message type.\n *\n * Union of all message types that can appear in the UI,\n * including user messages with attachments.\n */\nexport type AppMessage =\n\t| AssistantMessage\n\t| UserMessageWithAttachments\n\t| Message\n\t| CustomMessages[keyof CustomMessages];\n\n/**\n * Information about a tool call currently being executed.\n */\nexport interface PendingToolCall {\n\t/** Name of the tool being executed */\n\ttoolName: string;\n\t/** Original arguments passed to the tool */\n\targs?: Record<string, unknown>;\n\t/** Tool metadata captured when execution started */\n\ttool?: Pick<\n\t\tAgentTool,\n\t\t\"label\" | \"getDisplayName\" | \"getToolUseSummary\" | \"getActivityDescription\"\n\t>;\n\t/** Stable display name for live UI */\n\tdisplayName?: string;\n\t/** Stable compact summary for live UI */\n\tsummaryLabel?: string;\n}\n\n/**\n * Current state of an agent instance.\n *\n * This is the central state object managed by the Agent class,\n * containing all information about the current conversation,\n * configuration, and execution status.\n */\nexport interface AgentState {\n\t/** System prompt providing instructions and context */\n\tsystemPrompt: string;\n\t/** Version/hash metadata for the base system prompt instructions */\n\tpromptMetadata?: PromptMetadata;\n\t/** Exact prompt source files layered into the current system prompt */\n\tsystemPromptSourcePaths?: string[];\n\t/** Current model configuration */\n\tmodel: Model<Api>;\n\t/** Current thinking level for extended reasoning */\n\tthinkingLevel: ThinkingLevel;\n\t/** Optional reasoning summary preference for Responses API */\n\treasoningSummary?: \"auto\" | \"detailed\" | \"concise\" | null;\n\t/** Available tools for this agent */\n\ttools: AgentTool[];\n\t/**\n\t * Controls how queued steering messages are sent between turns.\n\t * - `\"all\"` - Send all queued messages at once\n\t * - `\"one\"` - Send one message at a time\n\t */\n\tsteeringMode: \"all\" | \"one\";\n\t/**\n\t * Controls how queued follow-up messages are sent between turns.\n\t * - `\"all\"` - Send all queued messages at once\n\t * - `\"one\"` - Send one message at a time\n\t */\n\tfollowUpMode: \"all\" | \"one\";\n\t/**\n\t * @deprecated Use steeringMode/followUpMode instead.\n\t */\n\tqueueMode: \"all\" | \"one\";\n\t/** Conversation history */\n\tmessages: AppMessage[];\n\t/** Whether the agent is currently streaming a response */\n\tisStreaming: boolean;\n\t/** Current streaming message (partial response) */\n\tstreamMessage: Message | null;\n\t/** Tool calls currently being executed */\n\tpendingToolCalls: Map<string, PendingToolCall>;\n\t/** Current error message, if any */\n\terror?: string;\n\t/** Optional sandbox for isolated tool execution */\n\tsandbox?: import(\"../sandbox/types.js\").Sandbox;\n\t/** Current sandbox mode (e.g., \"docker\", \"local\") */\n\tsandboxMode?: string | null;\n\t/** Whether sandboxing is enabled */\n\tsandboxEnabled?: boolean;\n\t/** User identification for tracking */\n\tuser?: {\n\t\t/** User UUID */\n\t\tid: string;\n\t\t/** Organization UUID */\n\t\torgId: string;\n\t};\n\t/** Session information for persistence */\n\tsession?: {\n\t\t/** Session UUID */\n\t\tid: string;\n\t\t/** When the session started */\n\t\tstartedAt: Date;\n\t};\n\t/** Sampling temperature override (0.0-2.0, lower = more deterministic) */\n\ttemperature?: number;\n\t/** Top-p sampling override (0.0-1.0) */\n\ttopP?: number;\n}\n\n/**\n * Events emitted during agent execution.\n *\n * These events provide real-time updates about agent activity,\n * enabling UI updates, logging, and progress tracking.\n *\n * ## Lifecycle Events\n * - `agent_start` - Agent execution started\n * - `agent_end` - Agent execution completed\n * - `turn_start` - New conversation turn started\n * - `turn_end` - Conversation turn completed\n *\n * ## Message Events\n * - `message_start` - New message being constructed\n * - `message_update` - Incremental message update\n * - `message_end` - Message completed\n *\n * ## Tool Events\n * - `tool_execution_start` - Tool execution started\n * - `tool_execution_update` - Tool execution produced partial output\n * - `tool_execution_end` - Tool execution completed\n * - `tool_batch_summary` - Tool batch completed with a transient summary label\n * - `client_tool_request` - Client-side tool invocation needed\n *\n * ## Approval Events\n * - `action_approval_required` - User approval needed\n * - `action_approval_resolved` - User made approval decision\n *\n * ## Tool Retry Events\n * - `tool_retry_required` - Tool failed and retry decision needed\n * - `tool_retry_resolved` - Tool retry decision resolved\n *\n * ## Status Events\n * - `status` - Status update\n * - `error` - Error occurred\n * - `compaction` - Context was compacted\n */\nexport type AgentEvent =\n\t| {\n\t\t\t/** Agent execution started */\n\t\t\ttype: \"agent_start\";\n\t\t\t/** Whether this execution is an automatic continuation of the current turn */\n\t\t\tcontinuation?: boolean;\n\t }\n\t| {\n\t\t\t/** Agent execution completed */\n\t\t\ttype: \"agent_end\";\n\t\t\t/** Final messages from this execution */\n\t\t\tmessages: AppMessage[];\n\t\t\t/** Whether execution was aborted */\n\t\t\taborted?: boolean;\n\t\t\t/** If aborted with partial acceptance, contains the saved partial message */\n\t\t\tpartialAccepted?: AppMessage;\n\t\t\t/** Final stop reason from the LLM - \"length\" indicates output hit the max token limit */\n\t\t\tstopReason?: StopReason;\n\t }\n\t| {\n\t\t\t/** Status update during execution */\n\t\t\ttype: \"status\";\n\t\t\t/** Status message */\n\t\t\tstatus: string;\n\t\t\t/** Additional details */\n\t\t\tdetails: Record<string, unknown>;\n\t }\n\t| {\n\t\t\t/** Error occurred during execution */\n\t\t\ttype: \"error\";\n\t\t\t/** Error message */\n\t\t\tmessage: string;\n\t }\n\t| {\n\t\t\t/** New conversation turn started */\n\t\t\ttype: \"turn_start\";\n\t }\n\t| {\n\t\t\t/** Conversation turn completed */\n\t\t\ttype: \"turn_end\";\n\t\t\t/** Assistant message from this turn */\n\t\t\tmessage: AppMessage;\n\t\t\t/** Tool results from this turn */\n\t\t\ttoolResults: AppMessage[];\n\t }\n\t| {\n\t\t\t/** New message being constructed */\n\t\t\ttype: \"message_start\";\n\t\t\t/** The message being built */\n\t\t\tmessage: AppMessage;\n\t }\n\t| {\n\t\t\t/** Incremental update to current message */\n\t\t\ttype: \"message_update\";\n\t\t\t/** Updated message state */\n\t\t\tmessage: AppMessage;\n\t\t\t/** The streaming event that triggered this update */\n\t\t\tassistantMessageEvent: AssistantMessageEvent;\n\t }\n\t| {\n\t\t\t/** Message completed */\n\t\t\ttype: \"message_end\";\n\t\t\t/** Final message */\n\t\t\tmessage: AppMessage;\n\t }\n\t| {\n\t\t\t/** Tool execution started */\n\t\t\ttype: \"tool_execution_start\";\n\t\t\t/** Tool call identifier */\n\t\t\ttoolCallId: string;\n\t\t\t/** Optional Platform ToolExecution identifier */\n\t\t\ttoolExecutionId?: string;\n\t\t\t/** Name of the tool */\n\t\t\ttoolName: string;\n\t\t\t/** Optional human-facing label for live UI */\n\t\t\tdisplayName?: string;\n\t\t\t/** Optional compact summary for live UI */\n\t\t\tsummaryLabel?: string;\n\t\t\t/** Arguments passed to the tool */\n\t\t\targs: Record<string, unknown>;\n\t }\n\t| {\n\t\t\t/** Tool execution completed */\n\t\t\ttype: \"tool_execution_end\";\n\t\t\t/** Tool call identifier */\n\t\t\ttoolCallId: string;\n\t\t\t/** Optional Platform ToolExecution identifier */\n\t\t\ttoolExecutionId?: string;\n\t\t\t/** Optional approval request identifier correlated to Platform ToolExecution */\n\t\t\tapprovalRequestId?: string;\n\t\t\t/** Optional stable error or outcome code for telemetry and clients */\n\t\t\terrorCode?: string;\n\t\t\t/** Optional governed outcome classification surfaced by the tool result */\n\t\t\tgovernedOutcome?:\n\t\t\t\t| \"approval_required\"\n\t\t\t\t| \"approval_pending\"\n\t\t\t\t| \"authentication_required\"\n\t\t\t\t| \"denied\"\n\t\t\t\t| \"rate_limited\";\n\t\t\t/** Optional selected skill artifact metadata surfaced by the tool result */\n\t\t\tskillMetadata?: SkillArtifactMetadata;\n\t\t\t/** Name of the tool */\n\t\t\ttoolName: string;\n\t\t\t/** Optional human-facing label for live UI */\n\t\t\tdisplayName?: string;\n\t\t\t/** Optional compact summary for live UI */\n\t\t\tsummaryLabel?: string;\n\t\t\t/** Result from the tool */\n\t\t\tresult: ToolResultMessage;\n\t\t\t/** Whether the tool returned an error */\n\t\t\tisError: boolean;\n\t }\n\t| {\n\t\t\t/** LSP diagnostic delta produced by an edit/write tool call */\n\t\t\ttype: \"diagnostic_delta\";\n\t\t\t/** Tool call identifier */\n\t\t\ttoolCallId: string;\n\t\t\t/** Name of the tool */\n\t\t\ttoolName: string;\n\t\t\t/** File affected by the diagnostic delta */\n\t\t\tfile: string;\n\t\t\t/** User-facing file path from the tool call */\n\t\t\tdisplayPath: string;\n\t\t\t/** Whether a pre-edit baseline was available */\n\t\t\tusedDelta: boolean;\n\t\t\t/** Newly introduced diagnostic count */\n\t\t\tintroducedCount: number;\n\t\t\t/** Diagnostics repaired by the tool call */\n\t\t\trepairedCount: number;\n\t\t\t/** Remaining diagnostics for the affected file */\n\t\t\tremainingCount: number;\n\t\t\t/** Stable fingerprint for introduced diagnostics */\n\t\t\tfingerprint: string;\n\t\t\t/** Repair attempt number for this fingerprint */\n\t\t\trepairAttempt?: number;\n\t\t\t/** Maximum automatic repair attempts for this fingerprint */\n\t\t\tmaxRepairAttempts?: number;\n\t\t\t/** Whether Agent queued a follow-up repair turn */\n\t\t\twillAutoFollowUp: boolean;\n\t\t\t/** Why a repair follow-up was or was not queued */\n\t\t\treason: string;\n\t }\n\t| {\n\t\t\t/** Summary emitted after the final tool in a batch completes */\n\t\t\ttype: \"tool_batch_summary\";\n\t\t\t/** Stable one-line summary of what the completed tool batch did */\n\t\t\tsummary: string;\n\t\t\t/** Underlying per-tool summary labels used to build the summary */\n\t\t\tsummaryLabels: string[];\n\t\t\t/** Tool call identifiers included in this batch */\n\t\t\ttoolCallIds: string[];\n\t\t\t/** Tool names included in this batch */\n\t\t\ttoolNames: string[];\n\t\t\t/** Successful tool calls in the batch */\n\t\t\tcallsSucceeded: number;\n\t\t\t/** Failed tool calls in the batch */\n\t\t\tcallsFailed: number;\n\t }\n\t| {\n\t\t\t/** Tool execution produced partial output */\n\t\t\ttype: \"tool_execution_update\";\n\t\t\t/** Tool call identifier */\n\t\t\ttoolCallId: string;\n\t\t\t/** Name of the tool */\n\t\t\ttoolName: string;\n\t\t\t/** Optional human-facing label for live UI */\n\t\t\tdisplayName?: string;\n\t\t\t/** Optional compact summary for live UI */\n\t\t\tsummaryLabel?: string;\n\t\t\t/** Arguments passed to the tool */\n\t\t\targs: Record<string, unknown>;\n\t\t\t/** Partial tool result */\n\t\t\tpartialResult: AgentToolResult;\n\t }\n\t| {\n\t\t\t/** User approval required for an action */\n\t\t\ttype: \"action_approval_required\";\n\t\t\t/** Details of the approval request */\n\t\t\trequest: ActionApprovalRequest;\n\t }\n\t| {\n\t\t\t/** User made approval decision */\n\t\t\ttype: \"action_approval_resolved\";\n\t\t\t/** The original request */\n\t\t\trequest: ActionApprovalRequest;\n\t\t\t/** User's decision */\n\t\t\tdecision: ActionApprovalDecision;\n\t }\n\t| {\n\t\t\t/** Tool failed and requires a retry decision */\n\t\t\ttype: \"tool_retry_required\";\n\t\t\t/** Details of the retry request */\n\t\t\trequest: ToolRetryRequest;\n\t }\n\t| {\n\t\t\t/** Tool retry decision resolved */\n\t\t\ttype: \"tool_retry_resolved\";\n\t\t\t/** The original request */\n\t\t\trequest: ToolRetryRequest;\n\t\t\t/** User or policy decision */\n\t\t\tdecision: ToolRetryDecision;\n\t }\n\t| {\n\t\t\t/** Client-side tool invocation needed */\n\t\t\ttype: \"client_tool_request\";\n\t\t\t/** Tool call identifier */\n\t\t\ttoolCallId: string;\n\t\t\t/** Name of the tool */\n\t\t\ttoolName: string;\n\t\t\t/** Arguments for the tool */\n\t\t\targs: unknown;\n\t }\n\t| {\n\t\t\t/** Context was compacted (older messages summarized) */\n\t\t\ttype: \"compaction\";\n\t\t\t/** Generated summary of compacted messages */\n\t\t\tsummary: string;\n\t\t\t/** Index of first entry to keep (entries before were summarized) */\n\t\t\tfirstKeptEntryIndex: number;\n\t\t\t/** Token count before compaction */\n\t\t\ttokensBefore: number;\n\t\t\t/** Whether this was auto-triggered vs manual /compact */\n\t\t\tauto?: boolean;\n\t\t\t/** Custom instructions used for summarization */\n\t\t\tcustomInstructions?: string;\n\t\t\t/** Timestamp of compaction */\n\t\t\ttimestamp: string;\n\t }\n\t| {\n\t\t\t/** Auto-retry started for transient error (rate limit, overload, 5xx) */\n\t\t\ttype: \"auto_retry_start\";\n\t\t\t/** Current retry attempt (1-based) */\n\t\t\tattempt: number;\n\t\t\t/** Maximum number of retry attempts */\n\t\t\tmaxAttempts: number;\n\t\t\t/** Delay in milliseconds before retry */\n\t\t\tdelayMs: number;\n\t\t\t/** The error message that triggered the retry */\n\t\t\terrorMessage: string;\n\t }\n\t| {\n\t\t\t/** Auto-retry completed (success or final failure) */\n\t\t\ttype: \"auto_retry_end\";\n\t\t\t/** Whether the retry eventually succeeded */\n\t\t\tsuccess: boolean;\n\t\t\t/** Final attempt number */\n\t\t\tattempt: number;\n\t\t\t/** If failed, the final error message */\n\t\t\tfinalError?: string;\n\t };\n\n/**\n * Events emitted over streaming transports (SSE/WebSocket).\n *\n * Includes core agent events plus transport-level signals.\n */\nexport type AgentStreamEvent =\n\t| AgentEvent\n\t| { type: \"session_update\"; sessionId: string }\n\t| { type: \"heartbeat\" }\n\t| { type: \"aborted\" }\n\t| { type: \"done\" };\n\n/**\n * Message queued for sending to the LLM.\n *\n * Wraps the original message with an optional LLM-formatted version,\n * allowing for message transformation before sending.\n *\n * @typeParam TOriginal - Type of the original message\n */\nexport interface QueuedMessage<TOriginal = AppMessage> {\n\t/** Stable identifier for queue operations */\n\tid: number;\n\t/** When the message was queued */\n\tcreatedAt: number;\n\t/** Original message as received */\n\toriginal: TOriginal;\n\t/** Optional LLM-formatted version of the message */\n\tllm?: Message;\n}\n\n/**\n * Runtime configuration for agent execution.\n *\n * Passed to the transport layer when starting a new agent run,\n * containing all the configuration needed to execute a conversation turn.\n */\nexport interface AgentRunConfig {\n\t/** System prompt providing instructions and context */\n\tsystemPrompt: string;\n\t/** Tools available for this run */\n\ttools: AgentTool[];\n\t/** Model to use for generation */\n\tmodel: Model<Api>;\n\t/** Optional reasoning effort level */\n\treasoning?: ReasoningEffort;\n\t/** Optional reasoning summary preference for Responses API */\n\treasoningSummary?: \"auto\" | \"detailed\" | \"concise\" | null;\n\t/** Emit message_end for the initial user message (defaults to true). */\n\temitUserMessageEnd?: boolean;\n\t/** Function to retrieve steering messages for batch sending */\n\tgetSteeringMessages?: <T>() => Promise<QueuedMessage<T>[]>;\n\t/** Function to retrieve follow-up messages for batch sending */\n\tgetFollowUpMessages?: <T>() => Promise<QueuedMessage<T>[]>;\n\t/** Function to retrieve prompt-only messages for the next turn. */\n\tgetPromptOnlyMessages?: () => Promise<Message[]>;\n\t/** @deprecated Use getSteeringMessages/getFollowUpMessages instead */\n\tgetQueuedMessages?: <T>() => Promise<QueuedMessage<T>[]>;\n\t/**\n\t * Optional message preprocessor applied immediately before calling the LLM provider.\n\t *\n\t * Use this to implement provider-specific compatibility transforms (e.g., image limits,\n\t * signature preservation, prompt caching markers) without polluting the core tools.\n\t *\n\t * Note: This is a pure preprocessing hook. It should not execute tools or perform I/O.\n\t */\n\tpreprocessMessages?: (\n\t\tmessages: Message[],\n\t\tcontext: {\n\t\t\tsystemPrompt: string;\n\t\t\ttools: AgentTool[];\n\t\t\tmodel: Model<Api>;\n\t\t\tuserMessage?: Message;\n\t\t},\n\t\tsignal?: AbortSignal,\n\t) => Message[] | Promise<Message[]>;\n\t/** User identification for tracking */\n\tuser?: {\n\t\t/** User UUID */\n\t\tid: string;\n\t\t/** Organization UUID */\n\t\torgId: string;\n\t};\n\t/** Session information for persistence */\n\tsession?: {\n\t\t/** Session UUID */\n\t\tid: string;\n\t\t/** When the session started */\n\t\tstartedAt: Date;\n\t};\n\t/** Optional helper function for running LLM queries (e.g., for summarization) */\n\trunLLM?: (systemPrompt: string, userPrompt: string) => Promise<string>;\n\t/** Optional debug checkpoint profiler for local query latency diagnostics. */\n\tqueryProfiler?: CheckpointProfiler;\n\t/** Optional sandbox for isolated tool execution */\n\tsandbox?: import(\"../sandbox/types.js\").Sandbox;\n\t/** Sampling temperature override (0.0-2.0, lower = more deterministic) */\n\ttemperature?: number;\n\t/** Top-p sampling override (0.0-1.0) */\n\ttopP?: number;\n\t/** Optional Anthropic API-side task budget for the current turn */\n\ttaskBudget?: {\n\t\ttotal: number;\n\t\tremaining?: number;\n\t};\n}\n\n/**\n * Transport interface for LLM communication.\n *\n * Implementors of this interface handle the actual communication\n * with the LLM provider, including streaming and tool execution.\n */\nexport interface AgentTransport {\n\t/**\n\t * Execute a conversation turn with a new user message.\n\t *\n\t * @param messages - Conversation history\n\t * @param userMessage - New user message\n\t * @param config - Runtime configuration\n\t * @param signal - Optional abort signal for cancellation\n\t * @returns Async iterable of agent events\n\t */\n\trun(\n\t\tmessages: Message[],\n\t\tuserMessage: Message,\n\t\tconfig: AgentRunConfig,\n\t\tsignal?: AbortSignal,\n\t): AsyncIterable<AgentEvent>;\n\n\t/**\n\t * Continue from current context without a new user message.\n\t *\n\t * Used for:\n\t * - Retrying after transient errors (rate limits, overload)\n\t * - Continuing after context compaction\n\t * - Resuming interrupted tool execution\n\t *\n\t * @param messages - Current conversation history\n\t * @param config - Runtime configuration\n\t * @param signal - Optional abort signal for cancellation\n\t * @returns Async iterable of agent events\n\t */\n\tcontinue(\n\t\tmessages: Message[],\n\t\tconfig: AgentRunConfig,\n\t\tsignal?: AbortSignal,\n\t): AsyncIterable<AgentEvent>;\n\n\t/**\n\t * Optional lightweight connectivity probe for UI health checks.\n\t */\n\tping?: () => Promise<void>;\n}\n\n/**\n * Options for streaming LLM requests.\n *\n * These options are passed to the transport layer when making\n * streaming requests to the LLM provider.\n */\nexport interface StreamOptions {\n\t/** Sampling temperature (0.0-2.0, lower = more deterministic) */\n\ttemperature?: number;\n\t/** Maximum tokens to generate */\n\tmaxTokens?: number;\n\t/** Abort signal for cancellation */\n\tsignal?: AbortSignal;\n\t/** API key for authentication */\n\tapiKey?: string;\n\t/** Additional headers to include in requests */\n\theaders?: Record<string, string>;\n\t/** Additional request body fields for provider-specific extensions */\n\trequestBody?: Record<string, unknown>;\n\t/** Stable session id for provider-side request grouping/cache keys */\n\tsessionId?: string;\n\t/** Authentication type for the request */\n\tauthType?: \"api-key\" | \"anthropic-oauth\";\n\t/** Optional Anthropic API-side task budget for the current turn */\n\ttaskBudget?: {\n\t\ttotal: number;\n\t\tremaining?: number;\n\t};\n}\n\n/**\n * Cache control hint for prompt caching.\n *\n * Used to mark content that should be cached for faster\n * subsequent requests.\n */\nexport interface PromptCacheControl {\n\t/** Cache type - currently only \"ephemeral\" is supported */\n\ttype: \"ephemeral\";\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ActionApprovalDecision, type ActionApprovalRequest, ActionApprovalService, type ApprovalMode } from "../agent/action-approval.js";
|
|
2
|
+
import { type ApprovalsServiceConfig } from "./service-client.js";
|
|
3
|
+
export type SessionIdProvider = string | (() => string | undefined);
|
|
4
|
+
export interface PendingApprovalRegistration {
|
|
5
|
+
remoteApprovalRequestId?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PlatformBackedActionApprovalOptions {
|
|
8
|
+
sessionIdProvider?: SessionIdProvider;
|
|
9
|
+
approvalsServiceConfig?: ApprovalsServiceConfig | false;
|
|
10
|
+
}
|
|
11
|
+
export declare class PlatformBackedActionApprovalService extends ActionApprovalService {
|
|
12
|
+
private readonly sessionIdProvider?;
|
|
13
|
+
private readonly approvalsServiceConfig?;
|
|
14
|
+
private readonly pendingApprovalRegistrations;
|
|
15
|
+
private readonly pendingApprovalRegistrationWaiters;
|
|
16
|
+
constructor(mode?: ApprovalMode, options?: PlatformBackedActionApprovalOptions);
|
|
17
|
+
requestApproval(request: ActionApprovalRequest, signal?: AbortSignal): Promise<ActionApprovalDecision>;
|
|
18
|
+
getPendingApprovalRegistration(requestId: string): PendingApprovalRegistration | undefined;
|
|
19
|
+
waitForPendingApprovalRegistration(requestId: string, options?: {
|
|
20
|
+
signal?: AbortSignal;
|
|
21
|
+
timeoutMs?: number;
|
|
22
|
+
}): Promise<PendingApprovalRegistration | null>;
|
|
23
|
+
protected onPendingApprovalRegistered(_sessionId: string | undefined, _request: ActionApprovalRequest): void;
|
|
24
|
+
protected onPendingApprovalSettled(_request: ActionApprovalRequest): void;
|
|
25
|
+
private publishPendingApprovalRegistration;
|
|
26
|
+
private removePendingApprovalRegistrationWaiter;
|
|
27
|
+
private getSessionId;
|
|
28
|
+
private hasApprovalsServiceCandidate;
|
|
29
|
+
private requestRemoteApproval;
|
|
30
|
+
private resolveRemoteApproval;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=platform-action-approval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-action-approval.d.ts","sourceRoot":"","sources":["../../src/approvals/platform-action-approval.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,qBAAqB,EACrB,KAAK,YAAY,EACjB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACN,KAAK,sBAAsB,EAK3B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC;AAOpE,MAAM,WAAW,2BAA2B;IAC3C,uBAAuB,CAAC,EAAE,MAAM,CAAC;CACjC;AAOD,MAAM,WAAW,mCAAmC;IACnD,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,sBAAsB,CAAC,EAAE,sBAAsB,GAAG,KAAK,CAAC;CACxD;AAKD,qBAAa,mCAAoC,SAAQ,qBAAqB;IAC7E,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAoB;IACvD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAiC;IACzE,OAAO,CAAC,QAAQ,CAAC,4BAA4B,CAGzC;IACJ,OAAO,CAAC,QAAQ,CAAC,kCAAkC,CAG/C;gBAGH,IAAI,CAAC,EAAE,YAAY,EACnB,OAAO,GAAE,mCAAwC;IAOnC,eAAe,CAC7B,OAAO,EAAE,qBAAqB,EAC9B,MAAM,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,sBAAsB,CAAC;IAwClC,8BAA8B,CAC7B,SAAS,EAAE,MAAM,GACf,2BAA2B,GAAG,SAAS;IAI1C,kCAAkC,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO,GACxD,OAAO,CAAC,2BAA2B,GAAG,IAAI,CAAC;IAwC9C,SAAS,CAAC,2BAA2B,CACpC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,qBAAqB,GAC7B,IAAI;IAEP,SAAS,CAAC,wBAAwB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI;IAEzE,OAAO,CAAC,kCAAkC;IAoB1C,OAAO,CAAC,uCAAuC;IAgB/C,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,4BAA4B;YAgBtB,qBAAqB;YAsErB,qBAAqB;CA6BnC"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { ActionApprovalService, } from "../agent/action-approval.js";
|
|
2
|
+
import { createLogger } from "../utils/logger.js";
|
|
3
|
+
import { requestApprovalWithApprovalsService, resolveApprovalWithApprovalsService, resolveApprovalsServiceConfig, } from "./service-client.js";
|
|
4
|
+
const logger = createLogger("approvals:platform-action-approval");
|
|
5
|
+
const PENDING_APPROVAL_REGISTRATION_WAIT_TIMEOUT_MS = 30_000;
|
|
6
|
+
export class PlatformBackedActionApprovalService extends ActionApprovalService {
|
|
7
|
+
constructor(mode, options = {}) {
|
|
8
|
+
super(mode);
|
|
9
|
+
this.pendingApprovalRegistrations = new Map();
|
|
10
|
+
this.pendingApprovalRegistrationWaiters = new Map();
|
|
11
|
+
this.sessionIdProvider = options.sessionIdProvider;
|
|
12
|
+
this.approvalsServiceConfig = options.approvalsServiceConfig;
|
|
13
|
+
}
|
|
14
|
+
async requestApproval(request, signal) {
|
|
15
|
+
if (!this.requiresUserInteraction()) {
|
|
16
|
+
return await super.requestApproval(request, signal);
|
|
17
|
+
}
|
|
18
|
+
const sessionId = this.getSessionId();
|
|
19
|
+
const remoteRegistration = this.hasApprovalsServiceCandidate()
|
|
20
|
+
? await this.requestRemoteApproval(request, sessionId, signal)
|
|
21
|
+
: { remote: null };
|
|
22
|
+
if ("decision" in remoteRegistration) {
|
|
23
|
+
this.publishPendingApprovalRegistration(request.id, null);
|
|
24
|
+
return remoteRegistration.decision;
|
|
25
|
+
}
|
|
26
|
+
this.publishPendingApprovalRegistration(request.id, {
|
|
27
|
+
remoteApprovalRequestId: remoteRegistration.remote?.requestId,
|
|
28
|
+
});
|
|
29
|
+
if (remoteRegistration.remote?.requestId && !request.platform) {
|
|
30
|
+
request.platform = {
|
|
31
|
+
source: "approvals_service",
|
|
32
|
+
approvalRequestId: remoteRegistration.remote.requestId,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
this.onPendingApprovalRegistered(sessionId, request);
|
|
36
|
+
try {
|
|
37
|
+
const decision = await super.requestApproval(request, signal);
|
|
38
|
+
if (remoteRegistration.remote) {
|
|
39
|
+
return await this.resolveRemoteApproval(remoteRegistration.remote, decision, signal);
|
|
40
|
+
}
|
|
41
|
+
return decision;
|
|
42
|
+
}
|
|
43
|
+
finally {
|
|
44
|
+
this.publishPendingApprovalRegistration(request.id, null);
|
|
45
|
+
this.onPendingApprovalSettled(request);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
getPendingApprovalRegistration(requestId) {
|
|
49
|
+
return this.pendingApprovalRegistrations.get(requestId);
|
|
50
|
+
}
|
|
51
|
+
waitForPendingApprovalRegistration(requestId, options = {}) {
|
|
52
|
+
const existing = this.pendingApprovalRegistrations.get(requestId);
|
|
53
|
+
if (existing) {
|
|
54
|
+
return Promise.resolve(existing);
|
|
55
|
+
}
|
|
56
|
+
if (options.signal?.aborted) {
|
|
57
|
+
return Promise.resolve(null);
|
|
58
|
+
}
|
|
59
|
+
return new Promise((resolve) => {
|
|
60
|
+
const service = this;
|
|
61
|
+
let settled = false;
|
|
62
|
+
const onAbort = () => finish(null);
|
|
63
|
+
const timeout = setTimeout(() => finish(null), options.timeoutMs ?? PENDING_APPROVAL_REGISTRATION_WAIT_TIMEOUT_MS);
|
|
64
|
+
timeout.unref?.();
|
|
65
|
+
const waiter = {
|
|
66
|
+
resolve: finish,
|
|
67
|
+
timeout,
|
|
68
|
+
};
|
|
69
|
+
function finish(registration) {
|
|
70
|
+
if (settled) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
settled = true;
|
|
74
|
+
clearTimeout(timeout);
|
|
75
|
+
options.signal?.removeEventListener("abort", onAbort);
|
|
76
|
+
service.removePendingApprovalRegistrationWaiter(requestId, waiter);
|
|
77
|
+
resolve(registration);
|
|
78
|
+
}
|
|
79
|
+
const waiters = this.pendingApprovalRegistrationWaiters.get(requestId) ?? [];
|
|
80
|
+
waiters.push(waiter);
|
|
81
|
+
this.pendingApprovalRegistrationWaiters.set(requestId, waiters);
|
|
82
|
+
options.signal?.addEventListener("abort", onAbort, { once: true });
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
onPendingApprovalRegistered(_sessionId, _request) { }
|
|
86
|
+
onPendingApprovalSettled(_request) { }
|
|
87
|
+
publishPendingApprovalRegistration(requestId, registration) {
|
|
88
|
+
if (registration) {
|
|
89
|
+
this.pendingApprovalRegistrations.set(requestId, registration);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
this.pendingApprovalRegistrations.delete(requestId);
|
|
93
|
+
}
|
|
94
|
+
const waiters = this.pendingApprovalRegistrationWaiters.get(requestId);
|
|
95
|
+
if (!waiters) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
this.pendingApprovalRegistrationWaiters.delete(requestId);
|
|
99
|
+
for (const waiter of waiters) {
|
|
100
|
+
waiter.resolve(registration);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
removePendingApprovalRegistrationWaiter(requestId, waiter) {
|
|
104
|
+
const waiters = this.pendingApprovalRegistrationWaiters.get(requestId);
|
|
105
|
+
if (!waiters) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const remaining = waiters.filter((candidate) => candidate !== waiter);
|
|
109
|
+
if (remaining.length > 0) {
|
|
110
|
+
this.pendingApprovalRegistrationWaiters.set(requestId, remaining);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
this.pendingApprovalRegistrationWaiters.delete(requestId);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
getSessionId() {
|
|
117
|
+
if (typeof this.sessionIdProvider === "function") {
|
|
118
|
+
return this.sessionIdProvider();
|
|
119
|
+
}
|
|
120
|
+
return this.sessionIdProvider;
|
|
121
|
+
}
|
|
122
|
+
hasApprovalsServiceCandidate() {
|
|
123
|
+
if (this.approvalsServiceConfig === false) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
if (this.approvalsServiceConfig?.baseUrl) {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
return Boolean(process.env.APPROVALS_SERVICE_URL?.trim() ||
|
|
130
|
+
process.env.MAESTRO_APPROVALS_SERVICE_URL?.trim() ||
|
|
131
|
+
process.env.MAESTRO_PLATFORM_BASE_URL?.trim() ||
|
|
132
|
+
process.env.MAESTRO_EVALOPS_BASE_URL?.trim() ||
|
|
133
|
+
process.env.EVALOPS_BASE_URL?.trim());
|
|
134
|
+
}
|
|
135
|
+
async requestRemoteApproval(request, sessionId, signal) {
|
|
136
|
+
let config;
|
|
137
|
+
try {
|
|
138
|
+
config = resolveApprovalsServiceConfig(this.approvalsServiceConfig);
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
142
|
+
logger.warn("Failed to resolve approvals service config; using local approval", {
|
|
143
|
+
error: message,
|
|
144
|
+
toolName: request.toolName,
|
|
145
|
+
});
|
|
146
|
+
return { remote: null };
|
|
147
|
+
}
|
|
148
|
+
if (!config) {
|
|
149
|
+
return { remote: null };
|
|
150
|
+
}
|
|
151
|
+
try {
|
|
152
|
+
const remote = await requestApprovalWithApprovalsService(config, request, {
|
|
153
|
+
sessionId,
|
|
154
|
+
signal,
|
|
155
|
+
});
|
|
156
|
+
if (!remote) {
|
|
157
|
+
return { remote: null };
|
|
158
|
+
}
|
|
159
|
+
if (remote.autoApprovedReason) {
|
|
160
|
+
return {
|
|
161
|
+
decision: {
|
|
162
|
+
approved: true,
|
|
163
|
+
reason: remote.autoApprovedReason,
|
|
164
|
+
resolvedBy: "policy",
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
return { remote: { config, requestId: remote.requestId } };
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
172
|
+
if (config.failureMode === "required") {
|
|
173
|
+
return {
|
|
174
|
+
decision: {
|
|
175
|
+
approved: false,
|
|
176
|
+
reason: `Approvals service unavailable: ${message}`,
|
|
177
|
+
resolvedBy: "policy",
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
logger.warn("Failed to register approval with approvals service; using local approval", {
|
|
182
|
+
error: message,
|
|
183
|
+
toolName: request.toolName,
|
|
184
|
+
});
|
|
185
|
+
return { remote: null };
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
async resolveRemoteApproval(remote, decision, signal) {
|
|
189
|
+
try {
|
|
190
|
+
await resolveApprovalWithApprovalsService(remote.config, remote.requestId, decision, { signal });
|
|
191
|
+
return decision;
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
195
|
+
if (remote.config.failureMode === "required" && decision.approved) {
|
|
196
|
+
return {
|
|
197
|
+
approved: false,
|
|
198
|
+
reason: `Approvals service decision sync failed: ${message}`,
|
|
199
|
+
resolvedBy: "policy",
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
logger.warn("Failed to sync approval decision to approvals service", {
|
|
203
|
+
error: message,
|
|
204
|
+
remoteRequestId: remote.requestId,
|
|
205
|
+
});
|
|
206
|
+
return decision;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=platform-action-approval.js.map
|