@evalops/maestro 0.10.18 → 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/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 +135 -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 +49158 -26161
- 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/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 +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -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 +119 -0
- package/dist/platform/a2a-client.d.ts.map +1 -1
- package/dist/platform/a2a-client.js +413 -24
- package/dist/platform/a2a-client.js.map +1 -1
- 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.map +1 -1
- package/dist/platform/client.js +3 -12
- 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,344 @@
|
|
|
1
|
+
export const CODEX_DYNAMIC_TOOL_CONFORMANCE = {
|
|
2
|
+
nameMaxLength: 128,
|
|
3
|
+
namespaceMaxLength: 64,
|
|
4
|
+
identifierPattern: /^[a-zA-Z0-9_-]+$/,
|
|
5
|
+
reservedNamespaces: [
|
|
6
|
+
"api_tool",
|
|
7
|
+
"browser",
|
|
8
|
+
"computer",
|
|
9
|
+
"container",
|
|
10
|
+
"file_search",
|
|
11
|
+
"functions",
|
|
12
|
+
"image_gen",
|
|
13
|
+
"multi_tool_use",
|
|
14
|
+
"python",
|
|
15
|
+
"python_user_visible",
|
|
16
|
+
"submodel_delegator",
|
|
17
|
+
"terminal",
|
|
18
|
+
"tool_search",
|
|
19
|
+
"web",
|
|
20
|
+
],
|
|
21
|
+
reservedNames: ["mcp"],
|
|
22
|
+
reservedNamePrefixes: ["mcp__"],
|
|
23
|
+
unsupportedTopLevelSchemaKeywords: ["anyOf", "oneOf", "allOf", "enum", "not"],
|
|
24
|
+
dynamicToolCallMethod: "item/tool/call",
|
|
25
|
+
};
|
|
26
|
+
export const CODEX_DEFAULT_TOOL_PROFILE = [
|
|
27
|
+
"read",
|
|
28
|
+
"list",
|
|
29
|
+
"find",
|
|
30
|
+
"search",
|
|
31
|
+
"parallel_ripgrep",
|
|
32
|
+
"diff",
|
|
33
|
+
"bash",
|
|
34
|
+
"background_tasks",
|
|
35
|
+
"apply_patch",
|
|
36
|
+
"edit",
|
|
37
|
+
"write",
|
|
38
|
+
"todo",
|
|
39
|
+
"status",
|
|
40
|
+
"gh_pr",
|
|
41
|
+
"gh_issue",
|
|
42
|
+
"gh_repo",
|
|
43
|
+
];
|
|
44
|
+
const CODEX_DYNAMIC_TOOL_COMPOSITION_SCHEMA_KEYS = [
|
|
45
|
+
"anyOf",
|
|
46
|
+
"oneOf",
|
|
47
|
+
"allOf",
|
|
48
|
+
];
|
|
49
|
+
const UNSUPPORTED_CODEX_DYNAMIC_TOOL_TOP_LEVEL_SCHEMA_KEYS = new Set(CODEX_DYNAMIC_TOOL_CONFORMANCE.unsupportedTopLevelSchemaKeywords);
|
|
50
|
+
export function isCodexAppServerApi(api) {
|
|
51
|
+
return api === "openai-codex-app-server";
|
|
52
|
+
}
|
|
53
|
+
export function selectCodexDefaultTools(tools) {
|
|
54
|
+
const byName = new Map(tools.map((tool) => [tool.name, tool]));
|
|
55
|
+
return CODEX_DEFAULT_TOOL_PROFILE.map((name) => byName.get(name)).filter((tool) => Boolean(tool));
|
|
56
|
+
}
|
|
57
|
+
export function compileCodexDynamicToolSpecs(tools) {
|
|
58
|
+
const specs = [];
|
|
59
|
+
const bindings = [];
|
|
60
|
+
const diagnostics = [];
|
|
61
|
+
const seenOriginalNames = new Set();
|
|
62
|
+
const seenCodexNames = new Set();
|
|
63
|
+
for (const tool of tools) {
|
|
64
|
+
if (tool.deferApiDefinition || tool.executionLocation === "client") {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
if (seenOriginalNames.has(tool.name)) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
seenOriginalNames.add(tool.name);
|
|
71
|
+
const codexName = toUniqueCodexDynamicToolName(tool.name, seenCodexNames);
|
|
72
|
+
if (codexName !== tool.name) {
|
|
73
|
+
diagnostics.push({
|
|
74
|
+
severity: "warning",
|
|
75
|
+
code: "renamed_tool",
|
|
76
|
+
message: `Tool "${tool.name}" is exposed to Codex as "${codexName}" to match app-server dynamic tool identifier rules.`,
|
|
77
|
+
toolName: tool.name,
|
|
78
|
+
codexName,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
seenCodexNames.add(codexName);
|
|
82
|
+
specs.push({
|
|
83
|
+
name: codexName,
|
|
84
|
+
description: tool.description,
|
|
85
|
+
inputSchema: normalizeCodexDynamicToolInputSchema(tool.parameters),
|
|
86
|
+
});
|
|
87
|
+
bindings.push({ codexName, originalName: tool.name });
|
|
88
|
+
}
|
|
89
|
+
return { specs, bindings, diagnostics };
|
|
90
|
+
}
|
|
91
|
+
export function createCodexDynamicToolNameMap(bindings) {
|
|
92
|
+
return new Map(bindings.map((binding) => [binding.codexName, binding.originalName]));
|
|
93
|
+
}
|
|
94
|
+
export function normalizeCodexDynamicToolInputSchema(schema) {
|
|
95
|
+
if (!isRecord(schema)) {
|
|
96
|
+
return emptyCodexDynamicToolInputSchema();
|
|
97
|
+
}
|
|
98
|
+
const flattened = flattenTopLevelCompositionSchema(schema);
|
|
99
|
+
if (flattened) {
|
|
100
|
+
return flattened;
|
|
101
|
+
}
|
|
102
|
+
const normalized = {};
|
|
103
|
+
for (const [key, value] of Object.entries(schema)) {
|
|
104
|
+
if (UNSUPPORTED_CODEX_DYNAMIC_TOOL_TOP_LEVEL_SCHEMA_KEYS.has(key)) {
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
normalized[key] = value;
|
|
108
|
+
}
|
|
109
|
+
normalized.type = "object";
|
|
110
|
+
if (!isRecord(normalized.properties)) {
|
|
111
|
+
normalized.properties = {};
|
|
112
|
+
}
|
|
113
|
+
if (!("additionalProperties" in normalized)) {
|
|
114
|
+
normalized.additionalProperties = false;
|
|
115
|
+
}
|
|
116
|
+
return normalized;
|
|
117
|
+
}
|
|
118
|
+
function toUniqueCodexDynamicToolName(toolName, seenCodexNames) {
|
|
119
|
+
const baseName = toCodexDynamicToolName(toolName);
|
|
120
|
+
if (!seenCodexNames.has(baseName)) {
|
|
121
|
+
return baseName;
|
|
122
|
+
}
|
|
123
|
+
for (let index = 2;; index += 1) {
|
|
124
|
+
const suffix = `_${index}`;
|
|
125
|
+
const candidate = `${truncateIdentifier(baseName, CODEX_DYNAMIC_TOOL_CONFORMANCE.nameMaxLength - suffix.length)}${suffix}`;
|
|
126
|
+
if (!seenCodexNames.has(candidate)) {
|
|
127
|
+
return candidate;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function toCodexDynamicToolName(toolName) {
|
|
132
|
+
const trimmed = toolName.trim();
|
|
133
|
+
let codexName = trimmed.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
134
|
+
if (codexName.length === 0) {
|
|
135
|
+
codexName = "maestro_tool";
|
|
136
|
+
}
|
|
137
|
+
if (isReservedCodexDynamicToolIdentifier(codexName)) {
|
|
138
|
+
codexName = `maestro_${codexName}`;
|
|
139
|
+
}
|
|
140
|
+
return truncateIdentifier(codexName, CODEX_DYNAMIC_TOOL_CONFORMANCE.nameMaxLength);
|
|
141
|
+
}
|
|
142
|
+
function isReservedCodexDynamicToolIdentifier(value) {
|
|
143
|
+
return (CODEX_DYNAMIC_TOOL_CONFORMANCE.reservedNames.some((reservedName) => value === reservedName) ||
|
|
144
|
+
CODEX_DYNAMIC_TOOL_CONFORMANCE.reservedNamePrefixes.some((prefix) => value.startsWith(prefix)));
|
|
145
|
+
}
|
|
146
|
+
function truncateIdentifier(value, maxLength) {
|
|
147
|
+
if (value.length <= maxLength) {
|
|
148
|
+
return value;
|
|
149
|
+
}
|
|
150
|
+
return value.slice(0, Math.max(1, maxLength));
|
|
151
|
+
}
|
|
152
|
+
function emptyCodexDynamicToolInputSchema() {
|
|
153
|
+
return {
|
|
154
|
+
type: "object",
|
|
155
|
+
properties: {},
|
|
156
|
+
additionalProperties: false,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function flattenTopLevelCompositionSchema(schema) {
|
|
160
|
+
for (const key of CODEX_DYNAMIC_TOOL_COMPOSITION_SCHEMA_KEYS) {
|
|
161
|
+
const branches = schema[key];
|
|
162
|
+
if (!Array.isArray(branches)) {
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
if (branches.length === 0 || !branches.every(isRecord)) {
|
|
166
|
+
return emptyCodexDynamicToolInputSchema();
|
|
167
|
+
}
|
|
168
|
+
return flattenObjectSchemaBranches(schema, key, branches);
|
|
169
|
+
}
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
function flattenObjectSchemaBranches(schema, compositionKey, branches) {
|
|
173
|
+
const propertySchemas = new Map();
|
|
174
|
+
const topLevelProperties = schema.properties;
|
|
175
|
+
if (isRecord(topLevelProperties)) {
|
|
176
|
+
for (const [name, propertySchema] of Object.entries(topLevelProperties)) {
|
|
177
|
+
addPropertySchema(propertySchemas, name, propertySchema);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const branchRequiredSets = [];
|
|
181
|
+
for (const branch of branches) {
|
|
182
|
+
const branchProperties = branch.properties;
|
|
183
|
+
if (isRecord(branchProperties)) {
|
|
184
|
+
for (const [name, propertySchema] of Object.entries(branchProperties)) {
|
|
185
|
+
addPropertySchema(propertySchemas, name, propertySchema);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
branchRequiredSets.push(new Set(readStringArray(branch.required)));
|
|
189
|
+
}
|
|
190
|
+
const properties = {};
|
|
191
|
+
for (const [name, schemas] of propertySchemas.entries()) {
|
|
192
|
+
properties[name] = mergePropertySchemas(schemas);
|
|
193
|
+
}
|
|
194
|
+
const required = computeFlattenedRequired(schema, compositionKey, branchRequiredSets).filter((name) => name in properties);
|
|
195
|
+
const flattened = {
|
|
196
|
+
type: "object",
|
|
197
|
+
properties,
|
|
198
|
+
additionalProperties: computeFlattenedAdditionalProperties(schema, compositionKey, branches),
|
|
199
|
+
};
|
|
200
|
+
if (typeof schema.description === "string") {
|
|
201
|
+
flattened.description = schema.description;
|
|
202
|
+
}
|
|
203
|
+
if (required.length > 0) {
|
|
204
|
+
flattened.required = required;
|
|
205
|
+
}
|
|
206
|
+
return flattened;
|
|
207
|
+
}
|
|
208
|
+
function addPropertySchema(propertySchemas, name, propertySchema) {
|
|
209
|
+
const schemas = propertySchemas.get(name);
|
|
210
|
+
if (schemas) {
|
|
211
|
+
schemas.push(propertySchema);
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
propertySchemas.set(name, [propertySchema]);
|
|
215
|
+
}
|
|
216
|
+
function computeFlattenedRequired(schema, compositionKey, branchRequiredSets) {
|
|
217
|
+
const topLevelRequired = readStringArray(schema.required);
|
|
218
|
+
if (branchRequiredSets.length === 0) {
|
|
219
|
+
return topLevelRequired;
|
|
220
|
+
}
|
|
221
|
+
if (compositionKey === "allOf") {
|
|
222
|
+
return uniqueStrings([
|
|
223
|
+
...topLevelRequired,
|
|
224
|
+
...branchRequiredSets.flatMap((set) => [...set]),
|
|
225
|
+
]);
|
|
226
|
+
}
|
|
227
|
+
const firstBranchRequired = branchRequiredSets[0] ?? new Set();
|
|
228
|
+
const requiredByEveryBranch = [...firstBranchRequired].filter((name) => branchRequiredSets.every((set) => set.has(name)));
|
|
229
|
+
return uniqueStrings([...topLevelRequired, ...requiredByEveryBranch]);
|
|
230
|
+
}
|
|
231
|
+
function mergePropertySchemas(schemas) {
|
|
232
|
+
const uniqueSchemas = uniqueJsonItems(schemas);
|
|
233
|
+
if (uniqueSchemas.length <= 1) {
|
|
234
|
+
return uniqueSchemas[0] ?? {};
|
|
235
|
+
}
|
|
236
|
+
const constValues = uniqueSchemas.map(readConstValue);
|
|
237
|
+
if (constValues.every((entry) => entry.found)) {
|
|
238
|
+
const schemaTypes = uniqueSchemas.map(readSchemaType);
|
|
239
|
+
const commonType = schemaTypes.every((type) => type === schemaTypes[0])
|
|
240
|
+
? schemaTypes[0]
|
|
241
|
+
: undefined;
|
|
242
|
+
return {
|
|
243
|
+
...(commonType ? { type: commonType } : {}),
|
|
244
|
+
enum: uniqueJsonItems(constValues.map((entry) => entry.value)),
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
return { anyOf: uniqueSchemas };
|
|
248
|
+
}
|
|
249
|
+
function computeFlattenedAdditionalProperties(schema, compositionKey, branches) {
|
|
250
|
+
const topLevelConstraint = readAdditionalPropertiesConstraint(schema.additionalProperties);
|
|
251
|
+
if (topLevelConstraint === false) {
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
const branchConstraint = compositionKey === "allOf"
|
|
255
|
+
? intersectAdditionalPropertiesConstraints(branches.map((branch) => readAdditionalPropertiesConstraint(branch.additionalProperties)))
|
|
256
|
+
: unionAdditionalPropertiesConstraints(branches.map((branch) => readAdditionalPropertiesConstraint(branch.additionalProperties)));
|
|
257
|
+
return intersectAdditionalPropertiesConstraints([
|
|
258
|
+
topLevelConstraint,
|
|
259
|
+
branchConstraint,
|
|
260
|
+
]);
|
|
261
|
+
}
|
|
262
|
+
function readAdditionalPropertiesConstraint(value) {
|
|
263
|
+
if (value === false) {
|
|
264
|
+
return false;
|
|
265
|
+
}
|
|
266
|
+
if (isRecord(value)) {
|
|
267
|
+
return value;
|
|
268
|
+
}
|
|
269
|
+
return true;
|
|
270
|
+
}
|
|
271
|
+
function unionAdditionalPropertiesConstraints(constraints) {
|
|
272
|
+
if (constraints.some((constraint) => constraint === false)) {
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
if (constraints.some((constraint) => constraint === true)) {
|
|
276
|
+
return true;
|
|
277
|
+
}
|
|
278
|
+
const schemas = constraints.filter(isRecord);
|
|
279
|
+
if (schemas.length === 0) {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
return combineAdditionalPropertiesSchemas("anyOf", schemas);
|
|
283
|
+
}
|
|
284
|
+
function intersectAdditionalPropertiesConstraints(constraints) {
|
|
285
|
+
if (constraints.some((constraint) => constraint === false)) {
|
|
286
|
+
return false;
|
|
287
|
+
}
|
|
288
|
+
const schemas = constraints.filter(isRecord);
|
|
289
|
+
if (schemas.length === 0) {
|
|
290
|
+
return true;
|
|
291
|
+
}
|
|
292
|
+
return combineAdditionalPropertiesSchemas("allOf", schemas);
|
|
293
|
+
}
|
|
294
|
+
function combineAdditionalPropertiesSchemas(compositionKey, schemas) {
|
|
295
|
+
const uniqueSchemas = uniqueJsonItems(schemas).filter(isRecord);
|
|
296
|
+
if (uniqueSchemas.length <= 1) {
|
|
297
|
+
return uniqueSchemas[0] ?? {};
|
|
298
|
+
}
|
|
299
|
+
return { [compositionKey]: uniqueSchemas };
|
|
300
|
+
}
|
|
301
|
+
function readStringArray(value) {
|
|
302
|
+
return Array.isArray(value)
|
|
303
|
+
? value.filter((item) => typeof item === "string")
|
|
304
|
+
: [];
|
|
305
|
+
}
|
|
306
|
+
function uniqueStrings(values) {
|
|
307
|
+
return Array.from(new Set(values));
|
|
308
|
+
}
|
|
309
|
+
function uniqueJsonItems(values) {
|
|
310
|
+
const seen = new Set();
|
|
311
|
+
const unique = [];
|
|
312
|
+
for (const value of values) {
|
|
313
|
+
const key = schemaJsonKey(value);
|
|
314
|
+
if (seen.has(key)) {
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
317
|
+
seen.add(key);
|
|
318
|
+
unique.push(value);
|
|
319
|
+
}
|
|
320
|
+
return unique;
|
|
321
|
+
}
|
|
322
|
+
function schemaJsonKey(value) {
|
|
323
|
+
try {
|
|
324
|
+
return JSON.stringify(value);
|
|
325
|
+
}
|
|
326
|
+
catch {
|
|
327
|
+
return String(value);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
function readConstValue(schema) {
|
|
331
|
+
if (!isRecord(schema) || !("const" in schema)) {
|
|
332
|
+
return { found: false };
|
|
333
|
+
}
|
|
334
|
+
return { found: true, value: schema.const };
|
|
335
|
+
}
|
|
336
|
+
function readSchemaType(schema) {
|
|
337
|
+
return isRecord(schema) && typeof schema.type === "string"
|
|
338
|
+
? schema.type
|
|
339
|
+
: undefined;
|
|
340
|
+
}
|
|
341
|
+
function isRecord(value) {
|
|
342
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
343
|
+
}
|
|
344
|
+
//# sourceMappingURL=compatibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compatibility.js","sourceRoot":"","sources":["../../src/codex/compatibility.ts"],"names":[],"mappings":"AAuCA,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC7C,aAAa,EAAE,GAAG;IAClB,kBAAkB,EAAE,EAAE;IACtB,iBAAiB,EAAE,kBAAkB;IACrC,kBAAkB,EAAE;QACnB,UAAU;QACV,SAAS;QACT,UAAU;QACV,WAAW;QACX,aAAa;QACb,WAAW;QACX,WAAW;QACX,gBAAgB;QAChB,QAAQ;QACR,qBAAqB;QACrB,oBAAoB;QACpB,UAAU;QACV,aAAa;QACb,KAAK;KACL;IACD,aAAa,EAAE,CAAC,KAAK,CAAC;IACtB,oBAAoB,EAAE,CAAC,OAAO,CAAC;IAC/B,iCAAiC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC;IAC7E,qBAAqB,EAAE,gBAAgB;CAC9B,CAAC;AAEX,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACzC,MAAM;IACN,MAAM;IACN,MAAM;IACN,QAAQ;IACR,kBAAkB;IAClB,MAAM;IACN,MAAM;IACN,kBAAkB;IAClB,aAAa;IACb,MAAM;IACN,OAAO;IACP,MAAM;IACN,QAAQ;IACR,OAAO;IACP,UAAU;IAC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,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;AAC7C,CAAC;AAED,SAAS,cAAc,CAAC,MAAe;IACtC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ;QACzD,CAAC,CAAC,MAAM,CAAC,IAAI;QACb,CAAC,CAAC,SAAS,CAAC;AACd,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC/B,OAAO,OAAO,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AAC7E,CAAC","sourcesContent":["import type { Tool } from \"../agent/types.js\";\n\ntype JsonObject = Record<string, unknown>;\ntype AdditionalPropertiesConstraint = boolean | JsonObject;\n\ntype CodexCompatibleTool = Pick<\n\tTool,\n\t\"name\" | \"description\" | \"parameters\" | \"deferApiDefinition\"\n> & {\n\texecutionLocation?: \"server\" | \"client\";\n};\n\nexport type CodexDynamicToolSpec = {\n\tnamespace?: string;\n\tname: string;\n\tdescription: string;\n\tinputSchema: JsonObject;\n\tdeferLoading?: boolean;\n};\n\nexport type CodexCompatibilityDiagnostic = {\n\tseverity: \"info\" | \"warning\" | \"error\";\n\tcode: string;\n\tmessage: string;\n\ttoolName?: string;\n\tcodexName?: string;\n};\n\nexport type CodexDynamicToolBinding = {\n\tcodexName: string;\n\toriginalName: string;\n};\n\nexport type CodexDynamicToolCompilation = {\n\tspecs: CodexDynamicToolSpec[];\n\tbindings: CodexDynamicToolBinding[];\n\tdiagnostics: CodexCompatibilityDiagnostic[];\n};\n\nexport const CODEX_DYNAMIC_TOOL_CONFORMANCE = {\n\tnameMaxLength: 128,\n\tnamespaceMaxLength: 64,\n\tidentifierPattern: /^[a-zA-Z0-9_-]+$/,\n\treservedNamespaces: [\n\t\t\"api_tool\",\n\t\t\"browser\",\n\t\t\"computer\",\n\t\t\"container\",\n\t\t\"file_search\",\n\t\t\"functions\",\n\t\t\"image_gen\",\n\t\t\"multi_tool_use\",\n\t\t\"python\",\n\t\t\"python_user_visible\",\n\t\t\"submodel_delegator\",\n\t\t\"terminal\",\n\t\t\"tool_search\",\n\t\t\"web\",\n\t],\n\treservedNames: [\"mcp\"],\n\treservedNamePrefixes: [\"mcp__\"],\n\tunsupportedTopLevelSchemaKeywords: [\"anyOf\", \"oneOf\", \"allOf\", \"enum\", \"not\"],\n\tdynamicToolCallMethod: \"item/tool/call\",\n} as const;\n\nexport const CODEX_DEFAULT_TOOL_PROFILE = [\n\t\"read\",\n\t\"list\",\n\t\"find\",\n\t\"search\",\n\t\"parallel_ripgrep\",\n\t\"diff\",\n\t\"bash\",\n\t\"background_tasks\",\n\t\"apply_patch\",\n\t\"edit\",\n\t\"write\",\n\t\"todo\",\n\t\"status\",\n\t\"gh_pr\",\n\t\"gh_issue\",\n\t\"gh_repo\",\n] as const;\n\nconst CODEX_DYNAMIC_TOOL_COMPOSITION_SCHEMA_KEYS = [\n\t\"anyOf\",\n\t\"oneOf\",\n\t\"allOf\",\n] as const;\n\nconst UNSUPPORTED_CODEX_DYNAMIC_TOOL_TOP_LEVEL_SCHEMA_KEYS = new Set<string>(\n\tCODEX_DYNAMIC_TOOL_CONFORMANCE.unsupportedTopLevelSchemaKeywords,\n);\n\nexport function isCodexAppServerApi(api: unknown): boolean {\n\treturn api === \"openai-codex-app-server\";\n}\n\nexport function selectCodexDefaultTools<TTool extends { name: string }>(\n\ttools: readonly TTool[],\n): TTool[] {\n\tconst byName = new Map(tools.map((tool) => [tool.name, tool]));\n\treturn CODEX_DEFAULT_TOOL_PROFILE.map((name) => byName.get(name)).filter(\n\t\t(tool): tool is TTool => Boolean(tool),\n\t);\n}\n\nexport function compileCodexDynamicToolSpecs(\n\ttools: readonly CodexCompatibleTool[],\n): CodexDynamicToolCompilation {\n\tconst specs: CodexDynamicToolSpec[] = [];\n\tconst bindings: CodexDynamicToolBinding[] = [];\n\tconst diagnostics: CodexCompatibilityDiagnostic[] = [];\n\tconst seenOriginalNames = new Set<string>();\n\tconst seenCodexNames = new Set<string>();\n\n\tfor (const tool of tools) {\n\t\tif (tool.deferApiDefinition || tool.executionLocation === \"client\") {\n\t\t\tcontinue;\n\t\t}\n\t\tif (seenOriginalNames.has(tool.name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tseenOriginalNames.add(tool.name);\n\n\t\tconst codexName = toUniqueCodexDynamicToolName(tool.name, seenCodexNames);\n\t\tif (codexName !== tool.name) {\n\t\t\tdiagnostics.push({\n\t\t\t\tseverity: \"warning\",\n\t\t\t\tcode: \"renamed_tool\",\n\t\t\t\tmessage: `Tool \"${tool.name}\" is exposed to Codex as \"${codexName}\" to match app-server dynamic tool identifier rules.`,\n\t\t\t\ttoolName: tool.name,\n\t\t\t\tcodexName,\n\t\t\t});\n\t\t}\n\n\t\tseenCodexNames.add(codexName);\n\t\tspecs.push({\n\t\t\tname: codexName,\n\t\t\tdescription: tool.description,\n\t\t\tinputSchema: normalizeCodexDynamicToolInputSchema(tool.parameters),\n\t\t});\n\t\tbindings.push({ codexName, originalName: tool.name });\n\t}\n\n\treturn { specs, bindings, diagnostics };\n}\n\nexport function createCodexDynamicToolNameMap(\n\tbindings: readonly CodexDynamicToolBinding[],\n): Map<string, string> {\n\treturn new Map(\n\t\tbindings.map((binding) => [binding.codexName, binding.originalName]),\n\t);\n}\n\nexport function normalizeCodexDynamicToolInputSchema(\n\tschema: unknown,\n): JsonObject {\n\tif (!isRecord(schema)) {\n\t\treturn emptyCodexDynamicToolInputSchema();\n\t}\n\n\tconst flattened = flattenTopLevelCompositionSchema(schema);\n\tif (flattened) {\n\t\treturn flattened;\n\t}\n\n\tconst normalized: JsonObject = {};\n\tfor (const [key, value] of Object.entries(schema)) {\n\t\tif (UNSUPPORTED_CODEX_DYNAMIC_TOOL_TOP_LEVEL_SCHEMA_KEYS.has(key)) {\n\t\t\tcontinue;\n\t\t}\n\t\tnormalized[key] = value;\n\t}\n\tnormalized.type = \"object\";\n\tif (!isRecord(normalized.properties)) {\n\t\tnormalized.properties = {};\n\t}\n\tif (!(\"additionalProperties\" in normalized)) {\n\t\tnormalized.additionalProperties = false;\n\t}\n\treturn normalized;\n}\n\nfunction toUniqueCodexDynamicToolName(\n\ttoolName: string,\n\tseenCodexNames: ReadonlySet<string>,\n): string {\n\tconst baseName = toCodexDynamicToolName(toolName);\n\tif (!seenCodexNames.has(baseName)) {\n\t\treturn baseName;\n\t}\n\tfor (let index = 2; ; index += 1) {\n\t\tconst suffix = `_${index}`;\n\t\tconst candidate = `${truncateIdentifier(\n\t\t\tbaseName,\n\t\t\tCODEX_DYNAMIC_TOOL_CONFORMANCE.nameMaxLength - suffix.length,\n\t\t)}${suffix}`;\n\t\tif (!seenCodexNames.has(candidate)) {\n\t\t\treturn candidate;\n\t\t}\n\t}\n}\n\nfunction toCodexDynamicToolName(toolName: string): string {\n\tconst trimmed = toolName.trim();\n\tlet codexName = trimmed.replace(/[^a-zA-Z0-9_-]/g, \"_\");\n\tif (codexName.length === 0) {\n\t\tcodexName = \"maestro_tool\";\n\t}\n\tif (isReservedCodexDynamicToolIdentifier(codexName)) {\n\t\tcodexName = `maestro_${codexName}`;\n\t}\n\treturn truncateIdentifier(\n\t\tcodexName,\n\t\tCODEX_DYNAMIC_TOOL_CONFORMANCE.nameMaxLength,\n\t);\n}\n\nfunction isReservedCodexDynamicToolIdentifier(value: string): boolean {\n\treturn (\n\t\tCODEX_DYNAMIC_TOOL_CONFORMANCE.reservedNames.some(\n\t\t\t(reservedName) => value === reservedName,\n\t\t) ||\n\t\tCODEX_DYNAMIC_TOOL_CONFORMANCE.reservedNamePrefixes.some((prefix) =>\n\t\t\tvalue.startsWith(prefix),\n\t\t)\n\t);\n}\n\nfunction truncateIdentifier(value: string, maxLength: number): string {\n\tif (value.length <= maxLength) {\n\t\treturn value;\n\t}\n\treturn value.slice(0, Math.max(1, maxLength));\n}\n\nfunction emptyCodexDynamicToolInputSchema(): JsonObject {\n\treturn {\n\t\ttype: \"object\",\n\t\tproperties: {},\n\t\tadditionalProperties: false,\n\t};\n}\n\nfunction flattenTopLevelCompositionSchema(\n\tschema: JsonObject,\n): JsonObject | null {\n\tfor (const key of CODEX_DYNAMIC_TOOL_COMPOSITION_SCHEMA_KEYS) {\n\t\tconst branches = schema[key];\n\t\tif (!Array.isArray(branches)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (branches.length === 0 || !branches.every(isRecord)) {\n\t\t\treturn emptyCodexDynamicToolInputSchema();\n\t\t}\n\t\treturn flattenObjectSchemaBranches(schema, key, branches);\n\t}\n\treturn null;\n}\n\nfunction flattenObjectSchemaBranches(\n\tschema: JsonObject,\n\tcompositionKey: (typeof CODEX_DYNAMIC_TOOL_COMPOSITION_SCHEMA_KEYS)[number],\n\tbranches: JsonObject[],\n): JsonObject {\n\tconst propertySchemas = new Map<string, unknown[]>();\n\tconst topLevelProperties = schema.properties;\n\tif (isRecord(topLevelProperties)) {\n\t\tfor (const [name, propertySchema] of Object.entries(topLevelProperties)) {\n\t\t\taddPropertySchema(propertySchemas, name, propertySchema);\n\t\t}\n\t}\n\n\tconst branchRequiredSets: Array<Set<string>> = [];\n\tfor (const branch of branches) {\n\t\tconst branchProperties = branch.properties;\n\t\tif (isRecord(branchProperties)) {\n\t\t\tfor (const [name, propertySchema] of Object.entries(branchProperties)) {\n\t\t\t\taddPropertySchema(propertySchemas, name, propertySchema);\n\t\t\t}\n\t\t}\n\t\tbranchRequiredSets.push(new Set(readStringArray(branch.required)));\n\t}\n\n\tconst properties: JsonObject = {};\n\tfor (const [name, schemas] of propertySchemas.entries()) {\n\t\tproperties[name] = mergePropertySchemas(schemas);\n\t}\n\n\tconst required = computeFlattenedRequired(\n\t\tschema,\n\t\tcompositionKey,\n\t\tbranchRequiredSets,\n\t).filter((name) => name in properties);\n\tconst flattened: JsonObject = {\n\t\ttype: \"object\",\n\t\tproperties,\n\t\tadditionalProperties: computeFlattenedAdditionalProperties(\n\t\t\tschema,\n\t\t\tcompositionKey,\n\t\t\tbranches,\n\t\t),\n\t};\n\tif (typeof schema.description === \"string\") {\n\t\tflattened.description = schema.description;\n\t}\n\tif (required.length > 0) {\n\t\tflattened.required = required;\n\t}\n\treturn flattened;\n}\n\nfunction addPropertySchema(\n\tpropertySchemas: Map<string, unknown[]>,\n\tname: string,\n\tpropertySchema: unknown,\n): void {\n\tconst schemas = propertySchemas.get(name);\n\tif (schemas) {\n\t\tschemas.push(propertySchema);\n\t\treturn;\n\t}\n\tpropertySchemas.set(name, [propertySchema]);\n}\n\nfunction computeFlattenedRequired(\n\tschema: JsonObject,\n\tcompositionKey: (typeof CODEX_DYNAMIC_TOOL_COMPOSITION_SCHEMA_KEYS)[number],\n\tbranchRequiredSets: Array<Set<string>>,\n): string[] {\n\tconst topLevelRequired = readStringArray(schema.required);\n\tif (branchRequiredSets.length === 0) {\n\t\treturn topLevelRequired;\n\t}\n\tif (compositionKey === \"allOf\") {\n\t\treturn uniqueStrings([\n\t\t\t...topLevelRequired,\n\t\t\t...branchRequiredSets.flatMap((set) => [...set]),\n\t\t]);\n\t}\n\tconst firstBranchRequired = branchRequiredSets[0] ?? new Set<string>();\n\tconst requiredByEveryBranch = [...firstBranchRequired].filter((name) =>\n\t\tbranchRequiredSets.every((set) => set.has(name)),\n\t);\n\treturn uniqueStrings([...topLevelRequired, ...requiredByEveryBranch]);\n}\n\nfunction mergePropertySchemas(schemas: unknown[]): unknown {\n\tconst uniqueSchemas = uniqueJsonItems(schemas);\n\tif (uniqueSchemas.length <= 1) {\n\t\treturn uniqueSchemas[0] ?? {};\n\t}\n\n\tconst constValues = uniqueSchemas.map(readConstValue);\n\tif (constValues.every((entry) => entry.found)) {\n\t\tconst schemaTypes = uniqueSchemas.map(readSchemaType);\n\t\tconst commonType = schemaTypes.every((type) => type === schemaTypes[0])\n\t\t\t? schemaTypes[0]\n\t\t\t: undefined;\n\t\treturn {\n\t\t\t...(commonType ? { type: commonType } : {}),\n\t\t\tenum: uniqueJsonItems(constValues.map((entry) => entry.value)),\n\t\t};\n\t}\n\n\treturn { anyOf: uniqueSchemas };\n}\n\nfunction computeFlattenedAdditionalProperties(\n\tschema: JsonObject,\n\tcompositionKey: (typeof CODEX_DYNAMIC_TOOL_COMPOSITION_SCHEMA_KEYS)[number],\n\tbranches: JsonObject[],\n): AdditionalPropertiesConstraint {\n\tconst topLevelConstraint = readAdditionalPropertiesConstraint(\n\t\tschema.additionalProperties,\n\t);\n\tif (topLevelConstraint === false) {\n\t\treturn false;\n\t}\n\tconst branchConstraint =\n\t\tcompositionKey === \"allOf\"\n\t\t\t? intersectAdditionalPropertiesConstraints(\n\t\t\t\t\tbranches.map((branch) =>\n\t\t\t\t\t\treadAdditionalPropertiesConstraint(branch.additionalProperties),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t: unionAdditionalPropertiesConstraints(\n\t\t\t\t\tbranches.map((branch) =>\n\t\t\t\t\t\treadAdditionalPropertiesConstraint(branch.additionalProperties),\n\t\t\t\t\t),\n\t\t\t\t);\n\treturn intersectAdditionalPropertiesConstraints([\n\t\ttopLevelConstraint,\n\t\tbranchConstraint,\n\t]);\n}\n\nfunction readAdditionalPropertiesConstraint(\n\tvalue: unknown,\n): AdditionalPropertiesConstraint {\n\tif (value === false) {\n\t\treturn false;\n\t}\n\tif (isRecord(value)) {\n\t\treturn value;\n\t}\n\treturn true;\n}\n\nfunction unionAdditionalPropertiesConstraints(\n\tconstraints: AdditionalPropertiesConstraint[],\n): AdditionalPropertiesConstraint {\n\tif (constraints.some((constraint) => constraint === false)) {\n\t\treturn false;\n\t}\n\tif (constraints.some((constraint) => constraint === true)) {\n\t\treturn true;\n\t}\n\tconst schemas = constraints.filter(isRecord);\n\tif (schemas.length === 0) {\n\t\treturn false;\n\t}\n\treturn combineAdditionalPropertiesSchemas(\"anyOf\", schemas);\n}\n\nfunction intersectAdditionalPropertiesConstraints(\n\tconstraints: AdditionalPropertiesConstraint[],\n): AdditionalPropertiesConstraint {\n\tif (constraints.some((constraint) => constraint === false)) {\n\t\treturn false;\n\t}\n\tconst schemas = constraints.filter(isRecord);\n\tif (schemas.length === 0) {\n\t\treturn true;\n\t}\n\treturn combineAdditionalPropertiesSchemas(\"allOf\", schemas);\n}\n\nfunction combineAdditionalPropertiesSchemas(\n\tcompositionKey: \"allOf\" | \"anyOf\",\n\tschemas: JsonObject[],\n): JsonObject {\n\tconst uniqueSchemas = uniqueJsonItems(schemas).filter(isRecord);\n\tif (uniqueSchemas.length <= 1) {\n\t\treturn uniqueSchemas[0] ?? {};\n\t}\n\treturn { [compositionKey]: uniqueSchemas };\n}\n\nfunction readStringArray(value: unknown): string[] {\n\treturn Array.isArray(value)\n\t\t? value.filter((item): item is string => typeof item === \"string\")\n\t\t: [];\n}\n\nfunction uniqueStrings(values: string[]): string[] {\n\treturn Array.from(new Set(values));\n}\n\nfunction uniqueJsonItems(values: unknown[]): unknown[] {\n\tconst seen = new Set<string>();\n\tconst unique: unknown[] = [];\n\tfor (const value of values) {\n\t\tconst key = schemaJsonKey(value);\n\t\tif (seen.has(key)) {\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tunique.push(value);\n\t}\n\treturn unique;\n}\n\nfunction schemaJsonKey(value: unknown): string {\n\ttry {\n\t\treturn JSON.stringify(value);\n\t} catch {\n\t\treturn String(value);\n\t}\n}\n\nfunction readConstValue(schema: unknown): { found: boolean; value?: unknown } {\n\tif (!isRecord(schema) || !(\"const\" in schema)) {\n\t\treturn { found: false };\n\t}\n\treturn { found: true, value: schema.const };\n}\n\nfunction readSchemaType(schema: unknown): string | undefined {\n\treturn isRecord(schema) && typeof schema.type === \"string\"\n\t\t? schema.type\n\t\t: undefined;\n}\n\nfunction isRecord(value: unknown): value is JsonObject {\n\treturn Boolean(value && typeof value === \"object\" && !Array.isArray(value));\n}\n"]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export interface CodexSubagentDispatchLane {
|
|
2
|
+
laneId: string;
|
|
3
|
+
skillId: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
description: string;
|
|
6
|
+
tags: readonly string[];
|
|
7
|
+
typeAliases: readonly string[];
|
|
8
|
+
capabilityAliases: readonly string[];
|
|
9
|
+
}
|
|
10
|
+
export interface CodexSubagentDispatchTable {
|
|
11
|
+
schemaVersion: "evalops.maestro.codex.subagent-dispatch-table.v1";
|
|
12
|
+
defaultCapability: "code:write";
|
|
13
|
+
a2aSkillLanes: readonly CodexSubagentDispatchLane[];
|
|
14
|
+
}
|
|
15
|
+
export declare const CODEX_SUBAGENT_DISPATCH_TABLE: {
|
|
16
|
+
readonly schemaVersion: "evalops.maestro.codex.subagent-dispatch-table.v1";
|
|
17
|
+
readonly defaultCapability: "code:write";
|
|
18
|
+
readonly a2aSkillLanes: readonly [{
|
|
19
|
+
readonly laneId: "code-writer";
|
|
20
|
+
readonly skillId: "maestro.subagent.code-writer";
|
|
21
|
+
readonly displayName: "Maestro code writer subagent";
|
|
22
|
+
readonly description: "Delegate bounded implementation work to a target-owned Maestro coding child agent.";
|
|
23
|
+
readonly tags: readonly ["maestro", "subagent", "code", "write"];
|
|
24
|
+
readonly typeAliases: readonly ["worker", "coder", "code", "code-writer", "default"];
|
|
25
|
+
readonly capabilityAliases: readonly ["code:write", "code-write", "code:edit", "code-edit", "code:implement", "code-implement"];
|
|
26
|
+
}, {
|
|
27
|
+
readonly laneId: "code-review";
|
|
28
|
+
readonly skillId: "maestro.subagent.code-review";
|
|
29
|
+
readonly displayName: "Maestro code review subagent";
|
|
30
|
+
readonly description: "Delegate code review and risk analysis to a target-owned Maestro review child agent.";
|
|
31
|
+
readonly tags: readonly ["maestro", "subagent", "code", "review"];
|
|
32
|
+
readonly typeAliases: readonly ["pr-review", "review", "reviewer", "code-review", "code-reviewer"];
|
|
33
|
+
readonly capabilityAliases: readonly ["code:review", "code-review"];
|
|
34
|
+
}, {
|
|
35
|
+
readonly laneId: "test-runner";
|
|
36
|
+
readonly skillId: "maestro.subagent.test-runner";
|
|
37
|
+
readonly displayName: "Maestro test runner subagent";
|
|
38
|
+
readonly description: "Delegate test execution, failure triage, and verification evidence capture to a target-owned Maestro child agent.";
|
|
39
|
+
readonly tags: readonly ["maestro", "subagent", "test", "ci"];
|
|
40
|
+
readonly typeAliases: readonly ["test", "qa", "ci", "ci-monitor", "test-runner"];
|
|
41
|
+
readonly capabilityAliases: readonly ["code:test", "code-test", "test:run", "test-run", "test-runner"];
|
|
42
|
+
}, {
|
|
43
|
+
readonly laneId: "repo-explorer";
|
|
44
|
+
readonly skillId: "maestro.subagent.repo-explorer";
|
|
45
|
+
readonly displayName: "Maestro repo explorer subagent";
|
|
46
|
+
readonly description: "Delegate repository inspection and context gathering to a target-owned Maestro exploration child agent.";
|
|
47
|
+
readonly tags: readonly ["maestro", "subagent", "repo", "explore"];
|
|
48
|
+
readonly typeAliases: readonly ["explore", "explorer", "repo-explorer", "research", "competitive-intel", "people-research"];
|
|
49
|
+
readonly capabilityAliases: readonly ["repo:explore", "repo-explore", "repo-explorer", "code:search", "code-search"];
|
|
50
|
+
}, {
|
|
51
|
+
readonly laneId: "release-shepherd";
|
|
52
|
+
readonly skillId: "maestro.subagent.release-shepherd";
|
|
53
|
+
readonly displayName: "Maestro release shepherd subagent";
|
|
54
|
+
readonly description: "Delegate release, rollout, and merge-follow-through work to a target-owned Maestro child agent.";
|
|
55
|
+
readonly tags: readonly ["maestro", "subagent", "release", "deploy"];
|
|
56
|
+
readonly typeAliases: readonly ["release", "release-shepherd"];
|
|
57
|
+
readonly capabilityAliases: readonly ["release:shepherd", "release-shepherd", "release:manage", "release-manage"];
|
|
58
|
+
}];
|
|
59
|
+
};
|
|
60
|
+
export declare const DEFAULT_CODEX_SUBAGENT_DELEGATION_CAPABILITY: "code:write";
|
|
61
|
+
export declare function codexSubagentLaneForType(value: string | undefined): CodexSubagentDispatchLane | undefined;
|
|
62
|
+
export declare function codexSubagentLaneForCapability(value: string | undefined): CodexSubagentDispatchLane | undefined;
|
|
63
|
+
export declare function codexSubagentTypeA2ASkillID(value: string | undefined): string | undefined;
|
|
64
|
+
export declare function codexSubagentCapabilityA2ASkillID(value: string | undefined): string | undefined;
|
|
65
|
+
export declare function codexSubagentSkillToken(value: string | undefined): string | undefined;
|
|
66
|
+
//# sourceMappingURL=subagent-dispatch-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subagent-dispatch-table.d.ts","sourceRoot":"","sources":["../../src/codex/subagent-dispatch-table.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,0BAA0B;IAC1C,aAAa,EAAE,kDAAkD,CAAC;IAClE,iBAAiB,EAAE,YAAY,CAAC;IAChC,aAAa,EAAE,SAAS,yBAAyB,EAAE,CAAC;CACpD;AAED,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FK,CAAC;AAEhD,eAAO,MAAM,4CAA4C,cACT,CAAC;AAyBjD,wBAAgB,wBAAwB,CACvC,KAAK,EAAE,MAAM,GAAG,SAAS,GACvB,yBAAyB,GAAG,SAAS,CAGvC;AAED,wBAAgB,8BAA8B,CAC7C,KAAK,EAAE,MAAM,GAAG,SAAS,GACvB,yBAAyB,GAAG,SAAS,CAGvC;AAED,wBAAgB,2BAA2B,CAC1C,KAAK,EAAE,MAAM,GAAG,SAAS,GACvB,MAAM,GAAG,SAAS,CAKpB;AAED,wBAAgB,iCAAiC,CAChD,KAAK,EAAE,MAAM,GAAG,SAAS,GACvB,MAAM,GAAG,SAAS,CAKpB;AAED,wBAAgB,uBAAuB,CACtC,KAAK,EAAE,MAAM,GAAG,SAAS,GACvB,MAAM,GAAG,SAAS,CAQpB"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
export const CODEX_SUBAGENT_DISPATCH_TABLE = {
|
|
2
|
+
schemaVersion: "evalops.maestro.codex.subagent-dispatch-table.v1",
|
|
3
|
+
defaultCapability: "code:write",
|
|
4
|
+
a2aSkillLanes: [
|
|
5
|
+
{
|
|
6
|
+
laneId: "code-writer",
|
|
7
|
+
skillId: "maestro.subagent.code-writer",
|
|
8
|
+
displayName: "Maestro code writer subagent",
|
|
9
|
+
description: "Delegate bounded implementation work to a target-owned Maestro coding child agent.",
|
|
10
|
+
tags: ["maestro", "subagent", "code", "write"],
|
|
11
|
+
typeAliases: ["worker", "coder", "code", "code-writer", "default"],
|
|
12
|
+
capabilityAliases: [
|
|
13
|
+
"code:write",
|
|
14
|
+
"code-write",
|
|
15
|
+
"code:edit",
|
|
16
|
+
"code-edit",
|
|
17
|
+
"code:implement",
|
|
18
|
+
"code-implement",
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
laneId: "code-review",
|
|
23
|
+
skillId: "maestro.subagent.code-review",
|
|
24
|
+
displayName: "Maestro code review subagent",
|
|
25
|
+
description: "Delegate code review and risk analysis to a target-owned Maestro review child agent.",
|
|
26
|
+
tags: ["maestro", "subagent", "code", "review"],
|
|
27
|
+
typeAliases: [
|
|
28
|
+
"pr-review",
|
|
29
|
+
"review",
|
|
30
|
+
"reviewer",
|
|
31
|
+
"code-review",
|
|
32
|
+
"code-reviewer",
|
|
33
|
+
],
|
|
34
|
+
capabilityAliases: ["code:review", "code-review"],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
laneId: "test-runner",
|
|
38
|
+
skillId: "maestro.subagent.test-runner",
|
|
39
|
+
displayName: "Maestro test runner subagent",
|
|
40
|
+
description: "Delegate test execution, failure triage, and verification evidence capture to a target-owned Maestro child agent.",
|
|
41
|
+
tags: ["maestro", "subagent", "test", "ci"],
|
|
42
|
+
typeAliases: ["test", "qa", "ci", "ci-monitor", "test-runner"],
|
|
43
|
+
capabilityAliases: [
|
|
44
|
+
"code:test",
|
|
45
|
+
"code-test",
|
|
46
|
+
"test:run",
|
|
47
|
+
"test-run",
|
|
48
|
+
"test-runner",
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
laneId: "repo-explorer",
|
|
53
|
+
skillId: "maestro.subagent.repo-explorer",
|
|
54
|
+
displayName: "Maestro repo explorer subagent",
|
|
55
|
+
description: "Delegate repository inspection and context gathering to a target-owned Maestro exploration child agent.",
|
|
56
|
+
tags: ["maestro", "subagent", "repo", "explore"],
|
|
57
|
+
typeAliases: [
|
|
58
|
+
"explore",
|
|
59
|
+
"explorer",
|
|
60
|
+
"repo-explorer",
|
|
61
|
+
"research",
|
|
62
|
+
"competitive-intel",
|
|
63
|
+
"people-research",
|
|
64
|
+
],
|
|
65
|
+
capabilityAliases: [
|
|
66
|
+
"repo:explore",
|
|
67
|
+
"repo-explore",
|
|
68
|
+
"repo-explorer",
|
|
69
|
+
"code:search",
|
|
70
|
+
"code-search",
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
laneId: "release-shepherd",
|
|
75
|
+
skillId: "maestro.subagent.release-shepherd",
|
|
76
|
+
displayName: "Maestro release shepherd subagent",
|
|
77
|
+
description: "Delegate release, rollout, and merge-follow-through work to a target-owned Maestro child agent.",
|
|
78
|
+
tags: ["maestro", "subagent", "release", "deploy"],
|
|
79
|
+
typeAliases: ["release", "release-shepherd"],
|
|
80
|
+
capabilityAliases: [
|
|
81
|
+
"release:shepherd",
|
|
82
|
+
"release-shepherd",
|
|
83
|
+
"release:manage",
|
|
84
|
+
"release-manage",
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
};
|
|
89
|
+
export const DEFAULT_CODEX_SUBAGENT_DELEGATION_CAPABILITY = CODEX_SUBAGENT_DISPATCH_TABLE.defaultCapability;
|
|
90
|
+
function tokenSet(values) {
|
|
91
|
+
return new Set(values
|
|
92
|
+
.map((value) => codexSubagentSkillToken(value))
|
|
93
|
+
.filter((token) => Boolean(token)));
|
|
94
|
+
}
|
|
95
|
+
const lanesByTypeToken = new Map(CODEX_SUBAGENT_DISPATCH_TABLE.a2aSkillLanes.flatMap((lane) => Array.from(tokenSet(lane.typeAliases), (token) => [token, lane])));
|
|
96
|
+
const lanesByCapabilityToken = new Map(CODEX_SUBAGENT_DISPATCH_TABLE.a2aSkillLanes.flatMap((lane) => Array.from(tokenSet(lane.capabilityAliases), (token) => [token, lane])));
|
|
97
|
+
export function codexSubagentLaneForType(value) {
|
|
98
|
+
const token = codexSubagentSkillToken(value);
|
|
99
|
+
return token ? lanesByTypeToken.get(token) : undefined;
|
|
100
|
+
}
|
|
101
|
+
export function codexSubagentLaneForCapability(value) {
|
|
102
|
+
const token = codexSubagentSkillToken(value);
|
|
103
|
+
return token ? lanesByCapabilityToken.get(token) : undefined;
|
|
104
|
+
}
|
|
105
|
+
export function codexSubagentTypeA2ASkillID(value) {
|
|
106
|
+
return codexSubagentA2ASkillID(value, codexSubagentLaneForType(value)?.skillId);
|
|
107
|
+
}
|
|
108
|
+
export function codexSubagentCapabilityA2ASkillID(value) {
|
|
109
|
+
return codexSubagentA2ASkillID(value, codexSubagentLaneForCapability(value)?.skillId);
|
|
110
|
+
}
|
|
111
|
+
export function codexSubagentSkillToken(value) {
|
|
112
|
+
const token = value
|
|
113
|
+
?.trim()
|
|
114
|
+
.toLowerCase()
|
|
115
|
+
.replace(/[:_/. ]+/g, "-")
|
|
116
|
+
.replace(/-{2,}/g, "-")
|
|
117
|
+
.replace(/^-|-$/g, "");
|
|
118
|
+
return token || undefined;
|
|
119
|
+
}
|
|
120
|
+
function codexSubagentA2ASkillID(value, mappedSkillId) {
|
|
121
|
+
const token = codexSubagentSkillToken(value);
|
|
122
|
+
if (!token) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
return mappedSkillId ?? `maestro.subagent.${token}`;
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=subagent-dispatch-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subagent-dispatch-table.js","sourceRoot":"","sources":["../../src/codex/subagent-dispatch-table.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC5C,aAAa,EAAE,kDAAkD;IACjE,iBAAiB,EAAE,YAAY;IAC/B,aAAa,EAAE;QACd;YACC,MAAM,EAAE,aAAa;YACrB,OAAO,EAAE,8BAA8B;YACvC,WAAW,EAAE,8BAA8B;YAC3C,WAAW,EACV,oFAAoF;YACrF,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC;YAC9C,WAAW,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,CAAC;YAClE,iBAAiB,EAAE;gBAClB,YAAY;gBACZ,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,gBAAgB;gBAChB,gBAAgB;aAChB;SACD;QACD;YACC,MAAM,EAAE,aAAa;YACrB,OAAO,EAAE,8BAA8B;YACvC,WAAW,EAAE,8BAA8B;YAC3C,WAAW,EACV,sFAAsF;YACvF,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC;YAC/C,WAAW,EAAE;gBACZ,WAAW;gBACX,QAAQ;gBACR,UAAU;gBACV,aAAa;gBACb,eAAe;aACf;YACD,iBAAiB,EAAE,CAAC,aAAa,EAAE,aAAa,CAAC;SACjD;QACD;YACC,MAAM,EAAE,aAAa;YACrB,OAAO,EAAE,8BAA8B;YACvC,WAAW,EAAE,8BAA8B;YAC3C,WAAW,EACV,mHAAmH;YACpH,IAAI,EAAE,C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CAAC,KAAK,CAAC,EAAE,OAAO,CAC9C,CAAC;AACH,CAAC;AAED,MAAM,UAAU,uBAAuB,CACtC,KAAyB;IAEzB,MAAM,KAAK,GAAG,KAAK;QAClB,EAAE,IAAI,EAAE;SACP,WAAW,EAAE;SACb,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC;SACzB,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;SACtB,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACxB,OAAO,KAAK,IAAI,SAAS,CAAC;AAC3B,CAAC;AAED,SAAS,uBAAuB,CAC/B,KAAyB,EACzB,aAAiC;IAEjC,MAAM,KAAK,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;IAC7C,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,OAAO,aAAa,IAAI,oBAAoB,KAAK,EAAE,CAAC;AACrD,CAAC","sourcesContent":["export interface CodexSubagentDispatchLane {\n\tlaneId: string;\n\tskillId: string;\n\tdisplayName: string;\n\tdescription: string;\n\ttags: readonly string[];\n\ttypeAliases: readonly string[];\n\tcapabilityAliases: readonly string[];\n}\n\nexport interface CodexSubagentDispatchTable {\n\tschemaVersion: \"evalops.maestro.codex.subagent-dispatch-table.v1\";\n\tdefaultCapability: \"code:write\";\n\ta2aSkillLanes: readonly CodexSubagentDispatchLane[];\n}\n\nexport const CODEX_SUBAGENT_DISPATCH_TABLE = {\n\tschemaVersion: \"evalops.maestro.codex.subagent-dispatch-table.v1\",\n\tdefaultCapability: \"code:write\",\n\ta2aSkillLanes: [\n\t\t{\n\t\t\tlaneId: \"code-writer\",\n\t\t\tskillId: \"maestro.subagent.code-writer\",\n\t\t\tdisplayName: \"Maestro code writer subagent\",\n\t\t\tdescription:\n\t\t\t\t\"Delegate bounded implementation work to a target-owned Maestro coding child agent.\",\n\t\t\ttags: [\"maestro\", \"subagent\", \"code\", \"write\"],\n\t\t\ttypeAliases: [\"worker\", \"coder\", \"code\", \"code-writer\", \"default\"],\n\t\t\tcapabilityAliases: [\n\t\t\t\t\"code:write\",\n\t\t\t\t\"code-write\",\n\t\t\t\t\"code:edit\",\n\t\t\t\t\"code-edit\",\n\t\t\t\t\"code:implement\",\n\t\t\t\t\"code-implement\",\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tlaneId: \"code-review\",\n\t\t\tskillId: \"maestro.subagent.code-review\",\n\t\t\tdisplayName: \"Maestro code review subagent\",\n\t\t\tdescription:\n\t\t\t\t\"Delegate code review and risk analysis to a target-owned Maestro review child agent.\",\n\t\t\ttags: [\"maestro\", \"subagent\", \"code\", \"review\"],\n\t\t\ttypeAliases: [\n\t\t\t\t\"pr-review\",\n\t\t\t\t\"review\",\n\t\t\t\t\"reviewer\",\n\t\t\t\t\"code-review\",\n\t\t\t\t\"code-reviewer\",\n\t\t\t],\n\t\t\tcapabilityAliases: [\"code:review\", \"code-review\"],\n\t\t},\n\t\t{\n\t\t\tlaneId: \"test-runner\",\n\t\t\tskillId: \"maestro.subagent.test-runner\",\n\t\t\tdisplayName: \"Maestro test runner subagent\",\n\t\t\tdescription:\n\t\t\t\t\"Delegate test execution, failure triage, and verification evidence capture to a target-owned Maestro child agent.\",\n\t\t\ttags: [\"maestro\", \"subagent\", \"test\", \"ci\"],\n\t\t\ttypeAliases: [\"test\", \"qa\", \"ci\", \"ci-monitor\", \"test-runner\"],\n\t\t\tcapabilityAliases: [\n\t\t\t\t\"code:test\",\n\t\t\t\t\"code-test\",\n\t\t\t\t\"test:run\",\n\t\t\t\t\"test-run\",\n\t\t\t\t\"test-runner\",\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tlaneId: \"repo-explorer\",\n\t\t\tskillId: \"maestro.subagent.repo-explorer\",\n\t\t\tdisplayName: \"Maestro repo explorer subagent\",\n\t\t\tdescription:\n\t\t\t\t\"Delegate repository inspection and context gathering to a target-owned Maestro exploration child agent.\",\n\t\t\ttags: [\"maestro\", \"subagent\", \"repo\", \"explore\"],\n\t\t\ttypeAliases: [\n\t\t\t\t\"explore\",\n\t\t\t\t\"explorer\",\n\t\t\t\t\"repo-explorer\",\n\t\t\t\t\"research\",\n\t\t\t\t\"competitive-intel\",\n\t\t\t\t\"people-research\",\n\t\t\t],\n\t\t\tcapabilityAliases: [\n\t\t\t\t\"repo:explore\",\n\t\t\t\t\"repo-explore\",\n\t\t\t\t\"repo-explorer\",\n\t\t\t\t\"code:search\",\n\t\t\t\t\"code-search\",\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tlaneId: \"release-shepherd\",\n\t\t\tskillId: \"maestro.subagent.release-shepherd\",\n\t\t\tdisplayName: \"Maestro release shepherd subagent\",\n\t\t\tdescription:\n\t\t\t\t\"Delegate release, rollout, and merge-follow-through work to a target-owned Maestro child agent.\",\n\t\t\ttags: [\"maestro\", \"subagent\", \"release\", \"deploy\"],\n\t\t\ttypeAliases: [\"release\", \"release-shepherd\"],\n\t\t\tcapabilityAliases: [\n\t\t\t\t\"release:shepherd\",\n\t\t\t\t\"release-shepherd\",\n\t\t\t\t\"release:manage\",\n\t\t\t\t\"release-manage\",\n\t\t\t],\n\t\t},\n\t],\n} as const satisfies CodexSubagentDispatchTable;\n\nexport const DEFAULT_CODEX_SUBAGENT_DELEGATION_CAPABILITY =\n\tCODEX_SUBAGENT_DISPATCH_TABLE.defaultCapability;\n\nfunction tokenSet(values: readonly string[]): ReadonlySet<string> {\n\treturn new Set(\n\t\tvalues\n\t\t\t.map((value) => codexSubagentSkillToken(value))\n\t\t\t.filter((token): token is string => Boolean(token)),\n\t);\n}\n\nconst lanesByTypeToken = new Map(\n\tCODEX_SUBAGENT_DISPATCH_TABLE.a2aSkillLanes.flatMap((lane) =>\n\t\tArray.from(tokenSet(lane.typeAliases), (token) => [token, lane] as const),\n\t),\n);\n\nconst lanesByCapabilityToken = new Map(\n\tCODEX_SUBAGENT_DISPATCH_TABLE.a2aSkillLanes.flatMap((lane) =>\n\t\tArray.from(\n\t\t\ttokenSet(lane.capabilityAliases),\n\t\t\t(token) => [token, lane] as const,\n\t\t),\n\t),\n);\n\nexport function codexSubagentLaneForType(\n\tvalue: string | undefined,\n): CodexSubagentDispatchLane | undefined {\n\tconst token = codexSubagentSkillToken(value);\n\treturn token ? lanesByTypeToken.get(token) : undefined;\n}\n\nexport function codexSubagentLaneForCapability(\n\tvalue: string | undefined,\n): CodexSubagentDispatchLane | undefined {\n\tconst token = codexSubagentSkillToken(value);\n\treturn token ? lanesByCapabilityToken.get(token) : undefined;\n}\n\nexport function codexSubagentTypeA2ASkillID(\n\tvalue: string | undefined,\n): string | undefined {\n\treturn codexSubagentA2ASkillID(\n\t\tvalue,\n\t\tcodexSubagentLaneForType(value)?.skillId,\n\t);\n}\n\nexport function codexSubagentCapabilityA2ASkillID(\n\tvalue: string | undefined,\n): string | undefined {\n\treturn codexSubagentA2ASkillID(\n\t\tvalue,\n\t\tcodexSubagentLaneForCapability(value)?.skillId,\n\t);\n}\n\nexport function codexSubagentSkillToken(\n\tvalue: string | undefined,\n): string | undefined {\n\tconst token = value\n\t\t?.trim()\n\t\t.toLowerCase()\n\t\t.replace(/[:_/. ]+/g, \"-\")\n\t\t.replace(/-{2,}/g, \"-\")\n\t\t.replace(/^-|-$/g, \"\");\n\treturn token || undefined;\n}\n\nfunction codexSubagentA2ASkillID(\n\tvalue: string | undefined,\n\tmappedSkillId: string | undefined,\n): string | undefined {\n\tconst token = codexSubagentSkillToken(value);\n\tif (!token) {\n\t\treturn undefined;\n\t}\n\treturn mappedSkillId ?? `maestro.subagent.${token}`;\n}\n"]}
|