@evalops/maestro 0.10.17 → 0.10.20
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 +56 -1
- package/dist/agent/action-approval.d.ts +12 -2
- package/dist/agent/action-approval.d.ts.map +1 -1
- package/dist/agent/action-approval.js +19 -32
- package/dist/agent/action-approval.js.map +1 -1
- package/dist/agent/agent.d.ts +1 -0
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.js +26 -0
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/compaction.d.ts +2 -0
- package/dist/agent/compaction.d.ts.map +1 -1
- package/dist/agent/compaction.js +4 -2
- package/dist/agent/compaction.js.map +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/modes.d.ts +56 -4
- package/dist/agent/modes.d.ts.map +1 -1
- package/dist/agent/modes.js +163 -2
- package/dist/agent/modes.js.map +1 -1
- package/dist/agent/prompt-recovery.d.ts.map +1 -1
- package/dist/agent/prompt-recovery.js +1 -3
- package/dist/agent/prompt-recovery.js.map +1 -1
- package/dist/agent/providers/anthropic.d.ts.map +1 -1
- package/dist/agent/providers/anthropic.js +9 -1
- package/dist/agent/providers/anthropic.js.map +1 -1
- package/dist/agent/providers/codex-app-server.d.ts +12 -0
- package/dist/agent/providers/codex-app-server.d.ts.map +1 -0
- package/dist/agent/providers/codex-app-server.js +788 -0
- package/dist/agent/providers/codex-app-server.js.map +1 -0
- package/dist/agent/providers/google-gemini-cli.js +14 -3
- package/dist/agent/providers/google.js +22 -3
- package/dist/agent/providers/scripted.d.ts +11 -0
- package/dist/agent/providers/scripted.d.ts.map +1 -0
- package/dist/agent/providers/scripted.js +399 -0
- package/dist/agent/providers/scripted.js.map +1 -0
- package/dist/agent/providers/vertex.js +14 -3
- package/dist/agent/scenario-source.d.ts +19 -0
- package/dist/agent/scenario-source.d.ts.map +1 -0
- package/dist/agent/scenario-source.js +112 -0
- package/dist/agent/scenario-source.js.map +1 -0
- package/dist/agent/subagent-specs.d.ts +1 -1
- package/dist/agent/subagent-specs.js +1 -1
- package/dist/agent/subagent-specs.js.map +1 -1
- package/dist/agent/swarm/executor.d.ts +25 -0
- package/dist/agent/swarm/executor.d.ts.map +1 -1
- package/dist/agent/swarm/executor.js +795 -20
- package/dist/agent/swarm/executor.js.map +1 -1
- package/dist/agent/swarm/runtime-events.d.ts +11 -0
- package/dist/agent/swarm/runtime-events.d.ts.map +1 -0
- package/dist/agent/swarm/runtime-events.js +26 -0
- package/dist/agent/swarm/runtime-events.js.map +1 -0
- package/dist/agent/swarm/types.d.ts +78 -0
- package/dist/agent/swarm/types.d.ts.map +1 -1
- package/dist/agent/swarm/types.js.map +1 -1
- package/dist/agent/tracing.d.ts +1 -1
- package/dist/agent/tracing.d.ts.map +1 -1
- package/dist/agent/tracing.js +17 -9
- 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 +14 -0
- package/dist/agent/transport/create-provider-stream.js.map +1 -1
- package/dist/agent/transport/stable-stringify.d.ts +2 -0
- package/dist/agent/transport/stable-stringify.d.ts.map +1 -0
- package/dist/agent/transport/stable-stringify.js +14 -0
- package/dist/agent/transport/stable-stringify.js.map +1 -0
- package/dist/agent/transport/tool-execution-bridge.d.ts.map +1 -1
- package/dist/agent/transport/tool-execution-bridge.js +2 -15
- package/dist/agent/transport/tool-execution-bridge.js.map +1 -1
- package/dist/agent/transport/tool-safety-pipeline.d.ts +5 -1
- package/dist/agent/transport/tool-safety-pipeline.d.ts.map +1 -1
- package/dist/agent/transport/tool-safety-pipeline.js +184 -36
- package/dist/agent/transport/tool-safety-pipeline.js.map +1 -1
- package/dist/agent/transport.d.ts +8 -0
- package/dist/agent/transport.d.ts.map +1 -1
- package/dist/agent/transport.js +1613 -68
- package/dist/agent/transport.js.map +1 -1
- package/dist/agent/types.d.ts +170 -2
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/api/enterprise-routes.d.ts.map +1 -1
- package/dist/api/enterprise-routes.js +34 -3
- package/dist/api/enterprise-routes.js.map +1 -1
- package/dist/app-server/in-process-client.d.ts +32 -0
- package/dist/app-server/in-process-client.d.ts.map +1 -0
- package/dist/app-server/in-process-client.js +73 -0
- package/dist/app-server/in-process-client.js.map +1 -0
- package/dist/app-server/session-api.d.ts +36 -0
- package/dist/app-server/session-api.d.ts.map +1 -0
- package/dist/app-server/session-api.js +713 -0
- package/dist/app-server/session-api.js.map +1 -0
- package/dist/approvals/platform-action-approval.d.ts +3 -1
- package/dist/approvals/platform-action-approval.d.ts.map +1 -1
- package/dist/approvals/platform-action-approval.js +16 -9
- package/dist/approvals/platform-action-approval.js.map +1 -1
- package/dist/approvals/service-client.d.ts.map +1 -1
- package/dist/approvals/service-client.js +7 -7
- package/dist/approvals/service-client.js.map +1 -1
- package/dist/audit/logger.d.ts +4 -4
- package/dist/bootstrap/agent-creation-setup.d.ts +4 -0
- package/dist/bootstrap/agent-creation-setup.d.ts.map +1 -1
- package/dist/bootstrap/agent-creation-setup.js +3 -1
- package/dist/bootstrap/agent-creation-setup.js.map +1 -1
- package/dist/bootstrap/auth-setup.js +1 -1
- package/dist/bootstrap/auth-setup.js.map +1 -1
- package/dist/bootstrap/event-subscriptions-setup.d.ts +6 -0
- package/dist/bootstrap/event-subscriptions-setup.d.ts.map +1 -1
- package/dist/bootstrap/event-subscriptions-setup.js +26 -2
- package/dist/bootstrap/event-subscriptions-setup.js.map +1 -1
- package/dist/bootstrap/model-resolution-setup.d.ts.map +1 -1
- package/dist/bootstrap/model-resolution-setup.js +4 -1
- package/dist/bootstrap/model-resolution-setup.js.map +1 -1
- package/dist/bootstrap/tools-setup.d.ts +2 -1
- package/dist/bootstrap/tools-setup.d.ts.map +1 -1
- package/dist/bootstrap/tools-setup.js +5 -1
- package/dist/bootstrap/tools-setup.js.map +1 -1
- package/dist/cli/args.d.ts +9 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +130 -5
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/commands/a2a.d.ts +9 -0
- package/dist/cli/commands/a2a.d.ts.map +1 -0
- package/dist/cli/commands/a2a.js +1714 -0
- package/dist/cli/commands/a2a.js.map +1 -0
- package/dist/cli/commands/agents.d.ts +16 -2
- package/dist/cli/commands/agents.d.ts.map +1 -1
- package/dist/cli/commands/agents.js +223 -35
- package/dist/cli/commands/agents.js.map +1 -1
- package/dist/cli/commands/codex.d.ts +1 -1
- package/dist/cli/commands/codex.d.ts.map +1 -1
- package/dist/cli/commands/codex.js +145 -39
- package/dist/cli/commands/codex.js.map +1 -1
- package/dist/cli/commands/context.d.ts +10 -0
- package/dist/cli/commands/context.d.ts.map +1 -0
- package/dist/cli/commands/context.js +176 -0
- package/dist/cli/commands/context.js.map +1 -0
- package/dist/cli/commands/hosted-runner.d.ts +1 -0
- package/dist/cli/commands/hosted-runner.d.ts.map +1 -1
- package/dist/cli/commands/hosted-runner.js +9 -1
- package/dist/cli/commands/hosted-runner.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +6 -0
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/modes.d.ts +8 -0
- package/dist/cli/commands/modes.d.ts.map +1 -0
- package/dist/cli/commands/modes.js +151 -0
- package/dist/cli/commands/modes.js.map +1 -0
- package/dist/cli/commands/operating-plane.d.ts +14 -0
- package/dist/cli/commands/operating-plane.d.ts.map +1 -0
- package/dist/cli/commands/operating-plane.js +160 -0
- package/dist/cli/commands/operating-plane.js.map +1 -0
- package/dist/cli/commands/run.d.ts +87 -0
- package/dist/cli/commands/run.d.ts.map +1 -0
- package/dist/cli/commands/run.js +356 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/commands/scenario.d.ts +7 -0
- package/dist/cli/commands/scenario.d.ts.map +1 -0
- package/dist/cli/commands/scenario.js +195 -0
- package/dist/cli/commands/scenario.js.map +1 -0
- package/dist/cli/commands/skill.d.ts +7 -0
- package/dist/cli/commands/skill.d.ts.map +1 -0
- package/dist/cli/commands/skill.js +286 -0
- package/dist/cli/commands/skill.js.map +1 -0
- package/dist/cli/headless-protocol.d.ts +55 -1
- package/dist/cli/headless-protocol.d.ts.map +1 -1
- package/dist/cli/headless-protocol.js +446 -7
- package/dist/cli/headless-protocol.js.map +1 -1
- package/dist/cli/headless-runtime-selection.d.ts +38 -0
- package/dist/cli/headless-runtime-selection.d.ts.map +1 -0
- package/dist/cli/headless-runtime-selection.js +48 -0
- package/dist/cli/headless-runtime-selection.js.map +1 -0
- package/dist/cli/headless.d.ts +5 -1
- package/dist/cli/headless.d.ts.map +1 -1
- package/dist/cli/headless.js +11 -1
- package/dist/cli/headless.js.map +1 -1
- package/dist/cli/help.d.ts +3 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +136 -30
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/system-prompt.d.ts +22 -4
- package/dist/cli/system-prompt.d.ts.map +1 -1
- package/dist/cli/system-prompt.js +224 -127
- package/dist/cli/system-prompt.js.map +1 -1
- package/dist/cli-tui/commands/a2a-handlers.d.ts +7 -0
- package/dist/cli-tui/commands/a2a-handlers.d.ts.map +1 -0
- package/dist/cli-tui/commands/a2a-handlers.js +160 -0
- package/dist/cli-tui/commands/a2a-handlers.js.map +1 -0
- package/dist/cli-tui/commands/command-catalog.d.ts.map +1 -1
- package/dist/cli-tui/commands/command-catalog.js +15 -0
- package/dist/cli-tui/commands/command-catalog.js.map +1 -1
- package/dist/cli-tui/commands/command-registry-adapter.js +10 -1
- package/dist/cli-tui/commands/command-registry-adapter.js.map +1 -1
- package/dist/cli-tui/commands/handlers/mode-handler.d.ts.map +1 -1
- package/dist/cli-tui/commands/handlers/mode-handler.js +22 -10
- package/dist/cli-tui/commands/handlers/mode-handler.js.map +1 -1
- package/dist/cli-tui/commands/mcp-handlers.d.ts.map +1 -1
- package/dist/cli-tui/commands/mcp-handlers.js +6 -5
- package/dist/cli-tui/commands/mcp-handlers.js.map +1 -1
- package/dist/cli-tui/commands/types.d.ts +1 -0
- 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/commands/utility-handlers.d.ts +4 -0
- package/dist/cli-tui/commands/utility-handlers.d.ts.map +1 -1
- package/dist/cli-tui/commands/utility-handlers.js +45 -6
- package/dist/cli-tui/commands/utility-handlers.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 +14 -5
- 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 +14 -5
- package/dist/cli-tui/run/streaming-shell-command.js.map +1 -1
- package/dist/cli-tui/selectors/model-selector.d.ts +1 -0
- package/dist/cli-tui/selectors/model-selector.d.ts.map +1 -1
- package/dist/cli-tui/selectors/model-selector.js +6 -2
- package/dist/cli-tui/selectors/model-selector.js.map +1 -1
- package/dist/cli-tui/tui-renderer/command-registry-options.d.ts.map +1 -1
- package/dist/cli-tui/tui-renderer/command-registry-options.js +5 -0
- package/dist/cli-tui/tui-renderer/command-registry-options.js.map +1 -1
- package/dist/cli-tui/utils/commands/review-prompt.d.ts +1 -1
- package/dist/cli-tui/utils/commands/review-prompt.d.ts.map +1 -1
- package/dist/cli-tui/utils/commands/review-prompt.js +8 -3
- package/dist/cli-tui/utils/commands/review-prompt.js.map +1 -1
- package/dist/cli-tui/utils/runtime-badges.d.ts +1 -0
- package/dist/cli-tui/utils/runtime-badges.d.ts.map +1 -1
- package/dist/cli-tui/utils/runtime-badges.js +7 -0
- package/dist/cli-tui/utils/runtime-badges.js.map +1 -1
- package/dist/cli-tui/utils/text-formatting.d.ts +1 -0
- package/dist/cli-tui/utils/text-formatting.d.ts.map +1 -1
- package/dist/cli-tui/utils/text-formatting.js +5 -0
- package/dist/cli-tui/utils/text-formatting.js.map +1 -1
- package/dist/cli.js +49209 -26165
- package/dist/cli.js.map +1 -1
- package/dist/codex/app-server-client.d.ts +139 -0
- package/dist/codex/app-server-client.d.ts.map +1 -0
- package/dist/codex/app-server-client.js +352 -0
- package/dist/codex/app-server-client.js.map +1 -0
- package/dist/codex/compatibility.d.ts +48 -0
- package/dist/codex/compatibility.d.ts.map +1 -0
- package/dist/codex/compatibility.js +344 -0
- package/dist/codex/compatibility.js.map +1 -0
- package/dist/codex/subagent-dispatch-table.d.ts +66 -0
- package/dist/codex/subagent-dispatch-table.d.ts.map +1 -0
- package/dist/codex/subagent-dispatch-table.js +127 -0
- package/dist/codex/subagent-dispatch-table.js.map +1 -0
- package/dist/codex/subagent-workgraph.d.ts +56 -0
- package/dist/codex/subagent-workgraph.d.ts.map +1 -0
- package/dist/codex/subagent-workgraph.js +89 -0
- package/dist/codex/subagent-workgraph.js.map +1 -0
- package/dist/config/constants.d.ts +3 -1
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +9 -0
- package/dist/config/constants.js.map +1 -1
- package/dist/config/feature-flags.d.ts +10 -1
- package/dist/config/feature-flags.d.ts.map +1 -1
- package/dist/config/feature-flags.js +17 -6
- package/dist/config/feature-flags.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/toml-config.d.ts +32 -0
- package/dist/config/toml-config.d.ts.map +1 -1
- package/dist/config/toml-config.js +152 -43
- package/dist/config/toml-config.js.map +1 -1
- package/dist/connectors/service-client.d.ts.map +1 -1
- package/dist/connectors/service-client.js +4 -7
- package/dist/connectors/service-client.js.map +1 -1
- package/dist/context/manifest-types.d.ts +59 -0
- package/dist/context/manifest-types.d.ts.map +1 -0
- package/dist/context/manifest-types.js +2 -0
- package/dist/context/manifest-types.js.map +1 -0
- package/dist/context/manifest.d.ts +16 -0
- package/dist/context/manifest.d.ts.map +1 -0
- package/dist/context/manifest.js +503 -0
- package/dist/context/manifest.js.map +1 -0
- package/dist/db/schema.d.ts +10 -1
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/schema.js.map +1 -1
- package/dist/evalops/agent-bootstrap.d.ts +1 -0
- package/dist/evalops/agent-bootstrap.d.ts.map +1 -1
- package/dist/evalops/agent-bootstrap.js +41 -1
- package/dist/evalops/agent-bootstrap.js.map +1 -1
- package/dist/evalops/env-aliases.d.ts +13 -0
- package/dist/evalops/env-aliases.d.ts.map +1 -0
- package/dist/evalops/env-aliases.js +60 -0
- package/dist/evalops/env-aliases.js.map +1 -0
- package/dist/evalops/managed-context.d.ts.map +1 -1
- package/dist/evalops/managed-context.js +28 -62
- package/dist/evalops/managed-context.js.map +1 -1
- package/dist/guardian/config.d.ts.map +1 -1
- package/dist/guardian/config.js +1 -0
- package/dist/guardian/config.js.map +1 -1
- package/dist/guardian/runner.d.ts +2 -0
- package/dist/guardian/runner.d.ts.map +1 -1
- package/dist/guardian/runner.js +105 -2
- package/dist/guardian/runner.js.map +1 -1
- package/dist/guardian/types.d.ts +1 -0
- package/dist/guardian/types.d.ts.map +1 -1
- package/dist/guardian/types.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +267 -55
- package/dist/main.js.map +1 -1
- package/dist/mcp/config.d.ts.map +1 -1
- package/dist/mcp/config.js +89 -7
- package/dist/mcp/config.js.map +1 -1
- package/dist/mcp/manager.d.ts +5 -1
- package/dist/mcp/manager.d.ts.map +1 -1
- package/dist/mcp/manager.js +159 -4
- package/dist/mcp/manager.js.map +1 -1
- package/dist/mcp/platform-plugin.d.ts.map +1 -1
- package/dist/mcp/platform-plugin.js +9 -26
- package/dist/mcp/platform-plugin.js.map +1 -1
- package/dist/mcp/schema.d.ts +15 -0
- package/dist/mcp/schema.d.ts.map +1 -1
- package/dist/mcp/schema.js +24 -0
- package/dist/mcp/schema.js.map +1 -1
- package/dist/mcp/tool-bridge.d.ts +39 -10
- package/dist/mcp/tool-bridge.d.ts.map +1 -1
- package/dist/mcp/tool-bridge.js +101 -24
- package/dist/mcp/tool-bridge.js.map +1 -1
- package/dist/mcp/types.d.ts +27 -0
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/mcp/types.js.map +1 -1
- package/dist/mcp/workspace-trust.d.ts +10 -0
- package/dist/mcp/workspace-trust.d.ts.map +1 -0
- package/dist/mcp/workspace-trust.js +295 -0
- package/dist/mcp/workspace-trust.js.map +1 -0
- package/dist/memory/service-client.d.ts +1 -0
- package/dist/memory/service-client.d.ts.map +1 -1
- package/dist/memory/service-client.js +194 -9
- package/dist/memory/service-client.js.map +1 -1
- package/dist/models/builtin.d.ts.map +1 -1
- package/dist/models/builtin.js +66 -25
- 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 +2 -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/device-identity.d.ts.map +1 -1
- package/dist/oauth/device-identity.js +1 -3
- package/dist/oauth/device-identity.js.map +1 -1
- package/dist/oauth/evalops.d.ts.map +1 -1
- package/dist/oauth/evalops.js +2 -5
- package/dist/oauth/evalops.js.map +1 -1
- package/dist/opentelemetry.d.ts.map +1 -1
- package/dist/opentelemetry.js +12 -12
- package/dist/opentelemetry.js.map +1 -1
- package/dist/package-version.d.ts +2 -0
- package/dist/package-version.d.ts.map +1 -0
- package/dist/package-version.js +11 -0
- package/dist/package-version.js.map +1 -0
- package/dist/packages/constants.d.ts +3 -0
- package/dist/packages/constants.d.ts.map +1 -0
- package/dist/packages/constants.js +3 -0
- package/dist/packages/constants.js.map +1 -0
- package/dist/packages/inspection.d.ts.map +1 -1
- package/dist/packages/inspection.js +2 -1
- package/dist/packages/inspection.js.map +1 -1
- package/dist/packages/search.d.ts.map +1 -1
- package/dist/packages/search.js +1 -1
- package/dist/packages/search.js.map +1 -1
- package/dist/platform/a2a-capability-market.d.ts +21 -0
- package/dist/platform/a2a-capability-market.d.ts.map +1 -0
- package/dist/platform/a2a-capability-market.js +176 -0
- package/dist/platform/a2a-capability-market.js.map +1 -0
- package/dist/platform/a2a-client.d.ts +217 -0
- package/dist/platform/a2a-client.d.ts.map +1 -0
- package/dist/platform/a2a-client.js +589 -0
- package/dist/platform/a2a-client.js.map +1 -0
- package/dist/platform/a2a-fleet.d.ts +41 -0
- package/dist/platform/a2a-fleet.d.ts.map +1 -0
- package/dist/platform/a2a-fleet.js +109 -0
- package/dist/platform/a2a-fleet.js.map +1 -0
- package/dist/platform/a2a-maestro-peer.d.ts +20 -0
- package/dist/platform/a2a-maestro-peer.d.ts.map +1 -0
- package/dist/platform/a2a-maestro-peer.js +176 -0
- package/dist/platform/a2a-maestro-peer.js.map +1 -0
- package/dist/platform/a2a-peer-pairing.d.ts +107 -0
- package/dist/platform/a2a-peer-pairing.d.ts.map +1 -0
- package/dist/platform/a2a-peer-pairing.js +489 -0
- package/dist/platform/a2a-peer-pairing.js.map +1 -0
- package/dist/platform/a2a-peer-registry.d.ts +68 -0
- package/dist/platform/a2a-peer-registry.d.ts.map +1 -0
- package/dist/platform/a2a-peer-registry.js +320 -0
- package/dist/platform/a2a-peer-registry.js.map +1 -0
- package/dist/platform/a2a-task-ledger.d.ts +86 -0
- package/dist/platform/a2a-task-ledger.d.ts.map +1 -0
- package/dist/platform/a2a-task-ledger.js +546 -0
- package/dist/platform/a2a-task-ledger.js.map +1 -0
- package/dist/platform/a2a-work-graph.d.ts +43 -0
- package/dist/platform/a2a-work-graph.d.ts.map +1 -0
- package/dist/platform/a2a-work-graph.js +267 -0
- package/dist/platform/a2a-work-graph.js.map +1 -0
- package/dist/platform/agent-registry-client.d.ts +327 -0
- package/dist/platform/agent-registry-client.d.ts.map +1 -0
- package/dist/platform/agent-registry-client.js +803 -0
- package/dist/platform/agent-registry-client.js.map +1 -0
- package/dist/platform/agent-runtime-client.d.ts +135 -1
- package/dist/platform/agent-runtime-client.d.ts.map +1 -1
- package/dist/platform/agent-runtime-client.js +467 -10
- package/dist/platform/agent-runtime-client.js.map +1 -1
- package/dist/platform/cerebro-facts-client.d.ts.map +1 -1
- package/dist/platform/cerebro-facts-client.js +4 -7
- package/dist/platform/cerebro-facts-client.js.map +1 -1
- package/dist/platform/client.d.ts +2 -0
- package/dist/platform/client.d.ts.map +1 -1
- package/dist/platform/client.js +7 -14
- package/dist/platform/client.js.map +1 -1
- package/dist/platform/core-services.d.ts +68 -0
- package/dist/platform/core-services.d.ts.map +1 -1
- package/dist/platform/core-services.js +68 -0
- package/dist/platform/core-services.js.map +1 -1
- package/dist/platform/fermata-eval-client.d.ts +195 -0
- package/dist/platform/fermata-eval-client.d.ts.map +1 -0
- package/dist/platform/fermata-eval-client.js +146 -0
- package/dist/platform/fermata-eval-client.js.map +1 -0
- package/dist/platform/fermata-scenario-suite.d.ts +99 -0
- package/dist/platform/fermata-scenario-suite.d.ts.map +1 -0
- package/dist/platform/fermata-scenario-suite.js +459 -0
- package/dist/platform/fermata-scenario-suite.js.map +1 -0
- package/dist/platform/maestro-timeline-client.d.ts.map +1 -1
- package/dist/platform/maestro-timeline-client.js +5 -11
- package/dist/platform/maestro-timeline-client.js.map +1 -1
- package/dist/platform/operating-plane-client.d.ts +156 -0
- package/dist/platform/operating-plane-client.d.ts.map +1 -0
- package/dist/platform/operating-plane-client.js +131 -0
- package/dist/platform/operating-plane-client.js.map +1 -0
- package/dist/platform/operating-plane-summary.d.ts +47 -0
- package/dist/platform/operating-plane-summary.d.ts.map +1 -0
- package/dist/platform/operating-plane-summary.js +209 -0
- package/dist/platform/operating-plane-summary.js.map +1 -0
- package/dist/platform/tool-execution-client.d.ts.map +1 -1
- package/dist/platform/tool-execution-client.js +4 -11
- package/dist/platform/tool-execution-client.js.map +1 -1
- package/dist/prompts/service-client.d.ts.map +1 -1
- package/dist/prompts/service-client.js +3 -5
- package/dist/prompts/service-client.js.map +1 -1
- package/dist/prompts/system-prompt.d.ts +3 -0
- package/dist/prompts/system-prompt.d.ts.map +1 -1
- package/dist/prompts/system-prompt.js +13 -3
- package/dist/prompts/system-prompt.js.map +1 -1
- package/dist/prompts/types.d.ts +2 -0
- package/dist/prompts/types.d.ts.map +1 -1
- package/dist/prompts/types.js.map +1 -1
- package/dist/providers/api-keys.d.ts +1 -1
- package/dist/providers/api-keys.d.ts.map +1 -1
- package/dist/providers/api-keys.js +2 -1
- package/dist/providers/api-keys.js.map +1 -1
- package/dist/providers/auth.d.ts.map +1 -1
- package/dist/providers/auth.js +48 -25
- package/dist/providers/auth.js.map +1 -1
- package/dist/remote-runner/attach-client.d.ts.map +1 -1
- package/dist/remote-runner/attach-client.js +1 -0
- package/dist/remote-runner/attach-client.js.map +1 -1
- package/dist/remote-runner/client.d.ts.map +1 -1
- package/dist/remote-runner/client.js +4 -7
- package/dist/remote-runner/client.js.map +1 -1
- package/dist/rpc/rpc-types.d.ts.map +1 -1
- package/dist/rpc/rpc-types.js +1 -0
- package/dist/rpc/rpc-types.js.map +1 -1
- package/dist/safety/action-firewall.d.ts.map +1 -1
- package/dist/safety/action-firewall.js +69 -6
- package/dist/safety/action-firewall.js.map +1 -1
- package/dist/safety/attack-patterns.d.ts.map +1 -1
- package/dist/safety/attack-patterns.js +31 -14
- package/dist/safety/attack-patterns.js.map +1 -1
- package/dist/safety/bash-parser.d.ts.map +1 -1
- package/dist/safety/bash-parser.js +4 -3
- package/dist/safety/bash-parser.js.map +1 -1
- package/dist/safety/execpolicy.d.ts +15 -3
- package/dist/safety/execpolicy.d.ts.map +1 -1
- package/dist/safety/execpolicy.js +248 -37
- package/dist/safety/execpolicy.js.map +1 -1
- package/dist/safety/governance-service-client.d.ts.map +1 -1
- package/dist/safety/governance-service-client.js +4 -7
- package/dist/safety/governance-service-client.js.map +1 -1
- package/dist/safety/guarded-files.d.ts +34 -0
- package/dist/safety/guarded-files.d.ts.map +1 -0
- package/dist/safety/guarded-files.js +372 -0
- package/dist/safety/guarded-files.js.map +1 -0
- package/dist/safety/loop-detector.d.ts.map +1 -1
- package/dist/safety/loop-detector.js +6 -1
- package/dist/safety/loop-detector.js.map +1 -1
- package/dist/safety/permission-profile.d.ts +47 -0
- package/dist/safety/permission-profile.d.ts.map +1 -0
- package/dist/safety/permission-profile.js +349 -0
- package/dist/safety/permission-profile.js.map +1 -0
- package/dist/safety/safety-middleware.d.ts +5 -1
- package/dist/safety/safety-middleware.d.ts.map +1 -1
- package/dist/safety/safety-middleware.js +3 -2
- package/dist/safety/safety-middleware.js.map +1 -1
- package/dist/safety/suspicious-patterns.d.ts.map +1 -1
- package/dist/safety/suspicious-patterns.js +12 -7
- package/dist/safety/suspicious-patterns.js.map +1 -1
- package/dist/safety/tool-categorization.js +1 -1
- package/dist/safety/tool-categorization.js.map +1 -1
- package/dist/safety/validators/path-policy-validator.d.ts.map +1 -1
- package/dist/safety/validators/path-policy-validator.js +7 -0
- package/dist/safety/validators/path-policy-validator.js.map +1 -1
- package/dist/sandbox/index.d.ts +6 -1
- package/dist/sandbox/index.d.ts.map +1 -1
- package/dist/sandbox/index.js +30 -4
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/native-sandbox.d.ts +3 -0
- package/dist/sandbox/native-sandbox.d.ts.map +1 -1
- package/dist/sandbox/native-sandbox.js +139 -18
- package/dist/sandbox/native-sandbox.js.map +1 -1
- package/dist/sentry.d.ts +17 -0
- package/dist/sentry.d.ts.map +1 -0
- package/dist/sentry.js +91 -0
- package/dist/sentry.js.map +1 -0
- package/dist/server/agent-runtime-ledger.d.ts +141 -0
- package/dist/server/agent-runtime-ledger.d.ts.map +1 -0
- package/dist/server/agent-runtime-ledger.js +334 -0
- package/dist/server/agent-runtime-ledger.js.map +1 -0
- package/dist/server/agent-trajectory-inspection.d.ts +104 -0
- package/dist/server/agent-trajectory-inspection.d.ts.map +1 -0
- package/dist/server/agent-trajectory-inspection.js +168 -0
- package/dist/server/agent-trajectory-inspection.js.map +1 -0
- package/dist/server/agent-trajectory-replay.d.ts +56 -0
- package/dist/server/agent-trajectory-replay.d.ts.map +1 -0
- package/dist/server/agent-trajectory-replay.js +214 -0
- package/dist/server/agent-trajectory-replay.js.map +1 -0
- package/dist/server/agent-trajectory-scenarios.d.ts +109 -0
- package/dist/server/agent-trajectory-scenarios.d.ts.map +1 -0
- package/dist/server/agent-trajectory-scenarios.js +822 -0
- package/dist/server/agent-trajectory-scenarios.js.map +1 -0
- package/dist/server/agent-trajectory-scorers.d.ts +61 -0
- package/dist/server/agent-trajectory-scorers.d.ts.map +1 -0
- package/dist/server/agent-trajectory-scorers.js +162 -0
- package/dist/server/agent-trajectory-scorers.js.map +1 -0
- package/dist/server/agent-trajectory-validation.d.ts +7 -0
- package/dist/server/agent-trajectory-validation.d.ts.map +1 -0
- package/dist/server/agent-trajectory-validation.js +101 -0
- package/dist/server/agent-trajectory-validation.js.map +1 -0
- package/dist/server/agent-trajectory.d.ts +50 -0
- package/dist/server/agent-trajectory.d.ts.map +1 -0
- package/dist/server/agent-trajectory.js +159 -0
- package/dist/server/agent-trajectory.js.map +1 -0
- package/dist/server/app-context.d.ts +18 -0
- package/dist/server/app-context.d.ts.map +1 -1
- package/dist/server/app-context.js.map +1 -1
- package/dist/server/handlers/headless-sessions.d.ts.map +1 -1
- package/dist/server/handlers/headless-sessions.js +64 -27
- package/dist/server/handlers/headless-sessions.js.map +1 -1
- package/dist/server/handlers/health.d.ts +6 -0
- package/dist/server/handlers/health.d.ts.map +1 -1
- package/dist/server/handlers/health.js +6 -0
- package/dist/server/handlers/health.js.map +1 -1
- package/dist/server/handlers/hosted-runner-drain.d.ts +69 -1
- package/dist/server/handlers/hosted-runner-drain.d.ts.map +1 -1
- package/dist/server/handlers/hosted-runner-drain.js +309 -18
- package/dist/server/handlers/hosted-runner-drain.js.map +1 -1
- package/dist/server/handlers/hosted-runner-identity.d.ts +16 -0
- package/dist/server/handlers/hosted-runner-identity.d.ts.map +1 -1
- package/dist/server/handlers/hosted-runner-identity.js +43 -0
- package/dist/server/handlers/hosted-runner-identity.js.map +1 -1
- package/dist/server/handlers/mode.d.ts.map +1 -1
- package/dist/server/handlers/mode.js +3 -1
- package/dist/server/handlers/mode.js.map +1 -1
- package/dist/server/handlers/pending-requests.d.ts.map +1 -1
- package/dist/server/handlers/pending-requests.js +336 -51
- package/dist/server/handlers/pending-requests.js.map +1 -1
- package/dist/server/handlers/platform-a2a-push.d.ts +6 -0
- package/dist/server/handlers/platform-a2a-push.d.ts.map +1 -0
- package/dist/server/handlers/platform-a2a-push.js +136 -0
- package/dist/server/handlers/platform-a2a-push.js.map +1 -0
- package/dist/server/handlers/sessions.d.ts.map +1 -1
- package/dist/server/handlers/sessions.js +21 -1
- package/dist/server/handlers/sessions.js.map +1 -1
- package/dist/server/headless-runtime-service.d.ts +9 -2
- package/dist/server/headless-runtime-service.d.ts.map +1 -1
- package/dist/server/headless-runtime-service.js +39 -0
- package/dist/server/headless-runtime-service.js.map +1 -1
- package/dist/server/hosted-agent-runtime-progress.d.ts +144 -0
- package/dist/server/hosted-agent-runtime-progress.d.ts.map +1 -0
- package/dist/server/hosted-agent-runtime-progress.js +1650 -0
- package/dist/server/hosted-agent-runtime-progress.js.map +1 -0
- package/dist/server/hosted-runner-lease.d.ts +41 -0
- package/dist/server/hosted-runner-lease.d.ts.map +1 -0
- package/dist/server/hosted-runner-lease.js +140 -0
- package/dist/server/hosted-runner-lease.js.map +1 -0
- package/dist/server/hosted-session-manager.d.ts +16 -8
- package/dist/server/hosted-session-manager.d.ts.map +1 -1
- package/dist/server/hosted-session-manager.js +98 -76
- package/dist/server/hosted-session-manager.js.map +1 -1
- package/dist/server/junit-xml.d.ts +2 -0
- package/dist/server/junit-xml.d.ts.map +1 -0
- package/dist/server/junit-xml.js +9 -0
- package/dist/server/junit-xml.js.map +1 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +6 -0
- package/dist/server/routes.js.map +1 -1
- package/dist/server/scenario-recorder.d.ts +56 -0
- package/dist/server/scenario-recorder.d.ts.map +1 -0
- package/dist/server/scenario-recorder.js +109 -0
- package/dist/server/scenario-recorder.js.map +1 -0
- package/dist/server/scripted-scenario-runner.d.ts +46 -0
- package/dist/server/scripted-scenario-runner.d.ts.map +1 -0
- package/dist/server/scripted-scenario-runner.js +190 -0
- package/dist/server/scripted-scenario-runner.js.map +1 -0
- package/dist/server/server-middlewares.d.ts +6 -2
- package/dist/server/server-middlewares.d.ts.map +1 -1
- package/dist/server/server-middlewares.js +8 -2
- package/dist/server/server-middlewares.js.map +1 -1
- package/dist/server/server-request-manager.d.ts +9 -1
- package/dist/server/server-request-manager.d.ts.map +1 -1
- package/dist/server/server-request-manager.js +49 -4
- package/dist/server/server-request-manager.js.map +1 -1
- package/dist/services/intelligent-router/service.d.ts +2 -0
- package/dist/services/intelligent-router/service.d.ts.map +1 -1
- package/dist/services/intelligent-router/service.js +4 -0
- package/dist/services/intelligent-router/service.js.map +1 -1
- package/dist/services/service-authority.d.ts +25 -0
- package/dist/services/service-authority.d.ts.map +1 -0
- package/dist/services/service-authority.js +143 -0
- package/dist/services/service-authority.js.map +1 -0
- package/dist/services/workspace-config/service.d.ts +2 -0
- package/dist/services/workspace-config/service.d.ts.map +1 -1
- package/dist/services/workspace-config/service.js +4 -0
- package/dist/services/workspace-config/service.js.map +1 -1
- package/dist/session/manager.d.ts +8 -2
- package/dist/session/manager.d.ts.map +1 -1
- package/dist/session/manager.js +19 -4
- package/dist/session/manager.js.map +1 -1
- package/dist/session/session-branch.d.ts.map +1 -1
- package/dist/session/session-branch.js +5 -1
- package/dist/session/session-branch.js.map +1 -1
- package/dist/session/session-catalog.d.ts +7 -2
- package/dist/session/session-catalog.d.ts.map +1 -1
- package/dist/session/session-catalog.js +13 -2
- package/dist/session/session-catalog.js.map +1 -1
- package/dist/session/session-context.d.ts +6 -2
- package/dist/session/session-context.d.ts.map +1 -1
- package/dist/session/session-context.js +44 -4
- package/dist/session/session-context.js.map +1 -1
- package/dist/session/session-graph-projection.d.ts +32 -0
- package/dist/session/session-graph-projection.d.ts.map +1 -0
- package/dist/session/session-graph-projection.js +133 -0
- package/dist/session/session-graph-projection.js.map +1 -0
- package/dist/session/types.d.ts +18 -0
- package/dist/session/types.d.ts.map +1 -1
- package/dist/session/types.js +8 -0
- package/dist/session/types.js.map +1 -1
- package/dist/session/wire-format.generated.d.ts +3 -0
- package/dist/session/wire-format.generated.d.ts.map +1 -1
- package/dist/session/wire-format.generated.js +20 -0
- package/dist/session/wire-format.generated.js.map +1 -1
- package/dist/skills/eval-harness.d.ts +38 -0
- package/dist/skills/eval-harness.d.ts.map +1 -0
- package/dist/skills/eval-harness.js +112 -0
- package/dist/skills/eval-harness.js.map +1 -0
- package/dist/skills/index.d.ts +5 -1
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +5 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/linter.d.ts +36 -0
- package/dist/skills/linter.d.ts.map +1 -0
- package/dist/skills/linter.js +398 -0
- package/dist/skills/linter.js.map +1 -0
- package/dist/skills/loader.d.ts +36 -6
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +169 -86
- package/dist/skills/loader.js.map +1 -1
- package/dist/skills/package-contract.d.ts +45 -0
- package/dist/skills/package-contract.d.ts.map +1 -0
- package/dist/skills/package-contract.js +153 -0
- package/dist/skills/package-contract.js.map +1 -0
- package/dist/skills/runtime-activation.d.ts +68 -0
- package/dist/skills/runtime-activation.d.ts.map +1 -0
- package/dist/skills/runtime-activation.js +228 -0
- package/dist/skills/runtime-activation.js.map +1 -0
- package/dist/skills/service-client.d.ts.map +1 -1
- package/dist/skills/service-client.js +3 -4
- package/dist/skills/service-client.js.map +1 -1
- package/dist/skills/tool.d.ts.map +1 -1
- package/dist/skills/tool.js +2 -0
- package/dist/skills/tool.js.map +1 -1
- package/dist/skills/types.d.ts +14 -0
- package/dist/skills/types.d.ts.map +1 -1
- package/dist/skills/types.js.map +1 -1
- package/dist/telemetry/agent-operating-plane-context.d.ts +24 -0
- package/dist/telemetry/agent-operating-plane-context.d.ts.map +1 -0
- package/dist/telemetry/agent-operating-plane-context.js +54 -0
- package/dist/telemetry/agent-operating-plane-context.js.map +1 -0
- package/dist/telemetry/beacon.d.ts +24 -0
- package/dist/telemetry/beacon.d.ts.map +1 -0
- package/dist/telemetry/beacon.js +115 -0
- package/dist/telemetry/beacon.js.map +1 -0
- package/dist/telemetry/cli-command-aggregator.d.ts +36 -0
- package/dist/telemetry/cli-command-aggregator.d.ts.map +1 -0
- package/dist/telemetry/cli-command-aggregator.js +251 -0
- package/dist/telemetry/cli-command-aggregator.js.map +1 -0
- package/dist/telemetry/cli-startup.d.ts +21 -0
- package/dist/telemetry/cli-startup.d.ts.map +1 -0
- package/dist/telemetry/cli-startup.js +83 -0
- package/dist/telemetry/cli-startup.js.map +1 -0
- package/dist/telemetry/disablement.d.ts +13 -0
- package/dist/telemetry/disablement.d.ts.map +1 -0
- package/dist/telemetry/disablement.js +19 -0
- package/dist/telemetry/disablement.js.map +1 -0
- package/dist/telemetry/index.d.ts +6 -2
- package/dist/telemetry/index.d.ts.map +1 -1
- package/dist/telemetry/index.js +6 -2
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/maestro-event-bus.d.ts +52 -0
- package/dist/telemetry/maestro-event-bus.d.ts.map +1 -1
- package/dist/telemetry/maestro-event-bus.js +179 -3
- package/dist/telemetry/maestro-event-bus.js.map +1 -1
- package/dist/telemetry/maestro-event-catalog.d.ts +3 -1
- package/dist/telemetry/maestro-event-catalog.d.ts.map +1 -1
- package/dist/telemetry/maestro-event-catalog.js +2 -0
- package/dist/telemetry/maestro-event-catalog.js.map +1 -1
- package/dist/telemetry/maestro-platform-replay-fixture.d.ts.map +1 -1
- package/dist/telemetry/maestro-platform-replay-fixture.js +74 -9
- package/dist/telemetry/maestro-platform-replay-fixture.js.map +1 -1
- package/dist/telemetry/maestro-publisher-conformance-fixture.d.ts +1 -1
- package/dist/telemetry/maestro-publisher-conformance-fixture.d.ts.map +1 -1
- package/dist/telemetry/maestro-publisher-conformance-fixture.js +46 -11
- package/dist/telemetry/maestro-publisher-conformance-fixture.js.map +1 -1
- package/dist/telemetry/mcp-beacon.d.ts +20 -0
- package/dist/telemetry/mcp-beacon.d.ts.map +1 -0
- package/dist/telemetry/mcp-beacon.js +54 -0
- package/dist/telemetry/mcp-beacon.js.map +1 -0
- package/dist/telemetry/metadata-normalization.d.ts +7 -0
- package/dist/telemetry/metadata-normalization.d.ts.map +1 -0
- package/dist/telemetry/metadata-normalization.js +189 -0
- package/dist/telemetry/metadata-normalization.js.map +1 -0
- package/dist/telemetry/meter-service-client.d.ts.map +1 -1
- package/dist/telemetry/meter-service-client.js +5 -10
- package/dist/telemetry/meter-service-client.js.map +1 -1
- package/dist/telemetry/metrics.d.ts +123 -0
- package/dist/telemetry/metrics.d.ts.map +1 -0
- package/dist/telemetry/metrics.js +184 -0
- package/dist/telemetry/metrics.js.map +1 -0
- package/dist/telemetry/turn-tracker.d.ts +1 -0
- package/dist/telemetry/turn-tracker.d.ts.map +1 -1
- package/dist/telemetry/turn-tracker.js +22 -1
- package/dist/telemetry/turn-tracker.js.map +1 -1
- package/dist/telemetry/wide-events.d.ts +31 -1
- package/dist/telemetry/wide-events.d.ts.map +1 -1
- package/dist/telemetry/wide-events.js +229 -1
- package/dist/telemetry/wide-events.js.map +1 -1
- package/dist/telemetry.d.ts +39 -3
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +160 -3
- package/dist/telemetry.js.map +1 -1
- package/dist/testing/test-verification-hook.d.ts.map +1 -1
- package/dist/testing/test-verification-hook.js +34 -21
- package/dist/testing/test-verification-hook.js.map +1 -1
- package/dist/tools/apply-patch-parser.d.ts +26 -0
- package/dist/tools/apply-patch-parser.d.ts.map +1 -0
- package/dist/tools/apply-patch-parser.js +146 -0
- package/dist/tools/apply-patch-parser.js.map +1 -0
- package/dist/tools/apply-patch.d.ts +42 -0
- package/dist/tools/apply-patch.d.ts.map +1 -0
- package/dist/tools/apply-patch.js +648 -0
- package/dist/tools/apply-patch.js.map +1 -0
- package/dist/tools/ask-user.d.ts +1 -0
- package/dist/tools/ask-user.d.ts.map +1 -1
- package/dist/tools/background/tool-handler.d.ts +1 -0
- package/dist/tools/background/tool-handler.d.ts.map +1 -1
- package/dist/tools/bash.d.ts +1 -0
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/codesearch.d.ts +1 -0
- package/dist/tools/codesearch.d.ts.map +1 -1
- package/dist/tools/conductor-client.d.ts +1 -0
- package/dist/tools/conductor-client.d.ts.map +1 -1
- package/dist/tools/conductor-client.js +63 -0
- package/dist/tools/conductor-client.js.map +1 -1
- package/dist/tools/diff.d.ts +1 -0
- package/dist/tools/diff.d.ts.map +1 -1
- package/dist/tools/edit.d.ts +1 -0
- package/dist/tools/edit.d.ts.map +1 -1
- package/dist/tools/extract-document.d.ts +1 -0
- package/dist/tools/extract-document.d.ts.map +1 -1
- package/dist/tools/find.d.ts +10 -0
- package/dist/tools/find.d.ts.map +1 -1
- package/dist/tools/find.js +236 -27
- package/dist/tools/find.js.map +1 -1
- package/dist/tools/gh.d.ts +3 -0
- package/dist/tools/gh.d.ts.map +1 -1
- package/dist/tools/index.d.ts +50 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/list.d.ts +1 -0
- package/dist/tools/list.d.ts.map +1 -1
- package/dist/tools/notebook.d.ts +1 -0
- package/dist/tools/notebook.d.ts.map +1 -1
- package/dist/tools/oracle.d.ts +1 -0
- package/dist/tools/oracle.d.ts.map +1 -1
- package/dist/tools/oracle.js +17 -32
- package/dist/tools/oracle.js.map +1 -1
- package/dist/tools/parallel-execution.d.ts +13 -2
- package/dist/tools/parallel-execution.d.ts.map +1 -1
- package/dist/tools/parallel-execution.js +178 -7
- package/dist/tools/parallel-execution.js.map +1 -1
- package/dist/tools/parallel-ripgrep.d.ts +1 -0
- package/dist/tools/parallel-ripgrep.d.ts.map +1 -1
- package/dist/tools/pipeline.d.ts +4 -0
- package/dist/tools/pipeline.d.ts.map +1 -1
- package/dist/tools/read.d.ts +1 -0
- package/dist/tools/read.d.ts.map +1 -1
- package/dist/tools/search.d.ts +1 -0
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/status.d.ts +1 -0
- package/dist/tools/status.d.ts.map +1 -1
- package/dist/tools/todo.d.ts +1 -0
- package/dist/tools/todo.d.ts.map +1 -1
- package/dist/tools/tool-dsl.d.ts +5 -1
- package/dist/tools/tool-dsl.d.ts.map +1 -1
- package/dist/tools/tool-dsl.js +1 -0
- package/dist/tools/tool-dsl.js.map +1 -1
- package/dist/tools/tool-result-cache.d.ts.map +1 -1
- package/dist/tools/tool-result-cache.js +1 -0
- package/dist/tools/tool-result-cache.js.map +1 -1
- package/dist/tools/typebox-tool.d.ts.map +1 -1
- package/dist/tools/typebox-tool.js +3 -0
- package/dist/tools/typebox-tool.js.map +1 -1
- package/dist/tools/webfetch.d.ts +1 -0
- package/dist/tools/webfetch.d.ts.map +1 -1
- package/dist/tools/websearch.d.ts +1 -0
- package/dist/tools/websearch.d.ts.map +1 -1
- package/dist/tools/write.d.ts +1 -0
- package/dist/tools/write.d.ts.map +1 -1
- package/dist/utils/abort-error.d.ts +2 -0
- package/dist/utils/abort-error.d.ts.map +1 -0
- package/dist/utils/abort-error.js +7 -0
- package/dist/utils/abort-error.js.map +1 -0
- package/dist/utils/downstream.d.ts.map +1 -1
- package/dist/utils/downstream.js +4 -0
- package/dist/utils/downstream.js.map +1 -1
- package/dist/utils/logger.d.ts +3 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +14 -3
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/path-containment.d.ts +2 -0
- package/dist/utils/path-containment.d.ts.map +1 -0
- package/dist/utils/path-containment.js +14 -0
- package/dist/utils/path-containment.js.map +1 -0
- package/dist/utils/prompt-safe-text.d.ts +7 -0
- package/dist/utils/prompt-safe-text.d.ts.map +1 -0
- package/dist/utils/prompt-safe-text.js +44 -0
- package/dist/utils/prompt-safe-text.js.map +1 -0
- package/dist/version.json +2 -2
- package/dist/web-server.d.ts.map +1 -1
- package/dist/web-server.js +32 -7
- package/dist/web-server.js.map +1 -1
- package/dist/workspace/root-resolver.d.ts +4 -1
- package/dist/workspace/root-resolver.d.ts.map +1 -1
- package/dist/workspace/root-resolver.js +16 -6
- package/dist/workspace/root-resolver.js.map +1 -1
- package/node_modules/@evalops/contracts/dist/advisor-effort.d.ts +8 -0
- package/node_modules/@evalops/contracts/dist/advisor-effort.d.ts.map +1 -0
- package/node_modules/@evalops/contracts/dist/advisor-effort.js +35 -0
- package/node_modules/@evalops/contracts/dist/advisor-effort.js.map +1 -0
- package/node_modules/@evalops/contracts/dist/delegation-prompt.d.ts +10 -0
- package/node_modules/@evalops/contracts/dist/delegation-prompt.d.ts.map +1 -0
- package/node_modules/@evalops/contracts/dist/delegation-prompt.js +48 -0
- package/node_modules/@evalops/contracts/dist/delegation-prompt.js.map +1 -0
- package/node_modules/@evalops/contracts/dist/guarded-files-settings.d.ts +20 -0
- package/node_modules/@evalops/contracts/dist/guarded-files-settings.d.ts.map +1 -0
- package/node_modules/@evalops/contracts/dist/guarded-files-settings.js +147 -0
- package/node_modules/@evalops/contracts/dist/guarded-files-settings.js.map +1 -0
- package/node_modules/@evalops/contracts/dist/headless-protocol-generated.d.ts +2 -0
- package/node_modules/@evalops/contracts/dist/headless-protocol-generated.d.ts.map +1 -1
- package/node_modules/@evalops/contracts/dist/headless-protocol-generated.js +1 -0
- package/node_modules/@evalops/contracts/dist/headless-protocol-generated.js.map +1 -1
- package/node_modules/@evalops/contracts/dist/headless-protocol-schemas.generated.d.ts +280 -5
- 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 +36 -1
- package/node_modules/@evalops/contracts/dist/headless-protocol-schemas.generated.js.map +1 -1
- package/node_modules/@evalops/contracts/dist/index.d.ts +15 -1
- package/node_modules/@evalops/contracts/dist/index.d.ts.map +1 -1
- package/node_modules/@evalops/contracts/dist/index.js +6 -0
- package/node_modules/@evalops/contracts/dist/index.js.map +1 -1
- package/node_modules/@evalops/contracts/dist/maestro-app-server.d.ts +593 -0
- package/node_modules/@evalops/contracts/dist/maestro-app-server.d.ts.map +1 -0
- package/node_modules/@evalops/contracts/dist/maestro-app-server.js +218 -0
- package/node_modules/@evalops/contracts/dist/maestro-app-server.js.map +1 -0
- package/node_modules/@evalops/contracts/dist/proto/maestro/v1/headless_pb.d.ts +91 -0
- 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 +92 -61
- 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 +3 -0
- package/node_modules/@evalops/contracts/dist/runtime-app-server.d.ts.map +1 -1
- package/node_modules/@evalops/contracts/dist/runtime-constraints.d.ts +28 -0
- package/node_modules/@evalops/contracts/dist/runtime-constraints.d.ts.map +1 -0
- package/node_modules/@evalops/contracts/dist/runtime-constraints.js +71 -0
- package/node_modules/@evalops/contracts/dist/runtime-constraints.js.map +1 -0
- package/node_modules/@evalops/contracts/dist/runtime-server-request.d.ts +7 -0
- package/node_modules/@evalops/contracts/dist/runtime-server-request.d.ts.map +1 -1
- package/node_modules/@evalops/contracts/dist/runtime-server-request.js +2 -0
- package/node_modules/@evalops/contracts/dist/runtime-server-request.js.map +1 -1
- package/node_modules/@evalops/contracts/dist/scenario.d.ts +191 -0
- package/node_modules/@evalops/contracts/dist/scenario.d.ts.map +1 -0
- package/node_modules/@evalops/contracts/dist/scenario.js +4 -0
- package/node_modules/@evalops/contracts/dist/scenario.js.map +1 -0
- package/node_modules/@evalops/contracts/dist/schemas.d.ts +17 -3
- package/node_modules/@evalops/contracts/dist/schemas.d.ts.map +1 -1
- package/node_modules/@evalops/contracts/dist/schemas.js +16 -0
- package/node_modules/@evalops/contracts/dist/schemas.js.map +1 -1
- package/node_modules/@evalops/contracts/package.json +1 -1
- package/node_modules/@evalops/tui/package.json +1 -1
- package/package.json +41 -7
- package/skills/incident-triage/SKILL.md +40 -0
- package/skills/incident-triage/mcp.json +14 -0
- package/skills/incident-triage/reference/triage.md +20 -0
- package/skills/incident-triage/toolbox/incident-timeline +22 -0
- package/skills/incident-triage/toolbox/incident-timeline.cmd +16 -0
- package/skills/pr-review/SKILL.md +40 -0
- package/skills/pr-review/mcp.json +14 -0
- package/skills/pr-review/reference/rubric.md +20 -0
- package/skills/pr-review/toolbox/review-summary +20 -0
- package/skills/pr-review/toolbox/review-summary.cmd +14 -0
- package/skills/release-verification/SKILL.md +40 -0
- package/skills/release-verification/mcp.json +15 -0
- package/skills/release-verification/reference/checklist.md +21 -0
- package/skills/release-verification/toolbox/release-readiness +18 -0
- package/skills/release-verification/toolbox/release-readiness.cmd +12 -0
|
@@ -0,0 +1,803 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
import { EVALOPS_ACCESS_TOKEN_ENV_VARS, EVALOPS_ORGANIZATION_ID_ENV_VARS, EVALOPS_WORKSPACE_ID_ENV_VARS, } from "../evalops/env-aliases.js";
|
|
3
|
+
import { postPlatformConnect, resolvePlatformServiceConfig, trimString, } from "./client.js";
|
|
4
|
+
import { PLATFORM_CONNECT_METHODS, PLATFORM_CONNECT_SERVICES, platformConnectMethodPath, platformConnectServicePath, } from "./core-services.js";
|
|
5
|
+
const DEFAULT_TIMEOUT_MS = 2_500;
|
|
6
|
+
const DEFAULT_MAX_ATTEMPTS = 2;
|
|
7
|
+
const HEARTBEAT_PATH = platformConnectMethodPath(PLATFORM_CONNECT_METHODS.agents.heartbeat);
|
|
8
|
+
const REGISTER_PATH = platformConnectMethodPath(PLATFORM_CONNECT_METHODS.agents.register);
|
|
9
|
+
const DELEGATE_PATH = platformConnectMethodPath(PLATFORM_CONNECT_METHODS.agents.delegate);
|
|
10
|
+
const LIST_AGENTS_PATH = platformConnectMethodPath(PLATFORM_CONNECT_METHODS.agents.list);
|
|
11
|
+
const RESOLVE_DELEGATION_PATH = platformConnectMethodPath(PLATFORM_CONNECT_METHODS.agents.resolveDelegation);
|
|
12
|
+
const UPDATE_PATH = platformConnectMethodPath(PLATFORM_CONNECT_METHODS.agents.update);
|
|
13
|
+
const CONTROL_A2A_DELEGATION_TASK_PATH = platformConnectMethodPath(PLATFORM_CONNECT_METHODS.agents.controlA2ADelegationTask);
|
|
14
|
+
const GET_A2A_DELEGATION_GRAPH_PATH = platformConnectMethodPath(PLATFORM_CONNECT_METHODS.agents.getA2ADelegationGraph);
|
|
15
|
+
const AGENT_REGISTRY_BASE_URL_ENV_VARS = [
|
|
16
|
+
"MAESTRO_AGENT_REGISTRY_SERVICE_URL",
|
|
17
|
+
"AGENT_REGISTRY_SERVICE_URL",
|
|
18
|
+
"MAESTRO_AGENT_REGISTRY_URL",
|
|
19
|
+
"AGENT_REGISTRY_BASE_URL",
|
|
20
|
+
"PLATFORM_AGENT_REGISTRY_URL",
|
|
21
|
+
];
|
|
22
|
+
const AGENT_REGISTRY_TOKEN_ENV_VARS = [
|
|
23
|
+
"MAESTRO_AGENT_REGISTRY_SERVICE_TOKEN",
|
|
24
|
+
"AGENT_REGISTRY_SERVICE_TOKEN",
|
|
25
|
+
"MAESTRO_AGENT_REGISTRY_TOKEN",
|
|
26
|
+
"AGENT_REGISTRY_TOKEN",
|
|
27
|
+
...EVALOPS_ACCESS_TOKEN_ENV_VARS,
|
|
28
|
+
];
|
|
29
|
+
const AGENT_REGISTRY_ORGANIZATION_ENV_VARS = [
|
|
30
|
+
"MAESTRO_AGENT_REGISTRY_ORG_ID",
|
|
31
|
+
"AGENT_REGISTRY_ORGANIZATION_ID",
|
|
32
|
+
"AGENT_REGISTRY_ORG_ID",
|
|
33
|
+
...EVALOPS_ORGANIZATION_ID_ENV_VARS,
|
|
34
|
+
];
|
|
35
|
+
const AGENT_REGISTRY_WORKSPACE_ENV_VARS = [
|
|
36
|
+
"MAESTRO_AGENT_REGISTRY_WORKSPACE_ID",
|
|
37
|
+
"AGENT_REGISTRY_WORKSPACE_ID",
|
|
38
|
+
"MAESTRO_REMOTE_RUNNER_WORKSPACE_ID",
|
|
39
|
+
...EVALOPS_WORKSPACE_ID_ENV_VARS,
|
|
40
|
+
];
|
|
41
|
+
const AGENT_REGISTRY_TIMEOUT_ENV_VARS = [
|
|
42
|
+
"MAESTRO_AGENT_REGISTRY_TIMEOUT_MS",
|
|
43
|
+
"AGENT_REGISTRY_SERVICE_TIMEOUT_MS",
|
|
44
|
+
];
|
|
45
|
+
const AGENT_REGISTRY_MAX_ATTEMPTS_ENV_VARS = [
|
|
46
|
+
"MAESTRO_AGENT_REGISTRY_MAX_ATTEMPTS",
|
|
47
|
+
"AGENT_REGISTRY_SERVICE_MAX_ATTEMPTS",
|
|
48
|
+
];
|
|
49
|
+
const AGENT_REGISTRY_BASE_URL_SUFFIXES = [
|
|
50
|
+
HEARTBEAT_PATH,
|
|
51
|
+
REGISTER_PATH,
|
|
52
|
+
DELEGATE_PATH,
|
|
53
|
+
LIST_AGENTS_PATH,
|
|
54
|
+
RESOLVE_DELEGATION_PATH,
|
|
55
|
+
UPDATE_PATH,
|
|
56
|
+
CONTROL_A2A_DELEGATION_TASK_PATH,
|
|
57
|
+
GET_A2A_DELEGATION_GRAPH_PATH,
|
|
58
|
+
platformConnectServicePath(PLATFORM_CONNECT_SERVICES.agents),
|
|
59
|
+
];
|
|
60
|
+
export var PlatformAgentStatusValue;
|
|
61
|
+
(function (PlatformAgentStatusValue) {
|
|
62
|
+
PlatformAgentStatusValue["Active"] = "AGENT_STATUS_ACTIVE";
|
|
63
|
+
PlatformAgentStatusValue["Idle"] = "AGENT_STATUS_IDLE";
|
|
64
|
+
PlatformAgentStatusValue["Busy"] = "AGENT_STATUS_BUSY";
|
|
65
|
+
PlatformAgentStatusValue["Offline"] = "AGENT_STATUS_OFFLINE";
|
|
66
|
+
PlatformAgentStatusValue["Degraded"] = "AGENT_STATUS_DEGRADED";
|
|
67
|
+
PlatformAgentStatusValue["Suspended"] = "AGENT_STATUS_SUSPENDED";
|
|
68
|
+
})(PlatformAgentStatusValue || (PlatformAgentStatusValue = {}));
|
|
69
|
+
export var PlatformDelegationStatusValue;
|
|
70
|
+
(function (PlatformDelegationStatusValue) {
|
|
71
|
+
PlatformDelegationStatusValue["Pending"] = "DELEGATION_STATUS_PENDING";
|
|
72
|
+
PlatformDelegationStatusValue["Accepted"] = "DELEGATION_STATUS_ACCEPTED";
|
|
73
|
+
PlatformDelegationStatusValue["Rejected"] = "DELEGATION_STATUS_REJECTED";
|
|
74
|
+
PlatformDelegationStatusValue["Completed"] = "DELEGATION_STATUS_COMPLETED";
|
|
75
|
+
PlatformDelegationStatusValue["Failed"] = "DELEGATION_STATUS_FAILED";
|
|
76
|
+
PlatformDelegationStatusValue["TimedOut"] = "DELEGATION_STATUS_TIMED_OUT";
|
|
77
|
+
})(PlatformDelegationStatusValue || (PlatformDelegationStatusValue = {}));
|
|
78
|
+
export var PlatformA2ADelegationTaskControlModeValue;
|
|
79
|
+
(function (PlatformA2ADelegationTaskControlModeValue) {
|
|
80
|
+
PlatformA2ADelegationTaskControlModeValue["Steer"] = "A2A_DELEGATION_TASK_CONTROL_MODE_STEER";
|
|
81
|
+
PlatformA2ADelegationTaskControlModeValue["Followup"] = "A2A_DELEGATION_TASK_CONTROL_MODE_FOLLOWUP";
|
|
82
|
+
PlatformA2ADelegationTaskControlModeValue["Collect"] = "A2A_DELEGATION_TASK_CONTROL_MODE_COLLECT";
|
|
83
|
+
PlatformA2ADelegationTaskControlModeValue["Interrupt"] = "A2A_DELEGATION_TASK_CONTROL_MODE_INTERRUPT";
|
|
84
|
+
PlatformA2ADelegationTaskControlModeValue["Cancel"] = "A2A_DELEGATION_TASK_CONTROL_MODE_CANCEL";
|
|
85
|
+
})(PlatformA2ADelegationTaskControlModeValue || (PlatformA2ADelegationTaskControlModeValue = {}));
|
|
86
|
+
function firstString(record, ...keys) {
|
|
87
|
+
if (!record) {
|
|
88
|
+
return undefined;
|
|
89
|
+
}
|
|
90
|
+
for (const key of keys) {
|
|
91
|
+
const value = record[key];
|
|
92
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
93
|
+
return value.trim();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
function firstNumber(record, ...keys) {
|
|
99
|
+
if (!record) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
for (const key of keys) {
|
|
103
|
+
const value = record[key];
|
|
104
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
105
|
+
return value;
|
|
106
|
+
}
|
|
107
|
+
if (typeof value === "string" && value.trim()) {
|
|
108
|
+
const parsed = Number(value);
|
|
109
|
+
if (Number.isFinite(parsed)) {
|
|
110
|
+
return parsed;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return undefined;
|
|
115
|
+
}
|
|
116
|
+
function firstBoolean(record, ...keys) {
|
|
117
|
+
if (!record) {
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
for (const key of keys) {
|
|
121
|
+
const value = record[key];
|
|
122
|
+
if (typeof value === "boolean") {
|
|
123
|
+
return value;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
function stringList(record, ...keys) {
|
|
129
|
+
if (!record) {
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
for (const key of keys) {
|
|
133
|
+
const value = record[key];
|
|
134
|
+
if (!Array.isArray(value)) {
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
const strings = value
|
|
138
|
+
.filter((item) => typeof item === "string")
|
|
139
|
+
.map((item) => item.trim())
|
|
140
|
+
.filter(Boolean);
|
|
141
|
+
if (strings.length > 0) {
|
|
142
|
+
return strings;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
function stringRecord(record, ...keys) {
|
|
148
|
+
const object = record ? objectValue(record, ...keys) : undefined;
|
|
149
|
+
if (!object) {
|
|
150
|
+
return undefined;
|
|
151
|
+
}
|
|
152
|
+
const entries = Object.entries(object)
|
|
153
|
+
.map(([key, value]) => [
|
|
154
|
+
key,
|
|
155
|
+
typeof value === "string" ? value.trim() : undefined,
|
|
156
|
+
])
|
|
157
|
+
.filter((entry) => Boolean(entry[1]));
|
|
158
|
+
return entries.length > 0 ? Object.fromEntries(entries) : undefined;
|
|
159
|
+
}
|
|
160
|
+
function primitiveRecord(record, ...keys) {
|
|
161
|
+
const object = record ? objectValue(record, ...keys) : undefined;
|
|
162
|
+
if (!object) {
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
165
|
+
const output = {};
|
|
166
|
+
for (const [key, value] of Object.entries(object)) {
|
|
167
|
+
const normalizedKey = key.trim();
|
|
168
|
+
if (!normalizedKey) {
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
if (typeof value === "string" ||
|
|
172
|
+
typeof value === "number" ||
|
|
173
|
+
typeof value === "boolean") {
|
|
174
|
+
output[normalizedKey] = typeof value === "string" ? value.trim() : value;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return Object.keys(output).length > 0 ? output : undefined;
|
|
178
|
+
}
|
|
179
|
+
function objectValue(record, ...keys) {
|
|
180
|
+
for (const key of keys) {
|
|
181
|
+
const value = record[key];
|
|
182
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
183
|
+
return value;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return undefined;
|
|
187
|
+
}
|
|
188
|
+
function objectList(record, ...keys) {
|
|
189
|
+
if (!record) {
|
|
190
|
+
return undefined;
|
|
191
|
+
}
|
|
192
|
+
for (const key of keys) {
|
|
193
|
+
const value = record[key];
|
|
194
|
+
if (!Array.isArray(value)) {
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
const objects = value.filter((item) => Boolean(item) && typeof item === "object" && !Array.isArray(item));
|
|
198
|
+
if (objects.length > 0) {
|
|
199
|
+
return objects;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return undefined;
|
|
203
|
+
}
|
|
204
|
+
function stripUndefinedValues(record) {
|
|
205
|
+
return Object.fromEntries(Object.entries(record).filter(([, value]) => value !== undefined));
|
|
206
|
+
}
|
|
207
|
+
function normalizeA2ASkill(record) {
|
|
208
|
+
const id = firstString(record, "id");
|
|
209
|
+
if (!id) {
|
|
210
|
+
return undefined;
|
|
211
|
+
}
|
|
212
|
+
return stripUndefinedValues({
|
|
213
|
+
id,
|
|
214
|
+
name: firstString(record, "name"),
|
|
215
|
+
description: firstString(record, "description"),
|
|
216
|
+
tags: stringList(record, "tags"),
|
|
217
|
+
inputModes: stringList(record, "inputModes", "input_modes"),
|
|
218
|
+
outputModes: stringList(record, "outputModes", "output_modes"),
|
|
219
|
+
requiredContextGrants: stringList(record, "requiredContextGrants", "required_context_grants"),
|
|
220
|
+
approvalPolicyRef: firstString(record, "approvalPolicyRef", "approval_policy_ref"),
|
|
221
|
+
maxAutonomy: firstString(record, "maxAutonomy", "max_autonomy"),
|
|
222
|
+
requiredArtifactKinds: stringList(record, "requiredArtifactKinds", "required_artifact_kinds"),
|
|
223
|
+
optionalArtifactKinds: stringList(record, "optionalArtifactKinds", "optional_artifact_kinds"),
|
|
224
|
+
allowedTaskClasses: stringList(record, "allowedTaskClasses", "allowed_task_classes"),
|
|
225
|
+
deniedTaskClasses: stringList(record, "deniedTaskClasses", "denied_task_classes"),
|
|
226
|
+
attributes: stringRecord(record, "attributes"),
|
|
227
|
+
metadata: primitiveRecord(record, "metadata"),
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
function normalizeA2APeerProjection(record) {
|
|
231
|
+
if (!record) {
|
|
232
|
+
return undefined;
|
|
233
|
+
}
|
|
234
|
+
const skills = Array.isArray(record.skills)
|
|
235
|
+
? record.skills
|
|
236
|
+
.filter((skill) => Boolean(skill) &&
|
|
237
|
+
typeof skill === "object" &&
|
|
238
|
+
!Array.isArray(skill))
|
|
239
|
+
.map((skill) => normalizeA2ASkill(skill))
|
|
240
|
+
.filter((skill) => skill !== undefined)
|
|
241
|
+
: undefined;
|
|
242
|
+
return stripUndefinedValues({
|
|
243
|
+
publicEndpointUrl: firstString(record, "publicEndpointUrl", "public_endpoint_url"),
|
|
244
|
+
internalEndpointUrl: firstString(record, "internalEndpointUrl", "internal_endpoint_url"),
|
|
245
|
+
agentCardUrl: firstString(record, "agentCardUrl", "agent_card_url"),
|
|
246
|
+
protocolBinding: firstString(record, "protocolBinding", "protocol_binding"),
|
|
247
|
+
protocolVersion: firstString(record, "protocolVersion", "protocol_version"),
|
|
248
|
+
supportedExtensions: stringList(record, "supportedExtensions", "supported_extensions"),
|
|
249
|
+
skills: skills && skills.length > 0 ? skills : undefined,
|
|
250
|
+
securitySchemes: stringList(record, "securitySchemes", "security_schemes"),
|
|
251
|
+
agentCardObservedAt: firstString(record, "agentCardObservedAt", "agent_card_observed_at"),
|
|
252
|
+
agentCardETag: firstString(record, "agentCardETag", "agentCardEtag", "agent_card_etag"),
|
|
253
|
+
agentCardHash: firstString(record, "agentCardHash", "agent_card_hash"),
|
|
254
|
+
pushNotifications: firstBoolean(record, "pushNotifications", "push_notifications"),
|
|
255
|
+
attributes: stringRecord(record, "attributes"),
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
function normalizeAgentCapacity(record) {
|
|
259
|
+
if (!record) {
|
|
260
|
+
return undefined;
|
|
261
|
+
}
|
|
262
|
+
const capacity = stripUndefinedValues({
|
|
263
|
+
current: firstNumber(record, "current"),
|
|
264
|
+
max: firstNumber(record, "max"),
|
|
265
|
+
remaining: firstNumber(record, "remaining"),
|
|
266
|
+
reservedDelegationCount: firstNumber(record, "reservedDelegationCount", "reserved_delegation_count"),
|
|
267
|
+
});
|
|
268
|
+
return Object.keys(capacity).length > 0
|
|
269
|
+
? capacity
|
|
270
|
+
: undefined;
|
|
271
|
+
}
|
|
272
|
+
function normalizeAgent(record) {
|
|
273
|
+
if (!record) {
|
|
274
|
+
return undefined;
|
|
275
|
+
}
|
|
276
|
+
const a2a = normalizeA2APeerProjection(objectValue(record, "a2a"));
|
|
277
|
+
return stripUndefinedValues({
|
|
278
|
+
id: firstString(record, "id"),
|
|
279
|
+
workspaceId: firstString(record, "workspaceId", "workspace_id"),
|
|
280
|
+
name: firstString(record, "name"),
|
|
281
|
+
description: firstString(record, "description"),
|
|
282
|
+
agentType: firstString(record, "agentType", "agent_type"),
|
|
283
|
+
capabilities: stringList(record, "capabilities"),
|
|
284
|
+
surfaces: stringList(record, "surfaces"),
|
|
285
|
+
surfaceTypes: stringList(record, "surfaceTypes", "surface_types"),
|
|
286
|
+
status: firstString(record, "status"),
|
|
287
|
+
activeConfigVersion: firstNumber(record, "activeConfigVersion", "active_config_version"),
|
|
288
|
+
ownerId: firstString(record, "ownerId", "owner_id"),
|
|
289
|
+
lastHeartbeatAt: firstString(record, "lastHeartbeatAt", "last_heartbeat_at"),
|
|
290
|
+
createdAt: firstString(record, "createdAt", "created_at"),
|
|
291
|
+
updatedAt: firstString(record, "updatedAt", "updated_at"),
|
|
292
|
+
a2a,
|
|
293
|
+
capacity: normalizeAgentCapacity(objectValue(record, "capacity")),
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
function encodeA2ASkill(skill) {
|
|
297
|
+
return stripUndefinedValues({
|
|
298
|
+
id: skill.id,
|
|
299
|
+
name: skill.name,
|
|
300
|
+
description: skill.description,
|
|
301
|
+
tags: skill.tags,
|
|
302
|
+
inputModes: skill.inputModes,
|
|
303
|
+
outputModes: skill.outputModes,
|
|
304
|
+
requiredContextGrants: skill.requiredContextGrants,
|
|
305
|
+
approvalPolicyRef: skill.approvalPolicyRef,
|
|
306
|
+
maxAutonomy: skill.maxAutonomy,
|
|
307
|
+
requiredArtifactKinds: skill.requiredArtifactKinds,
|
|
308
|
+
optionalArtifactKinds: skill.optionalArtifactKinds,
|
|
309
|
+
allowedTaskClasses: skill.allowedTaskClasses,
|
|
310
|
+
deniedTaskClasses: skill.deniedTaskClasses,
|
|
311
|
+
attributes: skill.attributes,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
function encodeA2APeerProjection(a2a) {
|
|
315
|
+
if (!a2a) {
|
|
316
|
+
return undefined;
|
|
317
|
+
}
|
|
318
|
+
return stripUndefinedValues({
|
|
319
|
+
publicEndpointUrl: a2a.publicEndpointUrl,
|
|
320
|
+
internalEndpointUrl: a2a.internalEndpointUrl,
|
|
321
|
+
agentCardUrl: a2a.agentCardUrl,
|
|
322
|
+
protocolBinding: a2a.protocolBinding,
|
|
323
|
+
protocolVersion: a2a.protocolVersion,
|
|
324
|
+
supportedExtensions: a2a.supportedExtensions,
|
|
325
|
+
skills: a2a.skills?.map(encodeA2ASkill),
|
|
326
|
+
securitySchemes: a2a.securitySchemes,
|
|
327
|
+
agentCardObservedAt: a2a.agentCardObservedAt,
|
|
328
|
+
agentCardEtag: a2a.agentCardETag,
|
|
329
|
+
agentCardHash: a2a.agentCardHash,
|
|
330
|
+
pushNotifications: a2a.pushNotifications,
|
|
331
|
+
attributes: a2a.attributes,
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
function encodeJsonBytes(value) {
|
|
335
|
+
if (value === undefined) {
|
|
336
|
+
return undefined;
|
|
337
|
+
}
|
|
338
|
+
return Buffer.from(JSON.stringify(value), "utf8").toString("base64");
|
|
339
|
+
}
|
|
340
|
+
function normalizeDelegation(record) {
|
|
341
|
+
if (!record) {
|
|
342
|
+
return undefined;
|
|
343
|
+
}
|
|
344
|
+
const id = firstString(record, "id");
|
|
345
|
+
const status = firstString(record, "status");
|
|
346
|
+
return stripUndefinedValues({
|
|
347
|
+
id,
|
|
348
|
+
workspaceId: firstString(record, "workspaceId", "workspace_id"),
|
|
349
|
+
fromAgentId: firstString(record, "fromAgentId", "from_agent_id"),
|
|
350
|
+
toAgentId: firstString(record, "toAgentId", "to_agent_id"),
|
|
351
|
+
requiredCapability: firstString(record, "requiredCapability", "required_capability"),
|
|
352
|
+
objectiveId: firstString(record, "objectiveId", "objective_id"),
|
|
353
|
+
workflowRunId: firstString(record, "workflowRunId", "workflow_run_id"),
|
|
354
|
+
workflowStepId: firstString(record, "workflowStepId", "workflow_step_id"),
|
|
355
|
+
status,
|
|
356
|
+
reason: firstString(record, "reason"),
|
|
357
|
+
errorMessage: firstString(record, "errorMessage", "error_message"),
|
|
358
|
+
createdAt: firstString(record, "createdAt", "created_at"),
|
|
359
|
+
resolvedAt: firstString(record, "resolvedAt", "resolved_at"),
|
|
360
|
+
a2aTaskId: firstString(record, "a2aTaskId", "a2a_task_id"),
|
|
361
|
+
a2aMessageId: firstString(record, "a2aMessageId", "a2a_message_id"),
|
|
362
|
+
a2aEndpointUrl: firstString(record, "a2aEndpointUrl", "a2a_endpoint_url"),
|
|
363
|
+
a2aDispatchStatus: firstString(record, "a2aDispatchStatus", "a2a_dispatch_status"),
|
|
364
|
+
a2aDispatchError: firstString(record, "a2aDispatchError", "a2a_dispatch_error"),
|
|
365
|
+
a2aSkillId: firstString(record, "a2aSkillId", "a2a_skill_id"),
|
|
366
|
+
a2aDispatchedAt: firstString(record, "a2aDispatchedAt", "a2a_dispatched_at"),
|
|
367
|
+
a2aLeaseRenewedAt: firstString(record, "a2aLeaseRenewedAt", "a2a_lease_renewed_at"),
|
|
368
|
+
a2aResumeWaitContracts: objectList(record, "a2aResumeWaitContracts", "a2a_resume_wait_contracts"),
|
|
369
|
+
a2aRootDelegationId: firstString(record, "a2aRootDelegationId", "a2a_root_delegation_id"),
|
|
370
|
+
a2aParentDelegationId: firstString(record, "a2aParentDelegationId", "a2a_parent_delegation_id"),
|
|
371
|
+
a2aDelegationChain: stringList(record, "a2aDelegationChain", "a2a_delegation_chain"),
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
function normalizeDiscoveryExclusion(record) {
|
|
375
|
+
if (!record) {
|
|
376
|
+
return undefined;
|
|
377
|
+
}
|
|
378
|
+
const exclusion = stripUndefinedValues({
|
|
379
|
+
reason: firstString(record, "reason"),
|
|
380
|
+
count: firstNumber(record, "count"),
|
|
381
|
+
sampleAgentIds: stringList(record, "sampleAgentIds", "sample_agent_ids"),
|
|
382
|
+
policyReasons: stringList(record, "policyReasons", "policy_reasons"),
|
|
383
|
+
policyScopes: stringList(record, "policyScopes", "policy_scopes"),
|
|
384
|
+
allowedTaskClasses: stringList(record, "allowedTaskClasses", "allowed_task_classes"),
|
|
385
|
+
deniedTaskClasses: stringList(record, "deniedTaskClasses", "denied_task_classes"),
|
|
386
|
+
});
|
|
387
|
+
return Object.keys(exclusion).length > 0
|
|
388
|
+
? exclusion
|
|
389
|
+
: undefined;
|
|
390
|
+
}
|
|
391
|
+
function normalizeDiscoveryEvidence(record) {
|
|
392
|
+
if (!record) {
|
|
393
|
+
return undefined;
|
|
394
|
+
}
|
|
395
|
+
return stripUndefinedValues({
|
|
396
|
+
schema: firstString(record, "schema"),
|
|
397
|
+
decision: firstString(record, "decision"),
|
|
398
|
+
reason: firstString(record, "reason"),
|
|
399
|
+
workspaceId: firstString(record, "workspaceId", "workspace_id"),
|
|
400
|
+
capability: firstString(record, "capability"),
|
|
401
|
+
capabilities: stringList(record, "capabilities"),
|
|
402
|
+
agentType: firstString(record, "agentType", "agent_type"),
|
|
403
|
+
a2aSkillId: firstString(record, "a2aSkillId", "a2a_skill_id"),
|
|
404
|
+
taskClass: firstString(record, "taskClass", "task_class"),
|
|
405
|
+
requireA2ADispatch: firstBoolean(record, "requireA2aDispatch", "requireA2ADispatch", "require_a2a_dispatch"),
|
|
406
|
+
surface: firstString(record, "surface"),
|
|
407
|
+
status: firstString(record, "status"),
|
|
408
|
+
candidateCount: firstNumber(record, "candidateCount", "candidate_count"),
|
|
409
|
+
matchedCount: firstNumber(record, "matchedCount", "matched_count"),
|
|
410
|
+
exclusions: objectList(record, "exclusions")
|
|
411
|
+
?.map((exclusion) => normalizeDiscoveryExclusion(exclusion))
|
|
412
|
+
.filter((exclusion) => exclusion !== undefined),
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
function normalizeA2ADelegationGraphNode(record) {
|
|
416
|
+
if (!record) {
|
|
417
|
+
return undefined;
|
|
418
|
+
}
|
|
419
|
+
const node = stripUndefinedValues({
|
|
420
|
+
delegation: normalizeDelegation(objectValue(record, "delegation")),
|
|
421
|
+
depth: firstNumber(record, "depth"),
|
|
422
|
+
childCount: firstNumber(record, "childCount", "child_count"),
|
|
423
|
+
terminal: firstBoolean(record, "terminal"),
|
|
424
|
+
});
|
|
425
|
+
return Object.keys(node).length > 0
|
|
426
|
+
? node
|
|
427
|
+
: undefined;
|
|
428
|
+
}
|
|
429
|
+
function normalizeA2ADelegationGraphEdge(record) {
|
|
430
|
+
if (!record) {
|
|
431
|
+
return undefined;
|
|
432
|
+
}
|
|
433
|
+
const edge = stripUndefinedValues({
|
|
434
|
+
parentDelegationId: firstString(record, "parentDelegationId", "parent_delegation_id"),
|
|
435
|
+
childDelegationId: firstString(record, "childDelegationId", "child_delegation_id"),
|
|
436
|
+
});
|
|
437
|
+
return Object.keys(edge).length > 0
|
|
438
|
+
? edge
|
|
439
|
+
: undefined;
|
|
440
|
+
}
|
|
441
|
+
function normalizeA2ADelegationTaskControlResult(record) {
|
|
442
|
+
if (!record) {
|
|
443
|
+
return undefined;
|
|
444
|
+
}
|
|
445
|
+
return stripUndefinedValues({
|
|
446
|
+
taskId: firstString(record, "taskId", "task_id"),
|
|
447
|
+
state: firstString(record, "state"),
|
|
448
|
+
controlId: firstString(record, "controlId", "control_id"),
|
|
449
|
+
controlMode: firstString(record, "controlMode", "control_mode"),
|
|
450
|
+
cancelled: firstBoolean(record, "cancelled"),
|
|
451
|
+
queuedForWorker: firstBoolean(record, "queuedForWorker", "queued_for_worker"),
|
|
452
|
+
parentTaskId: firstString(record, "parentTaskId", "parent_task_id"),
|
|
453
|
+
targetRunId: firstString(record, "targetRunId", "target_run_id"),
|
|
454
|
+
appliedRunId: firstString(record, "appliedRunId", "applied_run_id"),
|
|
455
|
+
targetExternal: firstBoolean(record, "targetExternal", "target_external"),
|
|
456
|
+
subagentLaneId: firstString(record, "subagentLaneId", "subagent_lane_id"),
|
|
457
|
+
workItemId: firstString(record, "workItemId", "work_item_id"),
|
|
458
|
+
observedAt: firstString(record, "observedAt", "observed_at"),
|
|
459
|
+
rawPayloadWithheld: firstBoolean(record, "rawPayloadWithheld", "raw_payload_withheld"),
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
async function parseJsonResponse(response, serviceName) {
|
|
463
|
+
const text = await response.text();
|
|
464
|
+
if (!response.ok) {
|
|
465
|
+
throw new Error(`${serviceName} returned ${response.status}: ${text || response.statusText}`);
|
|
466
|
+
}
|
|
467
|
+
if (!text.trim()) {
|
|
468
|
+
return {};
|
|
469
|
+
}
|
|
470
|
+
return JSON.parse(text);
|
|
471
|
+
}
|
|
472
|
+
async function postAgentRegistryOperation(path, body, options) {
|
|
473
|
+
const config = options?.config ?? (await resolveAgentRegistryServiceConfig());
|
|
474
|
+
if (!config) {
|
|
475
|
+
return null;
|
|
476
|
+
}
|
|
477
|
+
const response = await postPlatformConnect(config, path, body, {
|
|
478
|
+
serviceName: "agent registry service",
|
|
479
|
+
failureMode: "optional",
|
|
480
|
+
timeoutMs: config.timeoutMs,
|
|
481
|
+
maxAttempts: config.maxAttempts,
|
|
482
|
+
signal: options?.signal,
|
|
483
|
+
}, {
|
|
484
|
+
"X-Workspace-ID": config.workspaceId,
|
|
485
|
+
});
|
|
486
|
+
return parseJsonResponse(response, "agent registry service");
|
|
487
|
+
}
|
|
488
|
+
export async function resolveAgentRegistryServiceConfig() {
|
|
489
|
+
const config = await resolvePlatformServiceConfig({
|
|
490
|
+
baseUrlEnvVars: AGENT_REGISTRY_BASE_URL_ENV_VARS,
|
|
491
|
+
tokenEnvVars: AGENT_REGISTRY_TOKEN_ENV_VARS,
|
|
492
|
+
organizationEnvVars: AGENT_REGISTRY_ORGANIZATION_ENV_VARS,
|
|
493
|
+
workspaceEnvVars: AGENT_REGISTRY_WORKSPACE_ENV_VARS,
|
|
494
|
+
timeoutEnvVars: AGENT_REGISTRY_TIMEOUT_ENV_VARS,
|
|
495
|
+
maxAttemptsEnvVars: AGENT_REGISTRY_MAX_ATTEMPTS_ENV_VARS,
|
|
496
|
+
baseUrlSuffixes: AGENT_REGISTRY_BASE_URL_SUFFIXES,
|
|
497
|
+
defaultTimeoutMs: DEFAULT_TIMEOUT_MS,
|
|
498
|
+
defaultMaxAttempts: DEFAULT_MAX_ATTEMPTS,
|
|
499
|
+
requireOrganizationId: true,
|
|
500
|
+
requireToken: true,
|
|
501
|
+
});
|
|
502
|
+
if (!config?.baseUrl || !config.workspaceId) {
|
|
503
|
+
return null;
|
|
504
|
+
}
|
|
505
|
+
return {
|
|
506
|
+
...config,
|
|
507
|
+
baseUrl: trimString(config.baseUrl) ?? config.baseUrl,
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
export function isAgentAlreadyExistsError(error) {
|
|
511
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
512
|
+
return /\b409\b|already exists|already_exists/i.test(message);
|
|
513
|
+
}
|
|
514
|
+
async function resolveAgentRegistryListServiceConfig(workspaceId) {
|
|
515
|
+
const config = await resolvePlatformServiceConfig({
|
|
516
|
+
baseUrlEnvVars: AGENT_REGISTRY_BASE_URL_ENV_VARS,
|
|
517
|
+
tokenEnvVars: AGENT_REGISTRY_TOKEN_ENV_VARS,
|
|
518
|
+
organizationEnvVars: AGENT_REGISTRY_ORGANIZATION_ENV_VARS,
|
|
519
|
+
workspaceEnvVars: AGENT_REGISTRY_WORKSPACE_ENV_VARS,
|
|
520
|
+
timeoutEnvVars: AGENT_REGISTRY_TIMEOUT_ENV_VARS,
|
|
521
|
+
maxAttemptsEnvVars: AGENT_REGISTRY_MAX_ATTEMPTS_ENV_VARS,
|
|
522
|
+
baseUrlSuffixes: AGENT_REGISTRY_BASE_URL_SUFFIXES,
|
|
523
|
+
defaultTimeoutMs: DEFAULT_TIMEOUT_MS,
|
|
524
|
+
defaultMaxAttempts: DEFAULT_MAX_ATTEMPTS,
|
|
525
|
+
requireOrganizationId: true,
|
|
526
|
+
requireToken: true,
|
|
527
|
+
});
|
|
528
|
+
const resolvedWorkspaceId = trimString(workspaceId) ?? config?.workspaceId;
|
|
529
|
+
if (!config?.baseUrl || !resolvedWorkspaceId) {
|
|
530
|
+
return null;
|
|
531
|
+
}
|
|
532
|
+
return {
|
|
533
|
+
...config,
|
|
534
|
+
baseUrl: trimString(config.baseUrl) ?? config.baseUrl,
|
|
535
|
+
workspaceId: resolvedWorkspaceId,
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
export async function registerAgentWithPlatform(input, options) {
|
|
539
|
+
const explicitWorkspaceId = trimString(input.workspaceId);
|
|
540
|
+
const resolvedConfig = options?.config
|
|
541
|
+
? explicitWorkspaceId && explicitWorkspaceId !== options.config.workspaceId
|
|
542
|
+
? { ...options.config, workspaceId: explicitWorkspaceId }
|
|
543
|
+
: options.config
|
|
544
|
+
: await resolveAgentRegistryListServiceConfig(explicitWorkspaceId);
|
|
545
|
+
if (!resolvedConfig) {
|
|
546
|
+
return null;
|
|
547
|
+
}
|
|
548
|
+
const payload = await postAgentRegistryOperation(REGISTER_PATH, stripUndefinedValues({
|
|
549
|
+
workspaceId: explicitWorkspaceId ?? resolvedConfig.workspaceId,
|
|
550
|
+
id: input.id,
|
|
551
|
+
name: input.name,
|
|
552
|
+
description: input.description,
|
|
553
|
+
agentType: input.agentType,
|
|
554
|
+
capabilities: input.capabilities,
|
|
555
|
+
surfaces: input.surfaces,
|
|
556
|
+
surfaceTypes: input.surfaceTypes,
|
|
557
|
+
ownerId: input.ownerId,
|
|
558
|
+
a2a: encodeA2APeerProjection(input.a2a),
|
|
559
|
+
}), { ...options, config: resolvedConfig });
|
|
560
|
+
if (!payload) {
|
|
561
|
+
return null;
|
|
562
|
+
}
|
|
563
|
+
return {
|
|
564
|
+
agent: normalizeAgent(objectValue(payload, "agent")),
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
export async function updateAgentWithPlatform(input, options) {
|
|
568
|
+
const explicitWorkspaceId = trimString(input.workspaceId);
|
|
569
|
+
const resolvedConfig = options?.config
|
|
570
|
+
? explicitWorkspaceId && explicitWorkspaceId !== options.config.workspaceId
|
|
571
|
+
? { ...options.config, workspaceId: explicitWorkspaceId }
|
|
572
|
+
: options.config
|
|
573
|
+
: explicitWorkspaceId
|
|
574
|
+
? await resolveAgentRegistryListServiceConfig(explicitWorkspaceId)
|
|
575
|
+
: undefined;
|
|
576
|
+
const payload = await postAgentRegistryOperation(UPDATE_PATH, stripUndefinedValues({
|
|
577
|
+
id: input.id,
|
|
578
|
+
name: input.name,
|
|
579
|
+
description: input.description,
|
|
580
|
+
capabilities: input.capabilities,
|
|
581
|
+
surfaces: input.surfaces,
|
|
582
|
+
surfaceTypes: input.surfaceTypes,
|
|
583
|
+
a2a: encodeA2APeerProjection(input.a2a),
|
|
584
|
+
}), resolvedConfig ? { ...options, config: resolvedConfig } : options);
|
|
585
|
+
if (!payload) {
|
|
586
|
+
return null;
|
|
587
|
+
}
|
|
588
|
+
return {
|
|
589
|
+
agent: normalizeAgent(objectValue(payload, "agent")),
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
export async function heartbeatAgentWithPlatform(input, options) {
|
|
593
|
+
const explicitWorkspaceId = trimString(input.workspaceId);
|
|
594
|
+
const resolvedConfig = options?.config
|
|
595
|
+
? explicitWorkspaceId && explicitWorkspaceId !== options.config.workspaceId
|
|
596
|
+
? { ...options.config, workspaceId: explicitWorkspaceId }
|
|
597
|
+
: options.config
|
|
598
|
+
: explicitWorkspaceId
|
|
599
|
+
? await resolveAgentRegistryListServiceConfig(explicitWorkspaceId)
|
|
600
|
+
: undefined;
|
|
601
|
+
const payload = await postAgentRegistryOperation(HEARTBEAT_PATH, stripUndefinedValues({
|
|
602
|
+
agentId: input.agentId,
|
|
603
|
+
status: input.status,
|
|
604
|
+
currentObjectiveIds: input.currentObjectiveIds,
|
|
605
|
+
surface: input.surface,
|
|
606
|
+
surfaceType: input.surfaceType,
|
|
607
|
+
a2a: encodeA2APeerProjection(input.a2a),
|
|
608
|
+
}), resolvedConfig ? { ...options, config: resolvedConfig } : options);
|
|
609
|
+
if (!payload) {
|
|
610
|
+
return null;
|
|
611
|
+
}
|
|
612
|
+
return {
|
|
613
|
+
nextHeartbeatBy: firstString(payload, "nextHeartbeatBy", "next_heartbeat_by"),
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
export async function listAgentsWithPlatform(input = {}, options) {
|
|
617
|
+
const explicitWorkspaceId = trimString(input.workspaceId);
|
|
618
|
+
const resolvedConfig = options?.config
|
|
619
|
+
? explicitWorkspaceId && explicitWorkspaceId !== options.config.workspaceId
|
|
620
|
+
? { ...options.config, workspaceId: explicitWorkspaceId }
|
|
621
|
+
: options.config
|
|
622
|
+
: await resolveAgentRegistryListServiceConfig(explicitWorkspaceId);
|
|
623
|
+
if (!resolvedConfig) {
|
|
624
|
+
return null;
|
|
625
|
+
}
|
|
626
|
+
const payload = await postAgentRegistryOperation(LIST_AGENTS_PATH, stripUndefinedValues({
|
|
627
|
+
workspaceId: explicitWorkspaceId,
|
|
628
|
+
agentType: input.agentType,
|
|
629
|
+
capability: input.capability,
|
|
630
|
+
surface: input.surface,
|
|
631
|
+
status: input.status,
|
|
632
|
+
limit: input.limit,
|
|
633
|
+
offset: input.offset,
|
|
634
|
+
a2aSkillId: input.a2aSkillId,
|
|
635
|
+
taskClass: input.taskClass,
|
|
636
|
+
requireA2aDispatch: input.requireA2ADispatch,
|
|
637
|
+
eligibleForDelegation: input.eligibleForDelegation,
|
|
638
|
+
}), { ...options, config: resolvedConfig });
|
|
639
|
+
if (!payload) {
|
|
640
|
+
return null;
|
|
641
|
+
}
|
|
642
|
+
const agents = Array.isArray(payload.agents)
|
|
643
|
+
? payload.agents
|
|
644
|
+
.filter((agent) => Boolean(agent) &&
|
|
645
|
+
typeof agent === "object" &&
|
|
646
|
+
!Array.isArray(agent))
|
|
647
|
+
.map((agent) => normalizeAgent(agent))
|
|
648
|
+
.filter((agent) => agent !== undefined)
|
|
649
|
+
: [];
|
|
650
|
+
return {
|
|
651
|
+
agents,
|
|
652
|
+
total: firstNumber(payload, "total", "totalSize", "total_size"),
|
|
653
|
+
discoveryEvidence: normalizeDiscoveryEvidence(objectValue(payload, "discoveryEvidence", "discovery_evidence")),
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
export async function listA2APeerCandidatesWithPlatform(input = {}, options) {
|
|
657
|
+
const result = await listAgentsWithPlatform({
|
|
658
|
+
...input,
|
|
659
|
+
a2aSkillId: input.a2aSkillId ?? input.skillId,
|
|
660
|
+
requireA2ADispatch: input.requireA2ADispatch ?? true,
|
|
661
|
+
eligibleForDelegation: input.eligibleForDelegation ?? true,
|
|
662
|
+
}, options);
|
|
663
|
+
if (!result) {
|
|
664
|
+
return null;
|
|
665
|
+
}
|
|
666
|
+
return result.agents
|
|
667
|
+
.map((agent) => {
|
|
668
|
+
const a2a = agent.a2a;
|
|
669
|
+
const useInternalEndpoint = Boolean(input.preferInternalEndpoint && a2a?.internalEndpointUrl);
|
|
670
|
+
const endpointUrl = useInternalEndpoint && a2a?.internalEndpointUrl
|
|
671
|
+
? a2a.internalEndpointUrl
|
|
672
|
+
: (a2a?.publicEndpointUrl ?? a2a?.internalEndpointUrl);
|
|
673
|
+
if (!a2a || !endpointUrl) {
|
|
674
|
+
return undefined;
|
|
675
|
+
}
|
|
676
|
+
const endpointKind = useInternalEndpoint || endpointUrl === a2a.internalEndpointUrl
|
|
677
|
+
? "internal"
|
|
678
|
+
: "public";
|
|
679
|
+
const skills = a2a.skills ?? [];
|
|
680
|
+
if (input.skillId &&
|
|
681
|
+
!skills.some((skill) => skill.id === input.skillId)) {
|
|
682
|
+
return undefined;
|
|
683
|
+
}
|
|
684
|
+
return stripUndefinedValues({
|
|
685
|
+
agent,
|
|
686
|
+
endpointUrl,
|
|
687
|
+
endpointKind,
|
|
688
|
+
agentCardUrl: a2a.agentCardUrl,
|
|
689
|
+
protocolBinding: a2a.protocolBinding,
|
|
690
|
+
protocolVersion: a2a.protocolVersion,
|
|
691
|
+
skills,
|
|
692
|
+
supportedExtensions: a2a.supportedExtensions,
|
|
693
|
+
pushNotifications: a2a.pushNotifications,
|
|
694
|
+
});
|
|
695
|
+
})
|
|
696
|
+
.filter((candidate) => candidate !== undefined);
|
|
697
|
+
}
|
|
698
|
+
export async function delegateAgentWithPlatform(input, options) {
|
|
699
|
+
const explicitWorkspaceId = trimString(input.workspaceId);
|
|
700
|
+
const resolvedConfig = options?.config
|
|
701
|
+
? explicitWorkspaceId && explicitWorkspaceId !== options.config.workspaceId
|
|
702
|
+
? { ...options.config, workspaceId: explicitWorkspaceId }
|
|
703
|
+
: options.config
|
|
704
|
+
: explicitWorkspaceId
|
|
705
|
+
? await resolveAgentRegistryListServiceConfig(explicitWorkspaceId)
|
|
706
|
+
: undefined;
|
|
707
|
+
const payload = await postAgentRegistryOperation(DELEGATE_PATH, stripUndefinedValues({
|
|
708
|
+
workspaceId: explicitWorkspaceId,
|
|
709
|
+
fromAgentId: input.fromAgentId,
|
|
710
|
+
toAgentId: input.toAgentId,
|
|
711
|
+
requiredCapability: input.requiredCapability,
|
|
712
|
+
a2aSkillId: input.a2aSkillId,
|
|
713
|
+
objectiveId: input.objectiveId,
|
|
714
|
+
workflowRunId: input.workflowRunId,
|
|
715
|
+
workflowStepId: input.workflowStepId,
|
|
716
|
+
contextPayload: encodeJsonBytes(input.contextPayload),
|
|
717
|
+
reason: input.reason,
|
|
718
|
+
}), resolvedConfig ? { ...options, config: resolvedConfig } : options);
|
|
719
|
+
if (!payload) {
|
|
720
|
+
return null;
|
|
721
|
+
}
|
|
722
|
+
return {
|
|
723
|
+
delegation: normalizeDelegation(objectValue(payload, "delegation")),
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
export async function resolveAgentDelegationWithPlatform(input, options) {
|
|
727
|
+
const payload = await postAgentRegistryOperation(RESOLVE_DELEGATION_PATH, stripUndefinedValues({
|
|
728
|
+
delegationId: input.delegationId,
|
|
729
|
+
status: input.status,
|
|
730
|
+
resultPayload: encodeJsonBytes(input.resultPayload),
|
|
731
|
+
errorMessage: input.errorMessage,
|
|
732
|
+
}), options);
|
|
733
|
+
if (!payload) {
|
|
734
|
+
return null;
|
|
735
|
+
}
|
|
736
|
+
return {
|
|
737
|
+
delegation: normalizeDelegation(objectValue(payload, "delegation")),
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
export async function getA2ADelegationGraphWithPlatform(input, options) {
|
|
741
|
+
const explicitWorkspaceId = trimString(input.workspaceId);
|
|
742
|
+
const resolvedConfig = options?.config
|
|
743
|
+
? explicitWorkspaceId && explicitWorkspaceId !== options.config.workspaceId
|
|
744
|
+
? { ...options.config, workspaceId: explicitWorkspaceId }
|
|
745
|
+
: options.config
|
|
746
|
+
: explicitWorkspaceId
|
|
747
|
+
? await resolveAgentRegistryListServiceConfig(explicitWorkspaceId)
|
|
748
|
+
: undefined;
|
|
749
|
+
const payload = await postAgentRegistryOperation(GET_A2A_DELEGATION_GRAPH_PATH, stripUndefinedValues({
|
|
750
|
+
workspaceId: explicitWorkspaceId ?? resolvedConfig?.workspaceId,
|
|
751
|
+
rootDelegationId: input.rootDelegationId,
|
|
752
|
+
delegationId: input.delegationId,
|
|
753
|
+
maxDepth: input.maxDepth,
|
|
754
|
+
limit: input.limit,
|
|
755
|
+
}), resolvedConfig ? { ...options, config: resolvedConfig } : options);
|
|
756
|
+
if (!payload) {
|
|
757
|
+
return null;
|
|
758
|
+
}
|
|
759
|
+
const nodes = objectList(payload, "nodes")
|
|
760
|
+
?.map((node) => normalizeA2ADelegationGraphNode(node))
|
|
761
|
+
.filter((node) => node !== undefined) ?? [];
|
|
762
|
+
const edges = objectList(payload, "edges")
|
|
763
|
+
?.map((edge) => normalizeA2ADelegationGraphEdge(edge))
|
|
764
|
+
.filter((edge) => edge !== undefined) ?? [];
|
|
765
|
+
return {
|
|
766
|
+
rootDelegationId: firstString(payload, "rootDelegationId", "root_delegation_id"),
|
|
767
|
+
nodes,
|
|
768
|
+
edges,
|
|
769
|
+
total: firstNumber(payload, "total"),
|
|
770
|
+
truncated: firstBoolean(payload, "truncated"),
|
|
771
|
+
missingParentDelegationIds: stringList(payload, "missingParentDelegationIds", "missing_parent_delegation_ids"),
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
export async function controlA2ADelegationTaskWithPlatform(input, options) {
|
|
775
|
+
const explicitWorkspaceId = trimString(input.workspaceId);
|
|
776
|
+
const resolvedConfig = options?.config
|
|
777
|
+
? explicitWorkspaceId && explicitWorkspaceId !== options.config.workspaceId
|
|
778
|
+
? { ...options.config, workspaceId: explicitWorkspaceId }
|
|
779
|
+
: options.config
|
|
780
|
+
: explicitWorkspaceId
|
|
781
|
+
? await resolveAgentRegistryListServiceConfig(explicitWorkspaceId)
|
|
782
|
+
: undefined;
|
|
783
|
+
const payload = await postAgentRegistryOperation(CONTROL_A2A_DELEGATION_TASK_PATH, stripUndefinedValues({
|
|
784
|
+
delegationId: input.delegationId,
|
|
785
|
+
mode: input.mode,
|
|
786
|
+
message: input.message,
|
|
787
|
+
idempotencyKey: input.idempotencyKey,
|
|
788
|
+
targetRunId: input.targetRunId,
|
|
789
|
+
childRunId: input.childRunId,
|
|
790
|
+
subagentLaneId: input.subagentLaneId,
|
|
791
|
+
workItemId: input.workItemId,
|
|
792
|
+
payload: input.payload,
|
|
793
|
+
metadata: input.metadata,
|
|
794
|
+
}), resolvedConfig ? { ...options, config: resolvedConfig } : options);
|
|
795
|
+
if (!payload) {
|
|
796
|
+
return null;
|
|
797
|
+
}
|
|
798
|
+
return {
|
|
799
|
+
delegation: normalizeDelegation(objectValue(payload, "delegation")),
|
|
800
|
+
remoteTask: normalizeA2ADelegationTaskControlResult(objectValue(payload, "remoteTask", "remote_task")),
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
//# sourceMappingURL=agent-registry-client.js.map
|