@open-mercato/enterprise 0.7.1-develop.7193.1.910a5b0a1e → 0.7.1-develop.7194.1.ab4fc81f82
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/.turbo/turbo-build.log +1 -1
- package/README.md +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/dist/modules/agent_orchestrator/acl.js +132 -0
- package/dist/modules/agent_orchestrator/acl.js.map +7 -0
- package/dist/modules/agent_orchestrator/ai-agents.js +57 -0
- package/dist/modules/agent_orchestrator/ai-agents.js.map +7 -0
- package/dist/modules/agent_orchestrator/ai-skills.js +48 -0
- package/dist/modules/agent_orchestrator/ai-skills.js.map +7 -0
- package/dist/modules/agent_orchestrator/ai-tools.js +254 -0
- package/dist/modules/agent_orchestrator/ai-tools.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/agents/[id]/files/route.js +69 -0
- package/dist/modules/agent_orchestrator/api/agents/[id]/files/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/agents/[id]/metrics/route.js +81 -0
- package/dist/modules/agent_orchestrator/api/agents/[id]/metrics/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/agents/[id]/route.js +154 -0
- package/dist/modules/agent_orchestrator/api/agents/[id]/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/agents/[id]/run/route.js +250 -0
- package/dist/modules/agent_orchestrator/api/agents/[id]/run/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/agents/[id]/settings/route.js +105 -0
- package/dist/modules/agent_orchestrator/api/agents/[id]/settings/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/agents/route.js +114 -0
- package/dist/modules/agent_orchestrator/api/agents/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/artifacts/file/[id]/route.js +64 -0
- package/dist/modules/agent_orchestrator/api/artifacts/file/[id]/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/audit/by-instigator/[humanUserId]/route.js +105 -0
- package/dist/modules/agent_orchestrator/api/audit/by-instigator/[humanUserId]/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/auto-approval/settings/route.js +110 -0
- package/dist/modules/agent_orchestrator/api/auto-approval/settings/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/context-bundles/route.js +88 -0
- package/dist/modules/agent_orchestrator/api/context-bundles/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/corrections/route.js +101 -0
- package/dist/modules/agent_orchestrator/api/corrections/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/eval-assertions/preview/route.js +98 -0
- package/dist/modules/agent_orchestrator/api/eval-assertions/preview/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/eval-assertions/route.js +196 -0
- package/dist/modules/agent_orchestrator/api/eval-assertions/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/eval-cases/[id]/approve/route.js +86 -0
- package/dist/modules/agent_orchestrator/api/eval-cases/[id]/approve/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/eval-cases/[id]/archive/route.js +85 -0
- package/dist/modules/agent_orchestrator/api/eval-cases/[id]/archive/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/eval-cases/[id]/route.js +67 -0
- package/dist/modules/agent_orchestrator/api/eval-cases/[id]/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/eval-cases/export/route.js +78 -0
- package/dist/modules/agent_orchestrator/api/eval-cases/export/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/eval-cases/route.js +140 -0
- package/dist/modules/agent_orchestrator/api/eval-cases/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/eval-runs/[id]/cancel/route.js +67 -0
- package/dist/modules/agent_orchestrator/api/eval-runs/[id]/cancel/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/eval-runs/[id]/case-runs/[caseRunId]/results/route.js +66 -0
- package/dist/modules/agent_orchestrator/api/eval-runs/[id]/case-runs/[caseRunId]/results/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/eval-runs/[id]/route.js +111 -0
- package/dist/modules/agent_orchestrator/api/eval-runs/[id]/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/eval-runs/route.js +157 -0
- package/dist/modules/agent_orchestrator/api/eval-runs/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/eval-scorers/route.js +34 -0
- package/dist/modules/agent_orchestrator/api/eval-scorers/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/executions/[id]/route.js +72 -0
- package/dist/modules/agent_orchestrator/api/executions/[id]/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/executions/route.js +185 -0
- package/dist/modules/agent_orchestrator/api/executions/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/features/route.js +61 -0
- package/dist/modules/agent_orchestrator/api/features/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/guardrail-checks/route.js +85 -0
- package/dist/modules/agent_orchestrator/api/guardrail-checks/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/identity/agent/auth/route.js +95 -0
- package/dist/modules/agent_orchestrator/api/identity/agent/auth/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/identity/grants/[id]/revoke/route.js +109 -0
- package/dist/modules/agent_orchestrator/api/identity/grants/[id]/revoke/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/identity/token/route.js +80 -0
- package/dist/modules/agent_orchestrator/api/identity/token/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/identity/well-known/route.js +44 -0
- package/dist/modules/agent_orchestrator/api/identity/well-known/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/metrics/agents/route.js +122 -0
- package/dist/modules/agent_orchestrator/api/metrics/agents/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/metrics/overview/route.js +165 -0
- package/dist/modules/agent_orchestrator/api/metrics/overview/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/openapi.js +29 -0
- package/dist/modules/agent_orchestrator/api/openapi.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/processes/[id]/executions/route.js +160 -0
- package/dist/modules/agent_orchestrator/api/processes/[id]/executions/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/processes/[id]/route.js +53 -0
- package/dist/modules/agent_orchestrator/api/processes/[id]/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/processes/route.js +357 -0
- package/dist/modules/agent_orchestrator/api/processes/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/proposals/[id]/dispose/route.js +111 -0
- package/dist/modules/agent_orchestrator/api/proposals/[id]/dispose/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/proposals/route.js +98 -0
- package/dist/modules/agent_orchestrator/api/proposals/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/runs/[id]/artifact/route.js +71 -0
- package/dist/modules/agent_orchestrator/api/runs/[id]/artifact/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/runs/[id]/artifacts/route.js +66 -0
- package/dist/modules/agent_orchestrator/api/runs/[id]/artifacts/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/runs/[id]/eval-case/route.js +73 -0
- package/dist/modules/agent_orchestrator/api/runs/[id]/eval-case/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/runs/[id]/flag/route.js +74 -0
- package/dist/modules/agent_orchestrator/api/runs/[id]/flag/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/runs/[id]/rerun/route.js +165 -0
- package/dist/modules/agent_orchestrator/api/runs/[id]/rerun/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/runs/[id]/route.js +86 -0
- package/dist/modules/agent_orchestrator/api/runs/[id]/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/runs/route.js +137 -0
- package/dist/modules/agent_orchestrator/api/runs/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/tokens/estimate/route.js +56 -0
- package/dist/modules/agent_orchestrator/api/tokens/estimate/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/trace/ingest/route.js +80 -0
- package/dist/modules/agent_orchestrator/api/trace/ingest/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/web-search/health/route.js +184 -0
- package/dist/modules/agent_orchestrator/api/web-search/health/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/web-search/preview/route.js +150 -0
- package/dist/modules/agent_orchestrator/api/web-search/preview/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/api/web-search/settings/route.js +213 -0
- package/dist/modules/agent_orchestrator/api/web-search/settings/route.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/ActivityTab.js +112 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/ActivityTab.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/AgentConfigDrawer.js +58 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/AgentConfigDrawer.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/AgentHeaderCard.js +117 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/AgentHeaderCard.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/AssertionFormDrawer.js +318 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/AssertionFormDrawer.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/ConfigurationTab.js +126 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/ConfigurationTab.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/EvalCaseDrawer.js +379 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/EvalCaseDrawer.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/EvalResultsDrawer.js +159 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/EvalResultsDrawer.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/EvaluationTab.js +581 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/EvaluationTab.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/FilesTab.js +249 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/FilesTab.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/OverviewTab.js +162 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/OverviewTab.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/RunEvaluationDrawer.js +199 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/RunEvaluationDrawer.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/TokenCalculatorTab.js +137 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/TokenCalculatorTab.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/filesShared.js +97 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/filesShared.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/workspacePrimitives.js +159 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/workspacePrimitives.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/workspaceShared.js +132 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/components/workspaceShared.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/page.js +266 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/page.meta.js +18 -0
- package/dist/modules/agent_orchestrator/backend/agents/[id]/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/agentListFilters.js +44 -0
- package/dist/modules/agent_orchestrator/backend/agents/agentListFilters.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/page.js +439 -0
- package/dist/modules/agent_orchestrator/backend/agents/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/agents/page.meta.js +28 -0
- package/dist/modules/agent_orchestrator/backend/agents/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/audit/by-instigator/[humanUserId]/page.js +80 -0
- package/dist/modules/agent_orchestrator/backend/audit/by-instigator/[humanUserId]/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/audit/by-instigator/[humanUserId]/page.meta.js +19 -0
- package/dist/modules/agent_orchestrator/backend/audit/by-instigator/[humanUserId]/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/audit/page.js +324 -0
- package/dist/modules/agent_orchestrator/backend/audit/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/audit/page.meta.js +27 -0
- package/dist/modules/agent_orchestrator/backend/audit/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/caseload/[proposalId]/page.js +239 -0
- package/dist/modules/agent_orchestrator/backend/caseload/[proposalId]/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/caseload/[proposalId]/page.meta.js +18 -0
- package/dist/modules/agent_orchestrator/backend/caseload/[proposalId]/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/caseload/hooks.js +344 -0
- package/dist/modules/agent_orchestrator/backend/caseload/hooks.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/caseload/page.js +1360 -0
- package/dist/modules/agent_orchestrator/backend/caseload/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/caseload/page.meta.js +25 -0
- package/dist/modules/agent_orchestrator/backend/caseload/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/eval-cases/[id]/page.js +357 -0
- package/dist/modules/agent_orchestrator/backend/eval-cases/[id]/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/eval-cases/[id]/page.meta.js +18 -0
- package/dist/modules/agent_orchestrator/backend/eval-cases/[id]/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/eval-runs/[id]/page.js +595 -0
- package/dist/modules/agent_orchestrator/backend/eval-runs/[id]/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/eval-runs/[id]/page.meta.js +18 -0
- package/dist/modules/agent_orchestrator/backend/eval-runs/[id]/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/overview/page.js +593 -0
- package/dist/modules/agent_orchestrator/backend/overview/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/overview/page.meta.js +27 -0
- package/dist/modules/agent_orchestrator/backend/overview/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/playground/PlaygroundEvalPanel.js +219 -0
- package/dist/modules/agent_orchestrator/backend/playground/PlaygroundEvalPanel.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/playground/page.js +443 -0
- package/dist/modules/agent_orchestrator/backend/playground/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/playground/page.meta.js +24 -0
- package/dist/modules/agent_orchestrator/backend/playground/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/processes/[id]/page.js +611 -0
- package/dist/modules/agent_orchestrator/backend/processes/[id]/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/processes/[id]/page.meta.js +18 -0
- package/dist/modules/agent_orchestrator/backend/processes/[id]/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/MilestoneEditor.js +219 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/MilestoneEditor.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/TriggerEditor.js +326 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/TriggerEditor.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/[id]/page.js +565 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/[id]/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/[id]/page.meta.js +17 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/[id]/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/formHelpers.js +69 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/formHelpers.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/navigation.js +9 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/navigation.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/page.js +735 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/page.meta.js +25 -0
- package/dist/modules/agent_orchestrator/backend/processes/definitions/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/processes/page.js +244 -0
- package/dist/modules/agent_orchestrator/backend/processes/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/processes/page.meta.js +29 -0
- package/dist/modules/agent_orchestrator/backend/processes/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/settings/auto-approval/page.js +204 -0
- package/dist/modules/agent_orchestrator/backend/settings/auto-approval/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/settings/auto-approval/page.meta.js +30 -0
- package/dist/modules/agent_orchestrator/backend/settings/auto-approval/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/settings/web-search/AdapterRow.js +241 -0
- package/dist/modules/agent_orchestrator/backend/settings/web-search/AdapterRow.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/settings/web-search/WebSearchPreview.js +129 -0
- package/dist/modules/agent_orchestrator/backend/settings/web-search/WebSearchPreview.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/settings/web-search/page.js +644 -0
- package/dist/modules/agent_orchestrator/backend/settings/web-search/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/settings/web-search/page.meta.js +32 -0
- package/dist/modules/agent_orchestrator/backend/settings/web-search/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/traces/[id]/page.js +1015 -0
- package/dist/modules/agent_orchestrator/backend/traces/[id]/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/traces/[id]/page.meta.js +18 -0
- package/dist/modules/agent_orchestrator/backend/traces/[id]/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/traces/page.js +477 -0
- package/dist/modules/agent_orchestrator/backend/traces/page.js.map +7 -0
- package/dist/modules/agent_orchestrator/backend/traces/page.meta.js +24 -0
- package/dist/modules/agent_orchestrator/backend/traces/page.meta.js.map +7 -0
- package/dist/modules/agent_orchestrator/cli.js +592 -0
- package/dist/modules/agent_orchestrator/cli.js.map +7 -0
- package/dist/modules/agent_orchestrator/commands/artifacts.js +127 -0
- package/dist/modules/agent_orchestrator/commands/artifacts.js.map +7 -0
- package/dist/modules/agent_orchestrator/commands/corrections.js +284 -0
- package/dist/modules/agent_orchestrator/commands/corrections.js.map +7 -0
- package/dist/modules/agent_orchestrator/commands/dispose.js +265 -0
- package/dist/modules/agent_orchestrator/commands/dispose.js.map +7 -0
- package/dist/modules/agent_orchestrator/commands/evalRuns.js +202 -0
- package/dist/modules/agent_orchestrator/commands/evalRuns.js.map +7 -0
- package/dist/modules/agent_orchestrator/commands/grants.js +119 -0
- package/dist/modules/agent_orchestrator/commands/grants.js.map +7 -0
- package/dist/modules/agent_orchestrator/commands/index.js +11 -0
- package/dist/modules/agent_orchestrator/commands/index.js.map +7 -0
- package/dist/modules/agent_orchestrator/commands/processes.js +130 -0
- package/dist/modules/agent_orchestrator/commands/processes.js.map +7 -0
- package/dist/modules/agent_orchestrator/commands/proposals.js +67 -0
- package/dist/modules/agent_orchestrator/commands/proposals.js.map +7 -0
- package/dist/modules/agent_orchestrator/commands/runActions.js +42 -0
- package/dist/modules/agent_orchestrator/commands/runActions.js.map +7 -0
- package/dist/modules/agent_orchestrator/commands/runs.js +183 -0
- package/dist/modules/agent_orchestrator/commands/runs.js.map +7 -0
- package/dist/modules/agent_orchestrator/commands/trace.js +89 -0
- package/dist/modules/agent_orchestrator/commands/trace.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/AgentIoDrawer.js +45 -0
- package/dist/modules/agent_orchestrator/components/AgentIoDrawer.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/AgentTimeline.js +129 -0
- package/dist/modules/agent_orchestrator/components/AgentTimeline.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/DisposeDialog.js +87 -0
- package/dist/modules/agent_orchestrator/components/DisposeDialog.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/EmptyArt.js +50 -0
- package/dist/modules/agent_orchestrator/components/EmptyArt.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/InvokeAgentNodeConfig.js +111 -0
- package/dist/modules/agent_orchestrator/components/InvokeAgentNodeConfig.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/ProcessOutcomeLink.js +42 -0
- package/dist/modules/agent_orchestrator/components/ProcessOutcomeLink.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/ProposalCard.js +431 -0
- package/dist/modules/agent_orchestrator/components/ProposalCard.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/ProposalFacts.js +85 -0
- package/dist/modules/agent_orchestrator/components/ProposalFacts.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/ProposalOptionList.js +190 -0
- package/dist/modules/agent_orchestrator/components/ProposalOptionList.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/ProposeOnlyNotice.js +25 -0
- package/dist/modules/agent_orchestrator/components/ProposeOnlyNotice.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/SkillDrawer.js +48 -0
- package/dist/modules/agent_orchestrator/components/SkillDrawer.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/StartHereGuide.js +183 -0
- package/dist/modules/agent_orchestrator/components/StartHereGuide.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/SystemHealthTile.js +135 -0
- package/dist/modules/agent_orchestrator/components/SystemHealthTile.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/WebSearchActivity.js +87 -0
- package/dist/modules/agent_orchestrator/components/WebSearchActivity.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/agentChips.js +90 -0
- package/dist/modules/agent_orchestrator/components/agentChips.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/cockpitStatus.js +94 -0
- package/dist/modules/agent_orchestrator/components/cockpitStatus.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/evalRunTypes.js +209 -0
- package/dist/modules/agent_orchestrator/components/evalRunTypes.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/health/HealthRow.js +15 -0
- package/dist/modules/agent_orchestrator/components/health/HealthRow.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/health/HealthStateBadge.js +13 -0
- package/dist/modules/agent_orchestrator/components/health/HealthStateBadge.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/health/SystemHealthPanel.js +126 -0
- package/dist/modules/agent_orchestrator/components/health/SystemHealthPanel.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/health/vocabulary.js +40 -0
- package/dist/modules/agent_orchestrator/components/health/vocabulary.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/optionalRequest.js +7 -0
- package/dist/modules/agent_orchestrator/components/optionalRequest.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/playgroundRunError.js +37 -0
- package/dist/modules/agent_orchestrator/components/playgroundRunError.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/playgroundToolCalls.js +12 -0
- package/dist/modules/agent_orchestrator/components/playgroundToolCalls.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/processTypes.js +454 -0
- package/dist/modules/agent_orchestrator/components/processTypes.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/proposalCaseStatus.js +64 -0
- package/dist/modules/agent_orchestrator/components/proposalCaseStatus.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/proposalEdit.js +71 -0
- package/dist/modules/agent_orchestrator/components/proposalEdit.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/proposalFactsData.js +138 -0
- package/dist/modules/agent_orchestrator/components/proposalFactsData.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/serverSort.js +34 -0
- package/dist/modules/agent_orchestrator/components/serverSort.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/subjectRef.js +34 -0
- package/dist/modules/agent_orchestrator/components/subjectRef.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/types.js +462 -0
- package/dist/modules/agent_orchestrator/components/types.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/useAgentIcons.js +31 -0
- package/dist/modules/agent_orchestrator/components/useAgentIcons.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/useAgentLabels.js +35 -0
- package/dist/modules/agent_orchestrator/components/useAgentLabels.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/useAgentTags.js +32 -0
- package/dist/modules/agent_orchestrator/components/useAgentTags.js.map +7 -0
- package/dist/modules/agent_orchestrator/components/useCoalescedReload.js +33 -0
- package/dist/modules/agent_orchestrator/components/useCoalescedReload.js.map +7 -0
- package/dist/modules/agent_orchestrator/data/agentIcons.js +35 -0
- package/dist/modules/agent_orchestrator/data/agentIcons.js.map +7 -0
- package/dist/modules/agent_orchestrator/data/agentTags.js +26 -0
- package/dist/modules/agent_orchestrator/data/agentTags.js.map +7 -0
- package/dist/modules/agent_orchestrator/data/entities.js +1382 -0
- package/dist/modules/agent_orchestrator/data/entities.js.map +7 -0
- package/dist/modules/agent_orchestrator/data/proposalEnvelope.js +168 -0
- package/dist/modules/agent_orchestrator/data/proposalEnvelope.js.map +7 -0
- package/dist/modules/agent_orchestrator/data/validators.js +949 -0
- package/dist/modules/agent_orchestrator/data/validators.js.map +7 -0
- package/dist/modules/agent_orchestrator/di.js +169 -0
- package/dist/modules/agent_orchestrator/di.js.map +7 -0
- package/dist/modules/agent_orchestrator/encryption.js +100 -0
- package/dist/modules/agent_orchestrator/encryption.js.map +7 -0
- package/dist/modules/agent_orchestrator/events.js +87 -0
- package/dist/modules/agent_orchestrator/events.js.map +7 -0
- package/dist/modules/agent_orchestrator/examples/deals-health-check-workflow.json +124 -0
- package/dist/modules/agent_orchestrator/examples/refund-triage-workflow.json +210 -0
- package/dist/modules/agent_orchestrator/generated/file-agents.generated.js +169 -0
- package/dist/modules/agent_orchestrator/generated/file-agents.generated.js.map +7 -0
- package/dist/modules/agent_orchestrator/i18n/de.json +1495 -0
- package/dist/modules/agent_orchestrator/i18n/en.json +1495 -0
- package/dist/modules/agent_orchestrator/i18n/es.json +1495 -0
- package/dist/modules/agent_orchestrator/i18n/ko.json +1495 -0
- package/dist/modules/agent_orchestrator/i18n/pl.json +1495 -0
- package/dist/modules/agent_orchestrator/index.js +151 -0
- package/dist/modules/agent_orchestrator/index.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/automationLinks.js +12 -0
- package/dist/modules/agent_orchestrator/lib/automationLinks.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/context/contextResolver.js +317 -0
- package/dist/modules/agent_orchestrator/lib/context/contextResolver.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/context/documentIngest.js +93 -0
- package/dist/modules/agent_orchestrator/lib/context/documentIngest.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/context/documentOcrProvider.js +90 -0
- package/dist/modules/agent_orchestrator/lib/context/documentOcrProvider.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/context/documentSource.js +44 -0
- package/dist/modules/agent_orchestrator/lib/context/documentSource.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/context/index.js +64 -0
- package/dist/modules/agent_orchestrator/lib/context/index.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/context/packer.js +47 -0
- package/dist/modules/agent_orchestrator/lib/context/packer.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/context/redactor.js +72 -0
- package/dist/modules/agent_orchestrator/lib/context/redactor.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/context/registry.js +60 -0
- package/dist/modules/agent_orchestrator/lib/context/registry.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/context/retrievalSource.js +69 -0
- package/dist/modules/agent_orchestrator/lib/context/retrievalSource.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/crudCache.js +24 -0
- package/dist/modules/agent_orchestrator/lib/crudCache.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/disposition/autoApprovalPolicy.js +51 -0
- package/dist/modules/agent_orchestrator/lib/disposition/autoApprovalPolicy.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/disposition/dispositionService.js +190 -0
- package/dist/modules/agent_orchestrator/lib/disposition/dispositionService.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/disposition/resume.js +42 -0
- package/dist/modules/agent_orchestrator/lib/disposition/resume.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/disposition/tenantAutoApprovalPolicy.js +59 -0
- package/dist/modules/agent_orchestrator/lib/disposition/tenantAutoApprovalPolicy.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/assertionResolution.js +53 -0
- package/dist/modules/agent_orchestrator/lib/eval/assertionResolution.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/canonicalInputKey.js +20 -0
- package/dist/modules/agent_orchestrator/lib/eval/canonicalInputKey.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/defaultAssertions.js +78 -0
- package/dist/modules/agent_orchestrator/lib/eval/defaultAssertions.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/evalGate.js +71 -0
- package/dist/modules/agent_orchestrator/lib/eval/evalGate.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/evalReplayService.js +277 -0
- package/dist/modules/agent_orchestrator/lib/eval/evalReplayService.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/evalRuntimeService.js +141 -0
- package/dist/modules/agent_orchestrator/lib/eval/evalRuntimeService.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/judgeRubric.js +150 -0
- package/dist/modules/agent_orchestrator/lib/eval/judgeRubric.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/llmJudge.js +122 -0
- package/dist/modules/agent_orchestrator/lib/eval/llmJudge.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/projectRunView.js +32 -0
- package/dist/modules/agent_orchestrator/lib/eval/projectRunView.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/agent.js +240 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/agent.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/economics.js +77 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/economics.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/index.js +97 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/index.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/judge.js +66 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/judge.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/shared.js +146 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/shared.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/structured.js +264 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/structured.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/text.js +110 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/text.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/tools.js +232 -0
- package/dist/modules/agent_orchestrator/lib/eval/registry/tools.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/sampling.js +26 -0
- package/dist/modules/agent_orchestrator/lib/eval/sampling.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/scorers.js +46 -0
- package/dist/modules/agent_orchestrator/lib/eval/scorers.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/eval/types.js +16 -0
- package/dist/modules/agent_orchestrator/lib/eval/types.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/featureFlags.js +9 -0
- package/dist/modules/agent_orchestrator/lib/featureFlags.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/guardrails/grounding.js +90 -0
- package/dist/modules/agent_orchestrator/lib/guardrails/grounding.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/guardrails/groundingSets.js +35 -0
- package/dist/modules/agent_orchestrator/lib/guardrails/groundingSets.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/guardrails/guardrailService.js +160 -0
- package/dist/modules/agent_orchestrator/lib/guardrails/guardrailService.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/guardrails/promptInjection.js +94 -0
- package/dist/modules/agent_orchestrator/lib/guardrails/promptInjection.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/guardrails/publicEndpointRateLimit.js +36 -0
- package/dist/modules/agent_orchestrator/lib/guardrails/publicEndpointRateLimit.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/guardrails/syncGroundingSets.js +43 -0
- package/dist/modules/agent_orchestrator/lib/guardrails/syncGroundingSets.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/identity/agentAuthMdService.js +136 -0
- package/dist/modules/agent_orchestrator/lib/identity/agentAuthMdService.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/identity/agentDelegationGrantService.js +55 -0
- package/dist/modules/agent_orchestrator/lib/identity/agentDelegationGrantService.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/identity/agentNoBypassSubscriber.js +50 -0
- package/dist/modules/agent_orchestrator/lib/identity/agentNoBypassSubscriber.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/identity/agentPrincipalService.js +149 -0
- package/dist/modules/agent_orchestrator/lib/identity/agentPrincipalService.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/identity/agentTokenService.js +138 -0
- package/dist/modules/agent_orchestrator/lib/identity/agentTokenService.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/identity/agentWriteScope.js +22 -0
- package/dist/modules/agent_orchestrator/lib/identity/agentWriteScope.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/metrics/metricRollupService.js +112 -0
- package/dist/modules/agent_orchestrator/lib/metrics/metricRollupService.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/processes/executionSearch.js +16 -0
- package/dist/modules/agent_orchestrator/lib/processes/executionSearch.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/processes/materializeAgentWorkflow.js +178 -0
- package/dist/modules/agent_orchestrator/lib/processes/materializeAgentWorkflow.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/processes/processProjection.js +220 -0
- package/dist/modules/agent_orchestrator/lib/processes/processProjection.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/processes/subjectContext.js +14 -0
- package/dist/modules/agent_orchestrator/lib/processes/subjectContext.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/processes/workflowGrant.js +41 -0
- package/dist/modules/agent_orchestrator/lib/processes/workflowGrant.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/queue.js +25 -0
- package/dist/modules/agent_orchestrator/lib/queue.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/actionVocabulary.js +66 -0
- package/dist/modules/agent_orchestrator/lib/runtime/actionVocabulary.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/admission.js +113 -0
- package/dist/modules/agent_orchestrator/lib/runtime/admission.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/agentRunSessionStore.js +92 -0
- package/dist/modules/agent_orchestrator/lib/runtime/agentRunSessionStore.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/agentRuntime.js +67 -0
- package/dist/modules/agent_orchestrator/lib/runtime/agentRuntime.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/agentWorkspaceManager.js +111 -0
- package/dist/modules/agent_orchestrator/lib/runtime/agentWorkspaceManager.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/artifactCollector.js +146 -0
- package/dist/modules/agent_orchestrator/lib/runtime/artifactCollector.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/artifactFileStore.js +85 -0
- package/dist/modules/agent_orchestrator/lib/runtime/artifactFileStore.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/attachmentStager.js +62 -0
- package/dist/modules/agent_orchestrator/lib/runtime/attachmentStager.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/errors.js +38 -0
- package/dist/modules/agent_orchestrator/lib/runtime/errors.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/executeProposal.js +37 -0
- package/dist/modules/agent_orchestrator/lib/runtime/executeProposal.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/fileAgentSkills.js +32 -0
- package/dist/modules/agent_orchestrator/lib/runtime/fileAgentSkills.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/fileInput.js +27 -0
- package/dist/modules/agent_orchestrator/lib/runtime/fileInput.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/invokeAgentForWorkflow.js +115 -0
- package/dist/modules/agent_orchestrator/lib/runtime/invokeAgentForWorkflow.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/modelPricing.js +77 -0
- package/dist/modules/agent_orchestrator/lib/runtime/modelPricing.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/nativeAgentRunner.js +422 -0
- package/dist/modules/agent_orchestrator/lib/runtime/nativeAgentRunner.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/nativeTraceCapture.js +132 -0
- package/dist/modules/agent_orchestrator/lib/runtime/nativeTraceCapture.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/openCodeAgentRunner.js +581 -0
- package/dist/modules/agent_orchestrator/lib/runtime/openCodeAgentRunner.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/persistence.js +110 -0
- package/dist/modules/agent_orchestrator/lib/runtime/persistence.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/providerBudget.js +152 -0
- package/dist/modules/agent_orchestrator/lib/runtime/providerBudget.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/rerunContext.js +13 -0
- package/dist/modules/agent_orchestrator/lib/runtime/rerunContext.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/runContext.js +17 -0
- package/dist/modules/agent_orchestrator/lib/runtime/runContext.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/runtime/sandboxedScript.js +39 -0
- package/dist/modules/agent_orchestrator/lib/runtime/sandboxedScript.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/sdk/agentMarkdown.js +91 -0
- package/dist/modules/agent_orchestrator/lib/sdk/agentMarkdown.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/sdk/agentOutcomeContract.js +35 -0
- package/dist/modules/agent_orchestrator/lib/sdk/agentOutcomeContract.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/sdk/defineAgent.js +214 -0
- package/dist/modules/agent_orchestrator/lib/sdk/defineAgent.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/sdk/defineFileAgent.js +417 -0
- package/dist/modules/agent_orchestrator/lib/sdk/defineFileAgent.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/sdk/defineSkill.js +40 -0
- package/dist/modules/agent_orchestrator/lib/sdk/defineSkill.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/sdk/outcomeSchema.js +129 -0
- package/dist/modules/agent_orchestrator/lib/sdk/outcomeSchema.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/sdk/skillMarkdown.js +78 -0
- package/dist/modules/agent_orchestrator/lib/sdk/skillMarkdown.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/seeds.js +224 -0
- package/dist/modules/agent_orchestrator/lib/seeds.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/settings/agentSettings.js +55 -0
- package/dist/modules/agent_orchestrator/lib/settings/agentSettings.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/systemHealth.js +94 -0
- package/dist/modules/agent_orchestrator/lib/systemHealth.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/tasks/eventTriggerMatch.js +81 -0
- package/dist/modules/agent_orchestrator/lib/tasks/eventTriggerMatch.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/tasks/milestones.js +96 -0
- package/dist/modules/agent_orchestrator/lib/tasks/milestones.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/tasks/outcome.js +44 -0
- package/dist/modules/agent_orchestrator/lib/tasks/outcome.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/tasks/outcomeLink.js +45 -0
- package/dist/modules/agent_orchestrator/lib/tasks/outcomeLink.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/tasks/schedule.js +63 -0
- package/dist/modules/agent_orchestrator/lib/tasks/schedule.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/tasks/scheduleValidation.js +25 -0
- package/dist/modules/agent_orchestrator/lib/tasks/scheduleValidation.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/tasks/triggers.js +34 -0
- package/dist/modules/agent_orchestrator/lib/tasks/triggers.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/tokens/computeAgentTokenUsage.js +70 -0
- package/dist/modules/agent_orchestrator/lib/tokens/computeAgentTokenUsage.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/tokens/types.js +1 -0
- package/dist/modules/agent_orchestrator/lib/tokens/types.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/trace/artifactStore.js +89 -0
- package/dist/modules/agent_orchestrator/lib/trace/artifactStore.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/trace/correctionService.js +61 -0
- package/dist/modules/agent_orchestrator/lib/trace/correctionService.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/trace/ingestAuth.js +39 -0
- package/dist/modules/agent_orchestrator/lib/trace/ingestAuth.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/trace/redactToolSummary.js +44 -0
- package/dist/modules/agent_orchestrator/lib/trace/redactToolSummary.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/trace/spanTimeline.js +96 -0
- package/dist/modules/agent_orchestrator/lib/trace/spanTimeline.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/trace/traceIngestionService.js +168 -0
- package/dist/modules/agent_orchestrator/lib/trace/traceIngestionService.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/guardrails.js +116 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/guardrails.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/healthCache.js +68 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/healthCache.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/healthProbePlan.js +16 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/healthProbePlan.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/policy.js +172 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/policy.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/registry.js +113 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/registry.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/secretStorage.js +87 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/secretStorage.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/steps.js +48 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/steps.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/tools.js +176 -0
- package/dist/modules/agent_orchestrator/lib/webSearch/tools.js.map +7 -0
- package/dist/modules/agent_orchestrator/lib/workInbox/agentDispositionSource.js +151 -0
- package/dist/modules/agent_orchestrator/lib/workInbox/agentDispositionSource.js.map +7 -0
- package/dist/modules/agent_orchestrator/migrations/Migration20260906141535_agent_orchestrator.js +200 -0
- package/dist/modules/agent_orchestrator/migrations/Migration20260906141535_agent_orchestrator.js.map +7 -0
- package/dist/modules/agent_orchestrator/notifications.js +32 -0
- package/dist/modules/agent_orchestrator/notifications.js.map +7 -0
- package/dist/modules/agent_orchestrator/setup.js +147 -0
- package/dist/modules/agent_orchestrator/setup.js.map +7 -0
- package/dist/modules/agent_orchestrator/subscribers/process-event-trigger.js +140 -0
- package/dist/modules/agent_orchestrator/subscribers/process-event-trigger.js.map +7 -0
- package/dist/modules/agent_orchestrator/subscribers/process-proposal-created.js +17 -0
- package/dist/modules/agent_orchestrator/subscribers/process-proposal-created.js.map +7 -0
- package/dist/modules/agent_orchestrator/subscribers/process-proposal-disposed.js +15 -0
- package/dist/modules/agent_orchestrator/subscribers/process-proposal-disposed.js.map +7 -0
- package/dist/modules/agent_orchestrator/subscribers/process-run-completed.js +17 -0
- package/dist/modules/agent_orchestrator/subscribers/process-run-completed.js.map +7 -0
- package/dist/modules/agent_orchestrator/subscribers/process-run-ingested.js +17 -0
- package/dist/modules/agent_orchestrator/subscribers/process-run-ingested.js.map +7 -0
- package/dist/modules/agent_orchestrator/subscribers/process-workflow-cancelled.js +20 -0
- package/dist/modules/agent_orchestrator/subscribers/process-workflow-cancelled.js.map +7 -0
- package/dist/modules/agent_orchestrator/subscribers/process-workflow-completed.js +20 -0
- package/dist/modules/agent_orchestrator/subscribers/process-workflow-completed.js.map +7 -0
- package/dist/modules/agent_orchestrator/subscribers/process-workflow-failed.js +21 -0
- package/dist/modules/agent_orchestrator/subscribers/process-workflow-failed.js.map +7 -0
- package/dist/modules/agent_orchestrator/subscribers/process-workflow-milestone.js +30 -0
- package/dist/modules/agent_orchestrator/subscribers/process-workflow-milestone.js.map +7 -0
- package/dist/modules/agent_orchestrator/subscribers/process-workflow-started.js +25 -0
- package/dist/modules/agent_orchestrator/subscribers/process-workflow-started.js.map +7 -0
- package/dist/modules/agent_orchestrator/subscribers/proposal-disposed-notification-clear.js +34 -0
- package/dist/modules/agent_orchestrator/subscribers/proposal-disposed-notification-clear.js.map +7 -0
- package/dist/modules/agent_orchestrator/subscribers/proposal-pending-notification.js +53 -0
- package/dist/modules/agent_orchestrator/subscribers/proposal-pending-notification.js.map +7 -0
- package/dist/modules/agent_orchestrator/widgets/injection/caseload-nav-badge/widget.client.js +44 -0
- package/dist/modules/agent_orchestrator/widgets/injection/caseload-nav-badge/widget.client.js.map +7 -0
- package/dist/modules/agent_orchestrator/widgets/injection/caseload-nav-badge/widget.js +17 -0
- package/dist/modules/agent_orchestrator/widgets/injection/caseload-nav-badge/widget.js.map +7 -0
- package/dist/modules/agent_orchestrator/widgets/injection/task-proposal-draft/widget.client.js +107 -0
- package/dist/modules/agent_orchestrator/widgets/injection/task-proposal-draft/widget.client.js.map +7 -0
- package/dist/modules/agent_orchestrator/widgets/injection/task-proposal-draft/widget.js +17 -0
- package/dist/modules/agent_orchestrator/widgets/injection/task-proposal-draft/widget.js.map +7 -0
- package/dist/modules/agent_orchestrator/widgets/injection/task-proposal-link/widget.js +28 -0
- package/dist/modules/agent_orchestrator/widgets/injection/task-proposal-link/widget.js.map +7 -0
- package/dist/modules/agent_orchestrator/widgets/injection-table.js +33 -0
- package/dist/modules/agent_orchestrator/widgets/injection-table.js.map +7 -0
- package/dist/modules/agent_orchestrator/workers/eval-suite-runner.js +56 -0
- package/dist/modules/agent_orchestrator/workers/eval-suite-runner.js.map +7 -0
- package/dist/modules/agent_orchestrator/workers/llm-judge.js +29 -0
- package/dist/modules/agent_orchestrator/workers/llm-judge.js.map +7 -0
- package/dist/modules/agent_orchestrator/workers/metric-rollup.js +29 -0
- package/dist/modules/agent_orchestrator/workers/metric-rollup.js.map +7 -0
- package/dist/modules/agent_orchestrator/workers/process-execution-starter.js +130 -0
- package/dist/modules/agent_orchestrator/workers/process-execution-starter.js.map +7 -0
- package/dist/modules/record_locks/lib/conflictValues.js +78 -0
- package/dist/modules/record_locks/lib/conflictValues.js.map +7 -0
- package/dist/modules/record_locks/lib/crudMutationGuardService.js +19 -4
- package/dist/modules/record_locks/lib/crudMutationGuardService.js.map +2 -2
- package/dist/modules/record_locks/lib/recordLockService.js +1 -44
- package/dist/modules/record_locks/lib/recordLockService.js.map +2 -2
- package/jest.config.cjs +2 -0
- package/package.json +18 -6
- package/src/index.ts +1 -1
- package/src/modules/agent_orchestrator/.ai/skills/om-create-opencode-agent/SKILL.md +251 -0
- package/src/modules/agent_orchestrator/AGENTS.md +374 -0
- package/src/modules/agent_orchestrator/DEMO.md +175 -0
- package/src/modules/agent_orchestrator/acl.ts +131 -0
- package/src/modules/agent_orchestrator/ai-agents.ts +70 -0
- package/src/modules/agent_orchestrator/ai-skills.ts +59 -0
- package/src/modules/agent_orchestrator/ai-tools.ts +391 -0
- package/src/modules/agent_orchestrator/api/agents/[id]/files/route.ts +77 -0
- package/src/modules/agent_orchestrator/api/agents/[id]/metrics/route.ts +106 -0
- package/src/modules/agent_orchestrator/api/agents/[id]/route.ts +166 -0
- package/src/modules/agent_orchestrator/api/agents/[id]/run/route.ts +339 -0
- package/src/modules/agent_orchestrator/api/agents/[id]/settings/route.ts +119 -0
- package/src/modules/agent_orchestrator/api/agents/route.ts +124 -0
- package/src/modules/agent_orchestrator/api/artifacts/file/[id]/route.ts +80 -0
- package/src/modules/agent_orchestrator/api/audit/by-instigator/[humanUserId]/route.ts +143 -0
- package/src/modules/agent_orchestrator/api/auto-approval/settings/route.ts +143 -0
- package/src/modules/agent_orchestrator/api/context-bundles/route.ts +89 -0
- package/src/modules/agent_orchestrator/api/corrections/route.ts +119 -0
- package/src/modules/agent_orchestrator/api/eval-assertions/preview/route.ts +123 -0
- package/src/modules/agent_orchestrator/api/eval-assertions/route.ts +228 -0
- package/src/modules/agent_orchestrator/api/eval-cases/[id]/approve/route.ts +101 -0
- package/src/modules/agent_orchestrator/api/eval-cases/[id]/archive/route.ts +100 -0
- package/src/modules/agent_orchestrator/api/eval-cases/[id]/route.ts +84 -0
- package/src/modules/agent_orchestrator/api/eval-cases/export/route.ts +92 -0
- package/src/modules/agent_orchestrator/api/eval-cases/route.ts +159 -0
- package/src/modules/agent_orchestrator/api/eval-runs/[id]/cancel/route.ts +78 -0
- package/src/modules/agent_orchestrator/api/eval-runs/[id]/case-runs/[caseRunId]/results/route.ts +82 -0
- package/src/modules/agent_orchestrator/api/eval-runs/[id]/route.ts +133 -0
- package/src/modules/agent_orchestrator/api/eval-runs/route.ts +197 -0
- package/src/modules/agent_orchestrator/api/eval-scorers/route.ts +51 -0
- package/src/modules/agent_orchestrator/api/executions/[id]/route.ts +106 -0
- package/src/modules/agent_orchestrator/api/executions/route.ts +206 -0
- package/src/modules/agent_orchestrator/api/features/route.ts +71 -0
- package/src/modules/agent_orchestrator/api/guardrail-checks/route.ts +86 -0
- package/src/modules/agent_orchestrator/api/identity/agent/auth/route.ts +121 -0
- package/src/modules/agent_orchestrator/api/identity/grants/[id]/revoke/route.ts +133 -0
- package/src/modules/agent_orchestrator/api/identity/token/route.ts +102 -0
- package/src/modules/agent_orchestrator/api/identity/well-known/route.ts +60 -0
- package/src/modules/agent_orchestrator/api/metrics/agents/route.ts +160 -0
- package/src/modules/agent_orchestrator/api/metrics/overview/route.ts +240 -0
- package/src/modules/agent_orchestrator/api/openapi.ts +31 -0
- package/src/modules/agent_orchestrator/api/processes/[id]/executions/route.ts +211 -0
- package/src/modules/agent_orchestrator/api/processes/[id]/route.ts +70 -0
- package/src/modules/agent_orchestrator/api/processes/route.ts +458 -0
- package/src/modules/agent_orchestrator/api/proposals/[id]/dispose/route.ts +131 -0
- package/src/modules/agent_orchestrator/api/proposals/route.ts +113 -0
- package/src/modules/agent_orchestrator/api/runs/[id]/artifact/route.ts +93 -0
- package/src/modules/agent_orchestrator/api/runs/[id]/artifacts/route.ts +83 -0
- package/src/modules/agent_orchestrator/api/runs/[id]/eval-case/route.ts +91 -0
- package/src/modules/agent_orchestrator/api/runs/[id]/flag/route.ts +89 -0
- package/src/modules/agent_orchestrator/api/runs/[id]/rerun/route.ts +195 -0
- package/src/modules/agent_orchestrator/api/runs/[id]/route.ts +102 -0
- package/src/modules/agent_orchestrator/api/runs/route.ts +146 -0
- package/src/modules/agent_orchestrator/api/tokens/estimate/route.ts +61 -0
- package/src/modules/agent_orchestrator/api/trace/ingest/route.ts +98 -0
- package/src/modules/agent_orchestrator/api/web-search/health/route.ts +268 -0
- package/src/modules/agent_orchestrator/api/web-search/preview/route.ts +184 -0
- package/src/modules/agent_orchestrator/api/web-search/settings/route.ts +309 -0
- package/src/modules/agent_orchestrator/auth.md +107 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/ActivityTab.tsx +118 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/AgentConfigDrawer.tsx +96 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/AgentHeaderCard.tsx +174 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/AssertionFormDrawer.tsx +418 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/ConfigurationTab.tsx +185 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/EvalCaseDrawer.tsx +488 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/EvalResultsDrawer.tsx +244 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/EvaluationTab.tsx +715 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/FilesTab.tsx +328 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/OverviewTab.tsx +211 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/RunEvaluationDrawer.tsx +247 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/TokenCalculatorTab.tsx +143 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/filesShared.ts +149 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/workspacePrimitives.tsx +236 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/components/workspaceShared.ts +193 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/page.meta.ts +14 -0
- package/src/modules/agent_orchestrator/backend/agents/[id]/page.tsx +335 -0
- package/src/modules/agent_orchestrator/backend/agents/agentListFilters.ts +95 -0
- package/src/modules/agent_orchestrator/backend/agents/page.meta.ts +26 -0
- package/src/modules/agent_orchestrator/backend/agents/page.tsx +549 -0
- package/src/modules/agent_orchestrator/backend/audit/by-instigator/[humanUserId]/page.meta.ts +15 -0
- package/src/modules/agent_orchestrator/backend/audit/by-instigator/[humanUserId]/page.tsx +126 -0
- package/src/modules/agent_orchestrator/backend/audit/page.meta.ts +25 -0
- package/src/modules/agent_orchestrator/backend/audit/page.tsx +392 -0
- package/src/modules/agent_orchestrator/backend/caseload/[proposalId]/page.meta.ts +14 -0
- package/src/modules/agent_orchestrator/backend/caseload/[proposalId]/page.tsx +298 -0
- package/src/modules/agent_orchestrator/backend/caseload/hooks.ts +583 -0
- package/src/modules/agent_orchestrator/backend/caseload/page.meta.ts +23 -0
- package/src/modules/agent_orchestrator/backend/caseload/page.tsx +1761 -0
- package/src/modules/agent_orchestrator/backend/eval-cases/[id]/page.meta.ts +14 -0
- package/src/modules/agent_orchestrator/backend/eval-cases/[id]/page.tsx +446 -0
- package/src/modules/agent_orchestrator/backend/eval-runs/[id]/page.meta.ts +14 -0
- package/src/modules/agent_orchestrator/backend/eval-runs/[id]/page.tsx +824 -0
- package/src/modules/agent_orchestrator/backend/overview/page.meta.ts +25 -0
- package/src/modules/agent_orchestrator/backend/overview/page.tsx +755 -0
- package/src/modules/agent_orchestrator/backend/playground/PlaygroundEvalPanel.tsx +292 -0
- package/src/modules/agent_orchestrator/backend/playground/page.meta.ts +22 -0
- package/src/modules/agent_orchestrator/backend/playground/page.tsx +647 -0
- package/src/modules/agent_orchestrator/backend/processes/[id]/page.meta.ts +14 -0
- package/src/modules/agent_orchestrator/backend/processes/[id]/page.tsx +856 -0
- package/src/modules/agent_orchestrator/backend/processes/definitions/MilestoneEditor.tsx +285 -0
- package/src/modules/agent_orchestrator/backend/processes/definitions/TriggerEditor.tsx +391 -0
- package/src/modules/agent_orchestrator/backend/processes/definitions/[id]/page.meta.ts +13 -0
- package/src/modules/agent_orchestrator/backend/processes/definitions/[id]/page.tsx +705 -0
- package/src/modules/agent_orchestrator/backend/processes/definitions/formHelpers.ts +100 -0
- package/src/modules/agent_orchestrator/backend/processes/definitions/navigation.ts +6 -0
- package/src/modules/agent_orchestrator/backend/processes/definitions/page.meta.ts +23 -0
- package/src/modules/agent_orchestrator/backend/processes/definitions/page.tsx +904 -0
- package/src/modules/agent_orchestrator/backend/processes/page.meta.ts +27 -0
- package/src/modules/agent_orchestrator/backend/processes/page.tsx +317 -0
- package/src/modules/agent_orchestrator/backend/settings/auto-approval/page.meta.ts +28 -0
- package/src/modules/agent_orchestrator/backend/settings/auto-approval/page.tsx +315 -0
- package/src/modules/agent_orchestrator/backend/settings/web-search/AdapterRow.tsx +351 -0
- package/src/modules/agent_orchestrator/backend/settings/web-search/WebSearchPreview.tsx +203 -0
- package/src/modules/agent_orchestrator/backend/settings/web-search/page.meta.ts +30 -0
- package/src/modules/agent_orchestrator/backend/settings/web-search/page.tsx +913 -0
- package/src/modules/agent_orchestrator/backend/traces/[id]/page.meta.ts +14 -0
- package/src/modules/agent_orchestrator/backend/traces/[id]/page.tsx +1383 -0
- package/src/modules/agent_orchestrator/backend/traces/page.meta.ts +22 -0
- package/src/modules/agent_orchestrator/backend/traces/page.tsx +601 -0
- package/src/modules/agent_orchestrator/cli.ts +719 -0
- package/src/modules/agent_orchestrator/commands/artifacts.ts +171 -0
- package/src/modules/agent_orchestrator/commands/corrections.ts +345 -0
- package/src/modules/agent_orchestrator/commands/dispose.ts +380 -0
- package/src/modules/agent_orchestrator/commands/evalRuns.ts +291 -0
- package/src/modules/agent_orchestrator/commands/grants.ts +149 -0
- package/src/modules/agent_orchestrator/commands/index.ts +10 -0
- package/src/modules/agent_orchestrator/commands/processes.ts +176 -0
- package/src/modules/agent_orchestrator/commands/proposals.ts +82 -0
- package/src/modules/agent_orchestrator/commands/runActions.ts +52 -0
- package/src/modules/agent_orchestrator/commands/runs.ts +212 -0
- package/src/modules/agent_orchestrator/commands/trace.ts +118 -0
- package/src/modules/agent_orchestrator/components/AgentIoDrawer.tsx +87 -0
- package/src/modules/agent_orchestrator/components/AgentTimeline.tsx +175 -0
- package/src/modules/agent_orchestrator/components/DisposeDialog.tsx +112 -0
- package/src/modules/agent_orchestrator/components/EmptyArt.tsx +51 -0
- package/src/modules/agent_orchestrator/components/InvokeAgentNodeConfig.tsx +150 -0
- package/src/modules/agent_orchestrator/components/ProcessOutcomeLink.tsx +50 -0
- package/src/modules/agent_orchestrator/components/ProposalCard.tsx +602 -0
- package/src/modules/agent_orchestrator/components/ProposalFacts.tsx +139 -0
- package/src/modules/agent_orchestrator/components/ProposalOptionList.tsx +273 -0
- package/src/modules/agent_orchestrator/components/ProposeOnlyNotice.tsx +40 -0
- package/src/modules/agent_orchestrator/components/SkillDrawer.tsx +75 -0
- package/src/modules/agent_orchestrator/components/StartHereGuide.tsx +241 -0
- package/src/modules/agent_orchestrator/components/SystemHealthTile.tsx +189 -0
- package/src/modules/agent_orchestrator/components/WebSearchActivity.tsx +180 -0
- package/src/modules/agent_orchestrator/components/agentChips.tsx +123 -0
- package/src/modules/agent_orchestrator/components/cockpitStatus.tsx +154 -0
- package/src/modules/agent_orchestrator/components/evalRunTypes.ts +339 -0
- package/src/modules/agent_orchestrator/components/health/HealthRow.tsx +36 -0
- package/src/modules/agent_orchestrator/components/health/HealthStateBadge.tsx +21 -0
- package/src/modules/agent_orchestrator/components/health/SystemHealthPanel.tsx +206 -0
- package/src/modules/agent_orchestrator/components/health/vocabulary.ts +53 -0
- package/src/modules/agent_orchestrator/components/optionalRequest.ts +18 -0
- package/src/modules/agent_orchestrator/components/playgroundRunError.ts +63 -0
- package/src/modules/agent_orchestrator/components/playgroundToolCalls.ts +32 -0
- package/src/modules/agent_orchestrator/components/processTypes.ts +613 -0
- package/src/modules/agent_orchestrator/components/proposalCaseStatus.ts +100 -0
- package/src/modules/agent_orchestrator/components/proposalEdit.ts +118 -0
- package/src/modules/agent_orchestrator/components/proposalFactsData.ts +222 -0
- package/src/modules/agent_orchestrator/components/serverSort.ts +56 -0
- package/src/modules/agent_orchestrator/components/subjectRef.ts +61 -0
- package/src/modules/agent_orchestrator/components/types.ts +834 -0
- package/src/modules/agent_orchestrator/components/useAgentIcons.ts +42 -0
- package/src/modules/agent_orchestrator/components/useAgentLabels.ts +44 -0
- package/src/modules/agent_orchestrator/components/useAgentTags.ts +38 -0
- package/src/modules/agent_orchestrator/components/useCoalescedReload.ts +43 -0
- package/src/modules/agent_orchestrator/data/agentIcons.ts +52 -0
- package/src/modules/agent_orchestrator/data/agentTags.ts +39 -0
- package/src/modules/agent_orchestrator/data/entities.ts +1904 -0
- package/src/modules/agent_orchestrator/data/proposalEnvelope.ts +263 -0
- package/src/modules/agent_orchestrator/data/validators.ts +1585 -0
- package/src/modules/agent_orchestrator/di.ts +182 -0
- package/src/modules/agent_orchestrator/encryption.ts +98 -0
- package/src/modules/agent_orchestrator/events.ts +97 -0
- package/src/modules/agent_orchestrator/examples/deals-health-check-workflow.json +124 -0
- package/src/modules/agent_orchestrator/examples/refund-triage-workflow.json +210 -0
- package/src/modules/agent_orchestrator/generated/file-agents.generated.ts +207 -0
- package/src/modules/agent_orchestrator/i18n/.hardcoded-allowlist.json +22 -0
- package/src/modules/agent_orchestrator/i18n/de.json +1495 -0
- package/src/modules/agent_orchestrator/i18n/en.json +1495 -0
- package/src/modules/agent_orchestrator/i18n/es.json +1495 -0
- package/src/modules/agent_orchestrator/i18n/ko.json +1495 -0
- package/src/modules/agent_orchestrator/i18n/pl.json +1495 -0
- package/src/modules/agent_orchestrator/index.ts +155 -0
- package/src/modules/agent_orchestrator/lib/automationLinks.ts +20 -0
- package/src/modules/agent_orchestrator/lib/context/contextResolver.ts +528 -0
- package/src/modules/agent_orchestrator/lib/context/documentIngest.ts +187 -0
- package/src/modules/agent_orchestrator/lib/context/documentOcrProvider.ts +189 -0
- package/src/modules/agent_orchestrator/lib/context/documentSource.ts +88 -0
- package/src/modules/agent_orchestrator/lib/context/index.ts +68 -0
- package/src/modules/agent_orchestrator/lib/context/packer.ts +114 -0
- package/src/modules/agent_orchestrator/lib/context/redactor.ts +138 -0
- package/src/modules/agent_orchestrator/lib/context/registry.ts +153 -0
- package/src/modules/agent_orchestrator/lib/context/retrievalSource.ts +146 -0
- package/src/modules/agent_orchestrator/lib/crudCache.ts +62 -0
- package/src/modules/agent_orchestrator/lib/disposition/autoApprovalPolicy.ts +163 -0
- package/src/modules/agent_orchestrator/lib/disposition/dispositionService.ts +310 -0
- package/src/modules/agent_orchestrator/lib/disposition/resume.ts +81 -0
- package/src/modules/agent_orchestrator/lib/disposition/tenantAutoApprovalPolicy.ts +100 -0
- package/src/modules/agent_orchestrator/lib/eval/assertionResolution.ts +105 -0
- package/src/modules/agent_orchestrator/lib/eval/canonicalInputKey.ts +32 -0
- package/src/modules/agent_orchestrator/lib/eval/defaultAssertions.ts +103 -0
- package/src/modules/agent_orchestrator/lib/eval/evalGate.ts +139 -0
- package/src/modules/agent_orchestrator/lib/eval/evalReplayService.ts +517 -0
- package/src/modules/agent_orchestrator/lib/eval/evalRuntimeService.ts +215 -0
- package/src/modules/agent_orchestrator/lib/eval/judgeRubric.ts +212 -0
- package/src/modules/agent_orchestrator/lib/eval/llmJudge.ts +174 -0
- package/src/modules/agent_orchestrator/lib/eval/projectRunView.ts +53 -0
- package/src/modules/agent_orchestrator/lib/eval/registry/agent.ts +334 -0
- package/src/modules/agent_orchestrator/lib/eval/registry/economics.ts +91 -0
- package/src/modules/agent_orchestrator/lib/eval/registry/index.ts +157 -0
- package/src/modules/agent_orchestrator/lib/eval/registry/judge.ts +102 -0
- package/src/modules/agent_orchestrator/lib/eval/registry/shared.ts +208 -0
- package/src/modules/agent_orchestrator/lib/eval/registry/structured.ts +297 -0
- package/src/modules/agent_orchestrator/lib/eval/registry/text.ts +125 -0
- package/src/modules/agent_orchestrator/lib/eval/registry/tools.ts +263 -0
- package/src/modules/agent_orchestrator/lib/eval/sampling.ts +33 -0
- package/src/modules/agent_orchestrator/lib/eval/scorers.ts +90 -0
- package/src/modules/agent_orchestrator/lib/eval/types.ts +189 -0
- package/src/modules/agent_orchestrator/lib/featureFlags.ts +22 -0
- package/src/modules/agent_orchestrator/lib/guardrails/grounding.ts +172 -0
- package/src/modules/agent_orchestrator/lib/guardrails/groundingSets.ts +61 -0
- package/src/modules/agent_orchestrator/lib/guardrails/guardrailService.ts +293 -0
- package/src/modules/agent_orchestrator/lib/guardrails/promptInjection.ts +163 -0
- package/src/modules/agent_orchestrator/lib/guardrails/publicEndpointRateLimit.ts +74 -0
- package/src/modules/agent_orchestrator/lib/guardrails/syncGroundingSets.ts +68 -0
- package/src/modules/agent_orchestrator/lib/identity/agentAuthMdService.ts +247 -0
- package/src/modules/agent_orchestrator/lib/identity/agentDelegationGrantService.ts +85 -0
- package/src/modules/agent_orchestrator/lib/identity/agentNoBypassSubscriber.ts +98 -0
- package/src/modules/agent_orchestrator/lib/identity/agentPrincipalService.ts +230 -0
- package/src/modules/agent_orchestrator/lib/identity/agentTokenService.ts +281 -0
- package/src/modules/agent_orchestrator/lib/identity/agentWriteScope.ts +68 -0
- package/src/modules/agent_orchestrator/lib/metrics/metricRollupService.ts +168 -0
- package/src/modules/agent_orchestrator/lib/processes/executionSearch.ts +35 -0
- package/src/modules/agent_orchestrator/lib/processes/materializeAgentWorkflow.ts +320 -0
- package/src/modules/agent_orchestrator/lib/processes/processProjection.ts +401 -0
- package/src/modules/agent_orchestrator/lib/processes/subjectContext.ts +30 -0
- package/src/modules/agent_orchestrator/lib/processes/workflowGrant.ts +84 -0
- package/src/modules/agent_orchestrator/lib/queue.ts +56 -0
- package/src/modules/agent_orchestrator/lib/runtime/actionVocabulary.ts +127 -0
- package/src/modules/agent_orchestrator/lib/runtime/admission.ts +177 -0
- package/src/modules/agent_orchestrator/lib/runtime/agentRunSessionStore.ts +166 -0
- package/src/modules/agent_orchestrator/lib/runtime/agentRuntime.ts +108 -0
- package/src/modules/agent_orchestrator/lib/runtime/agentWorkspaceManager.ts +187 -0
- package/src/modules/agent_orchestrator/lib/runtime/artifactCollector.ts +188 -0
- package/src/modules/agent_orchestrator/lib/runtime/artifactFileStore.ts +189 -0
- package/src/modules/agent_orchestrator/lib/runtime/attachmentStager.ts +100 -0
- package/src/modules/agent_orchestrator/lib/runtime/errors.ts +63 -0
- package/src/modules/agent_orchestrator/lib/runtime/executeProposal.ts +78 -0
- package/src/modules/agent_orchestrator/lib/runtime/fileAgentSkills.ts +81 -0
- package/src/modules/agent_orchestrator/lib/runtime/fileInput.ts +44 -0
- package/src/modules/agent_orchestrator/lib/runtime/invokeAgentForWorkflow.ts +255 -0
- package/src/modules/agent_orchestrator/lib/runtime/modelPricing.ts +146 -0
- package/src/modules/agent_orchestrator/lib/runtime/nativeAgentRunner.ts +617 -0
- package/src/modules/agent_orchestrator/lib/runtime/nativeTraceCapture.ts +217 -0
- package/src/modules/agent_orchestrator/lib/runtime/openCodeAgentRunner.ts +889 -0
- package/src/modules/agent_orchestrator/lib/runtime/persistence.ts +314 -0
- package/src/modules/agent_orchestrator/lib/runtime/providerBudget.ts +230 -0
- package/src/modules/agent_orchestrator/lib/runtime/rerunContext.ts +26 -0
- package/src/modules/agent_orchestrator/lib/runtime/runContext.ts +47 -0
- package/src/modules/agent_orchestrator/lib/runtime/sandboxedScript.ts +106 -0
- package/src/modules/agent_orchestrator/lib/sdk/agentMarkdown.ts +157 -0
- package/src/modules/agent_orchestrator/lib/sdk/agentOutcomeContract.ts +58 -0
- package/src/modules/agent_orchestrator/lib/sdk/defineAgent.ts +525 -0
- package/src/modules/agent_orchestrator/lib/sdk/defineFileAgent.ts +765 -0
- package/src/modules/agent_orchestrator/lib/sdk/defineSkill.ts +80 -0
- package/src/modules/agent_orchestrator/lib/sdk/outcomeSchema.ts +190 -0
- package/src/modules/agent_orchestrator/lib/sdk/skillMarkdown.ts +139 -0
- package/src/modules/agent_orchestrator/lib/seeds.ts +335 -0
- package/src/modules/agent_orchestrator/lib/settings/agentSettings.ts +92 -0
- package/src/modules/agent_orchestrator/lib/systemHealth.ts +212 -0
- package/src/modules/agent_orchestrator/lib/tasks/eventTriggerMatch.ts +116 -0
- package/src/modules/agent_orchestrator/lib/tasks/milestones.ts +201 -0
- package/src/modules/agent_orchestrator/lib/tasks/outcome.ts +93 -0
- package/src/modules/agent_orchestrator/lib/tasks/outcomeLink.ts +91 -0
- package/src/modules/agent_orchestrator/lib/tasks/schedule.ts +106 -0
- package/src/modules/agent_orchestrator/lib/tasks/scheduleValidation.ts +34 -0
- package/src/modules/agent_orchestrator/lib/tasks/triggers.ts +47 -0
- package/src/modules/agent_orchestrator/lib/tokens/computeAgentTokenUsage.ts +111 -0
- package/src/modules/agent_orchestrator/lib/tokens/types.ts +77 -0
- package/src/modules/agent_orchestrator/lib/trace/artifactStore.ts +198 -0
- package/src/modules/agent_orchestrator/lib/trace/correctionService.ts +117 -0
- package/src/modules/agent_orchestrator/lib/trace/ingestAuth.ts +65 -0
- package/src/modules/agent_orchestrator/lib/trace/redactToolSummary.ts +76 -0
- package/src/modules/agent_orchestrator/lib/trace/spanTimeline.ts +181 -0
- package/src/modules/agent_orchestrator/lib/trace/traceIngestionService.ts +250 -0
- package/src/modules/agent_orchestrator/lib/webSearch/guardrails.ts +199 -0
- package/src/modules/agent_orchestrator/lib/webSearch/healthCache.ts +109 -0
- package/src/modules/agent_orchestrator/lib/webSearch/healthProbePlan.ts +58 -0
- package/src/modules/agent_orchestrator/lib/webSearch/policy.ts +283 -0
- package/src/modules/agent_orchestrator/lib/webSearch/registry.ts +177 -0
- package/src/modules/agent_orchestrator/lib/webSearch/secretStorage.ts +181 -0
- package/src/modules/agent_orchestrator/lib/webSearch/steps.ts +77 -0
- package/src/modules/agent_orchestrator/lib/webSearch/tools.ts +246 -0
- package/src/modules/agent_orchestrator/lib/workInbox/agentDispositionSource.ts +324 -0
- package/src/modules/agent_orchestrator/migrations/.snapshot-open-mercato.json +7083 -0
- package/src/modules/agent_orchestrator/migrations/Migration20260906141535_agent_orchestrator.ts +278 -0
- package/src/modules/agent_orchestrator/migrations/adopt-squash.mjs +232 -0
- package/src/modules/agent_orchestrator/notifications.ts +43 -0
- package/src/modules/agent_orchestrator/setup.ts +190 -0
- package/src/modules/agent_orchestrator/skills/deals.stage_playbook.md +37 -0
- package/src/modules/agent_orchestrator/subscribers/process-event-trigger.ts +198 -0
- package/src/modules/agent_orchestrator/subscribers/process-proposal-created.ts +28 -0
- package/src/modules/agent_orchestrator/subscribers/process-proposal-disposed.ts +20 -0
- package/src/modules/agent_orchestrator/subscribers/process-run-completed.ts +23 -0
- package/src/modules/agent_orchestrator/subscribers/process-run-ingested.ts +22 -0
- package/src/modules/agent_orchestrator/subscribers/process-workflow-cancelled.ts +22 -0
- package/src/modules/agent_orchestrator/subscribers/process-workflow-completed.ts +32 -0
- package/src/modules/agent_orchestrator/subscribers/process-workflow-failed.ts +23 -0
- package/src/modules/agent_orchestrator/subscribers/process-workflow-milestone.ts +47 -0
- package/src/modules/agent_orchestrator/subscribers/process-workflow-started.ts +34 -0
- package/src/modules/agent_orchestrator/subscribers/proposal-disposed-notification-clear.ts +50 -0
- package/src/modules/agent_orchestrator/subscribers/proposal-pending-notification.ts +84 -0
- package/src/modules/agent_orchestrator/widgets/injection/caseload-nav-badge/widget.client.tsx +68 -0
- package/src/modules/agent_orchestrator/widgets/injection/caseload-nav-badge/widget.ts +16 -0
- package/src/modules/agent_orchestrator/widgets/injection/task-proposal-draft/widget.client.tsx +148 -0
- package/src/modules/agent_orchestrator/widgets/injection/task-proposal-draft/widget.ts +24 -0
- package/src/modules/agent_orchestrator/widgets/injection/task-proposal-link/widget.ts +34 -0
- package/src/modules/agent_orchestrator/widgets/injection-table.ts +42 -0
- package/src/modules/agent_orchestrator/workers/eval-suite-runner.ts +85 -0
- package/src/modules/agent_orchestrator/workers/llm-judge.ts +39 -0
- package/src/modules/agent_orchestrator/workers/metric-rollup.ts +39 -0
- package/src/modules/agent_orchestrator/workers/process-execution-starter.ts +227 -0
- package/src/modules/record_locks/lib/conflictValues.ts +107 -0
- package/src/modules/record_locks/lib/crudMutationGuardService.ts +47 -3
- package/src/modules/record_locks/lib/recordLockService.ts +1 -51
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { agentTypeSchema } from "../../../data/validators.js";
|
|
3
|
+
import { normalizeProposalEnvelope } from "../../../data/proposalEnvelope.js";
|
|
4
|
+
import { SKIP_REASON, skipped } from "../types.js";
|
|
5
|
+
import { baseConfigSchema, directionSchema, toText, verdict } from "./shared.js";
|
|
6
|
+
const I18N = "agent_orchestrator.evalAssertions.scorer";
|
|
7
|
+
const PII_PATTERNS = [
|
|
8
|
+
{ name: "email", re: /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/ },
|
|
9
|
+
{ name: "ssn", re: /\b\d{3}-\d{2}-\d{4}\b/ },
|
|
10
|
+
{ name: "phone", re: /\b(?:\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}\b/ }
|
|
11
|
+
];
|
|
12
|
+
const outputPresentConfig = baseConfigSchema;
|
|
13
|
+
const outputPresent = {
|
|
14
|
+
scorerKey: "output_present",
|
|
15
|
+
labelKey: `${I18N}.output_present`,
|
|
16
|
+
group: "agent",
|
|
17
|
+
kind: "deterministic",
|
|
18
|
+
configSchema: outputPresentConfig,
|
|
19
|
+
fields: [],
|
|
20
|
+
needsExpected: () => false,
|
|
21
|
+
score: (run) => {
|
|
22
|
+
const output = run.output;
|
|
23
|
+
const empty = output === null || output === void 0 || typeof output === "object" && Object.keys(output).length === 0;
|
|
24
|
+
return verdict(!empty, empty ? 0 : 1);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const requiredKeysConfig = baseConfigSchema.extend({
|
|
28
|
+
requiredKeys: z.array(z.unknown()).catch([]).transform((entries) => entries.map((entry) => String(entry)))
|
|
29
|
+
});
|
|
30
|
+
const requiredKeys = {
|
|
31
|
+
scorerKey: "required_keys",
|
|
32
|
+
labelKey: `${I18N}.required_keys`,
|
|
33
|
+
group: "agent",
|
|
34
|
+
kind: "deterministic",
|
|
35
|
+
configSchema: requiredKeysConfig,
|
|
36
|
+
fields: [
|
|
37
|
+
{
|
|
38
|
+
name: "requiredKeys",
|
|
39
|
+
kind: "string-list",
|
|
40
|
+
labelKey: `${I18N}.required_keys.field.requiredKeys`,
|
|
41
|
+
hintKey: `${I18N}.required_keys.field.requiredKeys.hint`,
|
|
42
|
+
required: true
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
needsExpected: () => false,
|
|
46
|
+
score: (run, _expected, config) => {
|
|
47
|
+
const required = config.requiredKeys ?? [];
|
|
48
|
+
const output = run.output;
|
|
49
|
+
if (!output || typeof output !== "object") {
|
|
50
|
+
return verdict(false, 0, { reason: "output is not an object" });
|
|
51
|
+
}
|
|
52
|
+
const present = output;
|
|
53
|
+
const missing = required.filter((key) => !(key in present));
|
|
54
|
+
return {
|
|
55
|
+
passed: missing.length === 0,
|
|
56
|
+
score: required.length ? (required.length - missing.length) / required.length : 1,
|
|
57
|
+
evidence: missing.length ? { missing } : void 0
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const confidenceThresholdConfig = baseConfigSchema.extend({
|
|
62
|
+
threshold: z.number().catch(0.5),
|
|
63
|
+
direction: directionSchema.catch("gte")
|
|
64
|
+
});
|
|
65
|
+
const confidenceThresholdWriteConfig = baseConfigSchema.extend({
|
|
66
|
+
threshold: z.number().min(0).max(1).default(0.5),
|
|
67
|
+
direction: directionSchema.default("gte")
|
|
68
|
+
});
|
|
69
|
+
const confidenceThreshold = {
|
|
70
|
+
scorerKey: "confidence_threshold",
|
|
71
|
+
labelKey: `${I18N}.confidence_threshold`,
|
|
72
|
+
group: "agent",
|
|
73
|
+
kind: "deterministic",
|
|
74
|
+
configSchema: confidenceThresholdConfig,
|
|
75
|
+
writeConfigSchema: confidenceThresholdWriteConfig,
|
|
76
|
+
fields: [
|
|
77
|
+
{
|
|
78
|
+
name: "threshold",
|
|
79
|
+
kind: "slider",
|
|
80
|
+
labelKey: `${I18N}.confidence_threshold.field.threshold`,
|
|
81
|
+
hintKey: `${I18N}.confidence_threshold.field.threshold.hint`,
|
|
82
|
+
min: 0,
|
|
83
|
+
max: 1,
|
|
84
|
+
step: 0.05,
|
|
85
|
+
required: true,
|
|
86
|
+
default: 0.5
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "direction",
|
|
90
|
+
kind: "select",
|
|
91
|
+
labelKey: `${I18N}.field.direction`,
|
|
92
|
+
options: [
|
|
93
|
+
{ value: "gte", labelKey: `${I18N}.direction.gte` },
|
|
94
|
+
{ value: "lte", labelKey: `${I18N}.direction.lte` }
|
|
95
|
+
],
|
|
96
|
+
default: "gte"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
needsExpected: () => false,
|
|
100
|
+
score: (run, _expected, config) => {
|
|
101
|
+
const threshold = config.threshold;
|
|
102
|
+
const confidence = typeof run.confidence === "number" ? run.confidence : null;
|
|
103
|
+
if (confidence === null) {
|
|
104
|
+
return verdict(false, 0, { reason: "run has no confidence" });
|
|
105
|
+
}
|
|
106
|
+
const passed = config.direction === "gte" ? confidence >= threshold : confidence <= threshold;
|
|
107
|
+
return { passed, score: confidence, evidence: { confidence, threshold, direction: config.direction } };
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
const dispositionEqualsConfig = baseConfigSchema.extend({
|
|
111
|
+
expected: z.enum(["pending", "auto_approved", "approved", "edited", "rejected", "user_task"])
|
|
112
|
+
});
|
|
113
|
+
const dispositionEquals = {
|
|
114
|
+
scorerKey: "disposition_equals",
|
|
115
|
+
labelKey: `${I18N}.disposition_equals`,
|
|
116
|
+
group: "agent",
|
|
117
|
+
kind: "deterministic",
|
|
118
|
+
configSchema: dispositionEqualsConfig,
|
|
119
|
+
fields: [
|
|
120
|
+
{
|
|
121
|
+
name: "expected",
|
|
122
|
+
kind: "select",
|
|
123
|
+
labelKey: `${I18N}.disposition_equals.field.expected`,
|
|
124
|
+
hintKey: `${I18N}.disposition_equals.field.expected.hint`,
|
|
125
|
+
required: true,
|
|
126
|
+
options: [
|
|
127
|
+
{ value: "pending", labelKey: `${I18N}.disposition.pending` },
|
|
128
|
+
{ value: "auto_approved", labelKey: `${I18N}.disposition.auto_approved` },
|
|
129
|
+
{ value: "approved", labelKey: `${I18N}.disposition.approved` },
|
|
130
|
+
{ value: "edited", labelKey: `${I18N}.disposition.edited` },
|
|
131
|
+
{ value: "rejected", labelKey: `${I18N}.disposition.rejected` },
|
|
132
|
+
{ value: "user_task", labelKey: `${I18N}.disposition.user_task` }
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
needsExpected: () => false,
|
|
137
|
+
score: (run, _expected, config) => {
|
|
138
|
+
const actual = run.disposition;
|
|
139
|
+
if (actual === null) {
|
|
140
|
+
return skipped(SKIP_REASON.notApplicable, { reason: "run has no disposition" });
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
passed: actual === config.expected,
|
|
144
|
+
score: actual === config.expected ? 1 : 0,
|
|
145
|
+
evidence: { actual, expected: config.expected }
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
const noPiiConfig = baseConfigSchema;
|
|
150
|
+
const noPii = {
|
|
151
|
+
scorerKey: "no_pii",
|
|
152
|
+
labelKey: `${I18N}.no_pii`,
|
|
153
|
+
group: "agent",
|
|
154
|
+
kind: "deterministic",
|
|
155
|
+
configSchema: noPiiConfig,
|
|
156
|
+
fields: [],
|
|
157
|
+
needsExpected: () => false,
|
|
158
|
+
score: (run) => {
|
|
159
|
+
const text = toText(run.output);
|
|
160
|
+
const detected = PII_PATTERNS.filter(({ re }) => re.test(text)).map(({ name }) => name);
|
|
161
|
+
return {
|
|
162
|
+
passed: detected.length === 0,
|
|
163
|
+
score: detected.length === 0 ? 1 : 0,
|
|
164
|
+
evidence: detected.length ? { detected } : void 0
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
const actionVocabularyConfig = baseConfigSchema.extend({
|
|
169
|
+
allowedActions: z.array(z.unknown()).catch([]).transform((entries) => entries.map((entry) => String(entry))),
|
|
170
|
+
agentType: agentTypeSchema.optional()
|
|
171
|
+
});
|
|
172
|
+
function proposedActionTypes(output) {
|
|
173
|
+
if (output === null || typeof output !== "object" || Array.isArray(output)) return [];
|
|
174
|
+
const envelope = normalizeProposalEnvelope(
|
|
175
|
+
output.proposal ?? output
|
|
176
|
+
);
|
|
177
|
+
return envelope.options.flatMap((option) => option.actions.map((action) => action.type));
|
|
178
|
+
}
|
|
179
|
+
const actionVocabulary = {
|
|
180
|
+
scorerKey: "action_vocabulary",
|
|
181
|
+
labelKey: `${I18N}.action_vocabulary`,
|
|
182
|
+
group: "agent",
|
|
183
|
+
kind: "deterministic",
|
|
184
|
+
configSchema: actionVocabularyConfig,
|
|
185
|
+
fields: [
|
|
186
|
+
{
|
|
187
|
+
name: "allowedActions",
|
|
188
|
+
kind: "string-list",
|
|
189
|
+
labelKey: `${I18N}.action_vocabulary.field.allowedActions`,
|
|
190
|
+
hintKey: `${I18N}.action_vocabulary.field.allowedActions.hint`,
|
|
191
|
+
required: true
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: "agentType",
|
|
195
|
+
kind: "select",
|
|
196
|
+
labelKey: `${I18N}.action_vocabulary.field.agentType`,
|
|
197
|
+
hintKey: `${I18N}.action_vocabulary.field.agentType.hint`,
|
|
198
|
+
options: [
|
|
199
|
+
{ value: "researcher", labelKey: `${I18N}.agentType.researcher` },
|
|
200
|
+
{ value: "decision_maker", labelKey: `${I18N}.agentType.decision_maker` },
|
|
201
|
+
{ value: "action", labelKey: `${I18N}.agentType.action` }
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
needsExpected: () => false,
|
|
206
|
+
score: (run, _expected, config) => {
|
|
207
|
+
if (config.agentType && run.agentType !== config.agentType) {
|
|
208
|
+
return skipped(SKIP_REASON.notApplicable, { reason: "agent type does not match", agentType: run.agentType });
|
|
209
|
+
}
|
|
210
|
+
const proposed = proposedActionTypes(run.output);
|
|
211
|
+
if (proposed.length === 0) {
|
|
212
|
+
return skipped(SKIP_REASON.notApplicable, { reason: "run proposed no action" });
|
|
213
|
+
}
|
|
214
|
+
const allowed = new Set(config.allowedActions);
|
|
215
|
+
const offending = [...new Set(proposed.filter((type) => !allowed.has(type)))];
|
|
216
|
+
return {
|
|
217
|
+
passed: offending.length === 0,
|
|
218
|
+
score: offending.length === 0 ? 1 : 0,
|
|
219
|
+
evidence: offending.length ? { offending, allowed: config.allowedActions } : void 0
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
const agentScorers = [
|
|
224
|
+
outputPresent,
|
|
225
|
+
requiredKeys,
|
|
226
|
+
confidenceThreshold,
|
|
227
|
+
dispositionEquals,
|
|
228
|
+
noPii,
|
|
229
|
+
actionVocabulary
|
|
230
|
+
];
|
|
231
|
+
export {
|
|
232
|
+
actionVocabulary,
|
|
233
|
+
agentScorers,
|
|
234
|
+
confidenceThreshold,
|
|
235
|
+
dispositionEquals,
|
|
236
|
+
noPii,
|
|
237
|
+
outputPresent,
|
|
238
|
+
requiredKeys
|
|
239
|
+
};
|
|
240
|
+
//# sourceMappingURL=agent.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/modules/agent_orchestrator/lib/eval/registry/agent.ts"],
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod'\nimport { agentTypeSchema } from '../../../data/validators'\nimport { normalizeProposalEnvelope } from '../../../data/proposalEnvelope'\nimport type { Json, ScorerDefinition } from '../types'\nimport { SKIP_REASON, skipped } from '../types'\nimport { baseConfigSchema, directionSchema, toText, verdict } from './shared'\n\nconst I18N = 'agent_orchestrator.evalAssertions.scorer'\n\n// Non-global patterns (presence detection only) \u2014 keeps scorers stateless/pure.\nconst PII_PATTERNS: Array<{ name: string; re: RegExp }> = [\n { name: 'email', re: /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}/ },\n { name: 'ssn', re: /\\b\\d{3}-\\d{2}-\\d{4}\\b/ },\n { name: 'phone', re: /\\b(?:\\+?\\d{1,3}[-.\\s]?)?\\(?\\d{3}\\)?[-.\\s]?\\d{3}[-.\\s]?\\d{4}\\b/ },\n]\n\nconst outputPresentConfig = baseConfigSchema\nexport type OutputPresentConfig = z.infer<typeof outputPresentConfig>\n\n/**\n * Behaviour preserved verbatim from the pre-registry scorer so the Phase 1\n * migration cannot move an online `gate` verdict.\n */\nexport const outputPresent: ScorerDefinition<OutputPresentConfig> = {\n scorerKey: 'output_present',\n labelKey: `${I18N}.output_present`,\n group: 'agent',\n kind: 'deterministic',\n configSchema: outputPresentConfig,\n fields: [],\n needsExpected: () => false,\n score: (run) => {\n const output = run.output\n const empty =\n output === null ||\n output === undefined ||\n (typeof output === 'object' && Object.keys(output as object).length === 0)\n return verdict(!empty, empty ? 0 : 1)\n },\n}\n\n/**\n * Element-wise coercion, not `z.array(z.string())`.\n *\n * The pre-registry code was `Array.isArray(c.requiredKeys) ? c.requiredKeys : []`\n * \u2014 no element-type check \u2014 so a stored `['status', 1]` produced `missing: [1]`\n * and FAILED. A whole-array `z.string()` schema fails on the one bad element and\n * `.catch([])` then substitutes an EMPTY list, which passes vacuously: a stored\n * gate silently flips fail \u2192 pass. Coercing per element reproduces the original\n * key lookup instead of discarding the list.\n */\nconst requiredKeysConfig = baseConfigSchema.extend({\n requiredKeys: z\n .array(z.unknown())\n .catch([])\n .transform((entries) => entries.map((entry) => String(entry))),\n})\nexport type RequiredKeysConfig = z.infer<typeof requiredKeysConfig>\n\n/**\n * Retained as its own scorer rather than folded into `json_match`: user-authored\n * rows may carry `gate` severity, and rewriting their config blind risks moving an\n * online verdict for zero benefit. New assertions should prefer `json_match`.\n *\n * @deprecated for new assertions \u2014 use `json_match` with `source: 'config'`.\n */\nexport const requiredKeys: ScorerDefinition<RequiredKeysConfig> = {\n scorerKey: 'required_keys',\n labelKey: `${I18N}.required_keys`,\n group: 'agent',\n kind: 'deterministic',\n configSchema: requiredKeysConfig,\n fields: [\n {\n name: 'requiredKeys',\n kind: 'string-list',\n labelKey: `${I18N}.required_keys.field.requiredKeys`,\n hintKey: `${I18N}.required_keys.field.requiredKeys.hint`,\n required: true,\n },\n ],\n needsExpected: () => false,\n score: (run, _expected, config) => {\n const required = config.requiredKeys ?? []\n const output = run.output\n if (!output || typeof output !== 'object') {\n return verdict(false, 0, { reason: 'output is not an object' })\n }\n const present = output as Record<string, Json>\n const missing = required.filter((key) => !(key in present))\n return {\n passed: missing.length === 0,\n score: required.length ? (required.length - missing.length) / required.length : 1,\n evidence: missing.length ? { missing } : undefined,\n }\n },\n}\n\n/**\n * Evaluation schema is deliberately as loose as the code it replaces\n * (`typeof config.threshold === 'number' ? config.threshold : 0.5`). An\n * out-of-range threshold such as `85` \u2014 the percent-vs-fraction mistake \u2014 used to\n * make a gate assertion fail EVERY run; rejecting it here would skip the\n * assertion, drop it from the gate, and flip `evalPassed` from false to true. The\n * gate would fail open.\n */\nconst confidenceThresholdConfig = baseConfigSchema.extend({\n threshold: z.number().catch(0.5),\n direction: directionSchema.catch('gte'),\n})\nexport type ConfidenceThresholdConfig = z.infer<typeof confidenceThresholdConfig>\n\n/** Range is enforced only on write, where rejecting cannot move a stored verdict. */\nconst confidenceThresholdWriteConfig = baseConfigSchema.extend({\n threshold: z.number().min(0).max(1).default(0.5),\n direction: directionSchema.default('gte'),\n})\n\n/**\n * Supersedes `min_confidence` (kept as a deprecated alias in the registry index).\n *\n * NOTE \u2014 deliberate exception to the skip doctrine: a run with no confidence\n * returns `passed: false`, NOT a skip. This reproduces the shipped\n * `min_confidence` behaviour exactly; skipping instead would silently convert an\n * existing online failure into a non-result and move `evalPassed`.\n */\nexport const confidenceThreshold: ScorerDefinition<ConfidenceThresholdConfig> = {\n scorerKey: 'confidence_threshold',\n labelKey: `${I18N}.confidence_threshold`,\n group: 'agent',\n kind: 'deterministic',\n configSchema: confidenceThresholdConfig,\n writeConfigSchema: confidenceThresholdWriteConfig,\n fields: [\n {\n name: 'threshold',\n kind: 'slider',\n labelKey: `${I18N}.confidence_threshold.field.threshold`,\n hintKey: `${I18N}.confidence_threshold.field.threshold.hint`,\n min: 0,\n max: 1,\n step: 0.05,\n required: true,\n default: 0.5,\n },\n {\n name: 'direction',\n kind: 'select',\n labelKey: `${I18N}.field.direction`,\n options: [\n { value: 'gte', labelKey: `${I18N}.direction.gte` },\n { value: 'lte', labelKey: `${I18N}.direction.lte` },\n ],\n default: 'gte',\n },\n ],\n needsExpected: () => false,\n score: (run, _expected, config) => {\n const threshold = config.threshold\n const confidence = typeof run.confidence === 'number' ? run.confidence : null\n if (confidence === null) {\n return verdict(false, 0, { reason: 'run has no confidence' })\n }\n const passed = config.direction === 'gte' ? confidence >= threshold : confidence <= threshold\n return { passed, score: confidence, evidence: { confidence, threshold, direction: config.direction } }\n },\n}\n\nconst dispositionEqualsConfig = baseConfigSchema.extend({\n expected: z.enum(['pending', 'auto_approved', 'approved', 'edited', 'rejected', 'user_task']),\n})\nexport type DispositionEqualsConfig = z.infer<typeof dispositionEqualsConfig>\n\n/**\n * The orchestration-specific assertion no general-purpose eval framework can\n * express: did the agent correctly escalate to a human instead of auto-approving?\n */\nexport const dispositionEquals: ScorerDefinition<DispositionEqualsConfig> = {\n scorerKey: 'disposition_equals',\n labelKey: `${I18N}.disposition_equals`,\n group: 'agent',\n kind: 'deterministic',\n configSchema: dispositionEqualsConfig,\n fields: [\n {\n name: 'expected',\n kind: 'select',\n labelKey: `${I18N}.disposition_equals.field.expected`,\n hintKey: `${I18N}.disposition_equals.field.expected.hint`,\n required: true,\n options: [\n { value: 'pending', labelKey: `${I18N}.disposition.pending` },\n { value: 'auto_approved', labelKey: `${I18N}.disposition.auto_approved` },\n { value: 'approved', labelKey: `${I18N}.disposition.approved` },\n { value: 'edited', labelKey: `${I18N}.disposition.edited` },\n { value: 'rejected', labelKey: `${I18N}.disposition.rejected` },\n { value: 'user_task', labelKey: `${I18N}.disposition.user_task` },\n ],\n },\n ],\n needsExpected: () => false,\n score: (run, _expected, config) => {\n const actual = run.disposition\n if (actual === null) {\n // No proposal on this run \u2014 the disposition is unknown, not different. A\n // run that produced no proposal (researcher agents, or a trace ingested\n // before the proposal is written) must not read as a failed expectation.\n return skipped(SKIP_REASON.notApplicable, { reason: 'run has no disposition' })\n }\n return {\n passed: actual === config.expected,\n score: actual === config.expected ? 1 : 0,\n evidence: { actual, expected: config.expected },\n }\n },\n}\n\nconst noPiiConfig = baseConfigSchema\nexport type NoPiiConfig = z.infer<typeof noPiiConfig>\n\nexport const noPii: ScorerDefinition<NoPiiConfig> = {\n scorerKey: 'no_pii',\n labelKey: `${I18N}.no_pii`,\n group: 'agent',\n kind: 'deterministic',\n configSchema: noPiiConfig,\n fields: [],\n needsExpected: () => false,\n score: (run) => {\n const text = toText(run.output)\n const detected = PII_PATTERNS.filter(({ re }) => re.test(text)).map(({ name }) => name)\n return {\n passed: detected.length === 0,\n score: detected.length === 0 ? 1 : 0,\n evidence: detected.length ? { detected } : undefined,\n }\n },\n}\n\n/**\n * `allowedActions` is coerced per element for the same reason `required_keys` is: a\n * whole-array `z.array(z.string())` with `.catch([])` would substitute an EMPTY list on\n * one bad element, and an empty allowlist here passes VACUOUSLY \u2014 a stored gate would\n * silently flip fail \u2192 pass, which is the one direction this assertion must never move.\n *\n * `agentType` narrows the assertion to one declared type so a suite can say \"a\n * decision-maker may only propose status changes\" without also constraining action\n * agents. Absent means every type.\n */\nconst actionVocabularyConfig = baseConfigSchema.extend({\n allowedActions: z\n .array(z.unknown())\n .catch([])\n .transform((entries) => entries.map((entry) => String(entry))),\n agentType: agentTypeSchema.optional(),\n})\nexport type ActionVocabularyConfig = z.infer<typeof actionVocabularyConfig>\n\n/** Every action type the run's proposal offered, across ALL options \u2014 a rejected option still proposed it. */\nfunction proposedActionTypes(output: Json | null): string[] {\n if (output === null || typeof output !== 'object' || Array.isArray(output)) return []\n const envelope = normalizeProposalEnvelope(\n (output as Record<string, Json>).proposal ?? output,\n )\n return envelope.options.flatMap((option) => option.actions.map((action) => action.type))\n}\n\n/**\n * The eval half of the action vocabulary (spec `2026-08-11-agent-taxonomy.md`, step 9).\n *\n * The runtime check blocks an out-of-vocabulary effect at disposition time; this makes\n * the same violation VISIBLE as a failed assertion, because an agent that keeps\n * proposing actions it may not run is a prompt defect, not an execution one \u2014 the\n * blocked effect leaves no trace an operator would ever look at.\n *\n * Deliberately CONFIG-driven rather than reading the live catalogue: a scorer is pure\n * and must produce the same verdict online, in the replay engine and in the CI gate,\n * which a deployment-dependent catalogue could not.\n */\nexport const actionVocabulary: ScorerDefinition<ActionVocabularyConfig> = {\n scorerKey: 'action_vocabulary',\n labelKey: `${I18N}.action_vocabulary`,\n group: 'agent',\n kind: 'deterministic',\n configSchema: actionVocabularyConfig,\n fields: [\n {\n name: 'allowedActions',\n kind: 'string-list',\n labelKey: `${I18N}.action_vocabulary.field.allowedActions`,\n hintKey: `${I18N}.action_vocabulary.field.allowedActions.hint`,\n required: true,\n },\n {\n name: 'agentType',\n kind: 'select',\n labelKey: `${I18N}.action_vocabulary.field.agentType`,\n hintKey: `${I18N}.action_vocabulary.field.agentType.hint`,\n options: [\n { value: 'researcher', labelKey: `${I18N}.agentType.researcher` },\n { value: 'decision_maker', labelKey: `${I18N}.agentType.decision_maker` },\n { value: 'action', labelKey: `${I18N}.agentType.action` },\n ],\n },\n ],\n needsExpected: () => false,\n score: (run, _expected, config) => {\n if (config.agentType && run.agentType !== config.agentType) {\n return skipped(SKIP_REASON.notApplicable, { reason: 'agent type does not match', agentType: run.agentType })\n }\n const proposed = proposedActionTypes(run.output)\n if (proposed.length === 0) {\n // A run that proposed nothing cannot have proposed something forbidden. Skipping\n // rather than passing keeps a researcher run out of the pass aggregate entirely.\n return skipped(SKIP_REASON.notApplicable, { reason: 'run proposed no action' })\n }\n const allowed = new Set(config.allowedActions)\n const offending = [...new Set(proposed.filter((type) => !allowed.has(type)))]\n return {\n passed: offending.length === 0,\n score: offending.length === 0 ? 1 : 0,\n evidence: offending.length ? { offending, allowed: config.allowedActions } : undefined,\n }\n },\n}\n\nexport const agentScorers = [\n outputPresent,\n requiredKeys,\n confidenceThreshold,\n dispositionEquals,\n noPii,\n actionVocabulary,\n] as const\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { SKIP_REASON, skipped } from "../types.js";
|
|
3
|
+
import { baseConfigSchema, compareThreshold, directionSchema } from "./shared.js";
|
|
4
|
+
const I18N = "agent_orchestrator.evalAssertions.scorer";
|
|
5
|
+
function thresholdScorer(scorerKey, defaults, read, unitHintKey) {
|
|
6
|
+
return {
|
|
7
|
+
scorerKey,
|
|
8
|
+
labelKey: `${I18N}.${scorerKey}`,
|
|
9
|
+
group: "economics",
|
|
10
|
+
kind: "deterministic",
|
|
11
|
+
configSchema: thresholdConfig,
|
|
12
|
+
fields: [
|
|
13
|
+
{
|
|
14
|
+
name: "threshold",
|
|
15
|
+
kind: "number",
|
|
16
|
+
labelKey: `${I18N}.${scorerKey}.field.threshold`,
|
|
17
|
+
hintKey: unitHintKey,
|
|
18
|
+
min: 0,
|
|
19
|
+
required: true,
|
|
20
|
+
default: defaults.threshold
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "direction",
|
|
24
|
+
kind: "select",
|
|
25
|
+
labelKey: `${I18N}.field.direction`,
|
|
26
|
+
default: defaults.direction,
|
|
27
|
+
options: [
|
|
28
|
+
{ value: "lte", labelKey: `${I18N}.direction.lte` },
|
|
29
|
+
{ value: "gte", labelKey: `${I18N}.direction.gte` }
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
needsExpected: () => false,
|
|
34
|
+
score: (run, _expected, config) => {
|
|
35
|
+
const actual = read(run);
|
|
36
|
+
if (actual === null) {
|
|
37
|
+
return skipped(SKIP_REASON.notApplicable, { reason: `run has no ${scorerKey} measurement` });
|
|
38
|
+
}
|
|
39
|
+
const passed = compareThreshold(actual, config.threshold, config.direction);
|
|
40
|
+
return {
|
|
41
|
+
passed,
|
|
42
|
+
score: passed ? 1 : 0,
|
|
43
|
+
evidence: { actual, threshold: config.threshold, direction: config.direction }
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const thresholdConfig = baseConfigSchema.extend({
|
|
49
|
+
threshold: z.number().min(0),
|
|
50
|
+
direction: directionSchema.default("lte")
|
|
51
|
+
});
|
|
52
|
+
const latency = thresholdScorer(
|
|
53
|
+
"latency",
|
|
54
|
+
{ threshold: 3e4, direction: "lte" },
|
|
55
|
+
(run) => run.latencyMs,
|
|
56
|
+
`${I18N}.latency.field.threshold.hint`
|
|
57
|
+
);
|
|
58
|
+
const cost = thresholdScorer(
|
|
59
|
+
"cost",
|
|
60
|
+
{ threshold: 100, direction: "lte" },
|
|
61
|
+
(run) => run.costMinor,
|
|
62
|
+
`${I18N}.cost.field.threshold.hint`
|
|
63
|
+
);
|
|
64
|
+
const stepCount = thresholdScorer(
|
|
65
|
+
"step_count",
|
|
66
|
+
{ threshold: 20, direction: "lte" },
|
|
67
|
+
(run) => run.stepCount,
|
|
68
|
+
`${I18N}.step_count.field.threshold.hint`
|
|
69
|
+
);
|
|
70
|
+
const economicsScorers = [latency, cost, stepCount];
|
|
71
|
+
export {
|
|
72
|
+
cost,
|
|
73
|
+
economicsScorers,
|
|
74
|
+
latency,
|
|
75
|
+
stepCount
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=economics.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/modules/agent_orchestrator/lib/eval/registry/economics.ts"],
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod'\nimport type { ScorerDefinition, ScorerRunView } from '../types'\nimport { SKIP_REASON, skipped } from '../types'\nimport { baseConfigSchema, compareThreshold, directionSchema } from './shared'\n\nconst I18N = 'agent_orchestrator.evalAssertions.scorer'\n\n/**\n * Run-economics scorers. Every one carries an explicit `direction` \u2014 DeepEval's\n * BiasMetric taught the industry that an implicit \"threshold is a maximum here but\n * a minimum everywhere else\" convention is a reliable source of inverted gates.\n */\nfunction thresholdScorer(\n scorerKey: string,\n defaults: { threshold: number; direction: 'gte' | 'lte' },\n read: (run: ScorerRunView) => number | null,\n unitHintKey: string,\n): ScorerDefinition<ThresholdConfig> {\n return {\n scorerKey,\n labelKey: `${I18N}.${scorerKey}`,\n group: 'economics',\n kind: 'deterministic',\n configSchema: thresholdConfig,\n fields: [\n {\n name: 'threshold',\n kind: 'number',\n labelKey: `${I18N}.${scorerKey}.field.threshold`,\n hintKey: unitHintKey,\n min: 0,\n required: true,\n default: defaults.threshold,\n },\n {\n name: 'direction',\n kind: 'select',\n labelKey: `${I18N}.field.direction`,\n default: defaults.direction,\n options: [\n { value: 'lte', labelKey: `${I18N}.direction.lte` },\n { value: 'gte', labelKey: `${I18N}.direction.gte` },\n ],\n },\n ],\n needsExpected: () => false,\n score: (run, _expected, config) => {\n const actual = read(run)\n if (actual === null) {\n // The run never recorded this measurement (e.g. a run with no latency\n // stamp). Not a failure of the agent \u2014 skip.\n return skipped(SKIP_REASON.notApplicable, { reason: `run has no ${scorerKey} measurement` })\n }\n const passed = compareThreshold(actual, config.threshold, config.direction)\n return {\n passed,\n score: passed ? 1 : 0,\n evidence: { actual, threshold: config.threshold, direction: config.direction },\n }\n },\n }\n}\n\nconst thresholdConfig = baseConfigSchema.extend({\n threshold: z.number().min(0),\n direction: directionSchema.default('lte'),\n})\nexport type ThresholdConfig = z.infer<typeof thresholdConfig>\n\nexport const latency = thresholdScorer(\n 'latency',\n { threshold: 30_000, direction: 'lte' },\n (run) => run.latencyMs,\n `${I18N}.latency.field.threshold.hint`,\n)\n\nexport const cost = thresholdScorer(\n 'cost',\n { threshold: 100, direction: 'lte' },\n (run) => run.costMinor,\n `${I18N}.cost.field.threshold.hint`,\n)\n\nexport const stepCount = thresholdScorer(\n 'step_count',\n { threshold: 20, direction: 'lte' },\n (run) => run.stepCount,\n `${I18N}.step_count.field.threshold.hint`,\n)\n\nexport const economicsScorers = [latency, cost, stepCount] as const\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,aAAa,eAAe;AACrC,SAAS,kBAAkB,kBAAkB,uBAAuB;AAEpE,MAAM,OAAO;AAOb,SAAS,gBACP,WACA,UACA,MACA,aACmC;AACnC,SAAO;AAAA,IACL;AAAA,IACA,UAAU,GAAG,IAAI,IAAI,SAAS;AAAA,IAC9B,OAAO;AAAA,IACP,MAAM;AAAA,IACN,cAAc;AAAA,IACd,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,UAAU,GAAG,IAAI,IAAI,SAAS;AAAA,QAC9B,SAAS;AAAA,QACT,KAAK;AAAA,QACL,UAAU;AAAA,QACV,SAAS,SAAS;AAAA,MACpB;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,UAAU,GAAG,IAAI;AAAA,QACjB,SAAS,SAAS;AAAA,QAClB,SAAS;AAAA,UACP,EAAE,OAAO,OAAO,UAAU,GAAG,IAAI,iBAAiB;AAAA,UAClD,EAAE,OAAO,OAAO,UAAU,GAAG,IAAI,iBAAiB;AAAA,QACpD;AAAA,MACF;AAAA,IACF;AAAA,IACA,eAAe,MAAM;AAAA,IACrB,OAAO,CAAC,KAAK,WAAW,WAAW;AACjC,YAAM,SAAS,KAAK,GAAG;AACvB,UAAI,WAAW,MAAM;AAGnB,eAAO,QAAQ,YAAY,eAAe,EAAE,QAAQ,cAAc,SAAS,eAAe,CAAC;AAAA,MAC7F;AACA,YAAM,SAAS,iBAAiB,QAAQ,OAAO,WAAW,OAAO,SAAS;AAC1E,aAAO;AAAA,QACL;AAAA,QACA,OAAO,SAAS,IAAI;AAAA,QACpB,UAAU,EAAE,QAAQ,WAAW,OAAO,WAAW,WAAW,OAAO,UAAU;AAAA,MAC/E;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,kBAAkB,iBAAiB,OAAO;AAAA,EAC9C,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EAC3B,WAAW,gBAAgB,QAAQ,KAAK;AAC1C,CAAC;AAGM,MAAM,UAAU;AAAA,EACrB;AAAA,EACA,EAAE,WAAW,KAAQ,WAAW,MAAM;AAAA,EACtC,CAAC,QAAQ,IAAI;AAAA,EACb,GAAG,IAAI;AACT;AAEO,MAAM,OAAO;AAAA,EAClB;AAAA,EACA,EAAE,WAAW,KAAK,WAAW,MAAM;AAAA,EACnC,CAAC,QAAQ,IAAI;AAAA,EACb,GAAG,IAAI;AACT;AAEO,MAAM,YAAY;AAAA,EACvB;AAAA,EACA,EAAE,WAAW,IAAI,WAAW,MAAM;AAAA,EAClC,CAAC,QAAQ,IAAI;AAAA,EACb,GAAG,IAAI;AACT;AAEO,MAAM,mBAAmB,CAAC,SAAS,MAAM,SAAS;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { SKIP_REASON, skipped } from "../types.js";
|
|
2
|
+
import { agentScorers } from "./agent.js";
|
|
3
|
+
import { economicsScorers } from "./economics.js";
|
|
4
|
+
import { judgeScorers } from "./judge.js";
|
|
5
|
+
import { structuredScorers } from "./structured.js";
|
|
6
|
+
import { textScorers } from "./text.js";
|
|
7
|
+
import { toolScorers } from "./tools.js";
|
|
8
|
+
const definitions = [
|
|
9
|
+
...textScorers,
|
|
10
|
+
...structuredScorers,
|
|
11
|
+
...toolScorers,
|
|
12
|
+
...economicsScorers,
|
|
13
|
+
...agentScorers,
|
|
14
|
+
...judgeScorers
|
|
15
|
+
];
|
|
16
|
+
const registry = new Map(
|
|
17
|
+
definitions.map((definition) => [definition.scorerKey, definition])
|
|
18
|
+
);
|
|
19
|
+
const DEPRECATED_SCORER_ALIASES = {
|
|
20
|
+
min_confidence: "confidence_threshold"
|
|
21
|
+
};
|
|
22
|
+
function getScorerDefinition(scorerKey) {
|
|
23
|
+
const canonical = DEPRECATED_SCORER_ALIASES[scorerKey] ?? scorerKey;
|
|
24
|
+
return registry.get(canonical);
|
|
25
|
+
}
|
|
26
|
+
function listScorerDefinitions() {
|
|
27
|
+
return definitions;
|
|
28
|
+
}
|
|
29
|
+
function resolveScorerKey(assertion) {
|
|
30
|
+
if (assertion.scorerKey) return assertion.scorerKey;
|
|
31
|
+
const config = assertion.config ?? {};
|
|
32
|
+
if (typeof config.scorer === "string" && config.scorer) return config.scorer;
|
|
33
|
+
return assertion.key;
|
|
34
|
+
}
|
|
35
|
+
function describeScorers() {
|
|
36
|
+
const described = definitions.map((definition) => ({
|
|
37
|
+
scorerKey: definition.scorerKey,
|
|
38
|
+
labelKey: definition.labelKey,
|
|
39
|
+
group: definition.group,
|
|
40
|
+
kind: definition.kind,
|
|
41
|
+
fields: definition.fields
|
|
42
|
+
}));
|
|
43
|
+
const aliases = Object.entries(DEPRECATED_SCORER_ALIASES).flatMap(([alias, canonical]) => {
|
|
44
|
+
const target = registry.get(canonical);
|
|
45
|
+
if (!target) return [];
|
|
46
|
+
return [
|
|
47
|
+
{
|
|
48
|
+
scorerKey: alias,
|
|
49
|
+
labelKey: `agent_orchestrator.evalAssertions.scorer.${alias}`,
|
|
50
|
+
group: target.group,
|
|
51
|
+
kind: target.kind,
|
|
52
|
+
fields: target.fields,
|
|
53
|
+
deprecated: true,
|
|
54
|
+
deprecatedInFavourOf: canonical
|
|
55
|
+
}
|
|
56
|
+
];
|
|
57
|
+
});
|
|
58
|
+
return [...described, ...aliases];
|
|
59
|
+
}
|
|
60
|
+
function parseScorerConfig(scorerKey, rawConfig, mode = "read") {
|
|
61
|
+
const definition = getScorerDefinition(scorerKey);
|
|
62
|
+
if (!definition) return { ok: false, issues: [`unknown scorer "${scorerKey}"`] };
|
|
63
|
+
const source = rawConfig ?? {};
|
|
64
|
+
const { scorer: _legacyScorerKey, ...rest } = source;
|
|
65
|
+
const schema = mode === "write" ? definition.writeConfigSchema ?? definition.configSchema : definition.configSchema;
|
|
66
|
+
const parsed = schema.safeParse(rest);
|
|
67
|
+
if (!parsed.success) {
|
|
68
|
+
return { ok: false, issues: parsed.error.issues.map((issue) => `${issue.path.join(".") || "."}: ${issue.message}`) };
|
|
69
|
+
}
|
|
70
|
+
return { ok: true, config: parsed.data };
|
|
71
|
+
}
|
|
72
|
+
function runScorer(scorerKey, run, expected, rawConfig) {
|
|
73
|
+
const definition = getScorerDefinition(scorerKey);
|
|
74
|
+
if (!definition) return skipped(SKIP_REASON.unknownScorer, { scorerKey });
|
|
75
|
+
const parsed = parseScorerConfig(scorerKey, rawConfig);
|
|
76
|
+
if (!parsed.ok) return skipped(SKIP_REASON.invalidConfig, { scorerKey, issues: parsed.issues });
|
|
77
|
+
const config = parsed.config;
|
|
78
|
+
if (definition.needsExpected(config) && expected === null) return skipped(SKIP_REASON.noExpected, { scorerKey });
|
|
79
|
+
const verdict = definition.score(run, expected, config);
|
|
80
|
+
const negate = Boolean(parsed.config.negate);
|
|
81
|
+
if (!negate || verdict.passed === null) return verdict;
|
|
82
|
+
return {
|
|
83
|
+
passed: !verdict.passed,
|
|
84
|
+
score: verdict.score === null ? null : 1 - verdict.score,
|
|
85
|
+
evidence: verdict.evidence
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
DEPRECATED_SCORER_ALIASES,
|
|
90
|
+
describeScorers,
|
|
91
|
+
getScorerDefinition,
|
|
92
|
+
listScorerDefinitions,
|
|
93
|
+
parseScorerConfig,
|
|
94
|
+
resolveScorerKey,
|
|
95
|
+
runScorer
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/modules/agent_orchestrator/lib/eval/registry/index.ts"],
|
|
4
|
+
"sourcesContent": ["import type { Json, ScorerDefinition, ScorerDescriptor, ScorerRunView, ScorerVerdict } from '../types'\nimport { SKIP_REASON, skipped } from '../types'\nimport { agentScorers } from './agent'\nimport { economicsScorers } from './economics'\nimport { judgeScorers } from './judge'\nimport { structuredScorers } from './structured'\nimport { textScorers } from './text'\nimport { toolScorers } from './tools'\n\n/**\n * The single source of truth for scorer identity. 21 definitions \u2014 20 deterministic\n * plus `llm_judge` \u2014 consumed by the online plane (EvalRuntimeService), the offline\n * plane (replay engine, CI gate) and `GET /eval-scorers`, which generates the\n * assertion form from `fields`.\n */\nconst definitions: ReadonlyArray<ScorerDefinition<never>> = [\n ...textScorers,\n ...structuredScorers,\n ...toolScorers,\n ...economicsScorers,\n ...agentScorers,\n ...judgeScorers,\n] as unknown as ReadonlyArray<ScorerDefinition<never>>\n\nconst registry = new Map<string, ScorerDefinition<never>>(\n definitions.map((definition) => [definition.scorerKey, definition]),\n)\n\n/**\n * Renamed keys. `min_confidence` is the only alias: it and `confidence_threshold`\n * both read `run.confidence` and neither touches `expected`, so the rename is\n * provably behaviour-preserving. `required_keys` is deliberately NOT aliased \u2014 see\n * the note on its definition.\n */\nexport const DEPRECATED_SCORER_ALIASES: Readonly<Record<string, string>> = {\n min_confidence: 'confidence_threshold',\n}\n\nexport function getScorerDefinition(scorerKey: string): ScorerDefinition<never> | undefined {\n const canonical = DEPRECATED_SCORER_ALIASES[scorerKey] ?? scorerKey\n return registry.get(canonical)\n}\n\nexport function listScorerDefinitions(): ReadonlyArray<ScorerDefinition<never>> {\n return definitions\n}\n\n/**\n * Resolution chain, widest-compatible first:\n * 1. the `scorer_key` column (Phase 1 onward)\n * 2. `config.scorer` \u2014 the undocumented indirection shipped before this column\n * existed, retained as a read-fallback for \u22651 minor\n * 3. the assertion `key`, which used to double as the scorer identity\n */\nexport function resolveScorerKey(assertion: {\n scorerKey?: string | null\n key: string\n config?: unknown\n}): string {\n if (assertion.scorerKey) return assertion.scorerKey\n const config = (assertion.config as Record<string, unknown> | null) ?? {}\n if (typeof config.scorer === 'string' && config.scorer) return config.scorer\n return assertion.key\n}\n\n/** Serializable projection for the browser \u2014 never ships `configSchema` or `score`. */\nexport function describeScorers(): ScorerDescriptor[] {\n const described = definitions.map((definition) => ({\n scorerKey: definition.scorerKey,\n labelKey: definition.labelKey,\n group: definition.group,\n kind: definition.kind,\n fields: definition.fields,\n }))\n const aliases = Object.entries(DEPRECATED_SCORER_ALIASES).flatMap(([alias, canonical]) => {\n const target = registry.get(canonical)\n if (!target) return []\n return [\n {\n scorerKey: alias,\n labelKey: `agent_orchestrator.evalAssertions.scorer.${alias}`,\n group: target.group,\n kind: target.kind,\n fields: target.fields,\n deprecated: true,\n deprecatedInFavourOf: canonical,\n },\n ]\n })\n return [...described, ...aliases]\n}\n\nexport type ScorerConfigParseResult =\n | { ok: true; config: unknown }\n | { ok: false; issues: string[] }\n\n/**\n * Validates a raw config against its scorer's schema.\n *\n * `mode: 'write'` uses the stricter `writeConfigSchema` where one exists \u2014 range\n * and shape checks belong at the API boundary (422), never at evaluation time,\n * because rejecting a STORED config there turns an existing verdict into a skip\n * and can flip a gate open.\n */\nexport function parseScorerConfig(\n scorerKey: string,\n rawConfig: unknown,\n mode: 'read' | 'write' = 'read',\n): ScorerConfigParseResult {\n const definition = getScorerDefinition(scorerKey)\n if (!definition) return { ok: false, issues: [`unknown scorer \"${scorerKey}\"`] }\n\n // `config.scorer` is the deprecated indirection: strip it before validation so a\n // legacy row does not fail on an unrecognised property.\n const source = (rawConfig as Record<string, unknown> | null) ?? {}\n const { scorer: _legacyScorerKey, ...rest } = source\n const schema = mode === 'write' ? definition.writeConfigSchema ?? definition.configSchema : definition.configSchema\n const parsed = schema.safeParse(rest)\n if (!parsed.success) {\n return { ok: false, issues: parsed.error.issues.map((issue) => `${issue.path.join('.') || '.'}: ${issue.message}`) }\n }\n return { ok: true, config: parsed.data }\n}\n\n/**\n * Runs one assertion end to end: validates config, applies the runtime\n * `needsExpected` skip, delegates to the pure scorer, then applies `negate`\n * centrally so no individual scorer implements it.\n *\n * An invalid config or an unknown key yields a SKIPPED verdict, never a failed\n * one \u2014 a config typo must stay visible without flipping `AgentRun.evalPassed`.\n */\nexport function runScorer(\n scorerKey: string,\n run: ScorerRunView,\n expected: Json | null,\n rawConfig: unknown,\n): ScorerVerdict {\n const definition = getScorerDefinition(scorerKey)\n if (!definition) return skipped(SKIP_REASON.unknownScorer, { scorerKey })\n\n const parsed = parseScorerConfig(scorerKey, rawConfig)\n if (!parsed.ok) return skipped(SKIP_REASON.invalidConfig, { scorerKey, issues: parsed.issues })\n\n const config = parsed.config as never\n if (definition.needsExpected(config) && expected === null) return skipped(SKIP_REASON.noExpected, { scorerKey })\n\n const verdict = definition.score(run, expected, config)\n const negate = Boolean((parsed.config as { negate?: boolean }).negate)\n if (!negate || verdict.passed === null) return verdict\n\n return {\n passed: !verdict.passed,\n score: verdict.score === null ? null : 1 - verdict.score,\n evidence: verdict.evidence,\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { skipped } from "../types.js";
|
|
3
|
+
import { judgeRubricSchema } from "../judgeRubric.js";
|
|
4
|
+
import { baseConfigSchema } from "./shared.js";
|
|
5
|
+
const I18N = "agent_orchestrator.evalAssertions.scorer";
|
|
6
|
+
const judgeConfig = z.union([
|
|
7
|
+
judgeRubricSchema.and(baseConfigSchema),
|
|
8
|
+
baseConfigSchema.extend({ rubric: z.string().optional() })
|
|
9
|
+
]);
|
|
10
|
+
const judgeWriteConfig = z.union([
|
|
11
|
+
baseConfigSchema.extend({ rubric: z.string().min(1) }),
|
|
12
|
+
judgeRubricSchema.and(baseConfigSchema)
|
|
13
|
+
]);
|
|
14
|
+
const llmJudge = {
|
|
15
|
+
scorerKey: "llm_judge",
|
|
16
|
+
labelKey: `${I18N}.llm_judge`,
|
|
17
|
+
group: "judge",
|
|
18
|
+
kind: "llm_judge",
|
|
19
|
+
configSchema: judgeConfig,
|
|
20
|
+
writeConfigSchema: judgeWriteConfig,
|
|
21
|
+
fields: [
|
|
22
|
+
{
|
|
23
|
+
name: "promptTemplate",
|
|
24
|
+
kind: "textarea",
|
|
25
|
+
labelKey: `${I18N}.llm_judge.field.rubric`,
|
|
26
|
+
hintKey: `${I18N}.llm_judge.field.rubric.hint`,
|
|
27
|
+
placeholderKey: `${I18N}.llm_judge.field.rubric.placeholder`,
|
|
28
|
+
required: true
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "threshold",
|
|
32
|
+
kind: "slider",
|
|
33
|
+
labelKey: `${I18N}.llm_judge.field.threshold`,
|
|
34
|
+
hintKey: `${I18N}.llm_judge.field.threshold.hint`,
|
|
35
|
+
min: 0,
|
|
36
|
+
max: 1,
|
|
37
|
+
step: 0.05,
|
|
38
|
+
default: 0.5
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "samples",
|
|
42
|
+
kind: "number",
|
|
43
|
+
labelKey: `${I18N}.llm_judge.field.samples`,
|
|
44
|
+
hintKey: `${I18N}.llm_judge.field.samples.hint`,
|
|
45
|
+
min: 1,
|
|
46
|
+
max: 9,
|
|
47
|
+
step: 2,
|
|
48
|
+
default: 1
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "requireReasoning",
|
|
52
|
+
kind: "boolean",
|
|
53
|
+
labelKey: `${I18N}.llm_judge.field.requireReasoning`,
|
|
54
|
+
hintKey: `${I18N}.llm_judge.field.requireReasoning.hint`,
|
|
55
|
+
default: true
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
needsExpected: () => false,
|
|
59
|
+
score: () => skipped("unknown_scorer", { reason: "llm_judge is scored asynchronously by the judge runner" })
|
|
60
|
+
};
|
|
61
|
+
const judgeScorers = [llmJudge];
|
|
62
|
+
export {
|
|
63
|
+
judgeScorers,
|
|
64
|
+
llmJudge
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=judge.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/modules/agent_orchestrator/lib/eval/registry/judge.ts"],
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod'\nimport type { ScorerDefinition } from '../types'\nimport { skipped } from '../types'\nimport { judgeRubricSchema } from '../judgeRubric'\nimport { baseConfigSchema } from './shared'\n\nconst I18N = 'agent_orchestrator.evalAssertions.scorer'\n\n/**\n * Accepts BOTH shapes on purpose:\n *\n * - the structured `JudgeRubric` (choice scoring, evaluation steps, sampling), and\n * - the pre-Phase-3 `{ rubric: string }` that the seeded `llm_judge_helpfulness`\n * assertion and every user-authored judge row still hold.\n *\n * A union rather than a migration: rewriting stored rubrics would change what\n * existing judges measure. `normalizeJudgeRubric` lifts the legacy form into an\n * equivalent binary rubric at evaluation time.\n */\nconst judgeConfig = z.union([\n judgeRubricSchema.and(baseConfigSchema),\n baseConfigSchema.extend({ rubric: z.string().optional() }),\n])\n\n/**\n * Write-boundary schema. The read union above ends in an all-optional object that\n * accepts ANYTHING, so using it for writes made `resolveScorerForWrite`'s promised\n * 422 unreachable: a structurally broken rubric (empty `promptTemplate`, one\n * choice) fell through to the permissive branch, saved with 200, and only failed\n * silently at evaluation time forever after.\n *\n * Discriminating on which key is PRESENT \u2014 mirroring `normalizeJudgeRubric` \u2014\n * routes a full rubric to the strict schema while still accepting the legacy form.\n */\nconst judgeWriteConfig = z.union([\n baseConfigSchema.extend({ rubric: z.string().min(1) }),\n judgeRubricSchema.and(baseConfigSchema),\n])\nexport type JudgeConfig = z.infer<typeof judgeConfig>\n\n/**\n * `llm_judge` is a first-class registry member so `GET /eval-scorers` can project\n * it and the generated form can render it \u2014 it is the registry's hardest scorer,\n * not a parallel mechanism.\n *\n * Its `score` is a deliberate no-op returning SKIPPED. A judge verdict needs an\n * async model round-trip, and `ScorerDefinition.score` is contractually a PURE,\n * SYNCHRONOUS function \u2014 that purity is what guarantees online/offline parity for\n * the deterministic tier. Judge scoring therefore runs on its own async path in\n * `lib/eval/llmJudge.ts`, which reads this definition's `configSchema` for\n * validation. Callers of the deterministic evaluator never reach this branch:\n * `evaluateRun` selects assertions by `type: 'deterministic'`.\n */\nexport const llmJudge: ScorerDefinition<JudgeConfig> = {\n scorerKey: 'llm_judge',\n labelKey: `${I18N}.llm_judge`,\n group: 'judge',\n kind: 'llm_judge',\n configSchema: judgeConfig,\n writeConfigSchema: judgeWriteConfig,\n fields: [\n {\n name: 'promptTemplate',\n kind: 'textarea',\n labelKey: `${I18N}.llm_judge.field.rubric`,\n hintKey: `${I18N}.llm_judge.field.rubric.hint`,\n placeholderKey: `${I18N}.llm_judge.field.rubric.placeholder`,\n required: true,\n },\n {\n name: 'threshold',\n kind: 'slider',\n labelKey: `${I18N}.llm_judge.field.threshold`,\n hintKey: `${I18N}.llm_judge.field.threshold.hint`,\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.5,\n },\n {\n name: 'samples',\n kind: 'number',\n labelKey: `${I18N}.llm_judge.field.samples`,\n hintKey: `${I18N}.llm_judge.field.samples.hint`,\n min: 1,\n max: 9,\n step: 2,\n default: 1,\n },\n {\n name: 'requireReasoning',\n kind: 'boolean',\n labelKey: `${I18N}.llm_judge.field.requireReasoning`,\n hintKey: `${I18N}.llm_judge.field.requireReasoning.hint`,\n default: true,\n },\n ],\n needsExpected: () => false,\n score: () => skipped('unknown_scorer', { reason: 'llm_judge is scored asynchronously by the judge runner' }),\n}\n\nexport const judgeScorers = [llmJudge] as const\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,eAAe;AACxB,SAAS,yBAAyB;AAClC,SAAS,wBAAwB;AAEjC,MAAM,OAAO;AAab,MAAM,cAAc,EAAE,MAAM;AAAA,EAC1B,kBAAkB,IAAI,gBAAgB;AAAA,EACtC,iBAAiB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AAC3D,CAAC;AAYD,MAAM,mBAAmB,EAAE,MAAM;AAAA,EAC/B,iBAAiB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;AAAA,EACrD,kBAAkB,IAAI,gBAAgB;AACxC,CAAC;AAgBM,MAAM,WAA0C;AAAA,EACrD,WAAW;AAAA,EACX,UAAU,GAAG,IAAI;AAAA,EACjB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,QAAQ;AAAA,IACN;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,UAAU,GAAG,IAAI;AAAA,MACjB,SAAS,GAAG,IAAI;AAAA,MAChB,gBAAgB,GAAG,IAAI;AAAA,MACvB,UAAU;AAAA,IACZ;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,UAAU,GAAG,IAAI;AAAA,MACjB,SAAS,GAAG,IAAI;AAAA,MAChB,KAAK;AAAA,MACL,KAAK;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,UAAU,GAAG,IAAI;AAAA,MACjB,SAAS,GAAG,IAAI;AAAA,MAChB,KAAK;AAAA,MACL,KAAK;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,UAAU,GAAG,IAAI;AAAA,MACjB,SAAS,GAAG,IAAI;AAAA,MAChB,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,eAAe,MAAM;AAAA,EACrB,OAAO,MAAM,QAAQ,kBAAkB,EAAE,QAAQ,yDAAyD,CAAC;AAC7G;AAEO,MAAM,eAAe,CAAC,QAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|